1cc18a3bf3de4ddaeadebbc632edfef8f1e8f694
[WebKit-https.git] / WebCore / ChangeLog
1 2009-06-10  Xan Lopez  <xlopez@igalia.com>
2
3         Reviewed by Jan Alonzo.
4
5         https://bugs.webkit.org/show_bug.cgi?id=25415
6         [GTK][ATK] Please implement support for get_text_at_offset
7
8         Reduce duplicated code to access the text of a AtkText
9         object. doAXStringForRange calls text() internally, so we are
10         doing exactly the same after the change.
11
12         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
13         (getGailTextUtilForAtk):
14         (getPangoLayoutForAtk):
15
16 2009-06-10  Xan Lopez  <xlopez@igalia.com>
17
18         Reviewed by Jan Alonzo.
19
20         https://bugs.webkit.org/show_bug.cgi?id=25415
21         [GTK][ATK] Please implement support for get_text_at_offset
22
23         Pass a PangoLayout to the GailTextUtil function calls.
24
25         It's needed for LINE boundary calls to work correctly.
26
27         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
28         (updateLayout):
29         (getPangoLayoutForAtk):
30         (webkit_accessible_text_get_text_after_offset):
31         (webkit_accessible_text_get_text_at_offset):
32
33 2009-06-10  Xan Lopez  <xlopez@igalia.com>
34
35         Reviewed by Jan Alonzo.
36
37         https://bugs.webkit.org/show_bug.cgi?id=25415
38         [GTK][ATK] Please implement support for get_text_at_offset
39
40         Use GailUtilText instead of my crappy partial reimplementation of
41         it. This should add support for LINE boundaries too, although it's
42         mostly untested for now.
43
44         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
45         (getGailTextUtilForAtk):
46         (webkit_accessible_text_get_text_after_offset):
47         (webkit_accessible_text_get_text_at_offset):
48
49 2009-06-10  Jan Michael Alonzo  <jmalonzo@webkit.org>
50
51         Gtk build fix: include <stdio.h> as it is required in jpeglib.h
52
53         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
54
55 2009-06-09  Peter Kasting  <pkasting@google.com>
56
57         Reviewed by Eric Seidel.
58
59         https://bugs.webkit.org/show_bug.cgi?id=25709 part four
60         Most of the remaining Cairo changes needed before merging Skia/Cairo
61         image decoders.  Most of these involve plumbing more error detection and
62         handling (or, in some cases, merely the capability to detect errors, as
63         e.g. Skia detects and handles image allocation failure while Cairo
64         currently doesn't).  There is also some general cleanup and
65         simplification; RGBA32Buffer::m_height and all associated functions have
66         been removed (set but never used) and some places now rely on superclass
67         implementations.
68
69         * platform/image-decoders/ImageDecoder.h:
70         (WebCore::RGBA32Buffer::RGBA32Buffer): Remove m_height, ensureHeight() and associated stuff
71         (WebCore::RGBA32Buffer::copyBitmapData): Add API function so refcounted backing stores (like Skia uses) can be used with GIFs
72         (WebCore::RGBA32Buffer::setSize): Zero-fill image to avoid garbage
73         (WebCore::RGBA32Buffer::height): Remove
74         (WebCore::RGBA32Buffer::ensureHeight): Remove
75         (WebCore::ImageDecoder::ImageDecoder): Keep member initialization in order, force subclasses to go through size() instead of accessing m_size directly
76         (WebCore::ImageDecoder::isSizeAvailable): Check that decoding hasn't failed
77         (WebCore::ImageDecoder::size): Check that decoding hasn't failed
78         (WebCore::ImageDecoder::setSize): Protect against integer overflow
79         (WebCore::ImageDecoder::isOverSize): Protect against integer overflow
80         * platform/image-decoders/gif/GIFImageDecoder.cpp: Remove prepEmptyFrameBuffer()
81         (WebCore::GIFImageDecoder::isSizeAvailable): Rely on superclass isSizeAvailable() for better failure handling
82         (WebCore::GIFImageDecoder::sizeNowAvailable): Add return values for better failure handling, rely on superclass setSize() for overflow protection
83         (WebCore::GIFImageDecoder::initFrameBuffer): Add return values for better failure handling, remove prepEmptyFrameBuffer(), use RGBA32Buffer::setSize() to handle potential allocation failures (won't happen with Cairo port, can in Skia), use RGBA32Buffer::copyBitmapData() so backing store can be refcounted internally (Cairo won't be, Skia is), rely on superclass size() for better failure handling
84         (WebCore::GIFImageDecoder::haveDecodedRow): Fix style violation, remove RGBA32Buffer::ensureHeight()
85         (WebCore::GIFImageDecoder::frameComplete): Remove RGBA32Buffer::ensureHeight()
86         * platform/image-decoders/gif/GIFImageDecoder.h: Remove prepEmptyFrameBuffer(), add return values for better failure handling
87         * platform/image-decoders/gif/GIFImageReader.cpp:
88         (GIFImageReader::do_lzw): Protect against array overflow, add comments
89         (GIFImageReader::read): Protect against array overflow, be more tolerant of bad data, better failure handling
90         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp: Remove MSVC-specific warning disable (bfulgham will move into build files)
91         (WebCore::JPEGImageReader::decode): Better failure handling
92         (WebCore::JPEGImageDecoder::isSizeAvailable): Rely on superclass isSizeAvailable() for better failure handling
93         (WebCore::JPEGImageDecoder::outputScanlines): Use RGBA32Buffer::setSize() to handle potential allocation failures (won't happen with Cairo port, can in Skia), rely on superclass size() for better failure handling, remove RGBA32Buffer::ensureHeight()
94         * platform/image-decoders/jpeg/JPEGImageDecoder.h: Rely on superclass setSize() for overflow protection
95         * platform/image-decoders/png/PNGImageDecoder.cpp: Remove MSVC-specific warning disable (bfulgham will move into build files)
96         (WebCore::PNGImageDecoder::PNGImageDecoder): Don't allocate a slot in the framebuffer cache until it's needed
97         (WebCore::PNGImageDecoder::isSizeAvailable): Rely on superclass isSizeAvailable() for better failure handling
98         (WebCore::PNGImageDecoder::frameBufferAtIndex): Don't allocate a slot in the framebuffer cache until it's needed
99         (WebCore::PNGImageDecoder::decode): Don't allocate a slot in the framebuffer cache until it's needed
100         (WebCore::PNGImageDecoder::decodingFailed): Fix style violation
101         (WebCore::PNGImageDecoder::headerAvailable): Rely on superclass isSizeAvailable() and setSize() for overflow protection and better failure handling
102         (WebCore::PNGImageDecoder::rowAvailable): Don't allocate a slot in the framebuffer cache until it's needed, use RGBA32Buffer::setSize() to handle potential allocation failures (won't happen with Cairo port, can in Skia), remove RGBA32Buffer::ensureHeight()
103         (WebCore::PNGImageDecoder::pngComplete): Don't allocate a slot in the framebuffer cache until it's needed
104
105 2009-06-09  Kevin Ollivier  <kevino@theolliviers.com>
106
107         wx build fix, adding JSCore/assembler to the list of include dirs, and
108         adding editing/ReplaceNodeSpanCommand.cpp to the build.
109         
110         * WebCoreSources.bkl:
111         * webcore-base.bkl:
112
113 2009-06-09  Yury Semikhatsky  <yurys@chromium.org>
114
115         Reviewed by Timothy Hatcher.
116
117         When checking if the loader is the main resource loader make sure that the loader's frame is the main frame. 
118
119         https://bugs.webkit.org/show_bug.cgi?id=26218
120
121         * inspector/InspectorController.cpp:
122         (WebCore::InspectorController::didLoadResourceFromMemoryCache):
123         (WebCore::InspectorController::identifierForInitialRequest):
124         (WebCore::InspectorController::isMainResourceLoader):
125         * inspector/InspectorController.h:
126
127 2009-06-09  Pierre d'Herbemont  <pdherbemont@apple.com>
128
129         Reviewed by Eric Seidel.
130
131         https://bugs.webkit.org/show_bug.cgi?id=26190
132
133         Test: media/controls-css-overload.html
134
135         * rendering/RenderMedia.cpp:
136         (WebCore::RenderMedia::updateControls): Prevent NULL dereference in case containers gets hidden.
137
138 2009-06-08  Peter Kasting  <pkasting@google.com>
139
140         Reviewed by Eric Seidel.
141
142         https://bugs.webkit.org/show_bug.cgi?id=25709 part three
143         Various minor cleanups to the Skia files.  Mostly non-functional, except
144         for two specific changes:
145         * JPEGs and PNGs were always marked as transparent; now they are only
146           marked as transparent when they actually are.  I doubt this has much
147           of an effect but in theory it could be used to optimize their display.
148         * Instead of arbitrarily disallowing images over 32 * 1024 * 1024 px^2,
149           only disallow images which are so large they will cause overflow in
150           other parts of the code.  This should fix the testcase on
151           http://code.google.com/p/chromium/issues/detail?id=3643.
152
153         * platform/image-decoders/skia/BMPImageReader.h:
154         (WebCore::BMPImageReader::setRGBA): Use simpler non-static setRGBA() form
155         * platform/image-decoders/skia/GIFImageDecoder.cpp:
156         (WebCore::GIFImageDecoder::initFrameBuffer): Remove unneeded code, use more readable setRGBA() form
157         (WebCore::GIFImageDecoder::haveDecodedRow): Fix style violation
158         * platform/image-decoders/skia/GIFImageDecoder.h: Remove unneeded code
159         * platform/image-decoders/skia/ImageDecoder.h:
160         (WebCore::RGBA32Buffer::setSize): setSize() should just setStatus() when it fails since all callers were doing it
161         (WebCore::ImageDecoder::isOverSize): Ease "oversized" image constraints to allow any image that won't overflow
162         * platform/image-decoders/skia/JPEGImageDecoder.cpp:
163         (WebCore::JPEGImageDecoder::outputScanlines): Remove unneeded code, mark JPEGs as non-transparent
164         * platform/image-decoders/skia/PNGImageDecoder.cpp:
165         (WebCore::PNGImageDecoder::decodingFailed): Fix style violation
166         (WebCore::PNGImageDecoder::rowAvailable): Mark un-decoded PNGs as non-transparent (this will get reset later as needed)
167         * platform/image-decoders/skia/XBMImageDecoder.cpp:
168         (WebCore::XBMImageDecoder::frameBufferAtIndex): Remove unneeded code
169
170 2009-06-09  Darin Fisher  <darin@chromium.org>
171
172         Fix Chromium build bustage.
173         
174         CachedResource.cpp no longer compiles if USE(JSC) is not defined.  The
175         problem is that this file is using a macro from StdLibExtras.h without
176         including that file.  It just happenes to get that file via a JSC
177         specific include.
178
179         * loader/CachedResource.cpp:
180
181 2009-06-09  Dean McNamee  <deanm@chromium.org>
182
183         Reviewed by Oliver Hunt.
184
185         Make sure the graphics backends are in sync with the canvas lineWidth state.
186         https://bugs.webkit.org/show_bug.cgi?id=26187
187
188         Test: fast/canvas/canvas-line-width.html
189
190         * html/CanvasRenderingContext2D.cpp:
191         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
192
193 2009-06-09  Michael Nordman  <michaeln@google.com>
194
195         Reviewed by Eric Seidel.
196
197         Proactively cancel pending requests at DocLoader dtor time,
198         otherwise crashes can occur. 
199
200         https://bugs.webkit.org/show_bug.cgi?id=26230
201         http://code.google.com/p/chromium/issues/detail?id=12161
202
203         Test: fast/frames/javascript-url-as-framesrc-crash.html
204
205         * loader/DocLoader.cpp:
206         (WebCore::DocLoader::~DocLoader):
207
208 2009-06-09  Eric Seidel  <eric@webkit.org>
209
210         Reviewed by Darin Adler.
211
212         Fix ASSERT seen in shadow tree testing
213         https://bugs.webkit.org/show_bug.cgi?id=25092
214
215         Test: svg/custom/use-mutation-event-crash.svg
216
217         * svg/SVGUseElement.cpp:
218         (WebCore::SVGUseElement::instanceForShadowTreeElement):
219
220 2009-06-09  Brent Fulgham  <bfulgham@webkit.org>
221
222         Reviewed by Eric Seidel.
223
224         Fixes https://bugs.webkit.org/show_bug.cgi?id=22891
225         Scrolling in Windows Cairo Broken if no background color set.
226
227         * platform/graphics/cairo/GradientCairo.cpp:
228         (WebCore::Gradient::fill):  Use the GraphicsContext save and restore
229           methods (rather than the Cairo-only functions) so that the Windows
230           device context is kept in sync.
231         * platform/graphics/cairo/GraphicsContextCairo.cpp:
232         (WebCore::GraphicsContext::GraphicsContext): Add new constructor call
233           to sync Windows HDC with Cairo surface.
234         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
235         (WebCore::GraphicsContextPlatformPrivate::syncContext): Provide
236           declaration for Windows HDC sync method (and stub for non-Windows
237           Cairo implementations).
238         * platform/graphics/cairo/ImageCairo.cpp:
239         (WebCore::BitmapImage::draw): Use GraphicsContext save and restore
240           methods (rather than the Cairo-only functions) so that the Windows
241           device context is kept in sync.
242         * platform/graphics/win/GraphicsContextCairoWin.cpp:
243         (WebCore::CairoContextWithHDC): New method to create a valid Cairo
244           context for a given HDC.
245         (WebCore::GraphicsContext::GraphicsContext): Modify constructor to
246           use new CairoContextWithHDC call.
247         (WebCore::GraphicsContext::getWindowsContext): Revise to match
248           behavior of CG implementation.
249         (WebCore::GraphicsContext::releaseWindowsContext): Revise to match
250           behavior of CG implementation.
251         (WebCore::GraphicsContextPlatformPrivate::concatCTM): Get rid of
252           incorrect new HDC, and use object's HDC member for dealing with
253           concatCTM operations.
254         (WebCore::GraphicsContextPlatformPrivate::syncContext): New method
255           to sync Windows HDC with Cairo context.
256         * platform/graphics/win/ImageCairoWin.cpp:
257         (WebCore::BitmapImage::getHBITMAPOfSize): Revise implementation to
258           match CG behavior.
259
260 2009-06-09  Jian Li  <jianli@chromium.org>
261
262         Reviewed by David Levin.
263
264         Bug 26196: Fix the problem that worker's importScripts fails if the
265         script URL is redirected from different origin.
266         https://bugs.webkit.org/show_bug.cgi?id=26196
267
268         Test: http/tests/workers/worker-importScripts.html
269
270         The fix is to pass an additional enum parameter to the loader in
271         order to tell it to perform the redirect origin check or not.
272
273         * loader/DocumentThreadableLoader.cpp:
274         (WebCore::DocumentThreadableLoader::create):
275         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
276         (WebCore::DocumentThreadableLoader::willSendRequest):
277         * loader/DocumentThreadableLoader.h:
278         * loader/ThreadableLoader.cpp:
279         (WebCore::ThreadableLoader::create):
280         (WebCore::ThreadableLoader::loadResourceSynchronously):
281         * loader/ThreadableLoader.h:
282         (WebCore::):
283         * loader/WorkerThreadableLoader.cpp:
284         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
285         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
286         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
287         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
288         * loader/WorkerThreadableLoader.h:
289         (WebCore::WorkerThreadableLoader::create):
290         * workers/WorkerContext.cpp:
291         (WebCore::WorkerContext::importScripts):
292         * xml/XMLHttpRequest.cpp:
293         (WebCore::XMLHttpRequest::loadRequestAsynchronously):
294
295 2009-06-09  Anand K. Mistry  <amistry@google.com>
296
297         Reviewed by Dimitri Glazkov.
298
299         Paint bitmaps with the alpha channel in Skia.
300         https://bugs.webkit.org/show_bug.cgi?id=26037
301
302         Test: fast/canvas/drawImage-with-globalAlpha.html
303
304         * platform/graphics/skia/ImageSkia.cpp:
305         (WebCore::paintSkBitmap):
306         * platform/graphics/skia/PlatformContextSkia.cpp:
307         (PlatformContextSkia::getAlpha):
308         * platform/graphics/skia/PlatformContextSkia.h:
309
310 2009-06-09  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
311
312         Reviewed by Xan Lopez.
313
314         https://bugs.webkit.org/show_bug.cgi?id=26104
315         [GTK] Make NetworkRequest a proper GObject and expose SoupMessage
316
317         Refactor how SoupMessage is handled, so that our ResourceRequest
318         object doesn't have to store it as a member, which complicates
319         managing ResourceRequest's lifetime.
320
321         * platform/network/soup/ResourceHandleSoup.cpp:
322         (WebCore::ResourceHandle::startHttp):
323         * platform/network/soup/ResourceRequest.h:
324         (WebCore::ResourceRequest::ResourceRequest):
325         (WebCore::ResourceRequest::doUpdatePlatformRequest):
326         (WebCore::ResourceRequest::doUpdateResourceRequest):
327         * platform/network/soup/ResourceRequestSoup.cpp:
328         (WebCore::ResourceRequest::toSoupMessage):
329         (WebCore::ResourceRequest::updateFromSoupMessage):
330
331 2009-06-09  Simon Hausmann  <simon.hausmann@nokia.com>
332
333         Fix the Qt build, the time functions moved into the WTF namespace.
334
335         * bridge/qt/qt_runtime.cpp:
336         (JSC::Bindings::convertValueToQVariant):
337         (JSC::Bindings::convertQVariantToValue):
338
339 2009-06-08  Brady Eidson  <beidson@apple.com>
340
341         Reviewed by Antti Koivisto
342
343         <rdar://problem/6727495> Repro crash in WebCore::Loader::Host::servePendingRequests() and dupes.
344
345         Test: http/tests/loading/deleted-host-in-resource-load-delegate-callback.html
346
347         Loader::Host objects were manually managed via new/delete.
348         There's a variety of circumstances where a Host might've been deleted while it was still in the middle
349         of a resource load delegate callback.
350         Changing them to be RefCounted then adding protectors in the callbacks makes this possibility disappear.
351
352         At the same time, remove ProcessingResource which was an earlier fix for this same problem that wasn't
353         fully implemented.
354
355         * loader/loader.cpp:
356         (WebCore::Loader::Loader):
357         (WebCore::Loader::load):
358         (WebCore::Loader::servePendingRequests):
359         (WebCore::Loader::resumePendingRequests):
360         (WebCore::Loader::cancelRequests):
361         (WebCore::Loader::Host::didFinishLoading):
362         (WebCore::Loader::Host::didFail):
363         (WebCore::Loader::Host::didReceiveResponse):
364         (WebCore::Loader::Host::didReceiveData):
365         * loader/loader.h:
366         (WebCore::Loader::Host::create):
367
368 2009-06-08  Dmitry Titov  <dimich@chromium.org>
369
370         Reviewed by David Levin.
371
372         https://bugs.webkit.org/show_bug.cgi?id=26126
373         Refactor methods of WorkerMessagingProxy used to talk to main-thread loader into new interface.
374
375         Split a couple of methods used to schedule cross-thread tasks between worker thread and loader thread
376         implemented on WorkerMessagingProxy into a separate interface so the loading can be implemented in
377         Chromium's workers.
378
379         No changes in functionality so no tests added.
380
381         * GNUmakefile.am:
382         * WebCore.vcproj/WebCore.vcproj:
383         * WebCore.xcodeproj/project.pbxproj:
384         Added WorkerLoaderProxy.h to the bulid.
385
386         * bindings/js/WorkerScriptController.cpp:
387         (WebCore::WorkerScriptController::evaluate): WorkerThread::workerObjectProxy() now returns & instead of *
388         * bindings/v8/WorkerScriptController.cpp:
389         (WebCore::WorkerScriptController::evaluate): same.
390         * workers/WorkerContext.cpp:
391         (WebCore::WorkerContext::~WorkerContext): same.
392         (WebCore::WorkerContext::reportException): same.
393         (WebCore::WorkerContext::addMessage): same.
394         (WebCore::WorkerContext::postMessage): same.
395
396         * loader/WorkerThreadableLoader.cpp:
397         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
398         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
399         (WebCore::WorkerThreadableLoader::MainThreadBridge::destroy):
400         (WebCore::WorkerThreadableLoader::MainThreadBridge::cancel):
401         (WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
402         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
403         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
404         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
405         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
406         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
407         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveAuthenticationCancellation):
408         Use WorkerLoaderProxy instead of WorkerMessagingProxy for the MainThreadBridge.
409         Mostly rename.
410
411         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
412         In addition to using WorkerLoaderProxy instead of WorkerMessagingProxy, the check for
413         AskedToTerminate is removed. It seems to be an optimization for a very small number of cases
414         when worker termination is requested a very short time before the request to load something
415         (XHR or importScript) was dispatched on the main thread.
416
417         * loader/WorkerThreadableLoader.h:
418         Now keeps a pointer to WorkerLoaderProxy rather then to a WorkerMessagingProxy. This allows
419         to implement WorkerThreadableLoader for Chromium.
420
421         * workers/WorkerLoaderProxy.h: Added.
422         (WebCore::WorkerLoaderProxy::~WorkerLoaderProxy):
423
424         * workers/WorkerMessagingProxy.cpp:
425         (WebCore::WorkerMessagingProxy::startWorkerContext):
426         (WebCore::WorkerMessagingProxy::postTaskToLoader): Added ASSERT since this needs to be implemented for nested workers.
427         * workers/WorkerMessagingProxy.h:
428         Derived from WorkerLoaderProxy, the methods for posting tasks cross-thread are now virtual.
429         Removed unused postTaskToWorkerContext() method.
430
431         * workers/WorkerThread.cpp:
432         (WebCore::WorkerThread::create):
433         (WebCore::WorkerThread::WorkerThread):
434         * workers/WorkerThread.h:
435         (WebCore::WorkerThread::workerLoaderProxy):
436         * workers/WorkerThread.cpp:
437         (WebCore::WorkerThread::create):
438         (WebCore::WorkerThread::WorkerThread):
439         (WebCore::WorkerThread::workerThread):
440         * workers/WorkerThread.h:
441         (WebCore::WorkerThread::workerLoaderProxy):
442         (WebCore::WorkerThread::workerObjectProxy):
443         WorkerThread gets a new member of type WorkerLoaderProxy&, and accessor.
444         Also, existing WorkerObjectProxy* member is now WorkerObjectProxy& because it can't be null.
445
446 2009-06-08  Dimitri Glazkov  <dglazkov@chromium.org>
447
448         Reviewed by Eric Seidel.
449
450         https://bugs.webkit.org/show_bug.cgi?id=26238
451         Add parseDate helper to HTTPParsers, which uses WTF::parseDateFromNullTerminatedCharacters.
452
453         * ForwardingHeaders/runtime/DateMath.h: Removed.
454         * ForwardingHeaders/wtf/DateMath.h: Copied from WebCore/ForwardingHeaders/runtime/DateMath.h.
455         * platform/network/HTTPParsers.cpp:
456         (WebCore::parseDate): Added.
457         * platform/network/HTTPParsers.h:
458         * platform/network/ResourceResponseBase.cpp:
459         (WebCore::parseDateValueInHeader): Changed to use the new helper.
460
461 2009-06-08  Adam Langley  <agl@google.com>
462
463         Reviewed by Eric Siedel.
464
465         Chromium Linux ignored the background color on <select>s. Rather
466         than encode magic colours, we start with a base color (specified
467         via CSS) and derive the other colors from it. Thus, setting the
468         CSS background-color now correctly changes the colour of the
469         control.
470
471         This should not change the appearence controls without
472         background-colors. However, <select>s with a background-color
473         will now renderer correctly, which may require rebaselining
474         pixel tests in the Chromium tree.
475
476         https://bugs.webkit.org/show_bug.cgi?id=26030
477         http://code.google.com/p/chromium/issues/detail?id=12596
478
479         * platform/graphics/Color.cpp:
480         (WebCore::Color::getHSL): new member
481         * platform/graphics/Color.h:
482         * rendering/RenderThemeChromiumLinux.cpp:
483         (WebCore::RenderThemeChromiumLinux::systemColor):
484         (WebCore::brightenColor):
485         (WebCore::paintButtonLike):
486
487 2009-06-08  Victor Wang <victorw@chromium.org>
488
489         Reviewed by Dimitri Glazkov.
490
491         https://bugs.webkit.org/show_bug.cgi?id=26087
492         Bug 26087: Removing element in JS crashes Chrome tab if it fired the change event
493
494         Fix tab crash caused by destroying the popup list that fired the change event on abandon.
495
496         If a popup list is abandoned (press a key to jump to an item
497         and then use tab or mouse to get away from the select box),
498         the current code fires a change event in PopupListBox::updateFromElemt().
499         The JS that listens to this event may destroy the object and cause the
500         rest of popup list code crashes.
501
502         The updateFromElement() is called before abandon() and this causes
503         the selected index to be discarded after updateFromElement(). From
504         the code comments, this appears to be the reason why valueChanged is
505         called in updateFromElement.
506
507         Fix the issue by removing the valueChanged call in updateFromElement,
508         saving the selected index that we should accept on abandon and pass
509         it to the valueChange in abandon().
510
511         A manual test has been added.
512
513         * manual-tests/chromium: Added.
514         * manual-tests/chromium/onchange-reload-popup.html: Added.
515         * platform/chromium/PopupMenuChromium.cpp:
516         (WebCore::PopupListBox::PopupListBox):
517         (WebCore::PopupListBox::handleKeyEvent):
518         (WebCore::PopupListBox::abandon):
519         (WebCore::PopupListBox::updateFromElement):
520
521 2009-06-08  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
522
523         Reviewed by Simon Hausmann.
524
525         [Qt] Disable a few warnings on Windows
526
527         * WebCore.pro:
528
529 2009-06-08  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
530
531         Reviewed by Simon Hausmann.
532
533         [Qt] Don't enable ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH on Windows
534         
535         This define was brought in after refactoring some code from
536         PluginPackage(Qt|Gtk).cpp into the shared PluginPackage.cpp.
537
538         * WebCore.pro:
539
540 2009-06-08  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
541
542         Reviewed by Simon Hausmann.
543
544         [Qt] Use $QMAKE_PATH_SEP instead of hardcoded / to fix Windows build
545
546         * WebCore.pro:
547
548 2009-06-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
549
550         Reviewed by Ariya Hidayat.
551
552         [Qt] Build fix when NETSCAPE_PLUGIN_API support is turned off
553         https://bugs.webkit.org/show_bug.cgi?id=26244
554
555         * WebCore.pro: Define PLUGIN_PACKAGE_SIMPLE_HASH only if
556         NETSCAPE_PLUGIN_API is turned on
557         * plugins/PluginPackage.cpp: Guard initializeBrowserFuncs()
558         * plugins/PluginViewNone.cpp: Match guards with PluginView.h
559
560 2009-06-07  Dan Bernstein  <mitz@apple.com>
561
562         Reviewed by Sam Weinig.
563
564         - fix <rdar://problem/6931661> -[WebView _selectionIsAll] returns YES
565           when the selection is inside a text field.
566
567         * editing/VisibleSelection.cpp:
568         (WebCore::VisibleSelection::isAll): Return false if the selection is in
569         a shadow tree.
570
571 2009-06-07  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
572
573         Reviewed by Holger Freyther.
574
575         https://bugs.webkit.org/show_bug.cgi?id=26106
576         [GTK] Crashes when you keep a combo open during a page transition, then close it
577
578         Hide the combo popup and disconnect from its signals during
579         PopupMenu destruction to handle this exceptional case with no
580         crash.
581
582         * platform/gtk/PopupMenuGtk.cpp:
583         (WebCore::PopupMenu::~PopupMenu):
584         (WebCore::PopupMenu::menuUnmapped):
585
586 2009-06-06  Sam Weinig  <sam@webkit.org>
587
588         Reviewed by Dan Bernstein.
589
590         Fix for <rdar://problem/6930540>
591         REGRESSION (r43797): Serif and fantasy font-family names are wrong in result of getComputedStyle
592
593         Test: fast/css/font-family-builtins.html
594
595         * css/CSSComputedStyleDeclaration.cpp:
596         (WebCore::identifierForFamily): Fix typo. Fantasy family should be
597         -webkit-fantasy not, -webkit-serif.
598
599 2009-06-06  Sam Weinig  <sam@webkit.org>
600
601         Reviewed by Brady Eidson.
602
603         Fix for <rdar://problem/6936235>
604         Need to support StorageEvent.storageArea to meet the Web Storage spec
605
606         * storage/LocalStorageArea.cpp:
607         (WebCore::LocalStorageArea::dispatchStorageEvent): Pass the localStorage for
608         the frame being dispatched to.
609         * storage/SessionStorageArea.cpp:
610         (WebCore::SessionStorageArea::dispatchStorageEvent): Ditto, only for sessionStorage.
611
612         * storage/StorageEvent.cpp:
613         (WebCore::StorageEvent::StorageEvent):
614         (WebCore::StorageEvent::initStorageEvent):
615         * storage/StorageEvent.h:
616         (WebCore::StorageEvent::create):
617         (WebCore::StorageEvent::storageArea):
618         * storage/StorageEvent.idl:
619         Add storageArea member.
620
621 2009-06-05  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
622
623         Reviewed by Anders Carlsson.
624
625         Fix WMLInputElement initialization code. Don't call initialize() on attach(), let
626         WMLCardElement handle initialization once, after the document has been parsed.
627
628         To keep layout tests working introduce a new function in Document.idl: initializeWMLPageState().
629         WMLTestCase.js (the wml/ layout test framework) will use it to simulate a regular WML document,
630         whose variable state gets initialized on WMLDocument::finishedParsing(). Force initialization
631         of the WML variable state, right after the dynamically created elements have been inserted into the tree.
632
633         * dom/Document.cpp:
634         (WebCore::Document::initializeWMLPageState):
635         * dom/Document.h:
636         * dom/Document.idl:
637         * wml/WMLCardElement.cpp:
638         (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded):
639         * wml/WMLDocument.cpp:
640         (WebCore::WMLDocument::finishedParsing):
641         (WebCore::WMLDocument::initialize):
642         * wml/WMLDocument.h:
643         * wml/WMLInputElement.cpp:
644         (WebCore::WMLInputElement::initialize):
645         * wml/WMLInputElement.h:
646
647 2009-06-05  Sam Weinig  <sam@webkit.org>
648
649         Reviewed by Anders Carlsson.
650
651         Add ononline and onoffline attributes for the <body> element. 
652
653         * html/HTMLAttributeNames.in: Added ononlineAttr and onofflineAttr.
654         * html/HTMLBodyElement.cpp:
655         (WebCore::HTMLBodyElement::parseMappedAttribute): Map ononlineAttr
656         and onofflineAttr to window event listeners.
657
658 2009-06-05  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
659
660         Reviewed by Simon Hausmann.
661
662         [Qt] Add missing includes of config.h
663
664         * platform/qt/QWebPopup.cpp:
665         * platform/text/qt/TextBreakIteratorQt.cpp:
666
667 2009-06-05  Fumitoshi Ukai  <ukai@google.com>
668
669         Reviewed by Dimitri Glazkov.
670
671         https://bugs.webkit.org/show_bug.cgi?id=26215
672         Try to fix the Chromium build.
673
674         * platform/graphics/chromium/GlyphPageTreeNodeChromiumWin.cpp:
675         (WebCore::fillBMPGlyphs):
676         (WebCore::fillNonBMPGlyphs):
677
678 2009-06-05  Shinichiro Hamaji  <hamaji@chromium.org>
679
680         Bug 26160: Compile fails in MacOSX when GNU fileutils are installed
681
682         <https://bugs.webkit.org/show_bug.cgi?id=26160>
683
684         Reviewed by Alexey Proskuryakov.
685
686         Use /bin/ln instead of ln for cases where this command is used with -h option.
687         As this option is not supported by GNU fileutils, this change helps users 
688         who have GNU fileutils in their PATH.
689
690         * WebCore.xcodeproj/project.pbxproj:
691
692 2009-06-03  Ben Murdoch  <benm@google.com>
693
694         <https://bugs.webkit.org/show_bug.cgi?id=25710> HTML5 Database stops executing transactions if the URL hash changes while a transaction is open and an XHR is in progress.
695
696         Reviewed by Alexey Proskuryakov.
697
698         Fix a bug that causes database transactions to fail if a history navigation to a hash fragment of the same document is made while resources (e.g. an XHR) are loading
699
700         Test: storage/hash-change-with-xhr.html
701
702         * loader/DocumentLoader.cpp:
703         (WebCore::DocumentLoader::stopLoading):
704         * loader/DocumentLoader.h:
705         * loader/FrameLoader.cpp:
706         (WebCore::FrameLoader::stopLoading):
707         (WebCore::FrameLoader::stopAllLoaders):
708         * loader/FrameLoader.h:
709         * loader/FrameLoaderTypes.h:
710         (WebCore::):
711         * page/Page.cpp:
712         (WebCore::Page::goToItem):
713         * WebCore.base.exp:
714
715 2009-06-03  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
716
717         Reviewed by Simon Hausmann.
718
719         [Qt] Make sure the correct config.h is included when shadowbuilding
720
721         * WebCore.pro:
722
723 2009-06-05  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
724
725         Reviewed by Simon Hausmann.
726
727         Fix Qt build after r44452
728
729         * platform/network/qt/QNetworkReplyHandler.cpp:
730         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
731
732 2009-06-05  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
733
734         Reviewed by Simon Hausmann.
735
736         [Qt] Remove some dead code (MenuEventProxy)
737
738         * WebCore.pro:
739         * platform/ContextMenu.h:
740         * platform/qt/ContextMenuQt.cpp:
741         * platform/qt/MenuEventProxy.h: Removed.
742
743 2009-06-05  Xan Lopez  <xlopez@igalia.com>
744
745         More build fixes.
746
747         * platform/graphics/gtk/GlyphPageTreeNodePango.cpp:
748         (WebCore::GlyphPage::fill):
749
750 2009-06-05  Xan Lopez  <xlopez@igalia.com>
751
752         Fix the GTK+ build.
753
754         * GNUmakefile.am:
755         * platform/graphics/gtk/FontCacheGtk.cpp:
756         (WebCore::FontCache::getFontDataForCharacters):
757         * platform/graphics/gtk/GlyphPageTreeNodeGtk.cpp:
758         (WebCore::GlyphPage::fill):
759
760 2009-06-05  Antti Koivisto  <antti@apple.com>
761
762         Try to fix Windows (and possibly other platforms) build.
763
764         Restore ResourceResponseBase::lastModifiedDate() and setLastModifiedDate() removed in previous commit.
765         for now since PluginStream used on some platforms expects them and calculations differ from plain 
766         Last-modified header value.
767         
768         Also include <wtf/MathExtras.h> to get isfinite().
769
770         * platform/network/ResourceResponseBase.cpp:
771         (WebCore::ResourceResponseBase::adopt):
772         (WebCore::ResourceResponseBase::copyData):
773         (WebCore::ResourceResponseBase::setLastModifiedDate):
774         (WebCore::ResourceResponseBase::lastModifiedDate):
775         * platform/network/ResourceResponseBase.h:
776         * platform/network/cf/ResourceResponseCFNet.cpp:
777         (WebCore::ResourceResponse::platformLazyInit):
778
779 2009-06-03  Antti Koivisto  <antti@apple.com>
780
781         Reviewed by Dave Kilzer.
782
783         https://bugs.webkit.org/show_bug.cgi?id=13128
784         Safari not obeying cache header
785         
786         Implement RFC 2616 cache expiration calculations in WebKit instead of
787         relying on the networking layer.
788
789         * ForwardingHeaders/runtime/DateMath.h: Added.
790         * WebCore.base.exp:
791         * loader/Cache.cpp:
792         (WebCore::Cache::revalidationSucceeded):
793         * loader/CachedResource.cpp:
794         (WebCore::CachedResource::CachedResource):
795         (WebCore::CachedResource::isExpired):
796         (WebCore::CachedResource::currentAge):
797         (WebCore::CachedResource::freshnessLifetime):
798         (WebCore::CachedResource::setResponse):
799         (WebCore::CachedResource::updateResponseAfterRevalidation):
800         (WebCore::CachedResource::mustRevalidate):
801         * loader/CachedResource.h:
802         * platform/network/ResourceResponseBase.cpp:
803         (WebCore::ResourceResponseBase::ResourceResponseBase):
804         (WebCore::ResourceResponseBase::adopt):
805         (WebCore::ResourceResponseBase::copyData):
806         (WebCore::ResourceResponseBase::setHTTPHeaderField):
807         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
808         (WebCore::ResourceResponseBase::cacheControlContainsNoCache):
809         (WebCore::ResourceResponseBase::cacheControlContainsMustRevalidate):
810         (WebCore::ResourceResponseBase::cacheControlMaxAge):
811         (WebCore::parseDateValueInHeader):
812         (WebCore::ResourceResponseBase::date):
813         (WebCore::ResourceResponseBase::age):
814         (WebCore::ResourceResponseBase::expires):
815         (WebCore::ResourceResponseBase::lastModified):
816         (WebCore::ResourceResponseBase::isAttachment):
817         (WebCore::ResourceResponseBase::compare):
818         * platform/network/ResourceResponseBase.h:
819         * platform/network/cf/ResourceResponseCFNet.cpp:
820         (WebCore::ResourceResponse::platformLazyInit):
821         * platform/network/mac/ResourceResponseMac.mm:
822         (WebCore::ResourceResponse::platformLazyInit):
823
824 2009-06-04  Roland Steiner <rolandsteiner@google.com>
825
826         Reviewed by Eric Seidel.
827
828         Bug 26201: Remove superfluous 'if' statements in RenderTable::addChild
829         https://bugs.webkit.org/show_bug.cgi?id=26201
830
831         * rendering/RenderTable.cpp:
832         (WebCore::RenderTable::addChild): remove superfluous 'if' statements
833        
834
835 2009-06-04  Roland Steiner <rolandsteiner@google.com>
836
837         Reviewed by Eric Seidel.
838
839         Bug 26202: add macros for primitive values to simplify CSSStyleSelector::applyProperty
840         https://bugs.webkit.org/show_bug.cgi?id=26202
841
842         * css/CSSStyleSelector.cpp: add HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE[_WITH_VALUE] macros
843         (WebCore::CSSStyleSelector::applyProperty): use new macros
844
845 2009-06-04  Roland Steiner <rolandsteiner@google.com>
846
847         Reviewed by Eric Seidel
848
849         Bug 26203: Move parsing of 'attr(X)' values to own method
850         https://bugs.webkit.org/show_bug.cgi?id=26203
851
852         * css/CSSParser.cpp:
853         (WebCore::CSSParser::parseAttr): new method
854         (WebCore::CSSParser::parseContent): use new parseAttr method
855         * css/CSSParser.h:
856         (WebCore::CSSParser::parseAttr): new method
857
858 2009-06-04  Roland Steiner <rolandsteiner@google.com>
859
860         Reviewed by Eric Seidel.
861
862         Bug 26205: RenderTableSection::addChild : correct comment
863         https://bugs.webkit.org/show_bug.cgi?id=26205
864
865         * rendering/RenderTableSection.cpp:
866         (WebCore::RenderTableSection::addChild): correct comment
867
868 2009-06-04  Roland Steiner <rolandsteiner@google.com>
869
870         Reviewed by Eric Seidel.
871
872         Bug 26204: RenderBlock : simplify handleSpecialChild, comment correction
873         https://bugs.webkit.org/show_bug.cgi?id=26204
874
875         * rendering/RenderBlock.cpp:
876         (WebCore::RenderBlock::handleSpecialChild): simplify usage
877         (WebCore::RenderBlock::handlePositionedChild): simplify usage
878         (WebCore::RenderBlock::handleFloatingChild): simplify usage
879         (WebCore::RenderBlock::handleRunInChild): simplify usage
880         (WebCore::RenderBlock::layoutBlock): correct comment
881         (WebCore::RenderBlock::layoutBlockChildren): simplify loop, change call to handleSpecialChild
882         * rendering/RenderBlock.h: 
883         (WebCore::RenderBlock::handleSpecialChild): change signature
884         (WebCore::RenderBlock::handlePositionedChild): change signature
885         (WebCore::RenderBlock::handleFloatingChild): change signature
886         (WebCore::RenderBlock::handleRunInChild): change signature
887
888 2009-06-04  Dan Bernstein  <mitz@apple.com>
889
890         - retry to fix the Tiger build
891
892         * platform/graphics/mac/SimpleFontDataMac.mm:
893         (WebCore::initFontData):
894
895 2009-06-04  Dan Bernstein  <mitz@apple.com>
896
897         - try to fix the Tiger build
898
899         * platform/graphics/SimpleFontData.h:
900
901 2009-06-04  Dan Bernstein  <mitz@apple.com>
902
903         - try to fix the Leopard and Tiger builds
904
905         * platform/graphics/SimpleFontData.h:
906
907 2009-06-04  Dan Bernstein  <mitz@apple.com>
908
909         - try to fix the Windows build
910
911         * platform/graphics/win/UniscribeController.cpp:
912         (WebCore::UniscribeController::shapeAndPlaceItem):
913
914 2009-06-04  Dan Bernstein  <mitz@apple.com>
915
916         Reviewed by Sam Weinig.
917
918         - make SimpleFontData's data members private
919         - rename SimpleFontData's m_font member to m_platformData
920
921         * platform/graphics/Font.h:
922         (WebCore::Font::spaceWidth):
923         * platform/graphics/SimpleFontData.cpp:
924         (WebCore::SimpleFontData::SimpleFontData):
925         * platform/graphics/SimpleFontData.h:
926         (WebCore::SimpleFontData::platformData):
927         (WebCore::SimpleFontData::spaceWidth):
928         (WebCore::SimpleFontData::adjustedSpaceWidth):
929         (WebCore::SimpleFontData::syntheticBoldOffset):
930         (WebCore::SimpleFontData::spaceGlyph):
931         (WebCore::SimpleFontData::getNSFont):
932         (WebCore::SimpleFontData::getQtFont):
933         (WebCore::SimpleFontData::getWxFont):
934         * platform/graphics/WidthIterator.cpp:
935         (WebCore::WidthIterator::advance):
936         * platform/graphics/cairo/FontCairo.cpp:
937         (WebCore::Font::drawGlyphs):
938         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
939         (WebCore::SimpleFontData::platformInit):
940         (WebCore::SimpleFontData::smallCapsFontData):
941         (WebCore::SimpleFontData::determinePitch):
942         (WebCore::SimpleFontData::platformWidthForGlyph):
943         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
944         (WebCore::SimpleFontData::platformInit):
945         (WebCore::SimpleFontData::smallCapsFontData):
946         (WebCore::SimpleFontData::containsCharacters):
947         (WebCore::SimpleFontData::platformWidthForGlyph):
948         * platform/graphics/gtk/FontGtk.cpp:
949         (WebCore::setPangoAttributes):
950         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
951         (WebCore::SimpleFontData::platformInit):
952         (WebCore::SimpleFontData::containsCharacters):
953         (WebCore::SimpleFontData::determinePitch):
954         (WebCore::SimpleFontData::platformWidthForGlyph):
955         (WebCore::SimpleFontData::setFont):
956         * platform/graphics/gtk/SimpleFontDataPango.cpp:
957         (WebCore::SimpleFontData::platformInit):
958         (WebCore::SimpleFontData::containsCharacters):
959         (WebCore::SimpleFontData::determinePitch):
960         (WebCore::SimpleFontData::platformWidthForGlyph):
961         (WebCore::SimpleFontData::setFont):
962         * platform/graphics/mac/CoreTextController.cpp:
963         (WebCore::CoreTextController::adjustGlyphsAndAdvances):
964         * platform/graphics/mac/FontMac.mm:
965         (WebCore::Font::drawGlyphs):
966         * platform/graphics/mac/FontMacATSUI.mm:
967         (WebCore::initializeATSUStyle):
968         (WebCore::overrideLayoutOperation):
969         (WebCore::ATSULayoutParameters::initialize):
970         * platform/graphics/mac/SimpleFontDataMac.mm:
971         (WebCore::initFontData):
972         (WebCore::SimpleFontData::platformInit):
973         (WebCore::SimpleFontData::platformCharWidthInit):
974         (WebCore::SimpleFontData::smallCapsFontData):
975         (WebCore::SimpleFontData::containsCharacters):
976         (WebCore::SimpleFontData::determinePitch):
977         (WebCore::SimpleFontData::platformWidthForGlyph):
978         (WebCore::SimpleFontData::checkShapesArabic):
979         (WebCore::SimpleFontData::getCTFont):
980         * platform/graphics/qt/SimpleFontDataQt.cpp:
981         (WebCore::SimpleFontData::determinePitch):
982         (WebCore::SimpleFontData::platformInit):
983         (WebCore::SimpleFontData::platformCharWidthInit):
984         * platform/graphics/win/FontCGWin.cpp:
985         (WebCore::drawGDIGlyphs):
986         (WebCore::Font::drawGlyphs):
987         * platform/graphics/win/SimpleFontDataCGWin.cpp:
988         (WebCore::SimpleFontData::platformInit):
989         (WebCore::SimpleFontData::platformCharWidthInit):
990         (WebCore::SimpleFontData::platformWidthForGlyph):
991         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
992         (WebCore::SimpleFontData::platformInit):
993         (WebCore::SimpleFontData::platformDestroy):
994         (WebCore::SimpleFontData::platformWidthForGlyph):
995         (WebCore::SimpleFontData::setFont):
996         * platform/graphics/win/SimpleFontDataWin.cpp:
997         (WebCore::SimpleFontData::initGDIFont):
998         (WebCore::SimpleFontData::smallCapsFontData):
999         (WebCore::SimpleFontData::containsCharacters):
1000         (WebCore::SimpleFontData::determinePitch):
1001         (WebCore::SimpleFontData::widthForGDIGlyph):
1002         (WebCore::SimpleFontData::scriptFontProperties):
1003         * platform/graphics/wx/SimpleFontDataWx.cpp:
1004         (WebCore::SimpleFontData::platformInit):
1005         (WebCore::SimpleFontData::determinePitch):
1006         (WebCore::SimpleFontData::platformWidthForGlyph):
1007
1008 2009-06-04  Paul Godavari  <paul@chromium.org>
1009
1010         Reviewed by Eric Seidel.
1011
1012         Initialize the width of PopupMenuListBox properly for Mac Chromium.
1013
1014         Added a test that works only with this patch applied. The test is
1015         a manual one, since the hit testing infrastructure in the layout
1016         tests sends keyboard and mouse events to the main window and not
1017         the cocoa control that implements the popup up, which means we can't
1018         select items from the popup up.
1019
1020         https://bugs.webkit.org/show_bug.cgi?id=25904
1021
1022
1023         * manual-tests/select-narrow-width.html: Added.
1024         * platform/chromium/PopupMenuChromium.cpp:
1025         (WebCore::PopupListBox::PopupListBox):
1026         (WebCore::PopupContainer::showExternal):
1027
1028 2009-06-04  Brent Fulgham  <bfulgham@webkit.org>
1029
1030         Unreviewed Windows build correction.
1031
1032         * WebCore.vcproj/WebCore.vcproj: Add missing 'ReplaceNodeWithSpanCommand.cpp'
1033           and 'ReplaceNodeWithSpanCommand.h'
1034
1035 2009-02-03  Eric Seidel  <eric@webkit.org>
1036
1037         Reviewed by Justin Garcia.
1038
1039         Make sure execCommand("bold") on <b style="text-decoration: underline">test</b>
1040         only removes the bold and not the underline.
1041         https://bugs.webkit.org/show_bug.cgi?id=23496
1042
1043         Test: editing/execCommand/convert-style-elements-to-spans.html
1044
1045         * WebCore.xcodeproj/project.pbxproj:
1046         * css/CSSStyleDeclaration.h:
1047         (WebCore::CSSStyleDeclaration::isEmpty):
1048         * dom/NamedAttrMap.h:
1049         (WebCore::NamedAttrMap::isEmpty):
1050         * editing/ApplyStyleCommand.cpp:
1051         (WebCore::isUnstyledStyleSpan):
1052         (WebCore::isSpanWithoutAttributesOrUnstyleStyleSpan):
1053         (WebCore::ApplyStyleCommand::applyBlockStyle):
1054         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1055         (WebCore::ApplyStyleCommand::implicitlyStyledElementShouldBeRemovedWhenApplyingStyle):
1056         (WebCore::ApplyStyleCommand::replaceWithSpanOrRemoveIfWithoutAttributes):
1057         (WebCore::ApplyStyleCommand::removeCSSStyle):
1058         (WebCore::ApplyStyleCommand::applyTextDecorationStyle):
1059         (WebCore::ApplyStyleCommand::removeInlineStyle):
1060         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
1061         * editing/ApplyStyleCommand.h:
1062         * editing/CompositeEditCommand.cpp:
1063         (WebCore::CompositeEditCommand::replaceNodeWithSpanPreservingChildrenAndAttributes):
1064         * editing/CompositeEditCommand.h:
1065         * editing/RemoveNodePreservingChildrenCommand.cpp:
1066         (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
1067         * editing/ReplaceNodeWithSpanCommand.cpp: Added.
1068         (WebCore::ReplaceNodeWithSpanCommand::ReplaceNodeWithSpanCommand):
1069         (WebCore::swapInNodePreservingAttributesAndChildren):
1070         (WebCore::ReplaceNodeWithSpanCommand::doApply):
1071         (WebCore::ReplaceNodeWithSpanCommand::doUnapply):
1072         * editing/ReplaceNodeWithSpanCommand.h: Added.
1073         (WebCore::ReplaceNodeWithSpanCommand::create):
1074
1075 2009-06-04  Brent Fulgham  <bfulgham@webkit.org>
1076
1077         Unreviewed build fix for Windows Cairo target.
1078
1079         Add missing post-build command to copy history/cf contents
1080         to output directory.
1081
1082         * WebCore.vcproj/WebCore.vcproj: Update Debug_Cairo and Release_Cairo
1083           target post-build steps with copy commands.
1084
1085 2009-06-04  Pierre d'Herbemont  <pdherbemont@apple.com>
1086
1087         Reviewed by Simon Fraser.
1088
1089         <rdar://problem/6854695> Movie controller thumb fails to scale with full page zoom
1090         
1091         Account for zoom level when drawing media controller thumb on Windows.
1092
1093         * rendering/RenderMediaControls.cpp:
1094         (WebCore::RenderMediaControls::adjustMediaSliderThumbSize):
1095
1096 2009-06-04  David Hyatt  <hyatt@apple.com>
1097
1098         Reviewed by Sam Weinig.
1099
1100         Move DOM window focus/blur out of SelectionController and into FocusController.  Make sure it
1101         fires on the focused frame when the page activation state changes also.  This is covered by an existing
1102         layout test (albeit badly).  I have modified the test to be correct.
1103
1104         * editing/SelectionController.cpp:
1105         (WebCore::SelectionController::setFocused):
1106         * page/FocusController.cpp:
1107         (WebCore::FocusController::setFocusedFrame):
1108         (WebCore::FocusController::setActive):
1109
1110 2009-06-04  Albert J. Wong  <ajwong@chromium.org>
1111
1112         Reviewed by Eric Seidel.
1113
1114         https://bugs.webkit.org/show_bug.cgi?id=26148
1115         Adding in empty files to stage the extract of RenderThemeChromiumSkia
1116         from RenderThemeChromiumLinux and RenderThemeChromiumWindows.
1117
1118         * rendering/RenderThemeChromiumSkia.cpp: Added.
1119         * rendering/RenderThemeChromiumSkia.h: Added.
1120
1121 2009-06-04  Andrei Popescu <andreip@google.com>
1122
1123         Reviewed by Alexey Proskuryakov.
1124
1125         https://bugs.webkit.org/show_bug.cgi?id=25562
1126         Potential crash after ApplicationCacheStorage::storeNewestCache() fails
1127
1128               Fix the crash by checking the return value of cacheStorage().storeNewestCache(this)
1129               in WebCore::ApplicationCacheGroup::checkIfLoadIsComplete. If storeNewestCache failed,
1130               we run the cache failure steps:
1131
1132         1. Fire the error events to all pending master entries, as well any other cache hosts
1133            currently associated with a cache in this group.
1134         2. Disassociate the pending master entries from the failed new cache.
1135         3. Reinstate the old "newest cache", if there was one.
1136
1137         We also introduce two other changes:
1138
1139         1. a mechanism to rollback storageID changes to the in-memory resource
1140            objects when the storing of an ApplicationCache object fails.
1141
1142         2. defer removing the pending master entries from the list of pending master entries
1143            until the entire load is complete. This matches the HTML 5 spec better. To track
1144            if the load is complete we now introduce a counter for those pending master entries
1145            that haven't yet finshed downloading.
1146
1147         * loader/appcache/ApplicationCacheGroup.cpp:
1148         (WebCore::ApplicationCacheGroup::ApplicationCacheGroup): initializes the new counter to 0
1149         (WebCore::ApplicationCacheGroup::selectCache): increments the counter when a new pending
1150         master entry is added.
1151         (WebCore::ApplicationCacheGroup::finishedLoadingMainResource): decrements the counter
1152         instead of removing the pending master entry.
1153         (WebCore::ApplicationCacheGroup::failedLoadingMainResource): decrements the counter
1154         instead of removing the pending master entry.
1155         (WebCore::ApplicationCacheGroup::setNewestCache): removes an assertion that no longer
1156         holds true. In particular, the newest cache is not necessarily new anymore. We can
1157         set an old cache as the new cache. This can happen if we failed to store a newly
1158         downloaded cache to the database and we are now reinstating the former newest cache.
1159         (WebCore::ApplicationCacheGroup::manifestNotFound): resets the counter to 0.
1160         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete): check if the loading is complete
1161         based on the counter instead of the list of pending master entries. Empty the list of
1162         master entries if the load is complete.
1163         * loader/appcache/ApplicationCacheGroup.h: add the new counter.
1164         * loader/appcache/ApplicationCacheStorage.cpp: introduce the journaling mechanism for
1165         in-memory resource objects.
1166         (WebCore::ResourceStorageIDJournal::~ResourceStorageIDJournal):
1167         (WebCore::ResourceStorageIDJournal::add):
1168         (WebCore::ResourceStorageIDJournal::commit):
1169         (WebCore::ResourceStorageIDJournal::Record::Record):
1170         (WebCore::ResourceStorageIDJournal::Record::restore):
1171         (WebCore::ApplicationCacheStorage::store): log the changes to the in-memory resource
1172         objects.
1173         (WebCore::ApplicationCacheStorage::storeNewestCache): create the journal object.
1174         * loader/appcache/ApplicationCacheStorage.h:  modify the signature of
1175         bool store(ApplicationCache*) to add a pointer to the logger object used to
1176         trace the changes to the storageID of the resource objects.
1177
1178 2009-06-04  Jeremy Orlow  <jorlow@chromium.org>
1179
1180         Reviewed by Darin Adler.
1181
1182         https://bugs.webkit.org/show_bug.cgi?id=26154
1183         Allow underscores in the hostnames we parse out of databaseIdentifiers.
1184         This code is used for HTML 5 database support.
1185
1186         * page/SecurityOrigin.cpp:
1187         (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
1188
1189 2009-06-04  Mihnea Ovidenie  <mihnea@adobe.com>
1190
1191         Reviewed by Darin Adler.
1192
1193         Bug 26084: Multiple missing images in webkit-mask-image prevent rendering
1194         https://bugs.webkit.org/show_bug.cgi?id=26084
1195
1196         When painting multiple images, make sure that at least one image is valid before pushing a transparency layer.
1197
1198         Added a manual test.
1199
1200         * manual-tests/mask-composite-missing-images.html: Added.
1201         * rendering/RenderBox.cpp:
1202         (WebCore::RenderBox::paintMaskImages):
1203
1204 2009-06-04  Jeremy Orlow  <jorlow@chromium.org>
1205
1206         Reviewed by Darin Adler.
1207
1208         https://bugs.webkit.org/show_bug.cgi?id=26180
1209         Add a fast path for SecurityOrigin::equal. If "other == this" (where
1210         other is the other security origin), then we really don't need to do
1211         all the other (expensive) comparisons. We know it's equal.
1212
1213         * page/SecurityOrigin.cpp:
1214         (WebCore::SecurityOrigin::equal):
1215
1216 2009-06-03  David Hyatt  <hyatt@apple.com>
1217
1218         Reviewed by Sam Weinig.
1219
1220         Improvements in how selection behaves with focus/activation and a reversion back to using isActive
1221         in the scrollbar theme code to remove a Chromium ifdef.
1222
1223         * editing/SelectionController.cpp:
1224         (WebCore::SelectionController::SelectionController):
1225         Make the controller set its focused state correctly upon initial creation.
1226
1227         (WebCore::SelectionController::setSelection):
1228         Make selection willing to shift the focus node if the selection is focused even if the
1229         selection is not active.  Whether or not the Page is active is irrelevant to focus changes.
1230
1231         (WebCore::SelectionController::setFocused):
1232         * editing/SelectionController.h:
1233         (WebCore::SelectionController::isFocused):
1234         Add a new isFocused() method so that code can check if the Selection is focused without caring
1235         about the active state.
1236
1237         * page/Frame.cpp:
1238         (WebCore::Frame::setFocusedNodeIfNeeded):
1239         Allow focus shifts even when the selection is not active.
1240
1241         * platform/mac/ScrollbarThemeMac.mm:
1242         (WebCore::ScrollbarThemeMac::paint):
1243         Revert Dan's change to directly talk to AppKit for checking active state.  Now that the WebCore isActive
1244         method works, ditch the Chromium-specific #ifdef and go back to the original code.
1245
1246 2009-06-04  Pierre d'Herbemont  <pdherbemont@apple.com>
1247
1248         Reviewed by Darin Adler.
1249
1250         Test: media/before-load-member-access.html
1251         
1252         https://bugs.webkit.org/show_bug.cgi?id=26081
1253
1254         * html/HTMLMediaElement.cpp:
1255         (WebCore::HTMLMediaElement::played): Ensure that if m_playedTimeRanges,
1256         is not initialized we return a valid range, and don't attempt to use it.
1257
1258 2009-06-03  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
1259
1260         Reviewed by Simon Hausmann.
1261
1262         Implement a way to invalidate the FontCache used by the Qt port.
1263
1264         * platform/graphics/qt/FontCacheQt.cpp:
1265         (WebCore::FontCache::invalidate):
1266
1267 2009-06-04  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1268
1269         Reviewed by Ariya Hidayat.
1270
1271         https://bugs.webkit.org/show_bug.cgi?id=26015
1272
1273         [Qt] Single-threaded QtWebKit configuration
1274
1275         Turn off Database, DOM storage, icon database and Web Workers support
1276         when ENABLE_SINGLE_THREADED is turned on.
1277
1278         Set SQLITE_THREADSAFE to false to turn off SQLite mutexes
1279         when ENABLE_SINGLE_THREADED is turned on.
1280
1281         * WebCore.pro:
1282
1283 2009-06-03  Dan Bernstein  <mitz@apple.com>
1284
1285         Reviewed by Sam Weinig.
1286
1287         - add some assertions that Font methods are used on the main thread
1288
1289         * platform/graphics/Font.cpp:
1290         (WebCore::Font::setShouldUseSmoothing):
1291         * platform/graphics/Font.h:
1292         (WebCore::Font::primaryFont):
1293         * platform/graphics/FontFastPath.cpp:
1294         (WebCore::Font::glyphDataForCharacter):
1295
1296 2009-06-03  Dan Bernstein  <mitz@apple.com>
1297
1298         - Windows build fix
1299
1300         Rolled out apparently-accidental changes to config.h from r44398. These
1301         were not part of the patch as reviewed.
1302
1303         * config.h:
1304
1305 2009-06-03  Dmitry Titov  <dimich@chromium.org>
1306
1307         Not reviewed, Chromium build fix.
1308
1309         https://bugs.webkit.org/show_bug.cgi?id=26177
1310         Reverting 'private' to 'protected' on 2 classes.
1311         Chromium glue layer (not yet in Webkit tree) relies on ability to derive
1312         Chromium-specific platform classes and access the data members.
1313         See bug for more details.
1314
1315         * platform/PlatformMouseEvent.h:
1316         * platform/PlatformWheelEvent.h:
1317
1318 2009-06-03  Chris Marrin  <cmarrin@apple.com>
1319
1320         Reviewed by Simon Fraser <simonfr@apple.com>.
1321
1322         Fixed https://bugs.webkit.org/show_bug.cgi?id=26162
1323
1324         This corrects an error when destroying an animation
1325         or transition where endAnimation was never getting
1326         called and therefore the hardware animation was never
1327         getting removed.
1328
1329         This includes a manual-test since it's really impossible
1330         to make a meaningful automatic test for an animation
1331         bug like this.
1332
1333         This has no effect unless accelerated compositing is 
1334         enabled.
1335
1336         * manual-tests/interrupted-compound-transform.html: Added.
1337         * page/animation/ImplicitAnimation.cpp:
1338         (WebCore::ImplicitAnimation::~ImplicitAnimation):
1339         * page/animation/KeyframeAnimation.cpp:
1340         (WebCore::KeyframeAnimation::~KeyframeAnimation):
1341
1342 2009-06-03  Adam Langley  <agl@google.com>
1343
1344         Reviewed by Eric Seidel.
1345
1346         Make the scrollbar thumb size twice the width for Chromium Linux. This
1347         matches Firefox on Linux.
1348
1349         This will need layout test pixel results to be rebaselined in the
1350         Chromium tree.
1351
1352         http://code.google.com/p/chromium/issues/detail?id=12602
1353         https://bugs.webkit.org/show_bug.cgi?id=26176
1354
1355         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
1356         (WebCore::ScrollbarThemeChromiumLinux::minimumThumbLength):
1357         * platform/chromium/ScrollbarThemeChromiumLinux.h:
1358
1359 2009-06-03  Adam Langley  <agl@google.com>
1360
1361         Reviewed by Eric Seidel.
1362
1363         Change Chromium scrollbar theme code to use different classes on
1364         Windows and Linux rather than suppling symbols. The ScrollbarTheme
1365         class is already using virtual dispatch, so there's no reason not to.
1366
1367         This should not affect any layout tests.
1368
1369         https://bugs.webkit.org/show_bug.cgi?id=26174
1370
1371         * platform/chromium/ScrollbarThemeChromium.cpp:
1372         * platform/chromium/ScrollbarThemeChromium.h:
1373         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
1374         (WebCore::ScrollbarTheme::nativeTheme):
1375         (WebCore::ScrollbarThemeChromiumLinux::scrollbarThickness):
1376         (WebCore::ScrollbarThemeChromiumLinux::paintTrackPiece):
1377         (WebCore::ScrollbarThemeChromiumLinux::paintButton):
1378         (WebCore::ScrollbarThemeChromiumLinux::paintThumb):
1379         (WebCore::ScrollbarThemeChromiumLinux::buttonSize):
1380         * platform/chromium/ScrollbarThemeChromiumLinux.h: Added.
1381         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
1382         (WebCore::ScrollbarTheme::nativeTheme):
1383         (WebCore::ScrollbarThemeChromiumWin::scrollbarThickness):
1384         (WebCore::ScrollbarThemeChromiumWin::invalidateOnMouseEnterExit):
1385         (WebCore::ScrollbarThemeChromiumWin::shouldSnapBackToDragOrigin):
1386         (WebCore::ScrollbarThemeChromiumWin::paintTrackPiece):
1387         (WebCore::ScrollbarThemeChromiumWin::paintButton):
1388         (WebCore::ScrollbarThemeChromiumWin::paintThumb):
1389         (WebCore::ScrollbarThemeChromiumWin::getThemeState):
1390         (WebCore::ScrollbarThemeChromiumWin::getThemeArrowState):
1391         (WebCore::ScrollbarThemeChromiumWin::getClassicThemeState):
1392         (WebCore::ScrollbarThemeChromiumWin::buttonSize):
1393         * platform/chromium/ScrollbarThemeChromiumWin.h: Added.
1394
1395 2009-06-03  Pavel Feldman  <pfeldman@chromium.org>
1396
1397         Reviewed by Timothy Hatcher.
1398
1399         Enabling debugger requires that Scripts panel is already attached to the
1400         render tree. The reason is that recompile events result in script sources
1401         being added into the source frames. Prior to the global options introduced,
1402         debugger was enabled from the Scripts panel, so that it was guaranteed to
1403         exist. The InspectorController::enableDebugger API calls with no inspector
1404         frontend showing were failing though.
1405
1406         https://bugs.webkit.org/show_bug.cgi?id=26145
1407
1408         * WebCore.base.exp:
1409         * inspector/InspectorController.cpp:
1410         (WebCore::InspectorController::setWindowVisible):
1411         (WebCore::InspectorController::scriptObjectReady):
1412         (WebCore::InspectorController::enableDebuggerFromFrontend):
1413         (WebCore::InspectorController::enableDebugger):
1414         * inspector/InspectorController.h:
1415         * inspector/InspectorController.idl:
1416         * inspector/InspectorFrontend.cpp:
1417         (WebCore::InspectorFrontend::attachDebuggerWhenShown):
1418         * inspector/InspectorFrontend.h:
1419         * inspector/front-end/ScriptsPanel.js:
1420         (WebInspector.ScriptsPanel.prototype.show):
1421         (WebInspector.ScriptsPanel.prototype.attachDebuggerWhenShown):
1422         * inspector/front-end/inspector.js:
1423         (WebInspector.attachDebuggerWhenShown):
1424
1425 2009-06-03  Dan Bernstein  <mitz@apple.com>
1426
1427         Reviewed by Anders Carlsson.
1428
1429         - fix a regression from the previous patch
1430
1431         * platform/graphics/Font.cpp: Initialize shouldUseFontSmoothing to true.
1432
1433 2009-06-03  Dan Bernstein  <mitz@apple.com>
1434
1435         Reviewed by Anders Carlsson.
1436
1437         - eliminate WebCoreTextRenderer
1438
1439         * WebCore.base.exp: Updated.
1440         * WebCore.xcodeproj/project.pbxproj: Removed WebCoreTextRenderer.{h,mm}
1441             and promoted WebFontCache.h to private.
1442         * platform/graphics/Font.cpp:
1443         (WebCore::Font::setShouldUseSmoothing): Added this static setter for
1444             a new file-static boolean.
1445         (WebCore::Font::shouldUseSmoothing): Added this static getter.
1446         * platform/graphics/Font.h: Decleared setShouldUseSmoothing() and
1447             shouldUseSmoothing().
1448         * platform/graphics/mac/FontMac.mm:
1449         (WebCore::Font::drawGlyphs): Use Font::shouldUseSmoothing() instead of
1450         WebCoreShouldUseFontSmoothing().
1451         * platform/graphics/mac/WebLayer.mm: Removed unneeded #import.
1452         * platform/mac/WebCoreTextRenderer.h: Removed.
1453         * platform/mac/WebCoreTextRenderer.mm: Removed.
1454
1455 2009-06-03  David Levin  <levin@chromium.org>
1456
1457         Reviewed by Dimitri Glazkov.
1458
1459         v8's ScriptController::evaluate should protect the Frame like the jsc version.
1460         https://bugs.webkit.org/show_bug.cgi?id=26172
1461
1462         This change is simply copying protections done for Frame in the method
1463         WebCore::ScriptController::evaluate in the file js/ScriptController.cpp.
1464
1465         * bindings/v8/ScriptController.cpp:
1466         (WebCore::ScriptController::evaluate):
1467
1468 2009-06-03  Dan Bernstein  <mitz@apple.com>
1469
1470         Reviewed by John Sullivan.
1471
1472         - fix <rdar://problem/6841120> Use CTFontManager notifications instead
1473           of ATS notifications
1474
1475         * platform/graphics/FontCache.h: Made it an error to destroy a
1476         FontCache instance.
1477         * platform/graphics/mac/FontCacheMac.mm:
1478         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback): Added
1479         this notification callback for the
1480         kCTFontManagerRegisteredFontsChangedNotification, which calls
1481         invalidate().
1482         (WebCore::FontCache::platformInit): Register for
1483         kCTFontManagerRegisteredFontsChangedNotification.
1484
1485 2009-06-03  Kevin Watters  <kevinwatters@gmail.com>
1486
1487         Reviewed by Kevin Ollivier.
1488
1489         Use CGContextShowGlyphsWithAdvances to get more accurate text rendering on Mac.
1490         
1491         https://bugs.webkit.org/show_bug.cgi?id=26161
1492
1493         * platform/wx/wxcode/mac/carbon/non-kerned-drawing.cpp:
1494         (WebCore::drawTextWithSpacing):
1495
1496 2009-06-03  Pavel Feldman  <pfeldman@chromium.org>
1497
1498         Reviewed by Timothy Hatcher.
1499
1500         Reorder ResourcesPanel components initialization to unfreeze resource list scroller.
1501
1502         https://bugs.webkit.org/show_bug.cgi?id=26159
1503
1504         * inspector/front-end/ResourcesPanel.js:
1505         (WebInspector.ResourcesPanel):
1506
1507 2009-06-03  Pavel Feldman  <pfeldman@chromium.org>
1508
1509         Reviewed by Timothy Hatcher.
1510
1511         - Fix for crash (preceded by assertion) in InspectorController::didCommitLoad
1512           when reloading or navigating with the Inspector open.
1513         - Fix for Inspector's Elements panel being empty when Inspector first appears.
1514
1515         https://bugs.webkit.org/show_bug.cgi?id=26134
1516         https://bugs.webkit.org/show_bug.cgi?id=26135
1517
1518         * inspector/InspectorController.cpp:
1519         (WebCore::InspectorController::scriptObjectReady):
1520         (WebCore::InspectorController::didLoadResourceFromMemoryCache):
1521         (WebCore::InspectorController::identifierForInitialRequest):
1522         (WebCore::InspectorController::ensureResourceTrackingSettingsLoaded):
1523         * inspector/InspectorController.h:
1524
1525 2009-06-03  Adam Roben  <aroben@apple.com>
1526
1527         Windows build fix after r44379
1528
1529         * svg/graphics/SVGImage.cpp: Move EmptyClients.h back down below the
1530         other #includes to fix a compiler warning on Windows.
1531
1532 2009-06-02  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
1533
1534         Reviewed by Simon Hausmann.
1535
1536         Add workaround for crash in Linux Flash Player when hosted by
1537         another toolkit than GTK+. Bug fixed at the Flash Player bugzilla,
1538         issue (FP-2140).
1539
1540         * plugins/qt/PluginViewQt.cpp:
1541         (WebCore::PluginView::setNPWindowIfNeeded):
1542
1543 2009-06-01  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
1544
1545         Reviewed by Simon Hausmann.
1546
1547         Refactor the Qt plugin code to use NPP_SetWindow correctly,
1548         to make resizing of plugins work.
1549
1550         Attention was paid to make sure that the windowed plugins scroll
1551         synchronized with the page view. A manual test has been added.
1552
1553         * manual-tests/qt/plugin-iframe.html: Added.
1554         * plugins/PluginView.cpp:
1555         (WebCore::PluginView::setFrameRect):
1556         (WebCore::PluginView::frameRectsChanged):
1557         * plugins/PluginView.h:
1558         * plugins/qt/PluginContainerQt.cpp:
1559         (PluginContainerQt::PluginContainerQt):
1560         * plugins/qt/PluginContainerQt.h:
1561         * plugins/qt/PluginPackageQt.cpp:
1562         (WebCore::PluginPackage::load):
1563         * plugins/qt/PluginViewQt.cpp:
1564         (WebCore::PluginView::updatePluginWidget):
1565         (WebCore::PluginView::paint):
1566         (WebCore::PluginView::setParent):
1567         (WebCore::PluginView::setNPWindowRect):
1568         (WebCore::PluginView::setNPWindowIfNeeded):
1569         (WebCore::PluginView::handlePostReadFile):
1570         (WebCore::PluginView::getValue):
1571         (WebCore::PluginView::invalidateRect):
1572         (WebCore::PluginView::init):
1573
1574 2009-06-02  Darin Adler  <darin@apple.com>
1575
1576         Reviewed by David Hyatt.
1577
1578         Bug 26112: viewless WebKit -- make events work
1579         https://bugs.webkit.org/show_bug.cgi?id=26112
1580
1581         The main fix here is to make mouse and wheel event coordinates in the coordinate
1582         system of the top level NSView rather than the NSWindow when in the viewless mode.
1583         This is the design Hyatt chose, but the event part of it wasn't done yet.
1584
1585         Also fix FrameView to do normal reference counting instead of a strange model with
1586         an explicit deref near creation time.
1587
1588         * WebCore.base.exp: Updated.
1589
1590         * page/EventHandler.cpp:
1591         (WebCore::EventHandler::eventLoopHandleMouseUp): Moved this function into the file
1592         to reduce conditionals in the header.
1593         (WebCore::EventHandler::eventLoopHandleMouseDragged): Ditto.
1594
1595         * page/EventHandler.h: Reduced includes. Fixed formatting of Objective-C types.
1596         Made currentNSEvent a static member function. Added sendContextMenuEvent and
1597         eventMayStartDrag functions that takes NSEvent * so the conversion to PlatformMouseEvent
1598         can be done here rather than in WebKit. Reduced #if by making eventLoopHandleMouseUp and
1599         eventLoopHandleMouseDragged unconditional.
1600
1601         * page/Frame.cpp:
1602         (WebCore::Frame::setView): Made this take a PassRefPtr since it takes ownership.
1603         (WebCore::Frame::createView): Changed to use RefPtr and FrameView::create and remove
1604         the explicit deref.
1605
1606         * page/Frame.h: Changed setView to take a PassRefPtr.
1607
1608         * page/FrameTree.cpp: Added newly-needed include.
1609
1610         * page/FrameView.cpp:
1611         (WebCore::FrameView::FrameView): Got rid of one of the two constructors, and removed
1612         the initialization of m_refCount and call to show from the reamining one.
1613         (WebCore::FrameView::create): Added two create functions that do what the two
1614         constructors did before, except that they return a PassRefPtr to make sure the
1615         reference counting is handled correctly.
1616         (WebCore::FrameView::~FrameView): Removed assertion from when FrameView implemented
1617         its own reference counting.
1618
1619         * page/FrameView.h: Inherit from RefCounted for reference counting. Made the
1620         constructor private and added create functions. Got rid of the hand-implemented
1621         reference counting in this class.
1622
1623         * page/mac/EventHandlerMac.mm:
1624         (WebCore::currentNSEventSlot): Renamed currentEvent to currentNSEventSlot to
1625         make it more clear how it relates to currentNSEvent.
1626         (WebCore::EventHandler::currentNSEvent): Updated.
1627         (WebCore::CurrentEventScope::CurrentEventScope): Added. Use to set/reset the
1628         current event in a foolproof way.
1629         (WebCore::CurrentEventScope::~CurrentEventScope): Ditto.
1630         (WebCore::EventHandler::wheelEvent): Use CurrentEventScope. Pass the platform
1631         window in when constructing the PlatformWheelEvent.
1632         (WebCore::EventHandler::keyEvent): Use CurrentEventScope.
1633         (WebCore::lastEventIsMouseUp): Use currentNSEvent.
1634         (WebCore::EventHandler::passMouseDownEventToWidget): Ditto.
1635         (WebCore::EventHandler::eventLoopHandleMouseDragged): Ditto.
1636         (WebCore::EventHandler::eventLoopHandleMouseUp): Ditto.
1637         (WebCore::EventHandler::passSubframeEventToSubframe): Use
1638         currentPlatformMouseEvent to get a mouse event that has the appropriate
1639         platform window passed to create it.
1640         (WebCore::EventHandler::passWheelEventToWidget): Ditto.
1641         (WebCore::EventHandler::mouseDown): Ditto.
1642         (WebCore::EventHandler::mouseDragged): Ditto.
1643         (WebCore::EventHandler::mouseUp): Ditto.
1644         (WebCore::EventHandler::mouseMoved): Ditto.
1645         (WebCore::EventHandler::currentPlatformMouseEvent): Added. Passes the
1646         platform window that's now needed to create a PlatformMouseEvent.
1647         (WebCore::EventHandler::sendContextMenuEvent): Added.
1648         (WebCore::EventHandler::eventMayStartDrag): Added.
1649
1650         * platform/HostWindow.h: Removed unneeded includes and constructor definition.
1651
1652         * platform/PlatformMouseEvent.h: Sorted things in alphabetical order.
1653         Changed Mac constructor to take a windowView as well as the event. This is
1654         needed in viewless mode, since the "window" is actually an NSView, so the
1655         event has to know which view to compute the coordinates with. Made the
1656         same change to pointForEvent.
1657         * platform/PlatformWheelEvent.h: Ditto.
1658
1659         * platform/mac/PlatformMouseEventMac.mm:
1660         (WebCore::pointForEvent): Convert point from window coordinates to view
1661         coordinates if a windowView is passed in. This is used in viewless mode.
1662         (WebCore::PlatformMouseEvent::PlatformMouseEvent): Ditto.
1663         * platform/mac/WheelEventMac.mm:
1664         (WebCore::PlatformWheelEvent::PlatformWheelEvent): Ditto.
1665
1666         * platform/mac/WidgetMac.mm:
1667         (WebCore::Widget::convertFromContainingWindow): Fixed case where there
1668         is no platform widget and no parent. Before it would yield unpredictable
1669         results because of dispatching to a nil object and returning a structure.
1670         Now it returns the point without changing coordinates at all, which is what
1671         we need for this case in viewless mode.
1672
1673         * rendering/RenderApplet.cpp: Removed unneeded includes.
1674         (WebCore::RenderApplet::intrinsicSize): Use widget function.
1675         (WebCore::RenderApplet::createWidgetIfNecessary): Ditto.
1676
1677         * rendering/RenderApplet.h: Make more things private. Get rid of unneeded
1678         explicit destructor.
1679
1680         * rendering/RenderFrame.cpp: Removed unneeded includes.
1681         (WebCore::RenderFrame::edgeInfo): Updated to use node function so header
1682         doesn't have to define element function.
1683         (WebCore::RenderFrame::viewCleared): Ditto. Also changed to use widget
1684         function.
1685
1686         * rendering/RenderFrame.h: Removed unneeded includes. Made some things
1687         private. Got rid of element function.
1688
1689         * rendering/RenderPart.cpp: Removed unneeded includes.
1690         (WebCore::RenderPart::~RenderPart): Changed to use clearWidget function.
1691         (WebCore::RenderPart::setWidget): Changed to use widget function.
1692         (WebCore::RenderPart::deleteWidget): Changed to use passed-in widget.
1693         This is now only called by the clearWidget function.
1694
1695         * rendering/RenderPart.h: Removed unneeded forward declarations.
1696         Made more functions private. Updated deleteWidget to take widget argument.
1697
1698         * rendering/RenderPartObject.cpp:
1699         (WebCore::RenderPartObject::~RenderPartObject): use frameView function
1700         instead of getting at m_view directly.
1701         (WebCore::RenderPartObject::updateWidget): Ditto.
1702         (WebCore::RenderPartObject::layout): Ditto. Same for widget and m_widget.
1703         (WebCore::RenderPartObject::viewCleared): Ditto.
1704
1705         * rendering/RenderPartObject.h: Made some functions private.
1706
1707         * rendering/RenderWidget.cpp:
1708         (WebCore::RenderWidget::RenderWidget): Initialize m_frameView with
1709         construction syntax instead of assignment.
1710         (WebCore::RenderWidget::destroy): Updated for name change of m_view
1711         to m_frameView.
1712         (WebCore::RenderWidget::~RenderWidget): Use clearWidget to delete
1713         the widget.
1714         (WebCore::RenderWidget::setWidget): Use clearWidget.
1715         (WebCore::RenderWidget::paint): Updated for name change of m_view
1716         to m_frameView.
1717         (WebCore::RenderWidget::deleteWidget): Changed to use passed-in widget.
1718
1719         * rendering/RenderWidget.h: Made many functions protected, others
1720         private and made all data members private.
1721
1722         * svg/animation/SMILTime.h: Removed unhelpful max and min functions. These
1723         just do what std::max and std::min will already do automatically for this
1724         type, so they are not helpful.
1725
1726         * svg/graphics/SVGImage.cpp:
1727         (WebCore::SVGImage::SVGImage): Removed unneeded initial values for types
1728         that initialize to zero without anything explicit.
1729         (WebCore::SVGImage::~SVGImage): Update since m_frame and m_frameView are
1730         no longer stored.
1731         (WebCore::SVGImage::setContainerSize): Ditto.
1732         (WebCore::SVGImage::usesContainerSize): Ditto.
1733         (WebCore::SVGImage::size): Ditto.
1734         (WebCore::SVGImage::hasRelativeWidth): Ditto.
1735         (WebCore::SVGImage::hasRelativeHeight): Ditto.
1736         (WebCore::SVGImage::draw): Ditto.
1737         (WebCore::SVGImage::nativeImageForCurrentFrame): Ditto.
1738         (WebCore::SVGImage::dataChanged): Ditto.
1739
1740         * svg/graphics/SVGImage.h: Removed unneeded includes and unneeded data
1741         members m_document, m_frame, m_frameView, and m_minSize.
1742
1743 2009-06-02  Adam Langley  <agl@google.com>
1744
1745         Reviewed by Eric Seidel.
1746
1747         The previous code was assuming that we'll be painting buttons on the scrollbar
1748         which isn't true on Linux. To reproduce, resize a page with scrollbars until
1749         they are less than two widths high.
1750
1751         This will need pixel test baselines to be updated in the Chromium tree.
1752
1753         * platform/chromium/ScrollbarThemeChromium.cpp: move this function...
1754         * platform/chromium/ScrollbarThemeChromiumWin.cpp:
1755         (WebCore::ScrollbarThemeChromium::trackRect): ... to here
1756         * platform/chromium/ScrollbarThemeChromiumLinux.cpp:
1757         (WebCore::ScrollbarThemeChromium::trackRect): add an alternative which
1758         doesn't remove the track when the scrollbar is less than two widths
1759         high.
1760
1761 2009-06-02  Mark Rowe  <mrowe@apple.com>
1762
1763         Reviewed by Anders Carlsson.
1764
1765         Remove workaround that was added to address <rdar://problem/5488678> as it no longer affects our Tiger builds.
1766
1767         * Configurations/Base.xcconfig:
1768
1769 2009-06-02  Eric Seidel  <eric@webkit.org>
1770
1771         Reviewed by Maciej Stachowiak.
1772
1773         Insert*List on an stand-alone image in a content editable region ASSERTS
1774         ASSERTION FAILED: isStartOfParagraph(startOfParagraphToMove)
1775         https://bugs.webkit.org/show_bug.cgi?id=19066
1776
1777         Attempt to fix this by noticing that we inserted the list inside
1778         the selection which includes the image, and re-adjust the selection
1779         to not include the list before trying to move the image into
1780         the list item.
1781         
1782         Test: editing/execCommand/list-wrapping-image-crash.html
1783
1784         * editing/InsertListCommand.cpp:
1785         (WebCore::InsertListCommand::doApply):
1786
1787 2009-06-02  Eric Seidel  <eric@webkit.org>
1788
1789         Reviewed by Darin Adler.
1790
1791         Rename PositionIterator members in hope of further clarity
1792         https://bugs.webkit.org/show_bug.cgi?id=24854
1793
1794         Rename m_parent to m_anchorNode (since although it's always the parent
1795         of the previous m_child member, it is not always the parent of the effective position)
1796         Rename m_child to m_nodeAfterPositionInAnchor to make clear that it's the node
1797         directly following the position.  This member is often NULL, but is always
1798         a child of m_parent, now m_anchorNode if set.
1799         Rename m_offset to m_offsetInAnchor (since it's interpreted relative to m_anchorNode)
1800
1801         * dom/PositionIterator.cpp:
1802         (WebCore::PositionIterator::operator Position):
1803         (WebCore::PositionIterator::increment):
1804         (WebCore::PositionIterator::decrement):
1805         (WebCore::PositionIterator::atStart):
1806         (WebCore::PositionIterator::atEnd):
1807         (WebCore::PositionIterator::atStartOfNode):
1808         (WebCore::PositionIterator::atEndOfNode):
1809         (WebCore::PositionIterator::isCandidate):
1810         * dom/PositionIterator.h:
1811         (WebCore::PositionIterator::PositionIterator):
1812         (WebCore::PositionIterator::node):
1813         (WebCore::PositionIterator::offsetInLeafNode):
1814
1815 2009-06-02  Julien Chaffraix  <jchaffraix@webkit.org>
1816
1817         Reviewed by Eric Seidel.
1818
1819         Bug 17167: Failures in fast/dom/Node/initial-values.html
1820
1821         This partly solve a compatibility issue with other browsers. It will also
1822         make us more consistent while handling XHTML element.
1823
1824         The issue is that when we create an XHTML element inside an HTML document
1825         (as it is the case when calling createElementNS), we default to the HTML
1826         behaviour in nodeName. As we cannot test if an HTMLElement is an XHTML
1827         element, our fix is to check whether it has a prefix and then default
1828         to XML behaviour for nodeName.
1829
1830         * html/HTMLElement.cpp:
1831         (WebCore::HTMLElement::nodeName): Add a prefix check before
1832         returning the uppercase tagName (HTML behaviour).
1833
1834 2009-06-02  Eric Seidel  <eric@webkit.org>
1835
1836         Reviewed by Maciej Stachowiak.
1837
1838         Add a compareBoundaryPoints which takes RangeBoundaryPoints
1839         https://bugs.webkit.org/show_bug.cgi?id=25500
1840
1841         I noticed the need for this function when removing compareBoundaryPoints(Position, Position)
1842         This patch is almost entirely minus lines.
1843
1844         No functional changes, thus no tests.
1845
1846         * dom/Range.cpp:
1847         (WebCore::Range::setStart):
1848         (WebCore::Range::setEnd):
1849         (WebCore::Range::compareBoundaryPoints):
1850         (WebCore::Range::boundaryPointsValid):
1851         * dom/Range.h:
1852
1853 2009-06-02  Eric Seidel  <eric@webkit.org>
1854
1855         Reviewed by Maciej Stachowiak.
1856
1857         Remove Range::compareBoundaryPoints(Position, Position) per Darin's suggestion in bug 25056
1858         https://bugs.webkit.org/show_bug.cgi?id=25500
1859
1860         Darin indicated the Range should deal only with primitive DOM node/offset
1861         pairs, and that Position (which is a more robust editing construct) should have
1862         its own comparison functions and that Range.h should not mention Position at all.
1863
1864         Turns out that Position already has a comparePositions() function (which knows
1865         how to additionally handled positions in shadow trees).  So I've just changed
1866         all callers of compareBoundaryPoints(Position, Position) to use the existing
1867         comparePositions() function.  I've also added a comparePositions which takes
1868         VisiblePositions for convenience.
1869
1870         * dom/Range.cpp:
1871         * dom/Range.h:
1872         * editing/ApplyStyleCommand.cpp:
1873         (WebCore::ApplyStyleCommand::updateStartEnd):
1874         (WebCore::ApplyStyleCommand::applyBlockStyle):
1875         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1876         (WebCore::ApplyStyleCommand::applyInlineStyle):
1877         (WebCore::ApplyStyleCommand::applyInlineStyleToRange):
1878         (WebCore::ApplyStyleCommand::removeInlineStyle):
1879         (WebCore::ApplyStyleCommand::nodeFullySelected):
1880         (WebCore::ApplyStyleCommand::nodeFullyUnselected):
1881         * editing/CompositeEditCommand.cpp:
1882         (WebCore::CompositeEditCommand::deleteInsignificantText):
1883         (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary):
1884         (WebCore::CompositeEditCommand::moveParagraphs):
1885         * editing/DeleteSelectionCommand.cpp:
1886         (WebCore::DeleteSelectionCommand::initializeStartEnd):
1887         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1888         (WebCore::DeleteSelectionCommand::mergeParagraphs):
1889         * editing/SelectionController.cpp:
1890         (WebCore::SelectionController::nodeWillBeRemoved):
1891         * editing/VisibleSelection.cpp:
1892         (WebCore::VisibleSelection::toNormalizedRange):
1893         * editing/htmlediting.cpp:
1894         (WebCore::comparePositions):
1895         * editing/htmlediting.h:
1896         * page/EventHandler.cpp:
1897         (WebCore::EventHandler::handleMousePressEventSingleClick):
1898
1899 2009-06-02  Albert J. Wong  <ajwong@chromium.org>
1900
1901         Reviewed by Dimitri Glazkov.
1902
1903         https://bugs.webkit.org/show_bug.cgi?id=26122
1904         Upstream v8_utility.h functions into V8Utilities.h.  This patch has
1905         some transitional code to make upstreaming easier.  This code will
1906         be deleted in a few days.
1907
1908         * bindings/v8/ScriptFunctionCall.cpp:
1909         (WebCore::ScriptFunctionCall::construct): NewInstance -> newInstance.
1910         * bindings/v8/V8Utilities.h:
1911         (WebCore::AllowAllocation::AllowAllocation): Function added.
1912         (WebCore::AllowAllocation::~AllowAllocation): Function added.
1913         (WebCore::SafeAllocation::NewInstance): Function added.
1914         * bindings/v8/WorkerContextExecutionProxy.cpp:
1915         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
1916         NewInstance -> newInstance.
1917         (WebCore::WorkerContextExecutionProxy::toV8): NewInstance ->
1918         newInstance.
1919
1920 2009-06-02  Dan Bernstein  <mitz@apple.com>
1921
1922         Reviewed by John Sullivan.
1923
1924         - fix <rdar://problem/6940747> Search field’s focus ring is outset
1925
1926         * rendering/RenderThemeWin.cpp:
1927         (WebCore::RenderThemeWin::adjustSearchFieldStyle): Set the focused
1928         search field outline offset to -2.
1929
1930 2009-06-02  Sam Weinig  <sam@webkit.org>
1931
1932         Reviewed by Alexey Proskuryakov.
1933
1934         Add list of unimplemented event handlers to DOMWindow.
1935
1936         * page/DOMWindow.idl:
1937
1938 2009-06-02  Alexey Proskuryakov  <ap@webkit.org>
1939
1940         Reviewed by Sam Weinig.
1941
1942         https://bugs.webkit.org/show_bug.cgi?id=26133
1943         Adapt and import py-dom-xpath tests
1944
1945         Tests: fast/xpath/py-dom-xpath/abbreviations.html
1946                fast/xpath/py-dom-xpath/axes.html
1947                fast/xpath/py-dom-xpath/data.html
1948                fast/xpath/py-dom-xpath/expressions.html
1949                fast/xpath/py-dom-xpath/functions.html
1950                fast/xpath/py-dom-xpath/nodetests.html
1951                fast/xpath/py-dom-xpath/paths.html
1952                fast/xpath/py-dom-xpath/predicates.html
1953
1954         Fix bugs found with this test suite:
1955         - name and local-name were incorrect for processing instructions (XPath expanded-name
1956         doesn't match DOM exactly);
1957         - name, local-name and namespace functions should crash on attribute nodes;
1958         - attemps to make node sets from other types were not detected as errors.
1959
1960         No performance impact.
1961
1962         * xml/XPathExpressionNode.h: Track type conversion errors that happen during evaluation.
1963         An error won't stop evaluation, but an exception will be raised afterwards. We could also
1964         detect conversion errors at compile time, but not if we're going to support XPath variables
1965         (which is unnecessary for XPathEvaluator, but will be necessary if we decide to make our own
1966         XSLT one day).
1967
1968         * xml/XPathExpression.cpp: (WebCore::XPathExpression::evaluate): Check whether a type
1969         conversion exception occurred during evaluation, and raise an excpetion if it did.
1970
1971         * xml/XPathFunctions.cpp:
1972         (WebCore::XPath::expandedNameLocalPart):
1973         (WebCore::XPath::expandedName):
1974         XPath name(), local-name() and namespace-uri() functions are defined in terms of expanded-name,
1975         which doesn't match anything available via DOM exactly. Calculate the expanded name properly.
1976         (WebCore::XPath::FunNamespaceURI::evaluate): This function could crash if used with an
1977         attribute node, because it released what was possibly the only reference to attribute node
1978         before using it. Changed the function to avoid such situation.
1979         (WebCore::XPath::FunLocalName::evaluate): Ditto. Also, used the new expandedNameLocalPart()
1980         to work properly with processing instruction nodes.
1981         (WebCore::XPath::FunName::evaluate): Ditto (using expandedName()).
1982         (WebCore::XPath::FunCount::evaluate): Signal an error if the argument is not a node-set
1983         (by using toNodeSet unconditionally, which will raise an error, and return an empty set).
1984
1985         * xml/XPathPath.cpp: (WebCore::XPath::Filter::evaluate): Signal an error if the expression
1986         evaluation result is not a node-set.
1987
1988         * xml/XPathPath.h: (WebCore::XPath::Filter::resultType): A Filter's result is actually
1989         always a node-set (this is not so for FilterExpr production in the spec, but is for us,
1990         because we don't naively map BNF productions to classes).
1991
1992         * xml/XPathPredicate.cpp: (WebCore::XPath::Union::evaluate): Signal an error if either side
1993         is not a node-set.
1994
1995         * xml/XPathStep.cpp: Removed an unnecesary include.
1996
1997         * xml/XPathValue.cpp:
1998         (WebCore::XPath::Value::toNodeSet): Signal an error if conversion fails.
1999         (WebCore::XPath::Value::modifiableNodeSet): Ditto.
2000         (WebCore::XPath::Value::toNumber): Don't allow inputs that don't match XPath Number production
2001         (in particular, those using exponential notation).
2002
2003 2009-06-01  Sam Weinig  <sam@webkit.org>
2004
2005         Reviewed by Brady Eidson.
2006
2007         Part of https://bugs.webkit.org/show_bug.cgi?id=26100
2008         Add missing event handler properties to the DOMWindow
2009
2010         Added oncontextmenu, oninput, and onmessage event handlers to
2011         the DOMWindow. Aditionally, the onloadstart, onprogress, onstalled,
2012         and onsuspend event handlers were implemented but not added to
2013         DOMWindow.idl.
2014
2015         * page/DOMWindow.cpp:
2016         (WebCore::DOMWindow::oninput):
2017         (WebCore::DOMWindow::setOninput):
2018         (WebCore::DOMWindow::onmessage):
2019         (WebCore::DOMWindow::setOnmessage):
2020         (WebCore::DOMWindow::oncontextmenu):
2021         (WebCore::DOMWindow::setOncontextmenu):
2022         * page/DOMWindow.h:
2023         * page/DOMWindow.idl:
2024
2025 2009-06-01  Jeremy Orlow  <jorlow@chromium.org>
2026
2027         Reviewed by Darin Adler.  Landed by Adam Barth.
2028
2029         https://bugs.webkit.org/show_bug.cgi?id=26123
2030
2031         Remove a redundant checkEncodedString call when constructing a
2032         KURL object from a string.
2033
2034         * platform/KURL.cpp:
2035         (WebCore::KURL::KURL):
2036
2037 2009-06-01  Dimitri Glazkov  <dglazkov@chromium.org>
2038
2039         Unreviewed, build fix.
2040
2041         Reposition platform guard, improperly placed by http://trac.webkit.org/changeset/44340
2042         Bad Dimitri.
2043
2044         * platform/KeyboardCodes.h: Repositioned the guard to avoid nested
2045             WebCore namespace declarations.
2046
2047 2009-06-01  Dimitri Glazkov  <dglazkov@chromium.org>
2048
2049         Unreviewed, build fix.
2050
2051         * platform/KeyboardCodes.h: Integrated contents of platform/chromium/KeyboardCodes.h
2052             with a stern FIXME.
2053         * platform/chromium/KeyboardCodes.h: Removed.
2054
2055 2009-06-01  Nikolas Zimmermann  <zimmermann@kde.org>
2056
2057         Reviewed by Eric Seidel.
2058
2059         Fix assertion error in --filters enabled debug builds.
2060         Instead of using RefPtr<AtomicStringImpl> as keys for the hash maps in SVGFilterBuilder, just use AtomicString objects.
2061
2062         * svg/graphics/filters/SVGFilterBuilder.cpp:
2063         (WebCore::SVGFilterBuilder::SVGFilterBuilder):
2064         (WebCore::SVGFilterBuilder::add):
2065         (WebCore::SVGFilterBuilder::getEffectById):
2066         * svg/graphics/filters/SVGFilterBuilder.h:
2067
2068 2009-06-01  Nikolas Zimmermann  <zimmermann@kde.org>
2069
2070         Reviewed by Eric Seidel.
2071
2072         Fix --filters enabled build on Mac.
2073         Remove unnecessary 'boundingBox' parameter from finishRenderSVGContent() method.
2074         Kill several warnings, to make build pass.
2075
2076         * rendering/RenderPath.cpp:
2077         (WebCore::RenderPath::paint):
2078         * rendering/RenderSVGContainer.cpp:
2079         (WebCore::RenderSVGContainer::paint):
2080         * rendering/RenderSVGImage.cpp:
2081         (WebCore::RenderSVGImage::paint):
2082         * rendering/RenderSVGRoot.cpp:
2083         (WebCore::RenderSVGRoot::paint):
2084         * rendering/SVGRenderSupport.cpp:
2085         (WebCore::SVGRenderBase::finishRenderSVGContent):
2086         * rendering/SVGRenderSupport.h:
2087         * rendering/SVGRootInlineBox.cpp:
2088         (WebCore::SVGRootInlineBoxPaintWalker::chunkEndCallback):
2089         * svg/SVGFEGaussianBlurElement.cpp:
2090         (WebCore::SVGFEGaussianBlurElement::setStdDeviation):
2091         * svg/graphics/filters/SVGFEFlood.cpp:
2092         (WebCore::FEFlood::FEFlood):
2093
2094 2009-06-01  Dimitri Glazkov  <dglazkov@chromium.org>
2095
2096         Reviewed by Dave Hyatt.
2097
2098         Fix Chromium build by adding an #ifdef, restoring the code path to that
2099         before http://trac.webkit.org/changeset/44287.
2100
2101         * platform/mac/ScrollbarThemeMac.mm:
2102         (WebCore::ScrollbarThemeMac::paint): Added an #ifdef.
2103
2104 2009-06-01  Dirk Schulze  <krit@webkit.org>
2105
2106         Reviewed by Nikolas Zimmermann.
2107
2108         Remove last pieces of the old SVG filter system. They are not
2109         usable with our current filter system. The new filter effects
2110         will replace the functionality step by step.
2111
2112         * GNUmakefile.am:
2113         * WebCore.pro:
2114         * WebCore.vcproj/WebCore.vcproj:
2115         * WebCore.xcodeproj/project.pbxproj:
2116         * svg/graphics/cairo: Removed.
2117         * svg/graphics/cairo/SVGResourceFilterCairo.cpp: Removed.
2118         * svg/graphics/cg: Removed.
2119         * svg/graphics/cg/SVGResourceFilterCg.cpp: Removed.
2120         * svg/graphics/cg/SVGResourceFilterCg.mm: Removed.
2121         * svg/graphics/filters/SVGFilterEffect.cpp: Removed.
2122         * svg/graphics/filters/SVGFilterEffect.h: Removed.
2123         * svg/graphics/filters/cg: Removed.
2124         * svg/graphics/filters/cg/SVGFEHelpersCg.h: Removed.
2125         * svg/graphics/filters/cg/SVGFEHelpersCg.mm: Removed.
2126         * svg/graphics/filters/cg/SVGFilterEffectCg.mm: Removed.
2127         * svg/graphics/filters/cg/WKArithmeticFilter.cikernel: Removed.
2128         * svg/graphics/filters/cg/WKArithmeticFilter.h: Removed.
2129         * svg/graphics/filters/cg/WKArithmeticFilter.m: Removed.
2130         * svg/graphics/filters/cg/WKComponentMergeFilter.cikernel: Removed.
2131         * svg/graphics/filters/cg/WKComponentMergeFilter.h: Removed.
2132         * svg/graphics/filters/cg/WKComponentMergeFilter.m: Removed.
2133         * svg/graphics/filters/cg/WKDiffuseLightingFilter.cikernel: Removed.
2134         * svg/graphics/filters/cg/WKDiffuseLightingFilter.h: Removed.
2135         * svg/graphics/filters/cg/WKDiffuseLightingFilter.m: Removed.
2136         * svg/graphics/filters/cg/WKDiscreteTransferFilter.cikernel: Removed.
2137         * svg/graphics/filters/cg/WKDiscreteTransferFilter.h: Removed.
2138         * svg/graphics/filters/cg/WKDiscreteTransferFilter.m: Removed.
2139         * svg/graphics/filters/cg/WKDisplacementMapFilter.cikernel: Removed.
2140         * svg/graphics/filters/cg/WKDisplacementMapFilter.h: Removed.
2141         * svg/graphics/filters/cg/WKDisplacementMapFilter.m: Removed.
2142         * svg/graphics/filters/cg/WKDistantLightFilter.cikernel: Removed.
2143         * svg/graphics/filters/cg/WKDistantLightFilter.h: Removed.
2144         * svg/graphics/filters/cg/WKDistantLightFilter.m: Removed.
2145         * svg/graphics/filters/cg/WKGammaTransferFilter.cikernel: Removed.
2146         * svg/graphics/filters/cg/WKGammaTransferFilter.h: Removed.
2147         * svg/graphics/filters/cg/WKGammaTransferFilter.m: Removed.
2148         * svg/graphics/filters/cg/WKIdentityTransferFilter.h: Removed.
2149         * svg/graphics/filters/cg/WKIdentityTransferFilter.m: Removed.
2150         * svg/graphics/filters/cg/WKLinearTransferFilter.cikernel: Removed.
2151         * svg/graphics/filters/cg/WKLinearTransferFilter.h: Removed.
2152         * svg/graphics/filters/cg/WKLinearTransferFilter.m: Removed.
2153         * svg/graphics/filters/cg/WKNormalMapFilter.cikernel: Removed.
2154         * svg/graphics/filters/cg/WKNormalMapFilter.h: Removed.
2155         * svg/graphics/filters/cg/WKNormalMapFilter.m: Removed.
2156         * svg/graphics/filters/cg/WKPointLightFilter.cikernel: Removed.
2157         * svg/graphics/filters/cg/WKPointLightFilter.h: Removed.
2158         * svg/graphics/filters/cg/WKPointLightFilter.m: Removed.
2159         * svg/graphics/filters/cg/WKSpecularLightingFilter.cikernel: Removed.
2160         * svg/graphics/filters/cg/WKSpecularLightingFilter.h: Removed.
2161         * svg/graphics/filters/cg/WKSpecularLightingFilter.m: Removed.
2162         * svg/graphics/filters/cg/WKSpotLightFilter.cikernel: Removed.
2163         * svg/graphics/filters/cg/WKSpotLightFilter.h: Removed.
2164         * svg/graphics/filters/cg/WKSpotLightFilter.m: Removed.
2165         * svg/graphics/filters/cg/WKTableTransferFilter.cikernel: Removed.
2166         * svg/graphics/filters/cg/WKTableTransferFilter.h: Removed.
2167         * svg/graphics/filters/cg/WKTableTransferFilter.m: Removed.
2168         * svg/graphics/mac: Removed.
2169         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.h: Removed.
2170         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.mm: Removed.
2171         * svg/graphics/qt: Removed.
2172         * svg/graphics/qt/SVGResourceFilterQt.cpp: Removed.
2173         * svg/graphics/skia: Removed.
2174         * svg/graphics/skia/SVGResourceFilterSkia.cpp: Removed.
2175
2176 2009-06-01  Dmitry Titov  <dimich@chromium.org>
2177
2178         Fix the previous checkin (ttp://trac.webkit.org/changeset/44327).
2179         This adds a comment suggested during review.
2180
2181         * platform/ThreadGlobalData.cpp:
2182         (WebCore::ThreadGlobalData::~ThreadGlobalData): Add comment clarifying the change.
2183
2184 2009-06-01  Dmitry Titov  <dimich@chromium.org>
2185
2186         Reviewed by Darin Adler.
2187
2188         https://bugs.webkit.org/show_bug.cgi?id=25973
2189         Avoid calling CurrentThread() in thread-specific destructors in OSX Chromium.
2190         Pthreads invoke thread-specific destructors after WTF::detachThread() is called and ThreadIdentifier
2191         for the thread removed from the WTF thread map. Calling CurrentThread() in such destructor causes
2192         the ThreadIdentifier to be re-created and inserted into the map again. Since Pthreads on OSX reuse
2193         the pthread_t between threads, the next created thread will have the same pthread_t and cause an assert
2194         in establishIdentifierForPthreadHandle() since the id is already in the map.
2195
2196         The behavior is covered by existing test LayoutTests/fast/workers/worker-terminate.html, which currently fails
2197         on OSX Chromium and will stop failing after this change.
2198
2199         * platform/ThreadGlobalData.h:
2200         * platform/ThreadGlobalData.cpp:
2201         (WebCore::ThreadGlobalData::~ThreadGlobalData):
2202         Store the result of "isMainThread()" in a member variable during construction of thread-specific data
2203         to avoid calling IsMainThread() in destructor, since the latter calls CurrentThread() in OSX Chromium.
2204
2205 2009-06-01  David Levin  <levin@chromium.org>
2206
2207         Reviewed by Darin Alder and Maciej Stachowiak.
2208
2209         Bug 26057: StringImpl should share buffers with UString.
2210         https://bugs.webkit.org/show_bug.cgi?id=26057
2211
2212         This change results in the following performance improvements:
2213         On http://www.hixie.ch/tests/adhoc/perf/dom/artificial/core/001.html
2214         the time went from 78ms to 40ms for append (other times remained constant).
2215
2216         On http://www.hixie.ch/tests/adhoc/perf/dom/artificial/core/002.html,
2217         the time went from 3900ms to 2600ms.
2218
2219         For http://dromaeo.com/?dom, the time for DomModification improved by ~6%.
2220         Other tests in dom seemed to be faster across several runs but within the
2221         margin of error (except DOM Attributes which was slightly ~1.5% worse).
2222
2223         Existing tests cover this code and there is no new functionality
2224         that is exposed to test.
2225
2226         * platform/text/AtomicString.cpp:
2227         (WebCore::AtomicString::add):
2228         * platform/text/String.cpp:
2229         (WebCore::String::String):
2230         (WebCore::String::operator UString):
2231         * platform/text/StringImpl.cpp:
2232         (WebCore::StringImpl::StringImpl):
2233         (WebCore::StringImpl::~StringImpl):
2234         (WebCore::StringImpl::create): Consumes a shared buffer.
2235         (WebCore::StringImpl::ustring): Shares the StringImpl's buffer with the UString.
2236         (WebCore::StringImpl::sharedBuffer): Exposes the buffer that may be shared.
2237         * platform/text/StringImpl.h:
2238         (WebCore::StringImpl::hasTerminatingNullCharacter):
2239         (WebCore::StringImpl::inTable):
2240         (WebCore::StringImpl::setInTable): Converted the bools to be inside of PtrAndFlags
2241         to avoid growing StringImpl in size.
2242
2243 2009-06-01  Dimitri Glazkov  <dglazkov@chromium.org>
2244
2245         Unreviewed, build fix.
2246
2247         V8 bindings follow-up to to DOMWindow-related cleanup:
2248         http://trac.webkit.org/changeset/44215
2249
2250         * bindings/v8/ScriptController.cpp: Removed disconnectFrame(), relocated
2251             its body to destructor.
2252         * bindings/v8/ScriptController.h: Removed disconnectFrame() decl.
2253
2254 2009-05-28  Pavel Feldman  <pfeldman@chromium.org>
2255
2256         Reviewed by Timothy Hatcher.
2257
2258         - Add panel enabler to the resources panel.
2259         - Add session / always options into the panel enabler.
2260         - Make enabled status for three panels sticky (globally).
2261         - Persist enabled status using InspectorController::Settings
2262         - Make InspectorController produce no network-related overhead when
2263           resources panel is not enabled.
2264
2265         https://bugs.webkit.org/show_bug.cgi?id=26046
2266
2267         * inspector/InspectorController.cpp:
2268         (WebCore::InspectorController::InspectorController):
2269         (WebCore::InspectorController::setWindowVisible):
2270         (WebCore::InspectorController::populateScriptObjects):
2271         (WebCore::InspectorController::identifierForInitialRequest):
2272         (WebCore::InspectorController::willSendRequest):
2273         (WebCore::InspectorController::didReceiveResponse):
2274         (WebCore::InspectorController::didReceiveContentLength):
2275         (WebCore::InspectorController::didFinishLoading):
2276         (WebCore::InspectorController::didFailLoading):
2277         (WebCore::InspectorController::resourceRetrievedByXMLHttpRequest):
2278         (WebCore::InspectorController::scriptImported):
2279         (WebCore::InspectorController::enableResourceTracking):
2280         (WebCore::InspectorController::disableResourceTracking):
2281         (WebCore::InspectorController::startUserInitiatedProfiling):
2282         (WebCore::InspectorController::enableProfiler):
2283         (WebCore::InspectorController::disableProfiler):
2284         (WebCore::InspectorController::enableDebugger):
2285         (WebCore::InspectorController::disableDebugger):
2286         * inspector/InspectorController.h:
2287         (WebCore::InspectorController::Setting::Setting):
2288         (WebCore::InspectorController::resourceTrackingEnabled):
2289         * inspector/InspectorController.idl:
2290         * inspector/InspectorFrontend.cpp:
2291         (WebCore::InspectorFrontend::resourceTrackingWasEnabled):
2292         (WebCore::InspectorFrontend::resourceTrackingWasDisabled):
2293         * inspector/InspectorFrontend.h:
2294         * inspector/front-end/PanelEnablerView.js:
2295         (WebInspector.PanelEnablerView.enableOption):
2296         (WebInspector.PanelEnablerView):
2297         (WebInspector.PanelEnablerView.prototype._windowResized):
2298         (WebInspector.PanelEnablerView.prototype.alwaysWasChosen):
2299         * inspector/front-end/ProfilesPanel.js:
2300         (WebInspector.ProfilesPanel.prototype._enableProfiling):
2301         (WebInspector.ProfilesPanel.prototype._toggleProfiling):
2302         * inspector/front-end/ResourcesPanel.js:
2303         (WebInspector.ResourcesPanel):
2304         (WebInspector.ResourcesPanel.prototype.get statusBarItems):
2305         (WebInspector.ResourcesPanel.prototype.resourceTrackingWasEnabled):
2306         (WebInspector.ResourcesPanel.prototype.resourceTrackingWasDisabled):
2307         (WebInspector.ResourcesPanel.prototype.reset):
2308         (WebInspector.ResourcesPanel.prototype._updateSidebarWidth):
2309         (WebInspector.ResourcesPanel.prototype._enableResourceTracking):
2310         (WebInspector.ResourcesPanel.prototype._toggleResourceTracking):
2311         * inspector/front-end/ScriptsPanel.js:
2312         (WebInspector.ScriptsPanel.prototype._enableDebugging):
2313         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
2314         * inspector/front-end/inspector.css:
2315         * inspector/front-end/inspector.js:
2316         (WebInspector.resourceTrackingWasEnabled):
2317         (WebInspector.resourceTrackingWasDisabled):
2318
2319 2009-06-01  Drew Wilson  <atwilson@google.com>
2320
2321         Reviewed by Darin Adler.  Landed (and tweaked) by Adam Barth.
2322
2323         https://bugs.webkit.org/show_bug.cgi?id=25902
2324
2325         Added WorkerContext.close()
2326
2327         Test: fast/workers/worker-close.html
2328
2329         * workers/WorkerContext.cpp:
2330         (WebCore::WorkerContext::close):
2331         * workers/WorkerContext.h:
2332         * workers/WorkerContext.idl:
2333         * workers/WorkerMessagingProxy.cpp:
2334         (WebCore::WorkerMessagingProxy::workerContextDestroyedInternal):
2335
2336 2009-06-01  Alexey Proskuryakov  <ap@webkit.org>
2337
2338         Reviewed by Darin Adler.
2339
2340         https://bugs.webkit.org/show_bug.cgi?id=12471
2341         XPathResult not invalidated for documents retrieved via XMLHttpRequest
2342
2343         Test: fast/xpath/detached-subtree-invalidate-iterator.html and existing tests in dom/svg/level3/xpath.
2344
2345         Use DOM tree version instead of DOMSubtreeModified events to invalidate, which is more
2346         reliable and much faster.
2347
2348         * xml/XPathExpression.cpp:
2349         (WebCore::XPathExpression::evaluate):
2350         * xml/XPathResult.cpp:
2351         (WebCore::XPathResult::XPathResult):
2352         (WebCore::XPathResult::~XPathResult):
2353         (WebCore::XPathResult::invalidIteratorState):
2354         (WebCore::XPathResult::iterateNext):
2355         * xml/XPathResult.h:
2356         (WebCore::XPathResult::create):
2357
2358 2009-06-01  Brett Wilson  <brettw@chromium.org>
2359
2360         Reviewed by Darin Adler.  Landed by Adam Barth.
2361
2362         https://bugs.webkit.org/show_bug.cgi?id=25750
2363
2364         Test: fast/transforms/bounding-rect-zoom.html
2365
2366         Make getClientRects and getBoundingClientRect account for ther zoom
2367         factor.
2368
2369         * dom/Element.cpp:
2370         (WebCore::adjustFloatPointForAbsoluteZoom):
2371         (WebCore::adjustFloatQuadForAbsoluteZoom):
2372         (WebCore::adjustIntRectForAbsoluteZoom):
2373         (WebCore::Element::getClientRects):
2374         (WebCore::Element::getBoundingClientRect):
2375
2376 2009-06-01  Tony Chang  <tony@chromium.org>
2377
2378         Reviewed by Dimitri Glazkov.  Landed by Adam Barth.
2379
2380         https://bugs.webkit.org/show_bug.cgi?id=26026
2381
2382         Fix an infinite loop when using the keyboard in Chromium select
2383         popups.
2384
2385         Not testable since it involves sending a keyboard event to
2386         the popup, which is not possible (eventSender sends the key
2387         events through webview, we want to go through the webwidget).
2388
2389         * platform/chromium/PopupMenuChromium.cpp:
2390
2391 2009-06-01  Nate Chapin  <japhet@google.com>
2392
2393         Reviewed by Dimitri Glazkov.  Landed by Adam Barth.
2394
2395         If a url with an anchor is being loaded, ensure that the anchor remains locked in view until the page
2396         has finished loading compeltely or the user has manually scrolled.  Refreshing an anchor url after
2397         scrolling to a new location on the page will still result in jumping to the new location.
2398         
2399         https://bugs.webkit.org/show_bug.cgi?id=26034
2400
2401         * loader/FrameLoader.cpp:
2402         (WebCore::FrameLoader::gotoAnchor): Set anchor lock after navigating to anchor.
2403         (WebCore::FrameLoader::completed): Release anchor lock.
2404         * page/FrameView.cpp:
2405         (WebCore::FrameView::FrameView): Ensure anchor lock starts unset.
2406         (WebCore::FrameView::reset): Ensure anchor lock starts unset.
2407         (WebCore::FrameView::layout): If anchor lock is set, force a gotoAnchor() after layout.
2408         (WebCore::FrameView::scrollRectIntoViewRecursively): Release anchor lock if a programmatic scroll begins.
2409         (WebCore::FrameView::setWasScrolledByUser): Release anchor lock if user manually scrolls.
2410         (WebCore::FrameView::setScrollPosition): Release anchor lock if a programmatic scroll begins.
2411         * page/FrameView.h:
2412         (WebCore::FrameView::lockedToAnchor): Added.
2413         (WebCore::FrameView::setLockedToAnchor): Added.
2414
2415 2009-05-31  Dirk Schulze  <krit@webkit.org>
2416
2417         Reviewed by Nikolas Zimmermann.
2418
2419         WebKit needs cross-platform filter system
2420         [https://bugs.webkit.org/show_bug.cgi?id=19991]
2421
2422         A short clean-up. FilterBuilder is SVG specific. Move it
2423         to svg/graphics/filters and rename it to SVGFilterBuilder. 
2424
2425         * GNUmakefile.am:
2426         * WebCore.pro:
2427         * WebCore.xcodeproj/project.pbxproj:
2428         * svg/FilterBuilder.cpp: Removed.
2429         * svg/FilterBuilder.h: Removed.
2430         * svg/SVGFilterElement.cpp:
2431         * svg/SVGFilterPrimitiveStandardAttributes.h:
2432         * svg/graphics/SVGResourceFilter.cpp:
2433         (WebCore::SVGResourceFilter::SVGResourceFilter):
2434         * svg/graphics/SVGResourceFilter.h:
2435         (WebCore::SVGResourceFilter::builder):
2436         * svg/graphics/filters/SVGFilterBuilder.cpp: Added.
2437         (WebCore::SVGFilterBuilder::SVGFilterBuilder):
2438         (WebCore::SVGFilterBuilder::add):
2439         (WebCore::SVGFilterBuilder::getEffectById):
2440         (WebCore::SVGFilterBuilder::clearEffects):
2441         * svg/graphics/filters/SVGFilterBuilder.h: Added.
2442         (WebCore::SVGFilterBuilder::lastEffect):
2443
2444 2009-05-31  Alexey Proskuryakov  <ap@webkit.org>
2445
2446         Reviewed by Darin Adler.
2447
2448         https://bugs.webkit.org/show_bug.cgi?id=13233
2449         Need to implement an optimizing XPath evaluator
2450
2451         Avoid sorting results of hierarchical paths that are naturally sorted. On a flat data structure
2452         with 128K nodes and a simple XPath expression, this changes evaluation time from 1.5 minutes
2453         to 33 ms.
2454
2455         * xml/XPathNodeSet.h: Keep track of whether subtrees rooted at nodes in set are disjoint,
2456         which is useful for optimization.
2457         (WebCore::XPath::NodeSet::NodeSet): Removed, it was identical to compiler generated one.
2458         (WebCore::XPath::NodeSet::operator=): Ditto.
2459         (WebCore::XPath::NodeSet::swap): Ditto.
2460         (WebCore::XPath::NodeSet::isSorted): Single element sets are always sorted, even if sort()
2461         was never called.
2462         (WebCore::XPath::NodeSet::markSubtreesDisjoint): Just like being sorted, the new flag is
2463         maintained by callers.
2464         (WebCore::XPath::NodeSet::subtreesAreDisjoint): A single element set only has one subtree.
2465         Currently, the only way for a set to gain this flag is to be produced from a single element
2466         set with a hierarchical location path.
2467
2468         * xml/XPathPath.cpp: (WebCore::XPath::LocationPath::evaluate): Use the new flag to avoid
2469         maintaining a set of unique nodes, and to avoid sorting the result.
2470
2471 2009-05-31  Alexey Proskuryakov  <ap@webkit.org>
2472
2473         Reviewed by Darin Adler.
2474
2475         https://bugs.webkit.org/show_bug.cgi?id=13233
2476         Need to implement an optimizing XPath evaluator
2477
2478         This patch adds some infrastructure and simple optimizations. Namely,
2479         - we now avoid building a full NodeSet just to evaluate a predicate in some cases;
2480         - "/descendant-or-self::node()/child::" is optimized to iterate the tree once when possible;
2481
2482         * xml/XPathExpressionNode.cpp:
2483         (WebCore::XPath::Expression::Expression):
2484         * xml/XPathExpressionNode.h:
2485         (WebCore::XPath::Expression::addSubExpression):
2486         (WebCore::XPath::Expression::isContextNodeSensitive):
2487         (WebCore::XPath::Expression::isContextPositionSensitive):
2488         (WebCore::XPath::Expression::isContextSizeSensitive):
2489         (WebCore::XPath::Expression::setIsContextNodeSensitive):
2490         (WebCore::XPath::Expression::setIsContextPositionSensitive):
2491         (WebCore::XPath::Expression::setIsContextSizeSensitive):
2492         XPath expression now knows its result type, and whether evaluation depends on context.
2493
2494         * xml/XPathFunctions.cpp:
2495         (WebCore::XPath::FunLast::resultType):
2496         (WebCore::XPath::FunLast::FunLast):
2497         (WebCore::XPath::FunPosition::resultType):
2498         (WebCore::XPath::FunPosition::FunPosition):
2499         (WebCore::XPath::FunCount::resultType):
2500         (WebCore::XPath::FunId::resultType):
2501         (WebCore::XPath::FunLocalName::resultType):
2502         (WebCore::XPath::FunLocalName::FunLocalName):
2503         (WebCore::XPath::FunNamespaceURI::resultType):
2504         (WebCore::XPath::FunNamespaceURI::FunNamespaceURI):
2505         (WebCore::XPath::FunName::resultType):
2506         (WebCore::XPath::FunName::FunName):
2507         (WebCore::XPath::FunString::resultType):
2508         (WebCore::XPath::FunString::FunString):
2509         (WebCore::XPath::FunConcat::resultType):
2510         (WebCore::XPath::FunStartsWith::resultType):
2511         (WebCore::XPath::FunContains::resultType):
2512         (WebCore::XPath::FunSubstringBefore::resultType):
2513         (WebCore::XPath::FunSubstringAfter::resultType):
2514         (WebCore::XPath::FunSubstring::resultType):
2515         (WebCore::XPath::FunStringLength::resultType):
2516         (WebCore::XPath::FunStringLength::FunStringLength):
2517         (WebCore::XPath::FunNormalizeSpace::resultType):
2518         (WebCore::XPath::FunNormalizeSpace::FunNormalizeSpace):
2519         (WebCore::XPath::FunTranslate::resultType):
2520         (WebCore::XPath::FunBoolean::resultType):
2521         (WebCore::XPath::FunNot::resultType):
2522         (WebCore::XPath::FunTrue::resultType):
2523         (WebCore::XPath::FunFalse::resultType):
2524         (WebCore::XPath::FunLang::resultType):
2525         (WebCore::XPath::FunLang::FunLang):
2526         (WebCore::XPath::FunNumber::resultType):
2527         (WebCore::XPath::FunNumber::FunNumber):
2528         (WebCore::XPath::FunSum::resultType):
2529         (WebCore::XPath::FunFloor::resultType):
2530         (WebCore::XPath::FunCeiling::resultType):
2531         (WebCore::XPath::FunRound::resultType):
2532         (WebCore::XPath::Function::setArguments):
2533         Set optimization details for the expression. Normally, a function does not introduce context
2534         node set dependency, but some use context node as default argument, or otherwise use the context.
2535
2536         * xml/XPathFunctions.h: Tweaked style.
2537
2538         * xml/XPathPath.cpp:
2539         (WebCore::XPath::Filter::Filter): A filter is as context node set sensitive as its expression is.
2540         (WebCore::XPath::LocationPath::LocationPath): A location path can only be context node sensitive,
2541         and only if the path relative.
2542         (WebCore::XPath::LocationPath::appendStep): Invoke compile-time Step optimizations.
2543         (WebCore::XPath::LocationPath::insertFirstStep): Ditto.
2544         (WebCore::XPath::Path::Path): A path is as context node set sensitive as its filter is.
2545
2546         * xml/XPathPath.h:
2547         (WebCore::XPath::Filter::resultType): Result type of a filter is the same as of its expression
2548         (useful filters return NodeSets, of course).
2549         (WebCore::XPath::LocationPath::setAbsolute): An absolute location path if context node set
2550         insensitive.
2551         (WebCore::XPath::LocationPath::resultType): A path's result is always a node set.
2552         (WebCore::XPath::Path::resultType): Ditto.
2553
2554         * xml/XPathPredicate.h:
2555         (WebCore::XPath::Number::resultType): Return a proper result type.
2556         (WebCore::XPath::StringExpression::resultType): Ditto.
2557         (WebCore::XPath::Negative::resultType): Ditto.
2558         (WebCore::XPath::NumericOp::resultType): Ditto.
2559         (WebCore::XPath::EqTestOp::resultType): Ditto.
2560         (WebCore::XPath::LogicalOp::resultType): Ditto.
2561         (WebCore::XPath::Union::resultType): Ditto.
2562         (WebCore::XPath::Predicate::isContextPositionSensitive): A predicate can be context position
2563         sensitive even if its expression is not, because e.g. [5] is a shortcut for [position()=5].
2564         (WebCore::XPath::Predicate::isContextSizeSensitive): This matches expression result.
2565
2566         * xml/XPathStep.h:
2567         (WebCore::XPath::Step::NodeTest::Kind): Removed unused ElementNodeTest, which was previously
2568         borrowed from XPath 2.0 to express some optimizations.
2569         (WebCore::XPath::Step::NodeTest::mergedPredicates): To avoid building a huge node set and
2570         filtering it with predicates, we now try to apply predicates while enumerating an axis.
2571         (WebCore::XPath::Step::nodeTest): Expose m_nodeTest.
2572
2573         * xml/XPathStep.cpp:
2574         (WebCore::XPath::Step::~Step): The step owns NodeTest merged predicates, so it is still
2575         possible to copy NodeTests.
2576         (WebCore::XPath::Step::optimize): Merge predicates into NodeTest if possible.
2577         (WebCore::XPath::optimizeStepPair): Optimize some expressions containing "//".
2578         (WebCore::XPath::Step::predicatesAreContextListInsensitive): The above optimization is only
2579         possible if there are no context sensitive predicates for "//".
2580         (WebCore::XPath::Step::evaluate): Track context position for the first merged predicate.
2581         (WebCore::XPath::nodeMatchesBasicTest): Check whether the node matches node test, ignoring
2582         merged predicates.
2583         (WebCore::XPath::nodeMatches): Additionally check merged predicates, and update position.
2584         (WebCore::XPath::Step::nodesInAxis): Check merged predicates in optimized attribute code
2585         path.
2586
2587         * xml/XPathVariableReference.h: (WebCore::XPath::VariableReference::resultType): Variable
2588         references are not used with XPathEvaluator, so we'll only need them if we decide to
2589         reimplement XSLT. The type of variable reference is not known at compile time.
2590
2591 2009-05-31  Sam Weinig  <sam@webkit.org>
2592
2593         Rubber-stamped by Dan Bernstein.
2594
2595         Remove unused JSEventTargetBase.h
2596
2597         * GNUmakefile.am:
2598         * WebCore.vcproj/WebCore.vcproj:
2599         * WebCore.xcodeproj/project.pbxproj:
2600         * bindings/js/JSEventTargetBase.h: Removed.
2601
2602 2009-05-31  Sam Weinig  <sam@webkit.org>
2603
2604         Reviewed by Dan Bernstein.
2605
2606         Part of https://bugs.webkit.org/show_bug.cgi?id=26100
2607         Add missing event handler properties to the DOMWindow
2608
2609         Add missing oncanplay, oncanplaythrough, ondurationchange, onemptied,
2610         onended, onloadeddata, onloadedmetadata, onpause, onplay, onplaying,
2611         onratechange, onseeked, onseeking, ontimeupdate, onvolumechange,
2612         onwaiting, onloadstart, onprogress, onstalled, onsuspend, ondrag,
2613         ondragend, ondragenter, ondragleave, ondragover, ondragstart and 
2614         ondrop event handlers to the DOMWindow.
2615
2616         * page/DOMWindow.cpp:
2617         (WebCore::DOMWindow::ondrag):
2618         (WebCore::DOMWindow::setOndrag):
2619         (WebCore::DOMWindow::ondragend):
2620         (WebCore::DOMWindow::setOndragend):
2621         (WebCore::DOMWindow::ondragenter):
2622         (WebCore::DOMWindow::setOndragenter):
2623         (WebCore::DOMWindow::ondragleave):
2624         (WebCore::DOMWindow::setOndragleave):
2625         (WebCore::DOMWindow::ondragover):
2626         (WebCore::DOMWindow::setOndragover):
2627         (WebCore::DOMWindow::ondragstart):
2628         (WebCore::DOMWindow::setOndragstart):
2629         (WebCore::DOMWindow::ondrop):
2630         (WebCore::DOMWindow::setOndrop):
2631         (WebCore::DOMWindow::oncanplay):
2632         (WebCore::DOMWindow::setOncanplay):
2633         (WebCore::DOMWindow::oncanplaythrough):
2634         (WebCore::DOMWindow::setOncanplaythrough):
2635         (WebCore::DOMWindow::ondurationchange):
2636         (WebCore::DOMWindow::setOndurationchange):
2637         (WebCore::DOMWindow::onemptied):
2638         (WebCore::DOMWindow::setOnemptied):
2639         (WebCore::DOMWindow::onended):
2640         (WebCore::DOMWindow::setOnended):
2641         (WebCore::DOMWindow::onloadeddata):
2642         (WebCore::DOMWindow::setOnloadeddata):
2643         (WebCore::DOMWindow::onloadedmetadata):
2644         (WebCore::DOMWindow::setOnloadedmetadata):
2645         (WebCore::DOMWindow::onpause):
2646         (WebCore::DOMWindow::setOnpause):
2647         (WebCore::DOMWindow::onplay):
2648         (WebCore::DOMWindow::setOnplay):
2649         (WebCore::DOMWindow::onplaying):
2650         (WebCore::DOMWindow::setOnplaying):
2651         (WebCore::DOMWindow::onratechange):
2652         (WebCore::DOMWindow::setOnratechange):
2653         (WebCore::DOMWindow::onseeked):
2654         (WebCore::DOMWindow::setOnseeked):
2655         (WebCore::DOMWindow::onseeking):
2656         (WebCore::DOMWindow::setOnseeking):
2657         (WebCore::DOMWindow::ontimeupdate):
2658         (WebCore::DOMWindow::setOntimeupdate):
2659         (WebCore::DOMWindow::onvolumechange):
2660         (WebCore::DOMWindow::setOnvolumechange):
2661         (WebCore::DOMWindow::onwaiting):
2662         (WebCore::DOMWindow::setOnwaiting):
2663         (WebCore::DOMWindow::onloadstart):
2664         (WebCore::DOMWindow::setOnloadstart):
2665         (WebCore::DOMWindow::onprogress):
2666         (WebCore::DOMWindow::setOnprogress):
2667         (WebCore::DOMWindow::onstalled):
2668         (WebCore::DOMWindow::setOnstalled):
2669         (WebCore::DOMWindow::onsuspend):
2670         (WebCore::DOMWindow::setOnsuspend):
2671         * page/DOMWindow.h:
2672         * page/DOMWindow.idl:
2673
2674 2009-05-31  Sam Weinig  <sam@webkit.org>
2675
2676         Reviewed by Anders Carlsson.
2677
2678         Part of https://bugs.webkit.org/show_bug.cgi?id=26100
2679         Add missing event handler properties to the DOMWindow
2680
2681         Add missing onstorage event handler to the DOMWindow.
2682
2683         * page/DOMWindow.cpp:
2684         (WebCore::DOMWindow::onstorage):
2685         (WebCore::DOMWindow::setOnstorage):
2686         * page/DOMWindow.h:
2687         * page/DOMWindow.idl:
2688
2689 2009-05-30  Sam Weinig  <sam@webkit.org>
2690
2691         Reviewed by Mark Rowe.
2692
2693         Fix for https://bugs.webkit.org/show_bug.cgi?id=26110
2694         Update online/offline events to match the current spec.
2695         - Also adds window.ononline and window.onoffline event handler
2696           properties.
2697
2698         * page/DOMWindow.cpp:
2699         (WebCore::DOMWindow::onoffline):
2700         (WebCore::DOMWindow::setOnoffline):
2701         (WebCore::DOMWindow::ononline):
2702         (WebCore::DOMWindow::setOnonline):
2703         * page/DOMWindow.h:
2704         * page/DOMWindow.idl:
2705         * page/Page.cpp:
2706         (WebCore::networkStateChanged):
2707
2708 2009-05-31  Dirk Schulze  <krit@webkit.org>
2709
2710         Reviewed by Nikolas Zimmermann.
2711
2712         WebKit needs cross-platform filter system
2713         [https://bugs.webkit.org/show_bug.cgi?id=19991]
2714
2715         Make use of the new filter system in WebCore for SVG. Deleted Mac bindings
2716         and replace it by a platform independent code. Calculation of subRegions
2717         is missing but needed for a first filter effect.
2718
2719         * GNUmakefile.am:
2720         * WebCore.pro:
2721         * WebCore.vcproj/WebCore.vcproj:
2722         * WebCore.xcodeproj/project.pbxproj:
2723         * platform/graphics/filters/Filter.h:
2724         (WebCore::Filter::~Filter):
2725         (WebCore::Filter::setSourceImage):
2726         * rendering/SVGRenderSupport.cpp:
2727         (WebCore::SVGRenderBase::prepareToRenderSVGContent):
2728         (WebCore::SVGRenderBase::finishRenderSVGContent):
2729         * svg/FilterBuilder.h:
2730         (WebCore::FilterBuilder::lastEffect):
2731         * svg/SVGFEBlendElement.cpp:
2732         (WebCore::SVGFEBlendElement::SVGFEBlendElement):
2733         (WebCore::SVGFEBlendElement::build):
2734         * svg/SVGFEBlendElement.h:
2735         * svg/SVGFEColorMatrixElement.cpp:
2736         (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
2737         (WebCore::SVGFEColorMatrixElement::build):
2738         * svg/SVGFEColorMatrixElement.h:
2739         * svg/SVGFEComponentTransferElement.cpp:
2740         (WebCore::SVGFEComponentTransferElement::SVGFEComponentTransferElement):
2741         (WebCore::SVGFEComponentTransferElement::build):
2742         * svg/SVGFEComponentTransferElement.h:
2743         * svg/SVGFECompositeElement.cpp:
2744         (WebCore::SVGFECompositeElement::SVGFECompositeElement):
2745         (WebCore::SVGFECompositeElement::build):
2746         * svg/SVGFECompositeElement.h:
2747         * svg/SVGFEDiffuseLightingElement.cpp:
2748         (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
2749         (WebCore::SVGFEDiffuseLightingElement::build):
2750         * svg/SVGFEDiffuseLightingElement.h:
2751         * svg/SVGFEDisplacementMapElement.cpp:
2752         (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
2753         (WebCore::SVGFEDisplacementMapElement::build):
2754         * svg/SVGFEDisplacementMapElement.h:
2755         * svg/SVGFEFloodElement.cpp:
2756         (WebCore::SVGFEFloodElement::SVGFEFloodElement):
2757         (WebCore::SVGFEFloodElement::build):
2758         * svg/SVGFEFloodElement.h:
2759         * svg/SVGFEGaussianBlurElement.cpp:
2760         (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
2761         (WebCore::SVGFEGaussianBlurElement::build):
2762         * svg/SVGFEGaussianBlurElement.h:
2763         * svg/SVGFEImageElement.cpp:
2764         (WebCore::SVGFEImageElement::SVGFEImageElement):
2765         (WebCore::SVGFEImageElement::notifyFinished):
2766         (WebCore::SVGFEImageElement::build):
2767         * svg/SVGFEImageElement.h:
2768         * svg/SVGFEMergeElement.cpp:
2769         (WebCore::SVGFEMergeElement::SVGFEMergeElement):
2770         (WebCore::SVGFEMergeElement::build):
2771         * svg/SVGFEMergeElement.h:
2772         * svg/SVGFEOffsetElement.cpp:
2773         (WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
2774         (WebCore::SVGFEOffsetElement::build):
2775         * svg/SVGFEOffsetElement.h:
2776         * svg/SVGFESpecularLightingElement.cpp:
2777         (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
2778         (WebCore::SVGFESpecularLightingElement::build):
2779         * svg/SVGFESpecularLightingElement.h:
2780         * svg/SVGFETileElement.cpp:
2781         (WebCore::SVGFETileElement::SVGFETileElement):
2782         (WebCore::SVGFETileElement::build):
2783         * svg/SVGFETileElement.h:
2784         * svg/SVGFETurbulenceElement.cpp:
2785         (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
2786         (WebCore::SVGFETurbulenceElement::build):
2787         * svg/SVGFETurbulenceElement.h:
2788         * svg/SVGFilterElement.cpp:
2789         (WebCore::SVGFilterElement::canvasResource):
2790         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
2791         (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes):
2792         * svg/SVGFilterPrimitiveStandardAttributes.h:
2793         (WebCore::SVGFilterPrimitiveStandardAttributes::contextElement):
2794         * svg/graphics/SVGResourceFilter.cpp:
2795         (WebCore::SVGResourceFilter::SVGResourceFilter):
2796         (WebCore::SVGResourceFilter::addFilterEffect):
2797         (WebCore::SVGResourceFilter::filterBBoxForItemBBox):
2798         (WebCore::SVGResourceFilter::prepareFilter):
2799         (WebCore::SVGResourceFilter::applyFilter):
2800         (WebCore::SVGResourceFilter::externalRepresentation):
2801         * svg/graphics/SVGResourceFilter.h:
2802         (WebCore::SVGResourceFilter::filterBoundingBox):
2803         (WebCore::SVGResourceFilter::setFilterBoundingBox):
2804         (WebCore::SVGResourceFilter::itemBoundingBox):
2805         (WebCore::SVGResourceFilter::setItemBoundingBox):
2806         (WebCore::SVGResourceFilter::builder):
2807
2808 2009-05-31  Dirk Schulze  <krit@webkit.org>
2809
2810         Reviewed by Nikolas Zimmermann.
2811
2812         WebKit needs cross-platform filter system
2813         [https://bugs.webkit.org/show_bug.cgi?id=19991]
2814
2815         Adding 'in1' attribute support for <feFlood>, as specified in SVG 1.1.
2816         This change helps creating test cases, once filters are activated.
2817
2818         * svg/SVGFEFloodElement.cpp:
2819         (WebCore::SVGFEFloodElement::SVGFEFloodElement):
2820         (WebCore::SVGFEFloodElement::parseMappedAttribute):
2821         (WebCore::SVGFEFloodElement::build):
2822         * svg/SVGFEFloodElement.h:
2823         * svg/SVGFEFloodElement.idl:
2824         * svg/graphics/filters/SVGFEFlood.cpp:
2825         (WebCore::FEFlood::FEFlood):
2826         (WebCore::FEFlood::create):
2827         * svg/graphics/filters/SVGFEFlood.h:
2828
2829 2009-05-31  Dirk Schulze  <krit@webkit.org>
2830
2831         Reviewed by Nikolas Zimmermann.
2832
2833         WebKit needs cross-platform filter system
2834         [https://bugs.webkit.org/show_bug.cgi?id=19991]
2835
2836         Replace all occurrences of SVGResourceFilter by Filter. This is the last 
2837         step for a SVG independent filter system. Every other part of WebCore can
2838         use the filter system by creating a new Filter object.
2839
2840         * GNUmakefile.am:
2841         * WebCore.pro:
2842         * WebCore.xcodeproj/project.pbxproj:
2843         * platform/graphics/filters/FEBlend.cpp:
2844         (WebCore::FEBlend::apply):
2845         * platform/graphics/filters/FEBlend.h:
2846         * platform/graphics/filters/FEColorMatrix.cpp:
2847         (WebCore::FEColorMatrix::apply):
2848         * platform/graphics/filters/FEColorMatrix.h:
2849         * platform/graphics/filters/FEComponentTransfer.cpp:
2850         (WebCore::FEComponentTransfer::apply):
2851         * platform/graphics/filters/FEComponentTransfer.h:
2852         * platform/graphics/filters/FEComposite.cpp:
2853         (WebCore::FEComposite::apply):
2854         * platform/graphics/filters/FEComposite.h:
2855         * platform/graphics/filters/Filter.h: Added.
2856         (WebCore::Filter::setSourceImage):
2857         (WebCore::Filter::sourceImage):
2858         * platform/graphics/filters/FilterEffect.h:
2859         * platform/graphics/filters/SourceAlpha.cpp:
2860         (WebCore::SourceAlpha::apply):
2861         * platform/graphics/filters/SourceAlpha.h:
2862         * platform/graphics/filters/SourceGraphic.cpp:
2863         (WebCore::SourceGraphic::apply):
2864         * platform/graphics/filters/SourceGraphic.h:
2865         * svg/Filter.cpp: Removed.
2866         * svg/Filter.h: Removed.
2867         * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
2868         (WebCore::FEConvolveMatrix::apply):
2869         * svg/graphics/filters/SVGFEConvolveMatrix.h:
2870         * svg/graphics/filters/SVGFEDiffuseLighting.cpp:
2871         (WebCore::FEDiffuseLighting::apply):
2872         * svg/graphics/filters/SVGFEDiffuseLighting.h:
2873         * svg/graphics/filters/SVGFEDisplacementMap.cpp:
2874         (WebCore::FEDisplacementMap::apply):
2875         * svg/graphics/filters/SVGFEDisplacementMap.h:
2876         * svg/graphics/filters/SVGFEFlood.cpp:
2877         (WebCore::FEFlood::apply):
2878         * svg/graphics/filters/SVGFEFlood.h:
2879         * svg/graphics/filters/SVGFEGaussianBlur.cpp:
2880         (WebCore::FEGaussianBlur::apply):
2881         * svg/graphics/filters/SVGFEGaussianBlur.h:
2882         * svg/graphics/filters/SVGFEImage.cpp:
2883         (WebCore::FEImage::apply):
2884         * svg/graphics/filters/SVGFEImage.h:
2885         * svg/graphics/filters/SVGFEMerge.cpp:
2886         (WebCore::FEMerge::apply):
2887         * svg/graphics/filters/SVGFEMerge.h:
2888         * svg/graphics/filters/SVGFEMorphology.cpp:
2889         (WebCore::FEMorphology::apply):
2890         * svg/graphics/filters/SVGFEMorphology.h:
2891         * svg/graphics/filters/SVGFEOffset.cpp:
2892         (WebCore::FEOffset::apply):
2893         * svg/graphics/filters/SVGFEOffset.h:
2894         * svg/graphics/filters/SVGFESpecularLighting.cpp:
2895         (WebCore::FESpecularLighting::apply):
2896         * svg/graphics/filters/SVGFESpecularLighting.h:
2897         * svg/graphics/filters/SVGFETile.cpp:
2898         (WebCore::FETile::apply):
2899         * svg/graphics/filters/SVGFETile.h:
2900         * svg/graphics/filters/SVGFETurbulence.cpp:
2901         (WebCore::FETurbulence::apply):
2902         * svg/graphics/filters/SVGFETurbulence.h:
2903         * svg/graphics/filters/SVGFilter.cpp: Added.
2904         (WebCore::SVGFilter::SVGFilter):
2905         (WebCore::SVGFilter::calculateEffectSubRegion):
2906         (WebCore::SVGFilter::create):
2907         * svg/graphics/filters/SVGFilter.h: Added.
2908
2909 2009-05-30  Kevin Ollivier  <kevino@theolliviers.com>
2910
2911         Build fix for platforms without plugins support.
2912
2913         * plugins/PluginViewNone.cpp:
2914         (WebCore::PluginView::userAgentStatic):
2915         (WebCore::PluginView::getValueStatic):
2916
2917 2009-05-30  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2918
2919         Reviewed by Darin Adler.
2920
2921         Fixes: https://bugs.webkit.org/show_bug.cgi?id=25979
2922
2923         Fix regression, local WML files won't load anymore, as the mimetype isn't correctly detected.    
2924         Bug filed at <rdar://problem/6917571> to cover this CFNetwork limitation.
2925
2926         * platform/network/mac/ResourceHandleMac.mm:
2927         (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
2928
2929 2009-05-29  Sam Weinig  <sam@webkit.org>
2930
2931         Reviewed by Anders Carlsson.
2932
2933         Fix for https://bugs.webkit.org/show_bug.cgi?id=26091
2934         Make storage events match the current spec.
2935         - Storage event listeners are added to the window.
2936         - Storage events are dispatched to the window.
2937
2938         Updated existing tests.
2939
2940         * dom/Document.cpp:
2941         (WebCore::Document::dispatchWindowEvent):
2942         * dom/Document.h:
2943         * dom/Node.cpp:
2944         * dom/Node.h:
2945         * html/HTMLBodyElement.cpp:
2946         (WebCore::HTMLBodyElement::parseMappedAttribute):
2947         * storage/LocalStorageArea.cpp:
2948         (WebCore::LocalStorageArea::dispatchStorageEvent):
2949         * storage/SessionStorageArea.cpp:
2950         (WebCore::SessionStorageArea::dispatchStorageEvent):
2951
2952 2009-05-30  Darin Adler  <darin@apple.com>
2953
2954         Reviewed by Adele Peterson.
2955
2956         Bug 26097: REGRESSION (r44283): Tab key doesn't work when focus is on a <select> element
2957
2958         Test: fast/forms/focus-control-to-page.html
2959
2960         * dom/SelectElement.h: Made destructor protected. Tweaked a bit.
2961
2962         * html/HTMLSelectElement.cpp: Removed unneeded includes.
2963         (WebCore::HTMLSelectElement::remove): Removed unneeded range check of the
2964         result of optionToListIndex.
2965         (WebCore::HTMLSelectElement::parseMappedAttribute): Removed code to set the
2966         unused attribute, m_minwidth.
2967         (WebCore::HTMLSelectElement::defaultEventHandler): The actual bug fix.
2968         Call through to the base class defaultEventHandler if the event hasn't
2969         been handled yet.
2970
2971         * html/HTMLSelectElement.h: Removed unneeded includes. Made a lot more functions
2972         private. Removed unused minWidth function and m_minwidth data member.
2973
2974 2009-05-30  Fridrich Strba  <fridrich.strba@bluewin.ch>
2975
2976         Reviewed by Holger Freyther.
2977
2978         The two KeyboardCodes.h files are basically identical and the
2979         qt one is properly #ifdef-ed for different win32 systems. Share
2980         them between Qt and Gtk implementations.
2981
2982         * GNUmakefile.am:
2983         * platform/KeyboardCodes.h: Copied from WebCore/platform/qt/KeyboardCodes.h.
2984         * platform/gtk/KeyboardCodes.h: Removed.
2985         * platform/qt/KeyboardCodes.h: Removed.
2986
2987 2009-05-30  Jeremy Orlow  <jorlow@chromium.org>
2988
2989         Reviewed by Sam Weinig.
2990
2991         LocalStorage and SessionStorage's implicit setters do not correctly 
2992         handle null.  The custom JS bindings should convert to strings
2993         unconditionally and not try to handle null specially.
2994         https://bugs.webkit.org/show_bug.cgi?id=25970
2995
2996         Tests: storage/domstorage/localstorage/string-conversion.html
2997                storage/domstorage/sessionstorage/string-conversion.html
2998
2999         * bindings/js/JSStorageCustom.cpp:
3000         (WebCore::JSStorage::customPut):
3001
3002 2009-05-30  Dan Bernstein  <mitz@apple.com>
3003
3004         Reviewed by Darin Adler.
3005
3006         - fix <rdar://problem/6935192> REGRESSION (Safari 3-TOT): Scroll
3007           bars in key window draw as inactive if the WebView is not active
3008
3009         Test: platform/mac/scrollbars/key-window-not-first-responder.html
3010
3011         * platform/mac/ScrollbarThemeMac.mm:
3012         (WebCore::ScrollbarThemeMac::paint): Use the window's key state instead
3013         of the WebView's first responder state to switch between active and
3014         inactive state.
3015
3016 2009-05-30  Dan Bernstein  <mitz@apple.com>
3017
3018         Reviewed by Simon Fraser.
3019
3020         - fix https://bugs.webkit.org/show_bug.cgi?id=18445
3021           <rdar://problem/5931174> Assertion failure in CSSGradientValue::image
3022           with -webkit-gradient as body's background
3023
3024         Test: fast/backgrounds/body-generated-image-propagated-to-root.html
3025
3026         * rendering/RenderBoxModelObject.cpp:
3027         (WebCore::RenderBoxModelObject::paintFillLayerExtended): Check if this
3028         is the root element painting a background layer propagated from the
3029         body, and if it is, use the body's renderer as the client to
3030         StyleImage::image().
3031
3032 2009-05-30  Holger Hans Peter Freyther  <zecke@selfish.org>
3033
3034         Unreviewed build fix for AXObjectCache.
3035
3036         For !HAVE(ACCESSIBILITY) postNotification was defined twice. Move
3037         that into the #ifdef.
3038
3039         * accessibility/AXObjectCache.cpp:
3040
3041 2009-05-29  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3042
3043         Reviewed by George Staikos.
3044
3045         Fixes: https://bugs.webkit.org/show_bug.cgi?id=26072
3046
3047         Add support for the last missing WML element: <select>. This patch adds WMLSelectElement, providing
3048         the same functionality HTMLSelectElement has. The WML specific features will follow soon.
3049     
3050         Add simple testcase covering <select> element rendering: fast/wml/select.wml
3051
3052         * GNUmakefile.am:
3053         * WebCore.pro:
3054         * WebCore.vcproj/WebCore.vcproj:
3055         * WebCore.xcodeproj/project.pbxproj:
3056         * dom/OptionElement.cpp:
3057         (WebCore::OptionElement::optionIndex):
3058         (WebCore::isOptionElement):
3059         * dom/OptionElement.h:
3060         * dom/OptionGroupElement.cpp:
3061         (WebCore::isOptionGroupElement):
3062         * dom/OptionGroupElement.h:
3063         * dom/SelectElement.cpp:
3064         (WebCore::SelectElement::accessKeySetSelectedIndex):
3065         (WebCore::toSelectElement):
3066         * dom/SelectElement.h:
3067         * html/HTMLOptionElement.cpp:
3068         (WebCore::HTMLOptionElement::index):
3069         * html/HTMLSelectElement.cpp:
3070         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
3071         * rendering/RenderListBox.cpp:
3072         (WebCore::RenderListBox::paintItemForeground):
3073         * rendering/RenderMenuList.cpp:
3074         (WebCore::RenderMenuList::itemIsEnabled):
3075         (WebCore::RenderMenuList::itemIsLabel):
3076         * wml/WMLFormControlElement.cpp:
3077         (WebCore::WMLFormControlElement::attach):
3078         (WebCore::WMLFormControlElement::recalcStyle):
3079         * wml/WMLFormControlElement.h:
3080         * wml/WMLInputElement.cpp:
3081         (WebCore::WMLInputElement::attach):
3082         * wml/WMLOptGroupElement.cpp:
3083         (WebCore::WMLOptGroupElement::insertBefore):
3084         (WebCore::WMLOptGroupElement::replaceChild):
3085         (WebCore::WMLOptGroupElement::removeChild):
3086         (WebCore::WMLOptGroupElement::appendChild):
3087         (WebCore::WMLOptGroupElement::removeChildren):
3088         (WebCore::ownerSelectElement):
3089         (WebCore::WMLOptGroupElement::accessKeyAction):
3090         (WebCore::WMLOptGroupElement::childrenChanged):
3091         (WebCore::WMLOptGroupElement::parseMappedAttribute):
3092         (WebCore::WMLOptGroupElement::attach):
3093         (WebCore::WMLOptGroupElement::detach):
3094         (WebCore::WMLOptGroupElement::recalcSelectOptions):
3095         * wml/WMLOptionElement.cpp:
3096         (WebCore::ownerSelectElement):
3097         (WebCore::WMLOptionElement::accessKeyAction):
3098         (WebCore::WMLOptionElement::childrenChanged):
3099         (WebCore::WMLOptionElement::parseMappedAttribute):
3100         (WebCore::WMLOptionElement::attach):
3101         (WebCore::WMLOptionElement::detach):
3102         (WebCore::WMLOptionElement::insertedIntoDocument):
3103         * wml/WMLSelectElement.cpp: Added.
3104         (WebCore::WMLSelectElement::WMLSelectElement):
3105         (WebCore::WMLSelectElement::~WMLSelectElement):
3106         (WebCore::WMLSelectElement::formControlType):
3107         (WebCore::WMLSelectElement::isKeyboardFocusable):
3108         (WebCore::WMLSelectElement::isMouseFocusable):
3109         (WebCore::WMLSelectElement::selectAll):
3110         (WebCore::WMLSelectElement::recalcStyle):
3111         (WebCore::WMLSelectElement::dispatchFocusEvent):
3112         (WebCore::WMLSelectElement::dispatchBlurEvent):
3113         (WebCore::WMLSelectElement::selectedIndex):
3114         (WebCore::WMLSelectElement::setSelectedIndex):
3115         (WebCore::WMLSelectElement::saveFormControlState):
3116         (WebCore::WMLSelectElement::restoreFormControlState):
3117         (WebCore::WMLSelectElement::childrenChanged):
3118         (WebCore::WMLSelectElement::parseMappedAttribute):
3119         (WebCore::WMLSelectElement::createRenderer):
3120         (WebCore::WMLSelectElement::appendFormData):
3121         (WebCore::WMLSelectElement::optionToListIndex):
3122         (WebCore::WMLSelectElement::listToOptionIndex):
3123         (WebCore::WMLSelectElement::reset):
3124         (WebCore::WMLSelectElement::defaultEventHandler):
3125         (WebCore::WMLSelectElement::accessKeyAction):
3126         (WebCore::WMLSelectElement::setActiveSelectionAnchorIndex):
3127         (WebCore::WMLSelectElement::setActiveSelectionEndIndex):
3128         (WebCore::WMLSelectElement::updateListBoxSelection):
3129         (WebCore::WMLSelectElement::listBoxOnChange):
3130         (WebCore::WMLSelectElement::menuListOnChange):
3131         (WebCore::WMLSelectElement::activeSelectionStartListIndex):
3132         (WebCore::WMLSelectElement::activeSelectionEndListIndex):
3133         (WebCore::WMLSelectElement::accessKeySetSelectedIndex):
3134         (WebCore::WMLSelectElement::setRecalcListItems):
3135         (WebCore::WMLSelectElement::scrollToSelection):
3136         (WebCore::WMLSelectElement::insertedIntoTree):
3137         * wml/WMLSelectElement.h: Added.
3138         (WebCore::WMLSelectElement::canSelectAll):
3139         (WebCore::WMLSelectElement::canStartSelection):
3140         (WebCore::WMLSelectElement::size):
3141         (WebCore::WMLSelectElement::multiple):
3142         (WebCore::WMLSelectElement::listItems):
3143         * wml/WMLTagNames.in:
3144
3145 2009-05-29  David Levin  <levin@chromium.org>
3146
3147         Reviewed by NOBODY (build fix for windows).
3148
3149         http://trac.webkit.org/changeset/44279 left in a "Vector<WCHAR> localeNameBuf"
3150         that it was trying to replace.  Resulting in this variable being defined twice (and
3151         the second time incorrectly).
3152
3153         * platform/win/Language.cpp:
3154         (WebCore::localeInfo):
3155
3156 2009-05-29  Takeshi Yoshino  <tyoshino@google.com>
3157
3158         Reviewed by Darin Alder.
3159
3160         https://bugs.webkit.org/show_bug.cgi?id=26018
3161
3162         Fix behavior of the Element View of the Web Inspector for double
3163         clicking the element outline tree.
3164
3165         Double clicking the element outline tree should
3166         1) on attribute: enter attribute editing mode
3167         2) on text: enter text editing mode
3168         3) otherwise: change root node to the parent element of double clicked
3169            element.
3170
3171         Now, 3) is broken. For example, clicking <html> clears the element
3172         outline view.
3173
3174         rootDOMNode should be updated to this.representedObject.parentNode, not
3175         this.parent.representedObject which is parent inside the element
3176         outline tree itself.
3177
3178         * inspector/front-end/ElementsTreeOutline.js:
3179         (WebInspector.ElementsTreeElement.prototype.ondblclick):
3180
3181 2009-05-29  David Moore  <davemoore@google.com>
3182
3183         Reviewed by Darin Alder.
3184
3185         https://bugs.webkit.org/show_bug.cgi?id=26001
3186         Change many of the uses of String::adopt() to String::createUninitialized().
3187         This allows those strings to use an inlined buffer for their characters.
3188
3189         * dom/StyleElement.cpp:
3190         Loop over nodes to precompute length of string and then
3191         write the characters into the allocated inline buffer
3192         (WebCore::StyleElement::process):
3193         * dom/Text.cpp:
3194         Loop over nodes to precompute length of string and then
3195         write the characters into the allocated inline buffer
3196         (WebCore::Text::wholeText):
3197         (WebCore::Text::rendererIsNeeded):
3198         (WebCore::Text::createRenderer):
3199         (WebCore::Text::createWithLengthLimit):
3200         (WebCore::Text::formatForDebugger):
3201         * platform/text/String.cpp:
3202         (WebCore::String::append):
3203         (WebCore::String::insert):
3204         (WebCore::String::truncate):
3205         (WebCore::String::remove):
3206         * platform/text/StringBuilder.cpp:
3207         (WebCore::StringBuilder::toString):
3208         * platform/text/StringImpl.cpp:
3209         (WebCore::StringImpl::lower):
3210         (WebCore::StringImpl::upper):
3211         (WebCore::StringImpl::secure):
3212         (WebCore::StringImpl::foldCase):
3213         (WebCore::StringImpl::replace):
3214         * platform/text/TextCodecLatin1.cpp:
3215         (WebCore::TextCodecLatin1::decode):
3216         * platform/text/TextCodecUserDefined.cpp:
3217         (WebCore::TextCodecUserDefined::decode):
3218         * platform/win/Language.cpp:
3219         (WebCore::localeInfo):
3220
3221 2009-05-29  Takeshi Yoshino  <tyoshino@google.com>
3222
3223         Reviewed by Darin Alder.
3224
3225         Bug 25911: Apply href in base elements to anchors shown on the source viewer
3226         https://bugs.webkit.org/show_bug.cgi?id=25911
3227
3228         In rendering HTML sources, parse base elements to apply the base URI to
3229         anchors shown on the source viewer.
3230
3231         This issue was originally reported to the Chromium issue tracker.
3232         http://code.google.com/p/chromium/issues/detail?id=2418
3233
3234         Test: fast/frames/viewsource-link-on-href-value.html
3235
3236         * html/HTMLViewSourceDocument.cpp:
3237         (WebCore::HTMLViewSourceDocument::addViewSourceToken):
3238
3239 2009-05-29  Rob Buis  <rwlbuis@gmail.com>
3240
3241         Reviewed by David Hyatt.
3242
3243         https://bugs.webkit.org/show_bug.cgi?id=22429
3244         document.styleSheets collection ignores media=presentation
3245
3246         Ensure that stylesheets though <link> show up in document.styleSheets regardless of media attribute.
3247
3248         Test: fast/css/sheet-collection-link.html
3249
3250         * html/HTMLLinkElement.cpp:
3251         (WebCore::HTMLLinkElement::process):
3252
3253 2009-05-29  Jian Li  <jianli@chromium.org>
3254
3255         Reviewed by Dimitri Glazkov.
3256
3257         https://bugs.webkit.org/show_bug.cgi?id=26069
3258         Fix a crash in custom V8 bindings code for XMLHttpRequest.
3259
3260         Test: fast/xmlhttprequest/xmlhttprequest-open-after-iframe-onload-remove-self.html
3261
3262         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
3263         (WebCore::CALLBACK_FUNC_DECL):
3264
3265 2009-05-29  David Levin  <levin@chromium.org>
3266
3267         Reviewed by Darin Adler.
3268
3269         Bug 26074: SQLTransaction::executeSQL does an unnecessary call to String::copy.
3270         https://bugs.webkit.org/show_bug.cgi?id=26074
3271
3272         The constructor for SQLStatement already does a copy for this string.
3273
3274         * storage/SQLTransaction.cpp:
3275         (WebCore::SQLTransaction::executeSQL):
3276
3277 2009-05-29  Darin Adler  <darin@apple.com>
3278
3279         Fix build; the new Cairo code compiled on Windows only.
3280
3281         * platform/graphics/gtk/FontPlatformData.h: Added syntheticBold
3282         and syntheticOblique functions as in the Windows version to make it
3283         easier to use this cross-platform. Later we can make data members
3284         private as in the Windows version.
3285         * platform/graphics/mac/FontPlatformData.h: Ditto.
3286
3287 2009-05-29  Alexander Macdonald  <alexmac@adobe.com>
3288
3289         Reviewed by Darin Adler.
3290
3291         Added support for synthetic bold/oblique font rendering
3292         on platforms that use cairo.
3293
3294         * platform/graphics/SimpleFontData.h:
3295         * platform/graphics/cairo/FontCairo.cpp:
3296         (WebCore::Font::drawGlyphs):
3297         * platform/graphics/gtk/SimpleFontDataGtk.cpp:
3298         (WebCore::SimpleFontData::platformInit):
3299         * platform/graphics/gtk/SimpleFontDataPango.cpp:
3300         (WebCore::SimpleFontData::platformInit):
3301         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
3302         (WebCore::SimpleFontData::platformInit):
3303
3304 2009-05-29  Chris Fleizach  <cfleizach@apple.com>
3305
3306         Reviewed by Beth Dakin.
3307
3308         Bug 26024: AX: possible to fail assertion because AXPostNotification calls accessibilityIsIgnored
3309         https://bugs.webkit.org/show_bug.cgi?id=26024
3310
3311         AX notifications are posted after a one shot timer so that notifications are not performed mid-layout.
3312         Consolidated postNotification and postNotificationToElement into one method.
3313
3314         * accessibility/AXObjectCache.cpp:
3315         (WebCore::AXObjectCache::AXObjectCache):
3316         (WebCore::AXObjectCache::notificationPostTimerFired):
3317         (WebCore::AXObjectCache::postNotification):
3318         (WebCore::AXObjectCache::selectedChildrenChanged):
3319         * accessibility/AXObjectCache.h:
3320         (WebCore::AXObjectCache::postNotification):
3321         (WebCore::AXObjectCache::postPlatformNotification):
3322         * accessibility/AccessibilityRenderObject.cpp:
3323         (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
3324         * accessibility/chromium/AXObjectCacheChromium.cpp:
3325         (WebCore::AXObjectCache::postPlatformNotification):
3326         * accessibility/gtk/AXObjectCacheAtk.cpp:
3327         (WebCore::AXObjectCache::postPlatformNotification):
3328         * accessibility/mac/AXObjectCacheMac.mm:
3329         (WebCore::AXObjectCache::postPlatformNotification):
3330         * accessibility/win/AXObjectCacheWin.cpp:
3331         (WebCore::AXObjectCache::postPlatformNotification):
3332         * dom/Document.cpp:
3333         (WebCore::Document::implicitClose):
3334         * editing/Editor.cpp:
3335         (WebCore::Editor::respondToChangedContents):
3336         * editing/mac/SelectionControllerMac.mm:
3337         (WebCore::SelectionController::notifyAccessibilityForSelectionChange):
3338         * page/FrameView.cpp:
3339         (WebCore::FrameView::layout):
3340         * rendering/RenderTextControl.cpp:
3341         (WebCore::RenderTextControl::setInnerTextValue):
3342
3343 2009-05-29  Brent Fulgham  <bfulgham@webkit.org>
3344
3345         Reviewed by Adam Roben.
3346
3347         Build fix for Windows Cairo target.
3348         https://bugs.webkit.org/show_bug.cgi?id=25972
3349
3350         Compiler mistakenly selects SMILTime min/max instead of STL version,
3351         resulting in a build error.  This change makes the meaning of the
3352         min/max explicit and avoids the problem.
3353
3354         * html/TimeRanges.h:
3355         (WebCore::TimeRanges::Range::unionWithOverlappingOrContiguousRange):
3356
3357 2009-05-29  Gustavo Noronha Silva  <gns@gnome.org>
3358
3359         Reviewed by Jan Alonzo.
3360
3361         Make SoupMessage a member of ResourceRequest, instead of creating
3362         it in startHttp. Implement updating of ResourceRequest from
3363         SoupMessage, and vice versa.
3364
3365         * GNUmakefile.am:
3366         * platform/network/soup/ResourceHandleSoup.cpp:
3367         (WebCore::ResourceHandle::~ResourceHandle):
3368         (WebCore::gotHeadersCallback):
3369         (WebCore::ResourceHandle::startHttp):
3370         * platform/network/soup/ResourceRequest.h:
3371         (WebCore::ResourceRequest::ResourceRequest):
3372         (WebCore::ResourceRequest::~ResourceRequest):
3373         * platform/network/soup/ResourceRequestSoup.cpp: Added.
3374         (WTF::SoupURI):
3375         (WebCore::ResourceRequest::soupMessage):
3376         (WebCore::ResourceRequest::ResourceRequest):
3377         (WebCore::ResourceRequest::doUpdateResourceRequest):
3378         (WebCore::ResourceRequest::doUpdatePlatformRequest):
3379
3380 2009-05-28  Dmitry Titov  <dimich@chromium.org>
3381
3382         Reviewed by Dimitri Glazkov.
3383
3384         https://bugs.webkit.org/show_bug.cgi?id=26068
3385         V8: Remove the remaining b8::Locker usage in worker code.
3386         This completes the fix for https://bugs.webkit.org/show_bug.cgi?id=25944,
3387         since the patches for enabling timers and that bug have "crossed in the queue".
3388         Existing LayoutTests/fast/workers/worker-timeout.html covers this fix (will start work in Chromium).
3389
3390         * bindings/v8/ScheduledAction.cpp:
3391         (WebCore::ScheduledAction::execute):
3392
3393 2009-05-28  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
3394
3395         Reviewed by Xan Lopez.
3396
3397         Simplify the Accept-Encoding header we are sending out, for it
3398         seems some servers do not enjoy parsing the full, explicit
3399         version.
3400
3401         * platform/network/soup/ResourceHandleSoup.cpp:
3402         (WebCore::ResourceHandle::startHttp):
3403
3404 2009-05-28  Dirk Schulze  <krit@webkit.org>
3405
3406         Reviewed by Nikolas Zimmermann.
3407
3408         Added a new build flag --filters. This replaces the old --svg-filters and enables
3409         other parts of WebKit to use some basic filters of platform/graphics/filters if needed.
3410         This patch also fixes a bug in dom/DOMImplementation.cpp where we used SVG_FILTER. This flag
3411         doesn't exist and was replaced by FILTERS as well as all SVG_FILTERS occurrences.
3412         Filters are not working yet. This patch is just a preperation. Filters are deactivated by
3413         default. 
3414
3415         * Configurations/FeatureDefines.xcconfig:
3416         * DerivedSources.make:
3417         * GNUmakefile.am:
3418         * WebCore.pro:
3419         * bindings/objc/DOM.mm:
3420         (WebCore::createElementClassMap):
3421         * dom/DOMImplementation.cpp:
3422         (WebCore::isSVG10Feature):
3423         (WebCore::isSVG11Feature):
3424         * page/DOMWindow.idl:
3425         * platform/graphics/filters/FEBlend.cpp:
3426         * platform/graphics/filters/FEBlend.h:
3427         * platform/graphics/filters/FEColorMatrix.cpp:
3428         * platform/graphics/filters/FEColorMatrix.h:
3429         * platform/graphics/filters/FEComponentTransfer.cpp:
3430         * platform/graphics/filters/FEComponentTransfer.h:
3431         * platform/graphics/filters/FEComposite.cpp:
3432         * platform/graphics/filters/FEComposite.h:
3433         * platform/graphics/filters/FilterEffect.cpp:
3434         * platform/graphics/filters/FilterEffect.h:
3435         * platform/graphics/filters/SourceAlpha.cpp:
3436         * platform/graphics/filters/SourceAlpha.h:
3437         * platform/graphics/filters/SourceGraphic.cpp:
3438         * platform/graphics/filters/SourceGraphic.h:
3439         * rendering/RenderSVGContainer.cpp:
3440         (WebCore::RenderSVGContainer::selfWillPaint):
3441         * rendering/RenderSVGModelObject.cpp:
3442         * rendering/RenderSVGRoot.cpp:
3443         (WebCore::RenderSVGRoot::selfWillPaint):
3444         * rendering/SVGRenderSupport.cpp:
3445         (WebCore::SVGRenderBase::prepareToRenderSVGContent):
3446         (WebCore::SVGRenderBase::finishRenderSVGContent):
3447         (WebCore::SVGRenderBase::filterBoundingBoxForRenderer):
3448         * svg/Filter.cpp:
3449         * svg/Filter.h:
3450         * svg/FilterBuilder.cpp:
3451         * svg/FilterBuilder.h:
3452         * svg/SVGComponentTransferFunctionElement.cpp:
3453         * svg/SVGComponentTransferFunctionElement.h:
3454         * svg/SVGComponentTransferFunctionElement.idl:
3455         * svg/SVGFEBlendElement.cpp:
3456         * svg/SVGFEBlendElement.h:
3457         * svg/SVGFEBlendElement.idl:
3458         * svg/SVGFEColorMatrixElement.cpp:
3459         * svg/SVGFEColorMatrixElement.h:
3460         * svg/SVGFEColorMatrixElement.idl:
3461         * svg/SVGFEComponentTransferElement.cpp:
3462         * svg/SVGFEComponentTransferElement.h:
3463         * svg/SVGFEComponentTransferElement.idl:
3464         * svg/SVGFECompositeElement.cpp:
3465         * svg/SVGFECompositeElement.h:
3466         * svg/SVGFECompositeElement.idl:
3467         * svg/SVGFEDiffuseLightingElement.cpp:
3468         * svg/SVGFEDiffuseLightingElement.h:
3469         * svg/SVGFEDiffuseLightingElement.idl:
3470         * svg/SVGFEDisplacementMapElement.cpp:
3471         * svg/SVGFEDisplacementMapElement.h:
3472         * svg/SVGFEDisplacementMapElement.idl:
3473         * svg/SVGFEDistantLightElement.cpp:
3474         * svg/SVGFEDistantLightElement.h:
3475         * svg/SVGFEDistantLightElement.idl:
3476         * svg/SVGFEFloodElement.cpp:
3477         * svg/SVGFEFloodElement.h:
3478         * svg/SVGFEFloodElement.idl:
3479         * svg/SVGFEFuncAElement.cpp:
3480         * svg/SVGFEFuncAElement.h:
3481         * svg/SVGFEFuncAElement.idl:
3482         * svg/SVGFEFuncBElement.cpp:
3483         * svg/SVGFEFuncBElement.h:
3484         * svg/SVGFEFuncBElement.idl:
3485         * svg/SVGFEFuncGElement.cpp:
3486         * svg/SVGFEFuncGElement.h:
3487         * svg/SVGFEFuncGElement.idl:
3488         * svg/SVGFEFuncRElement.cpp:
3489         * svg/SVGFEFuncRElement.h:
3490         * svg/SVGFEFuncRElement.idl:
3491         * svg/SVGFEGaussianBlurElement.cpp:
3492         * svg/SVGFEGaussianBlurElement.h:
3493         * svg/SVGFEGaussianBlurElement.idl:
3494         * svg/SVGFEImageElement.cpp:
3495         * svg/SVGFEImageElement.h:
3496         * svg/SVGFEImageElement.idl:
3497         * svg/SVGFELightElement.cpp:
3498         * svg/SVGFELightElement.h:
3499         * svg/SVGFEMergeElement.cpp:
3500         * svg/SVGFEMergeElement.h:
3501         * svg/SVGFEMergeElement.idl:
3502         * svg/SVGFEMergeNodeElement.cpp:
3503         * svg/SVGFEMergeNodeElement.h:
3504         * svg/SVGFEMergeNodeElement.idl:
3505         * svg/SVGFEOffsetElement.cpp:
3506         * svg/SVGFEOffsetElement.h:
3507         * svg/SVGFEOffsetElement.idl:
3508         * svg/SVGFEPointLightElement.cpp:
3509         * svg/SVGFEPointLightElement.h:
3510         * svg/SVGFEPointLightElement.idl:
3511         * svg/SVGFESpecularLightingElement.cpp:
3512         * svg/SVGFESpecularLightingElement.h:
3513         * svg/SVGFESpecularLightingElement.idl:
3514         * svg/SVGFESpotLightElement.cpp:
3515         * svg/SVGFESpotLightElement.h:
3516         * svg/SVGFESpotLightElement.idl:
3517         * svg/SVGFETileElement.cpp:
3518         * svg/SVGFETileElement.h:
3519         * svg/SVGFETileElement.idl:
3520         * svg/SVGFETurbulenceElement.cpp:
3521         * svg/SVGFETurbulenceElement.h:
3522         * svg/SVGFETurbulenceElement.idl:
3523         * svg/SVGFilterElement.cpp:
3524         * svg/SVGFilterElement.h:
3525         * svg/SVGFilterElement.idl:
3526         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3527         * svg/SVGFilterPrimitiveStandardAttributes.h:
3528         * svg/graphics/SVGResourceFilter.cpp:
3529         * svg/graphics/SVGResourceFilter.h:
3530         * svg/graphics/cairo/SVGResourceFilterCairo.cpp:
3531         * svg/graphics/cg/SVGResourceFilterCg.cpp:
3532         * svg/graphics/cg/SVGResourceFilterCg.mm:
3533         * svg/graphics/filters/SVGDistantLightSource.h:
3534         * svg/graphics/filters/SVGFEConvolveMatrix.cpp:
3535         * svg/graphics/filters/SVGFEConvolveMatrix.h:
3536         * svg/graphics/filters/SVGFEDiffuseLighting.cpp:
3537         * svg/graphics/filters/SVGFEDiffuseLighting.h:
3538         * svg/graphics/filters/SVGFEDisplacementMap.cpp:
3539         * svg/graphics/filters/SVGFEDisplacementMap.h:
3540         * svg/graphics/filters/SVGFEFlood.cpp:
3541         * svg/graphics/filters/SVGFEFlood.h:
3542         * svg/graphics/filters/SVGFEGaussianBlur.cpp:
3543         * svg/graphics/filters/SVGFEGaussianBlur.h:
3544         * svg/graphics/filters/SVGFEImage.cpp:
3545         * svg/graphics/filters/SVGFEImage.h:
3546         * svg/graphics/filters/SVGFEMerge.cpp:
3547         * svg/graphics/filters/SVGFEMerge.h:
3548         * svg/graphics/filters/SVGFEMorphology.cpp:
3549         * svg/graphics/filters/SVGFEMorphology.h:
3550         * svg/graphics/filters/SVGFEOffset.cpp:
3551         * svg/graphics/filters/SVGFEOffset.h:
3552         * svg/graphics/filters/SVGFESpecularLighting.cpp:
3553         * svg/graphics/filters/SVGFESpecularLighting.h:
3554         * svg/graphics/filters/SVGFETile.cpp:
3555         * svg/graphics/filters/SVGFETile.h:
3556         * svg/graphics/filters/SVGFETurbulence.cpp:
3557         * svg/graphics/filters/SVGFETurbulence.h:
3558         * svg/graphics/filters/SVGFilterEffect.cpp:
3559         * svg/graphics/filters/SVGFilterEffect.h:
3560         * svg/graphics/filters/SVGLightSource.cpp:
3561         * svg/graphics/filters/SVGLightSource.h:
3562         * svg/graphics/filters/SVGPointLightSource.h:
3563         * svg/graphics/filters/SVGSpotLightSource.h:
3564         * svg/graphics/filters/cg/SVGFEHelpersCg.h:
3565         * svg/graphics/filters/cg/SVGFEHelpersCg.mm:
3566         * svg/graphics/filters/cg/SVGFilterEffectCg.mm:
3567         * svg/graphics/filters/cg/WKArithmeticFilter.h:
3568         * svg/graphics/filters/cg/WKArithmeticFilter.m:
3569         * svg/graphics/filters/cg/WKComponentMergeFilter.h:
3570         * svg/graphics/filters/cg/WKComponentMergeFilter.m:
3571         * svg/graphics/filters/cg/WKDiffuseLightingFilter.h:
3572         * svg/graphics/filters/cg/WKDiffuseLightingFilter.m:
3573         * svg/graphics/filters/cg/WKDiscreteTransferFilter.h:
3574         * svg/graphics/filters/cg/WKDiscreteTransferFilter.m:
3575         * svg/graphics/filters/cg/WKDisplacementMapFilter.h:
3576         * svg/graphics/filters/cg/WKDisplacementMapFilter.m:
3577         * svg/graphics/filters/cg/WKDistantLightFilter.h:
3578         * svg/graphics/filters/cg/WKDistantLightFilter.m:
3579         * svg/graphics/filters/cg/WKGammaTransferFilter.h:
3580         * svg/graphics/filters/cg/WKGammaTransferFilter.m:
3581         * svg/graphics/filters/cg/WKIdentityTransferFilter.h:
3582         * svg/graphics/filters/cg/WKIdentityTransferFilter.m:
3583         * svg/graphics/filters/cg/WKLinearTransferFilter.h:
3584         * svg/graphics/filters/cg/WKLinearTransferFilter.m:
3585         * svg/graphics/filters/cg/WKNormalMapFilter.h:
3586         * svg/graphics/filters/cg/WKNormalMapFilter.m:
3587         * svg/graphics/filters/cg/WKPointLightFilter.h:
3588         * svg/graphics/filters/cg/WKPointLightFilter.m:
3589         * svg/graphics/filters/cg/WKSpecularLightingFilter.h:
3590         * svg/graphics/filters/cg/WKSpecularLightingFilter.m:
3591         * svg/graphics/filters/cg/WKSpotLightFilter.h:
3592         * svg/graphics/filters/cg/WKSpotLightFilter.m:
3593         * svg/graphics/filters/cg/WKTableTransferFilter.h:
3594         * svg/graphics/filters/cg/WKTableTransferFilter.m:
3595         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.h:
3596         * svg/graphics/mac/SVGResourceFilterPlatformDataMac.mm:
3597         * svg/graphics/qt/SVGResourceFilterQt.cpp:
3598         * svg/graphics/skia/SVGResourceFilterSkia.cpp:
3599         * svg/svgtags.in:
3600
3601 2009-05-28  Brett Wilson  <brettw@chromium.org>
3602
3603         Unreviewed, build fix.
3604
3605         https://bugs.webkit.org/show_bug.cgi?id=26067
3606
3607         Add casts for scale function to make more explicit what is happening
3608         and fix a compiler warning.
3609
3610         * platform/graphics/IntSize.h:
3611         (WebCore::IntSize::scale):
3612
3613 2009-05-28  Sam Weinig  <sam@webkit.org>
3614
3615         Reviewed by Darin Adler.
3616
3617         Remove the returnValueSlot concept from JSDOMWindowBase. Now that windows
3618         are not cleared on navigation it is no longer necessary.
3619
3620         * bindings/js/JSDOMWindowBase.cpp:
3621         (WebCore::JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData):
3622         (WebCore::JSDOMWindowBase::willRemoveFromWindowShell):
3623         * bindings/js/JSDOMWindowBase.h:
3624         * bindings/js/JSDOMWindowCustom.cpp:
3625         (WebCore::JSDOMWindow::showModalDialog):
3626
3627 2009-05-19  Xan Lopez  <xlopez@igalia.com>
3628
3629         Reviewed by Jan Alonzo and Gustavo Noronha.
3630
3631         https://bugs.webkit.org/show_bug.cgi?id=25415
3632         [GTK][ATK] Please implement support for get_text_at_offset
3633
3634         Implement atk_text_get_text_{at,after,before}_offset.
3635
3636         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
3637
3638 2009-05-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3639
3640         Rubber-stamped by Darin Adler.
3641
3642         Remove unnecessary destructor from InputElementData/OptionElementData.
3643
3644         * dom/InputElement.cpp:
3645         * dom/InputElement.h:
3646         * dom/OptionElement.cpp:
3647         * dom/OptionElement.h:
3648
3649 2009-05-28  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3650
3651         Reviewed by Darin Adler.
3652
3653         Fixes: https://bugs.webkit.org/show_bug.cgi?id=26062
3654
3655         Refactor code from all virtual methods in HTMLSelectElement (that are also needed for WMLSelectElement)
3656         in the recently introduced SelectElement abstract base class. Follow the same design sheme that InputElement uses.
3657
3658         A follow-up patch can now easily add WMLSelectElement.
3659
3660         * dom/OptionElement.h:
3661         * dom/SelectElement.cpp:
3662         (WebCore::SelectElement::selectAll):
3663         (WebCore::SelectElement::saveLastSelection):
3664         (WebCore::isOptionElement):
3665         (WebCore::isOptionGroupElement):
3666         (WebCore::SelectElement::nextSelectableListIndex):
3667         (WebCore::SelectElement::previousSelectableListIndex):
3668         (WebCore::SelectElement::setActiveSelectionAnchorIndex):
3669         (WebCore::SelectElement::setActiveSelectionEndIndex):
3670         (WebCore::SelectElement::updateListBoxSelection):
3671         (WebCore::SelectElement::listBoxOnChange):
3672         (WebCore::SelectElement::menuListOnChange):
3673         (WebCore::SelectElement::scrollToSelection):
3674         (WebCore::SelectElement::recalcStyle):
3675         (WebCore::SelectElement::setRecalcListItems):
3676         (WebCore::SelectElement::recalcListItems):
3677         (WebCore::SelectElement::selectedIndex):
3678         (WebCore::SelectElement::setSelectedIndex):
3679         (WebCore::SelectElement::optionToListIndex):
3680         (WebCore::SelectElement::listToOptionIndex):
3681         (WebCore::SelectElement::dispatchFocusEvent):
3682         (WebCore::SelectElement::dispatchBlurEvent):
3683         (WebCore::SelectElement::deselectItems):
3684         (WebCore::SelectElement::saveFormControlState):
3685         (WebCore::SelectElement::restoreFormControlState):
3686         (WebCore::SelectElement::parseMultipleAttribute):
3687         (WebCore::SelectElement::appendFormData):
3688         (WebCore::SelectElement::reset):
3689         (WebCore::SelectElement::menuListDefaultEventHandler):
3690         (WebCore::SelectElement::listBoxDefaultEventHandler):
3691         (WebCore::SelectElement::defaultEventHandler):
3692         (WebCore::SelectElement::lastSelectedListIndex):
3693         (WebCore::stripLeadingWhiteSpace):
3694         (WebCore::SelectElement::typeAheadFind):
3695         (WebCore::SelectElement::insertedIntoTree):
3696         (WebCore::SelectElementData::SelectElementData):
3697         (WebCore::SelectElementData::checkListItems):
3698         (WebCore::SelectElementData::listItems):
3699         * dom/SelectElement.h:
3700         (WebCore::SelectElementData::multiple):
3701         (WebCore::SelectElementData::setMultiple):
3702         (WebCore::SelectElementData::size):
3703         (WebCore::SelectElementData::setSize):
3704         (WebCore::SelectElementData::usesMenuList):
3705         (WebCore::SelectElementData::lastOnChangeIndex):
3706         (WebCore::SelectElementData::setLastOnChangeIndex):
3707         (WebCore::SelectElementData::lastOnChangeSelection):
3708         (WebCore::SelectElementData::activeSelectionState):
3709         (WebCore::SelectElementData::setActiveSelectionState):
3710         (WebCore::SelectElementData::activeSelectionAnchorIndex):
3711         (WebCore::SelectElementData::setActiveSelectionAnchorIndex):
3712         (WebCore::SelectElementData::activeSelectionEndIndex):
3713         (WebCore::SelectElementData::setActiveSelectionEndIndex):
3714         (WebCore::SelectElementData::cachedStateForActiveSelection):
3715         (WebCore::SelectElementData::shouldRecalcListItems):
3716         (WebCore::SelectElementData::setShouldRecalcListItems):
3717         (WebCore::SelectElementData::rawListItems):
3718         (WebCore::SelectElementData::repeatingChar):
3719         (WebCore::SelectElementData::setRepeatingChar):
3720         (WebCore::SelectElementData::lastCharTime):
3721         (WebCore::SelectElementData::setLastCharTime):
3722         (WebCore::SelectElementData::typedString):
3723         (WebCore::SelectElementData::setTypedString):
3724         * html/HTMLOptionElement.h:
3725         * html/HTMLSelectElement.cpp:
3726         (WebCore::HTMLSelectElement::HTMLSelectElement):
3727         (WebCore::HTMLSelectElement::recalcStyle):
3728         (WebCore::HTMLSelectElement::formControlType):
3729         (WebCore::HTMLSelectElement::selectedIndex):
3730         (WebCore::HTMLSelectElement::deselectItems):
3731         (WebCore::HTMLSelectElement::setSelectedIndex):
3732         (WebCore::HTMLSelectElement::activeSelectionStartListIndex):
3733         (WebCore::HTMLSelectElement::activeSelectionEndListIndex):
3734         (WebCore::HTMLSelectElement::saveFormControlState):
3735         (WebCore::HTMLSelectElement::restoreFormControlState):
3736         (WebCore::HTMLSelectElement::parseMappedAttribute):
3737         (WebCore::HTMLSelectElement::canSelectAll):
3738         (WebCore::HTMLSelectElement::selectAll):
3739         (WebCore::HTMLSelectElement::createRenderer):
3740         (WebCore::HTMLSelectElement::appendFormData):
3741         (WebCore::HTMLSelectElement::optionToListIndex):
3742         (WebCore::HTMLSelectElement::listToOptionIndex):
3743         (WebCore::HTMLSelectElement::recalcListItems):
3744         (WebCore::HTMLSelectElement::setRecalcListItems):
3745         (WebCore::HTMLSelectElement::reset):
3746         (WebCore::HTMLSelectElement::dispatchFocusEvent):
3747         (WebCore::HTMLSelectElement::dispatchBlurEvent):
3748         (WebCore::HTMLSelectElement::defaultEventHandler):
3749         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
3750         (WebCore::HTMLSelectElement::setActiveSelectionEndIndex):
3751         (WebCore::HTMLSelectElement::updateListBoxSelection):
3752         (WebCore::HTMLSelectElement::menuListOnChange):
3753         (WebCore::HTMLSelectElement::listBoxOnChange):
3754         (WebCore::HTMLSelectElement::saveLastSelection):
3755         (WebCore::HTMLSelectElement::setOption):
3756         (WebCore::HTMLSelectElement::scrollToSelection):
3757         (WebCore::HTMLSelectElement::insertedIntoTree):
3758         * html/HTMLSelectElement.h:
3759         (WebCore::HTMLSelectElement::size):
3760         (WebCore::HTMLSelectElement::multiple):
3761         (WebCore::HTMLSelectElement::listItems):
3762         * wml/WMLOptionElement.cpp:
3763         (WebCore::WMLOptionElement::text):
3764         * wml/WMLOptionElement.h:
3765
3766
3767         * dom/OptionElement.h:
3768         * dom/SelectElement.cpp:
3769         (WebCore::SelectElement::selectAll):
3770         (WebCore::SelectElement::saveLastSelection):
3771         (WebCore::isOptionElement):
3772         (WebCore::isOptionGroupElement):
3773         (WebCore::SelectElement::nextSelectableListIndex):
3774         (WebCore::SelectElement::previousSelectableListIndex):
3775         (WebCore::SelectElement::setActiveSelectionAnchorIndex):
3776         (WebCore::SelectElement::setActiveSelectionEndIndex):
3777         (WebCore::SelectElement::updateListBoxSelection):
3778         (WebCore::SelectElement::listBoxOnChange):
3779         (WebCore::SelectElement::menuListOnChange):
3780         (WebCore::SelectElement::scrollToSelection):
3781         (WebCore::SelectElement::recalcStyle):
3782         (WebCore::SelectElement::setRecalcListItems):
3783         (WebCore::SelectElement::recalcListItems):
3784         (WebCore::SelectElement::selectedIndex):
3785         (WebCore::SelectElement::setSelectedIndex):
3786         (WebCore::SelectElement::optionToListIndex):
3787         (WebCore::SelectElement::listToOptionIndex):
3788         (WebCore::SelectElement::dispatchFocusEvent):
3789         (WebCore::SelectElement::dispatchBlurEvent):
3790         (WebCore::SelectElement::deselectItems):
3791         (WebCore::SelectElement::saveFormControlState):
3792         (WebCore::SelectElement::restoreFormControlState):
3793         (WebCore::SelectElement::parseMultipleAttribute):
3794         (WebCore::SelectElement::appendFormData):
3795         (WebCore::SelectElement::reset):
3796         (WebCore::SelectElement::menuListDefaultEventHandler):
3797         (WebCore::SelectElement::listBoxDefaultEventHandler):
3798         (WebCore::SelectElement::defaultEventHandler):
3799         (WebCore::SelectElement::lastSelectedListIndex):
3800         (WebCore::stripLeadingWhiteSpace):
3801         (WebCore::SelectElement::typeAheadFind):
3802         (WebCore::SelectElement::insertedIntoTree):
3803         (WebCore::SelectElementData::SelectElementData):
3804         (WebCore::SelectElementData::~SelectElementData):
3805         (WebCore::SelectElementData::checkListItems):
3806         (WebCore::SelectElementData::listItems):
3807         * dom/SelectElement.h:
3808         (WebCore::SelectElementData::multiple):
3809         (WebCore::SelectElementData::setMultiple):
3810         (WebCore::SelectElementData::size):
3811         (WebCore::SelectElementData::setSize):
3812         (WebCore::SelectElementData::usesMenuList):
3813         (WebCore::SelectElementData::lastOnChangeIndex):
3814         (WebCore::SelectElementData::setLastOnChangeIndex):
3815         (WebCore::SelectElementData::lastOnChangeSelection):
3816         (WebCore::SelectElementData::activeSelectionState):
3817         (WebCore::SelectElementData::setActiveSelectionState):
3818         (WebCore::SelectElementData::activeSelectionAnchorIndex):
3819         (WebCore::SelectElementData::setActiveSelectionAnchorIndex):
3820         (WebCore::SelectElementData::activeSelectionEndIndex):
3821         (WebCore::SelectElementData::setActiveSelectionEndIndex):
3822         (WebCore::SelectElementData::cachedStateForActiveSelection):
3823         (WebCore::SelectElementData::shouldRecalcListItems):
3824         (WebCore::SelectElementData::setShouldRecalcListItems):
3825         (WebCore::SelectElementData::rawListItems):
3826         (WebCore::SelectElementData::repeatingChar):
3827         (WebCore::SelectElementData::setRepeatingChar):
3828         (WebCore::SelectElementData::lastCharTime):
3829         (WebCore::SelectElementData::setLastCharTime):
3830         (WebCore::SelectElementData::typedString):
3831         (WebCore::SelectElementData::setTypedString):
3832         * html/HTMLOptionElement.h:
3833         * html/HTMLSelectElement.cpp:
3834         (WebCore::HTMLSelectElement::HTMLSelectElement):
3835         (WebCore::HTMLSelectElement::recalcStyle):
3836         (WebCore::HTMLSelectElement::formControlType):
3837         (WebCore::HTMLSelectElement::selectedIndex):
3838         (WebCore::HTMLSelectElement::deselectItems):
3839         (WebCore::HTMLSelectElement::setSelectedIndex):
3840         (WebCore::HTMLSelectElement::activeSelectionStartListIndex):
3841         (WebCore::HTMLSelectElement::activeSelectionEndListIndex):
3842         (WebCore::HTMLSelectElement::saveFormControlState):
3843         (WebCore::HTMLSelectElement::restoreFormControlState):
3844         (WebCore::HTMLSelectElement::parseMappedAttribute):
3845         (WebCore::HTMLSelectElement::canSelectAll):
3846         (WebCore::HTMLSelectElement::selectAll):
3847         (WebCore::HTMLSelectElement::createRenderer):
3848         (WebCore::HTMLSelectElement::appendFormData):
3849         (WebCore::HTMLSelectElement::optionToListIndex):
3850         (WebCore::HTMLSelectElement::listToOptionIndex):
3851         (WebCore::HTMLSelectElement::recalcListItems):
3852         (WebCore::HTMLSelectElement::setRecalcListItems):
3853         (WebCore::HTMLSelectElement::reset):
3854         (WebCore::HTMLSelectElement::dispatchFocusEvent):
3855         (WebCore::HTMLSelectElement::dispatchBlurEvent):
3856         (WebCore::HTMLSelectElement::defaultEventHandler):
3857         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
3858         (WebCore::HTMLSelectElement::setActiveSelectionEndIndex):
3859         (WebCore::HTMLSelectElement::updateListBoxSelection):
3860         (WebCore::HTMLSelectElement::menuListOnChange):
3861         (WebCore::HTMLSelectElement::listBoxOnChange):
3862         (WebCore::HTMLSelectElement::saveLastSelection):
3863         (WebCore::HTMLSelectElement::setOption):
3864         (WebCore::HTMLSelectElement::scrollToSelection):
3865         (WebCore::HTMLSelectElement::insertedIntoTree):
3866         * html/HTMLSelectElement.h:
3867         (WebCore::HTMLSelectElement::size):
3868         (WebCore::HTMLSelectElement::multiple):
3869         (WebCore::HTMLSelectElement::listItems):
3870         * wml/WMLOptionElement.cpp:
3871         (WebCore::WMLOptionElement::text):
3872         * wml/WMLOptionElement.h:
3873
3874 2009-05-28  Adam Roben  <aroben@apple.com>
3875
3876         Don't try to use the new combobox parts on Vista in Classic mode
3877
3878         Fixes:
3879         <rdar://problem/6929277> REGRESSION (r42289+r42350): Windows Classic
3880         theme: drop down lists in Preferences get a line/square
3881         <rdar://problem/6929298> REGRESSION (r42289): Windows Classic: drop
3882         down lists are black with a circle on many sites
3883
3884         Reviewed by Steve Falkenburg.
3885
3886         * rendering/RenderThemeWin.cpp:
3887         (WebCore::RenderThemeWin::paintMenuList): Only use the new combobox
3888         parts when we have a theme (i.e., when we're not in Classic mode).
3889         When we don't have a theme, fall back to the pre-r42289 code.
3890
3891 2009-05-27  Peter Kasting  <pkasting@google.com>
3892
3893         Reviewed by Simon Fraser.
3894
3895         https://bugs.webkit.org/show_bug.cgi?id=25659
3896         Avoid calling frameCount() unnecessarily (which could lead to extra
3897         GIF decoding).
3898
3899         * platform/graphics/BitmapImage.cpp:
3900         (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
3901
3902 2009-05-28  Simon Fraser  <simon.fraser@apple.com>
3903
3904         Reviewed by Oliver Hunt.
3905         
3906         https://bugs.webkit.org/show_bug.cgi?id=8736
3907
3908         Tests: fast/borders/border-radius-constraints.html
3909                fast/borders/border-radius-split-inline.html
3910                
3911         When the sum of the corner radii on a side exceed the length of the side,
3912         reduce the radii according to CSS 3 rules.
3913         
3914         Add RenderStyle::getBorderRadiiForRect() to fetch corner radii, applying
3915         the constraints. Use that for painting borders, box-shadow, clipping replaced
3916         elements
3917
3918         * platform/graphics/IntSize.h:
3919         (WebCore::IntSize::scale):
3920         Add a scale method that scales by a float (using C rounding rules, like IntRect::scale()).
3921
3922         * platform/graphics/Path.cpp:
3923         Make the QUARTER const static.
3924
3925         * rendering/RenderBox.cpp:
3926         (WebCore::RenderBox::pushContentsClip):
3927         Use getBorderRadiiForRect to fetch border radii.
3928
3929         * rendering/RenderBoxModelObject.cpp:
3930         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3931         Use getBorderRadiiForRect to fetch border radii.
3932
3933         (WebCore::RenderBoxModelObject::paintBorder):
3934         Use getBorderRadiiForRect to fetch border radii, and fix a bug when drawing
3935         borders for split inlines, which used to apply the radii for each segment,
3936         and no longer does.
3937
3938         (WebCore::RenderBoxModelObject::paintBoxShadow):
3939         Use getBorderRadiiForRect to fetch border radii.
3940
3941         * rendering/RenderReplaced.cpp:
3942         (WebCore::RenderReplaced::paint):
3943         Use getBorderRadiiForRect to fetch border radii for clipping.
3944
3945         * rendering/RenderWidget.cpp:
3946         (WebCore::RenderWidget::paint):
3947         Use getBorderRadiiForRect to fetch border radii for clipping.
3948
3949         * rendering/style/RenderStyle.h:
3950         * rendering/style/RenderStyle.cpp:
3951         (WebCore::RenderStyle::getBorderRadiiForRect):
3952         New bottleneck method to fetch corner radiil given a rect, applying the constraint
3953         rules.
3954
3955 2009-05-28  Alexey Proskuryakov  <ap@webkit.org>
3956
3957         Reviewed by Darin Adler.
3958
3959         https://bugs.webkit.org/show_bug.cgi?id=26005
3960         Optimization for XPath //* does not preserve context size
3961
3962         Test: fast/xpath/position.html
3963
3964         Fixed the bug by removing the incorrect optimization, and made enough micro-optimizations to
3965         get a performance progression on my tests.
3966
3967         * xml/XPathPath.h: Removed broken optimizeStepPair().
3968
3969         * xml/XPathPath.cpp:
3970         (WebCore::XPath::LocationPath::evaluate): Style fix.
3971         (WebCore::XPath::LocationPath::appendStep): Don't call optimizeStepPair().
3972         (WebCore::XPath::LocationPath::insertFirstStep): Ditto.
3973         (WebCore::XPath::Path::Path): Style fix.
3974
3975         * xml/XPathStep.cpp:
3976         (WebCore::XPath::primaryNodeType): Turned this member function into a static inline helper.
3977         (WebCore::XPath::nodeMatches): Ditto. Don't check for namespace axis, which is unsupported
3978         (and might never be).
3979         (WebCore::XPath::Step::nodesInAxis): Updated for the new nodeMatches() signature.
3980
3981         * xml/XPathStep.h:
3982         (WebCore::XPath::Step::NodeTest::data):
3983         (WebCore::XPath::Step::NodeTest::namespaceURI):
3984         Made these data members AtomicString to avoid repeated conversions. This is the biggest
3985         performance win here.
3986
3987         * xml/XPathUtil.cpp: (WebCore::XPath::stringValue): Reserve some capacity upfront.
3988
3989 2009-05-28  Stephen White  <senorblanco@chromium.org>
3990
3991         Reviewed by Dimitri Glazkov.
3992
3993         When creating a linear or radial gradient with a single stop
3994         at offset 1.0, the Skia layer was allocating 3 stops, but only
3995         filling 2, leaving one uninitialized.  Only 2 stops are necessary
3996         in this case, at offsets (0.0, 1.0).
3997
3998         http://bugs.webkit.org/show_bug.cgi?id=26063
3999
4000         Covered by: LayoutTests/svg/W3C-SVG-1.1/pservers-grad-16-b.svg
4001                     LayoutTests/svg/custom/gradient-stop-corner-cases.svg
4002                     LayoutTests/svg/custom/js-late-gradient-and-object-creation.svg
4003
4004         * platform/graphics/skia/GradientSkia.cpp:
4005         (WebCore::totalStopsNeeded):
4006
4007 2009-05-28  Yury Semikhatsky  <yurys@chromium.org>
4008
4009         Reviewed by Timothy Hatcher.
4010
4011         https://bugs.webkit.org/show_bug.cgi?id=26041
4012         Allow adding resource source to WebInspector.SourceFrame asynchronously.
4013
4014         Provide common implementation for InspectorController::addResourceSourceToFrame and
4015         InspectorController::addSourceToFrame methods.
4016
4017         * bindings/js/JSInspectorControllerCustom.cpp:
4018         * bindings/v8/custom/V8InspectorControllerCustom.cpp:
4019         * inspector/InspectorController.cpp:
4020         (WebCore::InspectorController::addResourceSourceToFrame):
4021         * inspector/InspectorController.h:
4022         * inspector/InspectorController.idl:
4023         * inspector/front-end/SourceFrame.js:
4024         (WebInspector.SourceFrame.prototype.revealLine):
4025         (WebInspector.SourceFrame.prototype.highlightLine):
4026         (WebInspector.SourceFrame.prototype._loaded):
4027         (WebInspector.SourceFrame.prototype._isContentLoaded):
4028         * inspector/front-end/SourceView.js:
4029         (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded):
4030         (WebInspector.SourceView.prototype._contentLoaded):
4031
4032 2009-05-28  Holger Hans Peter Freyther  <zecke@selfish.org>
4033
4034         Reviewed by Xan Lopez.
4035
4036         After r44177 we had a problem when increasing the size
4037         of the window the scrollbars stayed and were not hidden.
4038         This was due WebCore giving up on the Scrollbar as it became
4039         unnecessary but the GtkAdjustment remained unchanged.
4040         So from the point of view of the GtkScrolledWindow scrolling
4041         was still necessary and the GtkScrollbar kept being displayed.
4042
4043         Solve the issue by resetting the GtkAdjustment in the
4044         destructor of ScrollbarGtk.
4045
4046         * platform/gtk/ScrollbarGtk.cpp:
4047         (ScrollbarGtk::~ScrollbarGtk):
4048
4049 2009-05-28  Adam Barth  <abarth@webkit.org>
4050
4051         Reviewed by Darin Adler.
4052
4053         Clean up window.open()'s use of lexical and dynamic scope.
4054
4055         (Added one unreviewed tweak: use dynamicFrame instead of lexicalFrame
4056         for DOMWindow::allowPopUp.)
4057
4058         Test: http/tests/security/frameNavigation/context-for-window-open.html
4059
4060         * bindings/js/JSDOMBinding.cpp:
4061         (WebCore::toDynamicFrame):
4062         (WebCore::processingUserGesture):
4063         (WebCore::completeURL):
4064         * bindings/js/JSDOMBinding.h:
4065         * bindings/js/JSDOMWindowCustom.cpp:
4066         (WebCore::createWindow):
4067         (WebCore::JSDOMWindow::open):
4068         (WebCore::JSDOMWindow::showModalDialog):
4069         * bindings/v8/custom/V8DOMWindowCustom.cpp:
4070         (WebCore::CALLBACK_FUNC_DECL):
4071         (WebCore::createWindow):
4072
4073 2009-05-27  Alexey Proskuryakov  <ap@webkit.org>
4074
4075         Reviewed by Oliver Hunt.
4076
4077         https://bugs.webkit.org/show_bug.cgi?id=26056
4078         XPath string() function can be very slow
4079
4080         * xml/XPathUtil.cpp: (WebCore::XPath::stringValue): Use an intermediate Vector when appending.
4081
4082 2009-05-27  Dan Bernstein  <mitz@apple.com>
4083
4084         Reviewed by Sam Weinig.
4085
4086         - fix <rdar://problem/6927761> <isindex> placeholder text is unstylable
4087           and initially not visible
4088
4089         Test: fast/forms/isindex-placeholder.html
4090
4091         * css/html4.css: Added a default style for <isindex> placeholder text.
4092         * html/HTMLInputElement.cpp:
4093         (WebCore::HTMLInputElement::parseMappedAttribute): Changed to call
4094         the new protected function updatePlaceholderVisibility().
4095         * html/HTMLInputElement.h:
4096         (WebCore::HTMLInputElement::updatePlaceholderVisibility): Added this
4097         protected function to allow HTMLIsIndexElement::parseMappedAttribute()
4098         to invoke InputElement::updatePlaceholderVisibility().
4099         * html/HTMLIsIndexElement.cpp:
4100         (WebCore::HTMLIsIndexElement::parseMappedAttribute): Call
4101         updatePlaceholderVisibility() when parsing the placeholder attribute.
4102         * rendering/RenderTextControlSingleLine.cpp:
4103         (WebCore::RenderTextControlSingleLine::createInnerTextStyle): If there
4104         is no placeholder pseudo-element style, use the normal style.
4105
4106 2009-05-27  Sam Weinig  <sam@webkit.org>
4107
4108         Reviewed by Maciej Stachowiak.
4109
4110         More cleanup of DOMWindow related functions.
4111
4112         * bindings/js/JSDOMWindowBase.cpp:
4113         (WebCore::JSDOMWindowBase::willRemoveFromWindowShell): Renamed from JSDOMWindowBase::clear()
4114         * bindings/js/JSDOMWindowBase.h:
4115
4116         * bindings/js/JSDOMWindowCustom.cpp:
4117         (WebCore::JSDOMWindow::showModalDialog): Update Comment.
4118
4119         * bindings/js/JSDOMWindowShell.cpp:
4120         * bindings/js/JSDOMWindowShell.h:
4121         Remove JSDOMWindowShell::clear().  It was unused.
4122
4123         * bindings/js/ScriptController.cpp:
4124         (WebCore::ScriptController::clearWindowShell):
4125
4126 2009-05-27  Sam Weinig  <sam@webkit.org>
4127
4128         Reviewed by David Hyatt.
4129
4130         Miscellaneous cleanup of DOMWindow related functions.
4131
4132         * bindings/js/JSDOMGlobalObject.cpp:
4133         (WebCore::JSDOMGlobalObject::~JSDOMGlobalObject): Fix poorly named variables.
4134         * bindings/js/JSDOMWindowBase.cpp:
4135         (WebCore::JSDOMWindowBase::supportsProfiling): Don't jump through hoops
4136         checking for null frames if the build does not support profiling.
4137         (WebCore::JSDOMWindowBase::clear): Use setCurrentEvent(0) instead of calling
4138         clearHelperObjectProperties().  It is clearer.
4139         * bindings/js/JSDOMWindowBase.h:
4140         Removed now unused clearHelperObjectProperties() function, empty disconnectFrame()
4141         function, and the empty destructor.
4142         * bindings/js/JSDOMWindowShell.cpp:
4143         * bindings/js/JSDOMWindowShell.h:
4144         Remove disconnectFrame() which only called JSDOMWindowBase::disconnectFrame(), which
4145         is a no-op.
4146         * page/Frame.cpp:
4147         (WebCore::Frame::~Frame):
4148         (WebCore::Frame::pageDestroyed):
4149         Remove calls to JSDOMWindowShell::disconnectFrame() which only called
4150         JSDOMWindowBase::disconnectFrame(), which is a no-op.
4151
4152 2009-05-27  Dimitri Glazkov  <dglazkov@chromium.org>
4153
4154         Unreviewed, build fix.
4155
4156         https://bugs.webkit.org/show_bug.cgi?id=25974
4157         Remove extra qualifiers from the ScheduledAction decl.
4158
4159         * bindings/v8/ScheduledAction.h: Removed extraneous class qualifiers.
4160
4161 2009-05-27  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
4162
4163         Unreviewed make distcheck fix. One more missing file.
4164
4165         * GNUmakefile.am:
4166
4167 2009-05-27  Antonio Gomes   <antonio.gomes@openbossa.org>
4168
<