0ff4e0513b53dd1951c5a58af7d88a675cb586b9
[WebKit-https.git] / WebCore / ChangeLog
1 2009-01-09  Anders Carlsson  <andersca@apple.com>
2
3         Fix build.
4         
5         * WebCore.LP64.exp:
6
7 2009-01-09  Dimitri Glazkov  <dglazkov@chromium.org>
8
9         Reviewed by Eric Seidel.
10
11         Add TransformationMatrixSkia to platform/graphics/skia
12         https://bugs.webkit.org/show_bug.cgi?id=23215
13
14         * platform/graphics/skia/TransformationMatrixSkia.cpp: Added.
15         (WebCore::TransformationMatrix::TransformationMatrix):
16         (WebCore::TransformationMatrix::setMatrix):
17         (WebCore::TransformationMatrix::map):
18         (WebCore::TransformationMatrix::mapRect):
19         (WebCore::TransformationMatrix::isIdentity):
20         (WebCore::TransformationMatrix::reset):
21         (WebCore::TransformationMatrix::scale):
22         (WebCore::TransformationMatrix::rotate):
23         (WebCore::TransformationMatrix::translate):
24         (WebCore::TransformationMatrix::shear):
25         (WebCore::TransformationMatrix::det):
26         (WebCore::TransformationMatrix::inverse):
27         (WebCore::TransformationMatrix::operator SkMatrix):
28         (WebCore::TransformationMatrix::operator==):
29         (WebCore::TransformationMatrix::operator*=):
30         (WebCore::TransformationMatrix::operator*):
31         (WebCore::TransformationMatrix::a):
32         (WebCore::TransformationMatrix::setA):
33         (WebCore::TransformationMatrix::b):
34         (WebCore::TransformationMatrix::setB):
35         (WebCore::TransformationMatrix::c):
36         (WebCore::TransformationMatrix::setC):
37         (WebCore::TransformationMatrix::d):
38         (WebCore::TransformationMatrix::setD):
39         (WebCore::TransformationMatrix::e):
40         (WebCore::TransformationMatrix::setE):
41         (WebCore::TransformationMatrix::f):
42         (WebCore::TransformationMatrix::setF):
43
44 2009-01-09  Alexey Proskuryakov  <ap@webkit.org>
45
46         Reviewed by Darin Adler.
47
48         <rdar://problem/6477502> Repro crash reloading page using HTML5 AppCache on Windows
49
50         Test: http/tests/appcache/reload.html
51
52         On Windows, reloading resulted in the following sequence of events:
53         1) A new main resource loader was created and associated with the cache. Its document loader
54         was not associated with the cache yet.
55         2) The old document loader was destroyed, and since it was the last one, ApplicationCacheGroup
56         teardown started, with newestCache being zeroed out.
57         3) The new document loader was associated with the cache group, and cache update started.
58         4) Since newestCache was null, this caused many problems.
59
60         * loader/appcache/ApplicationCacheGroup.cpp:
61         (WebCore::ApplicationCacheGroup::documentLoaderDestroyed): Improve comments and assertions,
62         no functional changes.
63         (WebCore::ApplicationCacheGroup::associateDocumentLoaderWithCache): Revive the cache group
64         if its newest cache pointer is already saved for teardown. Note that the cache pointer
65         validity is ensured by MainResourceLoader that holds a reference to it.
66
67 2009-01-09  Darin Fisher  <darin@chromium.org>
68
69         Reviewed by Eric Seidel.
70
71         https://bugs.webkit.org/show_bug.cgi?id=23214
72         Upstream platform/network/chromium/
73
74         * platform/network/chromium/AuthenticationChallenge.h: Added.
75         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
76         (WebCore::AuthenticationChallenge::sourceHandle):
77         * platform/network/chromium/AuthenticationChallengeChromium.cpp: Added.
78         (WebCore::AuthenticationChallenge::platformCompare):
79         * platform/network/chromium/CookieJarChromium.cpp: Added.
80         (WebCore::setCookies):
81         (WebCore::cookies):
82         (WebCore::cookiesEnabled):
83         * platform/network/chromium/DNSChromium.cpp: Added.
84         (WebCore::prefetchDNS):
85         * platform/network/chromium/NetworkStateNotifierChromium.cpp: Added.
86         (WebCore::NetworkStateNotifier::updateState):
87         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
88         * platform/network/chromium/NetworkStateNotifierPrivate.h: Added.
89         * platform/network/chromium/ResourceError.h: Added.
90         (WebCore::ResourceError::ResourceError):
91         * platform/network/chromium/ResourceRequest.h: Added.
92         (WebCore::ResourceRequest::):
93         (WebCore::ResourceRequest::ResourceRequest):
94         (WebCore::ResourceRequest::frame):
95         (WebCore::ResourceRequest::setFrame):
96         (WebCore::ResourceRequest::setTargetType):
97         (WebCore::ResourceRequest::targetType):
98         (WebCore::ResourceRequest::originPid):
99         (WebCore::ResourceRequest::setOriginPid):
100         (WebCore::ResourceRequest::securityInfo):
101         (WebCore::ResourceRequest::setSecurityInfo):
102         (WebCore::ResourceRequest::doUpdatePlatformRequest):
103         (WebCore::ResourceRequest::doUpdateResourceRequest):
104         * platform/network/chromium/ResourceResponse.h:
105         (WebCore::ResourceResponse::ResourceResponse):
106         (WebCore::ResourceResponse::getSecurityInfo):
107         (WebCore::ResourceResponse::setSecurityInfo):
108         (WebCore::ResourceResponse::isContentFiltered):
109         (WebCore::ResourceResponse::setIsContentFiltered):
110         (WebCore::ResourceResponse::doUpdateResourceResponse):
111
112 2009-01-09  Peter Kasting  <pkasting@google.com>
113
114         Reviewed by David Hyatt.
115
116         https://bugs.webkit.org/show_bug.cgi?id=22995
117         Fix flaky image animation by resetting the metadata for a frame when
118         we get new data for that frame.  This fixes animations that halted
119         when the next frame of the animation wasn't complete by the time the
120         current frame's duration expired.
121
122         * platform/graphics/BitmapImage.cpp:
123         (WebCore::BitmapImage::destroyDecodedData):
124         (WebCore::BitmapImage::dataChanged):
125         * platform/graphics/BitmapImage.h:
126         (WebCore::FrameData::~FrameData):
127         * platform/graphics/cairo/ImageCairo.cpp:
128         (WebCore::FrameData::clear):
129         * platform/graphics/cg/ImageCG.cpp:
130         (WebCore::FrameData::clear):
131         * platform/graphics/qt/ImageQt.cpp:
132         (WebCore::FrameData::clear):
133         * platform/graphics/wx/ImageWx.cpp:
134         (WebCore::FrameData::clear):
135
136 2009-01-09  Simon Hausmann  <simon.hausmann@nokia.com>
137
138         Rubber-stamped by Tor Arne Vestbø.
139
140         Swap the .h and the .cpp output in the Qt build for the
141         UserAgentStyleSheetData files, to put the definition in the .cpp file
142         and the declaration in the header file.
143
144         * WebCore.pro:
145
146 2009-01-09  David Levin  <levin@chromium.org>
147
148         Reviewed by Oliver Hunt.
149
150         https://bugs.webkit.org/show_bug.cgi?id=23175
151
152         Added forwarding header.
153
154         * ForwardingHeaders/wtf/PtrAndFlags.h: Added.
155
156 2009-01-09  Tor Arne Vestbø  <tavestbo@trolltech.com>
157
158         Reviewed by Simon Hausmann.
159
160         Prevent qmake from generating duplicate rules for embedded stylesheets
161         
162         The STYLESHEETS_EMBED variable used to contain only one file name, but
163         now that it is a list of files we need to change it to be a dependency
164         for the stylesheet generator instead of the input.
165
166         * WebCore.pro:
167
168 2009-01-09  Simon Hausmann  <simon.hausmann@nokia.com>
169
170         Reviewed by Tor Arne Vestbø.
171
172         Fix qmake warning about missing test function, a contains() call was
173         missing.
174
175         * WebCore.pro:
176
177 2009-01-09  Simon Hausmann  <simon.hausmann@nokia.com>
178
179         Rubber-stamped by Tor Arne Vestbø.
180
181         Add the Qt API headers to HEADERS, too, for improved completion in IDEs.
182
183         * WebCore.pro:
184
185 2009-01-09  David Levin  <levin@chromium.org>
186
187         Reviewed by Alexey Proskuryakov.
188
189         https://bugs.webkit.org/show_bug.cgi?id=23199
190
191         Fix deref's of string happening on two different threads.
192
193         No observable change in behavior, so no test.  However, there are asserts
194         being added for https://bugs.webkit.org/show_bug.cgi?id=23175 which
195         will detect this issue while running the normal worker tests.
196
197         * dom/WorkerThread.cpp:
198         (WebCore::WorkerThreadStartupData::create):
199         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
200         (WebCore::WorkerThread::WorkerThread):
201         (WebCore::WorkerThread::workerThread):
202         * dom/WorkerThread.h:
203
204 2009-01-08  Dan Bernstein  <mitz@apple.com>
205
206         Reviewed by Adam Roben.
207
208         - use native glyph support in Core Graphics when available
209
210         * platform/graphics/win/FontCGWin.cpp:
211         (WebCore::Font::drawGlyphs): Changed to use drawGDIGlyphs() only if
212         native glyph support is not available or stroking is required. Changed
213         to pass the font's useGDI() flag to wkSetCGContextFontRenderingStyle to
214         request the use of native glyphs.
215         * platform/graphics/win/FontCustomPlatformData.cpp:
216         (WebCore::FontCustomPlatformData::fontPlatformData): Added a call to
217         wkSetFontPlatformInfo to attach the LOGFONT to the CGFont.
218         * platform/graphics/win/FontPlatformDataCGWin.cpp:
219         (WebCore::FontPlatformData::platformDataInit): Ditto.
220
221 2009-01-08  Peter Kasting  <pkasting@google.com>
222
223         Reviewed by Sam Weinig.
224
225         https://bugs.webkit.org/show_bug.cgi?id=22929
226         Fix memory regression when decoding large animated GIFs.
227
228         * platform/graphics/cg/ImageSourceCG.cpp:
229         (WebCore::ImageSource::clear):
230
231 2009-01-08  Scott Violet  <sky@chromium.org>
232
233         Reviewed by Eric Seidel (and Adam Barth).
234
235         Fix Images to return their file extension
236         http://code.google.com/p/chromium/issues/detail?id=5827
237
238         * platform/graphics/skia/ImageSourceSkia.cpp:
239         (WebCore::ImageSource::filenameExtension):
240
241 2009-01-08  Dimitri Glazkov  <dglazkov@chromium.org>
242
243         Reviewed by Eric Seidel.
244
245         Add PathSkia and PatternSkia implementations to WebCore
246         https://bugs.webkit.org/show_bug.cgi?id=23200
247
248         * platform/graphics/skia/PathSkia.cpp: Added.
249         (WebCore::Path::Path):
250         (WebCore::Path::~Path):
251         (WebCore::Path::operator=):
252         (WebCore::Path::isEmpty):
253         (WebCore::Path::contains):
254         (WebCore::Path::translate):
255         (WebCore::Path::boundingRect):
256         (WebCore::Path::moveTo):
257         (WebCore::Path::addLineTo):
258         (WebCore::Path::addQuadCurveTo):
259         (WebCore::Path::addBezierCurveTo):
260         (WebCore::Path::addArcTo):
261         (WebCore::Path::closeSubpath):
262         (WebCore::Path::addArc):
263         (WebCore::Path::addRect):
264         (WebCore::Path::addEllipse):
265         (WebCore::Path::clear):
266         (WebCore::convertPathPoints):
267         (WebCore::Path::apply):
268         (WebCore::Path::transform):
269         (WebCore::Path::debugString):
270         (WebCore::boundingBoxForCurrentStroke):
271         (WebCore::Path::strokeBoundingRect):
272         * platform/graphics/skia/PatternSkia.cpp: Added.
273         (WebCore::shaderRule):
274         (WebCore::Pattern::createPlatformPattern):
275
276 2009-01-08  Dimitri Glazkov  <dglazkov@chromium.org>
277
278         Reviewed by Eric Seidel.
279
280         Add ImageSourceSkia to platform/graphics/skia
281         https://bugs.webkit.org/show_bug.cgi?id=23200
282         
283         ImageSourceSkia is mostly a hack to support our
284         ICO decoder model.  See ImageSourceSkia.h for more
285         explanation.  Eventually we'd like to make our ICO
286         decoder lazy.
287
288         * platform/graphics/ImageSource.h: mark m_decoder as protected
289         * platform/graphics/skia/ImageSourceSkia.cpp: Added.
290         (WebCore::createDecoder):
291         (WebCore::ImageSource::ImageSource):
292         (WebCore::ImageSource::~ImageSource):
293         (WebCore::ImageSource::clear):
294         (WebCore::ImageSource::initialized):
295         (WebCore::ImageSource::setData):
296         (WebCore::ImageSource::isSizeAvailable):
297         (WebCore::ImageSource::size):
298         (WebCore::ImageSource::frameSizeAtIndex):
299         (WebCore::ImageSource::repetitionCount):
300         (WebCore::ImageSource::frameCount):
301         (WebCore::ImageSource::createFrameAtIndex):
302         (WebCore::ImageSource::frameIsCompleteAtIndex):
303         (WebCore::ImageSource::frameDurationAtIndex):
304         (WebCore::ImageSource::frameHasAlphaAtIndex):
305         (WebCore::ImageSourceSkia::setData):
306         (WebCore::ImageSource::filenameExtension):
307         * platform/graphics/skia/ImageSourceSkia.h: Added.
308
309 2009-01-08  Dimitri Glazkov  <dglazkov@chromium.org>
310
311         Reviewed by Eric Seidel.
312
313         Add NativeImageSkia (PlatformImagePtr) to platform/graphics/skia
314         https://bugs.webkit.org/show_bug.cgi?id=23200
315
316         * platform/graphics/skia/NativeImageSkia.cpp: Added.
317         (NativeImageSkia::NativeImageSkia):
318         (NativeImageSkia::decodedSize):
319         (NativeImageSkia::hasResizedBitmap):
320         (NativeImageSkia::resizedBitmap):
321         (NativeImageSkia::shouldCacheResampling):
322         * platform/graphics/skia/NativeImageSkia.h: Added.
323         (NativeImageSkia::setDataComplete):
324         (NativeImageSkia::isDataComplete):
325
326 2009-01-08  Dimitri Glazkov  <dglazkov@chromium.org>
327
328         Reviewed by Eric Seidel.
329
330         Add ImageBufferSkia and ImageSkia files.
331         https://bugs.webkit.org/show_bug.cgi?id=23200
332         For now we've left BitmapImage and BitmapImageSingleFrameSkia
333         implementations in the ImageSkia file (like ImageCG has), but
334         we intend to break them out into their own files.
335
336         * platform/graphics/skia/ImageBufferSkia.cpp: Added.
337         (WebCore::ImageBufferData::ImageBufferData):
338         (WebCore::ImageBuffer::ImageBuffer):
339         (WebCore::ImageBuffer::~ImageBuffer):
340         (WebCore::ImageBuffer::context):
341         (WebCore::ImageBuffer::image):
342         (WebCore::ImageBuffer::getImageData):
343         (WebCore::ImageBuffer::putImageData):
344         (WebCore::ImageBuffer::toDataURL):
345         * platform/graphics/skia/ImageSkia.cpp: Added.
346         (WebCore::):
347         (WebCore::FrameData::clear):
348         (WebCore::Image::loadPlatformResource):
349         (WebCore::Image::drawPattern):
350         (WebCore::BitmapImage::initPlatformData):
351         (WebCore::BitmapImage::invalidatePlatformData):
352         (WebCore::BitmapImage::checkForSolidColor):
353         (WebCore::BitmapImage::draw):
354         (WebCore::BitmapImageSingleFrameSkia::draw):
355         (WebCore::BitmapImageSingleFrameSkia::create):
356
357 2009-01-08  James Robinson  <jamesr@google.com>
358
359         Reviewed by Mark Rowe.
360         Landed by Pamela Greene.
361
362         WebCore::Event::timeStamp() is a simple accessor and should be const
363
364         https://bugs.webkit.org/show_bug.cgi?id=23176
365
366         * dom/Event.h:
367         (WebCore::Event::timeStamp):
368
369 2009-01-08  Antti Koivisto  <antti@apple.com>
370
371         Reviewed by Oliver Hunt.
372
373         Fix <rdar://problem/6467206> 
374         Resources loaded from the memory cache do not get correctly inserted into the DocLoader resource map (22994)
375         
376         Use CachedResourceHandle in document resource map so resources get updated correctly when using
377         using cache validation conditionals.
378
379         * loader/Cache.cpp:
380         (WebCore::Cache::evict):
381         * loader/DocLoader.cpp:
382         (WebCore::DocLoader::~DocLoader):
383         (WebCore::DocLoader::requestResource):
384         (WebCore::DocLoader::setAutoLoadImages):
385         (WebCore::DocLoader::removeCachedResource):
386         * loader/DocLoader.h:
387         (WebCore::DocLoader::cachedResource):
388         (WebCore::DocLoader::allCachedResources):
389         * loader/DocumentLoader.cpp:
390         (WebCore::DocumentLoader::getSubresources):
391         * loader/ImageLoader.cpp:
392         (WebCore::ImageLoader::updateFromElement):
393
394 2009-01-08  Dimitri Glazkov  <dglazkov@chromium.org>
395
396         Reviewed by Eric Seidel.
397
398         Add a cleaned-up GraphicsContextSkia implementation to WebKit.
399         https://bugs.webkit.org/show_bug.cgi?id=23191
400
401         * platform/graphics/skia/GraphicsContextSkia.cpp: Added.
402         (WebCore::):
403         (WebCore::GraphicsContext::GraphicsContext):
404         (WebCore::GraphicsContext::~GraphicsContext):
405         (WebCore::GraphicsContext::platformContext):
406         (WebCore::GraphicsContext::savePlatformState):
407         (WebCore::GraphicsContext::restorePlatformState):
408         (WebCore::GraphicsContext::beginTransparencyLayer):
409         (WebCore::GraphicsContext::endTransparencyLayer):
410         (WebCore::GraphicsContext::addInnerRoundedRectClip):
411         (WebCore::GraphicsContext::addPath):
412         (WebCore::GraphicsContext::beginPath):
413         (WebCore::GraphicsContext::clearPlatformShadow):
414         (WebCore::GraphicsContext::clearRect):
415         (WebCore::GraphicsContext::clip):
416         (WebCore::GraphicsContext::clipOut):
417         (WebCore::GraphicsContext::clipOutEllipseInRect):
418         (WebCore::GraphicsContext::clipPath):
419         (WebCore::GraphicsContext::clipToImageBuffer):
420         (WebCore::GraphicsContext::concatCTM):
421         (WebCore::GraphicsContext::drawConvexPolygon):
422         (WebCore::GraphicsContext::drawEllipse):
423         (WebCore::GraphicsContext::drawFocusRing):
424         (WebCore::GraphicsContext::drawLine):
425         (WebCore::GraphicsContext::drawLineForMisspellingOrBadGrammar):
426         (WebCore::GraphicsContext::drawLineForText):
427         (WebCore::GraphicsContext::drawRect):
428         (WebCore::GraphicsContext::fillPath):
429         (WebCore::GraphicsContext::fillRect):
430         (WebCore::GraphicsContext::fillRoundedRect):
431         (WebCore::GraphicsContext::getCTM):
432         (WebCore::GraphicsContext::roundToDevicePixels):
433         (WebCore::GraphicsContext::scale):
434         (WebCore::GraphicsContext::setAlpha):
435         (WebCore::GraphicsContext::setCompositeOperation):
436         (WebCore::GraphicsContext::setImageInterpolationQuality):
437         (WebCore::GraphicsContext::setLineCap):
438         (WebCore::GraphicsContext::setLineDash):
439         (WebCore::GraphicsContext::setLineJoin):
440         (WebCore::GraphicsContext::setMiterLimit):
441         (WebCore::GraphicsContext::setPlatformFillColor):
442         (WebCore::GraphicsContext::setPlatformShadow):
443         (WebCore::GraphicsContext::setPlatformStrokeColor):
444         (WebCore::GraphicsContext::setPlatformStrokeStyle):
445         (WebCore::GraphicsContext::setPlatformStrokeThickness):
446         (WebCore::GraphicsContext::setPlatformTextDrawingMode):
447         (WebCore::GraphicsContext::setURLForRect):
448         (WebCore::GraphicsContext::setUseAntialiasing):
449         (WebCore::GraphicsContext::strokeArc):
450         (WebCore::GraphicsContext::strokePath):
451         (WebCore::GraphicsContext::strokeRect):
452         (WebCore::GraphicsContext::rotate):
453         (WebCore::GraphicsContext::translate):
454
455 2009-01-08  David Hyatt  <hyatt@apple.com>
456
457         Fix for <rdar://problem/6465682> REGRESSION: In Mail, can't force a message to auto scroll.
458
459         Make scrollRectIntoViewRecursively call out to the HostWindow to continue the recursive scroll for
460         any scrollable views that may contain a WebView.  Does nothing on platforms other than the Mac, but
461         might eventually be of interest to other platforms.
462
463         Reviewed by Oliver Hunt
464
465         * WebCore.base.exp:
466         * page/Chrome.cpp:
467         (WebCore::Chrome::scrollRectIntoView):
468         * page/Chrome.h:
469         * page/ChromeClient.h:
470         (WebCore::ChromeClient::scrollRectIntoView):
471         * platform/HostWindow.h:
472         * platform/ScrollView.cpp:
473         (WebCore::ScrollView::scrollRectIntoViewRecursively):
474
475 2009-01-08  Adam Treat  <adam.treat@torchmobile.com>
476
477         Reviewed by David Hyatt.
478
479         No need to make this part of HostWindow and moreover HostWindow should
480         not have any reference to non-platform parts of WebCore.
481
482         * page/Chrome.h:
483         * page/FrameView.cpp:
484         (WebCore::FrameView::setContentsSize):
485         * platform/HostWindow.h:
486
487 2009-01-08  Eric Carlson  <eric.carlson@apple.com>
488
489         Reviewed by Adele Peterson.
490
491         Simplify Mac interfaces for drawing media controller elements
492
493         <rdar://problem/6293969>
494
495         * WebCore.base.exp: update for changed WebKitSystemInterface media controller functions
496
497         * platform/mac/WebCoreSystemInterface.h: Ditto
498         * platform/mac/WebCoreSystemInterface.mm: Ditto
499
500         * rendering/MediaControlElements.h:
501         (WebCore::): Add MediaControlElements enum
502
503         * rendering/RenderThemeMac.mm:
504         (WebCore::RenderThemeMac::paintMediaFullscreenButton):  update for changed WebKitSystemInterface
505         media controller functions
506         (WebCore::RenderThemeMac::paintMediaMuteButton): Ditto
507         (WebCore::RenderThemeMac::paintMediaPlayButton): Ditto
508         (WebCore::RenderThemeMac::paintMediaSeekBackButton): Ditto
509         (WebCore::RenderThemeMac::paintMediaSeekForwardButton): Ditto
510         (WebCore::RenderThemeMac::paintMediaSliderTrack): Ditto
511         (WebCore::RenderThemeMac::paintMediaSliderThumb): Ditto
512
513 2009-01-08  Dimitri Glazkov  <dglazkov@chromium.org>
514
515         Reviewed by Eric Seidel.
516
517         Add two more files for platform/graphics/skia.
518         https://bugs.webkit.org/show_bug.cgi?id=23191
519
520         * platform/graphics/skia/GradientSkia.cpp: Added.
521         (WebCore::Gradient::platformDestroy):
522         (WebCore::F2B):
523         (WebCore::makeSkColor):
524         (WebCore::totalStopsNeeded):
525         (WebCore::fillStops):
526         (WebCore::compareStops):
527         (WebCore::Gradient::platformGradient):
528         (WebCore::Gradient::fill):
529         * platform/graphics/skia/GraphicsContextPlatformPrivate.h: Copied from WebCore/bindings/js/ScriptValue.h.
530         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
531         (WebCore::GraphicsContextPlatformPrivate::context):
532
533 2009-01-08  Dimitri Glazkov  <dglazkov@chromium.org>
534
535         Reviewed by Eric Seidel.
536
537         Commit the right files this time!  (Instead of the ugly unfixed ones.)
538         https://bugs.webkit.org/show_bug.cgi?id=23191
539
540         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
541         * platform/graphics/skia/FloatPointSkia.cpp:
542         * platform/graphics/skia/FloatRectSkia.cpp:
543         * platform/graphics/skia/IntPointSkia.cpp:
544         * platform/graphics/skia/IntRectSkia.cpp:
545         (WebCore::IntRect::operator SkRect):
546         * platform/graphics/skia/SkiaUtils.cpp:
547         (WebCore::):
548         (WebCore::WebCoreCompositeToSkiaComposite):
549         (WebCore::SkPMColorToWebCoreColor):
550         (WebCore::IntersectRectAndRegion):
551         (WebCore::ClipRectToCanvas):
552         (WebCore::SkPathContainsPoint):
553         (WebCore::scratchContext):
554         * platform/graphics/skia/SkiaUtils.h:
555         (WebCore::WebCoreFloatToSkScalar):
556         (WebCore::WebCoreDoubleToSkScalar):
557
558 2009-01-08  Dimitri Glazkov  <dglazkov@chromium.org>
559
560         Reviewed by Eric Seidel.
561
562         Add the first few files from platform/graphics/skia
563         https://bugs.webkit.org/show_bug.cgi?id=23191
564
565         These are all pretty simple.
566         Eventually BitmapImageSingleFrameSkia might grow a .cpp file, for now it's just a header.
567         SkiaUtils needs to die, but that can come later, no need to block up-streaming now.
568
569         * platform/graphics/skia/BitmapImageSingleFrameSkia.h: Added.
570         (WebCore::BitmapImageSingleFrameSkia::isBitmapImage):
571         (WebCore::BitmapImageSingleFrameSkia::size):
572         (WebCore::BitmapImageSingleFrameSkia::destroyDecodedData):
573         (WebCore::BitmapImageSingleFrameSkia::decodedSize):
574         (WebCore::BitmapImageSingleFrameSkia::nativeImageForCurrentFrame):
575         (WebCore::BitmapImageSingleFrameSkia::BitmapImageSingleFrameSkia):
576         * platform/graphics/skia/FloatPointSkia.cpp: Copied from WebCore/platform/graphics/mac/FloatPointMac.mm.
577         (WebCore::FloatPoint::FloatPoint):
578         (WebCore::FloatPoint::operator SkPoint):
579         * platform/graphics/skia/FloatRectSkia.cpp: Copied from WebCore/platform/graphics/qt/IntRectQt.cpp.
580         (WebCore::FloatRect::FloatRect):
581         (WebCore::FloatRect::operator SkRect):
582         * platform/graphics/skia/IntPointSkia.cpp: Copied from WebCore/platform/graphics/win/IntPointWin.cpp.
583         (WebCore::IntPoint::IntPoint):
584         (WebCore::IntPoint::operator SkIPoint):
585         (WebCore::IntPoint::operator SkPoint):
586         * platform/graphics/skia/IntRectSkia.cpp: Copied from WebCore/platform/graphics/qt/IntRectQt.cpp.
587         (WebCore::IntRect::operator SkIRect):
588         (WebCore::IntRect::operator SkRect):
589         (WebCore::IntRect::IntRect):
590         * platform/graphics/skia/SkiaUtils.cpp: Added.
591         (WebCore::WebCorePointToSkiaPoint):
592         (WebCore::WebCoreRectToSkiaRect):
593         (WebCore::):
594         (WebCore::WebCoreCompositeToSkiaComposite):
595         (WebCore::InvScaleByte):
596         (WebCore::SkPMColorToColor):
597         (WebCore::SkPMColorToWebCoreColor):
598         (WebCore::IntersectRectAndRegion):
599         (WebCore::ClipRectToCanvas):
600         (WebCore::SkPathContainsPoint):
601         (WebCore::scratchContext):
602         * platform/graphics/skia/SkiaUtils.h: Added.
603         (WebCore::WebCoreFloatToSkScalar):
604         (WebCore::WebCoreDoubleToSkScalar):
605
606 2009-01-08  Pierre-Olivier Latour  <pol@apple.com>
607
608         Reviewed by Dan Bernstein.
609
610         Fixed CSS Transitions with zero-duration but non-zero-delay not starting or ending properly.
611
612         Also updated AnimationController::numberOfActiveAnimations() which now returns the number of "active" animations,
613         instead of simply the "running" ones.
614
615         https://bugs.webkit.org/show_bug.cgi?id=23177
616
617         Tests: transitions/zero-duration-with-non-zero-delay-end.html
618                transitions/zero-duration-with-non-zero-delay-start.html
619
620         * page/animation/AnimationBase.cpp:
621         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
622         * page/animation/AnimationController.cpp:
623         (WebCore::AnimationControllerPrivate::animationTimerFired):
624         * page/animation/CompositeAnimation.cpp:
625         (WebCore::CompositeAnimationPrivate::numberOfActiveAnimations):
626
627 2009-01-08  Alexey Proskuryakov  <ap@webkit.org>
628
629         Reviewed by Oliver Hunt.
630
631         <rdar://problem/6477501> Repro crash loading HTML5 AppCache manifest directly
632
633         The crash happened whenever a cached resource was downloaded, as opposed to used directly.
634
635         No test, as downloading cannot be tested automatically.
636
637         * loader/MainResourceLoader.cpp: (WebCore::MainResourceLoader::continueAfterContentPolicy):
638         Cancel downloads that do not have an associated ResourceHandle, such as downloads from the
639         application cache. Activity window shows "The URL can't be shown", and the frame remains empty.
640
641 2009-01-08  Justin McPherson <justin.mcpherson@nokia.com>
642
643         Reviewed by Simon Hausmann.
644
645         Fix the Qt build on older X11 systems with special X paths.
646
647         * WebCore.pro: Use the x11 qmake config to pull in extra paths
648         needed for NPAPI.
649
650 2009-01-08  Adam Roben  <aroben@apple.com>
651
652         Windows build fix after r39699
653
654         * DerivedSources.cpp: Added JSDOMStringList.cpp.
655
656 2009-01-08  Kent Hansen  <khansen@trolltech.com>
657
658         Reviewed by Simon Hausmann.
659
660         Fix copy & paste of images in the Qt port.
661
662         Store the QPixmap itself in the mimedata, not a QPixmap* converted to bool.
663
664         * platform/qt/ClipboardQt.cpp:
665         (WebCore::ClipboardQt::declareAndWriteDragImage):
666
667 2009-01-08  Hiroyuki Ikezoe  <poincare@ikezoe.net>
668
669         Reviewed by Holger Freyther.
670
671         https://bugs.webkit.org/show_bug.cgi?id=23127
672
673         Invoke pango_coverage_get with each Unicode character.
674
675         * platform/graphics/gtk/SimpleFontDataPango.cpp:
676         (WebCore::SimpleFontData::containsCharacters):
677
678 2009-01-07  Alexey Proskuryakov  <ap@webkit.org>
679
680         Reviewed by Darin Adler.
681
682         Part one of 
683         https://bugs.webkit.org/show_bug.cgi?id=23165
684         Add support for application cache dynamic entries
685
686         Test: http/tests/appcache/dynamic-entries-no-cache.html
687
688         * DerivedSources.make:
689         * GNUmakefile.am:
690         * WebCore.pro:
691         * WebCore.scons:
692         * WebCore.vcproj/WebCore.vcproj:
693         * WebCore.xcodeproj/project.pbxproj:
694         * WebCoreSources.bkl:
695         Added new files.
696
697         * bindings/js/JSDOMApplicationCacheCustom.cpp: (WebCore::JSDOMApplicationCache::hasItem):
698         Added binding for hasItem(). Like other DOMApplicationCache methods, it needs to be custom
699         to resolve relative URLs correctly.
700
701         * bindings/js/JSDOMStringListCustom.cpp: Added.
702         * dom/DOMStringList.cpp: Added.
703         * dom/DOMStringList.h: Added.
704         * dom/DOMStringList.idl: Added.
705         Added an implementation of DOM 3 Core DOMStringList interface, which is returned by
706         DOMApplicationCache items attribute.
707
708         * dom/StaticStringList.cpp: Added.
709         * dom/StaticStringList.h: Added.
710         An implementation of DOMStringList that makes a snapshot (for DOMApplicationCache, this
711         matches Firefox, as the spec doesn't say whether the returned list should be live or not).
712
713         * loader/appcache/ApplicationCache.h: Added a list of pending dynamic entry actions, to be
714         used in the near future.
715
716         * loader/appcache/DOMApplicationCache.idl: Updated for spec changes. Instead of length 
717         attribute and item(), we now have an items attribute that returns a DOMStringList, and a
718         hasItem convenience method.
719
720         * loader/appcache/DOMApplicationCache.cpp:
721         (WebCore::DOMApplicationCache::items):
722         (WebCore::DOMApplicationCache::hasItem):
723         * loader/appcache/DOMApplicationCache.h:
724         Added implementations of items attribute and hasItem() (note that underlying ApplicationCache
725         methods are still unimplemented though).
726
727         * page/DOMWindow.idl: Expose a DOMStringList global constructor.
728
729 2009-01-07  Chris Marrin  <cmarrin@apple.com>
730
731         Reviewed by Eric Seidel.
732
733         https://bugs.webkit.org/show_bug.cgi?id=23122
734
735         This completes the removal of dependencies on WebKit from the platform code
736
737         * css/CSSComputedStyleDeclaration.cpp:
738         (WebCore::getDelayValue):
739         (WebCore::getDurationValue):
740         (WebCore::getTimingFunctionValue):
741         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
742         * css/CSSHelper.h:
743         * css/CSSStyleSelector.cpp:
744         (WebCore::CSSStyleSelector::mapAnimationDelay):
745         (WebCore::CSSStyleSelector::mapAnimationDirection):
746         (WebCore::CSSStyleSelector::mapAnimationDuration):
747         (WebCore::CSSStyleSelector::mapAnimationIterationCount):
748         (WebCore::CSSStyleSelector::mapAnimationName):
749         (WebCore::CSSStyleSelector::mapAnimationPlayState):
750         (WebCore::CSSStyleSelector::mapAnimationProperty):
751         (WebCore::CSSStyleSelector::mapAnimationTimingFunction):
752         * platform/animation/Animation.cpp:
753         (WebCore::Animation::Animation):
754         * platform/animation/Animation.h:
755         (WebCore::Animation::initialAnimationDelay):
756         (WebCore::Animation::initialAnimationDirection):
757         (WebCore::Animation::initialAnimationDuration):
758         (WebCore::Animation::initialAnimationIterationCount):
759         (WebCore::Animation::initialAnimationName):
760         (WebCore::Animation::initialAnimationPlayState):
761         (WebCore::Animation::initialAnimationProperty):
762         (WebCore::Animation::initialAnimationTimingFunction):
763         * rendering/style/RenderStyle.h:
764
765 2008-01-07  Peter Kasting  <pkasting@google.com>
766
767         Reviewed by Sam Weinig.
768
769         https://bugs.webkit.org/show_bug.cgi?id=22929
770
771         Fix errors while decoding GIFs by not calling setData() repeatedly
772         when it's not necessary.  Pushes the responsibility for calling
773         setData() after clear() into the ImageSource which presumably knows
774         better than BitmapImage what needs to be done.
775
776         NOTE: The above bug is mainly about a memory regression, which this
777         patch does not fix.
778
779         * platform/graphics/BitmapImage.cpp:
780         (WebCore::BitmapImage::destroyDecodedData):
781         * platform/graphics/ImageSource.h:
782         * platform/graphics/cairo/ImageSourceCairo.cpp:
783         (WebCore::ImageSource::clear):
784         * platform/graphics/cg/ImageSourceCG.cpp:
785         (WebCore::ImageSource::clear):
786         * platform/graphics/qt/ImageSourceQt.cpp:
787         (WebCore::ImageSource::~ImageSource):
788         (WebCore::ImageSource::clear):
789         * platform/graphics/wx/ImageSourceWx.cpp:
790         (WebCore::ImageSource::~ImageSource):
791         (WebCore::ImageSource::clear):
792
793 2009-01-07  Justin Garcia  <justin.garcia@apple.com>
794
795         Reviewed by Darin Adler.
796
797         <rdar://problem/6355786> Find fails for queries that contain a line break
798
799         * editing/TextIterator.cpp:
800         (WebCore::findPlainText): Allow find with queries that contain newlines.
801
802 2009-01-07  Dean Jackson  <dino@apple.com>
803
804         Reviewed by Dan Bernstein.
805
806         Allow removal of inline shorthand properties for
807         animation, transition and transform origin. Also
808         add getter for shorthand animation property.
809
810         https://bugs.webkit.org/show_bug.cgi?id=22605
811
812         Test: fast/css/transform-inline-style-remove.html
813
814         * css/CSSMutableStyleDeclaration.cpp:
815         (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
816             Getter for animation property shorthand
817         (WebCore::initShorthandMap):
818             Adds initialisation for transform-origin, animation and transition
819
820 2009-01-07  Benjamin Otte  <otte@gnome.org>
821
822         Reviewed by Holger Freyther.
823
824         * platform/network/ResourceHandleInternal.h:
825         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
826         * platform/network/soup/ResourceHandleSoup.cpp:
827         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
828         (WebCore::parseDataUrl):
829         (WebCore::ResourceHandle::startData): keep track of the idle handler
830         we add and remove it in the destructor
831
832 2009-01-07  Dean Jackson  <dino@apple.com>
833
834         Reviewed by Darin Adler.
835
836         Finish renaming of AffineTransform to TransformationMatrix, this
837         time ensuring that the platform implementations get the correct
838         name. Also, clean up some whitespace cruft in old content.
839
840         https://bugs.webkit.org/show_bug.cgi?id=23151
841
842         * GNUmakefile.am:
843         * WebCore.pro:
844         * WebCore.scons:
845         * WebCore.vcproj/WebCore.vcproj:
846         * WebCore.xcodeproj/project.pbxproj:
847         * platform/graphics/cairo/AffineTransformCairo.cpp: Removed.
848         * platform/graphics/cairo/TransformationMatrixCairo.cpp: Copied from WebCore/platform/graphics/cairo/AffineTransformCairo.cpp.
849         * platform/graphics/cg/AffineTransformCG.cpp: Removed.
850         * platform/graphics/cg/TransformationMatrixCG.cpp: Copied from WebCore/platform/graphics/cg/AffineTransformCG.cpp.
851         * platform/graphics/qt/AffineTransformQt.cpp: Removed.
852         * platform/graphics/qt/TransformationMatrixQt.cpp: Copied from WebCore/platform/graphics/qt/AffineTransformQt.cpp.
853         * platform/graphics/transforms/TransformationMatrix.cpp:
854         * platform/graphics/transforms/TransformationMatrix.h:
855         * platform/graphics/wx/AffineTransformWx.cpp: Removed.
856         * platform/graphics/wx/TransformationMatrixWx.cpp: Copied from WebCore/platform/graphics/wx/AffineTransformWx.cpp.
857         * webcore-wx.bkl:
858
859 2009-01-07  Anders Carlsson  <andersca@apple.com>
860
861         Another build fix.
862         
863         * WebCore.LP64.exp:
864
865 2008-12-16  David Hyatt  <hyatt@apple.com>
866
867         Make Safari RSS behave nicely with full page zoom.  Need to add a new value to enable resetting of zoom
868         back to the document-level default.
869
870         Reviewed by Darin Adler
871
872         * css/CSSParser.cpp:
873         (WebCore::CSSParser::parseValue):
874         * css/CSSStyleSelector.cpp:
875         (WebCore::CSSStyleSelector::applyProperty):
876         * css/CSSValueKeywords.in:
877
878 2009-01-07  Darin Adler  <darin@apple.com>
879
880         Reviewed by Oliver Hunt.
881
882         Bug 23160: add setMemoryCacheClientCallsEnabled SPI so Safari can be faster with activity window closed
883         https://bugs.webkit.org/show_bug.cgi?id=23160
884
885         * WebCore.base.exp: Added Page::setMemoryCacheClientCallsEnabled.
886
887         * inspector/InspectorController.cpp:
888         (WebCore::InspectorController::didLoadResourceFromMemoryCache): Updated to take a CachedResource
889         so that there's no extra work the caller has to do when the inspector is disabled.
890         * inspector/InspectorController.h: Ditto.
891
892         * loader/DocumentLoader.h: Added recordMemoryCacheLoadForFutureClientNotification,
893         takeMemoryCacheLoadsForClientNotification, and m_resourcesLoadedFromMemoryCacheForClientNotification.
894
895         * loader/FrameLoader.cpp:
896         (WebCore::FrameLoader::loadedResourceFromMemoryCache): Streamlined code so less work is done when
897         there's no inspector or client call needed. Added code to check areMemoryCacheClientCallsEnabled
898         and if it's false, use recordMemoryCacheLoadForFutureClientNotification.
899         (WebCore::FrameLoader::tellClientAboutPastMemoryCacheLoads): Added.
900         * loader/FrameLoader.h: Ditto.
901
902         * page/Page.cpp:
903         (WebCore::Page::Page): Initialize m_areMemoryCacheClientCallsEnabled to be compatible with old behavior.
904         (WebCore::Page::setMemoryCacheClientCallsEnabled): Added.
905         * page/Page.h: Added setMemoryCacheClientCallsEnabled, areMemoryCacheClientCallsEnabled,
906         and m_areMemoryCacheClientCallsEnabled.
907
908 2009-01-07  Ariya Hidayat  <ariya.hidayat@trolltech.com>
909
910         Rubber-stamped by Simon Hausmann.
911
912         Qt build fix after r39670.
913
914         * bridge/qt/qt_class.cpp:
915         (JSC::Bindings::QtClass::fallbackObject):
916         * bridge/qt/qt_class.h:
917         * bridge/qt/qt_instance.cpp:
918         (JSC::Bindings::QtInstance::mark):
919         (JSC::Bindings::QtInstance::invokeMethod):
920         (JSC::Bindings::QtInstance::defaultValue):
921         (JSC::Bindings::QtInstance::stringValue):
922         (JSC::Bindings::QtInstance::numberValue):
923         (JSC::Bindings::QtInstance::booleanValue):
924         (JSC::Bindings::QtInstance::valueOf):
925         (JSC::Bindings::QtField::valueFromInstance):
926         (JSC::Bindings::QtField::setValueToInstance):
927         * bridge/qt/qt_instance.h:
928         * bridge/qt/qt_runtime.cpp:
929         (JSC::Bindings::valueRealType):
930         (JSC::Bindings::convertValueToQVariant):
931         (JSC::Bindings::convertQVariantToValue):
932         (JSC::Bindings::findMethodIndex):
933         (JSC::Bindings::QtRuntimeMetaMethod::call):
934         (JSC::Bindings::QtRuntimeMetaMethod::lengthGetter):
935         (JSC::Bindings::QtRuntimeMetaMethod::connectGetter):
936         (JSC::Bindings::QtRuntimeMetaMethod::disconnectGetter):
937         (JSC::Bindings::QtRuntimeConnectionMethod::call):
938         (JSC::Bindings::QtRuntimeConnectionMethod::lengthGetter):
939         (JSC::Bindings::::setValueAt):
940         (JSC::Bindings::::valueAt):
941         * bridge/qt/qt_runtime.h:
942         (JSC::Bindings::QtRuntimeMethod::createStructure):
943
944 2009-01-06  Justin Garcia  <justin.garcia@apple.com>
945
946         Reviewed by Oliver Hunt.
947
948         <rdar://problem/6391734> SnowLeopard: Crash doing Copy Image from context menu
949         
950         Can't create an automated test case for specific contextual menu items yet and
951         a normal Copy doesn't cause a crash.
952
953         * platform/mac/PasteboardMac.mm:
954         (WebCore::fileWrapperForImage): The SharedBuffer may not have platform data.  It may,
955         for example, have a purgeable or regular buffer.
956
957 2009-01-06  Mark Rowe  <mrowe@apple.com>
958
959         Reviewed by Geoff Garen.
960
961         Fix <https://bugs.webkit.org/show_bug.cgi?id=23157>.
962         Bug 23157: Crashes on Acid 3
963
964         * dom/Document.cpp:
965         (WebCore::Document::recalcStyle): Null-check the frame.
966
967 2009-01-05  Gavin Barraclough  <baraclough@apple.com>
968
969         Rubber Stamped by Oliver Hunt.
970
971         Replace all uses of JSValue* with new wrapper class, JSValuePtr.
972         See JavaScriptCore/ChangeLog for more detailed description.
973
974         * bindings/js/JSAttrCustom.cpp:
975         (WebCore::JSAttr::setValue):
976         * bindings/js/JSCSSRuleCustom.cpp:
977         (WebCore::toJS):
978         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
979         (WebCore::JSCSSStyleDeclaration::nameGetter):
980         (WebCore::JSCSSStyleDeclaration::customPut):
981         * bindings/js/JSCSSValueCustom.cpp:
982         (WebCore::toJS):
983         * bindings/js/JSCanvasPixelArrayCustom.h:
984         (WebCore::JSCanvasPixelArray::getByIndex):
985         (WebCore::JSCanvasPixelArray::indexSetter):
986         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
987         (WebCore::toJS):
988         (WebCore::toHTMLCanvasStyle):
989         (WebCore::JSCanvasRenderingContext2D::strokeStyle):
990         (WebCore::JSCanvasRenderingContext2D::setStrokeStyle):
991         (WebCore::JSCanvasRenderingContext2D::fillStyle):
992         (WebCore::JSCanvasRenderingContext2D::setFillStyle):
993         (WebCore::JSCanvasRenderingContext2D::setFillColor):
994         (WebCore::JSCanvasRenderingContext2D::setStrokeColor):
995         (WebCore::JSCanvasRenderingContext2D::strokeRect):
996         (WebCore::JSCanvasRenderingContext2D::drawImage):
997         (WebCore::JSCanvasRenderingContext2D::drawImageFromRect):
998         (WebCore::JSCanvasRenderingContext2D::setShadow):
999         (WebCore::JSCanvasRenderingContext2D::createPattern):
1000         (WebCore::JSCanvasRenderingContext2D::putImageData):
1001         (WebCore::JSCanvasRenderingContext2D::fillText):
1002         (WebCore::JSCanvasRenderingContext2D::strokeText):
1003         * bindings/js/JSClipboardCustom.cpp:
1004         (WebCore::JSClipboard::types):
1005         (WebCore::JSClipboard::clearData):
1006         (WebCore::JSClipboard::getData):
1007         (WebCore::JSClipboard::setData):
1008         (WebCore::JSClipboard::setDragImage):
1009         * bindings/js/JSConsoleCustom.cpp:
1010         (WebCore::JSConsole::profiles):
1011         * bindings/js/JSCustomPositionCallback.cpp:
1012         (WebCore::JSCustomPositionCallback::handleEvent):
1013         * bindings/js/JSCustomPositionErrorCallback.cpp:
1014         (WebCore::JSCustomPositionErrorCallback::handleEvent):
1015         * bindings/js/JSCustomSQLStatementCallback.cpp:
1016         (WebCore::JSCustomSQLStatementCallback::handleEvent):
1017         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
1018         (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
1019         * bindings/js/JSCustomSQLTransactionCallback.cpp:
1020         (WebCore::JSCustomSQLTransactionCallback::handleEvent):
1021         * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
1022         (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
1023         * bindings/js/JSCustomVoidCallback.cpp:
1024         (WebCore::JSCustomVoidCallback::handleEvent):
1025         (WebCore::toVoidCallback):
1026         * bindings/js/JSCustomVoidCallback.h:
1027         * bindings/js/JSCustomXPathNSResolver.cpp:
1028         (WebCore::JSCustomXPathNSResolver::create):
1029         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1030         * bindings/js/JSCustomXPathNSResolver.h:
1031         * bindings/js/JSDOMApplicationCacheCustom.cpp:
1032         (WebCore::JSDOMApplicationCache::add):
1033         (WebCore::JSDOMApplicationCache::remove):
1034         (WebCore::JSDOMApplicationCache::addEventListener):
1035         (WebCore::JSDOMApplicationCache::removeEventListener):
1036         * bindings/js/JSDOMBinding.cpp:
1037         (WebCore::jsStringOrNull):
1038         (WebCore::jsOwnedStringOrNull):
1039         (WebCore::jsStringOrUndefined):
1040         (WebCore::jsStringOrFalse):
1041         (WebCore::valueToStringWithNullCheck):
1042         (WebCore::valueToStringWithUndefinedOrNullCheck):
1043         (WebCore::reportException):
1044         (WebCore::reportCurrentException):
1045         (WebCore::setDOMException):
1046         (WebCore::objectToStringFunctionGetter):
1047         * bindings/js/JSDOMBinding.h:
1048         (WebCore::getDOMObjectWrapper):
1049         (WebCore::getDOMNodeWrapper):
1050         (WebCore::toJS):
1051         * bindings/js/JSDOMGlobalObject.cpp:
1052         (WebCore::JSDOMGlobalObject::findJSEventListener):
1053         (WebCore::JSDOMGlobalObject::findOrCreateJSEventListener):
1054         (WebCore::JSDOMGlobalObject::findJSUnprotectedEventListener):
1055         (WebCore::JSDOMGlobalObject::findOrCreateJSUnprotectedEventListener):
1056         * bindings/js/JSDOMGlobalObject.h:
1057         * bindings/js/JSDOMWindowBase.cpp:
1058         (WebCore::createWindow):
1059         (WebCore::showModalDialog):
1060         (jsDOMWindowBaseCrypto):
1061         (jsDOMWindowBaseEvent):
1062         (jsDOMWindowBaseImage):
1063         (jsDOMWindowBaseMessageChannel):
1064         (jsDOMWindowBaseOption):
1065         (jsDOMWindowBaseXMLHttpRequest):
1066         (jsDOMWindowBaseAudio):
1067         (jsDOMWindowBaseWorker):
1068         (jsDOMWindowBaseXSLTProcessor):
1069         (setJSDOMWindowBaseEvent):
1070         (setJSDOMWindowBaseAudio):
1071         (setJSDOMWindowBaseImage):
1072         (setJSDOMWindowBaseMessageChannel):
1073         (setJSDOMWindowBaseOption):
1074         (setJSDOMWindowBaseWorker):
1075         (setJSDOMWindowBaseXMLHttpRequest):
1076         (setJSDOMWindowBaseXSLTProcessor):
1077         (WebCore::JSDOMWindowBase::childFrameGetter):
1078         (WebCore::JSDOMWindowBase::indexGetter):
1079         (WebCore::JSDOMWindowBase::namedItemGetter):
1080         (WebCore::JSDOMWindowBase::getOwnPropertySlot):
1081         (WebCore::JSDOMWindowBase::put):
1082         (WebCore::JSDOMWindowBase::clear):
1083         (windowProtoFuncOpen):
1084         (windowProtoFuncShowModalDialog):
1085         (windowProtoFuncNotImplemented):
1086         (WebCore::JSDOMWindowBase::setReturnValueSlot):
1087         (WebCore::JSDOMWindowBase::installTimeout):
1088         (WebCore::toJS):
1089         (WebCore::toJSDOMWindow):
1090         * bindings/js/JSDOMWindowBase.h:
1091         * bindings/js/JSDOMWindowCustom.cpp:
1092         (WebCore::JSDOMWindow::lookupGetter):
1093         (WebCore::JSDOMWindow::lookupSetter):
1094         (WebCore::JSDOMWindow::setLocation):
1095         (WebCore::JSDOMWindow::postMessage):
1096         (WebCore::setTimeoutOrInterval):
1097         (WebCore::JSDOMWindow::setTimeout):
1098         (WebCore::JSDOMWindow::clearTimeout):
1099         (WebCore::JSDOMWindow::setInterval):
1100         (WebCore::JSDOMWindow::clearInterval):
1101         (WebCore::JSDOMWindow::atob):
1102         (WebCore::JSDOMWindow::btoa):
1103         (WebCore::JSDOMWindow::addEventListener):
1104         (WebCore::JSDOMWindow::removeEventListener):
1105         (WebCore::toDOMWindow):
1106         (WebCore::nonCachingStaticCloseFunctionGetter):
1107         (WebCore::nonCachingStaticBlurFunctionGetter):
1108         (WebCore::nonCachingStaticFocusFunctionGetter):
1109         (WebCore::nonCachingStaticPostMessageFunctionGetter):
1110         * bindings/js/JSDOMWindowCustom.h:
1111         (WebCore::JSDOMWindow::customPut):
1112         * bindings/js/JSDOMWindowShell.cpp:
1113         (WebCore::JSDOMWindowShell::put):
1114         (WebCore::JSDOMWindowShell::putWithAttributes):
1115         (WebCore::JSDOMWindowShell::lookupGetter):
1116         (WebCore::JSDOMWindowShell::lookupSetter):
1117         (WebCore::toJS):
1118         * bindings/js/JSDOMWindowShell.h:
1119         (WebCore::JSDOMWindowShell::createStructure):
1120         * bindings/js/JSDatabaseCustom.cpp:
1121         (WebCore::JSDatabase::changeVersion):
1122         (WebCore::JSDatabase::transaction):
1123         * bindings/js/JSDocumentCustom.cpp:
1124         (WebCore::JSDocument::location):
1125         (WebCore::JSDocument::setLocation):
1126         (WebCore::toJS):
1127         * bindings/js/JSElementCustom.cpp:
1128         (WebCore::JSElement::setAttribute):
1129         (WebCore::JSElement::setAttributeNode):
1130         (WebCore::JSElement::setAttributeNS):
1131         (WebCore::JSElement::setAttributeNodeNS):
1132         (WebCore::toJSNewlyCreated):
1133         * bindings/js/JSEventCustom.cpp:
1134         (WebCore::JSEvent::clipboardData):
1135         (WebCore::toJS):
1136         * bindings/js/JSEventListener.cpp:
1137         (WebCore::JSAbstractEventListener::handleEvent):
1138         (WebCore::eventParameterName):
1139         (WebCore::JSLazyEventListener::parseCode):
1140         * bindings/js/JSEventTarget.cpp:
1141         (WebCore::toJS):
1142         * bindings/js/JSEventTarget.h:
1143         * bindings/js/JSEventTargetBase.h:
1144         * bindings/js/JSEventTargetNodeCustom.cpp:
1145         (WebCore::JSEventTargetNode::addEventListener):
1146         (WebCore::JSEventTargetNode::removeEventListener):
1147         * bindings/js/JSGeolocationCustom.cpp:
1148         (WebCore::createPositionOptions):
1149         (WebCore::JSGeolocation::getCurrentPosition):
1150         (WebCore::JSGeolocation::watchPosition):
1151         * bindings/js/JSHTMLAllCollection.h:
1152         (WebCore::JSHTMLAllCollection::createStructure):
1153         * bindings/js/JSHTMLAppletElementCustom.cpp:
1154         (WebCore::JSHTMLAppletElement::customPut):
1155         (WebCore::JSHTMLAppletElement::nameGetter):
1156         * bindings/js/JSHTMLCollectionCustom.cpp:
1157         (WebCore::getNamedItems):
1158         (WebCore::callHTMLCollection):
1159         (WebCore::JSHTMLCollection::nameGetter):
1160         (WebCore::JSHTMLCollection::item):
1161         (WebCore::JSHTMLCollection::namedItem):
1162         (WebCore::toJS):
1163         * bindings/js/JSHTMLDocumentCustom.cpp:
1164         (WebCore::JSHTMLDocument::nameGetter):
1165         (WebCore::JSHTMLDocument::all):
1166         (WebCore::JSHTMLDocument::setAll):
1167         (WebCore::JSHTMLDocument::open):
1168         (WebCore::JSHTMLDocument::write):
1169         (WebCore::JSHTMLDocument::writeln):
1170         * bindings/js/JSHTMLEmbedElementCustom.cpp:
1171         (WebCore::JSHTMLEmbedElement::customPut):
1172         (WebCore::JSHTMLEmbedElement::nameGetter):
1173         * bindings/js/JSHTMLFormElementCustom.cpp:
1174         (WebCore::JSHTMLFormElement::nameGetter):
1175         * bindings/js/JSHTMLFrameElementCustom.cpp:
1176         (WebCore::JSHTMLFrameElement::setSrc):
1177         (WebCore::JSHTMLFrameElement::setLocation):
1178         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
1179         (WebCore::JSHTMLFrameSetElement::nameGetter):
1180         * bindings/js/JSHTMLIFrameElementCustom.cpp:
1181         (WebCore::JSHTMLIFrameElement::setSrc):
1182         * bindings/js/JSHTMLInputElementCustom.cpp:
1183         (WebCore::JSHTMLInputElement::selectionStart):
1184         (WebCore::JSHTMLInputElement::selectionEnd):
1185         * bindings/js/JSHTMLObjectElementCustom.cpp:
1186         (WebCore::JSHTMLObjectElement::customPut):
1187         (WebCore::JSHTMLObjectElement::nameGetter):
1188         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1189         (WebCore::JSHTMLOptionsCollection::length):
1190         (WebCore::JSHTMLOptionsCollection::setLength):
1191         (WebCore::JSHTMLOptionsCollection::indexSetter):
1192         (WebCore::JSHTMLOptionsCollection::add):
1193         (WebCore::JSHTMLOptionsCollection::remove):
1194         * bindings/js/JSHTMLSelectElementCustom.cpp:
1195         (WebCore::JSHTMLSelectElement::remove):
1196         (WebCore::selectIndexSetter):
1197         (WebCore::JSHTMLSelectElement::indexSetter):
1198         * bindings/js/JSHTMLSelectElementCustom.h:
1199         * bindings/js/JSHistoryCustom.cpp:
1200         (WebCore::nonCachingStaticBackFunctionGetter):
1201         (WebCore::nonCachingStaticForwardFunctionGetter):
1202         (WebCore::nonCachingStaticGoFunctionGetter):
1203         (WebCore::JSHistory::customPut):
1204         * bindings/js/JSImageDataCustom.cpp:
1205         (WebCore::toJS):
1206         * bindings/js/JSInspectedObjectWrapper.cpp:
1207         (WebCore::JSInspectedObjectWrapper::wrap):
1208         (WebCore::JSInspectedObjectWrapper::prepareIncomingValue):
1209         * bindings/js/JSInspectedObjectWrapper.h:
1210         (WebCore::JSInspectedObjectWrapper::wrapOutgoingValue):
1211         * bindings/js/JSInspectorCallbackWrapper.cpp:
1212         (WebCore::JSInspectorCallbackWrapper::wrap):
1213         (WebCore::JSInspectorCallbackWrapper::prepareIncomingValue):
1214         * bindings/js/JSInspectorCallbackWrapper.h:
1215         (WebCore::JSInspectorCallbackWrapper::wrapOutgoingValue):
1216         * bindings/js/JSJavaScriptCallFrameCustom.cpp:
1217         (WebCore::JSJavaScriptCallFrame::evaluate):
1218         (WebCore::JSJavaScriptCallFrame::thisObject):
1219         (WebCore::JSJavaScriptCallFrame::type):
1220         (WebCore::JSJavaScriptCallFrame::scopeChain):
1221         * bindings/js/JSLocationCustom.cpp:
1222         (WebCore::nonCachingStaticReplaceFunctionGetter):
1223         (WebCore::nonCachingStaticReloadFunctionGetter):
1224         (WebCore::nonCachingStaticAssignFunctionGetter):
1225         (WebCore::JSLocation::customPut):
1226         (WebCore::JSLocation::setHref):
1227         (WebCore::JSLocation::setProtocol):
1228         (WebCore::JSLocation::setHost):
1229         (WebCore::JSLocation::setHostname):
1230         (WebCore::JSLocation::setPort):
1231         (WebCore::JSLocation::setPathname):
1232         (WebCore::JSLocation::setSearch):
1233         (WebCore::JSLocation::setHash):
1234         (WebCore::JSLocation::replace):
1235         (WebCore::JSLocation::reload):
1236         (WebCore::JSLocation::assign):
1237         (WebCore::JSLocation::toString):
1238         * bindings/js/JSMessageChannelConstructor.h:
1239         * bindings/js/JSMessagePortCustom.cpp:
1240         (WebCore::JSMessagePort::startConversation):
1241         (WebCore::JSMessagePort::addEventListener):
1242         (WebCore::JSMessagePort::removeEventListener):
1243         * bindings/js/JSMimeTypeArrayCustom.cpp:
1244         (WebCore::JSMimeTypeArray::nameGetter):
1245         * bindings/js/JSNamedNodeMapCustom.cpp:
1246         (WebCore::JSNamedNodeMap::nameGetter):
1247         * bindings/js/JSNamedNodesCollection.cpp:
1248         (WebCore::JSNamedNodesCollection::lengthGetter):
1249         (WebCore::JSNamedNodesCollection::indexGetter):
1250         * bindings/js/JSNamedNodesCollection.h:
1251         (WebCore::JSNamedNodesCollection::createStructure):
1252         * bindings/js/JSNavigatorCustom.cpp:
1253         (WebCore::needsYouTubeQuirk):
1254         (WebCore::JSNavigator::appVersion):
1255         * bindings/js/JSNodeCustom.cpp:
1256         (WebCore::JSNode::insertBefore):
1257         (WebCore::JSNode::replaceChild):
1258         (WebCore::JSNode::removeChild):
1259         (WebCore::JSNode::appendChild):
1260         (WebCore::createWrapper):
1261         (WebCore::toJSNewlyCreated):
1262         (WebCore::toJS):
1263         * bindings/js/JSNodeFilterCondition.cpp:
1264         (WebCore::JSNodeFilterCondition::JSNodeFilterCondition):
1265         (WebCore::JSNodeFilterCondition::acceptNode):
1266         * bindings/js/JSNodeFilterCondition.h:
1267         (WebCore::JSNodeFilterCondition::create):
1268         * bindings/js/JSNodeFilterCustom.cpp:
1269         (WebCore::JSNodeFilter::acceptNode):
1270         (WebCore::toNodeFilter):
1271         * bindings/js/JSNodeIteratorCustom.cpp:
1272         (WebCore::JSNodeIterator::nextNode):
1273         (WebCore::JSNodeIterator::previousNode):
1274         * bindings/js/JSNodeListCustom.cpp:
1275         (WebCore::callNodeList):
1276         (WebCore::JSNodeList::nameGetter):
1277         * bindings/js/JSPluginArrayCustom.cpp:
1278         (WebCore::JSPluginArray::nameGetter):
1279         * bindings/js/JSPluginCustom.cpp:
1280         (WebCore::JSPlugin::nameGetter):
1281         * bindings/js/JSPluginElementFunctions.cpp:
1282         (WebCore::runtimeObjectGetter):
1283         (WebCore::runtimeObjectPropertyGetter):
1284         (WebCore::runtimeObjectCustomPut):
1285         (WebCore::callPlugin):
1286         * bindings/js/JSPluginElementFunctions.h:
1287         * bindings/js/JSQuarantinedObjectWrapper.cpp:
1288         (WebCore::JSQuarantinedObjectWrapper::asWrapper):
1289         (WebCore::JSQuarantinedObjectWrapper::cachedValueGetter):
1290         (WebCore::JSQuarantinedObjectWrapper::getOwnPropertySlot):
1291         (WebCore::JSQuarantinedObjectWrapper::put):
1292         (WebCore::JSQuarantinedObjectWrapper::construct):
1293         (WebCore::JSQuarantinedObjectWrapper::hasInstance):
1294         (WebCore::JSQuarantinedObjectWrapper::call):
1295         * bindings/js/JSQuarantinedObjectWrapper.h:
1296         (WebCore::JSQuarantinedObjectWrapper::createStructure):
1297         * bindings/js/JSRGBColor.cpp:
1298         (WebCore::getJSRGBColor):
1299         (jsRGBColorRed):
1300         (jsRGBColorGreen):
1301         (jsRGBColorBlue):
1302         * bindings/js/JSRGBColor.h:
1303         (WebCore::JSRGBColor::createStructure):
1304         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1305         (WebCore::JSSQLResultSetRowList::item):
1306         * bindings/js/JSSQLTransactionCustom.cpp:
1307         (WebCore::JSSQLTransaction::executeSql):
1308         * bindings/js/JSSVGElementInstanceCustom.cpp:
1309         (WebCore::JSSVGElementInstance::addEventListener):
1310         (WebCore::JSSVGElementInstance::removeEventListener):
1311         * bindings/js/JSSVGLengthCustom.cpp:
1312         (WebCore::JSSVGLength::value):
1313         (WebCore::JSSVGLength::convertToSpecifiedUnits):
1314         * bindings/js/JSSVGMatrixCustom.cpp:
1315         (WebCore::JSSVGMatrix::multiply):
1316         (WebCore::JSSVGMatrix::inverse):
1317         (WebCore::JSSVGMatrix::translate):
1318         (WebCore::JSSVGMatrix::scale):
1319         (WebCore::JSSVGMatrix::scaleNonUniform):
1320         (WebCore::JSSVGMatrix::rotate):
1321         (WebCore::JSSVGMatrix::rotateFromVector):
1322         (WebCore::JSSVGMatrix::flipX):
1323         (WebCore::JSSVGMatrix::flipY):
1324         (WebCore::JSSVGMatrix::skewX):
1325         (WebCore::JSSVGMatrix::skewY):
1326         * bindings/js/JSSVGPathSegCustom.cpp:
1327         (WebCore::toJS):
1328         * bindings/js/JSSVGPathSegListCustom.cpp:
1329         (WebCore::JSSVGPathSegList::clear):
1330         (WebCore::JSSVGPathSegList::initialize):
1331         (WebCore::JSSVGPathSegList::getItem):
1332         (WebCore::JSSVGPathSegList::insertItemBefore):
1333         (WebCore::JSSVGPathSegList::replaceItem):
1334         (WebCore::JSSVGPathSegList::removeItem):
1335         (WebCore::JSSVGPathSegList::appendItem):
1336         * bindings/js/JSSVGPointListCustom.cpp:
1337         (WebCore::finishGetter):
1338         (WebCore::finishSetter):
1339         (WebCore::finishSetterReadOnlyResult):
1340         (WebCore::JSSVGPointList::clear):
1341         (WebCore::JSSVGPointList::initialize):
1342         (WebCore::JSSVGPointList::getItem):
1343         (WebCore::JSSVGPointList::insertItemBefore):
1344         (WebCore::JSSVGPointList::replaceItem):
1345         (WebCore::JSSVGPointList::removeItem):
1346         (WebCore::JSSVGPointList::appendItem):
1347         * bindings/js/JSSVGTransformListCustom.cpp:
1348         (WebCore::finishGetter):
1349         (WebCore::finishSetter):
1350         (WebCore::finishSetterReadOnlyResult):
1351         (WebCore::JSSVGTransformList::clear):
1352         (WebCore::JSSVGTransformList::initialize):
1353         (WebCore::JSSVGTransformList::getItem):
1354         (WebCore::JSSVGTransformList::insertItemBefore):
1355         (WebCore::JSSVGTransformList::replaceItem):
1356         (WebCore::JSSVGTransformList::removeItem):
1357         (WebCore::JSSVGTransformList::appendItem):
1358         * bindings/js/JSStorageCustom.cpp:
1359         (WebCore::JSStorage::nameGetter):
1360         (WebCore::JSStorage::deleteProperty):
1361         (WebCore::JSStorage::customPut):
1362         * bindings/js/JSStyleSheetCustom.cpp:
1363         (WebCore::toJS):
1364         * bindings/js/JSStyleSheetListCustom.cpp:
1365         (WebCore::JSStyleSheetList::nameGetter):
1366         * bindings/js/JSTextCustom.cpp:
1367         (WebCore::toJSNewlyCreated):
1368         * bindings/js/JSTreeWalkerCustom.cpp:
1369         (WebCore::JSTreeWalker::parentNode):
1370         (WebCore::JSTreeWalker::firstChild):
1371         (WebCore::JSTreeWalker::lastChild):
1372         (WebCore::JSTreeWalker::nextSibling):
1373         (WebCore::JSTreeWalker::previousSibling):
1374         (WebCore::JSTreeWalker::previousNode):
1375         (WebCore::JSTreeWalker::nextNode):
1376         * bindings/js/JSWorkerContextBase.cpp:
1377         (WebCore::JSWorkerContextBase::put):
1378         * bindings/js/JSWorkerContextBase.h:
1379         * bindings/js/JSWorkerContextCustom.cpp:
1380         (WebCore::JSWorkerContext::self):
1381         (WebCore::JSWorkerContext::setSelf):
1382         (WebCore::JSWorkerContext::addEventListener):
1383         (WebCore::JSWorkerContext::removeEventListener):
1384         * bindings/js/JSWorkerCustom.cpp:
1385         (WebCore::JSWorker::addEventListener):
1386         (WebCore::JSWorker::removeEventListener):
1387         * bindings/js/JSXMLHttpRequestCustom.cpp:
1388         (WebCore::JSXMLHttpRequest::open):
1389         (WebCore::JSXMLHttpRequest::setRequestHeader):
1390         (WebCore::JSXMLHttpRequest::send):
1391         (WebCore::JSXMLHttpRequest::getResponseHeader):
1392         (WebCore::JSXMLHttpRequest::overrideMimeType):
1393         (WebCore::JSXMLHttpRequest::addEventListener):
1394         (WebCore::JSXMLHttpRequest::removeEventListener):
1395         (WebCore::JSXMLHttpRequest::responseText):
1396         * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
1397         (WebCore::JSXMLHttpRequestUpload::addEventListener):
1398         (WebCore::JSXMLHttpRequestUpload::removeEventListener):
1399         * bindings/js/JSXSLTProcessorCustom.cpp:
1400         (WebCore::JSXSLTProcessor::importStylesheet):
1401         (WebCore::JSXSLTProcessor::transformToFragment):
1402         (WebCore::JSXSLTProcessor::transformToDocument):
1403         (WebCore::JSXSLTProcessor::setParameter):
1404         (WebCore::JSXSLTProcessor::getParameter):
1405         (WebCore::JSXSLTProcessor::removeParameter):
1406         * bindings/js/ScheduledAction.cpp:
1407         (WebCore::ScheduledAction::ScheduledAction):
1408         (WebCore::ScheduledAction::execute):
1409         * bindings/js/ScheduledAction.h:
1410         * bindings/js/ScriptCallStack.cpp:
1411         (WebCore::ScriptCallStack::ScriptCallStack):
1412         (WebCore::ScriptCallStack::initialize):
1413         * bindings/js/ScriptController.cpp:
1414         (WebCore::ScriptController::createScriptObjectForPluginElement):
1415         * bindings/js/ScriptValue.cpp:
1416         (WebCore::ScriptValue::getString):
1417         (WebCore::ScriptValue::isNull):
1418         (WebCore::ScriptValue::isUndefined):
1419         * bindings/js/ScriptValue.h:
1420         (WebCore::ScriptValue::ScriptValue):
1421         (WebCore::ScriptValue::jsValue):
1422         * bindings/objc/WebScriptObject.mm:
1423         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1424         (-[WebScriptObject evaluateWebScript:]):
1425         (-[WebScriptObject valueForKey:]):
1426         (-[WebScriptObject webScriptValueAtIndex:]):
1427         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
1428         * bindings/objc/WebScriptObjectPrivate.h:
1429         * bindings/scripts/CodeGeneratorJS.pm:
1430         * bridge/NP_jsobject.cpp:
1431         (_NPN_InvokeDefault):
1432         (_NPN_Invoke):
1433         (_NPN_Evaluate):
1434         (_NPN_GetProperty):
1435         (_NPN_HasMethod):
1436         (_NPN_Construct):
1437         * bridge/c/c_instance.cpp:
1438         (JSC::Bindings::CInstance::invokeMethod):
1439         (JSC::Bindings::CInstance::invokeDefaultMethod):
1440         (JSC::Bindings::CInstance::invokeConstruct):
1441         (JSC::Bindings::CInstance::defaultValue):
1442         (JSC::Bindings::CInstance::stringValue):
1443         (JSC::Bindings::CInstance::numberValue):
1444         (JSC::Bindings::CInstance::booleanValue):
1445         (JSC::Bindings::CInstance::valueOf):
1446         * bridge/c/c_instance.h:
1447         * bridge/c/c_runtime.cpp:
1448         (JSC::Bindings::CField::valueFromInstance):
1449         (JSC::Bindings::CField::setValueToInstance):
1450         * bridge/c/c_runtime.h:
1451         * bridge/c/c_utility.cpp:
1452         (JSC::Bindings::convertValueToNPVariant):
1453         (JSC::Bindings::convertNPVariantToValue):
1454         * bridge/c/c_utility.h:
1455         * bridge/jni/jni_instance.cpp:
1456         (JavaInstance::stringValue):
1457         (JavaInstance::numberValue):
1458         (JavaInstance::booleanValue):
1459         (JavaInstance::invokeMethod):
1460         (JavaInstance::defaultValue):
1461         (JavaInstance::valueOf):
1462         * bridge/jni/jni_instance.h:
1463         * bridge/jni/jni_jsobject.h:
1464         * bridge/jni/jni_jsobject.mm:
1465         (JavaJSObject::call):
1466         (JavaJSObject::eval):
1467         (JavaJSObject::getMember):
1468         (JavaJSObject::getSlot):
1469         (JavaJSObject::convertValueToJObject):
1470         (JavaJSObject::convertJObjectToValue):
1471         * bridge/jni/jni_objc.mm:
1472         (JSC::Bindings::dispatchJNICall):
1473         * bridge/jni/jni_runtime.cpp:
1474         (JavaArray::convertJObjectToArray):
1475         (JavaField::dispatchValueFromInstance):
1476         (JavaField::valueFromInstance):
1477         (JavaField::dispatchSetValueToInstance):
1478         (JavaField::setValueToInstance):
1479         (JavaArray::setValueAt):
1480         (JavaArray::valueAt):
1481         * bridge/jni/jni_runtime.h:
1482         * bridge/jni/jni_utility.cpp:
1483         (JSC::Bindings::convertArrayInstanceToJavaArray):
1484         (JSC::Bindings::convertValueToJValue):
1485         * bridge/jni/jni_utility.h:
1486         * bridge/objc/WebScriptObject.h:
1487         * bridge/objc/objc_class.h:
1488         * bridge/objc/objc_class.mm:
1489         (JSC::Bindings::ObjcClass::fallbackObject):
1490         * bridge/objc/objc_instance.h:
1491         * bridge/objc/objc_instance.mm:
1492         (ObjcInstance::invokeMethod):
1493         (ObjcInstance::invokeDefaultMethod):
1494         (ObjcInstance::setValueOfUndefinedField):
1495         (ObjcInstance::getValueOfUndefinedField):
1496         (ObjcInstance::defaultValue):
1497         (ObjcInstance::stringValue):
1498         (ObjcInstance::numberValue):
1499         (ObjcInstance::booleanValue):
1500         (ObjcInstance::valueOf):
1501         * bridge/objc/objc_runtime.h:
1502         (JSC::Bindings::ObjcFallbackObjectImp::createStructure):
1503         * bridge/objc/objc_runtime.mm:
1504         (JSC::Bindings::ObjcField::valueFromInstance):
1505         (JSC::Bindings::convertValueToObjcObject):
1506         (JSC::Bindings::ObjcField::setValueToInstance):
1507         (JSC::Bindings::ObjcArray::setValueAt):
1508         (JSC::Bindings::ObjcArray::valueAt):
1509         (JSC::Bindings::ObjcFallbackObjectImp::put):
1510         (JSC::Bindings::callObjCFallbackObject):
1511         (JSC::Bindings::ObjcFallbackObjectImp::defaultValue):
1512         * bridge/objc/objc_utility.h:
1513         * bridge/objc/objc_utility.mm:
1514         (JSC::Bindings::convertValueToObjcValue):
1515         (JSC::Bindings::convertNSStringToString):
1516         (JSC::Bindings::convertObjcValueToValue):
1517         * bridge/runtime.cpp:
1518         (JSC::Bindings::Instance::getValueOfField):
1519         (JSC::Bindings::Instance::setValueOfField):
1520         * bridge/runtime.h:
1521         (JSC::Bindings::Class::fallbackObject):
1522         (JSC::Bindings::Instance::getValueOfUndefinedField):
1523         (JSC::Bindings::Instance::setValueOfUndefinedField):
1524         (JSC::Bindings::Instance::invokeDefaultMethod):
1525         (JSC::Bindings::Instance::invokeConstruct):
1526         (JSC::Bindings::Instance::valueOf):
1527         * bridge/runtime_array.cpp:
1528         (JSC::RuntimeArray::lengthGetter):
1529         (JSC::RuntimeArray::indexGetter):
1530         (JSC::RuntimeArray::put):
1531         * bridge/runtime_array.h:
1532         (JSC::RuntimeArray::createStructure):
1533         * bridge/runtime_method.cpp:
1534         (JSC::RuntimeMethod::lengthGetter):
1535         (JSC::callRuntimeMethod):
1536         * bridge/runtime_method.h:
1537         (JSC::RuntimeMethod::createStructure):
1538         * bridge/runtime_object.cpp:
1539         (JSC::RuntimeObjectImp::fallbackObjectGetter):
1540         (JSC::RuntimeObjectImp::fieldGetter):
1541         (JSC::RuntimeObjectImp::methodGetter):
1542         (JSC::RuntimeObjectImp::put):
1543         (JSC::RuntimeObjectImp::defaultValue):
1544         (JSC::callRuntimeObject):
1545         (JSC::callRuntimeConstructor):
1546         * bridge/runtime_object.h:
1547         (JSC::RuntimeObjectImp::createStructure):
1548         * inspector/InspectorController.cpp:
1549         * inspector/JavaScriptCallFrame.cpp:
1550         (WebCore::JavaScriptCallFrame::evaluate):
1551         * inspector/JavaScriptCallFrame.h:
1552         * inspector/JavaScriptProfile.cpp:
1553         (WebCore::toJS):
1554         * inspector/JavaScriptProfile.h:
1555         * inspector/JavaScriptProfileNode.cpp:
1556         (WebCore::toJS):
1557         * inspector/JavaScriptProfileNode.h:
1558         * xml/XMLHttpRequest.cpp:
1559         (WebCore::XMLHttpRequest::dropProtection):
1560
1561 2009-01-06  Pierre-Olivier Latour  <pol@apple.com>
1562
1563         Reviewed by Darin Adler.
1564
1565         Added new API on AnimationController::numberOfActiveAnimations() to be used by DRT.
1566
1567         https://bugs.webkit.org/show_bug.cgi?id=23126
1568
1569         Test: animations/animation-controller-drt-api.html
1570
1571         * WebCore.base.exp:
1572         * page/animation/AnimationController.cpp:
1573         (WebCore::AnimationControllerPrivate::numberOfActiveAnimations):
1574         (WebCore::AnimationController::numberOfActiveAnimations):
1575         * page/animation/AnimationController.h:
1576         * page/animation/CompositeAnimation.cpp:
1577         (WebCore::CompositeAnimationPrivate::numberOfActiveAnimations):
1578         (WebCore::CompositeAnimation::numberOfActiveAnimations):
1579         * page/animation/CompositeAnimation.h:
1580
1581 2009-01-06  Eric Seidel  <eric@webkit.org>
1582
1583         Reviewed by Gavin Barraclough.
1584
1585         Upstream 3 more files to get the WebCore-Chromium build a bit further.
1586
1587         * WebCore.scons:
1588         * page/chromium/AccessibilityObjectChromium.cpp: Added.
1589         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
1590         * page/chromium/AccessibilityObjectWrapper.h: Added.
1591         (WebCore::AccessibilityObjectWrapper::~AccessibilityObjectWrapper):
1592         (WebCore::AccessibilityObjectWrapper::attached):
1593         (WebCore::AccessibilityObjectWrapper::accessibilityObject):
1594         (WebCore::AccessibilityObjectWrapper::AccessibilityObjectWrapper):
1595         * platform/chromium/PasteboardPrivate.h: Added.
1596         (WebCore::PasteboardPrivate::):
1597
1598 2009-01-06  Chris Marrin  <cmarrin@apple.com>
1599
1600         Reviewed by David Hyatt.
1601
1602         Tests: animations/simultaneous-start-left.html
1603                animations/simultaneous-start-transform.html
1604
1605         Fixed https://bugs.webkit.org/show_bug.cgi?id=22870
1606  
1607         I added calls beginAnimationUpdate() and endAnimationUpdate() calls
1608         to AnimationController. These are called by Document at the start
1609         and end of the recalcStyle cycle. Right now, I'm just using the 
1610         beginAnimationUpdate() method to reset an animation time value.
1611         The first time the animation time is accessed after this reset I set
1612         it to the currentTime. So all animations in that cycle get the same
1613         start time. 
1614
1615         The test cases checked in test this, but in the case of the 'left'
1616         test it actually doesn't make any difference in most cases. This is
1617         because values are clamped to whole pixels, so the start times would 
1618         have to be pretty far off for the test to fail using the old
1619         currentTime() model. Still, under really heavy load, it's possible for
1620         the test to fail without these changes.
1621
1622         The 'transform' test is another story. It animates to the full resolution
1623         of a floating point number, so the test fails miserably without this
1624         fix.
1625
1626         * dom/Document.cpp:
1627         (WebCore::Document::recalcStyle):
1628         * page/animation/AnimationBase.cpp:
1629         (WebCore::AnimationBase::updateStateMachine):
1630         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
1631         (WebCore::AnimationBase::willNeedService):
1632         (WebCore::AnimationBase::progress):
1633         (WebCore::AnimationBase::goIntoEndingOrLoopingState):
1634         (WebCore::AnimationBase::beginAnimationUpdateTime):
1635         * page/animation/AnimationBase.h:
1636         * page/animation/AnimationController.cpp:
1637         (WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
1638         (WebCore::AnimationControllerPrivate::setBeginAnimationUpdateTime):
1639         (WebCore::AnimationControllerPrivate::AnimationControllerPrivate):
1640         (WebCore::AnimationController::updateAnimations):
1641         (WebCore::AnimationController::beginAnimationUpdateTime):
1642         (WebCore::AnimationController::beginAnimationUpdate):
1643         (WebCore::AnimationController::endAnimationUpdate):
1644         * page/animation/AnimationController.h:
1645         * page/animation/KeyframeAnimation.cpp:
1646         (WebCore::KeyframeAnimation::animate):
1647
1648 2009-01-06  Julien Chaffraix  <jchaffraix@webkit.org>
1649
1650         Reviewed by Nikolas Zimmermann.
1651
1652         Bug 22858: Simplify make_names.pl code for avoiding multiple definitions or inclusions
1653         https://bugs.webkit.org/show_bug.cgi?id=22858
1654
1655         I had introduced an awkward situation using hasCustomJSWrapper and
1656         sometimes boolean parameter in order to ensure JS wrapper generated once
1657         or header included once.
1658
1659         Simplified the code by using a %seenTag hash to detect multiple definitions
1660         or inclusions and skipping it.
1661
1662         Also cleaned up a bit make_names.pl by using more explicit names and moving
1663         code to where it belongs.
1664
1665         * dom/make_names.pl:
1666         * html/HTMLTagNames.in: Necessary changes that were not detected by
1667         the previous syntax but will be required for autogenerating HTMLElementFactory.
1668
1669 2009-01-06  Anders Carlsson  <andersca@apple.com>
1670
1671         Reviewed by Sam Weinig.
1672
1673         Add a way for frame loader clients to always create a PluginDocument, regardless of 
1674         the real document MIME type.
1675         
1676         * loader/FrameLoader.cpp:
1677         (WebCore::FrameLoader::begin):
1678         (WebCore::FrameLoader::shouldUsePlugin):
1679         * loader/FrameLoaderClient.h:
1680         (WebCore::FrameLoaderClient::shouldUsePluginDocument):
1681
1682 2009-01-06  Dean Jackson  <dino@apple.com>
1683
1684         Reviewed by Dave Hyatt.
1685
1686         Extend Media Queries to cover transitions,
1687         animations, transform-2d and transform-3d
1688         http://webkit.org/specs/MediaQueriesExtensions.html
1689         Note that the implementation uses -webkit- prefixes
1690         even though the spec doesn't have them.
1691         https://bugs.webkit.org/show_bug.cgi?id=22494
1692
1693         Tests: fast/media/mq-animation.html
1694                fast/media/mq-transform-01.html
1695                fast/media/mq-transform-02.html
1696                fast/media/mq-transform-03.html
1697                fast/media/mq-transform-04.html
1698                fast/media/mq-transition.html
1699
1700         * css/MediaFeatureNames.h:
1701         * css/MediaQueryEvaluator.cpp:
1702         (WebCore::animationMediaFeatureEval):
1703         (WebCore::transitionMediaFeatureEval):
1704         (WebCore::transform_2dMediaFeatureEval):
1705         (WebCore::transform_3dMediaFeatureEval):
1706
1707 2009-01-06  Eric Seidel  <eric@webkit.org>
1708
1709         Reviewed by Oliver Hunt.
1710
1711         Bring the Chromium-WebCore build closer to building
1712         by upstreaming PlatformWidget.h add adding the JSC
1713         plugin bridge files to the build.
1714
1715         * WebCore.scons:
1716         * platform/chromium/PlatformWidget.h: Added.
1717
1718 2009-01-06  Eric Seidel  <eric@webkit.org>
1719
1720         Build fix only, no review.
1721
1722         Bring the Chromium-WebCore build back closer to building
1723         by adding files from recent commits.
1724
1725         * WebCore.scons:
1726
1727 2009-01-06  Alexey Proskuryakov  <ap@webkit.org>
1728
1729         Reviewed by Darin Adler.
1730
1731         <rdar://problem/6474973> REGRESSION: PLT ~2% slower due to 39465 (consolidate thread data)
1732
1733         I could not reproduce the slowdown on my PowerPC test machine, but the change should bring
1734         performance back.
1735
1736         * platform/ThreadGlobalData.cpp: (WebCore::threadGlobalData): Don't use AtomicallyInitializedStatic.
1737         Prior to r39465, it was only used for cached converters, which was necessary because the
1738         first access to ICU or TEC one could happen on a secondary thread, but now they are all
1739         initialized from ThreadGlobalData constructor.
1740
1741 2009-01-06  David Smith  <catfish.man@gmail.com>
1742
1743         Reviewed by Darin Adler.
1744         
1745         https://bugs.webkit.org/show_bug.cgi?id=23129
1746         Devirtualize Node::childNodes().
1747
1748 2009-01-06  Simon Hausmann  <simon.hausmann@nokia.com>
1749
1750         Unreviewed build fix.
1751
1752         Fix the Qt build with Qt 4.4.x, the HTTP-only cookie support was
1753         added in Qt 4.5.
1754
1755         * platform/qt/CookieJarQt.cpp:
1756         (WebCore::setCookies):
1757         (WebCore::cookies):
1758
1759 2009-01-06  Zalan Bujtas  <zbujtas@gmail.com>
1760
1761         Reviewed by David Kilzer.
1762
1763         https://bugs.webkit.org/show_bug.cgi?id=23133
1764         Fix SVG disabled build. Move 'pointer-events' from SVGCSSPropertyNames.in to
1765         CSSPropertyNames.in and move PointerEvents functions out of #if ENABLE(SVG)
1766
1767         NOTE: Property name fixes landed as part of r39648.
1768
1769         * css/CSSPrimitiveValueMappings.h:
1770         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1771         (WebCore::CSSPrimitiveValue::operator EPointerEvents):
1772         * css/CSSPropertyNames.in:
1773         * css/SVGCSSPropertyNames.in:
1774
1775 2009-01-06  David Kilzer  <ddkilzer@apple.com>
1776
1777         BUILD FIX (r39634): Fix build for non-SVG builds (Wx)
1778
1779         * css/CSSPropertyNames.in: Added 'pointer-events'.
1780         * css/SVGCSSPropertyNames.in: Commented out pointer-events
1781         since it's now a plain CSS property.
1782
1783 2009-01-06  Simon Hausmann  <simon.hausmann@nokia.com>
1784
1785         Reviewed by Lars Knoll.
1786
1787         Added support for HTTP-only cookies to the Qt build.
1788
1789         * platform/qt/CookieJarQt.cpp:
1790         (WebCore::setCookies): Don't set HTTP-only cookies through the DOM.
1791         (WebCore::cookies): Don't return HTTP-only cookies to the DOM.
1792
1793 2009-01-05  David Smith  <catfish.man@gmail.com>
1794
1795         Reviewed by Oliver Hunt.
1796
1797         https://bugs.webkit.org/show_bug.cgi?id=23084
1798         Avoid redundant AtomicString conversions
1799
1800         * dom/Node.cpp: Create an AtomicString early to avoid converting twice
1801         (WebCore::Node::getElementsByTagNameNS):
1802         * dom/QualifiedName.h: Use the appropriate AtomicString constructor instead of converting from a String
1803
1804 2009-01-05  Simon Fraser  <simon.fraser@apple.com>
1805
1806         Reviewed by Dave Hyatt
1807
1808         https://bugs.webkit.org/show_bug.cgi?id=22985
1809         
1810         Add an assertion that clip rects are being used when painting with the same
1811         rootLayer that they were computed with.
1812         
1813         Fix two issues detected by the assertion:
1814
1815         RenderLayer::updateClipRects() should not unconditionally update the clip rects
1816         on its parent, but stop when reaching rootLayer (just like calculateClipRects()).
1817         
1818         We need to pass the temporaryClipRects flag down through reflection painting
1819         to handle the case of nested reflections.
1820         
1821         Also use temporary clip rects in RenderTreeAsText, since that code does not
1822         reset the painting root for transformed layers, so cached clip rects will not
1823         match those used for painting.
1824
1825         * rendering/RenderLayer.cpp:
1826         (WebCore::RenderLayer::RenderLayer):
1827         (WebCore::RenderLayer::paintLayer):
1828         (WebCore::RenderLayer::updateClipRects):
1829         (WebCore::RenderLayer::clearClipRects):
1830         * rendering/RenderLayer.h:
1831         * rendering/RenderTreeAsText.cpp:
1832         (WebCore::writeLayers):
1833
1834 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
1835
1836         Fix the Qt build
1837
1838         * platform/graphics/qt/AffineTransformQt.cpp:
1839         (WebCore::TransformationMatrix::TransformationMatrix):
1840
1841 2009-01-05  Mark Rowe  <mrowe@apple.com>
1842
1843         Fix the build some more.
1844
1845         * platform/graphics/cairo/AffineTransformCairo.cpp:
1846         (WebCore::TransformationMatrix::TransformationMatrix):
1847
1848 2009-01-05  Oliver Hunt  <oliver@apple.com>
1849
1850         Reviewed by NOBODY (Build fix).
1851
1852         Fix Cairo/Gtk build
1853
1854         * platform/graphics/cairo/ImageBufferCairo.cpp:
1855         (WebCore::ImageBuffer::putImageData):
1856
1857 2009-01-05  Dean Jackson  <dino@apple.com>
1858
1859         Reviewed by Darin Adler.
1860
1861         Rename AffineTransform to TransformationMatrix in
1862         preparation for future enhancements (non-affine matrices)
1863
1864         https://bugs.webkit.org/show_bug.cgi?id=22943
1865
1866         * GNUmakefile.am:
1867         * WebCore.pro:
1868         * WebCore.scons:
1869         * WebCore.vcproj/WebCore.vcproj:
1870         * WebCore.xcodeproj/project.pbxproj:
1871         * WebCoreSources.bkl:
1872         * platform/graphics/transforms/AffineTransform.cpp: Removed.
1873         * platform/graphics/transforms/AffineTransform.h: Removed.
1874         * platform/graphics/transforms/TransformationMatrix.cpp: Copied from WebCore/platform/graphics/transforms/AffineTransform.cpp.
1875         * platform/graphics/transforms/TransformationMatrix.h: Copied from WebCore/platform/graphics/transforms/AffineTransform.h.
1876         * lots of other files with s/AffineTransform/TransformationMatrix/g
1877
1878 2008-01-05  Dean Jackson  <dino@apple.com>
1879
1880         Reviewed by David Hyatt.
1881
1882         Implement 'pointer-events' for HTML content. This involved
1883         adding a new value 'auto' which behaves as 'visiblePainted'
1884         in SVG content. 
1885         
1886         Moved the property out of the SVG CSS code and into
1887         the general CSS (both parsing and RenderStyle). 
1888         
1889         Changes to the hit testing functionality of the Render tree,
1890         specifically the nodeAtPoint methods. Where they used to 
1891         test for visibility, they now use a helper function defined
1892         on base classes (RenderObject and InlineBox) that checks both
1893         visibility and pointer-events.
1894         
1895         https://bugs.webkit.org/show_bug.cgi?id=11395
1896
1897         Tests: fast/events/pointer-events-2.html
1898                fast/events/pointer-events.html
1899
1900         * css/CSSComputedStyleDeclaration.cpp:
1901         (WebCore::):
1902         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1903         * css/CSSParser.cpp:
1904         (WebCore::CSSParser::parseValue):
1905         * css/CSSPrimitiveValueMappings.h:
1906         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1907         (WebCore::CSSPrimitiveValue::operator EPointerEvents):
1908         * css/CSSStyleSelector.cpp:
1909         (WebCore::CSSStyleSelector::applyProperty):
1910         * css/SVGCSSComputedStyleDeclaration.cpp:
1911         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
1912         * css/SVGCSSStyleSelector.cpp:
1913         (WebCore::CSSStyleSelector::applySVGProperty):
1914         * manual-tests/pointer-events.html: Added.
1915         * rendering/EllipsisBox.cpp:
1916         (WebCore::EllipsisBox::nodeAtPoint):
1917         * rendering/InlineBox.h:
1918         (WebCore::InlineBox::visibleToHitTesting):
1919         * rendering/InlineFlowBox.cpp:
1920         (WebCore::InlineFlowBox::nodeAtPoint):
1921         * rendering/InlineTextBox.cpp:
1922         (WebCore::InlineTextBox::nodeAtPoint):
1923         * rendering/PointerEventsHitRules.cpp:
1924         (WebCore::PointerEventsHitRules::PointerEventsHitRules):
1925         * rendering/PointerEventsHitRules.h:
1926         (WebCore::PointerEventsHitRules::):
1927         * rendering/RenderBlock.cpp:
1928         (WebCore::RenderBlock::nodeAtPoint):
1929         * rendering/RenderBox.cpp:
1930         (WebCore::RenderBox::nodeAtPoint):
1931         * rendering/RenderObject.h:
1932         (WebCore::RenderObject::visibleToHitTesting):
1933         * rendering/RenderPath.cpp:
1934         (WebCore::RenderPath::nodeAtPoint):
1935         * rendering/RenderSVGImage.cpp:
1936         (WebCore::RenderSVGImage::nodeAtPoint):
1937         * rendering/RenderSVGText.cpp:
1938         (WebCore::RenderSVGText::nodeAtPoint):
1939         * rendering/RootInlineBox.cpp:
1940         (WebCore::RootInlineBox::nodeAtPoint):
1941         * rendering/TextControlInnerElements.cpp:
1942         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
1943         * rendering/style/RenderStyle.h:
1944         (WebCore::):
1945         (WebCore::InheritedFlags::setBitDefaults):
1946         (WebCore::InheritedFlags::pointerEvents):
1947         (WebCore::InheritedFlags::setPointerEvents):
1948         (WebCore::InheritedFlags::initialPointerEvents):
1949         * rendering/style/RenderStyleConstants.h:
1950         (WebCore::):
1951         * rendering/style/SVGRenderStyle.h:
1952         (WebCore::SVGRenderStyle::InheritedFlags::operator==):
1953         (WebCore::SVGRenderStyle::setBitDefaults):
1954         * rendering/style/SVGRenderStyleDefs.h:
1955         * css/CSSValueKeywords.in:
1956         * css/SVGCSSValueKeywords.in:
1957
1958 2009-01-05  Oliver Hunt  <oliver@apple.com>
1959
1960         Reviewed by NOBODY (Build fix).
1961
1962         Fix Cairo/Gtk build
1963
1964         * platform/graphics/cairo/ImageBufferCairo.cpp:
1965         (WebCore::ImageBuffer::getImageData):
1966
1967 2009-01-05  Oliver Hunt  <oliver@apple.com>
1968
1969         Reviewed by Gavin Barraclough.
1970
1971         CanvasPixelArray performance is too slow 
1972         <https://bugs.webkit.org/show_bug.cgi?id=23123>
1973
1974         Remove the WebCore CanvasPixelArray implementation and replace
1975         CPA usage with JSC::ByteArray.  Replace the JSCanvasPixelArray
1976         wrapper with an explicitly instantiated JSByteArray put on the
1977         JSImageData object as an ordinary ReadOnly, DontDelete property.
1978
1979         * DerivedSources.make:
1980         * ForwardingHeaders/runtime/ByteArray.h: Added.
1981         * ForwardingHeaders/runtime/JSByteArray.h: Added.
1982         * GNUmakefile.am:
1983         * WebCore.pro:
1984         * WebCore.scons:
1985         * WebCore.vcproj/WebCore.vcproj:
1986         * WebCore.xcodeproj/project.pbxproj:
1987         * bindings/js/JSCanvasPixelArrayCustom.h: Removed.
1988         * bindings/js/JSImageDataCustom.cpp:
1989         (WebCore::toJS):
1990         * html/CanvasPixelArray.cpp: Removed.
1991         * html/CanvasPixelArray.h: Removed.
1992         * html/CanvasPixelArray.idl: Removed.
1993         * html/CanvasRenderingContext2D.cpp:
1994         (WebCore::createEmptyImageData):
1995         * html/ImageData.cpp:
1996         (WebCore::ImageData::ImageData):
1997         * html/ImageData.h:
1998         (WebCore::ImageData::data):
1999         * html/ImageData.idl:
2000         * platform/graphics/cg/ImageBufferCG.cpp:
2001         (WebCore::ImageBuffer::getImageData):
2002         (WebCore::ImageBuffer::putImageData):
2003
2004 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
2005
2006         Reviewed by George Staikos.
2007
2008         Add notification for contentsSizeChanged which the Qt API will
2009         introduce.
2010
2011         * loader/EmptyClients.h:
2012         (WebCore::EmptyChromeClient::contentsSizeChanged):
2013         * page/Chrome.cpp:
2014         (WebCore::Chrome::contentsSizeChanged):
2015         * page/Chrome.h:
2016         * page/ChromeClient.h:
2017         * page/FrameView.cpp:
2018         (WebCore::FrameView::setContentsSize):
2019         * page/FrameView.h:
2020         * platform/HostWindow.h:
2021         * platform/ScrollView.h:
2022
2023 2009-01-05  Anders Carlsson  <andersca@apple.com>
2024
2025         Build fix.
2026         
2027         * plugins/PluginView.h:
2028         (WebCore::PluginManualLoader::~PluginManualLoader):
2029
2030 2009-01-05  Anders Carlsson  <andersca@apple.com>
2031
2032         Reviewed by Kevin Decker.
2033         
2034         Add an abstract PluginManualLoader class and make PluginView inherit from it. 
2035         
2036         Add some error checking that currently exists in WebKit (but not for long!)
2037         
2038         * plugins/PluginView.cpp:
2039         (WebCore::PluginView::didReceiveResponse):
2040         (WebCore::PluginView::didReceiveData):
2041         (WebCore::PluginView::didFinishLoading):
2042         (WebCore::PluginView::didFail):
2043         * plugins/PluginView.h:
2044
2045 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
2046
2047         Reviewed by George Staikos.
2048
2049         Fixes FrameView to respect the state of scrollbarmode when it is explicitly
2050         set programatically via a webkit API.
2051
2052         * loader/FrameLoaderClient.cpp:
2053         (WebCore::FrameLoaderClient::transitionToCommittedForNewPage):
2054         * loader/FrameLoaderClient.h:
2055         * page/FrameView.cpp:
2056         (WebCore::FrameView::initScrollbars):
2057         (WebCore::FrameView::updateDefaultScrollbarState):
2058         * page/FrameView.h:
2059
2060 2009-01-05  Darin Adler  <darin@apple.com>
2061
2062         Reviewed by Dan Bernstein.
2063
2064         Bug 23109: REGRESSION: Backwards search in a long document matches incorrectly
2065         https://bugs.webkit.org/show_bug.cgi?id=23109
2066
2067         Test: fast/text/find-backwards.html
2068
2069         * editing/TextIterator.cpp:
2070         (WebCore::SearchBuffer::append): Fix incorrect size passed to memcpy.
2071         (WebCore::SearchBuffer::search): Handle case where we have an empty buffer but
2072         we're at a break; must not try to search because ICU will give us an error.
2073         Fix incorrect size passed to memcpy and memmove.
2074         (WebCore::findPlainText): Fix case where we found a match and need to search
2075         again because we want to find the last match. We need to try again without
2076         adding any more text or handling the break before moving on.
2077
2078 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
2079
2080         Fix the Qt build
2081
2082         * bridge/runtime_object.cpp:
2083         (JSC::RuntimeObjectImp::put):
2084
2085 2009-01-05  Alexey Proskuryakov  <ap@webkit.org>
2086
2087         Reviewed by Sam Weinig.
2088
2089         Fix platforms that don't have Workers enabled.
2090
2091         * platform/ThreadGlobalData.cpp: (WebCore::threadGlobalData): Create ThreadGlobalData in
2092         two stages, so that EventNames constructor can access the just-created atomic string table.
2093         This matches what happens in ThreadSpecific case.
2094
2095 2009-01-05  Alexey Proskuryakov  <ap@webkit.org>
2096
2097         Suggested by Dave Levin.
2098
2099         Mac release build fix.
2100
2101         * WebCore.base.exp: Remove ThreadGlobalData::eventNames(), which is now inline.
2102
2103 2009-01-05  Darin Adler  <darin@apple.com>
2104
2105         * dom/Document.cpp: Fix build. Oops again.
2106
2107 2009-01-05  Darin Adler  <darin@apple.com>
2108
2109         Reviewed by Anders Carlsson.
2110
2111         Fix hang whenever following an anchor.
2112
2113         * dom/Document.cpp:
2114         (WebCore::Document::findAnchor): Oops!
2115
2116 2009-01-05  Alexey Proskuryakov  <ap@webkit.org>
2117
2118         Reviewed by Darin Adler.
2119
2120         https://bugs.webkit.org/show_bug.cgi?id=23073
2121         <rdar://problem/6471129> Workers crash on Windows Release builds
2122
2123         * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::ThreadGlobalData):
2124         * platform/ThreadGlobalData.h: (WebCore::ThreadGlobalData::eventNames):
2125         Now that ThreadSpecific sets up the pointer before invoking data constructor, we can
2126         initialize EventNames right away.
2127
2128 2009-01-05  Darin Adler  <darin@apple.com>
2129
2130         Reviewed by Anders Carlsson.
2131
2132         Bug 23106: HTMLFormCollection::namedItem ignores caseSensitive argument
2133         https://bugs.webkit.org/show_bug.cgi?id=23106
2134
2135         This led me to a bunch of dead code. It turns out that HTML collections
2136         were carrying the case-insensitive code just so they could be used to
2137         find anchors, something we can do more simply and efficiently without
2138         creating a DOM HTMLCollection object.
2139
2140         No behavior change. Just adding a new function findAnchor function and
2141         removing some dead code.
2142
2143         * dom/Document.cpp:
2144         (WebCore::Document::findAnchor): Added.
2145         * dom/Document.h: Ditto.
2146
2147         * html/HTMLAnchorElement.cpp:
2148         (WebCore::HTMLAnchorElement::accessKey): Take and return AtomicString
2149         references for better efficiency.
2150         (WebCore::HTMLAnchorElement::setAccessKey): Ditto.
2151         (WebCore::HTMLAnchorElement::charset): Ditto.
2152         (WebCore::HTMLAnchorElement::setCharset): Ditto.
2153         (WebCore::HTMLAnchorElement::coords): Ditto.
2154         (WebCore::HTMLAnchorElement::setCoords): Ditto.
2155         (WebCore::HTMLAnchorElement::setHref): Ditto.
2156         (WebCore::HTMLAnchorElement::hreflang): Ditto.
2157         (WebCore::HTMLAnchorElement::setHreflang): Ditto.
2158         (WebCore::HTMLAnchorElement::name): Ditto.
2159         (WebCore::HTMLAnchorElement::setName): Ditto.
2160         (WebCore::HTMLAnchorElement::rel): Ditto.
2161         (WebCore::HTMLAnchorElement::setRel): Ditto.
2162         (WebCore::HTMLAnchorElement::rev): Ditto.
2163         (WebCore::HTMLAnchorElement::setRev): Ditto.
2164         (WebCore::HTMLAnchorElement::shape): Ditto.
2165         (WebCore::HTMLAnchorElement::setShape): Ditto.
2166         (WebCore::HTMLAnchorElement::setTarget): Ditto.
2167         (WebCore::HTMLAnchorElement::type): Ditto.
2168         (WebCore::HTMLAnchorElement::setType): Ditto.
2169         * html/HTMLAnchorElement.h: Ditto.
2170
2171         * html/HTMLCollection.cpp:
2172         (WebCore::HTMLCollection::checkForNameMatch): Changed argument to an
2173         AtomicString and removed the caseSensitive boolean, since we're now always
2174         case sensitive.
2175         (WebCore::HTMLCollection::namedItem): Ditto.
2176         (WebCore::HTMLCollection::nextNamedItem): Ditto.
2177         * html/HTMLCollection.h: Ditto.
2178         * html/HTMLFormCollection.cpp:
2179         (WebCore::HTMLFormCollection::getNamedItem): Ditto.
2180         (WebCore::HTMLFormCollection::getNamedFormItem): Ditto.
2181         (WebCore::HTMLFormCollection::nextNamedItemInternal): Ditto.
2182         (WebCore::HTMLFormCollection::namedItem): Ditto.
2183         (WebCore::HTMLFormCollection::nextNamedItem): Ditto.
2184         * html/HTMLFormCollection.h: Ditto.
2185         * html/HTMLSelectElement.cpp:
2186         (WebCore::HTMLSelectElement::namedItem): Ditto.
2187         * html/HTMLSelectElement.h: Ditto.
2188
2189         * loader/FrameLoader.cpp:
2190         (WebCore::FrameLoader::gotoAnchor): Use the new findAnchor function.
2191         * page/AccessibilityRenderObject.cpp:
2192         (WebCore::AccessibilityRenderObject::internalLinkElement): Ditto.
2193
2194 2009-01-05  Darin Adler  <darin@apple.com>
2195
2196         Reviewed by Anders Carlsson.
2197
2198         Bug 23104: minor mistakes in init functions for animation and transition events
2199         https://bugs.webkit.org/show_bug.cgi?id=23104
2200
2201         Test: fast/events/init-events.html
2202
2203         Also fixed two StorageEvent problems the test case uncovered:
2204
2205             Made document.createEvent("StorageEvent") work.
2206             Allow null values for StorageEvent.oldValue and StorageEvent.newValue.
2207
2208         * dom/Document.cpp:
2209         (WebCore::Document::createEvent): Sorted alphabetically by the name of the event
2210         class. Added StorageEvent.
2211
2212         * dom/UIEvent.idl: Fixed typo in a comment.
2213
2214         * dom/WebKitAnimationEvent.cpp:
2215         (WebCore::WebKitAnimationEvent::initWebKitAnimationEvent): Use all the arguments.
2216         * dom/WebKitTransitionEvent.cpp:
2217         (WebCore::WebKitTransitionEvent::initWebKitTransitionEvent): Ditto.
2218
2219         * storage/StorageEvent.idl: Use the ConvertNullToNullString keyword on the
2220         arguments to initStorageEvent so it can create events with null values for the
2221         oldValue and newValue, just like the real storage events. Note that the properties
2222         already had ConvertNullStringTo=Null, so this is just the other half of that.
2223
2224 2009-01-05  Darin Adler  <darin@apple.com>
2225
2226         Reviewed by Alexey Proskuryakov.
2227
2228         Bug 23102: turn on unused parameter warnings in WebCore
2229         https://bugs.webkit.org/show_bug.cgi?id=23102
2230
2231         First step: Fix the simple cases where we can just remove an argument name.
2232         Also made a few more things protected and private.
2233
2234         * many files
2235
2236 2009-01-05  Alexey Proskuryakov  <ap@webkit.org>
2237
2238         Reviewed by Darin Adler.
2239
2240         https://bugs.webkit.org/show_bug.cgi?id=23115
2241         Create a version of ASSERT for use with otherwise unused variables
2242
2243         * loader/appcache/ApplicationCacheStorage.cpp:
2244         (WebCore::ApplicationCacheStorage::verifySchemaVersion): Use the new ASSERT_UNUSED macro.
2245
2246 2009-01-05  Alexey Proskuryakov  <ap@webkit.org>
2247
2248         Non-Mac build fix.
2249
2250         * loader/appcache/ApplicationCacheStorage.cpp: Include wtf/StringExtras.h for snprintf.
2251
2252 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
2253
2254         Reviewed by George Staikos.
2255
2256         Remove unnecessary methods from EmptyFrameLoaderClient
2257
2258         * loader/EmptyClients.h:
2259
2260 2009-01-05  Alexey Proskuryakov  <ap@webkit.org>
2261
2262         Reviewed by Darin Adler.
2263
2264         https://bugs.webkit.org/show_bug.cgi?id=23077
2265         Make application cache use SQLite built-in user_version
2266
2267         * loader/appcache/ApplicationCacheStorage.cpp:
2268         (WebCore::ApplicationCacheStorage::verifySchemaVersion): Changed to track versions with
2269         PRAGMA user_version.
2270
2271         * loader/appcache/ApplicationCacheResource.h: (WebCore::ApplicationCacheResource::):
2272         Used the occasion to get rid of the hole in bitmask that was a leftover from opportunistic
2273         cache entries.
2274
2275 2009-01-04  David Smith  <catfish.man@gmail.com>
2276
2277         Reviewed by Oliver Hunt.
2278
2279         https://bugs.webkit.org/show_bug.cgi?id=23084
2280         Avoid redundant AtomicString conversions
2281
2282         * dom/Node.cpp:
2283         (WebCore::Node::getElementsByTagName): Pass starAtom instead of "*"
2284         (WebCore::Node::getElementsByTagNameNS): Take an AtomicString for the namespace URI
2285         (WebCore::Node::isDefaultNamespace): Ditto
2286         (WebCore::Node::lookupPrefix): Ditto
2287         (WebCore::Node::lookupNamespacePrefix): Ditto
2288         * dom/Node.h: Ditto
2289
2290 2009-01-04  Darin Adler  <darin@apple.com>
2291
2292         Reviewed by Oliver Hunt.
2293
2294         Bug 23105: canvas setFillColor function ignores alpha argument
2295         https://bugs.webkit.org/show_bug.cgi?id=23105
2296
2297         Test: fast/canvas/set-colors.html
2298
2299         * html/CanvasRenderingContext2D.cpp:
2300         (WebCore::CanvasRenderingContext2D::setFillColor): Pass alpha value through instead
2301         of ignoring it and always passing 1.
2302
2303         * html/CanvasStyle.cpp:
2304         (WebCore::CanvasStyle::applyStrokeColor): Fix spelling of transparent in comments.
2305         (WebCore::CanvasStyle::applyFillColor): Ditto.
2306
2307 2009-01-04  Darin Adler  <darin@apple.com>
2308
2309         Bug 23086: REGRESSION(r39540/r39541): Windows build fails due to ICU errors
2310         https://bugs.webkit.org/show_bug.cgi?id=23086
2311
2312         * editing/TextIterator.cpp: Check UCONFIG_NO_COLLATION and don't compile
2313         in the new search path if it's 0.
2314
2315 2009-01-04  David Kilzer  <ddkilzer@apple.com>
2316
2317         Don't install *.idl and *.in files as resources
2318
2319         Reviewed by Oliver Hunt.
2320
2321         Don't install these files as resources in the WebCore framework:
2322         - WMLAttributeNames.in
2323         - WMLTagNames.in
2324         - WorkerContext.idl
2325         - WorkerLocation.idl
2326         - WorkerNavigator.idl
2327
2328         * WebCore.xcodeproj/project.pbxproj: Removed resources.
2329
2330 2009-01-04  Simon Fraser  <simon.fraser@apple.com>
2331
2332         Reviewed by Darin Adler
2333
2334         https://bugs.webkit.org/show_bug.cgi?id=23090
2335         
2336         If an object gets a Layout hint, and the style change will result in
2337         the creation of a RenderLayer, then we need to repaint the old position
2338         of the object. This was done for transform, but we have to test opacity too.
2339
2340         Test: fast/repaint/create-layer-repaint.html
2341
2342         * rendering/RenderObject.cpp:
2343         (WebCore::RenderObject::styleWillChange):
2344
2345 2009-01-04  Darin Adler  <darin@apple.com>
2346
2347         Reviewed by Dan Bernstein.
2348
2349         Bug 23103: Safari's auto-fill no longer works for <select> elements
2350         https://bugs.webkit.org/show_bug.cgi?id=23103
2351         rdar://problem/6472061
2352
2353         * bindings/objc/DOMHTML.mm:
2354         (-[DOMHTMLSelectElement _activateItemAtIndex:]): Implemented this.
2355
2356 2009-01-04  Adam Treat  <adam.treat@torchmobile.com>
2357
2358         Reviewed by George Staikos.
2359
2360         Add fixedLayoutSize feature to ScrollView to allow for controlling the
2361         layout beyond the constraint of the current viewports dynamic size
2362
2363         * css/MediaQueryEvaluator.cpp:
2364         (WebCore::heightMediaFeatureEval):
2365         (WebCore::widthMediaFeatureEval):
2366         * dom/Element.cpp:
2367         (WebCore::Element::clientWidth):
2368         (WebCore::Element::clientHeight):
2369         * loader/FrameLoaderClient.cpp:
2370         (WebCore::FrameLoaderClient::transitionToCommittedForNewPage):
2371         * loader/FrameLoaderClient.h:
2372         * page/FrameView.cpp:
2373         (WebCore::FrameView::layout):
2374         * platform/ScrollView.cpp:
2375         (WebCore::ScrollView::ScrollView):
2376         (WebCore::ScrollView::layoutWidth):
2377         (WebCore::ScrollView::layoutHeight):
2378         (WebCore::ScrollView::fixedLayoutSize):
2379         (WebCore::ScrollView::setFixedLayoutSize):
2380         (WebCore::ScrollView::useFixedLayout):
2381         (WebCore::ScrollView::setUseFixedLayout):
2382         * platform/ScrollView.h:
2383         * rendering/RenderView.cpp:
2384         (WebCore::RenderView::viewHeight):
2385         (WebCore::RenderView::viewWidth):
2386         * rendering/RenderView.h:
2387
2388 2009-01-03  Rob Buis  <rwlbuis@gmail.com>
2389
2390         Reviewed by Darin.
2391
2392         https://bugs.webkit.org/show_bug.cgi?id=22660
2393         SVG elements that are moved are nor fully invalidated/earsed
2394
2395         Mark the SVG root as needing a layout when its position changes.
2396
2397         Tests: svg/custom/circle-move-invalidation.svg
2398
2399         * rendering/RenderSVGRoot.cpp:
2400         (WebCore::RenderSVGRoot::position):
2401         * rendering/RenderSVGRoot.h:
2402
2403 2009-01-03  Steve Falkenburg  <sfalken@apple.com>
2404
2405         Build fix.
2406
2407         * loader/FrameLoader.h:
2408
2409 2009-01-02  Cary Clark  <caryclark@google.com>
2410
2411         Reviewed and landed by Darin Adler.
2412
2413         Bug 22963: write icons before reading them
2414         https://bugs.webkit.org/show_bug.cgi?id=22963
2415
2416         Reverse the order in the icon database main thread loop to
2417         write the pending icons to the database before trying
2418         to read any requested icons. This ensures that a requested icon 
2419         has the correct data when read.
2420         
2421         * loader/icon/IconDatabase.cpp:
2422         (WebCore::IconDatabase::syncThreadMainLoop):
2423
2424 2009-01-02  Darin Adler  <darin@apple.com>
2425
2426         * loader/FrameLoader.cpp:
2427         (WebCore::FrameLoader::loadItem): One small thing I forgot in my last check-in.
2428         This cuts down on the number of hash table operations during loading.
2429
2430 2009-01-02  Dmitry Titov  <dimich@chromium.org>
2431
2432         Reviewed and landed by Darin Adler.
2433
2434         https://bugs.webkit.org/show_bug.cgi?id=23025
2435         DOMTimer lifetime cleanup: timeoutMap methods on Document now do not delete the timer.
2436         Instead, all 3 places that delete timers do it directly calling 'delete' and then timer's dtor removes the ID from the timeoutMap.
2437         Note that in case the context is destroyed and timers are deleted at once, the check in ~DOMTimer() prevents 
2438         unnecessary HashMap remove in case the Document is being destroyed.
2439
2440         * bindings/js/DOMTimer.cpp:
2441         (WebCore::DOMTimer::~DOMTimer): removes the id from the timeoutMap.
2442         (WebCore::DOMTimer::install):
2443         (WebCore::DOMTimer::removeById): simply uses 'delete this'.
2444         (WebCore::DOMTimer::fired): same.
2445         (WebCore::DOMTimer::contextDestroyed): same.
2446         * dom/Document.cpp:
2447         (WebCore::Document::removeTimeout): now it only removes the id from the map, does not delete the timer.
2448
2449 2009-01-02  Darin Adler  <darin@apple.com>
2450
2451         Reviewed by Sam Weinig.
2452
2453         Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears
2454         inside its web view when resizing its window
2455         https://bugs.webkit.org/show_bug.cgi?id=23072
2456         rdar://problem/6368028
2457
2458         The first attempt at fixing this did not work.
2459         This time I was able to reproduce the bug and test the fix.
2460
2461         Bug 11212: REGRESSION: Activity window doesn't always list all files until refresh
2462         https://bugs.webkit.org/show_bug.cgi?id=11212
2463         rdar://problem/4959702
2464
2465         I had to fix this second bug because otherwise the WebKit code to trigger the first
2466         fix didn't run.
2467
2468         Also fixes memory use that kept growing as we maintained a set of all URLs loaded in
2469         a particular frame. Bad idea! It's bad enough that we do it for each document, but
2470         the old version kept the set around forever as you moved from one document to the next.
2471
2472         * html/HTMLFrameElementBase.cpp:
2473         (WebCore::HTMLFrameElementBase::parseMappedAttribute): Change this so that we allow
2474         turning off scrolling when the quirk is enabled. We just don't allow turning it on.
2475         This fixes one of the two problems with the initial patch; the other fix is in WebKit.
2476
2477         * loader/DocumentLoader.h: Moved didTellClientAboutLoad and haveToldClientAboutLoad
2478         here from FrameLoader. The old way meant that a given frame would forever remember
2479         the URL of any resources loaded in that frame and never send any "loaded from cache"
2480         client calls about those URLs.
2481
2482         * loader/FrameLoader.cpp:
2483         (WebCore::FrameLoader::loadResourceSynchronously): Removed call to didTellCientAboutLoad.
2484         This is now handled by dispatchWillSendRequest, which is safer since that's the actual
2485         function that tells the client about the load.
2486         (WebCore::FrameLoader::loadedResourceFromMemoryCache): Changed calls to
2487         haveToldClientAboutLoad and didTellClientAboutLoad to call the document loader.
2488         Also removed the call in the case where we don't load from the cache, since
2489         dispatchWillSendRequest now takes care of it.
2490         (WebCore::FrameLoader::dispatchWillSendRequest): Put calls to didTellClientAboutLoad
2491         here. Call it both on the URL we pass in and the URL the client returns; we won't
2492         tell the client about either if it's loaded from the memory cache.
2493
2494         * loader/FrameLoader.h: Removed didTellClientAboutLoad, haveToldClientAboutLoad, and
2495         m_urlsClientKnowsAbout.
2496
2497         * loader/SubresourceLoader.cpp: Removed unneeded load function that called
2498         didTellClientAboutLoad. That's now taken care of in dispatchWillSendRequest.
2499
2500         * loader/SubresourceLoader.h: Removed load function. Also made all members private
2501         except for create and clearClient.
2502
2503 2009-01-02  Simon Fraser  <simon.fraser@apple.com>
2504
2505         Reviewed by Darin Adler
2506
2507         https://bugs.webkit.org/show_bug.cgi?id=23082
2508         
2509         Fix GIF animation by ensuring that the signature of
2510         startAnimation() in the base class matches the method in BitmapImage.
2511         
2512         Test: fast/backgrounds/animated-gif-as-background.html
2513
2514         * platform/graphics/Image.h:
2515         (WebCore::Image::startAnimation):
2516
2517 2009-01-02  David Smith  <catfish.man@gmail.com>
2518
2519         Reviewed by Darin Adler.
2520         
2521         https://bugs.webkit.org/show_bug.cgi?id=22699
2522         Enable NodeList caching for getElementsByTagName
2523         
2524         test: fast/dom/getelementsbytagnamens-mixed-namespaces.html
2525
2526         * dom/Document.cpp:
2527         (WebCore::FormElementKeyHash::hash): Use WTF::stringHashingStartValue
2528         * dom/Node.cpp:
2529         (WebCore::Node::getElementsByTagNameNS): Ensure rare data and add a node list cache
2530         (WebCore::NodeListsNodeData::invalidateCaches): Invalidate the tag name node list cache as well as the others
2531         (WebCore::NodeListsNodeData::isEmpty): Check the tag name node list cache as well as the others
2532         * dom/NodeRareData.h: Add m_tagNodeListCaches
2533         * dom/QualifiedName.cpp:
2534         * dom/QualifiedName.h: Move QNameHash to the header, make it work on QualifiedNames, and rename to QualifiedNameHash
2535         * dom/StyledElement.cpp:
2536         (WebCore::MappedAttributeHash::hash): Use WTF::stringHashingStartValue
2537         * dom/TagNodeList.cpp:
2538         (WebCore::TagNodeList::TagNodeList): Add a NodeList cache argument
2539         * dom/TagNodeList.h: 
2540         (WebCore::TagNodeList::create): Add a NodeList cache argument
2541         * platform/text/StringHash.h:
2542         (WebCore::CaseFoldingHash::hash): Use WTF::stringHashingStartValue
2543         * platform/text/TextEncodingRegistry.cpp:
2544         (WebCore::TextEncodingNameHash::hash): Use WTF::stringHashingStartValue
2545
2546 2009-01-02  Eric Carlson  <eric.carlson@apple.com>
2547
2548         Reviewed by Darin Adler
2549
2550         Fix for https://bugs.webkit.org/show_bug.cgi?id=23066 & <rdar://problem/6028417> 
2551         Full Page Zoom: a <video> element that doesn't include width/height attribute does not scale
2552
2553         * rendering/RenderVideo.cpp:
2554         (WebCore::RenderVideo::calcReplacedWidth): Multiply aspect ratio width by style()->effectiveZoom()
2555         (WebCore::RenderVideo::calcReplacedHeight): Multiply aspect ratio height by style()->effectiveZoom()
2556
2557 2009-01-02  David Kilzer  <ddkilzer@apple.com>
2558
2559         BUILD FIX (r39552): Add mediaControls.css to other build files
2560
2561         * GNUmakefile.am:
2562         * WebCore.pro:
2563         * WebCore.vcproj/WebCore.vcproj:
2564
2565 2009-01-02  David Kilzer  <ddkilzer@apple.com>
2566
2567         Try to fix Wx build after r39427
2568
2569         * platform/graphics/wx/PathWx.cpp:
2570         (WebCore::Path::strokeBoundingRect): Added stub.
2571
2572 2009-01-02  Alexey Proskuryakov  <ap@webkit.org>
2573
2574         Reviewed by Adele Peterson.
2575
2576         <rdar://problem/6471356> Failed assertion on quit
2577
2578         * platform/ThreadGlobalData.cpp: (WebCore::ThreadGlobalData::~ThreadGlobalData):
2579         Only assert that empty string are all removed on secondary threads.
2580
2581 2009-01-02  David Kilzer  <ddkilzer@apple.com>
2582
2583         Bug 23081: These files are no longer part of the KDE libraries
2584
2585         <https://bugs.webkit.org/show_bug.cgi?id=23081>
2586
2587         Reviewed by Darin Adler.
2588
2589         Removed "This file is part of the KDE libraries" comment from
2590         source files.  Added or updated Apple copyrights as well.
2591
2592         No tests since there are only changes to comments.
2593
2594         * bridge/testbindings.cpp:
2595         * html/HTMLEntityNames.gperf:
2596         * loader/Cache.h:
2597         * loader/CachedCSSStyleSheet.h:
2598         * loader/CachedResourceClient.h:
2599         * loader/CachedResourceClientWalker.cpp:
2600         * loader/CachedResourceClientWalker.h:
2601         * loader/CachedScript.cpp:
2602         * loader/CachedScript.h:
2603         * loader/CachedXBLDocument.cpp:
2604         * loader/CachedXBLDocument.h:
2605         * loader/CachedXSLStyleSheet.cpp:
2606         * loader/CachedXSLStyleSheet.h:
2607         * rendering/GapRects.h:
2608         * xml/XMLSerializer.cpp:
2609
2610 2009-01-02  Simon Fraser  <simon.fraser@apple.com>
2611
2612         Reviewed by Darin Adler
2613
2614         Use an OwnPtr for m_chromeClient.
2615         
2616         * svg/graphics/SVGImage.cpp:
2617         (WebCore::SVGImage::~SVGImage):
2618         (WebCore::SVGImage::dataChanged):
2619         * svg/graphics/SVGImage.h:
2620
2621 2009-01-02  Simon Fraser  <simon.fraser@apple.com>
2622
2623         Reviewed by Darin Adler
2624
2625         https://bugs.webkit.org/show_bug.cgi?id=22981
2626
2627         Repaints inside of an SVGImage were thrown on the floor,
2628         which broke incremental painting due to loading, or SVG animation.
2629         Fix this by assigning the SVGImage a ChromeClient subclass that passes
2630         along repaints via a new method on ImageObserver, which also takes
2631         a rect parameter for the changed rect, allowing incremental repaints.
2632         Fix RenderImage::imageChanged to take advantage of this changedRect to
2633         only repaint the changed parts of the image.
2634         
2635         This also enables incremental painting for canvas-as-image, so
2636         add tests for that too.
2637
2638         Tests: fast/backgrounds/animated-svg-as-background.html
2639                fast/backgrounds/animated-svg-as-mask.html
2640                fast/canvas/canvas-as-image-incremental-repaint.html
2641                fast/canvas/canvas-as-image.html
2642                fast/images/animated-svg-as-image.html
2643
2644         * css/CSSCanvasValue.cpp:
2645         (WebCore::CSSCanvasValue::canvasChanged):
2646         * loader/CachedImage.cpp:
2647         (WebCore::CachedImage::notifyObservers):
2648         (WebCore::CachedImage::data):
2649         (WebCore::CachedImage::changedInRect):
2650         * loader/CachedImage.h:
2651         * loader/CachedResourceClient.h:
2652         (WebCore::CachedResourceClient::imageChanged):
2653         * platform/graphics/ImageObserver.h:
2654         * rendering/RenderBox.cpp:
2655         (WebCore::RenderBox::imageChanged):
2656         * rendering/RenderBox.h:
2657         * rendering/RenderImage.cpp:
2658         (WebCore::RenderImage::imageChanged):
2659         * rendering/RenderImage.h:
2660         * rendering/RenderListMarker.cpp:
2661         (WebCore::RenderListMarker::imageChanged):
2662         * rendering/RenderListMarker.h:
2663         * rendering/RenderObject.cpp:
2664         (WebCore::RenderObject::imageChanged):
2665         * rendering/RenderObject.h:
2666         (WebCore::RenderObject::imageChanged):
2667         * rendering/RenderSVGImage.cpp:
2668         (WebCore::RenderSVGImage::imageChanged):
2669         * rendering/RenderSVGImage.h:
2670         * rendering/RenderScrollbarPart.cpp:
2671         (WebCore::RenderScrollbarPart::imageChanged):
2672         * rendering/RenderScrollbarPart.h:
2673         * rendering/RenderTableCol.cpp:
2674         (WebCore::RenderTableCol::imageChanged):
2675         * rendering/RenderTableCol.h:
2676         * rendering/RenderTableRow.cpp:
2677         (WebCore::RenderTableRow::imageChanged):
2678         * rendering/RenderTableRow.h:
2679         * rendering/RenderTableSection.cpp:
2680         (WebCore::RenderTableSection::imageChanged):
2681         * rendering/RenderTableSection.h:
2682         * svg/graphics/SVGImage.cpp:
2683         (WebCore::SVGImageChromeClient::SVGImageChromeClient):
2684         (WebCore::SVGImageChromeClient::image):
2685         (WebCore::SVGImageChromeClient::chromeDestroyed):
2686         (WebCore::SVGImageChromeClient::repaint):
2687         (WebCore::SVGImage::SVGImage):
2688         (WebCore::SVGImage::~SVGImage):
2689         (WebCore::SVGImage::dataChanged):
2690         * svg/graphics/SVGImage.h:
2691
2692 2009-01-02  Eric Carlson  <eric.carlson@apple.com>
2693
2694         Reviewed by Darin Adler
2695
2696         https://bugs.webkit.org/show_bug.cgi?id=23043
2697
2698         Pull media controls css out of html4.css into separate file. Don't generate
2699         wml, svg, or media css globals unless the feature is enabled.
2700
2701         * DerivedSources.make:
2702             Don't include css for unused features.
2703
2704         * WebCore.xcodeproj/project.pbxproj:
2705             include mediaControls.css
2706
2707         * css/CSSStyleSelector.cpp:
2708         (WebCore::CSSStyleSelector::styleForElement):
2709             don't parse or add media css unless VIDEO feature is enabled and the target
2710             element is video or audio
2711
2712         * css/html4.css:
2713             moved media controls css to mediaControls.css
2714
2715         * css/mediaControls.css: Added.
2716
2717 2009-01-02  Alexey Proskuryakov  <ap@webkit.org>
2718
2719         Reviewed by Darin Adler.
2720
2721         https://bugs.webkit.org/show_bug.cgi?id=23022
2722         Fix multiple issues with appcache online whitelist handling
2723
2724         Test: http/tests/appcache/online-whitelist.html
2725
2726         * loader/appcache/ApplicationCache.cpp:
2727         (WebCore::ApplicationCache::isURLInOnlineWhitelist): Test whitelist entries as prefixes,
2728         making it possible to use them for CGI invocation (as required by HTML5).
2729
2730         * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache):
2731         Re-ordered checks, so that resources that are cached, but are also listed in online whitelist
2732         are loaded from the cache. This is required by HTML5, although Firefox doesn't match.
2733
2734         * loader/appcache/ManifestParser.cpp:
2735         (WebCore::parseManifest):
2736         * loader/appcache/ManifestParser.h:
2737         * loader/appcache/ApplicationCache.h:
2738         (WebCore::ApplicationCache::onlineWhitelist):
2739         * loader/appcache/ApplicationCacheStorage.cpp:
2740         (WebCore::ApplicationCacheStorage::store):
2741         (WebCore::ApplicationCacheStorage::loadCache):
2742         Changed online whitelist to be a vector of URLs, which is better suited for the new algorithm.
2743
2744 2009-01-02  Darin Adler  <darin@apple.com>
2745
2746         Reviewed by Oliver Hunt.
2747
2748         Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears inside its web view when resizing its window
2749         https://bugs.webkit.org/show_bug.cgi?id=23072
2750         rdar://problem/6368028
2751
2752         * WebCore.base.exp: Updated.
2753         * WebCore.xcodeproj/project.pbxproj: Mark HTMLHeadElement.h Private so it can be used in WebKit.
2754
2755         * dom/Document.cpp:
2756         (WebCore::Document::Document): Initialize m_frameElementsShouldIgnoreScrolling to false.
2757         * dom/Document.h: Added setFrameElementsShouldIgnoreScrolling, frameElementsShouldIgnoreScrolling,
2758         and m_frameElementsShouldIgnoreScrolling.
2759
2760         * html/HTMLFrameElementBase.cpp:
2761         (WebCore::HTMLFrameElementBase::parseMappedAttribute): Don't allow changes to the scrolling attribute
2762         to affect the scrolling mode if frameElementsShouldIgnoreScrolling() returns true. This is only
2763         triggered on Mac OS X when running the Dictionary application.
2764
2765 2009-01-02  Alexey Proskuryakov  <ap@webkit.org>
2766
2767         Reviewed by Darin Adler.
2768
2769         https://bugs.webkit.org/show_bug.cgi?id=23036
2770         <rdar://problem/6451666> Implement AppCache fallback entries (23036)
2771
2772         Test: http/tests/appcache/fallback.html
2773
2774         * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadResourceSynchronously): Use fallback
2775         entries if normal loading fails.
2776
2777         * loader/DocumentLoader.cpp:
2778         (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache): Do not prevent normal
2779         loading for resources that match fallback namespaces - they are only loaded from the cache
2780         if that fails.
2781         (WebCore::DocumentLoader::getApplicationCacheFallbackResource): Get a fallback entry for
2782         resource from associated appcache, or from passed in one, if any.
2783         (WebCore::DocumentLoader::scheduleLoadFallbackResourceFromApplicationCache): If a fallback
2784         entry for resourse exists, add it to pending substitute loads.
2785
2786         * loader/DocumentLoader.h: Added new functions for loading fallback data for resources.
2787
2788         * loader/ResourceLoader.h:
2789         * loader/ResourceLoader.cpp:
2790         (WebCore::ResourceLoader::scheduleLoadFallbackResourceFromApplicationCache): This function
2791         is called when normal loading fails (which includes network failures, 4xx and 5xx responses,
2792         and cross-origin redirects) to load appcache fallback data instead. It can use either the
2793         cache that is associated with the browsing context, or a custom one if association is yet
2794         to take place.
2795         (WebCore::ResourceLoader::willSendRequest): Try using fallback data.
2796         (WebCore::ResourceLoader::didReceiveResponse): Ditto.
2797         (WebCore::ResourceLoader::didFail): Ditto.
2798
2799         * loader/MainResourceLoader.cpp:
2800         (WebCore::MainResourceLoader::didReceiveResponse): Locate an appropriate cache and load
2801         fallback data from it if loading fails. The browsing context may still be associated with
2802         its previous document here, so the cache to load from must be passed explicitly.
2803         (WebCore::MainResourceLoader::didFail): Ditto.
2804         (WebCore::MainResourceLoader::load): Remove unnecessary check and FIXME.
2805
2806         * loader/appcache/ApplicationCache.cpp:
2807         (WebCore::ApplicationCache::setFallbackURLs):
2808         (WebCore::ApplicationCache::urlMatchesFallbackNamespace):
2809         * loader/appcache/ApplicationCache.h:
2810         (WebCore::ApplicationCache::fallbackURLs):
2811         * loader/appcache/ApplicationCacheStorage.cpp:
2812         (WebCore::ApplicationCacheStorage::cacheGroupForURL):
2813         (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
2814         (WebCore::ApplicationCacheStorage::store):
2815         (WebCore::ApplicationCacheStorage::loadCache):
2816         (WebCore::ApplicationCacheStorage::storeCopyOfCache):
2817         * loader/appcache/ApplicationCacheStorage.h:
2818         * loader/appcache/ApplicationCacheGroup.cpp:
2819         (WebCore::ApplicationCacheGroup::fallbackCacheForMainRequest):
2820         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
2821         * loader/appcache/ApplicationCacheGroup.h:
2822         Implement fallback map saving and loading, pass it to the cache.
2823
2824         * loader/appcache/ManifestParser.h: Use a correct data structure for fallback map - keys
2825         are matched by prefix, so HAshMap cannot be used.
2826
2827         * loader/appcache/ManifestParser.cpp: (WebCore::parseManifest): Fix bugs in fallback section
2828         parsing.
2829
2830 2009-01-01  Oliver Hunt  <oliver@apple.com>
2831
2832         Reviewed by Dan Bernstein.
2833
2834         <rdar://problem/6450530> WebCore::FontPlatformData should not leak
2835
2836         Whoops, previous patch should also have fixed the font referencing in
2837         the constructor.
2838
2839         * WebCore.xcodeproj/project.pbxproj:
2840         * platform/graphics/mac/FontPlatformDataMac.mm:
2841         (WebCore::FontPlatformData::FontPlatformData):
2842
2843 2009-01-01  Oliver Hunt  <oliver@apple.com>
2844
2845         Reviewed by Dan Bernstein.
2846
2847         <rdar://problem/6450530> WebCore::FontPlatformData should not leak
2848
2849         Make sure we only adopt the new font, rather than re-referencing (and so leaking).
2850
2851         * platform/graphics/mac/FontPlatformDataMac.mm:
2852         (WebCore::FontPlatformData::setFont):
2853
2854 2009-01-01  Darin Adler  <darin@apple.com>
2855
2856         Reviewed by Dan Bernstein.
2857
2858         Bug 23071: REGRESSION (r39536): New test failures after committing patch in bug 23051 (ICU search)
2859         https://bugs.webkit.org/show_bug.cgi?id=23071
2860
2861         Also fix some things that Dan suggested during review of the ICU search patch that I forgot
2862         the first time around.
2863
2864         * editing/TextIterator.cpp: Use ICU search on all platforms that use ICU, now that
2865         we've double checked it works everywhere, removing HAVE_ICU_SEARCH entirely.
2866         Removed unused m_atBreak data member from the non-ICU code path.
2867         (WebCore::TextIterator::TextIterator): Move null check up.
2868         (WebCore::TextIterator::handleTextBox): Fix mistake that made the iterator include
2869         collapsed whitespace. This was left over from an earlier version of the patch.
2870         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
2871         Move null check up.
2872
2873 2009-01-01  Simon Fraser  <simon.fraser@apple.com>
2874
2875         Reviewed by Darin Adler, Oliver Hunt
2876
2877         https://bugs.webkit.org/show_bug.cgi?id=23065
2878         
2879         Enable incremental painting of canvas. This turns incremental painting
2880         back on, and fixes issues with stroke width and miters, calling willDraw()
2881         for strokeText and fillText, and taking shadows into account.
2882         
2883         Test: fast/canvas/canvas-incremental-repaint.html
2884
2885         * html/CanvasRenderingContext2D.cpp:
2886         (WebCore::CanvasStrokeStyleApplier::CanvasStrokeStyleApplier):
2887         (WebCore::CanvasStrokeStyleApplier::strokeStyle):
2888         (WebCore::CanvasRenderingContext2D::stroke):
2889         (WebCore::CanvasRenderingContext2D::willDraw):
2890         (WebCore::CanvasRenderingContext2D::putImageData):
2891         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2892         * html/CanvasRenderingContext2D.h:
2893         * html/HTMLCanvasElement.cpp:
2894         (WebCore::HTMLCanvasElement::willDraw):
2895         * platform/graphics/FloatRect.h:
2896         (WebCore::mapRect): new method to map a rect contained
2897         in one rect to an equivalent rect inside another rect.
2898
2899 2008-12-29  Konstantin Käfer  <kkaefer@gmail.com>
2900
2901         Reviewed by Tim Hatcher.
2902
2903         Fix for https://bugs.webkit.org/show_bug.cgi?id=17229
2904         <rdar://problem/5732829> Inspector should show properties of all JS objects in Console
2905
2906         Prints objects not as plain text but makes them expandable so that
2907         they can be inspected.
2908
2909         * inspector/front-end/Console.js:
2910         (): added a parameter "inline" to the WebInspector.Console._format function which indicates
2911             whether the object is printed in the context of another string (with console.log()) or
2912             as sole element.
2913         (.): objects and DOM nodes are now printed in an expandable form when they are printed alone
2914             (i.e. not in the context of a console.log() string) so that they can be inspected.
2915         * inspector/front-end/PropertiesSection.js:
2916         (WebInspector.PropertiesSection.prototype.set title): Allow DOM Nodes as title instead of strings
2917             in that case, the Node is inserted into the title instead of the string value of the passed
2918             object. This is used for displaying linkified titles, for example when inspecting DOM nodes,
2919             the syntax highlighted HTML representation is shown instead of the plain source code.
2920         * inspector/front-end/inspector.css: correct the offsetParent for the expandable object inspector.
2921
2922 2009-01-01  Darin Adler  <darin@apple.com>
2923
2924         Reviewed by Dan Bernstein.
2925
2926         Bug 23051: web page searching should use ICU's search so it can ignore diacritical differences
2927         https://bugs.webkit.org/show_bug.cgi?id=23051
2928         rdar://problem/3574497
2929
2930         Test: editing/execCommand/findString-diacriticals.html
2931
2932         * editing/TextIterator.cpp: Changed the CircularSearchBuffer class to have a new
2933         name, since it doesn't always use a circular buffer any more. Changed the interface
2934         so it can work well in the new chunky comparison mode for ICU search, and also
2935         added private data members for both the ICU-search and non-ICU-search code paths.
2936         (WebCore::TextIterator::TextIterator): Use the versions of the Range functions
2937         that don't take an exception code.
2938         (WebCore::TextIterator::handleTextBox): Added a special case to handle the position
2939         of a collapsed-away space better. This is not needed for search mechanism, but was
2940         helpful in an earlier version of this patch, and is still an improvement.
2941         (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): Use the
2942         versions of the Range functions that don't take an exception code.
2943         (WebCore::CharacterIterator::range): Ditto.
2944         (WebCore::characterSubrange): Added. Helper function used in both places below where
2945         we want to convert a range and character offsets into a subrange.
2946         (WebCore::WordAwareIterator::advance): Use the versions of the Range functions that
2947         don't take an exception code.
2948         (WebCore::createSearcher): Added.
2949         (WebCore::searcher): Added.
2950         (WebCore::lockSearcher): Added.
2951         (WebCore::unlockSearcher): Added.
2952         (WebCore::SearchBuffer::SearchBuffer): Added.
2953         (WebCore::SearchBuffer::~SearchBuffer): Added.
2954         (WebCore::SearchBuffer::append): Added.
2955         (WebCore::SearchBuffer::atBreak): Added.
2956         (WebCore::SearchBuffer::reachedBreak): Added.
2957         (WebCore::SearchBuffer::search): Added.
2958         (WebCore::SearchBuffer::length): Added.
2959         (WebCore::TextIterator::subrange): Changed to call the characterSubrange
2960         function above.
2961         (WebCore::TextIterator::rangeFromLocationAndLength): Use the versions of the
2962         Range functions that don't take an exception code. Also tweak some other details
2963         of the code.
2964         (WebCore::isAllCollapsibleWhitespace): Added.
2965         (WebCore::collapsedToBoundary): Added.
2966         (WebCore::findPlainText): Rewrote to use new interface and streamline the
2967         logic a bit.
2968
2969         Add the relevant files in the icu directory. As icu/README says, the "icu"
2970         directory is really just for Mac OS X, where we have the ICU library but not
2971         the headers installed. It should be moved inside platform/mac at some point
2972         to make this more clear (and the copy in JavaScriptCore should be moved
2973         somewhere similar for the same reason).
2974
2975         * icu/unicode/ucoleitr.h: Added.
2976         * icu/unicode/usearch.h: Added.
2977
2978 2009-01-01  Oliver Hunt  <oliver@apple.com>
2979
2980         Reviewed by Cameron Zwarich.
2981
2982         CrashTracer: [REGRESSION] 1090 crashes in Safari at com.apple.JavaScriptCore: KJS::JSGlobalObject::stopTimeoutCheck + 0
2983         <rdar://problem/5821130>
2984
2985         This was caused by a plugin instance calling into JS code that removed the plugin
2986         object.  This fix is to cache the global object locally in a ProtectedPtr so we don't
2987         need to rely on the continued existence of the plugin instance.
2988
2989         * bridge/NP_jsobject.cpp:
2990         (_NPN_InvokeDefault):
2991         (_NPN_Invoke):
2992         (_NPN_Evaluate):
2993         (_NPN_Construct):
2994
2995 2008-12-31  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2996
2997         Reviewed by Holger Freyther.
2998
2999         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22964
3000
3001         MinGW build failure.
3002
3003         * platform/graphics/qt/SimpleFontDataQt.cpp:
3004         (WebCore::SimpleFontData::containsCharacters):
3005
3006 2008-12-31  Alexander V. Butenko  <alex@digiqube.com>
3007
3008         Reviewed by Holger Freyther.
3009
3010         https://bugs.webkit.org/show_bug.cgi?id=22750
3011         [gtk] webkit up to r39121 crash on image urls like
3012         http:///sitename.com
3013
3014         * platform/network/soup/ResourceHandleSoup.cpp:
3015         (WebCore::ResourceHandle::start):
3016
3017 2008-12-31  Hiroyuki Ikezoe  <poincare@ikezoe.net>
3018
3019         Reviewed by Holger Freyther.
3020
3021         https://bugs.webkit.org/show_bug.cgi?id=18310
3022
3023         * platform/graphics/gtk/SimpleFontDataPango.cpp:
3024         (WebCore::SimpleFontData::determinePitch): Do not invoke
3025         isFixedPitch() when the font is a custom font.
3026
3027 2008-12-31  Oliver Hunt  <oliver@apple.com>
3028
3029         Reviewed by Cameron Zwarich.
3030
3031         More work on Bug 3781: Animation via canvas could be faster
3032         <https://bugs.webkit.org/show_bug.cgi?id=3781>
3033
3034         Make use of the fast path parsing of color strings that Color
3035         uses.  This improves performance of '#rgb', '#rrggbb', etc and
3036         named (eg. 'green') colors.
3037
3038         Improves frame rate of test by around 40%
3039
3040         * html/CanvasStyle.cpp:
3041         (WebCore::CanvasStyle::applyStrokeColor):
3042         (WebCore::CanvasStyle::applyFillColor):
3043
3044 2008-12-30  Simon Fraser  <simon.fraser@apple.com>
3045
3046         Reviewed by Darin Adler
3047
3048         https://bugs.webkit.org/show_bug.cgi?id=23042
3049         
3050         Rather than doing a repaint() inside of computeAbsoluteRepaintRect()
3051         when there is a reflection, compute the location of the rect inside
3052         the reflection and take the union of the unreflected and reflected rects.
3053         
3054         Test: fast/repaint/reflection-redraw.html
3055
3056         * rendering/RenderBox.cpp:
3057         (WebCore::RenderBox::computeAbsoluteRepaintRect):
3058         * rendering/RenderObject.cpp:
3059         (WebCore::RenderObject::reflectedRect):
3060         * rendering/RenderObject.h:
3061
3062 2008-12-30  Dan Bernstein  <mitz@apple.com>
3063
3064         Reviewed by Adele Peterson.
3065
3066         - fix <rdar://problem/6469944> REGRESSION(3.2.1-ToT): Repro crash in WebCore::HTMLInputElement::updatePlaceholderVisibility opening http://billshrink.com
3067
3068         Test: fast/forms/placeholder-non-textfield.html
3069
3070         * html/HTMLInputElement.cpp:
3071         (WebCore::HTMLInputElement::parseMappedAttribute): Only call
3072         updatePlaceholderVisibility() when the placeholder attribute changes if
3073         the element is a text field.
3074
3075 2008-12-30  Oliver Hunt  <oliver@apple.com>
3076
3077         Reviewed by Antti Koivisto.
3078
3079         First step of Bug 3781: Animation via canvas could be faster
3080
3081         Amortise the cost of calling repaint by coalescing repaint rects
3082         while the canvas is drawn to.  In a later step we'll stop calling
3083         repaint() directly, and instead have all dirty canvases repaint
3084         at the end of JS execution.
3085
3086         * html/HTMLCanvasElement.cpp:
3087         (WebCore::HTMLCanvasElement::willDraw):
3088         (WebCore::HTMLCanvasElement::paint):
3089         * html/HTMLCanvasElement.h:
3090
3091 2008-12-30  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
3092
3093         Reviewed by Antti Koivisto.
3094
3095         Bug 22931: Using the inspector with purgeable resources leads to assertion failures
3096         <https://bugs.webkit.org/show_bug.cgi?id=22931>
3097
3098         Change InspectorResource::sourceString() so that it doesn't attempt to
3099         unsafely get the data of a purgeable CachedResource.
3100
3101         * inspector/InspectorController.cpp:
3102         (WebCore::InspectorResource::sourceString): Attempt to make a purgeable
3103         resource unpurgeable, and if this not possible, return an empty string.
3104         * loader/CachedResource.h: Make InspectorResource a friend of CachedResource.
3105
3106 2008-12-29  Alexey Proskuryakov  <ap@webkit.org>
3107
3108         Reviewed by Sam Weinig.
3109
3110         https://bugs.webkit.org/show_bug.cgi?id=23023
3111         Remove incomplete support for opportunistic appcache entries
3112
3113         No change in behavior, thus no test.
3114
3115         * loader/appcache/ApplicationCacheResource.h:
3116         (WebCore::ApplicationCacheResource::Type): Removed Opportunistic bit, will re-use when schema
3117         version changes.
3118
3119         * loader/DocumentLoader.cpp:
3120         (WebCore::DocumentLoader::scheduleApplicationCacheLoad):
3121         * loader/appcache/ApplicationCacheGroup.cpp:
3122         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
3123         * loader/appcache/ApplicationCacheResource.cpp:
3124         (WebCore::ApplicationCacheResource::dumpType):
3125
3126 2008-12-29  Dirk Schulze  <krit@webkit.org>
3127
3128         Reviewed by Oliver Hunt.
3129
3130         Add arcTo support for Cairo. This is needed by Canvas.
3131         Cairo has no native support for arcTo. We have to make our
3132         own implementation.
3133
3134         [Canvas] Cairo needs arcTo
3135         https://bugs.webkit.org/show_bug.cgi?id=23003
3136
3137         * platform/graphics/cairo/PathCairo.cpp:
3138         (WebCore::Path::addArcTo):
3139
3140 2008-12-29  Oliver Hunt  <oliver@apple.com>
3141
3142         Reviewed by Cameron Zwarich.
3143
3144         Bug 23030: Cannot setTransform with a non-invertible ctm
3145
3146         Removed a series of unnecessary and incorrect checks for an invertible
3147         transform.
3148
3149         Test: fast/canvas/canvas-set-properties-with-non-invertible-ctm.html
3150
3151         * html/CanvasRenderingContext2D.cpp:
3152         (WebCore::CanvasRenderingContext2D::setStrokeStyle):
3153         (WebCore::CanvasRenderingContext2D::setFillStyle):
3154             These properties are not effected by the current CTM, so there
3155             is no need to prevent them from being assigned.
3156
3157         (WebCore::CanvasRenderingContext2D::setTransform):
3158             The whole point of tracking whether the current CTM was expected to be
3159             non-invertible was to allow setTransform to be used when the CTM had become
3160             non-invertible.
3161
3162         (WebCore::CanvasRenderingContext2D::beginPath):
3163         (WebCore::CanvasRenderingContext2D::closePath):
3164             beginPath and closePath change the state of the path, but not any of
3165             its coordinates so there is no need prevent them from being called.
3166
3167 2008-12-29  Josh Roesslein  <jroesslein@gmail.com>
3168
3169         Reviewed by Oliver Hunt.
3170
3171         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22968
3172
3173         Context menu rendering error when full page zoomed
3174
3175         * page/ContextMenuController.cpp:
3176         (WebCore::ContextMenuController::handleContextMenuEvent):
3177
3178 2008-12-29  Sam Weinig  <sam@webkit.org>
3179
3180         Reviewed by Mark Rowe.
3181
3182         Add some basic memory statistic logging for Node.
3183
3184         * dom/Node.cpp:
3185         (WebCore::Node::dumpStatistics):
3186         (WebCore::Node::Node):
3187         (WebCore::Node::~Node):
3188         (WebCore::Node::setDocument):
3189         * dom/Node.h:
3190
3191 2008-12-29  Sam Weinig  <sam@webkit.org>
3192
3193         Reviewed by Anders Carlsson.
3194
3195         Remove one use of DeprecatedPtrList.
3196
3197         * css/CSSRuleList.cpp:
3198         (WebCore::CSSRuleList::~CSSRuleList):
3199         (WebCore::CSSRuleList::length):
3200         (WebCore::CSSRuleList::item):
3201         (WebCore::CSSRuleList::deleteRule):
3202         (WebCore::CSSRuleList::append):
3203         (WebCore::CSSRuleList::insertRule):
3204         * css/CSSRuleList.h: Change m_lstCSSRules from using DeprecatedPtrList to a Vector.
3205         I measured no performance change and was comforted by the fact that we use a Vector
3206         for StyleList, which serves the exact same purpose.
3207
3208 2008-12-29  Adele Peterson  <adele@apple.com>
3209
3210         Reviewed by Brady Eidson.
3211
3212         Fix for https://bugs.webkit.org/show_bug.cgi?id=21797
3213         <rdar://problem/6310682> REGRESSION: Crash in CFHTTPCookieStorageCopy beneath WebCore::cookies() when 
3214         running fast/dom/document-attribute-js-null.html and http/tests/security/cookies/create-document.html
3215         
3216         Return early if the document is trying to get or set a cookie with an empty cookie url.
3217
3218         * dom/Document.cpp:
3219         (WebCore::Document::cookie):
3220         (WebCore::Document::setCookie):
3221
3222 2008-12-28  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
3223
3224         Reviewed by Sam Weinig.
3225
3226         Bug 23016: JavaScriptDebugServer::recompileAllJSFunctions() should not execute JS while reparsing all functions
3227         <https://bugs.webkit.org/show_bug.cgi?id=23016>
3228         <rdar://problem/6425077>
3229
3230         JavaScriptDebugServer::recompileAllJSFunctions() calls sourceParsed() while
3231         reparsing all JS functions, which will execute JS in the inspector. Depending
3232         on the order in which functions are recompiled, a function could have a new
3233         body but other functions that have not been recompiled could have an optimized
3234         (in the sense of inline caching) call to it, bypassing the check of whether or
3235         not there is generated bytecode. This leads to a crash caused by accessing
3236         indices off of a null pointer.
3237
3238         To fix the problem, simply delay calling sourceParsed() until after all functions
3239         have been reparsed. The crash isn't 100% reproducible, but on the one test case
3240         I have, this makes it impossible to reproduce after a large number of attempts,
3241         when it used to happen every few attempts.
3242
3243         * inspector/JavaScriptDebugServer.cpp:
3244         (WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
3245
3246 2008-12-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3247
3248         Rubber-stamped by Antti Koivisto.
3249         Oops, remove some last minute ASSERTS that are obviously wrong.
3250
3251         * rendering/RenderTextControlMultiLine.cpp:
3252         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
3253         * rendering/RenderTextControlSingleLine.cpp:
3254         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
3255
3256 2008-12-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3257
3258         Reviewed by Antti Koivisto.
3259
3260         Fixes: https://bugs.webkit.org/show_bug.cgi?id=23015
3261
3262         Don't rely on HTMLFormControlElement in RenderTextControl.
3263
3264         Introduce an abstract FormControlElement class, containing the
3265         valueMatchesRenderer/setValueMatchesRenderer, the only HTMLFormControlElement
3266         specific methods that RenderTextControl relies on.
3267
3268         This makes it possible for WML to reuse RenderTextControl.
3269         RenderTextControlSingleLine still relies on HTMLInputElement,
3270         this will change if WMLInputElement is introduced.
3271
3272         * GNUmakefile.am:
3273         * WebCore.vcproj/WebCore.vcproj:
3274         * WebCore.xcodeproj/project.pbxproj:
3275         * dom/FormControlElement.h: Added.
3276         (WebCore::FormControlElement::~FormControlElement):
3277         (WebCore::FormControlElement::FormControlElement):
3278         * html/HTMLFormControlElement.h:
3279         (WebCore::HTMLFormControlElement::valueMatchesRenderer):
3280         (WebCore::HTMLFormControlElement::setValueMatchesRenderer):
3281         * html/HTMLTextAreaElement.cpp:
3282         (WebCore::HTMLTextAreaElement::updateValue):
3283         * rendering/RenderTextControl.cpp:
3284         (WebCore::RenderTextControl::adjustInnerTextStyle):
3285         (WebCore::RenderTextControl::updateFromElement):
3286         (WebCore::RenderTextControl::setInnerTextValue):
3287         (WebCore::RenderTextControl::selectionChanged):
3288         (WebCore::RenderTextControl::formControlElement):
3289         * rendering/RenderTextControl.h:
3290         * rendering/RenderTextControlMultiLine.cpp:
3291         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
3292         (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
3293         * rendering/RenderTextControlSingleLine.cpp:
3294         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
3295         (WebCore::RenderTextControlSingleLine::updateFromElement):
3296
3297 2008-12-28  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
3298
3299         Reviewed by Darin Adler.
3300
3301         Bug 23006: Many Loader::Host member functions are not safe to use reentrantly
3302         <https://bugs.webkit.org/show_bug.cgi?id=23006>
3303         <rdar://problem/6216106>
3304
3305         Many Loader::Host member functions set m_processingResource to true when they
3306         begin processing a resource and set it to false when they are done. Thanks to
3307         JavaScript and the web inspector, almost anything can happen during the
3308         processing of a resource, including these functions being called reentrantly,
3309         which is unsafe due to this way of using m_processingResource.
3310
3311         This can theoretically cause a Loader::Host to be used after it is freed,
3312         because when Loader::servedPendingRequests() is called, it will free Hosts
3313         that have m_processingResource set to false.
3314
3315         To fix this, we replace m_processingResource with m_numResourcesProcessing,
3316         which is incremented and decremented using a helper object, ProcessingResource.
3317
3318         There are no occurrences of crashes caused by this bug that are reproducible
3319         by multiple people, but this fixes the problem of m_processingResource being
3320         set to false while a Host is still alive.
3321
3322         * loader/loader.cpp:
3323         (WebCore::Loader::Host::Host):
3324         (WebCore::Loader::Host::didFinishLoading): Change to use ProcessingResource
3325         instead of manually setting m_processingResource.
3326         (WebCore::Loader::Host::didFail): Ditto.
3327         (WebCore::Loader::Host::didReceiveData): Ditto.
3328         * loader/loader.h:
3329         (WebCore::Loader::Host::ProcessingResource::ProcessingResource): Added.
3330         (WebCore::Loader::Host::ProcessingResource::~ProcessingResource): Added.
3331         (WebCore::Loader::Host::processingResource): Change to use m_numResourcesProcessing
3332         instead of just getting m_processingResource.
3333
3334 2008-12-28  Alexey Proskuryakov  <ap@webkit.org>
3335
3336         Reviewed by Darin Adler.
3337
3338         https://bugs.webkit.org/show_bug.cgi?id=23007
3339         REGRESSION: Timer-related crash when closing Web Inspector
3340
3341         Test: fast/dom/Window/remove-timeout-crash.html
3342
3343         * bindings/js/DOMTimer.cpp: (WebCore::DOMTimer::fired): Besides deleting the timer, make
3344         sure to remove it from a Document map.
3345
3346 2008-12-28  Alexey Proskuryakov  <ap@webkit.org>
3347
3348         Reviewed by Anders Carlsson.
3349
3350         https://bugs.webkit.org/show_bug.cgi?id=23012
3351         Bring application cache manifest parsing up to date
3352
3353         Test: http/tests/appcache/manifest-parsing.html
3354
3355         * loader/appcache/ManifestParser.cpp:
3356         (WebCore::Mode): Added a constant for unknown sections, which are ignored when parsing. This
3357         is necessary for future extensions.
3358         (WebCore::parseManifest): Parse unknown sections correctly. Ignore trailing tokens in
3359         supported sections.
3360
3361 2008-12-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3362
3363         Reviewed by Darin Adler.
3364
3365         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22996
3366
3367         RenderTextControl heavily depends on HTMLInputElement & HTMLTextAreaElement.
3368         It handles multi & single line text control rendering in one class. Split up
3369         in two new classes: RenderTextControlSingleLine & RenderTextControlMultiLine.
3370
3371         This has several benefits - code is more readable now, the memory usage
3372         for RenderTextControlMultiLine is reduced, as all stuff related to search fields
3373         lives in RenderTextControlSingleLine, and it's easier to introduce an
3374         abstraction for input/textarea-like elements for other HTML flavours like WML.
3375
3376         * GNUmakefile.am:
3377         * WebCore.order:
3378         * WebCore.pro:
3379         * WebCore.scons:
3380         * WebCore.vcproj/WebCore.vcproj:
3381         * WebCore.xcodeproj/project.pbxproj:
3382         * WebCoreSources.bkl:
3383         * html/HTMLInputElement.cpp:
3384         (WebCore::HTMLInputElement::createRenderer):
3385         (WebCore::HTMLInputElement::defaultEventHandler):
3386         (WebCore::HTMLInputElement::updatePlaceholderVisibility):
3387         (WebCore::HTMLInputElement::addSearchResult):
3388         (WebCore::HTMLInputElement::onSearch):
3389         * html/HTMLTextAreaElement.cpp:
3390         (WebCore::HTMLTextAreaElement::createRenderer):
3391         (WebCore::HTMLTextAreaElement::defaultEventHandler):
3392         * rendering/RenderTextControl.cpp:
3393         (WebCore::RenderTextControl::RenderTextControl):
3394         (WebCore::RenderTextControl::~RenderTextControl):
3395         (WebCore::RenderTextControl::styleDidChange):
3396         (WebCore::RenderTextControl::adjustInnerTextStyle):
3397         (WebCore::RenderTextControl::createSubtreeIfNeeded):
3398         (WebCore::RenderTextControl::textBlockHeight):
3399         (WebCore::RenderTextControl::textBlockWidth):
3400         (WebCore::RenderTextControl::updateFromElement):
3401         (WebCore::RenderTextControl::setInnerTextValue):
3402         (WebCore::RenderTextControl::setSelectionRange):
3403         (WebCore::RenderTextControl::visiblePositionForIndex):
3404         (WebCore::RenderTextControl::indexForVisiblePosition):
3405         (WebCore::RenderTextControl::subtreeHasChanged):
3406         (WebCore::RenderTextControl::scrollbarThickness):
3407         (WebCore::RenderTextControl::calcHeight):
3408         (WebCore::RenderTextControl::hitInnerTextBlock):
3409         (WebCore::RenderTextControl::forwardEvent):
3410         (WebCore::RenderTextControl::calcPrefWidths):
3411         (WebCore::RenderTextControl::selectionChanged):
3412         (WebCore::RenderTextControl::innerTextElement):
3413         * rendering/RenderTextControl.h:
3414         (WebCore::RenderTextControl::hasControlClip):
3415         (WebCore::RenderTextControl::canHaveChildren):
3416         (WebCore::RenderTextControl::avoidsFloats):
3417         (WebCore::RenderTextControl::isEdited):
3418         (WebCore::RenderTextControl::setEdited):
3419         * rendering/RenderTextControlMultiLine.cpp: Added.
3420         (WebCore::RenderTextControlMultiLine::RenderTextControlMultiLine):
3421         (WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
3422         (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
3423         (WebCore::RenderTextControlMultiLine::layout):
3424         (WebCore::RenderTextControlMultiLine::nodeAtPoint):
3425         (WebCore::RenderTextControlMultiLine::forwardEvent):
3426         (WebCore::RenderTextControlMultiLine::preferredContentWidth):
3427         (WebCore::RenderTextControlMultiLine::adjustControlHeightBasedOnLineHeight):
3428         (WebCore::RenderTextControlMultiLine::baselinePosition):
3429         (WebCore::RenderTextControlMultiLine::updateFromElement):
3430         (WebCore::RenderTextControlMultiLine::cacheSelection):
3431         (WebCore::RenderTextControlMultiLine::createInnerTextStyle):
3432         * rendering/RenderTextControlMultiLine.h: Added.
3433         (WebCore::RenderTextControlMultiLine::isTextArea):
3434         * rendering/RenderTextControlSingleLine.cpp: Added.
3435         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
3436         (WebCore::RenderTextControlSingleLine::~RenderTextControlSingleLine):
3437         (WebCore::RenderTextControlSingleLine::placeholderShouldBeVisible):
3438         (WebCore::RenderTextControlSingleLine::updatePlaceholderVisibility):
3439         (WebCore::RenderTextControlSingleLine::addSearchResult):
3440         (WebCore::RenderTextControlSingleLine::stopSearchEventTimer):
3441         (WebCore::RenderTextControlSingleLine::showPopup):
3442         (WebCore::RenderTextControlSingleLine::hidePopup):
3443         (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
3444         (WebCore::RenderTextControlSingleLine::paint):
3445         (WebCore::RenderTextControlSingleLine::layout):
3446         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
3447         (WebCore::RenderTextControlSingleLine::forwardEvent):
3448         (WebCore::RenderTextControlSingleLine::styleDidChange):
3449         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
3450         (WebCore::RenderTextControlSingleLine::textBlockWidth):
3451         (WebCore::RenderTextControlSingleLine::preferredContentWidth):
3452         (WebCore::RenderTextControlSingleLine::adjustControlHeightBasedOnLineHeight):
3453         (WebCore::RenderTextControlSingleLine::createSubtreeIfNeeded):
3454         (WebCore::RenderTextControlSingleLine::updateFromElement):
3455         (WebCore::RenderTextControlSingleLine::cacheSelection):
3456         (WebCore::RenderTextControlSingleLine::createInnerTextStyle):
3457         (WebCore::RenderTextControlSingleLine::createInnerBlockStyle):
3458         (WebCore::RenderTextControlSingleLine::createResultsButtonStyle):
3459         (WebCore::RenderTextControlSingleLine::createCancelButtonStyle):
3460         (WebCore::RenderTextControlSingleLine::updateCancelButtonVisibility):
3461         (WebCore::RenderTextControlSingleLine::autosaveName):
3462         (WebCore::RenderTextControlSingleLine::startSearchEventTimer):
3463         (WebCore::RenderTextControlSingleLine::searchEventTimerFired):
3464         (WebCore::RenderTextControlSingleLine::valueChanged):
3465         (WebCore::RenderTextControlSingleLine::itemText):
3466         (WebCore::RenderTextControlSingleLine::itemIsEnabled):
3467         (WebCore::RenderTextControlSingleLine::itemStyle):
3468         (WebCore::RenderTextControlSingleLine::menuStyle):
3469         (WebCore::RenderTextControlSingleLine::clientInsetLeft):
3470         (WebCore::RenderTextControlSingleLine::clientInsetRight):
3471         (WebCore::RenderTextControlSingleLine::clientPaddingLeft):
3472         (WebCore::RenderTextControlSingleLine::clientPaddingRight):
3473         (WebCore::RenderTextControlSingleLine::listSize):
3474         (WebCore::RenderTextControlSingleLine::selectedIndex):
3475         (WebCore::RenderTextControlSingleLine::itemIsSeparator):
3476         (WebCore::RenderTextControlSingleLine::itemIsLabel):
3477         (WebCore::RenderTextControlSingleLine::itemIsSelected):
3478         (WebCore::RenderTextControlSingleLine::setTextFromItem):
3479         (WebCore::RenderTextControlSingleLine::fontSelector):
3480         (WebCore::RenderTextControlSingleLine::hostWindow):
3481         (WebCore::RenderTextControlSingleLine::createScrollbar):
3482         * rendering/RenderTextControlSingleLine.h: Added.
3483         (WebCore::RenderTextControlSingleLine::hasControlClip):
3484         (WebCore::RenderTextControlSingleLine::isTextField):
3485         (WebCore::RenderTextControlSingleLine::placeholderIsVisible):
3486         (WebCore::RenderTextControlSingleLine::popupIsVisible):
3487         (WebCore::RenderTextControlSingleLine::shouldPopOver):
3488         (WebCore::RenderTextControlSingleLine::valueShouldChangeOnHotTrack):
3489         * rendering/TextControlInnerElements.cpp:
3490         (WebCore::RenderTextControlInnerBlock::nodeAtPoint):
3491         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
3492
3493 2008-12-28  Dmitry Titov  <dimich@chromium.org>
3494
3495         Reviewed by Darin Adler.
3496
3497         https://bugs.webkit.org/show_bug.cgi?id=22755
3498         Prepare to add create/remove timeout methods to JSWorkerContext by moving
3499         timer-specific code from JSDOMWindowBase to DOMTimer.
3500         Moved everything JS-related from DOMTimer to ScheduledAction.
3501         Now ScheduledAction is what it wanted to be all the time: a JS engine-specific 
3502         container for timer callback that knows how to invoke it.
3503         DOMTimer is not anymore JS-specific.
3504
3505         This is mostly moving the code around. No intended functional changes.
3506
3507         * bindings/js/DOMTimer.cpp:
3508         (WebCore::DOMTimer::DOMTimer):
3509         (WebCore::DOMTimer::~DOMTimer):
3510         (WebCore::DOMTimer::install):
3511         (WebCore::DOMTimer::removeById):
3512         (WebCore::DOMTimer::fired):
3513         (WebCore::DOMTimer::stop):
3514         * bindings/js/DOMTimer.h:
3515         * bindings/js/JSDOMWindowBase.cpp:
3516         (WebCore::JSDOMWindowBase::installTimeout):
3517         (WebCore::JSDOMWindowBase::removeTimeout):
3518         * bindings/js/JSDOMWindowBase.h:
3519         * bindings/js/ScheduledAction.cpp:
3520         (WebCore::ScheduledAction::execute):
3521         * bindings/js/ScheduledAction.h:
3522         * dom/Document.cpp:
3523         (WebCore::Document::addTimeout):
3524
3525 2008-12-26  Zalan Bujtas  <zbujtas@gmail.com>
3526
3527         Reviewed by Darin Adler.
3528
3529         https://bugs.webkit.org/show_bug.cgi?id=22999
3530         Check if database thread exists.
3531
3532         * storage/Database.cpp:
3533         (WebCore::Database::openAndVerifyVersion):
3534         (WebCore::Database::markAsDeletedAndClose):
3535         (WebCore::Database::tableNames):
3536
3537 2008-12-26  Alexey Proskuryakov  <ap@webkit.org>
3538
3539         Reviewed by Darin Adler.
3540
3541         https://bugs.webkit.org/show_bug.cgi?id=23001
3542         A call to applicationCache.update() from a cached event listener should be ignored
3543
3544         Test: http/tests/appcache/idempotent-update.html
3545
3546         * loader/appcache/ApplicationCacheGroup.cpp:
3547         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): Only reset m_status after
3548         dispatching events.
3549
3550 2008-12-26  Alexey Proskuryakov  <ap@webkit.org>
3551
3552         Reviewed by Darin Adler.
3553
3554         https://bugs.webkit.org/show_bug.cgi?id=22997
3555         ASSERTION FAILED: !m_resources.contains(url) in ApplicationCache::addResource()
3556
3557         Tests: http/tests/appcache/top-frame-1.html
3558                http/tests/appcache/top-frame-2.html
3559                http/tests/appcache/top-frame-3.html
3560                http/tests/appcache/top-frame-4.html
3561
3562         * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::cacheForMainRequest):
3563         Fixed one more instance of top level frame being used for caching purposes.
3564
3565 2008-12-26  Dmitry Titov  <dimich@chromium.org>
3566
3567         Reviewed by Darin Adler.
3568
3569         https://bugs.webkit.org/show_bug.cgi?id=22987
3570         Fix for broken test editing/execCommand/5763082.html
3571
3572         * editing/CompositeEditCommand.cpp:
3573         (WebCore::CompositeEditCommand::mergeIdenticalElements): Used local RefPtr to hold onto
3574         function parameter across multiple calls.
3575
3576 2008-12-25  Alexey Proskuryakov  <ap@webkit.org>
3577
3578         Reviewed by Darin Adler.
3579
3580         https://bugs.webkit.org/show_bug.cgi?id=22993
3581         Application cache shouldn't be inherited by subframes
3582
3583         <rdar://problem/6284708> AppCache crashes in ApplicationCacheResource::addType()
3584         This crash happened because main resource for subframe was looked up in top frame's
3585         appcache. If not for the spec change, it could have been fixed by preventing the load
3586         altogether.
3587
3588         Test: http/tests/appcache/foreign-iframe-main.html
3589         I intend to write additional tests for the behavior change.
3590
3591         * loader/DocumentLoader.cpp:
3592         (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache):
3593         * loader/DocumentLoader.h:
3594         (WebCore::DocumentLoader::applicationCache):
3595         * loader/MainResourceLoader.cpp:
3596         (WebCore::MainResourceLoader::load):
3597         * loader/appcache/DOMApplicationCache.cpp:
3598         (WebCore::DOMApplicationCache::associatedCache):
3599         Removed DocumentLoader::topLevelApplicationCache(), and changed callers accordingly.
3600
3601         * loader/appcache/ApplicationCacheGroup.cpp:
3602         (WebCore::ApplicationCacheGroup::selectCache):
3603         (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
3604         Removed checks for the frame being top-level one, now that subframes are cached independently.
3605
3606 2008-12-25  Antti Koivisto  <antti@apple.com>
3607
3608         Reviewed by Oliver Hunt.
3609
3610         <rdar://problem/6465669> Frequent !isPurgeable() assertion in WebCore::CachedResource::addClient
3611         
3612         Disallow turning resources that are being revalidated to purgable state.
3613         
3614         No test, the condition is difficult to produce in DRT.
3615
3616         * loader/CachedCSSStyleSheet.cpp:
3617         (WebCore::CachedCSSStyleSheet::allClientsRemoved):
3618         * loader/CachedImage.cpp:
3619         (WebCore::CachedImage::destroyDecodedData):
3620         * loader/CachedResource.cpp:
3621         (WebCore::CachedResource::isSafeToMakePurgeable):
3622         (WebCore::CachedResource::makePurgeable):
3623         * loader/CachedResource.h:
3624         * loader/CachedScript.cpp:
3625         (WebCore::CachedScript::destroyDecodedData):
3626
3627 2008-12-25  Alexey Proskuryakov  <ap@webkit.org>
3628
3629         Qt build fix.
3630
3631         * WebCore.pro: Added ThreadGlobalData.cpp.
3632
3633 2008-12-24  Mark Rowe  <mrowe@apple.com>
3634
3635         Build fix.
3636
3637         * WebCore.base.exp:  Remove a symbol from the export file now that it is no longer generated.
3638
3639 2008-12-24  Holger Hans Peter Freyther  <zecke@selfish.org>
3640
3641         Unreviewed build fix to find addSubresourceURL
3642
3643         This is needed to compile on WebKit/Gtk+
3644
3645         * css/CSSFontFaceSrcValue.cpp:
3646
3647 2008-12-23  Alexey Proskuryakov  <ap@webkit.org>
3648
3649         Reviewed by Darin Adler.
3650
3651         https://bugs.webkit.org/show_bug.cgi?id=22980
3652         WebCore uses more thread specific keys than it really needs
3653
3654         Consolidated ThreadSpecific data into a single ThreadGlobalData structure.
3655
3656         * GNUmakefile.am:
3657         * WebCore.base.exp:
3658         * WebCore.scons:
3659         * WebCore.vcproj/WebCore.vcproj:
3660         * WebCore.xcodeproj/project.pbxproj:
3661         * WebCoreSources.bkl:
3662         * dom/EventNames.cpp:
3663         * dom/EventNames.h:
3664         (WebCore::eventNames):
3665         * page/Frame.cpp:
3666         (WebCore::Frame::Frame):
3667         * platform/ThreadGlobalData.cpp: Added.
3668         (WebCore::threadGlobalData):
3669         (WebCore::ThreadGlobalData::ThreadGlobalData):
3670         (WebCore::ThreadGlobalData::~ThreadGlobalData):
3671         * platform/ThreadGlobalData.h: Added.
3672         (WebCore::ThreadGlobalData::eventNames):
3673         (WebCore::ThreadGlobalData::emptyString):
3674         (WebCore::ThreadGlobalData::atomicStringTable):
3675         (WebCore::ThreadGlobalData::cachedConverterICU):
3676         (WebCore::ThreadGlobalData::cachedConverterTEC):
3677         * platform/text/AtomicString.cpp:
3678         (WebCore::stringTable):
3679         (WebCore::AtomicString::add):
3680         (WebCore::AtomicString::remove):
3681         (WebCore::AtomicString::find):
3682         (WebCore::AtomicString::init):
3683         * platform/text/StringImpl.cpp:
3684         (WebCore::StringImpl::empty):
3685         * platform/text/StringImpl.h:
3686         * platform/text/TextCodecICU.cpp:
3687         (WebCore::ICUConverterWrapper::~ICUConverterWrapper):
3688         (WebCore::cachedConverterICU):
3689         * platform/text/TextCodecICU.h:
3690         (WebCore::ICUConverterWrapper::ICUConverterWrapper):
3691         * platform/text/mac/TextCodecMac.cpp:
3692         (WebCore::cachedConverterTEC):
3693         * platform/text/mac/TextCodecMac.h:
3694         (WebCore::TECConverterWrapper::TECConverterWrapper):
3695         (WebCore::TECConverterWrapper::~TECConverterWrapper):
3696
3697 2008-12-23  Mark Rowe  <mrowe@apple.com>
3698
3699         Build fix.
3700
3701         * WebCore.xcodeproj/project.pbxproj: CSSPropertyNames.h is a generated file so it needs to be explicitly copied
3702         into the PrivateHeaders directory, rather than relying on the automatic copying of headers which runs before the
3703         derived sources are generated.
3704
3705 2008-12-23  Simon Fraser  <simon.fraser@apple.com>
3706
3707         Reviewed by Dan Bernstein
3708
3709         https://bugs.webkit.org/show_bug.cgi?id=22941
3710         
3711         If the document element has opacity, we need to erase the view background to
3712         white before painting.
3713         
3714         Test: fast/backgrounds/opacity-on-document-element.html
3715
3716         * rendering/RenderView.cpp:
3717         (WebCore::rendererObscuresBackground):
3718
3719 2008-12-23  Simon Fraser  <simon.fraser@apple.com>
3720
3721         Reviewed by Dan Bernstein
3722
3723         https://bugs.webkit.org/show_bug.cgi?id=21910
3724         
3725         Fix SVGImage painting by ensuring that the SVGImage resizes its FrameView correctly.
3726         Otherwise the FrameView is left at 0x0, and nothing paints.
3727         
3728         * svg/graphics/SVGImage.cpp:
3729         (WebCore::SVGImage::draw):
3730
3731 2008-12-23  Darin Adler  <darin@apple.com>
3732
3733         Reviewed by John Sullivan.
3734
3735         - improve robustness of undo/redo in HTML editing to fix the following bugs
3736           <https://bugs.webkit.org/show_bug.cgi?id=19703> Crash in WebCore::InsertNodeBeforeCommand::doUnapply()
3737           <rdar://problem/4059423> DOM operations performed on editable HTML can cause a crash later during Undo
3738
3739         Major categories of improvements:
3740
3741             1) Added null checks.
3742             2) Eliminated type casts without corresponding type checks.
3743             3) Avoided possible infinite loops by building up lists of nodes to operate on
3744                before starting to make DOM changes.
3745             4) Use more RefPtr.
3746
3747         No test at this time, but test cases should follow in separate patches.
3748
3749         * WebCore.xcodeproj/project.pbxproj: Set the role of CSSPropertyNames.h to Private so it
3750         can be used in other Private headers, specifically editing ones.
3751
3752         * css/CSSStyleSelector.cpp:
3753         (WebCore::CSSStyleSelector::locateCousinList): Adopt parentElement.
3754         (WebCore::CSSStyleSelector::locateSharedStyle): Ditto.
3755         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): Ditto.
3756
3757         * dom/Element.cpp: (WebCore::Element::cloneElement): Added.
3758         * dom/Element.h: Added cloneElement and an implementation of parentElement.
3759         * dom/Node.h: Moved parentElement from here to Element.h and changed its
3760         implementation so it will return 0 when the parent is not an element
3761         (document, document fragment, etc.).
3762
3763         * editing/AppendNodeCommand.cpp:
3764         (WebCore::AppendNodeCommand::AppendNodeCommand): Made parent be an Element.
3765         Moved assertions from doApply in here.
3766         (WebCore::AppendNodeCommand::doApply): Simplified to just a single unchecked
3767         appendChild call.
3768         (WebCore::AppendNodeCommand::doUnapply): Simplified to just a single remove call.
3769         * editing/AppendNodeCommand.h: Updated.
3770
3771         * editing/ApplyStyleCommand.cpp:
3772         (WebCore::createStyleSpanElement): Eliminate casting by creating an element in a more
3773         direct way with new instead of createElementNS.
3774         (WebCore::ApplyStyleCommand::ApplyStyleCommand): Use PassRefPtr.
3775         (WebCore::ApplyStyleCommand::removeCSSStyle): Use CSSPropertyID.
3776         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded): Use cloneElement.
3777         * editing/ApplyStyleCommand.h:
3778
3779         * editing/BreakBlockquoteCommand.cpp:
3780         (WebCore::BreakBlockquoteCommand::doApply): Use Element* and cloneElement.
3781
3782         * editing/CompositeEditCommand.cpp:
3783         (WebCore::CompositeEditCommand::applyStyledElement): Use PassRefPtr and unsigned.
3784         (WebCore::CompositeEditCommand::removeStyledElement): Ditto.
3785         (WebCore::CompositeEditCommand::insertNodeBefore): Ditto.
3786         (WebCore::CompositeEditCommand::insertNodeAfter): Ditto.
3787         (WebCore::CompositeEditCommand::insertNodeAt): Ditto.
3788         (WebCore::CompositeEditCommand::appendNode): Ditto.
3789         (WebCore::CompositeEditCommand::removeChildrenInRange): Ditto. Also use a vector to
3790         make the list of children in case removing them has side effects.
3791         (WebCore::CompositeEditCommand::removeNode): Ditto.
3792         (WebCore::CompositeEditCommand::removeNodePreservingChildren): Ditto.
3793         (WebCore::CompositeEditCommand::removeNodeAndPruneAncestors): Ditto.
3794         (WebCore::CompositeEditCommand::splitTextNode): Ditto.
3795         (WebCore::CompositeEditCommand::splitElement): Ditto.
3796         (WebCore::CompositeEditCommand::mergeIdenticalElements): Ditto.
3797         (WebCore::CompositeEditCommand::wrapContentsInDummySpan): Ditto.
3798         (WebCore::CompositeEditCommand::splitTextNodeContainingElement): Ditto.
3799         (WebCore::CompositeEditCommand::joinTextNodes): Ditto.
3800         (WebCore::CompositeEditCommand::inputText): Ditto.
3801         (WebCore::CompositeEditCommand::insertTextIntoNode): Ditto.
3802         (WebCore::CompositeEditCommand::deleteTextFromNode): Ditto.
3803         (WebCore::CompositeEditCommand::replaceTextInNode): Ditto.
3804         (WebCore::CompositeEditCommand::insertNodeAtTabSpanPosition): Ditto.
3805         (WebCore::CompositeEditCommand::removeCSSProperty): Ditto.
3806         (WebCore::CompositeEditCommand::removeNodeAttribute): Ditto. Implement by calling
3807         setNodeAttribute instead of with its own SimpleEditCommand.
3808         (WebCore::CompositeEditCommand::setNodeAttribute): Ditto.
3809         (WebCore::CompositeEditCommand::deleteInsignificantText): Ditto.
3810         (WebCore::CompositeEditCommand::appendBlockPlaceholder): Ditto.
3811         (WebCore::CompositeEditCommand::addBlockPlaceholderIfNeeded): Ditto.
3812         (WebCore::CompositeEditCommand::insertNewDefaultParagraphElementAt): Ditto. Don't
3813         bother using an undoable operation to put the break element into the paragraph
3814         element because there's no need to split them and redo this when doing undo/redo.
3815         (WebCore::CompositeEditCommand::moveParagraphs): Ditto.
3816         (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Ditto.
3817         * editing/CompositeEditCommand.h: Ditto.
3818
3819         * editing/DeleteFromTextNodeCommand.cpp:
3820         (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand): Use unsigned.
3821         (WebCore::DeleteFromTextNodeCommand::doApply): Eliminated inappropriate assertions.
3822         (WebCore::DeleteFromTextNodeCommand::doUnapply): Ditto.
3823         * editing/DeleteFromTextNodeCommand.h:
3824
3825         * editing/DeleteSelectionCommand.cpp:
3826         (WebCore::DeleteSelectionCommand::removeNode): Use PassRefPtr.
3827         (WebCore::DeleteSelectionCommand::deleteTextFromNode): Ditto.
3828         * editing/DeleteSelectionCommand.h:
3829
3830         * editing/FormatBlockCommand.cpp:
3831         (WebCore::FormatBlockCommand::FormatBlockCommand): Use AtomicString.
3832         (WebCore::FormatBlockCommand::doApply): Use Element.
3833         * editing/FormatBlockCommand.h:
3834
3835         * editing/IndentOutdentCommand.cpp:
3836         (WebCore::createIndentBlockquoteElement): Use new to create the element
3837         instead of calling a function so we have a more specific type.
3838         (WebCore::IndentOutdentCommand::prepareBlockquoteLevelForInsertion):
3839         Use RefPtr and Element.
3840         (WebCore::IndentOutdentCommand::indentRegion): Ditto.
3841         (WebCore::IndentOutdentCommand::outdentParagraph): Ditto.
3842         * editing/IndentOutdentCommand.h:
3843
3844         * editing/InsertIntoTextNodeCommand.cpp:
3845         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
3846         Use unsigned. Added an assertion.
3847         (WebCore::InsertIntoTextNodeCommand::doApply): Eliminated inappropriate assertions.
3848         (WebCore::InsertIntoTextNodeCommand::doUnapply): Ditto.
3849         * editing/InsertIntoTextNodeCommand.h:
3850
3851         * editing/InsertLineBreakCommand.cpp:
3852         (WebCore::InsertLineBreakCommand::insertNodeAfterPosition): Use Element.
3853         (WebCore::InsertLineBreakCommand::insertNodeBeforePosition): Ditto.
3854
3855         * editing/InsertListCommand.cpp:
3856         (WebCore::InsertListCommand::doApply): Use Element.
3857
3858         * editing/InsertNodeBeforeCommand.cpp:
3859         (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand): Moved assertions
3860         here from doApply.
3861         (WebCore::InsertNodeBeforeCommand::doApply): Eliminated inappropriate assertions.
3862         Added a null check.
3863         (WebCore::InsertNodeBeforeCommand::doUnapply): Simplified to just a single remove call.
3864
3865         * editing/InsertParagraphSeparatorCommand.cpp:
3866         (WebCore::InsertParagraphSeparatorCommand::doApply): Use Element and cloneElement.
3867
3868         * editing/JoinTextNodesCommand.cpp:
3869         (WebCore::JoinTextNodesCommand::doApply): Eliminated inappropriate assertions.
3870         Added some runtime checks. Don't store anything in m_offset.
3871         (WebCore::JoinTextNodesCommand::doUnapply): Ditto.
3872         * editing/JoinTextNodesCommand.h:
3873
3874         * editing/MergeIdenticalElementsCommand.cpp:
3875         (WebCore::MergeIdenticalElementsCommand::MergeIdenticalElementsCommand): Moved
3876         an assertion here from doApply.
3877         (WebCore::MergeIdenticalElementsCommand::doApply): Eliminated inappropriate assertions.
3878         Added a null check. Changed implementation to use remove to avoid null parent issue.
3879         Use a vector of nodes to avoid possible infinite loop if mutation happens while iterating.
3880         (WebCore::MergeIdenticalElementsCommand::doUnapply): Ditto.
3881
3882         * editing/ModifySelectionListLevel.cpp:
3883         (WebCore::ModifySelectionListLevelCommand::appendSiblingNodeRange): Use Element*.
3884         (WebCore::IncreaseSelectionListLevelCommand::doApply): Ditto.
3885         * editing/ModifySelectionListLevel.h:
3886
3887         * editing/RemoveCSSPropertyCommand.cpp:
3888         (WebCore::RemoveCSSPropertyCommand::RemoveCSSPropertyCommand): Use PassRefPtr and
3889         CSSPropertyID. Also renamed m_decl to m_style.
3890         (WebCore::RemoveCSSPropertyCommand::doApply): Eliminated inappropriate assertions.
3891         (WebCore::RemoveCSSPropertyCommand::doUnapply): Ditto.
3892
3893         * editing/RemoveNodeAttributeCommand.cpp: Removed contents of this file. To be deleted.
3894         Use SetNodeAttributeCommand instead.
3895         * editing/RemoveNodeAttributeCommand.h: Ditto.
3896
3897         * editing/RemoveNodeCommand.cpp:
3898         (WebCore::RemoveNodeCommand::RemoveNodeCommand): Moved assertions here from doApply.
3899         Don't initialize m_refChild here; rather do it in doApply.
3900         (WebCore::RemoveNodeCommand::doApply): Eliminated inappropriate assertions. Added
3901         checks and streamlined implementation.
3902         (WebCore::RemoveNodeCommand::doUnapply): Ditto.
3903         * editing/RemoveNodeCommand.h:
3904
3905         * editing/RemoveNodePreservingChildrenCommand.cpp:
3906         (WebCore::RemoveNodePreservingChildrenCommand::doApply): Use a vector.
3907
3908         * editing/ReplaceSelectionCommand.cpp:
3909         (WebCore::ReplacementFragment::insertFragmentForTestRendering): Removed now-unneeded cast.
3910
3911         * editing/SetNodeAttributeCommand.cpp:
3912         (WebCore::SetNodeAttributeCommand::SetNodeAttributeCommand): Use AtomicString.
3913         Removed assertion that prevents us from using this to remove an attribute.
3914         (WebCore::SetNodeAttributeCommand::doApply): Eliminated inappropriate assertions.
3915         (WebCore::SetNodeAttributeCommand::doUnapply): Ditto.
3916         * editing/SetNodeAttributeCommand.h:
3917
3918         * editing/SplitElementCommand.cpp:
3919         (WebCore::SplitElementCommand::SplitElementCommand): Moved assertion here from doApply.
3920         (WebCore::SplitElementCommand::doApply): Check some more invariants and use a vector
3921         to avoid possible infinite loops.
3922         (WebCore::SplitElementCommand::doUnapply): Ditto.
3923
3924         * editing/SplitTextNodeCommand.cpp:
3925         (WebCore::SplitTextNodeCommand::SplitTextNodeCommand): Moved assertions and comment
3926         here from doApply.
3927         (WebCore::SplitTextNodeCommand::doApply): Check for null and failures when applying.
3928         (WebCore::SplitTextNodeCommand::doUnapply): Ditto.
3929
3930         * editing/SplitTextNodeContainingElementCommand.cpp:
3931         (WebCore::SplitTextNodeContainingElementCommand::doApply): Use Element.
3932
3933         * editing/WrapContentsInDummySpanCommand.cpp:
3934         (WebCore::WrapContentsInDummySpanCommand::doApply): Check for null and ignore failures.
3935         Don't reuse the dummy span. Simplified logic.
3936         (WebCore::WrapContentsInDummySpanCommand::doUnapply): Ditto.
3937
3938         * editing/htmlediting.cpp:
3939         (WebCore::isBlock): Make sure this returns true only for elements.
3940         (WebCore::enclosingBlock): Return an Element*.
3941         (WebCore::enclosingTableCell): Ditto.
3942         (WebCore::enclosingList): Return an HTMLElement*.
3943         (WebCore::outermostEnclosingList): Return an HTMLElement*.
3944         (WebCore::createDefaultParagraphElement): Return an HTMLElement*.
3945         (WebCore::createBreakElement): Return an HTMLElement*.
3946         (WebCore::createOrderedListElement): Return an HTMLElement*.
3947         (WebCore::createUnorderedListElement): Return an HTMLElement*.
3948         (WebCore::createListItemElement): Return an HTMLElement*.
3949         (WebCore::createHTMLElement): Return an HTMLElement*.
3950         * editing/htmlediting.h:
3951
3952         * editing/markup.cpp:
3953         (WebCore::createFragmentFromText): Use createBreakElement and use Element*.
3954
3955         * page/MouseEventWithHitTestResults.cpp:
3956         (WebCore::MouseEventWithHitTestResults::targetNode): Use parentElement.
3957
3958 2008-12-23  Darin Adler  <darin@apple.com>
3959
3960         Reviewed by Dan Bernstein.
3961
3962         * dom/Node.h: Tweak comments and order of bits that Sam moved
3963         here last night.
3964         * dom/Node.cpp: Ditto.
3965
3966 2008-12-22  Julien Chaffraix  <jchaffraix@webkit.org>
3967
3968         Reviewed by Darin Adler.
3969
3970         Bug 11106: Some XMLHttpRequest URI resolving tests fail
3971         https://bugs.webkit.org/show_bug.cgi?id=11106
3972
3973         Use the ScriptExecutionContext to resolve the URI when calling open in JavaScript.
3974         The previous code was using the containing DOMWindow to do so which would fail for
3975         XMLHttpRequest object being passed between iframe.
3976
3977         Tests: http/tests/xmlhttprequest/uri-resolution-opera-open-004.html
3978                http/tests/xmlhttprequest/uri-resolution-opera-open-005.html
3979                http/tests/xmlhttprequest/uri-resolution-opera-open-006.html
3980                http/tests/xmlhttprequest/uri-resolution-opera-open-007.html
3981                http/tests/xmlhttprequest/uri-resolution-opera-open-008.html
3982                http/tests/xmlhttprequest/uri-resolution-opera-open-009.html
3983                http/tests/xmlhttprequest/uri-resolution-opera-open-010.html
3984
3985         * bindings/js/JSXMLHttpRequestCustom.cpp:
3986         (WebCore::JSXMLHttpRequest::open): Use the ScriptExecutionContext
3987         to resolve the URL.
3988
3989         * dom/Document.cpp:
3990         (WebCore::Document::virtualCompleteURL): Virtual method added to
3991         avoid performance hit on completeURL call.
3992
3993         * dom/Document.h:
3994         * dom/ScriptExecutionContext.h:
3995         (WebCore::ScriptExecutionContext::completeURL): Non-virtual method
3996         that wrap the call to the virtual call.
3997         * dom/WorkerContext.cpp:
3998         (WebCore::WorkerContext::virtualCompleteURL): Pure virtual method.
3999         * dom/WorkerContext.h:
4000
4001 2008-12-23  Darin Adler  <darin@apple.com>
4002
4003         Reviewed by Dan Bernstein.
4004
4005         - https://bugs.webkit.org/show_bug.cgi?id=22978
4006           a couple tweaks to the new strokeBoundingRect functions
4007
4008         * platform/graphics/cairo/PathCairo.cpp:
4009         (WebCore::Path::strokeBoundingRect): Only create a GraphicsContext
4010         if the applier is non-null.
4011
4012         * platform/graphics/cg/PathCG.cpp:
4013         (WebCore::putBytesNowhere): Added.
4014         (WebCore::createScratchContext): Changed to use a "/dev/null" type
4015         function to discard bytes rather than using a data object. This
4016         eliminates the possibility that memory will be used if someone draws
4017         into the scratch context by accident. Also moved to the top of the
4018         file; it was in a slightly strange place before.
4019         (WebCore::Path::strokeBoundingRect): Only create a GraphicsContext
4020         if the applier is non-null. Simplify the empty path special case.
4021
4022 2008-12-22  Sam Weinig  <sam@webkit.org>
4023
4024         Reviewed by Mark Rowe.
4025
4026         Save a word in all Elements by moving the 5 loose bits to Node,
4027         where we had 16 spare.
4028
4029         * dom/Element.cpp:
4030         (WebCore::Element::Element):
4031         * dom/Element.h:
4032         * dom/Node.cpp:
4033         (WebCore::Node::Node):
4034         * dom/Node.h:
4035
4036 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
4037
4038         Reviewed by George Staikos.
4039
4040         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22972
4041
4042         Add WML <meta> element support. All needed functionality is present
4043         in Document::processHttpEquiv, already covered by tests.
4044
4045         * GNUmakefile.am:
4046         * WebCore.pro:
4047         * WebCore.vcproj/WebCore.vcproj:
4048         * WebCore.xcodeproj/project.pbxproj:
4049         * wml/WMLMetaElement.cpp: Added.
4050         (WebCore::WMLMetaElement::WMLMetaElement):
4051         (WebCore::WMLMetaElement::parseMappedAttribute):
4052         (WebCore::WMLMetaElement::insertedIntoDocument):
4053         * wml/WMLMetaElement.h: Added.
4054         * wml/WMLTagNames.in:
4055
4056 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
4057
4058         Rubber-stamped by Darin Adler.
4059
4060         Don't reference specific layout tests in comments.
4061
4062         * html/HTMLFormElement.cpp:
4063         (WebCore::HTMLFormElement::createFormData):
4064
4065 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
4066
4067         Reviewed by George Staikos.
4068
4069         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22965
4070
4071         Add WML <head> element support. Doesn't require a WMLHeadElement.
4072         No functional behaviour, as we already created a WMLElement for headTag, by default.
4073         It's just cleaner to list <head> in WMLTagNames, forwarding to a WMLElement constructor.
4074
4075         * wml/WMLTagNames.in:
4076
4077 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
4078
4079         Reviewed by George Staikos.
4080
4081         Fixes: https://bugs.webkit.org/show_bug.cgi?id=22971
4082
4083         Fix regression caused by the HTMLFormElement refactorization.
4084         File form elements without a name have to be included in multipart/form-data
4085         submission. Cover this behaviour with a new test case.
4086
4087         Test: http/tests/misc/empty-file-formdata.html
4088
4089         * html/HTMLFormElement.cpp:
4090         (WebCore::HTMLFormElement::createFormData):
4091         * wml/WMLTagNames.in:
4092
4093 2008-12-22  David Kilzer  <ddkilzer@apple.com>
4094
4095         <rdar://problem/6438298> Bump schema version for app cache
4096
4097         Reviewed by Alexey Proskuryakov.
4098
4099         * loader/appcache/ApplicationCacheStorage.cpp: Increment
4100         SchemaVersion from 2 to 3.
4101
4102 2008-12-22  David Kilzer  <ddkilzer@apple.com>
4103
4104         Use Deque in CSSStyleSheet::addSubresourceStyleURLs()
4105
4106         Reviewed by Darin Adler.
4107
4108         * css/CSSStyleSheet.cpp:
4109         (WebCore::CSSStyleSheet::addSubresourceStyleURLs): Replaced
4110         use of ListHashSet with more efficient Deque.
4111
4112 2008-12-22  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
4113
4114         Reviewed by Sam Weinig.
4115
4116         Fix obvious crash fix for WML enabled builds.
4117
4118         * css/CSSStyleSelector.cpp:
4119         (WebCore::CSSStyleSelector::adjustRenderStyle):
4120
4121 2008-12-22  David Kilzer  <ddkilzer@apple.com>
4122
4123         Bug 11850: Webarchive fails to save images referenced in CSS
4124
4125         <https://bugs.webkit.org/show_bug.cgi?id=11850>
4126
4127         Reviewed by Darin Adler.
4128
4129         This entry contains two parts since the tests for adding a
4130         completeURL() method to StyleSheet and CSSStyleSheet (part 1) depend
4131         on Bug 11850 being fixed (part 2).
4132
4133         --
4134
4135         Tests: http/tests/webarchive/test-css-url-encoding-shift-jis.html
4136                http/tests/webarchive/test-css-url-encoding-utf-8.html
4137                http/tests/webarchive/test-css-url-encoding.html
4138
4139         Added completeURL() methods to StyleSheet and CSSStyleSheet that
4140         match the behavior of Document::completeURL().  Most notably,
4141         CSSStyleSheet::completeURL() uses the charset of the stylesheet
4142         (if it exists) to construct URLs, just like Document::completeURL().
4143
4144         * css/CSSParser.cpp:
4145         (WebCore::CSSParser::parseValue): Use CSSStyleSheet::completeURL().
4146         (WebCore::CSSParser::parseContent): Ditto.
4147         (WebCore::CSSParser::parseFillImage): Ditto.
4148         (WebCore::CSSParser::parseFontFaceSrc): Ditto.
4149         (WebCore::CSSParser::parseBorderImage): Ditto.
4150
4151         * css/CSSStyleSheet.cpp:
4152         (WebCore::CSSStyleSheet::completeURL): Added.
4153         * css/CSSStyleSheet.h:
4154         (WebCore::CSSStyleSheet::completeURL): Added declaration.
4155
4156         * css/StyleSheet.cpp:
4157         (WebCore::StyleSheet::completeURL): Added.
4158         * css/StyleSheet.h:
4159         (WebCore::StyleSheet::completeURL): Added declaration.
4160
4161         * dom/Document.cpp:
4162         (WebCore::Document::completeURL): Added comment referring to the new
4163         completeURL() methods in StyleSheet and CSSStyleSheet.
4164
4165         --
4166
4167         Tests: webarchive/test-css-url-resources-in-stylesheets.html
4168                webarchive/test-css-url-resources-inline-styles.html
4169
4170         Walk stylesheets and inline style attributes for url() references
4171         when building a list of URLs to include in a webarchive.  Note that
4172         not all URLs found this way will be included in the webarchive if
4173         they were not used (and thus not downloaded) when laying out the
4174         page.
4175
4176         The key method for CSS stylesheets is
4177         CSSStyleSheet::addSubresourceStyleURLs() which iterates over all
4178         CSSStyleSheet objects recursively referenced from its own stylesheet
4179         through @import rules.  Starting with the CSSRule objects in each
4180         sheet and continuing down through the CSSMutableStyleDeclaration and
4181         CSSValue objects, addSubresourceStyleURLs() methods are called to
4182         gather URLs.
4183
4184         For inline style attributes in HTML DOM elements,
4185         StyledElement::addSubresourceAttributeURLs() calls
4186         CSSMutableStyleDeclaration::addSubresourceStyleURLs() to gather URLs
4187         from each element, hence the need to call
4188         addSubresourceAttributeURLs() on superclasses when the method is
4189         implemented on the element class itself.
4190
4191         * css/CSSBorderImageValue.cpp:
4192         (WebCore::CSSBorderImageValue::addSubresourceStyleURLs): Added.
4193         * css/CSSBorderImageValue.h:
4194         (WebCore::CSSBorderImageValue::addSubresourceStyleURLs): Added
4195         declaration.
4196
4197         * css/CSSFontFaceRule.cpp:
4198         (WebCore::CSSFontFaceRule::addSubresourceStyleURLs): Added.
4199         * css/CSSFontFaceRule.h:
4200         (WebCore::CSSFontFaceRule::addSubresourceStyleURLs): Added
4201         declaration.
4202
4203         * css/CSSFontFaceSrcValue.cpp:
4204         (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): Added.
4205         * css/CSSFontFaceSrcValue.h:
4206         (WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs): Added
4207         declaration.
4208