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