WebHTTPBody: Keep track of whether the data includes passwords.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-14  Marja Hölttä  <marja@google.com>
2
3         WebHTTPBody: Keep track of whether the data includes passwords.
4         https://bugs.webkit.org/show_bug.cgi?id=81003
5
6         Reviewed by Darin Fisher.
7
8         This change enables Chrome to save HTTP bodies selectively, only
9         if they don't contain passwords.
10
11         * loader/FormSubmission.cpp:
12         (WebCore::FormSubmission::create): Check if the data contains passwords.
13         * platform/network/FormData.cpp:
14         (WebCore::FormData::FormData): Added containsPasswordData, setContainsPasswordData.
15         * platform/network/FormData.h:
16         (WebCore::FormData::containsPasswordData): Added.
17         (WebCore::FormData::setHasPasswordData): Added.
18         (FormData):
19
20 2012-03-14  Vsevolod Vlasov  <vsevik@chromium.org>
21
22         Web Inspector: Add snippets tab to scripts navigator.
23         https://bugs.webkit.org/show_bug.cgi?id=81018
24
25         Reviewed by Pavel Feldman.
26
27         * English.lproj/localizedStrings.js:
28         * inspector/front-end/ScriptsNavigator.js:
29         (WebInspector.ScriptsNavigator):
30         (WebInspector.ScriptsNavigator.prototype.get defaultFocusedElement):
31         (WebInspector.ScriptsNavigator.prototype.focus):
32         (WebInspector.ScriptsNavigator.prototype._showScriptFoldersSettingChanged):
33         (WebInspector.ScriptsNavigator.prototype.reset):
34         (WebInspector.ScriptsNavigator.prototype._getOrCreateFolderTreeElement):
35         (WebInspector.ScriptsNavigator.prototype._createFolderTreeElement):
36         (WebInspector.ScriptsNavigator.prototype._getOrCreateSnippetEvaluationsFolderTreeElement):
37         (WebInspector.ScriptsNavigator.prototype._scriptFolderIdentifier):
38         (WebInspector.NavigatorTreeOutline):
39         * inspector/front-end/ScriptsPanel.js:
40         (WebInspector.ScriptsPanel.prototype._uiSourceCodeAdded):
41         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
42         * inspector/front-end/SnippetsModel.js:
43
44 2012-03-14  Pavel Feldman  <pfeldman@chromium.org>
45
46         Web Inspector: Copy on the Console gives a mangled result.
47         https://bugs.webkit.org/show_bug.cgi?id=81091
48
49         Reviewed by Vsevolod Vlasov.
50
51         * inspector/front-end/ConsoleMessage.js:
52         (WebInspector.ConsoleMessageImpl.prototype._formatMessage):
53         (WebInspector.ConsoleMessageImpl.prototype._populateStackTraceTreeElement):
54
55 2012-03-14  Nikolas Zimmermann  <nzimmermann@rim.com>
56
57         External <use> xlink:href references do not work
58         https://bugs.webkit.org/show_bug.cgi?id=12499
59
60         Reviewed by Zoltan Herczeg.
61
62         Follow-up fix after r110676.
63         Assertions are firing due last minute changes in isExternalURIReference.
64
65         Fix detecting local resources properly, when the given iri contains a /complex/path.
66         Use document->completeURL() instead, and compare with the document->url() to decide
67         if its a local reference or not.
68
69         If an external document load fails with an error (eg. file missing) don't assert
70         in debug builds, instead handle it gracefully.
71
72         I decided to clean the code up as well, to make it more safe & obvious.
73
74         Test: svg/custom/use-external-crash.svg
75
76         * svg/SVGURIReference.cpp:
77         (WebCore::SVGURIReference::targetElementFromIRIString):
78         * svg/SVGURIReference.h:
79         (WebCore::SVGURIReference::isExternalURIReference):
80         * svg/SVGUseElement.cpp:
81         (WebCore::SVGUseElement::externalDocument):
82         (WebCore::SVGUseElement::buildPendingResource):
83
84 2012-03-14  Lars Knudsen  <lars.knudsen@nokia.com>
85
86         3D transformed surfaces with z>0 gets cropped
87         https://bugs.webkit.org/show_bug.cgi?id=81009
88
89         Reviewed by Noam Rosenthal.
90
91         The scissor clipping in TextureMapperGL didn't take 3D transforms 
92         into account when calculating the clipping region.
93         Now, it will bail out early if the transform is not affine.
94
95         No new tests. Tested by current compositing layout tests.
96
97         * platform/graphics/texmap/TextureMapperGL.cpp:
98         (WebCore::TextureMapperGL::beginScissorClip):
99
100 2012-03-14  Hajime Morrita  <morrita@chromium.org>
101
102         Unreviewed build fix.
103
104         * html/track/TextTrackList.cpp:
105         (TextTrackList::append):
106         (TextTrackList::remove):
107         (TextTrackList::owner): Changed return type from HTMLMediaElement* to Node* and uninlined.
108         * html/track/TextTrackList.h:
109         (TextTrackList):
110
111 2012-03-13  Vsevolod Vlasov  <vsevik@chromium.org>
112
113         Web Inspector: [InspectorIndexedDB] Remote object should be released when data view is removed/updated.
114         https://bugs.webkit.org/show_bug.cgi?id=81022
115
116         Reviewed by Pavel Feldman.
117
118         * inspector/front-end/IndexedDBViews.js:
119         (WebInspector.IDBDataView):
120         (WebInspector.IDBDataView.prototype._updateData.callback):
121         (WebInspector.IDBDataView.prototype._updateData):
122         (WebInspector.IDBDataView.prototype.get statusBarItems):
123         (WebInspector.IDBDataView.prototype.clear):
124         * inspector/front-end/ResourcesPanel.js:
125         (WebInspector.IndexedDBTreeElement.prototype._indexedDBRemoved):
126         (WebInspector.IDBDatabaseTreeElement.prototype.update):
127         (WebInspector.IDBDatabaseTreeElement.prototype.onselect):
128         (WebInspector.IDBDatabaseTreeElement.prototype._objectStoreRemoved):
129         (WebInspector.IDBDatabaseTreeElement.prototype.clear):
130         (WebInspector.IDBObjectStoreTreeElement.prototype.update):
131         (WebInspector.IDBObjectStoreTreeElement.prototype.onselect):
132         (WebInspector.IDBObjectStoreTreeElement.prototype._indexRemoved):
133         (WebInspector.IDBObjectStoreTreeElement.prototype.clear):
134         (WebInspector.IDBIndexTreeElement.prototype.onselect):
135         (WebInspector.IDBIndexTreeElement.prototype.clear):
136
137 2012-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
138
139         Web Inspector: Introduce SnippetsScriptMapping.
140         https://bugs.webkit.org/show_bug.cgi?id=80890
141
142         Reviewed by Pavel Feldman.
143
144         * inspector/front-end/ScriptMapping.js:
145         (WebInspector.MainScriptMapping):
146         (WebInspector.MainScriptMapping.prototype.addScript):
147         (WebInspector.MainScriptMapping.prototype._mappingForScript):
148         * inspector/front-end/SnippetsModel.js:
149         (WebInspector.SnippetsModel.prototype.snippetForId):
150         (WebInspector.SnippetsModel.prototype.snippetForSourceURL):
151         (WebInspector.SnippetsScriptMapping):
152         (WebInspector.SnippetsScriptMapping.prototype.uiSourceCodeList):
153         (WebInspector.SnippetsScriptMapping.prototype.addScript):
154         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
155         (WebInspector.SnippetsScriptMapping.prototype._releaseSnippetScript.get if):
156         (WebInspector.SnippetsScriptMapping.prototype._releaseSnippetScript):
157         (WebInspector.SnippetsScriptMapping.prototype._snippetDeleted.get this):
158         (WebInspector.SnippetsScriptMapping.prototype._snippetDeleted):
159         (WebInspector.SnippetsScriptMapping.prototype.reset):
160         (WebInspector.SnippetContentProvider):
161
162 2012-03-14  Sheriff Bot  <webkit.review.bot@gmail.com>
163
164         Unreviewed, rolling out r110673.
165         http://trac.webkit.org/changeset/110673
166         https://bugs.webkit.org/show_bug.cgi?id=81090
167
168         "Qt minimal build broken" (Requested by yurys on #webkit).
169
170         * inspector/CodeGeneratorInspector.py:
171         (CommandReturnPassModel.ByPointer.get_set_return_condition):
172         (TypeModel.Enum.get_optional.EnumOptional.get_command_return_pass_model):
173         (TypeModel.ValueType.ValueOptional.get_command_return_pass_model):
174         (Generator.process_event):
175         (Generator.process_command):
176         * inspector/ContentSearchUtils.cpp:
177         (WebCore::ContentSearchUtils::buildObjectForSearchMatch):
178         (WebCore::ContentSearchUtils::searchInTextByLines):
179         * inspector/ContentSearchUtils.h:
180         (ContentSearchUtils):
181         * inspector/InjectedScript.cpp:
182         (WebCore::InjectedScript::evaluate):
183         (WebCore::InjectedScript::callFunctionOn):
184         (WebCore::InjectedScript::evaluateOnCallFrame):
185         (WebCore::InjectedScript::makeEvalCall):
186         * inspector/InjectedScript.h:
187         (InjectedScript):
188         * inspector/InspectorDOMDebuggerAgent.cpp:
189         (WebCore::InspectorDOMDebuggerAgent::didInvalidateStyleAttr):
190         (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode):
191         (WebCore::InspectorDOMDebuggerAgent::willRemoveDOMNode):
192         (WebCore::InspectorDOMDebuggerAgent::willModifyDOMAttr):
193         (WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
194         (WebCore::InspectorDOMDebuggerAgent::willSendXMLHttpRequest):
195         * inspector/InspectorDebuggerAgent.cpp:
196         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
197         (WebCore::InspectorDebuggerAgent::setBreakpoint):
198         (WebCore::InspectorDebuggerAgent::searchInContent):
199         (WebCore::InspectorDebuggerAgent::setScriptSource):
200         (WebCore::InspectorDebuggerAgent::getFunctionDetails):
201         (WebCore::InspectorDebuggerAgent::schedulePauseOnNextStatement):
202         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
203         (WebCore::InspectorDebuggerAgent::didPause):
204         (WebCore::InspectorDebuggerAgent::breakProgram):
205         (WebCore::InspectorDebuggerAgent::clearBreakDetails):
206         * inspector/InspectorDebuggerAgent.h:
207         (InspectorDebuggerAgent):
208         * inspector/InspectorPageAgent.cpp:
209         (WebCore::buildObjectForCookie):
210         (WebCore::buildArrayForCookies):
211         (WebCore::InspectorPageAgent::getCookies):
212         (WebCore::InspectorPageAgent::getResourceTree):
213         (WebCore::InspectorPageAgent::searchInResource):
214         (WebCore::InspectorPageAgent::searchInResources):
215         (WebCore::InspectorPageAgent::buildObjectForFrame):
216         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
217         * inspector/InspectorPageAgent.h:
218         * inspector/InspectorRuntimeAgent.cpp:
219         (WebCore::InspectorRuntimeAgent::evaluate):
220         (WebCore::InspectorRuntimeAgent::callFunctionOn):
221
222 2012-03-14  Renata Hodovan  <reni@webkit.org>
223
224         External <use> xlink:href references do not work
225         https://bugs.webkit.org/show_bug.cgi?id=12499
226
227         Reviewed by Nikolas Zimmermann.
228
229         This is a follow-up patch after r108785.
230         In this patch we bind the previously introduced CachedSVGDocument class
231         into the caching mechanism of SVGUseElement. The mode how external resources
232         are handled is similar to the processing of internal ones. We build the instance
233         and shadow tree the same way but we have to keep in mind that the requested resources
234         maybe not loaded yet. We can check it with cachedDocumentIsStillLoading() function.
235
236         SVGURIReference::targetElementFromIRIString() also need to be extended. The baseURI
237         computation needs to take the referenced documents URL into account, instead of the current documents.
238
239         The patch affects a lot of tests which have external resources especially in svg/batik. Because
240         of the size of that test refactor they will be commited in a follow-up patch.
241
242         Tests: svg/W3C-SVG-1.2-Tiny/struct-use-recursion-01-t.svg
243                svg/W3C-SVG-1.2-Tiny/struct-use-recursion-02-t.svg
244                svg/W3C-SVG-1.2-Tiny/struct-use-recursion-03-t.svg
245                svg/custom/use-extern-href.svg
246                svg/custom/use-referencing-an-image-expected.svg
247                svg/custom/use-referencing-an-image.svg
248                svg/custom/use-referencing-indirectly-itself-expected.svg
249                svg/custom/use-referencing-indirectly-itself.svg
250                svg/custom/use-referencing-itself-expected.svg
251                svg/custom/use-referencing-itself.svg
252                svg/dynamic-updates/SVGUseElement-dom-href1-attr.html
253                svg/dynamic-updates/SVGUseElement-dom-href2-attr.html
254                svg/dynamic-updates/SVGUseElement-svgdom-href1-prop.html
255                svg/dynamic-updates/SVGUseElement-svgdom-href2-prop.html
256
257         * loader/cache/CachedResourceLoader.cpp:
258         (WebCore):
259         (WebCore::CachedResourceLoader::requestSVGDocument):
260         * loader/cache/CachedResourceLoader.h:
261         (WebCore):
262         (CachedResourceLoader):
263         * page/ContentSecurityPolicy.h:
264         * platform/KURL.cpp:
265         (WebCore::equalIgnoringFragmentIdentifier):
266         * platform/network/chromium/ResourceRequest.h:
267         * svg/SVGURIReference.cpp:
268         (WebCore::urlFromIRIStringWithFragmentIdentifier):
269         (WebCore):
270         (WebCore::SVGURIReference::targetElementFromIRIString):
271         * svg/SVGURIReference.h:
272         (SVGURIReference):
273         (WebCore::SVGURIReference::isExternalURIReference):
274         * svg/SVGUseElement.cpp:
275         (WebCore::SVGUseElement::SVGUseElement):
276         (WebCore::SVGUseElement::~SVGUseElement):
277         (WebCore):
278         (WebCore::SVGUseElement::referencedDocument):
279         (WebCore::SVGUseElement::externalDocument):
280         (WebCore::SVGUseElement::svgAttributeChanged):
281         (WebCore::dumpInstanceTree):
282         (WebCore::SVGUseElement::buildPendingResource):
283         (WebCore::SVGUseElement::buildShadowAndInstanceTree):
284         (WebCore::SVGUseElement::hasCycleUseReferencing):
285         (WebCore::SVGUseElement::expandUseElementsInShadowTree):
286         (WebCore::SVGUseElement::expandSymbolElementsInShadowTree):
287         (WebCore::SVGUseElement::notifyFinished):
288         (WebCore::SVGUseElement::cachedDocumentIsStillLoading):
289         (WebCore::SVGUseElement::instanceTreeIsLoading):
290         * svg/SVGUseElement.h:
291         (WebCore):
292         (SVGUseElement):
293
294 2012-03-14  Peter Rybin  <peter.rybin@gmail.com>
295
296         Web Inspector: TypeBuilder: Introduce OptOutput class for optional output parameters
297         https://bugs.webkit.org/show_bug.cgi?id=80789
298
299         Reviewed by Yury Semikhatsky.
300
301         OptOutput class is added for optional return parameters.
302
303         Strict mode added to Generator that makes all parameter types strict
304         and drop pre-set default values for return parameters.
305
306         Debugger and Page domain is switched to strict mode.
307
308
309         * inspector/CodeGeneratorInspector.py:
310         (CommandReturnPassModel.ByPointer):
311         (CommandReturnPassModel):
312         (CommandReturnPassModel.OptOutput):
313         (CommandReturnPassModel.OptOutput.__init__):
314         (CommandReturnPassModel.OptOutput.get_return_var_type):
315         (CommandReturnPassModel.OptOutput.get_output_argument_prefix):
316         (CommandReturnPassModel.OptOutput.get_output_to_raw_expression):
317         (CommandReturnPassModel.OptOutput.get_output_parameter_type):
318         (CommandReturnPassModel.OptOutput.get_set_return_condition):
319         (TypeModel.Enum.get_optional.EnumOptional.get_command_return_pass_model):
320         (TypeModel.ValueType.ValueOptional.get_command_return_pass_model):
321         (OptOutput):
322         (Generator.process_event):
323         (Generator.process_command):
324         * inspector/ContentSearchUtils.cpp:
325         (WebCore::ContentSearchUtils::buildObjectForSearchMatch):
326         (WebCore::ContentSearchUtils::searchInTextByLines):
327         * inspector/ContentSearchUtils.h:
328         (ContentSearchUtils):
329         * inspector/InjectedScript.cpp:
330         (WebCore::InjectedScript::evaluate):
331         (WebCore::InjectedScript::callFunctionOn):
332         (WebCore::InjectedScript::evaluateOnCallFrame):
333         (WebCore::InjectedScript::makeEvalCall):
334         * inspector/InjectedScript.h:
335         (InjectedScript):
336         * inspector/InspectorDOMDebuggerAgent.cpp:
337         (WebCore):
338         * inspector/InspectorDebuggerAgent.cpp:
339         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
340         (WebCore::InspectorDebuggerAgent::setBreakpoint):
341         (WebCore::InspectorDebuggerAgent::searchInContent):
342         (WebCore::InspectorDebuggerAgent::setScriptSource):
343         (WebCore::InspectorDebuggerAgent::getFunctionDetails):
344         (WebCore::InspectorDebuggerAgent::schedulePauseOnNextStatement):
345         (WebCore::InspectorDebuggerAgent::evaluateOnCallFrame):
346         (WebCore::InspectorDebuggerAgent::didPause):
347         (WebCore::InspectorDebuggerAgent::breakProgram):
348         (WebCore::InspectorDebuggerAgent::clearBreakDetails):
349         * inspector/InspectorDebuggerAgent.h:
350         (InspectorDebuggerAgent):
351         * inspector/InspectorPageAgent.cpp:
352         (WebCore::buildObjectForCookie):
353         (WebCore::buildArrayForCookies):
354         (WebCore::InspectorPageAgent::getCookies):
355         (WebCore::InspectorPageAgent::getResourceTree):
356         (WebCore::InspectorPageAgent::searchInResource):
357         (WebCore::InspectorPageAgent::searchInResources):
358         (WebCore::InspectorPageAgent::buildObjectForFrame):
359         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
360         * inspector/InspectorPageAgent.h:
361         * inspector/InspectorRuntimeAgent.cpp:
362         (WebCore::InspectorRuntimeAgent::evaluate):
363         (WebCore::InspectorRuntimeAgent::callFunctionOn):
364
365 2012-03-14  Sergio Villar Senin  <svillar@igalia.com>
366
367         Unreviewed. Build fix for EFL after r110669.
368
369         * PlatformEfl.cmake: added DNSSoup.cpp
370
371 2012-03-13  Sergio Villar Senin  <svillar@igalia.com>
372
373         [GTK] Use the same DNS prefetching path than the other ports.
374         https://bugs.webkit.org/show_bug.cgi?id=80997
375
376         Reviewed by Martin Robinson.
377
378         This patch basically reverts r56128. There is no need to add an
379         special code path for GTK+ DNS pre-fetching because the main
380         reason to do that (some potential changes in libsoup) is not
381         going to happen. It also reduces the amount of DNS queries by
382         adding a NULL hostname check.
383
384         No need for new tests as this just moves code around.
385
386         * GNUmakefile.list.am:
387         * html/HTMLAnchorElement.cpp:
388         (WebCore::HTMLAnchorElement::parseAttribute):
389         * html/HTMLLinkElement.cpp:
390         * loader/LinkLoader.cpp:
391         (WebCore::LinkLoader::loadLink):
392         * page/Chrome.cpp:
393         (WebCore::Chrome::mouseDidMoveOverElement):
394         * platform/network/DNS.h:
395         (WebCore):
396         * platform/network/ResourceHandle.cpp:
397         * platform/network/ResourceHandle.h:
398         (ResourceHandle):
399         * platform/network/chromium/DNSChromium.cpp:
400         * platform/network/soup/DNSSoup.cpp: restored.
401         (WebCore):
402         (WebCore::prefetchDNS):
403         * platform/network/soup/ResourceHandleSoup.cpp:
404
405 2012-03-14  Kentaro Hara  <haraken@chromium.org>
406
407         Return null when shouldAllowAccessToNode() fails
408         https://bugs.webkit.org/show_bug.cgi?id=80205
409
410         Reviewed by Adam Barth.
411
412         shouldAllowAccessToNode() is used for window.frameElement, HTMLFrameElement.contentDocument,
413         and getSVGDocument(). The spec of window.frameElement and HTMLFrameElement.contentDocument
414         requires that they should return null when the security check fails.
415         Thus this patch changes the return value from undefined to null.
416
417         http://www.whatwg.org/specs/web-apps/current-work/multipage/browsers.html#navigating-nested-browsing-contexts-in-the-dom
418         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#dom-iframe-contentdocument
419
420         Tests: http/tests/security/local-iFrame-from-remote.html
421                http/tests/security/cross-frame-access-frameelement.html
422                http/tests/security/cross-frame-access-put.html
423
424         * bindings/scripts/CodeGeneratorJS.pm:
425         (GenerateImplementation):
426         * bindings/scripts/CodeGeneratorV8.pm:
427         (GenerateNormalAttrGetter):
428         (GenerateFunctionCallback):
429
430         * bindings/scripts/test/JS/JSTestObj.cpp: Updated run-bindings-tests results.
431         (WebCore::jsTestObjContentDocument):
432         (WebCore::jsTestObjPrototypeFunctionGetSVGDocument):
433         * bindings/scripts/test/V8/V8TestObj.cpp:
434         (WebCore::TestObjInternal::contentDocumentAttrGetter):
435         (WebCore::TestObjInternal::getSVGDocumentCallback):
436
437 2012-03-13  Yosifumi Inoue  <yosin@chromium.org>
438
439         [Forms] Hidden input element should not have labels. 
440         https://bugs.webkit.org/show_bug.cgi?id=80403
441
442         Reviewed by Kent Tamura.
443
444         This patch changes "labels" attribute behavior for hidden input type.
445         It returns null instead of NodeList of labels or empty node list.
446
447         Note: The HTML5 specification isn't clear for non-labelable element's "labels"
448         attribute return value. Firefox and Opera return empty node list. IE returns null.
449
450         No new tests. Existing tests are updated.
451
452         * html/HTMLInputElement.cpp:
453         (WebCore::HTMLInputElement::isLabelable): Added. Dispatch to InputType.
454         * html/HiddenInputType.h:  Added isLabelable returning false.
455         * html/InputType.cpp:
456         (WebCore::InputType::isLabelable): Added. Returning true for all input types except for "hidden" type.
457         (WebCore):
458         * html/InputType.h:
459         (InputType): Added isLabelable declaration.
460
461 2012-03-13  Yosifumi Inoue  <yosin@chromium.org>
462
463         [Forms] The "output" element should have labels.
464         https://bugs.webkit.org/show_bug.cgi?id=80466
465
466         Reviewed by Kent Tamura.
467
468         This patch enables functionality of "labels" attribute for
469         HTMLOutputElement implemented in LabelableElement which use
470         isLabelable predicate whether an element can have label or not.
471
472         Update existing tests in fast/forms/label/ directory to cover
473         the "output" element with the "labels" attribute.
474
475         * html/HTMLOutputElement.h: Implement virtual method isLabelable.
476
477 2012-03-13  Luke Macpherson   <macpherson@chromium.org>
478
479         Move opacity clamping into RenderStyle setter.
480         https://bugs.webkit.org/show_bug.cgi?id=76966
481
482         Reviewed by Eric Seidel.
483
484         Covered by existing tests.
485
486         * css/CSSStyleSelector.cpp:
487         (WebCore::CSSStyleSelector::applyProperty):
488         * rendering/style/RenderStyle.h:
489         (WebCore::RenderStyleBitfields::setOpacity):
490
491 2012-03-12  Igor Oliveira  <igor.o@sisa.samsung.com>
492
493         Split the extra logic out of RenderObjectChildList::updateBeforeAfterContent
494         https://bugs.webkit.org/show_bug.cgi?id=80856
495
496         Extra part of the generated content handling logic out of RenderObjectChildList::updateBeforeAfterContent
497
498         Reviewed by Julien Chaffraix.
499
500         No change in behavior expected.
501
502         * rendering/RenderObjectChildList.cpp:
503         (WebCore::RenderObjectChildList::updateBeforeAfterStyle):
504         (WebCore::createRenderForBeforeAfterContent):
505         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
506         * rendering/RenderObjectChildList.h:
507         (WebCore):
508         (RenderObjectChildList):
509
510 2012-03-13  Simon Fraser  <simon.fraser@apple.com>
511
512         Fix potential crash when loading test results
513         https://bugs.webkit.org/show_bug.cgi?id=81062
514         <rdar://problem/11041732>
515         
516         Reviewed by Dean Jackson.
517
518         If RenderLayerBacking::isSimpleContainerCompositingLayer() is called early,
519         before the document has a documentElement(), then it crashes. Fix with
520         a null check on documentElement().
521         
522         No test because it's timing dependent.
523
524         * rendering/RenderLayerBacking.cpp:
525         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
526
527 2012-03-13  Dan Bernstein  <mitz@apple.com>
528
529         <rdar://problem/11025225> Assertion failure in RenderView::computeRectForRepaint() (!repaintContainer || repaintContainer == this) at store.apple.com
530         https://bugs.webkit.org/show_bug.cgi?id=81051
531
532         Reviewed by Simon Fraser.
533
534         Test: ManualTests/inline-repaint-container.html.
535
536         * rendering/RenderInline.cpp:
537         (WebCore::RenderInline::clippedOverflowRectForRepaint): This function was not handling the
538         case of the repaint container being a descendant of the containing block correctly, leading
539         to the assertion failure, but also to a correctness bug seen in the new test. If the repaint
540         container is a descendant of the containing block, just return the rect in the repaint
541         container coordinates.
542
543 2012-03-13  Dan Bernstein  <mitz@apple.com>
544
545         <rdar://problem/11025217> [Mac] Assertion failure in collectComplexTextRunsForCharactersCoreText
546         https://bugs.webkit.org/show_bug.cgi?id=77044
547
548         Reviewed by Sam Weinig.
549
550         Test: platform/mac/fast/text/core-text-fallback-to-unknown-font.html
551
552         Handle the case of Core Text choosing a fallback font that NSFontManager cannot find by name.
553
554         * platform/graphics/FontCache.h:
555         (FontCache): Made ComplexTextController a friend class.
556         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
557         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): Removed the
558         failing assertion, which was not true, and added code to handle the case where a font
559         cannot be found by name by using the font as returned from Core Text.
560
561 2012-03-13  Erik Arvidsson  <arv@chromium.org>
562
563         [V8] Use v8::V8::AddImplicitReferences instead of SetHiddenValue
564         https://bugs.webkit.org/show_bug.cgi?id=80880
565
566         Reviewed by Adam Barth.
567
568         We used to add a hidden property in the getter to the returned wrapper.
569         With this patch we instead handle the liveness of the wrapper in the GC phase by
570         calling v8::V8::AddHiddenReference.
571
572         To reduce the amount of custom code we need, the V8 code generator now supports
573         GenerateIsReachable (as well as CustomIsReachable) which, even though different
574         from the JSC attribute, is used in the same cases and takes the same values (even though
575         at the moment not all JSC values are supported by V8). Interfaces that have *IsReachable
576         also have a dependent life time (just like if V8DependentLifetime was present).
577
578         Second try. This time with an added include in TextTrackList.cpp.
579
580         No new tests. Covered by existing tests.
581
582         * Target.pri:
583         * UseV8.cmake:
584         * WebCore.gypi:
585         * bindings/scripts/CodeGeneratorJS.pm:
586         (GetGenerateIsReachable):
587         (GetCustomIsReachable):
588         (GenerateHeader):
589         (GenerateImplementation):
590         * bindings/scripts/CodeGeneratorV8.pm:
591         (NeedsToVisitDOMWrapper):
592         (GetGenerateIsReachable):
593         (GetCustomIsReachable):
594         (GenerateVisitDOMWrapper):
595         (GenerateHeader):
596         (GenerateNamedConstructorCallback):
597         (GenerateImplementation):
598         * bindings/scripts/IDLAttributes.txt:
599         * bindings/scripts/test/V8/V8Float64Array.cpp:
600         (WebCore):
601         * bindings/scripts/test/V8/V8Float64Array.h:
602         (V8Float64Array):
603         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
604         (WebCore):
605         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
606         (V8TestActiveDOMObject):
607         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
608         (WebCore):
609         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
610         (V8TestCustomNamedGetter):
611         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
612         (WebCore):
613         * bindings/scripts/test/V8/V8TestEventConstructor.h:
614         (V8TestEventConstructor):
615         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
616         (WebCore):
617         * bindings/scripts/test/V8/V8TestEventTarget.h:
618         (V8TestEventTarget):
619         * bindings/scripts/test/V8/V8TestInterface.cpp:
620         (WebCore):
621         * bindings/scripts/test/V8/V8TestInterface.h:
622         (V8TestInterface):
623         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
624         (WebCore):
625         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
626         (V8TestMediaQueryListListener):
627         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
628         (WebCore):
629         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
630         (V8TestNamedConstructor):
631         * bindings/scripts/test/V8/V8TestObj.cpp:
632         (WebCore):
633         * bindings/scripts/test/V8/V8TestObj.h:
634         (V8TestObj):
635         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
636         (WebCore):
637         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
638         (V8TestSerializedScriptValueInterface):
639         * bindings/v8/NPV8Object.cpp:
640         (WebCore::npObjectTypeInfo):
641         * bindings/v8/V8GCController.cpp:
642         (WebCore::GrouperVisitor::visitDOMWrapper):
643         * bindings/v8/WrapperTypeInfo.h:
644         (WebCore):
645         (WrapperTypeInfo):
646         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: Removed.
647         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
648         * bindings/v8/custom/V8DOMTokenListCustom.cpp: Removed.
649         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
650         (WebCore):
651         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
652         * bindings/v8/custom/V8StyleSheetCustom.cpp:
653         (WebCore::toV8):
654         * css/CSSStyleSheet.idl:
655         * css/StyleSheet.idl:
656         * dom/DOMStringMap.idl:
657         * dom/NamedNodeMap.idl:
658         * html/DOMTokenList.idl:
659         * html/track/TextTrackList.cpp:
660         * html/track/TextTrackList.idl:
661
662 2012-03-13  Jacky Jiang  <zhajiang@rim.com>
663
664         MathML crash in WebCore::Node::previousSibling()
665         https://bugs.webkit.org/show_bug.cgi?id=80773
666
667         Reviewed by Julien Chaffraix.
668
669         When adding child for msub render, if the child is mtr or mtd render,
670         we will creat an anonymous render as the container. As the anonymous
671         render's node is 0, accessing it directly can cause crash.
672         We should do a valid check of the node before using. In addition to
673         that, for msub, attach the anonymous render and it's children to render
674         tree. For msubsup, such kind of situation should never happen based on
675         the current codebase.
676
677         Test: mathml/msub-anonymous-child-render-crash.html
678
679         * rendering/mathml/RenderMathMLSubSup.cpp:
680         (WebCore::RenderMathMLSubSup::addChild):
681
682 2012-03-13  Mihnea Ovidenie  <mihnea@adobe.com>
683
684         [CSSRegions]NamedFlow::getRegionsByContentNode should not return a live NodeList
685         https://bugs.webkit.org/show_bug.cgi?id=81021
686
687         Reviewed by Ryosuke Niwa.
688
689         Reverting the original patch as we need a better solution.
690
691         * CMakeLists.txt:
692         * GNUmakefile.list.am:
693         * Target.pri:
694         * WebCore.gypi:
695         * WebCore.vcproj/WebCore.vcproj:
696         * WebCore.xcodeproj/project.pbxproj:
697         * dom/Node.cpp:
698         (WebCore::NodeListsNodeData::invalidateCaches):
699         (WebCore::NodeListsNodeData::isEmpty):
700         * dom/Node.h:
701         (Node):
702         * dom/NodeRareData.h:
703         (NodeListsNodeData):
704         * dom/RegionNodeList.cpp: Removed.
705         * dom/RegionNodeList.h: Removed.
706         * dom/WebKitNamedFlow.cpp:
707         * dom/WebKitNamedFlow.h:
708         (WebKitNamedFlow):
709         * dom/WebKitNamedFlow.idl:
710         * rendering/RenderFlowThread.cpp:
711         * rendering/RenderFlowThread.h:
712         * rendering/RenderRegion.h:
713         (RenderRegion):
714
715 2012-03-13  Shawn Singh  <shawnsingh@chromium.org>
716
717         [chromium] wrong transform causing incorrect culling
718         https://bugs.webkit.org/show_bug.cgi?id=80471
719
720         Reviewed by James Robinson.
721
722         Unit test added to CCRenderSurfaceTest.cpp
723
724         In addition to using originTransform() instead of drawTransform(),
725         this patch shuffles a bit of code so that a unit test can be
726         easily added.
727
728         * platform/graphics/chromium/cc/CCRenderPass.cpp:
729         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
730         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
731         (WebCore::CCRenderSurface::createSharedQuadState):
732         (WebCore):
733         * platform/graphics/chromium/cc/CCRenderSurface.h:
734         (CCRenderSurface):
735
736 2012-03-13  Dave Tharp  <dtharp@codeaurora.org>
737
738         Alternate xml-stylesheets with no title are loaded, in violation of the CSSOM draft
739         https://bugs.webkit.org/show_bug.cgi?id=77549
740
741         Reviewed by David Hyatt.
742
743         Amended code to ignore alternate stylesheets that do not have a title attribute.
744
745         Test: fast/css/xml-stylesheet-alternate-no-title.xhtml
746
747         * dom/ProcessingInstruction.cpp:
748         (WebCore::ProcessingInstruction::checkStyleSheet):
749
750 2012-03-13  Levi Weintraub  <leviw@chromium.org>
751
752         Revert RenderLayer::absoluteBoundingBox to an IntRect
753         https://bugs.webkit.org/show_bug.cgi?id=81017
754
755         Reviewed by Eric Seidel.
756
757         Reverting RenderLayer::absoluteBoundingBox to an (pixel snapped) IntRect. Whenever
758         possible, we use integers representing for absolute coordinates. This is especially
759         relevant for methods, such as this one, that are exported and used in platform code.
760
761         No new tests. No change in behavior.
762
763         * rendering/RenderLayer.cpp:
764         (WebCore::RenderLayer::absoluteBoundingBox):
765         * rendering/RenderLayer.h:
766         (RenderLayer):
767         * rendering/RenderLayerCompositor.cpp:
768         (WebCore::RenderLayerCompositor::requiresCompositingForPosition): This intersects
769         the absolute bounding box with the FrameView, which uses all integer values. It's
770         the only use of absoluteBoundingBox in WebCore.
771
772 2012-03-13  Nat Duca  <nduca@chromium.org>
773
774         [chromium] vsync ticks are needed in invisible tabs when we are still updating resources
775         https://bugs.webkit.org/show_bug.cgi?id=80910
776
777         Reviewed by James Robinson.
778
779         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
780         (WebCore::CCSchedulerStateMachine::vsyncCallbackNeeded):
781
782 2012-03-13  Dave Tharp  <dtharp@codeaurora.org>
783
784         Alternate stylesheets (without title attribute) are loaded on refresh
785         https://bugs.webkit.org/show_bug.cgi?id=24354
786
787         Reviewed by David Hyatt.
788
789         Alternate stylesheets are now ignored in <link> tags if 
790         they have no title attribute (per spec).
791
792         Tests: fast/css/link-alternate-stylesheet-1.html
793                fast/css/link-alternate-stylesheet-2.html
794                fast/css/link-alternate-stylesheet-3.html
795                fast/css/link-alternate-stylesheet-4.html
796                fast/css/link-alternate-stylesheet-5.html
797
798         * dom/Document.cpp:
799         (WebCore::Document::collectActiveStylesheets):
800
801 2012-03-13  Dana Jansens  <danakj@chromium.org>
802
803         Region::contains(IntPoint) is slow
804         https://bugs.webkit.org/show_bug.cgi?id=81008
805
806         Reviewed by Anders Carlsson.
807
808         Speed up Region::contains(IntPoint) by directly testing if the point
809         is inside the Region's shape, rather than using a temporary 1x1 Region
810         for the test.
811
812         Unit test: RegionTest.containsPoint
813
814         * platform/graphics/Region.cpp:
815         (WebCore::Region::contains):
816
817 2012-03-13  Adrienne Walker  <enne@google.com>
818
819         [chromium] Mark root layer scrollbars as always opaque to disable blending
820         https://bugs.webkit.org/show_bug.cgi?id=79951
821
822         Reviewed by James Robinson.
823
824         Now that scrollbar layers exist, mark non-overlay root scrollbars as
825         opaque. This disables blending for correctness and performance.
826
827         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
828         (WebCore::scrollbarLayerDidChange):
829         (WebCore::ScrollingCoordinator::frameViewHorizontalScrollbarLayerDidChange):
830         (WebCore::ScrollingCoordinator::frameViewVerticalScrollbarLayerDidChange):
831         * platform/graphics/chromium/LayerRendererChromium.cpp:
832         (WebCore::LayerRendererChromium::drawTileQuad):
833
834 2012-03-13  Gavin Peters  <gavinp@chromium.org>
835
836         Remove vestigal abortEvent from image attribute.
837         https://bugs.webkit.org/show_bug.cgi?id=80795
838
839         Reviewed by Adam Barth.
840
841         It seems we installed a listener for the abort event on images,
842         but never ever raised them.  So this patch removes it.  This could
843         cause different behaviour if the user sends abort events directly
844         at an image element, although addEventListener will still work.
845
846         * html/HTMLImageElement.cpp:
847         (WebCore::HTMLImageElement::parseAttribute):
848
849 2012-03-13  Nate Chapin  <japhet@chromium.org>
850
851         Rework how a CachedRawResource decides if it can be reused
852         for a given ResourceRequest. Ensure method, body, cookie policy,
853         and all headers match.
854         http://bugs.webkit.org/show_bug.cgi?id=79325
855
856         Reviewed by Oliver Hunt.
857
858         Test: http/tests/cache/xhr-body.html
859
860         * loader/cache/CachedRawResource.cpp:
861         (WebCore::CachedRawResource::canReuse):
862         * loader/cache/CachedRawResource.h: Take a ResourceRequest in canReuse().
863         * loader/cache/CachedResourceLoader.cpp:
864         (WebCore::CachedResourceLoader::determineRevalidationPolicy): Remove Range header
865             check, since it is now redundant.
866
867 2012-03-13  Rob Buis  <rbuis@rim.com>
868
869         Fix cast-align GCC warning
870         https://bugs.webkit.org/show_bug.cgi?id=80790
871
872         Reviewed by Dan Bates.
873
874         This touches unpackOneRowOfBGRA8ToRGBA8.
875
876         * platform/graphics/GraphicsContext3D.cpp:
877         (WebCore):
878
879 2012-03-12  Simon Fraser  <simon.fraser@apple.com>
880
881         Refactor some code that is used to check whether a layer needs backing store
882         https://bugs.webkit.org/show_bug.cgi?id=80917
883
884         Reviewed by Dean Jackson.
885
886         Move some code out of isSimpleContainerCompositingLayer() in two new
887         methods to make the code more self-descriptive.
888         
889         No behavior change, so no tests.
890
891         * rendering/RenderLayerBacking.cpp:
892         (WebCore::RenderLayerBacking::paintsBoxDecorations):
893         (WebCore::RenderLayerBacking::paintsChildren):
894         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
895         * rendering/RenderLayerBacking.h:
896         (RenderLayerBacking):
897
898 2012-03-13  Daniel Bates  <dbates@webkit.org>
899
900         REGRESSION(r99369): File input button doesn't highlight when pressed
901         https://bugs.webkit.org/show_bug.cgi?id=79385
902
903         Reviewed by Kent Tamura.
904
905         Fixes an issue where the file input button doesn't highlight on mouse press.
906
907         Currently we always override the active state of the button with whether
908         a dragged file is being hovered over the file input control (i.e. can the control
909         receive a dropped file; HTMLInputElement::canReceiveDroppedFiles()).
910         Instead, we should only override the active state of the button when the state
911         changes for whether we can receive dropped files (e.g. during a drag) so that
912         we honor the active state of the button when it is pressed.
913
914         Test: fast/forms/file/file-input-pressed-state.html
915
916         * rendering/RenderFileUploadControl.cpp:
917         (WebCore::RenderFileUploadControl::RenderFileUploadControl):
918         (WebCore::RenderFileUploadControl::updateFromElement):
919         * rendering/RenderFileUploadControl.h:
920         (RenderFileUploadControl):
921
922 2012-03-13  Dana Jansens  <danakj@chromium.org>
923
924         [chromium] Use CCOcclusionTracker for draw culling
925         https://bugs.webkit.org/show_bug.cgi?id=80743
926
927         Reviewed by Adrienne Walker.
928
929         In this CL we enable the use of CCOcclusionTracker for draw-side
930         culling. This means moving from a per-quad culling model to a
931         per-layer model.
932
933         When calculating RenderPasses, we construct the set of passes,
934         then iterate over layers in front-to-back order. We make
935         CCQuadCuller instantiable, and pass it to the layer
936         appendQuads() methods instead of the bare list, where it can
937         filter quads before the end up in the list.
938
939         Covered by existing tests.
940
941         * platform/graphics/chromium/LayerRendererChromium.cpp:
942         (WebCore::LayerRendererChromium::drawRenderPass):
943         * platform/graphics/chromium/LayerRendererChromium.h:
944         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
945         (WebCore::CCCanvasLayerImpl::appendQuads):
946         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
947         (CCCanvasLayerImpl):
948         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
949         (WebCore::CCLayerImpl::appendQuads):
950         (WebCore::CCLayerImpl::appendGutterQuads):
951         (WebCore::CCLayerImpl::appendDebugBorderQuad):
952         * platform/graphics/chromium/cc/CCLayerImpl.h:
953         (WebCore):
954         (CCLayerImpl):
955         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
956         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
957         (WebCore::CCLayerTreeHostImpl::drawLayers):
958         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
959         (CCLayerTreeHostImpl):
960         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
961         (WebCore::CCPluginLayerImpl::appendQuads):
962         * platform/graphics/chromium/cc/CCPluginLayerImpl.h:
963         (CCPluginLayerImpl):
964         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
965         (WebCore::CCQuadCuller::CCQuadCuller):
966         (WebCore::CCQuadCuller::append):
967         * platform/graphics/chromium/cc/CCQuadCuller.h:
968         (WebCore):
969         (CCQuadCuller):
970         * platform/graphics/chromium/cc/CCRenderPass.cpp:
971         (WebCore::CCRenderPass::appendQuadsForLayer):
972         * platform/graphics/chromium/cc/CCRenderPass.h:
973         (WebCore):
974         (CCQuadList):
975         (WebCore::CCQuadList::backToFrontBegin):
976         (WebCore::CCQuadList::backToFrontEnd):
977         (CCRenderPass):
978         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
979         (WebCore::CCScrollbarLayerImpl::appendQuads):
980         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
981         (CCScrollbarLayerImpl):
982         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
983         (WebCore::CCSolidColorLayerImpl::appendQuads):
984         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
985         (CCSolidColorLayerImpl):
986         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
987         (WebCore::CCTiledLayerImpl::appendQuads):
988         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
989         (CCTiledLayerImpl):
990         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
991         (WebCore::CCVideoLayerImpl::appendQuads):
992         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
993         (CCVideoLayerImpl):
994
995 2012-03-13  Adam Barth  <abarth@webkit.org> && Benjamin Poulain  <bpoulain@apple.com>
996
997         Always enable ENABLE(CLIENT_BASED_GEOLOCATION)
998         https://bugs.webkit.org/show_bug.cgi?id=78853
999
1000         Reviewed by Adam Barth.
1001
1002         * CMakeLists.txt:
1003         * Configurations/FeatureDefines.xcconfig:
1004         * GNUmakefile.am:
1005         * GNUmakefile.list.am:
1006         * Modules/geolocation/Geolocation.cpp:
1007         (WebCore):
1008         (WebCore::createPositionError):
1009         (WebCore::Geolocation::Geolocation):
1010         (WebCore::Geolocation::stop):
1011         (WebCore::Geolocation::lastPosition):
1012         (WebCore::Geolocation::requestPermission):
1013         (WebCore::Geolocation::startUpdating):
1014         (WebCore::Geolocation::stopUpdating):
1015         * Modules/geolocation/Geolocation.h:
1016         (WebCore):
1017         (Geolocation):
1018         * Modules/geolocation/GeolocationController.cpp:
1019         * Modules/geolocation/GeolocationController.h:
1020         * Modules/geolocation/GeolocationError.h:
1021         * Modules/geolocation/GeolocationPosition.h:
1022         * Target.pri:
1023         * WebCore.exp.in:
1024         * WebCore.gypi:
1025         * WebCore.vcproj/WebCore.vcproj:
1026         * bindings/js/JSGeolocationCustom.cpp:
1027         * loader/EmptyClients.h:
1028         (EmptyChromeClient):
1029         * page/ChromeClient.h:
1030         (ChromeClient):
1031         * page/Page.cpp:
1032         (WebCore::Page::Page):
1033         * page/Page.h:
1034         (Page):
1035         * platform/GeolocationService.cpp: Removed.
1036         * platform/GeolocationService.h: Removed.
1037         * platform/mock/GeolocationClientMock.cpp:
1038         * platform/mock/GeolocationClientMock.h:
1039         * platform/mock/GeolocationServiceMock.cpp: Removed.
1040         * platform/mock/GeolocationServiceMock.h: Removed.
1041
1042 2012-03-12  Antonio Gomes  <agomes@rim.com>
1043
1044         Convert nodesFromRect tests to use Internals interface
1045         https://bugs.webkit.org/show_bug.cgi?id=80886
1046
1047         Reviewed by Ryosuke Niwa.
1048
1049         Add Internals::nodesFromRect implementation to unify
1050         the codepath for testing Document::nodesFromRect in a
1051         cross port way.
1052
1053         No new tests, since we are improving here the infra-structure
1054         for testing a specific method.
1055
1056         * testing/Internals.cpp:
1057         (WebCore::Internals::nodesFromRect):
1058         (WebCore):
1059         * testing/Internals.h:
1060         (Internals):
1061         * testing/Internals.idl:
1062
1063 2012-03-13  Philip Rogers  <pdr@google.com>
1064
1065         Fix the use of stale text fragments
1066         https://bugs.webkit.org/show_bug.cgi?id=80729
1067
1068         Reviewed by Nikolas Zimmermann.
1069
1070         Previously, we were allowing SVGTextFragments to get out of sync with the
1071         actual text in RenderSVGInlineTextBox. This patch reuses the dirty line
1072         box code in RenderText::setTextWithOffset to force
1073         clearTextFragments() when setTextWithOffset is called, preventing the use
1074         of stale SVGTextFragments.
1075
1076         Test: svg/custom/delete-text-crash.html
1077
1078         * rendering/InlineBox.h:
1079         (InlineBox):
1080         * rendering/svg/SVGInlineTextBox.cpp:
1081         (WebCore::SVGInlineTextBox::dirtyLineBoxes):
1082         (WebCore):
1083         * rendering/svg/SVGInlineTextBox.h:
1084         (SVGInlineTextBox):
1085
1086 2012-03-13  Nikolas Zimmermann  <nzimmermann@rim.com>
1087
1088         SVG Animations update baseVal instead of animVal
1089         https://bugs.webkit.org/show_bug.cgi?id=12437
1090
1091         Reviewed by Dirk Schulze.
1092
1093         Blind fix for some GC related assertions firing on v8.
1094
1095         Assure that animationStarted/animationEnded calls are happening
1096         on the same SVGAnimatedProperty. Always call animationEnded(),
1097         even if we shouldn't do anything for the target element, as its
1098         destructed, as we still have to reset m_isAnimating.
1099
1100         * svg/SVGAnimateElement.cpp:
1101         (WebCore::SVGAnimateElement::SVGAnimateElement):
1102         (WebCore::SVGAnimateElement::resetToBaseValue):
1103         (WebCore::SVGAnimateElement::targetElementWillChange):
1104         * svg/SVGAnimateElement.h:
1105         (SVGAnimateElement):
1106         * svg/properties/SVGAnimatedPropertyTearOff.h:
1107         (WebCore::SVGAnimatedPropertyTearOff::animationEnded):
1108
1109 2012-03-13  Mark Pilgrim  <pilgrim@chromium.org>
1110
1111         Move DirectoryEntry and DirectoryReader to new Modules/filesystem/ directory
1112         https://bugs.webkit.org/show_bug.cgi?id=80625
1113
1114         Reviewed by Adam Barth.
1115
1116         No new tests, all existing tests pass.
1117
1118         * CMakeLists.txt:
1119         * DerivedSources.make:
1120         * DerivedSources.pri:
1121         * GNUmakefile.am:
1122         * GNUmakefile.list.am:
1123         * Modules/filesystem: Added.
1124         * Modules/filesystem/DirectoryEntry.cpp: Copied from Source/WebCore/fileapi/DirectoryEntry.cpp.
1125         * Modules/filesystem/DirectoryEntry.h: Copied from Source/WebCore/fileapi/DirectoryEntry.h.
1126         * Modules/filesystem/DirectoryEntry.idl: Copied from Source/WebCore/fileapi/DirectoryEntry.idl.
1127         * Modules/filesystem/DirectoryEntrySync.cpp: Copied from Source/WebCore/fileapi/DirectoryEntrySync.cpp.
1128         * Modules/filesystem/DirectoryEntrySync.h: Copied from Source/WebCore/fileapi/DirectoryEntrySync.h.
1129         * Modules/filesystem/DirectoryEntrySync.idl: Copied from Source/WebCore/fileapi/DirectoryEntrySync.idl.
1130         * Modules/filesystem/DirectoryReader.cpp: Copied from Source/WebCore/fileapi/DirectoryReader.cpp.
1131         * Modules/filesystem/DirectoryReader.h: Copied from Source/WebCore/fileapi/DirectoryReader.h.
1132         * Modules/filesystem/DirectoryReader.idl: Copied from Source/WebCore/fileapi/DirectoryReader.idl.
1133         * Modules/filesystem/DirectoryReaderBase.h: Copied from Source/WebCore/fileapi/DirectoryReaderBase.h.
1134         * Modules/filesystem/DirectoryReaderSync.cpp: Copied from Source/WebCore/fileapi/DirectoryReaderSync.cpp.
1135         * Modules/filesystem/DirectoryReaderSync.h: Copied from Source/WebCore/fileapi/DirectoryReaderSync.h.
1136         * Modules/filesystem/DirectoryReaderSync.idl: Copied from Source/WebCore/fileapi/DirectoryReaderSync.idl.
1137         * Target.pri:
1138         * WebCore.gyp/WebCore.gyp:
1139         * WebCore.gypi:
1140         * WebCore.pri:
1141         * WebCore.vcproj/WebCore.vcproj:
1142         * WebCore.xcodeproj/project.pbxproj:
1143         * fileapi/DirectoryEntry.cpp: Removed.
1144         * fileapi/DirectoryEntry.h: Removed.
1145         * fileapi/DirectoryEntry.idl: Removed.
1146         * fileapi/DirectoryEntrySync.cpp: Removed.
1147         * fileapi/DirectoryEntrySync.h: Removed.
1148         * fileapi/DirectoryEntrySync.idl: Removed.
1149         * fileapi/DirectoryReader.cpp: Removed.
1150         * fileapi/DirectoryReader.h: Removed.
1151         * fileapi/DirectoryReader.idl: Removed.
1152         * fileapi/DirectoryReaderBase.h: Removed.
1153         * fileapi/DirectoryReaderSync.cpp: Removed.
1154         * fileapi/DirectoryReaderSync.h: Removed.
1155         * fileapi/DirectoryReaderSync.idl: Removed.
1156
1157 2012-03-13  Igor Oliveira  <igor.o@sisa.samsung.com>
1158
1159         animation-iteration-count does not handle floating point values correctly.
1160         https://bugs.webkit.org/show_bug.cgi?id=69531
1161
1162         Implements support for non-integers animation-iteration-count numbers.
1163         Non-integer numbers will cause the animation to end part-way through a cycle.
1164
1165         Reviewed by Dean Jackson.
1166
1167         Tests: animations/fill-mode-iteration-count-non-integer.html
1168                animations/keyframes-iteration-count-non-integer.html
1169
1170         * css/CSSComputedStyleDeclaration.cpp:
1171         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1172         * css/CSSParser.cpp:
1173         (WebCore::CSSParser::parseAnimationIterationCount):
1174         * css/CSSStyleApplyProperty.cpp:
1175         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
1176         * css/CSSStyleSelector.cpp:
1177         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1178         * page/animation/AnimationBase.cpp:
1179         (WebCore::AnimationBase::fractionalTime):
1180         (WebCore::AnimationBase::progress):
1181         * page/animation/CompositeAnimation.cpp:
1182         (WebCore::CompositeAnimation::pauseAnimationAtTime):
1183         * platform/animation/Animation.h:
1184         (WebCore::Animation::iterationCount):
1185         (WebCore::Animation::setIterationCount):
1186         (Animation):
1187         (WebCore::Animation::initialAnimationIterationCount):
1188
1189 2012-03-13  Tommy Widenflycht  <tommyw@google.com>
1190
1191         MediaStream API: Rename PeerConnection to DeprecatedPeerConnection
1192         https://bugs.webkit.org/show_bug.cgi?id=80692
1193
1194         Reviewed by Adam Barth.
1195
1196         First patch in a series of patches to change the PeerConnection from ROAP to JSEP,
1197         see bug 80589 for more information.
1198
1199         Patch covered by modified existing tests.
1200
1201         * GNUmakefile.list.am:
1202         * Modules/mediastream/DOMWindowMediaStream.idl:
1203         * Modules/mediastream/DeprecatedPeerConnection.cpp: Renamed from Source/WebCore/Modules/mediastream/PeerConnection.cpp.
1204         (WebCore):
1205         (WebCore::DeprecatedPeerConnection::create):
1206         (WebCore::DeprecatedPeerConnection::DeprecatedPeerConnection):
1207         (WebCore::DeprecatedPeerConnection::~DeprecatedPeerConnection):
1208         (WebCore::DeprecatedPeerConnection::processSignalingMessage):
1209         (WebCore::DeprecatedPeerConnection::readyState):
1210         (WebCore::DeprecatedPeerConnection::send):
1211         (WebCore::DeprecatedPeerConnection::addStream):
1212         (WebCore::DeprecatedPeerConnection::removeStream):
1213         (WebCore::DeprecatedPeerConnection::localStreams):
1214         (WebCore::DeprecatedPeerConnection::remoteStreams):
1215         (WebCore::DeprecatedPeerConnection::close):
1216         (WebCore::DeprecatedPeerConnection::didCompleteICEProcessing):
1217         (WebCore::DeprecatedPeerConnection::didGenerateSDP):
1218         (WebCore::DeprecatedPeerConnection::didReceiveDataStreamMessage):
1219         (WebCore::DeprecatedPeerConnection::didAddRemoteStream):
1220         (WebCore::DeprecatedPeerConnection::didRemoveRemoteStream):
1221         (WebCore::DeprecatedPeerConnection::interfaceName):
1222         (WebCore::DeprecatedPeerConnection::scriptExecutionContext):
1223         (WebCore::DeprecatedPeerConnection::stop):
1224         (WebCore::DeprecatedPeerConnection::eventTargetData):
1225         (WebCore::DeprecatedPeerConnection::ensureEventTargetData):
1226         (WebCore::DeprecatedPeerConnection::scheduleInitialNegotiation):
1227         (WebCore::DeprecatedPeerConnection::initialNegotiationTimerFired):
1228         (WebCore::DeprecatedPeerConnection::ensureStreamChangeScheduled):
1229         (WebCore::DeprecatedPeerConnection::streamChangeTimerFired):
1230         (WebCore::DeprecatedPeerConnection::scheduleReadyStateChange):
1231         (WebCore::DeprecatedPeerConnection::readyStateChangeTimerFired):
1232         (WebCore::DeprecatedPeerConnection::changeReadyState):
1233         * Modules/mediastream/DeprecatedPeerConnection.h: Renamed from Source/WebCore/Modules/mediastream/PeerConnection.h.
1234         (WebCore):
1235         (DeprecatedPeerConnection):
1236         (WebCore::DeprecatedPeerConnection::didChangeState):
1237         (WebCore::DeprecatedPeerConnection::refEventTarget):
1238         (WebCore::DeprecatedPeerConnection::derefEventTarget):
1239         * Modules/mediastream/DeprecatedPeerConnection.idl: Renamed from Source/WebCore/Modules/mediastream/PeerConnection.idl.
1240         * Modules/mediastream/SignalingCallback.h:
1241         (WebCore):
1242         (SignalingCallback):
1243         * Modules/mediastream/SignalingCallback.idl:
1244         * WebCore.gypi:
1245         * bindings/generic/RuntimeEnabledFeatures.h:
1246         (WebCore::RuntimeEnabledFeatures::webkitDeprecatedPeerConnectionEnabled):
1247         * bindings/js/JSDeprecatedPeerConnectionCustom.cpp: Renamed from Source/WebCore/bindings/js/JSPeerConnectionCustom.cpp.
1248         (WebCore):
1249         (WebCore::JSDeprecatedPeerConnectionConstructor::constructJSDeprecatedPeerConnection):
1250         * dom/EventTarget.h:
1251         (WebCore):
1252         * dom/EventTargetFactory.in:
1253         * platform/mediastream/DeprecatedPeerConnectionHandler.h: Renamed from Source/WebCore/platform/mediastream/PeerConnectionHandler.h.
1254         (WebCore):
1255         (DeprecatedPeerConnectionHandler):
1256         * platform/mediastream/DeprecatedPeerConnectionHandlerClient.h: Renamed from Source/WebCore/platform/mediastream/PeerConnectionHandlerClient.h.
1257         (WebCore):
1258         (DeprecatedPeerConnectionHandlerClient):
1259         (WebCore::DeprecatedPeerConnectionHandlerClient::~DeprecatedPeerConnectionHandlerClient):
1260         * platform/mediastream/gstreamer/DeprecatedPeerConnectionHandler.cpp: Renamed from Source/WebCore/platform/mediastream/gstreamer/PeerConnectionHandler.cpp.
1261         (WebCore):
1262         (WebCore::DeprecatedPeerConnectionHandler::create):
1263         (WebCore::DeprecatedPeerConnectionHandler::DeprecatedPeerConnectionHandler):
1264         (WebCore::DeprecatedPeerConnectionHandler::~DeprecatedPeerConnectionHandler):
1265         (WebCore::DeprecatedPeerConnectionHandler::produceInitialOffer):
1266         (WebCore::DeprecatedPeerConnectionHandler::handleInitialOffer):
1267         (WebCore::DeprecatedPeerConnectionHandler::processSDP):
1268         (WebCore::DeprecatedPeerConnectionHandler::processPendingStreams):
1269         (WebCore::DeprecatedPeerConnectionHandler::sendDataStreamMessage):
1270         (WebCore::DeprecatedPeerConnectionHandler::stop):
1271
1272 2012-03-13  Pavel Feldman  <pfeldman@chromium.org>
1273
1274         Web Inspector: front-end compilation was broken while supporting large arrays.
1275         https://bugs.webkit.org/show_bug.cgi?id=81013
1276
1277         Reviewed by Vsevolod Vlasov.
1278
1279         * inspector/front-end/ExtensionPanel.js:
1280         * inspector/front-end/ObjectPropertiesSection.js:
1281         (WebInspector.ArrayGroupingTreeElement._populateNonIndexProperties.buildObjectFragment):
1282         * inspector/front-end/RemoteObject.js:
1283
1284 2012-03-13  Tony Chang  <tony@chromium.org>
1285
1286         flexbox's computePreferredLogicalWidth needs to take multiline into account
1287         https://bugs.webkit.org/show_bug.cgi?id=80931
1288
1289         Reviewed by Ojan Vafai.
1290
1291         Tests: css3/flexbox/multiline-shrink-to-fit-expected.html
1292                css3/flexbox/multiline-shrink-to-fit.html
1293
1294         * rendering/RenderFlexibleBox.cpp:
1295         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths): Set min/max preferredLogicalWidth based on always breaking or never breaking.
1296         (WebCore::RenderFlexibleBox::computeNextFlexLine): Add a FIXME.
1297         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Don't change the width after computePreferredWidth has been called.
1298
1299 2012-03-13  Sheriff Bot  <webkit.review.bot@gmail.com>
1300
1301         Unreviewed, rolling out r110469.
1302         http://trac.webkit.org/changeset/110469
1303         https://bugs.webkit.org/show_bug.cgi?id=81010
1304
1305         This patch still appears to crash (Requested by abarth on
1306         #webkit).
1307
1308         * page/FrameView.cpp:
1309         (WebCore::FrameView::FrameView):
1310         (WebCore::FrameView::reset):
1311         (WebCore::FrameView::repaintContentRectangle):
1312         (WebCore):
1313         (WebCore::FrameView::endDeferredRepaints):
1314         (WebCore::FrameView::doDeferredRepaints):
1315         (WebCore::FrameView::deferredRepaintTimerFired):
1316         * page/FrameView.h:
1317         (FrameView):
1318         * rendering/RenderView.cpp:
1319         (WebCore::RenderView::shouldRepaint):
1320         * svg/graphics/SVGImage.cpp:
1321         (WebCore::SVGImage::drawSVGToImageBuffer):
1322         (WebCore::SVGImage::draw):
1323         * svg/graphics/SVGImage.h:
1324         * svg/graphics/SVGImageCache.cpp:
1325         (WebCore::SVGImageCache::imageContentChanged):
1326         (WebCore::SVGImageCache::redrawTimerFired):
1327         * svg/graphics/SVGImageCache.h:
1328         (SVGImageCache):
1329
1330 2012-03-13  Max Vujovic  <mvujovic@adobe.com>
1331
1332         Add a method to window.internals to enable testing of inspector highlight rects
1333         https://bugs.webkit.org/show_bug.cgi?id=80338
1334
1335         Reviewed by Pavel Feldman.
1336
1337         Add window.internals.inspectorHighlightRects, a method which makes it possible to test the
1338         positions and sizes of inspector highlight rects.
1339
1340         Test: inspector/elements/highlight-node.html
1341
1342         * WebCore.exp.in: Export symbols.
1343         * testing/Internals.cpp:
1344         (WebCore::Internals::inspectorHighlightRects): Call InspectorController::getHighlight and
1345         return the highlight's quads as a ClientRectList.
1346         (WebCore):
1347         * testing/Internals.h:
1348         (WebCore):
1349         (Internals):
1350         * testing/Internals.idl:
1351
1352             Add inspectorHighlightRects to the window.internals interface.
1353
1354 2012-03-13  Konrad Piascik  <kpiascik@rim.com>
1355
1356         [BlackBerry] Remove sublayers before clamping just in case the layer already exists
1357         https://bugs.webkit.org/show_bug.cgi?id=80989
1358
1359         Reviewed by Antonio Gomes.
1360
1361         Discovered when trying to add a highlight sublayer for web inspector.  Since that layer
1362         may already exist in the tree we need to see if it will be pruned before we clamp on the
1363         size.
1364
1365         This was manually tested during the writing of another patch to add web inspector highlights
1366         to accelrated compositing.
1367
1368         * platform/graphics/blackberry/LayerWebKitThread.cpp:
1369         (WebCore::LayerWebKitThread::insertSublayer):
1370
1371 2012-03-13  Vsevolod Vlasov  <vsevik@chromium.org>
1372
1373         Web Inspector: Add snippets model.
1374         https://bugs.webkit.org/show_bug.cgi?id=80863
1375
1376         Reviewed by Yury Semikhatsky.
1377
1378         Test: inspector/debugger/snippets-model.html
1379
1380         * WebCore.gypi:
1381         * WebCore.vcproj/WebCore.vcproj:
1382         * inspector/compile-front-end.py:
1383         * inspector/front-end/Settings.js:
1384         (WebInspector.ExperimentsSettings):
1385         * inspector/front-end/SnippetsModel.js: Added.
1386         * inspector/front-end/WebKit.qrc:
1387         * inspector/front-end/inspector.html:
1388         * inspector/front-end/inspector.js:
1389
1390 2012-03-13  'Pavel Feldman'  <pfeldman@chromium.org>
1391
1392         Not reviewed: chromium build fix.
1393
1394         * history/CachedFrame.cpp:
1395
1396 2012-03-13  Peter Rybin  <peter.rybin@gmail.com>
1397
1398         Web Inspector: CodeGeneratorInspector.py: refactor copy-paste getter methods
1399         https://bugs.webkit.org/show_bug.cgi?id=80923
1400
1401         Reviewed by Yury Semikhatsky.
1402
1403         Several methods are combined in one using C++ templates.
1404
1405         * inspector/CodeGeneratorInspector.py:
1406
1407 2012-03-13  Rob Buis  <rbuis@rim.com>
1408
1409         [BlackBerry] Fix cast-align warning in QuotesData.cpp
1410         https://bugs.webkit.org/show_bug.cgi?id=80601
1411
1412         Reviewed by Nikolas Zimmermann.
1413
1414         Fix warning by adding variable of correct return type.
1415
1416         * rendering/style/QuotesData.cpp:
1417         (WebCore::QuotesData::create):
1418
1419 2012-03-12  Brady Eidson  <beidson@apple.com>
1420
1421         <rdar://problem/7908830> and https://bugs.webkit.org/show_bug.cgi?id=34679
1422         Location and other objects are dysfunctional after a document gets restored from page cache
1423
1424         Reviewed by Adam Barth.
1425
1426         Test: fast/loader/window-properties-restored-from-page-cache.html
1427
1428         Give DOMWindowProperties the ability to reconnect to their Frame:
1429         * page/DOMWindowProperty.cpp:
1430         (WebCore::DOMWindowProperty::reconnectFrame):
1431         * page/DOMWindowProperty.h:
1432         (DOMWindowProperty):
1433
1434         Let ApplicationCache do some extra work when reconnecting:
1435         * loader/appcache/DOMApplicationCache.cpp:
1436         (WebCore::DOMApplicationCache::reconnectFrame):
1437         (WebCore):
1438         * loader/appcache/DOMApplicationCache.h:
1439         (DOMApplicationCache):
1440
1441         Let IndexDB do some extra work when reconnecting:
1442         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
1443         (WebCore::DOMWindowIndexedDatabase::disconnectFrame):
1444         (WebCore::DOMWindowIndexedDatabase::reconnectFrame):
1445         (WebCore::DOMWindowIndexedDatabase::webkitIndexedDB):
1446         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
1447         (DOMWindowIndexedDatabase):
1448
1449         Tell the DOMWindow to suspend to the page cache:
1450         * history/CachedFrame.cpp:
1451         (WebCore::CachedFrame::CachedFrame):
1452
1453         Tell the DOMWindow to resume from the page cache:
1454         * loader/FrameLoader.cpp:
1455         (WebCore::FrameLoader::open):
1456
1457         * page/DOMWindow.cpp:
1458         (WebCore::DOMWindow::DOMWindow):
1459         (WebCore::DOMWindow::~DOMWindow): Call clearDOMWindowProperties directly instead of clear()
1460         (WebCore::DOMWindow::frameDestroyed): Ditto.
1461         (WebCore::DOMWindow::clear): Only clear if the DOMWindow is not suspended for the page cache.
1462         (WebCore::DOMWindow::suspendForPageCache): Disconnect properties and set the page cache flag.
1463         (WebCore::DOMWindow::resumeFromPageCache): Reconnect properties and revert the page cache flag.
1464         (WebCore::DOMWindow::disconnectDOMWindowProperties): Only disconnect the registered properties.
1465         (WebCore::DOMWindow::reconnectDOMWindowProperties):
1466         (WebCore::DOMWindow::clearDOMWindowProperties): Disconnect the registered properties then clear them out.
1467
1468         For all of the following, if the DOMWindow is not displayed in a frame (i.e., it is suspended), do nothing:
1469         (WebCore::DOMWindow::screen):
1470         (WebCore::DOMWindow::history):
1471         (WebCore::DOMWindow::crypto):
1472         (WebCore::DOMWindow::locationbar):
1473         (WebCore::DOMWindow::menubar):
1474         (WebCore::DOMWindow::personalbar):
1475         (WebCore::DOMWindow::scrollbars):
1476         (WebCore::DOMWindow::statusbar):
1477         (WebCore::DOMWindow::toolbar):
1478         (WebCore::DOMWindow::console):
1479         (WebCore::DOMWindow::applicationCache):
1480         (WebCore::DOMWindow::navigator):
1481         (WebCore::DOMWindow::performance):
1482         (WebCore::DOMWindow::location):
1483         (WebCore::DOMWindow::sessionStorage):
1484         (WebCore::DOMWindow::localStorage):
1485         (WebCore::DOMWindow::webkitNotifications):
1486         (WebCore::DOMWindow::postMessageTimerFired):
1487         (WebCore::DOMWindow::getSelection):
1488         (WebCore::DOMWindow::styleMedia):
1489         (WebCore::DOMWindow::webkitStorageInfo):
1490         * page/DOMWindow.h:
1491
1492 2012-03-13  Dana Jansens  <danakj@chromium.org>
1493
1494         [chromium] Use projectQuad to apply inverse mapRect
1495         https://bugs.webkit.org/show_bug.cgi?id=80741
1496
1497         Reviewed by Adrienne Walker.
1498
1499         Unit test: CCOcclusionTrackerTest3dTransform
1500                    CCOcclusionTrackerTestPerspectiveTransform
1501                    CCOcclusionTrackerTestPerspectiveTransformBehindCamera
1502
1503         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1504         (WebCore::projectQuad):
1505         (WebCore):
1506         (WebCore::computeUnoccludedContentRect):
1507
1508 2012-03-13  Gavin Peters  <gavinp@chromium.org>
1509
1510         New PageCache histogram which counts failures ignoring Settings.
1511         https://bugs.webkit.org/show_bug.cgi?id=80864
1512
1513         Reviewed by Brady Eidson.
1514
1515         Chrome has a command line switch to turn on the page cache.
1516         Currently it doesn't work, but it can cause the PageCache reasons
1517         for failure count to read lower than it should.  Add a new
1518         histogram to report the corrected value.
1519
1520         * history/PageCache.cpp:
1521         (WebCore::logCanCachePageDecision):
1522
1523 2012-03-13  George Staikos  <staikos@webkit.org>
1524
1525         Fix signed/unsigned mismatch compiler warnings.
1526         https://bugs.webkit.org/show_bug.cgi?id=80790
1527
1528         Reviewed by Alexey Proskuryakov.
1529
1530         * loader/icon/IconDatabase.cpp:
1531         (WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
1532         * platform/network/MIMESniffing.cpp:
1533
1534 2012-03-13  Sheriff Bot  <webkit.review.bot@gmail.com>
1535
1536         Unreviewed, rolling out r110510.
1537         http://trac.webkit.org/changeset/110510
1538         https://bugs.webkit.org/show_bug.cgi?id=80987
1539
1540         depends on chromium r 125700, which isn't rolled into webkit
1541         yet :-/ (Requested by thakis_ on #webkit).
1542
1543         * WebCore.gyp/mac/adjust_visibility.sh:
1544
1545 2012-03-13  Gavin Peters  <gavinp@chromium.org>
1546
1547         Make ApplicationCacheHost::canCacheInPageCache() non-const.
1548         https://bugs.webkit.org/show_bug.cgi?id=80904
1549
1550         Reviewed by Alexey Proskuryakov.
1551
1552         A const pointer to a large object like ApplicationCacheHost is not our standard
1553         practice; so remove this (implicit) one.  See also https://bugs.webkit.org/show_bug.cgi?id=80898
1554
1555         * loader/appcache/ApplicationCacheHost.cpp:
1556         (WebCore::ApplicationCacheHost::canCacheInPageCache):
1557         * loader/appcache/ApplicationCacheHost.h:
1558         (ApplicationCacheHost):
1559
1560 2012-03-13  Stephen Chenney  <schenney@chromium.org>
1561
1562         Crash in WebCore::GraphicsContext::paintingDisabled
1563         https://bugs.webkit.org/show_bug.cgi?id=80669
1564
1565         Reviewed by Nikolas Zimmermann.
1566
1567         The SVGImageBufferTools::clipToImageBuffer method deletes the clip
1568         image when it thinks it is not needed. However, there are cases when
1569         it is in fact still needed, particularly when the clip buffer is
1570         coming from higher up in the stack where it may be needed again.
1571
1572         So this patch adds a flag to only allow deletion of the image buffer
1573         if it was created at the most recent call site.
1574
1575         Tests: svg/custom/circular-clip-path-references-crash-expected.svg
1576                svg/custom/circular-clip-path-references-crash.svg
1577
1578         * rendering/svg/RenderSVGResourceClipper.cpp:
1579         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1580         * rendering/svg/RenderSVGResourceGradient.cpp:
1581         (WebCore::clipToTextMask):
1582         * rendering/svg/RenderSVGResourceMasker.cpp:
1583         (WebCore::RenderSVGResourceMasker::applyResource):
1584         * rendering/svg/SVGImageBufferTools.cpp:
1585         (WebCore::SVGImageBufferTools::clipToImageBuffer):
1586         * rendering/svg/SVGImageBufferTools.h:
1587         (SVGImageBufferTools):
1588
1589 2012-03-13  Gavin Peters  <gavinp@chromium.org>
1590
1591         Fix an enumeration name in ReasonsFrameCannotBeInPageCache.
1592         https://bugs.webkit.org/show_bug.cgi?id=80849
1593
1594         Reviewed by Brady Eidson.
1595
1596         It seems that somebody goofed, and named one of the
1597         ReasonsFrameCannotBeInPageCache antonymically.
1598
1599         * history/PageCache.cpp:
1600         (WebCore::logCanCacheFrameDecision):
1601
1602 2012-03-12  Kinuko Yasuda  <kinuko@chromium.org>
1603
1604         File upload control should use File.name() rather than File.path() to show chosen filenames
1605         https://bugs.webkit.org/show_bug.cgi?id=80970
1606
1607         In some rare cases (e.g. files from FileSystem API or files created
1608         using the newly added WebKit API) File.name has different displayName
1609         from the basename of file.path, and in the file uploader controller we
1610         should use File.name rather than File.path.
1611
1612         Reviewed by Kent Tamura.
1613
1614         No new tests: existing tests should pass as this should not change
1615         behavior in regular use cases.  (New behavior where File.name differs
1616         from File.path can be only tested in chromeos environment, therefore
1617         not adding new tests for that)
1618
1619         * platform/gtk/RenderThemeGtk.cpp:
1620         (WebCore::RenderThemeGtk::fileListNameForWidth): Updated to handle FileList.
1621         * platform/gtk/RenderThemeGtk.h:
1622         * platform/qt/RenderThemeQt.cpp:
1623         (WebCore::RenderThemeQt::fileListNameForWidth): Updated to handle FileList.
1624         * platform/qt/RenderThemeQt.h:
1625         * rendering/RenderFileUploadControl.cpp:
1626         (WebCore::RenderFileUploadControl::fileTextValue): Changed to pass FileList rather than FileList->paths().
1627         * rendering/RenderTheme.cpp:
1628         (WebCore::RenderTheme::fileListNameForWidth): Updated to handle FileList and use File.name for displaying the file name.
1629         * rendering/RenderTheme.h:
1630         * rendering/RenderThemeMac.h:
1631         * rendering/RenderThemeMac.mm:
1632         (WebCore::RenderThemeMac::fileListNameForWidth): Updated to handle FileList.
1633
1634 2012-03-13  Kinuko Yasuda  <kinuko@chromium.org>
1635
1636         Allow WebFileChooser to return extra file info (like displayName) in addition to mere file paths
1637         https://bugs.webkit.org/show_bug.cgi?id=80719
1638
1639         Reviewed by Kent Tamura.
1640
1641         No new tests: this change itself shouldn't change existing behavior.
1642
1643         * fileapi/File.cpp:
1644         (WebCore::createBlobDataForFileWithName): Renamed from createBlobDataForFileSystemFile.
1645         * fileapi/File.h:
1646         * html/FileInputType.cpp:
1647         (WebCore::FileInputType::saveFormControlState): Updated to handle File.name.
1648         (WebCore::FileInputType::restoreFormControlState): Ditto.
1649         (WebCore::FileInputType::setFileList): Changed the signature to take
1650         FileChooserFileInfo.
1651         (WebCore::FileInputType::filesChosen): Ditto.
1652         (WebCore::FileInputType::receiveDroppedFiles):
1653         * html/FileInputType.h:
1654         (FileInputType):
1655         * platform/FileChooser.cpp:
1656         (WebCore::FileChooser::chooseFiles): Added an overloaded method that
1657         takes FileChooserFileInfo.
1658         (WebCore):
1659         * platform/FileChooser.h:
1660         (WebCore::FileChooserFileInfo::FileChooserFileInfo): Added.
1661         * platform/MIMETypeRegistry.cpp:
1662         (WebCore::MIMETypeRegistry::getWellKnownMIMETypeForExtension): Removed surrouonding ifdefs as this function is now used even if FILE_SYSTEM is not enabled.
1663         * platform/MIMETypeRegistry.h:
1664         (MIMETypeRegistry):
1665
1666 2012-03-13  Vsevolod Vlasov  <vsevik@chromium.org>
1667
1668         Unreviewed inspector compilation module name fix after r110550.
1669
1670         * inspector/compile-front-end.py:
1671
1672 2012-03-12  Vsevolod Vlasov  <vsevik@chromium.org>
1673
1674         Web Inspector: Changes to the list of scripts for front-end compilation should not require update of number of scripts in module.
1675         https://bugs.webkit.org/show_bug.cgi?id=80872
1676
1677         Reviewed by Pavel Feldman.
1678
1679         * inspector/compile-front-end.py: Added.
1680         * inspector/compile-front-end.sh:
1681
1682 2012-03-12  Pavel Podivilov  <podivilov@chromium.org>
1683
1684         Web Inspector: move ResourceScriptMapping to a separate file.
1685         https://bugs.webkit.org/show_bug.cgi?id=80859
1686
1687         Reviewed by Vsevolod Vlasov.
1688
1689         * WebCore.gypi:
1690         * WebCore.vcproj/WebCore.vcproj:
1691         * inspector/compile-front-end.sh:
1692         * inspector/front-end/ResourceScriptMapping.js: Copied from Source/WebCore/inspector/front-end/ScriptMapping.js.
1693         (WebInspector.ResourceScriptMapping):
1694         (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
1695         (WebInspector.ResourceScriptMapping.prototype.uiSourceCodeList):
1696         (WebInspector.ResourceScriptMapping.prototype._handleUISourceCodeListChanged):
1697         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeListChanged):
1698         (WebInspector.ResourceScriptMapping.prototype._bindScriptToRawSourceCode):
1699         (WebInspector.ResourceScriptMapping.prototype.setFormatSource):
1700         (WebInspector.ResourceScriptMapping.prototype.forceUpdateSourceMapping):
1701         (WebInspector.ResourceScriptMapping.prototype.reset):
1702         * inspector/front-end/ScriptMapping.js:
1703         * inspector/front-end/WebKit.qrc:
1704         * inspector/front-end/inspector.html:
1705
1706 2012-03-12  Kentaro Hara  <haraken@chromium.org>
1707
1708         Rename OptionsObject to Dictionary
1709         https://bugs.webkit.org/show_bug.cgi?id=80802
1710
1711         Reviewed by Adam Barth.
1712
1713         For clarification, rename OptionsObject.{h,cpp} to Dictionary.{h,cpp}.
1714         This patch just renames and sorts alphabetically.
1715
1716         No tests. No change in behavior.
1717
1718         * GNUmakefile.list.am:
1719         * Modules/indexeddb/IDBDatabase.cpp:
1720         (WebCore::IDBDatabase::createObjectStore):
1721         * Modules/indexeddb/IDBDatabase.h:
1722         (WebCore::IDBDatabase::createObjectStore):
1723         (IDBDatabase):
1724         * Modules/indexeddb/IDBDatabase.idl:
1725         * Modules/indexeddb/IDBKeyRange.h:
1726         * Modules/indexeddb/IDBObjectStore.cpp:
1727         (WebCore::IDBObjectStore::createIndex):
1728         * Modules/indexeddb/IDBObjectStore.h:
1729         (WebCore::IDBObjectStore::createIndex):
1730         (IDBObjectStore):
1731         * Modules/indexeddb/IDBObjectStore.idl:
1732         * Target.pri:
1733         * UseV8.cmake:
1734         * WebCore.gypi:
1735         * WebCore.vcproj/WebCore.vcproj:
1736         * bindings/js/Dictionary.h: Renamed from Source/WebCore/bindings/js/OptionsObject.h.
1737         (WebCore):
1738         (Dictionary):
1739         (WebCore::Dictionary::Dictionary):
1740         (WebCore::Dictionary::isObject):
1741         (WebCore::Dictionary::isUndefinedOrNull):
1742         (WebCore::Dictionary::get):
1743         (WebCore::Dictionary::getWithUndefinedOrNullCheck):
1744         * bindings/js/IDBBindingUtilities.cpp:
1745         (WebCore::createDictionaryFromValue):
1746         * bindings/js/IDBBindingUtilities.h:
1747         (WebCore):
1748         * bindings/scripts/CodeGeneratorJS.pm:
1749         (JSValueToNative):
1750         * bindings/scripts/CodeGeneratorV8.pm:
1751         (GenerateHeader):
1752         (GenerateParametersCheck):
1753         (GenerateEventConstructorCallback):
1754         (GetNativeType):
1755         (JSValueToNative):
1756         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
1757         (WebDOMTestObj::optionsObject):
1758         * bindings/scripts/test/CPP/WebDOMTestObj.h:
1759         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1760         (webkit_dom_test_obj_options_object):
1761         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1762         * bindings/scripts/test/JS/JSTestObj.cpp:
1763         (WebCore::jsTestObjPrototypeFunctionIdbKey):
1764         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
1765         * bindings/scripts/test/ObjC/DOMTestObj.h:
1766         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1767         (-[DOMTestObj optionsObject:ooo:]):
1768         * bindings/scripts/test/TestObj.idl:
1769         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1770         (WebCore::V8TestEventConstructor::constructorCallback):
1771         (WebCore::fillTestEventConstructorInit):
1772         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1773         (WebCore):
1774         * bindings/scripts/test/V8/V8TestObj.cpp:
1775         (WebCore::TestObjInternal::optionsObjectCallback):
1776         * bindings/v8/Dictionary.cpp: Renamed from Source/WebCore/bindings/v8/OptionsObject.cpp.
1777         (WebCore):
1778         (WebCore::Dictionary::Dictionary):
1779         (WebCore::Dictionary::~Dictionary):
1780         (WebCore::Dictionary::operator=):
1781         (WebCore::Dictionary::isObject):
1782         (WebCore::Dictionary::isUndefinedOrNull):
1783         (WebCore::Dictionary::getKey):
1784         (WebCore::Dictionary::get):
1785         (WebCore::Dictionary::getWithUndefinedOrNullCheck):
1786         * bindings/v8/Dictionary.h: Renamed from Source/WebCore/bindings/v8/OptionsObject.h.
1787         (WebCore):
1788         (Dictionary):
1789         * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
1790         (WebCore::V8WebKitMutationObserver::observeCallback):
1791
1792 2012-03-12  Nikolas Zimmermann  <nzimmermann@rim.com>
1793
1794         SVG Animations update baseVal instead of animVal
1795         https://bugs.webkit.org/show_bug.cgi?id=12437
1796
1797         Reviewed by Dirk Schulze.
1798
1799         Begin implementing the last missing core piece of the SVG DOM: proper animVal support.
1800         Most SVG DOM interfaces exposing eg. lengths use SVGAnimatedLength. eg. from SVGRectElement:
1801         "readonly attribute SVGAnimatedLength x;" SVGAnimatedXXX contains following methods:
1802         "readonly attribute SVGLength baseVal; readonly attribute SVGLength animVal;"
1803         From SVG DOM perspective, animVal and baseVal are two distinctive objects, animVal != baseVal.
1804         Its underlying value is the same though, if no animation is running on that attribute.
1805
1806         As soon as a SMIL animation starts animating an SVGAnimated* target attribute, its
1807         baseVal and animVal may begin to differ. The animVal always reflect the current animated
1808         value (including all effects of additive/accumulated animations) which is shown on screen
1809         when eg animating the width of a <rect>. The baseVal is is equal to the underlying XML
1810         property value / SVG DOM value, but may be influenced through dynamic changes.
1811         (Consider changing rect1.width.baseVal.value while 'width' is animated)
1812
1813         During the last year we prepared our animation code to turn on animVal support.
1814         This patch adds the last missing pieces to turn on animVal support for the SVGLength.
1815         SVGLengthList and all other types will follow, one after the other.
1816
1817         I've decided to write an exhaustive ChangeLog, as this as the base for any future
1818         work in this area - hopefully making this more reviewable.
1819
1820         Tests: svg/animations/additive-from-to-width-animation.html
1821                svg/animations/additive-values-width-animation.html
1822                svg/animations/change-baseVal-while-animating-fill-freeze-2.html
1823                svg/animations/change-baseVal-while-animating-fill-freeze.html
1824                svg/animations/change-baseVal-while-animating-fill-remove-2.html
1825                svg/animations/change-baseVal-while-animating-fill-remove.html
1826                svg/animations/change-target-while-animating-SVG-property.html
1827                svg/animations/multiple-animations-fill-freeze.html
1828                svg/animations/remove-animation-element-while-animation-is-running.html
1829                svg/repaint/repainting-after-animation-element-removal.svg
1830
1831         * svg/SVGAnimateElement.cpp: Remove unnecessary std namespace inclusion.
1832         (WebCore::SVGAnimateElement::SVGAnimateElement): Remove now-obsolete m_aboutToStopAnimation.
1833         (WebCore::SVGAnimateElement::calculateAnimatedValue): Swap assertion order, to test hasTagName() _before_ casting.
1834         (WebCore::SVGAnimateElement::resetToBaseValue):
1835             Stop relying on the cached baseValue (breaking additive="sum"+values animation) for SVG DOM primitive animations.
1836             Avoid any string roundtrips previously needed to reset the SVGAnimatedType to the base value. Just grab the
1837             currentBaseValue() from the associated SVGAnimatedProperty, which includes all dynamic changes to the baseVal
1838             either by SVG DOM or setAttribute() calls - this way we don't need to utilize the buggy cache in SMILTimeContainer,
1839             which can be removed once all SVG DOM primitive types switched to the new animVal concept.
1840
1841             NOTE: When multiple animations of the same attribute are applied to a target element, resetToBaseValue() will be called
1842             for the highest priority SVGSMILElement, on every animation step! Consider two <animate> elements, applied to a target
1843             <rect> which both animate the 'x' attribute, one from 0s to 2s, the other from 4s to 6s. The last <animate> element
1844             will reuse the SVGAnimatedType m_animatedType from the first <animate> element, and never create an own m_animatedType.
1845             When the animation starts the first time at 0s, we update the rect.x.animVals SVGLength* pointer, to point to the
1846             SVGAnimatedType of the first <animate> element, owning the m_animatedType. From that point on each call to rect.x.animVal
1847             will always return the same value as the SVGAnimatedType of the first <animate> element holds. Now after 2s the first
1848             <animate> element becomes inactive, but its m_animatedType remains alive. The bindings don't notice this change at all.
1849             Now at 4s, the second animation element gets active. It reuses the SVGAnimatedType of the first <animate> element, and
1850             applies its animation changes to that SVGAnimatedType, which is immediately reflected in the bindings w/o any additional
1851             work. It's very important for the understanding when animationStarted/animationEnded need to be called.
1852
1853         (WebCore::SVGAnimateElement::applyResultsToTarget): Remove now-obsolete m_aboutToStopAnimation logic. No need to know it at this point.
1854         (WebCore::SVGAnimateElement::targetElementWillChange):
1855             Renamed from targetElementDidChange(). This method is called from SVGSMILElement for following conditions:
1856             - animation element is destructed
1857             - animation element is removed from document
1858             - target element of animation is destructed
1859             - target element of animation is removed from document
1860             - target element of animation changes id
1861
1862             Whenever any of this happens, we need to reset the animVal. Resetting the animVal involves resetting the PropertyType* pointer,
1863             eg. SVGLength*, from the animVal property tear off, belonging to a certain SVGAnimatedProperty (eg. rect.x) to the initial
1864             value again, which is the 'm_x' of the SVGRectElement. This is needed as the SVGAnimatedType the animVal currently points to,
1865             if an animation is/was running, is destructed in targetElementWillChange(), to reset the SVGAnimateElement to the initial
1866             state before it received a target. This is the only place which destructed the m_animatedType, and thus the only place that
1867             needs to take care of resetting the animVal pointers.
1868
1869         * svg/SVGAnimatedLength.cpp:
1870         (WebCore::SVGAnimatedLengthAnimator::constructFromCopy):
1871             Add a new constructFromCopy(SVGGenericAnimatedType) function to SVGAnimatedLengthAnimator.
1872             It takes a type-unsafe SVGGenericAnimatedType - the caller has to guarantee the type matches.
1873             This is strictly enforced for the single caller of constructFromCopy, and guaranteed to be safe.
1874
1875         * svg/SVGAnimatedLength.h: Add new constructFromCopy method, which is used to avoid string-roundtrips when resetting to base values.
1876         * svg/SVGAnimatedType.cpp:
1877         (WebCore::SVGAnimatedType::supportsAnimVal): Only returns true for AnimatedLength, for now.
1878         (WebCore::SVGAnimatedType::setVariantValue): Takes a SVGGenericAnimatedType, assuming the type matches. Callers have to guarantee type-safety!
1879         * svg/SVGAnimatedType.h:
1880         (SVGAnimatedType): Add new static supportsAnimVal(AnimatedPropertyType) function.
1881         (WebCore::SVGAnimatedType::variantValue): Add a generic accessor for all animated types, called variant(). Only one place uses this.
1882         * svg/SVGAnimatedTypeAnimator.h:
1883         (WebCore::SVGAnimatedTypeAnimator::constructFromCopy):
1884             New method to construct an eg. SVGAnimatedLengthAnimator right from a SVGLength, instead of a String.
1885             In that case the SVGAnimatedType just stores a pointer to the underlying SVGLength, no copying and or other roundtrips involved.
1886
1887         * svg/SVGAnimationElement.cpp:
1888         (WebCore::SVGAnimationElement::svgAttributeChanged):
1889             Implement this instead of attributeChanged. The previous implementation reset the animation state to Inactive, causing a full
1890             rebuild, whenever any attribute changes, even though it might not be related for the animation element, eg.
1891             animate.setAttribute("stdDeviationX", "foobar"). Fix that by checking if we support the attribute (keyTimes/keySplines/etc..)
1892             , if not pass it on to SVGSMILElement (which supports begin/end/etc..) to check if it can handle that.
1893
1894         (WebCore::SVGAnimationElement::animationAttributeChanged):
1895             Called from our svgAttributeChanged, and/or from SVGSMILElement::svgAttributeChanged, whenever a _known_ attribute has changed.
1896             This sledgehammer should be used with care, instead of each time attributeChanged() is called :-)
1897
1898         (WebCore::setTargetAttributeAnimatedCSSValue):
1899             Remove support for removing properties from the override style sheet. I've added this optimization too early, we should reevaluate
1900             this once more types support animVal. It currently complexifies the logic too much, requiring setAttributeAnimatedValue to know
1901             if the animation ends (and that's not easy to figure out, at least not using started/endedActiveInterval, as I anticipated).
1902
1903         (WebCore::findMatchingAnimatedProperty):
1904             Add helper functions which retrieves a SVGAnimatedProperty* for a given SVGElement* targetElement, an attributeName, and an attribute
1905             type. eg. findMatchingAnimatedProperty(myRectElement, SVGNames::xAttr, AnimatedLength) returns the SVGAnimatedProperty which is
1906             exposed to JS, that holds: SVGProperty* baseVal, and SVGProperty* animVal. (Lazily created if they got accessed from JS.). This is
1907             used to update the animVal pointing to a new eg. SVGLength* value, once animation has started, to make rect->x() return that new
1908             SVGLength* value (internally), and to reflect the current animated value in rect.x.animVal.value from JS.
1909
1910         (WebCore::SVGAnimationElement::applyAnimatedValue): Refactored from setTargetAttributeAnimatedValue, to simplify the code.
1911         (WebCore::notifyAnimatedPropertyAboutAnimationBeginEnd):
1912             Helper function to share code betweeen animationStarted/animationEnded.
1913             It takes a SVGAnimatedProperty* and a SVGAnimatedType* which may be zero, indicating that the animation ended.
1914             It calls animationStarted/animationEnded on the given SVGAnimatedProperty, to update the animVal state.
1915             It also figures out all instances of the target element, and their SVGAnimatedProperties that may need updating.
1916
1917         (WebCore::SVGAnimationElement::animationStarted): Uses the helper above, passing on the given animatedType.
1918         (WebCore::SVGAnimationElement::animationEnded): Uses the helper above, passing 0 as animatedType.
1919         (WebCore::InstanceUpdateBlocker::InstanceUpdateBlocker):
1920             Added new helper struct, doing element->setInstancesUpdatedBlock(true) on construction and setInstancesUpdatesBlocked(false) on
1921             destruction, making it impossible to forget one. If we ever rewrite svgAttributeChanged & co to auto-update the cloned instances,
1922             this can go away.
1923
1924         (WebCore::SVGAnimationElement::setTargetAttributeAnimatedValue):
1925             Now takes an SVGAnimatedType* instead of a String parameter. In order to avoid string-roundtrips for animVal support, let us
1926             decide if we need to construct a String out of it, or not. For animations supporting animVal (only SVGLength) we don't need
1927             to update any attribute or animVal pointer here, that happens automatically! We only need to notify the targetElement eg,
1928             that its xAttr changed! Previously we had to call targetElement->setAttribute("x", "...") on every animation step for
1929             SVGLength animations - that's gone now! The SVGAnimatedType pointers remains the same during the whole animation, so there's
1930             no need to call animationStarted() at each animated step!
1931
1932         (WebCore::SVGAnimationElement::animatedPropertyForType):
1933             Helper function returning a SVGAnimatedProperty* for the current target element & current target attribute, if the
1934             current animation is running on a type supporting animVal (SVGLength), or returning 0. This is needed for SVGAnimateElement.
1935             Reuses the existing findMatchingAnimatedProperty code.
1936
1937         * svg/SVGAnimationElement.h:
1938         * svg/animation/SMILTimeContainer.cpp:
1939         (WebCore::SMILTimeContainer::updateAnimations):
1940             Add comment to clarify why caching baseValues is just wrong. For SVGLength animations the problem is now gone.
1941             This is exercised using the new additive-from-to-width-animation.html & additive-values-width-animation.html tests.
1942
1943         * svg/animation/SVGSMILElement.cpp:
1944         (WebCore::SVGSMILElement::removedFromDocument):
1945             Since animVal requires that the SVGAnimatedProperties are correctly reset if an animation element is removed from the document,
1946             we have to call targetElementWillChange(0) from here. That requires to move the "m_attributeName = anyQName()" line down,
1947             otherwise targetElementWillChange() would early exit, as no valid attributeName was specified.
1948             
1949             This is verified using the new svg/animations/remove-animation-element-while-animation-is-running.html
1950             and svg/repaint/repainting-after-animation-element-removal.svg tests.
1951
1952         (WebCore::SVGSMILElement::isSupportedAttribute): Add function like all SVG*Elements have identifying their supported attributes.
1953         (WebCore::SVGSMILElement::svgAttributeChanged):
1954             Implement svgAttributeChanged instead of attributeChanged. Only take action if the attribute is actually supported.
1955             If one of the common attributes like begin/end/etc. changed, be sure to call animationAttributeChanged() so that our
1956             ancestor-classes get notified about this and can take action as well. NOTE: This is not about animating begin/end attributes,
1957             but about pure DOM changes. begin/end/et.. are not exposed to the SVG DOM, we still reuse the svgAttributeChanged logic
1958             for consistency. (This does NOT make those attributes animatable, nothing this here as it came up while reviewing).
1959     
1960         (WebCore::SVGSMILElement::targetElement): Adapt logic to targetElementDidChange -> targetElementWillChange change.
1961         (WebCore::SVGSMILElement::targetElementWillChange):
1962             Renamed from targetElementDidChange. Added "oldTarget" as parameter as well. Our ancestor-classes like SVGAnimateElement
1963             use this to properly deregister the animVal in the old target, before resetting the SVGAnimatedType, otherwise we'd leave
1964             dangling pointers around (verified manually by guard malloc runs, that none of this happens).
1965
1966             Also add a default implementation here in targetElementWillChange, that ancestor classes have to call.
1967             Now we properly call endedActiveInterval() if the m_activeState is currently Active, so that animations are shut-down
1968             just like if the animation properly ends (use the same cleanup routines, etc.). Not doing that now leads to assertions.
1969
1970         (WebCore::SVGSMILElement::resetTargetElement):
1971             Instead of forcing m_activeState to be inactive, use the standard methods to end the animation.
1972             targetElementWillChange(m_targetElement, 0) and animationAttributeChanged().
1973
1974             resetTargetElement() is only called by SVGDocumentExtensions::removeAllAnimationElementsFromTarget() for following conditions:
1975             - targetElement gets destructed
1976             - targetElement gets removed from the document
1977             - targetElement id changes
1978
1979             If the targetElement gets destructed or removed, no actions need to be taken, as the SVGAnimatedPropertys are teared down
1980             as well. But if only the id changes, we still have to properly disconnect the animVals - this is all handled through
1981             targetElementWillChange now - that's why this has to be called from here as well.
1982             That explains why targetElementWillChange() now needs to check if the targetElement is destructing or not.
1983
1984         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
1985             Pass the AnimatedPropertyType from the SVGPropertyInfo to the SVGAnimatedProperties.
1986             Requires mechanic changes in all SVGAnimated* classes. We need acccess to the AnimatedPropertyType
1987             to verify the SVGAnimatedType objects, passed to animationStarted, match our type. This is to enforce
1988             strict type-checking, whenever SVGGenericAnimatedTypes are passed around.
1989
1990         (WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
1991         (WebCore::SVGAnimatedEnumerationPropertyTearOff::SVGAnimatedEnumerationPropertyTearOff):
1992         * svg/properties/SVGAnimatedListPropertyTearOff.h: Ditto.
1993         (WebCore::SVGAnimatedListPropertyTearOff::create):
1994         (WebCore::SVGAnimatedListPropertyTearOff::SVGAnimatedListPropertyTearOff):
1995         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h: Ditto.
1996         (WebCore::SVGAnimatedPathSegListPropertyTearOff::create):
1997         (WebCore::SVGAnimatedPathSegListPropertyTearOff::SVGAnimatedPathSegListPropertyTearOff):
1998         * svg/properties/SVGAnimatedProperty.h: Store AnimatedPropertyType, add accessors.
1999         (WebCore::SVGAnimatedProperty::animatedPropertyType): Add accessor.
2000         (WebCore::SVGAnimatedProperty::animationValueChanged): New animVal related functions to be implemented in the animated tear offs.
2001         (WebCore::SVGAnimatedProperty::animationStarted): Ditto.
2002         (WebCore::SVGAnimatedProperty::animationEnded): Ditto.
2003         (WebCore::SVGAnimatedProperty::currentBaseValue):
2004             Generic accessor for the baseVal: returns a SVGGenericAnimatedType.
2005             It takes an AnimatedPropertyType as input, that's only needed to verify that the type we're returning matches
2006             the expectation of the caller. If not, return 0 to avoid any potential casting mistakes, which would lead to crashes.
2007
2008         (WebCore::SVGAnimatedProperty::SVGAnimatedProperty): Store m_animatedPropertyType.
2009         * svg/properties/SVGAnimatedPropertyTearOff.h:
2010         (WebCore::SVGAnimatedPropertyTearOff::create): Same changes as in the other tear offs: pass around AnimatedPropertyType.
2011         (WebCore::SVGAnimatedPropertyTearOff::currentBaseValue): Returns &m_property, if the type matches (see above).
2012         (SVGAnimatedPropertyTearOff): Pass around AnimatedPropertyType.
2013         (WebCore::SVGAnimatedPropertyTearOff::animationValueChanged): No-op for non list types, don't need to do anything here.
2014         (WebCore::SVGAnimatedPropertyTearOff::animationStarted):
2015         (WebCore::SVGAnimatedPropertyTearOff::animationEnded):
2016             Store the currently animated value in the animVal() property tear off, that's also re-used as-is for the JS bindings.
2017             As this is important, here's an example of how this affects methods like rect->x() used in the renderers.
2018
2019             Setting m_isAnimating to true, redirects any rect->x() calls that previously returned rect->m_x, to
2020             rect->xAnimated()->animVal()->propertyReference() (which returns the same SVGLength& that the SVGAnimatedElement
2021             m_animatedType contains). Calling rect->setXBaseValue() still modifies rect->m_x, and is used by all parseAttribute()
2022             methods in svg/ as setAttribute() calls only ever modify the "baseValue", never the current animated value.
2023             rect.x.baseVal will return a SVGLength object corresponding to rect->m_x.
2024             rect.x.animVal will return a SVGLength object corresponding to rect->xAnimated()->animVal()->propertyReference().
2025
2026             These implementation details are all hidden in the SVGAnimatedPropertyMacros. Here's an example from SVGRectElement:
2027             DECLARE_ANIMATED_LENGTH(X, x) -> Replace PropertyType with 'SVGLength', LowerProperty with 'x', and UpperProperty with 'X'.
2028
2029             PropertyType& LowerProperty() const
2030             {
2031                 if (TearOffType* wrapper = SVGAnimatedProperty::lookupWrapper<UseOwnerType, TearOffType, IsDerivedFromSVGElement<UseOwnerType>::value>(this, LowerProperty##PropertyInfo())) {
2032                     if (wrapper->isAnimating())
2033                         return wrapper->currentAnimatedValue();
2034                 }
2035                 return m_##LowerProperty.value;
2036             }
2037
2038             PropertyType& LowerProperty##BaseValue() const
2039             {
2040                 return m_##LowerProperty.value;
2041             }
2042
2043             void set##UpperProperty##BaseValue(const PropertyType& type)
2044             {
2045                 m_##LowerProperty.value = type;
2046             }
2047
2048             Any code outside of svg/, eg. in rendering/svg, does not need to care about any baseVal/animVal differences.
2049             During layout eg. RenderSVGRect calls rect->x().value(someLengthContext) to get the current 'x' as float. If an animation
2050             is running on that rect element it will automatically retrieve the last set animated value here - all under the hood.
2051             I hope that sheds some light in those myserious functions, they were designed with animVal in mind, but we never had that until now :-)
2052
2053         (WebCore::SVGAnimatedPropertyTearOff::SVGAnimatedPropertyTearOff): Pass around AnimatedPropertyType.
2054         (WebCore::SVGAnimatedPropertyTearOff::~SVGAnimatedPropertyTearOff): Add destructor to debug builds veryifing that m_isAnimating is false.
2055         * svg/properties/SVGAnimatedStaticPropertyTearOff.h: Ditto.
2056         (WebCore::SVGAnimatedStaticPropertyTearOff::create):
2057         (WebCore::SVGAnimatedStaticPropertyTearOff::SVGAnimatedStaticPropertyTearOff):
2058         * svg/properties/SVGAnimatedTransformListPropertyTearOff.h: Ditto.
2059         (WebCore::SVGAnimatedTransformListPropertyTearOff::create):
2060         (WebCore::SVGAnimatedTransformListPropertyTearOff::SVGAnimatedTransformListPropertyTearOff):
2061         * svg/properties/SVGPropertyInfo.h: Add SVGGenericAnimatedType definition.
2062         * svg/properties/SVGPropertyTearOff.h: Remove obsolete updateAnimVal method - switched to using setValue directly.
2063
2064 2012-03-13  Luke Macpherson   <macpherson@chromium.org>
2065
2066         Implement CSSPropertyTextOverflow in CSSStyleApplyProperty.
2067         https://bugs.webkit.org/show_bug.cgi?id=80934
2068
2069         Reviewed by Andreas Kling.
2070
2071         No new tests / refactoring only.
2072
2073         * css/CSSStyleApplyProperty.cpp:
2074         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
2075         * css/CSSStyleSelector.cpp:
2076         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2077
2078 2012-03-12  Matt Falkenhagen  <falken@chromium.org>
2079
2080         Switch Chromium from LocaleToScriptMappingICU.cpp to LocaleToScriptMappingDefault.cpp
2081         https://bugs.webkit.org/show_bug.cgi?id=80935
2082
2083         Reviewed by Kent Tamura.
2084
2085         ICU seems to have issues with non-well-formed locale strings.
2086         Currently, the only port that uses LocaleToScriptMappingICU.cpp is
2087         Chromium.
2088
2089         No new tests. LocaleToScriptMappingDefault.cpp is already used by
2090         other ports and covered by existing tests.
2091
2092         * WebCore.gyp/WebCore.gyp:
2093
2094 2012-03-12  Benjamin Poulain  <bpoulain@apple.com>
2095
2096         Fix IndexedDB build with JSC
2097         https://bugs.webkit.org/show_bug.cgi?id=80207
2098
2099         Reviewed by Adam Barth.
2100
2101         This fixes the build of WebKit when IndexedDB is enabled. Most functions were added
2102         empty implementation, it compiles but IndexedDB is not working.
2103
2104         * DerivedSources.make: Added missing IDL files.
2105         * Modules/indexeddb/IDBDatabaseBackendImpl.h: Fix warnings and build errors.
2106         (IDBDatabaseBackendImpl):
2107         * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp: ditto.
2108         (WebCore::IDBDatabaseCallbacksImpl::unregisterDatabase): ditto.
2109         * Modules/indexeddb/IDBFactoryBackendImpl.cpp: ditto.
2110         (WebCore::IDBFactoryBackendImpl::openBackingStore):
2111         * Modules/indexeddb/IDBIndexBackendImpl.cpp: ditto.
2112         (WebCore::IDBIndexBackendImpl::countInternal):
2113         * Modules/indexeddb/IDBKeyPathBackendImpl.cpp: Fix the method signature and add
2114         an empty implementation.
2115         (WebCore):
2116         (WebCore::IDBKeyPathBackendImpl::createIDBKeysFromSerializedValuesAndKeyPath):
2117         (WebCore::IDBKeyPathBackendImpl::injectIDBKeyIntoSerializedValue):
2118         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp: Fix warnings.
2119         (WebCore::IDBObjectStoreBackendImpl::countInternal):
2120         * Modules/indexeddb/IDBPendingTransactionMonitor.cpp: ditto.
2121         (WebCore::transactions):
2122         * Modules/indexeddb/IDBRequest.cpp: ditto.
2123         (WebCore::IDBRequest::resetReadyState):
2124         * Modules/indexeddb/IDBRequest.h: ditto.
2125         (WebCore::IDBRequest::onSuccessWithPrefetch):
2126         (WebCore):
2127         (WebCore::JSIDBVersionChangeRequest::visitChildren):
2128         * WebCore.xcodeproj/project.pbxproj:
2129         * bindings/js/IDBBindingUtilities.cpp:
2130         (WebCore::createIDBKeyFromValue): Fix the creation of IDBKeys.
2131         (WebCore::createOptionsObjectFromValue): Add an empty implementation of
2132         the handling of database options (IDBObjectStoreParameters).
2133         (WebCore):
2134         * bindings/js/IDBBindingUtilities.h:
2135         (WebCore):
2136         * bindings/js/JSIDBAnyCustom.cpp:
2137         (WebCore::toJS): Add the missing IDBAny's types.
2138         * bindings/js/JSIDBKeyCustom.cpp:
2139         (WebCore::toJS): Add the missing IDBKey's types.
2140         * bindings/js/JSIDBVersionChangeRequestCustom.cpp: Added.
2141         IDBVersionChangeRequest has the attribute EventTarget so it requires
2142         the visitChildren() function. An empty implementation was added.
2143         * bindings/js/OptionsObject.h: Add an empty implementation.
2144         (WebCore):
2145         (OptionsObject):
2146         (WebCore::OptionsObject::OptionsObject):
2147         (WebCore::OptionsObject::isObject):
2148         (WebCore::OptionsObject::isUndefinedOrNull):
2149         (WebCore::OptionsObject::get):
2150         (WebCore::OptionsObject::getWithUndefinedOrNullCheck):
2151         * bindings/js/SerializedScriptValue.cpp: Add the missing functions needed by IndexedDB.
2152         (WebCore):
2153         (WebCore::SerializedScriptValue::create):
2154         (WebCore::SerializedScriptValue::toWireString):
2155         (WebCore::SerializedScriptValue::createFromWire):
2156         (WebCore::SerializedScriptValue::numberValue):
2157         (WebCore::SerializedScriptValue::deserialize):
2158         * bindings/js/SerializedScriptValue.h:
2159         (SerializedScriptValue):
2160         * bindings/scripts/CodeGeneratorJS.pm: Modify the code generator to:
2161         -Support the IDBKey type correctly.
2162         -Support the OptionsObject type.
2163         -Generate valid function call for static functions.
2164         (GenerateImplementationFunctionCall):
2165         (JSValueToNative):
2166         (NativeToJSValue):
2167         * inspector/InspectorIndexedDBAgent.cpp:
2168         (WebCore):
2169
2170 2012-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2171
2172         Unreviewed, rolling out r110529.
2173         http://trac.webkit.org/changeset/110529
2174         https://bugs.webkit.org/show_bug.cgi?id=80969
2175
2176         breaks mac build (Requested by morrita on #webkit).
2177
2178         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2179         (WebCore::computeUnoccludedContentRect):
2180
2181 2012-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2182
2183         Unreviewed, rolling out r110524.
2184         http://trac.webkit.org/changeset/110524
2185         https://bugs.webkit.org/show_bug.cgi?id=80936
2186
2187         breaks chromium win build. (Requested by morrita on #webkit).
2188
2189         * Target.pri:
2190         * UseV8.cmake:
2191         * WebCore.gypi:
2192         * bindings/scripts/CodeGeneratorJS.pm:
2193         (GenerateHeader):
2194         (GenerateImplementation):
2195         * bindings/scripts/CodeGeneratorV8.pm:
2196         (GenerateHeader):
2197         (GenerateNamedConstructorCallback):
2198         (GenerateImplementation):
2199         * bindings/scripts/IDLAttributes.txt:
2200         * bindings/scripts/test/V8/V8Float64Array.cpp:
2201         (WebCore):
2202         * bindings/scripts/test/V8/V8Float64Array.h:
2203         (V8Float64Array):
2204         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2205         (WebCore):
2206         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2207         (V8TestActiveDOMObject):
2208         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2209         (WebCore):
2210         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2211         (V8TestCustomNamedGetter):
2212         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2213         (WebCore):
2214         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2215         (V8TestEventConstructor):
2216         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2217         (WebCore):
2218         * bindings/scripts/test/V8/V8TestEventTarget.h:
2219         (V8TestEventTarget):
2220         * bindings/scripts/test/V8/V8TestInterface.cpp:
2221         (WebCore):
2222         * bindings/scripts/test/V8/V8TestInterface.h:
2223         (V8TestInterface):
2224         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2225         (WebCore):
2226         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2227         (V8TestMediaQueryListListener):
2228         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2229         (WebCore):
2230         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2231         (V8TestNamedConstructor):
2232         * bindings/scripts/test/V8/V8TestObj.cpp:
2233         (WebCore):
2234         * bindings/scripts/test/V8/V8TestObj.h:
2235         (V8TestObj):
2236         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2237         (WebCore):
2238         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2239         (V8TestSerializedScriptValueInterface):
2240         * bindings/v8/NPV8Object.cpp:
2241         (WebCore::npObjectTypeInfo):
2242         * bindings/v8/V8GCController.cpp:
2243         (WebCore::GrouperVisitor::visitDOMWrapper):
2244         * bindings/v8/WrapperTypeInfo.h:
2245         (WebCore):
2246         (WrapperTypeInfo):
2247         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: Copied from Source/WebCore/bindings/v8/custom/V8StyleSheetCustom.cpp.
2248         (WebCore):
2249         (WebCore::toV8):
2250         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
2251         (WebCore::toV8):
2252         (WebCore):
2253         * bindings/v8/custom/V8DOMTokenListCustom.cpp: Copied from Source/WebCore/bindings/v8/custom/V8StyleSheetCustom.cpp.
2254         (WebCore):
2255         (WebCore::toV8):
2256         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2257         (WebCore):
2258         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
2259         (WebCore::toV8):
2260         (WebCore):
2261         * bindings/v8/custom/V8StyleSheetCustom.cpp:
2262         (WebCore::toV8):
2263         * css/CSSStyleSheet.idl:
2264         * css/StyleSheet.idl:
2265         * dom/DOMStringMap.idl:
2266         * dom/NamedNodeMap.idl:
2267         * html/DOMTokenList.idl:
2268         * html/track/TextTrackList.idl:
2269
2270 2012-03-12  Kentaro Hara  <haraken@chromium.org>
2271
2272         [V8][Refactoring] Remove getCachedWrapperSlow() from V8Bindings.cpp
2273         https://bugs.webkit.org/show_bug.cgi?id=80924
2274
2275         Reviewed by Adam Barth.
2276
2277         getCachedWrapperSlow() is called by getCachedWrapper() only,
2278         and getCachedWrapperSlow() just calls getCachedWrapperInline().
2279         Thus, this patch expands getCachedWrapperInline() into getCachedWrapper(),
2280         and removes getCachedWrapperSlow().
2281
2282         No tests. No change in behavior.
2283
2284         * bindings/v8/V8DOMWrapper.cpp:
2285         * bindings/v8/V8DOMWrapper.h:
2286         (WebCore::V8DOMWrapper::getCachedWrapper):
2287
2288 2012-03-12  Kentaro Hara  <haraken@chromium.org>
2289
2290         [V8][Refactoring] Remove existingWrapper() from generated code
2291         https://bugs.webkit.org/show_bug.cgi?id=80927
2292
2293         Reviewed by Adam Barth.
2294
2295         Currently wrap() calls existingWrapper(), and existingWrapper()
2296         just calls getCachedWrapper(). We can remove existingWrapper() from the generated code.
2297
2298         Test: bindings/scripts/test/*
2299
2300         * bindings/scripts/CodeGeneratorV8.pm: Removed existingWrapper().
2301         (GenerateHeader):
2302         (GenerateNormalAttrGetter):
2303
2304         * bindings/scripts/test/V8/V8Float64Array.h: Updated run-bindings-tests results.
2305         (V8Float64Array):
2306         (WebCore::V8Float64Array::wrap):
2307         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2308         (V8TestActiveDOMObject):
2309         (WebCore::V8TestActiveDOMObject::wrap):
2310         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2311         (V8TestCustomNamedGetter):
2312         (WebCore::V8TestCustomNamedGetter::wrap):
2313         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2314         (V8TestEventConstructor):
2315         (WebCore::V8TestEventConstructor::wrap):
2316         * bindings/scripts/test/V8/V8TestEventTarget.h:
2317         (V8TestEventTarget):
2318         (WebCore::V8TestEventTarget::wrap):
2319         * bindings/scripts/test/V8/V8TestInterface.h:
2320         (V8TestInterface):
2321         (WebCore::V8TestInterface::wrap):
2322         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2323         (V8TestMediaQueryListListener):
2324         (WebCore::V8TestMediaQueryListListener::wrap):
2325         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2326         (V8TestNamedConstructor):
2327         (WebCore::V8TestNamedConstructor::wrap):
2328         * bindings/scripts/test/V8/V8TestObj.cpp:
2329         (WebCore::TestObjInternal::readOnlyTestObjAttrAttrGetter):
2330         (WebCore::TestObjInternal::cachedAttribute1AttrGetter):
2331         (WebCore::TestObjInternal::cachedAttribute2AttrGetter):
2332         * bindings/scripts/test/V8/V8TestObj.h:
2333         (V8TestObj):
2334         (WebCore::V8TestObj::wrap):
2335         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2336         (V8TestSerializedScriptValueInterface):
2337         (WebCore::V8TestSerializedScriptValueInterface::wrap):
2338
2339 2012-03-12  Dana Jansens  <danakj@chromium.org>
2340
2341         [chromium] Use tileRect instead of pointer derefs
2342         https://bugs.webkit.org/show_bug.cgi?id=80919
2343
2344         Reviewed by Adrienne Walker.
2345
2346         Covered by existing tests.
2347
2348         * platform/graphics/chromium/LayerRendererChromium.cpp:
2349         (WebCore::LayerRendererChromium::drawTileQuad):
2350
2351 2012-03-12  Hans Muller  <hmuller@adobe.com>
2352
2353         SVG should support transform-origin and relative values
2354         https://bugs.webkit.org/show_bug.cgi?id=79068
2355
2356         Reviewed by Dirk Schulze.
2357
2358         Added SVG support for the CSS 'transform-origin' property and for percentage
2359         values in the transform translate function.  The changes conform to
2360         http://dev.w3.org/csswg/css3-transforms/.
2361
2362         Tests: svg/transforms/percent-transform-values.xhtml
2363                svg/transforms/transform-origin-css-property.xhtml
2364
2365         * css/svg.css:
2366         (*):
2367         (html|* > svg):
2368         Default transform-origin for SVG elements is 0 0.
2369
2370         * platform/Length.h:
2371         (WebCore::Length::calcFloatValue):
2372         Added a calcFloatValue overload whose max parameter (for percent lengths) is a float.
2373         The original version will be obsolete when the sub-pixel layout support is completed.
2374
2375         * rendering/style/RenderStyle.cpp:
2376         * rendering/style/RenderStyle.h:
2377         (WebCore):
2378         (WebCore::requireTransformOrigin):
2379         Transforms that only include translations don't depend on the transform-origin.
2380
2381         (WebCore::RenderStyle::applyTransform):
2382         SVG elements interpret non-percentage/keyword transform-origin values relative to their viewport,
2383         unlike HTML which interprets all transform-origin values relative to the element's origin.
2384         The new FloatRect applyTransform() function handles SVG semantics. Similarly, SVG elements interpret
2385         percentage/keyword transform-origin values relative to the origin of their objectBoundingBox(), HTML
2386         uses the borderBox.  All this per http://dev.w3.org/csswg/css3-transforms/.
2387
2388         * svg/SVGStyledTransformableElement.cpp:
2389         (WebCore::SVGStyledTransformableElement::animatedLocalTransform):
2390
2391 2012-03-12  Dana Jansens  <danakj@chromium.org>
2392
2393         [chromium] Use projectQuad to apply inverse mapRect
2394         https://bugs.webkit.org/show_bug.cgi?id=80741
2395
2396         Reviewed by Adrienne Walker.
2397
2398         Unit test: CCOcclusionTrackerTest3dTransform
2399                    CCOcclusionTrackerTestPerspectiveTransform
2400                    CCOcclusionTrackerTestPerspectiveTransformBehindCamera
2401
2402         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2403         (WebCore::projectQuad):
2404         (WebCore):
2405         (WebCore::computeUnoccludedContentRect):
2406
2407 2012-03-12  Leo Yang  <leo.yang@torchmobile.com.cn>
2408
2409         [BlackBerry] Upstream the BlackBerry change to platform/graphics/FontPlatformData.h
2410         https://bugs.webkit.org/show_bug.cgi?id=80820
2411
2412         Reviewed by Rob Buis.
2413
2414         The BlackBerry is using the FontPlatformData from Chromium porting.
2415
2416         * platform/graphics/FontPlatformData.h:
2417
2418 2012-03-12  Zhenyao Mo  <zmo@google.com>
2419
2420         After webgl canvas resize, bindings might be lost
2421         https://bugs.webkit.org/show_bug.cgi?id=80895
2422
2423         Reviewed by Stephen White.
2424
2425         Test: fast/canvas/webgl/texture-bindings-uneffected-on-resize.html
2426
2427         * html/canvas/WebGLRenderingContext.cpp:
2428         (WebCore):
2429         (WebCore::WebGLRenderingContext::reshape): recover bindings after reshape.
2430
2431 2012-03-12  Kentaro Hara  <haraken@chromium.org>
2432
2433         [V8][Refactoring] Remove getWrapper() and getWrapperSlow()
2434         https://bugs.webkit.org/show_bug.cgi?id=80920
2435
2436         Reviewed by Adam Barth.
2437
2438         Now getWrapper() is the same as getExistingWrapper().
2439         getWrapperSlow() is the same as getExistingWrapperSlow().
2440         This patch removes getWrapper() and getWrapperSlow().
2441         Also this patch renames getExistingWrapper() to getCachedWrapper().
2442
2443         No tests. No change in behavior.
2444
2445         * bindings/scripts/CodeGeneratorV8.pm:
2446         (GenerateHeader):
2447         * bindings/v8/V8DOMWrapper.cpp:
2448         (WebCore::V8DOMWrapper::getWrapperSlow):
2449         * bindings/v8/V8DOMWrapper.h:
2450         (WebCore::V8DOMWrapper::getWrapper):
2451         (V8DOMWrapper):
2452         * bindings/v8/custom/V8NodeCustom.cpp:
2453         (WebCore::toV8Slow):
2454
2455 2012-03-12  Erik Arvidsson  <arv@chromium.org>
2456
2457         [V8] Use v8::V8::AddHiddenReferences instead of SetHiddenValue
2458         https://bugs.webkit.org/show_bug.cgi?id=80880
2459
2460         Reviewed by Adam Barth.
2461
2462         We used to add a hidden property in the getter to the returned wrapper.
2463         With this patch we instead handle the liveness of the wrapper in the GC phase by
2464         calling v8::V8::AddHiddenReference.
2465
2466         To reduce the amount of custom code we need, the V8 code generator now supports
2467         GenerateIsReachable (as well as CustomIsReachable) which, even though different
2468         from the JSC attribute, is used in the same cases and takes the same values (even though
2469         at the moment not all JSC values are supported by V8).
2470
2471         No new tests. Covered by existing tests.
2472
2473         * Target.pri:
2474         * UseV8.cmake:
2475         * WebCore.gypi:
2476         * bindings/scripts/CodeGeneratorJS.pm:
2477         (GetGenerateIsReachable):
2478         (GetCustomIsReachable):
2479         (GenerateHeader):
2480         (GenerateImplementation):
2481         * bindings/scripts/CodeGeneratorV8.pm:
2482         (NeedsToVisitDOMWrapper):
2483         (GetGenerateIsReachable):
2484         (GetCustomIsReachable):
2485         (GenerateVisitDOMWrapper):
2486         (GenerateHeader):
2487         (GenerateNamedConstructorCallback):
2488         (GenerateImplementation):
2489         * bindings/scripts/IDLAttributes.txt:
2490         * bindings/scripts/test/V8/V8Float64Array.cpp:
2491         (WebCore):
2492         * bindings/scripts/test/V8/V8Float64Array.h:
2493         (V8Float64Array):
2494         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2495         (WebCore):
2496         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
2497         (V8TestActiveDOMObject):
2498         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2499         (WebCore):
2500         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
2501         (V8TestCustomNamedGetter):
2502         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2503         (WebCore):
2504         * bindings/scripts/test/V8/V8TestEventConstructor.h:
2505         (V8TestEventConstructor):
2506         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2507         (WebCore):
2508         * bindings/scripts/test/V8/V8TestEventTarget.h:
2509         (V8TestEventTarget):
2510         * bindings/scripts/test/V8/V8TestInterface.cpp:
2511         (WebCore):
2512         * bindings/scripts/test/V8/V8TestInterface.h:
2513         (V8TestInterface):
2514         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2515         (WebCore):
2516         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
2517         (V8TestMediaQueryListListener):
2518         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2519         (WebCore):
2520         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
2521         (V8TestNamedConstructor):
2522         * bindings/scripts/test/V8/V8TestObj.cpp:
2523         (WebCore):
2524         * bindings/scripts/test/V8/V8TestObj.h:
2525         (V8TestObj):
2526         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2527         (WebCore):
2528         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
2529         (V8TestSerializedScriptValueInterface):
2530         * bindings/v8/NPV8Object.cpp:
2531         (WebCore::npObjectTypeInfo):
2532         * bindings/v8/V8GCController.cpp:
2533         (WebCore::GrouperVisitor::visitDOMWrapper):
2534         * bindings/v8/WrapperTypeInfo.h:
2535         (WebCore):
2536         (WrapperTypeInfo):
2537         * bindings/v8/custom/V8CSSStyleSheetCustom.cpp: Removed.
2538         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
2539         * bindings/v8/custom/V8DOMTokenListCustom.cpp: Removed.
2540         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2541         (WebCore):
2542         * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
2543         * bindings/v8/custom/V8StyleSheetCustom.cpp:
2544         (WebCore::toV8):
2545         * css/CSSStyleSheet.idl:
2546         * css/StyleSheet.idl:
2547         * dom/DOMStringMap.idl:
2548         * dom/NamedNodeMap.idl:
2549         * html/DOMTokenList.idl:
2550         * html/track/TextTrackList.idl:
2551
2552 2012-03-12  Kentaro Hara  <haraken@chromium.org>
2553
2554         [V8][Refactoring] Make getWrapperSlow() and getExistingWrapperSlow() same
2555         https://bugs.webkit.org/show_bug.cgi?id=80916
2556
2557         Reviewed by Adam Barth.
2558
2559         This is one of the steps for fixing bug 80841.
2560         This patch makes getWrapperSlow() and getExistingWrapperSlow() same.
2561         In the next patch, we will remove getExistingWrapper() and getExistingWrapperSlow().
2562
2563         No tests. No change in behavior.
2564
2565         * bindings/scripts/CodeGeneratorV8.pm:
2566         (GenerateHeader):
2567         * bindings/v8/V8DOMWrapper.cpp:
2568         (WebCore::V8DOMWrapper::getWrapperSlow):
2569
2570 2012-03-12  Kentaro Hara  <haraken@chromium.org>
2571
2572         [V8] Refactor some header includes in V8 bindings
2573         https://bugs.webkit.org/show_bug.cgi?id=80913
2574
2575         Reviewed by Adam Barth.
2576
2577         This patch refactors some header includes in V8 bindings
2578         required for fixing bug 80841.
2579
2580         No tests. No change in behavior.
2581
2582         * bindings/v8/DOMDataStore.h:
2583         (DOMDataStore):
2584         * bindings/v8/V8DOMMap.h:
2585         * bindings/v8/V8DOMWrapper.cpp:
2586         * bindings/v8/V8IsolatedContext.cpp:
2587         (WebCore::V8IsolatedContext::isolatedContext):
2588         * bindings/v8/V8IsolatedContext.h:
2589         (WebCore::V8IsolatedContext::getEntered):
2590         (V8IsolatedContext):
2591         * bindings/v8/WorldContextHandle.cpp:
2592
2593 2012-03-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2594
2595         Unreviewed, rolling out r110501.
2596         http://trac.webkit.org/changeset/110501
2597         https://bugs.webkit.org/show_bug.cgi?id=80908
2598
2599         Broke the Apple-Win build (Requested by abarth on #webkit).
2600
2601         * CMakeLists.txt:
2602         * DerivedSources.make:
2603         * DerivedSources.pri:
2604         * GNUmakefile.am:
2605         * GNUmakefile.list.am:
2606         * Target.pri:
2607         * WebCore.gyp/WebCore.gyp:
2608         * WebCore.gypi:
2609         * WebCore.pri:
2610         * WebCore.xcodeproj/project.pbxproj:
2611         * fileapi/DirectoryEntry.cpp: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntry.cpp.
2612         (WebCore):
2613         (WebCore::DirectoryEntry::DirectoryEntry):
2614         (WebCore::DirectoryEntry::createReader):
2615         (WebCore::DirectoryEntry::getFile):
2616         (WebCore::DirectoryEntry::getDirectory):
2617         (WebCore::DirectoryEntry::removeRecursively):
2618         * fileapi/DirectoryEntry.h: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntry.h.
2619         (WebCore):
2620         (DirectoryEntry):
2621         (WebCore::DirectoryEntry::create):
2622         (WebCore::DirectoryEntry::isDirectory):
2623         * fileapi/DirectoryEntry.idl: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntry.idl.
2624         * fileapi/DirectoryEntrySync.cpp: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntrySync.cpp.
2625         (WebCore):
2626         (WebCore::DirectoryEntrySync::DirectoryEntrySync):
2627         (WebCore::DirectoryEntrySync::createReader):
2628         (WebCore::DirectoryEntrySync::getFile):
2629         (WebCore::DirectoryEntrySync::getDirectory):
2630         (WebCore::DirectoryEntrySync::removeRecursively):
2631         * fileapi/DirectoryEntrySync.h: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntrySync.h.
2632         (WebCore):
2633         (DirectoryEntrySync):
2634         (WebCore::DirectoryEntrySync::create):
2635         (WebCore::DirectoryEntrySync::isDirectory):
2636         * fileapi/DirectoryEntrySync.idl: Renamed from Source/WebCore/Modules/filesystem/DirectoryEntrySync.idl.
2637         * fileapi/DirectoryReader.cpp: Renamed from Source/WebCore/Modules/filesystem/DirectoryReader.cpp.
2638         (WebCore):
2639         (WebCore::DirectoryReader::DirectoryReader):
2640         (WebCore::DirectoryReader::readEntries):
2641         * fileapi/DirectoryReader.h: Renamed from Source/WebCore/Modules/filesystem/DirectoryReader.h.
2642         (WebCore):
2643         (DirectoryReader):
2644         (WebCore::DirectoryReader::create):
2645         (WebCore::DirectoryReader::filesystem):
2646         * fileapi/DirectoryReader.idl: Renamed from Source/WebCore/Modules/filesystem/DirectoryReader.idl.
2647         * fileapi/DirectoryReaderBase.h: Renamed from Source/WebCore/Modules/filesystem/DirectoryReaderBase.h.
2648         (WebCore):
2649         (DirectoryReaderBase):
2650         (WebCore::DirectoryReaderBase::filesystem):
2651         (WebCore::DirectoryReaderBase::setHasMoreEntries):
2652         (WebCore::DirectoryReaderBase::DirectoryReaderBase):
2653         * fileapi/DirectoryReaderSync.cpp: Renamed from Source/WebCore/Modules/filesystem/DirectoryReaderSync.cpp.
2654         (WebCore):
2655         (WebCore::DirectoryReaderSync::DirectoryReaderSync):
2656         (WebCore::DirectoryReaderSync::readEntries):
2657         * fileapi/DirectoryReaderSync.h: Renamed from Source/WebCore/Modules/filesystem/DirectoryReaderSync.h.
2658         (WebCore):
2659         (DirectoryReaderSync):
2660         (WebCore::DirectoryReaderSync::create):
2661         * fileapi/DirectoryReaderSync.idl: Renamed from Source/WebCore/Modules/filesystem/DirectoryReaderSync.idl.
2662
2663 2012-03-12  Nico Weber  <thakis@chromium.org>
2664
2665         [chromium/mac] Make sure libWebKitSystemInterface.a doesn't contain ppc object files.
2666         https://bugs.webkit.org/show_bug.cgi?id=80902
2667
2668         Reviewed by Adam Barth.
2669
2670         Follow-up to http://codereview.chromium.org/9638015/
2671
2672         No intended behavior change.
2673
2674         * WebCore.gyp/mac/adjust_visibility.sh:
2675
2676 2012-03-12  Jer Noble  <jer.noble@apple.com>
2677
2678         WebCore: Add support for AudioNode "tailTime()" and "latencyTime()"
2679         https://bugs.webkit.org/show_bug.cgi?id=74750
2680
2681         Reviewed by Chris Rogers.
2682
2683         No new tests; optimization of existing code path, so covered by existing tests.
2684
2685         To account for AudioNodes which may generate non-silent audio when fed silent input
2686         for a certain amount of time after the last non-silent audio data, add two new virtual
2687         functions tailTime() and latencyTime().
2688
2689         * webaudio/AudioNode.h:
2690         (WebCore::AudioNode::tailTime): Added. Pure virtual.
2691         (WebCore::AudioNode::latencyTime): Added. Pure virtual.
2692         * platform/audio/AudioProcessor.h:
2693         (WebCore::AudioProcessor::tailTime): Added. Pure virtual.
2694         (WebCore::AudioProcessor::latencyTime): Added. Pure virtual.
2695         * platform/audio/AudioDSPKernel.h:
2696         (WebCore::AudioDSPKernel::tailTime): Added. Pure virtual.
2697         (WebCore::AudioDSPKernel::latencyTime): Added. Pure virtual.
2698
2699         Added tailTime() and latencyTime() overrides to the following classes:
2700         * platform/audio/AudioDSPKernelProcessor.cpp:
2701         (WebCore::AudioDSPKernelProcessor::tailTime):
2702         (WebCore::AudioDSPKernelProcessor::latencyTime):
2703         * platform/audio/AudioDSPKernelProcessor.h:
2704         * platform/audio/DynamicsCompressor.h:
2705         (WebCore::DynamicsCompressor::tailTime):
2706         (WebCore::DynamicsCompressor::latencyTime):
2707         * platform/audio/EqualPowerPanner.h:
2708         * platform/audio/HRTFPanner.cpp:
2709         (WebCore::HRTFPanner::tailTime):
2710         (WebCore::HRTFPanner::latencyTime):
2711         * platform/audio/HRTFPanner.h:
2712         * platform/audio/Panner.h:
2713         * webaudio/AudioBasicProcessorNode.cpp:
2714         (WebCore::AudioBasicProcessorNode::tailTime):
2715         (WebCore::AudioBasicProcessorNode::latencyTime):
2716         * webaudio/AudioBasicProcessorNode.h:
2717         * webaudio/AudioChannelMerger.h:
2718         * webaudio/AudioChannelSplitter.h:
2719         * webaudio/AudioDestinationNode.h:
2720         * webaudio/AudioGainNode.h:
2721         * webaudio/AudioPannerNode.h:
2722         * webaudio/AudioSourceNode.h:
2723         * webaudio/BiquadDSPKernel.cpp:
2724         (WebCore::BiquadDSPKernel::tailTime):
2725         (WebCore::BiquadDSPKernel::latencyTime):
2726         * webaudio/BiquadDSPKernel.h:
2727         * webaudio/BiquadFilterNode.h:
2728         * webaudio/ConvolverNode.cpp:
2729         (WebCore::ConvolverNode::tailTime):
2730         (WebCore::ConvolverNode::latencyTime):
2731         * webaudio/ConvolverNode.h:
2732         * webaudio/DelayDSPKernel.cpp:
2733         (WebCore::DelayDSPKernel::tailTime):
2734         (WebCore::DelayDSPKernel::latencyTime):
2735         * webaudio/DelayDSPKernel.h:
2736         * webaudio/DelayProcessor.h:
2737         * webaudio/DynamicsCompressorNode.cpp:
2738         (WebCore::DynamicsCompressorNode::tailTime):
2739         (WebCore::DynamicsCompressorNode::latencyTime):
2740         * webaudio/DynamicsCompressorNode.h:
2741         * webaudio/JavaScriptAudioNode.cpp:
2742         (WebCore::JavaScriptAudioNode::tailTime):
2743         (WebCore::JavaScriptAudioNode::latencyTime):
2744         * webaudio/JavaScriptAudioNode.h:
2745         * webaudio/RealtimeAnalyserNode.h:
2746         * webaudio/WaveShaperDSPKernel.h:
2747
2748         The following functions were added as support for the new AudioNode and AudioProcessor functions:
2749         * platform/audio/Biquad.cpp:
2750         (WebCore::Biquad::latencyFrames):
2751         * platform/audio/Biquad.h:
2752         * platform/audio/Reverb.cpp:
2753         (WebCore::Reverb::latencyFrames):
2754         * platform/audio/ReverbConvolver.h:
2755         (WebCore::ReverbConvolver::latencyFrames):
2756
2757         The following functions were made const-correct:
2758         * platform/audio/HRTFPanner.h:
2759         (WebCore::HRTFPanner::fftSize):
2760         * platform/audio/Reverb.h:
2761         (WebCore::Reverb::impulseResponseLength):
2762
2763 2012-03-12  Anders Carlsson  <andersca@apple.com>
2764
2765         WebTileLayers should be opaque
2766         https://bugs.webkit.org/show_bug.cgi?id=80907
2767         <rdar://problem/11034390>
2768
2769         Reviewed by Andreas Kling.
2770
2771         * platform/graphics/ca/mac/TileCache.mm:
2772         (WebCore::TileCache::createTileLayer):
2773         Call -[CALayer setOpaque:] on the newly created WebTileLayer.
2774
2775 2012-03-12  Emil A Eklund  <eae@chromium.org>
2776
2777         Fix rounding in scrollbar rect calculations
2778         https://bugs.webkit.org/show_bug.cgi?id=80894
2779
2780         Reviewed by Eric Seidel.
2781
2782         Fix usage of subpixel units in RenderScrollbar::buttonRect and
2783         RenderScrollbar::trackRect.
2784
2785         No new tests, no new functionality.
2786
2787         * rendering/LayoutTypes.h:
2788         (WebCore::isIntegerValue):
2789         Add dummy isIntegerValue function, will be replaced with actual
2790         implementation once LayoutUnit is remapped to FractionalLayoutUnit.
2791         
2792         * rendering/RenderScrollbar.cpp:
2793         (WebCore::RenderScrollbar::buttonRect):
2794         (WebCore::RenderScrollbar::trackRect):
2795         Change rect calculations to use pixel snapped values.
2796
2797         * rendering/RenderScrollbarPart.h:
2798         (RenderScrollbarPart):
2799         (WebCore::RenderScrollbarPart::marginTop):
2800         (WebCore::RenderScrollbarPart::marginBottom):
2801         (WebCore::RenderScrollbarPart::marginLeft):
2802         (WebCore::RenderScrollbarPart::marginRight):
2803         Add ASSERT to ensure that scrollbar parts are always aligned to device
2804         pixels.
2805
2806 2012-03-12  C Anthony Risinger  <anthony@xtfx.me>
2807
2808         [GObject IDL Parser] STRING argument should be HASHREF
2809         https://bugs.webkit.org/show_bug.cgi?id=78877
2810
2811         Reviewed by Kentaro Hara.
2812
2813         * bindings/scripts/CodeGeneratorGObject.pm:
2814         (GenerateFunctions): extendedAttributes are hashes, not strings
2815
2816 2012-03-12  Jessie Berlin  <jberlin@apple.com>
2817
2818         More Windows build fixing.
2819
2820         Use fully qualified paths for WTF headers.
2821
2822         * platform/graphics/cg/ImageSourceCGWin.cpp:
2823         * platform/graphics/win/UniscribeController.h:
2824         * platform/win/DragImageCGWin.cpp:
2825         * platform/win/DragImageCairoWin.cpp:
2826         * platform/win/DragImageWin.cpp:
2827         * rendering/RenderThemeSafari.cpp:
2828
2829 2012-03-12  Mark Pilgrim  <pilgrim@chromium.org>
2830
2831         Move DirectoryEntry and DirectoryReader to new Modules/filesystem/ directory
2832         https://bugs.webkit.org/show_bug.cgi?id=80625
2833
2834         Reviewed by Adam Barth.
2835
2836         No new tests, all existing tests pass.
2837
2838         * CMakeLists.txt:
2839         * DerivedSources.make:
2840         * DerivedSources.pri:
2841         * GNUmakefile.am:
2842         * GNUmakefile.list.am:
2843         * Modules/filesystem: Added.
2844         * Modules/filesystem/DirectoryEntry.cpp: Copied from Source/WebCore/fileapi/DirectoryEntry.cpp.
2845         * Modules/filesystem/DirectoryEntry.h: Copied from Source/WebCore/fileapi/DirectoryEntry.h.
2846         * Modules/filesystem/DirectoryEntry.idl: Copied from Source/WebCore/fileapi/DirectoryEntry.idl.
2847         * Modules/filesystem/DirectoryEntrySync.cpp: Copied from Source/WebCore/fileapi/DirectoryEntrySync.cpp.
2848         * Modules/filesystem/DirectoryEntrySync.h: Copied from Source/WebCore/fileapi/DirectoryEntrySync.h.
2849         * Modules/filesystem/DirectoryEntrySync.idl: Copied from Source/WebCore/fileapi/DirectoryEntrySync.idl.
2850         * Modules/filesystem/DirectoryReader.cpp: Copied from Source/WebCore/fileapi/DirectoryReader.cpp.
2851         * Modules/filesystem/DirectoryReader.h: Copied from Source/WebCore/fileapi/DirectoryReader.h.
2852         * Modules/filesystem/DirectoryReader.idl: Copied from Source/WebCore/fileapi/DirectoryReader.idl.
2853         * Modules/filesystem/DirectoryReaderBase.h: Copied from Source/WebCore/fileapi/DirectoryReaderBase.h.
2854         * Modules/filesystem/DirectoryReaderSync.cpp: Copied from Source/WebCore/fileapi/DirectoryReaderSync.cpp.
2855         * Modules/filesystem/DirectoryReaderSync.h: Copied from Source/WebCore/fileapi/DirectoryReaderSync.h.
2856         * Modules/filesystem/DirectoryReaderSync.idl: Copied from Source/WebCore/fileapi/DirectoryReaderSync.idl.
2857         * Target.pri:
2858         * WebCore.gyp/WebCore.gyp:
2859         * WebCore.gypi:
2860         * WebCore.pri:
2861         * WebCore.xcodeproj/project.pbxproj:
2862         * fileapi/DirectoryEntry.cpp: Removed.
2863         * fileapi/DirectoryEntry.h: Removed.
2864         * fileapi/DirectoryEntry.idl: Removed.
2865         * fileapi/DirectoryEntrySync.cpp: Removed.
2866         * fileapi/DirectoryEntrySync.h: Removed.
2867         * fileapi/DirectoryEntrySync.idl: Removed.
2868         * fileapi/DirectoryReader.cpp: Removed.
2869         * fileapi/DirectoryReader.h: Removed.
2870         * fileapi/DirectoryReader.idl: Removed.
2871         * fileapi/DirectoryReaderBase.h: Removed.
2872         * fileapi/DirectoryReaderSync.cpp: Removed.
2873         * fileapi/DirectoryReaderSync.h: Removed.
2874         * fileapi/DirectoryReaderSync.idl: Removed.
2875
2876 2012-03-12  Brady Eidson  <beidson@apple.com>
2877
2878         https://bugs.webkit.org/show_bug.cgi?id=80903
2879         InspectorDOMStorageAgent creates a Storage object which is a DOMWindowProperty - Should use the StorageArea directly
2880
2881         Reviewed by Tim Hatcher.
2882
2883         No new tests. (No behavior change)
2884
2885         Changed to hold the StorageArea directly and added a Frame* accessor:
2886         * inspector/InspectorDOMStorageResource.h:
2887         (WebCore::InspectorDOMStorageResource::create):
2888         (WebCore::InspectorDOMStorageResource::storageArea):
2889         (WebCore::InspectorDOMStorageResource::frame):
2890         (InspectorDOMStorageResource):
2891
2892         * inspector/InspectorDOMStorageResource.cpp:
2893         (WebCore::InspectorDOMStorageResource::InspectorDOMStorageResource):
2894
2895         * inspector/InspectorDOMStorageAgent.cpp:
2896         (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
2897         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
2898         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
2899         (WebCore::InspectorDOMStorageAgent::didUseDOMStorage):
2900
2901 2012-03-12  Brian Salomon  <bsalomon@google.com>
2902
2903         [Skia] Release CGImage used to apply color space conversion to SkBitmap
2904         https://bugs.webkit.org/show_bug.cgi?id=80892
2905
2906         Reviewed by Adam Barth.
2907
2908         Regressions should be covered by any test that does image decode on the mac.
2909
2910         * platform/image-decoders/skia/ImageDecoderSkia.cpp:
2911         (WebCore::resolveColorSpace):
2912
2913 2012-03-12  Levi Weintraub  <leviw@chromium.org>
2914
2915         Update LayoutUnit usage in RenderMathML* classes
2916         https://bugs.webkit.org/show_bug.cgi?id=77916
2917
2918         Reviewed by Eric Seidel.
2919
2920         The purpose of this patch is to ensure MathML rendering does not regress when
2921         we switch to sub-pixel layout. A subsequent patch can likely improve MathML's
2922         rendering when zoom is applied.
2923
2924         To accomplish this without changing the current heuristics for positioning,
2925         we continue to use integers for sizes and locations, using pixel snapping
2926         when communicating with other Rendering classes.
2927
2928         No new tests. No change in behavior.
2929
2930         * rendering/mathml/RenderMathMLBlock.cpp:
2931         (WebCore::RenderMathMLBlock::paint): Cleaning up debug painting to be on
2932         pixel boundaries instead of subpixel.
2933         * rendering/mathml/RenderMathMLFraction.cpp:
2934         (WebCore::RenderMathMLFraction::paint): Reverting to integers for determining
2935         the vertical offset.
2936         (WebCore::RenderMathMLFraction::baselinePosition):
2937         * rendering/mathml/RenderMathMLRoot.cpp:
2938         (WebCore::RenderMathMLRoot::paint): Using integers for height and width
2939         and only accumulating pixel snapped values.
2940         (WebCore::RenderMathMLRoot::layout): Setting padding with integers to
2941         avoid inconsistent rounding based on the root's location.
2942         * rendering/mathml/RenderMathMLRow.cpp:
2943         (WebCore::RenderMathMLRow::layout):
2944         * rendering/mathml/RenderMathMLSquareRoot.cpp:
2945         (WebCore::RenderMathMLSquareRoot::paint): See RenderMathMLRoot.
2946         (WebCore::RenderMathMLSquareRoot::layout): Ditto.
2947         * rendering/mathml/RenderMathMLUnderOver.cpp:
2948         (WebCore::getOffsetHeight):
2949         (WebCore::RenderMathMLUnderOver::layout):
2950
2951 2012-03-12  Anders Carlsson  <andersca@apple.com>
2952
2953         Use smaller tiles for right and bottom edges
2954         https://bugs.webkit.org/show_bug.cgi?id=80893
2955         <rdar://problem/11032873>
2956
2957         Reviewed by Sam Weinig.
2958
2959         * platform/graphics/ca/mac/TileCache.mm:
2960         (WebCore::TileCache::rectForTileIndex):
2961         Intersect the rect with the tile cache bounds.
2962
2963         (WebCore::TileCache::revalidateTiles):
2964         Resize already existing tiles if needed.
2965
2966         (WebCore::TileCache::createTileLayer):
2967         This now takes a tile rect. Use setFrame instead of setting the bounds and position separately.
2968
2969 2012-03-12  Enrica Casucci  <enrica@apple.com>
2970
2971         WebKit2: remove NSPasteboard access for promised data from the WebProcess
2972         https://bugs.webkit.org/show_bug.cgi?id=80073
2973         
2974         Reviewed by Alexey Proskuryakov.
2975
2976         * WebCore.exp.in: Added two exported methods.
2977         * platform/mac/FileSystemMac.mm:
2978         (WebCore::setMetaData): Last parameter in the call to wkSetMetadataURL
2979         needs to be wrapped in String before casting to NSString.
2980
2981 2012-03-12  Alexey Proskuryakov  <ap@apple.com>
2982
2983         clang build fix
2984
2985         * css/CSSPrimitiveValueMappings.h: (WebCore::CSSPrimitiveValue::convertToLength): Reorder
2986         boolean operators, so that a warning about "use of logical || with constant operand" doesn't
2987         appear.
2988
2989 2012-03-12  Abhishek Arya  <inferno@chromium.org>
2990
2991         Crash in Text::splitText due to mutation events.
2992         https://bugs.webkit.org/show_bug.cgi?id=80828
2993
2994         Reviewed by Ryosuke Niwa.
2995
2996         Test: fast/text/split-text-crash.xhtml
2997
2998         * dom/Range.cpp:
2999         (WebCore::Range::insertNode): replace m_start.container() calls with ref protected node.
3000
3001 2012-03-12  Kenneth Russell  <kbr@google.com>
3002
3003         Null argument to texSubImage2D crashes
3004         https://bugs.webkit.org/show_bug.cgi?id=80778
3005
3006         Reviewed by Dean Jackson.
3007
3008         Generate INVALID_VALUE OpenGL error upon receiving null argument.
3009         Final behavior still being decided on public-webgl mailing list.
3010
3011         * html/canvas/WebGLRenderingContext.cpp:
3012         (WebCore):
3013         (WebCore::WebGLRenderingContext::texImage2D):
3014         (WebCore::WebGLRenderingContext::texSubImage2D):
3015         (WebCore::WebGLRenderingContext::validateTexFuncData):
3016         * html/canvas/WebGLRenderingContext.h:
3017
3018 2012-03-12  Luke Macpherson   <macpherson@chromium.org>
3019
3020         Remove CSSStyleSelector's convertToLength method and use CSSPrimitiveValue's version directly.
3021         https://bugs.webkit.org/show_bug.cgi?id=80484
3022
3023         Reviewed by Julien Chaffraix.
3024
3025         No new tests / code cleanup only.
3026
3027         * css/CSSPrimitiveValueMappings.h:
3028         (WebCore::CSSPrimitiveValue::convertToLength):
3029         * css/CSSStyleApplyProperty.cpp:
3030         (WebCore::ApplyPropertyClip::convertToLength):
3031         * css/CSSStyleSelector.cpp:
3032         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3033
3034 2012-03-12  Stephen White  <senorblanco@chromium.org>
3035
3036         [chromium] Restore canvas2D acceleration after context loss.
3037         https://bugs.webkit.org/show_bug.cgi?id=80629
3038
3039         Reviewed by James Robinson.
3040
3041         Covered by existing canvas tests, and manual testing (killing the GPU
3042         process).
3043
3044         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
3045         (WebCore::Canvas2DLayerChromium::create):
3046         (WebCore::Canvas2DLayerChromium::Canvas2DLayerChromium):
3047         (WebCore::Canvas2DLayerChromium::setNeedsDisplayRect):
3048         (WebCore::Canvas2DLayerChromium::drawsContent):
3049         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
3050         * platform/graphics/chromium/Canvas2DLayerChromium.h:
3051         (Canvas2DLayerChromium):
3052         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
3053         (WebCore::CCRenderSurface::applyFilters):
3054         * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
3055         (SharedGraphicsContext3DImpl):
3056         (WebCore::SharedGraphicsContext3DImpl::SharedGraphicsContext3DImpl):
3057         (WebCore::SharedGraphicsContext3DImpl::get):
3058         (WebCore):
3059         (WebCore::SharedGraphicsContext3D::get):
3060         * platform/graphics/gpu/SharedGraphicsContext3D.h:
3061         (SharedGraphicsContext3D):
3062         * platform/graphics/skia/ImageBufferSkia.cpp:
3063         (WebCore::createAcceleratedCanvas):
3064         * platform/graphics/skia/PlatformContextSkia.cpp:
3065         (WebCore::PlatformContextSkia::PlatformContextSkia):
3066         (WebCore):
3067         * platform/graphics/skia/PlatformContextSkia.h:
3068         (WebCore):
3069         (WebCore::PlatformContextSkia::isAccelerated):
3070         (WebCore::PlatformContextSkia::setAccelerated):
3071         (PlatformContextSkia):
3072
3073 2012-03-12  George Staikos  <staikos@webkit.org>
3074
3075         It doesn't make sense to return const unsigned, and GCC warns about it.
3076         Remove const.
3077         https://bugs.webkit.org/show_bug.cgi?id=80790
3078
3079         Reviewed by Antonio Gomes.
3080
3081         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.h:
3082         (WebCore::ComplexTextController::length):
3083         (WebCore::ComplexTextController::numCodePoints):
3084         (WebCore::ComplexTextController::offsetX):
3085
3086 2012-03-12  Beth Dakin  <bdakin@apple.com>
3087
3088         https://bugs.webkit.org/show_bug.cgi?id=80888
3089         Clear background for NSTextFieldCell is unreliable and not necessary
3090         -and corresponding-
3091         <rdar://problem/10663710>
3092
3093         Reviewed by Dan Bernstein.
3094
3095         With http://trac.webkit.org/changeset/104240 I thought it was necessary to 
3096         make NSTextFieldCells draw with a clear background in order to allow styled 
3097         text fields. That is not actually necessary; we just had a different bug 
3098         where isControlStyled() was only checking for styled borders on text fields. 
3099         Text fields can also be styled with backgrounds, so they need the full check.
3100         * rendering/RenderThemeMac.mm:
3101         (WebCore::RenderThemeMac::isControlStyled):
3102         (WebCore::RenderThemeMac::textField):
3103
3104 2012-03-12  Scott Byer  <scottbyer@chromium.org>
3105
3106         Cleanup obsolete files.
3107         https://bugs.webkit.org/show_bug.cgi?id=80737
3108
3109         Reviewed by James Robinson.
3110
3111         No new code.
3112
3113         * GNUmakefile.list.am:
3114         * PlatformWinCE.cmake:
3115         * Target.pri:
3116         * WebCore.vcproj/WebCore.vcproj:
3117         * platform/ScrollAnimatorWin.cpp: Removed.
3118         * platform/ScrollAnimatorWin.h: Removed.
3119
3120 2012-03-12  Gregg Tavares  <gman@google.com>
3121
3122         Make texImage2D error for wrong size ArrayBufferView more helpful
3123         https://bugs.webkit.org/show_bug.cgi?id=80868
3124         
3125         It took me about 30 minutes to figure out my texImage2D was failing
3126         not because my ArrayBufferView was too small but because the default
3127         alignment is 4. A better error message might help devs find this issue
3128         faster.
3129
3130         Reviewed by Kenneth Russell.
3131
3132         No new tests as no new functionality.
3133
3134         * html/canvas/WebGLRenderingContext.cpp:
3135         (WebCore):
3136         (WebCore::WebGLRenderingContext::validateTexFuncData):
3137
3138 2012-03-12  Tim Horton  <timothy_horton@apple.com>
3139
3140         Infinite repaint loop with SVGImageCache and deferred repaint timers
3141         https://bugs.webkit.org/show_bug.cgi?id=78315
3142         <rdar://problem/10651634>
3143
3144         Reviewed by Nikolas Zimmermann.
3145
3146         Only defer image redraw on a timer if we're in layout. This breaks
3147         the repaint loop while still preventing us from drawing inside layout.
3148
3149         Completely disable repaint during relayout inside SVGImage::drawSVGToImageBuffer,
3150         preventing deferred repaint timers from being started during that process.
3151
3152         No new tests, as the problem only occurs in a nonstandard configuration.
3153
3154         * page/FrameView.cpp:
3155         (WebCore::FrameView::FrameView):
3156         (WebCore::FrameView::reset):
3157         (WebCore::FrameView::repaintContentRectangle):
3158         (WebCore::FrameView::endDeferredRepaints):
3159         (WebCore::FrameView::startDeferredRepaintTimer):
3160         (WebCore):
3161         (WebCore::FrameView::doDeferredRepaints):
3162         (WebCore::FrameView::deferredRepaintTimerFired):
3163         (WebCore::FrameView::beginDisableRepaints):
3164         (WebCore::FrameView::endDisableRepaints):
3165         * page/FrameView.h:
3166         (FrameView):
3167         (WebCore::FrameView::repaintsDisabled):
3168         * rendering/RenderView.cpp:
3169         (WebCore::RenderView::shouldRepaint):
3170         * svg/graphics/SVGImage.cpp:
3171         (WebCore::SVGImage::drawSVGToImageBuffer):
3172         (WebCore::SVGImage::draw):
3173         (WebCore::SVGImage::frameView):
3174         (WebCore):
3175         * svg/graphics/SVGImage.h:
3176         (WebCore):
3177         * svg/graphics/SVGImageCache.cpp:
3178         (WebCore::SVGImageCache::imageContentChanged):
3179         (WebCore::SVGImageCache::redraw):
3180         (WebCore::SVGImageCache::redrawTimerFired):
3181         (WebCore):
3182         * svg/graphics/SVGImageCache.h:
3183         (SVGImageCache):
3184
3185 2012-03-12  Adam Klein  <adamk@chromium.org>
3186
3187         [MutationObservers] Enforce a consistent order of MutationRecord delivery
3188         https://bugs.webkit.org/show_bug.cgi?id=80549
3189
3190         Reviewed by Ojan Vafai.
3191
3192         Mutations should be delivered in order of creation.
3193
3194         Tests: fast/mutation/create-during-delivery.html
3195                fast/mutation/delivery-order.html
3196                fast/mutation/mutate-during-delivery.html
3197
3198         * dom/WebKitMutationObserver.cpp:
3199         (WebCore):
3200         (WebCore::WebKitMutationObserver::ObserverLessThan::operator()): Functor for use with std::sort.
3201         (WebCore::WebKitMutationObserver::create):
3202         (WebCore::WebKitMutationObserver::WebKitMutationObserver):
3203         (WebCore::WebKitMutationObserver::deliverAllMutations): Move observers into a sorted vector before delivery.
3204         * dom/WebKitMutationObserver.h: Add a "priority" member which monotonically increases with each construction.
3205
3206 2012-03-12  Nat Duca  <nduca@chromium.org>
3207
3208         [Chromium] Force compositeAndReadback through regular scheduling flow
3209         https://bugs.webkit.org/show_bug.cgi?id=77049
3210
3211         Reviewed by James Robinson.
3212
3213         * platform/graphics/chromium/cc/CCFrameRateController.cpp:
3214         (WebCore::CCFrameRateController::onTimerTick):
3215         * platform/graphics/chromium/cc/CCFrameRateController.h:
3216         (CCFrameRateControllerClient):
3217         * platform/graphics/chromium/cc/CCScheduler.cpp:
3218         (WebCore::CCScheduler::setNeedsForcedCommit):
3219         (WebCore):
3220         (WebCore::CCScheduler::vsyncTick):
3221         * platform/graphics/chromium/cc/CCScheduler.h:
3222         (CCScheduler):
3223         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
3224         (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine):
3225         (WebCore::CCSchedulerStateMachine::nextAction):
3226         (WebCore::CCSchedulerStateMachine::updateState):
3227         (WebCore::CCSchedulerStateMachine::setNeedsForcedCommit):
3228         (WebCore):
3229         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
3230         (CCSchedulerStateMachine):
3231         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3232         (WebCore::CCThreadProxy::CCThreadProxy):
3233         (WebCore::CCThreadProxy::compositeAndReadback):
3234         (WebCore::CCThreadProxy::requestReadbackOnImplThread):
3235         (WebCore::CCThreadProxy::forceBeginFrameOnImplThread):
3236         (WebCore::CCThreadProxy::scheduledActionBeginFrame):
3237         (WebCore::CCThreadProxy::beginFrame):
3238         * platform/graphics/chromium/cc/CCThreadProxy.h:
3239         (CCThreadProxy):
3240         (WebCore::CCThreadProxy::BeginFrameAndCommitState::BeginFrameAndCommitState):
3241         (BeginFrameAndCommitState):
3242
3243 2012-03-12  Joshua Bell  <jsbell@chromium.org>
3244
3245         IndexedDB: Handle LevelDB database corruption
3246         https://bugs.webkit.org/show_bug.cgi?id=79413
3247
3248         Add LevelDBDatabase::destroy() method so that clients can retry if open() fails.
3249
3250         Reviewed by Tony Chang.
3251
3252         Test: webkit_unit_tests --gtest_filter='LevelDBDatabaseTest.CorruptionTest'
3253
3254         * Modules/indexeddb/IDBLevelDBBackingStore.cpp: Implement open/destroy/open strategy.
3255         (WebCore::IDBLevelDBBackingStore::open):
3256         * platform/leveldb/LevelDBDatabase.cpp:
3257         (WebCore::LevelDBDatabase::destroy):
3258         (WebCore):
3259         * platform/leveldb/LevelDBDatabase.h:
3260         (LevelDBDatabase):
3261
3262 2012-03-11  Shawn Singh  <shawnsingh@chromium.org>
3263
3264         Fix regression on fast/table/table-row-compositing-repaint-crash.html
3265         https://bugs.webkit.org/show_bug.cgi?id=80804
3266
3267         Reviewed by Simon Fraser.
3268
3269         Covered by existing tests.
3270
3271         http://trac.webkit.org/changeset/110401/ accidentally caused
3272         fast/table/table-row-compositing-repaint-crash.html to fail.
3273
3274         * rendering/RenderLayerCompositor.cpp:
3275         (WebCore::RenderLayerCompositor::updateBacking):
3276
3277 2012-03-12  Mike Lawther  <mikelawther@chromium.org>
3278
3279         CSS3 calc: enable mixed percent/absolute for font
3280         https://bugs.webkit.org/show_bug.cgi?id=80813
3281
3282         Reviewed by Ojan Vafai.
3283
3284         Add support for mixed percent/absolute expressions to the font handling class.
3285
3286         * css/CSSStyleApplyProperty.cpp:
3287         (WebCore::ApplyPropertyFontSize::applyValue):
3288
3289 2012-03-12  Andreas Kling  <awesomekling@apple.com>
3290
3291         Restore Attr::style() functionality.
3292         <http://webkit.org/b/80678>
3293         <rdar://problem/10933904>
3294
3295         Reviewed by Antti Koivisto.
3296
3297         The neutering of Attr::style() in r106740 broke some internal clients of the Obj-C API,
3298         so this was definitely premature.
3299
3300         Since we no longer have a per-Attribute style object, synthesize one in style() and
3301         hang it off of the Attr. This grows Attr by one pointer, but it's a low-volume object
3302         so it shouldn't matter much.
3303
3304         We recreate the StylePropertySet object on every call to style(), to avoid complicating
3305         things with custom invalidation code.
3306
3307         * dom/Attr.cpp:
3308         (WebCore::Attr::style):
3309         * dom/Attr.h:
3310         * dom/StyledElement.h:
3311         (WebCore::StyledElement::collectStyleForAttribute):
3312
3313 2012-03-12  Ryosuke Niwa  <rniwa@webkit.org>
3314
3315         REGRESSION(r109285): Crash in WebCore::Document::nodeChildrenWillBeRemoved
3316         https://bugs.webkit.org/show_bug.cgi?id=80578
3317
3318         Reviewed by Andreas Kling.
3319
3320         Test: svg/css/style-change-crash.html
3321
3322         * dom/Element.cpp:
3323         (WebCore::Element::setAttribute):
3324         (WebCore::Element::setAttributeInternal):
3325         * dom/Element.h:
3326         (Element):
3327         * dom/ElementAttributeData.cpp:
3328         (WebCore::ElementAttributeData::addAttribute):
3329         (WebCore::ElementAttributeData::removeAttribute):
3330         * dom/ElementAttributeData.h:
3331         (ElementAttributeData):
3332         * dom/StyledElement.cpp:
3333         (WebCore::StyledElement::updateStyleAttribute):
3334
3335 2012-03-12  Sadrul Habib Chowdhury  <sadrul@chromium.org>
3336
3337         Touch event handler count is not updated when adding handlers to the window.
3338         https://bugs.webkit.org/show_bug.cgi?id=80756
3339
3340         Touch event handlers added to the window needs to be included when counting the number of touch event
3341         handlers. This makes touch event handler counting identical to wheel event handler counting.
3342
3343         Reviewed by Anders Carlsson.
3344
3345         Test: fast/events/touch/touch-handler-count.html
3346
3347         * dom/EventNames.h:
3348         (EventNames):
3349         (WebCore::EventNames::isTouchEventType):
3350         * dom/Node.cpp:
3351         (WebCore):
3352         (WebCore::tryAddEventListener):
3353         (WebCore::tryRemoveEventListener):
3354         * page/DOMWindow.cpp:
3355         (WebCore::DOMWindow::addEventListener):
3356         (WebCore::DOMWindow::removeEventListener):
3357         * testing/Internals.cpp:
3358         (WebCore::Internals::touchEventHandlerCount):
3359         (WebCore):
3360         * testing/Internals.h:
3361         (Internals):
3362         * testing/Internals.idl:
3363
3364 2012-03-12  Pavel Podivilov  <podivilov@chromium.org>
3365
3366         Web Inspector: extract ResourceScriptMapping from MainScriptMapping.
3367         https://bugs.webkit.org/show_bug.cgi?id=80834
3368
3369         Reviewed by Vsevolod Vlasov.
3370
3371         * inspector/front-end/ScriptMapping.js:
3372         (WebInspector.ResourceScriptMapping):
3373         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeListChanged):
3374         (WebInspector.ResourceScriptMapping.prototype.reset):
3375         (WebInspector.MainScriptMapping):
3376         (WebInspector.MainScriptMapping.prototype.rawLocationToUILocation):
3377         (WebInspector.MainScriptMapping.prototype.createLiveLocation):
3378         (WebInspector.MainScriptMapping.prototype._registerLiveLocation):
3379         (WebInspector.MainScriptMapping.prototype._unregisterLiveLocation):
3380         (WebInspector.MainScriptMapping.prototype._updateLiveLocations):
3381         (WebInspector.MainScriptMapping.prototype.uiSourceCodeList):
3382         (WebInspector.MainScriptMapping.prototype.addScript):
3383         (WebInspector.MainScriptMapping.prototype._handleUISourceCodeListChanged):
3384         (WebInspector.MainScriptMapping.prototype.setFormatSource):
3385         (WebInspector.MainScriptMapping.prototype.forceUpdateSourceMapping):
3386         (WebInspector.MainScriptMapping.prototype.reset):
3387
3388 2012-03-12  Pavel Feldman  <pfeldman@chromium.org>
3389
3390         Web Inspector: recognize Float*Array and Int*Array as arrays.
3391         https://bugs.webkit.org/show_bug.cgi?id=80850
3392
3393         Reviewed by Vsevolod Vlasov.
3394
3395         Test: inspector/console/console-external-array.html
3396
3397         * bindings/js/JSInjectedScriptHostCustom.cpp:
3398         (WebCore::JSInjectedScriptHost::type):
3399         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
3400         (WebCore::V8InjectedScriptHost::typeCallback):
3401
3402 2012-03-12  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3403
3404         [TexMapGL] Pixel-align the transform of textures that fit pixel-for-pixel on the frame buffer.
3405         https://bugs.webkit.org/show_bug.cgi?id=80848
3406
3407         Reviewed by Noam Rosenthal.
3408
3409         When rendering a transformed texture on the screen with a fractional
3410         coordinate with linear filtering, the resulting pixel will be blended from
3411         the texels around this fractional position according to their cover ratio.
3412         This produces a slight blur of pixels which give no benefit when rendering
3413         a texture that isn't scaled.
3414
3415         This patch offsets the transform by rounding the translation part of the
3416         layer's transform to align the result to integer coordinates.
3417         Applying the adjustment on the layer transform makes sure that all the tiles
3418         get the same adjustment.
3419
3420         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3421         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
3422         * platform/graphics/texmap/TextureMapperGL.cpp:
3423         (WebCore::TextureMapperGL::drawTexture):
3424         * platform/graphics/texmap/TextureMapperGL.h:
3425         (WebCore::BitmapTextureGL::textureSize):
3426
3427 2012-03-12  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
3428
3429         [TexMapGL] Use textures sized exactly to their contents.
3430         https://bugs.webkit.org/show_bug.cgi?id=80845