[GTK][AC] Implement keyframe animations with clutter ac backend
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-19  ChangSeok Oh  <changseok.oh@collabora.com>
2
3         [GTK][AC] Implement keyframe animations with clutter ac backend
4         https://bugs.webkit.org/show_bug.cgi?id=110057
5
6         Reviewed by Gustavo Noronha Silva.
7
8         This patch brings accelerated keyframe animation with clutter to WebKitGtk+.
9         Changes of GraphicsLayerClutter are based on GraphicsLayerCA. But major changes
10         of PlatformClutterAnimation are implemented with clutter keyframe transition apis.
11         See http://developer.gnome.org/clutter/stable/ClutterKeyframeTransition.html
12
13         Covered by existing animation tests.
14
15         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
16         (WebCore::GraphicsLayerClutter::createKeyframeAnimation):
17         (WebCore::GraphicsLayerClutter::setTransformAnimationKeyframes):
18         (WebCore::GraphicsLayerClutter::setAnimationKeyframes):
19         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
20         (WebCore::toClutterActorPropertyString):
21         (WebCore::PlatformClutterAnimation::PlatformClutterAnimation):
22         (WebCore::PlatformClutterAnimation::setTimingFunction):
23         (WebCore::PlatformClutterAnimation::setValues):
24         (WebCore::PlatformClutterAnimation::setKeyTimes):
25         (WebCore::PlatformClutterAnimation::setTimingFunctions):
26         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
27         (WebCore):
28         (WebCore::PlatformClutterAnimation::addClutterKeyframeTransitionForProperty):
29         (WebCore::PlatformClutterAnimation::addOpacityTransition):
30         (WebCore::PlatformClutterAnimation::addTransformTransition):
31         (WebCore::PlatformClutterAnimation::addAnimationForKey):
32         (WebCore::PlatformClutterAnimation::removeAnimationForKey):
33         * platform/graphics/clutter/PlatformClutterAnimation.h:
34         (PlatformClutterAnimation):
35
36 2013-02-19  Claudio Saavedra  <csaavedra@igalia.com>
37
38         [harfbuzz] Crash in harfbuzz related code
39         https://bugs.webkit.org/show_bug.cgi?id=110145
40
41         Reviewed by Martin Robinson.
42
43         Patch by Behdad Esfahbod <behdad@google.com>
44
45         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
46         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Ask harfbuzz
47         to guess the segment properties.
48
49 2013-02-19  Pavel Podivilov  <podivilov@chromium.org>
50
51         Web Inspector: release backtrace object group on each step.
52         https://bugs.webkit.org/show_bug.cgi?id=110223
53
54         Reviewed by Pavel Feldman.
55
56         * inspector/InspectorDebuggerAgent.cpp:
57         (WebCore):
58         (WebCore::InspectorDebuggerAgent::stepOver):
59         (WebCore::InspectorDebuggerAgent::stepInto):
60         (WebCore::InspectorDebuggerAgent::stepOut):
61
62 2013-02-19  Sheriff Bot  <webkit.review.bot@gmail.com>
63
64         Unreviewed, rolling out r142975.
65         http://trac.webkit.org/changeset/142975
66         https://bugs.webkit.org/show_bug.cgi?id=110225
67
68         Introduces hard-to-reproduce crashes upon inspected page
69         navigation on Mac (Requested by apavlov on #webkit).
70
71         * dom/DocumentStyleSheetCollection.cpp:
72         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
73         * inspector/Inspector.json:
74         * inspector/InspectorCSSAgent.cpp:
75         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
76         (WebCore::InspectorCSSAgent::clearFrontend):
77         (WebCore::InspectorCSSAgent::enable):
78         (WebCore::InspectorCSSAgent::getAllStyleSheets):
79         (WebCore::InspectorCSSAgent::collectStyleSheets):
80         (WebCore::InspectorCSSAgent::bindStyleSheet):
81         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
82         (WebCore::InspectorCSSAgent::detectOrigin):
83         (WebCore::InspectorCSSAgent::buildObjectForRule):
84         * inspector/InspectorCSSAgent.h:
85         (InspectorCSSAgent):
86         * inspector/InspectorInstrumentation.cpp:
87         (WebCore):
88         * inspector/InspectorInstrumentation.h:
89         (WebCore):
90         (InspectorInstrumentation):
91         * inspector/front-end/CSSStyleModel.js:
92         (WebInspector.CSSStyleModel.prototype.getViaInspectorResourceForRule):
93         (WebInspector.CSSStyleModelResourceBinding.prototype.):
94         (WebInspector.CSSStyleModelResourceBinding.prototype.requestStyleSheetIdForResource):
95         (WebInspector.CSSStyleModelResourceBinding.prototype.requestResourceURLForStyleSheetId):
96         (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetIdForResource):
97         (WebInspector.CSSStyleModelResourceBinding.prototype._loadStyleSheetHeaders):
98         (WebInspector.CSSStyleModelResourceBinding.prototype.headersLoaded):
99         (WebInspector.CSSStyleModelResourceBinding.prototype._requestViaInspectorResource):
100         (WebInspector.CSSStyleModelResourceBinding.prototype._getOrCreateInspectorResource):
101         (WebInspector.CSSStyleModelResourceBinding.prototype._reset):
102         * inspector/front-end/SASSSourceMapping.js:
103         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged.callback):
104         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged):
105         * inspector/front-end/StylesSidebarPane.js:
106         (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode.callback):
107         (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode):
108         * inspector/front-end/StylesSourceMapping.js:
109         (WebInspector.StyleContentBinding.prototype.callback):
110         (WebInspector.StyleContentBinding.prototype.setStyleContent):
111         (WebInspector.StyleContentBinding.prototype.):
112         (WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged):
113
114 2013-02-19  Julien Chaffraix  <jchaffraix@webkit.org>
115
116         RenderGrid::computedUsedBreadthOfGridTracks can read past m_grid's size
117         https://bugs.webkit.org/show_bug.cgi?id=110126
118
119         Reviewed by Ojan Vafai.
120
121         The issue comes from how we store the column information inside m_grid.
122         Because m_grid is a Vector of rows, we could lose the column information
123         if we had no row, no grid item but some columns defined in CSS. As the
124         logic would assume that our row / column size would be greater than what
125         the style defines explicitely, we would access past our Vector's boundary.
126
127         The fix is to ensure that we have at least a row so that we can store the
128         column information in every case. This fix is overly broad as it also forces
129         the grid to have one column, which shouldn't be an issue.
130
131         Test: fast/css-grid-layout/grid-element-empty-row-column.html
132
133         * rendering/RenderGrid.cpp:
134         (WebCore::RenderGrid::maximumIndexInDirection):
135         Forced this function to return at least one as the maximum index so that
136         m_grid has at least one row / column.
137
138         (WebCore::RenderGrid::placeItemsOnGrid):
139         Added a ASSERT that m_grid is bigger than the explicit grid-rows / grid-columns.
140         Also changed an existing ASSERT to use gridWasPopulated for consistency and changed
141         the code not to call gridRowCount as it would ASSERT (we are in the middle of populating
142         the grid).
143
144         * rendering/RenderGrid.h:
145         (WebCore::RenderGrid::gridWasPopulated):
146         Added this helper function.
147
148         (WebCore::RenderGrid::gridColumnCount):
149         Replaced a now unneeded branch with an ASSERT. As placeItemsOnGrid should be called
150         prior to read m_grid, this change should be fine.
151
152         (WebCore::RenderGrid::gridRowCount):
153         Added an ASSERT.
154
155 2013-02-19  Sergio Villar Senin  <svillar@igalia.com>
156
157         [Soup] Use synchronous calls to close completely processed streams
158         https://bugs.webkit.org/show_bug.cgi?id=107432
159
160         Reviewed by Martin Robinson.
161
162         There is no need to close already processed streams in asynchronous
163         calls since they won't block. Using the synchronous call will save
164         us some code and unnecessary asynchronous burden. This is kind of
165         a code refactor so no new tests needed.
166
167         * platform/network/soup/ResourceHandleSoup.cpp:
168         (WebCore):
169         (WebCore::redirectSkipCallback):
170         (WebCore::readCallback):
171
172 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
173
174         Web Inspector: [Canvas] use timeline's didBeginFrame for marking frame end calls
175         https://bugs.webkit.org/show_bug.cgi?id=110130
176
177         Reviewed by Pavel Feldman.
178
179         In Web Inspector canvas profiler use timeline's didBeginFrame for marking frame end calls instead of an ad-hoc timeout-based solution.
180
181         * inspector/InjectedScriptCanvasModule.cpp:
182         (WebCore::InjectedScriptCanvasModule::markFrameEnd):
183         (WebCore):
184         * inspector/InjectedScriptCanvasModule.h:
185         (InjectedScriptCanvasModule):
186         * inspector/InjectedScriptCanvasModuleSource.js:
187         (.):
188         * inspector/InspectorCanvasAgent.cpp:
189         (WebCore::InspectorCanvasAgent::hasUninstrumentedCanvases):
190         (WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
191         (WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
192         (WebCore::InspectorCanvasAgent::frameNavigated):
193         (WebCore::InspectorCanvasAgent::didBeginFrame):
194         (WebCore):
195         * inspector/InspectorCanvasAgent.h:
196         (InspectorCanvasAgent):
197         * inspector/InspectorController.cpp:
198         (WebCore::InspectorController::didBeginFrame):
199
200 2013-02-19  Vsevolod Vlasov  <vsevik@chromium.org>
201
202         Web Inspector: Decouple various file system project implementation parts for better testability and cover with tests.
203         https://bugs.webkit.org/show_bug.cgi?id=110204
204
205         Reviewed by Pavel Feldman.
206
207         Extracted FileSystemWorkspaceProvider from IsolatedFileSystemManager to take care of managing workspace projects and projectDelegates.
208         Replaced FileMapping.urlForURI with urlForPath method that does not need any information about workspace structure anymore.
209
210         Test: inspector/file-system-project.html
211
212         * inspector/front-end/FileMapping.js:
213         (WebInspector.FileMapping.prototype.urlForPath):
214         * inspector/front-end/FileSystemProjectDelegate.js:
215         (WebInspector.FileSystemProjectDelegate):
216         (WebInspector.FileSystemProjectDelegate.prototype.populate.filesLoaded):
217         (WebInspector.FileSystemProjectDelegate.prototype.populate):
218         (WebInspector.FileSystemWorkspaceProvider):
219         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
220         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
221         * inspector/front-end/IsolatedFileSystem.js:
222         (WebInspector.IsolatedFileSystem):
223         (WebInspector.IsolatedFileSystem.prototype.name):
224         (WebInspector.IsolatedFileSystem.prototype.rootURL):
225         * inspector/front-end/IsolatedFileSystemManager.js:
226         (WebInspector.IsolatedFileSystemManager):
227         (WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem):
228         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved):
229         (WebInspector.IsolatedFileSystemManager.prototype._isolatedFileSystem):
230         (WebInspector.IsolatedFileSystemManager.prototype.requestDOMFileSystem):
231         * inspector/front-end/inspector.js:
232
233 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
234
235         Web Inspector: [Canvas] do not replace replay image with spinner icon
236         https://bugs.webkit.org/show_bug.cgi?id=110213
237
238         Reviewed by Pavel Feldman.
239
240         Otherwise it's visually hard to see changes in the replay image. Instead show a small spinner icon in the bottom right corner.
241
242         * inspector/front-end/CanvasProfileView.js:
243         (WebInspector.CanvasProfileView):
244         (WebInspector.CanvasProfileView.prototype._enableWaitIcon):
245         * inspector/front-end/canvasProfiler.css:
246         (#canvas-replay-image-container):
247         (.canvas-debug-info):
248         (.canvas-spinner-icon):
249
250 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
251
252         Web Inspector: [Canvas] UI: tweak replay control buttons behavior
253         https://bugs.webkit.org/show_bug.cgi?id=110207
254
255         Reviewed by Pavel Feldman.
256
257         New behavior for control buttons in the Canvas profiler.
258         - The NextCall button (~StepInto) on a node group should expand it and move into its first child (instead of expanding and moving into the next node group)
259         - The NextDrawCall button (~StepOver) should move to a next node that has children (instead of just iterating call group nodes, ignoring frame nodes).
260         - The ReplayLast button should select the last expanded node (instead of always selecting last frame group node).
261
262         * inspector/front-end/CanvasProfileView.js:
263         (WebInspector.CanvasProfileView.prototype._onReplayStepClick):
264         (WebInspector.CanvasProfileView.prototype._onReplayDrawingCallClick):
265         (WebInspector.CanvasProfileView.prototype._onReplayLastStepClick):
266
267 2013-02-19  Andrei Bucur  <abucur@adobe.com>
268
269         [CSS Regions] Assertion in RenderFlowThread::removeRenderBoxRegionInfo
270         https://bugs.webkit.org/show_bug.cgi?id=109914
271
272         Reviewed by David Hyatt.
273
274         This patch moves a part of the invalidation operations inside the RenderFlowThread::invalidateRegions call. The maps
275         are cleared anyway at layout time but doing this earlier makes sure the flow thread is in a more consistent state
276         (the RenderFlowThread object has both the region chain invalidated and the regions information cleared).
277
278         RenderFlowThread::removeRenderBoxRegionInfo will check if the region chain is invalidated. If true, it means the
279         flow thread has a layout scheduled and the regions information is not yet reliable. In this case we just return from the
280         function and wait for the layout to cleanup the box information.
281
282         Test: fast/regions/remove-box-info-assert.html
283
284         * rendering/RenderFlowThread.cpp:
285         (WebCore::RenderFlowThread::removeRegionFromThread):
286         (WebCore::RenderFlowThread::invalidateRegions):
287         (WebCore):
288         (WebCore::RenderFlowThread::layout):
289         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
290         * rendering/RenderFlowThread.h:
291         * rendering/RenderNamedFlowThread.cpp:
292         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
293
294 2013-02-19  Alberto Garcia  <agarcia@igalia.com>
295
296         Fix build broekn by r142988.
297         https://bugs.webkit.org/show_bug.cgi?id=109530
298
299         Unreviewed. Build fix.
300
301         Properly add shortMonthFormat() to the LocaleNone class.
302
303         * platform/text/LocaleNone.cpp:
304         (LocaleNone):
305         (WebCore::LocaleNone::shortMonthFormat):
306
307 2013-02-19  Anton Vayvod  <avayvod@chromium.org>
308
309         [Text Autosizing] Combine narrow descendants of a cluster into groups that should be autosized with the same multiplier.
310         https://bugs.webkit.org/show_bug.cgi?id=109825
311
312         Enhancement of the approach introduced in https://bugs.webkit.org/show_bug.cgi?id=109573.
313         Instead of using the same text size multiplier for all narrow descendants of any autosizing
314         cluster, group the descendants by how much narrower they are than the cluster's
315         |blockContainingAllText| and process each group separately with a different multiplier for
316         each one.
317         For example, we want nested comments on the page to be autosized as a group but separately
318         from a sidebar on the same page.
319
320         Reviewed by Kenneth Rohde Christiansen.
321
322         Updated the existing test to verify the patch.
323
324         * rendering/TextAutosizer.cpp:
325         (WebCore::TextAutosizer::processClusterInternal):
326
327             Splits the narrow descendants of the autosizing cluster into groups before processing
328             each group individually.
329
330         (WebCore::TextAutosizer::getNarrowDescendantsGroupedByWidth):
331
332             Sorts the narrow descendants of the given cluster into groups, combining them by the
333             difference between their content widths. If sorted by width, two consecutive nodes
334             belong to the same group if their width difference is no greater than 100 CSS units.
335
336         * rendering/TextAutosizer.h:
337
338             New method definitions.
339
340 2013-02-18  Ilya Tikhonovsky  <loislo@chromium.org>
341
342         Web Inspector: Native Memory Instrumentation: show user provided name property of the heap snapshot node.
343         https://bugs.webkit.org/show_bug.cgi?id=110124
344
345         Reviewed by Yury Semikhatsky.
346
347         Publish userProvidedName into grid node.
348
349         * inspector/front-end/HeapSnapshotGridNodes.js:
350         (WebInspector.HeapSnapshotGenericObjectNode):
351         (WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell):
352         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
353         * inspector/front-end/HeapSnapshotProxy.js:
354         (WebInspector.HeapSnapshotWorker):
355         * inspector/front-end/NativeHeapSnapshot.js:
356         (WebInspector.NativeHeapSnapshotNode.prototype.serialize):
357
358 2013-02-19  Arpita Bahuguna  <a.bah@samsung.com>
359
360         Caret is not displayed when trying to focus inside a contenteditable element containing an empty block.
361         https://bugs.webkit.org/show_bug.cgi?id=108053
362
363         Reviewed by Ryosuke Niwa.
364
365         Test: editing/selection/caret-in-div-containing-empty-block.html
366
367         * rendering/RenderBox.cpp:
368         (WebCore::RenderBox::localCaretRect):
369         When trying to compute the caret rect for the contenteditable div, the
370         border and the padding were not considered. Because of this, for the
371         given test case, which had a border defined on the containing div, the
372         caret was being painted just atop the border, thereby masking it.
373
374         Have modified the code to ensure that the computed caret rect takes
375         into account the border and padding (if any) specified on the box, but only
376         if the node doesn't have content that shall be skipped for editing.
377
378         We do not add border and padding while computing the caret rect for any
379         element that either has no content or has content that shall be skipped
380         for editing purposes. This holds true for table elements as well.
381
382         This helps avoid the caret displacement previsouly observed before/after
383         any controls placed within the contenteditable box, when considering
384         border and padding in computation of the caret rect.
385
386 2013-02-19  Mihnea Ovidenie  <mihnea@adobe.com>
387
388         CSSRegions: crash positioned object with inline containing block in flow thread
389         https://bugs.webkit.org/show_bug.cgi?id=108307
390
391         Reviewed by David Hyatt.
392
393         The fix for https://bugs.webkit.org/show_bug.cgi?id=69896 allowed positioned blocks work
394         with variable width regions. However, the information needed for that is available only
395         when the container used for positioning is a block.
396
397         This patch ensures we are using this solution only when the container used for positioning
398         is a block. This needs to be revisited when we will extend support for other types of boxes
399         as mentioned in RenderBox::renderBoxRegionInfo.
400
401         Test: fast/regions/positioned-object-inline-cb-crash.html
402
403         * rendering/RenderBox.cpp:
404         (WebCore::RenderBox::renderBoxRegionInfo):
405         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
406         (WebCore::RenderBox::computePositionedLogicalWidth): Make sure we are using containerBlocks
407         that are blocks. Add an assert that the type of containerBlock we are using can have
408         computed RenderBoxRegionInfo.
409         (WebCore::RenderBox::computePositionedLogicalHeight):
410         * rendering/RenderBoxModelObject.h:
411         (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion): This helper method
412         will return the boxes that may have computed RenderBoxRegionInfo. Currently,
413         returns true for blocks only.
414
415 2013-02-19  Ryosuke Niwa  <rniwa@webkit.org>
416
417         Yet anther JSC build fix after r143304.
418
419         * bindings/js/JSDOMBinding.h:
420         (WebCore::argumentOrNull):
421
422 2013-02-19  Kentaro Hara  <haraken@chromium.org>
423
424         Unreviewed build fix. Fixed warning caused by r143305.
425
426         * bindings/scripts/CodeGeneratorJS.pm:
427         (GenerateParametersCheck):
428         * bindings/scripts/CodeGeneratorV8.pm:
429         (GenerateParametersCheck):
430
431 2013-02-19  Kentaro Hara  <haraken@chromium.org>
432
433         Unreviewed build fix after r143304.
434
435         * bindings/js/JSDOMBinding.h:
436         (WebCore::argumentOrNull):
437
438 2013-02-19  Kentaro Hara  <haraken@chromium.org>
439
440         [V8] Remove redundant usage of MAYBE_MISSING_PARAMETER() macro
441         https://bugs.webkit.org/show_bug.cgi?id=109899
442
443         Reviewed by Adam Barth.
444
445         Currently:
446
447         - MAYBE_MISSING_PARAMETER(args, index, DefaultIsUndefined) returns args[index].
448         - MAYBE_MISSING_PARAMETER(args, index, DefaultIsNullString) returns Local<Value>()
449         if args[index] is missing (i.e. the length of |args| is less than |index|).
450         It returns args[index] otherwise.
451
452         No one other than CodeGeneratorV8.pm uses
453         MAYBE_MISSING_PARAMETER(args, index, DefaultIsUndefined). Instead, we simply use
454         args[index]. We should remove the redundant usage from CodeGeneratorV8.pm too.
455         The long-name macro has been making generated code less readable.
456
457         In addition, we can rename MAYBE_MISSING_PARAMETER() to argumentOrNull().
458
459         No tests. No change in behavior.
460
461         * bindings/scripts/CodeGeneratorV8.pm:
462         (GenerateParametersCheck):
463         * bindings/scripts/test/V8/V8Float64Array.cpp:
464         (WebCore::Float64ArrayV8Internal::fooCallback):
465         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
466         (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):
467         (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):
468         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
469         (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):
470         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
471         (WebCore::TestEventTargetV8Internal::itemCallback):
472         (WebCore::TestEventTargetV8Internal::dispatchEventCallback):
473         * bindings/scripts/test/V8/V8TestInterface.cpp:
474         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
475         (WebCore::V8TestInterface::constructorCallback):
476         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
477         (WebCore::TestMediaQueryListListenerV8Internal::methodCallback):
478         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
479         (WebCore::V8TestNamedConstructorConstructorCallback):
480         * bindings/scripts/test/V8/V8TestObj.cpp:
481         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
482         (WebCore::TestObjV8Internal::longMethodWithArgsCallback):
483         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
484         (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
485         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
486         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
487         (WebCore::TestObjV8Internal::optionsObjectCallback):
488         (WebCore::TestObjV8Internal::methodWithOptionalArgCallback):
489         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgCallback):
490         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
491         (WebCore::TestObjV8Internal::methodWithOptionalStringCallback):
492         (WebCore::TestObjV8Internal::methodWithOptionalStringIsUndefinedCallback):
493         (WebCore::TestObjV8Internal::methodWithOptionalStringIsNullStringCallback):
494         (WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback):
495         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
496         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
497         (WebCore::TestObjV8Internal::overloadedMethod3Callback):
498         (WebCore::TestObjV8Internal::overloadedMethod4Callback):
499         (WebCore::TestObjV8Internal::overloadedMethod6Callback):
500         (WebCore::TestObjV8Internal::overloadedMethod7Callback):
501         (WebCore::TestObjV8Internal::overloadedMethod8Callback):
502         (WebCore::TestObjV8Internal::overloadedMethod9Callback):
503         (WebCore::TestObjV8Internal::overloadedMethod10Callback):
504         (WebCore::TestObjV8Internal::overloadedMethod11Callback):
505         (WebCore::TestObjV8Internal::classMethodWithOptionalCallback):
506         (WebCore::TestObjV8Internal::overloadedMethod12Callback):
507         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
508         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
509         (WebCore::TestObjV8Internal::enabledPerContextMethod1Callback):
510         (WebCore::TestObjV8Internal::enabledPerContextMethod2Callback):
511         (WebCore::TestObjV8Internal::stringArrayFunctionCallback):
512         (WebCore::TestObjV8Internal::domStringListFunctionCallback):
513         (WebCore::TestObjV8Internal::convert1Callback):
514         (WebCore::TestObjV8Internal::convert2Callback):
515         (WebCore::TestObjV8Internal::convert4Callback):
516         (WebCore::TestObjV8Internal::convert5Callback):
517         (WebCore::TestObjV8Internal::strictFunctionCallback):
518         (WebCore::TestObjV8Internal::variadicStringMethodCallback):
519         (WebCore::TestObjV8Internal::variadicDoubleMethodCallback):
520         (WebCore::TestObjV8Internal::variadicNodeMethodCallback):
521         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
522         (WebCore::V8TestOverloadedConstructors::constructor1Callback):
523         (WebCore::V8TestOverloadedConstructors::constructor2Callback):
524         (WebCore::V8TestOverloadedConstructors::constructor3Callback):
525         (WebCore::V8TestOverloadedConstructors::constructor4Callback):
526         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
527         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
528         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
529         (WebCore::TestTypedefsV8Internal::funcCallback):
530         (WebCore::TestTypedefsV8Internal::setShadowCallback):
531         (WebCore::TestTypedefsV8Internal::methodWithSequenceArgCallback):
532         (WebCore::TestTypedefsV8Internal::nullableArrayArgCallback):
533         (WebCore::TestTypedefsV8Internal::stringArrayFunctionCallback):
534         (WebCore::TestTypedefsV8Internal::stringArrayFunction2Callback):
535         (WebCore::V8TestTypedefs::constructorCallback):
536         * bindings/v8/V8BindingMacros.h:
537         (WebCore):
538         * bindings/v8/custom/V8HistoryCustom.cpp:
539         (WebCore::V8History::pushStateCallbackCustom):
540         (WebCore::V8History::replaceStateCallbackCustom):
541
542 2013-02-19  Kentaro Hara  <haraken@chromium.org>
543
544         [JSC] MAYBE_MISSING_PARAMETER(..., DefaultIsNullString) macro is redundant
545         https://bugs.webkit.org/show_bug.cgi?id=109902
546
547         Reviewed by Adam Barth.
548
549         Currently:
550
551         - MAYBE_MISSING_PARAMETER(exec, index, DefaultIsUndefined)
552           returns exec->argument(index).
553         - MAYBE_MISSING_PARAMETER(exec, index, DefaultIsNullString)
554           returns JSValue() if exec->argument(index) is missing
555           (i.e. the length of the argument is less than index).
556           It returns exec->argument(index) otherwise.
557
558         No one other than CodeGeneratorJS.pm uses
559         MAYBE_MISSING_PARAMETER(exec, index, DefaultIsUndefined).
560         Instead, we simply use exec->argument(index). We should remove
561         the redundant usage in CodeGeneratorJS.pm too. The long-name macro
562         has been making generated code less readable.
563
564         In addition, we can rename MAYBE_MISSING_PARAMETER() to argumentOrNull().
565
566         c.f. corresponding V8 bug: https://bugs.webkit.org/show_bug.cgi?id=109899
567
568         No tests. No change in behavior.
569
570         * bindings/js/JSDOMBinding.h:
571         (WebCore):
572         * bindings/scripts/CodeGeneratorJS.pm:
573         (GenerateParametersCheck):
574         * bindings/scripts/test/JS/JSFloat64Array.cpp:
575         (WebCore::jsFloat64ArrayPrototypeFunctionFoo):
576         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
577         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
578         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
579         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
580         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
581         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
582         (WebCore::jsTestEventTargetPrototypeFunctionItem):
583         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
584         * bindings/scripts/test/JS/JSTestInterface.cpp:
585         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
586         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
587         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
588         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
589         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
590         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
591         * bindings/scripts/test/JS/JSTestObj.cpp:
592         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
593         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
594         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
595         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
596         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
597         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
598         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
599         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
600         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
601         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
602         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
603         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
604         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
605         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
606         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
607         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
608         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
609         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
610         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
611         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
612         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
613         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
614         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
615         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
616         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
617         (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
618         (WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
619         (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
620         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
621         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
622         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
623         (WebCore::jsTestObjPrototypeFunctionConvert1):
624         (WebCore::jsTestObjPrototypeFunctionConvert2):
625         (WebCore::jsTestObjPrototypeFunctionConvert4):
626         (WebCore::jsTestObjPrototypeFunctionConvert5):
627         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
628         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
629         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
630         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
631         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
632         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1):
633         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2):
634         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
635         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4):
636         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
637         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
638         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
639         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionMultiTransferList):
640         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
641         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
642         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
643         (WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList):
644         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
645         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
646         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
647         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
648         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
649
650 2013-02-18  Hayato Ito  <hayato@chromium.org>
651
652         Make EventDispatcher take an Event object in its constructor.
653         https://bugs.webkit.org/show_bug.cgi?id=109898
654
655         Reviewed by Dimitri Glazkov.
656
657         Re-landing r143145, which caused a crash when deltaX and deltaY of a PlatformWheelEvent are both zero.
658
659         Fixed a crash by early exiting in EventDispatcher::dispatchEvent(Node*, PassRefPtr<EventDispatcher*>)
660         if mediator's event() returns null.
661
662         Also Added a layout test to catch this kind of crash in the future.
663
664         Test: fast/events/platform-wheelevent-with-delta-zero-crash.html
665
666         * dom/EventDispatchMediator.cpp:
667         (WebCore::EventDispatchMediator::dispatchEvent):
668         * dom/EventDispatcher.cpp:
669         (WebCore::EventDispatcher::dispatchEvent):
670         (WebCore::EventDispatcher::EventDispatcher):
671         (WebCore::EventDispatcher::ensureEventPath):
672         (WebCore::EventDispatcher::dispatchSimulatedClick):
673         (WebCore::EventDispatcher::dispatch):
674         (WebCore::EventDispatcher::dispatchEventPreProcess):
675         (WebCore::EventDispatcher::dispatchEventAtCapturing):
676         (WebCore::EventDispatcher::dispatchEventAtTarget):
677         (WebCore::EventDispatcher::dispatchEventAtBubbling):
678         (WebCore::EventDispatcher::dispatchEventPostProcess):
679         * dom/EventDispatcher.h:
680         (EventDispatcher):
681         (WebCore::EventDispatcher::node):
682         (WebCore::EventDispatcher::event):
683         * dom/FocusEvent.cpp:
684         (WebCore::FocusEventDispatchMediator::dispatchEvent):
685         (WebCore::BlurEventDispatchMediator::dispatchEvent):
686         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
687         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
688         * dom/GestureEvent.cpp:
689         (WebCore::GestureEventDispatchMediator::dispatchEvent):
690         * dom/MouseEvent.cpp:
691         (WebCore::MouseEventDispatchMediator::dispatchEvent):
692         * dom/WheelEvent.cpp:
693         (WebCore::WheelEventDispatchMediator::dispatchEvent):
694         Assert event() rather than an early exit since this code path should be hit only when event() is non-null.
695
696 2013-02-18  Takashi Sakamoto  <tasak@google.com>
697
698         :before/:after pseudo elements do not always apply to the proper element
699         https://bugs.webkit.org/show_bug.cgi?id=93925
700
701         Reviewed by Dimitri Glazkov.
702
703         Disable sharing a style with siblings if :after or :before pseudo style
704         is unique.
705
706         Test: fast/css/before-after-pseudo-class.html
707
708         * css/StyleResolver.cpp:
709         (WebCore::StyleResolver::canShareStyleWithElement):
710         Added a new condition, hasUniquePseudoStyle.
711         * rendering/style/RenderStyle.cpp:
712         (WebCore::RenderStyle::hasUniquePseudoStyle):
713         Added to check whether any pseudo style has unique bit or not.
714         (WebCore):
715         * rendering/style/RenderStyle.h:
716
717 2013-02-18  Andy Estes  <aestes@apple.com>
718
719         Focusing a new frame (via window.focus()) should blur the active element in the current frame
720         https://bugs.webkit.org/show_bug.cgi?id=110172
721
722         Reviewed by Ryosuke Niwa.
723
724         When a change in the focused node crosses a frame boundary, WebKit
725         doesn't always succeed in blurring the old focused node before focusing
726         the new one.
727
728         Each document remembers its focused node, and a Page-scoped
729         FocusController remembers the focused frame. If a new focused node is
730         in a different frame than the focused frame, FocusController tells the
731         old frame's document to clear its focused node before focusing the new
732         one (and remembering the new frame).
733
734         Unfortunately, web content can confuse FocusController by calling
735         window.focus() at the wrong time. Since window.focus() changes
736         FocusController's focused frame without focusing a new node,
737         FocusController won't think that a frame boundary is being crossed if a
738         node in this frame is later focused. Therefore it won't clear the old
739         frame's focused node (it won't even know which frame contained the old
740         focused node), causing at least two bugs:
741
742         1) The node in the old frame will not receive a blur event.
743         2) Calling document.activeElement on the main frame will return the
744            previously focused node, but the HTML5 spec says it should return
745            the frame owner element if a subframe has focus.
746
747         Fix both of these bugs by explicitly clearing the current frame's
748         focused node if window.focus() changes the focused frame. This fix
749         carries some compatibility risk by changing a long-standing behavior
750         of the engine (we've had this bug since the beginning of the project,
751         AFAICT). On the upside, it matches the behavior of both Firefox and IE,
752         matches what HTML5 says about subframe focus, and fixes at least one
753         well-known enterprise web app.
754
755         Tests: fast/dom/HTMLDocument/active-element-frames.html
756                fast/frames/frame-focus-blurs-active-element.html
757
758         * page/DOMWindow.cpp:
759         (WebCore::DOMWindow::focus): If the frame being focused is not the same
760         as the currently focused frame, clear the currently focused frame's
761         focused node.
762
763 2013-02-18  Simon Fraser  <simon.fraser@apple.com>
764
765         Clean up the boolean argument to visibleContentRect
766         https://bugs.webkit.org/show_bug.cgi?id=110167
767
768         Reviewed by Simon Fraser.
769
770         Replace the boolean argument to visibleContentRect() with
771         an enum.
772
773         No behavior change.
774
775         * WebCore.exp.in:
776         * dom/Document.cpp:
777         (WebCore::Document::viewportSize):
778         * inspector/InspectorOverlay.cpp:
779         (WebCore::InspectorOverlay::update):
780         * page/DOMWindow.cpp:
781         (WebCore::DOMWindow::innerHeight):
782         (WebCore::DOMWindow::innerWidth):
783         * page/FrameView.cpp:
784         (WebCore::FrameView::calculateScrollbarModesForLayout):
785         (WebCore::FrameView::layout):
786         (WebCore::FrameView::performPostLayoutTasks):
787         (WebCore::FrameView::windowClipRect):
788         * page/SpatialNavigation.cpp:
789         (WebCore::canScrollInDirection):
790         * platform/ScrollView.cpp:
791         (WebCore::ScrollView::unscaledVisibleContentSize):
792         (WebCore::ScrollView::visibleContentRect):
793         (WebCore::ScrollView::layoutSize):
794         (WebCore::ScrollView::updateScrollbars):
795         (WebCore::ScrollView::paint):
796         * platform/ScrollView.h:
797         * platform/ScrollableArea.cpp:
798         (WebCore::ScrollableArea::visibleContentRect):
799         * platform/ScrollableArea.h:
800         * rendering/RenderDialog.cpp:
801         (WebCore::RenderDialog::layout):
802         * rendering/RenderLayer.cpp:
803         (WebCore::RenderLayer::maximumScrollPosition):
804         (WebCore::RenderLayer::visibleContentRect):
805         * rendering/RenderLayer.h:
806         * rendering/RenderLayerCompositor.cpp:
807         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
808         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
809
810 2013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
811
812         That didn't work either. Just make it public. This is why I hate nested classes. They just don't work.
813
814         * rendering/RenderBlock.h:
815         (RenderBlock):
816
817 2013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
818
819         Windows build fix. Apparently Visual Studio still has a lot of bugs with respect to nested classes.
820         Work around it by directly instantiating the class inside createFloatingObjects.
821
822         * rendering/RenderBlock.cpp:
823         (WebCore::RenderBlock::createFloatingObjects): Directly instantiate FloatingObjects.
824         * rendering/RenderBlock.h:
825         (RenderBlock): Moved the declaration of createFloatingObjects up.
826         (FloatingObjects::FloatingObjects):
827
828 2013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
829
830         Merge handleSpecialChild into layoutBlockChildren
831         https://bugs.webkit.org/show_bug.cgi?id=110165
832
833         Reviewed by Darin Adler.
834
835         Merge handleSpecialChild, handlePositionedChild, and handleFloatingChild into layoutBlockChildren
836         to make the semantics of the code clear and to get rid of the outdated comment about how there are
837         four types of four types of special children.
838
839         * rendering/RenderBlock.cpp:
840         (WebCore::RenderBlock::layoutBlockChildren):
841         * rendering/RenderBlock.h:
842         (RenderBlock):
843
844 2013-02-18  Ryosuke Niwa  <rniwa@webkit.org>
845
846         Encapsulate FloatingObject's constructor inside create
847         https://bugs.webkit.org/show_bug.cgi?id=110169
848
849         Reviewed by Darin Adler.
850
851         Added FloatingObject::create and made FloatingObject's constructor private.
852         Also added RenderBlock::ensureFloatingObjects to help lazily creating FloatingObjects.
853
854         * rendering/RenderBlock.cpp:
855         (WebCore::RenderBlock::insertFloatingObject):
856         (WebCore::RenderBlock::addOverhangingFloats):
857         (WebCore::RenderBlock::addIntrudingFloats):
858         (WebCore::RenderBlock::ensureFloatingObjects):
859         (WebCore::RenderBlock::FloatingObjects::create):
860         (WebCore::RenderBlock::FloatingObjects::FloatingObjects):
861         * rendering/RenderBlock.h:
862         (FloatingObjects):
863         (RenderBlock):
864
865 2013-02-18  Anders Carlsson  <andersca@apple.com>
866
867         Add a DefaultHash for RefPtr<SecurityOrigin>
868         https://bugs.webkit.org/show_bug.cgi?id=110170
869
870         Reviewed by Andreas Kling.
871
872         Remove all explicit uses of SecurityOriginHash.
873
874         * Modules/webdatabase/DatabaseTracker.h:
875         * Modules/webdatabase/OriginQuotaManager.h:
876         * loader/appcache/ApplicationCacheStorage.cpp:
877         (WebCore::ApplicationCacheStorage::getOriginsWithCache):
878         * loader/cache/MemoryCache.h:
879         * page/SecurityOriginHash.h:
880         * storage/StorageNamespaceImpl.h:
881         (StorageNamespaceImpl):
882
883 2013-02-18  David Hyatt  <hyatt@apple.com>
884
885         Padding and border changes don't trigger the relayout of children in some cases.
886         https://bugs.webkit.org/show_bug.cgi?id=109639.
887
888         Reviewed by Ryosuke Niwa.
889
890         The fix for this bug was way too general and involved putting code into RenderBox. Since
891         RenderBox makes no assumptions about what kind of layout system might derive from it, it
892         was incorrect to just mark all children as needing layout whenever borders and padding
893         changed widths.
894         
895         This patch takes the two cases handled by the original code and makes them more
896         specialized down in subclasses, i.e., RenderBlock and RenderTableRow. RenderBlock has
897         been refined to only check if children aren't inline and to also not invalidate
898         floats or irrelevant positioned objects that might not even have this block as their
899         containing block.
900         
901         The RenderTableRow code is specialized to only care about collapsing borders and
902         to only check borders rather than padding. It also requires that a child be a cell
903         in order to do the invalidation.
904
905         Covered by existing tests, since this is just specializing the code to more precisely
906         cover the test cases that have already been written.
907
908         Longer term, it should be layout code that figures this stuff out rather than style
909         change code, but that involves more dramatic changes that can wait.
910
911         Test: fast/block/positioning/border-change-relayout-test.html
912
913         * rendering/RenderBlock.cpp:
914         (WebCore::borderOrPaddingLogicalWidthChanged):
915         (WebCore):
916         (WebCore::RenderBlock::styleDidChange):
917         * rendering/RenderBox.cpp:
918         (WebCore):
919         (WebCore::RenderBox::styleDidChange):
920         * rendering/RenderTableRow.cpp:
921         (WebCore::borderLogicalWidthChanged):
922         (WebCore):
923         (WebCore::RenderTableRow::styleDidChange):
924
925 2013-02-18  Mark Lam  <mark.lam@apple.com>
926
927         Small follow up to r143271: Fix SQLTransaction leak.
928         https://bugs.webkit.org/show_bug.cgi?id=110052.
929
930         Reviewed by Geoffrey Garen.
931
932         Applied Geoff's suggestion nullify m_frontend sooner for greater
933         code clarity. Also added some comments about m_frontend.
934
935         No new tests.
936
937         * Modules/webdatabase/SQLTransactionBackend.cpp:
938         (WebCore::SQLTransactionBackend::doCleanup):
939         * Modules/webdatabase/SQLTransactionBackend.h:
940         (SQLTransactionBackend):
941
942 2013-02-18  Geoffrey Garen  <ggaren@apple.com>
943
944         Shrank the SourceProvider cache
945         https://bugs.webkit.org/show_bug.cgi?id=110158
946
947         Reviewed by Oliver Hunt.
948
949         Test: fast/js/regress/nested-function-parsing.html
950
951         No need to keep statistics on cache size, since we're going to throw it
952         away no matter what.
953
954         * WebCore.order:
955         * bindings/js/CachedScriptSourceProvider.h:
956         (CachedScriptSourceProvider):
957         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
958         * loader/cache/CachedScript.cpp:
959         (WebCore::CachedScript::destroyDecodedData):
960         (WebCore):
961         (WebCore::CachedScript::reportMemoryUsage):
962         * loader/cache/CachedScript.h:
963         (CachedScript):
964
965 2013-02-18  peavo@outlook.com  <peavo@outlook.com>
966
967         [Curl] The function cookiesForDOM() does not behave correctly.
968         https://bugs.webkit.org/show_bug.cgi?id=109923
969
970         Reviewed by Brent Fulgham.
971
972         The cookiesForDOM() function should return a list of matching cookies, both persistent and session cookies.
973
974         * platform/network/curl/CookieJarCurl.cpp:
975         (WebCore::readCurlCookieToken): Added function to read next token from Curl cookie string.
976         (WebCore::addMatchingCurlCookie): Added function to add matching cookies to cookie list.
977         (WebCore::setCookiesFromDOM): Add domain and path from url to cookie if not already set.
978         (WebCore::cookiesForDOM): Return a list of matching cookies, both session and persistent cookies.
979
980 2013-02-17  Mark Lam  <mark.lam@apple.com>
981
982         Fix SQLTransaction leak.
983         https://bugs.webkit.org/show_bug.cgi?id=110052.
984
985         Reviewed by Geoffrey Garen.
986
987         With https://bugs.webkit.org/show_bug.cgi?id=104750, there is now a circular
988         reference between SQLTransaction and its backend. The clean up process needs
989         to be fixed to explicitly break this reference cycle.
990
991         The 5 phases of the SQLTransaction (and backend) phases and their clean up
992         actions are:
993
994         Phase 1. After Birth, before scheduling
995         - During shutdown, DatabaseThread::databaseThread() calls
996           DatabaseBackendAsync::close(). DatabaseBackendAsync::close() iterates
997           DatabaseBackendAsync::m_transactionQueue and calls
998           SQLtransactionBackend::notifyDatabaseThreadIsShuttingDown() on each
999           transaction there.
1000
1001         Phase 2. After scheduling, before state AcquireLock
1002         - ~DatabaseTask() calls SQLtransactionBackend's
1003           notifyDatabaseThreadIsShuttingDown().
1004
1005         Phase 3. After state AcquireLock, before "lockAcquired"
1006         - During shutdown, DatabaseThread::databaseThread() calls
1007           SQLTransactionCoordinator::shutdown(), which calls
1008           SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown().
1009
1010         Phase 4: After "lockAcquired", before state CleanupAndTerminate
1011         - Same as Phase 3.
1012
1013         Phase 5: After state CleanupAndTerminate
1014         - state CleanupAndTerminate calls SQLTransactionBackend::doCleanup().
1015
1016         See comment at the top of SQLTransactionBackend.cpp for more details.
1017
1018         Other supporting changes:
1019         - Moved Database::close() to the DatabaseBackendAsync.
1020         - Moved the "if already cleaned up" check from SQLTransactionBackend's
1021           notifyDatabaseThreadIsShuttingDown() to doCleanup().
1022         - Added a check to prevent SQLTransactionCoordinator's releaseLock()
1023           from running when it's shutting down.
1024
1025         No new tests.
1026
1027         * Modules/webdatabase/Database.cpp:
1028         * Modules/webdatabase/Database.h:
1029         * Modules/webdatabase/DatabaseBackendAsync.cpp:
1030         (WebCore::DatabaseBackendAsync::close): Move from Database.cpp.
1031         * Modules/webdatabase/DatabaseBackendAsync.h:
1032         * Modules/webdatabase/DatabaseTask.cpp:
1033         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::DatabaseTransactionTask):
1034         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::~DatabaseTransactionTask):
1035         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::doPerformTask):
1036         * Modules/webdatabase/DatabaseTask.h:
1037         (DatabaseBackendAsync::DatabaseTransactionTask):
1038         * Modules/webdatabase/DatabaseThread.cpp:
1039         (WebCore::DatabaseThread::databaseThread):
1040         * Modules/webdatabase/SQLTransactionBackend.cpp:
1041         (WebCore::SQLTransactionBackend::doCleanup):
1042         (WebCore::SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown):
1043         (WebCore::SQLTransactionBackend::cleanupAndTerminate):
1044         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
1045         (WebCore::SQLTransactionCoordinator::SQLTransactionCoordinator):
1046         (WebCore::SQLTransactionCoordinator::acquireLock):
1047         (WebCore::SQLTransactionCoordinator::releaseLock):
1048         (WebCore::SQLTransactionCoordinator::shutdown):
1049         * Modules/webdatabase/SQLTransactionCoordinator.h:
1050         (SQLTransactionCoordinator):
1051
1052 2013-02-18  David Kilzer  <ddkilzer@apple.com>
1053
1054         Fix WebCore Xcode project
1055
1056         * WebCore.xcodeproj/project.pbxproj: Fix path for CDMPrivate.h.
1057
1058 2013-02-18  Julien Chaffraix  <jchaffraix@webkit.org>
1059
1060         [CSS Grid Layout] Refactor grid position resolution code to support an internal grid representation
1061         https://bugs.webkit.org/show_bug.cgi?id=109718
1062
1063         Reviewed by Ojan Vafai.
1064
1065         In order to support auto placement (where we can't infer a grid item's position from its style),
1066         we need to have 2 code paths:
1067         - One that places the elements on the grid representation.
1068         - One that reuse the grid representation to return the position.
1069
1070         This code path implements this split so that we can add auto placement in a follow-up patch(es).
1071         Also in order to avoid a O(n^2) behavior [walking over our grid to find a grid item's position],
1072         the cached position code path needed an efficient way to find the grid items -> position mapping.
1073
1074         Refactoring, covered by existing tests.
1075
1076         * rendering/RenderGrid.cpp:
1077         (WebCore::RenderGrid::cachedGridCoordinate):
1078         (WebCore::RenderGrid::resolveGridPositionFromStyle):
1079         These methods implements the above split. The first one
1080         reuses our cached information whereas the other one is
1081         used to build the cache.
1082
1083         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
1084         (WebCore::RenderGrid::layoutGridItems):
1085         Added some code to clear the grid items' position.
1086
1087         (WebCore::RenderGrid::findChildLogicalPosition):
1088         (WebCore::RenderGrid::logicalContentHeightForChild):
1089         Updated these functions to use cachedGridPosition.
1090
1091         (WebCore::RenderGrid::maximumIndexInDirection):
1092         Added a comment about why we don't use cachedGridPosition.
1093
1094         (WebCore::RenderGrid::insertItemIntoGrid):
1095         Added this helper function to insert into the grid and
1096         cache the position in the reverse lookup map.
1097
1098         (WebCore::RenderGrid::placeItemsOnGrid):
1099         Updated to call insertItemIntoGrid. Also added an ASSERT
1100         similar to m_grid.
1101
1102         (WebCore::RenderGrid::clearGrid):
1103         Added this helper function to clear our grid structure.
1104
1105         * rendering/RenderGrid.h:
1106         (GridCoordinate):
1107         (WebCore::RenderGrid::GridCoordinate::GridCoordinate):
1108         Added this POD to hold the coordinates in our reverse map.
1109
1110 2013-02-18  Stephen Chenney  <schenney@chromium.org>
1111
1112         feFlood incorrectly applied color-interpolation-filters
1113         https://bugs.webkit.org/show_bug.cgi?id=109985
1114
1115         Reviewed by Dirk Schulze.
1116
1117         The SVG spec defines the color-interpolation-filters property for all
1118         filter effect elements in order to control cases where a color is
1119         based on some arithmetic computation on other colors. For example,
1120         when computing gradients or blending colors. feFlood simply fills a
1121         region with the given color, and that given color is always defined to
1122         be in sRGB space, so the feFlood result should always be sRGB.
1123
1124         The new behavior matches both Opera and Firefox.
1125
1126         Tests: svg/filters/feFlood-color-interpolation-expected.svg
1127                svg/filters/feFlood-color-interpolation.svg
1128
1129         * platform/graphics/filters/FEFlood.cpp:
1130         (WebCore::FEFlood::platformApplySoftware): Force the color mode to be
1131         sRGB before returning.
1132
1133 2013-02-18  Mark Lam  <mark.lam@apple.com>
1134
1135         Introduced AbstractSQLStatement and AbstractSQLStatementBackend.
1136         https://bugs.webkit.org/show_bug.cgi?id=110148.
1137
1138         Reviewed by Geoff Garen.
1139
1140         This is part of the webdatabase refactoring for webkit2.
1141         - Also changed the frontend and backend to only refer to the
1142           abstract interface of each other.
1143
1144         No new tests.
1145
1146         * GNUmakefile.list.am:
1147         * Modules/webdatabase/AbstractSQLStatement.h: Added.
1148         (AbstractSQLStatement):
1149         (WebCore::AbstractSQLStatement::~AbstractSQLStatement):
1150         * Modules/webdatabase/AbstractSQLStatementBackend.h: Added.
1151         (AbstractSQLStatementBackend):
1152         (WebCore::AbstractSQLStatementBackend::~AbstractSQLStatementBackend):
1153         * Modules/webdatabase/SQLStatement.cpp:
1154         (WebCore::SQLStatement::setBackend):
1155         * Modules/webdatabase/SQLStatement.h:
1156         (SQLStatement):
1157         * Modules/webdatabase/SQLStatementBackend.cpp:
1158         (WebCore::SQLStatementBackend::create):
1159         (WebCore::SQLStatementBackend::SQLStatementBackend):
1160         (WebCore::SQLStatementBackend::frontend):
1161         * Modules/webdatabase/SQLStatementBackend.h:
1162         (SQLStatementBackend):
1163         * Modules/webdatabase/SQLTransaction.cpp:
1164         (WebCore::SQLTransaction::deliverStatementCallback):
1165         * Modules/webdatabase/SQLTransactionBackend.cpp:
1166         (WebCore::SQLTransactionBackend::currentStatement):
1167         (WebCore::SQLTransactionBackend::executeSQL):
1168         * Modules/webdatabase/SQLTransactionBackend.h:
1169         (SQLTransactionBackend):
1170         * Target.pri:
1171         * WebCore.gypi:
1172         * WebCore.vcproj/WebCore.vcproj:
1173         * WebCore.vcxproj/WebCore.vcxproj:
1174         * WebCore.vcxproj/WebCore.vcxproj.filters:
1175         * WebCore.xcodeproj/project.pbxproj:
1176
1177 2013-02-18  David Kilzer  <ddkilzer@apple.com>
1178
1179         BUILD FIX (r143230): Fix renamed header and implementation of -[WebAccessibilityObjectWrapper accessibilityPostedNotification:]
1180         <http://webkit.org/b/110077>
1181
1182         Fixes the following build failures:
1183
1184             AccessibilityObjectIOS.mm:35:9: fatal error: 'AccessibilityObjectWrapperIOS.h' file not found
1185             #import "AccessibilityObjectWrapperIOS.h"
1186                     ^
1187             1 error generated.
1188
1189             WebAccessibilityObjectWrapperIOS.mm:2051:35: error: use of undeclared identifier 'notificationString'; did you mean 'notificationType'?
1190                 if (AXNotificationCallback && notificationString)
1191                                               ^~~~~~~~~~~~~~~~~~
1192                                               notificationType
1193             WebAccessibilityObjectWrapperIOS.mm:2049:81: note: 'notificationType' declared here
1194             - (void)accessibilityPostedNotification:(WebCore::AXObjectCache::AXNotification)notificationType
1195                                                                                             ^
1196             WebAccessibilityObjectWrapperIOS.mm:2052:38: error: use of undeclared identifier 'notificationString'; did you mean 'notificationType'?
1197                     AXNotificationCallback(self, notificationString, AXPostedNotificationContext);
1198                                                  ^~~~~~~~~~~~~~~~~~
1199                                                  notificationType
1200             WebAccessibilityObjectWrapperIOS.mm:2049:81: note: 'notificationType' declared here
1201             - (void)accessibilityPostedNotification:(WebCore::AXObjectCache::AXNotification)notificationType
1202                                                                                             ^
1203             WebAccessibilityObjectWrapperIOS.mm:2052:38: error: cannot initialize a parameter of type 'NSString *' with an lvalue of type 'WebCore::AXObjectCache::AXNotification'
1204                     AXNotificationCallback(self, notificationString, AXPostedNotificationContext);
1205                                                  ^~~~~~~~~~~~~~~~~~
1206             WebAccessibilityObjectWrapperIOS.mm:2049:81: error: conflicting parameter types in implementation of 'accessibilityPostedNotification:': 'NSString *' vs 'WebCore::AXObjectCache::AXNotification' [-Werror,-Wmismatched-parameter-types]
1207             - (void)accessibilityPostedNotification:(WebCore::AXObjectCache::AXNotification)notificationType
1208                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
1209             WebAccessibilityObjectWrapperBase.h:48:53: note: previous definition is here
1210             - (void)accessibilityPostedNotification:(NSString *)notificationName;
1211                                                      ~~~~~~~~~~ ^
1212             4 errors generated.
1213
1214         * accessibility/ios/AccessibilityObjectIOS.mm: Fix name of
1215         included header.
1216         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1217         (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]):
1218         Fix implementation to match declaration.
1219
1220         * accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
1221         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1222         * accessibility/ios/AXObjectCacheIOS.mm:
1223         - Clean up #endif comments.
1224
1225 2013-02-18  Jer Noble  <jer.noble@apple.com>
1226
1227         EME: Add a CDMPrivate implementation using AVFoundation.
1228         https://bugs.webkit.org/show_bug.cgi?id=109739
1229
1230         Reviewed by Eric Carlson.
1231
1232         Add a CDMPrivate implementation using AVFoundation, similar to the EME v1 implementation
1233         in MediaPlayerPrivateAVFoundationObjC. This requires passing the AVAssetResourceLoadingRequest
1234         from the MediaPlayerPrivateAVFoundationObjC instance to CDMSessionAVFoundation. To do so
1235         without adding platform-specific API to MediaPlayer, add a static map from MediaPlayer ->
1236         MediaPlayerPrivateAVFoundationObjC instances to be used to vend the AVAssetResourceLoadingRequest
1237         to CDMSessionAVFoundation.
1238
1239         * Modules/encryptedmedia/CDM.cpp:
1240         (WebCore::installedCDMFactories): Add the factory for CDMPrivateAVFoundation.
1241         * Modules/encryptedmedia/CDM.h:
1242         * Modules/encryptedmedia/CDMPrivateAVFoundation.h: Added.
1243         (WebCore::CDMPrivateAVFoundation::create): Simple factory method.
1244         (WebCore::CDMPrivateAVFoundation::~CDMPrivateAVFoundation): Simple virtual destructor.
1245         (WebCore::CDMPrivateAVFoundation::cdm): Simple getter.
1246         (WebCore::CDMPrivateAVFoundation::CDMPrivateAVFoundation): Simple constructor.
1247         * Modules/encryptedmedia/CDMPrivateAVFoundation.mm: Added.
1248         (WebCore::CDMSessionAVFoundation::~CDMSessionAVFoundation): Simple destructor.
1249         (WebCore::CDMPrivateAVFoundation::supportsKeySytem): Check whether the given key system is supported.
1250         (WebCore::CDMPrivateAVFoundation::supportsMIMEType): Check whether the given MIME type is supported.
1251         (WebCore::CDMPrivateAVFoundation::createSession): Return a new CDMSessionAVFoundation.
1252         (WebCore::CDMSessionAVFoundation::CDMSessionAVFoundation): Simple constructor.
1253         (WebCore::CDMSessionAVFoundation::generateKeyRequest): Retrieve the AVAssetResourceLoadingRequest
1254             from the MediaPlayer, and use it to generate a key request.
1255         (WebCore::CDMSessionAVFoundation::releaseKeys): No-op.
1256         (WebCore::CDMSessionAVFoundation::update): Add the passed in key to the AVAssetResourceLoadingRequest.
1257         * WebCore.xcodeproj/project.pbxproj:
1258         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1259         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1260         (WebCore::playerToPrivateMap): Lazily instantiate static map.
1261         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Register with the playerToPrivateMap.
1262         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Unregister from same.
1263         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): Also send keyNeeded event in ENCRYPTED_MEDIA_V2.
1264         (WebCore::MediaPlayerPrivateAVFoundationObjC::extractKeyURIKeyIDAndCertificateFromInitData): Convert this 
1265             method from file-static to class static.
1266         (WebCore::MediaPlayerPrivateAVFoundationObjC::takeRequestForPlayerAndKeyURI): Pull the AVAssetResourceLoadingRequest
1267             from m_keyURIToRequestMap and return it, if present.
1268
1269 2013-02-18  Philip Rogers  <pdr@google.com>
1270
1271         Fix scaling of tiled SVG backgrounds on high-dpi displays
1272         https://bugs.webkit.org/show_bug.cgi?id=110047
1273
1274         Reviewed by Dirk Schulze.
1275
1276         This patch fixes the scaling of SVG when used for drawing patterns. Tiled/patterend SVG
1277         images are first drawn into an image buffer and then the image buffer is used to stamp
1278         out tiles. Because it is a raster source, the size of the image buffer needs to
1279         be scaled to the final resolution of the device. After scaling the image buffer, the
1280         source rect and pattern transforms need to be adjusted so they align in device pixel
1281         coordinates. This adjustment was not done before this patch, causing pixelated rendering.
1282
1283         Additionally, a FIXME has been added due to webkit.org/b/110065 and the image buffer
1284         has been manually scaled (using "zoomedAndScaledContainerRect") instead of relying
1285         on the ImageBuffer's resolutionScale parameter.
1286
1287         Test: svg/as-background-image/tiled-background-image.html
1288
1289         * svg/graphics/SVGImage.cpp:
1290         (WebCore::SVGImage::drawPatternForContainer):
1291
1292             Note that fixing the FIXME does not change that the source rect and transform need
1293             to be adjusted for page scale.
1294
1295 2013-02-18  David Hyatt  <hyatt@apple.com>
1296
1297         Make seamless iframes paginate properly in their enclosing document's pagination context.
1298         https://bugs.webkit.org/show_bug.cgi?id=106125
1299         <rdar://problem/12922720> Text in iframe is clipped while printing
1300
1301         Reviewed by Simon Fraser.
1302
1303         Added new tests in fast/multicol and fast/region.
1304
1305         * rendering/RenderBlock.cpp:
1306         (WebCore::RenderBlock::clampToStartAndEndRegions):
1307         Don't clamp when the RenderView is the containing block of an object in a RenderFlowThread.
1308
1309         * rendering/RenderObject.cpp:
1310         (WebCore::RenderObject::containerForRepaint):
1311         Don't attempt any repaint container antics when we're in a seamless iframe, since the ancestor
1312         document will actually do the handoff into the flow thread.
1313
1314         * rendering/RenderView.cpp:
1315         (WebCore::enclosingSeamlessRenderer):
1316         Heper function to test for an enclosing seamless iframe.
1317         
1318         (WebCore::RenderView::addChild):
1319         Subclass addChild on RenderView to properly set the inRenderFlowThread state for a seamless
1320         child document so thta it will check regions.
1321
1322         (WebCore::RenderView::initializeLayoutState):
1323         New helper method for setting up the initial layout state of a RenderView. If inside a seamless
1324         paginated ancestor, set up the appropriate pagination information so the child document
1325         knows about it. This method will expand to inherit info about line grids and exclusions eventually
1326         also.
1327
1328         (WebCore::RenderView::layout):
1329         Now calls initializeLayoutState to set up the layout state.
1330
1331         * rendering/RenderView.h:
1332         (WebCore::RenderView::pageLogicalHeight):
1333         (WebCore::RenderView::setPageLogicalHeight):
1334         (RenderView):
1335         Fix the type of the page logical height methods to be LayoutUnit instead of unsigned.
1336
1337 2013-02-18  Sheriff Bot  <webkit.review.bot@gmail.com>
1338
1339         Unreviewed, rolling out r143145.
1340         http://trac.webkit.org/changeset/143145
1341         https://bugs.webkit.org/show_bug.cgi?id=110143
1342
1343         Causes frequent crashes. (Requested by eric_carlson on
1344         #webkit).
1345
1346         * dom/EventDispatchMediator.cpp:
1347         (WebCore::EventDispatchMediator::dispatchEvent):
1348         * dom/EventDispatcher.cpp:
1349         (WebCore::EventDispatcher::dispatchEvent):
1350         (WebCore::EventDispatcher::EventDispatcher):
1351         (WebCore::EventDispatcher::ensureEventPath):
1352         (WebCore::EventDispatcher::dispatchSimulatedClick):
1353         (WebCore::EventDispatcher::dispatchEventPreProcess):
1354         (WebCore::EventDispatcher::dispatchEventAtCapturing):
1355         (WebCore::EventDispatcher::dispatchEventAtTarget):
1356         (WebCore::EventDispatcher::dispatchEventAtBubbling):
1357         (WebCore::EventDispatcher::dispatchEventPostProcess):
1358         * dom/EventDispatcher.h:
1359         (EventDispatcher):
1360         (WebCore::EventDispatcher::node):
1361         (WebCore):
1362         * dom/FocusEvent.cpp:
1363         (WebCore::FocusEventDispatchMediator::dispatchEvent):
1364         (WebCore::BlurEventDispatchMediator::dispatchEvent):
1365         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
1366         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
1367         * dom/GestureEvent.cpp:
1368         (WebCore::GestureEventDispatchMediator::dispatchEvent):
1369         * dom/MouseEvent.cpp:
1370         (WebCore::MouseEventDispatchMediator::dispatchEvent):
1371
1372 2013-02-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1373
1374         [Soup] Free cookies explicitly in loops instead of using GOwnPtr
1375         https://bugs.webkit.org/show_bug.cgi?id=110103
1376
1377         Reviewed by Martin Robinson.
1378
1379         Free cookies explicitly in loops instead of using GOwnPtr for this.
1380         Until now, the code was mixing both styles. This patch makes the
1381         code consistent one way. Adopting list items with GOwnPtr for the
1382         sole purpose to free them makes the freeing less obvious and may
1383         lead to mistakes if someone refactors the code and calls "break;"
1384         to abort loop iteration.
1385
1386         No new tests, no behavior change.
1387
1388         * platform/network/soup/CookieJarSoup.cpp:
1389         (WebCore::getRawCookies):
1390         (WebCore::deleteCookie):
1391         (WebCore::getHostnamesWithCookies):
1392
1393 2013-02-18  Joseph Pecoraro  <pecoraro@apple.com>
1394
1395         [JSC]: ASSERT in KURL(ParsedURLStringTag) under sourceMapURLForScript
1396         https://bugs.webkit.org/show_bug.cgi?id=109987
1397
1398         Reviewed by Pavel Feldman.
1399
1400         Improved an existing test to cover this.
1401
1402         * bindings/js/ScriptDebugServer.cpp:
1403         (WebCore::ScriptDebugServer::dispatchDidParseSource):
1404         Remove the sourceURL parsing and script.url replacement from the JSC
1405         implementation of ScriptDebugServer. The WebCore inspector code that
1406         this was added for already does this, at a more appropriate time.
1407
1408 2013-02-18  Mike West  <mkwst@chromium.org>
1409
1410         compareDocumentPosition reports disconnected nodes as following each other
1411         https://bugs.webkit.org/show_bug.cgi?id=108274
1412
1413         Reviewed by Dimitri Glazkov.
1414
1415         jQuery has had to implement their own sorting mechanism in Sizzle[1] due
1416         to Node::compareDocumentPosition always reporting disconnected nodes
1417         as following each other. According to spec[2], we should instead be
1418         indicating that the result is (a) disconnected, (b) implementation
1419         specific, and (c) deterministically ordered.
1420
1421         [1]: https://github.com/jquery/sizzle/commit/1c8aec91284af8d8c14447976235d5dd72b0d75e
1422         [2]: http://dom.spec.whatwg.org/#dom-node-comparedocumentposition
1423
1424         Test: fast/dom/compare-document-position-disconnected-nodes.html
1425
1426         * dom/Node.cpp:
1427         (WebCore::Node::compareDocumentPosition):
1428             After walking the parentNode chain of both Nodes, compare the root.
1429             If the Nodes don't share a root, they're in distinct trees, and
1430             should return as described above. We determine which element
1431             "preceeds" the other in an arbitrary fashion via pointer comparison.
1432
1433 2013-02-18  Andrey Adaikin  <aandrey@chromium.org>
1434
1435         Web Inspector: [Canvas] fix replay log grouping by frames
1436         https://bugs.webkit.org/show_bug.cgi?id=110122
1437
1438         Reviewed by Pavel Feldman.
1439
1440         Bug: log grouping by frames did not work if a frame end call is not a draw call.
1441         Drive-by: Last draw call group may not contain a draw call. In this case merge it into the previous group.
1442
1443         * inspector/front-end/CanvasProfileView.js:
1444         (WebInspector.CanvasProfileView.prototype._appendCallNode):
1445         (WebInspector.CanvasProfileView.prototype._maybeMergeLastDrawCallGroups):
1446
1447 2013-02-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1448
1449         [Soup] Superfluous HashMap check in SocketStreamHandleSoup::getHandleFromId()
1450         https://bugs.webkit.org/show_bug.cgi?id=110107
1451
1452         Reviewed by Martin Robinson.
1453
1454         Remove Superfluous HashMap::contains() call in SocketStreamHandleSoup::getHandleFromId()
1455         as HashMap::get() will already return 0 in this case anyway.
1456
1457         No new tests, no behavior change.
1458
1459         * platform/network/soup/SocketStreamHandleSoup.cpp:
1460         (WebCore):
1461         (WebCore::getHandleFromId):
1462
1463 2013-02-18  Zan Dobersek  <zdobersek@igalia.com>
1464
1465         Stop placing std::isfinite and std::signbit inside the global scope
1466         https://bugs.webkit.org/show_bug.cgi?id=109817
1467
1468         Reviewed by Darin Adler.
1469
1470         Prefix calls to the isfinite and signbit methods with std:: as the two
1471         methods are no longer being imported into the global scope.
1472
1473         No new tests as there's no change in functionality.
1474
1475         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
1476         (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
1477         * bindings/js/JSDOMBinding.cpp:
1478         (WebCore::jsDateOrNull):
1479         * bindings/js/JSDOMBinding.h:
1480         (WebCore::finiteInt32Value):
1481         * bindings/v8/V8Binding.h:
1482         (WebCore::v8DateOrNull):
1483         * css/CSSPrimitiveValue.cpp:
1484         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1485         * html/BaseDateAndTimeInputType.cpp:
1486         (WebCore::BaseDateAndTimeInputType::parseToNumber):
1487         * html/HTMLInputElement.cpp:
1488         (WebCore::HTMLInputElement::setValueAsNumber):
1489         * html/HTMLMeterElement.cpp:
1490         (WebCore::HTMLMeterElement::setMin):
1491         (WebCore::HTMLMeterElement::setMax):
1492         (WebCore::HTMLMeterElement::setValue):
1493         (WebCore::HTMLMeterElement::setLow):
1494         (WebCore::HTMLMeterElement::setHigh):
1495         (WebCore::HTMLMeterElement::setOptimum):
1496         * html/HTMLProgressElement.cpp:
1497         (WebCore::HTMLProgressElement::value):
1498         (WebCore::HTMLProgressElement::setValue):
1499         (WebCore::HTMLProgressElement::max):
1500         (WebCore::HTMLProgressElement::setMax):
1501         * html/MonthInputType.cpp:
1502         (WebCore::MonthInputType::valueAsDate):
1503         (WebCore::MonthInputType::defaultValueForStepUp):
1504         (WebCore::MonthInputType::parseToNumber):
1505         * html/NumberInputType.cpp:
1506         (WebCore::NumberInputType::typeMismatchFor):
1507         (WebCore::NumberInputType::sanitizeValue):
1508         (WebCore::NumberInputType::hasBadInput):
1509         * html/RangeInputType.cpp:
1510         (WebCore::RangeInputType::typeMismatchFor):
1511         * html/TimeInputType.cpp:
1512         (WebCore::TimeInputType::defaultValueForStepUp):
1513         * html/canvas/CanvasPathMethods.cpp:
1514         (WebCore::CanvasPathMethods::moveTo):
1515         (WebCore::CanvasPathMethods::lineTo):
1516         (WebCore::CanvasPathMethods::quadraticCurveTo):
1517         (WebCore::CanvasPathMethods::bezierCurveTo):
1518         (WebCore::CanvasPathMethods::arcTo):
1519         (WebCore::CanvasPathMethods::arc):
1520         (WebCore::CanvasPathMethods::rect):
1521         * html/canvas/CanvasRenderingContext2D.cpp:
1522         (WebCore::CanvasRenderingContext2D::setLineWidth):
1523         (WebCore::CanvasRenderingContext2D::setMiterLimit):
1524         (WebCore::CanvasRenderingContext2D::setShadowOffsetX):
1525         (WebCore::CanvasRenderingContext2D::setShadowOffsetY):
1526         (WebCore::CanvasRenderingContext2D::setShadowBlur):
1527         (WebCore::lineDashSequenceIsValid):
1528         (WebCore::CanvasRenderingContext2D::setLineDashOffset):
1529         (WebCore::CanvasRenderingContext2D::scale):
1530         (WebCore::CanvasRenderingContext2D::rotate):
1531         (WebCore::CanvasRenderingContext2D::translate):
1532         (WebCore::CanvasRenderingContext2D::transform):
1533         (WebCore::CanvasRenderingContext2D::setTransform):
1534         (WebCore::validateRectForCanvas):
1535         (WebCore::CanvasRenderingContext2D::isPointInPath):
1536         (WebCore::CanvasRenderingContext2D::isPointInStroke):
1537         (WebCore::CanvasRenderingContext2D::drawImage):
1538         (WebCore::CanvasRenderingContext2D::createLinearGradient):
1539         (WebCore::CanvasRenderingContext2D::createRadialGradient):
1540         (WebCore::CanvasRenderingContext2D::createImageData):
1541         (WebCore::CanvasRenderingContext2D::getImageData):
1542         (WebCore::CanvasRenderingContext2D::putImageData):
1543         (WebCore::CanvasRenderingContext2D::drawTextInternal):
1544         * html/parser/HTMLParserIdioms.cpp:
1545         (WebCore::parseToDoubleForNumberType):
1546         * html/shadow/MediaControlElements.cpp:
1547         (WebCore::MediaControlTimelineElement::setDuration):
1548         * html/shadow/MediaControls.cpp:
1549         (WebCore::MediaControls::reset):
1550         * html/shadow/MediaControlsApple.cpp:
1551         (WebCore::MediaControlsApple::reset):
1552         * html/shadow/MediaControlsBlackBerry.cpp:
1553         (WebCore::MediaControlFullscreenTimelineElement::setDuration):
1554         (WebCore::MediaControlsBlackBerry::reset):
1555         * inspector/InspectorValues.cpp:
1556         (WebCore::InspectorBasicValue::writeJSON):
1557         * loader/cache/CachedResource.cpp:
1558         (WebCore::CachedResource::currentAge):
1559         (WebCore::CachedResource::freshnessLifetime):
1560         * page/DOMWindow.cpp:
1561         (WebCore::DOMWindow::adjustWindowRect):
1562         * platform/DateComponents.cpp:
1563         (WebCore::DateComponents::setMillisecondsSinceEpochForDate):
1564         (WebCore::DateComponents::setMillisecondsSinceEpochForDateTime):
1565         (WebCore::DateComponents::setMillisecondsSinceEpochForMonth):
1566         (WebCore::DateComponents::setMillisecondsSinceMidnight):
1567         (WebCore::DateComponents::setMonthsSinceEpoch):
1568         (WebCore::DateComponents::setMillisecondsSinceEpochForWeek):
1569         * platform/Decimal.cpp:
1570         (WebCore::Decimal::fromDouble):
1571         * platform/FileSystem.h:
1572         (WebCore::isValidFileTime):
1573         * platform/LocalizedStrings.cpp:
1574         (WebCore::localizedMediaTimeDescription):
1575         * platform/graphics/cairo/CairoUtilities.cpp:
1576         (WebCore::drawPatternToCairoContext):
1577         * platform/graphics/cairo/PathCairo.cpp:
1578         (WebCore::Path::addArc):
1579         (WebCore::Path::contains):
1580         * platform/graphics/cg/PathCG.cpp:
1581         (WebCore::Path::addArc):
1582         * platform/graphics/gstreamer/FullscreenVideoControllerGStreamer.cpp:
1583         (WebCore::FullscreenVideoControllerGStreamer::timeToString):
1584         * platform/graphics/openvg/PathOpenVG.cpp:
1585         (WebCore::Path::addArc):
1586         * platform/graphics/skia/SkiaUtils.h:
1587         (WebCore::WebCoreFloatToSkScalar):
1588         (WebCore::WebCoreDoubleToSkScalar):
1589         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1590         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::maxTimeSeekable):
1591         * platform/gtk/LocalizedStringsGtk.cpp:
1592         (WebCore::localizedMediaTimeDescription):
1593         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
1594         (timeToString):
1595         * platform/network/ResourceResponseBase.cpp:
1596         (WebCore::parseDateValueInHeader):
1597         * platform/qt/LocalizedStringsQt.cpp:
1598         (WebCore::localizedMediaTimeDescription):
1599         * rendering/RenderFlexibleBox.cpp:
1600         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
1601         * rendering/RenderMediaControlsChromium.cpp:
1602         (WebCore::formatChromiumMediaControlsTime):
1603         * rendering/RenderTheme.cpp:
1604         (WebCore::RenderTheme::formatMediaControlsTime):
1605         * rendering/style/RenderStyle.cpp:
1606         (WebCore::RenderStyle::setFontSize):
1607         * svg/SVGPathParser.cpp:
1608         (WebCore::SVGPathParser::decomposeArcToCubic):
1609         * xml/XPathFunctions.cpp:
1610         (WebCore::XPath::FunRound::round):
1611         * xml/XPathValue.cpp:
1612         (WebCore::XPath::Value::toString):
1613
1614 2013-02-18  Chris Fleizach  <cfleizach@apple.com>
1615
1616         AX: Make iOS wrapper use the WebAccessibilityObjectBase wrapper
1617         https://bugs.webkit.org/show_bug.cgi?id=110077
1618
1619         Reviewed by David Kilzer.
1620
1621         Make the iOS wrapper a subclass of the shared wrapper so that iOS can re-use code from the Mac.
1622         Rename the iOS file to reflect the class name.
1623
1624         * WebCore.xcodeproj/project.pbxproj:
1625         * accessibility/ios/AXObjectCacheIOS.mm:
1626         (WebCore::AXObjectCache::attachWrapper):
1627         (WebCore::AXObjectCache::postPlatformNotification):
1628         * accessibility/ios/AccessibilityObjectWrapperIOS.h: Removed.
1629         * accessibility/ios/AccessibilityObjectWrapperIOS.mm: Removed.
1630         * accessibility/ios/WebAccessibilityObjectWrapperIOS.h: Copied from Source/WebCore/accessibility/ios/AccessibilityObjectWrapperIOS.h.
1631         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: Copied from Source/WebCore/accessibility/ios/AccessibilityObjectWrapperIOS.mm.
1632         (-[WebAccessibilityObjectWrapper initWithAccessibilityObject:]):
1633         (-[WebAccessibilityObjectWrapper attachmentView]):
1634         (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:WebCore::AXObjectCache::]):
1635
1636 2013-02-18  Sheriff Bot  <webkit.review.bot@gmail.com>
1637
1638         Unreviewed, rolling out r143210.
1639         http://trac.webkit.org/changeset/143210
1640         https://bugs.webkit.org/show_bug.cgi?id=110128
1641
1642         Still causing some test timeouts (Requested by anttik on
1643         #webkit).
1644
1645         * platform/SharedTimer.h:
1646         (SharedTimer):
1647         (WebCore):
1648         (WebCore::MainThreadSharedTimer::stop):
1649         * platform/ThreadTimers.cpp:
1650         (WebCore::ThreadTimers::fireTimersInNestedEventLoop):
1651         * platform/mac/SharedTimerMac.mm:
1652         (WebCore):
1653         (WebCore::PowerObserver::restartSharedTimer):
1654         (WebCore::setSharedTimerFireInterval):
1655         (WebCore::stopSharedTimer):
1656
1657 2013-02-18  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1658
1659         Web Inspector: Disable hiding the debugger when it is below the source code
1660         https://bugs.webkit.org/show_bug.cgi?id=110106
1661
1662         Reviewed by Pavel Feldman.
1663
1664         When the "Split horizontally" option is checked in the Sources panel the button responsible for the sidebar
1665         visibility is hidden and the sidebar is force-shown. Also set the "Split sidebar" option default to true.
1666
1667         No new tests.
1668
1669         * inspector/front-end/ScriptsPanel.js:
1670         (WebInspector.ScriptsPanel):
1671         * inspector/front-end/scriptsPanel.css:
1672         (.split-view-horizontal #scripts-debug-sidebar-resizer-widget):
1673
1674 2013-02-18  Bear Travis  <betravis@adobe.com>
1675
1676         [CSS Exclusions] Support outside-shape layout for shape-inside property
1677         https://bugs.webkit.org/show_bug.cgi?id=102571
1678
1679         Reviewed by David Hyatt.
1680
1681         A shape-inside value of 'outside-shape' should resolve to the value of
1682         the shape-outside property for layout. This patch introduces a helper
1683         method to resolve shape-inside in RenderStyle, and replaces calls to
1684         RenderStyle::shapeInside() when the resolved (layout) value should be
1685         used.
1686
1687         Test: fast/exclusions/shape-inside/shape-inside-outside-shape.html
1688
1689         * rendering/ExclusionShapeInfo.cpp:
1690         (WebCore::::computedShape): Use the resolved shape-inside getter.
1691         * rendering/ExclusionShapeInsideInfo.h:
1692         (WebCore::ExclusionShapeInsideInfo::isEnabledFor): Ditto.
1693         (WebCore::ExclusionShapeInsideInfo::ExclusionShapeInsideInfo): Ditto.
1694         * rendering/RenderBlock.cpp:
1695         (WebCore::RenderBlock::styleDidChange): Ditto.
1696         (WebCore::RenderBlock::exclusionShapeInsideInfo): Ditto.
1697         * rendering/style/RenderStyle.h: Add the resolved shape inside getter.
1698
1699 2013-02-18  Pavel Feldman  <pfeldman@chromium.org>
1700
1701         Web Inspector: hide vertical-sidebar-split in dock-to-right mode behind single experimental flag.
1702         https://bugs.webkit.org/show_bug.cgi?id=110119
1703
1704         Reviewed by Vsevolod Vlasov.
1705
1706         Removed context menus, made it toggle automatically upon dock orientation change.
1707
1708         * inspector/front-end/DockController.js:
1709         (WebInspector.DockController.prototype._toggleDockState):
1710         * inspector/front-end/ElementsPanel.js:
1711         (WebInspector.ElementsPanel):
1712         (WebInspector.ElementsPanel.prototype._sidebarContextMenuEventFired):
1713         (WebInspector.ElementsPanel.prototype._dockSideChanged):
1714         (WebInspector.ElementsPanel.prototype._setVerticalSplit):
1715         * inspector/front-end/ScriptsPanel.js:
1716         (WebInspector.ScriptsPanel):
1717         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
1718         (WebInspector.ScriptsPanel.prototype._dockSideChanged):
1719         * inspector/front-end/Settings.js:
1720         (WebInspector.ExperimentsSettings):
1721         * inspector/front-end/inspector.css:
1722         * inspector/front-end/scriptsPanel.css:
1723         (#scripts-sidebar-stack-pane):
1724         (div.sidebar-pane-stack#scripts-debug-sidebar-contents):
1725         * inspector/front-end/tabbedPane.css:
1726         (.tabbed-pane):
1727
1728 2013-02-18  ChangSeok Oh  <shivamidow@gmail.com>
1729
1730         [GTK] Fix nits for configuration
1731         https://bugs.webkit.org/show_bug.cgi?id=110083
1732
1733         Reviewed by Martin Robinson.
1734
1735         Remove trailing white space. It has caused annoying warning while configuration.
1736
1737         No new tests since no funtionality change.
1738
1739         * GNUmakefile.list.am:
1740
1741 2013-02-18  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1742
1743         [WebGL][EFL] Refactor GraphicsContext3DPrivate to add support for SharedContext.
1744         https://bugs.webkit.org/show_bug.cgi?id=109988
1745
1746         Reviewed by Kenneth Rohde Christiansen.
1747
1748         Covered by existing WebGL tests.
1749
1750         This patch refactors PlatformContext and GraphicsContext3DPrivate to
1751         add support for Shared Context. This would help share GL resources
1752         between transport surface and offscreen surface without having to worry
1753         about the context state. So far, we used the same drawable as transport
1754         surface and offscreen surface. After this patch we use pixmap surface as
1755         offscreen surface and use shared context to render texture content to
1756         transport surface. This would also align as to how shared surface is implemented
1757         on EFL and Qt ports.
1758
1759         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1760         (WebCore::GraphicsContext3D::GraphicsContext3D):
1761         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
1762         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1763         (WebCore):
1764         (WebCore::GraphicsContext3DPrivate::initialize):
1765         (WebCore::GraphicsContext3DPrivate::makeSharedContextCurrent):
1766         (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface):
1767         * platform/graphics/efl/GraphicsContext3DPrivate.h:
1768         (GraphicsContext3DPrivate):
1769         * platform/graphics/opengl/GLPlatformContext.cpp:
1770         (WebCore::GLPlatformContext::initialize):
1771         * platform/graphics/opengl/GLPlatformContext.h:
1772         Needed changes to take shared context into use.
1773
1774         * platform/graphics/opengl/GLPlatformSurface.cpp:
1775         (WebCore::GLPlatformSurface::createOffScreenSurface):
1776         (WebCore::GLPlatformSurface::updateContents):
1777         * platform/graphics/opengl/GLPlatformSurface.h:
1778         (GLPlatformSurface):
1779         * platform/graphics/surfaces/glx/GLXConfigSelector.h:
1780         (WebCore::GLXConfigSelector::GLXConfigSelector):
1781         (WebCore::GLXConfigSelector::visualInfo):
1782         (WebCore::GLXConfigSelector::pixmapContextConfig):
1783         (GLXConfigSelector):
1784         (WebCore::GLXConfigSelector::reset):
1785         * platform/graphics/surfaces/glx/GLXContext.cpp:
1786         Added support to query configiration supporting
1787         pixmap surface.
1788
1789         (WebCore::GLXOffScreenContext::initialize):
1790         * platform/graphics/surfaces/glx/GLXContext.h:
1791         (GLXOffScreenContext):
1792         * platform/graphics/surfaces/glx/GLXSurface.cpp:
1793         (WebCore::GLXTransportSurface::GLXTransportSurface):
1794         (WebCore::GLXTransportSurface::swapBuffers):
1795         (WebCore::GLXOffScreenSurface::GLXOffScreenSurface):
1796         (WebCore::GLXOffScreenSurface::~GLXOffScreenSurface):
1797         (WebCore::GLXOffScreenSurface::initialize):
1798         (WebCore::GLXOffScreenSurface::configuration):
1799         (WebCore::GLXOffScreenSurface::destroy):
1800         (WebCore::GLXOffScreenSurface::freeResources):
1801         (WebCore::GLXOffScreenSurface::setGeometry):
1802         Renamed GLXPBuffer surface as GLXOffScreenSurface.
1803
1804         * platform/graphics/surfaces/glx/GLXSurface.h:
1805         (GLXTransportSurface):
1806         (GLXOffScreenSurface):
1807         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
1808         (WebCore::GraphicsSurfacePrivate::createSurface):
1809         * platform/graphics/surfaces/glx/X11Helper.cpp:
1810         (WebCore::X11Helper::createPixmap):
1811         (WebCore):
1812         (WebCore::X11Helper::destroyPixmap):
1813         (WebCore::X11Helper::createOffScreenWindow):
1814         * platform/graphics/surfaces/glx/X11Helper.h:
1815         (X11Helper):
1816         Added functions to create and destroy pixmap.
1817
1818 2013-02-18  Ilya Tikhonovsky  <loislo@chromium.org>
1819
1820         Web Inspector: Native Memory Instrumentation: Generate meta information for HeapSnapshot parser.
1821         https://bugs.webkit.org/show_bug.cgi?id=110104
1822
1823         Reviewed by Yury Semikhatsky.
1824
1825         The format of Native heap snapshot is slightly different so it should provide its own meta information.
1826
1827
1828         * inspector/HeapGraphSerializer.cpp:
1829         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
1830         (WebCore::HeapGraphSerializer::finish):
1831         (WebCore::HeapGraphSerializer::reportMemoryUsage):
1832         (WebCore::HeapGraphSerializer::registerTypeString):
1833         (WebCore):
1834         * inspector/HeapGraphSerializer.h:
1835         (HeapGraphSerializer):
1836         * inspector/Inspector.json:
1837         * inspector/InspectorMemoryAgent.cpp:
1838         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
1839         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
1840         * inspector/InspectorMemoryAgent.h:
1841         (InspectorMemoryAgent):
1842         * inspector/front-end/HeapSnapshot.js:
1843         (WebInspector.HeapSnapshot.prototype._buildPostOrderIndex):
1844         * inspector/front-end/NativeHeapSnapshot.js:
1845         (WebInspector.NativeHeapSnapshot):
1846
1847 2013-02-18  Carlos Garcia Campos  <cgarcia@igalia.com>
1848
1849         [GTK] Force single header includes in GObject DOM bindings
1850         https://bugs.webkit.org/show_bug.cgi?id=104676
1851
1852         Reviewed by Xan Lopez.
1853
1854         Only including <webkitdom/webkitdom.h> should be allowed from
1855         apps.
1856
1857         * bindings/scripts/CodeGeneratorGObject.pm:
1858         (GenerateHeader):
1859         * bindings/scripts/gobject-generate-headers.pl:
1860         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
1861         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
1862         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
1863         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
1864         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
1865         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
1866         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
1867         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
1868         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
1869         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
1870         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
1871         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1872         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
1873         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
1874
1875 2013-02-16  Antti Koivisto  <antti@apple.com>
1876
1877         Reschedule shared CFRunLoopTimer instead of reconstructing it
1878         https://bugs.webkit.org/show_bug.cgi?id=109765
1879
1880         Reviewed by Andreas Kling.
1881
1882         Using CFRunLoopTimerSetNextFireDate is over 2x faster than deleting and reconstructing timers.
1883
1884         * platform/SharedTimer.h:
1885         (WebCore::SharedTimer::willEnterNestedEventLoop):
1886         (WebCore):
1887         (MainThreadSharedTimer):
1888         (WebCore::MainThreadSharedTimer::willEnterNestedEventLoop):
1889         * platform/ThreadTimers.cpp:
1890         (WebCore::ThreadTimers::fireTimersInNestedEventLoop):
1891         * platform/mac/SharedTimerMac.mm:
1892         (WebCore):
1893         (WebCore::PowerObserver::clearSharedTimer):
1894         (WebCore::ensurePowerObserver):
1895         (WebCore::sharedTimer):
1896         (WebCore::reinsertSharedTimer):
1897         
1898             Before entering nested runloop (used for inspector debugger mostly) reconstruct and reinsert the timer. For some reason
1899             the timer doesn't fire otherwise.
1900
1901         (WebCore::setSharedTimerFireInterval):
1902         (WebCore::stopSharedTimer):
1903
1904 2013-02-18  Alexander Pavlov  <apavlov@chromium.org>
1905
1906         Web Inspector: [Resources] Only remember the tree element selection if explicitly made by user
1907         https://bugs.webkit.org/show_bug.cgi?id=110105
1908
1909         Reviewed by Pavel Feldman.
1910
1911         This change instructs the Resources panel to remember the selected tree element only if it has been
1912         selected by the user (not automatically, like selecting a parent when its child is removed).
1913         All onselect() overrides pass the selectedByUser argument value
1914         to BaseStorageTreeElement.prototype.onselect.
1915         Drive-by: Use === comparisons everywhere.
1916
1917         * inspector/front-end/ResourcesPanel.js:
1918         (WebInspector.ResourcesPanel.prototype._reset): Do not detach [immutable] category views.
1919         (WebInspector.BaseStorageTreeElement.prototype.onselect): Remember itemURL on user gesture only.
1920         (WebInspector.StorageCategoryTreeElement.prototype.onselect):
1921         (WebInspector.FrameTreeElement.prototype.onselect):
1922         (WebInspector.FrameResourceTreeElement.prototype.onselect):
1923         (WebInspector.DatabaseTreeElement.prototype.onselect):
1924         (WebInspector.DatabaseTableTreeElement.prototype.onselect):
1925         (WebInspector.IDBDatabaseTreeElement.prototype.onselect):
1926         (WebInspector.IDBObjectStoreTreeElement.prototype.onselect):
1927         (WebInspector.IDBIndexTreeElement.prototype.onselect):
1928         (WebInspector.DOMStorageTreeElement):
1929         (WebInspector.DOMStorageTreeElement.prototype.onselect):
1930         (WebInspector.CookieTreeElement.prototype.onselect):
1931         (WebInspector.ApplicationCacheManifestTreeElement.prototype.onselect):
1932         (WebInspector.ApplicationCacheFrameTreeElement.prototype.onselect):
1933         (WebInspector.FileSystemTreeElement.prototype.onselect):
1934         (WebInspector.FileSystemTreeElement.prototype.clear):
1935         (WebInspector.ResourcesSearchController.prototype.nextSearchResult):
1936
1937 2013-02-18  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1938
1939         Web Inspector: Color picker should not be available in Computed Styles pane
1940         https://bugs.webkit.org/show_bug.cgi?id=109697
1941
1942         Reviewed by Pavel Feldman.
1943
1944         Refactored PropertiesSection and TreeElement inheritors in StylesSidebarPane.js for cleaner separation
1945         of read-only and editable properties.
1946
1947         * inspector/front-end/StylesSidebarPane.js:
1948         (WebInspector.StylePropertiesSection.prototype.onpopulate):
1949         (WebInspector.StylePropertiesSection.prototype.addNewBlankProperty):
1950         (WebInspector.ComputedStylePropertiesSection):
1951         (WebInspector.ComputedStylePropertiesSection.prototype.onpopulate):
1952         (WebInspector.BlankStylePropertiesSection):
1953         (WebInspector.StylePropertyTreeElementBase):
1954         (WebInspector.StylePropertyTreeElementBase.prototype.node):
1955         (WebInspector.StylePropertyTreeElementBase.prototype.editablePane):
1956         (WebInspector.StylePropertyTreeElementBase.prototype.onattach):
1957         (WebInspector.StylePropertyTreeElementBase.prototype.updateTitle.linkifyURL):
1958         (WebInspector.StylePropertyTreeElementBase.prototype.updateTitle.):
1959         (WebInspector.StylePropertyTreeElementBase.prototype):
1960         (.event):
1961         (.isRevert):
1962
1963 2013-02-18  Andrey Adaikin  <aandrey@chromium.org>
1964
1965         Web Inspector: [Canvas] group replay log calls by frames
1966         https://bugs.webkit.org/show_bug.cgi?id=110101
1967
1968         Reviewed by Pavel Feldman.
1969
1970         Group canvas replay log by frames, then by draw calls.
1971
1972         * inspector/InjectedScriptCanvasModuleSource.js:
1973         (.):
1974         * inspector/Inspector.json:
1975         * inspector/front-end/CanvasProfileView.js:
1976         (WebInspector.CanvasProfileView):
1977         (WebInspector.CanvasProfileView.prototype.dispose):
1978         (WebInspector.CanvasProfileView.prototype._appendCallNode):
1979         (WebInspector.CanvasProfileView.prototype._appendDrawCallGroup):
1980
1981 2013-02-18  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1982
1983         [Soup] CookieJarSoup::deleteCookie() should stop looking for the cookie after it is removed
1984         https://bugs.webkit.org/show_bug.cgi?id=110100
1985
1986         Reviewed by Kenneth Rohde Christiansen.
1987
1988         CookieJarSoup::deleteCookie() retrieves the list of cookies that apply to a given URL, then
1989         iterates through the cookies to find the one with the right name and delete it. However, the
1990         current implementation keeps on comparing cookie names after the cookie was removed. This
1991         patch introduces a "wasDeleted" boolean to stop comparing cookie names after the cookie was
1992         deleted. Note that we cannot break as soon as the cookie is found as we need to keep iterating
1993         so that the cookies get freed by GOwnPtr.
1994
1995         No new tests, no behavior change.
1996
1997         * platform/network/soup/CookieJarSoup.cpp:
1998         (WebCore::deleteCookie):
1999
2000 2013-02-18  Vsevolod Vlasov  <vsevik@chromium.org>
2001
2002         Web Inspector: Create separate project for each domain for UISourceCode based on browser resources.
2003         https://bugs.webkit.org/show_bug.cgi?id=109691
2004
2005         Reviewed by Pavel Feldman.
2006
2007         Separate project of certain type is now created for each domain.
2008         UISourceCode path represents a path in the project now.
2009         UISourceCode uri is now calculated based on project id and path.
2010         It is also possible to calculate path based on projectId and URI, which is used for uiSourceCodeForURI() methods.
2011
2012         * inspector/front-end/FileSystemProjectDelegate.js:
2013         (WebInspector.FileSystemProjectDelegate.prototype._filePathForPath):
2014         (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
2015         (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
2016         (WebInspector.FileSystemProjectDelegate.prototype._populate):
2017         (WebInspector.FileSystemProjectDelegate.prototype._removeFile):
2018         * inspector/front-end/ScriptSnippetModel.js:
2019         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
2020         * inspector/front-end/SimpleWorkspaceProvider.js:
2021         (WebInspector.SimpleProjectDelegate):
2022         (WebInspector.SimpleProjectDelegate.projectId):
2023         (WebInspector.SimpleProjectDelegate.prototype.id):
2024         (WebInspector.SimpleProjectDelegate.prototype.displayName):
2025         (WebInspector.SimpleProjectDelegate.prototype.addFile):
2026         (WebInspector.SimpleWorkspaceProvider):
2027         (WebInspector.SimpleWorkspaceProvider.splitURL):
2028         (WebInspector.SimpleWorkspaceProvider._pathForSplittedURL):
2029         (WebInspector.SimpleWorkspaceProvider.uriForURL):
2030         (WebInspector.SimpleWorkspaceProvider.prototype._projectDelegate):
2031         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
2032         (WebInspector.SimpleWorkspaceProvider.prototype.addFileByName):
2033         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFile):
2034         (WebInspector.SimpleWorkspaceProvider.prototype.removeFileByName):
2035         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
2036         * inspector/front-end/UISourceCode.js:
2037         (WebInspector.UISourceCode.uri):
2038         (WebInspector.UISourceCode.path):
2039         (WebInspector.UISourceCode.prototype.uri):
2040         * inspector/front-end/Workspace.js:
2041         (WebInspector.Project.prototype._fileAdded):
2042         (WebInspector.Project.prototype._fileRemoved):
2043         (WebInspector.Project.prototype.uiSourceCodeForURI):
2044
2045 2013-02-18  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2046
2047         [EFL] Rebaseline failure media tests after r142947
2048         https://bugs.webkit.org/show_bug.cgi?id=109904
2049
2050         Reviewed by Kenneth Rohde Christiansen.
2051
2052         * css/mediaControlsEfl.css: Align time text vertically.
2053         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
2054
2055 2013-02-18  Vsevolod Vlasov  <vsevik@chromium.org>
2056
2057         Web Inspector: Extract FileSystemUtils from FileSystemProjectDelegate as IsolatedFileSystem class.
2058         https://bugs.webkit.org/show_bug.cgi?id=110086
2059
2060         Reviewed by Pavel Feldman.
2061
2062         Extracted IsolatedFileSystem class that could be mocked for tests now.
2063         Renamed IsolatedFileSystemModel to IsolatedFileSystemManager.
2064
2065         * WebCore.gypi:
2066         * WebCore.vcproj/WebCore.vcproj:
2067         * inspector/compile-front-end.py:
2068         * inspector/front-end/FileSystemProjectDelegate.js:
2069         (WebInspector.FileSystemProjectDelegate):
2070         (WebInspector.FileSystemProjectDelegate.prototype.id):
2071         (WebInspector.FileSystemProjectDelegate.prototype.displayName):
2072         (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
2073         (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
2074         (WebInspector.FileSystemProjectDelegate.prototype._populate):
2075         * inspector/front-end/IsolatedFileSystem.js: Added.
2076         (WebInspector.IsolatedFileSystem):
2077         (WebInspector.IsolatedFileSystem.errorMessage):
2078         (WebInspector.IsolatedFileSystem.prototype.id):
2079         (WebInspector.IsolatedFileSystem.prototype.path):
2080         (WebInspector.IsolatedFileSystem.prototype._requestFileSystem):
2081         (WebInspector.IsolatedFileSystem.prototype.fileSystemLoaded):
2082         (WebInspector.IsolatedFileSystem.prototype.innerCallback):
2083         (WebInspector.IsolatedFileSystem.prototype.requestFilesRecursive):
2084         (WebInspector.IsolatedFileSystem.prototype.fileEntryLoaded):
2085         (WebInspector.IsolatedFileSystem.prototype.fileLoaded):
2086         (WebInspector.IsolatedFileSystem.prototype.readerLoadEnd):
2087         (WebInspector.IsolatedFileSystem.prototype.errorHandler):
2088         (WebInspector.IsolatedFileSystem.prototype.requestFileContent):
2089         (WebInspector.IsolatedFileSystem.prototype.fileWriterCreated.fileTruncated):
2090         (WebInspector.IsolatedFileSystem.prototype.fileWriterCreated):
2091         (WebInspector.IsolatedFileSystem.prototype.writerEnd):
2092         (WebInspector.IsolatedFileSystem.prototype.setFileContent):
2093         (WebInspector.IsolatedFileSystem.prototype.):
2094         (WebInspector.IsolatedFileSystem.prototype.toArray):
2095         (WebInspector.IsolatedFileSystem.prototype._readDirectory):
2096         (WebInspector.IsolatedFileSystem.prototype._requestEntries):
2097         * inspector/front-end/IsolatedFileSystemManager.js: Renamed from Source/WebCore/inspector/front-end/IsolatedFileSystemModel.js.
2098         (WebInspector.IsolatedFileSystemManager):
2099         (WebInspector.IsolatedFileSystemManager.prototype.mapping):
2100         (WebInspector.IsolatedFileSystemManager.prototype.supportsFileSystems):
2101         (WebInspector.IsolatedFileSystemManager.prototype._requestFileSystems):
2102         (WebInspector.IsolatedFileSystemManager.prototype.addFileSystem):
2103         (WebInspector.IsolatedFileSystemManager.prototype.removeFileSystem):
2104         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemsLoaded):
2105         (WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem):
2106         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemPaths):
2107         (WebInspector.IsolatedFileSystemManager.prototype._processPendingFileSystemRequests):
2108         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemAdded):
2109         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved):
2110         (WebInspector.IsolatedFileSystemManager.prototype._isolatedFileSystem):
2111         (WebInspector.IsolatedFileSystemManager.prototype.requestDOMFileSystem):
2112         (WebInspector.IsolatedFileSystemDispatcher):
2113         (WebInspector.IsolatedFileSystemDispatcher.prototype.fileSystemsLoaded):
2114         (WebInspector.IsolatedFileSystemDispatcher.prototype.fileSystemRemoved):
2115         (WebInspector.IsolatedFileSystemDispatcher.prototype.fileSystemAdded):
2116         * inspector/front-end/SettingsScreen.js:
2117         (WebInspector.WorkspaceSettingsTab.prototype._createFileSystemsEditor):
2118         (WebInspector.WorkspaceSettingsTab.prototype._addFileSystemRow.removeFileSystemClicked):
2119         (WebInspector.WorkspaceSettingsTab.prototype._addFileSystemClicked):
2120         * inspector/front-end/WebKit.qrc:
2121         * inspector/front-end/inspector.html:
2122         * inspector/front-end/inspector.js:
2123
2124 2013-02-18  Huang Dongsung  <luxtella@company100.net>
2125
2126         [EFL][WK2] compositing/layer-creation/fixed-position-out-of-view-scaled.html is flaky
2127         https://bugs.webkit.org/show_bug.cgi?id=110059
2128
2129         Reviewed by Kenneth Rohde Christiansen.
2130
2131         Remove the ASSERT check in TextureMapperLayer. This assertion seems
2132         valid because CoordinatedGraphicsScene::adjustPositionForFixedLayers() calls
2133         TextureMapperLayer::setScrollPositionDeltaIfNeeded() when the graphics
2134         layer is a fixed position layer. However, the assertion can be failed
2135         because it is possible that TextureMapperLayer is a non-fixed position
2136         layer when the graphics layer that holds the TextureMapperLayer is a
2137         fixed position layer. When CoordinatedGraphicsScene flushes,
2138         TextureMapperLayer becomes a fixed position layer.
2139
2140         No new tests. No change in behavior.
2141
2142         * platform/graphics/texmap/TextureMapperLayer.cpp:
2143         (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
2144
2145 2013-02-18  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2146
2147         [WK2][EFL] Unified text checker implementation
2148         https://bugs.webkit.org/show_bug.cgi?id=107682
2149
2150         Reviewed by Anders Carlsson.
2151
2152         No new tests, covered by editing/spelling tests.
2153
2154         * platform/text/TextChecking.h:
2155         (WebCore):
2156         Enabling unified text checker feature for WebKit-EFL.
2157
2158 2013-02-18  Nico Weber  <thakis@chromium.org>
2159
2160         [chromium/clang] Remove -Wno-return-type-c-linkage
2161         https://bugs.webkit.org/show_bug.cgi?id=110098
2162
2163         Reviewed by Jochen Eisinger.
2164
2165         The one instance where this triggered was removed in
2166         http://trac.webkit.org/changeset/141184 . A clang that has this
2167         warning landed in chromium r182694, so it should be safe to turn
2168         the warning on now.
2169
2170         * WebCore.gyp/WebCore.gyp:
2171
2172 2013-02-18  Pavel Feldman  <pfeldman@chromium.org>
2173
2174         Web Inspector: provide basic console.table implementation (no [,columns] support)
2175         https://bugs.webkit.org/show_bug.cgi?id=109453
2176
2177         Reviewed by Vsevolod Vlasov.
2178
2179         Test: inspector/console/console-format-table.html
2180
2181         Using console preview infrastructure to support console.table.
2182
2183         * English.lproj/localizedStrings.js:
2184         * inspector/ConsoleAPITypes.h:
2185         * inspector/ConsoleMessage.cpp:
2186         (WebCore::messageTypeValue):
2187         (WebCore::ConsoleMessage::addToFrontend):
2188         * inspector/InjectedScript.cpp:
2189         (WebCore::InjectedScript::wrapObject):
2190         (WebCore):
2191         (WebCore::InjectedScript::wrapTable):
2192         * inspector/InjectedScript.h:
2193         (InjectedScript):
2194         * inspector/InjectedScriptSource.js:
2195         (.):
2196         * inspector/Inspector.json:
2197         * inspector/InspectorDOMAgent.cpp:
2198         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
2199         * inspector/front-end/ConsoleMessage.js:
2200         (WebInspector.ConsoleMessageImpl):
2201         (WebInspector.ConsoleMessageImpl.prototype.willHide):
2202         (WebInspector.ConsoleMessageImpl.prototype._format):
2203         (WebInspector.ConsoleMessageImpl.prototype._appendObjectPreview):
2204         (WebInspector.ConsoleMessageImpl.prototype._renderPropertyPreview):
2205         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsTable):
2206         * inspector/front-end/ConsoleModel.js:
2207         * inspector/front-end/ConsoleView.js:
2208         (WebInspector.ConsoleView.prototype._appendConsoleMessage):
2209         (WebInspector.ConsoleView.prototype._consoleCleared):
2210         (WebInspector.ConsoleView.prototype._updateMessageList):
2211         (WebInspector.ConsoleCommand.prototype.wasShown):
2212         (WebInspector.ConsoleCommand.prototype.willHide):
2213         (WebInspector.ConsoleGroup.prototype.addMessage):
2214         * inspector/front-end/DataGrid.js:
2215         (.sortDataGrid.comparator):
2216         (.sortDataGrid):
2217         (WebInspector.DataGrid.createSortableDataGrid):
2218         (WebInspector.DataGrid.prototype.renderInline):
2219         * inspector/front-end/DatabaseQueryView.js:
2220         (WebInspector.DatabaseQueryView.prototype._queryFinished):
2221         * inspector/front-end/dataGrid.css:
2222         (.data-grid.inline):
2223         (.data-grid.inline td.corner):
2224         * inspector/front-end/resourcesPanel.css:
2225         (.storage-view > .data-grid):
2226         * page/Console.cpp:
2227         (WebCore::Console::table):
2228         (WebCore):
2229         * page/Console.h:
2230         (Console):
2231         * page/Console.idl:
2232
2233 2013-02-18  Vsevolod Vlasov  <vsevik@chromium.org>
2234
2235         Web Inspector: JavaScriptSourceFrame should inherit UISourceCodeFrame
2236         https://bugs.webkit.org/show_bug.cgi?id=110091
2237
2238         Reviewed by Pavel Feldman.
2239
2240         Removed duplicated code from JavaScriptSourceFrame and made it inherit UISourceCodeFrame.
2241
2242         * inspector/front-end/JavaScriptSourceFrame.js:
2243         (WebInspector.JavaScriptSourceFrame):
2244         (WebInspector.JavaScriptSourceFrame.prototype.onUISourceCodeContentChanged):
2245         (WebInspector.JavaScriptSourceFrame.prototype.populateTextAreaContextMenu):
2246         * inspector/front-end/ScriptsPanel.js:
2247         * inspector/front-end/UISourceCodeFrame.js:
2248         (WebInspector.UISourceCodeFrame.prototype.canEditSource):
2249         (WebInspector.UISourceCodeFrame.prototype.onTextChanged):
2250         (WebInspector.UISourceCodeFrame.prototype._onFormattedChanged):
2251         (WebInspector.UISourceCodeFrame.prototype.onUISourceCodeContentChanged):
2252         (WebInspector.UISourceCodeFrame.prototype._innerSetContent):
2253
2254 2013-02-18  Vsevolod Vlasov  <vsevik@chromium.org>
2255
2256         Web Inspector: Remove unused _files field in FileSystemProjectDelegate
2257         https://bugs.webkit.org/show_bug.cgi?id=110082
2258
2259         Reviewed by Pavel Feldman.
2260
2261         * inspector/front-end/FileSystemProjectDelegate.js:
2262         (WebInspector.FileSystemProjectDelegate):
2263         (WebInspector.FileSystemProjectDelegate.prototype._addFile):
2264         (WebInspector.FileSystemProjectDelegate.prototype._removeFile):
2265
2266 2013-02-18  Pavel Feldman  <pfeldman@chromium.org>
2267
2268         Web Inspector: allow 0 as a formatted parameter in console message.
2269         https://bugs.webkit.org/show_bug.cgi?id=110096
2270
2271         Reviewed by Vsevolod Vlasov.
2272
2273         * inspector/front-end/ConsoleMessage.js:
2274         (WebInspector.ConsoleMessageImpl.prototype.append):
2275         (WebInspector.ConsoleMessageImpl.prototype._formatWithSubstitutionString):
2276
2277 2013-02-18  Ilya Tikhonovsky  <loislo@chromium.org>
2278
2279         Unreviewed speculative fix for Chromium Mac.
2280
2281         * WebCore.gypi:
2282
2283 2013-02-13  Ilya Tikhonovsky  <loislo@chromium.org>
2284
2285         Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
2286         https://bugs.webkit.org/show_bug.cgi?id=109554
2287
2288         In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
2289         can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
2290
2291         Drive by fix: I introduced a client interface for the HeapGraphSerializer.
2292         It helps me to do the tests for the serializer.
2293
2294         Reviewed by Yury Semikhatsky.
2295
2296         It is covered by newly added tests in TestWebKitAPI.
2297
2298         * inspector/HeapGraphSerializer.cpp:
2299         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
2300         (WebCore::HeapGraphSerializer::pushUpdate):
2301         (WebCore::HeapGraphSerializer::reportNode):
2302         (WebCore::HeapGraphSerializer::toNodeId):
2303         (WebCore::HeapGraphSerializer::addRootNode):
2304         * inspector/HeapGraphSerializer.h:
2305         (HeapGraphSerializer):
2306         (Client):
2307         (WebCore::HeapGraphSerializer::Client::~Client):
2308         * inspector/InspectorMemoryAgent.cpp:
2309         (WebCore):
2310         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
2311
2312 2013-02-18  Sheriff Bot  <webkit.review.bot@gmail.com>
2313
2314         Unreviewed, rolling out r143100.
2315         http://trac.webkit.org/changeset/143100
2316         https://bugs.webkit.org/show_bug.cgi?id=110088
2317
2318         Breaks file system support in workspace. (Requested by vsevik
2319         on #webkit).
2320
2321         * inspector/front-end/ScriptSnippetModel.js:
2322         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
2323         * inspector/front-end/SimpleWorkspaceProvider.js:
2324         (WebInspector.SimpleProjectDelegate):
2325         (WebInspector.SimpleProjectDelegate.prototype.id):
2326         (WebInspector.SimpleProjectDelegate.prototype.displayName):
2327         (WebInspector.SimpleProjectDelegate.prototype.addFile):
2328         (WebInspector.SimpleWorkspaceProvider):
2329         (WebInspector.SimpleWorkspaceProvider.uriForURL):
2330         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
2331         (WebInspector.SimpleWorkspaceProvider.prototype.removeFile):
2332         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
2333         * inspector/front-end/UISourceCode.js:
2334         (WebInspector.UISourceCode.prototype.uri):
2335         * inspector/front-end/Workspace.js:
2336         (WebInspector.Project.prototype._fileAdded):
2337         (WebInspector.Project.prototype._fileRemoved):
2338         (WebInspector.Project.prototype.uiSourceCodeForURI):
2339         (WebInspector.Workspace.prototype.projectForUISourceCode):
2340
2341 2013-02-15  Eugene Klyuchnikov  <eustas@chromium.org>
2342
2343         Web Inspector: Introduce ProfilesPanelDescriptor.
2344         https://bugs.webkit.org/show_bug.cgi?id=109906
2345
2346         Reviewed by Pavel Feldman.
2347
2348         Some constants/methods should be accesible before ProfilesPanel
2349         is instantiated.
2350
2351         Extracted methods to check if profile is "user-initiated" and what is
2352         its index.
2353
2354         Also profile URL regexp moved to ProfilesPanelDescriptor.
2355
2356         * inspector/front-end/ProfilesPanelDescriptor.js: Added.
2357         * WebCore.gypi: Added ProfilesPanelDescriptor.js
2358         * WebCore.vcproj/WebCore.vcproj: Ditto.
2359         * inspector/compile-front-end.py: Ditto.
2360         * inspector/front-end/WebKit.qrc: Ditto.
2361         * inspector/front-end/inspector.html: Ditto.
2362         * inspector/front-end/HeapSnapshotView.js: Adopted changes.
2363         * inspector/front-end/ProfilesPanel.js: Ditto.
2364         * inspector/front-end/externs.js: Ditto.
2365         * inspector/front-end/inspector.js: Ditto.
2366
2367 2013-02-17  Dimitri Glazkov  <dglazkov@chromium.org>
2368
2369         Stop passing around SelectorChecker in SelectorQuery, now that it's stack-allocated.
2370         https://bugs.webkit.org/show_bug.cgi?id=110038
2371
2372         Reviewed by Andreas Kling.
2373
2374         No functional changes, covered by existing tests.
2375
2376         * dom/SelectorQuery.cpp:
2377         (WebCore::SelectorDataList::matches): Moved instantiation of SelectorChecker in here.
2378         (WebCore::SelectorDataList::queryAll): Got rid of unneeded SelectorChecker arg.
2379         (WebCore::SelectorDataList::queryFirst): Ditto.
2380         (WebCore::SelectorDataList::execute): Moved instantiation of SelectorChecker in here.
2381         (WebCore::SelectorQuery::matches): Removed instantiation of SelectorChecker here.
2382         (WebCore::SelectorQuery::queryAll): Ditto.
2383         (WebCore::SelectorQuery::queryFirst): Ditto.
2384         * dom/SelectorQuery.h:
2385         (WebCore): Tweaked headers to make SelectorChecker just an implementation detail.
2386         (SelectorDataList): Tweaked decls to remove SelectorChecker args.
2387
2388 2013-02-17  Dimitri Glazkov  <dglazkov@chromium.org>
2389
2390         Stop passing around SelectorChecker in ContentSelectorQuery.
2391         https://bugs.webkit.org/show_bug.cgi?id=110041
2392
2393         Now that SelectorChecker has no interesting state, we can simplify ContentSelectorQuery and get rid of a class.
2394
2395         Reviewed by Andreas Kling.
2396
2397         No functional changes, covered by existing tests.
2398
2399         * html/shadow/ContentSelectorQuery.cpp:
2400         (WebCore::ContentSelectorDataList::checkContentSelector): Zapped ContentSelectorChecker and moved its only remaining method here.
2401         (WebCore::ContentSelectorDataList::matches): Removed SelectorChecker argument.
2402         (WebCore::ContentSelectorQuery::ContentSelectorQuery): Removed an unnecessary member.
2403         (WebCore::ContentSelectorQuery::matches): Removed unnecessary argument.
2404         * html/shadow/ContentSelectorQuery.h:
2405         (WebCore): Cleaned up the file.
2406         (ContentSelectorDataList): Updated decls.
2407         (ContentSelectorQuery): Ditto.
2408
2409 2013-02-17  Mike West  <mkwst@chromium.org>
2410
2411         WheelEvent should not target text nodes.
2412         https://bugs.webkit.org/show_bug.cgi?id=109939
2413
2414         Reviewed by Darin Adler.
2415
2416         WheelEvent, like other mouse events, should not target text nodes.
2417         EventHandler correctly handles other mouse events by retargeting
2418         events to text nodes' parents; this patch adds that logic to the
2419         WheelEvent handler.
2420
2421         This should allow jQuery to stop working around WebKit's behavior[1].
2422
2423         [1]: https://github.com/jquery/jquery/commit/c61150427fc8ccc8e884df8f221a6c9bb5477929
2424
2425         Test: fast/events/wheelevent-in-text-node.html
2426
2427         * page/EventHandler.cpp:
2428         (WebCore::EventHandler::handleWheelEvent):
2429             If a WheelEvent's hit test lands on a text node, retarget the
2430             event to the text node's parent. Do this before latching the node.
2431
2432 2013-02-17  Filip Pizlo  <fpizlo@apple.com>
2433
2434         Move all Structure out-of-line inline methods to StructureInlines.h
2435         https://bugs.webkit.org/show_bug.cgi?id=110024
2436
2437         Rubber stamped by Sam Weinig.
2438
2439         No new tests because no new behavior. Just rewiring includes.
2440
2441         * ForwardingHeaders/parser/SourceProviderCache.h: Added.
2442         * loader/cache/CachedScript.cpp:
2443
2444 2013-02-17  Hayato Ito  <hayato@chromium.org>
2445
2446         Make EventDispatcher take an Event object in its constructor.
2447         https://bugs.webkit.org/show_bug.cgi?id=109898
2448
2449         Reviewed by Dimitri Glazkov.
2450
2451         That makes EventDispatcher more RAII-like so that we can calculate
2452         an EventPath in its constructor.  I'll remove
2453         EventDispatcher::ensureEventPath() in a following patch.
2454
2455         No tests. No change in behavior.
2456
2457         * dom/EventDispatchMediator.cpp:
2458         (WebCore::EventDispatchMediator::dispatchEvent):
2459         * dom/EventDispatcher.cpp:
2460         (WebCore::EventDispatcher::dispatchEvent):
2461         (WebCore::EventDispatcher::EventDispatcher):
2462         (WebCore::EventDispatcher::ensureEventPath):
2463         (WebCore::EventDispatcher::dispatchSimulatedClick):
2464         (WebCore::EventDispatcher::dispatch):
2465         (WebCore::EventDispatcher::dispatchEventPreProcess):
2466         (WebCore::EventDispatcher::dispatchEventAtCapturing):
2467         (WebCore::EventDispatcher::dispatchEventAtTarget):
2468         (WebCore::EventDispatcher::dispatchEventAtBubbling):
2469         (WebCore::EventDispatcher::dispatchEventPostProcess):
2470         * dom/EventDispatcher.h:
2471         (EventDispatcher):
2472         (WebCore::EventDispatcher::node):
2473         (WebCore::EventDispatcher::event):
2474         * dom/FocusEvent.cpp:
2475         (WebCore::FocusEventDispatchMediator::dispatchEvent):
2476         (WebCore::BlurEventDispatchMediator::dispatchEvent):
2477         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
2478         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
2479         * dom/GestureEvent.cpp:
2480         (WebCore::GestureEventDispatchMediator::dispatchEvent):
2481         * dom/MouseEvent.cpp:
2482         (WebCore::MouseEventDispatchMediator::dispatchEvent):
2483
2484 2013-02-17  Philip Rogers  <pdr@google.com>
2485
2486         Fix non-root SVG viewport under zoom
2487         https://bugs.webkit.org/show_bug.cgi?id=99453
2488
2489         Reviewed by Dirk Schulze.
2490
2491         The root SVG element handles zoom differently than other SVG nodes because it needs
2492         to translate between CSS (where zoom is applied to all units) and SVG (where zoom is only
2493         applied at the top level). A good description of this difference can be found here:
2494         http://trac.webkit.org/browser/trunk/Source/WebCore/css/StyleResolver.cpp?rev=142855#L2598
2495
2496         SVG elements can appear as children in the SVG tree as well, and in this mode
2497         SVGSVGElement should not consider the current zoom level. This patch fixes a bug
2498         where non-root viewport calculations were removing zoom.
2499
2500         Test: svg/custom/symbol-zoom.html
2501
2502         * svg/SVGSVGElement.cpp:
2503         (WebCore::SVGSVGElement::currentViewportSize):
2504             This change removes the unnecessary zoom calculation for non-root nodes. This is similar
2505             to how zoom is handled elsewhere, e.g., SVGSVGElement::localCoordinateSpaceTransform.
2506
2507 2013-02-17  Chris Fleizach  <cfleizach@apple.com>
2508
2509         AX: Upstream iOS Accessibility files
2510         https://bugs.webkit.org/show_bug.cgi?id=110071
2511
2512         Reviewed by David Kilzer.
2513
2514         Upstream the iOS Accessibility files for WebCore. 
2515
2516         * WebCore.xcodeproj/project.pbxproj:
2517         * accessibility/ios: Added.
2518         * accessibility/ios/AXObjectCacheIOS.mm: Added.
2519         (WebCore):
2520         (WebCore::AXObjectCache::detachWrapper):
2521         (WebCore::AXObjectCache::attachWrapper):
2522         (WebCore::AXObjectCache::postPlatformNotification):
2523         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2524         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
2525         (WebCore::AXObjectCache::handleFocusedUIElementChanged):
2526         (WebCore::AXObjectCache::handleScrolledToAnchor):
2527         * accessibility/ios/AccessibilityObjectIOS.mm: Added.
2528         (-[WAKView accessibilityIsIgnored]):
2529         (WebCore):
2530         (WebCore::AccessibilityObject::detachFromParent):
2531         (WebCore::AccessibilityObject::overrideAttachmentParent):
2532         (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
2533         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment):
2534         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
2535         * accessibility/ios/AccessibilityObjectWrapperIOS.h: Added.
2536         (WAKView):
2537         * accessibility/ios/AccessibilityObjectWrapperIOS.mm: Added.
2538         (AccessibilityUnignoredAncestor):
2539         (-[WebAccessibilityTextMarker initWithTextMarker:cache:]):
2540         (-[WebAccessibilityTextMarker initWithData:cache:]):
2541         (-[WebAccessibilityTextMarker initWithData:accessibilityObject:]):
2542         (+[WebAccessibilityTextMarker textMarkerWithVisiblePosition:cache:]):
2543         (-[WebAccessibilityTextMarker dataRepresentation]):
2544         (-[WebAccessibilityTextMarker visiblePosition]):
2545         (-[WebAccessibilityTextMarker description]):
2546         (-[WebAccessibilityObjectWrapper initWithAccessibilityObject:]):
2547         (-[WebAccessibilityObjectWrapper detach]):
2548         (-[WebAccessibilityObjectWrapper dealloc]):
2549         (-[WebAccessibilityObjectWrapper _prepareAccessibilityCall]):
2550         (-[WebAccessibilityObjectWrapper accessibilityObject]):
2551         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
2552         (-[WebAccessibilityObjectWrapper accessibilityPostProcessHitTest:]):
2553         (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
2554         (-[WebAccessibilityObjectWrapper accessibilityElementCount]):
2555         (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
2556         (-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
2557         (-[WebAccessibilityObjectWrapper accessibilityLanguage]):
2558         (-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
2559         (-[WebAccessibilityObjectWrapper _accessibilityListAncestor]):
2560         (-[WebAccessibilityObjectWrapper _accessibilityLandmarkAncestor]):
2561         (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
2562         (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
2563         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
2564         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
2565         (-[WebAccessibilityObjectWrapper isAccessibilityElement]):
2566         (-[WebAccessibilityObjectWrapper stringValueShouldBeUsedInLabel]):
2567         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
2568         (-[WebAccessibilityObjectWrapper tableCellParent]):
2569         (-[WebAccessibilityObjectWrapper tableParent]):
2570         (-[WebAccessibilityObjectWrapper accessibilityTitleElement]):
2571         (-[WebAccessibilityObjectWrapper accessibilityHeaderElements]):
2572         (-[WebAccessibilityObjectWrapper accessibilityElementForRow:andColumn:]):
2573         (-[WebAccessibilityObjectWrapper accessibilityRowRange]):
2574         (-[WebAccessibilityObjectWrapper accessibilityColumnRange]):
2575         (-[WebAccessibilityObjectWrapper accessibilityPlaceholderValue]):
2576         (-[WebAccessibilityObjectWrapper accessibilityValue]):
2577         (-[WebAccessibilityObjectWrapper accessibilityIsComboBox]):
2578         (-[WebAccessibilityObjectWrapper accessibilityHint]):
2579         (-[WebAccessibilityObjectWrapper accessibilityURL]):
2580         (-[WebAccessibilityObjectWrapper _convertIntRectToScreenCoordinates:]):
2581         (-[WebAccessibilityObjectWrapper accessibilityElementRect]):
2582         (-[WebAccessibilityObjectWrapper accessibilityActivationPoint]):
2583         (-[WebAccessibilityObjectWrapper accessibilityFrame]):
2584         (-[WebAccessibilityObjectWrapper containsUnnaturallySegmentedChildren]):
2585         (-[WebAccessibilityObjectWrapper accessibilityContainer]):
2586         (-[WebAccessibilityObjectWrapper accessibilityFocusedUIElement]):
2587         (-[WebAccessibilityObjectWrapper _accessibilityWebDocumentView]):
2588         (-[WebAccessibilityObjectWrapper _accessibilityNextElementsWithCount:]):
2589         (-[WebAccessibilityObjectWrapper _accessibilityPreviousElementsWithCount:]):
2590         (-[WebAccessibilityObjectWrapper accessibilityRequired]):
2591         (-[WebAccessibilityObjectWrapper accessibilityFlowToElements]):
2592         (-[WebAccessibilityObjectWrapper accessibilityLinkedElement]):
2593         (-[WebAccessibilityObjectWrapper isAttachment]):
2594         (-[WebAccessibilityObjectWrapper _accessibilityActivate]):
2595         (-[WebAccessibilityObjectWrapper attachmentView]):
2596         (rendererForView):
2597         (-[WebAccessibilityObjectWrapper _accessibilityParentForSubview:]):
2598         (-[WebAccessibilityObjectWrapper postFocusChangeNotification]):
2599         (-[WebAccessibilityObjectWrapper postSelectedTextChangeNotification]):
2600         (-[WebAccessibilityObjectWrapper postLayoutChangeNotification]):
2601         (-[WebAccessibilityObjectWrapper postLiveRegionChangeNotification]):
2602         (-[WebAccessibilityObjectWrapper postLoadCompleteNotification]):
2603         (-[WebAccessibilityObjectWrapper postChildrenChangedNotification]):
2604         (-[WebAccessibilityObjectWrapper postInvalidStatusChangedNotification]):
2605         (-[WebAccessibilityObjectWrapper accessibilityElementDidBecomeFocused]):
2606         (-[WebAccessibilityObjectWrapper accessibilityModifySelection:increase:]):
2607         (-[WebAccessibilityObjectWrapper accessibilityIncreaseSelection:]):
2608         (-[WebAccessibilityObjectWrapper accessibilityDecreaseSelection:]):
2609         (-[WebAccessibilityObjectWrapper accessibilityMoveSelectionToMarker:]):
2610         (-[WebAccessibilityObjectWrapper accessibilityIncrement]):
2611         (-[WebAccessibilityObjectWrapper accessibilityDecrement]):
2612         (-[WebAccessibilityObjectWrapper _addAccessibilityObject:toTextMarkerArray:]):
2613         (-[WebAccessibilityObjectWrapper stringForTextMarkers:]):
2614         (blockquoteLevel):
2615         (AXAttributeStringSetBlockquoteLevel):
2616         (AXAttributeStringSetHeadingLevel):
2617         (AXAttributeStringSetFont):
2618         (AXAttributeStringSetNumber):
2619         (AXAttributeStringSetStyle):
2620         (AXAttributedStringAppendText):
2621         (-[WebAccessibilityObjectWrapper arrayOfTextForTextMarkers:attributed:]):
2622         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
2623         (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
2624         (-[WebAccessibilityObjectWrapper positionForTextMarker:]):
2625         (-[WebAccessibilityObjectWrapper textMarkerRange]):
2626         (-[WebAccessibilityObjectWrapper elementTextRange]):
2627         (-[WebAccessibilityObjectWrapper accessibilityObjectForTextMarker:]):
2628         (-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]):
2629         (-[WebAccessibilityObjectWrapper textMarkerForPosition:]):
2630         (-[WebAccessibilityObjectWrapper _stringForRange:attributed:]):
2631         (-[WebAccessibilityObjectWrapper stringForRange:]):
2632         (-[WebAccessibilityObjectWrapper attributedStringForRange:]):
2633         (-[WebAccessibilityObjectWrapper elementsForRange:]):
2634         (-[WebAccessibilityObjectWrapper selectionRangeString]):
2635         (-[WebAccessibilityObjectWrapper selectedTextMarker]):
2636         (-[WebAccessibilityObjectWrapper lineEndMarkerForMarker:]):
2637         (-[WebAccessibilityObjectWrapper lineStartMarkerForMarker:]):
2638         (-[WebAccessibilityObjectWrapper nextMarkerForMarker:]):
2639         (-[WebAccessibilityObjectWrapper previousMarkerForMarker:]):
2640         (-[WebAccessibilityObjectWrapper frameForTextMarkers:]):
2641         (-[WebAccessibilityObjectWrapper textMarkerForPoint:]):
2642         (-[WebAccessibilityObjectWrapper accessibilityIdentifier]):
2643         (-[WebAccessibilityObjectWrapper accessibilitySpeechHint]):
2644         (-[WebAccessibilityObjectWrapper accessibilityARIAIsBusy]):
2645         (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionStatus]):
2646         (-[WebAccessibilityObjectWrapper accessibilityARIARelevantStatus]):
2647         (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionIsAtomic]):
2648         (-[WebAccessibilityObjectWrapper accessibilityInvalidStatus]):
2649         (-[WebAccessibilityObjectWrapper accessibilityMathRootIndexObject]):
2650         (-[WebAccessibilityObjectWrapper accessibilityMathRadicandObject]):
2651         (-[WebAccessibilityObjectWrapper accessibilityMathNumeratorObject]):
2652         (-[WebAccessibilityObjectWrapper accessibilityMathDenominatorObject]):
2653         (-[WebAccessibilityObjectWrapper accessibilityMathBaseObject]):
2654         (-[WebAccessibilityObjectWrapper accessibilityMathSubscriptObject]):
2655         (-[WebAccessibilityObjectWrapper accessibilityMathSuperscriptObject]):
2656         (-[WebAccessibilityObjectWrapper accessibilityMathUnderObject]):
2657         (-[WebAccessibilityObjectWrapper accessibilityMathOverObject]):
2658         (-[WebAccessibilityObjectWrapper accessibilityMathFencedOpenString]):
2659         (-[WebAccessibilityObjectWrapper accessibilityMathFencedCloseString]):
2660         (-[WebAccessibilityObjectWrapper accessibilityIsMathTopObject]):
2661         (-[WebAccessibilityObjectWrapper accessibilityMathType]):
2662         (-[WebAccessibilityObjectWrapper accessibilitySetPostedNotificationCallback:withContext:]):
2663         (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:WebCore::AXObjectCache::]):
2664         (-[WebAccessibilityObjectWrapper description]):
2665
2666 2013-02-17  Chris Fleizach  <cfleizach@apple.com>
2667
2668         AX: rename WebAccessibilityObjectWrapper to WebAccessibilityObjectWrapperBase
2669         https://bugs.webkit.org/show_bug.cgi?id=110061
2670
2671         Reviewed by David Kilzer.
2672
2673         Rename the base accessibility wrapper class so that the iOS class can share the same name.
2674
2675         * WebCore.xcodeproj/project.pbxproj:
2676         * accessibility/mac/AXObjectCacheMac.mm:
2677         (WebCore::AXObjectCache::attachWrapper):
2678         * accessibility/mac/WebAccessibilityObjectWrapper.h: Replaced with Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.h.
2679         * accessibility/mac/WebAccessibilityObjectWrapper.mm: Replaced with Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm.
2680         * accessibility/mac/WebAccessibilityObjectWrapperBase.h: Copied from Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.h.
2681         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: Copied from Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapper.mm.
2682         * accessibility/mac/WebAccessibilityObjectWrapperMac.h: Removed.
2683         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Removed.
2684
2685 2013-02-17  Andreas Kling  <akling@apple.com>
2686
2687         REGRESSION(r143125): ~5% performance hit on Chromium's intl2 page cycler.
2688         <http://webkit.org/b/108835>
2689
2690         Reviewed by Ojan Vafai.
2691
2692         Streamline the case where GlyphPage has a per-glyph SimpleFontData* lookup table to allow
2693         taking earlier branches on pages with lots of mixed-font text.
2694         We accomplish this by explicitly storing a null SimpleFontData* for glyph #0 in the per-glyph
2695         lookup table instead of relying on "if (!glyph)" checks in getters.
2696
2697         This is a speculative optimization, I can't get stable enough numbers locally to tell if this
2698         will resolve the issue on the bots.
2699
2700         * platform/graphics/GlyphPage.h:
2701         (WebCore::GlyphPage::glyphDataForIndex):
2702         (WebCore::GlyphPage::fontDataForCharacter):
2703         (WebCore::GlyphPage::setGlyphDataForIndex):
2704
2705 2013-02-17  Chris Fleizach  <cfleizach@apple.com>
2706
2707         WebSpeech: plumb through a method to generate fake speech jobs for testing
2708         https://bugs.webkit.org/show_bug.cgi?id=107351
2709
2710         Reviewed by Adam Barth.
2711
2712         We can't reliably use the platforms synthesizer to test speech synthesis internals.
2713         This patch adds an Internals method to enable a mock synthesizer, which is inherits
2714         from the PlatformSpeechSythesizer.
2715
2716         The fake synthesizer goes through all the motions of a real synthesizer but doesn't do anything.
2717         A bunch of changes were needed here to make PlatformSpeechSynthesizer subclassable so that the
2718         right virtual are used.
2719
2720         The Mock synthesizer only lives in WebCoreTestSupport. Because PlatformSpeechSynthesizer uses
2721         a RetainPtr, I needed to make WebCoreTestSupport link CoreFoundation
2722
2723 2013-02-17  Csaba Osztrogon√°c  <ossy@webkit.org>
2724
2725         [Qt] Unreviewed buildfix for !USE(LIBXML) builds after r143112.
2726
2727         * xml/parser/XMLDocumentParserQt.cpp:
2728         (WebCore::XMLDocumentParser::XMLDocumentParser):
2729
2730 2013-02-17  Andreas Kling  <akling@apple.com>
2731
2732         Optimize GlyphPage for case where all glyphs are available in the same font.
2733         <http://webkit.org/b/108835>
2734         <rdar://problem/13157042>
2735
2736         Reviewed by Antti Koivisto.
2737
2738         Let GlyphPage begin optimistically assuming that all its glyphs will be represented in
2739         the same SimpleFontData*. In this (very common) case, only keep a single SimpleFontData*.
2740
2741         If glyphs from multiple fonts are mixed in one page, an array of per-glyph SimpleFontData*
2742         is allocated transparently.
2743
2744         This was landed before with some bogus branch prediction hints and didn't fare well on
2745         page cyclers (intl2 specifically.) These have been removed this time around, and will
2746         hopefully be regression-free.
2747
2748         4.98 MB progression on Membuster3.
2749
2750         * platform/graphics/GlyphPageTreeNode.cpp:
2751         (WebCore::GlyphPageTreeNode::initializePage):
2752         * platform/graphics/GlyphPage.h:
2753         (WebCore::GlyphPage::createUninitialized):
2754         (WebCore::GlyphPage::createZeroedSystemFallbackPage):
2755         (WebCore::GlyphPage::createCopiedSystemFallbackPage):
2756
2757             There are now three ways of constructing a GlyphPage, two of them are only used for
2758             creating system fallback pages.
2759
2760         (WebCore::GlyphPage::setGlyphDataForIndex):
2761
2762             Hold off creating a SimpleFontData* array until we're sure there are two different
2763             SimpleFontData* backing the glyphs in this page.
2764             We don't store font data for glyph #0, instead we let the getters always return null for it.
2765
2766         (WebCore::GlyphPage::~GlyphPage):
2767
2768             Free the SimpleFontData* array if needed.
2769
2770         (WebCore::GlyphPage::glyphDataForCharacter):
2771         (WebCore::GlyphPage::glyphDataForIndex):
2772         (WebCore::GlyphPage::fontDataForCharacter):
2773
2774             The font data for glyph #0 is always a null pointer now.
2775
2776         (WebCore::GlyphPage::clearForFontData):
2777
2778             Updated for new storage format.
2779
2780         * rendering/svg/SVGTextRunRenderingContext.cpp:
2781         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
2782
2783             Fix bug where non-zero glyph was temporarily associated with null font data,
2784             which triggered the new assertion in setGlyphDataForIndex().
2785
2786 2013-02-16  Andreas Kling  <akling@apple.com>
2787
2788         Remove multi-threading gunk from WebKit2's PluginInfoStore.
2789         <http://webkit.org/b/110046>
2790
2791         Reviewed by Alexey Proskuryakov.
2792
2793         Remove now-unused code for making deep (isolated) copies of WebCore plugin structures.
2794
2795         * plugins/PluginData.h:
2796         (MimeClassInfo):
2797         (PluginInfo):
2798
2799 2013-02-16  Alexey Proskuryakov  <ap@apple.com>
2800
2801         Identifier generated twice in FrameLoader::loadResourceSynchronously()
2802         https://bugs.webkit.org/show_bug.cgi?id=110022
2803
2804         Reviewed by Darin Adler.
2805
2806         * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadResourceSynchronously):
2807         Fix an apparent refactoring mistake.
2808
2809 2013-02-16  Andreas Kling  <akling@apple.com>
2810
2811         [JSC] Remove custom mark function for NamedNodeMap.
2812         <http://webkit.org/b/110029>
2813
2814         Reviewed by Darin Adler.
2815
2816         NamedNodeMap refs and unrefs its Element owner, so there's no need for the wrapper to keep the Element alive.
2817
2818         Covered by fast/dom/Attr/access-after-element-destruction.html
2819
2820         * bindings/js/JSNamedNodeMapCustom.cpp:
2821         * dom/NamedNodeMap.idl:
2822
2823 2013-02-16  Peter Nelson  <peter@peterdn.com>
2824
2825         REGRESSION(r143076): Crash when calling removeNamedItem or removeNamedItemNS with a non-existent attribute of newly created element.
2826         <http://webkit.org/b/110019>
2827
2828         Reviewed by Andreas Kling.
2829
2830         Now checks Element::hasAttributes() before calling Element::getAttributeItemIndex().
2831
2832         Test: http/tests/misc/acid3.html
2833
2834         * dom/NamedNodeMap.cpp:
2835         (WebCore::NamedNodeMap::removeNamedItem):
2836         (WebCore::NamedNodeMap::removeNamedItemNS):
2837
2838 2013-02-16  Andreas Kling  <akling@apple.com>
2839
2840         Element: Devirtualize attribute synchronization functions.
2841         <http://webkit.org/b/110033>
2842
2843         Reviewed by Darin Adler.
2844
2845         Devirtualize the functions that perform re-serialization of lazy attributes and give
2846         them "synchronize"-style names:
2847
2848             - SVGElement::synchronizeAnimatedSVGAttribute()
2849             - StyledElement::synchronizeStyleAttributeInternal()
2850
2851         * dom/Element.cpp:
2852         (WebCore::Element::synchronizeAllAttributes):
2853         (WebCore::Element::synchronizeAttribute):
2854         * dom/Element.h:
2855         * dom/StyledElement.cpp:
2856         (WebCore::StyledElement::synchronizeStyleAttribute):
2857         * dom/StyledElement.h:
2858         (StyledElement):
2859         * rendering/svg/RenderSVGResourceGradient.cpp:
2860         (WebCore::RenderSVGResourceGradient::applyResource):
2861         * rendering/svg/RenderSVGResourcePattern.cpp:
2862         (WebCore::RenderSVGResourcePattern::buildPattern):
2863         * svg/SVGElement.cpp:
2864         (WebCore::SVGElement::synchronizeAnimatedSVGAttribute):
2865         * svg/SVGElement.h:
2866         (SVGElement):
2867
2868 2013-02-16  Andreas Kling  <akling@apple.com>
2869
2870         Element: Avoid unrelated attribute synchronization on other attribute access.
2871         <http://webkit.org/b/110025>
2872
2873         Reviewed by Darin Adler.
2874
2875         We've been extremely trigger happy with re-serializing the style attribute (and SVG animatables)
2876         whenever any Element attribute API was used. This patch narrows this down to (almost always)
2877         only synchronizing an attribute when someone specifically wants to read/update it.
2878
2879         Also removed two more confusing ElementData accessors:
2880
2881             - Element::elementDataWithSynchronizedAttributes()
2882             - Element::ensureElementDataWithSynchronizedAttributes()
2883
2884         * dom/Element.h:
2885         * dom/Element.cpp:
2886         (WebCore::Element::hasAttributes):
2887         (WebCore::Element::hasEquivalentAttributes):
2888         (WebCore::Element::cloneAttributesFromElement):
2889         (WebCore::Element::synchronizeAllAttributes):
2890
2891             Renamed updateInvalidAttributes() to synchronizeAllAttributes().
2892             This function should only be used when we need every single attribute to be up-to-date.
2893
2894         (WebCore::Element::synchronizeAttribute):
2895
2896             Broke out logic for synchronizing a specific attribute, given either a full QualifiedName
2897             or a localName.
2898
2899         (WebCore::Element::setSynchronizedLazyAttribute):
2900
2901             Don't call ensureUniqueElementData() indisciminately here. This avoids converting the attribute
2902             storage when re-serializing the inline style yields the same CSS text that was already in the
2903             style attribute.
2904
2905         (WebCore::Element::hasAttribute):
2906         (WebCore::Element::hasAttributeNS):
2907         (WebCore::Element::getAttribute):
2908         (WebCore::Element::getAttributeNode):
2909         (WebCore::Element::getAttributeNodeNS):
2910         (WebCore::Element::setAttribute):
2911         (WebCore::Element::setAttributeNode):
2912         (WebCore::Element::removeAttributeNode):
2913
2914             Only synchronize the attribute in question.
2915
2916         * dom/Node.cpp:
2917         (WebCore::Node::compareDocumentPosition):
2918
2919             Call synchronizeAllAttributes() when comparing two Attr nodes on the same Element instead
2920             of relying on the side-effects of another function doing this.
2921
2922 2013-02-16  Seokju Kwon  <seokju.kwon@gmail.com>
2923
2924         Fix build warnings after r139853
2925         https://bugs.webkit.org/show_bug.cgi?id=109929
2926
2927         Reviewed by Alexey Proskuryakov.
2928
2929         Use UNUSED_PARAM macro to fix build warning -Wunused-parameter
2930         when INSPECTOR is disabled.
2931
2932         No new tests, no behavior change.
2933
2934         * inspector/InspectorInstrumentation.h:
2935         (WebCore::InspectorInstrumentation::frameStartedLoading):
2936         (WebCore::InspectorInstrumentation::frameStoppedLoading):
2937         (WebCore::InspectorInstrumentation::frameScheduledNavigation):
2938         (WebCore::InspectorInstrumentation::frameClearedScheduledNavigation):
2939
2940 2013-02-16  Sheriff Bot  <webkit.review.bot@gmail.com>
2941
2942         Unreviewed, rolling out r142734.
2943         http://trac.webkit.org/changeset/142734
2944         https://bugs.webkit.org/show_bug.cgi?id=110018
2945
2946         "Triggered crashes on lots of websites" (Requested by ggaren
2947         on #webkit).
2948
2949         * bindings/js/JSLocationCustom.cpp:
2950         (WebCore::JSLocation::getOwnPropertySlotDelegate):
2951
2952 2013-02-16  Robert Hogan  <robert@webkit.org>
2953
2954         percentage top value of position:relative element not calculated using parent's min-height unless height set
2955         https://bugs.webkit.org/show_bug.cgi?id=14762
2956
2957         Reviewed by Julien Chaffraix.
2958
2959         Percentage height "is calculated with respect to the height of the generated box's containing block" says  
2960         http://www.w3.org/TR/CSS21/visudet.html#the-height-property and "If the height of the containing block is not 
2961         specified explicitly (i.e., it depends on content height), and this element is not absolutely positioned, the
2962         value computes to 'auto'." So when calculating the used height of a replaced element do not crawl through ancestor 
2963         blocks except when traversing anonymous blocks. Ensure that anonymous table cells are not skipped through though.
2964
2965         http://www.w3.org/TR/CSS21/tables.html#height-layout adds "In CSS 2.1, the height of a cell box is the minimum 
2966         height required by the content." This height is decided by allowing table cells to report their height as auto.
2967         It's not clear why http://trac.webkit.org/changeset/91242 decided it should no longer do this - doing so caused
2968         us to regress in our rendering of computed-image-width-with-percent-height-inside-table-cell-and-fixed-ancestor.html.
2969
2970         Tests: fast/block/percent-top-parent-respects-min-height.html
2971                fast/replaced/computed-image-width-with-percent-height-and-fixed-ancestor-vertical-lr.html
2972                fast/replaced/computed-image-width-with-percent-height-and-fixed-ancestor.html
2973                fast/replaced/computed-image-width-with-percent-height-inside-table-cell-and-fixed-ancestor-vertical-lr.html
2974                fast/replaced/computed-image-width-with-percent-height-inside-table-cell-and-fixed-ancestor.html
2975
2976         * rendering/RenderBoxModelObject.cpp:
2977         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
2978         (WebCore):
2979         (WebCore::RenderBoxModelObject::relativePositionOffset):
2980         * rendering/RenderBoxModelObject.h:
2981         (RenderBoxModelObject):
2982         * rendering/RenderReplaced.cpp:
2983         (WebCore::RenderReplaced::hasReplacedLogicalHeight):
2984
2985 2013-02-16  Stephen White  <senorblanco@chromium.org>
2986
2987         [skia] FEOffset should have a Skia implementation.
2988         https://bugs.webkit.org/show_bug.cgi?id=109831
2989
2990         Reviewed by James Robinson.
2991
2992         Covered by css3/filters/effect-reference.html and -hw.html.
2993
2994         * WebCore.gypi:
2995         * platform/graphics/filters/FEOffset.h:  Implement createImageFilter()
2996         for the Skia path.
2997         * platform/graphics/filters/skia/FEOffsetSkia.cpp: Added.
2998         (WebCore::FEOffset::createImageFilter):
2999         Instantiate an SkOffsetImageFilter when building the Skia DAG.
3000
3001 2013-02-16  Vsevolod Vlasov  <vsevik@chromium.org>
3002
3003         Web Inspector: Create separate project for each domain for UISourceCode based on browser resources.
3004         https://bugs.webkit.org/show_bug.cgi?id=109691
3005
3006         Reviewed by Pavel Feldman.
3007
3008         Separate project of certain type is now created for each domain.
3009         UISourceCode path represents a path in the project now.
3010         UISourceCode uri is now calculated based on project id and path.
3011         It is also possible to calculate path based on projectId and URI, which is used for uiSourceCodeForURI() methods.
3012
3013         * inspector/front-end/ScriptSnippetModel.js:
3014         (WebInspector.ScriptSnippetModel.prototype._addScriptSnippet):
3015         * inspector/front-end/SimpleWorkspaceProvider.js:
3016         (WebInspector.SimpleProjectDelegate):
3017         (WebInspector.SimpleProjectDelegate.projectId):
3018         (WebInspector.SimpleProjectDelegate.prototype.id):
3019         (WebInspector.SimpleProjectDelegate.prototype.displayName):
3020         (WebInspector.SimpleProjectDelegate.prototype.addFile):
3021         (WebInspector.SimpleWorkspaceProvider):
3022         (WebInspector.SimpleWorkspaceProvider.splitURL):
3023         (WebInspector.SimpleWorkspaceProvider._pathForSplittedURL):
3024         (WebInspector.SimpleWorkspaceProvider.uriForURL):
3025         (WebInspector.SimpleWorkspaceProvider.prototype._projectDelegate):
3026         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
3027         (WebInspector.SimpleWorkspaceProvider.prototype.addFileByName):
3028         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFile):
3029         (WebInspector.SimpleWorkspaceProvider.prototype.removeFileByName):
3030         (WebInspector.SimpleWorkspaceProvider.prototype.reset):
3031         * inspector/front-end/UISourceCode.js:
3032         (WebInspector.UISourceCode.uri):
3033         (WebInspector.UISourceCode.path):
3034         (WebInspector.UISourceCode.prototype.uri):
3035         * inspector/front-end/Workspace.js:
3036         (WebInspector.Project.prototype._fileAdded):
3037         (WebInspector.Project.prototype._fileRemoved):
3038         (WebInspector.Project.prototype.uiSourceCodeForURI):
3039
3040 2013-02-15  Chris Fleizach  <cfleizach@apple.com>
3041
3042         AX: Split WebAccessibilityObjectWrapper so code can be shared with iOS
3043         https://bugs.webkit.org/show_bug.cgi?id=109849
3044
3045         Reviewed by David Kilzer.
3046
3047         Split up the WebAccessibilityObjectWrapper so that iOS can share more 
3048         code with MacOS. I imagine over time, more code will move into this base class,
3049         but for now this will be a good start.
3050
3051         A base class called WebAccessibilityObjectWrapper now exists, and Mac has a subclass
3052         of that. iOS will be able to do the same.
3053
3054         * WebCore.xcodeproj/project.pbxproj:
3055         * accessibility/mac/AXObjectCacheMac.mm:
3056         (WebCore::AXObjectCache::attachWrapper):
3057         * accessibility/mac/WebAccessibilityObjectWrapper.h:
3058         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
3059         (-[WebAccessibilityObjectWrapper detach]):
3060         (-[WebAccessibilityObjectWrapper attachmentView]):
3061         (-[WebAccessibilityObjectWrapper accessibilityObject]):
3062         (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]):
3063         (-[WebAccessibilityObjectWrapper titleTagShouldBeUsedInDescriptionField]):
3064         (-[WebAccessibilityObjectWrapper accessibilityTitle]):
3065         (-[WebAccessibilityObjectWrapper accessibilityDescription]):
3066         (-[WebAccessibilityObjectWrapper accessibilityHelpText]):
3067         * accessibility/mac/WebAccessibilityObjectWrapperMac.h: Added.
3068         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Added.
3069         (std):
3070         (-[WebAccessibilityObjectWrapperMac detach]):
3071         (-[WebAccessibilityObjectWrapperMac attachmentView]):
3072         (CFAutoreleaseHelper):
3073         (AXObjectIsTextMarker):
3074         (AXObjectIsTextMarkerRange):
3075         (AXTextMarkerRange):
3076         (AXTextMarkerRangeStart):
3077         (AXTextMarkerRangeEnd):
3078         (SearchKeyEntry):
3079         (createAccessibilitySearchKeyMap):
3080         (accessibilitySearchKeyForString):
3081         (textMarkerForVisiblePosition):
3082         (-[WebAccessibilityObjectWrapperMac textMarkerForVisiblePosition:]):
3083         (visiblePositionForTextMarker):
3084         (-[WebAccessibilityObjectWrapperMac visiblePositionForTextMarker:]):
3085         (visiblePositionForStartOfTextMarkerRange):
3086         (visiblePositionForEndOfTextMarkerRange):
3087         (textMarkerRangeFromMarkers):
3088         (AXAttributedStringRangeIsValid):
3089         (AXAttributeStringSetFont):
3090         (CreateCGColorIfDifferent):
3091         (AXAttributeStringSetColor):
3092         (AXAttributeStringSetNumber):
3093         (AXAttributeStringSetStyle):
3094         (AXAttributeStringSetBlockquoteLevel):
3095         (AXAttributeStringSetSpelling):
3096         (AXAttributeStringSetHeadingLevel):
3097         (AXAttributeStringSetElement):
3098         (AXAttributedStringAppendText):
3099         (nsStringForReplacedNode):
3100         (-[WebAccessibilityObjectWrapperMac doAXAttributedStringForTextMarkerRange:]):
3101         (textMarkerRangeFromVisiblePositions):
3102         (-[WebAccessibilityObjectWrapperMac textMarkerRangeFromVisiblePositions:endPosition:]):
3103         (-[WebAccessibilityObjectWrapperMac accessibilityActionNames]):
3104         (-[WebAccessibilityObjectWrapperMac additionalAccessibilityAttributeNames]):
3105         (-[WebAccessibilityObjectWrapperMac accessibilityAttributeNames]):
3106         (-[WebAccessibilityObjectWrapperMac visiblePositionRangeForTextMarkerRange:]):
3107         (-[WebAccessibilityObjectWrapperMac renderWidgetChildren]):
3108         (-[WebAccessibilityObjectWrapperMac remoteAccessibilityParentObject]):
3109         (convertToVector):
3110         (convertToNSArray):
3111         (-[WebAccessibilityObjectWrapperMac textMarkerRangeForSelection]):
3112         (-[WebAccessibilityObjectWrapperMac position]):
3113         (createAccessibilityRoleMap):
3114         (roleValueToNSString):
3115         (-[WebAccessibilityObjectWrapperMac role]):
3116         (-[WebAccessibilityObjectWrapperMac subrole]):
3117         (-[WebAccessibilityObjectWrapperMac roleDescription]):
3118         (-[WebAccessibilityObjectWrapperMac scrollViewParent]):
3119         (-[WebAccessibilityObjectWrapperMac titleTagShouldBeUsedInDescriptionField]):
3120         (-[WebAccessibilityObjectWrapperMac accessibilityTitle]):
3121         (-[WebAccessibilityObjectWrapperMac accessibilityDescription]):
3122         (-[WebAccessibilityObjectWrapperMac accessibilityHelpText]):
3123         (-[WebAccessibilityObjectWrapperMac accessibilityAttributeValue:]):
3124         (-[WebAccessibilityObjectWrapperMac accessibilityFocusedUIElement]):
3125         (-[WebAccessibilityObjectWrapperMac accessibilityHitTest:]):
3126         (-[WebAccessibilityObjectWrapperMac accessibilityIsAttributeSettable:]):
3127         (-[WebAccessibilityObjectWrapperMac accessibilityIsIgnored]):
3128         (-[WebAccessibilityObjectWrapperMac accessibilityParameterizedAttributeNames]):
3129         (-[WebAccessibilityObjectWrapperMac accessibilityPerformPressAction]):
3130         (-[WebAccessibilityObjectWrapperMac accessibilityPerformIncrementAction]):
3131         (-[WebAccessibilityObjectWrapperMac accessibilityPerformDecrementAction]):
3132         (-[WebAccessibilityObjectWrapperMac accessibilityPerformShowMenuAction]):
3133         (-[WebAccessibilityObjectWrapperMac accessibilityShowContextMenu]):
3134         (-[WebAccessibilityObjectWrapperMac accessibilityPerformAction:]):
3135         (-[WebAccessibilityObjectWrapperMac accessibilitySetValue:forAttribute:]):
3136         (rendererForView):
3137         (-[WebAccessibilityObjectWrapperMac _accessibilityParentForSubview:]):
3138         (-[WebAccessibilityObjectWrapperMac accessibilityActionDescription:]):
3139         (-[WebAccessibilityObjectWrapperMac doAXAttributedStringForRange:]):
3140         (-[WebAccessibilityObjectWrapperMac _convertToNSRange:]):
3141         (-[WebAccessibilityObjectWrapperMac _indexForTextMarker:]):
3142         (-[WebAccessibilityObjectWrapperMac _textMarkerForIndex:]):
3143         (-[WebAccessibilityObjectWrapperMac doAXRTFForRange:]):
3144         (-[WebAccessibilityObjectWrapperMac accessibilityAttributeValue:forParameter:]):
3145         (-[WebAccessibilityObjectWrapperMac accessibilitySupportsOverriddenAttributes]):
3146         (-[WebAccessibilityObjectWrapperMac accessibilityShouldUseUniqueId]):
3147         (-[WebAccessibilityObjectWrapperMac accessibilityIndexOfChild:]):
3148         (-[WebAccessibilityObjectWrapperMac accessibilityArrayAttributeCount:]):
3149         (-[WebAccessibilityObjectWrapperMac accessibilityArrayAttributeValues:index:maxCount:]):
3150         ([WebAccessibilityObjectWrapperMac accessibilitySetShouldRepostNotifications:]):
3151         (-[WebAccessibilityObjectWrapperMac accessibilityPostedNotification:]):
3152
3153 2013-02-15  Eric Carlson  <eric.carlson@apple.com>
3154
3155         [Mac] remove wkCaptionAppearance from WebKitSystemInterface
3156         https://bugs.webkit.org/show_bug.cgi?id=109996
3157
3158         Reviewed by Simon Fraser.
3159
3160         * platform/mac/WebCoreSystemInterface.h:
3161         * platform/mac/WebCoreSystemInterface.mm:
3162
3163 2013-02-15  Sheriff Bot  <webkit.review.bot@gmail.com>
3164
3165         Unreviewed, rolling out r143088.
3166         http://trac.webkit.org/changeset/143088
3167         https://bugs.webkit.org/show_bug.cgi?id=110000
3168
3169         Breaks the build (Requested by dgorbik on #webkit).
3170
3171         * platform/mac/WebCoreSystemInterface.h:
3172         * platform/mac/WebCoreSystemInterface.mm:
3173
3174 2013-02-15  Chris Rogers  <crogers@google.com>
3175
3176         Enhance AudioBus copyFrom() and sumFrom() to be able to handle discrete and speakers up and down-mixing
3177         https://bugs.webkit.org/show_bug.cgi?id=109983
3178
3179         Reviewed by Kenneth Russell.
3180
3181         The Web Audio spec has a more detailed explanation for how channels are to be up and down-mixed:
3182         https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#UpMix
3183
3184         This patch adds the initial support for handling ChannelInterpretation, although no
3185         new JS API is yet implemented.
3186
3187         No new tests since no new APIs have yet been exposed.
3188
3189         * platform/audio/AudioBus.cpp:
3190         (WebCore::AudioBus::copyFrom):
3191         (WebCore):
3192         (WebCore::AudioBus::sumFrom):
3193         (WebCore::AudioBus::speakersCopyFrom):
3194         (WebCore::AudioBus::speakersSumFrom):
3195         (WebCore::AudioBus::discreteCopyFrom):
3196         (WebCore::AudioBus::discreteSumFrom):
3197         * platform/audio/AudioBus.h:
3198         (AudioBus):
3199
3200 2013-02-15  Tony Chang  <tony@chromium.org>
3201
3202         Padding and border changes doesn't trigger relayout of children
3203         https://bugs.webkit.org/show_bug.cgi?id=109639
3204
3205         Reviewed by Kent Tamura.
3206
3207         In RenderBlock::layoutBlock, we only relayout our children if our logical width
3208         changes. This misses cases where our logical width doesn't change (i.e., padding
3209         or border changes), but our content width does change.
3210
3211         Also convert the needsLayout ASSERT into the if statement. This is because
3212         RenderScrollbarPart can change border widths and not need a layout if the scrollbar
3213         doesn't have a parent. In this case, we don't need to set any children for layout.
3214
3215         This is a more general case of bug 104997.
3216
3217         Test: fast/block/dynamic-padding-border.html
3218
3219         * rendering/RenderBox.cpp:
3220         (WebCore::borderOrPaddingLogicalWidthChanged): Only check if the logical width changed.
3221         (WebCore::RenderBox::styleDidChange): Drop the border-box condition since this can happen
3222         even without border-box box sizing.
3223
3224 2013-02-15  Mark Lam  <mark.lam@apple.com>
3225
3226         Split SQLStatement work between the frontend and backend.
3227         https://bugs.webkit.org/show_bug.cgi?id=104751.
3228
3229         Reviewed by Geoffrey Garen.
3230
3231         This is part of the webdatabase refactoring for webkit2.
3232
3233         1. Copied SQLTransaction to SQLTransactionBackend, and then reduce the
3234            2 to only handle frontend and backend work respectively.
3235
3236         2. Changed how statements are created.
3237
3238            - SQLTransaction::executeSQL() first creates a SQLStatement frontend
3239              which encapsulates the 2 script callbacks. It then passes the
3240              SQLStatement to the backend database to create the
3241              SQLStatementBackend.
3242            - The SQLStatementBackend manages all sqlite work.
3243
3244         3. Remove the Database::reportExecuteStatementResult() wrapper because
3245            it is only needed in the backend now.
3246
3247         4. Added new files to the build / project files.
3248
3249         5. Updated / added comments about how the SQLStatement life-cycle works.
3250
3251         No new tests.
3252
3253         * CMakeLists.txt:
3254         * GNUmakefile.list.am:
3255         * Modules/webdatabase/Database.cpp:
3256         * Modules/webdatabase/Database.h:
3257         (Database):
3258         (WebCore::Database::reportCommitTransactionResult):
3259         * Modules/webdatabase/DatabaseBackend.h:
3260         (DatabaseBackend):
3261         * Modules/webdatabase/SQLStatement.cpp:
3262         (WebCore::SQLStatement::create):
3263         (WebCore::SQLStatement::SQLStatement):
3264         (WebCore::SQLStatement::setBackend):
3265         (WebCore::SQLStatement::hasCallback):
3266         (WebCore::SQLStatement::hasErrorCallback):
3267         (WebCore::SQLStatement::performCallback):
3268         * Modules/webdatabase/SQLStatement.h:
3269         (SQLStatement):
3270         * Modules/webdatabase/SQLStatementBackend.cpp: Copied from Source/WebCore/Modules/webdatabase/SQLStatement.cpp.
3271         (WebCore::SQLStatementBackend::create):
3272         (WebCore::SQLStatementBackend::SQLStatementBackend):
3273         (WebCore::SQLStatementBackend::frontend):
3274         (WebCore::SQLStatementBackend::sqlError):
3275         (WebCore::SQLStatementBackend::sqlResultSet):
3276         (WebCore::SQLStatementBackend::execute):
3277         (WebCore::SQLStatementBackend::setDatabaseDeletedError):
3278         (WebCore::SQLStatementBackend::setVersionMismatchedError):
3279         (WebCore::SQLStatementBackend::setFailureDueToQuota):
3280         (WebCore::SQLStatementBackend::clearFailureDueToQuota):
3281         (WebCore::SQLStatementBackend::lastExecutionFailedDueToQuota):
3282         * Modules/webdatabase/SQLStatementBackend.h: Copied from Source/WebCore/Modules/webdatabase/SQLStatement.h.
3283         (SQLStatementBackend):
3284         (WebCore::SQLStatementBackend::hasStatementCallback):
3285         (WebCore::SQLStatementBackend::hasStatementErrorCallback):
3286         * Modules/webdatabase/SQLTransaction.cpp:
3287         (WebCore::SQLTransaction::deliverStatementCallback):
3288         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback):
3289         (WebCore::SQLTransaction::executeSQL):
3290         * Modules/webdatabase/SQLTransactionBackend.cpp:
3291         (WebCore::SQLTransactionBackend::doCleanup):
3292         (WebCore::SQLTransactionBackend::currentStatement):
3293         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
3294         (WebCore::SQLTransactionBackend::executeSQL):
3295         (WebCore::SQLTransactionBackend::runStatements):
3296         (WebCore::SQLTransactionBackend::getNextStatement):
3297         (WebCore::SQLTransactionBackend::runCurrentStatementAndGetNextState):
3298         (WebCore::SQLTransactionBackend::nextStateForCurrentStatementError):
3299         * Modules/webdatabase/SQLTransactionBackend.h:
3300         (SQLTransactionBackend):
3301         * Target.pri:
3302         * WebCore.gypi:
3303         * WebCore.vcproj/WebCore.vcproj:
3304         * WebCore.vcxproj/WebCore.vcxproj:
3305         * WebCore.vcxproj/WebCore.vcxproj.filters:
3306         * WebCore.xcodeproj/project.pbxproj:
3307
3308 2013-02-15  Elliott Sprehn  <esprehn@chromium.org>
3309
3310         Rename HasCustomCallbacks to HasCustomStyleCallbacks
3311         https://bugs.webkit.org/show_bug.cgi?id=109982
3312
3313         Reviewed by Eric Seidel.
3314
3315         Now that inside ChildFrameDisconnector we only call isFrameOwnerElement()
3316         on elements that report having descendants (or themselves) have connected
3317         frames we don't need to be as agressive about avoiding the virtual call
3318         to isFrameOwnerElement() which lets us rename hasCustomCallbacks to
3319         hasCustomStyleCallbacks to better reflect it's purpose.
3320
3321         * dom/ContainerNodeAlgorithms.h:
3322         (WebCore::ChildFrameDisconnector::collectFrameOwners):
3323         * dom/Element.cpp:
3324         (WebCore::Element::styleForRenderer):
3325         (WebCore::Element::recalcStyle):
3326         (WebCore::Element::willRecalcStyle):
3327         (WebCore::Element::didRecalcStyle):
3328         (WebCore::Element::customStyleForRenderer):
3329         * dom/Node.h:
3330         (WebCore::Node::pseudoId):
3331         (WebCore::Node::hasCustomStyleCallbacks):
3332         (WebCore::Node::customPseudoId):
3333         (WebCore::Node::setHasCustomStyleCallbacks):
3334         * dom/PseudoElement.cpp:
3335         (WebCore::PseudoElement::PseudoElement):
3336         * dom/ShadowRoot.cpp:
3337         (WebCore::ShadowRoot::recalcStyle):
3338         * html/HTMLFormControlElement.cpp:
3339         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
3340         * html/HTMLFrameOwnerElement.cpp:
3341         (WebCore::HTMLFrameOwnerElement::HTMLFrameOwnerElement):
3342         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
3343         * html/HTMLFrameSetElement.cpp:
3344         (WebCore::HTMLFrameSetElement::HTMLFrameSetElement):
3345         * html/HTMLIFrameElement.cpp:
3346         (WebCore::HTMLIFrameElement::HTMLIFrameElement):
3347         * html/HTMLInputElement.cpp:
3348         (WebCore::HTMLInputElement::HTMLInputElement):
3349         * html/HTMLMediaElement.cpp:
3350         (WebCore::HTMLMediaElement::HTMLMediaElement):
3351         * html/HTMLOptGroupElement.cpp:
3352         (WebCore::HTMLOptGroupElement::HTMLOptGroupElement):
3353         * html/HTMLOptionElement.cpp:
3354         (WebCore::HTMLOptionElement::HTMLOptionElement):
3355         * html/HTMLPlugInImageElement.cpp:
3356         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
3357         * html/shadow/DateTimeEditElement.cpp:
3358         (WebCore::DateTimeEditElement::DateTimeEditElement):
3359         * html/shadow/TextControlInnerElements.cpp:
3360         (WebCore::TextControlInnerElement::TextControlInnerElement):
3361         (WebCore::TextControlInnerTextElement::TextControlInnerTextElement):
3362         * html/shadow/TextFieldDecorationElement.cpp:
3363         (WebCore::TextFieldDecorationElement::TextFieldDecorationElement):
3364         * svg/SVGElement.cpp:
3365         (WebCore::SVGElement::SVGElement):
3366         * svg/SVGUseElement.cpp:
3367         (WebCore::SVGUseElement::SVGUseElement):
3368
3369 2013-02-15  Eric Carlson  <eric.carlson@apple.com>
3370
3371         [Mac] remove wkCaptionAppearance from WebKitSystemInterface
3372         https://bugs.webkit.org/show_bug.cgi?id=109996
3373
3374         Reviewed by Simon Fraser.
3375
3376         * platform/mac/WebCoreSystemInterface.h:
3377         * platform/mac/WebCoreSystemInterface.mm:
3378
3379 2013-02-15  Andreas Kling  <akling@apple.com>
3380
3381         Calling DOM Element.attributes shouldn't force creation of ElementData.
3382         <http://webkit.org/b/109976>
3383
3384         Reviewed by Darin Adler.
3385
3386         Don't create ElementData for an Element unnecessarily just because someone calls .attributes on it.
3387         Previously, JS like this would create empty ElementData when 'element' has no attributes:
3388
3389             for (i = 0; i < element.attributes.length; ++i)
3390                 doStuff(element.attributes[i]);
3391
3392         Make NamedNodeMap::length() short-circuit and return 0 if !Element::hasAttributes().
3393
3394         * dom/Element.cpp:
3395         (WebCore::Element::attributes):
3396         * dom/NamedNodeMap.cpp:
3397         (WebCore::NamedNodeMap::length):
3398
3399 2013-02-15  Kentaro Hara  <haraken@chromium.org>
3400
3401         [V8] An "EvenTarget" type in IDL should be converted to EventTarget*, not to Node*
3402         https://bugs.webkit.org/show_bug.cgi?id=109895
3403
3404         Reviewed by Adam Barth.
3405
3406         Currently an "EventTarget" type in IDL is converted to Node*.
3407         This is wrong because there are non-Node interfaces that inherit
3408         a EventTarget. We should convert an "EventTarget" type to EventTarget*.
3409         This will fix FIXMEs in CodeGeneratorV8.pm.
3410
3411         * bindings/scripts/CodeGeneratorV8.pm:
3412         (GetNativeType):
3413         (JSValueToNative):
3414
3415 2013-02-15  Simon Fraser  <simon.fraser@apple.com>
3416
3417         REGRESSION (r142505?): Crashes in WebCore::ScrollingStateNode::appendChild when using back/forward buttons
3418         https://bugs.webkit.org/show_bug.cgi?id=109826
3419         <rdar://problem/13216100>
3420
3421         Reviewed by Beth Dakin.
3422
3423         Fix a crash when going Back on some pages with fixed position elements.
3424         
3425         When a page was being restored from the page cache, and a layout from
3426         FrameLoader::commitProvisionalLoad() caused us to try to register the fixed
3427         position layer before the main scrolling layer, we'd crash trying to dereference
3428         the root node.
3429         
3430         Fix by bailing from ScrollingStateTree::attachNode() if we can't find the parent
3431         node.
3432
3433         Test: platform/mac-wk2/tiled-drawing/null-parent-back-crash.html
3434
3435         * page/scrolling/ScrollingStateTree.cpp:
3436         (WebCore::ScrollingStateTree::attachNode):
3437         (WebCore::ScrollingStateTree::stateNodeForID):
3438         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3439         (WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):
3440
3441 2013-02-15  Simon Fraser  <simon.fraser@apple.com>
3442
3443         Constrain fixed layers to the viewport, not the document
3444         https://bugs.webkit.org/show_bug.cgi?id=109646
3445
3446         Reviewed by Beth Dakin.
3447         
3448         It's bad to constrain position:fixed compositing layers to the
3449         document rect, because their bounds will change every time the scroll
3450         position changes, and we're not good currently at synchronizing scrolling
3451         thread layer updates with main thread layer updates, so jiggles ensue.
3452         
3453         Fix by constraining position:fixed layers to the viewport.
3454
3455         Test: compositing/geometry/limit-layer-bounds-fixed.html
3456
3457         * rendering/RenderLayerBacking.cpp:
3458         (WebCore::RenderLayerBacking::updateCompositedBounds):
3459
3460 2013-02-13  Jer Noble  <jer.noble@apple.com>
3461
3462         Add a CDMClient class which allows the CDM to query for the currently attached MediaPlayer.
3463         https://bugs.webkit.org/show_bug.cgi?id=109702
3464
3465         Reviewed by Eric Carlson.
3466
3467         Some CDM implementations will need to work closely with an associated
3468         MediaPlayer in order to generate key requests and provide keys. Add a
3469         client protocol to be implemented by the MediaKeys object which can
3470         provide access to the associated MediaPlayer if present.
3471
3472         * Modules/encryptedmedia/CDM.cpp:
3473         (WebCore::CDM::CDM): Initialize the m_client ivar.
3474         (WebCore::CDM::mediaPlayer): Pass to the client, if present.
3475         * Modules/encryptedmedia/CDM.h:
3476         (WebCore::CDM::client): Simple getter.
3477         (WebCore::CDM::setClient): Simple setter.
3478         * Modules/encryptedmedia/MediaKeys.cpp:
3479         (WebCore::MediaKeys::MediaKeys): Initialize the m_mediaElement ivar
3480             and call setClient() on the passed in CDM.
3481         (WebCore::MediaKeys::setMediaElement): Simple setter.
3482         (WebCore::MediaKeys::cdmMediaPlayer): Retrieve the MediaPlayer from
3483             the m_mediaElement if present.
3484         * Modules/encryptedmedia/MediaKeys.h:
3485         * html/HTMLMediaElement.cpp:
3486         (WebCore::HTMLMediaElement::~HTMLMediaElement): Call setMediaKeys(0)
3487             to clear the mediaElement in any associated MediaKeys.
3488         (WebCore::HTMLMediaElement::setMediaKeys): Clear the mediaElement on
3489             any associated MediaKeys, and set the mediaElement on the newly
3490             associated MediaKeys.
3491
3492 2013-02-15  Simon Fraser  <simon.fraser@apple.com>
3493
3494         drop-shadow filter with overflow:hidden child misbehaves
3495         https://bugs.webkit.org/show_bug.cgi?id=109783
3496
3497         Reviewed by Dean Jackson.
3498         
3499         The change in r112745 was not sufficient; it failed to account
3500         for descendant layers that needed to not clipping to avoid artefacts
3501         with filters like drop-shadow.
3502
3503         Test: css3/filters/filter-repaint-shadow-layer-child.html
3504
3505         * rendering/RenderLayer.cpp:
3506         (WebCore::RenderLayer::paintLayerContents): Remove the useClipRect bool.
3507         Replace it with a clipToDirtyRect member on the LayerPaintingInfo, which
3508         gets passed to descendants. Remove some "Restore the clip" comments that added
3509         nothing.
3510         * rendering/RenderLayer.h:
3511         (WebCore::RenderLayer::LayerPaintingInfo::LayerPaintingInfo):
3512         (LayerPaintingInfo):
3513
3514 2013-02-15  Sheriff Bot  <webkit.review.bot@gmail.com>
3515
3516         Unreviewed, rolling out r143066.
3517         http://trac.webkit.org/changeset/143066
3518         https://bugs.webkit.org/show_bug.cgi?id=109986
3519
3520         Broke the Apple Lion build (among others). (Requested by
3521         ddkilzer on #webkit).
3522
3523         * accessibility/mac/AXObjectCacheMac.mm:
3524         (WebCore::AXObjectCache::attachWrapper):
3525         * accessibility/mac/WebAccessibilityObjectWrapper.h:
3526         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
3527         (-[WebAccessibilityObjectWrapper unregisterUniqueIdForUIElement]):
3528         (-[WebAccessibilityObjectWrapper detach]):
3529         (-[WebAccessibilityObjectWrapper accessibilityObject]):
3530         (-[WebAccessibilityObjectWrapper attachmentView]):
3531         (CFAutoreleaseHelper):
3532         (AXObjectIsTextMarker):
3533         (AXObjectIsTextMarkerRange):
3534         (AXTextMarkerRange):
3535         (AXTextMarkerRangeStart):
3536         (AXTextMarkerRangeEnd):
3537         (SearchKeyEntry):
3538         (createAccessibilitySearchKeyMap):
3539         (accessibilitySearchKeyForString):
3540         (textMarkerForVisiblePosition):
3541         (-[WebAccessibilityObjectWrapper textMarkerForVisiblePosition:]):
3542         (visiblePositionForTextMarker):
3543         (-[WebAccessibilityObjectWrapper visiblePositionForTextMarker:]):
3544         (visiblePositionForStartOfTextMarkerRange):
3545         (visiblePositionForEndOfTextMarkerRange):
3546         (textMarkerRangeFromMarkers):
3547         (AXAttributedStringRangeIsValid):
3548         (AXAttributeStringSetFont):
3549         (CreateCGColorIfDifferent):
3550         (AXAttributeStringSetColor):
3551         (AXAttributeStringSetNumber):
3552         (AXAttributeStringSetStyle):
3553         (AXAttributeStringSetBlockquoteLevel):
3554         (AXAttributeStringSetSpelling):
3555         (AXAttributeStringSetHeadingLevel):
3556         (AXAttributeStringSetElement):
3557         (AXAttributedStringAppendText):
3558         (nsStringForReplacedNode):
3559         (-[WebAccessibilityObjectWrapper doAXAttributedStringForTextMarkerRange:]):
3560         (textMarkerRangeFromVisiblePositions):
3561         (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
3562         (-[WebAccessibilityObjectWrapper accessibilityActionNames]):
3563         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
3564         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
3565         (-[WebAccessibilityObjectWrapper visiblePositionRangeForTextMarkerRange:]):
3566         (-[WebAccessibilityObjectWrapper renderWidgetChildren]):
3567         (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
3568         (convertToVector):
3569         (convertToNSArray):
3570         (-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]):
3571         (-[WebAccessibilityObjectWrapper position]):
3572         (createAccessibilityRoleMap):
3573         (roleValueToNSString):
3574         (-[WebAccessibilityObjectWrapper role]):
3575         (-[WebAccessibilityObjectWrapper subrole]):
3576         (-[WebAccessibilityObjectWrapper roleDescription]):
3577         (-[WebAccessibilityObjectWrapper scrollViewParent]):
3578         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3579         (-[WebAccessibilityObjectWrapper accessibilityFocusedUIElement]):
3580         (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
3581         (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
3582         (-[WebAccessibilityObjectWrapper accessibilityIsIgnored]):
3583         (-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):
3584         (-[WebAccessibilityObjectWrapper accessibilityPerformPressAction]):
3585         (-[WebAccessibilityObjectWrapper accessibilityPerformIncrementAction]):
3586         (-[WebAccessibilityObjectWrapper accessibilityPerformDecrementAction]):
3587         (-[WebAccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
3588         (-[WebAccessibilityObjectWrapper accessibilityShowContextMenu]):
3589         (-[WebAccessibilityObjectWrapper accessibilityPerformAction:]):
3590         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
3591         (rendererForView):
3592         (-[WebAccessibilityObjectWrapper _accessibilityParentForSubview:]):
3593         (-[WebAccessibilityObjectWrapper accessibilityActionDescription:]):
3594         (-[WebAccessibilityObjectWrapper doAXAttributedStringForRange:]):
3595         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
3596         (-[WebAccessibilityObjectWrapper _indexForTextMarker:]):
3597         (-[WebAccessibilityObjectWrapper _textMarkerForIndex:]):
3598         (-[WebAccessibilityObjectWrapper doAXRTFForRange:]):
3599         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
3600         (-[WebAccessibilityObjectWrapper accessibilitySupportsOverriddenAttributes]):
3601         (-[WebAccessibilityObjectWrapper accessibilityShouldUseUniqueId]):
3602         (-[WebAccessibilityObjectWrapper accessibilityIndexOfChild:]):
3603         (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
3604         (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
3605         * accessibility/mac/WebAccessibilityObjectWrapperMac.h: Removed.
3606         * accessibility/mac/WebAccessibilityObjectWrapperMac.m: Removed.
3607
3608 2013-02-15  Emil A Eklund  <eae@chromium.org>
3609
3610         Change MouseRelatedEvent to use LayoutPoint::scale
3611         https://bugs.webkit.org/show_bug.cgi?id=109979
3612
3613         Reviewed by Dimitri Glazkov.
3614         
3615         Change MouseRelatedEvent::MouseRelatedEvent to use LayoutPoint::
3616         scale to adjust location and scroll offset for scale factor and
3617         zooming.
3618
3619         No new tests, no change in functionality.
3620
3621         * dom/MouseRelatedEvent.cpp:
3622         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
3623
3624 2013-02-15  Chris Fleizach  <cfleizach@apple.com>
3625
3626         AX: Split WebAccessibilityObjectWrapper so code can be shared with iOS
3627         https://bugs.webkit.org/show_bug.cgi?id=109849
3628
3629         Reviewed by David Kilzer.
3630
3631         Split up the WebAccessibilityObjectWrapper so that iOS can share more 
3632         code with MacOS. I imagine over time, more code will move into this base class,
3633         but for now this will be a good start.
3634
3635         A base class called WebAccessibilityObjectWrapper now exists, and Mac has a subclass
3636         of that. iOS will be able to do the same.
3637
3638         * WebCore.xcodeproj/project.pbxproj:
3639         * accessibility/mac/AXObjectCacheMac.mm:
3640         (WebCore::AXObjectCache::attachWrapper):
3641         * accessibility/mac/WebAccessibilityObjectWrapper.h:
3642         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
3643         (-[WebAccessibilityObjectWrapper detach]):
3644         (-[WebAccessibilityObjectWrapper attachmentView]):
3645         (-[WebAccessibilityObjectWrapper accessibilityObject]):
3646         (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]):
3647         (-[WebAccessibilityObjectWrapper titleTagShouldBeUsedInDescriptionField]):
3648         (-[WebAccessibilityObjectWrapper accessibilityTitle]):
3649         (-[WebAccessibilityObjectWrapper accessibilityDescription]):
3650         (-[WebAccessibilityObjectWrapper accessibilityHelpText]):
3651         * accessibility/mac/WebAccessibilityObjectWrapperMac.h: Added.
3652         * accessibility/mac/WebAccessibilityObjectWrapperMac.m: Added.
3653         (std):
3654         (-[WebAccessibilityObjectWrapperMac detach]):
3655         (-[WebAccessibilityObjectWrapperMac attachmentView]):
3656         (CFAutoreleaseHelper):
3657         (AXObjectIsTextMarker):
3658         (AXObjectIsTextMarkerRange):
3659         (AXTextMarkerRange):
3660         (AXTextMarkerRangeStart):
3661         (AXTextMarkerRangeEnd):
3662         (SearchKeyEntry):
3663         (createAccessibilitySearchKeyMap):
3664         (accessibilitySearchKeyForString):
3665         (textMarkerForVisiblePosition):
3666         (-[WebAccessibilityObjectWrapperMac textMarkerForVisiblePosition:]):
3667         (visiblePositionForTextMarker):
3668         (-[WebAccessibilityObjectWrapperMac visiblePositionForTextMarker:]):
3669         (visiblePositionForStartOfTextMarkerRange):
3670         (visiblePositionForEndOfTextMarkerRange):
3671         (textMarkerRangeFromMarkers):
3672         (AXAttributedStringRangeIsValid):
3673         (AXAttributeStringSetFont):
3674         (CreateCGColorIfDifferent):
3675         (AXAttributeStringSetColor):
3676         (AXAttributeStringSetNumber):
3677         (AXAttributeStringSetStyle):
3678         (AXAttributeStringSetBlockquoteLevel):
3679         (AXAttributeStringSetSpelling):
3680         (AXAttributeStringSetHeadingLevel):
3681         (AXAttributeStringSetElement):
3682         (AXAttributedStringAppendText):
3683         (nsStringForReplacedNode):
3684         (-[WebAccessibilityObjectWrapperMac doAXAttributedStringForTextMarkerRange:]):
3685         (textMarkerRangeFromVisiblePositions):
3686         (-[WebAccessibilityObjectWrapperMac textMarkerRangeFromVisiblePositions:endPosition:]):
3687         (-[WebAccessibilityObjectWrapperMac accessibilityActionNames]):
3688         (-[WebAccessibilityObjectWrapperMac additionalAccessibilityAttributeNames]):
3689         (-[WebAccessibilityObjectWrapperMac accessibilityAttributeNames]):
3690         (-[WebAccessibilityObjectWrapperMac visiblePositionRangeForTextMarkerRange:]):
3691         (-[WebAccessibilityObjectWrapperMac renderWidgetChildren]):
3692         (-[WebAccessibilityObjectWrapperMac remoteAccessibilityParentObject]):
3693         (convertToVector):
3694         (convertToNSArray):
3695         (-[WebAccessibilityObjectWrapperMac textMarkerRangeForSelection]):
3696         (-[WebAccessibilityObjectWrapperMac position]):
3697         (createAccessibilityRoleMap):
3698         (roleValueToNSString):
3699         (-[WebAccessibilityObjectWrapperMac role]):
3700         (-[WebAccessibilityObjectWrapperMac subrole]):
3701         (-[WebAccessibilityObjectWrapperMac roleDescription]):
3702         (-[WebAccessibilityObjectWrapperMac scrollViewParent]):
3703         (-[WebAccessibilityObjectWrapperMac titleTagShouldBeUsedInDescriptionField]):
3704         (-[WebAccessibilityObjectWrapperMac accessibilityTitle]):
3705         (-[WebAccessibilityObjectWrapperMac accessibilityDescription]):
3706         (-[WebAccessibilityObjectWrapperMac accessibilityHelpText]):
3707         (-[WebAccessibilityObjectWrapperMac accessibilityAttributeValue:]):
3708         (-[WebAccessibilityObjectWrapperMac accessibilityFocusedUIElement]):
3709         (-[WebAccessibilityObjectWrapperMac accessibilityHitTest:]):
3710         (-[WebAccessibilityObjectWrapperMac accessibilityIsAttributeSettable:]):
3711         (-[WebAccessibilityObjectWrapperMac accessibilityIsIgnored]):
3712         (-[WebAccessibilityObjectWrapperMac accessibilityParameterizedAttributeNames]):
3713         (-[WebAccessibilityObjectWrapperMac accessibilityPerformPressAction]):
3714         (-[WebAccessibilityObjectWrapperMac accessibilityPerformIncrementAction]):
3715         (-[WebAccessibilityObjectWrapperMac accessibilityPerformDecrementAction]):
3716         (-[WebAccessibilityObjectWrapperMac accessibilityPerformShowMenuAction]):
3717         (-[WebAccessibilityObjectWrapperMac accessibilityShowContextMenu]):
3718         (-[WebAccessibilityObjectWrapperMac accessibilityPerformAction:]):
3719         (-[WebAccessibilityObjectWrapperMac accessibilitySetValue:forAttribute:]):
3720         (rendererForView):
3721         (-[WebAccessibilityObjectWrapperMac _accessibilityParentForSubview:]):
3722         (-[WebAccessibilityObjectWrapperMac accessibilityActionDescription:]):
3723         (-[WebAccessibilityObjectWrapperMac doAXAttributedStringForRange:]):
3724         (-[WebAccessibilityObjectWrapperMac _convertToNSRange:]):
3725         (-[WebAccessibilityObjectWrapperMac _indexForTextMarker:]):
3726         (-[WebAccessibilityObjectWrapperMac _textMarkerForIndex:]):
3727         (-[WebAccessibilityObjectWrapperMac doAXRTFForRange:]):
3728         (-[WebAccessibilityObjectWrapperMac accessibilityAttributeValue:forParameter:]):
3729         (-[WebAccessibilityObjectWrapperMac accessibilitySupportsOverriddenAttributes]):
3730         (-[WebAccessibilityObjectWrapperMac accessibilityShouldUseUniqueId]):
3731         (-[WebAccessibilityObjectWrapperMac accessibilityIndexOfChild:]):
3732         (-[WebAccessibilityObjectWrapperMac accessibilityArrayAttributeCount:]):
3733         (-[WebAccessibilityObjectWrapperMac accessibilityArrayAttributeValues:index:maxCount:]):
3734         ([WebAccessibilityObjectWrapperMac accessibilitySetShouldRepostNotifications:]):
3735         (-[WebAccessibilityObjectWrapperMac accessibilityPostedNotification:]):
3736
3737 2013-02-15  Elliott Sprehn  <esprehn@chromium.org>
3738
3739         RenderQuote should not mark renderers as needing layout during layout
3740         https://bugs.webkit.org/show_bug.cgi?id=109876
3741
3742         Reviewed by Ojan Vafai.
3743
3744         Marking RenderQuotes as needing pref width recalcs and layouts during a
3745         layout is dangerous since an ancestor may mark itself as having completed
3746         layout, but then some subtree still thinks it needs layout.
3747
3748         Instead, since the only time we create RenderQuote instances is inside
3749         PseudoElement, we can call attachQuote inside PseudoElement::attach during
3750         the regular tree mutating cycle. We can then use RenderQuote::styleDidChange
3751         to update the kind of quotes on normal style changes.
3752
3753         This makes RenderQuote behave much more similarly to DOM nodes and means
3754         we no longer need to set dirty bits during layout.
3755
3756         Test: fast/css-generated-content/quote-layout-focus-crash.html
3757
3758         * dom/PseudoElement.cpp:
3759         (WebCore::PseudoElement::attach): Now call attachQuote().
3760         * rendering/RenderQuote.cpp:
3761         (WebCore::RenderQuote::~RenderQuote):
3762         (WebCore::RenderQuote::willBeRemovedFromTree):
3763         (WebCore::RenderQuote::styleDidChange):
3764         (WebCore::RenderQuote::updateText):
3765         (WebCore::RenderQuote::attachQuote):
3766         (WebCore::RenderQuote::detachQuote):
3767         (WebCore::RenderQuote::updateDepth):
3768         * rendering/RenderQuote.h:
3769         (RenderQuote):
3770
3771 2013-02-15  Sheriff Bot  <webkit.review.bot@gmail.com>
3772
3773         Unreviewed, rolling out r143044.
3774         http://trac.webkit.org/changeset/143044
3775         https://bugs.webkit.org/show_bug.cgi?id=109974
3776
3777         broke windows build (Requested by kling on #webkit).
3778
3779         * dom/DocumentSharedObjectPool.cpp:
3780         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
3781         * dom/Element.cpp:
3782         (WebCore::sizeForShareableElementDataWithAttributeCount):
3783         (WebCore::ShareableElementData::ShareableElementData):
3784         (WebCore::ShareableElementData::~ShareableElementData):
3785         (WebCore::UniqueElementData::UniqueElementData):
3786         * dom/Element.h:
3787         (WebCore::ShareableElementData::immutableAttributeArray):
3788         (ShareableElementData):
3789         (WebCore::ElementData::attributeItem):
3790
3791 2013-02-15  Adam Barth  <abarth@webkit.org>
3792
3793         Enable the preload scanner on the background parser thread
3794         https://bugs.webkit.org/show_bug.cgi?id=108027
3795
3796         Reviewed by Tony Gentilcore.
3797
3798         The patch causes us to pass all the fast/preloader tests with the
3799         threaded parser enabled.
3800
3801         This patch wires up the BackgroundHTMLParser to the
3802         TokenPreloadScanner.  Currently, we bail out of preload scanning if we
3803         encounter a document.write becaues we don't know how to rewind the
3804         preload scanner, but that's something we can tune in the future.
3805
3806         The BackgroundHTMLParser delivers the preloads to the
3807         HTMLDocumentParser together with the token stream. If the
3808         HTMLDocumentParser isn't able to use the token stream immediately, it
3809         kicks off the preloads.
3810
3811         * html/parser/BackgroundHTMLParser.cpp:
3812         (WebCore::checkThatPreloadsAreSafeToSendToAnotherThread):
3813         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
3814         (WebCore::BackgroundHTMLParser::resumeFrom):
3815         (WebCore::BackgroundHTMLParser::pumpTokenizer):
3816         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
3817         * html/parser/BackgroundHTMLParser.h:
3818         (Configuration):
3819             - We need to add a struct for the create function because the
3820               number of arguments exceeds the limits of Functional.h.
3821         (BackgroundHTMLParser):
3822         (WebCore::BackgroundHTMLParser::create):
3823         * html/parser/CSSPreloadScanner.cpp:
3824         (WebCore::CSSPreloadScanner::scanCommon):
3825         (WebCore::CSSPreloadScanner::scan):
3826         (WebCore::CSSPreloadScanner::emitRule):
3827             - We need to use a new string here so that the string is safe to
3828               send to another thread.
3829         * html/parser/CSSPreloadScanner.h:
3830         (CSSPreloadScanner):
3831         * html/parser/HTMLDocumentParser.cpp:
3832         (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
3833         (WebCore::HTMLDocumentParser::startBackgroundParser):
3834             - Following the example of the XSSAuditor, we create the
3835               TokenPreloadScanner on the main thread and then send it to the
3836               background thread for operation.
3837         * html/parser/HTMLDocumentParser.h:
3838         (WebCore):
3839         (ParsedChunk):
3840         * html/parser/HTMLParserOptions.h:
3841         (HTMLParserOptions):
3842             - We need to add a default constructor so that the
3843               HTMLDocumentParser can create an empty
3844               BackgroundHTMLParser::Configuration struct.
3845         * html/parser/HTMLPreloadScanner.cpp:
3846         (WebCore::TokenPreloadScanner::scan):
3847         (WebCore::TokenPreloadScanner::scanCommon):
3848         (WebCore::HTMLPreloadScanner::scan):
3849         * html/parser/HTMLPreloadScanner.h:
3850         (TokenPreloadScanner):
3851         (WebCore::TokenPreloadScanner::isSafeToSendToAnotherThread):
3852         * html/parser/HTMLResourcePreloader.cpp:
3853         (WebCore::HTMLResourcePreloader::takeAndPreload):
3854         (WebCore):
3855         * html/parser/HTMLResourcePreloader.h:
3856         (WebCore::PreloadRequest::PreloadRequest):
3857         (WebCore):
3858         (HTMLResourcePreloader):
3859
3860 2013-02-15  Ryosuke Niwa  <rniwa@webkit.org>
3861
3862         Build fix after r143030. We need to keep updatedRange around until createMarkupInternal returns.
3863
3864         * editing/markup.cpp:
3865         (WebCore::createMarkup):
3866
3867 2013-02-15  Rik Cabanier  <cabanier@adobe.com>
3868
3869         Add platform support for -webkit-background-blend-mode to CG context
3870         https://bugs.webkit.org/show_bug.cgi?id=108549
3871
3872         Reviewed by Dean Jackson.
3873
3874         Tests: css3/compositing/effect-background-blend-mode-stacking.html
3875                css3/compositing/effect-background-blend-mode.html
3876
3877         This patch adds support for blending on background images to the Core Graphics port of WebKit.
3878
3879         * platform/graphics/CrossfadeGeneratedImage.cpp: Added interface change for blending.
3880         (WebCore::CrossfadeGeneratedImage::drawPattern):
3881         * platform/graphics/CrossfadeGeneratedImage.h: Added interface change for blending.
3882         (CrossfadeGeneratedImage):
3883         * platform/graphics/GeneratedImage.h: Added interface change for blending.
3884         (GeneratedImage):
3885         * platform/graphics/GeneratorGeneratedImage.cpp: Added interface change for blending.
3886         (WebCore::GeneratorGeneratedImage::drawPattern):
3887         * platform/graphics/GeneratorGeneratedImage.h: Added interface change for blending.
3888         (GeneratorGeneratedImage):
3889         * platform/graphics/GraphicsContext.cpp: Added interface change for blending and passes blend mode to image object.
3890         (WebCore::GraphicsContext::drawTiledImage):
3891         (WebCore::GraphicsContext::blendModeOperation):
3892         (WebCore):
3893         * platform/graphics/GraphicsContext.h: Added interface change for blending.
3894         (GraphicsContext):
3895         * platform/graphics/Image.cpp: Added interface change for blending and passed it to graphics layer.
3896         (WebCore::Image::drawTiled):
3897         * platform/graphics/Image.h: Added interface change for blending.
3898         (Image):
3899         * platform/graphics/cg/ImageCG.cpp: Added interface change for blending and passed it to OS.
3900         (WebCore::Image::drawPattern):
3901         * rendering/RenderBoxModelObject.cpp: Passed blend mode when drawing background images.
3902         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3903         * platform/graphics/cairo/ImageCairo.cpp: Added interface change for blending.
3904         (WebCore::Image::drawPattern):
3905         * platform/graphics/qt/ImageQt.cpp: Added interface change for blending.
3906         (WebCore::Image::drawPattern):
3907         * platform/graphics/skia/ImageSkia.cpp: Added interface change for blending.
3908         (WebCore::Image::drawPattern):
3909         * rendering/RenderBoxModelObject.cpp: Added interface change for blending.
3910         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3911         * svg/graphics/SVGImageForContainer.cpp: Added interface change for blending.
3912         (WebCore::SVGImageForContainer::drawPattern):
3913         * svg/graphics/SVGImageForContainer.h: Added interface change for blending.
3914
3915 2013-02-14  Emil A Eklund  <eae@chromium.org>
3916
3917         Clamp span value in RenderTableCell::parse[Col|Row]SpanFromDOM
3918         https://bugs.webkit.org/show_bug.cgi?id=109878
3919
3920         Reviewed by Abhishek Arya.
3921
3922         Test: fast/table/colspan-huge-number.html
3923         
3924         Clamp colspan and rowspan values to their respective maximum
3925         supported values.
3926
3927         * rendering/RenderTableCell.cpp:
3928         (WebCore::RenderTableCell::parseColSpanFromDOM):
3929         (WebCore::RenderTableCell::parseRowSpanFromDOM):
3930
3931 2013-02-15  Andreas Kling  <akling@apple.com>
3932
3933         ShareableElementData should use zero-length array for storage.
3934         <http://webkit.org/b/109959>
3935
3936         Reviewed by Anders Carlsson.
3937
3938         Use a zero-length Attribute array instead of always casting from void* to an array.
3939         It was done this way originally because I didn't know we could sidestep the MSVC
3940         build error with some #pragma hackery.
3941
3942         * dom/DocumentSharedObjectPool.cpp:
3943         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
3944         * dom/Element.cpp:
3945         (WebCore::sizeForShareableElementDataWithAttributeCount):
3946         (WebCore::ShareableElementData::ShareableElementData):
3947         (WebCore::ShareableElementData::~ShareableElementData):
3948         (WebCore::UniqueElementData::UniqueElementData):
3949         * dom/Element.h:
3950         (ShareableElementData):
3951         (WebCore::ElementData::attributeItem):
3952