002eb369daad8ef0a02d778ba00bca4d87c3ece7
[WebKit-https.git] / WebCore / ChangeLog
1 2009-12-03  Zoltan Horvath  <zoltan@webkit.org>
2
3         Reviewed by Eric Seidel.
4
5         Allow custom memory allocation control for the xml directory in WebCore
6         https://bugs.webkit.org/show_bug.cgi?id=
7
8         Inherits the following class from Noncopyable because it is instantiated 
9         by 'new' and no need to be copyable:
10
11         class/struct name               - instantiated at: WebCore/'location'
12
13         struct XMLHttpRequestStaticData - xml/XMLHttpRequest.cpp:134
14
15         Inherits the following classes from FastAllocBase because these are instantiated by 'new':
16
17         class NodeTest                  - xml/XPathGrammar.y:258
18         class NodeSet                   - xml/XPathValue.cpp:52
19         struct EvaluationContext        - xml/XPathExpressionNode.cpp:40
20
21         * xml/XMLHttpRequest.cpp:
22         * xml/XPathExpressionNode.h:
23         * xml/XPathNodeSet.h:
24         * xml/XPathStep.h:
25
26 2009-12-03  Drew Wilson  <atwilson@chromium.org>
27
28         Reviewed by Adam Barth.
29
30         New History changes do not compile for Chromium/V8
31         https://bugs.webkit.org/show_bug.cgi?id=32148
32
33         Existing tests suffice (just trying to get code to compile).
34
35         * WebCore.gypi:
36         Added V8HistoryCustom.cpp and other missing files.
37         * bindings/v8/custom/V8CustomBinding.h:
38         Added custom handlers for History.pushState()/replaceState().
39         * bindings/v8/custom/V8HistoryCustom.cpp: Added.
40         Added custom handlers for History.pushState()/replaceState().
41         * history/BackForwardListChromium.cpp:
42         (WebCore::BackForwardList::pushStateItem):
43         Stubbed out this routine for now - will implement in the future.
44
45 2009-12-03  Adam Barth  <abarth@webkit.org>
46
47         Reviewed by Eric Seidel.
48
49         OwnPtr<XBLBindingManager> Document::m_bindingManager;
50         https://bugs.webkit.org/show_bug.cgi?id=32147
51
52         The document actually owns the bindingManager.  That's what the code
53         should say.
54
55         * dom/Document.cpp:
56         (WebCore::Document::~Document):
57         * dom/Document.h:
58         (WebCore::Document::bindingManager):
59
60 2009-12-03  Adam Barth  <abarth@webkit.org>
61
62         Reviewed by Eric Seidel.
63
64         OwnPtr<Tokenizer> Document::m_tokenizer;
65         https://bugs.webkit.org/show_bug.cgi?id=32145
66
67         The document actually owns the tokenizer.  That's what the code should say.
68
69         * dom/Document.cpp:
70         (WebCore::Document::removedLastRef):
71         (WebCore::Document::~Document):
72         (WebCore::Document::cancelParsing):
73         (WebCore::Document::implicitOpen):
74         (WebCore::Document::implicitClose):
75         * dom/Document.h:
76         (WebCore::Document::tokenizer):
77
78 2009-12-03  Adam Barth  <abarth@webkit.org>
79
80         Reviewed by Eric Seidel.
81
82         OwnPtr<RenderArena> Document::m_renderArena;
83         https://bugs.webkit.org/show_bug.cgi?id=32146
84
85         The document owns the renderArena.  That's what the code should say.
86
87         * dom/Document.cpp:
88         (WebCore::Document::Document): Also, removed a redundant initialization
89         of the tokenizer that I missed in my previous patch.
90         (WebCore::Document::~Document):
91         (WebCore::Document::attach):
92         (WebCore::Document::detach):
93         * dom/Document.h:
94         (WebCore::Document::renderArena):
95
96 2009-12-03  Drew Wilson  <atwilson@chromium.org>
97
98         Rolling back r51633 because it causes a chromium perf regression.
99
100         * platform/graphics/SimpleFontData.h:
101         * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
102
103 2009-12-03  Adam Barth  <abarth@webkit.org>
104
105         Reviewed by Eric Seidel.
106
107         The code should say that Document owns DocLoader
108         https://bugs.webkit.org/show_bug.cgi?id=32143
109
110         It's the truth.
111
112         * dom/Document.cpp:
113         (WebCore::Document::~Document):
114         * dom/Document.h:
115         (WebCore::Document::docLoader):
116
117 2009-12-03  Chris Fleizach  <cfleizach@apple.com>
118
119         Reviewed by Eric Seidel.
120
121         AX: VO just says "term" on many web sites
122         https://bugs.webkit.org/show_bug.cgi?id=32139
123
124         Test: platform/mac/accessibility/definition-list-term.html
125
126         * accessibility/AccessibilityRenderObject.cpp:
127         (WebCore::AccessibilityRenderObject::accessibilityDescription):
128         * accessibility/mac/AccessibilityObjectWrapper.mm:
129         (-[AccessibilityObjectWrapper subrole]):
130         (-[AccessibilityObjectWrapper roleDescription]):
131
132 2009-12-03  Chris Fleizach  <cfleizach@apple.com>
133
134         Reviewed by Beth Dakin.
135
136         Implement WAI-ARIA scrollbar role and related property aria-orientation
137         https://bugs.webkit.org/show_bug.cgi?id=32126
138
139         Test: accessibility/aria-scrollbar-role.html
140
141         * accessibility/AccessibilityObject.cpp:
142         (WebCore::createARIARoleMap):
143         * accessibility/AccessibilityObject.h:
144         (WebCore::AccessibilityObject::isScrollbar):
145         * accessibility/AccessibilityRenderObject.cpp:
146         (WebCore::AccessibilityRenderObject::valueForRange):
147         (WebCore::AccessibilityRenderObject::orientation):
148         (WebCore::AccessibilityRenderObject::canHaveChildren):
149         * accessibility/AccessibilityRenderObject.h:
150         * accessibility/mac/AccessibilityObjectWrapper.mm:
151         (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
152         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
153         * html/HTMLAttributeNames.in:
154
155 2009-12-03  Dan Bernstein  <mitz@apple.com>
156
157         Reviewed by Darin Adler.
158
159         Fixed <rdar://problem/7401617> Selection painting issue in hardware-
160         accelerated layers
161         which is another part of https://bugs.webkit.org/show_bug.cgi?id=23628
162         Fix selection painting to do container-relative repaints
163
164         Test: fast/repaint/block-selection-gap-in-composited-layer.html
165
166         * rendering/RenderBlock.cpp:
167         (WebCore::RenderBlock::selectionGapRectsForRepaint): Compute and paint
168         gap rects in the coordinate space of the repaint container.
169         * rendering/RenderLayerCompositor.cpp:
170         (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect): Added a
171         FIXME.
172         * rendering/RenderView.cpp:
173         (WebCore::RenderView::setSelection): Map block selection gap rects from
174         the repaint container’s coordinate space to the view’s coordinate space
175         before adding them to the cached selection bounds.
176         (WebCore::RenderView::clearSelection): Changed to use
177         repaintRectangleInViewAndCompositedLayers() so that the selection rect
178         is invalidated in composited layers as well.
179
180 2009-12-03  Jonathan Dixon  <joth@chromium.org>
181
182         Reviewed by Dimitri Glazkov.
183
184         Bug 32066 - Add enable geolocation flag to WebCore::Settings for Chromium
185         https://bugs.webkit.org/show_bug.cgi?id=32066
186
187         Adds geolocationEnabled in Settings for runtime control of geolocaiton features. This defaults to ON
188         as it is intended as a development and testing aid, not a user control. To completely remove geolocation
189         from a given port, the compile time ENABLE_GEOLOCATION should still be used.
190         Adding placeholder GeolocationServiceChromium implementation, as this is required to allows
191         ENABLE_GEOLOCATION to be defined (in turn required for testing), even though this patch does not
192         make that the default just yet.
193
194         * WebCore.gypi:
195         * page/Settings.cpp:
196         (WebCore::Settings::Settings): Add new m_geolocationEnabled flag default value
197         (WebCore::Settings::setGeolocationEnabled): Setter for  m_geolocationEnabled flag
198         * page/Settings.h:
199         (WebCore::Settings::geolocationEnabled):  Add m_geolocationEnabled flag
200         * platform/chromium/GeolocationServiceChromium.cpp: Added.
201         (WebCore::GeolocationServiceChromium::GeolocationServiceChromium): Place holder GeolocationServiceChromium)
202         (WebCore::createGeolocationService): factory function, only required when ENABLED(GEOLOCATION) is true
203
204 2009-12-03  Enrica Casucci  <enrica@apple.com>
205
206         Reviewed by John Sullivan.
207
208         SpinTracer: 349 spins in Mail at WebCore::Editor::advanceToNextMisspelling(bool)
209         <rdar://problem/7198592>
210         https://bugs.webkit.org/show_bug.cgi?id=32129
211
212         Fixed the way the next paragraph is calculated.
213         I've added a repro case in Safari and attached it to the Bugzilla bug.
214
215         * editing/Editor.cpp:
216         (WebCore::findFirstMisspellingOrBadGrammarInRange): Changed the way we move to the
217         next paragraph in the loop.
218
219 2009-12-03  Oliver Hunt  <oliver@apple.com>
220
221         Build fix
222
223         * svg/SVGListTraits.h:
224         (WebCore::):
225
226 2009-12-03  Oliver Hunt  <oliver@apple.com>
227
228         Build fix
229
230         * svg/SVGListTraits.h:
231         (WebCore::):
232
233 2009-12-03  Brady Eidson  <beidson@apple.com>
234
235         No wonder editing WebCore.exp repeatedly while I worked on this patch never seemed to stick.
236
237         Long live our auto-generated overlords that I didn't know about...  
238
239         * WebCore.base.exp:
240
241 2009-12-03  Oliver Hunt  <oliver@apple.com>
242
243         Reviewed by Dan Bernstein.
244
245         REGRESSION (r51627): 3 SVG tests are failing
246         https://bugs.webkit.org/show_bug.cgi?id=32117
247
248         Null checking Items in the SVGList is insufficient as items may
249         be floats, etc so add SVGListTraits::isNull and add appropriate
250         specializations.
251
252         Test: svg/dom/svglist-exception-on-out-bounds-error.html
253
254         * svg/SVGList.h:
255         (WebCore::SVGListTypeOperations::isNull):
256         (WebCore::SVGList::initialize):
257         (WebCore::SVGList::insertItemBefore):
258         (WebCore::SVGList::replaceItem):
259         (WebCore::SVGList::appendItem):
260         * svg/SVGListTraits.h:
261         (WebCore::):
262
263 2009-12-03  Brady Eidson  <beidson@apple.com>
264
265         No review - release build fix.
266
267         * history/HistoryItem.cpp:
268         (WebCore::HistoryItem::documentDetached):
269
270 2009-12-03  Brady Eidson  <beidson@apple.com>
271
272         No review - release build fix.
273
274         * loader/HistoryController.cpp:
275         (WebCore::HistoryController::pushState):
276
277 2009-12-03  Enrica Casucci  <enrica@apple.com>
278
279         Reviewed by Adele Peterson.
280
281         Multiple Undos removes the last posted comment and/or the ones before it.
282         <rdar://problem/6557066>
283         https://bugs.webkit.org/show_bug.cgi?id=32079
284         
285         The fix consists in preventing Undos and Redos to be applied to elements that
286         are no longer editable. We do not attempt to remove the commands from the queue.
287         It is a relatively simple fix that comes with a little extra overhead for the apply
288         and unapply methods where we are now performing the editability check.
289
290         Test: editing/undo/undo-indent-noneditable.html
291
292         * editing/AppendNodeCommand.cpp:
293         (WebCore::AppendNodeCommand::doApply):
294         (WebCore::AppendNodeCommand::doUnapply):
295         * editing/DeleteFromTextNodeCommand.cpp:
296         (WebCore::DeleteFromTextNodeCommand::doApply):
297         (WebCore::DeleteFromTextNodeCommand::doUnapply):
298         * editing/InsertIntoTextNodeCommand.cpp:
299         (WebCore::InsertIntoTextNodeCommand::doApply):
300         (WebCore::InsertIntoTextNodeCommand::doUnapply):
301         * editing/InsertNodeBeforeCommand.cpp:
302         (WebCore::InsertNodeBeforeCommand::doApply):
303         (WebCore::InsertNodeBeforeCommand::doUnapply):
304         * editing/JoinTextNodesCommand.cpp:
305         (WebCore::JoinTextNodesCommand::doApply):
306         (WebCore::JoinTextNodesCommand::doUnapply):
307         * editing/MergeIdenticalElementsCommand.cpp:
308         (WebCore::MergeIdenticalElementsCommand::doApply):
309         (WebCore::MergeIdenticalElementsCommand::doUnapply):
310         * editing/RemoveNodeCommand.cpp:
311         (WebCore::RemoveNodeCommand::doApply):
312         (WebCore::RemoveNodeCommand::doUnapply):
313         * editing/SplitElementCommand.cpp:
314         (WebCore::SplitElementCommand::executeApply):
315         (WebCore::SplitElementCommand::doUnapply):
316         * editing/SplitTextNodeCommand.cpp:
317         (WebCore::SplitTextNodeCommand::doApply):
318         (WebCore::SplitTextNodeCommand::doUnapply):
319         * editing/WrapContentsInDummySpanCommand.cpp:
320         (WebCore::WrapContentsInDummySpanCommand::doUnapply):
321         (WebCore::WrapContentsInDummySpanCommand::doReapply):
322
323 2009-12-03  Brady Eidson  <beidson@apple.com>
324
325         Reviewed by Sam Weinig.
326
327         <rdar://problem/7214236> and http://webkit.org/b/32052 - Implement HTML5 state object history API
328
329         Tests: fast/loader/stateobjects/document-destroyed-navigate-back.html
330                fast/loader/stateobjects/document-destroyed-navigate-back-with-fragment-scroll.html
331                fast/loader/stateobjects/popstate-after-load-complete-addeventlistener.html
332                fast/loader/stateobjects/popstate-after-load-complete-body-attribute.html
333                fast/loader/stateobjects/popstate-after-load-complete-window-attribute.html
334                fast/loader/stateobjects/pushstate-object-types.html
335                fast/loader/stateobjects/pushstate-then-replacestate.html
336                fast/loader/stateobjects/pushstate-with-fragment-urls-and-hashchange.html
337                fast/loader/stateobjects/replacestate-then-pushstate.html
338                http/tests/loading/state-object-security-exception.html
339
340         Derived sources and project file changes:
341         * DerivedSources.cpp:
342         * DerivedSources.make:
343         * GNUmakefile.am
344         * WebCore.pro
345         * WebCore.vcproj/WebCore.vcproj:
346         * WebCore.xcodeproj/project.pbxproj:
347
348         Add the new PopStateEvent:
349         * dom/PopStateEvent.cpp: Added.
350         (WebCore::PopStateEvent::PopStateEvent):
351         (WebCore::PopStateEvent::initPopStateEvent):
352         * dom/PopStateEvent.h: Added.
353         (WebCore::PopStateEvent::create):
354         (WebCore::PopStateEvent::isPopStateEvent):
355         (WebCore::PopStateEvent::state):
356         * dom/PopStateEvent.idl: Added.
357         * bindings/js/JSPopStateEventCustom.cpp: Added.
358         (WebCore::JSPopStateEvent::initPopStateEvent):
359         (WebCore::JSPopStateEvent::state):
360         * bindings/js/JSEventCustom.cpp:
361         (WebCore::toJS):
362         * dom/Event.cpp:
363         (WebCore::Event::isPopStateEvent):
364         * dom/Event.h:
365         * dom/EventNames.h:
366
367         Add the "onpopstate" attribute:
368         * html/HTMLAttributeNames.in:
369         * html/HTMLBodyElement.cpp:
370         (WebCore::HTMLBodyElement::parseMappedAttribute):
371         * html/HTMLBodyElement.idl:
372         * html/HTMLFrameSetElement.cpp:
373         (WebCore::HTMLFrameSetElement::parseMappedAttribute):
374         * html/HTMLFrameSetElement.h:
375         * html/HTMLFrameSetElement.idl:
376         * page/DOMWindow.h:
377         * page/DOMWindow.idl:
378
379         Add pushState and replaceState management to the loader and history machinery:
380         * bindings/js/JSHistoryCustom.cpp:
381         (WebCore::JSHistory::pushState):
382         (WebCore::JSHistory::replaceState):
383         * loader/HistoryController.cpp:
384         (WebCore::HistoryController::updateForSameDocumentNavigation): Augmented from "scrollToAnchor()", combining
385           both the same-document fragment scroll case with the new same-document state object activation case.
386         (WebCore::HistoryController::pushState):
387         (WebCore::HistoryController::replaceState):
388         * loader/HistoryController.h:
389         * history/BackForwardList.cpp:
390         (WebCore::BackForwardList::addItem): Use insertItemAfterCurrent.
391         (WebCore::BackForwardList::insertItemAfterCurrent): Optionally insert the item without clearing the forward
392           list, as pushStateItem might've selectively cleared only certain items, with the bulk of the forward list
393           meant to remain.
394         (WebCore::BackForwardList::pushStateItem): Clear the forward list *only* for the state item's document, then 
395           insert the new item.
396         (WebCore::BackForwardList::removeItem):
397         * history/BackForwardList.h:
398         * page/History.cpp:
399         (WebCore::History::urlForState):
400         (WebCore::History::stateObjectAdded):
401         * page/History.h:
402         * page/History.idl:
403
404         Let HistoryItems and Documents associate with each other, as well as letting HistoryItems contain state objects:
405         * history/HistoryItem.cpp:
406         (WebCore::HistoryItem::HistoryItem):
407         (WebCore::HistoryItem::~HistoryItem):
408         (WebCore::HistoryItem::setStateObject):
409         (WebCore::HistoryItem::setDocument):
410         (WebCore::HistoryItem::documentDetached):
411         * history/HistoryItem.h:
412         (WebCore::HistoryItem::stateObject):
413         (WebCore::HistoryItem::document):
414         * dom/Document.cpp:
415         (WebCore::Document::detach): Notify all back/forward history items owned by this Document that it
416           is going away.
417         (WebCore::Document::registerHistoryItem): Manage the list of back/forward history items this document owns.
418         (WebCore::Document::unregisterHistoryItem): Ditto.
419         * dom/Document.h:
420
421         Add the ability for Documents, DocumentLoaders, and FrameLoaderClients to be notified when a Documents
422         URL changes as the result of pushState(), replaceState(), or a popstate navigation:
423         * dom/Document.cpp:
424         (WebCore::Document::implicitClose): If there's a pending state object, dispatch the popstate event.
425         (WebCore::Document::updateURLForPushOrReplaceState):
426         (WebCore::Document::statePopped): If loading is complete, dispatch the popstate event. Otherwise, set 
427           the pending state object.
428         * loader/DocumentLoader.cpp:
429         (WebCore::DocumentLoader::replaceRequestURLForSameDocumentNavigation):
430         * loader/DocumentLoader.h:
431         * loader/FrameLoaderClient.h:
432         * loader/EmptyClients.h:
433         (WebCore::EmptyFrameLoaderClient::dispatchDidChangeStateObjectForPageForFrame):
434
435         Change handling of "loading a HistoryItem" to distinguish between new-Document navigations and same-Document
436         navigations, combining the old concept of anchor scrolls with the new concept of state object navigations:
437         * loader/FrameLoader.cpp:
438         (WebCore::FrameLoader::loadInSameDocument):
439         (WebCore::FrameLoader::continueFragmentScrollAfterNavigationPolicy):
440         (WebCore::FrameLoader::navigateWithinDocument):
441         (WebCore::FrameLoader::navigateToDifferentDocument):
442         (WebCore::FrameLoader::loadItem):
443         * loader/FrameLoader.h:
444         * page/Page.cpp:
445         (WebCore::Page::goToItem): Changed to allow state object activations to pass through without the load stopping.
446
447 2009-12-03  Pavel Feldman  <pfeldman@chromium.org>
448
449         Not reviewed: chromium build fix.
450         r51621 changed JS bindings only, broke v8's.
451
452         * bindings/v8/ScriptFunctionCall.cpp:
453         (WebCore::ScriptFunctionCall::appendArgument):
454         * bindings/v8/ScriptFunctionCall.h:
455
456 2009-12-03  Dimitri Glazkov  <dglazkov@chromium.org>
457
458         Reviewed by Adam Barth.
459
460         [V8] Attributes and NamedNodeMaps aren't tracked correctly and may be prematurely garbage-collected.
461         https://bugs.webkit.org/show_bug.cgi?id=32094
462
463         Covered by existing test: LayoutTests/fast/dom/Attr/access-after-element-destruction.html
464
465         * bindings/v8/DOMObjectsInclude.h:
466         * bindings/v8/V8DOMWrapper.cpp:
467         (WebCore::V8DOMWrapper::getTemplate):
468         (WebCore::V8DOMWrapper::convertToV8Object):
469         (WebCore::V8DOMWrapper::convertNamedNodeMapToV8Object):
470         * bindings/v8/V8DOMWrapper.h:
471         * bindings/v8/V8GCController.cpp:
472         (WebCore::ObjectGrouperVisitor::visitDOMWrapper):
473         * bindings/v8/custom/V8CustomBinding.h:
474
475 2009-12-03  Pavel Feldman  <pfeldman@chromium.org>
476
477         Reviewed by Timothy Hatcher.
478
479         Chromium: Add support for settings containing ":"
480
481         https://bugs.webkit.org/show_bug.cgi?id=32118
482
483         * inspector/front-end/WatchExpressionsSidebarPane.js:
484         (WebInspector.WatchExpressionsSection):
485
486 2009-12-03  Rafael Antognolli  <antognolli@profusion.mobi>, Kenneth Christiansen <kenneth@webkit.org>
487
488         Reviewed by Simon Fraser.
489
490         repaint events from outside the viewport aren't received
491         https://bugs.webkit.org/show_bug.cgi?id=32081
492
493         When using a tiled backing store for painting, you need to receive
494         event from outside the viewport. Setting the viewport to the size
495         of the contents is not an option if you want to make use of WebCore's
496         infrastructure for drawing scrollbars etc.
497
498         A new property, paintsEntireContents, has been introduced for the
499         above use-case. It is settable, as tiling will be optional for Qt,
500         and for the not yet upstreamed EFL port, there will be two different
501         views, where only one of them are tiled.
502
503         No change in behavior, so no new tests added.
504
505         * page/FrameView.cpp:
506         (WebCore::FrameView::repaintContentRectangle):
507         * platform/ScrollView.cpp:
508         (WebCore::ScrollView::ScrollView):
509         (WebCore::ScrollView::setPaintsEntireContents):
510         (WebCore::ScrollView::wheelEvent):
511         * platform/ScrollView.h:
512         (WebCore::ScrollView::paintsEntireContents):
513
514 2009-11-23  Jeremy Moskovich  <jeremy@chromium.org>
515
516         Reviewed by Eric Seidel.
517
518         Switch Chrome/Mac to use Core Text APIs rather than ATSUI APIs.
519         https://bugs.webkit.org/show_bug.cgi?id=31802
520
521         No test since this is already covered by existing pixel tests.
522
523         * platform/graphics/SimpleFontData.h: Change #ifdef to define getNSFont() on Chrome/Mac .
524         * platform/graphics/mac/ComplexTextControllerCoreText.cpp: Provide forward declarations
525         of Core Text functions that are public on 10.6 but SPI on 10.5.
526
527 2009-12-03  Pavel Feldman  <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
528
529         Reviewed by Timothy Hatcher.
530
531         Web Inspector: Simplify the settings support in inspector controller.
532
533         https://bugs.webkit.org/show_bug.cgi?id=32076
534
535         Test: inspector/settings-set-get.html
536
537         * WebCore.Inspector.exp:
538         * bindings/js/JSInspectorFrontendHostCustom.cpp:
539         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
540         * inspector/InspectorClient.h:
541         * inspector/InspectorController.cpp:
542         (WebCore::InspectorController::~InspectorController):
543         (WebCore::InspectorController::setting):
544         (WebCore::InspectorController::setSetting):
545         (WebCore::InspectorController::setWindowVisible):
546         (WebCore::InspectorController::attachWindow):
547         (WebCore::InspectorController::setAttachedWindowHeight):
548         (WebCore::InspectorController::storeLastActivePanel):
549         (WebCore::InspectorController::scriptObjectReady):
550         (WebCore::InspectorController::showWindow):
551         (WebCore::InspectorController::enableResourceTracking):
552         (WebCore::InspectorController::disableResourceTracking):
553         (WebCore::InspectorController::ensureResourceTrackingSettingsLoaded):
554         (WebCore::InspectorController::enableProfiler):
555         (WebCore::InspectorController::disableProfiler):
556         (WebCore::InspectorController::enableDebuggerFromFrontend):
557         (WebCore::InspectorController::disableDebugger):
558         * inspector/InspectorController.h:
559         * inspector/InspectorFrontendHost.cpp:
560         (WebCore::InspectorFrontendHost::setting):
561         (WebCore::InspectorFrontendHost::setSetting):
562         * inspector/InspectorFrontendHost.h:
563         * inspector/InspectorFrontendHost.idl:
564         * loader/EmptyClients.h:
565         (WebCore::EmptyInspectorClient::populateSetting):
566         (WebCore::EmptyInspectorClient::storeSetting):
567
568 2009-12-03  Ben Murdoch  <benm@google.com>
569
570         Reviewed by Brady Eidson.
571
572         [Android] notifyHistoryItemChanged() should pass a pointer to the HistoryItem that changed.
573         https://bugs.webkit.org/show_bug.cgi?id=31915
574
575         No change in functionality so no new tests required.
576
577         * history/HistoryItem.cpp:
578         (WebCore::defaultNotifyHistoryItemChanged): Update this function to pass the HistoryItem that is being changed.
579         (WebCore::HistoryItem::setAlternateTitle): Update call to notifyHistoryItemChanged to include the new parameter.
580         (WebCore::HistoryItem::setURLString): ditto.
581         (WebCore::HistoryItem::setOriginalURLString): ditto.
582         (WebCore::HistoryItem::setReferrer): ditto.
583         (WebCore::HistoryItem::setTitle): ditto.
584         (WebCore::HistoryItem::setTarget): ditto.
585         (WebCore::HistoryItem::setDocumentState): On Android, add a call to notifyHistoryItemChanged. See bug for a discussion of why this is needed.
586         (WebCore::HistoryItem::clearDocumentState): ditto.
587         (WebCore::HistoryItem::setIsTargetItem): ditto.
588         (WebCore::HistoryItem::addChildItem): ditto.
589         (WebCore::HistoryItem::setFormInfoFromRequest): ditto.
590         * history/HistoryItem.h: Update signature of notifyHistoryItemChanged.
591
592 2009-12-03  Ben Murdoch  <benm@google.com>
593
594         Reviewed by Brady Eidson.
595
596         [Android] The FrameLoaderClient is unaware of BackForwardList changes.
597         https://bugs.webkit.org/show_bug.cgi?id=31914
598
599         This change adds three new methods on the FrameLoaderClient interface to receive notifications when the BackForwardList changes.
600
601         No new tests required. Functionality on all platforms upstream remains the same. Android is the first platform to make use of these callbacks.
602
603         * history/BackForwardList.cpp:
604         (WebCore::BackForwardList::addItem): Execute the callback.
605         (WebCore::BackForwardList::goBack): ditto.
606         (WebCore::BackForwardList::goForward): ditto.
607         (WebCore::BackForwardList::goToItem): ditto.
608         (WebCore::BackForwardList::setCapacity): dito.
609         * loader/EmptyClients.h:
610         (WebCore::EmptyFrameLoaderClient::dispatchDidAddBackForwardItem): Add an empty implementation for the callback that does nothing.
611         (WebCore::EmptyFrameLoaderClient::dispatchDidRemoveBackForwardItem): ditto.
612         (WebCore::EmptyFrameLoaderClient::dispatchDidChangeBackForwardIndex): ditto.
613         * loader/FrameLoaderClient.h:
614
615 2009-12-03  Ben Murdoch  <benm@google.com>
616
617         Reviewed by Brady Eidson.
618
619         [Android] Upstream WebCore/history/android: Require some platform specific state attached to HistoryItem.
620         https://bugs.webkit.org/show_bug.cgi?id=31913
621
622         Android stores information such as the zoom scale factor and bridge back to the Java counterpart with HistoryItem.
623
624         No new tests required as this is Android specific code.
625
626         * history/HistoryItem.h: Add Android specific member data to HistoryItem.
627         * history/android: Added.
628         * history/android/AndroidWebHistoryBridge.h: Added.
629         * history/android/HistoryItemAndroid.cpp: Added, provides implementation for Android specific member functions in HistoryItem.
630         (WebCore::HistoryItem::bridge): Added.
631         (WebCore::HistoryItem::setBridge): Added.
632
633 2009-12-03  Oliver Hunt  <oliver@apple.com>
634
635         Reviewed by Maciej Stachowiak.
636
637         NULL ptr in SVGPathSegList::getPathSegAtLength()
638         https://bugs.webkit.org/show_bug.cgi?id=30313
639
640         Add exception checks to SVGPathSegList's implementation to catch (and propagate) exceptions.
641         Add null checks to SVGList's content manipulation functions to prevent
642         null values from entering the list in the first place.
643
644         Test: svg/dom/svgpath-out-of-bounds-getPathSeg.html
645
646         * svg/SVGList.h:
647         (WebCore::SVGList::initialize):
648         (WebCore::SVGList::insertItemBefore):
649         (WebCore::SVGList::replaceItem):
650         (WebCore::SVGList::appendItem):
651         * svg/SVGPathElement.cpp:
652         (WebCore::SVGPathElement::getPathSegAtLength):
653         * svg/SVGPathElement.h:
654         * svg/SVGPathElement.idl:
655         * svg/SVGPathSegList.cpp:
656         (WebCore::SVGPathSegList::getPathSegAtLength):
657         (WebCore::SVGPathSegList::toPathData):
658         (WebCore::SVGPathSegList::createAnimated):
659         * svg/SVGPathSegList.h:
660
661 2009-12-02  Yusuke Sato  <yusukes@chromium.org>
662
663         Reviewed by Eric Seidel.
664
665         Sanitize web fonts using the OTS library 
666         https://bugs.webkit.org/show_bug.cgi?id=31106
667
668         Add support for OpenType sanitizer (OTS). It parses OpenType files (from @font-face)
669         and attempts to validate and sanitize them. We hope this reduces the attack surface
670         of the system font libraries.
671
672         * WebCore.gyp/WebCore.gyp: Added dependency to (chromium_src_dir)/third_party/ots/ library.
673         * WebCore.gypi: Added new files below.
674         * WebCore.xcodeproj/project.pbxproj: Ditto.
675         * platform/graphics/chromium/FontCustomPlatformData.cpp: Validate and transcode a web font.
676         (WebCore::createFontCustomPlatformData):
677         * platform/graphics/mac/FontCustomPlatformData.cpp: Ditto.
678         (WebCore::createFontCustomPlatformData):
679         * platform/graphics/opentype/OpenTypeSanitizer.cpp: Added.
680         (WebCore::OpenTypeSanitizer::sanitize):
681         * platform/graphics/opentype/OpenTypeSanitizer.h: Added.
682         (WebCore::OpenTypeSanitizer::OpenTypeSanitizer):
683
684 2009-12-02  Oliver Hunt  <oliver@apple.com>
685
686         Reviewed by Sam Weinig.
687
688         Web Inspector frontend heap allocates ScriptFunctionCall which is unsafe
689         https://bugs.webkit.org/show_bug.cgi?id=32098
690
691         Fix is simply to make the ScriptFunctionCall stack allocated as nature intended.
692         Doing this required adding an appendArgument(char*) to ScriptFunctionCall so
693         that an explicit String cast would not be necessary.
694
695         To prevent something like this happening again in future i've added private
696         operator new implementations to ScriptFunctionCall making this type of mistake
697         produce errors when compiling.
698
699         Test case: Inspector tests now pass with GC on every alloc enabled.
700
701         * bindings/js/ScriptFunctionCall.cpp:
702         (WebCore::ScriptFunctionCall::appendArgument):
703         * bindings/js/ScriptFunctionCall.h:
704         (WebCore::ScriptFunctionCall::operator new):
705         (WebCore::ScriptFunctionCall::operator new[]):
706         * inspector/InspectorFrontend.cpp:
707         (WebCore::InspectorFrontend::addConsoleMessage):
708         (WebCore::InspectorFrontend::updateConsoleMessageRepeatCount):
709         (WebCore::InspectorFrontend::addResource):
710         (WebCore::InspectorFrontend::updateResource):
711         (WebCore::InspectorFrontend::removeResource):
712         (WebCore::InspectorFrontend::updateFocusedNode):
713         (WebCore::InspectorFrontend::setAttachedWindow):
714         (WebCore::InspectorFrontend::addRecordToTimeline):
715         (WebCore::InspectorFrontend::parsedScriptSource):
716         (WebCore::InspectorFrontend::failedToParseScriptSource):
717         (WebCore::InspectorFrontend::addProfileHeader):
718         (WebCore::InspectorFrontend::setRecordingProfile):
719         (WebCore::InspectorFrontend::didGetProfileHeaders):
720         (WebCore::InspectorFrontend::didGetProfile):
721         (WebCore::InspectorFrontend::pausedScript):
722         (WebCore::InspectorFrontend::setDocument):
723         (WebCore::InspectorFrontend::setDetachedRoot):
724         (WebCore::InspectorFrontend::setChildNodes):
725         (WebCore::InspectorFrontend::childNodeCountUpdated):
726         (WebCore::InspectorFrontend::childNodeInserted):
727         (WebCore::InspectorFrontend::childNodeRemoved):
728         (WebCore::InspectorFrontend::attributesUpdated):
729         (WebCore::InspectorFrontend::didRemoveNode):
730         (WebCore::InspectorFrontend::didGetChildNodes):
731         (WebCore::InspectorFrontend::didApplyDomChange):
732         (WebCore::InspectorFrontend::didGetEventListenersForNode):
733         (WebCore::InspectorFrontend::didGetCookies):
734         (WebCore::InspectorFrontend::didDispatchOnInjectedScript):
735         (WebCore::InspectorFrontend::addDatabase):
736         (WebCore::InspectorFrontend::selectDatabase):
737         (WebCore::InspectorFrontend::didGetDatabaseTableNames):
738         (WebCore::InspectorFrontend::addDOMStorage):
739         (WebCore::InspectorFrontend::selectDOMStorage):
740         (WebCore::InspectorFrontend::didGetDOMStorageEntries):
741         (WebCore::InspectorFrontend::didSetDOMStorageItem):
742         (WebCore::InspectorFrontend::didRemoveDOMStorageItem):
743         (WebCore::InspectorFrontend::updateDOMStorage):
744         (WebCore::InspectorFrontend::addNodesToSearchResult):
745         (WebCore::InspectorFrontend::evaluateForTestInFrontend):
746         * inspector/InspectorFrontend.h:
747
748 2009-12-02  Dave Hyatt  <hyatt@apple.com>
749
750         Reviewed by Darin Adler.
751
752         https://bugs.webkit.org/show_bug.cgi?id=32072, clean up invalid @-rule error handling so that we
753         pass more CSS test suite stuff.  Make the grammar stop enforcing the ordering of @namespace vs.
754         @variables vs. @import.  Just let the parser handle that instead.  This simplifies the grammar and
755         makes error handling deal with more cases correctly.
756
757         Added fast/css/namespaces/namespaces-invalid-at-rules.xml
758
759         * css/CSSGrammar.y:
760         * css/CSSParser.cpp:
761         (WebCore::CSSParser::CSSParser):
762         (WebCore::CSSParser::parseRule):
763         (WebCore::CSSParser::createCharsetRule):
764         (WebCore::CSSParser::createImportRule):
765         (WebCore::CSSParser::createMediaRule):
766         (WebCore::CSSParser::createKeyframesRule):
767         (WebCore::CSSParser::createStyleRule):
768         (WebCore::CSSParser::createFontFaceRule):
769         (WebCore::CSSParser::addNamespace):
770         (WebCore::CSSParser::createVariablesRule):
771         * css/CSSParser.h:
772
773 2009-12-02  Yusuke Sato  <yusukes@chromium.org>
774
775         Reviewed by Dan Bernstein.
776
777         Safari/Chromium for Windows fails to load CJK WebFonts
778         https://bugs.webkit.org/show_bug.cgi?id=31804
779         
780         * platform/graphics/opentype/OpenTypeUtilities.cpp:
781         (WebCore::renameAndActivateFont): Load a remote font even if the font has 2 or more faces.
782
783 2009-12-02  Avi Drissman  <avi@chromium.org>
784
785         Reviewed by Darin Fisher.
786
787         Chromium: Need tickmarks in scrollbar
788         https://bugs.webkit.org/show_bug.cgi?id=32069
789
790         * WebCore.gyp/WebCore.gyp:
791         * WebCore.gypi:
792         * platform/chromium/ScrollbarThemeChromiumMac.h: Added.
793         * platform/chromium/ScrollbarThemeChromiumMac.mm: Added.
794
795 2009-11-13  Timothy Hatcher  <timothy@apple.com>
796
797         Expose a function to set the value of an input element on behalf of the user.
798         This function will dispatch the change event so the page is notified when autofill
799         happens. Also dispatch a change event when a select element is changed by autofill.
800
801         <rdar://problem/6760590> Would like a way to detect a login form AutoFill from JavaScript
802
803         Reviewed by Darin Adler.
804
805         * WebCore.xcodeproj/project.pbxproj: Added the DOMHTMLInputElementPrivate.h header.
806         * bindings/objc/DOMHTML.mm:
807         (-[DOMHTMLSelectElement _activateItemAtIndex:]): Call setSelectedIndexByUser instead so
808         a change event is fired. This method is called by Safari autofill.
809         * dom/Document.cpp:
810         (WebCore::Document::setFocusedNode): Use dispatchFormControlChangeEvent instead
811         of dispatching the change event directly to be consistent.
812         * html/HTMLFormControlElement.cpp:
813         (WebCore::HTMLInputElement::setValueForUser): Added. Calls setValue with the sendChangeEvent
814         (WebCore::HTMLInputElement::setValue): Added the optional sendChangeEvent argument. Mimics setChecked.
815         * html/HTMLInputElement.h:
816         * html/HTMLInputElement.idl: Added setValueForUser for non-JS languages.
817         * html/InputElement.h: Added setValueForUser.
818
819 2009-12-02  Pavel Feldman  <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
820
821         Reviewed by Timothy Hatcher.
822
823         Web Inspector: DOM tree selection disappears upon page refresh.
824
825         https://bugs.webkit.org/show_bug.cgi?id=31142
826
827         Test: inspector/elements-panel-selection-on-refresh.html
828
829         * inspector/InjectedScriptHost.cpp:
830         (WebCore::InjectedScriptHost::pushNodeByPathToFrontend):
831         * inspector/InjectedScriptHost.h:
832         * inspector/InjectedScriptHost.idl:
833         * inspector/InspectorBackend.h:
834         * inspector/InspectorController.cpp:
835         (WebCore::InspectorController::close):
836         (WebCore::InspectorController::releaseDOMAgent):
837         (WebCore::InspectorController::resetScriptObjects):
838         * inspector/InspectorDOMAgent.cpp:
839         (WebCore::InspectorDOMAgent::~InspectorDOMAgent):
840         (WebCore::InspectorDOMAgent::reset):
841         (WebCore::InspectorDOMAgent::setDocument):
842         (WebCore::InspectorDOMAgent::pushDocumentToFrontend):
843         (WebCore::InspectorDOMAgent::nodeForPath):
844         (WebCore::InspectorDOMAgent::pushNodePathToFrontend):
845         * inspector/InspectorDOMAgent.h:
846         * inspector/front-end/DOMAgent.js:
847         (WebInspector.DOMNode.prototype._renumber):
848         (WebInspector.DOMAgent.prototype._setDocument):
849         * inspector/front-end/ElementsPanel.js:
850         (WebInspector.ElementsPanel.prototype.reset):
851         (WebInspector.ElementsPanel.prototype.setDocument.selectDefaultNode):
852         (WebInspector.ElementsPanel.prototype.setDocument.selectLastSelectedNode):
853         (WebInspector.ElementsPanel.prototype.setDocument):
854         * inspector/front-end/InjectedScript.js:
855         (InjectedScript.pushNodeByPathToFrontend):
856         * inspector/front-end/InjectedScriptAccess.js:
857
858 2009-12-01  Dave Hyatt  <hyatt@apple.com>
859
860         Reviewed by Dan Bernstein.
861
862         https://bugs.webkit.org/show_bug.cgi?id=32045, make sure escape sequences work with
863         all the @-rules we support.  When escape sequences are present, the lexical scanner
864         just returns a generic token name: ATKEYWORD.  We have to process the escape sequences
865         and then recheck against the rules we support with the final processed name.  If we
866         find a match, we mutate the token value to the appropriate rule name token, e.g.,
867         NAMESPACE_SYM.
868
869         Added fast/css/namespaces/namespaces-escapes.xml
870
871         * css/CSSParser.cpp:
872         (WebCore::CSSParser::lex):
873         (WebCore::CSSParser::recheckAtKeyword):
874         (WebCore::CSSParser::text):
875         * css/CSSParser.h:
876
877 2009-12-02  Anton Muhin  <antonm@chromium.org>
878
879         Reviewed by Adam Barth.:w
880
881         Allow to skip thread checks when accessing DOMDataStore for processes
882         which run V8 in single thread mode.
883         https://bugs.webkit.org/show_bug.cgi?id=31877
884
885         Should be covered by buildbots.
886
887         * bindings/v8/V8DOMMap.cpp:
888         (WebCore::getDOMDataStore):
889         (WebCore::enableFasterDOMStoreAccess):
890         (WebCore::getDOMNodeMap):
891         (WebCore::getDOMObjectMap):
892         (WebCore::getActiveDOMObjectMap):
893         (WebCore::getDOMSVGElementInstanceMap):
894         (WebCore::getDOMSVGObjectWithContextMap):
895         * bindings/v8/V8DOMMap.h:
896
897 2009-12-02  Yury Semikhatsky  <yurys@chromium.org>
898
899         Reviewed by Pavel Feldman.
900
901         Code clean up: remove ScriptObjectQuarantine.* as a whole.
902
903         https://bugs.webkit.org/show_bug.cgi?id=32060
904
905         * GNUmakefile.am:
906         * WebCore.gypi:
907         * WebCore.pro:
908         * WebCore.vcproj/WebCore.vcproj:
909         * WebCore.xcodeproj/project.pbxproj:
910         * WebCoreSources.bkl:
911         * bindings/js/JSBindingsAllInOne.cpp:
912         * bindings/js/ScriptObjectQuarantine.cpp: Removed.
913         * bindings/js/ScriptObjectQuarantine.h: Removed.
914         * bindings/js/ScriptValue.cpp:
915         (WebCore::ScriptValue::quarantineValue):
916         * bindings/js/ScriptValue.h:
917         * bindings/v8/ScriptObjectQuarantine.cpp: Removed.
918         * bindings/v8/ScriptObjectQuarantine.h: Removed.
919         * bindings/v8/ScriptValue.h:
920         (WebCore::ScriptValue::quarantineValue):
921         * inspector/ConsoleMessage.cpp:
922         (WebCore::ConsoleMessage::ConsoleMessage):
923         * inspector/InspectorController.cpp:
924         * inspector/InspectorDatabaseResource.cpp:
925         (WebCore::InspectorDatabaseResource::bind):
926         * inspector/InspectorFrontend.cpp:
927
928 2009-12-02  Fumitoshi Ukai  <ukai@chromium.org>
929
930         Reviewed by Alexey Proskuryakov.
931
932         WebSocket handshake check query component of URL
933         https://bugs.webkit.org/show_bug.cgi?id=31617
934
935         Tests: websocket/tests/url-with-credential.html
936                websocket/tests/url-with-empty-query.html
937                websocket/tests/url-with-fragment.html
938                websocket/tests/url-with-query-for-no-query.html
939                websocket/tests/url-with-query.html
940
941         * platform/KURLGoogle.cpp:
942         (WebCore::KURL::query): returns a null if query is not specified and returns an empty if query is specified but empty.
943         * websockets/WebSocketHandshake.cpp:
944         (WebCore::resourceName): added. add query component to path if specified.
945         (WebCore::WebSocketHandshake::clientLocation):
946         (WebCore::WebSocketHandshake::clientHandshakeMessage):
947
948 2009-12-01  David Levin  <levin@chromium.org>
949
950         Reviewed by Eric Seidel.
951
952         Incorrect code in WebGLRenderingContext.cpp
953         https://bugs.webkit.org/show_bug.cgi?id=32046
954
955         Fix incorrect code that happened to work. != has higher precendence than &.
956         The simplest fix is to remove the "!= 0" which violates WebKit style
957         guidelines anyway.
958
959         Also added periods to few comments in the same function.
960
961         * html/canvas/WebGLRenderingContext.cpp:
962         (WebCore::WebGLRenderingContext::validateIndexArray):
963
964 2009-12-01  Kent Tamura  <tkent@chromium.org>
965
966         Reviewed by Darin Adler.
967
968         Change [Reflect] to [ConvertNullToNullString, Reflect] for min, max,
969         pattern and step attributes of HTMLInputElement.
970         https://bugs.webkit.org/show_bug.cgi?id=31708
971
972         * html/HTMLInputElement.idl:
973
974 2009-12-01  Chris Fleizach  <cfleizach@apple.com>
975
976         Reviewed by Darin Adler.
977
978         WAI-ARIA: implement support for ARIA drag and drop
979         https://bugs.webkit.org/show_bug.cgi?id=32007
980
981         Test: platform/mac/accessibility/aria-drag-drop.html
982
983         * accessibility/AccessibilityObject.h:
984         (WebCore::AccessibilityObject::supportsARIADropping):
985         (WebCore::AccessibilityObject::supportsARIADragging):
986         (WebCore::AccessibilityObject::isARIAGrabbed):
987         (WebCore::AccessibilityObject::setARIAGrabbed):
988         (WebCore::AccessibilityObject::determineARIADropEffects):
989         * accessibility/AccessibilityRenderObject.cpp:
990         (WebCore::AccessibilityRenderObject::supportsARIADropping):
991         (WebCore::AccessibilityRenderObject::supportsARIADragging):
992         (WebCore::AccessibilityRenderObject::isARIAGrabbed):
993         (WebCore::AccessibilityRenderObject::setARIAGrabbed):
994         (WebCore::AccessibilityRenderObject::determineARIADropEffects):
995         * accessibility/AccessibilityRenderObject.h:
996         * accessibility/mac/AccessibilityObjectWrapper.mm:
997         (-[AccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
998         (-[AccessibilityObjectWrapper accessibilityAttributeValue:]):
999         (-[AccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
1000         (-[AccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
1001         * html/HTMLAttributeNames.in:
1002
1003 2009-12-01  Adam Barth  <abarth@webkit.org>
1004
1005         https://bugs.webkit.org/show_bug.cgi?id=21288
1006
1007         Unreviewed port of @sandbox to V8.
1008
1009         * bindings/v8/ScriptController.cpp:
1010         (WebCore::ScriptController::isEnabled):
1011         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1012         (WebCore::createWindow):
1013
1014 2009-12-01  Patrik Persson  <patrik.j.persson@ericsson.com>
1015
1016         Reviewed by Darin Adler.
1017
1018         Implement HTML5 sandbox attribute for iframes.
1019         http://www.w3.org/TR/html5/text-level-semantics.html#attr-iframe-sandbox
1020         https://bugs.webkit.org/show_bug.cgi?id=21288
1021
1022         Tests: fast/frames/sandboxed-iframe-attribute-parsing.html
1023                fast/frames/sandboxed-iframe-forms.html
1024                fast/frames/sandboxed-iframe-navigation-allowed.html
1025                fast/frames/sandboxed-iframe-navigation-parent.html
1026                fast/frames/sandboxed-iframe-navigation-targetlink.html
1027                fast/frames/sandboxed-iframe-navigation-windowopen.html
1028                fast/frames/sandboxed-iframe-plugins.html
1029                fast/frames/sandboxed-iframe-scripting.html
1030                fast/frames/sandboxed-iframe-storage.html
1031                http/tests/security/sandboxed-iframe-document-cookie.html
1032                http/tests/security/sandboxed-iframe-modify-self.html
1033                http/tests/security/xss-DENIED-sandboxed-iframe.html
1034                http/tests/xmlhttprequest/access-control-sandboxed-iframe-allow.html
1035                http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-without-wildcard.html
1036                http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied.html
1037
1038         * bindings/js/JSDOMWindowCustom.cpp: sandboxing navigation
1039         (WebCore::createWindow):
1040         * bindings/js/ScriptController.cpp: sandboxing scripts
1041         (WebCore::ScriptController::isEnabled):
1042         * dom/Document.cpp:
1043         (WebCore::Document::processHttpEquiv):
1044         (WebCore::Document::cookie): raise exception when accessed from sandbox
1045         (WebCore::Document::setCookie): raise exception when accessed from sandbox
1046         (WebCore::Document::initSecurityContext): updae sandbox status
1047         (WebCore::Document::updateSandboxFlags):
1048         * dom/Document.h:
1049         * dom/Document.idl:
1050         * html/HTMLAppletElement.cpp: sandboxing applets
1051         (WebCore::HTMLAppletElement::createRenderer):
1052         (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
1053         (WebCore::HTMLAppletElement::canEmbedJava):
1054         * html/HTMLAppletElement.h:
1055         * html/HTMLAttributeNames.in:
1056         * html/HTMLFrameOwnerElement.cpp: management of sandbox flags as stated in attribute
1057         (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
1058         (WebCore::HTMLFrameOwnerElement::setSandboxFlags):
1059         * html/HTMLFrameOwnerElement.h:
1060         (WebCore::HTMLFrameOwnerElement::sandboxFlags):
1061         * html/HTMLIFrameElement.cpp: sandbox attribute parsing
1062         (WebCore::parseSandboxAttribute):
1063         (WebCore::HTMLIFrameElement::parseMappedAttribute):
1064         * html/HTMLIFrameElement.idl:
1065         * inspector/InspectorController.cpp:
1066         (WebCore::InspectorController::getCookies):
1067         * loader/CrossOriginAccessControl.cpp:
1068         (WebCore::passesAccessControlCheck):
1069         * loader/FrameLoader.cpp:
1070         (WebCore::FrameLoader::FrameLoader):
1071         (WebCore::FrameLoader::init):
1072         (WebCore::FrameLoader::submitForm): sandboxing forms
1073         (WebCore::FrameLoader::requestObject): sandboxing plugins
1074         (WebCore::FrameLoader::shouldAllowNavigation): sandboxing navigation
1075         (WebCore::FrameLoader::updateSandboxFlags): propagation of sandbox flags
1076         * loader/FrameLoader.h:
1077         (WebCore::FrameLoader::ownerElementSandboxFlagsChanged):
1078         (WebCore::FrameLoader::isSandboxed):
1079         (WebCore::FrameLoader::sandboxFlags):
1080         * loader/FrameLoaderTypes.h:
1081         (WebCore::):
1082         * page/DOMWindow.cpp: disable storage and databases in sandboxed frames
1083         (WebCore::DOMWindow::sessionStorage):
1084         (WebCore::DOMWindow::localStorage):
1085         (WebCore::DOMWindow::openDatabase):
1086         * page/SecurityOrigin.cpp: added sandboxing status
1087         (WebCore::SecurityOrigin::SecurityOrigin):
1088         (WebCore::SecurityOrigin::canAccess):
1089         (WebCore::SecurityOrigin::canRequest):
1090         (WebCore::SecurityOrigin::toString):
1091         * page/SecurityOrigin.h:
1092         (WebCore::SecurityOrigin::setSandboxFlags):
1093         (WebCore::SecurityOrigin::isSandboxed):
1094         (WebCore::SecurityOrigin::canAccessDatabase):
1095         (WebCore::SecurityOrigin::canAccessStorage):
1096         * websockets/WebSocketChannel.cpp:
1097         (WebCore::WebSocketChannel::didReceiveData):
1098
1099 2009-12-01  Chris Fleizach  <cfleizach@apple.com>
1100
1101         Reviewed by David Kilzer.
1102
1103         ARIA: support a way to create a static text object
1104         https://bugs.webkit.org/show_bug.cgi?id=32030
1105
1106         Test: accessibility/aria-text-role.html
1107
1108         * accessibility/AccessibilityObject.cpp:
1109         (WebCore::createARIARoleMap):
1110         * accessibility/AccessibilityRenderObject.cpp:
1111         (WebCore::AccessibilityRenderObject::stringValue):
1112         (WebCore::AccessibilityRenderObject::isDescendantOfBarrenParent):
1113         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1114         (WebCore::AccessibilityRenderObject::text):
1115         * accessibility/AccessibilityRenderObject.h:
1116
1117 2009-12-01  Oliver Hunt  <oliver@apple.com>
1118
1119         Reviewed by Maciej Stachowiak.
1120
1121         Inspector crashes when collecting on every allocation
1122         https://bugs.webkit.org/show_bug.cgi?id=32044
1123
1124         The crash is caused by the prototype wrapper object getting collected
1125         when allocating the object that is going to use it as a prototype.
1126         Because the only reference to the prototype wrapper is through the
1127         new object's Structure it does not get marked automatically.
1128
1129         * bindings/js/JSInspectedObjectWrapper.cpp:
1130         (WebCore::JSInspectedObjectWrapper::wrap):
1131         * bindings/js/JSInspectorCallbackWrapper.cpp:
1132         (WebCore::JSInspectorCallbackWrapper::wrap):
1133
1134 2009-12-01  Nikolas Zimmermann  <nzimmermann@rim.com>
1135
1136         Reviewed by Simon Fraser.
1137
1138         Add SVG animation test framework with 'snapshot' functionality
1139         https://bugs.webkit.org/show_bug.cgi?id=31897
1140
1141         Add 'sampleSVGAnimationForElementAtTime' method to the LayoutTestController,
1142         for the use within the new SVG animation test framework (LayoutTests/svg/animations/)
1143
1144         layoutTestController.sampleAnimationAtTime(<svg animation id>, <absolute time>, <svg element id>);
1145         to sample a svg animateMotion/animateColor/animate/set element at certain times.
1146
1147         After the desired SVG animation starts and calling the method above, it's immediately forwarded to
1148         the desired sampling time. After JS returns from the 'sampleSVGAnimationForElementAtTime' method
1149         a callback is fired used to sample the animation value at the target time. It's modelled similar
1150         to the CSS animation/transition testing framework, inspired by
1151         LayoutTests/animations/animation-test-helpers.js.
1152
1153         Though it has been extended to integrate within the fast/js/js-test-* framework, that's used for
1154         the SVG dynamic-updates tests, to simplify test creation, by utilizing script-tests/* only.
1155
1156         Adding a simple testcase testing the DRT methods, it will soon be extended to test animVal/baseVal
1157         interaction, while animating.
1158
1159         Test: svg/animations/animVal-basics.html
1160
1161         * WebCore.base.exp:
1162         * WebCore.xcodeproj/project.pbxproj:
1163         * svg/SVGDocumentExtensions.cpp:
1164         (WebCore::SVGDocumentExtensions::sampleAnimationAtTime):
1165         * svg/SVGDocumentExtensions.h:
1166         * svg/animation/SMILTimeContainer.cpp:
1167         (WebCore::SMILTimeContainer::SMILTimeContainer):
1168         (WebCore::SMILTimeContainer::sampleAnimationAtTime):
1169         (WebCore::SMILTimeContainer::updateAnimations):
1170         * svg/animation/SMILTimeContainer.h:
1171
1172 2009-12-01  Jens Alfke  <snej@chromium.org>
1173
1174         Reviewed by Darin Adler.
1175
1176         Add convenience methods to Element and QualifiedName that take
1177         char* instead of AtomicString, in preparation for removing the
1178         implicit conversion between the two types (30187).
1179         https://bugs.webkit.org/show_bug.cgi?id=31749
1180
1181         * dom/Element.cpp:
1182         (WebCore::Element::setCStringAttribute):  Equivalent to setAttribute.
1183         * dom/Element.h:
1184         * dom/QualifiedName.cpp:
1185         (WebCore::QualifiedName::init):  Shared impl of both constructors
1186         (WebCore::QualifiedName::QualifiedName):  New c'tor taking char*.
1187         * dom/QualifiedName.h:
1188         * platform/network/HTTPHeaderMap.cpp:
1189         (WebCore::CaseFoldingCStringTranslator):  Enables lookup by C string
1190         (WebCore::HTTPHeaderMap::get):  New variant that takes C string
1191         (WebCore::HTTPHeaderMap::contains):  New variant that takes C string
1192         (WebCore::HTTPHeaderMap::add):  New variant that takes C string
1193         * platform/network/HTTPHeaderMap.h:
1194         (WebCore::HTTPHeaderMap::get):
1195         (WebCore::HTTPHeaderMap::add):
1196         * platform/network/ResourceRequestBase.cpp:
1197         (WebCore::ResourceRequestBase::httpHeaderField):  New variant that takes C string
1198         * platform/network/ResourceRequestBase.h:
1199         (WebCore::ResourceRequestBase::setHTTPHeaderField):  Use symbolic names for headers
1200         * platform/network/ResourceResponseBase.cpp:
1201         (WebCore::ResourceResponseBase::httpHeaderField):  New variant that takes C string
1202         * platform/network/ResourceResponseBase.h:
1203
1204 2009-12-01  Alexey Proskuryakov  <ap@apple.com>
1205
1206         More Windows build fix.
1207
1208         * platform/network/cf/CredentialStorageCFNet.cpp:
1209         (WebCore::CredentialStorage::getFromPersistentStorage):
1210
1211 2009-12-01  Alexey Proskuryakov  <ap@apple.com>
1212
1213         Windows build fix.
1214
1215         * platform/network/cf/CredentialStorageCFNet.cpp: Include RetainPtr.h.
1216
1217 2009-12-01  Alexey Proskuryakov  <ap@apple.com>
1218
1219         Reviewed by Darin Adler.
1220
1221         https://bugs.webkit.org/show_bug.cgi?id=32036
1222         Implement CredentialStorage::getFromPersistentStorage for CFNetwork
1223
1224         * platform/network/cf/CredentialStorageCFNet.cpp:
1225         (WebCore::CredentialStorage::getFromPersistentStorage):
1226
1227 2009-12-01  Daniel Bates  <dbates@webkit.org>
1228
1229         Reviewed by Pavel Feldman.
1230
1231         https://bugs.webkit.org/show_bug.cgi?id=32001
1232
1233         Added missing localized strings (that I left out of the patch for bug #21554):
1234         %d × %d pixels
1235         %d × %d pixels (Natural: %d × %d pixels)
1236
1237         Also, changed formatting of these stings to conform with existing ones (added
1238         a space on both sides of the multiply sign).
1239
1240         * English.lproj/localizedStrings.js: Added stings.
1241         * inspector/front-end/ElementsTreeOutline.js:
1242         (WebInspector.ElementsTreeElement.prototype.createTooltipForImageNode):
1243
1244 2009-12-01  Dave Hyatt  <hyatt@apple.com>
1245
1246         Reviewed by Simon Fraser.
1247
1248         Fix for bug 32032, empty namespaces should be allowed in @namespace directives in CSS.
1249
1250         Added fast/css/namespaces/namespaces-empty.xml
1251
1252         * css/CSSStyleSheet.cpp:
1253         (WebCore::CSSStyleSheet::addNamespace):
1254         (WebCore::CSSStyleSheet::determineNamespace):
1255
1256 2009-12-01  Joseph Pecoraro  <joepeck@webkit.org>
1257
1258         Reviewed by Timothy Hatcher.
1259
1260         Web Inspector: Escape key in the Search Field should be more User Friendly
1261         https://bugs.webkit.org/show_bug.cgi?id=32005
1262
1263         * inspector/front-end/inspector.js:
1264         (WebInspector.loaded): add mousedown listener on the search field
1265         (WebInspector.searchFieldManualFocus): user clicked to focus on the search field
1266         (WebInspector.searchKeyDown): handle escape
1267
1268 2009-12-01  Dave Hyatt  <hyatt@apple.com>
1269
1270         Reviewed by David Kilzer.
1271
1272         @namespace directives need to use "maybe_space" in the "maybe_ns_prefix" portion of the grammar to match
1273         the spec.  Not doing so prevent comments from being used immmediately after the namespace prefix.
1274
1275         Added fast/css/namespaces-comments.xml
1276
1277         * css/CSSGrammar.y:
1278
1279 2009-12-01  Yael Aharon  <yael.aharon@nokia.com>
1280
1281         Reviewed by Timothy Hatcher.
1282
1283         Reloading WebInspector from context menu is closing it instead of reloading.
1284         https://bugs.webkit.org/show_bug.cgi?id=32004
1285
1286         When reloading WebInspector, don't delete its m_page.
1287
1288         * inspector/InspectorController.cpp:
1289         (WebCore::InspectorController::close):
1290
1291 2009-12-01  Steve Block  <steveblock@google.com>
1292
1293         Reviewed by Dimitri Glazkov.
1294
1295         Adds V8 bindings for Geolocation.
1296         https://bugs.webkit.org/show_bug.cgi?id=30206
1297
1298         Also adds Geolocation files to Chrome build files.
1299
1300         * WebCore.gyp/WebCore.gyp: Modified. Corrects list of Geolocation IDL files.
1301         * WebCore.gypi: Modified. Adds Geolocation files.
1302         * bindings/v8/DOMObjectsInclude.h: Modified. Adds Geolocation includes.
1303         * bindings/v8/DerivedSourcesAllInOne.cpp: Modified. Adds Geolocation files.
1304         * bindings/v8/V8Index.cpp: Modified. Includes Geolocation generated headers.
1305         * bindings/v8/V8Index.h: Modified. Adds Geolocation types to DOM_OBJECT_TYPES.
1306         * bindings/v8/custom/V8CoordinatesCustom.cpp: Added. Handles optional properties.
1307         * bindings/v8/custom/V8CustomBinding.h: Modified. Declares callbacks and getters.
1308         * bindings/v8/custom/V8CustomPositionCallback.cpp: Added.
1309         (WebCore::V8CustomPositionCallback::V8CustomPositionCallback): Added. Constructor.
1310         (WebCore::V8CustomPositionCallback::~V8CustomPositionCallback): Added. Destructor.
1311         (WebCore::V8CustomPositionCallback::handleEvent): Added. Invokes callback.
1312         * bindings/v8/custom/V8CustomPositionCallback.h: Added.
1313         (WebCore::V8CustomPositionCallback::create): Added. Factory method.
1314         * bindings/v8/custom/V8CustomPositionErrorCallback.cpp: Added.
1315         (WebCore::V8CustomPositionErrorCallback::V8CustomPositionErrorCallback): Added. Constructor.
1316         (WebCore::V8CustomPositionErrorCallback::~V8CustomPositionErrorCallback): Added. Destructor.
1317         (WebCore::V8CustomPositionErrorCallback::handleEvent): Added. Invokes callback.
1318         * bindings/v8/custom/V8CustomPositionErrorCallback.h: Added.
1319         (WebCore::V8CustomPositionErrorCallback::create): Added. Factory method.
1320         * bindings/v8/custom/V8GeolocationCustom.cpp: Added.
1321         (WebCore::throwTypeMismatchException): Added. Throws a type mismatch error.
1322         (WebCore::createPositionCallback): Added. Handles type checking for successCallback argument.
1323         (WebCore::createPositionErrorCallback): Added. Handles type checking for errorCallback argument.
1324         (WebCore::createPositionOptions): Added. Handles type checking for positionOptions argument.
1325
1326 2009-12-01  Yury Semikhatsky  <yurys@chromium.org>
1327
1328         Reviewed by Adam Barth.
1329
1330         Provide a way to get ScriptState for the inspected page.
1331
1332         https://bugs.webkit.org/show_bug.cgi?id=32020
1333
1334         * bindings/v8/ScriptController.cpp:
1335         (WebCore::ScriptController::mainWorldScriptState):
1336         * bindings/v8/ScriptController.h:
1337         * bindings/v8/ScriptState.cpp:
1338         (WebCore::scriptStateFromPage):
1339
1340 2009-12-01  Chris Marrin  <cmarrin@apple.com>
1341
1342         Reviewed by Adam Roben.
1343
1344         Changed mallocs to fastMallocs and frees to fastFrees in GraphicsContext3D. Also added error returns
1345         https://bugs.webkit.org/show_bug.cgi?id=30778
1346
1347         * platform/graphics/mac/GraphicsContext3DMac.cpp:
1348         (WebCore::GraphicsContext3D::getProgramInfoLog):
1349         (WebCore::GraphicsContext3D::getShaderInfoLog):
1350         (WebCore::GraphicsContext3D::getShaderSource):
1351         (WebCore::imageToTexture):
1352
1353 2009-12-01  Mads Ager  <ager@chromium.org>
1354
1355         Reviewed by Eric Seidel.
1356
1357         [V8] Don't crash in DOMWindow event getter in OOM situations
1358         https://bugs.webkit.org/show_bug.cgi?id=32017
1359
1360         Add missing null handle checks in DOMWindow event property
1361         accessors.  V8Proxy::context(frame) can return a null handle in
1362         OOM situations either if failing to initialize a context or if an
1363         OOM is handled gracefully and javascript is disabled.
1364
1365         No new tests because we don't have a good way to test
1366         out-of-memory bugs.
1367
1368         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1369         (WebCore::ACCESSOR_GETTER):
1370         (WebCore::ACCESSOR_SETTER):
1371
1372 2009-12-01  Chris Marrin  <cmarrin@apple.com>
1373
1374         Reviewed by Oliver Hunt.
1375
1376         Updated HTMLCanvasElement to accept "experimental-webgl" as the context name.
1377         https://bugs.webkit.org/show_bug.cgi?id=31672
1378
1379         * html/HTMLCanvasElement.cpp:
1380         (WebCore::HTMLCanvasElement::getContext):
1381
1382 2009-12-01  Pavel Feldman  <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
1383
1384         Not reviewed: chromium build fix, added missing import.
1385
1386         * inspector/InspectorFrontendHost.cpp:
1387
1388 2009-12-01  Pavel Feldman  <pfeldman@chromium.org>
1389
1390         Not reviewed: fix windows build via unexcluding generated files from
1391         project.
1392
1393         * WebCore.vcproj/WebCore.vcproj:
1394
1395 2009-12-01  Mark Rowe  <mrowe@apple.com>
1396
1397         Stop copying IDL files in to the WebCore framework wrapper.
1398
1399         * WebCore.xcodeproj/project.pbxproj:
1400
1401 2009-12-01  Mark Rowe  <mrowe@apple.com>
1402
1403         Fix the Tiger build by making the Xcode project compatible with Xcode 2.4.
1404
1405         This was probably broken by hand-editing the project file as Xcode itself
1406         knows how to keep project files to a backwards-compatible subset of its format.
1407
1408         * WebCore.xcodeproj/project.pbxproj:
1409
1410 2009-12-01  Pavel Feldman  <pfeldman@chromium.org>
1411
1412         Not reviewed: windows build fix (bad vcproj in r51528).
1413
1414         * WebCore.vcproj/WebCore.vcproj:
1415
1416 2009-11-27  Pavel Feldman  <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
1417
1418         Reviewed by Timothy Hatcher.
1419
1420         Web Inspector: Split InspectorBackend into three parts: backend,
1421         injected script host and frontend host.
1422         
1423         https://bugs.webkit.org/show_bug.cgi?id=31888
1424
1425         * DerivedSources.make:
1426         * GNUmakefile.am:
1427         * WebCore.gypi:
1428         * WebCore.pro:
1429         * WebCore.vcproj/WebCore.vcproj:
1430         * WebCore.xcodeproj/project.pbxproj:
1431         * WebCoreSources.bkl:
1432         * bindings/js/JSBindingsAllInOne.cpp:
1433         * bindings/js/JSInspectorBackendCustom.cpp: Removed.
1434         * bindings/js/JSInspectorFrontendHostCustom.cpp: Added.
1435         (WebCore::JSInspectorFrontendHost::search):
1436         (WebCore::JSInspectorFrontendHost::setting):
1437         (WebCore::JSInspectorFrontendHost::setSetting):
1438         * bindings/js/ScriptObject.cpp:
1439         (WebCore::ScriptGlobalObject::set):
1440         * bindings/js/ScriptObject.h:
1441         * bindings/v8/DOMObjectsInclude.h:
1442         * bindings/v8/DerivedSourcesAllInOne.cpp:
1443         * bindings/v8/ScriptObject.cpp:
1444         (WebCore::ScriptGlobalObject::set):
1445         * bindings/v8/ScriptObject.h:
1446         * bindings/v8/V8Index.cpp:
1447         * bindings/v8/V8Index.h:
1448         * bindings/v8/custom/V8CustomBinding.h:
1449         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp: Added.
1450         (WebCore::CALLBACK_FUNC_DECL):
1451         * bindings/v8/custom/V8InspectorBackendCustom.cpp: Removed.
1452         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp: Added.
1453         (WebCore::CALLBACK_FUNC_DECL):
1454         * inspector/InjectedScriptHost.cpp: Added.
1455         (WebCore::InjectedScriptHost::InjectedScriptHost):
1456         (WebCore::InjectedScriptHost::~InjectedScriptHost):
1457         (WebCore::InjectedScriptHost::copyText):
1458         (WebCore::InjectedScriptHost::nodeForId):
1459         (WebCore::InjectedScriptHost::wrapObject):
1460         (WebCore::InjectedScriptHost::unwrapObject):
1461         (WebCore::InjectedScriptHost::pushNodePathToFrontend):
1462         (WebCore::InjectedScriptHost::addNodesToSearchResult):
1463         (WebCore::InjectedScriptHost::currentCallFrame):
1464         (WebCore::InjectedScriptHost::databaseForId):
1465         (WebCore::InjectedScriptHost::selectDatabase):
1466         (WebCore::InjectedScriptHost::selectDOMStorage):
1467         (WebCore::InjectedScriptHost::reportDidDispatchOnInjectedScript):
1468         (WebCore::InjectedScriptHost::inspectorDOMAgent):
1469         (WebCore::InjectedScriptHost::inspectorFrontend):
1470         * inspector/InjectedScriptHost.h: Added.
1471         (WebCore::InjectedScriptHost::create):
1472         (WebCore::InjectedScriptHost::inspectorController):
1473         (WebCore::InjectedScriptHost::disconnectController):
1474         * inspector/InjectedScriptHost.idl: Added.
1475         * inspector/InspectorBackend.cpp:
1476         (WebCore::InspectorBackend::InspectorBackend):
1477         (WebCore::InspectorBackend::storeLastActivePanel):
1478         (WebCore::InspectorBackend::toggleNodeSearch):
1479         (WebCore::InspectorBackend::resourceTrackingEnabled):
1480         (WebCore::InspectorBackend::debuggerEnabled):
1481         (WebCore::InspectorBackend::enableDebugger):
1482         (WebCore::InspectorBackend::disableDebugger):
1483         (WebCore::InspectorBackend::addBreakpoint):
1484         (WebCore::InspectorBackend::updateBreakpoint):
1485         (WebCore::InspectorBackend::removeBreakpoint):
1486         (WebCore::InspectorBackend::pauseInDebugger):
1487         (WebCore::InspectorBackend::resumeDebugger):
1488         (WebCore::InspectorBackend::stepOverStatementInDebugger):
1489         (WebCore::InspectorBackend::stepIntoStatementInDebugger):
1490         (WebCore::InspectorBackend::stepOutOfFunctionInDebugger):
1491         (WebCore::InspectorBackend::pauseOnExceptions):
1492         (WebCore::InspectorBackend::setPauseOnExceptions):
1493         (WebCore::InspectorBackend::profilerEnabled):
1494         (WebCore::InspectorBackend::enableProfiler):
1495         (WebCore::InspectorBackend::disableProfiler):
1496         (WebCore::InspectorBackend::startProfiling):
1497         (WebCore::InspectorBackend::stopProfiling):
1498         (WebCore::InspectorBackend::getProfileHeaders):
1499         (WebCore::InspectorBackend::getProfile):
1500         (WebCore::InspectorBackend::currentCallFrame):
1501         (WebCore::InspectorBackend::highlightDOMNode):
1502         (WebCore::InspectorBackend::hideDOMNodeHighlight):
1503         (WebCore::InspectorBackend::getCookies):
1504         (WebCore::InspectorBackend::deleteCookie):
1505         (WebCore::InspectorBackend::didEvaluateForTestInFrontend):
1506         (WebCore::InspectorBackend::nodeForId):
1507         * inspector/InspectorBackend.h:
1508         (WebCore::InspectorBackend::create):
1509         * inspector/InspectorBackend.idl:
1510         * inspector/InspectorController.cpp:
1511         (WebCore::InspectorController::InspectorController):
1512         (WebCore::InspectorController::~InspectorController):
1513         (WebCore::InspectorController::inspectedPageDestroyed):
1514         (WebCore::InspectorController::windowScriptObjectAvailable):
1515         * inspector/InspectorController.h:
1516         (WebCore::InspectorController::inspectorFrontendHost):
1517         (WebCore::InspectorController::injectedScriptHost):
1518         * inspector/InspectorFrontendHost.cpp: Added.
1519         (WebCore::InspectorFrontendHost::InspectorFrontendHost):
1520         (WebCore::InspectorFrontendHost::~InspectorFrontendHost):
1521         (WebCore::InspectorFrontendHost::loaded):
1522         (WebCore::InspectorFrontendHost::attach):
1523         (WebCore::InspectorFrontendHost::detach):
1524         (WebCore::InspectorFrontendHost::closeWindow):
1525         (WebCore::InspectorFrontendHost::windowUnloading):
1526         (WebCore::InspectorFrontendHost::setAttachedWindowHeight):
1527         (WebCore::InspectorFrontendHost::moveWindowBy):
1528         (WebCore::InspectorFrontendHost::localizedStringsURL):
1529         (WebCore::InspectorFrontendHost::hiddenPanels):
1530         (WebCore::InspectorFrontendHost::platform):
1531         (WebCore::InspectorFrontendHost::port):
1532         (WebCore::InspectorFrontendHost::addResourceSourceToFrame):
1533         (WebCore::InspectorFrontendHost::addSourceToFrame):
1534         * inspector/InspectorFrontendHost.h: Added.
1535         (WebCore::InspectorFrontendHost::create):
1536         (WebCore::InspectorFrontendHost::inspectorController):
1537         (WebCore::InspectorFrontendHost::disconnectController):
1538         * inspector/InspectorFrontendHost.idl: Added.
1539         * inspector/front-end/Breakpoint.js:
1540         (WebInspector.Breakpoint.prototype.set condition):
1541         * inspector/front-end/BreakpointsSidebarPane.js:
1542         (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint):
1543         (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint):
1544         (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged):
1545         * inspector/front-end/ConsoleView.js:
1546         (WebInspector.ConsoleView.prototype.clearMessages):
1547         * inspector/front-end/CookieItemsView.js:
1548         (WebInspector.CookieItemsView.prototype._deleteCookieCallback):
1549         * inspector/front-end/DOMAgent.js:
1550         (WebInspector.DOMAgent.prototype.getChildNodesAsync):
1551         (WebInspector.DOMAgent.prototype.setAttributeAsync):
1552         (WebInspector.DOMAgent.prototype.removeAttributeAsync):
1553         (WebInspector.DOMAgent.prototype.setTextNodeValueAsync):
1554         (WebInspector.Cookies.getCookiesAsync):
1555         (WebInspector.EventListeners.getEventListenersForNodeAsync):
1556         * inspector/front-end/DOMStorage.js:
1557         (WebInspector.DOMStorage.prototype.getEntries):
1558         (WebInspector.DOMStorage.prototype.setItem):
1559         (WebInspector.DOMStorage.prototype.removeItem):
1560         * inspector/front-end/Database.js:
1561         (WebInspector.Database.prototype.getTableNames):
1562         * inspector/front-end/ElementsPanel.js:
1563         (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
1564         (WebInspector.ElementsPanel.prototype.hide):
1565         (WebInspector.ElementsPanel.prototype.reset):
1566         (WebInspector.ElementsPanel.prototype.handleCopyEvent):
1567         (WebInspector.ElementsPanel.prototype._nodeSearchButtonClicked):
1568         * inspector/front-end/ElementsTreeOutline.js:
1569         (WebInspector.ElementsTreeOutline.prototype.set focusedDOMNode.restoreHighlightToHoveredNode):
1570         (WebInspector.ElementsTreeOutline.prototype.set focusedDOMNode):
1571         ():
1572         * inspector/front-end/EventListenersSidebarPane.js:
1573         (WebInspector.EventListenersSidebarPane.prototype):
1574         * inspector/front-end/InjectedScript.js:
1575         (InjectedScript._evaluateAndWrap):
1576         (InjectedScript.performSearch.addNodesToResults):
1577         (InjectedScript.getCallFrames):
1578         (InjectedScript._callFrameForId):
1579         (InjectedScript._clearConsoleMessages):
1580         (InjectedScript._inspectObject):
1581         (InjectedScript._copy):
1582         (InjectedScript._ensureCommandLineAPIInstalled):
1583         (InjectedScript._window):
1584         (InjectedScript._nodeForId):
1585         (InjectedScript._objectForId):
1586         (InjectedScript.pushNodeToFrontend):
1587         (InjectedScript.executeSql):
1588         (InjectedScript.executeSql.errorCallback):
1589         (InjectedScript.executeSql.queryTransaction):
1590         * inspector/front-end/InjectedScriptAccess.js:
1591         (InjectedScriptAccess._installHandler.InjectedScriptAccess.methodName):
1592         (InjectedScriptAccess._installHandler):
1593         * inspector/front-end/InspectorBackendStub.js: Added.
1594         (.WebInspector.InspectorBackendStub):
1595         (.WebInspector.InspectorBackendStub.prototype.wrapCallback):
1596         (.WebInspector.InspectorBackendStub.prototype.platform):
1597         (.WebInspector.InspectorBackendStub.prototype.port):
1598         (.WebInspector.InspectorBackendStub.prototype.closeWindow):
1599         (.WebInspector.InspectorBackendStub.prototype.attach):
1600         (.WebInspector.InspectorBackendStub.prototype.detach):
1601         (.WebInspector.InspectorBackendStub.prototype.storeLastActivePanel):
1602         (.WebInspector.InspectorBackendStub.prototype.clearMessages):
1603         (.WebInspector.InspectorBackendStub.prototype.searchingForNode):
1604         (.WebInspector.InspectorBackendStub.prototype.search):
1605         (.WebInspector.InspectorBackendStub.prototype.toggleNodeSearch):
1606         (.WebInspector.InspectorBackendStub.prototype.setAttachedWindowHeight):
1607         (.WebInspector.InspectorBackendStub.prototype.moveByUnrestricted):
1608         (.WebInspector.InspectorBackendStub.prototype.addResourceSourceToFrame):
1609         (.WebInspector.InspectorBackendStub.prototype.addSourceToFrame):
1610         (.WebInspector.InspectorBackendStub.prototype.getResourceDocumentNode):
1611         (.WebInspector.InspectorBackendStub.prototype.highlightDOMNode):
1612         (.WebInspector.InspectorBackendStub.prototype.hideDOMNodeHighlight):
1613         (.WebInspector.InspectorBackendStub.prototype.inspectedWindow):
1614         (.WebInspector.InspectorBackendStub.prototype.loaded):
1615         (.WebInspector.InspectorBackendStub.prototype.localizedStringsURL):
1616         (.WebInspector.InspectorBackendStub.prototype.windowUnloading):
1617         (.WebInspector.InspectorBackendStub.prototype.hiddenPanels):
1618         (.WebInspector.InspectorBackendStub.prototype.debuggerEnabled):
1619         (.WebInspector.InspectorBackendStub.prototype.enableResourceTracking):
1620         (.WebInspector.InspectorBackendStub.prototype.disableResourceTracking):
1621         (.WebInspector.InspectorBackendStub.prototype.resourceTrackingEnabled):
1622         (.WebInspector.InspectorBackendStub.prototype.enableDebugger):
1623         (.WebInspector.InspectorBackendStub.prototype.disableDebugger):
1624         (.WebInspector.InspectorBackendStub.prototype.addBreakpoint):
1625         (.WebInspector.InspectorBackendStub.prototype.removeBreakpoint):
1626         (.WebInspector.InspectorBackendStub.prototype.updateBreakpoint):
1627         (.WebInspector.InspectorBackendStub.prototype.pauseInDebugger):
1628         (.WebInspector.InspectorBackendStub.prototype.pauseOnExceptions):
1629         (.WebInspector.InspectorBackendStub.prototype.setPauseOnExceptions):
1630         (.WebInspector.InspectorBackendStub.prototype.resumeDebugger):
1631         (.WebInspector.InspectorBackendStub.prototype.profilerEnabled):
1632         (.WebInspector.InspectorBackendStub.prototype.enableProfiler):
1633         (.WebInspector.InspectorBackendStub.prototype.disableProfiler):
1634         (.WebInspector.InspectorBackendStub.prototype.startProfiling):
1635         (.WebInspector.InspectorBackendStub.prototype.stopProfiling):
1636         (.WebInspector.InspectorBackendStub.prototype.getProfileHeaders):
1637         (.WebInspector.InspectorBackendStub.prototype.getProfile):
1638         (.WebInspector.InspectorBackendStub.prototype.takeHeapSnapshot):
1639         (.WebInspector.InspectorBackendStub.prototype.databaseTableNames):
1640         (.WebInspector.InspectorBackendStub.prototype.stepIntoStatementInDebugger):
1641         (.WebInspector.InspectorBackendStub.prototype.stepOutOfFunctionInDebugger):
1642         (.WebInspector.InspectorBackendStub.prototype.stepOverStatementInDebugger):
1643         (.WebInspector.InspectorBackendStub.prototype.setSetting):
1644         (.WebInspector.InspectorBackendStub.prototype.dispatchOnInjectedScript):
1645         (.WebInspector.InspectorBackendStub.prototype.releaseWrapperObjectGroup):
1646         (.WebInspector.InspectorBackendStub.prototype.setting):
1647         * inspector/front-end/InspectorControllerStub.js:
1648         * inspector/front-end/InspectorFrontendHostStub.js: Added.
1649         (.WebInspector.InspectorFrontendHostStub):
1650         (.WebInspector.InspectorFrontendHostStub.prototype.platform):
1651         (.WebInspector.InspectorFrontendHostStub.prototype.port):
1652         (.WebInspector.InspectorFrontendHostStub.prototype.closeWindow):
1653         (.WebInspector.InspectorFrontendHostStub.prototype.attach):
1654         (.WebInspector.InspectorFrontendHostStub.prototype.detach):
1655         (.WebInspector.InspectorFrontendHostStub.prototype.search):
1656         (.WebInspector.InspectorFrontendHostStub.prototype.setAttachedWindowHeight):
1657         (.WebInspector.InspectorFrontendHostStub.prototype.moveWindowBy):
1658         (.WebInspector.InspectorFrontendHostStub.prototype.addResourceSourceToFrame):
1659         (.WebInspector.InspectorFrontendHostStub.prototype.addSourceToFrame):
1660         (.WebInspector.InspectorFrontendHostStub.prototype.loaded):
1661         (.WebInspector.InspectorFrontendHostStub.prototype.localizedStringsURL):
1662         (.WebInspector.InspectorFrontendHostStub.prototype.hiddenPanels):
1663         (.WebInspector.InspectorFrontendHostStub.prototype.setSetting):
1664         (.WebInspector.InspectorFrontendHostStub.prototype.setting):
1665         * inspector/front-end/ProfileView.js:
1666         (WebInspector.CPUProfileView):
1667         (WebInspector.CPUProfileType.prototype.buttonClicked):
1668         * inspector/front-end/ProfilesPanel.js:
1669         (WebInspector.ProfilesPanel.prototype._updateInterface):
1670         (WebInspector.ProfilesPanel.prototype._enableProfiling):
1671         (WebInspector.ProfilesPanel.prototype._toggleProfiling):
1672         * inspector/front-end/ResourcesPanel.js:
1673         (WebInspector.ResourcesPanel.prototype.reset):
1674         (WebInspector.ResourcesPanel.prototype._toggleLargerResources):
1675         (WebInspector.ResourcesPanel.prototype._enableResourceTracking):
1676         (WebInspector.ResourcesPanel.prototype._toggleResourceTracking):
1677         * inspector/front-end/ScriptView.js:
1678         (WebInspector.ScriptView.prototype.setupSourceFrameIfNeeded):
1679         * inspector/front-end/ScriptsPanel.js:
1680         (WebInspector.ScriptsPanel.prototype.show):
1681         (WebInspector.ScriptsPanel.prototype.addScript):
1682         (WebInspector.ScriptsPanel.prototype.attachDebuggerWhenShown):
1683         (WebInspector.ScriptsPanel.prototype.reset):
1684         (WebInspector.ScriptsPanel.prototype.canShowResource):
1685         (WebInspector.ScriptsPanel.prototype._showScriptOrResource):
1686         (WebInspector.ScriptsPanel.prototype._addScriptToFilesMenu):
1687         (WebInspector.ScriptsPanel.prototype._updatePauseOnExceptionsButton):
1688         (WebInspector.ScriptsPanel.prototype._updateDebuggerButtons):
1689         (WebInspector.ScriptsPanel.prototype._enableDebugging):
1690         (WebInspector.ScriptsPanel.prototype._toggleDebugging):
1691         (WebInspector.ScriptsPanel.prototype._togglePauseOnExceptions):
1692         (WebInspector.ScriptsPanel.prototype._togglePause):
1693         (WebInspector.ScriptsPanel.prototype._stepOverClicked):
1694         (WebInspector.ScriptsPanel.prototype._stepIntoClicked):
1695         (WebInspector.ScriptsPanel.prototype._stepOutClicked):
1696         * inspector/front-end/SourceView.js:
1697         (WebInspector.SourceView.prototype.setupSourceFrameIfNeeded):
1698         (WebInspector.SourceView.prototype.performSearch.findSearchMatches):
1699         (WebInspector.SourceView.prototype.performSearch):
1700         * inspector/front-end/StylesSidebarPane.js:
1701         (WebInspector.StylesSidebarPane.prototype._changeColorFormat):
1702         * inspector/front-end/TestController.js:
1703         (WebInspector.TestController.prototype.notifyDone):
1704         * inspector/front-end/TimelinePanel.js:
1705         (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
1706         * inspector/front-end/WatchExpressionsSidebarPane.js:
1707         (WebInspector.WatchExpressionsSection.prototype.update):
1708         (WebInspector.WatchExpressionsSection.prototype.loadSavedExpressions):
1709         (WebInspector.WatchExpressionsSection.prototype.saveExpressions):
1710         * inspector/front-end/WebKit.qrc:
1711         * inspector/front-end/inspector.html:
1712         * inspector/front-end/inspector.js:
1713         (WebInspector.pendingDispatches.0.get platform):
1714         (WebInspector.get port):
1715         (WebInspector.set currentPanel):
1716         (WebInspector._createPanels):
1717         (WebInspector._loadPreferences):
1718         (WebInspector.set attached):
1719         (WebInspector._updateHoverHighlight):
1720         (WebInspector.loaded):
1721         (windowLoaded):
1722         (WebInspector.windowUnload):
1723         (WebInspector.close):
1724         (WebInspector.toolbarDrag):
1725         (WebInspector.UIString):
1726
1727 2009-11-30  Shinichiro Hamaji  <hamaji@chromium.org>
1728
1729         Reviewed by Dan Bernstein.
1730
1731         css2.1/t1205-c566-list-stl-00-e-ag.html is failing
1732         https://bugs.webkit.org/show_bug.cgi?id=23264
1733         css2.1/t1205-c565-list-pos-00-b.html is failing
1734         https://bugs.webkit.org/show_bug.cgi?id=23263
1735
1736         Ignore whitespaces after list markers.
1737         Rendering of this was already done for the case where inside=false.
1738         This fixes the rendering of inside=true case and calcInlinePrefWidths.
1739
1740         Test: fast/lists/calc-width-with-space.html
1741
1742         * rendering/RenderBlock.cpp:
1743         (WebCore::RenderBlock::calcInlinePrefWidths):
1744         * rendering/RenderBlockLineLayout.cpp:
1745         (WebCore::RenderBlock::findNextLineBreak):
1746
1747 2009-11-30  Fumitoshi Ukai  <ukai@chromium.org>
1748
1749         Unreviewed Chromium build fix introduced by r51212
1750
1751         Fix scriptStateFromNode and ScriptStateFromPage to take DOMWrapperWorld
1752         as the first argument.
1753         Move mainThreadNormalWorld() to ScriptState.{h,cpp}.
1754         Add debuggerWorld() and pluginWorld() in ScriptState.h.
1755
1756         * bindings/v8/ScriptController.cpp:
1757         * bindings/v8/ScriptController.h:
1758         * bindings/v8/ScriptState.cpp:
1759         (WebCore::scriptStateFromNode):
1760         (WebCore::scriptStateFromPage):
1761         (WebCore::mainThreadNormalWorld):
1762         * bindings/v8/ScriptState.h:
1763         (WebCore::debuggerWorld):
1764         (WebCore::pluginWorld):
1765
1766 2009-11-30  Enrica Casucci  <enrica@apple.com>
1767
1768         Reviewed by Darin Adler.
1769
1770         Can focus but not type into content editable block that contains only non-editable content.
1771         <rdar://problem/5982901>
1772         https://bugs.webkit.org/show_bug.cgi?id=31750
1773         
1774         The goal is to change the way we choose a visible position
1775         after hit detection, by preferring a visually equivalent editable
1776         position if available. By doing this, it is possible to add content
1777         to an editable block that initially contains only non editable elements.
1778
1779         Test: editing/selection/mixed-editability-10.html
1780
1781         * WebCore.base.exp: Changed to match the new signature of downstream
1782         and upstream in the Position class.
1783         * dom/Position.cpp:
1784         (WebCore::Position::atEditingBoundary): Added.
1785         (WebCore::Position::upstream): Modified to allow to cross the boundary
1786         between editable and non editable content if required.
1787         (WebCore::Position::downstream): Modified to allow to cross the boundary
1788         between editable and non editable content if required.
1789         (WebCore::Position::isCandidate): Modified to qualify as candidates positions
1790         that are at the editability boundary.
1791         (WebCore::Position::getInlineBoxAndOffset): Modified to retrieve the inline box
1792         to be used in calculating the caret rectangle.
1793         * dom/Position.h:
1794         (WebCore::Position::):
1795         * dom/PositionIterator.cpp:
1796         (WebCore::PositionIterator::atEditingBoundary): Added.
1797         (WebCore::PositionIterator::isCandidate): Modified to qualify as candidates positions
1798         that are at the editability boundary.
1799         * dom/PositionIterator.h:
1800         * editing/htmlediting.cpp:
1801         (WebCore::firstEditablePositionAfterPositionInRoot): Modified to accept not only
1802         descendants of the editable container, but the container itself.
1803         (WebCore::lastEditablePositionBeforePositionInRoot): Modified to accept not only
1804         descendants of the editable container, but the container itself.
1805         * rendering/RenderObject.cpp:
1806         (WebCore::RenderObject::createVisiblePosition): Added logic to prefer an editable position,
1807         if available.
1808         * rendering/RenderText.cpp:
1809         (WebCore::RenderText::isAllCollapsibleWhitespace): Added.
1810         * rendering/RenderText.h:
1811
1812 2009-11-30  Kevin Ollivier  <kevino@theolliviers.com>
1813
1814         wx build fix, add header needed for wx build.
1815
1816         * css/CSSFontFaceSrcValue.cpp:
1817
1818 2009-11-30  Mark Rowe  <mrowe@apple.com>
1819
1820         Reviewed by David Kilzer.
1821
1822         <rdar://problem/7424387> WebCore binary missing symbols when built for x86_64 from a machine that cannot run x86_64 binaries
1823
1824         The check for whether WTF_USE_PLUGIN_HOST_PROCESS is defined occurs under the native architecture of the build machine.
1825         If that is 32-bit then WTF_USE_PLUGIN_HOST_PROCESS will not be defined.  We work around this by forcing the check to
1826         be performed against the x86_64 architecture.
1827
1828         * DerivedSources.make:
1829
1830 2009-11-30  Beth Dakin  <bdakin@apple.com>
1831
1832         Reviewed by Oliver Hunt.
1833
1834         Fix for https://bugs.webkit.org/show_bug.cgi?id=32000 Crash in 
1835         Safari caused by extreme column-gap and column-width values 
1836         -and corresponding-
1837         <rdar://problem/7425433>
1838
1839         Prevent desiredColumnCount from being less than 1 since it is used 
1840         as a divisor.
1841         * rendering/RenderBlock.cpp:
1842         (WebCore::RenderBlock::calcColumnWidth):
1843
1844 2009-11-30  Alexey Proskuryakov  <ap@apple.com>
1845
1846         Reviewed by Oliver Hunt.
1847
1848         https://bugs.webkit.org/show_bug.cgi?id=31659
1849         Connection must be closed in case of Web Socket handshake error
1850
1851         The network connection was closed, but the close event wasn't dispatched.
1852
1853         Tested by websocket/tests/handshake-error.html, which is un-skipped now.
1854
1855         * platform/network/cf/SocketStreamHandleCFNet.cpp: (WebCore::SocketStreamHandle::platformClose):
1856         Call client didHandle() method. This looks strange in CFNetwork implementation, because
1857         it's the client that asked to close the stream, so it shouldn't need the callback. It makes
1858         more sense in cross-process implementation, because closing is async there.
1859
1860 2009-11-30  Gavin Barraclough  <barraclough@apple.com>
1861
1862         Reviewed by Geoff Garen.
1863
1864         Bug 31859 - Make world selection for JSC IsolatedWorlds automagical.
1865
1866         WebCore presently has to explicitly specify the world before entering into JSC,
1867         which is a little fragile (particularly since property access via a
1868         getter/setter might invoke execution). Instead derive the current world from
1869         the lexical global object.
1870
1871         Remove the last uses of mainThreadCurrentWorld(), so the world is always obtained via
1872         currentWorld().  Switch this to obtain the world from the ExecsState's lexical global
1873         object instead.  Remove the call/construct/evaluate 'InWorld' methods, since these
1874         are no longer necessary.
1875
1876         * WebCore.base.exp:
1877         * bindings/js/JSCallbackData.cpp:
1878         (WebCore::JSCallbackData::invokeCallback):
1879         * bindings/js/JSCallbackData.h:
1880         (WebCore::JSCallbackData::JSCallbackData):
1881         * bindings/js/JSCustomXPathNSResolver.cpp:
1882         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1883         * bindings/js/JSDOMBinding.cpp:
1884         (WebCore::currentWorld):
1885         (WebCore::mainThreadNormalWorld):
1886         * bindings/js/JSDOMBinding.h:
1887         (WebCore::WebCoreJSClientData::WebCoreJSClientData):
1888         * bindings/js/JSDOMWindowBase.cpp:
1889         (WebCore::JSDOMWindowBase::updateDocument):
1890         * bindings/js/JSDOMWindowBase.h:
1891         * bindings/js/JSEventListener.cpp:
1892         (WebCore::JSEventListener::handleEvent):
1893         (WebCore::JSEventListener::reportError):
1894         * bindings/js/JSHTMLDocumentCustom.cpp:
1895         (WebCore::JSHTMLDocument::open):
1896         * bindings/js/JSNodeFilterCondition.cpp:
1897         (WebCore::JSNodeFilterCondition::acceptNode):
1898         * bindings/js/JSQuarantinedObjectWrapper.cpp:
1899         (WebCore::JSQuarantinedObjectWrapper::construct):
1900         (WebCore::JSQuarantinedObjectWrapper::call):
1901         * bindings/js/ScheduledAction.cpp:
1902         (WebCore::ScheduledAction::executeFunctionInContext):
1903         * bindings/js/ScriptController.cpp:
1904         (WebCore::ScriptController::evaluateInWorld):
1905         (WebCore::ScriptController::initScript):
1906         (WebCore::ScriptController::updateDocument):
1907         * bindings/js/ScriptFunctionCall.cpp:
1908         (WebCore::ScriptFunctionCall::call):
1909         (WebCore::ScriptFunctionCall::construct):
1910         * bindings/js/ScriptObjectQuarantine.cpp:
1911         (WebCore::getQuarantinedScriptObject):
1912         * bindings/js/ScriptState.cpp:
1913         (WebCore::scriptStateFromNode):
1914         (WebCore::scriptStateFromPage):
1915         * bindings/js/ScriptState.h:
1916         * bindings/js/WorkerScriptController.cpp:
1917         (WebCore::WorkerScriptController::evaluate):
1918         * bindings/objc/WebScriptObject.mm:
1919         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1920         (-[WebScriptObject evaluateWebScript:]):
1921         * bridge/NP_jsobject.cpp:
1922         (_NPN_InvokeDefault):
1923         (_NPN_Invoke):
1924         (_NPN_Evaluate):
1925         (_NPN_Construct):
1926         * bridge/jni/jni_jsobject.mm:
1927         (JavaJSObject::call):
1928         (JavaJSObject::eval):
1929         * dom/NodeFilter.h:
1930         (WebCore::NodeFilter::acceptNode):
1931         * dom/NodeIterator.h:
1932         (WebCore::NodeIterator::nextNode):
1933         (WebCore::NodeIterator::previousNode):
1934         * dom/TreeWalker.h:
1935         (WebCore::TreeWalker::parentNode):
1936         (WebCore::TreeWalker::firstChild):
1937         (WebCore::TreeWalker::lastChild):
1938         (WebCore::TreeWalker::previousSibling):
1939         (WebCore::TreeWalker::nextSibling):
1940         (WebCore::TreeWalker::previousNode):
1941         (WebCore::TreeWalker::nextNode):
1942         * inspector/InspectorController.cpp:
1943         (WebCore::InspectorController::windowScriptObjectAvailable):
1944         (WebCore::InspectorController::didEvaluateForTestInFrontend):
1945         * inspector/JavaScriptCallFrame.cpp:
1946         (WebCore::JavaScriptCallFrame::evaluate):
1947
1948 2009-11-30  Eric Carlson  <eric.carlson@apple.com>
1949
1950         Reviewed by Simon Fraser.
1951
1952         All HTML5 media element events should be regular events
1953         https://bugs.webkit.org/show_bug.cgi?id=30513
1954
1955         * html/HTMLMediaElement.cpp:
1956         (WebCore::HTMLMediaElement::selectMediaResource):
1957         (WebCore::HTMLMediaElement::noneSupported):
1958         (WebCore::HTMLMediaElement::mediaEngineError):
1959         (WebCore::HTMLMediaElement::setNetworkState):
1960         (WebCore::HTMLMediaElement::userCancelledLoad):
1961             Call scheduleEvent instead of scheduleProgressEvent.
1962         (WebCore::HTMLMediaElement::progressEventTimerFired):
1963             Call scheduleEvent instead of scheduleProgressEvent. Call renderer->updateFromElement
1964             after scheduling a 'progress' event so the controller will update download
1965             progress indicator.
1966         * html/HTMLMediaElement.h:
1967             Remove scheduleProgressEvent prototype.
1968
1969 2009-11-30  Joseph Pecoraro  <joepeck@webkit.org>
1970
1971         Reviewed by Pavel Feldman.
1972
1973         Web Inspector: Wrong console output for Regexp escape sequence
1974         https://bugs.webkit.org/show_bug.cgi?id=31538
1975
1976         Updated inspector/console-format.html
1977
1978         * inspector/front-end/ConsoleView.js:
1979         (WebInspector.ConsoleView.createDividerElement): style issues.
1980         (WebInspector.ConsoleView.createFilterElement): style issues.
1981         (WebInspector.ConsoleView): added _customFormatters table.
1982         (WebInspector.ConsoleView.prototype.updateMessageRepeatCount): style isses.
1983         (WebInspector.ConsoleView.prototype._incrementErrorWarningCount): style issues.
1984         (WebInspector.ConsoleView.prototype._format): simplified delegation to formatter logic.
1985         (WebInspector.ConsoleView.prototype._formatobject):
1986         (WebInspector.ConsoleView.prototype._formatnode):
1987         (WebInspector.ConsoleView.prototype._printArray):
1988         (WebInspector.ConsoleMessage.prototype._format): commented and broke down the algorithm into parts.
1989         (WebInspector.ConsoleMessage.prototype._formatWithSubstitutionString.append): handle substitution string formatting.
1990         (WebInspector.ConsoleMessage.prototype._formatIndividualValue): handling individual value formatting.
1991         (WebInspector.ConsoleCommandResult):
1992         * inspector/front-end/InjectedScript.js: simplified regex formatting.
1993         * inspector/front-end/inspector.js:
1994         (WebInspector.linkifyStringAsFragment): converted new RegExp to literal for performance benefits.
1995         * inspector/front-end/utilities.js: 
1996         (Element.prototype.hasStyleClass): update inaccurate comment.
1997         (String.prototype.trimURL): converted new RegExp to literal for performance benefits.
1998
1999 2009-11-30  Erik Arvidsson  <arv@chromium.org>
2000
2001         Reviewed by Adam Barth.
2002
2003         Clean up V8 bindings for CSSStyleDeclaration and CSSVariableDeclaration
2004         https://bugs.webkit.org/show_bug.cgi?id=31895
2005
2006         No new tests. This is already covered by:
2007                 fast/dom/CSSStyleDeclaration/css-computed-style-item.html
2008                 fast/dom/CSSStyleDeclaration/css-style-item.html
2009
2010         * bindings/v8/V8Collection.h:
2011         (WebCore::collectionStringIndexedPropertyGetter):
2012         (WebCore::setCollectionStringIndexedGetter):
2013         * bindings/v8/V8DOMWrapper.cpp:
2014         (WebCore::V8DOMWrapper::getTemplate):
2015
2016 2009-11-30  Steve Block  <steveblock@google.com>
2017
2018         Reviewed by Eric Seidel.
2019
2020         Adds include of wtf/StdLibExtras.h for DEFINE_STATIC_LOCAL in V8 ScriptController.
2021         https://bugs.webkit.org/show_bug.cgi?id=31932
2022
2023         Build fix only, no new tests.
2024
2025         * bindings/v8/ScriptController.cpp: Modified. Adds include of wtf/StdLibExtras.h.
2026
2027 2009-11-30  Steve Block  <steveblock@google.com>
2028
2029         Reviewed by Eric Seidel.
2030
2031         Adds PassOwnPtr include to ScriptExecutionContext.h.
2032         https://bugs.webkit.org/show_bug.cgi?id=31929
2033
2034         Build fix only, no new tests.
2035
2036         * dom/ScriptExecutionContext.h: Modified. Adds PassOwnPtr include.
2037
2038 2009-11-30  Dirk Schulze  <krit@webkit.org>
2039
2040         Reviewed by Nikolas Zimmermann.
2041
2042         REGRESSION (r49757): masking-mask-01-b.svg rendered incorrectly
2043         [https://bugs.webkit.org/show_bug.cgi?id=31980]
2044
2045         It turns out, that we did not handle maskUnits="userSpaceOnUse"
2046         correctly. We just need to move the context of the maskImage
2047         if maskContentUnits="objectBoundingBox". The context gets scaled
2048         on this unit combination, so we have to substract the position of
2049         the targetRect. On userSpaceOnUse the position just depends on the
2050         position of the mask element.
2051         I added a test with some senseless and reasonable values for size
2052         and postion of the mask and it's contents. I also used every
2053         combination of maskUnits and maskContentUnits to be sure, that it
2054         is fixed this time.
2055
2056         Test: svg/custom/mask-with-all-units.svg
2057
2058         * svg/SVGMaskElement.cpp:
2059         (WebCore::SVGMaskElement::drawMaskerContent):
2060
2061 2009-11-30  Steve Block  <steveblock@google.com>
2062
2063         Reviewed by Eric Seidel.
2064
2065         Adds ENABLE(INSPECTOR) guards around DOMWindow::inspectorTimelineAgent.
2066         https://bugs.webkit.org/show_bug.cgi?id=31928
2067
2068         Build fix only, no new tests.
2069
2070         * page/DOMWindow.cpp: Modified. Adds ENABLE(INSPECTOR) guards around DOMWindow::inspectorTimelineAgent.
2071
2072 2009-11-30  Steve Block  <steveblock@google.com>
2073
2074         Reviewed by Eric Seidel.
2075
2076         Adds SHARED_WORKERS guards to V8 WorkerContextExecutionProxy.
2077         https://bugs.webkit.org/show_bug.cgi?id=31926
2078
2079         Build fix only, no new tests.
2080
2081         * bindings/v8/WorkerContextExecutionProxy.cpp:
2082         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
2083         (WebCore::WorkerContextExecutionProxy::convertToV8Object):
2084         (WebCore::WorkerContextExecutionProxy::convertEventTargetToV8Object):
2085
2086 2009-11-30  Benjamin Poulain  <benjamin.poulain@nokia.com>
2087
2088         Reviewed by Kenneth Rohde Christiansen.
2089
2090         Chrome::contentsSizeChanged() is called when the content size has not changed
2091         https://bugs.webkit.org/show_bug.cgi?id=31978
2092
2093         Do not trigger contentsSizeChaned() is the new size is the same as the old one.
2094
2095         * page/FrameView.cpp:
2096         (WebCore::FrameView::setContentsSize):
2097
2098 2009-11-30  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2099
2100         Reviewed by Kenneth Rohde Christiansen.
2101
2102         [Qt] Fix some compiler warnings seen on QtWebKit/Mac
2103         https://bugs.webkit.org/show_bug.cgi?id=31962
2104
2105         No new tests as there is no functional change.
2106
2107         * platform/network/ResourceHandle.h: Make destructor virtual as 
2108         after r50772 ResourceHandle has virtual functions.
2109
2110         * plugins/mac/PluginPackageMac.cpp: 
2111         (WebCore::PluginPackage::fetchInfo): Fix typo WTF is a namespace
2112         not a label
2113
2114         * plugins/mac/PluginViewMac.cpp:
2115         (WebCore::PluginView::setNPWindowIfNeeded): Add l to the format
2116         specifier
2117
2118 2009-11-30  Xan Lopez  <xlopez@igalia.com>
2119
2120         Reviewed by Gustavo Noronha.
2121
2122         Add new headers to sources list.
2123
2124         * GNUmakefile.am:
2125
2126 2009-11-30  Girish Ramakrishnan  <girish@forwardbias.in>
2127
2128         Reviewed by Holger Freyther.
2129
2130         [Qt] Mac Plugins : Get context menu to work in QGraphicsView
2131         
2132         Flash expects the value in record.where to be the global position for
2133         displaying the context menu.
2134         
2135         https://bugs.webkit.org/show_bug.cgi?id=31979
2136
2137         * plugins/mac/PluginViewMac.cpp:
2138         (WebCore::PluginView::handleMouseEvent):
2139
2140 2009-11-30  Steve Block  <steveblock@google.com>
2141
2142         Reviewed by Eric Seidel.
2143
2144         Adds PLATFORM(CHROMIUM) guards around memory usage code in V8GCController.
2145         https://bugs.webkit.org/show_bug.cgi?id=31925
2146
2147         This code uses ChromiumBridge and Chromium-specific constant values not
2148         appropriate for other platforms such as Android.
2149
2150         Build fix only, no new tests.
2151
2152         * bindings/v8/V8GCController.cpp: Modified. Adds PLATFORM(CHROMIUM) around Chromium-specific code.
2153
2154 2009-11-29  Brent Fulgham  <bfulgham@webkit.org>
2155
2156         Build fix.
2157
2158         Correct draw signature used in ImageCairoWin.cpp.
2159
2160         * platform/graphics/win/ImageCairoWin.cpp:
2161         (WebCore::BitmapImage::getHBITMAPOfSize):
2162         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
2163
2164 2009-11-28  Oliver Hunt  <oliver@apple.com>
2165
2166         Reviewed by Sam Weinig.
2167
2168         postMessage should serialize File objects
2169         https://bugs.webkit.org/show_bug.cgi?id=31955
2170
2171         Update SerializedScriptValue to include support for
2172         File objects in the serialized object graph.
2173
2174         * bindings/js/SerializedScriptValue.cpp:
2175         (WebCore::SerializedScriptValueData::SerializedScriptValueData):
2176         (WebCore::SerializingTreeWalker::convertIfTerminal):
2177         (WebCore::DeserializingTreeWalker::convertIfTerminal):
2178         * bindings/js/SerializedScriptValue.h:
2179         (WebCore::SerializedScriptValueData::):
2180         (WebCore::SerializedScriptValueData::asString):
2181
2182 2009-11-29  Simon Fraser  <simon.fraser@apple.com>
2183
2184         Reviewed by Dan Bernstein.
2185
2186         Optimize the hierarchy rebuilding of compositing layers
2187         https://bugs.webkit.org/show_bug.cgi?id=31879
2188         
2189         When updating the compositing layer hierarchy, instead of removing all
2190         child layers and then re-adding them one by one, build a vector of child
2191         layers, and set them in one go.
2192         
2193         * platform/graphics/GraphicsLayer.h:
2194         * platform/graphics/GraphicsLayer.cpp:
2195         (WebCore::GraphicsLayer::setChildren): New method that takes a Vector of child
2196         GraphicsLayers.
2197         
2198         * platform/graphics/mac/GraphicsLayerCA.h: Override setChildren().
2199         * platform/graphics/win/GraphicsLayerCACF.h: Ditto.
2200         * platform/graphics/mac/GraphicsLayerCA.mm: 
2201         (WebCore::GraphicsLayerCA::setChildren): Implement setChildren() to 
2202         set the bit that notes that sublayers changed.
2203         * platform/graphics/win/GraphicsLayerCACF.cpp:
2204         (WebCore::GraphicsLayerCACF::setChildren): Implement setChildren() to 
2205         udpate sublayers, with a note that this is not efficient.
2206         
2207         * rendering/RenderLayerCompositor.h:
2208         * rendering/RenderLayerCompositor.cpp:
2209         (WebCore::RenderLayerCompositor::updateCompositingLayers):
2210         When updating compositing layers, use the faster updateLayerTreeGeometry() if
2211         we know that no layer hierarchy changes are needed, and, at the root, use
2212         the vector returned from rebuildCompositingLayerTree() to attach the root
2213         layer.
2214         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree): Changed to
2215         collect child layers into Vectors of GraphicsLayers, which can be set as
2216         layer children in one go.
2217         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry): Split out from
2218         rebuildCompositingLayerTree() for simplicity, and called when we just need to
2219         update layer geometry, without doing any reparenting.
2220
2221 2009-11-29  Daniel Bates  <dbates@webkit.org>
2222
2223         Reviewed by Adam Barth.
2224
2225         https://bugs.webkit.org/show_bug.cgi?id=31971
2226
2227         Updated comment to reflect latest XSSAuditor bindings.
2228
2229         No functionality was changed. So, no new tests.
2230
2231         * page/XSSAuditor.h:
2232
2233 2009-11-29  Daniel Bates  <dbates@webkit.org>
2234
2235         Reviewed by Eric Seidel.
2236
2237         https://bugs.webkit.org/show_bug.cgi?id=31969
2238
2239         Removes unnecessary #include files.
2240
2241         No functionality was changed. So, no new tests.
2242
2243         * css/CSSComputedStyleDeclaration.cpp: Removed include CachedImage.h, and
2244         Pair.h
2245         * css/CSSCursorImageValue.cpp: Removed include RenderStyle.h
2246         * css/CSSFontFaceSrcValue.cpp: Removed include Node.h
2247         * css/CSSFontSelector.cpp: Removed include NodeList.h
2248         * css/CSSGradientValue.cpp: Removed include GraphicsContext.h, ImageBuffer.h
2249         * css/CSSImageValue.cpp: Removed include RenderStyle.h
2250         * css/CSSImportRule.cpp: Removed include MediaList.h
2251         * css/CSSMutableStyleDeclaration.cpp: Removed include CSSProperty.h
2252         * css/CSSRule.cpp: Removed include CSSStyleSheet.h
2253         * css/CSSStyleSelector.cpp: Removed include CSSFontFace.h,
2254         CSSFontFaceSource.h, and CSSProperty.h
2255         * page/EventSource.h: Removed include EventListener.h
2256
2257 2009-11-29  Daniel Bates  <dbates@webkit.org>
2258
2259         Reviewed by Eric Seidel.
2260
2261         https://bugs.webkit.org/show_bug.cgi?id=31965
2262
2263         Removed #include KeyframeList.h from CSSStyleSelector.h. Instead,
2264         forward declared it.
2265
2266         As a side effect, we need to #include KeyframeList.h in
2267         RenderLayerBacking.cpp.
2268
2269         No functionality was changed. So, no new tests.
2270
2271         * css/CSSStyleSelector.cpp:
2272         * css/CSSStyleSelector.h: Removed #include KeyframeList.h
2273         * rendering/RenderLayerBacking.cpp: Added #include KeyframeList.h
2274
2275 2009-11-29  Shu Chang  <Chang.Shu@nokia.com>
2276
2277         Reviewed by Eric Seidel.
2278
2279         Continue to search for matching node in the case where multiple nodes
2280         have the same id.
2281         https://bugs.webkit.org/show_bug.cgi?id=31428
2282
2283         Test: fast/dom/Element/id-in-node-list-index01.html
2284
2285         * dom/DynamicNodeList.cpp:
2286         (WebCore::DynamicNodeList::itemWithName):
2287
2288 2009-11-29  Daniel Bates  <dbates@webkit.org>
2289
2290         Reviewed by Eric Seidel.
2291
2292         https://bugs.webkit.org/show_bug.cgi?id=31966
2293
2294         Removed #include RenderStyle.h from file KeyframeAnimation.h. Instead,
2295         forward declared it.
2296
2297         No functionality was changed. So, no new tests.
2298
2299         * page/animation/KeyframeAnimation.cpp:
2300         * page/animation/KeyframeAnimation.h:
2301
2302 2009-11-29  Daniel Bates  <dbates@webkit.org>
2303
2304         Unreviewed, fix change log entry date.
2305
2306         For some reason, bugzilla-tool did not update the date in the change
2307         log entry for my last commit (r51468). So, this commit fixes the date
2308         of that entry.
2309
2310 2009-11-29  Daniel Bates  <dbates@webkit.org>
2311
2312         Reviewed by Dan Bernstein.
2313
2314         https://bugs.webkit.org/show_bug.cgi?id=31964
2315
2316         Removed #include StringImpl, StyleImage. Instead, forward declared them.
2317         Also, we can substitute #include <wtf/PassRefPtr.h> for #include PlatformString.h,
2318         since it seems we only really used it to include PassRefPtr.h.
2319
2320         No functionality was changed. So, no new tests.
2321
2322         * rendering/style/ContentData.h:
2323
2324 2009-11-29  Zoltan Horvath  <zoltan@webkit.org>
2325
2326         Reviewed by Eric Seidel.
2327
2328         Allow custom memory allocation control for classes of the rendering and storage directory in WebCore
2329         https://bugs.webkit.org/show_bug.cgi?id=31906
2330
2331         Inherits the following classes from Noncopyable because these are instantiated
2332         by 'new' and no need to be copyable:
2333
2334         class/struct name               - instantiated at: WebCore/'location'
2335
2336         class SQLTransactionClient      - storage/DatabaseThread.cpp:45
2337         class SQLTransactionCoordinator - storage/DatabaseThread.cpp:46
2338         class OriginUsageRecord         - storage/OriginQuotaManager.cpp:66
2339         class DatabaseTracker           - storage/DatabaseTracker.cpp:62
2340         class ScrollbarTheme            - (its child class) rendering/RenderScrollbarTheme.cpp:35
2341         class RenderSelectionInfoBase   - (its child class) rendering/RenderView.cpp:310
2342         class RenderOverflow            - rendering/RenderBox.cpp:2846
2343
2344         Inherits the following classes from FastAllocBase because these are instantiated by 'new':
2345
2346         struct FillLayer                - css/CSSStyleSelector.cpp:197
2347         struct ShadowData               - rendering/style/ShadowData.cpp:35
2348         class CounterContent            - css/CSSStyleSelector.cpp:4111
2349
2350         * platform/ScrollbarTheme.h:
2351         * rendering/RenderOverflow.h:
2352         * rendering/RenderSelectionInfo.h:
2353         * rendering/style/CounterContent.h:
2354         * rendering/style/FillLayer.h:
2355         * rendering/style/ShadowData.h:
2356         * storage/DatabaseTracker.h:
2357         * storage/OriginUsageRecord.h:
2358         * storage/SQLTransactionClient.h:
2359         * storage/SQLTransactionCoordinator.h:
2360
2361 2009-11-28  Adam Barth  <abarth@webkit.org>
2362
2363         Reviewed by Dimitri Glazkov.
2364
2365         [Chromium] Sify compose button alerts error
2366         https://bugs.webkit.org/show_bug.cgi?id=31394
2367
2368         Test: http/tests/security/calling-versus-current.html
2369
2370         We're supposed to use the calling context for security checks.  In JSC
2371         land, this is the lexicalGlobalObject.
2372
2373         * bindings/v8/V8Proxy.cpp:
2374         (WebCore::V8Proxy::canAccessPrivate):
2375
2376 2009-11-27  Shinichiro Hamaji  <hamaji@chromium.org>
2377
2378         Unreviewed Chromium build fix introduced by r51428.
2379
2380         [Chromium] Ignore line-height CSS property for PushButton
2381         https://bugs.webkit.org/show_bug.cgi?id=31712
2382
2383         * rendering/RenderThemeChromiumSkia.cpp:
2384         (WebCore::RenderThemeChromiumSkia::adjustButtonStyle):
2385
2386 2009-11-27  Shinichiro Hamaji  <hamaji@chromium.org>
2387
2388         Unreviewed Chromium test fix by reverting r51413.
2389
2390         [v8] Do not check the thread when accessing DOMDataStore
2391         https://bugs.webkit.org/show_bug.cgi?id=31877
2392
2393         * bindings/v8/V8DOMMap.cpp:
2394         (WebCore::getDOMNodeMap):
2395         (WebCore::getDOMObjectMap):
2396         (WebCore::getActiveDOMObjectMap):
2397         (WebCore::getDOMSVGElementInstanceMap):
2398         (WebCore::getDOMSVGObjectWithContextMap):
2399
2400 2009-11-27  Daniel Bates  <dbates@webkit.org>
2401
2402         Unreviewed, comment fix.
2403
2404         Corrected misspelling of the word "implemented".
2405
2406         * inspector/front-end/InjectedScriptAccess.js:
2407
2408 2009-11-27  Daniel Bates  <dbates@webkit.org>
2409
2410         Reviewed by Adam Barth.
2411
2412         https://bugs.webkit.org/show_bug.cgi?id=31940
2413
2414         Makes the error messages more descriptive when we refuse to load an object/embed or
2415         refuse to load from the document base URL.
2416
2417         * page/XSSAuditor.cpp:
2418         (WebCore::XSSAuditor::canLoadObject): Changed console message to be more descriptive.
2419         (WebCore::XSSAuditor::canSetBaseElementURL): Ditto.
2420
2421 2009-11-27  Yury Semikhatsky  <yurys@chromium.org>
2422
2423         Reviewed by Pavel Feldman.
2424
2425         This is a WebCore part of the fix that allows to view plugin
2426         resources loaded by plugins.
2427
2428         https://bugs.webkit.org/show_bug.cgi?id=31832
2429
2430         * inspector/InspectorController.cpp:
2431         (WebCore::InspectorController::willSendRequest):
2432         (WebCore::InspectorController::didReceiveResponse):
2433         (WebCore::InspectorController::didReceiveContentLength):
2434         (WebCore::InspectorController::didFinishLoading):
2435         (WebCore::InspectorController::didFailLoading):
2436         * inspector/InspectorController.h:
2437         * inspector/InspectorResource.cpp:
2438         (WebCore::InspectorResource::addLength):
2439         * loader/ResourceLoadNotifier.cpp:
2440         (WebCore::ResourceLoadNotifier::didFailToLoad):
2441         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
2442         (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
2443         (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
2444         (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
2445
2446 2009-11-27  Yury Semikhatsky  <yurys@chromium.org>
2447
2448         Reviewed by Pavel Feldman.
2449
2450         Instead of generating negative identifiers for cached resources in
2451         InspectorController and extending identifier type from 'unsigned long' to 'long
2452         long' reuse progress tracker from the inspected page to generate those
2453         identifiers. It guarantees that InspectorResources have unique ids since
2454         all of them are generated by that progress tracker.
2455
2456         Added a couple new overloaded methods to Script* objects that accept
2457         long and unsigned long arguments. These types of argumens have already
2458         been passed as long long.
2459
2460         https://bugs.webkit.org/show_bug.cgi?id=31921
2461
2462         * bindings/js/ScriptFunctionCall.cpp:
2463         (WebCore::ScriptFunctionCall::appendArgument):
2464         * bindings/js/ScriptFunctionCall.h:
2465         * bindings/js/ScriptObject.cpp:
2466         (WebCore::ScriptObject::set):
2467         * bindings/js/ScriptObject.h:
2468         * bindings/v8/ScriptFunctionCall.cpp:
2469         (WebCore::ScriptFunctionCall::appendArgument):
2470         * bindings/v8/ScriptFunctionCall.h:
2471         * bindings/v8/ScriptObject.cpp:
2472         (WebCore::ScriptObject::set):
2473         * bindings/v8/ScriptObject.h:
2474         * inspector/InspectorBackend.cpp:
2475         (WebCore::InspectorBackend::dispatchOnInjectedScript):
2476         * inspector/InspectorController.cpp:
2477         (WebCore::InspectorController::InspectorController):
2478         (WebCore::InspectorController::getTrackedResource):
2479         (WebCore::InspectorController::didLoadResourceFromMemoryCache): Use inspected page's ProgressTracker to generate unique identifiers for cached resources in InspectorController.
2480         * inspector/InspectorController.h:
2481         * inspector/InspectorDOMAgent.cpp:
2482         (WebCore::InspectorDOMAgent::buildObjectForNode):
2483         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2484         * inspector/InspectorFrontend.cpp:
2485         (WebCore::InspectorFrontend::addResource):
2486         (WebCore::InspectorFrontend::updateResource):
2487         (WebCore::InspectorFrontend::removeResource):
2488         (WebCore::InspectorFrontend::updateFocusedNode):
2489         * inspector/InspectorFrontend.h:
2490         * inspector/InspectorResource.cpp:
2491         (WebCore::InspectorResource::InspectorResource):
2492         (WebCore::InspectorResource::createCached):
2493         * inspector/InspectorResource.h: Change InspectorResource identifier type from 'long long' to 'unsigned long'.
2494         (WebCore::InspectorResource::create):
2495         (WebCore::InspectorResource::identifier):
2496         * inspector/TimelineRecordFactory.cpp:
2497         (WebCore::TimelineRecordFactory::createResourceSendRequestRecord):
2498         (WebCore::TimelineRecordFactory::createResourceReceiveResponseRecord):
2499         (WebCore::TimelineRecordFactory::createResourceFinishRecord):
2500
2501 2009-11-26  Shinichiro Hamaji  <hamaji@chromium.org>
2502
2503         Reviewed by Dan Bernstein.
2504
2505         Assertion failure in RenderBlock::positionForPointWithInlineChildren when running fast/inline/relative-positioned-overflow.html
2506         https://bugs.webkit.org/show_bug.cgi?id=29966
2507
2508         When an empty inline element is clicked, the root inline box has
2509         no leaf children. Use the renderer of a normal child instead.
2510
2511         This change resolves Windows port's assertion failure in a layout test.
2512         Also, this fixes the behavior when a user drags the mouse from an
2513         empty inline element to above texts.
2514
2515         Test: editing/selection/last-empty-inline.html
2516
2517         * rendering/RenderBlock.cpp:
2518         (WebCore::RenderBlock::positionForPointWithInlineChildren):
2519
2520 2009-11-26  Kent Tamura  <tkent@chromium.org>
2521
2522         Reviewed by Eric Seidel.
2523
2524         [Chromium] Ignore line-height CSS property specified to push buttons on
2525         Windows and Linux.
2526         https://bugs.webkit.org/show_bug.cgi?id=31712
2527
2528         LayoutTests/fast/forms/control-restrict-line-height.html checks that the
2529         following controls should ignore line-height CSS property.
2530          - <select>
2531          - <input type=button>
2532          - <input type=search>
2533         This change addresses the <input type=button> issue with Chromium/Windows
2534         and Chromium/Linux.
2535         
2536         * rendering/RenderThemeChromiumSkia.cpp: Implement adjustButtonStyle() to ignore line-height.
2537         * rendering/RenderThemeChromiumSkia.h: Declare adjustButtonStyle().
2538
2539 2009-11-26  Kinuko Yasuda  <kinuko@chromium.com>
2540
2541         Reviewed by Eric Seidel.
2542
2543         Remove the special charset meta tag in the clipboard so that
2544         copy-and-paste with interchange breaklines/spaces works correctly
2545         within WebKit.
2546
2547         No new tests.  Layout tests that involve copy-and-paste with
2548         interchange breaklines (like editing/pasteboard/paste-line-endings-00?)
2549         should pass on Mac/Chromium with this fix.
2550
2551         * platform/chromium/ClipboardChromium.cpp:
2552         * platform/chromium/PasteboardChromium.cpp:
2553         (WebCore::Pasteboard::documentFragment):
2554
2555 2009-11-26  İsmail Dönmez  <ismail@namtrac.org>
2556
2557         Reviewed by Eric Seidel.
2558
2559         Compile with QT_NO_WHEELEVENT defined.
2560
2561         * platform/qt/WheelEventQt.cpp:
2562         (WebCore::PlatformWheelEvent::applyDelta):
2563
2564 2009-11-26  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2565
2566         Reviewed by Oliver Hunt.
2567
2568         Move GOwnPtr* from wtf to wtf/gtk
2569         https://bugs.webkit.org/show_bug.cgi?id=31793
2570
2571         No new tests as there is no functional change.
2572
2573         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp: Change the
2574           path for GOwnPtr.h.
2575         * platform/text/TextEncoding.cpp: Ditto.
2576         * platform/text/gtk/TextCodecGtk.cpp: Ditto.
2577
2578 2009-11-26  Yury Semikhatsky  <yurys@chromium.org>
2579
2580         Not reviewed. Build fix: revert r51421.
2581
2582         * inspector/InspectorController.cpp:
2583         (WebCore::InspectorController::willSendRequest):
2584         (WebCore::InspectorController::didReceiveResponse):
2585         (WebCore::InspectorController::didReceiveContentLength):
2586         (WebCore::InspectorController::didFinishLoading):
2587         (WebCore::InspectorController::didFailLoading):
2588         * inspector/InspectorController.h:
2589         * inspector/InspectorResource.cpp:
2590         (WebCore::InspectorResource::addLength):
2591         * loader/ResourceLoadNotifier.cpp:
2592         (WebCore::ResourceLoadNotifier::didFailToLoad):
2593         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
2594         (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
2595         (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
2596         (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
2597
2598 2009-11-26  Yury Semikhatsky  <yurys@chromium.org>
2599
2600         Reviewed by Pavel Feldman.
2601
2602         This is a WebCore part of the fix that allows to view plugin
2603         resources loaded by plugins.
2604
2605         https://bugs.webkit.org/show_bug.cgi?id=31832
2606
2607         * inspector/InspectorController.cpp:
2608         (WebCore::InspectorController::willSendRequest):
2609         (WebCore::InspectorController::didReceiveResponse):
2610         (WebCore::InspectorController::didReceiveContentLength):
2611         (WebCore::InspectorController::didFinishLoading):
2612         (WebCore::InspectorController::didFailLoading):
2613         * inspector/InspectorController.h: Remove unused DocumentLoader parameters from inspector methods.
2614         * inspector/InspectorResource.cpp:
2615         (WebCore::InspectorResource::addLength): Update loading end time when new data are received.
2616         * loader/ResourceLoadNotifier.cpp:
2617         (WebCore::ResourceLoadNotifier::didFailToLoad): Notify InspectorController about the failure.
2618         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
2619         (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
2620         (WebCore::ResourceLoadNotifier::dispatchDidReceiveContentLength):
2621         (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
2622
2623 2009-11-26  Daniel Bates  <dbates@webkit.org>
2624
2625         Reviewed by Pavel Feldman.
2626
2627         https://bugs.webkit.org/show_bug.cgi?id=21554
2628
2629         Implements support for hovering over <img> src to display the height and width of that image
2630         in a tooltip. Displays both the displayable and natural dimensions of the image.
2631
2632         Test: inspector/elements-img-tooltip.html
2633
2634         * inspector/front-end/ElementsTreeOutline.js:
2635         (WebInspector.ElementsTreeElement.prototype.createTooltipForImageNode): Added.
2636         (WebInspector.ElementsTreeElement.prototype._updateTitle.callback):
2637         (WebInspector.ElementsTreeElement.prototype._updateTitle):
2638         (WebInspector.ElementsTreeElement.prototype._nodeTitleInfo):
2639         * inspector/front-end/ObjectProxy.js:
2640         (WebInspector.ObjectProxy.getPropertiesAsync): Added.
2641         * inspector/front-end/inspector.js:
2642         (WebInspector.linkifyURLAsNode): Added tooltipText argument.
2643         (WebInspector.linkifyURL): Ditto.
2644
2645 2009-11-26  Kevin Ollivier  <kevino@theolliviers.com>
2646
2647         wx build fix after drawPattern API change.
2648
2649         * platform/graphics/wx/ImageWx.cpp:
2650         (WebCore::Image::drawPattern):
2651
2652 2009-11-26  Anton Muhin  <antonm@chromium.org>
2653
2654         Reviewed by Adam Barth.
2655
2656         Use an internal field instead of hidden property to speedup lookup
2657         of entered isolated world.
2658
2659         Plus some inlinings.
2660         https://bugs.webkit.org/show_bug.cgi?id=31884
2661
2662         Covered by layout tests + manual running of some benchmarks as
2663         content scripts.
2664
2665         * bindings/v8/V8DOMWrapper.cpp:
2666         * bindings/v8/V8DOMWrapper.h:
2667         (WebCore::V8DOMWrapper::setDOMWrapper):
2668         * bindings/v8/V8HiddenPropertyName.h:
2669         * bindings/v8/V8IsolatedWorld.cpp:
2670         (WebCore::V8IsolatedWorld::V8IsolatedWorld):
2671         * bindings/v8/V8IsolatedWorld.h:
2672         (WebCore::V8IsolatedWorld::getEntered):
2673         (WebCore::V8IsolatedWorld::getGlobalObject):
2674         * bindings/v8/custom/V8CustomBinding.h:
2675
2676 2009-11-26  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2677
2678         Reviewed by Kenneth Rohde Christiansen.
2679
2680         [Qt] Corrects build break on Windows.
2681
2682         Rename platform/text/qt/TextBoundaries.cpp to TextBoundariesQt.cpp since
2683         platform/text/TextBoundaries.cpp was compiled instead when compiling with nmake.
2684
2685         * WebCore.pro:
2686         * platform/text/qt/TextBoundariesQt.cpp: Renamed from WebCore/platform/text/qt/TextBoundaries.cpp.
2687         (WebCore::findNextWordFromIndex):
2688         (WebCore::findWordBoundary):
2689
2690 2009-11-26  Anton Muhin  <antonm@chromium.org>
2691
2692         Reviewed by Adam Barth.
2693
2694         Do not check if the thread is main or not when accessing DOMDataStore as currently in Chromium WebKit is used in main thread only.
2695         https://bugs.webkit.org/show_bug.cgi?id=31877
2696
2697         Covered by layout tests and buildbots.
2698
2699         * bindings/v8/V8DOMMap.cpp:
2700         (WebCore::getDOMNodeMap):
2701         (WebCore::getDOMObjectMap):
2702         (WebCore::getActiveDOMObjectMap):
2703         (WebCore::getDOMSVGElementInstanceMap):
2704         (WebCore::getDOMSVGObjectWithContextMap):
2705
2706 2009-11-26  Girish Ramakrishnan  <girish@forwardbias.in>
2707
2708         Reviewed by Holger Freyther.
2709
2710         [Qt] Mac Plugins : Pass mouse position relative to the fake window
2711         
2712         When using off-screen rendering, we need to pass mouse events relative
2713         to the fake window instead of the global position.
2714         
2715         https://bugs.webkit.org/show_bug.cgi?id=31794
2716
2717         * plugins/mac/PluginViewMac.cpp:
2718         (WebCore::PluginView::platformStart):
2719         (WebCore::PluginView::handleMouseEvent):
2720
2721 2009-11-24  Holger Hans Peter Freyther  <zecke@selfish.org>
2722
2723         Reviewed by Eric Seidel.
2724
2725         [Qt] Use QNetworkReply::rawHeaderPairs
2726         https://bugs.webkit.org/show_bug.cgi?id=31826
2727
2728         The QNetworkReply is internally storing the HTTP headers
2729         as a list of pairs. Currently we have to ask the QNetworkReply
2730         to put all header names into a QStringList. Afterwards we will
2731         iterate over this QStringList and ask the QNetworkReply to
2732         give us the value for this header name. The current Qt implementation
2733         is doing a linear to find the header value.
2734
2735         Use a new API to directly access the list of pairs and push
2736         this into WebCore. This avoids doing some allocations and doing
2737         linear searches from within a loop.
2738
2739         * platform/network/qt/QNetworkReplyHandler.cpp:
2740         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
2741
2742 2009-11-21  Holger Hans Peter Freyther  <zecke@selfish.org>
2743
2744         Reviewed by Kenneth Rohde Christiansen.
2745
2746         [Qt] Add Qt specific information of RenderPart
2747         https://bugs.webkit.org/show_bug.cgi?id=31203
2748
2749         The WebCore::Widget of the RenderPart (RenderWidget) might be
2750         backed with a platform widget. Print both the WebCore::Widget
2751         and platform widget state. In the above bug we had a problem
2752         that the WebCore::Widget was invisible but the QWidget was
2753         visible.
2754
2755         * rendering/RenderTreeAsText.cpp:
2756         (WebCore::operator<<): Add special case for RenderPart
2757
2758 2009-11-17  Holger Hans Peter Freyther  <zecke@selfish.org>
2759
2760         Reviewed by Kenneth Rohde Christiansen.
2761
2762         [Qt] Call Widget::setSelfVisible from hide/show
2763         https://bugs.webkit.org/show_bug.cgi?id=31203
2764
2765         Call Widget::setSelfVisible from Widget::show and
2766         Widget::hide and use isParentVisible to decide
2767         if the widget should be shown. This way client
2768         code can rely on isVisible.
2769
2770         Change PluginViewQt::show, PluginViewQt::hide to
2771         call the base class as it is doing the right thing
2772         now. Add an assert verify that platfomWidget and
2773         platformPluginWidget are the same.
2774
2775         * manual-tests/qt/qtplugin.html: Modify manual test
2776         * platform/qt/WidgetQt.cpp:
2777         (WebCore::Widget::show):
2778         (WebCore::Widget::hide):
2779         * plugins/qt/PluginViewQt.cpp:
2780         (WebCore::PluginView::show):
2781         (WebCore::PluginView::hide):
2782
2783 2009-11-24  Holger Hans Peter Freyther  <zecke@selfish.org>
2784
2785         Reviewed by Alexey Proskuryakov.
2786
2787         Fix compilation of REQUEST_DEBUG debug code
2788         https://bugs.webkit.org/show_bug.cgi?id=31850
2789
2790         In r47907 the single parameter KURL constructor to parse
2791         from a WebCore::String was replaced with a two parameter
2792         constructor. I think in this debug case parsing the urls
2793         again is no problem and I have changed the code to use the
2794         two parameter version.
2795
2796         * loader/loader.cpp:
2797         (WebCore::Loader::Host::didFinishLoading):
2798
2799 2009-11-26  Søren Gjesse  <sgjesse@chromium.org>
2800
2801         Reviewed by Pavel Feldman.
2802
2803         [V8] Avoid using JavaScript objects as context data
2804         https://bugs.webkit.org/show_bug.cgi?id=31873
2805
2806         Change the context "data" from a JavaScript object holding the two properties type and value to
2807         a string holding type and value separated by a comma.
2808
2809         * bindings/v8/V8Proxy.cpp:
2810         (WebCore::V8Proxy::setInjectedScriptContextDebugId):
2811         (WebCore::V8Proxy::setContextDebugId):
2812         (WebCore::V8Proxy::contextDebugId):
2813
2814 2009-11-25  Dimitri Glazkov  <dglazkov@chromium.org>
2815
2816         Reviewed by David Levin.
2817
2818         [Chromium] Implement canSetValueAttribute in the API, the clean-up part.
2819         https://bugs.webkit.org/show_bug.cgi?id=31894
2820
2821         * accessibility/chromium/AccessibilityObjectWrapper.h: Added RefCounted decl.
2822         (WebCore::AccessibilityObjectWrapper::AccessibilityObjectWrapper): Removed mis-refcountingness.
2823
2824 2009-11-25  Kenneth Russell  <kbr@google.com>
2825
2826         Reviewed by Oliver Hunt.
2827
2828         Off-by-one error in index validation for drawElements and drawArrays
2829         https://bugs.webkit.org/show_bug.cgi?id=31891
2830
2831         Fixed computation of number of elements for bound array objects.
2832
2833         Test: fast/canvas/webgl/index-validation.html
2834
2835         * html/canvas/WebGLRenderingContext.cpp:
2836         (WebCore::WebGLRenderingContext::vertexAttribPointer):
2837
2838 2009-11-25  Dmitry Titov  <dimich@chromium.org>
2839
2840         Reviewed by David Levin.
2841
2842         Update SharedScript to use eventNames() instead of EventNames()
2843         https://bugs.webkit.org/show_bug.cgi?id=31890
2844
2845         * SharedScript/WebKitSharedScript.cpp:
2846         (WebCore::LoadEventTask::performTask):
2847
2848 2009-11-25  Eric Carlson  <eric.carlson@apple.com>
2849
2850         Reviewed by Simon Fraser.
2851
2852         <rdar://problem/7409331> Windows: Support closed caption in <video> element
2853
2854         Enable closed captions in QuickTime/Windows media engine.
2855
2856         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
2857         (WebCore::MediaPlayerPrivate::hasClosedCaptions):
2858         (WebCore::MediaPlayerPrivate::setClosedCaptionsVisible):
2859             New, all through to m_qtMovie.
2860
2861         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
2862             Make all but the destructor private since MediaPlayer call through the media
2863             engine interface.
2864
2865         * platform/graphics/win/QTMovieWin.cpp:
2866         (QTMovieWin::disableUnsupportedTracks):
2867             Use handy new constants for QuickTime track types.
2868         (QTMovieWin::hasClosedCaptions):
2869         (QTMovieWin::setClosedCaptionsVisible):
2870             New, closed caption support.
2871         * platform/graphics/win/QTMovieWin.h:
2872
2873         * rendering/RenderMediaControls.cpp:
2874         (WebCore::RenderMediaControls::paintMediaControlsPart):
2875             Deal with closed caption buttons.
2876
2877         * rendering/RenderThemeWin.cpp:
2878         (WebCore::RenderThemeWin::shouldRenderMediaControlPart):
2879             New, don't ask the media engine if it has closed captions unless the Safari theme will
2880             be able to render the button.
2881         (WebCore::RenderThemeWin::paintMediaToggleClosedCaptionsButton):
2882             New.
2883         * rendering/RenderThemeWin.h:
2884
2885 2009-11-25  Drew Wilson  <atwilson@chromium.org>
2886
2887         Reviewed by David Levin.
2888
2889         MessagePorts always look remotely entangled even when closed.
2890         https://bugs.webkit.org/show_bug.cgi?id=31698
2891
2892         Tests: Existing tests suffice, Chromium soak test passes now.
2893
2894         * bindings/v8/custom/V8CustomBinding.h:
2895         Removed kMessagePortEntangledPortIndex which is no longer used.
2896         * bindings/v8/V8GCController.cpp:
2897         (WebCore::GCPrologueVisitor::visitDOMWrapper):
2898         Simplified GC code to reflect the Chromium MessagePort implementation
2899         (locallyEntangledPort() always returns false).
2900         (WebCore::GCEpilogueVisitor::visitDOMWrapper):
2901         Cleaned up epilogue code to handle the case where the port gets closed
2902         in mid-GC (due to the parent context being freed).
2903         * dom/MessagePort.cpp:
2904         (WebCore::MessagePort::MessagePort):
2905         (WebCore::MessagePort::close):
2906         Now sets the closed flag.
2907         (WebCore::MessagePort::disentanglePorts):
2908         Updated to use new isCloned() API instead of relying on isEntangled(), which was incorrect.
2909         * dom/MessagePort.h:
2910         Added a m_closed flag and updated isEntangled() to check it.
2911         (WebCore::MessagePort::isEntangled):
2912         Now returns false if the port has been closed.
2913         (WebCore::MessagePort::isCloned):
2914         Added new API to differentiate between cloned and closed ports (closed ports can still be passed to postMessage).
2915
2916 2009-11-25  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2917
2918         Reviewed by Simon Hausmann.
2919
2920         [Qt] Fix crash of QtWebKit on any page with Flash when compiled with MinGW.
2921
2922         Fix inline assembly, don't dereference the function pointer twice.
2923
2924         * plugins/win/PluginViewWin.cpp:
2925         (WebCore::PluginView::hookedBeginPaint):
2926         (WebCore::PluginView::hookedEndPaint):
2927
2928 2009-11-22  Jakub Wieczorek  <faw217@gmail.com>
2929
2930         Reviewed by Adam Barth.
2931
2932         [Qt] Remove the Referer header when redirecting to a non-secure site
2933         https://bugs.webkit.org/show_bug.cgi?id=31785
2934
2935         This makes Qt pass two tests introduced in r50226.
2936
2937         * platform/network/qt/QNetworkReplyHandler.cpp:
2938         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
2939
2940 2009-11-25  Andrei Popescu  <andreip@google.com>
2941
2942         Reviewed by Dimitri Glazkov.
2943
2944         The select elements do not reflect the actual choice the user makes.
2945         https://bugs.webkit.org/show_bug.cgi?id=31831
2946
2947         Handle the drawing of the listboxes in Android code.
2948
2949         No new features, just fixing an Android problem. Existing layout tests are sufficient.
2950
2951         * platform/android/RenderThemeAndroid.cpp:
2952         (WebCore::theme):
2953         (WebCore::RenderThemeAndroid::platformActiveSelectionBackgroundColor):
2954         (WebCore::RenderThemeAndroid::platformActiveListBoxSelectionBackgroundColor):
2955         (WebCore::RenderThemeAndroid::platformInactiveListBoxSelectionBackgroundColor):
2956         (WebCore::RenderThemeAndroid::platformActiveListBoxSelectionForegroundColor):
2957         (WebCore::RenderThemeAndroid::platformInactiveListBoxSelectionForegroundColor):
2958         (WebCore::RenderThemeAndroid::adjustButtonStyle):
2959         (WebCore::RenderThemeAndroid::paintTextArea):
2960         (WebCore::RenderThemeAndroid::adjustListboxStyle):
2961         * platform/android/RenderThemeAndroid.h:
2962
2963 2009-11-25  Alexander Pavlov  <apavlov@chromium.org>
2964
2965         Reviewed by Pavel Feldman.
2966
2967         Load InspectorResource mime type from CachedResource for 304 responses
2968
2969         For network libraries that do not merge cache data into 304 ResourceResponses,
2970         the mime type for cached resources is unknown.
2971         https://bugs.webkit.org/show_bug.cgi?id=31868
2972
2973         * inspector/InspectorResource.cpp:
2974         (WebCore::InspectorResource::updateResponse):
2975         (WebCore::InspectorResource::updateScriptObject):
2976         (WebCore::InspectorResource::type):
2977
2978 2009-11-25  Andrei Popescu  <andreip@google.com>
2979
2980         Reviewed by Eric Seidel.
2981
2982         Android is missing implementation of SSL Key generator functions.
2983         https://bugs.webkit.org/show_bug.cgi?id=31825
2984
2985         This change adds the PlatformBridge class to platform/android.
2986         PlarformBridge is used to access the embedding layer for things
2987         such as key generator, cookies, plugins, etc.
2988
2989         No new tests required, this is platform code.
2990
2991         * platform/android/PlatformBridge.h: Added.
2992         * platform/android/SSLKeyGeneratorAndroid.cpp: Added.
2993         (WebCore::getSupportedKeySizes):
2994         (WebCore::signedPublicKeyAndChallengeString):
2995
2996 2009-11-25  Philippe Normand  <pnormand@igalia.com>
2997
2998         Reviewed by Eric Seidel.
2999
3000         [GTK] use gst_init_check() instead of gst_init()
3001         https://bugs.webkit.org/show_bug.cgi?id=31864
3002
3003         Use gst_init_check() instead of gst_init() to prevent eventual
3004         unexpected exit of the application.
3005
3006         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
3007         (WebCore::do_gst_init):
3008         (WebCore::MediaPlayerPrivate::isAvailable):
3009
3010 2009-11-25  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
3011
3012         Reviewed by Xan Lopez.
3013
3014         Some tests are crashing from time to time
3015         https://bugs.webkit.org/show_bug.cgi?id=31866
3016
3017         Make sure we do not notify the client of a finished load, if the
3018         load has been cancelled, or the client is gone.
3019
3020         * platform/network/soup/ResourceHandleSoup.cpp:
3021         (WebCore::):
3022
3023 2009-11-24  Ben Murdoch  <benm@google.com>
3024
3025         Reviewed by Eric Seidel.
3026
3027         [Android] Upstream Android changes to WebCore/bridge/jni
3028         https://bugs.webkit.org/show_bug.cgi?id=31824
3029
3030         No new tests required as no new functionality.
3031
3032         * bridge/jni/jni_class.cpp:
3033         (JavaClass::JavaClass): Add calls to delete allocated references, to avoid potential leaks.
3034         * bridge/jni/jni_instance.cpp: Add an Android include path.
3035         * bridge/jni/jni_instance.h: Add getter/setter for JObjectWrapper::_instance and make the JavaInstance ctor and member variables protected. Both needed for the Android port, see bug for discussion.
3036         (JSC::Bindings::JObjectWrapper::instance): Added.
3037         (JSC::Bindings::JObjectWrapper::setInstance): Added.
3038         * bridge/jni/jni_runtime.cpp:
3039         (JavaMethod::JavaMethod): Delete an allocated reference to avoid a potential leak.
3040         * bridge/jni/jni_utility.h:
3041         (JSC::Bindings::callJNIMethodV): Delete an allocated reference to avoid a potential leak.
3042
3043 2009-11-24  Zoltan Horvath  <zoltan@webkit.org>
3044
3045         Reviewed by Eric Seidel.
3046
3047         Allow custom memory allocation control for classes of the plugins and rendering directory in WebCore
3048         https://bugs.webkit.org/show_bug.cgi?id=31827
3049
3050         Inherits the following classes from Noncopyable because these are instantiated
3051         by 'new' and no need to be copyable:
3052
3053         class/struct name               - instantiated at: WebCore/'location'
3054
3055         class PluginRequest             - plugins/PluginView.cpp:521
3056         class PluginMainThreadScheduler - plugins/PluginMainThreadScheduler.cpp:34
3057         class PluginDatabase            - plugins/PluginDatabase.cpp:50
3058         struct MimeClassInfo            - plugins/PluginInfoStore.cpp:50
3059         struct PluginInfo               - plugins/PluginInfoStore.cpp:40
3060         class RenderArena               - dom/Document.cpp:1401
3061         class RenderImageScaleData      - rendering/RenderImage.cpp:149
3062         class TableLayout               - (its child class) rendering/RenderTable.cpp:82
3063         struct ColumnInfo               - rendering/RenderBlock.cpp:3590
3064         struct FloatingObject           - rendering/RenderBlock.cpp:2300
3065         struct MaxMargin                - rendering/RenderBlock.cpp:4794
3066         class RenderMarquee             - rendering/RenderLayer.cpp:3277
3067
3068         * plugins/PluginData.h:
3069         * plugins/PluginDatabase.h:
3070         * plugins/PluginMainThreadScheduler.h:
3071         * plugins/PluginView.h:
3072         * rendering/RenderArena.h:
3073         * rendering/RenderBlock.cpp:
3074         * rendering/RenderBlock.h:
3075         * rendering/RenderImage.cpp:
3076         * rendering/RenderMarquee.h:
3077         * rendering/TableLayout.h:
3078
3079 2009-11-24  Dmitry Titov  <dimich@chromium.org>
3080
3081         Reviewed by David Levin.
3082
3083         Initial implementation of WebKitSharedScript and SharedScriptContext
3084         https://bugs.webkit.org/show_bug.cgi?id=31569
3085
3086         No new tests since there are no bindings yet (soon to come).
3087
3088         * DerivedSources.make: Add WebKitSharedScript and SharedScriptContext to a list of idl files.
3089         * WebCore.xcodeproj/project.pbxproj:
3090         * dom/Document.cpp:
3091         (WebCore::Document::detach): Notify WebKitSharedScriptRepository that document is detaching.
3092         * dom/EventTarget.cpp: Add new casting methods, since the new types are EventTargets.
3093         (WebCore::EventTarget::toWebKitSharedScript):
3094         (WebCore::EventTarget::toSharedScriptContext):
3095         * dom/EventTarget.h: Ditto
3096         * dom/ScriptExecutionContext.h:
3097         (WebCore::ScriptExecutionContext::isSharedScriptContext): New virtual method, since there is a new type of context.
3098
3099         * SharedScript/SharedScriptContext.cpp: Added. Similar to WorkerContext, but w/o threading.
3100         (WebCore::SharedScriptContext::SharedScriptContext):
3101         (WebCore::SharedScriptContext::~SharedScriptContext):
3102         (WebCore::SharedScriptContext::clearScript):
3103         (WebCore::SharedScriptContext::virtualURL):
3104         (WebCore::SharedScriptContext::virtualCompleteURL):
3105         (WebCore::SharedScriptContext::reportException):
3106         (WebCore::SharedScriptContext::addMessage):
3107         (WebCore::SharedScriptContext::resourceRetrievedByXMLHttpRequest):
3108         (WebCore::SharedScriptContext::scriptImported):
3109         (WebCore::SharedScriptContext::matches):
3110         (WebCore::SharedScriptContext::addToDocumentsList):
3111         (WebCore::SharedScriptContext::destructionTimerFired):
3112         (WebCore::SharedScriptContext::removeFromDocumentList):
3113         (WebCore::SharedScriptContext::load):
3114         (WebCore::SharedScriptContext::postTask):
3115         (WebCore::SharedScriptContext::eventTargetData):
3116         (WebCore::SharedScriptContext::ensureEventTargetData):
3117         (WebCore::SharedScriptContext::scriptExecutionContext):
3118         * SharedScript/SharedScriptContext.h: Added.
3119         (WebCore::SharedScriptContext::create):
3120         (WebCore::SharedScriptContext::isSharedScriptContext):
3121         (WebCore::SharedScriptContext::userAgent):
3122         (WebCore::SharedScriptContext::toSharedScriptContext):
3123         (WebCore::SharedScriptContext::self):
3124         (WebCore::SharedScriptContext::script):
3125         (WebCore::SharedScriptContext::loaded):
3126         (WebCore::SharedScriptContext::name):
3127         (WebCore::SharedScriptContext::refEventTarget):
3128         (WebCore::SharedScriptContext::derefEventTarget):
3129         (WebCore::SharedScriptContext::refScriptExecutionContext):
3130         (WebCore::SharedScriptContext::derefScriptExecutionContext):
3131         * SharedScript/SharedScriptContext.idl: Added.
3132
3133         * SharedScript/SharedScriptController.h: 
3134         Added. Empty implementation of a ScriptController, will come later as part of bindings. Needed to compile.
3135
3136         * SharedScript/WebKitSharedScript.cpp: Added. EventTarget-based DOM object.
3137         (WebCore::WebKitSharedScript::WebKitSharedScript):
3138         (WebCore::WebKitSharedScript::~WebKitSharedScript):
3139         (WebCore::WebKitSharedScript::setContext):
3140         (WebCore::LoadEventTask::create): Fires asynchronous 'load' event when underlying SharedScriptContext is initialized.
3141         (WebCore::LoadEventTask::performTask):
3142         (WebCore::LoadEventTask::LoadEventTask):
3143         (WebCore::WebKitSharedScript::scheduleLoadEvent):
3144         * SharedScript/WebKitSharedScript.h: Added.
3145         (WebCore::WebKitSharedScript::create):
3146         (WebCore::WebKitSharedScript::scriptExecutionContext):
3147         (WebCore::WebKitSharedScript::toWebKitSharedScript):
3148         (WebCore::WebKitSharedScript::context):
3149         (WebCore::WebKitSharedScript::refEventTarget):
3150         (WebCore::WebKitSharedScript::derefEventTarget):
3151         (WebCore::WebKitSharedScript::eventTargetData):
3152         (WebCore::WebKitSharedScript::ensureEventTargetData):
3153         * SharedScript/WebKitSharedScript.idl: Added.
3154
3155         * SharedScript/WebKitSharedScriptRepository.cpp: Added. Implements a list of running SharedScriptContexts.
3156         (WebCore::ScriptLoader::ScriptLoader): The helper class to load an initial script of SharedScriptContext.
3157         (WebCore::ScriptLoader::load):
3158         (WebCore::ScriptLoader::notifyFinished):
3159         (WebCore::WebKitSharedScriptRepository::instance): Repository has a static global instance.
3160         (WebCore::WebKitSharedScriptRepository::connect):
3161         (WebCore::WebKitSharedScriptRepository::documentDetached): Called from Document::detach().
3162         (WebCore::WebKitSharedScriptRepository::removeSharedScriptContext): Called from ~SharedScriptContext().
3163         (WebCore::WebKitSharedScriptRepository::connectToSharedScript):
3164         (WebCore::WebKitSharedScriptRepository::getSharedScriptContext):
3165         * SharedScript/WebKitSharedScriptRepository.h: Added.
3166         (WebCore::WebKitSharedScriptRepository::WebKitSharedScriptRepository):
3167
3168 2009-11-24  Dmitry Titov  <dimich@chromium.org>
3169
3170         Reviewed by Eric Seidel.
3171
3172         Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit
3173         https://bugs.webkit.org/show_bug.cgi?id=31444
3174
3175         * Configurations/FeatureDefines.xcconfig:
3176         * GNUmakefile.am:
3177         * WebCore.pro:
3178
3179 2009-11-24  Chris Marrin  <cmarrin@apple.com>
3180
3181         Reviewed by Simon Fraser.
3182
3183         Implement accelerated compositing
3184         https://bugs.webkit.org/show_bug.cgi?id=27314
3185         
3186         This part of the checkin adds the Windows specific GraphicsLayer support files.
3187         It provides the interface between GraphicsLayer and CACF. It also deals with
3188         the compositing loop, and provides the plumbing to pass the root layer up to
3189         WebView.
3190
3191         * WebCore.vcproj/WebCore.vcproj:
3192         * WebCore.vcproj/WebCoreCommon.vsprops:
3193         * page/FrameView.cpp:
3194         (WebCore::FrameView::syncCompositingStateRecursive):
3195         * platform/graphics/GraphicsLayer.cpp:
3196         (WebCore::GraphicsLayer::GraphicsLayer):
3197         * platform/graphics/GraphicsLayer.h:
3198         * platform/graphics/win/GraphicsLayerCACF.cpp: Added.
3199         * platform/graphics/win/GraphicsLayerCACF.h: Added.
3200         * platform/graphics/win/WKCACFContextFlusher.cpp: Added.
3201         * platform/graphics/win/WKCACFContextFlusher.h: Added.
3202         * platform/graphics/win/WKCACFContextFlusherWin.cpp: Added.
3203         * platform/graphics/win/WKCACFLayer.cpp: Added.
3204         * platform/graphics/win/WKCACFLayer.h: Added.
3205         * platform/graphics/win/WKCACFLayerWindow.cpp: Added.
3206         * platform/graphics/win/WKCACFLayerWindow.h: Added.
3207
3208 2009-11-24  Chris Marrin  <cmarrin@apple.com>
3209
3210         Reviewed by Eric Seidel.
3211
3212         Do error checking of parameter to createShader
3213         https://bugs.webkit.org/show_bug.cgi?id=31808
3214
3215         Test: fast/canvas/webgl/invalidPassedParams.html
3216
3217         * html/canvas/WebGLRenderingContext.cpp:
3218         (WebCore::WebGLRenderingContext::createShader):
3219         * html/canvas/WebGLRenderingContext.h:
3220         * html/canvas/WebGLRenderingContext.idl:
3221
3222 2009-11-24  Kent Tamura  <tkent@chromium.org>
3223
3224         Reviewed by Eric Seidel.
3225
3226         [Chromium] Ignore line-height CSS property specified to a search field on
3227         Windows and Linux.
3228         https://bugs.webkit.org/show_bug.cgi?id=31820
3229
3230         LayoutTests/fast/forms/control-restrict-line-height.html checks that the
3231         following controls should ignore line-height CSS property.
3232          - <select>
3233          - <input type=button>
3234          - <input type=search>
3235         This change addresses the <input type=search> issue with Chromium/Windows
3236         and Chromium/Linux.
3237
3238         * rendering/RenderThemeChromiumSkia.cpp:
3239         (WebCore::RenderThemeChromiumSkia::adjustSearchFieldStyle): Implement this to ignore line-height.
3240         * rendering/RenderThemeChromiumSkia.h: Declare adjustSearchFieldStyle().
3241
3242 2009-11-24  Simon Fraser  <simon.fraser@apple.com>
3243
3244         No review.
3245
3246         Stylistic fix: indent the member var initialisation.
3247
3248         * platform/graphics/mac/GraphicsLayerCA.mm:
3249         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
3250
3251 2009-11-24  Gavin Barraclough  <barraclough@apple.com>
3252
3253         Reviewed by Geoff Garen.
3254
3255         Bug 31848 - Remove uses of mainThreadCurrentWorld, and of currentWorld using a globalData.
3256
3257         These methods get the world from the global data rather than from an execstate.
3258         If the current world is always read from an exec state then it can be read
3259         from the global object, and world entry can become automagical, rather than
3260         being explicitly set by an EnterDOMWrapperWorld.
3261
3262         * bindings/js/JSCSSRuleCustom.cpp:
3263         (WebCore::toJS):
3264         * bindings/js/JSCSSValueCustom.cpp:
3265         (WebCore::toJS):
3266         * bindings/js/JSDOMBinding.cpp:
3267         (WebCore::currentWorld):
3268         (WebCore::DOMObjectWrapperMapFor):
3269         (WebCore::hasCachedDOMObjectWrapper):
3270         (WebCore::getCachedDOMObjectWrapper):
3271         (WebCore::cacheDOMObjectWrapper):
3272         (WebCore::hasCachedDOMNodeWrapper):
3273         (WebCore::getCachedDOMNodeWrapper):
3274         (WebCore::cacheDOMNodeWrapper):
3275         * bindings/js/JSDOMBinding.h:
3276         (WebCore::createDOMObjectWrapper):
3277         (WebCore::getDOMObjectWrapper):
3278         (WebCore::createDOMNodeWrapper):
3279         (WebCore::getDOMNodeWrapper):
3280         * bindings/js/JSDOMWindowCustom.cpp:
3281         (WebCore::JSDOMWindow::history):
3282         (WebCore::JSDOMWindow::location):
3283         * bindings/js/JSDocumentCustom.cpp:
3284         (WebCore::JSDocument::location):
3285         (WebCore::toJS):
3286         * bindings/js/JSElementCustom.cpp:
3287         (WebCore::toJSNewlyCreated):
3288         * bindings/js/JSEventCustom.cpp:
3289         (WebCore::toJS):
3290         * bindings/js/JSHTMLCollectionCustom.cpp:
3291         (WebCore::toJS):
3292         * bindings/js/JSImageDataCustom.cpp:
3293         (WebCore::toJS):
3294         * bindings/js/JSNodeCustom.cpp:
3295         (WebCore::JSNode::markChildren):
3296         (WebCore::createWrapper):
3297         (WebCore::toJS):
3298         * bindings/js/JSSVGPathSegCustom.cpp:
3299         (WebCore::toJS):
3300         * bindings/js/JSStyleSheetCustom.cpp:
3301         (WebCore::toJS):
3302         * xml/XMLHttpRequest.cpp:
3303         (WebCore::XMLHttpRequest::dropProtection):
3304
3305 2009-11-24  Alexey Proskuryakov  <ap@apple.com>
3306
3307         Windows build fix.
3308
3309         * platform/network/cf/SocketStreamHandleCFNet.cpp: Also, don't include the wrong one!
3310
3311 2009-11-24  Alexey Proskuryakov  <ap@apple.com>
3312
3313         Windows build fix.
3314
3315         * platform/network/cf/SocketStreamHandleCFNet.cpp: Include the proper WKSI header.
3316
3317 2009-11-24  Simon Fraser  <simon.fraser@apple.com>
3318
3319         Reviewed by Oliver Hunt.
3320
3321         SVGUseElement::toClipPath can crash
3322         <rdar://problem/7385270>
3323
3324         Null-test m_shadowTreeRootElement again, because the call to buildPendingResource() may not
3325         actually initialize it.
3326
3327         * svg/SVGUseElement.cpp:
3328         (WebCore::SVGUseElement::toClipPath):
3329
3330 2009-11-24  Simon Fraser  <simon.fraser@apple.com>
3331
3332         Windows build fix.
3333
3334         * page/win/FrameCGWin.cpp:
3335         (WebCore::imageFromRect):
3336         (WebCore::imageFromSelection):
3337
3338 2009-11-24  Eric Carlson  <eric.carlson@apple.com>
3339
3340         Not reviewed. Revert r51351 until a new WebKitSupportLibrary is available.
3341
3342         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
3343         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
3344         * platform/graphics/win/QTMovieWin.cpp:
3345         * platform/graphics/win/QTMovieWin.h:
3346         * rendering/RenderMediaControls.cpp:
3347         * rendering/RenderThemeWin.cpp:
3348         * rendering/RenderThemeWin.h:
3349
3350 2009-11-24  Alexey Proskuryakov  <ap@apple.com>
3351
3352         Reviewed by Brady Eidson.
3353
3354         https://bugs.webkit.org/show_bug.cgi?id=31844
3355         SocketStreamHandleCFNet should support CONNECT proxy credentials
3356
3357         * WebCore.vcproj/WebCore.vcproj:
3358         * WebCore.xcodeproj/project.pbxproj:
3359         * platform/network/CredentialStorage.h:
3360         * platform/network/mac/CredentialStorageMac.mm: Added.
3361         (WebCore::CredentialStorage::getFromPersistentStorage):
3362         * platform/network/cf/CredentialStorageCFNet.cpp: Added.
3363         (WebCore::CredentialStorage::getFromPersistentStorage):
3364         Add support for fetching credentials from persistent storage (CFNet version is currently
3365         a stub).
3366
3367         * bindings/js/JSWebSocketCustom.cpp: Removed an unneeded include.
3368
3369         * platform/network/cf/SocketStreamHandle.h:
3370         * platform/network/cf/SocketStreamHandleCFNet.cpp:
3371         (WebCore::SocketStreamHandle::SocketStreamHandle):
3372         (WebCore::SocketStreamHandle::createStreams):
3373         (WebCore::getStoredCONNECTProxyCredentials):
3374         (WebCore::authenticationSchemeFromAuthenticationMethod):
3375         (WebCore::SocketStreamHandle::addCONNECTCredentials):
3376         (WebCore::SocketStreamHandle::readStreamCallback):
3377         Check if connection attempt was resulted in 407, and try stored credentials if it did.
3378
3379         * platform/mac/WebCoreSystemInterface.h:
3380         * platform/mac/WebCoreSystemInterface.mm:
3381         * WebCore.base.exp:
3382         Updated WKSI.
3383
3384 2009-11-24  Simon Fraser  <simon.fraser@apple.com>
3385
3386         Reviewed by Dan Bernstein.
3387
3388         Find highlight is drawn incorrectly on pages with compositing layers
3389         <rdar://problem/7413925>
3390         
3391         Part 2: Add a new bit to the PaintBehavior flags, PaintBehaviorFlattenCompositingLayers,
3392         and pass that down when painting into an image.
3393         
3394         When set, it forces painting of compositing layers to go down a software paint path
3395         when all layers are painted, irrespective of compositing status, and where
3396         3d transforms are flattened to 2d. When doing this, we also need to use temporary
3397         clip rects for layers which are normally composited.
3398         
3399         * page/FrameView.h:
3400         (WebCore::FrameView::paintBehavior):
3401         * page/mac/FrameMac.mm:
3402         (WebCore::Frame::imageFromRect):
3403         * rendering/RenderLayer.cpp:
3404         (WebCore::RenderLayer::renderableTransform):
3405         (WebCore::expandClipRectForDescendantsAndReflection):
3406         (WebCore::transparencyClipBox):
3407         (WebCore::RenderLayer::beginTransparencyLayers):
3408         (WebCore::RenderLayer::paintLayer):
3409         * rendering/RenderLayer.h:
3410         (WebCore::RenderLayer::paintsWithTransparency):
3411         (WebCore::RenderLayer::paintsWithTransform):
3412         * rendering/RenderLayerCompositor.cpp:
3413         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
3414         * rendering/RenderObject.h:
3415
3416 2009-11-24  Simon Fraser  <simon.fraser@apple.com>
3417
3418         Reviewed by Dan Bernstein.
3419
3420         Find highlight is drawn incorrectly on pages with compositing layers
3421         <rdar://problem/7413925>
3422         
3423         Part 1: Rename PaintRestriction to PaintBehavior, and make it a bitmask, in
3424         preparation for adding a new flag related to painting into an image.
3425         
3426         PaintBehaviorSelectionOnly and PaintBehaviorForceBlackText are now separate flags.
3427
3428         * page/FrameView.cpp:
3429         (WebCore::FrameView::reset):
3430         (WebCore::FrameView::paintContents):
3431         (WebCore::FrameView::setPaintBehavior):
3432         * page/FrameView.h:
3433         * page/mac/FrameMac.mm:
3434         (WebCore::Frame::selectionImage):
3435         * rendering/RenderLayer.cpp:
3436         (WebCore::RenderLayer::paint):
3437         (WebCore::RenderLayer::paintLayer):
3438         * rendering/RenderLayer.h:
3439         * rendering/RenderLayerBacking.cpp:
3440         (WebCore::RenderLayerBacking::paintIntoLayer):
3441         (WebCore::RenderLayerBacking::paintContents):
3442         * rendering/RenderLayerBacking.h:
3443         * rendering/RenderObject.h:
3444         * rendering/RenderReplica.cpp:
3445         (WebCore::RenderReplica::paint):
3446
3447 2009-11-24  Eric Carlson  <eric.carlson@apple.com>
3448
3449         Reviewed by Simon Fraser.
3450
3451         <rdar://problem/7409331> Windows: Support closed caption in <video> element
3452
3453         Enable closed captions in QuickTime/Windows media engine.
3454
3455         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:
3456         (WebCore::MediaPlayerPrivate::hasClosedCaptions):
3457         (WebCore::MediaPlayerPrivate::setClosedCaptionsVisible):
3458         * platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h:
3459         * platform/graphics/win/QTMovieWin.cpp:
3460         (QTMovieWin::hasClosedCaptions):
3461         (QTMovieWin::setClosedCaptionsVisible):
3462         * platform/graphics/win/QTMovieWin.h:
3463         * rendering/RenderMediaControls.cpp:
3464         (WebCore::RenderMediaControls::paintMediaControlsPart):
3465         * rendering/RenderThemeWin.cpp:
3466         (WebCore::RenderThemeWin::paintMediaToggleClosedCaptionsButton):
3467         * rendering/RenderThemeWin.h:
3468
3469 2009-11-24  Darin Fisher  <darin@chromium.org>
3470
3471         Reviewed by Adam Barth.
3472
3473         [Chromium] Renderer hang when using www.expedia.com
3474         https://bugs.webkit.org/show_bug.cgi?id=31822
3475
3476         Test: http/tests/cache/subresource-failover-to-network.html
3477
3478         * loader/FrameLoader.cpp:
3479         (WebCore::FrameLoader::loadResourceSynchronously): Use the originalRequest
3480         when inheriting cache policy.  This matches SubresourceLoader::create.
3481
3482 2009-11-23  Kenneth Russell  <kbr@google.com>
3483
3484         Reviewed by Oliver Hunt.
3485
3486         Change get... calls to latest spec
3487         https://bugs.webkit.org/show_bug.cgi?id=30091
3488
3489         Removed old versions of get calls on WebGLRenderingContext and
3490         added new ones per spec returning "any". New code simplifies
3491         GraphicsContext3D and fixes previously unimplemented routines.
3492         Added custom JS and V8 bindings. Added exhaustive test case
3493         exercising all new code paths. Updated preexisting test cases for
3494         new APIs. Fixed preexisting bugs in WebKit's and Chrome's WebGL
3495         implementations.
3496
3497         Ran WebGL layout tests in WebKit (clean) and Chrome (couple of
3498         preexisting known failures) and manual WebGL tests in both
3499         browsers.
3500
3501         Test: fast/canvas/webgl/gl-object-get-calls.html
3502
3503         * WebCore.gypi:
3504         * WebCore.xcodeproj/project.pbxproj:
3505         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3506         (WebCore::toJS):
3507         (WebCore::):
3508         (WebCore::getObjectParameter):
3509         (WebCore::getProgramParameterHelper):
3510         (WebCore::JSWebGLRenderingContext::getBufferParameter):
3511         (WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
3512         (WebCore::JSWebGLRenderingContext::getParameter):
3513         (WebCore::JSWebGLRenderingContext::getProgramParameter):
3514         (WebCore::JSWebGLRenderingContext::getRenderbufferParameter):
3515         (WebCore::JSWebGLRenderingContext::getShaderParameter):
3516         (WebCore::JSWebGLRenderingContext::getTexParameter):
3517         (WebCore::JSWebGLRenderingContext::getUniform):
3518         (WebCore::JSWebGLRenderingContext::getVertexAttrib):
3519         * bindings/v8/custom/V8CustomBinding.h:
3520         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3521         (WebCore::toV8):
3522         (WebCore::):
3523         (WebCore::getObjectParameter):
3524         (WebCore::getProgramParameter):
3525         (WebCore::CALLBACK_FUNC_DECL):
3526         * html/canvas/CanvasObject.cpp:
3527         (WebCore::CanvasObject::CanvasObject):
3528         (WebCore::CanvasObject::setObject):
3529         (WebCore::CanvasObject::deleteObject):
3530         * html/canvas/CanvasObject.h:
3531         * html/canvas/WebGLBuffer.cpp:
3532         (WebCore::WebGLBuffer::create):
3533         (WebCore::WebGLBuffer::WebGLBuffer):
3534         * html/canvas/WebGLBuffer.h:
3535         * html/canvas/WebGLGetInfo.cpp: Added.
3536         (WebCore::WebGLGetInfo::WebGLGetInfo):
3537         (WebCore::WebGLGetInfo::~WebGLGetInfo):
3538         (WebCore::WebGLGetInfo::getType):
3539         (WebCore::WebGLGetInfo::getBool):
3540         (WebCore::WebGLGetInfo::getFloat):
3541         (WebCore::WebGLGetInfo::getLong):
3542         (WebCore::WebGLGetInfo::getString):
3543         (WebCore::WebGLGetInfo::getUnsignedLong):
3544         (WebCore::WebGLGetInfo::getWebGLBuffer):
3545         (WebCore::WebGLGetInfo::getWebGLFloatArray):
3546         (WebCore::WebGLGetInfo::getWebGLFramebuffer):
3547         (WebCore::WebGLGetInfo::getWebGLIntArray):
3548         (WebCore::WebGLGetInfo::getWebGLProgram):
3549         (WebCore::WebGLGetInfo::getWebGLRenderbuffer):
3550         (WebCore::WebGLGetInfo::getWebGLTexture):
3551         (WebCore::WebGLGetInfo::getWebGLUnsignedByteArray):
3552         * html/canvas/WebGLGetInfo.h: Added.
3553         (WebCore::WebGLGetInfo::):
3554         * html/canvas/WebGLRenderbuffer.cpp:
3555         (WebCore::WebGLRenderbuffer::create):
3556         (WebCore::WebGLRenderbuffer::WebGLRenderbuffer):
3557         * html/canvas/WebGLRenderbuffer.h:
3558         * html/canvas/WebGLRenderingContext.cpp:
3559         (WebCore::WebGLStateRestorer::WebGLStateRestorer):
3560         (WebCore::WebGLStateRestorer::~WebGLStateRestorer):
3561         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
3562         (WebCore::WebGLRenderingContext::activeTexture):
3563         (WebCore::WebGLRenderingContext::bindBuffer):
3564         (WebCore::WebGLRenderingContext::bindFramebuffer):
3565         (WebCore::WebGLRenderingContext::bindRenderbuffer):
3566         (WebCore::WebGLRenderingContext::bindTexture):
3567         (WebCore::WebGLRenderingContext::getBufferParameter):
3568         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
3569         (WebCore::WebGLRenderingContext::getParameter):
3570         (WebCore::WebGLRenderingContext::getProgramParameter):
3571         (WebCore::WebGLRenderingContext::getProgramInfoLog):
3572         (WebCore::WebGLRenderingContext::getRenderbufferParameter):
3573         (WebCore::WebGLRenderingContext::getShaderParameter):
3574         (WebCore::WebGLRenderingContext::getShaderInfoLog):
3575         (WebCore::WebGLRenderingContext::getShaderSource):
3576         (WebCore::WebGLRenderingContext::getString):
3577         (WebCore::WebGLRenderingContext::getTexParameter):
3578         (WebCore::WebGLRenderingContext::getUniform):
3579         (WebCore::WebGLRenderingContext::getVertexAttrib):
3580         (WebCore::WebGLRenderingContext::useProgram):
3581         (WebCore::WebGLRenderingContext::getBooleanParameter):
3582         (WebCore::WebGLRenderingContext::getFloatParameter):
3583         (WebCore::WebGLRenderingContext::getIntParameter):
3584         (WebCore::WebGLRenderingContext::getLongParameter):
3585         (WebCore::WebGLRenderingContext::getUnsignedLongParameter):
3586         (WebCore::WebGLRenderingContext::getWebGLFloatArrayParameter):
3587         (WebCore::WebGLRenderingContext::getWebGLIntArrayParameter):
3588         (WebCore::WebGLRenderingContext::getWebGLUnsignedByteArrayParameter):
3589         * html/canvas/WebGLRenderingContext.h:
3590         * html/canvas/WebGLRenderingContext.idl:
3591         * html/canvas/WebGLTexture.cpp:
3592         (WebCore::WebGLTexture::create):
3593         (WebCore::WebGLTexture::WebGLTexture):
3594         * html/canvas/WebGLTexture.h:
3595         * manual-tests/webgl/resources/utils3d.js:
3596         (initWebGL):
3597         (loadShader):
3598         (Framerate.prototype.snapshot):
3599         * platform/graphics/GraphicsContext3D.h:
3600         * platform/graphics/mac/GraphicsContext3DMac.cpp:
3601         (WebCore::GraphicsContext3D::bindRenderbuffer):
3602         (WebCore::GraphicsContext3D::getBooleanv):
3603         (WebCore::GraphicsContext3D::getBufferParameteriv):
3604         (WebCore::GraphicsContext3D::getFloatv):
3605         (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
3606         (WebCore::GraphicsContext3D::getIntegerv):
3607         (WebCore::GraphicsContext3D::getProgramiv):
3608         (WebCore::GraphicsContext3D::getRenderbufferParameteriv):
3609         (WebCore::GraphicsContext3D::getShaderiv):
3610         (WebCore::GraphicsContext3D::getTexParameterfv):
3611         (WebCore::GraphicsContext3D::getTexParameteriv):
3612         (WebCore::GraphicsContext3D::getUniformfv):
3613         (WebCore::GraphicsContext3D::getUniformiv):
3614         (WebCore::GraphicsContext3D::getVertexAttribfv):
3615         (WebCore::GraphicsContext3D::getVertexAttribiv):
3616
3617 2009-11-24  Steve Falkenburg  <sfalken@apple.com>
3618
3619         Windows build fix.
3620
3621         * WebCore.vcproj/QTMovieWin.vcproj: Add additional search path for QuickTime SDK.
3622
3623 2009-11-24  Philippe Normand  <pnormand@igalia.com>
3624
3625         Reviewed by Gustavo Noronha Silva.
3626
3627         [Gtk] GStreamer-CRITICAL's (and other warnings) on <video>
3628         https://bugs.webkit.org/show_bug.cgi?id=26354
3629
3630         Implemented MediaPlayerPrivate::isAvailable by checking the
3631         presence of the playbin2 GStreamer element.
3632
3633         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
3634         (WebCore::MediaPlayerPrivate::isAvailable):
3635         * platform/graphics/gtk/MediaPlayerPrivateGStreamer.h:
3636
3637 2009-11-24  Joanmarie Diggs  <joanmarie.diggs@gmail.com>
3638
3639         Reviewed by Xan Lopez.
3640
3641         https://bugs.webkit.org/show_bug.cgi?id=25415
3642         [GTK][ATK] Please implement support for get_text_at_offset
3643
3644         When building up the pango layout from text boxes, only append a
3645         newline char after verifying there are no more boxes on this line.
3646
3647         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
3648         (getPangoLayoutForAtk):
3649
3650 2009-11-24  Joseph Pecoraro  <joepeck@webkit.org>
3651
3652         Reviewed by Pavel Feldman.
3653
3654         Web Inspector: Keyboard Shortcut to Clear Console Messages
3655         https://bugs.webkit.org/show_bug.cgi?id=31780
3656
3657         All Platforms:  Ctrl+L  = Clear Console Messages
3658         Mac Only:       Cmd+K   = Clear Console Messages
3659
3660         * inspector/front-end/ConsoleView.js:
3661         (WebInspector.ConsoleView): create shortcuts
3662         (WebInspector.ConsoleView.prototype._promptKeyDown): handle shortcuts
3663         * inspector/front-end/KeyboardShortcut.js:
3664         (WebInspector.KeyboardShortcut.makeKey): convenience conversion of "a-z" character to keyCode
3665         * inspector/front-end/ScriptsPanel.js:
3666         (WebInspector.ScriptsPanel): style fixes for keyboard shortcuts
3667
3668 2009-11-24  Pavel Feldman  <pfeldman@chromium.org>
3669
3670         Not reviewed: touch inspector controller in order to
3671         kick win bot inspector deploy. rs=aroben.
3672
3673         * inspector/InspectorController.cpp:
3674
3675 2009-11-23  Pavel Feldman  <pfeldman@chromium.org>
3676
3677         Reviewed by Timothy Hatcher.
3678
3679         Web Inspector: Implement expandable compartments on timeline panel.
3680
3681         https://bugs.webkit.org/show_bug.cgi?id=31796
3682
3683         * inspector/front-end/TimelineOverviewPane.js:
3684         (WebInspector.TimelineOverviewPane.prototype._setWindowPosition):
3685         * inspector/front-end/TimelinePanel.js:
3686         (WebInspector.TimelinePanel):
3687         (WebInspector.TimelinePanel.prototype.addRecordToTimeline):
3688         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
3689         (WebInspector.TimelinePanel.prototype._formatRecord):
3690         (WebInspector.TimelinePanel.prototype._refreshRecords):
3691         (WebInspector.TimelinePanel.prototype._addToRecordsWindow):
3692         (WebInspector.TimelineRecordListRow):
3693         (WebInspector.TimelineRecordListRow.prototype.update):
3694         (WebInspector.TimelineRecordListRow.prototype.dispose):
3695         (WebInspector.TimelineRecordGraphRow):
3696         (WebInspector.TimelineRecordGraphRow.prototype.update):
3697         (WebInspector.TimelineRecordGraphRow.prototype._onClick):
3698         (WebInspector.TimelineRecordGraphRow.prototype.dispose):
3699         * inspector/front-end/inspector.css:
3700
3701 2009-11-24  Mark Rowe  <mrowe@apple.com>
3702
3703         Fix production builds where the source tree may be read-only.
3704
3705         * WebCore.xcodeproj/project.pbxproj:
3706
3707 2009-11-23  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3708
3709         Reviewed by Kenneth Rohde Christiansen.
3710
3711         Include "config.h" to meet Coding Style Guidelines
3712         https://bugs.webkit.org/show_bug.cgi?id=31792
3713
3714         No new tests as there is no new functionality.
3715
3716         * platform/graphics/win/IntPointWin.cpp:
3717         * platform/graphics/win/IntRectWin.cpp:
3718         * platform/graphics/win/IntSizeWin.cpp:
3719         * platform/network/chromium/ResourceRequest.cpp:
3720         * platform/win/PlatformMouseEventWin.cpp:
3721
3722 2009-11-23  Jian Li  <jianli@chromium.org>
3723
3724         Reviewed by NOBODY (Chromium build fix).
3725
3726         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3727         (WebCore::CALLBACK_FUNC_DECL):
3728         * platform/graphics/GraphicsContext3D.h:
3729
3730 2009-11-23  Aaron Golden  <agolden@apple.com>
3731
3732         Reviewed by Alexey Proskuryakov.
3733
3734         Prevent ResourceHandleMac's version of ResourceHandle::receivedCredential from stripping
3735         identity and certificate information from a WebCore::Credential when receivedCredential
3736         needs to modify the credential's persistence.
3737
3738         Adding a new constructor Credential(const Credential& original, CredentialPersistence)
3739         that copies every field from original except for persistence.
3740
3741         * platform/network/Credential.cpp:
3742         (WebCore::Credential::Credential):
3743         * platform/network/Credential.h:
3744         * platform/network/mac/ResourceHandleMac.mm:
3745         (WebCore::ResourceHandle::receivedCredential):
3746
3747 2009-11-23  Gavin Barraclough  <barraclough@apple.com>
3748
3749         Reviewed by Geoff Garen.
3750
3751         Part 2/3 of <rdar://problem/7377477> REGRESSION: Many web pages fail to render after interesting script runs in isolated world
3752
3753         Some clients of the JavaScriptCore API expect to be able to make callbacks over the JSC API,
3754         and for this to automagically cause execution to take place in the world associated with the
3755         global object associated with the ExecState (JSContextRef) passed.  However this is not how
3756         things work - the world must be explicitly set within WebCore.
3757
3758         Making this work just for API calls to evaluate & call will be a far from perfect solution,
3759         since direct (non-API) use of JSC still relies on WebCore setting the current world correctly.
3760         A better solution would be to make this all work automagically all throughout WebCore, but this
3761         will require more refactoring.
3762
3763         Add references from the JSDOMWindowShell and the JSDOMGlobalObject to the world that owns them,
3764         so that we can get to the world from the lexical global object of an ExecState.  In the long-term
3765         we should switch over to using this approach for all cases we want to get a world from an exec state.
3766
3767         * bindings/js/JSDOMBinding.cpp:
3768         (WebCore::WebCoreJSClientData::beginningExecution):
3769         (WebCore::WebCoreJSClientData::completedExecution):
3770         * bindings/js/JSDOMBinding.h:
3771         * bindings/js/JSDOMGlobalObject.h:
3772         (WebCore::JSDOMGlobalObject::world):
3773         (WebCore::JSDOMGlobalObject::JSDOMGlobalObjectData::JSDOMGlobalObjectData):
3774         * bindings/js/JSDOMWindowBase.cpp:
3775         (WebCore::JSDOMWindowBase::JSDOMWindowBaseData::JSDOMWindowBaseData):
3776         * bindings/js/JSDOMWindowBase.h:
3777         * bindings/js/JSDOMWindowShell.cpp:
3778         (WebCore::JSDOMWindowShell::JSDOMWindowShell):
3779         * bindings/js/JSDOMWindowShell.h:
3780         (WebCore::JSDOMWindowShell::world):
3781         * bindings/js/JSWorkerContextBase.cpp:
3782         (WebCore::JSWorkerContextBase::JSWorkerContextBase):
3783         * bindings/js/ScriptController.cpp:
3784         (WebCore::ScriptController::initScript):
3785
3786 2009-11-23  Chris Marrin  <cmarrin@apple.com>
3787
3788         Reviewed by Oliver Hunt.
3789
3790         Add range checks to rendering calls in WebGL
3791         https://bugs.webkit.org/show_bug.cgi?id=31239
3792
3793         I am now tracking the size of the data in each CanvasBuffer object
3794         and keeping track of the buffer size of each active vertex attrib.
3795         In drawArrays and drawElements I make sure no attempt is made to
3796         access elements outside the valid buffer ranges. The test at:
3797
3798             http://cs.helsinki.fi/u/ilmarihe/c3d/functions/drawArraysOutOfBounds.html
3799
3800         no longer crashes.
3801
3802         I also added all the WebGL enumerations to GraphicsContext3D to use them in the validation checks
3803
3804         Tests: fast/canvas/webgl/drawArraysOutOfBounds.html
3805                fast/canvas/webgl/drawElementssOutOfBounds.html
3806
3807         * bindings/js/JSWebGLArrayCustom.cpp:
3808         (WebCore::toJS):
3809         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3810         (WebCore::JSWebGLRenderingContext::bufferData):
3811         (WebCore::JSWebGLRenderingContext::bufferSubData):
3812         (WebCore::JSWebGLRenderingContext::texSubImage2D):
3813         * html/canvas/WebGLArrayBuffer.cpp:
3814         (WebCore::WebGLArrayBuffer::create):
3815         (WebCore::WebGLArrayBuffer::data):
3816         * html/canvas/WebGLArrayBuffer.h:
3817         * html/canvas/WebGLBuffer.cpp:
3818         (WebCore::WebGLBuffer::WebGLBuffer):
3819         (WebCore::WebGLBuffer::associateBufferData):
3820         (WebCore::WebGLBuffer::associateBufferSubData):
3821         (WebCore::WebGLBuffer::byteLength):
3822         * html/canvas/WebGLBuffer.h:
3823         (WebCore::WebGLBuffer::elementArrayBuffer):
3824         * html/canvas/WebGLRenderingContext.cpp:
3825         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
3826         (WebCore::WebGLRenderingContext::sizeInBytes):
3827         (WebCore::WebGLRenderingContext::bindBuffer):
3828         (WebCore::WebGLRenderingContext::bufferData):
3829         (WebCore::WebGLRenderingContext::bufferSubData):
3830         (WebCore::WebGLRenderingContext::createShader):
3831         (WebCore::WebGLRenderingContext::disableVertexAttribArray):
3832         (WebCore::WebGLRenderingContext::validateIndexArray):
3833         (WebCore::WebGLRenderingContext::validateRenderingState):
3834         (WebCore::WebGLRenderingContext::drawArrays):
3835         (WebCore::WebGLRenderingContext::drawElements):
3836         (WebCore::WebGLRenderingContext::enableVertexAttribArray):
3837         (WebCore::WebGLRenderingContext::isFramebuffer):
3838         (WebCore::WebGLRenderingContext::isProgram):
3839         (WebCore::WebGLRenderingContext::isRenderbuffer):
3840         (WebCore::WebGLRenderingContext::isShader):
3841         (WebCore::WebGLRenderingContext::isTexture):
3842         (WebCore::WebGLRenderingContext::useProgram):
3843         (WebCore::WebGLRenderingContext::validateProgram):
3844         (WebCore::WebGLRenderingContext::vertexAttribPointer):
3845         (WebCore::WebGLRenderingContext::detachAndRemoveAllObjects):
3846         * html/canvas/WebGLRenderingContext.h:
3847         (WebCore::WebGLRenderingContext::VertexAttribState::VertexAttribState):
3848         * html/canvas/WebGLRenderingContext.idl:
3849         * html/canvas/WebGLShader.cpp:
3850         (WebCore::WebGLShader::create):
3851         (WebCore::WebGLShader::WebGLShader):
3852         * html/canvas/WebGLShader.h:
3853         * platform/graphics/GraphicsContext3D.h:
3854         (WebCore::GraphicsContext3D::):
3855         * platform/graphics/mac/GraphicsContext3DMac.cpp:
3856         (WebCore::GraphicsContext3D::createShader):
3857
3858 2009-11-23  Erik Arvidsson  <arv@chromium.org>
3859
3860         Reviewed by Eric Seidel.
3861
3862         JSC bindings for HasIndexGetter generates incorrect code (affects
3863         MediaList and CSSStyleDeclaration).
3864         This cleans up the edge cases for indexing out of range for style and
3865         computed style objects to return an empty string according to the spec.
3866         MediaList now returns null when indexed out of range.
3867         https://bugs.webkit.org/show_bug.cgi?id=31683
3868
3869         Tests: fast/dom/CSSStyleDeclaration/css-computed-style-item.html
3870                fast/dom/CSSStyleDeclaration/css-style-item.html
3871                fast/dom/StyleSheet/css-medialist-item.html
3872
3873         * bindings/scripts/CodeGeneratorJS.pm: If IndexGetterReturnsString then
3874                 we do not check the length before calling the item function.
3875         * css/CSSComputedStyleDeclaration.cpp:
3876         (WebCore::CSSComputedStyleDeclaration::item):
3877         * css/CSSMutableStyleDeclaration.cpp:
3878         (WebCore::CSSMutableStyleDeclaration::item):
3879         * css/CSSStyleDeclaration.idl:
3880
3881 2009-11-23  Simon Fraser  <simon.fraser@apple.com>
3882
3883         Reviewed by Dan Bernstein.
3884
3885         DocumentMarkers need to be educated about transforms
3886         https://bugs.webkit.org/show_bug.cgi?id=31751
3887         
3888         Find highlight is incorrect with transforms
3889         <rdar://problem/6358394>
3890
3891         Allow callers to specify that Frame::selectionTextRects() takes transforms into account
3892         when computing the set of rects that encompass a selection. For transformed elemenets, the
3893         selection rect will be the bounding box of the selected content.
3894         
3895         Fix DocumentMarkers to cache rects in absolute coordinates, rather than painting coordinates.
3896         
3897         Test: editing/selection/transformed-selection-rects.html
3898         
3899         * WebCore.base.exp:
3900         Frame::selectionTextRects() has a new parameter.
3901         
3902         * dom/Document.cpp:
3903         (WebCore::Document::setRenderedRectForMarker):
3904         * dom/Document.h:
3905         Pass the marker as a const reference.
3906         
3907         * dom/Range.h:
3908         * dom/Range.cpp:
3909         (WebCore::Range::textQuads):
3910         Add a new method, textQuads(), which returns a list of quads, respecting transforms.
3911         
3912         * page/Frame.h:
3913         * page/Frame.cpp:
3914         (WebCore::Frame::selectionTextRects):
3915         Add a new parameter, respectTransforms, and when that is RespectTransforms, use the quad
3916         method to get quads for ranges, and then take their bounding boxes.
3917
3918         * rendering/InlineTextBox.h:
3919         * rendering/InlineTextBox.cpp:
3920         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
3921         (WebCore::InlineTextBox::paintTextMatchMarker):
3922         (WebCore::InlineTextBox::computeRectForReplacementMarker):
3923         (WebCore::InlineTextBox::paintDocumentMarkers):
3924         (WebCore::InlineTextBox::textPos):
3925         (WebCore::InlineTextBox::offsetForPosition):
3926         
3927         Pass DocumentMarkers as a const references.
3928         Convert the argument to setRenderedRectForMarker() into absolute coordinates.
3929         
3930         * rendering/RenderView.cpp:
3931         (WebCore::RenderView::selectionBounds):
3932
3933 2009-11-23  Dirk Schulze  <krit@webkit.org>
3934
3935         Reviewed by Oliver Hunt.
3936
3937         [Cairo] support blurred test-shadow
3938         [https://bugs.webkit.org/show_bug.cgi?id=31797]
3939
3940         Support for blurred text-shadows on Cairo. This patch
3941         reuses the code of blurred box-shadows, introduced in
3942         bug 26102. For a full textshadow support, a filters enabled
3943         build is needed.
3944
3945         * platform/graphics/cairo/FontCairo.cpp:
3946         (WebCore::Font::drawGlyphs):
3947
3948 2009-11-23  Jens Alfke  <snej@chromium.org>
3949
3950         Reviewed by Geoffrey Garen.
3951
3952         Change incorrect calls to the constructor "EventNames()" to the correct accessor
3953         "eventNames()". This saves ~100 AtomicString lookups each time.
3954         https://bugs.webkit.org/show_bug.cgi?id=31811
3955
3956         * dom/EventNames.h:  Make constructor private to prevent this from happening again.
3957         * history/CachedFrame.cpp:
3958         (WebCore::CachedFrameBase::restore):  EventNames() --> eventNames()
3959         * html/HTMLFormControlElement.cpp:
3960         (WebCore::HTMLFormControlElement::checkValidity):  EventNames() --> eventNames()
3961         * loader/FrameLoader.cpp:
3962         (WebCore::FrameLoader::stopLoading):  EventNames() --> eventNames()
3963         (WebCore::FrameLoader::pageHidden):  EventNames() --> eventNames()
3964         * page/DOMWindow.cpp:
3965         (WebCore::DOMWindow::dispatchAllPendingUnloadEvents):  EventNames() --> eventNames()
3966
3967 2009-11-23  Adam Langley  <agl@google.com>
3968
3969         Reviewed by Dmitry Titov.
3970
3971         Chromium Linux: Limit the stroke width and mitre limit.
3972
3973         Limit the stroke width and mitre limit that we'll pass into Skia to
3974         avoid overflowing Skia's uint16_t glyph widths.
3975
3976         http://code.google.com/p/chromium/issues/detail?id=28250
3977         https://bugs.webkit.org/show_bug.cgi?id=31747
3978
3979         * platform/graphics/skia/PlatformContextSkia.cpp:
3980         (scalarBound):
3981         (PlatformContextSkia::setupPaintForStroking):
3982
3983 2009-11-23  Alexey Proskuryakov  <ap@apple.com>
3984
3985         Reviewed by Oliver Hunt.
3986
3987         https://bugs.webkit.org/show_bug.cgi?id=31812
3988         WebSocket code uses RefPtr::get() where it shouldn't
3989
3990         No change in funcitonality, just coding style correction.
3991
3992         * websockets/WebSocket.cpp:
3993         (WebCore::WebSocket::~WebSocket):
3994         * websockets/WebSocketChannel.cpp:
3995         (WebCore::WebSocketChannel::connect):
3996         (WebCore::WebSocketChannel::send):
3997         (WebCore::WebSocketChannel::bufferedAmount):
3998         (WebCore::WebSocketChannel::close):
3999         (WebCore::WebSocketChannel::disconnect):
4000         (WebCore::WebSocketChannel::didOpen):
4001         (WebCore::WebSocketChannel::didClose):
4002         (WebCore::WebSocketChannel::didReceiveData):
4003         (WebCore::WebSocketChannel::didFail):
4004
4005 2009-11-23  Alexey Proskuryakov  <ap@apple.com>
4006
4007         Build fix.
4008
4009         * platform/network/cf/SocketStreamHandleCFNet.cpp:
4010         (WebCore::SocketStreamHandle::pacExecutionCallbackMainThread): pacExecutionCallbackMainThread
4011         is static, so it can't use member variables directly.
4012
4013 2009-11-23  Alexey Proskuryakov  <ap@apple.com>
4014
4015         Reviewed by Brady Eidson.
4016
4017         https://bugs.webkit.org/show_bug.cgi?id=31748
4018         Make WebSocketHandleCFNet respect proxy auto-configuration files via CFProxySupport
4019
4020         * platform/network/cf/SocketStreamHandle.h: Removed names from some void* arguments, since
4021         they didn't carry useful information.
4022
4023         * platform/network/cf/SocketStreamHandleCFNet.cpp:
4024         (WebCore::SocketStreamHandle::SocketStreamHandle): When we need an http-style URL, we actually
4025         always need https.
4026         (WebCore::SocketStreamHandle::scheduleStreams): Factored out from constructor, since streams
4027         only get scheduled after PAC is fetched and executed asynchronously.
4028         (WebCore::SocketStreamHandle::copyPACExecutionDescription): Return a description for event
4029         source.
4030         (WebCore::MainThreadPACCallbackInfo::MainThreadPACCallbackInfo): Forward callback to main thread.
4031         (WebCore::SocketStreamHandle::pacExecutionCallback): Ditto.
4032         (WebCore::SocketStreamHandle::pacExecutionCallbackMainThread): Ditto. To avoid code duplication,
4033         we make the call even on Mac.
4034         (WebCore::SocketStreamHandle::executePACFileURL): Make an async call to CFNetworkExecuteProxyAutoConfigurationURL.
4035         (WebCore::SocketStreamHandle::removePACRunLoopSource): Once PAC execution is done or aborted,
4036         we need to get rid of the event source.
4037         (WebCore::SocketStreamHandle::chooseProxy): Use stored m_httpsURL.get.
4038         (WebCore::SocketStreamHandle::chooseProxyFromArray): Factored out from chooseProxy - the
4039         array may come directly from system configuration, or from PAC.
4040         (WebCore::SocketStreamHandle::chooseProxy): Tiger version of this function is now completely
4041         separate.
4042         (WebCore::SocketStreamHandle::~SocketStreamHandle): Run loop source should be destroyed
4043         before we get to the destructor.
4044         (WebCore::SocketStreamHandle::platformClose): Destroy the run loop source, if PAC execution
4045         is still in progress.
4046
4047 2009-11-23  Oliver Hunt  <oliver@apple.com>
4048
4049         Reviewed by Geoff Garen.
4050
4051         Don't leak the CGImage we create when drawing a sub image.
4052
4053         * platform/graphics/cg/ImageCG.cpp:
4054         (WebCore::BitmapImage::draw):
4055
4056 2009-11-23  Adam Barth  <abarth@webkit.org>
4057
4058         Reviewed by Dimitri Glazkov.
4059
4060         [V8] Don't crash when OOM in creating isolated world
4061         https://bugs.webkit.org/show_bug.cgi?id=31805
4062
4063         We need to add some more null checks to avoid crashing.  No new tests
4064         because we don't have a good way to test out-of-memory bugs.
4065
4066         * bindings/v8/V8Proxy.cpp:
4067         (WebCore::V8Proxy::evaluateInIsolatedWorld):
4068         (WebCore::V8Proxy::evaluateInNewContext):
4069         (WebCore::V8Proxy::setInjectedScriptContextDebugId):
4070         * bindings/v8/V8Proxy.h:
4071
4072 2009-11-23  Dirk Schulze  <krit@webkit.org>
4073
4074         Reviewed by Nikolas Zimmermann.
4075
4076         This is the implementation of the filterRes attribute. It
4077         helps the SVG developer to set the quality of a filter by
4078         giving the width or height of filter.
4079         This patch also sets the filter resolution to lower values
4080         if a intermediate ImageBuffer size is bigger than the given
4081         maximal size.
4082         The maximal size is set to 5000x5000 by default. This is a
4083         subjectiv decission. Everthing greater than this values gets
4084         sensible slower. Values of 10000x10000 crashed on WebKitGtk.
4085         For mobil devices a maximum size of 100x100 or 200x200 seems
4086         to be reasonable.
4087         The important fact on filter resolution is, that the output
4088         size is still the size given by the <filter> element.
4089
4090         Tests: svg/filters/big-sized-filter-2.svg
4091                svg/filters/big-sized-filter.svg
4092                svg/filters/filterRes.svg
4093
4094         * platform/graphics/FloatRect.cpp:
4095         (WebCore::FloatRect::scale): Add the abbility to scale a rect by x and y.
4096         * platform/graphics/FloatRect.h:
4097         (WebCore::FloatRect::scale): Add the abbility to scale a rect by x and y.
4098         * platform/graphics/cairo/GraphicsContextCairo.cpp:
4099         (WebCore::GraphicsContext::createPlatformShadow): Use scaledSubRegion for
4100         calculation.
4101         * platform/graphics/filters/FEBlend.cpp:
4102         (WebCore::FEBlend::apply): Use scaledSubRegion for effect intern calculations.
4103         * platform/graphics/filters/FEColorMatrix.cpp:
4104         (WebCore::FEColorMatrix::apply): Use scaledSubRegion for effect intern calculations.
4105         * platform/graphics/filters/FEComponentTransfer.cpp:
4106         (WebCore::FEComponentTransfer::apply): Use scaledSubRegion for effect intern
4107         calculations.
4108         * platform/graphics/filters/FEComposite.cpp:
4109         (WebCore::FEComposite::apply): Use scaledSubRegion for effect intern calculations.
4110         * platform/graphics/filters/FEGaussianBlur.cpp:
4111         (WebCore::FEGaussianBlur::apply): Use scaledSubRegion for effect intern calculations.
4112         * platform/graphics/filters/Filter.h: Add the abbility to change the quality
4113         of a filter output.
4114         (WebCore::Filter::filterResolution):
4115         (WebCore::Filter::setFilterResolution):
4116         (WebCore::Filter::calculateEffectSubRegion): Calculates the correct subRegion
4117         as well as the scaledSubRegion. It also searches for the biggest effect size.
4118         We have to change the filter resolution, if one intermediate ImageBuffer size
4119         doesn't fit in the maximal image size.
4120         * platform/graphics/filters/FilterEffect.cpp:
4121         (WebCore::FilterEffect::calculateDrawingIntRect): Use scaledSubRegion to get
4122         the right part of a previous effect result.
4123         (WebCore::FilterEffect::calculateDrawingRect): Use scaledSubRegion to get
4124         the right part of a previous effect result.
4125         (WebCore::FilterEffect::getEffectContext): Use scaledSubRegion to create
4126         a new intermediate ImageBuffer for the result of the current effect.
4127         * platform/graphics/filters/FilterEffect.h:
4128         (WebCore::FilterEffect::scaledSubRegion): The scaled subRegion of a the
4129         filter effect.
4130         (WebCore::FilterEffect::setScaledSubRegion):
4131         (WebCore::FilterEffect::effectBoundaries): The original values of the
4132         EffectElement for a second subRegion calculation.
4133         (WebCore::FilterEffect::setEffectBoundaries):
4134         * platform/graphics/filters/ImageBufferFilter.cpp:
4135         (WebCore::ImageBufferFilter::ImageBufferFilter): Set the scale factor to one.
4136         * platform/graphics/filters/ImageBufferFilter.h:
4137         (WebCore::ImageBufferFilter::maxImageSize):
4138         (WebCore::ImageBufferFilter::calculateEffectSubRegion):
4139         * platform/graphics/filters/SourceAlpha.cpp:
4140         (WebCore::SourceAlpha::calculateEffectRect): Use scaledSubRegion for effect
4141         intern calculations.
4142         * platform/graphics/filters/SourceGraphic.cpp:
4143         (WebCore::SourceGraphic::calculateEffectRect): Use scaledSubRegion for effect
4144         intern calculations.
4145         * svg/SVGFilterElement.cpp:
4146         (WebCore::SVGFilterElement::parseMappedAttribute): Parse filterRes attribute.
4147         (WebCore::SVGFilterElement::buildFilter): Give SVGResourceFilter the current
4148         filterResolution.
4149         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
4150         (WebCore::SVGFilterPrimitiveStandardAttributes::setStandardAttributes): Save
4151         values to effectBoundaries of the filter effect
4152         * svg/graphics/SVGResourceFilter.cpp:
4153         (WebCore::SVGResourceFilter::SVGResourceFilter):
4154         (WebCore::shouldProcessFilter): Return signal if a neccessary value is zero.
4155         (WebCore::SVGResourceFilter::fitsInMaximumImageSize): Checks if the given size
4156         fits into the maximal image size, modifys scale factors if not and return a
4157         bool: fits.
4158         (WebCore::SVGResourceFilter::prepareFilter): Scale the SourceImage to
4159         filterResolution (given by FilterElement or calculated on to big image sizes).
4160         Set the scale level to SVGFilter.
4161         (WebCore::SVGResourceFilter::applyFilter): Don't apply filters if shouldProcessFilter
4162         is wrong.
4163         * svg/graphics/SVGResourceFilter.h:
4164         (WebCore::SVGResourceFilter::setFilterResolution): FilterResolution of FilterElement.
4165         (WebCore::SVGResourceFilter::setHasFilterResolution): Does FilterElement provides
4166         a FilterResolution?
4167         (WebCore::SVGResourceFilter::scaleX): Current scale factor for horizontal.
4168         (WebCore::SVGResourceFilter::scaleY): Current scale factor for vertical.
4169         * svg/graphics/filters/SVGFEDisplacementMap.cpp:
4170         (WebCore::FEDisplacementMap::apply): Use scaledSubRegion for effect intern calculations.
4171         Kernel values are scaled to current filter resolution too.
4172         * svg/graphics/filters/SVGFEFlood.cpp:
4173         (WebCore::FEFlood::apply): Use scaledSubRegion for effect intern calculations.
4174         * svg/graphics/filters/SVGFEMerge.cpp:
4175         (WebCore::FEMerge::apply): Use scaledSubRegion for effect intern calculations.
4176         Kernel values are scaled to current filter resolution too.
4177         * svg/graphics/filters/SVGFEMorphology.cpp:
4178         (WebCore::FEMorphology::apply): Use scaledSubRegion for effect intern calculations.
4179         Kernel values are scaled to c