edb2ec830f9f4bd42de3dcad56392c49b4698d9e
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-25  Jochen Eisinger  <jochen@chromium.org>
2
3         Swap both the error and change event queue before processing fullscreen events
4         https://bugs.webkit.org/show_bug.cgi?id=113194
5
6         Reviewed by Jer Noble.
7
8         While processing the change events, not only new change events but
9         also new error events might get generated. However, for the timer, we
10         should only process preexisting events.
11
12         This is covered by fullscreen/full-screen-restrictions.html which times
13         out depending on the delay between requesting fullscreen and granting
14         fullscreen.
15
16         * dom/Document.cpp:
17         (WebCore::Document::fullScreenChangeDelayTimerFired):
18
19 2013-03-25  Marja Hölttä  <marja@chromium.org>
20
21         [V8] Generate specialized callbacks for the main world
22         https://bugs.webkit.org/show_bug.cgi?id=112430
23
24         Reviewed by Kentaro Hara.
25
26         The new specialized bindings will be faster, because they don't need to
27         do the "main world, isolated world or a worker" check, but can right
28         away assume that we're in the main world.
29
30         This patch generates main world bindings for getters and setters for a
31         small amount of frequently used functions / functions used by Dromaeo.
32
33         Added tests to TestObj.idl and updated bindings tests.
34
35         * bindings/scripts/CodeGeneratorV8.pm:
36         (GenerateOverloadedFunction):
37         (GenerateFunctionCallback):
38         (GenerateFunction):
39         (GenerateParametersCheck):
40         (GenerateSingleConstructorCallback):
41         (GenerateNonStandardFunction):
42         (GenerateImplementation):
43         (GenerateFunctionCallString):
44         * bindings/scripts/test/TestObj.idl:
45         * bindings/scripts/test/V8/V8Float64Array.cpp:
46         (WebCore):
47         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
48         (WebCore):
49         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
50         (WebCore):
51         * bindings/scripts/test/V8/V8TestInterface.cpp:
52         (WebCore):
53         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
54         (WebCore):
55         * bindings/scripts/test/V8/V8TestObj.cpp:
56         (WebCore::TestObjV8Internal::perWorldReadOnlyAttributeAttrGetter):
57         (TestObjV8Internal):
58         (WebCore::TestObjV8Internal::perWorldReadOnlyAttributeAttrGetterCallback):
59         (WebCore::TestObjV8Internal::perWorldReadOnlyAttributeAttrGetterForMainWorld):
60         (WebCore::TestObjV8Internal::perWorldReadOnlyAttributeAttrGetterCallbackForMainWorld):
61         (WebCore::TestObjV8Internal::perWorldAttributeAttrGetter):
62         (WebCore::TestObjV8Internal::perWorldAttributeAttrGetterCallback):
63         (WebCore::TestObjV8Internal::perWorldAttributeAttrGetterForMainWorld):
64         (WebCore::TestObjV8Internal::perWorldAttributeAttrGetterCallbackForMainWorld):
65         (WebCore::TestObjV8Internal::perWorldAttributeAttrSetter):
66         (WebCore::TestObjV8Internal::perWorldAttributeAttrSetterCallback):
67         (WebCore::TestObjV8Internal::perWorldAttributeAttrSetterForMainWorld):
68         (WebCore::TestObjV8Internal::perWorldAttributeAttrSetterCallbackForMainWorld):
69         (WebCore::TestObjV8Internal::perWorldMethodMethod):
70         (WebCore::TestObjV8Internal::perWorldMethodMethodForMainWorld):
71         (WebCore::TestObjV8Internal::perWorldMethodMethodCallback):
72         (WebCore::TestObjV8Internal::perWorldMethodMethodCallbackForMainWorld):
73         (WebCore::TestObjV8Internal::overloadedPerWorldMethod1Method):
74         (WebCore::TestObjV8Internal::overloadedPerWorldMethod1MethodForMainWorld):
75         (WebCore::TestObjV8Internal::overloadedPerWorldMethod2Method):
76         (WebCore::TestObjV8Internal::overloadedPerWorldMethod2MethodForMainWorld):
77         (WebCore::TestObjV8Internal::overloadedPerWorldMethodMethod):
78         (WebCore::TestObjV8Internal::overloadedPerWorldMethodMethodForMainWorld):
79         (WebCore::TestObjV8Internal::overloadedPerWorldMethodMethodCallback):
80         (WebCore::TestObjV8Internal::overloadedPerWorldMethodMethodCallbackForMainWorld):
81         (WebCore):
82         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
83         (WebCore):
84         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
85         (WebCore):
86         * bindings/v8/V8DOMConfiguration.cpp:
87         (WebCore::V8DOMConfiguration::batchConfigureCallbacks):
88         (WebCore::V8DOMConfiguration::configureTemplate):
89         * bindings/v8/V8DOMConfiguration.h:
90         (BatchedMethod):
91         (V8DOMConfiguration):
92         * dom/Document.idl:
93         * dom/Element.idl:
94         * dom/Node.idl:
95         * page/DOMWindow.idl:
96
97 2013-03-25  Daniel Cheng  <dcheng@chromium.org>
98
99         Don't allow drags to start after a mouse press that creates a context menu
100         https://bugs.webkit.org/show_bug.cgi?id=112079
101
102         Reviewed by Tony Chang.
103
104         This appears to be the intent of the original code anyway (the comments in the corresponding
105         context menu handlers indicate that they set m_mousePressed to false in order to suppress
106         drags from starting). Since exact platform behavior differs quite a bit in this area, this
107         will also make the behavior more consistent across different WebKit implementations.
108
109         Manually testable using context-menu-during-drag-selection.html.
110
111         * page/EventHandler.cpp:
112         (WebCore::EventHandler::handleMouseDraggedEvent):
113
114 2013-03-25  Vsevolod Vlasov  <vsevik@chromium.org>
115
116         Web Inspector: [Regression] Provisional breakpoints are not shown on reload.
117         https://bugs.webkit.org/show_bug.cgi?id=113210
118
119         Reviewed by Pavel Feldman.
120
121         * inspector/front-end/BreakpointManager.js:
122         (WebInspector.BreakpointManager.prototype._restoreBreakpoints):
123         (WebInspector.BreakpointManager.prototype._projectWillReset.get for):
124         (WebInspector.BreakpointManager.prototype._projectWillReset):
125         (WebInspector.BreakpointManager.prototype._breakpointResolved):
126         * inspector/front-end/utilities.js:
127
128 2013-03-25  Sergey Ryazanov  <serya@chromium.org>
129
130         Web Inspector: Remove console warnings for *_ prefixed CSS styles
131         https://bugs.webkit.org/show_bug.cgi?id=113175
132
133         Reviewed by Pavel Feldman.
134
135         Added separate error message for syntax CSS error in declaration list when no property detected.
136         Added filter for messages starting with '*'.
137
138         * css/CSSGrammar.y.in:
139
140 2013-03-25  Alexis Hetu  <sugoi@chromium.org>
141
142         Integration of the Skia displacement mapping into WebKit
143         https://bugs.webkit.org/show_bug.cgi?id=112927
144
145         Reviewed by Stephen White.
146
147         Added displacement mapping to effect-reference.html and
148         effect-reference-hw.html
149
150         * WebCore.gypi:
151         * platform/graphics/filters/FEDisplacementMap.h:
152         (FEDisplacementMap):
153         Adding Skia specific declarations
154         * platform/graphics/filters/skia/FEDisplacementMapSkia.cpp: Added.
155         (WebCore):
156         (WebCore::toSkiaMode):
157         Provides conversion between the WebKit displacement mapping mode and
158         the Skia displacement mapping mode
159         (WebCore::FEDisplacementMap::platformApplySkia):
160         Displacement through the Skia API. (Accelerated only for now)
161         (WebCore::FEDisplacementMap::createImageFilter):
162         Displacement image filter creation through the Skia API.
163
164 2013-03-25  Vladislav Kaznacheev  <kaznacheev@chromium.org>
165
166         Web Inspector: Graduate some new Inspector APIs to public
167         https://bugs.webkit.org/show_bug.cgi?id=113176
168
169         Reviewed by Pavel Feldman.
170
171         Summary of changes:
172             DOM.highlightNode.nodeId: required parameter is now optional
173             Input: domain has been added
174             Runtime.enable: command has been added
175             Runtime.executionContextCreated: event has been added
176             Page.clearGeolocationOverride: command has been added
177             Page.setGeolocationOverride: command has been added
178             Page.captureScreenshot: command has been added
179             Debugger.setBreakpointByUrl.locations: optional response parameter is now required
180
181
182         * inspector/Inspector.json:
183
184 2013-03-25  Andrey Kosyakov  <caseq@chromium.org>
185
186         Web Inspector: [Timeline] set glue records mode off by default
187         https://bugs.webkit.org/show_bug.cgi?id=113189
188
189         Reviewed by Pavel Feldman.
190
191         * inspector/front-end/TimelinePanel.js: /glueRecordsSetting/s/true/false/
192
193 2013-03-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
194
195         [EFL] Fix build break when media source is enabled
196         https://bugs.webkit.org/show_bug.cgi?id=113143
197
198         Unreviewed. Build error needs to be fixed in order to start to implement
199         media source functionality.
200
201         * CMakeLists.txt:
202         * platform/efl/MIMETypeRegistryEfl.cpp:
203         (WebCore):
204         (WebCore::MIMETypeRegistry::isSupportedMediaSourceMIMEType):
205         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
206         (WebCore):
207         (WebCore::MediaPlayerPrivateGStreamer::load):
208         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
209         (MediaPlayerPrivateGStreamer):
210
211 2013-03-25  Vsevolod Vlasov  <vsevik@chromium.org>
212
213         Web Inspector: Toggling breakpoint with shortcut should be freezed as well while editing.
214         https://bugs.webkit.org/show_bug.cgi?id=113188
215
216         Reviewed by Pavel Feldman.
217
218         * inspector/front-end/JavaScriptSourceFrame.js:
219         (WebInspector.JavaScriptSourceFrame.prototype.toggleBreakpointOnCurrentLine):
220
221 2013-03-25  Vsevolod Vlasov  <vsevik@chromium.org>
222
223         Web Inspector: Remove unneeded code from JavaScriptSourceFrame.
224         https://bugs.webkit.org/show_bug.cgi?id=113182
225
226         Reviewed by Pavel Feldman.
227
228         * inspector/front-end/JavaScriptSourceFrame.js:
229         (WebInspector.JavaScriptSourceFrame):
230
231 2013-03-25  Alexei Filippov  <alph@chromium.org>
232
233         Web Inspector: Fonts refactoring
234         https://bugs.webkit.org/show_bug.cgi?id=113047
235
236         Reviewed by Pavel Feldman.
237
238         Unify fonts usage across inspector.
239         Make inspector default font depend on platform.
240
241         * inspector/front-end/dataGrid.css:
242         (.data-grid table):
243         (.data-grid td):
244         * inspector/front-end/inspector.css:
245         (.toolbar-label):
246         (body.show-toolbar-icons .toolbar-label):
247         (.console-message .bubble):
248         (li .status .bubble):
249         (.source-frame-breakpoint-message):
250         (.soft-context-menu):
251         * inspector/front-end/inspectorCommon.css:
252         (body):
253         * inspector/front-end/networkLogView.css:
254         (.network-log-grid.data-grid td):
255         (.network-log-grid.data-grid.small td):
256         * inspector/front-end/tabbedPane.css:
257         (.tabbed-pane-header-tab):
258         (select.tabbed-pane-header-tabs-drop-down-select):
259         * inspector/front-end/timelinePanel.css:
260         (.memory-counter-value):
261
262 2013-03-25  Vladislav Kaznacheev  <kaznacheev@chromium.org>
263
264         Web Inspector: Use generate-inspector-protocol-version to list valid public API changes
265         https://bugs.webkit.org/show_bug.cgi?id=113148
266
267         Added --show-changes command line option.
268         Used existing compare_schemas method to do a reverse compare.
269         Fixed a number of small problems (missing domain name in the message,
270         incorrect error messages for command parameters).
271
272         Reviewed by Pavel Feldman.
273
274         * inspector/generate-inspector-protocol-version:
275         (named_list_to_map):
276         (removed):
277         (required):
278         (compare_schemas):
279         (compare_domains):
280         (compare_commands):
281         (compare_events):
282         (compare_params_list):
283         (compare_types):
284         (self_test):
285         (self_test.create_test_schema_1):
286         (self_test.create_test_schema_2):
287         (self_test.is_subset):
288         (self_test.errors_match):
289         (main):
290
291 2013-03-25  Alec Flett  <alecflett@chromium.org>
292
293         Support Quota API in Workers
294         https://bugs.webkit.org/show_bug.cgi?id=112972
295
296         Reviewed by Adam Barth.
297
298         Tests: fast/workers/shared-worker-storagequota-query-usage.html
299                fast/workers/worker-storagequota-query-usage.html
300
301         * Modules/quota/WorkerNavigatorStorageQuota.cpp: Added.
302         * Modules/quota/WorkerNavigatorStorageQuota.h: Added.
303         * Modules/quota/WorkerNavigatorStorageQuota.idl: Added.
304         * WebCore.gypi: Add entries for WorkerNavigatorStorageQuota.
305         * page/WorkerNavigator.h: Add a Navigator supplement that extends the worker navigator.
306
307 2013-03-25  Mike West  <mkwst@chromium.org>
308
309         CSP 1.1: Rename SecurityPolicyViolationEvent::sourceURL to ::sourceFile.
310         https://bugs.webkit.org/show_bug.cgi?id=113033
311
312         Reviewed by Jochen Eisinger.
313
314         Bringing our experimental implementation into line with the spec, which
315         has landed on the de facto standard name Gecko has been sending out for
316         years and years.
317
318         Spec: https://dvcs.w3.org/hg/content-security-policy/rev/e44f4003e158
319         Thread: http://lists.w3.org/Archives/Public/public-webappsec/2013Mar/0087.html
320
321         * dom/SecurityPolicyViolationEvent.h:
322         (SecurityPolicyViolationEventInit):
323         (WebCore::SecurityPolicyViolationEvent::sourceFile):
324         (WebCore::SecurityPolicyViolationEvent::SecurityPolicyViolationEvent):
325         (SecurityPolicyViolationEvent):
326         * dom/SecurityPolicyViolationEvent.idl:
327         * page/ContentSecurityPolicy.cpp:
328         (WebCore::gatherSecurityPolicyViolationEventData):
329             s/sourceURL/sourceFile/
330
331 2013-03-25  Michelangelo De Simone  <michelangelo@webkit.org>
332
333         [CSS Filters] Using negative drop-shadow radius values has slow performance
334         https://bugs.webkit.org/show_bug.cgi?id=107848
335
336         Setting negative blur radius values in drop-shadow() and box-shadow() led to
337         significant rendering performance loss. The invalid value overflowed and the
338         embedder became unresponsive for few seconds.
339         This impacted SVG too (SVGFEDropShadow and SVGFEGaussianBlur).
340
341         Reviewed by Dirk Schulze.
342
343         Tests: css3/filters/effect-drop-shadow-negative-radius.html
344                fast/box-shadow/box-shadow-parsing-invalid.html
345                svg/filters/feDropShadow-negative-deviation-expected.svg
346                svg/filters/feDropShadow-negative-deviation.svg
347                svg/filters/feDropShadow-zero-deviation.svg
348                svg/filters/feGaussianBlur-negative-deviation-expected.svg
349                svg/filters/feGaussianBlur-negative-deviation.svg
350                svg/filters/feGaussianBlur-zero-deviation.svg
351
352         * css/CSSParser.cpp:
353         (WebCore::CSSParser::parseShadow): Negative values are skipped during parsing: as per
354         CSS Background and Borders specs, negative values shall not be allowed.
355         * platform/graphics/filters/FEGaussianBlur.cpp:
356         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize): Added "non-negative" assertion for
357         negative deviations.
358         * svg/SVGFEDropShadowElement.cpp:
359         (WebCore::SVGFEDropShadowElement::build): If a negative standard deviation is encountered, don't
360         build the filter and returns earlier, this avoids unnecessary calls: FEGaussianBlur is not being
361         created with wrong and potentially overflowing values.
362         * svg/SVGFEGaussianBlurElement.cpp:
363         (WebCore::SVGFEGaussianBlurElement::build): Ditto.
364
365 2013-03-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
366
367         [Qt] REGRESSION(r146630): 8 text related test asserts on debug builds
368         https://bugs.webkit.org/show_bug.cgi?id=113179
369
370         Reviewed by Jocelyn Turcotte.
371
372         Test if range.start is within the valid range before testing the value at that point.
373
374         * platform/graphics/qt/FontQt.cpp:
375         (WebCore::Font::initFormatForTextLayout):
376
377 2013-03-25  Alexander Pavlov  <apavlov@chromium.org>
378
379         Web Inspector: Properly handle the rule addition to an XML or SVG document.
380         https://bugs.webkit.org/show_bug.cgi?id=113185
381
382         Reviewed by Pavel Feldman.
383
384         * inspector/InspectorCSSAgent.cpp:
385         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
386
387 2013-03-25  Peter Rybin  <prybin@chromium.org>
388
389         Web Inspector: support changing local variables in frontend
390         https://bugs.webkit.org/show_bug.cgi?id=112470
391
392         Reviewed by Yury Semikhatsky.
393
394         ScopeRef type is added to RemoteObject and setPropertyValue is patched accordingly.
395
396         Test: inspector/debugger/debugger-change-variable.html
397
398         * inspector/front-end/DebuggerModel.js:
399         (WebInspector.DebuggerModel.CallFrame.prototype.get id):
400         * inspector/front-end/ObjectPropertiesSection.js:
401         (WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate.didGetDetails):
402         (WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate):
403         * inspector/front-end/RemoteObject.js:
404         (WebInspector.RemoteObject):
405         (WebInspector.RemoteObject.fromScopePayload):
406         (WebInspector.RemoteObject.prototype.):
407         (WebInspector.RemoteObject.prototype.setPropertyValue):
408         (WebInspector.RemoteObject.prototype.setVariableValueCallback):
409         (WebInspector.RemoteObject.prototype._setDeclarativeVariableValue):
410         (WebInspector.ScopeRef):
411         * inspector/front-end/ScopeChainSidebarPane.js:
412         (WebInspector.ScopeChainSidebarPane.prototype.update):
413
414 2013-03-25  Mike West  <mkwst@chromium.org>
415
416         CSP 1.1: Strip URLs in SecurityPolicyViolationEvents, just as we do for POSTed violation reports.
417         https://bugs.webkit.org/show_bug.cgi?id=113039
418
419         Reviewed by Jochen Eisinger.
420
421         I'd originally assumed that we didn't need to be quite so careful when
422         handing URLs to JavaScript via SecurityPolicyViolationEvents. This was
423         a mistake. Cross-origin URLs aren't accessible to JavaScript currently
424         and there's no reason that we should begin exposing them via an event.
425
426         This patch extracts the stripping logic from the existing reports into
427         stripURLForUseInReport(), and uses that new method when populating the
428         event and report objects.
429
430         Relatedly, we were doing the wrong thing with 'file:' URLs, which this
431         patch made clear. Now they're treated the same as 'data:' et al.
432
433         Spec: https://dvcs.w3.org/hg/content-security-policy/rev/45f6ccaba0ef
434
435         Tests: http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image-from-script.html
436                http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image.html
437                http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-from-script.html
438                http/tests/security/contentSecurityPolicy/report-blocked-file-uri.html
439
440         * page/ContentSecurityPolicy.cpp:
441         (WebCore::stripURLForUseInReport):
442             Extract the logic from blockedURI out into a reusable method:
443             cross-origin URLs are stripped down to the ASCII serialization of
444             their origin, and non-heirarchical (and 'file:') URLs are stripped
445             down to the ASCII serialization of their protocol.
446         (WebCore::gatherSecurityPolicyViolationEventData):
447         (WebCore::ContentSecurityPolicy::reportViolation):
448             Use ::stripURLForUseInReport for blockedURL and sourceFile
449             attributes in these two methods.
450
451 2013-03-25  Eugene Klyuchnikov  <eustas@chromium.org>
452
453         Web Inspector: Fix JSDocs.
454         https://bugs.webkit.org/show_bug.cgi?id=113025
455
456         Reviewed by Pavel Feldman.
457
458         Next version of JS compiler finds more inconsistencies
459         and ambiguous declarations.
460         Some of them are resolved in this patch.
461
462         * inspector/InjectedScriptSource.js: Fix JSDocs.
463         * inspector/front-end/ConsoleModel.js: Ditto.
464         * inspector/front-end/CookieParser.js: Ditto.
465         * inspector/front-end/FileContentView.js: Ditto.
466         * inspector/front-end/HeapSnapshotView.js: Ditto.
467         * inspector/front-end/IndexedDBModel.js: Ditto.
468         * inspector/front-end/ProfilesPanelDescriptor.js: Ditto.
469         * inspector/front-end/utilities.js: Ditto.
470
471 2013-03-25  Mike West  <mkwst@chromium.org>
472
473         Cleanup: Tiny nits in ContentSecurityPolicy::reportViolation.
474         https://bugs.webkit.org/show_bug.cgi?id=112784
475
476         Reviewed by Jochen Eisinger.
477
478         Just cleanup of three tiny nits I ran across in
479         ContentSecurityPolicy::reportViolation while doing other work.
480
481         - 'directiveText' and 'effectiveDirective' can't be empty; we pass in
482           values at every callsite. We can safely remove the 'isEmpty()' checks.
483           Moreover, even if they could possibly somehow be empty, we should
484           still include those empty strings in the report, rather than
485           dropping the values entirely.
486
487         - We don't need to hold 'document->referrer()' in a temp variable.
488
489         * page/ContentSecurityPolicy.cpp:
490         (WebCore::ContentSecurityPolicy::reportViolation):
491
492 2013-03-25  Eugene Klyuchnikov  <eustas@chromium.org>
493
494         Web Inspector: [Overview] Make "drag-to-move" feature more discoverable.
495         https://bugs.webkit.org/show_bug.cgi?id=113032
496
497         Reviewed by Pavel Feldman.
498
499         To move overview window user could drag-n-drop over
500         time "ribbon" on OverviewGrid.
501
502         This feature is hard to discover.
503
504         Setting "move" cursor will make this feature more discoverable.
505
506         * inspector/front-end/inspectorCommon.css:
507         Set "move" cursor to draggable area.
508         * inspector/front-end/OverviewGrid.js: Ditto.
509
510 2013-03-25  Eugene Klyuchnikov  <eustas@chromium.org>
511
512         Web Inspector: [Profiles] Remove unused private member.
513         https://bugs.webkit.org/show_bug.cgi?id=113015
514
515         Reviewed by Pavel Feldman.
516
517         _profileGroupsForLinks is not used anymore.
518
519         * inspector/front-end/ProfilesPanel.js:
520         (WebInspector.ProfilesPanel.prototype._reset): Removed unused member.
521
522 2013-03-25  PhistucK  <phistuck@chromium.org>
523
524         Web Inspector: Exception when turning on pretty print without any displayed source in the editor
525         https://bugs.webkit.org/show_bug.cgi?id=113136
526
527         Reviewed by Vsevolod Vlasov.
528
529         No new tests.
530         Added a check for the existence of currently edited document.
531
532         * inspector/ScriptsPanel.js:
533         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
534
535 2013-03-25  Mihnea Ovidenie  <mihnea@adobe.com>
536
537         [CSSRegions] Remove RenderRegion::printRegionObjectsStyles
538         https://bugs.webkit.org/show_bug.cgi?id=113081
539
540         Reviewed by Tony Chang.
541
542         No change in functionality, remove unused function..
543
544         * rendering/RenderRegion.h:
545
546 2013-03-25  Hurnjoo Lee  <hurnjoo.lee@samsung.com>
547
548         [Texmap] Memory leak when closing a tab
549         https://bugs.webkit.org/show_bug.cgi?id=112127
550
551         Reviewed by Noam Rosenthal.
552
553         When closing a tab, if there are any updates pending in CoordinatedGraphicsScene's
554         render queue, the scene is not freed because reference count of m_scene is not zero.
555
556         No new tests.
557
558         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
559         (WebCore::CoordinatedGraphicsScene::detach): When bind updates in CoordinatedGraphicsScene,
560         the reference count of m_scene is increasing, if m_renderQueue is not empty
561         before closing tab, then m_scene is never freed.
562         Hence, when closing tab, need to clear m_renderQueue explicitly in order to
563         destroy m_scene.
564
565 2013-03-25  Keishi Hattori  <keishi@webkit.org>
566
567         Clear button visibility is not updated when restoring form state
568         https://bugs.webkit.org/show_bug.cgi?id=113172
569
570         Clear button wasn't showing up when restoring form state.
571
572         Reviewed by Kent Tamura.
573
574         Tests: fast/forms/date-multiple-fields/date-multiple-fields-clearbutton-visibility-after-restore.html
575                fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-clearbutton-visibility-after-restore.html
576                fast/forms/month-multiple-fields/month-multiple-fields-clearbutton-visibility-after-restore.html
577                fast/forms/time-multiple-fields/time-multiple-fields-clearbutton-visibility-after-restore.html
578                fast/forms/week-multiple-fields/week-multiple-fields-clearbutton-visibility-after-restore.html
579
580         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
581         (WebCore::BaseMultipleFieldsDateAndTimeInputType::restoreFormControlState):
582
583 2013-03-25  Eugene Klyuchnikov  <eustas@chromium.org>
584
585         Web Inspector: [Settings] Use registry to track settings objects.
586         https://bugs.webkit.org/show_bug.cgi?id=113008
587
588         Reviewed by Pavel Feldman.
589
590         Currently .createSetting creates new instance any time it is invoked.
591         When one instance saves value, the other instance do not know about it.
592
593         To resolve this issue we can use registry to make .createSetting return
594         same object for specific key.
595
596         * inspector/front-end/Settings.js:
597         (WebInspector.Settings.prototype.createSetting): Use registry.
598
599 2013-03-24  Matt Falkenhagen  <falken@chromium.org>
600
601         Refactoring: Pull Node::disabled() and Node::isInert() down to Element.
602         https://bugs.webkit.org/show_bug.cgi?id=112085
603
604         Reviewed by Hajime Morrita.
605
606         Node is too low a level for these methods. The plan is to rename
607         Element::disabled to isDisabledFormControl and to remove
608         Element::isEnabledFormControl.
609
610         No new tests, just refactoring.
611
612         * dom/Element.cpp:
613         (WebCore::Element::disabled):
614         (WebCore):
615         (WebCore::Element::isInert):
616         * dom/Element.h:
617         (Element):
618         * dom/EventDispatcher.cpp:
619         (WebCore::EventDispatcher::dispatchSimulatedClick):
620         * dom/GestureEvent.cpp:
621         (WebCore::GestureEventDispatchMediator::dispatchEvent):
622         * dom/MouseEvent.cpp:
623         (WebCore::MouseEventDispatchMediator::dispatchEvent):
624         * dom/Node.cpp:
625         (WebCore::Node::handleLocalEvents):
626         (WebCore::Node::willRespondToMouseMoveEvents):
627         (WebCore::Node::willRespondToMouseClickEvents):
628         (WebCore::Node::willRespondToTouchEvents):
629         * dom/Node.h:
630         (Node):
631
632 2013-03-24  Alpha Lam  <hclam@chromium.org>
633
634         GIFImageReader should reports parsing error to client
635         https://bugs.webkit.org/show_bug.cgi?id=113141
636
637         Reviewed by Stephen White.
638
639         GIFImageReader nows reports parsing error to client (GIFImageDecoder) such that errors can be handled.
640         In the case of corrupted GIF images GIFImageReader will be deleted and decoding will fail.
641
642         Unit test is updated to reflect change in behavior.
643         Tested with a local corpus which showed better handling of corrupted GIF images.
644
645         * platform/image-decoders/gif/GIFImageReader.cpp:
646         (GIFImageReader::decode):
647
648 2013-03-24  KondapallyKalyan  <kalyan.kondapally@intel.com>
649
650         [EFL] Add support to check for current Drawable.
651         https://bugs.webkit.org/show_bug.cgi?id=113103
652
653         Reviewed by Kenneth Rohde Christiansen.
654
655         Covered by existing WebGL tests.
656
657         In MakeCurrent we do an early return if it is
658         the current GL context but ignore Surface. This
659         patch fixes the issue, we now check for both
660         context and surface before doing an early return
661         in MakeCurrent.
662
663         * platform/graphics/opengl/GLPlatformContext.cpp:
664         (WebCore::GLPlatformContext::makeCurrent):
665         (WebCore::GLPlatformContext::releaseCurrent):
666         (WebCore::GLPlatformContext::destroy):
667         * platform/graphics/opengl/GLPlatformSurface.cpp:
668         (WebCore):
669         (WebCore::GLPlatformSurface::isCurrentDrawable):
670         (WebCore::GLPlatformSurface::onMakeCurrent):
671         * platform/graphics/opengl/GLPlatformSurface.h:
672
673 2013-03-24  David Kilzer  <ddkilzer@apple.com>
674
675         BUILD FIX (r146704): Settings::setHiddenPageDOMTimerThrottlingEnabled() isn't always built
676         <http://webkit.org/b/112308>
677
678         * WebCore.exp.in: Export
679         Settings::setHiddenPageDOMTimerThrottlingEnabled()
680         conditionally based on ENABLE(HIDDEN_PAGE_DOM_TIMER_THROTTLING).
681
682 2013-03-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
683
684         [EFL] NetworkStateNotifier::updateState() is called too often
685         https://bugs.webkit.org/show_bug.cgi?id=113152
686
687         Reviewed by Kenneth Rohde Christiansen.
688
689         Wait until we have read all the data on the Netlink socket before
690         reporting a possible network interface change. This way, we make
691         sure we don't call NetworkStateNotifier::updateState() several
692         times in a row for no reason.
693
694         We also call NetworkStateNotifier::updateState() only if we get a
695         RTM_NEWADDR event and we are currently offline, or if we get a
696         RTM_DELADDR and we are currently online. This avoids calling
697         NetworkStateNotifier::updateState() uselessly as there is no way
698         the online state can change otherwise.
699
700         No new tests, no behavior change for layout tests.
701
702         * platform/network/efl/NetworkStateNotifierEfl.cpp:
703         (WebCore::NetworkStateNotifier::readSocketCallback):
704
705 2013-03-24  Chris Fleizach  <cfleizach@apple.com>
706
707         AX: Crash in WebCore::AccessibilitySpinButton::incrementButton()
708         https://bugs.webkit.org/show_bug.cgi?id=111582
709
710         Reviewed by Tim Horton.
711
712         There are two ways to create a spin button: from a textfield counter or from ARIA.
713         If an ARIA spin button is created, it was returning true for isSpinButton, so we were 
714         casting to the other kind of spin button, leading to a crash.
715
716         We need to be more specific about our class types.
717
718         Test: platform/mac/accessibility/aria-spinbutton-crash.html
719
720         * accessibility/AccessibilityObject.h:
721         (WebCore::AccessibilityObject::isNativeSpinButton):
722         * accessibility/AccessibilitySpinButton.h:
723         (WebCore::AccessibilitySpinButton::isNativeSpinButton):
724         (WebCore::toAccessibilitySpinButton):
725         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
726         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
727
728 2013-03-24  Chris Fleizach  <cfleizach@apple.com>
729
730         AXObjectCache gets recreated during document tear-down.
731         https://bugs.webkit.org/show_bug.cgi?id=112525
732
733         Reviewed by Simon Fraser.
734
735         In many cases, a document's AXObjectCache was being created after the
736         document had detached, which is wasteful and could potentially lead to
737         crashes because the AXObjectCache has a timer and relies on its document
738         to exist.
739
740         This patch provides a way to get the existing AX object cache, instead of
741         always creating a new one.
742         It moves the accessibilityEnabled() checks into the axObjectCache retrieval
743         for easier readability.
744         It adds a number of ASSERTs to vieryf that only the correct (top) document is used
745         for cache manipulation.
746
747         * accessibility/AXObjectCache.cpp:
748         (WebCore::AXObjectCache::stopCachingComputedObjectAttributes):
749         * dom/ContainerNode.cpp:
750         (WebCore::ContainerNode::~ContainerNode):
751         * dom/Document.cpp:
752         (WebCore::Document::~Document):
753         (WebCore::Document::clearAXObjectCache):
754         (WebCore::Document::existingAXObjectCache):
755         (WebCore::Document::axObjectCache):
756         (WebCore::Document::setFocusedNode):
757         * dom/Document.h:
758         (Document):
759         * dom/Element.cpp:
760         (WebCore::Element::attributeChanged):
761         * dom/Node.cpp:
762         (WebCore::Node::~Node):
763         (WebCore::Node::isEditableToAccessibility):
764         (WebCore::Node::attach):
765         (WebCore::Node::rootEditableElement):
766         (WebCore::Node::didMoveToNewDocument):
767         * editing/AppendNodeCommand.cpp:
768         (WebCore::sendAXTextChangedIgnoringLineBreaks):
769         * editing/DeleteFromTextNodeCommand.cpp:
770         (WebCore::DeleteFromTextNodeCommand::doApply):
771         (WebCore::DeleteFromTextNodeCommand::doUnapply):
772         * editing/Editor.cpp:
773         (WebCore::Editor::respondToChangedContents):
774         (WebCore::Editor::markAndReplaceFor):
775         * editing/InsertIntoTextNodeCommand.cpp:
776         (WebCore::InsertIntoTextNodeCommand::doApply):
777         (WebCore::InsertIntoTextNodeCommand::doUnapply):
778         * editing/InsertNodeBeforeCommand.cpp:
779         (WebCore::InsertNodeBeforeCommand::doApply):
780         (WebCore::InsertNodeBeforeCommand::doUnapply):
781         * editing/atk/FrameSelectionAtk.cpp:
782         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
783         * editing/chromium/FrameSelectionChromium.cpp:
784         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
785         * editing/mac/FrameSelectionMac.mm:
786         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
787         * html/HTMLInputElement.cpp:
788         (WebCore::HTMLInputElement::setChecked):
789         * html/HTMLSelectElement.cpp:
790         (WebCore::HTMLSelectElement::optionElementChildrenChanged):
791         (WebCore::HTMLSelectElement::setRecalcListItems):
792         * html/HTMLTextFormControlElement.cpp:
793         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
794         * html/InputType.cpp:
795         (WebCore::InputType::applyStep):
796         * html/RangeInputType.cpp:
797         (WebCore::RangeInputType::handleKeydownEvent):
798         * loader/FrameLoader.cpp:
799         (WebCore::FrameLoader::prepareForLoadStart):
800         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
801         * page/FocusController.cpp:
802         (WebCore::FocusController::setInitialFocus):
803         * page/Frame.cpp:
804         (WebCore::Frame::disconnectOwnerElement):
805         * page/FrameView.cpp:
806         (WebCore::FrameView::removeFromAXObjectCache):
807         (WebCore::FrameView::layout):
808         (WebCore::FrameView::scrollToAnchor):
809         (WebCore::FrameView::axObjectCache):
810         * platform/ScrollView.cpp:
811         (WebCore::ScrollView::setHasHorizontalScrollbar):
812         (WebCore::ScrollView::setHasVerticalScrollbar):
813         * platform/Scrollbar.cpp:
814         (WebCore::Scrollbar::~Scrollbar):
815         (WebCore):
816         (WebCore::Scrollbar::existingAXObjectCache):
817         * platform/Scrollbar.h:
818         (Scrollbar):
819         * rendering/RenderBlock.cpp:
820         (WebCore::RenderBlock::deleteLineBoxTree):
821         (WebCore::RenderBlock::createRootInlineBox):
822         (WebCore::RenderBlock::createAndAppendRootInlineBox):
823         * rendering/RenderListBox.cpp:
824         (WebCore::RenderListBox::selectionChanged):
825         * rendering/RenderMenuList.cpp:
826         (WebCore::RenderMenuList::addChild):
827         (WebCore::RenderMenuList::didUpdateActiveOption):
828         * rendering/RenderObject.cpp:
829         (WebCore::RenderObject::styleWillChange):
830         (WebCore::RenderObject::willBeDestroyed):
831         * rendering/RenderObjectChildList.cpp:
832         (WebCore::RenderObjectChildList::removeChildNode):
833         (WebCore::RenderObjectChildList::insertChildNode):
834         * rendering/RenderText.cpp:
835         (WebCore::RenderText::setText):
836         * rendering/RenderWidget.cpp:
837         (WebCore::RenderWidget::willBeDestroyed):
838
839 2013-03-23  Mike West  <mkwst@chromium.org>
840
841         Drop full URLs from cross-origin access errors caused by sandboxing.
842         https://bugs.webkit.org/show_bug.cgi?id=113029
843
844         Reviewed by Timothy Hatcher.
845
846         Following up on http://wkbug.com/112042, this patch brings cross-origin
847         access error messages into line with the newly origin-only default
848         message, and changes the error message text to explicitly refer to the
849         missing 'allow-same-origin' sandbox flag that's the root cause of the
850         error.
851
852         * page/DOMWindow.cpp:
853         (WebCore::DOMWindow::crossDomainAccessErrorMessage):
854             Note that we're using the origin of the frames' URLs rather than
855             their actual origin in these messages. This seems like a reasonable
856             thing to do, since we know that at least one of the two origins will
857             be "null" in this scenario.
858
859 2013-03-23  Dominic Mazzoni  <dmazzoni@google.com>
860
861         Implement Web Speech Synthesis for Chromium
862         https://bugs.webkit.org/show_bug.cgi?id=111695
863
864         Reviewed by Adam Barth.
865
866         Straightforward implementation of speech synthesis
867         for Chromium by exposing interfaces for the platform
868         to implement.
869
870         * Modules/speech/SpeechSynthesis.cpp:
871         (WebCore::SpeechSynthesis::boundaryEventOccurred):
872         (WebCore::SpeechSynthesis::didStartSpeaking):
873         (WebCore::SpeechSynthesis::didPauseSpeaking):
874         (WebCore::SpeechSynthesis::didResumeSpeaking):
875         (WebCore::SpeechSynthesis::didFinishSpeaking):
876         (WebCore::SpeechSynthesis::speakingErrorOccurred):
877         (WebCore):
878         * Modules/speech/SpeechSynthesis.h:
879         (SpeechSynthesis):
880         * Modules/speech/SpeechSynthesisUtterance.cpp:
881         (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
882         (WebCore):
883         (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
884         (WebCore::SpeechSynthesisUtterance::setVoice):
885         * Modules/speech/SpeechSynthesisUtterance.h:
886         (SpeechSynthesisUtterance):
887         (WebCore::SpeechSynthesisUtterance::text):
888         (WebCore::SpeechSynthesisUtterance::setText):
889         (WebCore::SpeechSynthesisUtterance::lang):
890         (WebCore::SpeechSynthesisUtterance::setLang):
891         (WebCore::SpeechSynthesisUtterance::volume):
892         (WebCore::SpeechSynthesisUtterance::setVolume):
893         (WebCore::SpeechSynthesisUtterance::rate):
894         (WebCore::SpeechSynthesisUtterance::setRate):
895         (WebCore::SpeechSynthesisUtterance::pitch):
896         (WebCore::SpeechSynthesisUtterance::setPitch):
897         (WebCore::SpeechSynthesisUtterance::startTime):
898         (WebCore::SpeechSynthesisUtterance::setStartTime):
899         (WebCore::SpeechSynthesisUtterance::platformUtterance):
900         * Modules/speech/SpeechSynthesisVoice.h:
901         (WebCore::SpeechSynthesisVoice::~SpeechSynthesisVoice):
902         * WebCore.exp.in:
903         * WebCore.gypi:
904         * platform/PlatformSpeechSynthesis.h:
905         (PlatformSpeechSynthesis):
906         * platform/PlatformSpeechSynthesisUtterance.cpp:
907         (WebCore):
908         (WebCore::PlatformSpeechSynthesisUtterance::create):
909         * platform/PlatformSpeechSynthesisUtterance.h:
910         (PlatformSpeechSynthesisUtterance):
911         (WebCore::PlatformSpeechSynthesisUtterance::setClient):
912         * platform/PlatformSpeechSynthesisVoice.cpp:
913         (WebCore):
914         (WebCore::PlatformSpeechSynthesisVoice::create):
915         (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
916         * platform/PlatformSpeechSynthesisVoice.h:
917         (PlatformSpeechSynthesisVoice):
918         (WebCore::PlatformSpeechSynthesisVoice::setVoiceURI):
919         (WebCore::PlatformSpeechSynthesisVoice::setName):
920         (WebCore::PlatformSpeechSynthesisVoice::setLang):
921         (WebCore::PlatformSpeechSynthesisVoice::setLocalService):
922         (WebCore::PlatformSpeechSynthesisVoice::setIsDefault):
923         * platform/PlatformSpeechSynthesizer.cpp:
924         (WebCore::PlatformSpeechSynthesizer::create):
925         (WebCore::PlatformSpeechSynthesizer::setVoiceList):
926         (WebCore):
927         * platform/PlatformSpeechSynthesizer.h:
928         (WebKit):
929         (PlatformSpeechSynthesizerClient):
930         (PlatformSpeechSynthesizer):
931         * platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Added.
932         (WebCore):
933         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
934         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
935         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
936         (WebCore::PlatformSpeechSynthesizer::speak):
937         (WebCore::PlatformSpeechSynthesizer::pause):
938         (WebCore::PlatformSpeechSynthesizer::resume):
939         (WebCore::PlatformSpeechSynthesizer::cancel):
940         * platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Added.
941         (WebKit):
942         (WebKit::WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance):
943         (WebKit::WebSpeechSynthesisUtterance::operator=):
944         (WebKit::WebSpeechSynthesisUtterance::assign):
945         (WebKit::WebSpeechSynthesisUtterance::reset):
946         (WebKit::WebSpeechSynthesisUtterance::operator PassRefPtr<PlatformSpeechSynthesisUtterance>):
947         (WebKit::WebSpeechSynthesisUtterance::operator PlatformSpeechSynthesisUtterance*):
948         (WebKit::WebSpeechSynthesisUtterance::text):
949         (WebKit::WebSpeechSynthesisUtterance::lang):
950         (WebKit::WebSpeechSynthesisUtterance::voice):
951         (WebKit::WebSpeechSynthesisUtterance::volume):
952         (WebKit::WebSpeechSynthesisUtterance::rate):
953         (WebKit::WebSpeechSynthesisUtterance::pitch):
954         (WebKit::WebSpeechSynthesisUtterance::startTime):
955         * platform/chromium/support/WebSpeechSynthesisVoice.cpp: Added.
956         (WebKit):
957         (WebKit::WebSpeechSynthesisVoice::assign):
958         (WebKit::WebSpeechSynthesisVoice::reset):
959         (WebKit::WebSpeechSynthesisVoice::setVoiceURI):
960         (WebKit::WebSpeechSynthesisVoice::setName):
961         (WebKit::WebSpeechSynthesisVoice::setLanguage):
962         (WebKit::WebSpeechSynthesisVoice::setIsLocalService):
963         (WebKit::WebSpeechSynthesisVoice::setIsDefault):
964         (WebKit::WebSpeechSynthesisVoice::operator PassRefPtr<WebCore::PlatformSpeechSynthesisVoice>):
965         * platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Added.
966         (WebCore):
967         (WebCore::WebSpeechSynthesizerClientImpl::WebSpeechSynthesizerClientImpl):
968         (WebCore::WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl):
969         (WebCore::WebSpeechSynthesizerClientImpl::setVoiceList):
970         (WebCore::WebSpeechSynthesizerClientImpl::didStartSpeaking):
971         (WebCore::WebSpeechSynthesizerClientImpl::didFinishSpeaking):
972         (WebCore::WebSpeechSynthesizerClientImpl::didPauseSpeaking):
973         (WebCore::WebSpeechSynthesizerClientImpl::didResumeSpeaking):
974         (WebCore::WebSpeechSynthesizerClientImpl::speakingErrorOccurred):
975         (WebCore::WebSpeechSynthesizerClientImpl::wordBoundaryEventOccurred):
976         (WebCore::WebSpeechSynthesizerClientImpl::sentenceBoundaryEventOccurred):
977         * platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Added.
978         (WebCore):
979         (WebSpeechSynthesizerClientImpl):
980         * platform/mac/PlatformSpeechSynthesizerMac.mm:
981         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
982         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
983         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
984         (WebCore):
985         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
986         (WebCore::PlatformSpeechSynthesizer::speak):
987         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
988         (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
989         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
990         (WebCore::PlatformSpeechSynthesizerMock::speak):
991         * platform/mock/PlatformSpeechSynthesizerMock.h:
992         (PlatformSpeechSynthesizerMock):
993
994 2013-03-23  Daniel Cheng  <dcheng@chromium.org>
995
996         [Qt] editing/pasteboard/can-read-in-dragstart-event.html and /can-read-in-copy-and-cut-events.html are crashing
997         https://bugs.webkit.org/show_bug.cgi?id=113126
998
999         Reviewed by Ryosuke Niwa.
1000
1001         The ClipboardQt implementation only allows reading or writing, not both. Attempting to read
1002         when the clipboard is only writable will lead to a crash since the corresponding member will
1003         be null. To prevent crashes, change the asserts to early returns. In the long term, the
1004         correct fix is to unify the m_readableData and m_writableData members.
1005
1006         No new tests since no functionality in Qt port should change.
1007
1008         * platform/qt/ClipboardQt.cpp:
1009         (WebCore::ClipboardQt::getData):
1010         (WebCore::ClipboardQt::types):
1011         (WebCore::ClipboardQt::files):
1012
1013 2013-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1014
1015         [GTK][Regression] webkit_dom_html_table_element_insert_row returns value that doesn't pass WEBKIT_DOM_IS_HTML_TABLE_ROW_ELEMENT macro
1016         https://bugs.webkit.org/show_bug.cgi?id=111714
1017
1018         Reviewed by Martin Robinson.
1019
1020         Add custom kit implementation for HTMLElements so that the HTML
1021         wrappers are used in that case instead of wrapHTMLElement.
1022
1023         * bindings/gobject/WebKitDOMBinding.cpp:
1024         (WebKit::kit):
1025         (WebKit):
1026         * bindings/gobject/WebKitDOMBinding.h:
1027         (WebCore):
1028         (WebKit):
1029         * bindings/scripts/CodeGeneratorGObject.pm:
1030         (UsesManualKitImplementation):
1031
1032 2013-03-23  David Kilzer  <ddkilzer@apple.com>
1033
1034         Revert "BUILD FIX (r146667): ResourceRequest constructor in SynchronousLoaderClient.cpp is ambiguous on iOS"
1035
1036         This is platform-agnositic code, so the previous solution won't work.
1037
1038         * platform/network/SynchronousLoaderClient.cpp:
1039         (WebCore::SynchronousLoaderClient::willSendRequest):
1040
1041 2013-03-23  David Kilzer  <ddkilzer@apple.com>
1042
1043         BUILD FIX (r146667): ResourceRequest constructor in SynchronousLoaderClient.cpp is ambiguous on iOS
1044
1045         Fixes the following build failure:
1046
1047             Source/WebCore/platform/network/SynchronousLoaderClient.cpp:52:15: error: conversion from 'int' to 'const WebCore::ResourceRequest' is ambiguous
1048                 request = 0;
1049                           ^
1050             In file included from Source/WebCore/platform/network/SynchronousLoaderClient.cpp:30:
1051             In file included from Source/WebCore/platform/network/ResourceHandle.h:37:
1052             In file included from Source/WebCore/platform/network/ios/QuickLook.h:13:
1053             Source/WebCore/platform/network/cf/ResourceRequest.h:79:9: note: candidate constructor
1054                     ResourceRequest(NSURLRequest *);
1055                     ^
1056             Source/WebCore/platform/network/cf/ResourceRequest.h:83:9: note: candidate constructor
1057                     ResourceRequest(CFURLRequestRef cfRequest)
1058                     ^
1059             1 error generated.
1060
1061         * platform/network/SynchronousLoaderClient.cpp:
1062         (WebCore::SynchronousLoaderClient::willSendRequest): If
1063         USE(CFNETWORK) is defined, use static_cast<CFURLRequestRef>(0),
1064         otherwise use static_cast<NSURLRequest *>(0).
1065
1066 2013-03-23  David Kilzer  <ddkilzer@apple.com>
1067
1068         BUILD FIX (r146687): setDefaultMIMEType() is unused in ResourceHandleCFNet.cpp on iOS
1069
1070         Fixes the following build failure:
1071
1072             Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp:98:13: error: unused function 'setDefaultMIMEType' [-Werror,-Wunused-function]
1073             static void setDefaultMIMEType(CFURLResponseRef response)
1074                         ^
1075             1 error generated.
1076
1077         * platform/network/cf/ResourceHandleCFNet.cpp:
1078         (WebCore::setDefaultMIMEType): Add #if !PLATFORM(MAC)/#endif
1079         guard.
1080
1081 2013-03-21  Kiran Muppala  <cmuppala@apple.com>
1082
1083         Add runtime setting for hidden page DOM timer throttling and CSS animation suspension
1084         https://bugs.webkit.org/show_bug.cgi?id=112308
1085
1086         Reviewed by Gavin Barraclough.
1087
1088         No new tests.  Only adding settings to enable/disable existing features
1089         and hence existing tests suffice.
1090
1091         * WebCore.exp.in:
1092         * page/Page.cpp:
1093         (WebCore::Page::setVisibilityState): Check if DOM timer throttling
1094         and CSS animation suspension are enabled before turning them on.
1095         (WebCore::Page::hiddenPageDOMTimerThrottlingStateChanged): Start or stop
1096         DOM timer throttling based on page visibility and the new setting state.
1097         (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged): Ditto
1098         for CSS animation suspension.
1099         * page/Page.h:
1100         * page/Settings.cpp:
1101         (WebCore::Settings::Settings): Initialize the flags for enabling hidden
1102         page DOM timer throttling and CSS animation suspension to false.
1103         (WebCore::Settings::setHiddenPageDOMTimerThrottlingEnabled): Update flag
1104         and notify page that the state of the setting has changed.
1105         (WebCore::Settings::setHiddenPageCSSAnimationSuspensionEnabled): Ditto.
1106         * page/Settings.h:
1107         (WebCore::Settings::hiddenPageDOMTimerThrottlingEnabled):
1108         (WebCore::Settings::hiddenPageCSSAnimationSuspensionEnabled):
1109
1110 2013-03-22  Benjamin Poulain  <bpoulain@apple.com>
1111
1112         Remove 2 bad branches from StringHash::equal() and CaseFoldingHash::equal()
1113         https://bugs.webkit.org/show_bug.cgi?id=113003
1114
1115         Reviewed by Eric Seidel.
1116
1117         Fix two unfortunate use of StringHash and use the correct StringImpl function.
1118
1119         * html/parser/HTMLParserIdioms.cpp:
1120         (WebCore::threadSafeEqual):
1121         * html/parser/HTMLTreeBuilderSimulator.cpp:
1122         (WebCore::tokenExitsSVG):
1123
1124 2013-03-22  Andy Estes  <aestes@apple.com>
1125
1126         Set the cache partition property on CFURLRequests
1127         https://bugs.webkit.org/show_bug.cgi?id=113116
1128
1129         Patch by Jeffrey Pfau
1130         Reviewed by David Kilzer.
1131
1132         * platform/network/cf/ResourceRequestCFNet.cpp:
1133         (WebCore::ResourceRequest::doUpdatePlatformRequest):
1134         (WebCore::ResourceRequest::doUpdateResourceRequest):
1135
1136 2013-03-22  Julien Chaffraix  <jchaffraix@webkit.org>
1137
1138         [CSS Grid Layout] content-sized row tracks with percentage logical height grid items don't resolve properly
1139         https://bugs.webkit.org/show_bug.cgi?id=113085
1140
1141         Reviewed by Tony Chang.
1142
1143         The core issue is that because overrideContainingBlockLogicalHeight() is unset in
1144         logicalContentHeightForChild, RenderBox::computePercentageLogicalHeight would try to
1145         resolve percentage logical height against the grid element (wrong containing block
1146         as a grid item's containing block is the grid area).
1147
1148         Tests: fast/css-grid-layout/grid-item-multiple-minmax-content-resolution.html
1149                fast/css-grid-layout/grid-item-with-percent-height-in-auto-height-grid-resolution.html
1150
1151         * rendering/RenderGrid.cpp:
1152         (WebCore::RenderGrid::logicalContentHeightForChild):
1153         Set our override logical height to -1, so that we don't try to constrain a grid item's logical height
1154         based on resolving (badly) its percentage.
1155
1156 2013-03-19  Zhenyao Mo  <zmo@google.com>
1157
1158         Check WEBGL_draw_buffers requirements before exposing the extension
1159         https://bugs.webkit.org/show_bug.cgi?id=112359
1160
1161         Reviewed by Kenneth Russell.
1162
1163         * html/canvas/EXTDrawBuffers.cpp:
1164         (WebCore::EXTDrawBuffers::supported): call satisfies*().
1165         (WebCore::EXTDrawBuffers::drawBuffersEXT):
1166         (WebCore):
1167         (WebCore::EXTDrawBuffers::satisfiesWebGLRequirements): check WebGL requirements.
1168         * html/canvas/EXTDrawBuffers.h:
1169         (EXTDrawBuffers):
1170         * html/canvas/WebGLFramebuffer.cpp:
1171         (WebCore::WebGLFramebuffer::getDrawBuffer):
1172         (WebCore):
1173         * html/canvas/WebGLFramebuffer.h:
1174         (WebGLFramebuffer):
1175         * html/canvas/WebGLRenderingContext.cpp:
1176         (WebCore):
1177         (WebCore::WebGLRenderingContext::initializeNewContext):
1178         (WebCore::WebGLRenderingContext::getExtension):
1179         (WebCore::WebGLRenderingContext::getParameter):
1180         (WebCore::WebGLRenderingContext::getSupportedExtensions):
1181         (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters):
1182         (WebCore::WebGLRenderingContext::getMaxDrawBuffers):
1183         (WebCore::WebGLRenderingContext::getMaxColorAttachments):
1184         (WebCore::WebGLRenderingContext::setBackDrawBuffer):
1185         (WebCore::WebGLRenderingContext::restoreCurrentFramebuffer):
1186         (WebCore::WebGLRenderingContext::restoreCurrentTexture2D):
1187         (WebCore::WebGLRenderingContext::supportsDrawBuffers): a cached version of EXTDrawBuffers::supports()
1188         * html/canvas/WebGLRenderingContext.h:
1189         (WebGLRenderingContext):
1190
1191 2013-03-22  Roger Fong  <roger_fong@apple.com>
1192
1193         Unreviewed. Fix AppleWin port following https://bugs.webkit.org/show_bug.cgi?id=113100.
1194         Patch by Alexey Proskuryakov.
1195
1196         * platform/network/cf/ResourceHandleCFNet.cpp:
1197         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
1198
1199 2013-03-22  Tony Chang  <tony@chromium.org>
1200
1201         REGRESSION (r146272): layout issues for flex boxes that have -webkit-flex-wrap: wrap
1202         https://bugs.webkit.org/show_bug.cgi?id=113071
1203
1204         Reviewed by Ojan Vafai.
1205
1206         The refactor in r139535 introduced this bug, where a variable name wasn't updated properly.
1207         In combination with r146272, this bug became more visible when nesting multiline flexboxen.
1208
1209         Test: css3/flexbox/multiline-min-preferred-width.html
1210
1211         * rendering/RenderFlexibleBox.cpp:
1212         (WebCore::RenderFlexibleBox::computeIntrinsicLogicalWidths): We want the width of the widest
1213         flexitem, the value in m_minPreferredWidth isn't relevant. Also update the comment for max
1214         preferred width.
1215
1216 2013-03-22  Max Vujovic  <mvujovic@adobe.com>
1217
1218         [CSS Shaders] Clamp css_MixColor before the blending and compositing steps
1219         https://bugs.webkit.org/show_bug.cgi?id=113088
1220
1221         Reviewed by Dean Jackson.
1222
1223         The blending and compositing operations from the spec [1] expect that they are operating on
1224         valid color inputs, in the range [0.0, 1.0]. Thus, we should clamp the css_MixColor input to
1225         this range to avoid implementation-dependent behavior for invalid color inputs.
1226
1227         [1]: https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blending
1228
1229         Tests: css3/filters/custom/custom-filter-clamp-css-mix-color-negative.html
1230                css3/filters/custom/custom-filter-clamp-css-mix-color.html
1231
1232         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
1233         (WebCore::CustomFilterValidatedProgram::rewriteMixFragmentShader):
1234             Clamp css_MixColor as clampedMixColor before using it in the blending and compositing
1235             steps.
1236
1237 2013-03-19  Martin Robinson  <mrobinson@igalia.com>
1238
1239         [GTK] Add WebCoreDOM to the gyp build
1240         https://bugs.webkit.org/show_bug.cgi?id=112737
1241
1242         Reviewed by Nico Weber.
1243
1244         * WebCore.gyp/WebCoreGTK.gyp: Add WebCoreDOM to the gyp build.
1245
1246 2013-03-19  Martin Robinson  <mrobinson@igalia.com>
1247
1248         [GTK] Add WebCoreHTML to the gyp build
1249         https://bugs.webkit.org/show_bug.cgi?id=112727
1250
1251         Reviewed by Nico Weber.
1252
1253         * WebCore.gyp/WebCoreGTK.gyp: Add support for building all files under
1254         the HTML directory. This includes splitting off common WebCore dependencies
1255         into an aggregate target and adding a top-level WebCore target.
1256
1257 2013-03-22  Tim Horton  <timothy_horton@apple.com>
1258
1259         Plugin Snapshotting: Auto-start dominant plugins
1260         https://bugs.webkit.org/show_bug.cgi?id=113111
1261         <rdar://problem/13475726>
1262
1263         Reviewed by Dean Jackson.
1264
1265         * html/HTMLPlugInElement.cpp:
1266         (WebCore::HTMLPlugInElement::defaultEventHandler):
1267         Acknowledge the new "Restarting" DisplayState.
1268         * html/HTMLPlugInElement.h:
1269         Rename PlayingWithPendingMouseClick to RestartingWithPendingMouseClick for accuracy.
1270         Add "Restarting" DisplayState, so we can be aware that the plugin is intentionally restarting and not re-snapshot it.
1271         * html/HTMLPlugInImageElement.cpp:
1272         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Remove m_isPrimarySnapshottedPlugIn.
1273         (WebCore::classNameForShadowRoot): Remove m_isPrimarySnapshottedPlugIn.
1274         (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Restart the plugin when it becomes primary.
1275         (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Remove m_isPrimarySnapshottedPlugIn.
1276         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
1277         Move the plugin to Restarting unless it's already marked as PendingMouseClick.
1278         (WebCore::HTMLPlugInImageElement::simulatedMouseClickTimerFired): Match the PlayingWithPendingMouseClick rename.
1279         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Don't snapshot if we're restarting.
1280         * html/HTMLPlugInImageElement.h: Remove m_isPrimarySnapshottedPlugIn.
1281         * rendering/RenderSnapshottedPlugIn.cpp:
1282         (WebCore::RenderSnapshottedPlugIn::paint): Acknowledge the new "Restarting" DisplayState.
1283         (WebCore::RenderSnapshottedPlugIn::getCursor): Acknowledge the new "Restarting" DisplayState.
1284         (WebCore::RenderSnapshottedPlugIn::handleEvent): Match the PlayingWithPendingMouseClick rename.
1285
1286 2013-03-19  Martin Robinson  <mrobinson@igalia.com>
1287
1288         [GTK] Add support for building the WebCore bindings to the gyp build
1289         https://bugs.webkit.org/show_bug.cgi?id=112638
1290
1291         Reviewed by Nico Weber.
1292
1293         Add targets, actions, and rules for building the WebCore bindings. This is
1294         the first part of the WebCoreGTK build.
1295
1296         * WebCore.gyp/ConvertFileToHeaderWithCharacterArray.gypi: Added.
1297         * WebCore.gyp/MakeNames.gypi: Added.
1298         * WebCore.gyp/WebCoreGTK.gyp: Added WebCore bindings build. This has been adapted
1299         from the Chromium build.
1300         * WebCore.gypi: Updated list of derived sources files and added a parameter
1301         for adjusting the location of the built files. We don't want to force the
1302         Mac build to change, but we'd still like to reuse the scripts that the
1303         Chromium build uses.
1304
1305 2013-03-22  Dane Wallinga  <dgwallinga@chromium.org>
1306
1307         Add client callbacks to notify of changes of associated from controls
1308         https://bugs.webkit.org/show_bug.cgi?id=110375
1309
1310         Reviewed by Ryosuke Niwa.
1311
1312         Hook FormAssociatedElement, HTMLFormElement to notify EditorClient of form changes after a page has loaded.
1313         Will be used to add autofill support for ajax-y webpages. e.g if while filling out a form, new fields
1314         are dynamically created, autofill can know to re-query the autofill server and keep going.
1315         https://bugs.webkit.org/show_bug.cgi?id=110375
1316
1317         * dom/Document.cpp:
1318         (WebCore::Document::Document):
1319         (WebCore::Document::didAssociateFormControl):
1320         (WebCore):
1321         (WebCore::Document::didAssociateFormControlsTimerFired):
1322         * dom/Document.h:
1323         (Document):
1324         added method didAssociateFormControl, which batches form changes
1325         and calls out to ChromeClient on a timer.
1326         * html/FormAssociatedElement.cpp:
1327         (WebCore::FormAssociatedElement::resetFormOwner):
1328         (WebCore::FormAssociatedElement::formAttributeChanged):
1329         (WebCore):
1330         * html/FormAssociatedElement.h:
1331         (FormAssociatedElement):
1332         add calls to Document::didAssociateFormControl when form changes
1333         * html/HTMLFormElement.cpp:
1334         (WebCore::HTMLFormElement::insertedInto):
1335         (WebCore):
1336         * html/HTMLFormElement.h:
1337         add call to Document::didAssociateFormControl
1338         * loader/EmptyClients.h:
1339         (EmptyChromeClient):
1340         (WebCore::EmptyChromeClient::didAssociateFormControls):
1341         (WebCore::EmptyChromeClient::shouldNotifyOnFormChanges):
1342         * page/ChromeClient.h:
1343         (ChromeClient):
1344         add new method didAssociateFormControls
1345
1346 2013-03-22  Alexey Proskuryakov  <ap@apple.com>
1347
1348         Split ResourceHandleMac into multiple files
1349         https://bugs.webkit.org/show_bug.cgi?id=113100
1350
1351         Reviewed by Geoff Garen.
1352
1353         It's grown too big to navigate, and I'm going to make WebCoreResourceHandleAsDelegate
1354         substantially more complicated yet.
1355
1356         1. Mechanically moved WebCoreResourceHandleAsDelegate into separate files.
1357         2. Refactored WebCoreSynchronousLoaderClient to be cross-platform, and moved it into
1358         separate files.
1359
1360         * WebCore.vcproj/WebCore.vcproj:
1361         * WebCore.vcxproj/WebCore.vcxproj:
1362         * WebCore.vcxproj/WebCore.vcxproj.filters:
1363         * WebCore.xcodeproj/project.pbxproj:
1364         * platform/network/SynchronousLoaderClient.cpp: Added.
1365         * platform/network/SynchronousLoaderClient.h: Added.
1366         * platform/network/cf/ResourceHandleCFNet.cpp:
1367         * platform/network/mac/SynchronousLoaderClient.mm: Added.
1368         * platform/network/mac/WebCoreResourceHandleAsDelegate.h: Added.
1369         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: Added.
1370
1371 2013-03-21  Geoffrey Garen  <ggaren@apple.com>
1372
1373         Added a setting for whether JavaScript markup is enabled
1374         https://bugs.webkit.org/show_bug.cgi?id=112999
1375
1376         Reviewed by Maciej Stachowiak.
1377
1378         This setting is useful for clients that want protection from script
1379         injection attacks.
1380
1381         * page/Settings.h:
1382         (Settings): Clarified which clients should call canExecuteScripts().
1383
1384         * page/Settings.in: Added the new setting.
1385
1386 2013-03-22  Roger Fong  <roger_fong@apple.com>
1387
1388         Unreviewed build fix.
1389
1390         * bindings/scripts/preprocessor.pm:
1391         (applyPreprocessor):
1392
1393 2013-03-22  Roger Fong  <roger_fong@apple.com>
1394
1395         Unreviewed. Force kill gcc-3.exe during bindings generation tests to avoid process hangs.
1396
1397         This problem is occuring on the WinEWS bots where there are somehow multiple gcc-3 processes existing at the same time.
1398         This is a speculative fix. There should only be 1 gcc-3.exe process running at a time ever.
1399
1400         * bindings/scripts/preprocessor.pm:
1401         (applyPreprocessor):
1402
1403 2013-03-22  Eric Carlson  <eric.carlson@apple.com>
1404
1405         Cleanup text track selection logic
1406         https://bugs.webkit.org/show_bug.cgi?id=113062
1407
1408         Reviewed by Jer Noble.
1409
1410         No new tests, covered by existing tests.
1411
1412         * html/HTMLMediaElement.cpp:
1413         (WebCore::HTMLMediaElement::userIsInterestedInThisTrackKind): Remove.
1414         (WebCore::HTMLMediaElement::configureTextTrackGroup): Don't look at track attributes directly,
1415             use captionPreferences->textTrackSelectionScore to calculate track rank.
1416         (WebCore::HTMLMediaElement::setClosedCaptionsVisible): Set m_processingPreferenceChange here
1417             instead of in captionPreferencesChanged.
1418         (WebCore::HTMLMediaElement::captionPreferencesChanged): Don't suppress calls to setClosedCaptionsVisible,
1419             existing code already makes sure we don't do unnecessary work.
1420         * html/HTMLMediaElement.h:
1421
1422         * html/shadow/MediaControlElements.cpp:
1423         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Drive by cleanup, don't
1424             process inactive cues.
1425
1426         * html/shadow/MediaControlsApple.cpp:
1427         (WebCore::MediaControlsApple::changedClosedCaptionsVisibility): Call resetTrackListMenu instead
1428             of updateDisplay so we only mark the menu as needing a recalculation and do the work when
1429             it is displayed.
1430
1431         * page/CaptionUserPreferences.cpp:
1432         (WebCore::CaptionUserPreferences::shouldShowCaptions): When in testing mode, return true if
1433             the caption or subtitle preference has been set.
1434         (WebCore::CaptionUserPreferences::setShouldShowCaptions): In testing mode, clear the caption
1435             and subtitle preference when passed false.
1436         (WebCore::CaptionUserPreferences::textTrackSelectionScore): Calculate the track score based on
1437             track type preference and preferred language.
1438         (WebCore::CaptionUserPreferences::textTrackLanguageSelectionScore): Score a track according to
1439             the language presence and position in the preferred languages list.
1440         * page/CaptionUserPreferences.h:
1441
1442         * page/CaptionUserPreferencesMac.h:
1443         * page/CaptionUserPreferencesMac.mm:
1444         (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Calculate track language score 
1445             according to user preferences.
1446
1447         * platform/Language.cpp:
1448         (WebCore::indexOfBestMatchingLanguageInList): Repurposed the static bestMatchingLanguage
1449             function to return the location of a language in a Vector.
1450         (WebCore::preferredLanguageFromList): Removed.
1451         * platform/Language.h:
1452
1453 2013-03-22  ChangSeok Oh  <changseok.oh@collabora.com>
1454
1455         Build fix for TransformationMatrix
1456         https://bugs.webkit.org/show_bug.cgi?id=113087
1457
1458         Reviewed by Martin Robinson.
1459
1460         This is a trivial build fix for clutter ac backend. Clutter AC backend doesn't use
1461         TextureMapper so there is nowhere including TransformationMatrix.h.
1462         For the reason, we include it explicitly.
1463
1464         No new tests because of no functionality change.
1465
1466         * platform/graphics/clutter/GraphicsContext3DPrivate.cpp:
1467         * platform/graphics/clutter/GraphicsContext3DPrivate.h:
1468         (WebCore):
1469
1470 2013-03-22  Steve Block  <steveblock@chromium.org>
1471
1472         Coordinates.idl lacks Conditional=GEOLOCATION
1473         https://bugs.webkit.org/show_bug.cgi?id=112949
1474
1475         Reviewed by Steve Block.
1476
1477         No new tests, build optimization only.
1478
1479         * page/Coordinates.idl: Added GEOLOCATION conditional guard.
1480
1481 2013-03-22  Daniel Cheng  <dcheng@chromium.org>
1482
1483         Data store should be readable in dragstart/copy/cut events
1484         https://bugs.webkit.org/show_bug.cgi?id=23695
1485
1486         Reviewed by Tony Chang.
1487
1488         There were several events where data could be written but not read back due to the fact that
1489         different Clipboard method implementations checked permissions inconsistently. This patch
1490         adds helper methods to check if an operation is permitted on a Clipboard and refactors all
1491         direct comparisons against Clipboard::m_policy to use the new helpers instead. This fixes
1492         several bugs where Clipboard::types and Clipboard::getData are not usable inside the
1493         aforementioned events.
1494
1495         Tests: editing/pasteboard/can-read-in-copy-and-cut-events.html
1496                editing/pasteboard/can-read-in-dragstart-event.html
1497
1498         * dom/Clipboard.cpp:
1499         (WebCore::Clipboard::canReadTypes): Formerly restricted to ClipboardReadable and
1500                                             ClipboardTypesReadable; now allows ClipboardWritable as
1501                                             well.
1502         (WebCore::Clipboard::canReadData): Formerly restricted to ClipboardReadable; now allows
1503                                            ClipboardWritable as well.
1504         (WebCore::Clipboard::canWriteData):
1505         (WebCore::Clipboard::canSetDragImage):
1506         (WebCore::Clipboard::hasFileOfType):
1507         (WebCore::Clipboard::hasStringOfType):
1508         (WebCore::Clipboard::setDropEffect):
1509         (WebCore::Clipboard::setEffectAllowed):
1510         * dom/Clipboard.h:
1511         (Clipboard):
1512         * platform/blackberry/ClipboardBlackBerry.cpp:
1513         (WebCore::ClipboardBlackBerry::clearData):
1514         (WebCore::ClipboardBlackBerry::clearAllData):
1515         (WebCore::ClipboardBlackBerry::getData):
1516         (WebCore::ClipboardBlackBerry::setData):
1517         (WebCore::ClipboardBlackBerry::types):
1518         * platform/chromium/ClipboardChromium.cpp:
1519         (WebCore::DataTransferItemPolicyWrapper::kind):
1520         (WebCore::DataTransferItemPolicyWrapper::type):
1521         (WebCore::DataTransferItemPolicyWrapper::getAsString):
1522         (WebCore::DataTransferItemPolicyWrapper::getAsFile):
1523         (WebCore::ClipboardChromium::clearData):
1524         (WebCore::ClipboardChromium::clearAllData):
1525         (WebCore::ClipboardChromium::getData):
1526         (WebCore::ClipboardChromium::setData):
1527         (WebCore::ClipboardChromium::types):
1528         (WebCore::ClipboardChromium::files):
1529         (WebCore::ClipboardChromium::setDragImage):
1530         * platform/gtk/ClipboardGtk.cpp:
1531         (WebCore::ClipboardGtk::clearData):
1532         (WebCore::ClipboardGtk::clearAllData):
1533         (WebCore::ClipboardGtk::getData):
1534         (WebCore::ClipboardGtk::setData):
1535         (WebCore::ClipboardGtk::types):
1536         (WebCore::ClipboardGtk::files):
1537         (WebCore::ClipboardGtk::setDragImage):
1538         * platform/mac/ClipboardMac.mm:
1539         (WebCore::ClipboardMac::clearData):
1540         (WebCore::ClipboardMac::clearAllData):
1541         (WebCore::ClipboardMac::getData):
1542         (WebCore::ClipboardMac::setData):
1543         (WebCore::ClipboardMac::types):
1544         (WebCore::ClipboardMac::files):
1545         (WebCore::ClipboardMac::setDragImage):
1546         * platform/qt/ClipboardQt.cpp:
1547         (WebCore::ClipboardQt::clearData):
1548         (WebCore::ClipboardQt::clearAllData):
1549         (WebCore::ClipboardQt::getData):
1550         (WebCore::ClipboardQt::setData):
1551         (WebCore::ClipboardQt::types):
1552         (WebCore::ClipboardQt::files):
1553         (WebCore::ClipboardQt::setDragImage):
1554         (WebCore::ClipboardQt::items):
1555         * platform/qt/DataTransferItemListQt.cpp:
1556         (WebCore::DataTransferItemListQt::length):
1557         (WebCore::DataTransferItemListQt::item):
1558         (WebCore::DataTransferItemListQt::deleteItem):
1559         (WebCore::DataTransferItemListQt::clear):
1560         (WebCore::DataTransferItemListQt::add):
1561         * platform/qt/DataTransferItemQt.cpp:
1562         (WebCore::DataTransferItemQt::getAsString):
1563         * platform/win/ClipboardWin.cpp:
1564         (WebCore::ClipboardWin::clearData):
1565         (WebCore::ClipboardWin::clearAllData):
1566         (WebCore::ClipboardWin::getData):
1567         (WebCore::ClipboardWin::setData):
1568         (WebCore::ClipboardWin::types):
1569         (WebCore::ClipboardWin::files):
1570         (WebCore::ClipboardWin::setDragImage):
1571
1572 2013-03-22  Andrei Bucur  <abucur@adobe.com>
1573
1574         [CSS Regions] Remove pushLayoutState(RenderFlowThread*) from RenderView
1575         https://bugs.webkit.org/show_bug.cgi?id=113084
1576
1577         Reviewed by Dirk Schulze.
1578
1579         Remove void pushLayoutState(RenderFlowThread*, bool regionsChanged) from RenderView.h because it's not used.
1580
1581         Tests: Code cleanup. No tests needed.
1582
1583         * rendering/RenderView.h:
1584         (RenderView):
1585
1586 2013-03-22  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1587
1588         [EFL] Fix build issues to enable CSS Filter and Shaders support.
1589         https://bugs.webkit.org/show_bug.cgi?id=111274
1590
1591         Reviewed by Noam Rosenthal.
1592
1593         This is in preperation to enable CSS Filter and Shaders support.
1594         This patch fixes related build issues to enable the support.
1595
1596         * platform/graphics/surfaces/efl/GLTransportSurface.cpp:
1597         * platform/graphics/texmap/TextureMapper.cpp:
1598         * platform/graphics/texmap/TextureMapper.h:
1599         (WebCore):
1600         * platform/graphics/texmap/TextureMapperGL.cpp:
1601         * platform/graphics/texmap/TextureMapperGL.h:
1602         (WebCore):
1603         * platform/graphics/texmap/TextureMapperShaderProgram.h:
1604
1605 2013-03-22  Matt Falkenhagen  <falken@chromium.org>
1606
1607         Implement isEnabledFormControl() for SliderThumbElement and SpinButtonElement in terms of disabled()
1608         https://bugs.webkit.org/show_bug.cgi?id=112993
1609
1610         Reviewed by Kent Tamura.
1611
1612         This is an intermediate step for refactoring Node::disabled and
1613         Element::isEnabledFormControl. All classes that override
1614         isEnabledFormControl just return !disabled(), except for
1615         SliderThumbElement and SpinButtonElement. This patch changes those two
1616         classes to do so, which shows that the two functions are redundant and
1617         easy to refactor into a single function in a subsequent patch.
1618
1619         No new tests, there should be no behavior change.
1620
1621         * html/shadow/SliderThumbElement.cpp:
1622         (WebCore::SliderThumbElement::disabled):
1623         (WebCore):
1624         (WebCore::SliderThumbElement::isEnabledFormControl):
1625         * html/shadow/SliderThumbElement.h:
1626         (SliderThumbElement):
1627         * html/shadow/SpinButtonElement.h: The check of shadowHost() is
1628         necessary because it can be detached by JavaScript that runs during
1629         event handling (see r76566)
1630
1631 2013-03-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1632
1633         [Qt] New fast/text/word-space-with-kerning-3.html fails on Qt.
1634         https://bugs.webkit.org/show_bug.cgi?id=112668
1635
1636         Reviewed by Jocelyn Turcotte.
1637
1638         Qt adds word-spacing to leading spaces, but WebCore only expects
1639         us to add for trailing spaces. We only corrected for this in width
1640         calculation but do need to also do it for drawing.
1641
1642         Instead of subtracting the extra word-spacing we now configure the
1643         FormatRange not to apply to leading spaces. This means this behavior
1644         will be applied everywhere reliably.
1645
1646         * platform/graphics/Font.h:
1647         (Font):
1648         * platform/graphics/qt/FontQt.cpp:
1649         (WebCore::Font::drawComplexText):
1650         (WebCore::Font::floatWidthForComplexText):
1651         (WebCore::Font::offsetForPositionForComplexText):
1652         (WebCore::Font::selectionRectForComplexText):
1653         (WebCore::Font::initFormatForTextLayout):
1654
1655 2013-03-22  Joshua Bell  <jsbell@chromium.org>
1656
1657         REGRESSION (r146540?): Crashes in storage/indexeddb/factory-basics-workers.html, storage/indexeddb/transaction-error.html
1658         https://bugs.webkit.org/show_bug.cgi?id=113019
1659
1660         Reviewed by Tony Chang.
1661
1662         Also manifesting flakily under Chromium's content_shell. It's an ASSERT being hit in
1663         the IDBTransaction destructor. The cause was r146540 which allows a stopped context
1664         to reclaim script wrappers. This allows the IDBTransaction to be deref'd at times where
1665         it previously would have just leaked. Modulate the destructor assertions to account
1666         for this case.
1667
1668         No new tests; failures already manifest as flaky crashes in some ports.
1669
1670         * Modules/indexeddb/IDBTransaction.cpp:
1671         (WebCore::IDBTransaction::~IDBTransaction): If context is stopped, expected state
1672         transitions/cleanup may not have occurred before destructor runs.
1673
1674 2013-03-22  David Grogan  <dgrogan@chromium.org>
1675
1676         IndexedDB: Histogram available disk space on attempt to open database
1677         https://bugs.webkit.org/show_bug.cgi?id=112862
1678
1679         Reviewed by Tony Chang.
1680
1681         ChromeOS suspects they might be hitting disk corruption when the disks
1682         are nearly full. This patch logs the available space to either the
1683         "success" or the "fail" histogram as appropriate so that the
1684         distributions can be compared.
1685
1686         No new tests - I don't know of a good way to test histograms. Local
1687         printf testing didn't turn up any bugs.
1688
1689         * platform/leveldb/LevelDBDatabase.cpp:
1690         (WebCore::HistogramFreeSpace):
1691         (WebCore):
1692         (WebCore::LevelDBDatabase::open):
1693
1694 2013-03-22  Nate Chapin  <japhet@chromium.org>
1695
1696         REGRESSION (r146239): Reproducible crash in WebCore::DocumentLoader::responseReceived.
1697         https://bugs.webkit.org/show_bug.cgi?id=112811
1698
1699         Reviewed by Brady Eidson.
1700
1701         Test: http/tests/cache/x-frame-options-304.html
1702
1703         * loader/DocumentLoader.cpp:
1704         (WebCore::DocumentLoader::responseReceived):
1705         * loader/cache/CachedRawResource.cpp:
1706         (WebCore::CachedRawResource::switchClientsToRevalidatedResource):
1707         * loader/cache/CachedRawResource.h:
1708
1709 2013-03-22  Jer Noble  <jer.noble@apple.com>
1710
1711         REGRESSION: -webkit-box-reflect does not show on video elements
1712         https://bugs.webkit.org/show_bug.cgi?id=112397
1713
1714         Reviewed by Eric Carlson.
1715
1716         Work around the ASSERTs generated when setting an AVPlayerLayer's player property
1717         during a CA flush by setting the player property during the next runloop, outside
1718         of a CA flush.
1719
1720         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
1721         (PlatformCALayer::clone):
1722
1723 2013-03-22  peavo@outlook.com  <peavo@outlook.com>
1724
1725         [Curl] Performance fix, avoid loading cookie file on every request.
1726         https://bugs.webkit.org/show_bug.cgi?id=113023
1727
1728         Reviewed by Brent Fulgham.
1729
1730         We currently load the cookie file on every request, and when setting cookies from JavaScript, by using the option CURLOPT_COOKIEFILE.
1731         This is very inefficient as the cookie file can get quite large, and file I/O is slow.
1732         It is sufficient to load the cookie file on startup, as we use a shared cookie database between the requests.
1733
1734         * platform/network/curl/CookieJarCurl.cpp:
1735         (WebCore::setCookiesFromDOM): Avoid loading cookie file when setting cookies from JavaScript.
1736         * platform/network/curl/ResourceHandleManager.cpp:
1737         (WebCore::ResourceHandleManager::initializeHandle): Avoid loading cookie file on every request.
1738         (WebCore::ResourceHandleManager::initCookieSession): Load the cookie file to shared database on startup.
1739
1740 2013-03-22  Tiancheng Jiang  <tijiang@rim.com>
1741
1742         [BlackBerry] Update Input field Background Color
1743         https://bugs.webkit.org/show_bug.cgi?id=113063
1744
1745         Reviewed by George Staikos.
1746
1747         RIM PR 307463.
1748         Internally reviewed by Ed Baker.
1749
1750         * platform/blackberry/RenderThemeBlackBerry.cpp:
1751         (WebCore::RenderThemeBlackBerry::paintTextFieldOrTextAreaOrSearchField):
1752
1753 2013-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
1754
1755         Web Inspector: FlameChart. Draw function names over flame chart bar if they fit into the bar.
1756         https://bugs.webkit.org/show_bug.cgi?id=113052
1757
1758         Reviewed by Vsevolod Vlasov.
1759
1760         The draw function will draw the bar title if the text is less than bar width.
1761         Unfortunately almost all the projects which need to be profiled
1762         use long function names with dots. So if the function name has dots and
1763         doesn't fit into the space then prepareTitle will try to drop the prefix before dot.
1764         If the title has no dots then the function will strip the tail of the title.
1765
1766         * inspector/front-end/FlameChart.js:
1767         (WebInspector.FlameChart):
1768         (WebInspector.FlameChart.prototype.draw):
1769         (WebInspector.FlameChart.prototype._prepareTitle):
1770
1771 2013-03-22  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1772
1773         Web Inspector: Add "hidden" attribute to the recently added APIs in Inspector.json
1774         https://bugs.webkit.org/show_bug.cgi?id=113061
1775
1776         Added "hidden": true to the APIs introduced since version 1.0.
1777
1778         Reviewed by Pavel Feldman.
1779
1780         * inspector/Inspector.json:
1781
1782 2013-03-22  Vsevolod Vlasov  <vsevik@chromium.org>
1783
1784         Web Inspector: Correctly implement scrollToLine, revealLine and setSelection on CodeMirror  editor.
1785         https://bugs.webkit.org/show_bug.cgi?id=113028
1786
1787         Reviewed by Pavel Feldman.
1788
1789         Added focus event handler to CodeMirror editor view elememnt to support inspector's focus model.
1790         Added selection and scroll listeners to correctly save editor scroll and selection in history.
1791         Implemented revealLine, scrollToLine and setSelection.
1792         Note: CodeMirror's coordsChar method does not work correctly in "local" mode, implemented as binary search
1793         as a temporary workaround.
1794
1795         * inspector/front-end/CodeMirrorTextEditor.js:
1796         (WebInspector.CodeMirrorTextEditor):
1797         (WebInspector.CodeMirrorTextEditor.prototype.defaultFocusedElement):
1798         (WebInspector.CodeMirrorTextEditor.prototype._handleElementFocus):
1799         (WebInspector.CodeMirrorTextEditor.prototype.revealLine):
1800         (WebInspector.CodeMirrorTextEditor.prototype._coordsChar):
1801         (WebInspector.CodeMirrorTextEditor.prototype._topScrolledLine):
1802         (WebInspector.CodeMirrorTextEditor.prototype._bottomScrolledLine):
1803         (WebInspector.CodeMirrorTextEditor.prototype._scroll):
1804         (WebInspector.CodeMirrorTextEditor.prototype._selectionChange):
1805         (WebInspector.CodeMirrorTextEditor.prototype.scrollToLine):
1806         (WebInspector.CodeMirrorTextEditor.prototype.setSelection):
1807         (WebInspector.CodeMirrorTextEditor.prototype.copyRange):
1808         * inspector/front-end/TextEditor.js:
1809         (WebInspector.TextEditor.prototype.copyRange):
1810
1811 2013-03-22  Vsevolod Vlasov  <vsevik@chromium.org>
1812
1813         Web Inspector: [Regression] Editor scroll is not restored after inspector reload.
1814         https://bugs.webkit.org/show_bug.cgi?id=113027
1815
1816         Reviewed by Pavel Feldman.
1817
1818         * inspector/front-end/SourceFrame.js:
1819         (WebInspector.SourceFrame.prototype.wasShown):
1820         (WebInspector.SourceFrame.prototype._isEditorShowing):
1821         (WebInspector.SourceFrame.prototype._innerHighlightLineIfNeeded):
1822         (WebInspector.SourceFrame.prototype._innerRevealLineIfNeeded):
1823         (WebInspector.SourceFrame.prototype._innerScrollToLineIfNeeded):
1824         (WebInspector.SourceFrame.prototype._innerSetSelectionIfNeeded):
1825
1826 2013-03-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1827
1828         [Qt] Fix build with OPENCL 1.2
1829         https://bugs.webkit.org/show_bug.cgi?id=113056
1830
1831         Reviewed by Kenneth Rohde Christiansen.
1832
1833         Switch qmake checks to the modern style which means we can enable OpenCL with
1834         WEBKIT_CONFIG+=opencl. 
1835
1836         Upgrade OpenCL 1.1 clCreateImage2D to OpenCL 1.2 clCreateImage calls.
1837
1838         * Target.pri:
1839         * WebCore.pri:
1840         * platform/graphics/filters/FilterEffect.cpp:
1841         (WebCore::FilterEffect::createOpenCLImageResult):
1842         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
1843         (WebCore::FilterContextOpenCL::createOpenCLImage):
1844
1845 2013-03-22  ChangSeok Oh  <changseok.oh@collabora.com>
1846
1847         [GTK][AC] Opacity animation doesn't work with clutter backend
1848         https://bugs.webkit.org/show_bug.cgi?id=110347
1849
1850         Reviewed by Gustavo Noronha Silva.
1851
1852         The static casting in ternary operator doesn't change actual inputted argument type.
1853         So I replaced it with if-else statement.
1854
1855         Covered by existing animation tests.
1856
1857         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
1858         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
1859         (WebCore::PlatformClutterAnimation::addClutterKeyframeTransitionForProperty):
1860
1861 2013-03-22  ChangSeok Oh  <changseok.oh@collabora.com>
1862
1863         [GTK][AC] Add removing animations procedure with clutter ac backend
1864         https://bugs.webkit.org/show_bug.cgi?id=110607
1865
1866         Reviewed by Gustavo Noronha Silva.
1867
1868         This changes is based on mac port implementation. The only different thing is
1869         that updateAnimations is called explicitly in destructor of GraphicsLayerClutter
1870         to remove uncommitted animations. Because even though we call notifyFlushRequired
1871         to remove existing animations in removeAnimation(), removeClutterAnimationFromLayer
1872         has been never reached since the root layer is destroyed before. It means
1873         that we haven't lost a change to remove actual animations from clutterActor.
1874
1875         Covered by existing animation tests.
1876
1877         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
1878         (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter):
1879         (WebCore::GraphicsLayerClutter::removeAnimation):
1880         (WebCore):
1881         (WebCore::GraphicsLayerClutter::removeClutterAnimationFromLayer):
1882         * platform/graphics/clutter/GraphicsLayerClutter.h:
1883         (WebCore::GraphicsLayerClutter::animationIsRunning):
1884         (GraphicsLayerClutter):
1885
1886 2013-03-22  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1887
1888         [EFL][WebGL] Optimize AlphaOp for HTMLVideoElement input.
1889         https://bugs.webkit.org/show_bug.cgi?id=113049
1890
1891         Reviewed by Kenneth Rohde Christiansen.
1892
1893         Covered by existing tests.
1894
1895         Changeset 137397 implemented optimisation to avoid any
1896         unnecessary Unmultiply or Premultiply operation in unpack/pack
1897         provided the Image source is from HTMLVideoElement. This patch
1898         enables the same for EFL port.
1899
1900         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1901         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
1902
1903 2013-03-22  Tommy Widenflycht  <tommyw@google.com>
1904
1905         Clean up the speech recognintion API
1906         https://bugs.webkit.org/show_bug.cgi?id=112916
1907
1908         Reviewed by Adam Barth.
1909
1910         This patch cleans away deprecated parts, fixes so that stop() can be called more than once and adds
1911         the missing emma attribute on SpeechRecognitionEvent (which is always null).
1912
1913         Patch covered by existing tests.
1914
1915         * Modules/speech/SpeechRecognition.cpp:
1916         (WebCore::SpeechRecognition::stopFunction):
1917         (WebCore::SpeechRecognition::abort):
1918         (WebCore::SpeechRecognition::didEnd):
1919         (WebCore::SpeechRecognition::SpeechRecognition):
1920         * Modules/speech/SpeechRecognition.h:
1921         (SpeechRecognition):
1922         * Modules/speech/SpeechRecognitionEvent.cpp:
1923         (WebCore::SpeechRecognitionEvent::createResult):
1924         (WebCore::SpeechRecognitionEvent::createNoMatch):
1925         (WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
1926         * Modules/speech/SpeechRecognitionEvent.h:
1927         (WebCore):
1928         (SpeechRecognitionEventInit):
1929         (SpeechRecognitionEvent):
1930         (WebCore::SpeechRecognitionEvent::emma):
1931         * Modules/speech/SpeechRecognitionEvent.idl:
1932
1933 2013-03-22  Emil A Eklund  <eae@chromium.org>
1934
1935         Floor cell widths in AutoTableLayout::recalcColumn
1936         https://bugs.webkit.org/show_bug.cgi?id=112922
1937
1938         Reviewed by Levi Weintraub.
1939
1940         Table cells widths are floored to ensure even distribution of available
1941         space across columns. The code path that computes the width of the
1942         _table_ failed to take this into account and thus can over report the
1943         total width of the table.
1944
1945         Test: fast/sub-pixel/table-with-subpixel-cell-size.html
1946
1947         * rendering/AutoTableLayout.cpp:
1948         (WebCore::AutoTableLayout::recalcColumn): Floor width to match column sizing logic.
1949
1950 2013-03-22  David Kilzer  <ddkilzer@apple.com>
1951
1952         BUILD FIX (r146208): Export shouldPrintExceptions methods for iOS
1953
1954         Fixes the following build failure:
1955
1956             Undefined symbols for architecture i386:
1957               "__ZN7WebCore11PageConsole24setShouldPrintExceptionsEb", referenced from:
1958                     +[WebCoreStatistics setShouldPrintExceptions:] in WebCoreStatistics.o
1959               "__ZN7WebCore11PageConsole21shouldPrintExceptionsEv", referenced from:
1960                     +[WebCoreStatistics shouldPrintExceptions] in WebCoreStatistics.o
1961             ld: symbol(s) not found for architecture i386
1962             clang: error: linker command failed with exit code 1 (use -v to see invocation)
1963
1964         * WebCore.exp.in: Move symbols so they're exported for iOS as
1965         well.
1966
1967 2013-03-22  Yury Semikhatsky  <yurys@chromium.org>
1968
1969         Unreviewed. Fix Chromium Win compilation after r146583.
1970
1971         * bindings/v8/CustomElementHelpers.cpp:
1972         (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):
1973
1974 2013-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
1975
1976         Web Inspector: Flame Chart. Chart has to be zoomed around the mouse pointer.
1977         https://bugs.webkit.org/show_bug.cgi?id=113031
1978
1979         Reviewed by Yury Semikhatsky.
1980
1981         Overview grid is able to zoom around the mouse pointer.
1982         So the simplest way is to translate x coordinate of the mouse pointer hovered over the chart
1983         to x coordinate in term of overview window and pass it to the zoom function.
1984
1985         Minor unrelated fix: draw small border at bottom of the overview grid.
1986
1987         * inspector/front-end/FlameChart.js:
1988         (WebInspector.FlameChart.prototype._onMouseWheel):
1989         * inspector/front-end/OverviewGrid.js:
1990         (WebInspector.OverviewGrid.prototype.zoom):
1991         * inspector/front-end/flameChart.css:
1992         (#flame-chart-overview-container):
1993
1994 2013-03-22  No'am Rosenthal  <noam@webkit.org>
1995
1996         [Texmap] TextureMapperImageBuffer should not use rendering code for filters.
1997         https://bugs.webkit.org/show_bug.cgi?id=113040
1998
1999         Reviewed by Kenneth Rohde Christiansen.
2000
2001         Disable TextureMapperImageBuffer filters, until they can be done the right way.
2002         This should only disrupt accelerated filters in fallback mode, which is a very rare
2003         use case.
2004
2005         No new testable functionality.
2006
2007         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2008         (WebCore::BitmapTextureImageBuffer::applyFilters):
2009
2010 2013-03-22  Sergey Ryazanov  <serya@chromium.org>
2011
2012         Web Inspector: Report more CSS errors
2013         https://bugs.webkit.org/show_bug.cgi?id=113022
2014
2015         Reviewed by Pavel Feldman.
2016
2017         Reporting next few CSS syntax errors in declaration_list.
2018
2019         * css/CSSGrammar.y.in:
2020
2021 2013-03-18  Yury Semikhatsky  <yurys@chromium.org>
2022
2023         Web Inspector: use individual samples to construct CPU profile flame chart
2024         https://bugs.webkit.org/show_bug.cgi?id=112569
2025
2026         Reviewed by Pavel Feldman.
2027
2028         Added an optional array of samples to the CPU profile returned over the
2029         protocol. Each sample is id of the profile node corresponding to the top frame
2030         of the sample's stack trace. The array of samples if present is used to draw
2031         the flame chart on the CPU profile panel, otherwise flame chart is drawn based
2032         on the aggregated profile data.
2033
2034         * bindings/js/ScriptProfile.cpp:
2035         (WebCore::ScriptProfile::buildInspectorObjectForSamples):
2036         * bindings/js/ScriptProfile.h:
2037         (ScriptProfile):
2038         * bindings/v8/ScriptProfile.cpp:
2039         (WebCore::buildInspectorObjectFor):
2040         (WebCore):
2041         (WebCore::ScriptProfile::buildInspectorObjectForSamples):
2042         * bindings/v8/ScriptProfile.h:
2043         (ScriptProfile):
2044         * bindings/v8/ScriptProfiler.cpp:
2045         (WebCore::ScriptProfiler::start):
2046         * inspector/Inspector.json:
2047         * inspector/InspectorProfilerAgent.cpp:
2048         (WebCore::InspectorProfilerAgent::getCPUProfile):
2049         * inspector/front-end/CPUProfileView.js:
2050         (WebInspector.CPUProfileView.prototype._getCPUProfileCallback):
2051         (WebInspector.CPUProfileView.prototype._buildIdToNodeMap):
2052         * inspector/front-end/FlameChart.js:
2053         (WebInspector.FlameChart.prototype._calculateTimelineData):
2054
2055 2013-03-22  Steve Block  <steveblock@chromium.org>
2056
2057         Use generated bindings for the Coordinates type used by Geolocation
2058         https://bugs.webkit.org/show_bug.cgi?id=112975
2059
2060         Reviewed by Kentaro Hara.
2061
2062         No new tests, refactoring only.
2063
2064         * CMakeLists.txt:
2065         * GNUmakefile.list.am:
2066         * Modules/geolocation/Coordinates.cpp: Renamed from Source/WebCore/bindings/js/JSCoordinatesCustom.cpp.
2067         (WebCore):
2068         (WebCore::Coordinates::altitude):
2069         (WebCore::Coordinates::altitudeAccuracy):
2070         (WebCore::Coordinates::heading):
2071         (WebCore::Coordinates::speed):
2072         * Modules/geolocation/Coordinates.h:
2073         (Coordinates):
2074         * Modules/geolocation/Coordinates.idl:
2075         * Target.pri:
2076         * UseJSC.cmake:
2077         * UseV8.cmake:
2078         * WebCore.gypi:
2079         * WebCore.vcproj/WebCore.vcproj:
2080         * WebCore.vcxproj/WebCore.vcxproj:
2081         * WebCore.vcxproj/WebCore.vcxproj.filters:
2082         * WebCore.xcodeproj/project.pbxproj:
2083         * bindings/js/JSBindingsAllInOne.cpp:
2084         * bindings/v8/custom/V8CoordinatesCustom.cpp: Removed.
2085
2086 2013-03-22  Kunihiko Sakamoto  <ksakamoto@chromium.org>
2087
2088         INPUT_MULTIPLE_FIELDS_UI: Incomplete datetime format should fallback to default
2089         https://bugs.webkit.org/show_bug.cgi?id=113005
2090
2091         Reviewed by Kent Tamura.
2092
2093         Use fallback format when datetime format from locale is not complete.
2094
2095         Tests: fast/forms/date-multiple-fields/date-multiple-fields-fallback-format.html
2096                fast/forms/datetime-multiple-fields/datetime-multiple-fields-fallback-format.html
2097                fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-fallback-format.html
2098                fast/forms/month-multiple-fields/month-multiple-fields-fallback-format.html
2099                fast/forms/time-multiple-fields/time-multiple-fields-fallback-format.html
2100                fast/forms/week-multiple-fields/week-multiple-fields-fallback-format.html
2101
2102         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2103         (DateTimeFormatValidator): A helper class that parses datetime format and tests existence of fields.
2104         (WebCore::DateTimeFormatValidator::DateTimeFormatValidator):
2105         (WebCore::DateTimeFormatValidator::visitField):
2106         (WebCore::DateTimeFormatValidator::validateFormat): Parses datetime format and validates by calling BaseMultipleFieldsDateAndTimeInputType::isValidFormat.
2107         (WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue): Checks if dateTimeFormat is valid, and uses fallback format if not.
2108         * html/BaseMultipleFieldsDateAndTimeInputType.h:
2109         (BaseMultipleFieldsDateAndTimeInputType): Declare isValidFormat.
2110         * html/DateInputType.cpp:
2111         (WebCore::DateInputType::isValidFormat): Added.
2112         * html/DateInputType.h:
2113         (DateInputType):
2114         * html/DateTimeInputType.cpp:
2115         (WebCore::DateTimeInputType::isValidFormat): Added.
2116         * html/DateTimeInputType.h:
2117         (DateTimeInputType):
2118         * html/DateTimeLocalInputType.cpp:
2119         (WebCore::DateTimeLocalInputType::isValidFormat): Added.
2120         * html/DateTimeLocalInputType.h:
2121         (DateTimeLocalInputType):
2122         * html/MonthInputType.cpp:
2123         (WebCore::MonthInputType::isValidFormat): Added.
2124         * html/MonthInputType.h:
2125         (MonthInputType):
2126         * html/TimeInputType.cpp:
2127         (WebCore::TimeInputType::isValidFormat): Added.
2128         * html/TimeInputType.h:
2129         (TimeInputType):
2130         * html/WeekInputType.cpp:
2131         (WebCore::WeekInputType::isValidFormat): Added.
2132         * html/WeekInputType.h:
2133         (WeekInputType):
2134
2135 2013-03-22  Hajime Morrita  <morrita@google.com>
2136
2137         Custom Elements: "readyCallback" lifecycle callback should be called.
2138         https://bugs.webkit.org/show_bug.cgi?id=112538
2139
2140         Reviewed by Elliott Sprehn.
2141
2142         This change allows each custom element definition to hook up its instantiation,
2143         namely "readyCallback" lifecycle callback.
2144
2145         The change has two parts:
2146         - 1. Tracking which Element objects to be created.
2147         - 2. Invoking appropriate JavaScript functions, which are readyCallback(),
2148           before the Element object is visible from page script.
2149
2150         For 1, CustomElementRegistry maintains list of "callback
2151         invocaions".  Each list item ("invocation") tracks the element
2152         which has a lifecycle callback to be invoked. Each invocation is
2153         registered when - Any custom element C++ object is instantiated.
2154         See changes on CustomElementConstructor.cpp.
2155
2156         This also happens when @is attribute is set by the parser or node
2157         cloning routine, which can turn a non-custom element into a
2158         type-extended custom element. See changes on Element.cpp.
2159
2160         For 2, CustomElementRegistry basically follows what
2161         MutationObserver is doing, and introduces a method called
2162         deliverLifecycleCallbacks(). This function flushes all pending
2163         callback invocations. You can think it as a dual of
2164         MutationObserver::deliverAllMutations().
2165
2166         The delivery function is called places where MutationObserver's
2167         deliverAllMutations() is called. In addition, it is also called
2168         just before returning from a set of DOM APIs. For example, it is
2169         called just before createElement() returns, so that possibly
2170         created custom element becomes ready through its readyCallback().
2171         Such APIs get "V8DeliverCustomElementCallbacks" IDL attribute. In
2172         principle, APIs which can create new custom element instnaces are
2173         marked. See CustomElementRegistry::CallbackDeliveryScope and
2174         changes on CodeGeneratorV8.pm.
2175
2176         We need this extra work because the readyCallback() needs to give
2177         an illusion so that JavaScript programmers feel like the
2178         readyCallback() callback being called just after it is created,
2179         instead of called on arbitrary late timing like MutationObserver
2180         notifications.
2181
2182         Tests: fast/dom/custom/lifecycle-ready-createElement-recursion.html
2183                fast/dom/custom/lifecycle-ready-createElement-reentrancy.html
2184                fast/dom/custom/lifecycle-ready-creation-api.html
2185                fast/dom/custom/lifecycle-ready-innerHTML.html
2186                fast/dom/custom/lifecycle-ready-parser-only.html
2187                fast/dom/custom/lifecycle-ready-parser-script.html
2188                fast/dom/custom/lifecycle-ready-paste.html
2189
2190         * bindings/scripts/CodeGeneratorV8.pm:
2191         - Hooked up CallbackDeliveryScope through V8DeliverCustomElementCallbacks attriute.
2192         (GenerateCustomElementInvocationScopeIfNeeded):
2193         (GenerateNormalAttrSetter):
2194         (GenerateFunction):
2195         * bindings/scripts/IDLAttributes.txt:
2196         * bindings/v8/CustomElementHelpers.cpp:
2197         (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):
2198         (WebCore::CustomElementHelpers::invokeReadyCallbacksIfNeeded):
2199         * bindings/v8/CustomElementHelpers.h:
2200         (CustomElementHelpers):
2201         * bindings/v8/V8RecursionScope.cpp: Added deliverAllLifecycleCallbacks()
2202         (WebCore::V8RecursionScope::didLeaveScriptContext):
2203         * dom/CustomElementConstructor.cpp:
2204         (WebCore::CustomElementConstructor::createElement):
2205         (WebCore::CustomElementConstructor::createElementInternal):
2206         * dom/CustomElementConstructor.h:
2207         (WebCore::CustomElementConstructor::isExtended):
2208         (CustomElementConstructor):
2209         * dom/CustomElementRegistry.cpp: Adding element tracking and invocation execution.
2210         (WebCore::CustomElementInvocation::CustomElementInvocation):
2211         (WebCore::CustomElementInvocation::~CustomElementInvocation):
2212         (WebCore::activeCustomElementRegistries):
2213         (WebCore::CustomElementRegistry::~CustomElementRegistry):
2214         (WebCore::CustomElementRegistry::didGiveTypeExtension):
2215         (WebCore::CustomElementRegistry::didCreateElement):
2216         (WebCore::CustomElementRegistry::activate):
2217         (WebCore::CustomElementRegistry::deactivate):
2218         (WebCore::CustomElementRegistry::deliverLifecycleCallbacks):
2219         (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacks):
2220         * dom/CustomElementRegistry.h:
2221         (CustomElementInvocation):
2222         (WebCore::CustomElementInvocation::element):
2223         (CallbackDeliveryScope):
2224         (WebCore::CustomElementRegistry::CallbackDeliveryScope::CallbackDeliveryScope):
2225         (WebCore::CustomElementRegistry::CallbackDeliveryScope::~CallbackDeliveryScope):
2226         (CustomElementRegistry):
2227         (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacksIfNeeded):
2228         * dom/Document.cpp:
2229         (WebCore::Document::createElement):
2230         (WebCore::Document::didCreateCustomElement):
2231         * dom/Document.h:
2232         (Document):
2233         * dom/Document.idl:
2234         * dom/Element.cpp:
2235         (WebCore::Element::attributeChangedFromParserOrByCloning): Added to catch @is attribute
2236         (WebCore::Element::parserSetAttributes):
2237         (WebCore::Element::cloneAttributesFromElement):
2238         * dom/Element.h:
2239         * dom/Node.idl:
2240         * dom/ShadowRoot.idl:
2241         * html/HTMLElement.idl:
2242         * html/parser/HTMLScriptRunner.cpp: Added deliverAllLifecycleCallbacks()
2243         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
2244         (WebCore::HTMLScriptRunner::runScript):
2245
2246 2013-03-22  Tommy Widenflycht  <tommyw@google.com>
2247
2248         MediaStream API: Finalize the RTCPeerConnection states
2249         https://bugs.webkit.org/show_bug.cgi?id=112792
2250
2251         Reviewed by Adam Barth.
2252
2253         This patch finalized the RTCPeerConnection state and events. These changes
2254         have not yet pushed out to the editors draft; but they are uncontroversial
2255         and agreed upon.
2256
2257         readyState will be deleted; please use the replacement signalingState which is already available.
2258         onstatechange -> onsignalingstatechange
2259         onicechange -> oniceconnectionstatechange
2260         ongatheringchange will be deleted since oniceconnectionstatechange can be used for the same purpose.
2261         RTCIceConnectionState::"starting" -> RTCIceConnectionState::"new"
2262
2263         Patch covered by modified tests.
2264
2265         * Modules/mediastream/RTCPeerConnection.cpp:
2266         (WebCore::RTCPeerConnection::RTCPeerConnection):
2267         (WebCore::RTCPeerConnection::iceConnectionState):
2268         (WebCore::RTCPeerConnection::changeSignalingState):
2269         (WebCore::RTCPeerConnection::changeIceGatheringState):
2270         (WebCore::RTCPeerConnection::changeIceConnectionState):
2271         * Modules/mediastream/RTCPeerConnection.h:
2272         (RTCPeerConnection):
2273         * Modules/mediastream/RTCPeerConnection.idl:
2274         * dom/EventNames.h:
2275         (WebCore):
2276         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
2277
2278 2013-03-22  Mike West  <mkwst@chromium.org>
2279
2280         Prefer 'KURL(ParsedURLString, String)' when dealing with known-good data.
2281         https://bugs.webkit.org/show_bug.cgi?id=112965
2282
2283         Reviewed by Alexey Proskuryakov.
2284
2285         In https://bugs.webkit.org/show_bug.cgi?id=112783#c6, Adam noted that
2286         it would be possible to use 'KURL(ParsedURLString, [url])' rather than
2287         'KURL(KURL(), [url])', since we knew that the URL in question is a
2288         value and absolute URL. This patch fixes the obvious instances of this
2289         pattern; there are several more 'KURL(KURL(), String)' calls in
2290         WebCore but these were the only places I was reasonably sure that bad
2291         data couldn't creep in.
2292
2293         * dom/Document.cpp:
2294         (WebCore::Document::updateBaseURL):
2295             'documentURI' is pulled from 'url()->string()'. It's safe.
2296         * page/ContentSecurityPolicy.cpp:
2297         (WebCore::gatherSecurityPolicyViolationEventData):
2298         (WebCore::ContentSecurityPolicy::reportViolation):
2299             'CallFrame::sourceURL()' is a known valid/absolute URL.
2300         * page/SecurityOrigin.cpp:
2301         (WebCore::SecurityOrigin::createFromDatabaseIdentifier):
2302         (WebCore::SecurityOrigin::create):
2303             The strings constructed here are certainly valid.
2304
2305 2013-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
2306
2307         Web Inspector: Flame Chart. move overview window when user scrolls the chart.
2308         https://bugs.webkit.org/show_bug.cgi?id=113014
2309
2310         Reviewed by Yury Semikhatsky.
2311
2312         I found that I could use scaling mechanics in OverviewGrid for scaling the chart.
2313         But the dragging part was not so simple due to the different approaches in
2314         OverviewGrid and FlameChart. OverviewGrid used _windowLeft and _windowRight
2315         when FlameChart used _xOffset and _xScaleFactor and width.
2316         It was not practical and I rewrote the FlameChart mechanics
2317         and now it also uses _windowLeft _windowRight.
2318
2319         * inspector/front-end/FlameChart.js:
2320         (WebInspector.FlameChart):
2321         (WebInspector.FlameChart.Calculator.prototype._updateBoundaries):
2322         (WebInspector.FlameChart.Calculator.prototype.computePosition):
2323         (WebInspector.FlameChart.prototype._onWindowChanged):
2324         (WebInspector.FlameChart.prototype._startCanvasDragging):
2325         (WebInspector.FlameChart.prototype._canvasDragging):
2326         (WebInspector.FlameChart.prototype._onMouseMove):
2327         (WebInspector.FlameChart.prototype._onMouseWheel):
2328         (WebInspector.FlameChart.prototype._coordinatesToNodeIndex):
2329         (WebInspector.FlameChart.prototype._drawOverviewCanvas):
2330         (WebInspector.FlameChart.prototype.draw):
2331         (WebInspector.FlameChart.prototype._updateBoundaries):
2332         (WebInspector.FlameChart.prototype.update):
2333         * inspector/front-end/OverviewGrid.js:
2334         (WebInspector.OverviewGrid.prototype.setWindowPosition):
2335         (WebInspector.OverviewGrid.prototype.setWindow):
2336         (WebInspector.OverviewGrid.prototype.addEventListener):
2337         (WebInspector.OverviewGrid.prototype.zoom):
2338         (WebInspector.OverviewGrid.Window.prototype._zoom):
2339         * inspector/front-end/inspectorCommon.css:
2340         (.overview-grid-window-rulers):
2341
2342 2013-03-22  Steve Block  <steveblock@chromium.org>
2343
2344         Move GeolocationClient.h to Modules/geolocation/
2345         https://bugs.webkit.org/show_bug.cgi?id=112997
2346
2347         Reviewed by Kentaro Hara.
2348
2349         No new tests, no functional change.
2350
2351         * GNUmakefile.list.am:
2352         * Modules/geolocation/GeolocationClient.h: Renamed from Source/WebCore/page/GeolocationClient.h.
2353         (WebCore):
2354         (GeolocationClient):
2355         (WebCore::GeolocationClient::~GeolocationClient):
2356         * WebCore.vcproj/WebCore.vcproj:
2357         * WebCore.vcxproj/WebCore.vcxproj:
2358         * WebCore.vcxproj/WebCore.vcxproj.filters:
2359         * WebCore.xcodeproj/project.pbxproj:
2360
2361 2013-03-22  Sheriff Bot  <webkit.review.bot@gmail.com>
2362
2363         Unreviewed, rolling out r146534 and r146565.
2364         http://trac.webkit.org/changeset/146534
2365         http://trac.webkit.org/changeset/146565
2366         https://bugs.webkit.org/show_bug.cgi?id=113017
2367
2368         "r146534 caused perf regression on Chromium Linux x64"
2369         (Requested by yurys on #webkit).
2370
2371         * bindings/scripts/CodeGeneratorV8.pm:
2372         (GenerateNormalAttrSetter):
2373         (GenerateOverloadedFunction):
2374         (GenerateFunctionCallback):
2375         (GenerateFunction):
2376         (GenerateParametersCheck):
2377         (GenerateSingleConstructorCallback):
2378         (GenerateNonStandardFunction):
2379         (GenerateImplementation):
2380         (GenerateFunctionCallString):
2381         * bindings/scripts/IDLAttributes.txt:
2382         * bindings/scripts/test/V8/V8Float64Array.cpp:
2383         (WebCore):
2384         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2385         (WebCore):
2386         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2387         (WebCore):
2388         * bindings/scripts/test/V8/V8TestInterface.cpp:
2389         (WebCore):
2390         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2391         (WebCore):
2392         * bindings/scripts/test/V8/V8TestObj.cpp:
2393         (WebCore):
2394         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2395         (WebCore):
2396         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
2397         (WebCore):
2398         * bindings/v8/CustomElementHelpers.cpp:
2399         * bindings/v8/CustomElementHelpers.h:
2400         (WebCore):
2401         (CustomElementHelpers):
2402         * bindings/v8/V8DOMConfiguration.cpp:
2403         (WebCore::V8DOMConfiguration::batchConfigureCallbacks):
2404         (WebCore::V8DOMConfiguration::configureTemplate):
2405         * bindings/v8/V8DOMConfiguration.h:
2406         (BatchedMethod):
2407         (V8DOMConfiguration):
2408         * bindings/v8/V8RecursionScope.cpp:
2409         (WebCore::V8RecursionScope::didLeaveScriptContext):
2410         * dom/CustomElementConstructor.cpp:
2411         (WebCore::CustomElementConstructor::createElement):
2412         * dom/CustomElementConstructor.h:
2413         (CustomElementConstructor):
2414         * dom/CustomElementRegistry.cpp:
2415         (WebCore::CustomElementRegistry::~CustomElementRegistry):
2416         * dom/CustomElementRegistry.h:
2417         (WebCore):
2418         (CustomElementRegistry):
2419         * dom/Document.cpp:
2420         (WebCore::Document::createElement):
2421         (WebCore::Document::registerElement):
2422         * dom/Document.h:
2423         * dom/Document.idl:
2424         * dom/Element.cpp:
2425         (WebCore::Element::parserSetAttributes):
2426         (WebCore::Element::cloneAttributesFromElement):
2427         * dom/Element.h:
2428         * dom/Element.idl:
2429         * dom/Node.idl:
2430         * dom/ShadowRoot.idl:
2431         * html/HTMLElement.idl:
2432         * html/parser/HTMLScriptRunner.cpp:
2433         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
2434         (WebCore::HTMLScriptRunner::runScript):
2435
2436 2013-03-22  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
2437
2438         [GStreamer] Memory leak in AudioFileReader::createBus()
2439         https://bugs.webkit.org/show_bug.cgi?id=112925
2440
2441         Reviewed by Martin Robinson.
2442
2443         Adopt the reference returned by g_timeout_source_new()
2444         to fix a memory leak.
2445
2446         No new tests. No change in behavior.
2447
2448         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
2449         (WebCore::AudioFileReader::createBus):
2450
2451 2013-03-22  Steve Block  <steveblock@chromium.org>
2452
2453         Move page/Coordinates.[h|idl] to Modules/geolocation/
2454         https://bugs.webkit.org/show_bug.cgi?id=112945
2455
2456         Reviewed by Kentaro Hara.
2457
2458         No new tests, no functional change.
2459
2460         * CMakeLists.txt:
2461         * DerivedSources.make:
2462         * DerivedSources.pri:
2463         * GNUmakefile.list.am:
2464         * Modules/geolocation/Coordinates.h: Renamed from Source/WebCore/page/Coordinates.h.
2465         (WebCore):
2466         (Coordinates):
2467         (WebCore::Coordinates::create):
2468         (WebCore::Coordinates::isolatedCopy):
2469         (WebCore::Coordinates::latitude):
2470         (WebCore::Coordinates::longitude):
2471         (WebCore::Coordinates::altitude):
2472         (WebCore::Coordinates::accuracy):
2473         (WebCore::Coordinates::altitudeAccuracy):
2474         (WebCore::Coordinates::heading):
2475         (WebCore::Coordinates::speed):
2476         (WebCore::Coordinates::canProvideAltitude):
2477         (WebCore::Coordinates::canProvideAltitudeAccuracy):
2478         (WebCore::Coordinates::canProvideHeading):
2479         (WebCore::Coordinates::canProvideSpeed):
2480         (WebCore::Coordinates::Coordinates):
2481         * Modules/geolocation/Coordinates.idl: Renamed from Source/WebCore/page/Coordinates.idl.
2482         * Target.pri:
2483         * WebCore.gypi:
2484         * WebCore.vcproj/WebCore.vcproj:
2485         * WebCore.vcxproj/WebCore.vcxproj:
2486         * WebCore.vcxproj/WebCore.vcxproj.filters:
2487         * WebCore.xcodeproj/project.pbxproj:
2488
2489 2013-03-21  Hajime Morrita  <morrita@google.com>
2490
2491         Custom Elements: "readyCallback" lifecycle callback should be called.
2492         https://bugs.webkit.org/show_bug.cgi?id=112538
2493
2494         Reviewed by Elliott Sprehn.
2495
2496         This change allows each custom element definition to hook up its instantiation,
2497         namely "readyCallback" lifecycle callback.
2498
2499         The change has two parts:
2500         - 1. Tracking which Element objects to be created.
2501         - 2. Invoking appropriate JavaScript functions, which are readyCallback(),
2502           before the Element object is visible from page script.
2503
2504         For 1, CustomElementRegistry maintains list of "callback
2505         invocaions".  Each list item ("invocation") tracks the element
2506         which has a lifecycle callback to be invoked. Each invocation is
2507         registered when - Any custom element C++ object is instantiated.
2508         See changes on CustomElementConstructor.cpp.
2509
2510         This also happens when @is attribute is set by the parser or node
2511         cloning routine, which can turn a non-custom element into a
2512         type-extended custom element. See changes on Element.cpp.
2513
2514         For 2, CustomElementRegistry basically follows what
2515         MutationObserver is doing, and introduces a method called
2516         deliverLifecycleCallbacks(). This function flushes all pending
2517         callback invocations. You can think it as a dual of
2518         MutationObserver::deliverAllMutations().
2519
2520         The delivery function is called places where MutationObserver's
2521         deliverAllMutations() is called. In addition, it is also called
2522         just before returning from a set of DOM APIs. For example, it is
2523         called just before createElement() returns, so that possibly
2524         created custom element becomes ready through its readyCallback().
2525         Such APIs get "V8DeliverCustomElementCallbacks" IDL attribute. In
2526         principle, APIs which can create new custom element instnaces are
2527         marked. See CustomElementRegistry::CallbackDeliveryScope and
2528         changes on CodeGeneratorV8.pm.
2529
2530         We need this extra work because the readyCallback() needs to give
2531         an illusion so that JavaScript programmers feel like the
2532         readyCallback() callback being called just after it is created,
2533         instead of called on arbitrary late timing like MutationObserver
2534         notifications.
2535
2536         Tests: fast/dom/custom/lifecycle-ready-createElement-recursion.html
2537                fast/dom/custom/lifecycle-ready-createElement-reentrancy.html
2538                fast/dom/custom/lifecycle-ready-creation-api.html
2539                fast/dom/custom/lifecycle-ready-innerHTML.html
2540                fast/dom/custom/lifecycle-ready-parser-only.html
2541                fast/dom/custom/lifecycle-ready-parser-script.html
2542                fast/dom/custom/lifecycle-ready-paste.html
2543
2544         * bindings/scripts/CodeGeneratorV8.pm:
2545         - Hooked up CallbackDeliveryScope through V8DeliverCustomElementCallbacks attriute.
2546         (GenerateCustomElementInvocationScopeIfNeeded):
2547         (GenerateNormalAttrSetter):
2548         (GenerateFunction):
2549         * bindings/scripts/IDLAttributes.txt:
2550         * bindings/v8/CustomElementHelpers.cpp:
2551         (WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):
2552         (WebCore::CustomElementHelpers::invokeReadyCallbacksIfNeeded):
2553         * bindings/v8/CustomElementHelpers.h:
2554         (CustomElementHelpers):
2555         * bindings/v8/V8RecursionScope.cpp: Added deliverAllLifecycleCallbacks()
2556         (WebCore::V8RecursionScope::didLeaveScriptContext):
2557         * dom/CustomElementConstructor.cpp:
2558         (WebCore::CustomElementConstructor::createElement):
2559         (WebCore::CustomElementConstructor::createElementInternal):
2560         * dom/CustomElementConstructor.h:
2561         (WebCore::CustomElementConstructor::isExtended):
2562         (CustomElementConstructor):
2563         * dom/CustomElementRegistry.cpp: Adding element tracking and invocation execution.
2564         (WebCore::CustomElementInvocation::CustomElementInvocation):
2565         (WebCore::CustomElementInvocation::~CustomElementInvocation):
2566         (WebCore::activeCustomElementRegistries):
2567         (WebCore::CustomElementRegistry::~CustomElementRegistry):
2568         (WebCore::CustomElementRegistry::didGiveTypeExtension):
2569         (WebCore::CustomElementRegistry::didCreateElement):
2570         (WebCore::CustomElementRegistry::activate):
2571         (WebCore::CustomElementRegistry::deactivate):
2572         (WebCore::CustomElementRegistry::deliverLifecycleCallbacks):
2573         (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacks):
2574         * dom/CustomElementRegistry.h:
2575         (CustomElementInvocation):
2576         (WebCore::CustomElementInvocation::element):
2577         (CallbackDeliveryScope):
2578         (WebCore::CustomElementRegistry::CallbackDeliveryScope::CallbackDeliveryScope):
2579         (WebCore::CustomElementRegistry::CallbackDeliveryScope::~CallbackDeliveryScope):
2580         (CustomElementRegistry):
2581         (WebCore::CustomElementRegistry::deliverAllLifecycleCallbacksIfNeeded):
2582         * dom/Document.cpp:
2583         (WebCore::Document::createElement):
2584         (WebCore::Document::didCreateCustomElement):
2585         * dom/Document.h:
2586         (Document):
2587         * dom/Document.idl:
2588         * dom/Element.cpp:
2589         (WebCore::Element::attributeChangedFromParserOrByCloning): Added to catch @is attribute
2590         (WebCore::Element::parserSetAttributes):
2591         (WebCore::Element::cloneAttributesFromElement):
2592         * dom/Element.h:
2593         * dom/Node.idl:
2594         * dom/ShadowRoot.idl:
2595         * html/HTMLElement.idl:
2596         * html/parser/HTMLScriptRunner.cpp: Added deliverAllLifecycleCallbacks()
2597         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
2598         (WebCore::HTMLScriptRunner::runScript):
2599
2600 2013-03-21  Jer Noble  <jer.noble@apple.com>
2601
2602         Crash in WebCore::MediaPlayer::cachedResourceLoader + 4
2603         https://bugs.webkit.org/show_bug.cgi?id=112977
2604
2605         Reviewed by Geoffrey Garen.
2606
2607         Speculative fix for a NULL-dereference crash. MediaPlayerPrivateAVFoundationObjC is the
2608         sole owner of a WebCoreAVFLoaderDelegate instance. It releases this instance in its destructor,
2609         but it is possible that, on another thread, the AVAssetResourceLoader has already begun
2610         using the delegate and in so doing has retained it. By the time the delegate method is fired
2611         on the main thread, the MediaPlayerPrivateAVFoundationObjC owner of the delegate has already
2612         been deleted, and the delegate's m_callback pointer is now pointing at freed memory.
2613
2614         In addition to calling -[AVAssetResourceLoader setDelegate:queue:] to avoid any not-yet-started
2615         delegate callbacks, MediaPlayerPrivateAVFoundationObjC should clear the WebCoreAVFLoaderDelegate
2616         m_callback ivar, to avoid calling into freed memory for already queued delegate callbacks.
2617
2618         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2619         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Clear the m_loaderDelegate's callback pointer.
2620         (-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]): Check the value of m_callback before continuing.
2621         (-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]): Ditto.
2622         (-[WebCoreAVFLoaderDelegate setCallback:]): Added simple setter.
2623
2624 2013-03-21  Takashi Sakamoto  <tasak@google.com>
2625
2626         XMLDocumentParser doesn't parse <template> correctly.
2627         https://bugs.webkit.org/show_bug.cgi?id=112328
2628
2629         Reviewed by Hajime Morrita.
2630
2631         XMLDocumentParser should check whether a parent node is attached or not
2632         when a new element is appended.
2633
2634         Test: fast/dom/HTMLTemplateElement/xhtml-with-titleElement-parsing-crash.xhtml
2635
2636         * xml/parser/XMLDocumentParserLibxml2.cpp:
2637         (WebCore::XMLDocumentParser::startElementNs):
2638         m_currentNode is a parent node of newElement, but it is updated by
2639         pushCurrentNode. So firstly stored copied m_curretNode's value into
2640         local currentNode and used the currentNode to check whether
2641         newElement's parent is attached or not.
2642
2643 2013-03-21  David Grogan  <dgrogan@chromium.org>
2644
2645         Unreviewed, rolling out r146560.
2646         http://trac.webkit.org/changeset/146560
2647         https://bugs.webkit.org/show_bug.cgi?id=112862
2648
2649         invalid parameter to histogram
2650
2651         * platform/leveldb/LevelDBDatabase.cpp:
2652         (WebCore::LevelDBDatabase::open):
2653
2654 2013-03-21  David Grogan  <dgrogan@chromium.org>
2655
2656         IndexedDB: Histogram available disk space on attempt to open database
2657         https://bugs.webkit.org/show_bug.cgi?id=112862
2658
2659         Reviewed by Adam Barth.
2660
2661         ChromeOS suspects they might be hitting disk corruption when the disks
2662         are nearly full. This patch logs the available space to either the
2663         "success" or the "fail" histogram as appropriate so that the
2664         distributions can be compared.
2665
2666         No new tests - I don't know of a good way to test histograms. Local
2667         printf testing didn't turn up any bugs.
2668
2669         * platform/leveldb/LevelDBDatabase.cpp:
2670         (WebCore::HistogramFreeSpace):
2671         (WebCore):
2672         (WebCore::LevelDBDatabase::open):
2673
2674 2013-03-21  Li Yin  <li.yin@intel.com>
2675
2676         FileAPI: Remove deprecation warning when ArrayBuffer is in Blob constructor.
2677         https://bugs.webkit.org/show_bug.cgi?id=88389
2678
2679         Reviewed by Kenneth Russell.
2680
2681         Spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
2682         Both ArrayBuffer and ArrayBufferView should be supported for Blob constructor.
2683
2684         Test: fast/files/blob-constructor.html.
2685
2686         * bindings/js/JSBlobCustom.cpp:
2687         (WebCore::JSBlobConstructor::constructJSBlob):
2688         * bindings/v8/custom/V8BlobCustom.cpp:
2689         (WebCore::V8Blob::constructorCustom):
2690         * fileapi/WebKitBlobBuilder.cpp:
2691         (WebCore::BlobBuilder::append): Remove the deprecated warning.
2692         * fileapi/WebKitBlobBuilder.h:
2693         (WebCore):
2694         (BlobBuilder):
2695
2696 2013-03-21  Takashi Sakamoto  <tasak@google.com>
2697
2698         [Shadow]: @host styles are not applied dynamically
2699         https://bugs.webkit.org/show_bug.cgi?id=112869
2700
2701         Reviewed by Elliott Sprehn.
2702
2703         Need to add features of @host @-rules to rule feature set.
2704
2705         Test: fast/dom/shadow/athost-apply-dynamically.html
2706
2707         * css/StyleScopeResolver.cpp:
2708         (WebCore::StyleScopeResolver::collectFeaturesTo):
2709
2710 2013-03-21  Hayato Ito  <hayato@chromium.org>
2711
2712         [Shadow] Provide an api of insertionParent().
2713         https://bugs.webkit.org/show_bug.cgi?id=112866
2714
2715         Add insertinParent binding to Element and Text.
2716         It's prefixed (webkitInsertionParent) and guarded by SHADOW_DOM flag.
2717
2718         The bug in the Shadow DOM spec is here:
2719         https://www.w3.org/Bugs/Public/show_bug.cgi?id=21067
2720
2721         Reviewed by Dimitri Glazkov.
2722
2723         Test: fast/dom/shadow/insertion-parent.html
2724
2725         * dom/Element.idl:
2726         * dom/Node.cpp:
2727         (WebCore::Node::insertionParentForBinding):
2728         (WebCore):
2729         * dom/Node.h:
2730         (Node):
2731         * dom/Text.idl:
2732
2733 2013-03-21  Tom Sepez  <tsepez@chromium.org>
2734
2735         Bypass XSSAuditor for asp.net servers.
2736         https://bugs.webkit.org/show_bug.cgi?id=112235
2737
2738         Reviewed by Adam Barth.
2739
2740         Similar to https://bugs.webkit.org/show_bug.cgi?id=81283, but the 
2741         fix to that bug failed to cover this particular comma-splicing case.
2742         
2743         Test: http/tests/security/xssAuditor/img-tag-with-comma.html
2744
2745         * html/parser/XSSAuditor.cpp:
2746         (WebCore::isTerminatingCharacter):
2747         Beware of comma-splicing tricks by stopping at commas.
2748
2749 2013-03-21  Brady Eidson  <beidson@apple.com>
2750
2751         If a previously loaded resource is later stored to the disk cache, replace the buffer with MMAP'ed memory.
2752         <rdar://problem/13414154> and https://bugs.webkit.org/show_bug.cgi?id=112943
2753
2754         Reviewed by Geoff Garen.
2755
2756         No new tests (No change in behavior.)
2757
2758         Give SharedBuffer the ability to replace its contents from another SharedBuffer:
2759         * platform/SharedBuffer.h:
2760         * platform/cf/SharedBufferCF.cpp:
2761         (WebCore::SharedBuffer:: tryReplaceContentsWithPlatformBuffer):
2762
2763         Forward along SharedBuffer's new ability to ResourceBuffer:
2764         * loader/mac/ResourceBuffer.mm:
2765         (WebCore::ResourceBuffer:: tryReplaceSharedBufferContents):
2766         * loader/ResourceBuffer.h:
2767
2768         Give CachedResource the ability to replace its encoded data buffer if appropriate:
2769         * loader/cache/CachedResource.cpp:
2770         (WebCore::CachedResource:: tryReplaceEncodedData):
2771         * loader/cache/CachedResource.h:
2772
2773         * WebCore.exp.in:
2774
2775 2013-03-21  Joshua Bell  <jsbell@chromium.org>
2776
2777         IndexedDB: Ensure script wrappers can be collected after context is stopped
2778         https://bugs.webkit.org/show_bug.cgi?id=112976
2779
2780         Reviewed by Adam Barth.
2781
2782         ActiveDOMObject::hasPendingActivity is called to see if script wrappers
2783         can be disposed of. Once the script execution context has stopped they
2784         should be free to go - include this in the checks.
2785
2786         No new tests - suggestions welcome.
2787
2788         * Modules/indexeddb/IDBDatabase.cpp:
2789         (WebCore::IDBDatabase::hasPendingActivity): Return false if stopped.
2790         (WebCore::IDBDatabase::stop): Don't bother calling empty super impl.
2791         * Modules/indexeddb/IDBRequest.cpp:
2792         (WebCore::IDBRequest::hasPendingActivity): Return false if stopped.
2793         (WebCore::IDBRequest::stop): Don't bother calling empty super impl.
2794         * Modules/indexeddb/IDBTransaction.cpp:
2795         (WebCore::IDBTransaction::hasPendingActivity): Return false if stopped.
2796         (WebCore::IDBTransaction::stop): Don't bother calling empty super impl.
2797
2798 2013-03-21  Russell McClellan  <russell.mcclellan@gmail.com>
2799
2800         Remove upcastPointer from ActiveDOMObject constructor
2801         https://bugs.webkit.org/show_bug.cgi?id=112858
2802
2803         Reviewed by Alexey Proskuryakov.
2804
2805         Removed pesky argument to ActiveDOMObject constructor that is no longer
2806         used.
2807
2808         No new tests (no change in behavior).
2809
2810         * Modules/battery/BatteryManager.cpp:
2811         (WebCore::BatteryManager::BatteryManager):
2812         * Modules/filesystem/DOMFileSystem.cpp:
2813         (WebCore::DOMFileSystem::DOMFileSystem):
2814         * Modules/filesystem/FileWriter.cpp:
2815         (WebCore::FileWriter::FileWriter):
2816         * Modules/geolocation/Geolocation.cpp:
2817         (WebCore::Geolocation::Geolocation):
2818         * Modules/indexeddb/IDBDatabase.cpp:
2819         (WebCore::IDBDatabase::IDBDatabase):
2820         * Modules/indexeddb/IDBRequest.cpp:
2821         (WebCore::IDBRequest::IDBRequest):
2822         * Modules/indexeddb/IDBTransaction.cpp:
2823         (WebCore::IDBTransaction::IDBTransaction):
2824         * Modules/mediasource/MediaSource.cpp:
2825         (WebCore::MediaSource::MediaSource):
2826         * Modules/mediastream/MediaStreamTrack.cpp:
2827         (WebCore::MediaStreamTrack::MediaStreamTrack):
2828         * Modules/mediastream/RTCDTMFSender.cpp:
2829         (WebCore::RTCDTMFSender::RTCDTMFSender):
2830         * Modules/mediastream/RTCPeerConnection.cpp:
2831         (WebCore::RTCPeerConnection::RTCPeerConnection):
2832         * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
2833         (WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl):
2834         * Modules/mediastream/RTCStatsRequestImpl.cpp:
2835         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
2836         * Modules/mediastream/RTCVoidRequestImpl.cpp:
2837         (WebCore::RTCVoidRequestImpl::RTCVoidRequestImpl):
2838         * Modules/networkinfo/NetworkInfoConnection.cpp:
2839         (WebCore::NetworkInfoConnection::NetworkInfoConnection):
2840         * Modules/notifications/Notification.cpp:
2841         (WebCore::Notification::Notification):
2842         * Modules/notifications/NotificationCenter.cpp:
2843         (WebCore::NotificationCenter::NotificationCenter):
2844         * Modules/speech/SpeechRecognition.cpp:
2845         (WebCore::SpeechRecognition::SpeechRecognition):
2846         * Modules/webaudio/AudioContext.cpp:
2847         (WebCore::AudioContext::AudioContext):
2848         * Modules/webdatabase/DatabaseContext.cpp:
2849         (WebCore::DatabaseContext::DatabaseContext):
2850         * Modules/websockets/WebSocket.cpp:
2851         (WebCore::WebSocket::WebSocket):
2852         * css/FontLoader.cpp:
2853         (WebCore::FontLoader::FontLoader):
2854         * dom/ActiveDOMObject.cpp:
2855         (WebCore::ActiveDOMObject::ActiveDOMObject):
2856         * dom/ActiveDOMObject.h:
2857         (ActiveDOMObject):
2858         * dom/ScriptExecutionContext.cpp:
2859         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
2860         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
2861         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
2862         (WebCore::ScriptExecutionContext::stopActiveDOMObjects):
2863         (WebCore::ScriptExecutionContext::didCreateActiveDOMObject):
2864         * dom/ScriptExecutionContext.h:
2865         (ScriptExecutionContext):
2866         (WebCore::ScriptExecutionContext::activeDOMObjects):
2867         * fileapi/FileReader.cpp:
2868         (WebCore::FileReader::FileReader):
2869         * html/HTMLMarqueeElement.cpp:
2870         (WebCore::HTMLMarqueeElement::HTMLMarqueeElement):
2871         * html/HTMLMediaElement.cpp:
2872         (WebCore::HTMLMediaElement::HTMLMediaElement):
2873         * html/canvas/WebGLRenderingContext.cpp:
2874         (WebCore):
2875         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
2876         * loader/Prerenderer.cpp:
2877         (WebCore::Prerenderer::Prerenderer):
2878         * page/EventSource.cpp:
2879         (WebCore::EventSource::EventSource):
2880         * page/SuspendableTimer.cpp:
2881         (WebCore::SuspendableTimer::SuspendableTimer):
2882         * workers/AbstractWorker.cpp:
2883         (WebCore::AbstractWorker::AbstractWorker):
2884         * workers/WorkerContext.cpp:
2885         (WebCore::WorkerContext::hasPendingActivity):
2886         * xml/XMLHttpRequest.cpp:
2887         (WebCore::XMLHttpRequest::XMLHttpRequest):
2888
2889 2013-03-21  Alexey Proskuryakov  <ap@apple.com>
2890
2891         [Mac] Move NSOperationQueue out of NetworkingContext
2892         https://bugs.webkit.org/show_bug.cgi?id=112970
2893
2894         Reviewed by Brady Eidson.
2895
2896         WebCore clients do not need explicit control over what queue ResourceHandle works on,
2897         they just want to avoid blocking main thread.
2898
2899         * platform/network/ResourceHandleClient.h:
2900         (WebCore::ResourceHandleClient::usesAsyncCallbacks): Added. The name doesn't quite
2901         match what ResourceHandleMac currently does, but it will very soon.
2902
2903         * platform/network/NetworkingContext.h:
2904         (WebCore::NetworkingContext::scheduledRunLoopPairs):
2905         * platform/network/mac/ResourceHandleMac.mm:
2906         (WebCore::operationQueueForAsyncClients):
2907         (WebCore::ResourceHandle::start):
2908
2909 2013-03-21  Marja Hölttä  <marja@chromium.org>
2910
2911         [V8] Generate specialized callbacks for the main world
2912         https://bugs.webkit.org/show_bug.cgi?id=112430
2913
2914         Reviewed by Jochen Eisinger.
2915
2916         The new specialized bindings will be faster, because they don't need to
2917         do the "main world, isolated world or a worker" check, but can right
2918         away assume that we're in the main world.
2919
2920         This patch generates main world bindings for getters and setters of Node,
2921         Element and Document.
2922
2923         No new tests (updated existing binding tests).
2924
2925         * bindings/scripts/CodeGeneratorV8.pm:
2926         (GenerateOverloadedFunction):
2927         (GenerateFunctionCallback):
2928         (GenerateFunction):
2929         (GenerateParametersCheck):
2930         (GenerateSingleConstructorCallback):
2931         (GenerateNonStandardFunction):
2932         (GenerateImplementation):
2933         (GenerateFunctionCallString):
2934         * bindings/scripts/test/V8/V8Float64Array.cpp:
2935         (WebCore):
2936         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2937         (WebCore):
2938         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
2939         (WebCore):
2940         * bindings/scripts/test/V8/V8TestInterface.cpp:
2941         (WebCore):
2942         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
2943         (WebCore):
2944         * bindings/scripts/test/V8/V8TestObj.cpp:
2945         (WebCore):
2946         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2947         (WebCore):
2948         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
2949         (WebCore):
2950         * bindings/v8/V8DOMConfiguration.cpp:
2951         (WebCore::V8DOMConfiguration::batchConfigureCallbacks):
2952         (WebCore::V8DOMConfiguration::configureTemplate):
2953         * bindings/v8/V8DOMConfiguration.h:
2954         (BatchedMethod):
2955         (V8DOMConfiguration):
2956         * dom/Document.idl:
2957         * dom/Element.idl:
2958         * dom/Node.idl:
2959
2960 2013-03-21  Elliott Sprehn  <esprehn@chromium.org>
2961
2962         Remove RenderObject::canHaveRegionStyle since nothing uses it
2963         https://bugs.webkit.org/show_bug.cgi?id=112973
2964
2965         Reviewed by Eric Seidel.
2966
2967         Nothing uses canHaveRegionStyle so we can remove it.
2968
2969         * rendering/RenderObject.h:
2970
2971 2013-03-21  Alok Priyadarshi  <alokp@chromium.org>
2972
2973         Mark GraphicsLayers as opaque when possible
2974         https://bugs.webkit.org/show_bug.cgi?id=70634
2975
2976         Reviewed by Simon Fraser.
2977
2978         Mark layers as opaque in a very simple case - any child renderer has an opaque background and covers the entire composited bounds. It is important to note that since we only consider the background, the only layer that can be marked opaque is the primary GraphicsLayer of a RenderLayer.
2979
2980         Tests: compositing/contents-opaque/background-clip.html
2981                compositing/contents-opaque/background-color.html
2982                compositing/contents-opaque/body-background-painted.html
2983                compositing/contents-opaque/body-background-skipped.html
2984                compositing/contents-opaque/layer-opacity.html
2985                compositing/contents-opaque/layer-transform.html
2986
2987         * rendering/RenderBox.cpp:
2988         (WebCore::skipBodyBackground):
2989         (WebCore):
2990         (WebCore::RenderBox::paintBackground):
2991         (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
2992         * rendering/RenderBox.h:
2993         (RenderBox):
2994         * rendering/RenderLayer.cpp:
2995         (WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
2996         (WebCore):
2997         (WebCore::RenderLayer::listBackgroundIsKnownToBeOpaqueInRect):
2998         * rendering/RenderLayer.h:
2999         (RenderLayer):
3000         * rendering/RenderLayerBacking.cpp:
3001         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3002         * rendering/RenderLayerModelObject.h:
3003         (RenderLayerModelObject):
3004         (WebCore::RenderLayerModelObject::backgroundIsKnownToBeOpaqueInRect):
3005
3006 2013-03-21  Alexandru Chiculita  <achicu@adobe.com>
3007
3008         [CSS Shaders] Implement a StyleCustomFilterProgram cache
3009         https://bugs.webkit.org/show_bug.cgi?id=112602
3010
3011         Reviewed by Dean Jackson.
3012
3013         When the style is recalculated, the new computed RenderStyle is saved as the m_style of the
3014         RenderObject, even if the style was not different.
3015
3016         In the case of Custom Filters, a new StyleCustomFilterProgram was created at all times, but the
3017         actual equality check was done by comparing the pair of cached shaders from inside the StyleCustomFilterProgram.
3018
3019         Because of that the RenderLayer::styleChanged was not called when the new StyleCustomFilterProgram was created, so it
3020         will end up still knowing only about the previous StyleCustomFilterProgram.
3021
3022         The RenderLayer sets itself as a client of the StyleCustomFilterProgram, so that it can repaint itself
3023         when the program is loaded, but because RenderLayer::styleChanged is not called, it will not add itself as a client of the new
3024         StyleCustomFilterProgram.
3025
3026         StyleCustomFilterProgram waits until the first client to load the programs, so in this case it will just remain unloaded.
3027
3028         There was no crash, but just an assert in debug mode. Also, as a visible side-effect some frames were rendered using blank shaders, 
3029         resulting in a pass-through filter.
3030
3031         The fix would be to actually make the RenderStyle::diff detect the change of the StyleCustomFilterProgram
3032         using the pointer value and not the values. However, that will always invalidate the "filter" property because
3033         of the StyleCustomFilterProgram that always gets created during the recalculation time.
3034
3035         I've added StyleCustomFilterProgramCache to cache all the instances of the StyleCustomFilterPrograms that a
3036         StyleResolver allocates. This way, next time it will try to reuse previously allocated StyleCustomFilterPrograms. 
3037         The key of the cache is the CustomFilterProgramInfo, that combines the URLs to the shaders and a couple of other program settings.
3038
3039         StyleCustomFilterProgramCache is owned by the StyleResovler and StyleCustomFilterPrograms are responsible with
3040         removing themselves from the cache when the last reference goes away.
3041
3042         This change makes the previous "platform level" program cache obsolete and I will remove that in a future patch.
3043         https://bugs.webkit.org/show_bug.cgi?id=112844
3044
3045         Test: css3/filters/custom/custom-filter-reload.html
3046
3047         * GNUmakefile.list.am:
3048         * Target.pri:
3049         * WebCore.gypi:
3050         * WebCore.vcproj/WebCore.vcproj:
3051         * WebCore.xcodeproj/project.pbxproj:
3052         * css/StyleResolver.cpp:
3053         (WebCore::StyleResolver::lookupCustomFilterProgram): Lookup any similar programs in the cache. It will create a new pending 
3054         StyleCustomFilterProgram if there is no pre-cached version of the program.
3055         if no program is found. loadPendingShaders is responsible for adding the program in the cache if it is actually going to be used.
3056         (WebCore::StyleResolver::loadPendingShaders): At this point the program is final, so it's safe to add it to the cache.
3057         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
3058         * css/StyleResolver.h:
3059         (StyleResolver):
3060         * css/WebKitCSSShaderValue.cpp:
3061         (WebCore::WebKitCSSShaderValue::completeURL): Factored out the function to compute the complete URL of the resource.
3062         (WebCore::WebKitCSSShaderValue::cachedShader):
3063         * css/WebKitCSSShaderValue.h:
3064         (WebCore::toWebKitCSSShaderValue):
3065         (WebKitCSSShaderValue):
3066         * platform/graphics/filters/CustomFilterOperation.cpp:
3067         (WebCore::CustomFilterOperation::blend):
3068         * platform/graphics/filters/CustomFilterOperation.h:
3069         (WebCore::CustomFilterOperation::operator==): Removed. Programs should now compare by pointer. Kept it as
3070         private to catch any potential use of it.
3071         * rendering/style/StyleCustomFilterProgram.cpp: Copied from Source/WebCore/css/WebKitCSSShaderValue.h.
3072         (WebCore::StyleCustomFilterProgram::~StyleCustomFilterProgram): Destructor removes the program from the cache.
3073         * rendering/style/StyleCustomFilterProgram.h:
3074         (WebCore::StyleCustomFilterProgram::setVertexShader): Added an assert to check that the shader is not in the
3075         cache while the mutation happens. Otherwise the cache might have the wrong key.
3076         (WebCore::StyleCustomFilterProgram::setFragmentShader): Ditto.
3077         (WebCore::StyleCustomFilterProgram::isLoaded): Added more asserts to catch cases when the program is used with no clients.
3078         (StyleCustomFilterProgram):
3079         (WebCore::StyleCustomFilterProgram::hasPendingShaders):
3080         (WebCore::StyleCustomFilterProgram::inCache):
3081         (WebCore::StyleCustomFilterProgram::setCache): Function called when a program is added to / removed from the cache.
3082         (WebCore::StyleCustomFilterProgram::vertexShaderURL): Added methods to store the KURL that we used as keys in the cache.
3083         The same KURLs will be used to lookup and remove the filter at the end.
3084         (WebCore::StyleCustomFilterProgram::setVertexShaderURL):
3085         (WebCore::StyleCustomFilterProgram::fragmentShaderURL):
3086         (WebCore::StyleCustomFilterProgram::setFragmentShaderURL):
3087         (WebCore::StyleCustomFilterProgram::StyleCustomFilterProgram):
3088         * rendering/style/StyleCustomFilterProgramCache.cpp: Added.
3089         (WebCore::StyleCustomFilterProgramCache::programCacheKey):
3090         (WebCore::StyleCustomFilterProgramCache::StyleCustomFilterProgramCache):
3091         (WebCore::StyleCustomFilterProgramCache::~StyleCustomFilterProgramCache): Destructor removes itself from all the
3092         referenced StyleCustomFilterPrograms. This is to avoid issues with different destruction orders.
3093         (WebCore::StyleCustomFilterProgramCache::lookup):
3094         (WebCore::StyleCustomFilterProgramCache::add):
3095         (WebCore::StyleCustomFilterProgramCache::remove):
3096         * rendering/style/StyleCustomFilterProgramCache.h:
3097         (StyleCustomFilterProgramCache):
3098         * platform/graphics/texmap/coordinated/CoordinatedCustomFilterProgram.h:
3099         (WebCore::CoordinatedCustomFilterProgram::operator==: Removed. Programs should now compare by pointer.
3100
3101 2013-03-21  Joshua Bell  <jsbell@chromium.org>
3102
3103         IndexedDB: Ensure all API methods have IDB_TRACE macros
3104         https://bugs.webkit.org/show_bug.cgi?id=112963
3105
3106         Reviewed by Tony Chang.
3107
3108         Anntotate methods and callbacks that weren't already annotated
3109         with IDB_TRACE macros to assist in debugging, e.g. when using
3110         the chromium port's chrome://tracing visualization.
3111
3112         No new tests - just harmless diagnostic sprinkles.
3113
3114         * Modules/indexeddb/IDBDatabase.cpp:
3115         (WebCore::IDBDatabase::createObjectStore): Added IDB_TRACE macro call here.
3116         (WebCore::IDBDatabase::deleteObjectStore): ...and here.
3117         (WebCore::IDBDatabase::transaction): ...etc.
3118         (WebCore::IDBDatabase::close):
3119         (WebCore::IDBDatabase::onVersionChange):
3120         * Modules/indexeddb/IDBFactory.cpp:
3121         (WebCore::IDBFactory::getDatabaseNames):
3122         (WebCore::IDBFactory::open):
3123         (WebCore::IDBFactory::deleteDatabase):
3124         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
3125         (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
3126         (WebCore::IDBFactoryBackendImpl::deleteDatabase):
3127         (WebCore::IDBFactoryBackendImpl::open):
3128         * Modules/indexeddb/IDBOpenDBRequest.cpp:
3129         (WebCore::IDBOpenDBRequest::onBlocked):
3130
3131 2013-03-21  Christian Biesinger  <cbiesinger@chromium.org>
3132
3133         http://trac.webkit.org/changeset/146375 causing CrOS crashes
3134         https://bugs.webkit.org/show_bug.cgi?id=112958
3135
3136         Reviewed by Adam Barth.
3137
3138         Test: fast/flexbox/crash-anonymous-box.html
3139
3140         * rendering/RenderDeprecatedFlexibleBox.cpp:
3141         (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
3142         Anonymous renderers don't have a node in their constructor, so
3143         don't get document() in there.
3144
3145 2013-03-21  Mike West  <mkwst@chromium.org>
3146
3147         CSP 1.1: Fire a SecurityPolicyViolationEvent when violations occur.
3148         https://bugs.webkit.org/show_bug.cgi?id=112783
3149
3150         Reviewed by Adam Barth.
3151
3152         A new event type for Content Security Policy violations landed in
3153         http://wkrev.com/146305; this patch takes that stub, and wires it up to
3154         ContentSecurityPolicy::reportViolation such that violation events fire
3155         when resources are blocked.
3156
3157         This should bring WebKit up to date with the current description of
3158         CSP's event model in sections 3.3[1] and 3.4.1.3[2] of the editor's
3159         draft.
3160
3161         [1]: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#processing-model
3162         [2]: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#firing-events-using-the-securitypolicyviolationevent-interface
3163
3164         Test: http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image.html
3165
3166         * page/ContentSecurityPolicy.cpp:
3167         (WebCore::gatherSecurityPolicyViolationEventData):
3168             Populate a SecurityPolicyViolationEventInit object with the various
3169             bits of data that should be passed into the event constructor.
3170
3171             This static method is strictly an implementation detail; it's not
3172             part of ContentSecurityPolicy's public API.
3173         (WebCore::ContentSecurityPolicy::reportViolation):
3174             Regardless of whether the policy has set a 'report-uri' directive
3175             or not, gather together all the data we'll need to fire an event,
3176             create the event, and queue it up for dispatching on the Document.
3177
3178 2013-03-21  Terry Anderson  <tdanderson@chromium.org>
3179
3180         [chromium] Remove SK_SUPPORT_HINTING_SCALE_FACTOR flag and code
3181         https://bugs.webkit.org/show_bug.cgi?id=112928
3182
3183         Reviewed by Stephen White.
3184
3185         This flag was only for ChromeOS builds with HighDPI. It is no longer needed and can be removed. 
3186         See http://crbug.com/17550
3187
3188         No new tests needed since this is just removing unused code.
3189
3190         * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp:
3191         (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents):
3192         * platform/graphics/skia/PlatformContextSkia.cpp:
3193         (WebCore::PlatformContextSkia::PlatformContextSkia):
3194         (WebCore::PlatformContextSkia::setupPaintCommon):
3195         * platform/graphics/skia/PlatformContextSkia.h:
3196
3197 2013-03-21  Mike West  <mkwst@chromium.org>
3198
3199         Drop full URLs from cross-origin access errors caused by protocol mismatches.
3200         https://bugs.webkit.org/show_bug.cgi?id=112894
3201
3202         Reviewed by Timothy Hatcher.
3203
3204         Following up on http://wkbug.com/112813, this patch brings protocol
3205         mismatch errors into line with the new origin-only hotness. The message
3206         is also changed to display the URL's protocol rather than the origin's
3207         protocol: it makes a big difference for 'data:' URLs, for instance.
3208
3209         * page/DOMWindow.cpp:
3210         (WebCore::DOMWindow::crossDomainAccessErrorMessage):
3211
3212 2013-03-21  Stephen Chenney  <schenney@chromium.org>
3213
3214         SVG text path referencing parent text infinite loops
3215         https://bugs.webkit.org/show_bug.cgi?id=112078
3216
3217         Reviewed by Philip Rogers.
3218
3219         We do not check the target type when adding a resource reference for
3220         SVG Text Path's URI. This goes horribly wrong when the target is the
3221         text path's parent text element. In this patch we check that the target
3222         element of the text path is indeed a path element, as the spec
3223         requires. No other element type is allowed.
3224
3225         Note that RenderSVGTextPath enforces this check in the renderer code
3226         also, so if we get past this check via pending resources, it doesn't
3227         matter. You can't get into this situation with a pending reference
3228         because, by definition, the parent must be defined before the text
3229         path child.
3230
3231         Test: svg/text/textpath-referencing-text-crash.svg
3232
3233         * svg/SVGTextPathElement.cpp:
3234         (WebCore::SVGTextPathElement::buildPendingResource):
3235
3236 2013-03-21  Joshua Bell  <jsbell@chromium.org>
3237
3238         IndexedDB: Remove onVersionChange(string) plumbing
3239         https://bugs.webkit.org/show_bug.cgi?id=112712
3240
3241         Reviewed by Adam Barth.
3242
3243         Delete unused onVersionChange(string) overload.
3244
3245         No new tests - just deleting dead code.
3246
3247         * Modules/indexeddb/IDBDatabase.cpp: Delete onVersionChange(string) overload.
3248         * Modules/indexeddb/IDBDatabase.h: Ditto.
3249         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp: Ditto.
3250         * Modules/indexeddb/IDBDatabaseCallbacks.h: Ditto.
3251         * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp: Ditto.
3252         * Modules/indexeddb/IDBDatabaseCallbacksImpl.h: Ditto.
3253
3254 2013-03-21  Philip Rogers  <pdr@google.com>
3255
3256         Correct bisector angle calculation for markers
3257         https://bugs.webkit.org/show_bug.cgi?id=112054
3258
3259         Reviewed by Stephen Chenney.
3260
3261         The SVG marker spec states that mid markers with orient=auto should be aligned with their
3262         x-axis along the bisector of the incoming (in) and outgoing (out) angles. Previously we
3263         calculated this bisector angle as:
3264             bisector = (in + out) / 2;
3265         Angles cannot be averaged this way! Consider in=90deg and out=-180deg: the bisector should
3266         be 135deg but a naive average gives -45deg. This patch corrects for the discontinuity in
3267         angle values with:
3268             bisector = (in + out + 360) / 2   // if |in - out| > 180
3269             bisector = (in + out) / 2         // otherwise
3270         This patch includes an exhaustive test of angle values.
3271
3272         Test: svg/custom/marker-orient-auto.html
3273
3274         * rendering/svg/SVGMarkerData.h:
3275         (WebCore::SVGMarkerData::currentAngle):
3276
3277 2013-03-21  Harald Alvestrand  <hta@google.com>
3278
3279         Expose the Type field of an RTCStatsReport
3280         https://bugs.webkit.org/show_bug.cgi?id=112951
3281
3282         Reviewed by Adam Barth.
3283
3284         Covered by an extension of an existing test.
3285
3286         * Modules/mediastream/RTCStatsReport.h:
3287         (WebCore::RTCStatsReport::type):
3288         * Modules/mediastream/RTCStatsReport.idl:
3289
3290 2013-03-21  Alexey Proskuryakov  <ap@apple.com>
3291
3292         Move non-trivial virtual functions out of ResourceHandleClient.h
3293         https://bugs.webkit.org/show_bug.cgi?id=112950
3294
3295         Reviewed by Brady Eidson.
3296
3297         * CMakeLists.txt:
3298         * GNUmakefile.list.am:
3299         * Target.pri:
3300         * WebCore.exp.in:
3301         * WebCore.gypi:
3302         * WebCore.vcproj/WebCore.vcproj:
3303         * WebCore.vcxproj/WebCore.vcxproj:
3304         * WebCore.vcxproj/WebCore.vcxproj.filters:
3305         * WebCore.xcodeproj/project.pbxproj:
3306         * platform/network/ResourceHandleClient.cpp: Added.
3307         (WebCore::ResourceHandleClient::ResourceHandleClient):
3308         (WebCore::ResourceHandleClient::~ResourceHandleClient):
3309         (WebCore::ResourceHandleClient::didReceiveBuffer):
3310         (WebCore::ResourceHandleClient::getBuffer):
3311         * platform/network/ResourceHandleClient.h:
3312
3313 2013-03-21  Florin Malita  <fmalita@chromium.org>
3314
3315         [SVG] Remove explicit LightSource dispatchers
3316         https://bugs.webkit.org/show_bug.cgi?id=112827
3317
3318         Reviewed by Stephen Chenney.
3319
3320         Convert LightSource setters to dynamic dispatch. This allows us to remove LightSource.cpp
3321         altogether.
3322
3323         No new tests: refactoring only.
3324
3325         * CMakeLists.txt:
3326         * GNUmakefile.list.am:
3327         * Target.pri:
3328         * WebCore.gypi:
3329         * WebCore.vcproj/WebCore.vcproj:
3330         * WebCore.vcxproj/WebCore.vcxproj:
3331         * WebCore.vcxproj/WebCore.vcxproj.filters:
3332         * WebCore.xcodeproj/project.pbxproj:
3333         * platform/graphics/filters/DistantLightSource.h:
3334         (DistantLightSource):
3335         * platform/graphics/filters/LightSource.cpp: Removed.
3336         * platform/graphics/filters/LightSource.h:
3337         (WebCore::LightSource::setAzimuth):
3338         (WebCore::LightSource::setElevation):
3339         (WebCore::LightSource::setX):
3340         (WebCore::LightSource::setY):
3341         (WebCore::LightSource::setZ):
3342         (WebCore::LightSource::setPointsAtX):
3343         (WebCore::LightSource::setPointsAtY):
3344         (WebCore::LightSource::setPointsAtZ):
3345         (WebCore::LightSource::setSpecularExponent):
3346         (WebCore::LightSource::setLimitingConeAngle):
3347         * platform/graphics/filters/PointLightSource.h:
3348         (PointLightSource):
3349         * platform/graphics/filters/SpotLightSource.h:
3350         (SpotLightSource):
3351
3352 2013-03-21  Igor Oliveira  <igor.o@sisa.samsung.com>
3353
3354         [Texmap] Implement support for OpenGLES EXT_unpack_subimage extension
3355         https://bugs.webkit.org/show_bug.cgi?id=108716
3356
3357         If the extension GL_EXT_unpack_subimage is supported, it adds GL_UNPACK_ROW_LENGTH,
3358         GL_UNPACK_SKIP_ROWS and GL_UNPACK_SKIP_PIXELS as valid enums to PixelStore.
3359
3360         Reviewed by Noam Rosenthal.
3361
3362         * platform/graphics/texmap/TextureMapperGL.cpp:
3363         (WebCore::driverSupportsSubImage):
3364         (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
3365         (WebCore::BitmapTextureGL::updateContents):
3366
3367 2013-03-21  Dmitry Zvorygin  <zvorygin@chromium.org>
3368
3369         Web Inspector: Regression: drawer resizes slowly with animation.
3370         https://bugs.webkit.org/show_bug.cgi?id=112920
3371
3372         Drawer status bar opacity wasn't set to zero on inialization, so no transition event 
3373         was fired on first time drawer appeared,thus animation styles wasn't removed properly.
3374
3375         Reviewed by Vsevolod Vlasov.
3376
3377         * inspector/front-end/Drawer.js:
3378         (WebInspector.Drawer):
3379
3380 2013-03-21  Alberto Garcia  <agarcia@igalia.com>
3381
3382         [BlackBerry] GraphicsLayer: fix code that was accidentally reverted
3383         https://bugs.webkit.org/show_bug.cgi?id=112143
3384
3385         Reviewed by Rob Buis.
3386
3387         Several changes were accidentally reverted in r144465 due to the
3388         upstreaming of some new code:
3389
3390         - clearBackgroundColor() and m_contentsLayerHasBackgroundColor had
3391           been removed in r137798.
3392
3393         - showDebugBorders() had been renamed to isShowingDebugBorder() in
3394           r133517.
3395
3396         - A new GraphicsLayer::create() overload had been introduced in
3397           r130185.
3398
3399         This patch fixes them all.
3400
3401         * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
3402         (WebCore::GraphicsLayer::create):
3403         (WebCore):
3404         (WebCore::GraphicsLayerBlackBerry::GraphicsLayerBlackBerry):
3405         (WebCore::GraphicsLayerBlackBerry::setBackgroundColor):
3406         (WebCore::GraphicsLayerBlackBerry::updateLayerBackgroundColor):
3407         (WebCore::GraphicsLayerBlackBerry::setupContentsLayer):
3408         * platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
3409         (GraphicsLayerBlackBerry):
3410
3411 2013-03-21  Zan Dobersek  <zdobersek@igalia.com>
3412
3413         [GTK] Move libLevelDB.la setup into a separate GNUmakefile.am
3414         https://bugs.webkit.org/show_bug.cgi?id=112947
3415
3416         Reviewed by Martin Robinson.
3417
3418         No new tests - no new functionality.
3419
3420         * GNUmakefile.am: Move the libLevelDD.la setup into the new GNUmakefile.am that's placed in
3421         the third-party leveldb source directory.
3422         * GNUmakefile.list.am: Move the LevelDB sources listing there as well.
3423
3424 2013-03-21  Alberto Garcia  <agarcia@igalia.com>
3425
3426         [BlackBerry] DrawingBuffer: add clearPlatformLayer() implementation
3427         https://bugs.webkit.org/show_bug.cgi?id=112696
3428
3429         Reviewed by Rob Buis.
3430
3431         DrawingBuffer::clearPlatformLayer() was added in r139142.
3432
3433         This is not needed in the BlackBerry port, so this patch only
3434         contains a dummy implementation.
3435
3436         * platform/graphics/blackberry/DrawingBufferBlackBerry.cpp:
3437         (WebCore):
3438         (WebCore::DrawingBuffer::clearPlatformLayer):
3439
3440 2013-03-21  Florin Malita  <fmalita@chromium.org>
3441
3442         [SVG] Suppress painting when an empty viewBox is specified
3443         https://bugs.webkit.org/show_bug.cgi?id=112623
3444
3445         Reviewed by Philip Rogers.
3446
3447         Per spec, elements with an empty viewBox should not be rendered:
3448         http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute.
3449
3450         This patch adds the missing viewBox checks to RenderSVGRoot, RenderSVGViewPortContainer,
3451         RenderSVGResourceMarker and RenderSVGResourceMarker's paint methods.
3452
3453         In order to detect the case of "viewBox present but invalid", the patch also introduces
3454         SVGAnimatedProperty plumbing for tracking property validity: the baseVal setter now takes
3455         an additional optional 'validValue' boolean parameter, which can later be queried via a
3456         macroed getter (LowerProperty##IsValid()).
3457
3458         Test: svg/custom/viewBox-empty.html
3459
3460         * rendering/svg/RenderSVGResourceMarker.cpp:
3461         (WebCore::RenderSVGResourceMarker::draw):
3462         * rendering/svg/RenderSVGResourcePattern.cpp:
3463         (WebCore::RenderSVGResourcePattern::buildPattern):
3464         * rendering/svg/RenderSVGRoot.cpp:
3465         (WebCore::RenderSVGRoot::paintReplaced):
3466         * rendering/svg/RenderSVGViewportContainer.cpp:
3467         (WebCore::RenderSVGViewportContainer::paint):
3468         (WebCore):
3469         * rendering/svg/RenderSVGViewportContainer.h:
3470         (RenderSVGViewportContainer):
3471         * svg/SVGPatternElement.cpp:
3472         (WebCore::SVGPatternElement::collectPatternAttributes):
3473         * svg/SVGSVGElement.h:
3474         (WebCore::SVGSVGElement::hasEmptyViewBox):
3475         (SVGSVGElement):
3476         Suppress painting if a valid empty viewBox is found.
3477
3478         * svg/SVGFitToViewBox.h:
3479         (WebCore::SVGFitToViewBox::parseAttribute):
3480         Mark the viewBox property as invalid if not successfully parsed.
3481
3482         * svg/SVGExternalResourcesRequired.h:
3483         (SVGExternalResourcesRequired):
3484         * svg/SVGURIReference.h:
3485         (SVGURIReference):
3486         * svg/properties/SVGAnimatedPropertyMacros.h:
3487         (WebCore::SVGSynchronizableAnimatedProperty::SVGSynchronizableAnimatedProperty):
3488         (SVGSynchronizableAnimatedProperty):
3489         (WebCore):
3490         Plumbing for tracking property value validation.
3491
3492 2013-03-21  Alexei Filippov  <alph@chromium.org>
3493
3494         Web Inspector: Hide toolbar customization experimental setting
3495         https://bugs.webkit.org/show_bug.cgi?id=112942
3496
3497         Reviewed by Pavel Feldman.
3498
3499         * inspector/front-end/Settings.js:
3500         (WebInspector.ExperimentsSettings):
3501         * inspector/front-end/Toolbar.js:
3502         (WebInspector.Toolbar):
3503         (WebInspector.Toolbar.prototype._isToolbarCustomizable):
3504
3505 2013-03-21  Anton Muhin  <antonm@chromium.org>
3506
3507         Unreviewed, rolling out r146483.
3508         http://trac.webkit.org/changeset/146483
3509         https://bugs.webkit.org/show_bug.cgi?id=111695
3510
3511         Breaks
3512
3513         * Modules/speech/SpeechSynthesis.cpp:
3514         (WebCore::SpeechSynthesis::boundaryEventOccurred):
3515         (WebCore::SpeechSynthesis::didStartSpeaking):
3516         (WebCore::SpeechSynthesis::didPauseSpeaking):
3517         (WebCore::SpeechSynthesis::didResumeSpeaking):
3518         (WebCore::SpeechSynthesis::didFinishSpeaking):
3519         (WebCore::SpeechSynthesis::speakingErrorOccurred):
3520         (WebCore):
3521         * Modules/speech/SpeechSynthesis.h:
3522         (SpeechSynthesis):
3523         * Modules/speech/SpeechSynthesisUtterance.cpp:
3524         (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
3525         (WebCore::SpeechSynthesisUtterance::setVoice):
3526         * Modules/speech/SpeechSynthesisUtterance.h:
3527         (WebCore::SpeechSynthesisUtterance::text):
3528         (WebCore::SpeechSynthesisUtterance::setText):
3529         (WebCore::SpeechSynthesisUtterance::lang):
3530         (WebCore::SpeechSynthesisUtterance::setLang):
3531         (WebCore::SpeechSynthesisUtterance::volume):
3532         (WebCore::SpeechSynthesisUtterance::setVolume):
3533         (WebCore::SpeechSynthesisUtterance::rate):
3534         (WebCore::SpeechSynthesisUtterance::setRate):
3535         (WebCore::SpeechSynthesisUtterance::pitch):
3536         (WebCore::SpeechSynthesisUtterance::setPitch):
3537         (WebCore::SpeechSynthesisUtterance::startTime):
3538         (WebCore::SpeechSynthesisUtterance::setStartTime):
3539         (WebCore::SpeechSynthesisUtterance::platformUtterance):
3540         (SpeechSynthesisUtterance):
3541         * Modules/speech/SpeechSynthesisVoice.h:
3542         (SpeechSynthesisVoice):
3543         * WebCore.exp.in:
3544         * WebCore.gypi:
3545         * platform/PlatformSpeechSynthesis.h:
3546         (PlatformSpeechSynthesis):
3547         * platform/PlatformSpeechSynthesisUtterance.cpp:
3548         * platform/PlatformSpeechSynthesisUtterance.h:
3549         (PlatformSpeechSynthesisUtterance):
3550         (WebCore::PlatformSpeechSynthesisUtterance::client):
3551         * platform/PlatformSpeechSynthesisVoice.cpp:
3552         (WebCore::PlatformSpeechSynthesisVoice::create):
3553         (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
3554         * platform/PlatformSpeechSynthesisVoice.h:
3555         (PlatformSpeechSynthesisVoice):
3556         (WebCore::PlatformSpeechSynthesisVoice::voiceURI):
3557         (WebCore::PlatformSpeechSynthesisVoice::name):
3558         (WebCore::PlatformSpeechSynthesisVoice::lang):
3559         (WebCore::PlatformSpeechSynthesisVoice::localService):
3560         * platform/PlatformSpeechSynthesizer.cpp:
3561         (WebCore::PlatformSpeechSynthesizer::create):
3562         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
3563         (WebCore):
3564         * platform/PlatformSpeechSynthesizer.h:
3565         (PlatformSpeechSynthesizerClient):
3566         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
3567         (PlatformSpeechSynthesizer):
3568         * platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Removed.
3569         * platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Removed.
3570         * platform/chromium/support/WebSpeechSynthesisVoice.cpp: Removed.
3571         * platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Removed.
3572         * platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Removed.
3573         * platform/mac/PlatformSpeechSynthesizerMac.mm:
3574         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
3575         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
3576         (WebCore):
3577         (WebCore::PlatformSpeechSynthesizer::speak):
3578         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
3579         (WebCore::PlatformSpeechSynthesizerMock::create):
3580         (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
3581         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
3582         (WebCore::PlatformSpeechSynthesizerMock::speak):
3583         * platform/mock/PlatformSpeechSynthesizerMock.h:
3584         (PlatformSpeechSynthesizerMock):
3585
3586 2013-03-21  Alexey Proskuryakov  <ap@apple.com>
3587
3588         [Mac] Consolidate bits of willSendRequest implementation
3589         https://bugs.webkit.org/show_bug.cgi?id=112932
3590
3591         Reviewed by Brady Eidson.
3592
3593         Moved some logic from WebCoreResourceHandleAsDelegate to ResourceHandle for clarity.
3594
3595         * platform/network/mac/ResourceHandleMac.mm:
3596         (WebCore::ResourceHandle::willSendRequest):
3597         (-[WebCoreResourceHandleAsDelegate connection:willSendRequest:redirectResponse:]):
3598
3599 2013-03-21  Praveen R Jadhav  <praveen.j@samsung.com>
3600
3601         Remove AudioGain.idl from compilation.
3602         https://bugs.webkit.org/show_bug.cgi?id=112650
3603
3604         Reviewed by Chris Rogers.
3605
3606         Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#GainNode
3607               https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBufferSourceNode
3608
3609         AudioParam serves the same purpose as AudioGain. Infact, AudioGain inherits
3610         AudioParam class and doesn't have its own member functions/parameters. Also,
3611         AudioGain is not part of WebAudio W3C specifications.
3612
3613         Test: webaudio/gain-basic.html
3614
3615         * CMakeLists.txt:
3616         * DerivedSources.make:
3617         * DerivedSources.pri:
3618         * GNUmakefile.list.am:
3619         * Modules/webaudio/AudioBufferSourceNode.cpp:
3620         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
3621         * Modules/webaudio/AudioBufferSourceNode.h:
3622         (AudioBufferSourceNode):
3623         (WebCore::AudioBufferSourceNode::gain):
3624         * Modules/webaudio/AudioBufferSourceNode.idl:
3625         * Modules/webaudio/AudioGain.h: Removed.
3626         * Modules/webaudio/AudioGain.idl: Removed.
3627         * Modules/webaudio/GainNode.cpp:
3628         (WebCore::GainNode::GainNode):
3629         * Modules/webaudio/GainNode.h:
3630         (WebCore):
3631         (WebCore::GainNode::create):
3632         (GainNode):
3633         (WebCore::GainNode::gain):
3634         * Modules/webaudio/GainNode.idl:
3635         * Modules/webaudio/PannerNode.cpp:
3636         (WebCore::PannerNode::PannerNode):
3637         * Modules/webaudio/PannerNode.h:
3638         (WebCore::PannerNode::distanceGain):
3639         (WebCore::PannerNode::coneGain):
3640         * Target.pri:
3641         * WebCore.gypi:
3642         * WebCore.xcodeproj/project.pbxproj:
3643
3644 2013-03-21  Dominic Mazzoni  <dmazzoni@google.com>
3645
3646         Implement Web Speech Synthesis for Chromium
3647         https://bugs.webkit.org/show_bug.cgi?id=111695
3648
3649         Reviewed by Adam Barth.
3650
3651         Straightforward implementation of speech synthesis
3652         for Chromium by exposing interfaces for the platform
3653         to implement.
3654
3655         * Modules/speech/SpeechSynthesis.cpp:
3656         (WebCore::SpeechSynthesis::boundaryEventOccurred):
3657         (WebCore::SpeechSynthesis::didStartSpeaking):
3658         (WebCore::SpeechSynthesis::didPauseSpeaking):
3659         (WebCore::SpeechSynthesis::didResumeSpeaking):
3660         (WebCore::SpeechSynthesis::didFinishSpeaking):
3661         (WebCore::SpeechSynthesis::speakingErrorOccurred):
3662         (WebCore):
3663         * Modules/speech/SpeechSynthesis.h:
3664         (SpeechSynthesis):
3665         * Modules/speech/SpeechSynthesisUtterance.cpp:
3666         (WebCore::SpeechSynthesisUtterance::SpeechSynthesisUtterance):
3667         (WebCore):
3668         (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
3669         (WebCore::SpeechSynthesisUtterance::setVoice):
3670         * Modules/speech/SpeechSynthesisUtterance.h:
3671         (SpeechSynthesisUtterance):
3672         (WebCore::SpeechSynthesisUtterance::text):
3673         (WebCore::SpeechSynthesisUtterance::setText):
3674         (WebCore::SpeechSynthesisUtterance::lang):
3675         (WebCore::SpeechSynthesisUtterance::setLang):
3676         (WebCore::SpeechSynthesisUtterance::volume):
3677         (WebCore::SpeechSynthesisUtterance::setVolume):
3678         (WebCore::SpeechSynthesisUtterance::rate):
3679         (WebCore::SpeechSynthesisUtterance::setRate):
3680         (WebCore::SpeechSynthesisUtterance::pitch):
3681         (WebCore::SpeechSynthesisUtterance::setPitch):
3682         (WebCore::SpeechSynthesisUtterance::startTime):
3683         (WebCore::SpeechSynthesisUtterance::setStartTime):
3684         (WebCore::SpeechSynthesisUtterance::platformUtterance):
3685         * Modules/speech/SpeechSynthesisVoice.h:
3686         (WebCore::SpeechSynthesisVoice::~SpeechSynthesisVoice):
3687         * WebCore.exp.in:
3688         * WebCore.gypi:
3689         * platform/PlatformSpeechSynthesis.h:
3690         (PlatformSpeechSynthesis):
3691         * platform/PlatformSpeechSynthesisUtterance.cpp:
3692         (WebCore):
3693         (WebCore::PlatformSpeechSynthesisUtterance::create):
3694         * platform/PlatformSpeechSynthesisUtterance.h:
3695         (PlatformSpeechSynthesisUtterance):
3696         (WebCore::PlatformSpeechSynthesisUtterance::setClient):
3697         * platform/PlatformSpeechSynthesisVoice.cpp:
3698         (WebCore):
3699         (WebCore::PlatformSpeechSynthesisVoice::create):
3700         (WebCore::PlatformSpeechSynthesisVoice::PlatformSpeechSynthesisVoice):
3701         * platform/PlatformSpeechSynthesisVoice.h:
3702         (PlatformSpeechSynthesisVoice):
3703         (WebCore::PlatformSpeechSynthesisVoice::setVoiceURI):
3704         (WebCore::PlatformSpeechSynthesisVoice::setName):
3705         (WebCore::PlatformSpeechSynthesisVoice::setLang):
3706         (WebCore::PlatformSpeechSynthesisVoice::setLocalService):
3707         (WebCore::PlatformSpeechSynthesisVoice::setIsDefault):
3708         * platform/PlatformSpeechSynthesizer.cpp:
3709         (WebCore::PlatformSpeechSynthesizer::create):
3710         (WebCore::PlatformSpeechSynthesizer::setVoiceList):
3711         (WebCore):
3712         * platform/PlatformSpeechSynthesizer.h:
3713         (WebKit):
3714         (PlatformSpeechSynthesizerClient):
3715         (PlatformSpeechSynthesizer):
3716         * platform/chromium/PlatformSpeechSynthesizerChromium.cpp: Added.
3717         (WebCore):
3718         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
3719         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
3720         (WebCore::PlatformSpeechSynthesizer::initializeVoiceList):
3721         (WebCore::PlatformSpeechSynthesizer::speak):
3722         (WebCore::PlatformSpeechSynthesizer::pause):
3723         (WebCore::PlatformSpeechSynthesizer::resume):
3724         (WebCore::PlatformSpeechSynthesizer::cancel):
3725         * platform/chromium/support/WebSpeechSynthesisUtterance.cpp: Added.
3726         (WebKit):
3727         (WebKit::WebSpeechSynthesisUtterance::WebSpeechSynthesisUtterance):
3728         (WebKit::WebSpeechSynthesisUtterance::operator=):
3729         (WebKit::WebSpeechSynthesisUtterance::assign):
3730         (WebKit::WebSpeechSynthesisUtterance::reset):
3731         (WebKit::WebSpeechSynthesisUtterance::operator PassRefPtr<PlatformSpeechSynthesisUtterance>):
3732         (WebKit::WebSpeechSynthesisUtterance::operator PlatformSpeechSynthesisUtterance*):
3733         (WebKit::WebSpeechSynthesisUtterance::text):
3734         (WebKit::WebSpeechSynthesisUtterance::lang):
3735         (WebKit::WebSpeechSynthesisUtterance::voice):
3736         (WebKit::WebSpeechSynthesisUtterance::volume):
3737         (WebKit::WebSpeechSynthesisUtterance::rate):
3738         (WebKit::WebSpeechSynthesisUtterance::pitch):
3739         (WebKit::WebSpeechSynthesisUtterance::startTime):
3740         * platform/chromium/support/WebSpeechSynthesisVoice.cpp: Added.
3741         (WebKit):
3742         (WebKit::WebSpeechSynthesisVoice::assign):
3743         (WebKit::WebSpeechSynthesisVoice::reset):
3744         (WebKit::WebSpeechSynthesisVoice::setVoiceURI):
3745         (WebKit::WebSpeechSynthesisVoice::setName):
3746         (WebKit::WebSpeechSynthesisVoice::setLanguage):
3747         (WebKit::WebSpeechSynthesisVoice::setIsLocalService):
3748         (WebKit::WebSpeechSynthesisVoice::setIsDefault):
3749         (WebKit::WebSpeechSynthesisVoice::operator PassRefPtr<WebCore::PlatformSpeechSynthesisVoice>):
3750         * platform/chromium/support/WebSpeechSynthesizerClientImpl.cpp: Added.
3751         (WebCore):
3752         (WebCore::WebSpeechSynthesizerClientImpl::WebSpeechSynthesizerClientImpl):
3753         (WebCore::WebSpeechSynthesizerClientImpl::~WebSpeechSynthesizerClientImpl):
3754         (WebCore::WebSpeechSynthesizerClientImpl::setVoiceList):
3755         (WebCore::WebSpeechSynthesizerClientImpl::didStartSpeaking):
3756         (WebCore::WebSpeechSynthesizerClientImpl::didFinishSpeaking):
3757         (WebCore::WebSpeechSynthesizerClientImpl::didPauseSpeaking):
3758         (WebCore::WebSpeechSynthesizerClientImpl::didResumeSpeaking):
3759         (WebCore::WebSpeechSynthesizerClientImpl::speakingErrorOccurred):
3760         (WebCore::WebSpeechSynthesizerClientImpl::wordBoundaryEventOccurred):
3761         (WebCore::WebSpeechSynthesizerClientImpl::sentenceBoundaryEventOccurred):
3762         * platform/chromium/support/WebSpeechSynthesizerClientImpl.h: Added.
3763         (WebCore):
3764         (WebSpeechSynthesizerClientImpl):
3765         * platform/mac/PlatformSpeechSynthesizerMac.mm:
3766         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
3767         (-[WebSpeechSynthesisWrapper speechSynthesizer:didFinishSpeaking:]):
3768         (WebCore::PlatformSpeechSynthesizer::PlatformSpeechSynthesizer):
3769         (WebCore):
3770         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
3771         (WebCore::PlatformSpeechSynthesizer::speak):
3772         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
3773         (WebCore::PlatformSpeechSynthesizerMock::PlatformSpeechSynthesizerMock):
3774         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
3775         (WebCore::PlatformSpeechSynthesizerMock::speak):
3776         * platform/mock/PlatformSpeechSynthesizerMock.h:
3777         (PlatformSpeechSynthesizerMock):
3778
3779 2013-03-21  Julien Chaffraix  <jchaffraix@webkit.org>
3780
3781         [CSS Grid Layout] Properly layout spanning grid items with minmax grid tracks
3782         https://bugs.webkit.org/show_bug.cgi?id=112389
3783
3784         Reviewed by Tony Chang.
3785
3786         This change updates our core minmax resolution function to be spanning grid
3787         items aware. The new implementation of the algorithm doesn't totally match
3788         the specification but it is fairly close that it's a good first pass. The
3789         extra complexity in the specification needs to be carefully examinated
3790         first (not to mention the probable change in the core layout algorithm).
3791
3792         Tests: fast/css-grid-layout/minmax-spanning-resolution-columns.html
3793                fast/css-grid-layout/minmax-spanning-resolution-rows.html
3794
3795         * rendering/RenderGrid.cpp:
3796         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
3797         Updated this function to account for spanning grid items by:
3798         - iterating over all spanned grid tracks.
3799         - removing any used breadth from all spanned grid tracks.
3800
3801 2013-03-21  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
3802
3803         [GStreamer] New reference returned by g_main_context_new() must be freed
3804         https://bugs.webkit.org/show_bug.cgi?id=112899
3805
3806         Reviewed by Kenneth Rohde Christiansen.
3807
3808         Fix a memory leak by adopting the new reference returned
3809         by g_main_context_new().
3810
3811         No new tests. No change in behavior.
3812
3813         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
3814         (WebCore::AudioFileReader::createBus):
3815
3816 2013-03-21  Carlos Garcia Campos  <cargarcia@rim.com>
3817
3818         [BlackBerry] Add ScrollingCoordinatorBlackBerry implementation
3819         https://bugs.webkit.org/show_bug.cgi?id=112915
3820
3821         Reviewed by Rob Buis.
3822
3823         * PlatformBlackBerry.cmake: Add page/scrolling/blackberry to the
3824         indlude dir list.
3825         * page/scrolling/ScrollingCoordinator.cpp:
3826         (WebCore::ScrollingCoordinator::create): Create a
3827         ScrollingCoordinatorBlackBerry for the BlackBerry platform.
3828         * page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.cpp: Added.
3829         (WebCore):
3830         (WebCore::ScrollingCoordinatorBlackBerry::ScrollingCoordinatorBlackBerry):
3831         (WebCore::ScrollingCoordinatorBlackBerry::setLayerIsContainerForFixedPositionLayers):
3832         (WebCore::ScrollingCoordinatorBlackBerry::setLayerIsFixedToContainerLayer):
3833         (WebCore::ScrollingCoordinatorBlackBerry::setLayerFixedToContainerLayerEdge):
3834         (WebCore::ScrollingCoordinatorBlackBerry::frameViewFrameRectDidChange):
3835         (WebCore::ScrollingCoordinatorBlackBerry::frameViewContentsSizeDidChange):
3836         * page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.h: Added.
3837         (WebCore):
3838         (ScrollingCoordinatorBlackBerry):
3839         (WebCore::ScrollingCoordinatorBlackBerry::supportsFixedPositionLayers):
3840         * platform/graphics/PlatformLayer.h:
3841         (WebCore): Add PlatformLayer definition for BlackBerry.
3842
3843 2013-03-18  Andrey Kosyakov  <caseq@chromium.org>
3844
3845         Web Inspector: Paint rectangles shown on hover over Timeline's paint records occasionally have wrong offsets
3846         https://bugs.webkit.org/show_bug.cgi?id=112371
3847
3848         Reviewed by Pavel Feldman.
3849
3850         - pass frame to InspectorTimelineAgent::didPaint();
3851         - convert paint coordinates to root view.
3852
3853         * inspector/InspectorInstrumentation.cpp:
3854         (WebCore):
3855         (WebCore::InspectorInstrumentation::willPaintImpl):
3856         (WebCore::InspectorInstrumentation::didPaintImpl):
3857         * inspector/InspectorInstrumentation.h:
3858         (InspectorInstrumentation):
3859         (WebCore::InspectorInstrumentation::willPaint):
3860         (WebCore::InspectorInstrumentation::didPaint):
3861         * inspector/InspectorTimelineAgent.cpp:
3862         (WebCore::InspectorTimelineAgent::didPaint):
3863         * inspector/InspectorTimelineAgent.h:
3864         (InspectorTimelineAgent):
3865
3866 2013-03-20  Andrey Kosyakov  <caseq@chromium.org>
3867
3868         Web Inspector: do not use inspector cookie in InspectorInstrumentation::{will,did}Paint
3869         https://bugs.webkit.org/show_bug.cgi?id=112787
3870
3871         Reviewed by Pavel Feldman.
3872
3873         - pass frame, not inspector cookie to InspectorInstrumentation::didPaint;
3874         - use frame to determine timeline agent in InspectorInstrumentation::didPaint.
3875
3876         * inspector/InspectorInstrumentation.cpp:
3877         (WebCore):
3878         (WebCore::InspectorInstrumentation::willPaintImpl):
3879         (WebCore::InspectorInstrumentation::didPaintImpl):
3880         * inspector/InspectorInstrumentation.h:
3881         (InspectorInstrumentation):
3882         (WebCore::InspectorInstrumentation::willPaint):
3883         (WebCore::InspectorInstrumentation::didPaint):
3884         * page/FrameView.cpp:
3885         (WebCore::FrameView::paintContents):
3886         * rendering/RenderLayerBacking.cpp:
3887         (WebCore::RenderLayerBacking::paintContents):
3888
3889 2013-03-21  Julien Chaffraix  <jchaffraix@webkit.org>
3890
3891         [CSS Grid Layout] OOB access in RenderGrid with a grid item with negative position index
3892         https://bugs.webkit.org/show_bug.cgi?id=112853
3893
3894         Reviewed by Tony Chang.
3895
3896         This issue was caused by us casting a negative int to a size_t by mistake. This
3897         would make us not size the grid properly thus yielding to OOB access during the
3898         rest of the layout.
3899
3900         Test: fast/css-grid-layout/grid-item-negative-indexes.html
3901
3902         * rendering/RenderGrid.cpp:
3903         (WebCore::estimatedGridSizeForPosition):
3904         Added this helper function to do the proper estimation and checks that our
3905         position can be represented by a size_t.
3906
3907         (WebCore::RenderGrid::maximumIndexInDirection):
3908         Updated to use estimatedGridSizeForPosition.
3909
3910 2013-03-21  Stephen White  <senorblanco@chromium.org>
3911
3912         [skia] feConvolveMatrix should use accelerated path
3913         https://bugs.webkit.org/show_bug.cgi?id=112828
3914
3915         Reviewed by James Robinson.
3916
3917         Covered by layout tests css3/filters/effect-reference*.html.
3918
3919         * WebCore.gypi:
3920         Add FEConvolveMatrixSkia.cpp to the build.
3921         * platform/graphics/filters/FEConvolveMatrix.h:
3922         Enable the skia accelerated path for feConvolveMatrix.
3923         * platform/graphics/filters/skia/FEConvolveMatrixSkia.cpp:
3924         (WebCore::FEConvolveMatrix::createImageFilter):
3925         Implement building/conversion from FEConvolveMatrix to
3926         SkMatrixConvolutionImageFilter.
3927
3928 2013-03-21  Martin Robinson  <mrobinson@igalia.com>
3929
3930         Source/ThirdParty/leveldb/db/builder.cc does not build on systems without <endian.h>
3931         https://bugs.webkit.org/show_bug.cgi?id=111817
3932
3933         Reviewed by Gustavo Noronha Silva.
3934
3935         * GNUmakefile.am: Add the appropriate flags to the LevelDB build if we are on FreeBSD
3936         or OS X.
3937
3938 2013-03-21  Julien Chaffraix  <jchaffraix@webkit.org>
3939
3940         [CSS Grid Layout] Support default grid items sizing
3941         https://bugs.webkit.org/show_bug.cgi?id=103333
3942
3943         Reviewed by Tony Chang.
3944
3945         Tests: fast/css-grid-layout/grid-auto-columns-rows-auto-flow-resolution.html
3946                fast/css-grid-layout/grid-auto-columns-rows-resolution.html
3947                fast/css-grid-layout/grid-auto-columns-rows-update.html
3948
3949         * rendering/RenderGrid.cpp:
3950         (WebCore::RenderGrid::gridTrackSize):
3951         Core of the change: return the grid-auto-{rows|columns} instead of a pre-defined value.
3952
3953         (WebCore::RenderGrid::computedUsedBreadthOfGridTracks):
3954         Fixed a latent bug: we need to iterate over the internal grid representation instead of the
3955         style's rows / columns as the latter doesn't account for implicit rows / columns.
3956
3957 2013-03-21  Adam Barth  <abarth@webkit.org>
3958
3959         HTMLNames should construct strings at compile time
3960         https://bugs.webkit.org/show_bug.cgi?id=112831
3961
3962         Reviewed by Darin Adler.
3963
3964         This patch teaches make_names how to construct strings at compile time,
3965         eliminating a large number of startup mallocs.
3966
3967         * WebCore.gyp/WebCore.gyp:
3968         * WebCore.gyp/scripts/action_makenames.py:
3969             - Teach the Chromium build how to deal with Perl modules.
3970         * bindings/scripts/StaticString.pm: Added.
3971             - A Perl module for constructing static strings.
3972         (GenerateStrings):
3973         (GenerateValidateStrings):
3974         * dom/QualifiedName.cpp:
3975         (WebCore::createQualifiedName):
3976             - createQualifiedName now takes an already-constructed StringImpl
3977               object.
3978         * dom/QualifiedName.h:
3979         * dom/make_names.pl:
3980         (valueForName):
3981         (namesToStrings):
3982         (printNamesCppFile):
3983         (printDefinitions):
3984             - Teach make_names how to use StaticString.pm.
3985
3986 2013-03-21  Kondapally Kalyan  <kalyan.kondapally@intel.com>
3987
3988         [EFL][WebGL] Implement a common GraphicsSurface Implementation.
3989         https://bugs.webkit.org/show_bug.cgi?id=111759
3990
3991         Reviewed by Kenneth Rohde Christiansen.
3992
3993         Covered by existing WebGL tests.
3994
3995         This is in preparation to add transport surface support for GLES2.
3996         This patch makes it easy to share the core logic of using
3997         Transport Surface and client on GLX and GLES2 backends without
3998         any code duplication.
3999
4000         * PlatformEfl.cmake:
4001         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
4002         (WebCore::GraphicsContext3DPrivate::initialize):
4003         (WebCore::GraphicsContext3DPrivate::releaseResources):
4004         (WebCore::GraphicsContext3DPrivate::prepareBuffer):
4005         (WebCore::GraphicsContext3DPrivate::createGraphicsSurface):
4006         (WebCore::GraphicsContext3DPrivate::didResizeCanvas):
4007         (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface):
4008         * platform/graphics/efl/GraphicsContext3DPrivate.h:
4009         (GraphicsContext3DPrivate):
4010
4011         TransportSurface related code is moved to GraphicsSurfaceCommon.
4012         As GraphicsSurface is deleted on resize, added logic to ensure that
4013         current buffer is not deleted before having the shared buffer
4014         with correct size. This would avoid any flashing during resize.
4015
4016         * platform/graphics/opengl/GLPlatformSurface.cpp:
4017         (WebCore::GLPlatformSurface::createTransportSurface):
4018         * platform/graphics/opengl/GLPlatformSurface.h:
4019         * platform/graphics/surfaces/efl/GLTransportSurface.cpp: Renamed from Source/WebCore/platform/graphics/surfaces/GLTransportSurface.cpp.
4020         (WebCore):
4021         (WebCore::GLTransportSurface::GLTransportSurface):
4022         (WebCore::GLTransportSurface::~GLTransportSurface):
4023         (WebCore::GLTransportSurface::updateContents):
4024         (WebCore::GLTransportSurface::setGeometry):
4025         (WebCore::GLTransportSurface::destroy):
4026         (WebCore::GLTransportSurface::draw):
4027         (WebCore::GLTransportSurface::bindArrayBuffer):
4028         (WebCore::GLTransportSurface::updateTransformationMatrix):
4029         (WebCore::GLTransportSurface::initializeShaderProgram):
4030         (WebCore::GLTransportSurfaceClient::createTransportSurfaceClient):
4031         (WebCore::GLTransportSurfaceClient::GLTransportSurfaceClient):
4032         (WebCore::GLTransportSurfaceClient::~GLTransportSurfaceClient):
4033         (WebCore::GLTransportSurfaceClient::destroy):
4034         (WebCore::GLTransportSurfaceClient::prepareTexture):
4035         (WebCore::GLTransportSurfaceClient::createTexture):
4036         * platform/graphics/surfaces/efl/GLTransportSurface.h: Renamed from Source/WebCore/platform/graphics/surfaces/GLTransportSurface.h.
4037         (WebCore):
4038         (GLTransportSurface):
4039         (GLTransportSurfaceClient):