e3abc491ef90f130a77b478fb42eb8cf284eb1a2
[WebKit-https.git] / WebCore / ChangeLog
1 2009-06-22  David Hyatt  <hyatt@apple.com>
2
3         Reviewed by Sam Weinig.
4
5         Add RenderDataGrid to the build.  Give it some basic default styling (that more or less matches a listbox).  It has a default size
6         of 300x150.
7
8         * GNUmakefile.am:
9         * WebCore.pro:
10         * WebCore.vcproj/WebCore.vcproj:
11         * WebCore.xcodeproj/project.pbxproj:
12         * WebCoreSources.bkl:
13         * css/html4.css:
14         * html/HTMLDataGridElement.cpp:
15         (WebCore::HTMLDataGridElement::createRenderer):
16         * html/HTMLDataGridElement.h:
17         * html/HTMLDataGridElement.idl:
18         * rendering/RenderDataGrid.cpp: Added.
19         (WebCore::RenderDataGrid::RenderDataGrid):
20         (WebCore::RenderDataGrid::~RenderDataGrid):
21         (WebCore::RenderDataGrid::calcPrefWidths):
22         (WebCore::RenderDataGrid::paintObject):
23         (WebCore::RenderDataGrid::valueChanged):
24         (WebCore::RenderDataGrid::invalidateScrollbarRect):
25         (WebCore::RenderDataGrid::isActive):
26         * rendering/RenderDataGrid.h: Added.
27         (WebCore::RenderDataGrid::renderName):
28         (WebCore::RenderDataGrid::canHaveChildren):
29         (WebCore::RenderDataGrid::scrollbarCornerPresent):
30
31 2009-06-22  Simon Fraser  <simon.fraser@apple.com>
32
33         Reviewed by Dave Hyatt.
34
35         https://bugs.webkit.org/show_bug.cgi?id=26430
36         <rdar://problem/6944442> Elements jump around when they become composited (WWDC checkers demo)
37         <rdar://problem/6989006> Lots of time spent in RenderLayerCompositor::calculateCompositedBounds()
38             during window resize when using hardware layers
39         
40         Fix an ordering dependency which caused the compositing position of a layer
41         to be affected by some later sibling, which affected the compositing ancestor's
42         composited bounds.
43         
44         The fix is to only update the compositing positions of layers in some subtree
45         when updateAfterLayout() has been called on all the layers in that subtree,
46         from the ancestor down.
47         
48         Also cache the composited bounds of a RenderLayerBacking, now that we can
49         guarantee that those bounds are accurate.
50         
51         Test: compositing/sibling-positioning.html
52
53         * rendering/RenderLayer.cpp:
54         (WebCore::RenderLayer::updateLayerPositions):
55         (WebCore::RenderLayer::hitTestLayer):
56         * rendering/RenderLayerBacking.cpp:
57         (WebCore::RenderLayerBacking::RenderLayerBacking):
58         (WebCore::RenderLayerBacking::updateAfterLayout):
59         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
60         (WebCore::RenderLayerBacking::contentOffsetInCompostingLayer):
61         (WebCore::RenderLayerBacking::paintContents):
62         (WebCore::RenderLayerBacking::compositedBounds):
63         (WebCore::RenderLayerBacking::setCompositedBounds):
64         * rendering/RenderLayerBacking.h:
65         * rendering/RenderLayerCompositor.cpp:
66         (WebCore::RenderLayerCompositor::updateBacking):
67         (WebCore::RenderLayerCompositor::updateLayerCompositingState):
68         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
69         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
70         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
71         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
72         (WebCore::RenderLayerCompositor::updateCompositingChildrenGeometry):
73         * rendering/RenderLayerCompositor.h:
74
75 2009-06-22  Jeremy Orlow  <jorlow@chromium.org>
76
77         Reviewed by Darin Fisher.
78
79         First step in https://bugs.webkit.org/show_bug.cgi?id=25376
80
81         Add StorageSyncManager.cpp/h
82
83         * GNUmakefile.am:
84         * WebCore.pro:
85         * WebCore.vcproj/WebCore.vcproj:
86         * WebCore.xcodeproj/project.pbxproj:
87         * WebCoreSources.bkl:
88
89         In preparation for combining SessionStorage and LocalStorage into a
90         single StorageManager, move the syncing bits out of LocalStorage and
91         into its own class.
92
93         The next step is to combine LocalStorageArea and SessionStorageArea
94         into one.  Then SessionStorage and LocalStorage can be combined.
95
96         Note that combining them will cut down on code paths that must be
97         proxied, eliminate virtual dispatch, and allow Chromium to (eventually)
98         write historical sessionStorage to disk when memory is getting tight.
99
100         Also remove a couple bits of cruft including code for quotas which is
101         unnecessary (since a meta-data db is unnecessary since you can just
102         count bytes as you read the local storage databases into memory).
103
104         * storage/LocalStorage.cpp:
105         (WebCore::LocalStorage::LocalStorage):
106         (WebCore::LocalStorage::storageArea):
107         (WebCore::LocalStorage::close):
108         * storage/LocalStorage.h:
109         * storage/LocalStorageArea.cpp:
110         (WebCore::LocalStorageArea::LocalStorageArea):
111         (WebCore::LocalStorageArea::scheduleFinalSync):
112         (WebCore::LocalStorageArea::syncTimerFired):
113         (WebCore::LocalStorageArea::performImport):
114         * storage/LocalStorageArea.h:
115         (WebCore::LocalStorageArea::create):
116         * storage/LocalStorageTask.cpp:
117         (WebCore::LocalStorageTask::performTask):
118         * storage/LocalStorageTask.h:
119         (WebCore::LocalStorageTask::):
120         (WebCore::LocalStorageTask::createImport):
121         * storage/LocalStorageThread.cpp:
122         * storage/LocalStorageThread.h:
123         * storage/SessionStorage.h:
124         * storage/StorageSyncManager.cpp: Copied from WebCore/storage/LocalStorage.cpp.
125         (WebCore::StorageSyncManager::create):
126         (WebCore::StorageSyncManager::StorageSyncManager):
127         (WebCore::StorageSyncManager::fullDatabaseFilename):
128         (WebCore::StorageSyncManager::close):
129         (WebCore::StorageSyncManager::scheduleImport):
130         (WebCore::StorageSyncManager::scheduleSync):
131         * storage/StorageSyncManager.h: Copied from WebCore/storage/LocalStorage.h.
132         (WebCore::):
133
134 2009-06-22  Darin Fisher  <darin@chromium.org>
135
136         Reviewed by Dimitri Glazkov.
137
138         https://bugs.webkit.org/show_bug.cgi?id=26622
139         Add ChromiumDataObject::copy()
140
141         * platform/chromium/ChromiumDataObject.cpp:
142         * platform/chromium/ChromiumDataObject.h:
143
144 2009-06-22  Timothy Hatcher  <timothy@apple.com>
145
146         Add a silhouette image for the enable view of the Resource panel.
147
148         Reviewed by Kevin McCullough.
149
150         * inspector/front-end/Images/resourcesSilhouette.png: Added.
151         * inspector/front-end/inspector.css:
152
153 2009-06-22  Kyle Prete  <kylep@chromium.org>
154
155         Reviewed by Dimitri Glazkov.
156
157         https://bugs.webkit.org/show_bug.cgi?id=26552
158         Add V8 JS bindings for Audio Constructor.
159
160         * bindings/v8/custom/V8CustomBinding.h:
161         Added a callback declaration for audio ctor to macro.
162         * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
163         Added the whole file.
164
165 2009-06-22  Alexey Proskuryakov  <ap@webkit.org>
166
167         Reviewed by David Levin.
168
169         https://bugs.webkit.org/show_bug.cgi?id=26600
170         StringImpl::copy() no longer copies empty string correctly
171
172         * platform/text/StringImpl.cpp:
173         (WebCore::StringImpl::ustring): Changed method calling syntax to look less like calling a
174         static method.
175         (WebCore::StringImpl::copy): Reverted part of r41917 that caused the problem.
176
177 2009-06-22  Xiaomei Ji  <xji@chromium.org>
178
179         Reviewed by Eric Seidel
180
181         Not auto-testable since it involves sending a keyboard event to
182         the popup, which is not possible (eventSender sends the key
183         events through webview, we want to go through the webwidget).
184
185         This patch is one part of the fix for issue "keyboard selection in
186         Hebrew select element does not work in Windows". The other part of the
187         fix is in chromium's webkit/glue layer.
188         https://bugs.webkit.org/show_bug.cgi?id=25899
189
190         * manual-tests/keyboard_select_non_english.html: Added.
191         * platform/chromium/PopupMenuChromium.cpp:
192         (WebCore::isCharacterTypeEvent): Added. Check whether the event is a 
193         character type event. "Char" in Windows or "KeyDown" in Mac is character
194         type event.
195         (WebCore::PopupListBox::typeAheadFind): Since m_lastCharTime is used to
196         indicate whether user types multiple characters continuely as a search
197         prefix or not, it should be only assigned when the event is character 
198         type event. 
199
200 2009-06-22  Kevin McCullough  <kmccullough@apple.com>
201
202         Reviewed by Darin Adler.
203
204         <rdar://problem/6115819> Notify of profile start in console
205
206         Put a message in the console that announces that a profile has started,
207         similar to how a console message announces that a profile has finished.
208
209         * inspector/InspectorController.cpp:
210         (WebCore::InspectorController::addProfile): Use renamed function.
211         (WebCore::InspectorController::addProfileFinishedMessageToConsole):
212         Renamed.
213         (WebCore::InspectorController::addStartProfilingMessageToConsole):
214         New function that logs the message about the profile starting.
215         (WebCore::InspectorController::startUserInitiatedProfiling): Ditto
216         * inspector/InspectorController.h:
217         * inspector/front-end/ProfilesPanel.js: Print the "run" of the profile's
218         title if there are multiple profiles, and take into account the fact
219         that titles are displayed twice as much now.
220         (WebInspector.ProfilesPanel.prototype.displayTitleForProfileLink):
221         * page/Console.cpp:
222         (WebCore::Console::profile): Call new function.
223
224 2009-06-22  David Hyatt  <hyatt@apple.com>
225
226         Reviewed by Sam Weinig.
227
228         https://bugs.webkit.org/show_bug.cgi?id=26615
229
230         Add IDL interface for datagrid cell elements.  Add a few more properties to the datagrid itself that
231         correspond to ones you find on <select> elements.
232
233         Add an expanded property to row elements.
234
235         * DerivedSources.cpp:
236         * DerivedSources.make:
237         * GNUmakefile.am:
238         * WebCore.pro:
239         * WebCore.vcproj/WebCore.vcproj:
240         * WebCore.xcodeproj/project.pbxproj:
241         * WebCoreSources.bkl:
242         * html/HTMLAttributeNames.in:
243         * html/HTMLDataGridCellElement.cpp: Added.
244         (WebCore::HTMLDataGridCellElement::HTMLDataGridCellElement):
245         (WebCore::HTMLDataGridCellElement::label):
246         (WebCore::HTMLDataGridCellElement::setLabel):
247         (WebCore::HTMLDataGridCellElement::focused):
248         (WebCore::HTMLDataGridCellElement::setFocused):
249         (WebCore::HTMLDataGridCellElement::checked):
250         (WebCore::HTMLDataGridCellElement::setChecked):
251         (WebCore::HTMLDataGridCellElement::indeterminate):
252         (WebCore::HTMLDataGridCellElement::setIndeterminate):
253         (WebCore::HTMLDataGridCellElement::progress):
254         (WebCore::HTMLDataGridCellElement::setProgress):
255         * html/HTMLDataGridCellElement.h: Added.
256         (WebCore::HTMLDataGridCellElement::endTagRequirement):
257         (WebCore::HTMLDataGridCellElement::tagPriority):
258         * html/HTMLDataGridCellElement.idl: Added.
259         * html/HTMLDataGridElement.cpp:
260         (WebCore::HTMLDataGridElement::autofocus):
261         (WebCore::HTMLDataGridElement::setAutofocus):
262         (WebCore::HTMLDataGridElement::disabled):
263         (WebCore::HTMLDataGridElement::setDisabled):
264         (WebCore::HTMLDataGridElement::size):
265         (WebCore::HTMLDataGridElement::setSize):
266         * html/HTMLDataGridElement.h:
267         * html/HTMLDataGridElement.idl:
268         * html/HTMLDataGridRowElement.cpp:
269         (WebCore::HTMLDataGridRowElement::checkDTD):
270         (WebCore::HTMLDataGridRowElement::expanded):
271         (WebCore::HTMLDataGridRowElement::setExpanded):
272         * html/HTMLDataGridRowElement.h:
273         * html/HTMLDataGridRowElement.idl:
274         * html/HTMLElementsAllInOne.cpp:
275         * html/HTMLTagNames.in:
276
277 2009-06-22  Sam Weinig  <sam@webkit.org>
278
279         Reviewed by Mark Rowe.
280
281         Add event handler attribute getter/setters to HTMLBodyElement
282         as specified in HTML 5.
283
284         - Removes erroneous inclusion of the onresize and onunload event
285         handler attributes in Element and Document.
286
287         * dom/Document.cpp:
288         (WebCore::Document::getWindowAttributeEventListener):
289         * dom/Document.h:
290         * dom/Document.idl:
291         * dom/Element.idl:
292         * dom/Node.cpp:
293         * dom/Node.h: onblur, onerror, onfocus, and onload all need to be declared
294         virtual, since their behavior for HTMLBodyElement differs from the base
295         implementation.
296         * html/HTMLBodyElement.cpp:
297         (WebCore::HTMLBodyElement::onblur):
298         (WebCore::HTMLBodyElement::setOnblur):
299         (WebCore::HTMLBodyElement::onerror):
300         (WebCore::HTMLBodyElement::setOnerror):
301         (WebCore::HTMLBodyElement::onfocus):
302         (WebCore::HTMLBodyElement::setOnfocus):
303         (WebCore::HTMLBodyElement::onload):
304         (WebCore::HTMLBodyElement::setOnload):
305         (WebCore::HTMLBodyElement::onbeforeunload):
306         (WebCore::HTMLBodyElement::setOnbeforeunload):
307         (WebCore::HTMLBodyElement::onmessage):
308         (WebCore::HTMLBodyElement::setOnmessage):
309         (WebCore::HTMLBodyElement::onoffline):
310         (WebCore::HTMLBodyElement::setOnoffline):
311         (WebCore::HTMLBodyElement::ononline):
312         (WebCore::HTMLBodyElement::setOnonline):
313         (WebCore::HTMLBodyElement::onresize):
314         (WebCore::HTMLBodyElement::setOnresize):
315         (WebCore::HTMLBodyElement::onstorage):
316         (WebCore::HTMLBodyElement::setOnstorage):
317         (WebCore::HTMLBodyElement::onunload):
318         (WebCore::HTMLBodyElement::setOnunload):
319         * html/HTMLBodyElement.h:
320         * html/HTMLBodyElement.idl:
321
322 2009-06-22  Alexey Proskuryakov  <ap@webkit.org>
323
324         Reviewed by Darin Adler.
325
326         https://bugs.webkit.org/show_bug.cgi?id=26601
327         Remove disabled code for appcache dynamic entries
328
329         This also removes code for DOM 3 Core DOMStringList, which we don't use for anything else yet.
330
331         * DerivedSources.cpp:
332         * DerivedSources.make:
333         * GNUmakefile.am:
334         * WebCore.pro:
335         * WebCore.vcproj/WebCore.vcproj:
336         * WebCore.xcodeproj/project.pbxproj:
337         * WebCoreSources.bkl:
338         * bindings/js/JSDOMStringListCustom.cpp: Removed.
339         * bindings/v8/custom/V8CustomBinding.h:
340         * bindings/v8/custom/V8DOMStringListCustom.cpp: Removed.
341         * dom/DOMStringList.cpp: Removed.
342         * dom/DOMStringList.h: Removed.
343         * dom/DOMStringList.idl: Removed.
344         * dom/StaticStringList.cpp: Removed.
345         * dom/StaticStringList.h: Removed.
346         * loader/DocumentLoader.cpp:
347         (WebCore::DocumentLoader::shouldLoadResourceFromApplicationCache):
348         * loader/appcache/ApplicationCache.cpp:
349         (WebCore::ApplicationCache::addResource):
350         * loader/appcache/ApplicationCache.h:
351         * loader/appcache/ApplicationCacheGroup.cpp:
352         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
353         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
354         * loader/appcache/ApplicationCacheResource.cpp:
355         (WebCore::ApplicationCacheResource::dumpType):
356         * loader/appcache/ApplicationCacheResource.h:
357         (WebCore::ApplicationCacheResource::):
358         * loader/appcache/ApplicationCacheStorage.cpp:
359         (WebCore::ApplicationCacheStorage::storeUpdatedType):
360         * loader/appcache/DOMApplicationCache.cpp:
361         * loader/appcache/DOMApplicationCache.h:
362         * loader/appcache/DOMApplicationCache.idl:
363         * page/DOMWindow.idl:
364
365 2009-06-22  Steve Falkenburg  <sfalken@apple.com>
366
367         Windows build fix.
368
369         * DerivedSources.cpp:
370         * html/HTMLElementsAllInOne.cpp:
371
372 2009-06-22  Alexey Proskuryakov  <ap@webkit.org>
373
374         Reviewed by John Sullivan.
375
376         <rdar://problem/6956606> REGRESSION (S4Beta -> Final): After the password is input,
377         Japanese can't be input.
378
379         WebKit uses a per-frame input context for most editable fields, and application's global
380         context for password fields, manually controlling secure input state and the list of available
381         input sources.
382
383         We were setting TSMDocument property to disable non-Roman input methods after focus changed
384         to a password field, but before selection was updated. This resulted in the property being
385         applied to a wrong TSMDocument in some cases, because TSMGetActiveDocument() uses input
386         context cached by +[NSApplication updateWindows], we change context based on selection,
387         not on focus.
388
389         * page/mac/FrameMac.mm: (WebCore::Frame::setUseSecureKeyboardEntry): Since there is only one
390         context that we use for password fields - the global one - there is no need to get the active
391         one.
392
393 2009-06-22  David Levin  <levin@chromium.org>
394
395         Reviewed by David Hyatt and Eric Seidel.
396
397         REGRESSION: When the main page (ScrollView) has a custom scrollbar, it crashes on destruction.
398         https://bugs.webkit.org/show_bug.cgi?id=26326
399
400         Test: scrollbars/scrollbar-crash-on-refresh.html
401
402         * dom/Document.cpp:
403         (WebCore::Document::detach):
404         Gives the FrameView a change to do any necessary cleanup on
405         Document::detach() which is where the renderArena gets detroyed.
406         * page/FrameView.cpp:
407         (WebCore::FrameView::detachCustomScrollbars):
408         Gets rid of any custom scrollbars (if the docment supplied them).
409         * page/FrameView.h:
410         * platform/Scrollbar.h:
411         (WebCore::Scrollbar::isCustomScrollbar):
412         * rendering/RenderObject.cpp:
413         (WebCore::RenderObject::destroy):
414         Removed the check for document()->frame().  If frame() is 0 in this code,
415         then the call to animation() is also incorrect (since it does document()->frame()->animation()).
416         * rendering/RenderScrollbar.h:
417         (WebCore::RenderScrollbar::isCustomScrollbar):
418
419 2009-06-22  Dan Bernstein  <mitz@apple.com>
420
421         Reviewed by Simon Fraser.
422
423         - fix https://bugs.webkit.org/show_bug.cgi?id=23606
424           <rdar://problem/6537777> CSS gradient not repainted when image load
425           completes
426
427         Test: fast/repaint/background-generated.html
428
429         * rendering/RenderObject.cpp:
430         (WebCore::mustRepaintFillLayers): Return true if the layer does not
431         specify a size and the image uses the container size.
432
433 2009-06-22  David Hyatt  <hyatt@apple.com>
434
435         Reviewed by Sam Weinig.
436
437         https://bugs.webkit.org/show_bug.cgi?id=26607
438
439         Add IDL for HTMLDataGridRowElement.
440
441         * DerivedSources.make:
442         * GNUmakefile.am:
443         * WebCore.pro:
444         * WebCore.vcproj/WebCore.vcproj:
445         * WebCore.xcodeproj/project.pbxproj:
446         * WebCoreSources.bkl:
447         * html/HTMLAttributeNames.in:
448         * html/HTMLDataGridColElement.cpp:
449         (WebCore::HTMLDataGridColElement::primary):
450         (WebCore::HTMLDataGridColElement::setPrimary):
451         * html/HTMLDataGridColElement.h:
452         * html/HTMLDataGridColElement.idl:
453         * html/HTMLDataGridElement.cpp:
454         (WebCore::HTMLDataGridElement::checkDTD):
455         (WebCore::HTMLDataGridElement::multiple):
456         (WebCore::HTMLDataGridElement::setMultiple):
457         * html/HTMLDataGridElement.h:
458         * html/HTMLDataGridElement.idl:
459         * html/HTMLDataGridRowElement.cpp: Added.
460         (WebCore::HTMLDataGridRowElement::HTMLDataGridRowElement):
461         (WebCore::HTMLDataGridRowElement::selected):
462         (WebCore::HTMLDataGridRowElement::setSelected):
463         (WebCore::HTMLDataGridRowElement::focused):
464         (WebCore::HTMLDataGridRowElement::setFocused):
465         * html/HTMLDataGridRowElement.h: Added.
466         (WebCore::HTMLDataGridRowElement::tagPriority):
467         * html/HTMLDataGridRowElement.idl: Added.
468         * html/HTMLTagNames.in:
469
470 2009-06-19  Yael Aharon <yael.aharon@nokia.com>
471
472         Reviewed by Holger Freyther.
473
474         https://bugs.webkit.org/show_bug.cgi?id=26556
475
476         Fix a crash in case that the QNetworkReply::readReady signal is
477         "stuck" in deferred mode due to JavaScript alert, and in the meantime,
478         QNetworkreply::finished signal is received and processed before
479         QNetworkReply::readReady is processed.
480
481         * manual-tests/qt/unload-alert.html: Added.
482         * platform/network/qt/QNetworkReplyHandler.cpp:
483         (WebCore::QNetworkReplyHandler::setLoadMode):
484         (WebCore::QNetworkReplyHandler::finish):
485         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
486         (WebCore::QNetworkReplyHandler::forwardData):
487         (WebCore::QNetworkReplyHandler::start):
488         (WebCore::QNetworkReplyHandler::sendQueuedItems):
489         * platform/network/qt/QNetworkReplyHandler.h:
490         (WebCore::QNetworkReplyHandler::):
491
492 2009-06-22  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
493
494         Fix the Qt build.
495
496         * WebCore.pro:
497
498 2009-06-21  Darin Adler  <darin@apple.com>
499
500         Reviewed by Sam Weinig.
501
502         Bug 25425: DOM attribute getter/setter functions should use const AtomicString& type
503         https://bugs.webkit.org/show_bug.cgi?id=25425
504
505         * bindings/scripts/CodeGeneratorJS.pm: Tweaked mechanism for includes to be a bit
506         more consistent and to make SVGElement.h be included in the header rather than in
507         every implementation file that includes the header. Added code to use getAttribute
508         and setAttribute directly when the [Reflect] extended attribute is used.
509
510         * bindings/scripts/CodeGeneratorObjC.pm: Ditto.
511
512         * html/HTMLElement.idl: Used [Reflect] for all the attributes in this class that
513         reflect content attributes. Restricting this to one class for now to keep the
514         patch small and start out slowly.
515
516 2009-06-21  Sam Weinig  <sam@webkit.org>
517
518         Reviewed by Oliver Hunt.
519
520         Fix for https://bugs.webkit.org/show_bug.cgi?id=26596
521         Only expose event handler attributes to elements and documents.
522
523         Test: fast/dom/event-attribute-availability.html
524
525         * dom/Document.idl:
526         * dom/Element.idl:
527         * dom/Node.cpp:
528         * dom/Node.h:
529         * dom/Node.idl:
530
531 2009-06-21  Daniel Bates  <dbates@intudata.com>
532
533         Reviewed by Adam Barth.
534
535         https://bugs.webkit.org/show_bug.cgi?id=26580
536         
537         Fix to enable XSSAuditor on child windows.
538         
539         Test: http/tests/security/xssAuditor/link-opens-new-window.html
540         
541         * page/XSSAuditor.cpp:
542         (WebCore::XSSAuditor::XSSAuditor):
543         (WebCore::XSSAuditor::isEnabled):
544         (WebCore::XSSAuditor::canEvaluate):
545         (WebCore::XSSAuditor::canCreateInlineEventListener):
546         (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
547         (WebCore::XSSAuditor::canLoadObject):
548         * page/XSSAuditor.h: Removed method setXSSAuditorEnabled, and field m_isEnabled.
549         Moved implementation of isEnabled to XSSAuditor.cpp and changed implementation
550         to query Settings.
551
552 2009-06-21  David Levin  <levin@chromium.org>
553
554         Reviewed by NOBODY.
555
556         Speculative windows build fix (idea by Mark Rowe).
557
558         * WebCore.vcproj/WebCore.vcproj:
559
560 2009-06-21  David Levin  <levin@chromium.org>
561
562         Reviewed by NOBODY (Speculative gtk build fix).
563
564         * GNUmakefile.am:
565
566 2009-06-21  David Levin  <levin@chromium.org>
567
568         Reviewed by NOBODY.
569
570         Speculative tiger build fix and a windows build fix.
571         More fixes may still be in order.
572
573         * WebCore.vcproj/WebCoreCommon.vsprops:
574         * dom/default/PlatformMessagePortChannel.h:
575         (WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
576
577 2009-06-21  David Levin  <levin@chromium.org>
578
579         Reviewed by NOBODY (Speculative tiger build fix).
580
581         * dom/default/PlatformMessagePortChannel.h:
582         (WebCore::PlatformMessagePortChannel::MessagePortQueue::~MessagePortQueue):
583
584 2009-06-21  Drew Wilson  <atwilson@google.com>
585
586         Reviewed by David Levin.
587
588         <https://bugs.webkit.org/show_bug.cgi?id=26448>
589         
590         Added optimized GC for MessagePorts when the entangled port is run by the same thread.
591         Fixed bug in isProxyFor() that was not properly throwing an exception when trying to clone the entangled port.
592
593         * bindings/js/JSDOMBinding.cpp:
594         (WebCore::markActiveObjectsForContext):
595         Now marks remotely entangled ports as in-use, in addition to those with pending activity.
596         * bindings/js/JSMessagePortCustom.cpp:
597         (WebCore::JSMessagePort::mark):
598         Now checks if the entangled port is local (run by same thread) and if so mark()s it.
599         * dom/MessagePort.cpp:
600         (WebCore::MessagePort::postMessage):
601         (WebCore::MessagePort::disentangle):
602         Removes cloned ports from the ScriptExecutionContext - this allows cloned ports to be GC'd as otherwise they look like remotely entangled ports.
603         (WebCore::MessagePort::start):
604         (WebCore::MessagePort::locallyEntangledPort):
605         Added API for fetching the entangled port if it is run by the same thread
606         * dom/MessagePort.h:
607         * dom/MessagePortProxyWrapper.h:
608         * dom/default/MessagePortProxy.cpp:
609         (WebCore::MessagePortProxyWrapper::locallyEntangledPort):
610         Added API for fetching the entangled port if it is run by the same thread        
611         (WebCore::MessagePortProxy::hasPendingActivity):
612         Changed definition of hasPendingActivity() to be stricter - only returns true if there are pending messages.
613         (WebCore::MessagePortProxy::locallyEntangledPort):
614         * dom/default/MessagePortProxy.h:
615
616 2009-06-21  Drew Wilson  <atwilson@google.com>
617
618         Reviewed by David Levin.
619
620         <https://bugs.webkit.org/show_bug.cgi?id=25043>
621         Removed obsolete MessagePort.startConversation(), active and onclose APIs.
622
623         Refactored MessagePortProxy into MessagePortChannel and a platform-dependent PlatformMessagePortChannel
624         implementation. Modified APIs to simplify cross-process implementations by moving the messaging code
625         entirely into the platform-dependent proxy.
626
627         Created a thread-safe default PlatformMessagePortChannel implementation.
628
629         Changed DOMWindow messaging to create the MessageEvent in the target ScriptExecutionContext to match how
630         cross-thread MessagePorts work.
631         
632         * GNUMakefile.am:
633         * WebCore.vcproj/WebCore.vcproj:
634         * WebCore.xcodeproj/project.pbxproj:
635             Added MessagePortChannel/PlatformMessagePortChannel files.
636         * bindings/js/JSMessagePortCustom.cpp:
637         (WebCore::JSMessagePort::mark):
638             Changed ports to not mark their entangled pair as reachable, per the spec.
639         * bindings/v8/custom/V8MessagePortCustom.cpp:
640         * dom/MessageChannel.cpp:
641         (WebCore::MessageChannel::MessageChannel):
642             Updated to use PlatformMessagePortChannel::createChannel() to entangle the ports.
643         * dom/MessagePort.cpp:
644         (WebCore::MessagePort::MessagePort):
645         (WebCore::MessagePort::~MessagePort):
646         (WebCore::MessagePort::postMessage):
647         (WebCore::MessagePort::disentangle):
648         (WebCore::MessagePort::messageAvailable):
649         (WebCore::MessagePort::start):
650         (WebCore::MessagePort::close):
651         (WebCore::MessagePort::entangle):
652         (WebCore::MessagePort::contextDestroyed):
653         (WebCore::MessagePort::dispatchMessages):
654         (WebCore::MessagePort::setOnmessage):
655         (WebCore::MessagePort::hasPendingActivity):
656             Changed these APIs to delegate to new PlatformMessagePortChannel APIs.
657         * dom/MessagePort.h:
658             Renamed isQueueOpen() to started().
659         * dom/MessagePort.idl:
660             Removed startConversation and onclose.
661         * dom/MessagePortProxy.h: Removed.
662         * dom/MessagePortChannel.cpp: Added.
663         (WebCore::MessagePortChannel::EventData::create):
664         (WebCore::MessagePortChannel::EventData::EventData):
665         (WebCore::MessagePortChannel::~MessagePortChannel):
666         * dom/MessagePortChannel.h: Added.
667         (WebCore::MessagePortChannel::EventData::message):
668         (WebCore::MessagePortChannel::EventData::channel):
669             Changed EventData to hold a reference to a MessagePortChannel object instead of a MessagePort to enable cross-thread messaging.
670         (WebCore::MessagePortChannel::MessagePortChannel):
671         (WebCore::MessagePortChannel::create):        
672         * dom/ScriptExecutionContext.cpp:
673         (WebCore:ScriptExecutionContext::dispatchMessagePortEvents):
674             Renamed isQueueOpen() to started().
675         * dom/default/PlatformMessagePortChannel.cpp: Added.
676         (WebCore::MessagePortChannel::entangleIfOpen):
677         (WebCore::MessagePortChannel::disentangle):
678         (WebCore::MessagePortChannel::postMessageToRemote):
679         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
680         (WebCore::MessagePortChannel::close):
681         (WebCore::MessagePortChannel::isConnectedTo):
682         (WebCore::MessagePortChannel::hasPendingActivity):
683         (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
684         (WebCore::PlatformMessagePortChannel::~PlatformMessagePortChannel):
685         (WebCore::PlatformMessagePortChannel::createChannel):
686         (WebCore::PlatformMessagePortChannel::entangleIfOpen):
687         (WebCore::PlatformMessagePortChannel::disentangle):
688         (WebCore::PlatformMessagePortChannel::setRemotePort):
689         (WebCore::PlatformMessagePortChannel::remotePort):
690         (WebCore::PlatformMessagePortChannel::entangledChannel):
691         (WebCore::PlatformMessagePortChannel::setEntangledChannel):
692         (WebCore::PlatformMessagePortChannel::postMessageToRemote):
693         (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
694         (WebCore::PlatformMessagePortChannel::isConnectedTo):
695         (WebCore::PlatformMessagePortChannel::close):
696         (WebCore::PlatformMessagePortChannel::closeInternal):
697         (WebCore::PlatformMessagePortChannel::hasPendingActivity):
698         * dom/default/PlatformMessagePortChannel.h: Added.
699         (WebCore::PlatformMessagePortChannel::MessagePortQueue::create):
700         (WebCore::PlatformMessagePortChannel::MessagePortQueue::tryGetMessage):
701         (WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty):
702         (WebCore::PlatformMessagePortChannel::MessagePortQueue::isEmpty):
703         (WebCore::PlatformMessagePortChannel::MessagePortQueue::MessagePortQueue):
704         * page/DOMWindow.cpp:
705         (WebCore::PostMessageTimer::PostMessageTimer):
706             Changed DOMWindow messaging to create the MessageEvent in the target ScriptExecutionContext to match how cross-thread MessagePorts work.
707         (WebCore::PostMessageTimer::event):
708         (WebCore::DOMWindow::postMessage):
709         (WebCore::DOMWindow::postMessageTimerFired):
710
711 2009-06-21  Dan Bernstein  <mitz@apple.com>
712
713         Reviewed by Sam Weinig.
714
715         - fix https://bugs.webkit.org/show_bug.cgi?id=15383
716           <rdar://problem/5682745> resize: vertical does not restrict to vertical
717           resize
718
719         Test: fast/css/resize-single-axis.html
720
721         * rendering/RenderLayer.cpp:
722         (WebCore::RenderLayer::resize): Ignore movement along the non-resizing
723         axis.
724
725 2009-06-21  Sam Weinig  <sam@webkit.org>
726
727         Reviewed by Eric Seidel
728
729         Fix for https://bugs.webkit.org/show_bug.cgi?id=26578
730         event.currentTarget for listener registered on window should point to the window object like in Firefox
731
732         Test: fast/events/event-trace.html
733
734         * dom/Node.cpp:
735         (WebCore::Node::dispatchGenericEvent): Make the DOMWindow the currentTarget when events are dispatched
736         to it. We previously used the document because DOMWindow was not yet an EventTarget.
737
738 2009-06-21  Dan Bernstein  <mitz@apple.com>
739
740         Reviewed by Sam Weinig.
741
742         - fix https://bugs.webkit.org/show_bug.cgi?id=9694
743           resize value not compared
744
745         Test: fast/css/resize-value-compared.html
746
747         * rendering/style/StyleRareInheritedData.cpp:
748         (WebCore::StyleRareInheritedData::operator==): Compare the resize
749         member.
750
751 2009-06-19  Alice Liu  <alice.liu@apple.com>
752
753         Fix https://bugs.webkit.org/show_bug.cgi?id=26568 
754         Repro crash animating GIF if previously used in a closed window's back/forward list
755         Also filed as <rdar://problem/6978362>
756
757         Reviewed by Maciej Stachowiak.
758
759         Can't test this bug with an automated layout test since it requires b/f caching 
760         * manual-tests/animated-gif-bfcache-crash.html: Added.
761         * manual-tests/resources/containsAnimatedGif.html: Added.
762
763         Adding checks for hostWindow() since there is no guarantee that the Page is alive
764         * platform/ScrollView.cpp:
765         (WebCore::ScrollView::scrollRectIntoViewRecursively):
766         (WebCore::ScrollView::contentsToScreen):
767         (WebCore::ScrollView::screenToContents):
768         (WebCore::ScrollView::wheelEvent):
769
770 2009-06-20  Sam Weinig  <sam@webkit.org>
771
772         Reviewed by Adam Barth.
773
774         Fix for https://bugs.webkit.org/show_bug.cgi?id=26554
775         Shadowing of top and parent
776
777         * page/DOMWindow.idl:
778
779 2009-06-20  Mark Rowe  <mrowe@apple.com>
780
781         Reviewed by Dan Bernstein.
782
783         Fix <https://bugs.webkit.org/show_bug.cgi?id=15106>.
784         Bug 15106: REGRESSION: Can't drag text as element when user-select is set to none
785
786         We allow selections to begin within an element that has -webkit-user-select: none set,
787         unless the element is draggable as dragging should take priority over starting a selection.
788
789         Test: editing/selection/user-drag-element-and-user-select-none.html
790
791         * dom/Node.cpp:
792         (WebCore::Node::canStartSelection):
793
794 2009-06-20  Darin Adler  <darin@apple.com>
795
796         Reviewed by Dan Bernstein.
797
798         Bug 26528: REGRESSION (r44674): Assertion in TextIterator::pushFullyClippedState while counting matches for "a" on apple.com
799         https://bugs.webkit.org/show_bug.cgi?id=26528
800         rdar://problem/6985329
801
802         * editing/TextIterator.cpp:
803         (WebCore::TextIterator::handleReplacedElement): When entering a text control,
804         start at the top of the shadow tree (by calling shadowTreeRootNode). Also
805         remove assumption that innerTextElement will never be 0 since RenderTextControl
806         doesn't really guarantee this.
807
808 2009-06-20  Jan Michael Alonzo  <jmalonzo@webkit.org>
809
810         Reviewed by NOBODY.
811
812         Speculative Qt build fix - add HTMLDataGridColElement to the build script.
813
814         * WebCore.pro:
815
816 2009-06-19  Adam Barth  <abarth@webkit.org>
817
818         Reviewed by Darin Adler.
819
820         https://bugs.webkit.org/show_bug.cgi?id=26561
821
822         Remove a memcpy by retrieving the already existing copy of a string
823         instead of making a new one.
824
825         * bindings/js/ScriptSourceCode.h:
826         (WebCore::ScriptSourceCode::ScriptSourceCode):
827         (WebCore::ScriptSourceCode::source):
828         * bindings/js/StringSourceProvider.h:
829         (WebCore::StringSourceProvider::source):
830
831 2009-06-19  Brian Weinstein  <bweinstein@apple.com>
832
833         Reviewed by Steve Falkenburg.
834         
835         https://bugs.webkit.org/show_bug.cgi?id=26488
836         No Support for Single Finger or Two Finger Panning in Windows 7
837         
838         The code in WebCore allows us to interpret a Pan gesture as
839         a mousewheel event, and we are able to reuse the scrolling code.
840         Another constructor was created in WheelEventWin which takes data
841         better suited to the pan guesture than what was currently there. 
842         
843         Unable to add tests to simulate touch behavior/gestures.
844
845         * platform/PlatformWheelEvent.h:
846         * platform/win/WheelEventWin.cpp:
847
848 2009-06-19  Chris Marrin  <cmarrin@apple.com>
849
850         Fixed a build error, which only shows up in the i386 compile
851
852         * platform/graphics/mac/GraphicsLayerCA.mm:
853         (WebCore::GraphicsLayerCA::animateTransform):
854
855 2009-06-19  Simon Fraser  <simon.fraser@apple.com>
856
857         Reviewed by Oliver Hunt.
858
859         <rdar://problem/6988385> REGRESSION: In full page video player, movie's
860         video track becomes detached from its controller.
861         
862         When in the media document, the MediaPlayer should not report that it
863         is capable of hardware acceleration, because it renders via a QTMovieView
864         which is already accelerated.
865
866         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
867         (WebCore::MediaPlayerPrivate::supportsAcceleratedRendering):
868
869 2009-06-19  Kevin Ollivier  <kevino@theolliviers.com>
870
871         Adding XSSAuditor.cpp to the wx build.
872
873         * WebCoreSources.bkl:
874
875 2009-06-19  Chris Marrin  <cmarrin@apple.com>
876
877         Reviewed by Simon Fraser  <simon.fraser@apple.com>.
878
879         https://bugs.webkit.org/show_bug.cgi?id=26544
880
881         If I am doing a Matrix hardware animation and any matrix is singular, I revert to software.
882         This is not really testable, since we can't see what the hardware animation is doing.
883
884         * platform/graphics/mac/GraphicsLayerCA.mm:
885         (WebCore::GraphicsLayerCA::animateTransform):
886
887 2009-06-19  Geoffrey Garen  <ggaren@apple.com>
888
889         Reviewed by Maciej Stachowiak.
890         
891         An additional fix for Bug 26532: Native functions do not correctly unlink
892         from optimised callsites when they're collected
893         <https://bugs.webkit.org/show_bug.cgi?id=26532> | <rdar://problem/6625385>
894
895         Use "NativeFunctionWrapper" instead of "PrototypeFunction" in cross-frame
896         accessors, so the type of object you get to wrap a function is the same,
897         regardless of whether the access to the function is cross-frame.
898         
899         This is faster and more idiomatic than what we had before. It also would
900         have avoided Bug 26532 because it would have prevented a conflicting
901         PrototypeFunction from being allocated to wrap postMessage, where a
902         NativeFunctionWrapper had been allocated previously.
903         
904         * bindings/js/JSDOMBinding.cpp:
905         (WebCore::objectToStringFunctionGetter):
906         * bindings/js/JSDOMWindowCustom.cpp:
907         (WebCore::nonCachingStaticFunctionGetter):
908         * bindings/js/JSHistoryCustom.cpp:
909         (WebCore::nonCachingStaticBackFunctionGetter):
910         (WebCore::nonCachingStaticForwardFunctionGetter):
911         (WebCore::nonCachingStaticGoFunctionGetter):
912         * bindings/js/JSLocationCustom.cpp:
913         (WebCore::nonCachingStaticReplaceFunctionGetter):
914         (WebCore::nonCachingStaticReloadFunctionGetter):
915         (WebCore::nonCachingStaticAssignFunctionGetter):
916
917 2009-06-19  Simon Fraser  <simon.fraser@apple.com>
918
919         Reviewed by John Sullivan
920
921         <rdar://problem/6953673> Crash in RenderLayerCompositor::setCompositingParent
922         
923         Fix a crash that could occur in complex content due to timing issues
924         when doing a partial layer tree rebuild which is required when painting;
925         setCompositingParent() could be called with a parent which has not been made
926         compositing yet.
927
928 2009-06-19  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
929
930         Build fix. Adding missing HTMLDataGrid* files to the build.
931
932         * GNUmakefile.am:
933
934 2009-06-19  Peter Kasting  <pkasting@google.com>
935
936         Reviewed by Eric Seidel.
937
938         https://bugs.webkit.org/show_bug.cgi?id=26460 part three
939         Make BMPImageReader a standalone class that is used by ICOImageDecoder
940         and BMPImageDecoder to decode individual BMPs within a file.  These
941         decoders now inherit directly from ImageDecoder.
942         
943         This also makes these decoders decode on-demand in isSizeAvailable() and
944         frameBufferAtIndex(), like the other decoders, instead of when setData()
945         is called, like before.  This should provide a speedup on pages
946         containing BMPs that aren't immediately onscreen.
947
948         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
949         (WebCore::BMPImageDecoder::BMPImageDecoder):
950         (WebCore::BMPImageDecoder::setData):
951         (WebCore::BMPImageDecoder::isSizeAvailable):
952         (WebCore::BMPImageDecoder::frameBufferAtIndex):
953         (WebCore::BMPImageDecoder::decodeWithCheckForDataEnded):
954         (WebCore::BMPImageDecoder::decode):
955         (WebCore::BMPImageDecoder::processFileHeader):
956         * platform/image-decoders/bmp/BMPImageDecoder.h:
957         (WebCore::BMPImageDecoder::readUint32):
958         * platform/image-decoders/bmp/BMPImageReader.cpp:
959         (WebCore::BMPImageReader::BMPImageReader):
960         (WebCore::BMPImageReader::decodeBMP):
961         (WebCore::BMPImageReader::readInfoHeaderSize):
962         (WebCore::BMPImageReader::processInfoHeader):
963         (WebCore::BMPImageReader::readInfoHeader):
964         (WebCore::BMPImageReader::processBitmasks):
965         (WebCore::BMPImageReader::processColorTable):
966         (WebCore::BMPImageReader::processRLEData):
967         (WebCore::BMPImageReader::processNonRLEData):
968         (WebCore::BMPImageReader::setFailed):
969         * platform/image-decoders/bmp/BMPImageReader.h:
970         (WebCore::BMPImageReader::readUint16):
971         (WebCore::BMPImageReader::readUint32):
972         (WebCore::BMPImageReader::setBuffer):
973         (WebCore::BMPImageReader::setData):
974         (WebCore::BMPImageReader::):
975         (WebCore::BMPImageReader::pastEndOfImage):
976         (WebCore::BMPImageReader::readCurrentPixel):
977         (WebCore::BMPImageReader::setRGBA):
978         * platform/image-decoders/ico/ICOImageDecoder.cpp:
979         (WebCore::ICOImageDecoder::ICOImageDecoder):
980         (WebCore::ICOImageDecoder::setData):
981         (WebCore::ICOImageDecoder::isSizeAvailable):
982         (WebCore::ICOImageDecoder::size):
983         (WebCore::ICOImageDecoder::frameBufferAtIndex):
984         (WebCore::ICOImageDecoder::decodeWithCheckForDataEnded):
985         (WebCore::ICOImageDecoder::decode):
986         (WebCore::ICOImageDecoder::processDirectory):
987         (WebCore::ICOImageDecoder::processDirectoryEntries):
988         (WebCore::ICOImageDecoder::readDirectoryEntry):
989         (WebCore::ICOImageDecoder::processImageType):
990         * platform/image-decoders/ico/ICOImageDecoder.h:
991         (WebCore::ICOImageDecoder::readUint16):
992         (WebCore::ICOImageDecoder::readUint32):
993
994 2009-06-19  Adam Barth  <abarth@webkit.org>
995
996         Reviewed by Dimitri Glazkov.
997
998         https://bugs.webkit.org/show_bug.cgi?id=26555
999
1000         Fix the Chromium canary bot.  Turns out ScriptSourceCode doesn't have
1001         the same API in V8 and JSC.
1002
1003         * WebCore/bindings/js/ScriptController.cpp:
1004         * WebCore/bindings/js/ScriptSourceCode.h:
1005         * WebCore/bindings/v8/ScriptController.cpp:
1006         * WebCore/page/XSSAuditor.cpp:
1007         * WebCore/page/XSSAuditor.h:
1008
1009 2009-06-19  David Hyatt  <hyatt@apple.com>
1010
1011         Reviewed by Anders Carlsson.
1012
1013         https://bugs.webkit.org/show_bug.cgi?id=26547
1014         
1015         Implement the IDL interface for HTMLDataGridColElement.
1016
1017         * DerivedSources.cpp:
1018         * DerivedSources.make:
1019         * GNUmakefile.am:
1020         * WebCore.pro:
1021         * WebCore.vcproj/WebCore.vcproj:
1022         * WebCore.xcodeproj/project.pbxproj:
1023         * WebCoreSources.bkl:
1024         * html/HTMLAttributeNames.in:
1025         * html/HTMLDataGridColElement.cpp: Added.
1026         (WebCore::HTMLDataGridColElement::HTMLDataGridColElement):
1027         (WebCore::HTMLDataGridColElement::label):
1028         (WebCore::HTMLDataGridColElement::setLabel):
1029         (WebCore::HTMLDataGridColElement::type):
1030         (WebCore::HTMLDataGridColElement::setType):
1031         (WebCore::HTMLDataGridColElement::sortable):
1032         (WebCore::HTMLDataGridColElement::setSortable):
1033         (WebCore::HTMLDataGridColElement::sortDirection):
1034         (WebCore::HTMLDataGridColElement::setSortDirection):
1035         (WebCore::HTMLDataGridColElement::selected):
1036         (WebCore::HTMLDataGridColElement::setSelected):
1037         * html/HTMLDataGridColElement.h: Added.
1038         (WebCore::HTMLDataGridColElement::endTagRequirement):
1039         (WebCore::HTMLDataGridColElement::tagPriority):
1040         * html/HTMLDataGridColElement.idl: Added.
1041         * html/HTMLDataGridElement.h:
1042         * html/HTMLElementsAllInOne.cpp:
1043         * html/HTMLTagNames.in:
1044         * page/DOMWindow.idl:
1045
1046 2009-06-19  Chris Evans  <scarybeasts@gmail.com>
1047
1048         Reviewed by Eric Seidel.
1049
1050         There is no new test because this cannot be tested deterministically.
1051         I've not been able to cause a crash at all in the test framework, but
1052         I have verified that this is happening in the wild and that the patch
1053         fixes the likely cause in the debugger.
1054
1055         * loader/TextResourceDecoder.cpp: careful not to iterate off the end
1056           of our input buffer looking for the end of the comment.
1057
1058 2009-06-19  Adam Barth  <abarth@webkit.org>
1059
1060         Reviewed by Dimitri Glazkov.
1061
1062         https://bugs.webkit.org/show_bug.cgi?id=26536
1063
1064         Fix external-script-URL-location.html and
1065         write-external-script-open.html LayoutTests.
1066
1067         implicitOpen is called from several places.  We need to setXSSAuditor
1068         each time, so I moved the call inside implicitOpen.
1069
1070         * dom/Document.cpp:
1071         (WebCore::Document::open):
1072         (WebCore::Document::implicitOpen):
1073         * loader/FrameLoader.cpp:
1074         (WebCore::FrameLoader::begin):
1075
1076 2009-06-19  Kent Tamura  <tkent@chromium.org>
1077
1078         Reviewed by David Levin.
1079
1080         Use WebCore::multipleFileUploadText() in Chromium to fix a problem
1081         that Chromium shows only the first filename even if a user selects
1082         multiple files for <input type=file multiple>.
1083         <https://bugs.webkit.org/show_bug.cgi?id=26502>
1084
1085         * platform/chromium/FileChooserChromium.cpp:
1086         (WebCore::FileChooser::basenameForWidth):
1087
1088 2009-06-19  Dan Bernstein  <mitz@apple.com>
1089
1090         Reviewed by Dave Hyatt.
1091
1092         - fix <rdar://problem/6967596> Safari hung using 100% CPU when I tried
1093           to look up a word in Dictionary using command-control-d
1094
1095         Test: editing/selection/move-by-line-005.html
1096
1097         The root cause of this bug was searchAheadForBetterMatch() continuing
1098         past the first rendered text object after the given object. While we
1099         want to skip non-rendered text and empty containers, when we encounter
1100         rendered text object, we must return a text box for that object.
1101
1102         * dom/Position.cpp:
1103         (WebCore::searchAheadForBetterMatch):
1104
1105 2009-06-19  Jungshik Shin  <jshin@chromium.org>
1106
1107         Reviewed by David Levin
1108
1109         https://bugs.webkit.org/show_bug.cgi?id=25657
1110
1111         Chromium Linux port does not handle non-BMP characters properly.
1112         It's fixed with a 'UTF-16 iterator macro' to extract Unicode
1113         codepoints out of a UTF-16 input string.
1114
1115         A manual test is added for non-BMP character rendering,
1116         which we can use until a small freely-distributable font
1117         covering non-BMP is added to the Webkit source tree.
1118
1119
1120         * platform/graphics/chromium/FontCacheLinux.cpp:
1121         (WebCore::FontCache::getFontDataForCharacters):
1122         * manual-tests/non-bmp.html: Added.
1123
1124 2009-06-19  Pavel Feldman  <pfeldman@chromium.org>
1125
1126         Reviewed by Dimitri Glazkov.
1127
1128         V8 Bindings: return proper state from the script stack.
1129
1130         https://bugs.webkit.org/show_bug.cgi?id=26512
1131
1132         * bindings/v8/ScriptCallStack.cpp:
1133         (WebCore::ScriptCallStack::ScriptCallStack):
1134         * bindings/v8/ScriptCallStack.h:
1135         (WebCore::ScriptCallStack::state):
1136
1137 2009-06-19  Jessie Berlin  <jberlin@apple.com>
1138
1139         Reviewed by Simon Fraser.
1140
1141         Windows build fix.
1142         
1143         * platform/graphics/cg/PatternCG.cpp:
1144         (WebCore::Pattern::createPlatformPattern):
1145
1146 2009-06-19  Yael Aharon  <yael.aharon@nokia.com>
1147
1148         Reviewed by Simon Hausmann.
1149         Build fix after 44825.
1150
1151         * platform/graphics/qt/ImageDecoderQt.cpp:
1152         (WebCore::ImageDecoderQt::isSizeAvailable):
1153         * platform/graphics/qt/ImageDecoderQt.h:
1154
1155 2009-06-18  Shinichiro Hamaji  <hamaji@chromium.org>
1156
1157         Reviewed by Oliver Hunt.
1158
1159         Bug 26426: Canvas: rotation of 'no-repeat' pattern is weird
1160         <https://bugs.webkit.org/show_bug.cgi?id=26426>
1161
1162         Use 1<<23-1 as steps of no-repeat patterns instead of 100000000.0f.
1163         The original number cannot be represented by mantissa of float
1164         (23bit) so that it caused some error.
1165
1166         Test: fast/canvas/image-object-in-canvas.html:
1167
1168         * platform/graphics/cg/PatternCG.cpp:
1169         (WebCore::Pattern::createPlatformPattern):
1170
1171 2009-06-19  Adam Barth  <abarth@webkit.org>
1172
1173         Unreviewed attempt to fix the Chromium build.
1174
1175         * bindings/v8/ScriptController.cpp:
1176         (WebCore::ScriptController::ScriptController):
1177         (WebCore::ScriptController::evaluate):
1178         * bindings/v8/ScriptController.h:
1179         (WebCore::ScriptController::xssAuditor):
1180         * bindings/v8/ScriptEventListener.cpp:
1181         (WebCore::createAttributeEventListener):
1182
1183 2009-06-18  Adam Barth  <abarth@webkit.org>
1184
1185         Reviewed by Sam Weinig.
1186
1187         https://bugs.webkit.org/show_bug.cgi?id=26199
1188
1189         Added an experimental reflective XSS filter.  The filter is disabled by
1190         default.
1191
1192         Test: http/tests/security/xssAuditor/script-tag.html
1193
1194         * GNUmakefile.am:
1195         * WebCore.base.exp:
1196         * WebCore.pro:
1197         * WebCore.vcproj/WebCore.vcproj:
1198         * WebCore.xcodeproj/project.pbxproj:
1199         * bindings/js/ScriptController.cpp:
1200         (WebCore::ScriptController::ScriptController):
1201         (WebCore::ScriptController::evaluate):
1202         * bindings/js/ScriptController.h:
1203         (WebCore::ScriptController::xssAuditor):
1204         * bindings/js/ScriptEventListener.cpp:
1205         (WebCore::createAttributeEventListener):
1206         * dom/Tokenizer.h:
1207         (WebCore::Tokenizer::xssAuditor):
1208         (WebCore::Tokenizer::setXSSAuditor):
1209         (WebCore::Tokenizer::Tokenizer):
1210         * html/HTMLTokenizer.cpp:
1211         (WebCore::HTMLTokenizer::scriptHandler):
1212         * loader/FrameLoader.cpp:
1213         (WebCore::FrameLoader::begin):
1214         (WebCore::FrameLoader::requestObject):
1215         * page/Settings.cpp:
1216         (WebCore::Settings::Settings):
1217         (WebCore::Settings::setXSSAuditorEnabled):
1218         * page/Settings.h:
1219         (WebCore::Settings::xssAuditorEnabled):
1220         * page/XSSAuditor.cpp: Added.
1221         (WebCore::isControlCharacter):
1222         (WebCore::XSSAuditor::XSSAuditor):
1223         (WebCore::XSSAuditor::~XSSAuditor):
1224         (WebCore::XSSAuditor::canEvaluate):
1225         (WebCore::XSSAuditor::canCreateInlineEventListener):
1226         (WebCore::XSSAuditor::canLoadExternalScriptFromSrc):
1227         (WebCore::XSSAuditor::canLoadObject):
1228         (WebCore::XSSAuditor::decodeURL):
1229         (WebCore::XSSAuditor::findInRequest):
1230         * page/XSSAuditor.h: Added.
1231         (WebCore::XSSAuditor::isEnabled):
1232         (WebCore::XSSAuditor::setXSSAuditorEnabled):
1233
1234 2009-06-18  Dirk Schulze  <krit@webkit.org>
1235
1236         Reviewed by Oliver Hunt.
1237
1238         feOffset and objectBoundingBox
1239         [https://bugs.webkit.org/show_bug.cgi?id=26441]
1240
1241         If we use objectBoundingBox for primitiveUnits, the fractions given
1242         to dx or dy of feOffset must be multiplied with the referenced objects
1243         objectBoundingBox size.
1244
1245         Test: svg/filters/feOffset.svg
1246
1247         * svg/graphics/filters/SVGFEOffset.cpp:
1248         (WebCore::FEOffset::apply):
1249
1250 2009-06-18  Dirk Schulze  <krit@webkit.org>
1251
1252         Reviewed by Oliver Hunt.
1253
1254         feTile implementation missing
1255         [https://bugs.webkit.org/show_bug.cgi?id=26419]
1256
1257         Implementation of feTile, a pattern effect for SVG filters. It was
1258         necessary to modify FilterEffect since source inputs need a secial
1259         logic and we have to identify if an effect is a source input.
1260
1261         Tests: svg/batik/filters/feTile.svg
1262                svg/filters/feTile.svg
1263
1264         * platform/graphics/filters/FilterEffect.h:
1265         (WebCore::FilterEffect::isSourceInput):
1266         * platform/graphics/filters/SourceAlpha.h:
1267         (WebCore::SourceAlpha::isSourceInput):
1268         * platform/graphics/filters/SourceGraphic.h:
1269         (WebCore::SourceGraphic::isSourceInput):
1270         * svg/graphics/filters/SVGFETile.cpp:
1271         (WebCore::FETile::apply):
1272
1273 2009-06-18  Dirk Schulze  <krit@webkit.org>
1274
1275         Reviewed by Oliver Hunt.
1276
1277         feMerge implementation
1278         [https://bugs.webkit.org/show_bug.cgi?id=26480]
1279
1280         Added feMerge to the SVG Filter system.
1281
1282         Test: svg/filters/feMerge.svg
1283
1284         * svg/graphics/filters/SVGFEMerge.cpp:
1285         (WebCore::FEMerge::uniteChildEffectSubregions):
1286         (WebCore::FEMerge::apply):
1287         * svg/graphics/filters/SVGFEMerge.h:
1288
1289 2009-06-18  Mark Rowe  <mrowe@apple.com>
1290
1291         Speculative Windows build fix.
1292
1293         * page/win/FrameCGWin.cpp: Add missing #include.
1294
1295 2009-06-17  Brent Fulgham  <bfulgham@webkit.org>
1296
1297         Reviewed by Dave Levin.
1298
1299         https://bugs.webkit.org/show_bug.cgi?id=26425
1300         Final refactorings, picking up a few places where BitmapInfo
1301         could be used.
1302
1303         * page/win/FrameCGWin.cpp:
1304         (WebCore::imageFromRect):
1305         * platform/win/CursorWin.cpp:
1306         (WebCore::Cursor::Cursor):
1307         * platform/win/PopupMenuWin.cpp:
1308         (WebCore::PopupMenu::paint):
1309
1310 2009-06-18  Chris Fleizach  <cfleizach@apple.com>
1311
1312         Reviewed by Darin Adler.
1313
1314         Bug 26522: In DOM mode, VoiceOver reads some mouseover text on web sites strangely
1315         https://bugs.webkit.org/show_bug.cgi?id=26522
1316
1317         Test: accessibility/non-data-table-cell-title-ui-element.html
1318
1319         * accessibility/AccessibilityTableCell.cpp:
1320         (WebCore::AccessibilityTableCell::titleUIElement):
1321
1322 2009-06-18  Kevin Ollivier  <kevino@theolliviers.com>
1323
1324         wx build fix after recent RenderTheme changes.
1325
1326         * platform/wx/RenderThemeWx.cpp:
1327         (WebCore::RenderThemeWx::~RenderThemeWx):
1328         (WebCore::RenderTheme::themeForPage):
1329
1330 2009-06-18  Peter Kasting  <pkasting@google.com>
1331
1332         Reviewed by Eric Seidel.
1333
1334         https://bugs.webkit.org/show_bug.cgi?id=26460 part two
1335         Attempt to minimize diff of following functional change by first landing
1336         non-functional change to:
1337         * Make readUintX() public and static (since they will need to be once
1338           BMPImageReader is included in *ImageDecoder via composition rather
1339           than inheritance).  Add wrappers in each class so callers can be
1340           simpler.  In the next patch, these wrappers will be beefed up slightly
1341           and the callers will get even simpler.
1342         * Change direct setting of m_failed to use setFailed(), since in the
1343           next patch much of this code won't even have direct access to m_failed
1344         * Add a helper function in ICOImageDecoder to determine the image type
1345           instead of simply doing it inline
1346         * Rewrap lines that used to be <=80 cols and slipped over it during the
1347           original landing of these decoders
1348         * Other misc. changes, e.g. adding constructor definitions, reordering
1349           functions, changing RGBA32Buffer& to RGBA32Buffer*, etc. that have no
1350           functional effect but minimize the subsequent diff for readability
1351
1352
1353         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
1354         (WebCore::BMPImageDecoder::BMPImageDecoder):
1355         (WebCore::BMPImageDecoder::processFileHeader):
1356         * platform/image-decoders/bmp/BMPImageDecoder.h:
1357         (WebCore::BMPImageDecoder::readUint32):
1358         * platform/image-decoders/bmp/BMPImageReader.cpp:
1359         (WebCore::BMPImageReader::decodeBMP):
1360         (WebCore::BMPImageReader::getInfoHeaderSize):
1361         (WebCore::BMPImageReader::processInfoHeader):
1362         (WebCore::BMPImageReader::readInfoHeader):
1363         (WebCore::BMPImageReader::processBitmasks):
1364         (WebCore::BMPImageReader::processColorTable):
1365         (WebCore::BMPImageReader::processRLEData):
1366         (WebCore::BMPImageReader::processNonRLEData):
1367         * platform/image-decoders/bmp/BMPImageReader.h:
1368         (WebCore::BMPImageReader::readUint16Helper):
1369         (WebCore::BMPImageReader::readUint32Helper):
1370         (WebCore::BMPImageReader::):
1371         (WebCore::BMPImageReader::readUint16):
1372         (WebCore::BMPImageReader::readUint32):
1373         (WebCore::BMPImageReader::readCurrentPixel):
1374         (WebCore::BMPImageReader::getComponent):
1375         (WebCore::BMPImageReader::setI):
1376         (WebCore::BMPImageReader::setRGBA):
1377         (WebCore::BMPImageReader::fillRGBA):
1378         * platform/image-decoders/ico/ICOImageDecoder.cpp:
1379         (WebCore::ICOImageDecoder::ICOImageDecoder):
1380         (WebCore::ICOImageDecoder::isSizeAvailable):
1381         (WebCore::ICOImageDecoder::size):
1382         (WebCore::ICOImageDecoder::decodeImage):
1383         (WebCore::ICOImageDecoder::processDirectory):
1384         (WebCore::ICOImageDecoder::processDirectoryEntries):
1385         (WebCore::ICOImageDecoder::isBetterEntry):
1386         (WebCore::ICOImageDecoder::processImageType):
1387         * platform/image-decoders/ico/ICOImageDecoder.h:
1388         (WebCore::ICOImageDecoder::readUint16):
1389         (WebCore::ICOImageDecoder::readUint32):
1390
1391 2009-06-18  Peter Kasting  <pkasting@google.com>
1392
1393         Fix build bustage.
1394
1395         * platform/image-decoders/gif/GIFImageDecoder.h:
1396
1397 2009-06-18  Kevin McCullough  <kmccullough@apple.com>
1398
1399         Reviewed by Oliver Hunt.
1400
1401         <rdar://problem/6940880> REGRESSION: Breakpoints don't break in 64-bit
1402
1403         Convert intptr_t to Strings so that we don't loose bits in the
1404         conversion to JS.  Previously they were being put into 32bit ints.
1405
1406         * inspector/InspectorController.cpp: Convert the String back to an
1407         intptr_t.
1408         (WebCore::InspectorController::addBreakpoint):
1409         (WebCore::InspectorController::removeBreakpoint):
1410         * inspector/InspectorController.h:
1411         * inspector/InspectorController.idl: Use strings in JS to avoid 32bit
1412         truncation.
1413         * inspector/InspectorFrontend.cpp: Make the intptr_t into a String.
1414         (WebCore::InspectorFrontend::parsedScriptSource):
1415         * platform/text/PlatformString.h: Implemented the necessary conversion
1416         functions to be able to convert to and from an intptr_t.
1417         * platform/text/String.cpp: Ditto.
1418         (WebCore::String::toIntPtrStrict):
1419         (WebCore::String::toIntPtr):
1420         (WebCore::charactersToIntPtrStrict):
1421         (WebCore::charactersToIntPtr):
1422         * platform/text/StringImpl.cpp: Ditto.
1423         (WebCore::StringImpl::toIntPtrStrict):
1424         (WebCore::StringImpl::toIntPtr):
1425         * platform/text/StringImpl.h: Ditto.
1426
1427 2009-06-17  Brent Fulgham  <bfulgham@webkit.org>
1428
1429         Reviewed by Eric Seidel.
1430
1431         Final cleanups in this refactoring:
1432         (1) Move WindowsBitmap implementation from CG-specific file to
1433             the platform-common GraphicsContextWin.cpp, since it is
1434             equally useful on both platforms.
1435         (2) Revise the TransformationMatrix logic as suggested by
1436             Adam Roben in his review comments to Part #2 of this
1437             refactoring.
1438
1439         * platform/graphics/win/GraphicsContextCGWin.cpp:
1440         * platform/graphics/win/GraphicsContextWin.cpp:
1441         (WebCore::GraphicsContext::WindowsBitmap::WindowsBitmap):
1442         (WebCore::GraphicsContext::WindowsBitmap::~WindowsBitmap):
1443         (WebCore::GraphicsContext::createWindowsBitmap):
1444         (WebCore::GraphicsContext::getWindowsContext):
1445         (WebCore::GraphicsContextPlatformPrivate::scale):
1446         (WebCore::GraphicsContextPlatformPrivate::rotate):
1447         (WebCore::GraphicsContextPlatformPrivate::translate):
1448         (WebCore::GraphicsContextPlatformPrivate::concatCTM):
1449
1450 2009-06-18  Peter Kasting  <pkasting@google.com>
1451
1452         Reviewed by Eric Seidel.
1453
1454         https://bugs.webkit.org/show_bug.cgi?id=26460 part one
1455         Make isSizeAvailable non-const, since it's not logically const (it
1456         triggers lazy decoding), and simplify all the implementations (without
1457         changing behavior; just make less verbose).  Remove some other
1458         inappropriate consts, which enables the removal of all the mutable
1459         declarations in the decoders.
1460
1461         * platform/image-decoders/ImageDecoder.h:
1462         (WebCore::ImageDecoder::isSizeAvailable):
1463         (WebCore::ImageDecoder::setSize): Make public to avoid needing a friend declaration in the JPEG decoder, and because the ICO/BMP decoders will soon need this.
1464         * platform/image-decoders/gif/GIFImageDecoder.cpp:
1465         (WebCore::GIFImageDecoder::isSizeAvailable):
1466         (WebCore::GIFImageDecoder::repetitionCount):
1467         (WebCore::GIFImageDecoder::decode):
1468         * platform/image-decoders/gif/GIFImageDecoder.h:
1469         * platform/image-decoders/ico/ICOImageDecoder.cpp:
1470         (WebCore::ICOImageDecoder::isSizeAvailable):
1471         * platform/image-decoders/ico/ICOImageDecoder.h:
1472         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
1473         (WebCore::JPEGImageDecoder::isSizeAvailable):
1474         (WebCore::JPEGImageDecoder::decode):
1475         * platform/image-decoders/jpeg/JPEGImageDecoder.h:
1476         * platform/image-decoders/png/PNGImageDecoder.cpp:
1477         (WebCore::PNGImageDecoder::isSizeAvailable):
1478         (WebCore::PNGImageDecoder::decode):
1479         * platform/image-decoders/png/PNGImageDecoder.h:
1480         * platform/image-decoders/xbm/XBMImageDecoder.cpp:
1481         (WebCore::XBMImageDecoder::isSizeAvailable):
1482         (WebCore::XBMImageDecoder::frameBufferAtIndex):
1483         (WebCore::XBMImageDecoder::decode):
1484         * platform/image-decoders/xbm/XBMImageDecoder.h: Rename decodeXBM() to decode() for consistency with the JPEG/PNG decoders, and in the future the ICO/BMP decoders.
1485
1486 2009-06-17  Brent Fulgham  <bfulgham@webkit.org>
1487
1488         Reviewed by Eric Seidel.
1489
1490         Move some common functions out of platform files and into
1491         the common implementation.
1492
1493         https://bugs.webkit.org/show_bug.cgi?id=26425.
1494         Add a new platform context method (flush) so that the
1495         getWindowsContext method can be consolidated into the common
1496         GraphicsContextWin.cpp file.
1497          
1498         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
1499         (WebCore::GraphicsContextPlatformPrivate::flush):
1500         * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
1501         (WebCore::GraphicsContextPlatformPrivate::flush):
1502         * platform/graphics/win/GraphicsContextCGWin.cpp: Remove
1503           getWindowContext method.
1504         * platform/graphics/win/GraphicsContextCairoWin.cpp: Remove
1505           getWindowContext method and fillWithClearColor methods.
1506         * platform/graphics/win/GraphicsContextWin.cpp:
1507         (WebCore::fillWithClearColor): Moved from *CairoWin.cpp
1508         (WebCore::GraphicsContext::getWindowsContext): Moved
1509           from *CairoWin.cpp
1510
1511 2009-06-18  Ojan Vafai  <ojan@chromium.org>
1512
1513         Reviewed by Oliver Hunt.
1514
1515         Remove code that I accidentally committed in r44811.
1516
1517         * editing/markup.cpp:
1518         (WebCore::createMarkup):
1519
1520 2009-06-18  Simon Fraser  <simon.fraser@apple.com>
1521
1522         Reviewed by Dan Bernstein.
1523
1524         <rdar://problem/6983207> Non-layer content is not re-rendered when transition
1525         starts sometimes (with hardware acceleration).
1526         
1527         When deciding which RenderLayers should be composited, when a layer goes into
1528         compositing mode we repaint the old location. However, we did that before
1529         we'd looked at all the factors that may force a layer to composite, so missed
1530         some cases. Fix by doing the repaint once we really know whether it's going
1531         to composite.
1532
1533         Test: compositing/repaint/become-overlay-composited-layer.html
1534
1535         * rendering/RenderLayerCompositor.cpp:
1536         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1537
1538 2009-06-18  Simon Fraser  <simon.fraser@apple.com>
1539
1540         Fix the Leopard build where USE(ACCELERATED_COMPOSITING) is not defined, and
1541         the Tiger build where QTMovieLayer does not exist.
1542
1543         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1544         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1545         (WebCore::MediaPlayerPrivate::createQTMovieLayer):
1546         (WebCore::MediaPlayerPrivate::destroyQTMovieLayer):
1547         (WebCore::MediaPlayerPrivate::currentRenderingMode):
1548         (WebCore::MediaPlayerPrivate::setUpVideoRendering):
1549         (WebCore::MediaPlayerPrivate::tearDownVideoRendering):
1550         (WebCore::MediaPlayerPrivate::hasSetUpVideoRendering):
1551
1552 2009-06-18  Simon Fraser  <simon.fraser@apple.com>
1553
1554         Fix the Leopard build where USE(ACCELERATED_COMPOSITING) is not defined.
1555
1556         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1557         (WebCore::MediaPlayerPrivate::currentRenderingMode):
1558         (WebCore::MediaPlayerPrivate::setUpVideoRendering):
1559         (WebCore::MediaPlayerPrivate::tearDownVideoRendering):
1560
1561 2009-06-17  Erik Arvidsson  <arv@chromium.org>
1562
1563         Reviewed by Adele Peterson.
1564
1565         https://bugs.webkit.org/show_bug.cgi?id=15189
1566         Adds the HTML5 input event support for textarea.
1567         
1568         Also, moves the oninput attribute parse handling to HTMLElement so that
1569         it can be set on any HTML element so that bubbling events can be handled
1570         using HTML attribute handlers.
1571
1572         Test: fast/forms/textarea-input-event.html
1573
1574         * html/HTMLElement.cpp:
1575         (WebCore::HTMLElement::parseMappedAttribute):
1576         * html/HTMLInputElement.cpp:
1577         (WebCore::HTMLInputElement::parseMappedAttribute):
1578         * rendering/RenderTextControlMultiLine.cpp:
1579         (WebCore::RenderTextControlMultiLine::subtreeHasChanged):
1580
1581 2009-06-18  Dirk Schulze  <krit@webkit.org>
1582
1583         Reviewed by Oliver Hunt.
1584
1585         Share code between filterEffects
1586         [https://bugs.webkit.org/show_bug.cgi?id=26479]
1587
1588         Share more code of filter effects. The imageBuffer creation can move to
1589         FilterEffect ant every effect asks for the GraphicsContext. Move the
1590         drawingRect calculation to FilterEffect.
1591
1592         * platform/graphics/filters/FilterEffect.cpp:
1593         (WebCore::FilterEffect::calculateDrawingRect):
1594         (WebCore::FilterEffect::getEffectContext):
1595         * platform/graphics/filters/FilterEffect.h:
1596         * platform/graphics/filters/SourceGraphic.cpp:
1597         (WebCore::SourceGraphic::apply):
1598         * svg/graphics/filters/SVGFEFlood.cpp:
1599         (WebCore::FEFlood::apply):
1600         * svg/graphics/filters/SVGFEOffset.cpp:
1601         (WebCore::FEOffset::apply):
1602
1603 2009-06-18  Simon Fraser  <simon.fraser@apple.com>
1604
1605         Reviewed by Dave Hyatt.
1606         
1607         https://bugs.webkit.org/show_bug.cgi?id=26499
1608         
1609         Support hardware-accelerationed rendering of video elements.
1610
1611         * html/HTMLMediaElement.cpp:
1612         (WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks):
1613         (WebCore::HTMLMediaElement::mediaPlayerRepaint):
1614         Just move these methods to group the render-related methods together.
1615         
1616         (WebCore::HTMLMediaElement::mediaPlayerRenderingCanBeAccelerated):
1617         Call out method to ask the RenderLayerCompositor if presentation of this video
1618         can be acclerated. It might say no, if, for example, the video has a reflection.
1619         
1620         (WebCore::HTMLMediaElement::mediaPlayerGraphicsLayer):
1621         Fetch the GraphicsLayer from the RenderVideo that will host the movie layer.
1622         
1623         * html/HTMLMediaElement.h:
1624         Reordered the rendering-related methods, and added two methods related to video
1625         acceleration.
1626         
1627         * platform/graphics/MediaPlayer.cpp:
1628         (WebCore::MediaPlayer::acceleratedRenderingStateChanged):
1629         Called by the rendering system when it determines that the video must go into, or
1630         fall off of the hardware-accelerated path.
1631         
1632         (WebCore::MediaPlayer::supportsAcceleratedRendering):
1633         Method to say whether the media engine supports accelerated rendering.
1634         
1635         * platform/graphics/MediaPlayer.h:
1636         (WebCore::MediaPlayerClient::mediaPlayerRepaint):
1637         (WebCore::MediaPlayerClient::mediaPlayerSizeChanged):
1638         Moved.
1639         
1640         (WebCore::MediaPlayerClient::mediaPlayerRenderingCanBeAccelerated):
1641         (WebCore::MediaPlayerClient::mediaPlayerGraphicsLayer):
1642         New methods to ask the client if the rendering system can support accelerated
1643         rendering, and to get a GraphicsLayer to plug the movie layer into.
1644         
1645         * platform/graphics/MediaPlayerPrivate.h:
1646         (WebCore::MediaPlayerPrivateInterface::supportsAcceleratedRendering):
1647         (WebCore::MediaPlayerPrivateInterface::acceleratedRenderingStateChanged):
1648         Forwarding methods from MediaPlayer.
1649         
1650         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1651         Some new methods related to using a QTMovieLayer, and to simplify the rendering mode logic.
1652
1653         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1654         (WebCore::MediaPlayerPrivate::createQTMovieLayer):
1655         (WebCore::MediaPlayerPrivate::destroyQTMovieLayer):
1656         Methods to create and destroy the QTMovieLayer.
1657         
1658         (WebCore::MediaPlayerPrivate::currentRenderingMode):
1659         (WebCore::MediaPlayerPrivate::preferredRenderingMode):
1660         Methods to clarify the code that decides which of the 3 rendering modes to use.
1661         
1662         (WebCore::MediaPlayerPrivate::setUpVideoRendering):
1663         Changed to use the new rendering mode methods.
1664         
1665         (WebCore::MediaPlayerPrivate::tearDownVideoRendering):
1666         Destroy the layer if we have one.
1667         
1668         (WebCore::MediaPlayerPrivate::hasSetUpVideoRendering):
1669         Small utility method.
1670         
1671         (WebCore::MediaPlayerPrivate::updateStates):
1672         Move the call to setUpVideoRendering() to before we send out the state notifications,
1673         so that we will have created the rendering objects already.
1674         
1675         (WebCore::MediaPlayerPrivate::supportsAcceleratedRendering):
1676         Return true if we have QTMovieLayer.
1677         
1678         (WebCore::MediaPlayerPrivate::acceleratedRenderingStateChanged):
1679         We've been told that we went into or out of accelerated mode; maybe reset
1680         the renderer, and set the layer if we have to.
1681         
1682         * rendering/RenderLayer.cpp:
1683         (WebCore::RenderLayer::rendererContentChanged):
1684         We may need to udpate compositing layers if the video went into accelerated mode.
1685         
1686         * rendering/RenderLayerBacking.cpp:
1687         (WebCore::RenderLayerBacking::canUseDirectCompositing):
1688         Add smarts to deal with video, which allows us to avoid extra backing store.
1689         
1690         (WebCore::RenderLayerBacking::contentsBox):
1691         Use the videoBox to use the content layer for video layers.
1692         
1693         * rendering/RenderLayerCompositor.cpp:
1694         (WebCore::RenderLayerCompositor::updateLayerCompositingState):
1695         Poke the RenderVideo if the state changed.
1696         
1697         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1698         Handle an edge case when the video element itself is a stacking context
1699         because of opacity or transform.
1700         
1701         (WebCore::RenderLayerCompositor::canAccelerateVideoRendering):
1702         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
1703         (WebCore::RenderLayerCompositor::requiresCompositingForVideo):
1704         Allow video to throw us into compositing mode if the media engine supports it.
1705         
1706         * rendering/RenderLayerCompositor.h:
1707         New methods related to video.
1708         
1709         * rendering/RenderVideo.h:
1710         * rendering/RenderVideo.cpp:
1711         (WebCore::RenderVideo::updatePlayer):
1712         Call rendererContentChanged() to give the compositor a change to throw the video into
1713         compositing mode.
1714         
1715         (WebCore::RenderVideo::supportsAcceleratedRendering):
1716         (WebCore::RenderVideo::acceleratedRenderingStateChanged):
1717         (WebCore::RenderVideo::videoGraphicsLayer):
1718         Methods to allow the MediaPlayer to do rendering-related stuff via the media element.
1719
1720 2009-06-18  Rob Buis  <rwlbuis@gmail.com>
1721
1722         Reviewed by Niko.
1723
1724         https://bugs.webkit.org/show_bug.cgi?id=26385
1725         Root SVG element is not checked on requiredFeatures, requiredExtension like other elements
1726
1727         Also do the isValid check for outer <svg>.
1728
1729         Test: svg/custom/outer-svg-unknown-feature.svg
1730
1731         * svg/SVGDocument.cpp:
1732         (WebCore::SVGDocument::childShouldCreateRenderer):
1733         * svg/SVGDocument.h:
1734
1735 2009-06-18  Dan Bernstein  <mitz@apple.com>
1736
1737         Reviewed by Darin Adler.
1738
1739         - fix <rdar://problem/6913221> REGRESSION (Safari 3-4): Search field on
1740           apple.com cuts entered text
1741
1742         Test: fast/forms/search-vertical-alignment.html
1743
1744         * rendering/RenderTextControlSingleLine.cpp:
1745         (WebCore::RenderTextControlSingleLine::layout): Vertically center the
1746             the search field's inner block.
1747
1748 2009-06-18  Janne Koskinen  <janne.p.koskinen@digia.com>
1749
1750         Reviewed by Simon Hausmann.
1751
1752         Fix compilation with Symbian WINSCW compiler, which produced
1753         multiple definitions of the CSSPrimitiveValue conversion operators.
1754
1755         It turns out that they are defined inline but not declared inline.
1756
1757         Adding the inline keyword to the declaration fixes the build.
1758
1759         * css/CSSPrimitiveValue.h:
1760
1761 2009-06-18  Markus Goetz <Markus.Goetz@nokia.com>
1762
1763         Reviewed by Simon Hausman.
1764
1765         Clarify in docs how to compile with debug information.
1766
1767         * WebCore.pro:
1768
1769 2009-06-18  Jakub Wieczorek  <faw217@gmail.com>
1770
1771         Reviewed by Simon Hausmann.
1772
1773         [Qt] When writing an URL to the clipboard, save the corresponding title
1774         in the mime data as well.
1775
1776         * platform/qt/ClipboardQt.cpp:
1777         (WebCore::ClipboardQt::writeURL):
1778
1779 2009-06-18  Jakub Wieczorek  <faw217@gmail.com>
1780
1781         [Qt] Fix build. Add HTMLDataGridElement.
1782
1783         * WebCore.pro:
1784
1785 2009-06-18  Jan Michael Alonzo  <jmalonzo@webkit.org>
1786
1787         Gtk build fix.
1788
1789         Add HTMLDataGridElement header and IDL to the build script.
1790
1791         * GNUmakefile.am:
1792
1793 2009-06-18  Chris Evans  <scarybeasts@gmail.com>
1794
1795         Reviewed by Adam Barth.
1796
1797         Fix 8-digit long hex entities. Fixes bug 26454
1798         https://bugs.webkit.org/show_bug.cgi?id=26454
1799
1800         Test: fast/parser/eightdigithexentity.html
1801
1802         * html/HTMLTokenizer.cpp: fix off-by-ones.
1803
1804 2009-06-18  David Levin  <levin@chromium.org>
1805
1806         Fix chromium linux build.
1807
1808         Fixes a mistake that happened during the complicated merge for
1809         landing r44775, r44776, r44777.
1810
1811         * rendering/RenderThemeChromiumLinux.cpp:
1812         (WebCore::RenderThemeChromiumLinux::create):
1813
1814 2009-06-17  Simon Fraser  <simon.fraser@apple.com>
1815
1816         Reviewed by Darin Adler.
1817         
1818         https://bugs.webkit.org/show_bug.cgi?id=26499
1819         
1820         First step to making video rendering be hardware-accelerated:
1821         make <video> elements get self-painting RenderLayers, and add
1822         an isVideo() virtual method to RenderObject.
1823
1824         * html/HTMLMediaElement.cpp:
1825         (WebCore::HTMLMediaElement::setReadyState):
1826         (WebCore::HTMLMediaElement::mediaPlayerDurationChanged):
1827         (WebCore::HTMLMediaElement::mediaPlayerSizeChanged):
1828         * rendering/RenderLayer.cpp:
1829         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
1830         (WebCore::RenderLayer::isSelfPaintingLayer):
1831         * rendering/RenderObject.h:
1832         (WebCore::RenderObject::isVideo):
1833         * rendering/RenderVideo.h:
1834         (WebCore::RenderVideo::requiresLayer):
1835         (WebCore::RenderVideo::isVideo):
1836
1837 2009-06-17  Brent Fulgham  <bfulgham@webkit.org>
1838
1839         Reviewed by Adam Roben.
1840
1841         Refactor a few common routines in the various Windows ports
1842         and reduce some duplicated code.
1843
1844         (1) Create TransformationMatrix XFORM casting operator, and
1845             switch various XFORM structure uses to utilize it.
1846         (2) Push concatCTM call to GraphicsContextWin now that the
1847             TransformationMatrix can directly create XFORM (rather
1848             than converting to CGAffineTransform/cairo_matrix_t first.)
1849
1850         * WebCore.vcproj/WebCore.vcproj: Add new BitmapInfo structure.
1851         * platform/graphics/transforms/TransformationMatrix.h:
1852         * platform/graphics/win/GraphicsContextCGWin.cpp:
1853         * platform/graphics/win/GraphicsContextCairoWin.cpp:
1854         * platform/graphics/win/GraphicsContextWin.cpp:
1855         (WebCore::GraphicsContextPlatformPrivate::scale):
1856         (WebCore::GraphicsContextPlatformPrivate::rotate):
1857         (WebCore::GraphicsContextPlatformPrivate::translate):
1858         (WebCore::GraphicsContextPlatformPrivate::concatCTM):
1859         * platform/graphics/win/TransformationMatrixWin.cpp: Added.
1860         (WebCore::TransformationMatrix::operator XFORM): New operator
1861
1862 2009-06-17  Brent Fulgham  <bfulgham@webkit.org>
1863
1864         Non-CG Windows build fix after @r44758.
1865
1866         * rendering/RenderThemeWin.cpp:
1867         (WebCore::RenderTheme::themeForPage):
1868
1869 2009-06-17  Brent Fulgham  <bfulgham@webkit.org>
1870
1871         Reviewed by Adam Roben.
1872
1873         Refactor a few common routines in the various Windows ports
1874         and reduce some duplicated code.
1875         https://bugs.webkit.org/show_bug.cgi?id=26425.
1876
1877         Refactor use of BITMAPINFO for the new BitmapInfo structure.
1878
1879         * WebCore.vcproj/WebCore.vcproj:
1880         * platform/win/BitmapInfo.cpp: Added.
1881         (WebCore::bitmapInfoForSize):
1882         (WebCore::BitmapInfo::create):
1883         (WebCore::BitmapInfo::createBottomUp):
1884         * platform/win/BitmapInfo.h: Added.
1885         * platform/graphics/win/GraphicsContextCairoWin.cpp:
1886         * platform/graphics/win/GraphicsContextCGWin.cpp:
1887         * platform/graphics/win/TransformationMatrixWin.cpp: Added.
1888         (WebCore::TransformationMatrix::operator XFORM): New operator
1889         * platform/win/DragImageCGWin.cpp:
1890         (WebCore::allocImage):
1891         * platform/win/DragImageCairoWin.cpp:
1892         (WebCore::allocImage):
1893         * platform/win/PasteboardWin.cpp:
1894         (WebCore::Pasteboard::writeImage):
1895         * platform/win/PopupMenuWin.cpp:
1896         (WebCore::PopupMenu::paint):
1897
1898 2009-06-17  Adam Roben  <aroben@apple.com>
1899
1900         Remove unnecessary 6th parameter from SOFT_LINK_OPTIONAL
1901
1902         Reviewed by Mark Rowe.
1903
1904         * platform/graphics/win/ColorSafari.cpp: Removed the 6th parameter and
1905         an unnecessary parameter name.
1906         * platform/win/SoftLinking.h: Removed the unused 6th parameter.
1907
1908 2009-06-17  Adam Roben  <aroben@apple.com>
1909
1910         Make Settings::shouldPaintNativeControls default to true
1911
1912         This matches the default up in WebKit (that was changed in r43318).
1913
1914         Fixes Bug 26493: REGRESSION (r44758): First tab always uses Mac-style
1915         form controls
1916         <https://bugs.webkit.org/show_bug.cgi?id=26493>
1917
1918         Reviewed by Darin Adler and Dave Hyatt.
1919
1920         No test possible since DRT always uses Mac-style form controls.
1921
1922         * page/Settings.cpp: Changed the initial value of
1923         gShouldPaintNativeControls to true.
1924
1925         * rendering/RenderThemeSafari.cpp:
1926         (WebCore::RenderTheme::themeForPage): Added a FIXME about the design
1927         flaw here involving querying Settings before it's been initialized.
1928
1929 2009-06-17  David Levin  <levin@chromium.org>
1930
1931         Fix chromium windows build.
1932
1933         A mistake that happened during the complicated merge for
1934         landing r44775, r44776, r44777.
1935
1936         * rendering/RenderThemeChromiumWin.h:
1937         (WebCore::RenderThemeChromiumWin::RenderThemeChromiumWin):
1938         (WebCore::RenderThemeChromiumWin::~RenderThemeChromiumWin):
1939
1940 2009-06-17  Eric Carlson  <eric.carlson@apple.com>
1941
1942         Reviewed by Simon Fraser.
1943
1944         <rdar://problem/6981193> Crash in MediaControlInputElement::attachToParent
1945
1946         * rendering/MediaControlElements.cpp:
1947         (WebCore::MediaTextDisplayElement::attachToParent): NULL check element renderer or parent renderer.
1948         (WebCore::MediaControlInputElement::attachToParent): Ditto.
1949
1950 2009-06-17  David Hyatt  <hyatt@apple.com>
1951
1952         Fix Windows build.  There's no HTMLDataGridElement.cpp file yet.
1953
1954         * html/HTMLElementsAllInOne.cpp:
1955
1956 2009-06-17  David Hyatt  <hyatt@apple.com>
1957
1958         Reviewed by Adam Roben and Anders Carlsson.
1959
1960         Stub out the HTMLDataGridElement.
1961
1962         * DerivedSources.make:
1963         * WebCore.vcproj/WebCore.vcproj:
1964         * WebCore.xcodeproj/project.pbxproj:
1965         * WebCoreSources.bkl:
1966         * css/CSSStyleSelector.cpp:
1967         (WebCore::CSSStyleSelector::adjustRenderStyle):
1968         * editing/htmlediting.cpp:
1969         (WebCore::canHaveChildrenForEditing):
1970         * html/HTMLDataGridElement.h: Added.
1971         (WebCore::HTMLDataGridElement::HTMLDataGridElement):
1972         (WebCore::HTMLDataGridElement::tagPriority):
1973         * html/HTMLDataGridElement.idl: Added.
1974         * html/HTMLElement.cpp:
1975         (WebCore::inlineTagList):
1976         * html/HTMLParser.cpp:
1977         (WebCore::HTMLParser::isAffectedByResidualStyle):
1978         * html/HTMLTagNames.in:
1979
1980 2009-06-17  David Levin  <levin@chromium.org>
1981
1982         Reviewed by NOBODY (chromium build fix).
1983
1984         Fix typo in previous changes.
1985
1986         * rendering/RenderThemeChromiumSkia.cpp:
1987         (WebCore::RenderThemeChromiumSkia::defaultGUIFont):
1988
1989 2009-06-17  Albert J. Wong  <ajwong@chromium.org>
1990
1991         Reviewed by Eric Seidel.
1992
1993         https://bugs.webkit.org/show_bug.cgi?id=26148
1994         Remove common code from RenderThemeChromiumWin that is shared with
1995         RenderThemeChromiumSkia.
1996
1997         Also move supportsControlTints to RenderThemeChromiumLinux since it
1998         is linux specific.
1999
2000         There are no tests changed because this just removes functions with
2001         duplicate implementations between the base and derived classes.
2002
2003         * rendering/RenderThemeChromiumLinux.cpp:
2004         (WebCore::RenderThemeChromiumLinux::supportsControlTints):
2005         * rendering/RenderThemeChromiumLinux.h:
2006         * rendering/RenderThemeChromiumSkia.cpp:
2007         * rendering/RenderThemeChromiumSkia.h:
2008         * rendering/RenderThemeChromiumWin.cpp:
2009         (WebCore::):
2010         (WebCore::getNonClientMetrics):
2011         (WebCore::RenderThemeChromiumWin::RenderThemeChromiumWin):
2012         (WebCore::RenderThemeChromiumWin::~RenderThemeChromiumWin):
2013         (WebCore::RenderThemeChromiumWin::systemFont):
2014         (WebCore::RenderThemeChromiumWin::paintCheckbox):
2015         (WebCore::RenderThemeChromiumWin::paintRadio):
2016         (WebCore::RenderThemeChromiumWin::paintSliderThumb):
2017         (WebCore::RenderThemeChromiumWin::caretBlinkIntervalInternal):
2018         * rendering/RenderThemeChromiumWin.h:
2019
2020 2009-06-17  Albert J. Wong  <ajwong@chromium.org>
2021
2022         Reviewed by Eric Seidel.
2023
2024         https://bugs.webkit.org/show_bug.cgi?id=26148
2025         Move RenderThemeChromiumSkia into its own file.  This is purely a code move.
2026
2027         * rendering/RenderThemeChromiumLinux.cpp:
2028         * rendering/RenderThemeChromiumLinux.h:
2029         * rendering/RenderThemeChromiumSkia.cpp:
2030         (WebCore::):
2031         (WebCore::setSizeIfAuto):
2032         (WebCore::mediaElementParent):
2033         (WebCore::RenderThemeChromiumSkia::defaultGUIFont):
2034         (WebCore::RenderThemeChromiumSkia::RenderThemeChromiumSkia):
2035         (WebCore::RenderThemeChromiumSkia::~RenderThemeChromiumSkia):
2036         (WebCore::RenderThemeChromiumSkia::extraDefaultStyleSheet):
2037         (WebCore::RenderThemeChromiumSkia::extraQuirksStyleSheet):
2038         (WebCore::RenderThemeChromiumSkia::extraMediaControlsStyleSheet):
2039         (WebCore::RenderThemeChromiumSkia::supportsHover):
2040         (WebCore::RenderThemeChromiumSkia::supportsFocusRing):
2041         (WebCore::RenderThemeChromiumSkia::platformActiveSelectionBackgroundColor):
2042         (WebCore::RenderThemeChromiumSkia::platformInactiveSelectionBackgroundColor):
2043         (WebCore::RenderThemeChromiumSkia::platformActiveSelectionForegroundColor):
2044         (WebCore::RenderThemeChromiumSkia::platformInactiveSelectionForegroundColor):
2045         (WebCore::RenderThemeChromiumSkia::platformTextSearchHighlightColor):
2046         (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
2047         (WebCore::RenderThemeChromiumSkia::systemFont):
2048         (WebCore::RenderThemeChromiumSkia::minimumMenuListSize):
2049         (WebCore::RenderThemeChromiumSkia::paintCheckbox):
2050         (WebCore::RenderThemeChromiumSkia::setCheckboxSize):
2051         (WebCore::RenderThemeChromiumSkia::paintRadio):
2052         (WebCore::RenderThemeChromiumSkia::setRadioSize):
2053         (WebCore::brightenColor):
2054         (WebCore::paintButtonLike):
2055         (WebCore::RenderThemeChromiumSkia::paintButton):
2056         (WebCore::RenderThemeChromiumSkia::paintTextField):
2057         (WebCore::RenderThemeChromiumSkia::paintTextArea):
2058         (WebCore::RenderThemeChromiumSkia::paintSearchField):
2059         (WebCore::RenderThemeChromiumSkia::adjustSearchFieldCancelButtonStyle):
2060         (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
2061         (WebCore::RenderThemeChromiumSkia::adjustSearchFieldDecorationStyle):
2062         (WebCore::RenderThemeChromiumSkia::adjustSearchFieldResultsDecorationStyle):
2063         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
2064         (WebCore::RenderThemeChromiumSkia::adjustSearchFieldResultsButtonStyle):
2065         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
2066         (WebCore::RenderThemeChromiumSkia::paintMediaButtonInternal):
2067         (WebCore::RenderThemeChromiumSkia::paintMediaPlayButton):
2068         (WebCore::RenderThemeChromiumSkia::paintMediaMuteButton):
2069         (WebCore::RenderThemeChromiumSkia::adjustMenuListStyle):
2070         (WebCore::RenderThemeChromiumSkia::paintMenuList):
2071         (WebCore::RenderThemeChromiumSkia::adjustMenuListButtonStyle):
2072         (WebCore::RenderThemeChromiumSkia::paintMenuListButton):
2073         (WebCore::RenderThemeChromiumSkia::popupInternalPaddingLeft):
2074         (WebCore::RenderThemeChromiumSkia::popupInternalPaddingRight):
2075         (WebCore::RenderThemeChromiumSkia::popupInternalPaddingTop):
2076         (WebCore::RenderThemeChromiumSkia::popupInternalPaddingBottom):
2077         (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingLeft):
2078         (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingRight):
2079         (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingTop):
2080         (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingBottom):
2081         (WebCore::RenderThemeChromiumSkia::caretBlinkIntervalInternal):
2082         (WebCore::RenderThemeChromiumSkia::menuListInternalPadding):
2083         * rendering/RenderThemeChromiumSkia.h:
2084         (WebCore::RenderThemeChromiumSkia::supportsControlTints):
2085
2086 2009-06-17  Albert J. Wong  <ajwong@chromium.org>
2087
2088         Reviewed by Eric Seidel.
2089
2090         https://bugs.webkit.org/show_bug.cgi?id=26148
2091         Extract RenderThemeChromiumSkia out of RenderThemeChromiumLinux.  This
2092         is mostly a code shuffle.  The non-suffle changes are:
2093            1) Creation of a caretBlinkIntervalInternal.
2094            2) Moving of some inline functions into the implementation files.
2095            3) Changing of defaultGUIFont into a static class constant from a
2096               static function.  Also the type is changed to String.
2097            4) Changing of defaultFontSize into a static class constant from a
2098               static variable in the file scope.
2099            5) The static supportsFocus function was collapsed into
2100               supportsFocusRing.
2101            6) Split the extraDefaultStyleSheet into Skia and Linux versions.
2102
2103         * rendering/RenderThemeChromiumLinux.cpp:
2104         (WebCore::RenderThemeChromiumSkia::defaultGUIFont):
2105         (WebCore::RenderThemeChromiumSkia::RenderThemeChromiumSkia):
2106         (WebCore::RenderThemeChromiumSkia::~RenderThemeChromiumSkia):
2107         (WebCore::RenderThemeChromiumSkia::extraDefaultStyleSheet):
2108         (WebCore::RenderThemeChromiumSkia::extraQuirksStyleSheet):
2109         (WebCore::RenderThemeChromiumSkia::extraMediaControlsStyleSheet):
2110         (WebCore::RenderThemeChromiumSkia::supportsHover):
2111         (WebCore::RenderThemeChromiumSkia::supportsFocusRing):
2112         (WebCore::RenderThemeChromiumSkia::platformActiveSelectionBackgroundColor):
2113         (WebCore::RenderThemeChromiumSkia::platformInactiveSelectionBackgroundColor):
2114         (WebCore::RenderThemeChromiumSkia::platformActiveSelectionForegroundColor):
2115         (WebCore::RenderThemeChromiumSkia::platformInactiveSelectionForegroundColor):
2116         (WebCore::RenderThemeChromiumSkia::platformTextSearchHighlightColor):
2117         (WebCore::RenderThemeChromiumSkia::caretBlinkInterval):
2118         (WebCore::RenderThemeChromiumSkia::systemFont):
2119         (WebCore::RenderThemeChromiumSkia::minimumMenuListSize):
2120         (WebCore::RenderThemeChromiumSkia::paintCheckbox):
2121         (WebCore::RenderThemeChromiumSkia::setCheckboxSize):
2122         (WebCore::RenderThemeChromiumSkia::paintRadio):
2123         (WebCore::RenderThemeChromiumSkia::setRadioSize):
2124         (WebCore::RenderThemeChromiumSkia::paintButton):
2125         (WebCore::RenderThemeChromiumSkia::paintTextField):
2126         (WebCore::RenderThemeChromiumSkia::paintTextArea):
2127         (WebCore::RenderThemeChromiumSkia::paintSearchField):
2128         (WebCore::RenderThemeChromiumSkia::adjustSearchFieldCancelButtonStyle):
2129         (WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
2130         (WebCore::RenderThemeChromiumSkia::adjustSearchFieldDecorationStyle):
2131         (WebCore::RenderThemeChromiumSkia::adjustSearchFieldResultsDecorationStyle):
2132         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
2133         (WebCore::RenderThemeChromiumSkia::adjustSearchFieldResultsButtonStyle):
2134         (WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):
2135         (WebCore::RenderThemeChromiumSkia::paintMediaButtonInternal):
2136         (WebCore::RenderThemeChromiumSkia::paintMediaPlayButton):
2137         (WebCore::RenderThemeChromiumSkia::paintMediaMuteButton):
2138         (WebCore::RenderThemeChromiumSkia::adjustMenuListStyle):
2139         (WebCore::RenderThemeChromiumSkia::paintMenuList):
2140         (WebCore::RenderThemeChromiumSkia::adjustMenuListButtonStyle):
2141         (WebCore::RenderThemeChromiumSkia::paintMenuListButton):
2142         (WebCore::RenderThemeChromiumSkia::popupInternalPaddingLeft):
2143         (WebCore::RenderThemeChromiumSkia::popupInternalPaddingRight):
2144         (WebCore::RenderThemeChromiumSkia::popupInternalPaddingTop):
2145         (WebCore::RenderThemeChromiumSkia::popupInternalPaddingBottom):
2146         (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingLeft):
2147         (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingRight):
2148         (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingTop):
2149         (WebCore::RenderThemeChromiumSkia::buttonInternalPaddingBottom):
2150         (WebCore::RenderThemeChromiumSkia::caretBlinkIntervalInternal):
2151         (WebCore::RenderThemeChromiumLinux::RenderThemeChromiumLinux):
2152         (WebCore::RenderThemeChromiumLinux::~RenderThemeChromiumLinux):
2153         (WebCore::RenderThemeChromiumLinux::systemColor):
2154         (WebCore::RenderThemeChromiumLinux::extraDefaultStyleSheet):
2155         (WebCore::RenderThemeChromiumSkia::menuListInternalPadding):
2156         * rendering/RenderThemeChromiumLinux.h:
2157
2158 2009-06-17  Adam Roben  <aroben@apple.com>
2159
2160         Add a SOFT_LINK_OPTIONAL macro
2161
2162         This macro is useful when soft-linking functions that are present in
2163         only some versions of a particular library (e.g., APIs added in
2164         Windows Vista that aren't available on Windows XP).
2165
2166         Reviewed by Ada Chan.
2167
2168         * platform/graphics/win/ColorSafari.cpp:
2169         (WebCore::focusRingColor):
2170         Use the SoftLinking.h macros instead of doing the soft-link ourselves.
2171         Also removed an unused call to focusRingColor.isValid().
2172
2173         * platform/win/SoftLinking.h: Added SOFT_LINK_OPTIONAL.
2174
2175 2009-06-17  Brent Fulgham  <bfulgham@webkit.org>
2176
2177         Reviewed by Gustavo Noronha.
2178
2179         Fixes: https://bugs.webkit.org/show_bug.cgi?id=26470.
2180         The use of zero-width or zero-height rectangles in generating
2181         gradients caused Windows Cairo to crash, and webkitgtk to
2182         produce invalid images.
2183
2184         We now test for NaN in the phase argument, which is calculated
2185         using fmodf and can blow up when the width/height values passed
2186         are zero.
2187
2188         Test: fast/gradients/border-image-gradient-sides-and-corners.html
2189
2190         * platform/graphics/cairo/ImageCairo.cpp:
2191         (WebCore::Image::drawPattern):
2192
2193 2009-06-17  Ojan Vafai  <ojan@chromium.org>
2194
2195         Reviewed by Dimitri Glazkov.
2196
2197         If loading a font fails because of the sandbox, we ask the browser process to
2198         try to load it by calling ensureFontLoaded. If it still fails after
2199         ensureFontLoaded, we hit a ASSERT_NOT_REACHED.
2200
2201         This case happens once in a while during browser shutdown. The browser will
2202         queue a message to the renderer to shutdown, and will then stop answering sync
2203         messages from the renderer. If the renderer is still loading a page during this
2204         time, it might try to call the browser process to ask to load a font. The
2205         browser process will ignore the request, and the font will fail to load, even
2206         after the second try.
2207
2208         This is unfortunate, but there is no real risk here, since the renderer will be
2209         going away as soon as it processes another message.
2210         
2211         This can't be layout tested as it depends on the sandbox.
2212         
2213         https://bugs.webkit.org/show_bug.cgi?id=26484
2214
2215         * platform/graphics/chromium/FontCacheChromiumWin.cpp:
2216         (WebCore::fontContainsCharacter):
2217
2218 2009-06-17  Eric Carlson  <eric.carlson@apple.com>
2219
2220         Reviewed by Dan Bernstein.
2221
2222         https://bugs.webkit.org/show_bug.cgi?id=26482
2223         <rdar://problem/6978590> When setting playback rate to 0, the audio element stops 
2224         playing (doesn't resume later)
2225
2226         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2227         (WebCore::MediaPlayerPrivate::setRate): Always set the rate, even when "paused".
2228
2229         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
2230         (WebCore::MediaPlayerPrivate::setRate): Ditto.
2231
2232 2009-06-17  Adam Roben  <aroben@apple.com>
2233
2234         Add all the generated JS*.cpp files back to WebCore.vcproj
2235
2236         They are not compiled by the vcproj directly. Instead they are
2237         compiled as part of DerivedSources.cpp. Having them listed in the
2238         vcproj makes them be included in Project Find, etc.
2239
2240         Rubber-stamped in advance by Steve Falkenburg.
2241
2242         * WebCore.vcproj/WebCore.vcproj:
2243
2244 2009-06-17  Kent Tamura  <tkent@chromium.org>
2245
2246         Reviewed by Darin Fisher.
2247
2248         Don't fire redundant 'change' events for a file upload form.
2249         https://bugs.webkit.org/show_bug.cgi?id=26471
2250
2251         * platform/FileChooser.cpp:
2252         (WebCore::FileChooser::chooseFiles): Suppress change event if the
2253         existing selected files and the incoming selected files are equal.
2254         (WebCore::FileChooser::chooseIcon): Returns 0 if there is no selected
2255         files.
2256
2257 2009-06-17  Adam Treat  <adam.treat@torchmobile.com>
2258
2259         Reviewed by George Staikos.
2260
2261         https://bugs.webkit.org/show_bug.cgi?id=23155
2262         Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
2263
2264         * platform/KeyboardCodes.h:
2265
2266 2009-06-17  George Staikos  <george.staikos@torchmobile.com>
2267
2268         Reviewed by Adam Treat.
2269
2270         https://bugs.webkit.org/show_bug.cgi?id=23155
2271         Move WIN_CE -> WINCE as previously discussed with Qt WINCE folks.
2272
2273         * platform/graphics/qt/GraphicsContextQt.cpp:
2274         (WebCore::GraphicsContext::getWindowsContext):
2275         * platform/win/SystemTimeWin.cpp:
2276         (WebCore::userIdleTime):
2277
2278 2009-06-17  Adam Roben  <aroben@apple.com>
2279
2280         Speculative Mac build fix
2281
2282         * page/Page.h: Forward-declare RenderTheme instead of including
2283         RenderTheme.h so that we don't need to make RenderTheme.h a private
2284         header for WebKit's benefit.
2285
2286         * editing/SelectionController.cpp:
2287         * rendering/InlineTextBox.cpp:
2288         * rendering/RenderObject.cpp:
2289         Added #includes of RenderTheme.h.
2290
2291 2009-06-17  Adam Roben  <aroben@apple.com>
2292
2293         Speculative Mac build fix
2294
2295         * rendering/RenderThemeMac.mm:
2296         (WebCore::RenderTheme::create): Added.
2297
2298 2009-06-17  Adam Roben  <aroben@apple.com>
2299
2300         Speculative Mac build fix
2301
2302         * rendering/RenderThemeMac.mm:
2303         (WebCore::RenderTheme::themeForPage): Remove the name of an unused
2304         parameter.
2305
2306 2009-06-17  Adam Roben  <aroben@apple.com>
2307
2308         Speculative Mac build fix
2309
2310         * page/Page.cpp:
2311         (WebCore::Page::Page): Change the initializer order to match the
2312         declaration order.
2313
2314 2009-06-16  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
2315
2316         Reviewed by Simon Hausmann.
2317
2318         Follow up to bug https://bugs.webkit.org/show_bug.cgi?id=26278
2319         Patch that make WebCore have a RenderTheme per page
2320
2321         Make the Qt implementation of RenderTheme create a theme per page,
2322         and use the QStyle associated with the view of each page, in order
2323         to make the QWidget setStyle() method work as advertised.
2324
2325         * platform/qt/RenderThemeQt.cpp:
2326         (WebCore::RenderThemeQt::RenderThemeQt):
2327         (WebCore::RenderThemeQt::qStyle):
2328         (WebCore::findFrameLineWidth):
2329         (WebCore::inflateButtonRect):
2330         (WebCore::RenderThemeQt::adjustRepaintRect):
2331         (WebCore::RenderThemeQt::isControlStyled):
2332         (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
2333         (WebCore::RenderThemeQt::setButtonPadding):
2334         (WebCore::RenderThemeQt::paintButton):
2335         (WebCore::RenderThemeQt::paintTextField):
2336         (WebCore::RenderThemeQt::setPopupPadding):
2337         * platform/qt/RenderThemeQt.h:
2338
2339 2009-06-16  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
2340
2341         Reviewed by Dave Hyatt and Adam Roben.
2342
2343         https://bugs.webkit.org/show_bug.cgi?id=26278
2344         Patch that make WebCore have a RenderTheme per page
2345
2346
2347         Create a different RenderTheme per page, so that RenderTheme has
2348         access to page specific theming. This is needed for the Qt port, as Qt
2349         supports setting the theme (style) per widget.
2350
2351         This change was suggested and discussed with Dave Hyatt.
2352
2353         More detailed:
2354
2355         1) Create a theme per page or one global one, depending on the needs
2356            of the platform.
2357         2) Add an accesser to the theme from RenderObject.
2358         3) Change all uses of the theming to access the theme through
2359            RenderObject, using the global default theme as fallback, when the
2360            document of RenderObject has no page.
2361            When we don't have access to a RenderObject, use the default theme.
2362         4) Modify all RenderTheme platform implementations to work with the
2363            above changes, still creating only one global theme.
2364
2365
2366         * accessibility/AccessibilityRenderObject.cpp:
2367         (WebCore::AccessibilityRenderObject::boundingBoxRect):
2368         * css/CSSStyleSelector.cpp:
2369         (WebCore::loadFullDefaultStyle):
2370         (WebCore::CSSStyleSelector::styleForElement):
2371         (WebCore::CSSStyleSelector::adjustRenderStyle):
2372         (WebCore::CSSStyleSelector::applyProperty):
2373         * dom/ContainerNode.cpp:
2374         (WebCore::ContainerNode::setActive):
2375         (WebCore::ContainerNode::setHovered):
2376         * editing/SelectionController.cpp:
2377         (WebCore::SelectionController::focusedOrActiveStateChanged):
2378         * html/HTMLFormControlElement.cpp:
2379         (WebCore::HTMLFormControlElement::parseMappedAttribute):
2380         * html/HTMLInputElement.cpp:
2381         (WebCore::HTMLInputElement::setChecked):
2382         (WebCore::HTMLInputElement::setIndeterminate):
2383         * page/Frame.cpp:
2384         (WebCore::Frame::selectionLayoutChanged):
2385         * page/FrameView.cpp:
2386         (WebCore::FrameView::updateControlTints):
2387         * page/Page.cpp:
2388         (WebCore::Page::Page):
2389         * page/Page.h:
2390         (WebCore::Page::theme):
2391         * platform/chromium/PopupMenuChromium.cpp:
2392         (WebCore::PopupListBox::paintRow):
2393         * platform/gtk/RenderThemeGtk.cpp:
2394         (WebCore::RenderThemeGtk::create):
2395         (WebCore::RenderTheme::themeForPage):
2396         (WebCore::RenderThemeGtk::RenderThemeGtk):
2397         (WebCore::RenderThemeGtk::~RenderThemeGtk):
2398         (WebCore::RenderThemeGtk::gtkEntry):
2399         (WebCore::RenderThemeGtk::gtkTreeView):
2400         * platform/gtk/RenderThemeGtk.h:
2401         * platform/qt/RenderThemeQt.cpp:
2402         (WebCore::RenderThemeQt::create):
2403         (WebCore::RenderTheme::themeForPage):
2404         * platform/qt/RenderThemeQt.h:
2405         * platform/win/PopupMenuWin.cpp:
2406         (WebCore::PopupMenu::paint):
2407         * rendering/RenderMediaControls.cpp:
2408         (WebCore::determineState):
2409         * platform/wx/RenderThemeWx.cpp:
2410         (WebCore::RenderThemeWx::create):
2411         (WebCore::RenderTheme::themeForPage):
2412         * rendering/InlineTextBox.cpp:
2413         (WebCore::InlineTextBox::paintTextMatchMarker):
2414         * rendering/MediaControlElements.cpp:
2415         (WebCore::MediaControlInputElement::hitTest):
2416         * rendering/RenderObject.cpp:
2417         (WebCore::RenderObject::theme):
2418         * rendering/RenderObject.h:
2419         * rendering/RenderTheme.cpp:
2420         (WebCore::RenderTheme::adjustStyle):
2421         * rendering/RenderTheme.h:
2422         (WebCore::RenderTheme::defaultTheme):
2423         * rendering/RenderThemeChromiumLinux.cpp:
2424         (WebCore::RenderThemeChromiumLinux::create):
2425         (WebCore::RenderTheme::themeForPage):
2426         * rendering/RenderThemeChromiumLinux.h:
2427         (WebCore::RenderThemeChromiumLinux::~RenderThemeChromiumLinux):
2428         * rendering/RenderThemeChromiumMac.h:
2429         * rendering/RenderThemeChromiumMac.mm:
2430         (WebCore::RenderThemeChromiumMac::create):
2431         (WebCore::RenderTheme::themeForPage):
2432         * rendering/RenderThemeChromiumWin.cpp:
2433         (WebCore::RenderThemeChromiumWin::create):
2434         (WebCore::RenderTheme::themeForPage):
2435         * rendering/RenderThemeChromiumWin.h:
2436         (WebCore::RenderThemeChromiumWin::RenderThemeChromiumWin):
2437         (WebCore::RenderThemeChromiumWin::~RenderThemeChromiumWin):
2438         * rendering/RenderThemeMac.h:
2439         * rendering/RenderThemeMac.mm:
2440         (WebCore::RenderTheme::themeForPage):
2441         * rendering/RenderThemeSafari.cpp:
2442         (WebCore::RenderThemeSafari::create):
2443         (WebCore::RenderTheme::themeForPage):
2444         * rendering/RenderThemeSafari.h:
2445         * rendering/RenderThemeWin.cpp:
2446         (WebCore::RenderThemeWin::create):
2447         (WebCore::RenderTheme::themeForPage):
2448         * rendering/RenderThemeWin.h:
2449
2450 2009-06-17  Gavin Barraclough  <barraclough@apple.com>
2451
2452         Reviewed by Oliver Hunt.
2453
2454         <rdar://problem/6974175> ASSERT in JITStubs.cpp at appsaccess.apple.com
2455
2456         JSDOMWindowCustom was using PropertySlot::putValue, however this interface
2457         appears to be fundaementally incorrect - PropertySlots are only used to get
2458         values, all puts use PutPropertySlot.  However PutPropertySlot cannot be
2459         used in the fashion desired here - it only reports the caching type of a
2460         write that has been performed.
2461
2462         (This caused a bug where the put should have triggered a transition, and
2463         failed to do so.)
2464
2465         Removing the faulty case from the optimization leads to a ~0.5% progression
2466         on in-browser SunSpider (presumably the very first case was not being hit
2467         often, and the simplification here is beneficial).
2468
2469         * bindings/js/JSDOMWindowCustom.cpp:
2470         (WebCore::JSDOMWindow::put):
2471
2472 2009-06-17  David Levin  <levin@chromium.org>
2473
2474         Reviewed by NOBODY, layout tests fix.
2475
2476         https://bugs.webkit.org/show_bug.cgi?id=26326
2477         This reverts commit r44751.
2478
2479         Once that change was checked scrollbars/scrollbar-orientation.html started
2480         crashing on Windows.
2481
2482         * dom/Document.cpp:
2483         (WebCore::Document::detach):
2484         * page/FrameView.cpp:
2485         * page/FrameView.h:
2486         * platform/Scrollbar.h:
2487         * rendering/RenderObject.cpp:
2488         (WebCore::RenderObject::destroy):
2489         * rendering/RenderScrollbar.h:
2490
2491 2009-06-16  Kevin Watters  <kevinwatters@gmail.com>
2492
2493         Reviewed by Kevin Ollivier.
2494
2495         In ImageSource::setData, delete the old m_encoder before replacing it with a new one.
2496         
2497         https://bugs.webkit.org/show_bug.cgi?id=26458
2498
2499         * platform/graphics/wx/ImageSourceWx.cpp:
2500         (WebCore::ImageSource::setData):
2501
2502 2009-06-16  David Levin  <levin@chromium.org>
2503
2504         Reviewed by David Hyatt.
2505
2506         REGRESSION: When the main page (ScrollView) has a custom scrollbar, it crashes on destruction.
2507         https://bugs.webkit.org/show_bug.cgi?id=26326
2508
2509         Test: scrollbars/scrollbar-crash-on-refresh.html
2510
2511         * dom/Document.cpp:
2512         (WebCore::Document::detach):
2513         Gives the FrameView a change to do any necessary cleanup on
2514         Document::detach() which is where the renderArena gets detroyed.
2515         * page/FrameView.cpp:
2516         (WebCore::FrameView::detachCustomScrollbars):
2517         Gets rid of any custom scrollbars (if the docment supplied them).
2518         * page/FrameView.h:
2519         * platform/Scrollbar.h:
2520         (WebCore::Scrollbar::isCustomScrollbar):
2521         * rendering/RenderObject.cpp:
2522         (WebCore::RenderObject::destroy):
2523         Removed the check for document()->frame().  If frame() is 0 in this code,
2524         then the call to animation() is also incorrect (since it does document()->frame()->animation()).
2525         * rendering/RenderScrollbar.h:
2526         (WebCore::RenderScrollbar::isCustomScrollbar):
2527
2528 2009-06-16  Brian Weinstein  <bweinstein@apple.com>
2529
2530         Reviewed by Adele Peterson.
2531
2532         Fix of <rdar://6967547> Ctrl-C copies null value erasing text in clipboard in Safari.
2533         This patch kept the way events were firing as they were before, and Windows events are
2534         consistent with Mac.       
2535
2536         * editing/Editor.cpp:
2537         (WebCore::Editor::tryDHTMLCopy): Added check for canCopy() before clearing PasteBoard
2538         (WebCore::Editor::tryDHTMLCut): Added check for canCut() before clearing PasteBoard
2539
2540 2009-06-16  Antti Koivisto  <antti@apple.com>
2541
2542         Reviewed by Brady Eidson.
2543
2544         <rdar://problem/6660037> CrashTracer: [USER] 46 crashes in Safari at com.apple.WebCore • WebCore::CachedCSSStyleSheet::addClient + 53
2545         
2546         When revalidating a resource, calling addClient() on one client might cause another to get removed.
2547         
2548         - made CachedResource::addClient() non-virtual and added virtual didAddClient()
2549         - in CachedResource::switchClientsToRevalidatedResource() add all clients to the client set of the revalidated resource first
2550         - check if the client is still in the set before invoking didAddClient() for it
2551         
2552         No test case, I didn't manage to construct one. You need some combination of 304 revalidation, stylesheets that
2553         reference each other via @imports and reloading.
2554
2555         * WebCore.base.exp:
2556         * loader/CachedCSSStyleSheet.cpp:
2557         (WebCore::CachedCSSStyleSheet::didAddClient):
2558         * loader/CachedCSSStyleSheet.h:
2559         * loader/CachedFont.cpp:
2560         (WebCore::CachedFont::didAddClient):
2561         * loader/CachedFont.h:
2562         * loader/CachedImage.cpp:
2563         (WebCore::CachedImage::didAddClient):
2564         * loader/CachedImage.h:
2565         * loader/CachedResource.cpp:
2566         (WebCore::CachedResource::addClient):
2567         (WebCore::CachedResource::addClientToSet):
2568         (WebCore::CachedResource::switchClientsToRevalidatedResource):
2569         * loader/CachedResource.h:
2570         * loader/CachedScript.cpp:
2571         (WebCore::CachedScript::didAddClient):
2572         * loader/CachedScript.h:
2573         * loader/CachedXSLStyleSheet.cpp:
2574         (WebCore::CachedXSLStyleSheet::didAddClient):
2575         * loader/CachedXSLStyleSheet.h:
2576
2577 2009-06-16  Simon Fraser  <simon.fraser@apple.com>
2578
2579         No Review
2580
2581         Fix code inside an #ifdef that draws the video framerate.
2582
2583         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2584         (WebCore::MediaPlayerPrivate::paint):
2585
2586 2009-06-16  Jian Li  <jianli@chromium.org>
2587
2588         Reviewed by Dimitri Glazkov.
2589
2590         Bug 26456: Hook up V8 bindings for Worker's importScripts functionality.
2591         https://bugs.webkit.org/show_bug.cgi?id=26456
2592
2593         * bindings/v8/custom/V8WorkerContextCustom.cpp:
2594         (WebCore::CALLBACK_FUNC_DECL):
2595         * bindings/v8/custom/V8WorkerCustom.cpp: Fixed missing exception code
2596           handling in Worker constructor for V8 bindings.
2597         (WebCore::CALLBACK_FUNC_DECL):
2598
2599 2009-06-16  Brent Fulgham  <bfulgham@webkit.org>
2600
2601         Reviewed by Maciej Stachowiak.
2602
2603         Update of https://bugs.webkit.org/show_bug.cgi?id=26353.
2604         Provide an assignment operator to avoid improper reference
2605         counts on the Cairo font objects.  This brings the Windows
2606         Cairo port in line with the GTK+ port.
2607
2608         * platform/graphics/win/FontPlatformData.h:
2609         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
2610         (WebCore::FontPlatformData::FontPlatformData):
2611         (WebCore::FontPlatformData::operator=):
2612
2613 2009-06-16  Eric Carlson  <eric.carlson@apple.com>
2614
2615         Reviewed by Simon Fraser.
2616
2617         Fix for <rdar://problem/6890126> Theme code should fetch the MediaControlElementType from 
2618         the MediaControlInputElement, rather than computing it again
2619
2620         * html/HTMLMediaElement.cpp:
2621         (WebCore::HTMLMediaElement::percentLoaded): New, utility function for controller implementation.
2622         * html/HTMLMediaElement.h:
2623
2624         * rendering/MediaControlElements.h:
2625         (WebCore::MediaControlInputElement::displayType): New, return m_displayType.
2626
2627         * rendering/RenderMediaControls.cpp:
2628         (WebCore::RenderMediaControls::paintMediaControlsPart): Stop using MediaPlayer object, get button
2629         state from the button itself and get movie state from HTMLMediaElement.
2630
2631         * rendering/RenderThemeMac.mm:
2632         (WebCore::RenderThemeMac::paintMediaMuteButton): Get state from button instead of MediaPlayer.
2633         (WebCore::RenderThemeMac::paintMediaPlayButton): Ditto.
2634
2635 2009-06-16  Jian Li  <jianli@chromium.org>
2636
2637         Reviewed by David Levin.
2638
2639         Bug 26450: Rename values of enum RedirectOriginCheck to make them
2640         clearer.
2641         https://bugs.webkit.org/show_bug.cgi?id=26450
2642
2643         * loader/DocumentThreadableLoader.cpp:
2644         (WebCore::DocumentThreadableLoader::create):
2645         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
2646         (WebCore::DocumentThreadableLoader::willSendRequest):
2647         * loader/DocumentThreadableLoader.h:
2648         * loader/ThreadableLoader.cpp:
2649         (WebCore::ThreadableLoader::create):
2650         (WebCore::ThreadableLoader::loadResourceSynchronously):
2651         * loader/ThreadableLoader.h:
2652         * workers/Worker.cpp:
2653         (WebCore::Worker::Worker):
2654         * workers/WorkerContext.cpp:
2655         (WebCore::WorkerContext::importScripts):
2656         * loader/WorkerThreadableLoader.cpp:
2657         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
2658         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
2659         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
2660         (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
2661         * loader/WorkerThreadableLoader.h:
2662         (WebCore::WorkerThreadableLoader::create):
2663         * workers/WorkerScriptLoader.cpp:
2664         (WebCore::WorkerScriptLoader::loadSynchronously):
2665         (WebCore::WorkerScriptLoader::loadAsynchronously):
2666         * workers/WorkerScriptLoader.h:
2667         (WebCore::WorkerContext::importScripts):
2668         * xml/XMLHttpRequest.cpp:
2669         (WebCore::XMLHttpRequest::loadRequestAsynchronously):
2670
2671 2009-06-16  Tony Chang  <tony@chromium.org>
2672
2673         Reviewed by Darin Fisher.
2674
2675         Fix a UMR in WebCore::BitStack by initializing new memory to 0.
2676         https://bugs.webkit.org/show_bug.cgi?id=26449
2677         No new tests, covered by purify.
2678
2679         * editing/TextIterator.cpp:
2680         (WebCore::BitStack::push):
2681
2682 2009-06-16  Brent Fulgham  <bfulgham@webkit.org>
2683
2684         Reviewed by Xan Lopez.
2685
2686         Test: fast/multicol/columns-shorthand-parsing.html 
2687
2688         Fixes https://bugs.webkit.org/show_bug.cgi?id=26453.
2689         Null Cairo contextwill crash Windows Cairo build.
2690
2691         * platform/graphics/win/GraphicsContextCairoWin.cpp:
2692         (WebCore::GraphicsContextPlatformPrivate::syncContext):
2693           Add a check for null context before attempting to
2694           retrieve the Cairo surface.
2695
2696 2009-06-16  Peter Kasting  <pkasting@google.com>
2697
2698         Reviewed by Xan Lopez.
2699
2700         https://bugs.webkit.org/show_bug.cgi?id=26447
2701         Fix animated GIF breakage in Cairo/wx ports.
2702
2703         * platform/image-decoders/cairo/ImageDecoderCairo.cpp:
2704         (WebCore::RGBA32Buffer::copyBitmapData):
2705         (WebCore::RGBA32Buffer::operator=):
2706         * platform/image-decoders/wx/ImageDecoderWx.cpp:
2707         (WebCore::RGBA32Buffer::copyBitmapData):
2708         (WebCore::RGBA32Buffer::operator=):
2709
2710 2009-06-16  Pierre d'Herbemont  <pdherbemont@apple.com>
2711
2712         Reviewed by John Sullivan
2713         
2714         <rdar://problem/6937882>
2715         
2716         Tweak "time remaining" and "time elapsed" fields in the overlay video controller.
2717
2718         * css/mediaControlsQT.css:
2719
2720 2009-06-16  Jian Li  <jianli@chromium.org>
2721
2722         Reviewed by Adam Barth and David Levin.
2723
2724         Bug 26146: Change to use ThreadableLoader to load the worker script
2725         in order to check URL origin for redirection.
2726         https://bugs.webkit.org/show_bug.cgi?id=26146
2727
2728         Test: http/tests/workers/worker-redirect.html
2729
2730         * GNUmakefile.am:
2731         * WebCore.pro:
2732         * WebCore.vcproj/WebCore.vcproj:
2733         * WebCore.xcodeproj/project.pbxproj:
2734         * workers/Worker.cpp:
2735         (WebCore::Worker::Worker):
2736         (WebCore::Worker::notifyFinished):
2737         * workers/Worker.h:
2738         * workers/WorkerContext.cpp:
2739         (WebCore::WorkerContext::importScripts):
2740         * workers/WorkerImportScriptsClient.cpp: Removed.
2741         * workers/WorkerImportScriptsClient.h: Removed.
2742         * workers/WorkerScriptLoader.cpp: Renamed from workers/WorkerImportScriptsClient.cpp.
2743           This to make it more generic so worker script loading could use it.
2744         (WebCore::WorkerScriptLoader::loadSynchronously):
2745         (WebCore::WorkerScriptLoader::loadAsynchronously):
2746         (WebCore::WorkerScriptLoader::didFinishLoading):
2747         (WebCore::WorkerScriptLoader::didFail):
2748         (WebCore::WorkerScriptLoader::didFailRedirectCheck):
2749         (WebCore::WorkerScriptLoader::didReceiveAuthenticationCancellation):
2750         (WebCore::WorkerScriptLoader::notifyFinished):
2751         * workers/WorkerScriptLoader.h: Renamed from workers/WorkerImportScriptsClient.h.
2752           This to make it more generic so worker script loading could use it.
2753         * workers/WorkerScriptLoaderClient.h: Added.
2754
2755 2009-06-16  Brent Fulgham  <bfulgham@gmail.com>
2756
2757         Reviewed by Darin Adler.
2758
2759         Use consistent GUID comparison functions.
2760         https://bugs.webkit.org/show_bug.cgi?id=26427
2761
2762         * platform/win/WCDataObject.cpp:
2763         (WebCore::WCDataObject::QueryInterface):
2764
2765 2009-06-16  Xan Lopez  <xlopez@igalia.com>
2766
2767         Reviewed by Gustavo Noronha.
2768
2769         Fix compiler warning.
2770
2771         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2772         (webkit_accessible_class_init):
2773
2774 2009-06-16  Xan Lopez  <xlopez@igalia.com>
2775
2776         Reviewed by Gustavo Noronha.
2777
2778         Remove dummy AtkStreamableContent implementation.
2779
2780         It's completely empty, we'll add it back (and conditionally
2781         instead of unconditionally) when it does something.
2782
2783         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
2784         (GetAtkInterfaceTypeFromWAIType):
2785         (getInterfaceMaskFromObject):
2786
2787 == Rolled over to ChangeLog-2009-06-16 ==