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