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