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