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