[MutationObservers] attributeFilter should be case sensitive at all times
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-23  Rafael Weinstein  <rafaelw@chromium.org>
2
3         [MutationObservers] attributeFilter should be case sensitive at all times
4         https://bugs.webkit.org/show_bug.cgi?id=81822
5
6         Reviewed by Ryosuke Niwa.
7
8         This removes the behavior in MutationObserverRegistration which treats
9         attributeFilter as case insensitive for HTML elements in HTML documents.
10
11         Relevant tests have been updated.
12
13         * dom/MutationObserverRegistration.cpp:
14         (WebCore::MutationObserverRegistration::resetObservation):
15         (WebCore::MutationObserverRegistration::shouldReceiveMutationFrom):
16         * dom/MutationObserverRegistration.h:
17         (MutationObserverRegistration):
18
19 2012-03-23  Kentaro Hara  <haraken@chromium.org>
20
21         Move WebSocket APIs from WorkerContext.idl to WorkerContextWebSocket.idl
22         https://bugs.webkit.org/show_bug.cgi?id=79663
23
24         Reviewed by Adam Barth.
25
26         For WebKit modularization, this patch moves WebSocket APIs from WorkerContext.idl
27         to WorkerContextWebSocket.idl.
28
29         Tests: http/tests/websocket/tests/hybi/workers/* (No change in test results)
30
31         * CMakeLists.txt:
32         * DerivedSources.make:
33         * DerivedSources.pri:
34         * GNUmakefile.list.am:
35         * Modules/websockets/WorkerContextWebSocket.idl: Added.
36         * WebCore.gypi:
37         * WebCore.xcodeproj/project.xcodeproj:
38         * workers/WorkerContext.idl:
39
40 2012-03-23  Parag Radke  <parag@motorola.com>
41
42         REGRESSION: can select text of an input button
43         https://bugs.webkit.org/show_bug.cgi?id=13624
44
45         Reviewed by Ryosuke Niwa.
46
47         Text in a button should never have a selection background of its own painted
48         but if the button is inside an editable area, then the whole button should
49         have it's selection background painted.
50
51         Test: editing/selection/selection-button-text.html
52
53         * rendering/RenderButton.h:
54         Added implementation for the virtual function canBeSelectionLeaf()
55         which returns true if the button renderer is editable, false other wise.
56         * rendering/RenderTextFragment.h:
57         Added implementation for the virtual function canBeSelectionLeaf()
58         which returns true if the text fragment renderer is editable, false other wise.
59
60 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
61
62         Remove unnecessary ASSERT from LoadableTextTrack::trackElementIndex
63         https://bugs.webkit.org/show_bug.cgi?id=82095
64
65         Reviewed by Dan Bernstein.
66
67         No new tests, removed a bogus ASSERT that was sometimes triggered by tests.
68
69         * html/track/LoadableTextTrack.cpp:
70         (WebCore::LoadableTextTrack::trackElementIndex): Remove ASSERT.
71
72 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
73
74         Layout Test media/video-source-load.html is failing
75         https://bugs.webkit.org/show_bug.cgi?id=82094
76
77         Reviewed by Alexey Proskuryakov.
78
79         No new tests, tested by media/video-source-load.html.
80
81         * html/HTMLMediaElement.cpp:
82         (WebCore::HTMLMediaElement::sourceWasAdded): Set m_nextChildNodeToConsider when called 
83             with networkState == NETWORK_EMPTY because the resource selection algorithm has
84             not started yet.
85
86 2012-03-23  Alexey Proskuryakov  <ap@apple.com>
87
88         [Mac] No need for platform-specific ENABLE_BLOB values
89         https://bugs.webkit.org/show_bug.cgi?id=82102
90
91         Reviewed by David Kilzer.
92
93         * Configurations/FeatureDefines.xcconfig:
94
95 2012-03-23  Kent Tamura  <tkent@chromium.org>
96
97         Add TextFieldDecorator and TextFieldDecorationElement
98         https://bugs.webkit.org/show_bug.cgi?id=80580
99
100         Reviewed by Dimitri Glazkov.
101
102         These classes will be used to add a decoration icon to a text field
103         <input> from outside of WebCore. We have a plan to use them in Chromium
104         port. So this patch doesn't add TextFieldDecorationElement.{cpp,h} to
105         non-Chromium build files.
106
107         How it works:
108         When a shadow subtree for a text field is created, we ask ChromeClient
109         to decorate it. ChromeClient appends a TextFieldDecorationElement to the
110         existing shadow subtree or another shadow tree. A TextFieldDecorator is
111         associated to a TextFieldDecorationElement, and it provides decoration
112         icon images and a click handler.
113
114         No new tests. This patch won't make any behavior change for now.
115
116         * WebCore.gypi: Add TextFieldDecorationElement.cpp and TextFieldDecorationElement.h
117         * dom/Element.h:
118         (WebCore::Element::isTextFieldDecoration):
119         * html/TextFieldInputType.cpp:
120         (WebCore::TextFieldInputType::createShadowSubtree):
121         Calls ChromeClient::willAddTextFieldDecorationsTo() and addTextFieldDecorationsTo().
122         * html/shadow/TextFieldDecorationElement.cpp: Added.
123         (WebCore::TextFieldDecorator::~TextFieldDecorator):
124         (WebCore::TextFieldDecorationElement::TextFieldDecorationElement):
125         (WebCore::TextFieldDecorationElement::create):
126         (WebCore::TextFieldDecorationElement::isTextFieldDecoration):
127         (WebCore::TextFieldDecorationElement::updateImage):
128         (WebCore::TextFieldDecorationElement::customStyleForRenderer):
129         Sets the size to a square of the font-size.
130         (WebCore::TextFieldDecorationElement::createRenderer):
131         Always creates a RenderImage.
132         (WebCore::TextFieldDecorationElement::attach):
133         Sets an image for appropriate state.
134         (WebCore::TextFieldDecorationElement::isMouseFocusable):
135         (WebCore::TextFieldDecorationElement::defaultEventHandler):
136         Delegate a click event to the corresponding function of TextFieldDecorator.
137         * html/shadow/TextFieldDecorationElement.h: Added.
138         (TextFieldDecorator): Added.
139         (TextFieldDecorationElement): Added.
140         (WebCore::toTextFieldDecorationElement): Added.
141         * page/ChromeClient.h:
142         (WebCore::ChromeClient::willAddTextFieldDecorationsTo): Add an empty implementation.
143         (WebCore::ChromeClient::addTextFieldDecorationsTo): ditto.
144
145 2012-03-23  Adam Klein  <adamk@chromium.org>
146
147         Match DOM4 spec with respect to DocumentFragment insertion
148         https://bugs.webkit.org/show_bug.cgi?id=82089
149
150         Reviewed by Ryosuke Niwa.
151
152         DOM4 specifies the behavior of appendChild, insertBefore, and replaceChild
153         in terms of "mutation algorithms":
154
155         http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#mutation-algorithms
156
157         This change updates WebKit to match, in particular with regard to DocumentFragments.
158         Previously, ContainerNode would remove nodes one at a time, then add them to the new parent.
159         When combined with MutationObservers, this results in overly-verbose mutation records.
160         Now we create as few records as possible, matching the spec as well as Gecko's implementation
161         of MutationObservers.
162
163         Note that we still need to check validity each time through the loop,
164         since inserting a node may dispatch events. In a future change, I hope
165         to move these events so that they fire only after all nodes are inserted,
166         but that's too much to tackle all in one.
167
168         Tests: fast/mutation/document-fragment-insertion.html
169
170         * dom/ContainerNode.cpp:
171         (WebCore::collectChildrenAndRemoveFromOldParent): New helper method
172         combining collectTargetNodes() with the removal of the collected nodes from
173         their old parent, if any.
174         (WebCore::ContainerNode::insertBefore): Use new helper method instead
175         of removing nodes one at a time from the fragment.
176         (WebCore::ContainerNode::replaceChild): ditto. Also removed some redundant asserts
177         and moved the "do nothing" check out of the loop.
178         (WebCore::ContainerNode::appendChild): Use new helper method.
179
180 2012-03-23  Stephen White  <senorblanco@chromium.org>
181
182         [skia] Switch to Skia's implementation of the feMorphology filter.
183         https://bugs.webkit.org/show_bug.cgi?id=82085
184
185         Reviewed by Dirk Schulze.
186
187         Covered by existing tests in svg/filters/.
188
189         * WebCore.gypi:
190         * platform/graphics/filters/FEMorphology.h:
191         (FEMorphology):
192         * platform/graphics/filters/skia/FEMorphologySkia.cpp: Added.
193         (WebCore):
194         (WebCore::FEMorphology::platformApplySkia):
195
196 2012-03-23  Adam Barth  <abarth@webkit.org>
197
198         Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 3)
199         https://bugs.webkit.org/show_bug.cgi?id=82027
200
201         Reviewed by Kentaro Hara.
202
203         Rather than watching for willDetachPage, NotificationCenter can just
204         override ActiveDOMObject::stop directly to be notified when it needs to
205         stop.
206
207         Switching NotificationCenter over to using ActiveDOMObject callbacks
208         frees DOMWindowNotification to implement reconnectFrame.  However, this
209         is only really a victory in princple because NotificationCenter always
210         returns false for canSuspend(), which means we'll never actually use
211         the reconnectFrame functionality.  However, this patch does move us
212         closer to the time when NotificationCenter can implement
213         ActiveDOMObject::suspend/resume to play nice with the PageCache.
214
215         * notifications/DOMWindowNotifications.cpp:
216         (WebCore::DOMWindowNotifications::disconnectFrame):
217         (WebCore::DOMWindowNotifications::reconnectFrame):
218         * notifications/DOMWindowNotifications.h:
219         (DOMWindowNotifications):
220         * notifications/NotificationCenter.cpp:
221         (WebCore::NotificationCenter::NotificationCenter):
222         (WebCore::NotificationCenter::stop):
223         * notifications/NotificationCenter.h:
224         (NotificationCenter):
225
226 2012-03-23  Daniel Cheng  <dcheng@chromium.org>
227
228         [chromium] Support file drag out using DataTransferItemList::add(File)
229         https://bugs.webkit.org/show_bug.cgi?id=81261
230
231         Reviewed by Tony Chang.
232
233         Original patch by Varun Jain <varunjain@chromium.org>.
234         I've updated the original patch to remove 'downloadurl' handling since it's not tested, nor
235         is it necessary for File objects, since File objects correspond to a native filesystem path.
236
237         Test: fast/events/drag-dataTransferItemList-file-handling.html
238
239         * platform/chromium/DataTransferItemListChromium.cpp:
240         (WebCore::DataTransferItemListChromium::add):
241
242 2012-03-23  Zan Dobersek  <zandobersek@gmail.com>
243
244         [GObject bindings] Supplemental interfaces are not disabled with the "Conditional" attribute
245         https://bugs.webkit.org/show_bug.cgi?id=80030
246
247         Reviewed by Martin Robinson.
248
249         Changes in CodeGeneratorGObject.pm:
250         - group implementation of private helpers and guard them inside
251         an ifdef if a root conditional attribute is present.
252         - always define the type of a GObject binding, even if the root
253         conditional feature is not enabled
254         - the methods are generated as well, but are simply stubs if the
255         feature is not enabled, throwing a warning upon interaction.
256         - if the method itself is guarded by a conditional attribute,
257         the stub implementation gains one more level of depth, throwing
258         a warning if the method's conditional feature is not enabled
259         but the root conditional feature is.
260         - small style fixes in random places.
261
262         Also changed are GObject baselines for binding tests.
263
264         No new tests - no new testable functionality.
265
266         * bindings/gobject/GNUmakefile.am:
267         * bindings/scripts/CodeGeneratorGObject.pm:
268         (HumanReadableConditional):
269         (GenerateConditionalWarn):
270         (GenerateProperty):
271         (GenerateProperties):
272         (GenerateFunction):
273         (GenerateFunctions):
274         (GenerateCFile):
275         (GenerateEventTargetIface):
276         (Generate):
277         (WriteData):
278         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
279         (WebKit):
280         (WebKit::kit):
281         (WebKit::wrapFloat64Array):
282         (webkit_dom_float64array_finalize):
283         (webkit_dom_float64array_foo):
284         * bindings/scripts/test/GObject/WebKitDOMFloat64ArrayPrivate.h:
285         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
286         (WebKit):
287         (WebKit::kit):
288         (WebKit::wrapTestActiveDOMObject):
289         (webkit_dom_test_active_dom_object_finalize):
290         (webkit_dom_test_active_dom_object_exciting_function):
291         (webkit_dom_test_active_dom_object_post_message):
292         (webkit_dom_test_active_dom_object_get_exciting_attr):
293         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObjectPrivate.h:
294         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
295         (WebKit):
296         (WebKit::kit):
297         (WebKit::core):
298         (WebKit::wrapTestCallback):
299         (webkit_dom_test_callback_finalize):
300         (webkit_dom_test_callback_callback_with_no_param):
301         (webkit_dom_test_callback_callback_with_class1param):
302         (webkit_dom_test_callback_callback_with_class2param):
303         (webkit_dom_test_callback_callback_with_non_bool_return_type):
304         (webkit_dom_test_callback_callback_with_string_list):
305         * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
306         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
307         (WebKit):
308         (WebKit::kit):
309         (WebKit::wrapTestCustomNamedGetter):
310         (webkit_dom_test_custom_named_getter_finalize):
311         (webkit_dom_test_custom_named_getter_another_function):
312         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetterPrivate.h:
313         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
314         (WebKit):
315         (WebKit::kit):
316         (WebKit::wrapTestEventConstructor):
317         (webkit_dom_test_event_constructor_finalize):
318         (webkit_dom_test_event_constructor_get_attr1):
319         (webkit_dom_test_event_constructor_get_attr2):
320         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructorPrivate.h:
321         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
322         (WebKit):
323         (WebKit::core):
324         (WebKit::wrapTestEventTarget):
325         (webkit_dom_test_event_target_finalize):
326         (webkit_dom_test_event_target_item):
327         (webkit_dom_test_event_target_dispatch_event):
328         * bindings/scripts/test/GObject/WebKitDOMTestEventTargetPrivate.h:
329         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
330         (WebKit):
331         (WebKit::kit):
332         (WebKit::core):
333         (WebKit::wrapTestInterface):
334         (webkit_dom_test_interface_finalize):
335         (webkit_dom_test_interface_supplemental_method1):
336         (webkit_dom_test_interface_supplemental_method2):
337         (webkit_dom_test_interface_supplemental_method4):
338         (webkit_dom_test_interface_get_supplemental_str1):
339         (webkit_dom_test_interface_get_supplemental_str2):
340         (webkit_dom_test_interface_set_supplemental_str2):
341         (webkit_dom_test_interface_get_supplemental_node):
342         (webkit_dom_test_interface_set_supplemental_node):
343         * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h:
344         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
345         (WebKit):
346         (WebKit::kit):
347         (WebKit::wrapTestMediaQueryListListener):
348         (webkit_dom_test_media_query_list_listener_finalize):
349         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h:
350         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
351         (WebKit):
352         (WebKit::kit):
353         (WebKit::wrapTestNamedConstructor):
354         (webkit_dom_test_named_constructor_finalize):
355         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h:
356         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
357         (WebKit):
358         (WebKit::kit):
359         (WebKit::core):
360         (WebKit::wrapTestObj):
361         (webkit_dom_test_obj_finalize):
362         (webkit_dom_test_obj_set_property):
363         (webkit_dom_test_obj_get_property):
364         (webkit_dom_test_obj_constructed):
365         (webkit_dom_test_obj_class_init):
366         (webkit_dom_test_obj_init):
367         (webkit_dom_test_obj_void_method):
368         (webkit_dom_test_obj_void_method_with_args):
369         (webkit_dom_test_obj_int_method):
370         (webkit_dom_test_obj_int_method_with_args):
371         (webkit_dom_test_obj_obj_method):
372         (webkit_dom_test_obj_obj_method_with_args):
373         (webkit_dom_test_obj_method_with_sequence_arg):
374         (webkit_dom_test_obj_method_that_requires_all_args_and_throws):
375         (webkit_dom_test_obj_serialized_value):
376         (webkit_dom_test_obj_idb_key):
377         (webkit_dom_test_obj_options_object):
378         (webkit_dom_test_obj_method_with_exception):
379         (webkit_dom_test_obj_with_script_state_void):
380         (webkit_dom_test_obj_with_script_state_obj):
381         (webkit_dom_test_obj_with_script_state_void_exception):
382         (webkit_dom_test_obj_with_script_state_obj_exception):
383         (webkit_dom_test_obj_with_script_execution_context):
384         (webkit_dom_test_obj_with_script_execution_context_and_script_state):
385         (webkit_dom_test_obj_with_script_execution_context_and_script_state_obj_exception):
386         (webkit_dom_test_obj_with_script_execution_context_and_script_state_with_spaces):
387         (webkit_dom_test_obj_method_with_optional_arg):
388         (webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg):
389         (webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args):
390         (webkit_dom_test_obj_method_with_optional_string):
391         (webkit_dom_test_obj_method_with_optional_string_is_undefined):
392         (webkit_dom_test_obj_method_with_optional_string_is_null_string):
393         (webkit_dom_test_obj_conditional_method1):
394         (webkit_dom_test_obj_conditional_method2):
395         (webkit_dom_test_obj_conditional_method3):
396         (webkit_dom_test_obj_class_method):
397         (webkit_dom_test_obj_class_method_with_optional):
398         (webkit_dom_test_obj_overloaded_method1):
399         (webkit_dom_test_obj_convert1):
400         (webkit_dom_test_obj_convert2):
401         (webkit_dom_test_obj_convert3):
402         (webkit_dom_test_obj_convert4):
403         (webkit_dom_test_obj_convert5):
404         (webkit_dom_test_obj_mutable_point_function):
405         (webkit_dom_test_obj_immutable_point_function):
406         (webkit_dom_test_obj_orange):
407         (webkit_dom_test_obj_strict_function):
408         (webkit_dom_test_obj_get_read_only_int_attr):
409         (webkit_dom_test_obj_get_read_only_string_attr):
410         (webkit_dom_test_obj_get_read_only_test_obj_attr):
411         (webkit_dom_test_obj_get_short_attr):
412         (webkit_dom_test_obj_set_short_attr):
413         (webkit_dom_test_obj_get_unsigned_short_attr):
414         (webkit_dom_test_obj_set_unsigned_short_attr):
415         (webkit_dom_test_obj_get_int_attr):
416         (webkit_dom_test_obj_set_int_attr):
417         (webkit_dom_test_obj_get_long_long_attr):
418         (webkit_dom_test_obj_set_long_long_attr):
419         (webkit_dom_test_obj_get_unsigned_long_long_attr):
420         (webkit_dom_test_obj_set_unsigned_long_long_attr):
421         (webkit_dom_test_obj_get_string_attr):
422         (webkit_dom_test_obj_set_string_attr):
423         (webkit_dom_test_obj_get_test_obj_attr):
424         (webkit_dom_test_obj_set_test_obj_attr):
425         (webkit_dom_test_obj_get_xml_obj_attr):
426         (webkit_dom_test_obj_set_xml_obj_attr):
427         (webkit_dom_test_obj_get_create):
428         (webkit_dom_test_obj_set_create):
429         (webkit_dom_test_obj_get_reflected_string_attr):
430         (webkit_dom_test_obj_set_reflected_string_attr):
431         (webkit_dom_test_obj_get_reflected_integral_attr):
432         (webkit_dom_test_obj_set_reflected_integral_attr):
433         (webkit_dom_test_obj_get_reflected_unsigned_integral_attr):
434         (webkit_dom_test_obj_set_reflected_unsigned_integral_attr):
435         (webkit_dom_test_obj_get_reflected_boolean_attr):
436         (webkit_dom_test_obj_set_reflected_boolean_attr):
437         (webkit_dom_test_obj_get_reflected_url_attr):
438         (webkit_dom_test_obj_set_reflected_url_attr):
439         (webkit_dom_test_obj_get_reflected_custom_integral_attr):
440         (webkit_dom_test_obj_set_reflected_custom_integral_attr):
441         (webkit_dom_test_obj_get_reflected_custom_boolean_attr):
442         (webkit_dom_test_obj_set_reflected_custom_boolean_attr):
443         (webkit_dom_test_obj_get_reflected_custom_url_attr):
444         (webkit_dom_test_obj_set_reflected_custom_url_attr):
445         (webkit_dom_test_obj_get_attr_with_getter_exception):
446         (webkit_dom_test_obj_set_attr_with_getter_exception):
447         (webkit_dom_test_obj_get_attr_with_setter_exception):
448         (webkit_dom_test_obj_set_attr_with_setter_exception):
449         (webkit_dom_test_obj_get_string_attr_with_getter_exception):
450         (webkit_dom_test_obj_set_string_attr_with_getter_exception):
451         (webkit_dom_test_obj_get_string_attr_with_setter_exception):
452         (webkit_dom_test_obj_set_string_attr_with_setter_exception):
453         (webkit_dom_test_obj_get_with_script_state_attribute):
454         (webkit_dom_test_obj_set_with_script_state_attribute):
455         (webkit_dom_test_obj_get_with_script_execution_context_attribute):
456         (webkit_dom_test_obj_set_with_script_execution_context_attribute):
457         (webkit_dom_test_obj_get_with_script_state_attribute_raises):
458         (webkit_dom_test_obj_set_with_script_state_attribute_raises):
459         (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises):
460         (webkit_dom_test_obj_set_with_script_execution_context_attribute_raises):
461         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute):
462         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute):
463         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute_raises):
464         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute_raises):
465         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_with_spaces_attribute):
466         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_with_spaces_attribute):
467         (webkit_dom_test_obj_get_conditional_attr1):
468         (webkit_dom_test_obj_set_conditional_attr1):
469         (webkit_dom_test_obj_get_conditional_attr2):
470         (webkit_dom_test_obj_set_conditional_attr2):
471         (webkit_dom_test_obj_get_conditional_attr3):
472         (webkit_dom_test_obj_set_conditional_attr3):
473         (webkit_dom_test_obj_get_content_document):
474         (webkit_dom_test_obj_get_mutable_point):
475         (webkit_dom_test_obj_set_mutable_point):
476         (webkit_dom_test_obj_get_immutable_point):
477         (webkit_dom_test_obj_set_immutable_point):
478         (webkit_dom_test_obj_get_strict_float):
479         (webkit_dom_test_obj_set_strict_float):
480         (webkit_dom_test_obj_get_description):
481         (webkit_dom_test_obj_get_id):
482         (webkit_dom_test_obj_set_id):
483         (webkit_dom_test_obj_get_hash):
484         * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h:
485         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
486         (WebKit):
487         (WebKit::kit):
488         (WebKit::core):
489         (WebKit::wrapTestSerializedScriptValueInterface):
490         (webkit_dom_test_serialized_script_value_interface_finalize):
491         (webkit_dom_test_serialized_script_value_interface_accept_transfer_list):
492         (webkit_dom_test_serialized_script_value_interface_multi_transfer_list):
493         (webkit_dom_test_serialized_script_value_interface_get_value):
494         (webkit_dom_test_serialized_script_value_interface_set_value):
495         (webkit_dom_test_serialized_script_value_interface_get_readonly_value):
496         (webkit_dom_test_serialized_script_value_interface_get_cached_value):
497         (webkit_dom_test_serialized_script_value_interface_set_cached_value):
498         (webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value):
499         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h:
500
501 2012-03-23  Dana Jansens  <danakj@chromium.org>
502
503         [chromium] Record painted pixel counts for measuring effectiveness of per-tile painting
504         https://bugs.webkit.org/show_bug.cgi?id=82057
505
506         Reviewed by Adrienne Walker.
507
508         Adds painted pixel metrics to CCOverdrawMetrics class, and calls in
509         to report painted areas when updating tiles in the TiledLayerChromium
510         class.
511
512         Unit test: TiledLayerChromiumTest.opaqueContentsRegion
513                    TiledLayerChromiumTest.pixelsPaintedMetrics
514
515         * platform/graphics/chromium/TiledLayerChromium.cpp:
516         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
517         * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
518         (WebCore::CCOverdrawMetrics::CCOverdrawMetrics):
519         (WebCore::CCOverdrawMetrics::didPaint):
520         (WebCore):
521         (WebCore::CCOverdrawMetrics::recordMetricsInternal):
522         * platform/graphics/chromium/cc/CCOverdrawMetrics.h:
523         (CCOverdrawMetrics):
524         (WebCore::CCOverdrawMetrics::pixelsPainted):
525
526 2012-03-23  Abhishek Arya  <inferno@chromium.org>
527
528         Crash in RenderBlock::splitBlocks.
529         https://bugs.webkit.org/show_bug.cgi?id=81926
530
531         Reviewed by Julien Chaffraix.
532
533         We are updating the :after content before calling splitFlow. The :after content
534         gets blown away since it will go to the continuation. beforeChild was earlier
535         set to the first child. Being the last anonymous block, its children gets pulled
536         up in collapseAnonymousBoxChild and it gets destroyed. So, we need to update
537         beforeChild value. 
538
539         Test: fast/multicol/span/update-after-content-before-child-crash.html
540
541         * rendering/RenderBlock.cpp:
542         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
543
544 2012-03-23  Dana Jansens  <danakj@chromium.org>
545
546         [chromium] Improved composited debug borders
547         https://bugs.webkit.org/show_bug.cgi?id=82071
548
549         Reviewed by Adrienne Walker.
550
551         Fix the problem with missing debug borders. Since we append quads
552         to the list front to back now, we draw the quads in the list from
553         back to front of the list. Which means if the debug quad is added
554         after the layer it is drawing around, the layer can draw over top
555         of its debug quad. Reverse the ordering when appending to fix it.
556
557         Make the border red around tiles that are checkerboarded. Missing
558         tiles in non-root layers are drawn clear, so this makes them more
559         visible.
560
561         Put a blue border around each render surface, and a purple border
562         on their replicas.
563
564         No new tests.
565
566         * platform/graphics/chromium/cc/CCRenderPass.cpp:
567         (WebCore):
568         (WebCore::CCRenderPass::appendQuadsForLayer):
569         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
570         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
571         (WebCore::CCRenderSurface::hasReplica):
572         (WebCore):
573         (WebCore::CCRenderSurface::createReplicaSharedQuadState):
574         * platform/graphics/chromium/cc/CCRenderSurface.h:
575         (CCRenderSurface):
576         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
577         (WebCore):
578         (WebCore::CCTiledLayerImpl::appendQuads):
579
580 2012-03-23  Simon Fraser  <simon.fraser@apple.com>
581
582         Move code that calls setAcceleratesDrawing() on GraphicsLayers into RenderLayerBacking
583         https://bugs.webkit.org/show_bug.cgi?id=82092
584
585         Reviewed by Dean Jackson.
586
587         A RenderLayerBacking manages several GraphicsLayers, but RenderLayerCompositor
588         was only calling setAcceleratesDrawing() on the one it knows about. Fix by moving
589         this setting code down into RenderLayerBacking.
590         
591         RenderLayerCompositor now caches the setAcceleratesDrawing setting, as it does
592         for other compositing-related settings, so that RenderLayerBacking doesn't have
593         to grovel for Settings every time.
594
595         * rendering/RenderLayerBacking.cpp:
596         (WebCore::RenderLayerBacking::createGraphicsLayer):
597         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
598         * rendering/RenderLayerCompositor.cpp:
599         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
600         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
601         (WebCore::RenderLayerCompositor::updateBacking):
602         * rendering/RenderLayerCompositor.h:
603         (WebCore::RenderLayerCompositor::acceleratedDrawingEnabled):
604         (RenderLayerCompositor):
605
606 2012-03-23  Beth Dakin  <bdakin@apple.com>
607
608         https://bugs.webkit.org/show_bug.cgi?id=82083
609
610         Rubber-stamped by Simon Fraser.
611
612         This patch is just a name change. getExistingScrollAnimator() (which was 
613         added earlier today) is now existingScrollAnimator().
614         * loader/FrameLoader.cpp:
615         (WebCore::FrameLoader::transitionToCommitted):
616         * page/EventHandler.cpp:
617         (WebCore::EventHandler::handleGestureTapDown):
618         * page/FrameView.cpp:
619         (WebCore::FrameView::setAnimatorsAreActive):
620         * platform/ScrollView.cpp:
621         (WebCore::ScrollView::updateScrollbars):
622         * platform/ScrollableArea.cpp:
623         (WebCore::ScrollableArea::willStartLiveResize):
624         (WebCore::ScrollableArea::willEndLiveResize):
625         (WebCore::ScrollableArea::contentAreaWillPaint):
626         (WebCore::ScrollableArea::mouseEnteredContentArea):
627         (WebCore::ScrollableArea::mouseExitedContentArea):
628         (WebCore::ScrollableArea::mouseMovedInContentArea):
629         (WebCore::ScrollableArea::contentAreaDidShow):
630         (WebCore::ScrollableArea::contentAreaDidHide):
631         (WebCore::ScrollableArea::contentsResized):
632         (WebCore::ScrollableArea::serviceScrollAnimations):
633         * platform/ScrollableArea.h:
634         (WebCore::ScrollableArea::existingScrollAnimator):
635
636 2012-03-23  Abhishek Arya  <inferno@chromium.org>
637
638         Crash due to accessing removed parent lineboxes when clearing selection.
639         https://bugs.webkit.org/show_bug.cgi?id=81359
640
641         Reviewed by Eric Seidel.
642
643         Similar to r110323, adds the canUpdateSelectionOnRootLineBoxes
644         check to more places.
645
646         Test: editing/selection/clear-selection-crash.html
647
648         * rendering/RenderObject.cpp:
649         (WebCore::RenderObject::canUpdateSelectionOnRootLineBoxes):
650         * rendering/RenderSelectionInfo.h:
651         (WebCore::RenderSelectionInfo::RenderSelectionInfo):
652         (WebCore::RenderBlockSelectionInfo::RenderBlockSelectionInfo):
653
654 2012-03-23  Beth Dakin  <bdakin@apple.com>
655
656         https://bugs.webkit.org/show_bug.cgi?id=82083
657         Too many ScrollAnimators are allocated on pages with frames
658
659         Reviewed by Geoffrey Garen.
660
661         This patch adds a new getter to ScrollableArea called 
662         getExistingScrollAnimator() unlike scrollAnimator() this new function will 
663         just return null if there is not already a ScrollAnimator. Callers should use 
664         this new function when they have business with ScrollAnimator that does not 
665         need to do anything when there are no scrollbars.
666         * loader/FrameLoader.cpp:
667         (WebCore::FrameLoader::transitionToCommitted):
668         * page/EventHandler.cpp:
669         (WebCore::EventHandler::handleGestureTapDown):
670         * page/FrameView.cpp:
671         (WebCore::FrameView::setAnimatorsAreActive):
672         * platform/ScrollView.cpp:
673         (WebCore::ScrollView::updateScrollbars):
674         * platform/ScrollableArea.cpp:
675         (WebCore::ScrollableArea::willStartLiveResize):
676         (WebCore::ScrollableArea::willEndLiveResize):
677         (WebCore::ScrollableArea::contentAreaWillPaint):
678         (WebCore::ScrollableArea::mouseEnteredContentArea):
679         (WebCore::ScrollableArea::mouseExitedContentArea):
680         (WebCore::ScrollableArea::mouseMovedInContentArea):
681         (WebCore::ScrollableArea::contentAreaDidShow):
682         (WebCore::ScrollableArea::contentAreaDidHide):
683         (WebCore::ScrollableArea::willRemoveHorizontalScrollbar):
684         (WebCore::ScrollableArea::contentsResized):
685         (WebCore::ScrollableArea::serviceScrollAnimations):
686         * platform/ScrollableArea.h:
687         (ScrollableArea):
688         (WebCore::ScrollableArea::getExistingScrollAnimator):
689
690 2012-03-23  Eric Carlson  <eric.carlson@apple.com>
691
692         Deal with DOM modifications when evaluating source elements.
693         https://bugs.webkit.org/show_bug.cgi?id=81163
694
695         Reviewed by Alexey Proskuryakov.
696
697         Test: media/video-beforeload-remove-source.html
698
699         * dom/ContainerNode.cpp: Make NodeVector and collectNodes public, renamed as getChildNodes.
700         (WebCore::ContainerNode::takeAllChildrenFrom): collectNodes -> getChildNodes.
701         (WebCore::ContainerNode::willRemove): collectNodes -> getChildNodes.
702         (WebCore::ContainerNode::willRemoveChildren): collectNodes -> getChildNodes.
703         (WebCore::ContainerNode::insertedIntoDocument): collectNodes -> getChildNodes.
704         (WebCore::ContainerNode::removedFromDocument): collectNodes -> getChildNodes.
705         * dom/ContainerNode.h:
706         (WebCore::getChildNodes):
707
708         * editing/ReplaceSelectionCommand.cpp: Remove unused NodeVector declaration.
709
710         * html/HTMLMediaElement.cpp:
711         (WebCore::HTMLMediaElement::HTMLMediaElement): m_nextChildNodeToConsider and m_currentSourceNode
712             are now RefPtrs.
713         (WebCore::HTMLMediaElement::loadTimerFired): Protect HTMLMediaElement from being deleted during
714             a DOM modification during an event callback.
715         (WebCore::HTMLMediaElement::load): Ditto.
716         (WebCore::HTMLMediaElement::selectMediaResource): Set m_nextChildNodeToConsider to the first
717             child node, it will be the first node considered.
718         (WebCore::HTMLMediaElement::havePotentialSourceChild): m_nextChildNodeToConsider and m_currentSourceNode
719             are now RefPtrs.
720         (WebCore::HTMLMediaElement::selectNextSourceChild): Collect all child nodes in a vector before
721             looking for <source> nodes because 'beforeload' event handlers can mutate the DOM. Don't
722             use a <source> that is no longer a child node after 'beforeload'. Use 0 to represent the end
723             of the child node list because m_nextChildNodeToConsider is now a RefPtr so using the previous 
724             sentinel, "this", would cause a retain cycle.
725         (WebCore::HTMLMediaElement::sourceWasAdded):  m_nextChildNodeToConsider and m_currentSourceNode
726             are now RefPtrs.
727         (WebCore::HTMLMediaElement::sourceWillBeRemoved): Ditto.
728         (WebCore::HTMLMediaElement::getPluginProxyParams): Protect HTMLMediaElement from being deleted during
729             a DOM modification during an event callback.
730         * html/HTMLMediaElement.h:
731
732 2012-03-23  Dean Jackson  <dino@apple.com>
733
734         Disable CSS_SHADERS in Apple builds
735         https://bugs.webkit.org/show_bug.cgi?id=81996
736
737         Reviewed by Simon Fraser.
738
739         Remove ENABLE_CSS_SHADERS from FeatureDefines. It's now in Platform.h.
740
741         * Configurations/FeatureDefines.xcconfig:
742
743 2012-03-23  Dave Michael  <dmichael@chromium.org>
744
745         Relanding(r111754): HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called
746         https://bugs.webkit.org/show_bug.cgi?id=80428
747
748         Reviewed by Eric Seidel and Ryosuke Niwa.
749
750         Make HTMLPluginElement release its m_NPObject in detach() to break a
751         reference-counting cycle that happens on reload or navigation. With this
752         change, HTMLPlugInElement::removedFromDocument is unnecessary, so it
753         was removed. Note that Releasing m_NPObject does not result in a call to
754         the plugin; it simply releases a reference count on the wrapper object
755         for this HTMLPlugInElement. (The plugin's NPP_Deallocate is invoked
756         when the render tree is destroyed, when PluginView calls
757         PluginPackage::unload.) Thus, it is safe to release m_NPObject in
758         detach, because it can not result in layout or style changes.
759
760         Also added numberOfLiveNodes() and numberOfLiveDocuments() to
761         window.internals to enable testing.
762
763         Test: plugins/netscape-dom-access-and-reload.html
764
765         * WebCore.exp.in:
766         * html/HTMLPlugInElement.cpp:
767         (WebCore::HTMLPlugInElement::detach):
768         * html/HTMLPlugInElement.h:
769         (HTMLPlugInElement):
770         * testing/Internals.cpp:
771         (WebCore):
772         (WebCore::Internals::numberOfLiveNodes):
773         (WebCore::Internals::numberOfLiveDocuments):
774         * testing/Internals.h:
775         (Internals):
776         * testing/Internals.idl:
777
778 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
779
780         CSSParser doesn't set border-*-width/style/color to initial by border shorthand property
781         https://bugs.webkit.org/show_bug.cgi?id=82040
782
783         Reviewed by Antti Koivisto.
784
785         The border shorthand property sets values for border-width, border-style, and border-color shorthand properties.
786         While CSSParser::parseValue can process these shorthand properties properly and set the longhand properties
787         such as border-top-width, border-right-width, ... border-left-color, CSSParser::addProperty can't and the
788         initialization in parseShorthand fails for the border property.
789
790         Fixed the bug by explicitly initializing longhand properties.
791
792         Changing the behavior here is unlikely to break the Web since our behavior already differs from that of Firefox
793         and Internet Explorer. Both of those browsers return the actual initial values such as "medium" and "currentColor".
794         This discrepancy is tracked by https://bugs.webkit.org/show_bug.cgi?id=82078.
795
796         Test: fast/css/border-shorthand-initialize-longhands.html
797
798         * css/CSSParser.cpp:
799         (WebCore::CSSParser::parseValue): Uses borderAbridgedLonghand.
800         (WebCore::CSSParser::parseShorthand): Uses longhand properties for initialization if one is available.
801         This allows us to initialize multiple properties (e.g. border-*-color) for a single property missing in the set.
802         * css/CSSPropertyLonghand.cpp:
803         (WebCore::borderAbridgedLonghand): Added. The longhand here (border-width, border-style, border-color) is
804         "abridged" in the sense that they're still shorthands.
805         * css/CSSPropertyLonghand.h:
806         (WebCore::CSSPropertyLonghand::CSSPropertyLonghand):
807         (CSSPropertyLonghand): Added the version that takes longhand instances for initialization purposes.
808         (WebCore::CSSPropertyLonghand::longhandsForInitialization):
809
810 2012-03-23  Tony Chang  <tony@chromium.org>
811
812         [chromium] rename newwtf target back to wtf
813         https://bugs.webkit.org/show_bug.cgi?id=82064
814
815         Reviewed by Adam Barth.
816
817         No new tests, only renaming a build target.
818
819         * WebCore.gyp/WebCore.gyp:
820
821 2012-03-23  Adrienne Walker  <enne@google.com>
822
823         [chromium] Turn off painting of scrollbars on compositor thread for unsupported platforms
824         https://bugs.webkit.org/show_bug.cgi?id=82066
825
826         Reviewed by James Robinson.
827
828         With threaded compositing, OSX will crash and Windows will have black
829         scrollbars. Fix that by reverting to the previosu behavior of updating
830         scrollbars on the main thread instead.
831
832         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
833         (WebCore::scrollbarLayerDidChange):
834
835 2012-03-23  Dan Bernstein  <mitz@apple.com>
836
837         <rdar://problem/7883987> ASSERTION FAILED: ASSERT(input == AnimationStateInputEndTimerFired || input == AnimationStateInputPlayStatePaused) in AnimationBase::updateStateMachine causing multiple "crashes" on Lion Intel Debug WebKit testers
838         https://bugs.webkit.org/show_bug.cgi?id=81351
839
840         Rubber-stamped by Jessie Berlin.
841
842         * page/animation/AnimationBase.cpp:
843         (WebCore::AnimationBase::updateStateMachine): Replaced the assertion with a LOG_ERROR so that
844         the issue is still noticeable, but it does not automatically make the debug bots red.
845
846 2012-03-23  Mike Lawther  <mikelawther@chromium.org>
847
848         CSS3 calc: image sizing works with mixed percentage/absolute
849         https://bugs.webkit.org/show_bug.cgi?id=82017
850
851         Reviewed by Ojan Vafai.
852
853         Test: css3/calc/img-size-expected.html
854
855         * rendering/RenderBox.cpp:
856         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
857         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
858
859 2012-03-23  Julien Chaffraix  <jchaffraix@webkit.org>
860
861         REGRESSION(107971): Google Voice contact list is broken in WebKit due to badly allocating the extra height
862         https://bugs.webkit.org/show_bug.cgi?id=81826
863
864         Reviewed by Tony Chang.
865
866         Covered by tables/mozilla/bugs/bug27038-{1|2}.html.
867
868         This partly reverts r107971: the extra logical height distribution change was not needed
869         to fix the bug (it is needed by the test though). We revert to giving all the extra height
870         to the first tbody and not the first section.
871
872         This is broken but unfortunately some websites are relying on that. Getting a real
873         distribution algorithm is covered by bug 81824. However this is super tricky to get
874         right and I did not want to add more compatibility risks until I have something solid.
875
876         * rendering/RenderTable.cpp:
877         (WebCore::RenderTable::distributeExtraLogicalHeight):
878
879 2012-03-23  Xingnan Wang  <xingnan.wang@intel.com>
880
881         Optimize for IPP in DirectConvolver::process()
882         https://bugs.webkit.org/show_bug.cgi?id=80255
883
884         Reviewed by Chris Rogers.
885
886         Increase ~2X performance by conv() in IPP.
887
888         * platform/audio/DirectConvolver.cpp:
889         (WebCore::DirectConvolver::DirectConvolver):
890         (WebCore::DirectConvolver::process):
891         * platform/audio/DirectConvolver.h:
892         (DirectConvolver):
893
894 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
895
896         MediaStream API (JSEP): Introducing PeerConnection00 and IceCallback
897         https://bugs.webkit.org/show_bug.cgi?id=81657
898
899         Reviewed by Adam Barth.
900
901         Last major WebCore patch for the JSEP PeerConnection, together with the associated
902         IceCallback (they both depend on each other and IceCallback has very few lines of real code).
903
904         My next patch after this one will do a major overhaul of the existing layout tests
905         and add a few new ones.
906
907         * GNUmakefile.list.am:
908         * Modules/mediastream/DOMWindowMediaStream.idl:
909         * Modules/mediastream/IceCallback.h: Added.
910         (WebCore):
911         (IceCallback):
912         (WebCore::IceCallback::~IceCallback):
913         * Modules/mediastream/IceCallback.idl: Added.
914         * Modules/mediastream/PeerConnection00.cpp: Added.
915         (WebCore):
916         (WebCore::PeerConnection00::create):
917         (WebCore::PeerConnection00::PeerConnection00):
918         (WebCore::PeerConnection00::~PeerConnection00):
919         (WebCore::PeerConnection00::hasLocalAudioTrack):
920         (WebCore::PeerConnection00::hasLocalVideoTrack):
921         (WebCore::PeerConnection00::parseMediaHints):
922         (WebCore::PeerConnection00::createOffer):
923         (WebCore::PeerConnection00::createAnswer):
924         (WebCore::PeerConnection00::setLocalDescription):
925         (WebCore::PeerConnection00::setRemoteDescription):
926         (WebCore::PeerConnection00::localDescription):
927         (WebCore::PeerConnection00::remoteDescription):
928         (WebCore::PeerConnection00::startIce):
929         (WebCore::PeerConnection00::processIceMessage):
930         (WebCore::PeerConnection00::readyState):
931         (WebCore::PeerConnection00::iceState):
932         (WebCore::PeerConnection00::addStream):
933         (WebCore::PeerConnection00::removeStream):
934         (WebCore::PeerConnection00::localStreams):
935         (WebCore::PeerConnection00::remoteStreams):
936         (WebCore::PeerConnection00::close):
937         (WebCore::PeerConnection00::didGenerateIceCandidate):
938         (WebCore::PeerConnection00::didChangeReadyState):
939         (WebCore::PeerConnection00::didChangeIceState):
940         (WebCore::PeerConnection00::didAddRemoteStream):
941         (WebCore::PeerConnection00::didRemoveRemoteStream):
942         (WebCore::PeerConnection00::interfaceName):
943         (WebCore::PeerConnection00::scriptExecutionContext):
944         (WebCore::PeerConnection00::stop):
945         (WebCore::PeerConnection00::eventTargetData):
946         (WebCore::PeerConnection00::ensureEventTargetData):
947         (WebCore::PeerConnection00::changeReadyState):
948         (WebCore::PeerConnection00::changeIceState):
949         * Modules/mediastream/PeerConnection00.h: Added.
950         (WebCore):
951         (PeerConnection00):
952         (WebCore::PeerConnection00::refEventTarget):
953         (WebCore::PeerConnection00::derefEventTarget):
954         * Modules/mediastream/PeerConnection00.idl: Added.
955         * WebCore.gypi:
956         * bindings/generic/RuntimeEnabledFeatures.h:
957         (WebCore::RuntimeEnabledFeatures::webkitPeerConnection00Enabled):
958         * bindings/js/JSPeerConnection00Custom.cpp: Added.
959         (WebCore):
960         (WebCore::JSPeerConnection00Constructor::constructJSPeerConnection00):
961         * dom/EventTargetFactory.in:
962
963 2012-03-23  Adrienne Walker  <enne@google.com>
964
965         [chromium] Fix scrollbarLayerLostContext flaky test crash on 10.6
966         https://bugs.webkit.org/show_bug.cgi?id=82062
967
968         Reviewed by James Robinson.
969
970         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
971         (CCScrollbarLayerImpl):
972
973 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
974
975         [chromium] MediaStream API (JSEP): Extending WebMediaStreamCenter
976         https://bugs.webkit.org/show_bug.cgi?id=81924
977
978         Reviewed by Adam Barth.
979
980         Nothing to test, just moving methods.
981
982         * platform/mediastream/MediaStreamCenter.cpp:
983         (WebCore::MediaStreamCenter::constructSDP):
984         (WebCore):
985
986 2012-03-23  Sami Kyostila  <skyostil@chromium.org>
987
988         Reuse buffer allocation if canvas size does not change
989         https://bugs.webkit.org/show_bug.cgi?id=80871
990
991         Reviewed by Stephen White.
992
993         If the user changes the width or height attributes of a canvas element,
994         the contents of the canvas should be cleared and the context state
995         should be reset. This has become a common idiom to clear the canvas
996         "efficiently" at the start of a frame.
997
998         Previously, this code path triggered a full reallocation of the image
999         buffer backing the canvas, leading to reduced performance. This patch
1000         implements an optimization where we reuse the previous image buffer
1001         allocation if the size of the canvas did not change. Also, instead of
1002         clearing the canvas every time its dimensions are touched, we only clear
1003         if anything has been drawn into the canvas since it was previously
1004         cleared.
1005
1006         Note that for now this optimization only applies for 2D canvases,
1007         since it is not entirely clear how touching the dimensions of a WebGL
1008         canvas should work.
1009
1010         Test: fast/canvas/canvas-resize-after-paint-without-layout.html +
1011               existing layout tests for canvas resetting.
1012
1013         * html/HTMLCanvasElement.cpp:
1014         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
1015         (WebCore::HTMLCanvasElement::reset):
1016         (WebCore::HTMLCanvasElement::createImageBuffer): Save the initial
1017         graphics context state so we can restore it without creating a new
1018         context.
1019         (WebCore::HTMLCanvasElement::clearImageBuffer):
1020         (WebCore):
1021         (WebCore::HTMLCanvasElement::clearCopiedImage):
1022         * html/HTMLCanvasElement.h:
1023         (HTMLCanvasElement):
1024         * html/canvas/CanvasRenderingContext2D.cpp:
1025         (WebCore::CanvasRenderingContext2D::reset): No need to notify the
1026         compositor when the context is reset, because clearing the image buffer
1027         does the same thing. We can also skip the notification if we did not
1028         have an image buffer at the time of the reset, because the reset will
1029         not have any visual impact in this case. Finally, if the canvas size
1030         did change, the notification is also unnecessary because of the call
1031         to RenderObject::repaint() from HTMLCanvasElement::reset().
1032
1033 2012-03-22  Martin Robinson  <mrobinson@igalia.com>
1034
1035         Fix some code generation warnings on GTK+.
1036
1037         Reviewed by Gustavo Noronha Silva.
1038
1039         No new tests. This just fixes warnings.
1040
1041         * GNUmakefile.am: Remove nonexistent directories from the list IDL directories.
1042
1043 2012-03-23  Sheriff Bot  <webkit.review.bot@gmail.com>
1044
1045         Unreviewed, rolling out r111751.
1046         http://trac.webkit.org/changeset/111751
1047         https://bugs.webkit.org/show_bug.cgi?id=82060
1048
1049         caused 15% page cycler regression for chromium-linux
1050         (Requested by eae on #webkit).
1051
1052         * css/CSSStyleSelector.cpp:
1053         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1054
1055 2012-03-23  Kentaro Hara  <haraken@chromium.org>
1056
1057         Support [ImplementedAs] for attributes
1058         https://bugs.webkit.org/show_bug.cgi?id=81605
1059
1060         Reviewed by Adam Barth.
1061
1062         [ImplementedAs] just supports methods. [ImplementedAs] should support
1063         attributes too.
1064
1065         Explained here: https://trac.webkit.org/wiki/WebKitIDL#ImplementedAs
1066
1067         Test: bindings/scripts/test/TestObj.idl
1068
1069         * bindings/scripts/CodeGenerator.pm: Modified to support [ImplementedAs] for attributes.
1070         (AttributeNameForGetterAndSetter):
1071
1072         * bindings/scripts/test/TestObj.idl: Added a test case.
1073
1074         * bindings/scripts/test/CPP/WebDOMTestObj.cpp: Updated run-bindings-tests results.
1075         (WebDOMTestObj::strawberry):
1076         (WebDOMTestObj::setStrawberry):
1077         * bindings/scripts/test/CPP/WebDOMTestObj.h:
1078         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1079         (webkit_dom_test_obj_get_strawberry):
1080         (webkit_dom_test_obj_set_strawberry):
1081         (webkit_dom_test_obj_get_property):
1082         (webkit_dom_test_obj_class_init):
1083         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1084         * bindings/scripts/test/JS/JSTestObj.cpp:
1085         (WebCore):
1086         (WebCore::jsTestObjStrawberry):
1087         (WebCore::setJSTestObjStrawberry):
1088         * bindings/scripts/test/JS/JSTestObj.h:
1089         (WebCore):
1090         * bindings/scripts/test/ObjC/DOMTestObj.h:
1091         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1092         (-[DOMTestObj strawberry]):
1093         (-[DOMTestObj setStrawberry:]):
1094         * bindings/scripts/test/V8/V8TestObj.cpp:
1095         (WebCore::TestObjInternal::strawberryAttrGetter):
1096         (TestObjInternal):
1097         (WebCore::TestObjInternal::strawberryAttrSetter):
1098         (WebCore):
1099
1100 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
1101
1102         The JSC code generator doesn't generate correct code for Constructors
1103         https://bugs.webkit.org/show_bug.cgi?id=82046
1104
1105         Reviewed by Kentaro Hara.
1106
1107         The main bulk of generated code for constructors uses the name jsConstructor
1108         for the created object, and then calls GenerateParametersCheck which generates
1109         code that uses the name castedThis.
1110
1111         * bindings/scripts/CodeGeneratorJS.pm:
1112         (GenerateConstructorDefinition):
1113         * bindings/scripts/test/JS/JSTestInterface.cpp:
1114         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
1115         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1116         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
1117         * bindings/scripts/test/JS/JSTestObj.cpp:
1118         (WebCore::JSTestObjConstructor::finishCreation):
1119         (WebCore::JSTestObjConstructor::constructJSTestObj):
1120         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1121         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
1122         * bindings/scripts/test/TestObj.idl:
1123         * bindings/scripts/test/V8/V8TestObj.cpp:
1124         (WebCore::V8TestObj::constructorCallback):
1125
1126 2012-03-23  Tommy Widenflycht  <tommyw@google.com>
1127
1128         The JSC code generator can't handle boolean arguments for Callbacks
1129         https://bugs.webkit.org/show_bug.cgi?id=82045
1130
1131         Reviewed by Kentaro Hara.
1132
1133         CodeGeneratorJS.pm only handles DOMStrings and objects as arguments
1134         for a Callback, so I added support for boolean values as well.
1135
1136         * bindings/scripts/CodeGeneratorJS.pm:
1137         (GenerateCallbackImplementation):
1138         * bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
1139         (WebDOMTestCallback::callbackWithBoolean):
1140         * bindings/scripts/test/CPP/WebDOMTestCallback.h:
1141         (WebDOMTestCallback):
1142         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1143         (webkit_dom_test_callback_callback_with_boolean):
1144         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
1145         * bindings/scripts/test/JS/JSTestCallback.cpp:
1146         (WebCore::JSTestCallback::callbackWithBoolean):
1147         (WebCore):
1148         * bindings/scripts/test/JS/JSTestCallback.h:
1149         (JSTestCallback):
1150         * bindings/scripts/test/ObjC/DOMTestCallback.h:
1151         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
1152         (-[DOMTestCallback callbackWithBoolean:]):
1153         * bindings/scripts/test/TestCallback.idl:
1154         * bindings/scripts/test/V8/V8TestCallback.cpp:
1155         (WebCore::V8TestCallback::callbackWithBoolean):
1156         (WebCore):
1157         * bindings/scripts/test/V8/V8TestCallback.h:
1158         (V8TestCallback):
1159
1160 2012-03-23  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1161
1162         Touch adjustment forgets some subtarget quads.
1163         https://bugs.webkit.org/show_bug.cgi?id=82044
1164
1165         Reviewed by Kenneth Rohde Christiansen.
1166
1167         Do not uncritically skip all nodes that are ancestors to other test results.
1168         Instead return the inner-most element if multiple nodes have the same distance.
1169
1170         Test: touchadjustment/block-testing.html
1171
1172         * page/TouchAdjustment.cpp:
1173         (WebCore::TouchAdjustment::compileSubtargetList):
1174         (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
1175
1176 2012-03-23  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
1177
1178         TouchAdjustment does not correct for frame position
1179         https://bugs.webkit.org/show_bug.cgi?id=82043
1180
1181         Reviewed by Kenneth Rohde Christiansen.
1182
1183         Convert geometry to window coordinates before calculating distance.
1184
1185         Test: touchadjustment/iframe.html
1186
1187         * page/TouchAdjustment.cpp:
1188         (WebCore::TouchAdjustment::distanceSquaredToTargetCenterLine):
1189
1190 2012-03-23  Vlad Voicu  <vladv@rosedu.org>
1191
1192         Fixed minor WebInspector display issue
1193         Clicking on disabled sections in Styles Sidebar Pane creates new elements.
1194         https://bugs.webkit.org/show_bug.cgi?id=81925
1195
1196         Reviewed by Timothy Hatcher
1197
1198         No new tests should be required.
1199
1200         * inspector/front-end/StylesSidebarPane.js:
1201         (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick):
1202         (WebInspector.StylePropertyTreeElement.prototype):
1203
1204 2012-03-23  Kentaro Hara  <haraken@chromium.org>
1205
1206         Unreviewed, rebaselined run-bindings-tests results.
1207
1208         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
1209         * bindings/scripts/test/CPP/WebDOMTestObj.h:
1210         * bindings/scripts/test/JS/JSTestObj.cpp:
1211         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackArg):
1212         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
1213         (WebCore::jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg):
1214         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod5):
1215         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
1216         * bindings/scripts/test/V8/V8TestObj.cpp:
1217         (WebCore::TestObjInternal::methodWithCallbackArgCallback):
1218         (WebCore::TestObjInternal::methodWithNonCallbackArgAndCallbackArgCallback):
1219         (WebCore::TestObjInternal::methodWithCallbackAndOptionalArgCallback):
1220         (WebCore::TestObjInternal::overloadedMethod5Callback):
1221         (WebCore::TestObjInternal::overloadedMethodCallback):
1222
1223 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
1224
1225         cssText should use StringBuilder
1226         https://bugs.webkit.org/show_bug.cgi?id=82028
1227
1228         Reviewed by Hajime Morita.
1229
1230         Make StylePropertySet::asText more efficient by deploying StringBuilder;
1231         avoids heap churn by String::operator+ and String::operator+=.
1232
1233         * css/StylePropertySet.cpp:
1234         (WebCore::StylePropertySet::asText):
1235
1236 2012-03-23  Ryosuke Niwa  <rniwa@webkit.org>
1237
1238         REGRESSION(r111754): plugins/reloadplugins-and-pages.html fails on all platforms
1239         https://bugs.webkit.org/show_bug.cgi?id=82035
1240
1241         Rollout r111754 since it caused a test to fail and the test added by the patch
1242         is failing on Mac WebKit 2.
1243
1244         * WebCore.exp.in:
1245         * html/HTMLPlugInElement.cpp:
1246         (WebCore::HTMLPlugInElement::detach):
1247         (WebCore):
1248         (WebCore::HTMLPlugInElement::removedFromDocument):
1249         * html/HTMLPlugInElement.h:
1250         (HTMLPlugInElement):
1251         * testing/Internals.cpp:
1252         * testing/Internals.h:
1253         (Internals):
1254         * testing/Internals.idl:
1255
1256 2012-03-23  Adam Barth  <abarth@webkit.org>
1257
1258         Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 2)
1259         https://bugs.webkit.org/show_bug.cgi?id=82026
1260
1261         Reviewed by Kentaro Hara.
1262
1263         This patch removes DOMWindow::resetNotifications, which was unneeded
1264         special-case logic for clearing the notifications center.  The previous
1265         patch that tried to accomplish the same thing did not override
1266         willDetachPage, which is why it caused crashes.
1267
1268         There's actually a cleaner way to handle these cases, which will let us
1269         implement reconnectFrame, but that will need to wait for the next
1270         patch.
1271
1272         * notifications/DOMWindowNotifications.cpp:
1273         (WebCore::DOMWindowNotifications::DOMWindowNotifications):
1274         (WebCore::DOMWindowNotifications::from):
1275         (WebCore::DOMWindowNotifications::webkitNotifications):
1276         (WebCore):
1277         (WebCore::DOMWindowNotifications::disconnectFrame):
1278         (WebCore::DOMWindowNotifications::willDetachPage):
1279         (WebCore::DOMWindowNotifications::reset):
1280         * notifications/DOMWindowNotifications.h:
1281         (DOMWindowNotifications):
1282         * page/DOMWindow.cpp:
1283         (WebCore::DOMWindow::willDetachPage):
1284         (WebCore::DOMWindow::disconnectDOMWindowProperties):
1285         (WebCore::DOMWindow::clearDOMWindowProperties):
1286         * page/DOMWindow.h:
1287         (DOMWindow):
1288         * page/Frame.cpp:
1289         (WebCore::Frame::willDetachPage):
1290
1291 2012-03-22  Adam Barth  <abarth@webkit.org>
1292
1293         Move Notifications APIs from DOMWindow.idl to DOMWindowNotifications.idl (Part 1)
1294         https://bugs.webkit.org/show_bug.cgi?id=82015
1295
1296         Reviewed by Kentaro Hara.
1297
1298         This patch moves DOMWindow.webkitNotifications from DOMWindow.idl to
1299         DOMWindowNotificiations.idl in preparation for moving notificiations
1300         into Modules.
1301
1302         A future patch will remove DOMWindow::resetNotificaitions in favor of
1303         more general mechanisms.
1304
1305         * CMakeLists.txt:
1306         * DerivedSources.make:
1307         * DerivedSources.pri:
1308         * GNUmakefile.list.am:
1309         * Target.pri:
1310         * WebCore.gypi:
1311         * WebCore.vcproj/WebCore.vcproj:
1312         * WebCore.xcodeproj/project.pbxproj:
1313         * notifications/DOMWindowNotifications.cpp: Added.
1314         (WebCore):
1315         (WebCore::DOMWindowNotifications::DOMWindowNotifications):
1316         (WebCore::DOMWindowNotifications::~DOMWindowNotifications):
1317         (WebCore::DOMWindowNotifications::from):
1318         (WebCore::DOMWindowNotifications::webkitNotifications):
1319         (WebCore::DOMWindowNotifications::reset):
1320         (WebCore::DOMWindowNotifications::supplementName):
1321         * notifications/DOMWindowNotifications.h: Added.
1322         (WebCore):
1323         (DOMWindowNotifications):
1324         * notifications/DOMWindowNotifications.idl: Added.
1325         * page/DOMWindow.cpp:
1326         (WebCore::DOMWindow::~DOMWindow):
1327         (WebCore):
1328         (WebCore::DOMWindow::resetNotifications):
1329         * page/DOMWindow.h:
1330         (WebCore):
1331         (DOMWindow):
1332         * page/DOMWindow.idl:
1333
1334 2012-03-22  Li Yin  <li.yin@intel.com>
1335
1336         A client MUST close a connection if it detects a masked frame
1337         https://bugs.webkit.org/show_bug.cgi?id=81361
1338
1339         Reviewed by Kent Tamura.
1340
1341         A server must not mask any frames that it sends to the client.
1342         Change the test case, not mask the frames from server to client.
1343         
1344         Test: http/tests/websocket/tests/hybi/invalid-masked-frames-from-server.html
1345
1346         * Modules/websockets/WebSocketChannel.cpp:
1347         (WebCore::WebSocketChannel::processFrame):
1348
1349 2012-03-22  Li Yin  <li.yin@intel.com>
1350
1351         [WebSocket]The minimal number of bytes MUST be used to encode the length
1352         https://bugs.webkit.org/show_bug.cgi?id=81443
1353
1354         Reviewed by Kent Tamura.
1355
1356         From RFC 6455 http://tools.ietf.org/html/rfc6455#section-5.2
1357         the minimal number of bytes MUST be used to encode the length
1358         
1359         New test case : http/tests/websocket/tests/hybi/invalid-encode-length.html
1360
1361         * Modules/websockets/WebSocketChannel.cpp:
1362         (WebCore::WebSocketChannel::parseFrame):
1363
1364 2012-03-22  Adam Barth  <abarth@webkit.org>
1365
1366         Unreviewed.  Sort xcodeproj file.
1367
1368         * WebCore.xcodeproj/project.pbxproj:
1369
1370 2012-03-22  Mao Yujie  <yujie.mao@intel.com>
1371
1372         Implement strict testing criterion for callback function definition
1373         https://bugs.webkit.org/show_bug.cgi?id=80005
1374
1375         Reviewed by Adam Barth.
1376
1377         Callback function should be defined as the function type instead of
1378         the object type.
1379
1380         LayoutTest: fast/dom/MediaStream/argument-types.html
1381
1382         * bindings/scripts/CodeGeneratorJS.pm:
1383         (GenerateParametersCheckExpression):
1384         (GenerateParametersCheck):
1385         * bindings/scripts/CodeGeneratorV8.pm:
1386         (GenerateParametersCheckExpression):
1387         (GenerateParametersCheck):
1388
1389 2012-03-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1390
1391         Convert hasGrammarMarker to use Internals interface
1392         https://bugs.webkit.org/show_bug.cgi?id=82004
1393
1394         Reviewed by Ryosuke Niwa.
1395
1396         Remove hasGrammarMarker functions, because it is able to work in the
1397         cross-port way through the Internals interface.
1398
1399         No new tests, since we are improving here the infra-structure
1400         for testing a specific method.
1401
1402         * testing/Internals.cpp:
1403         (WebCore::Internals::hasGrammarMarker):
1404         (WebCore):
1405         * testing/Internals.h:
1406         (Internals):
1407         * testing/Internals.idl:
1408
1409 2012-03-22  Xingnan Wang  <xingnan.wang@intel.com>
1410
1411         Add exception for the setter of "fftSize" in RealtimeAnalyserNode
1412         https://bugs.webkit.org/show_bug.cgi?id=81748
1413
1414         Reviewed by Chris Rogers.
1415
1416         * Modules/webaudio/RealtimeAnalyser.cpp:
1417         (WebCore::RealtimeAnalyser::setFftSize):
1418         * Modules/webaudio/RealtimeAnalyser.h:
1419         (RealtimeAnalyser):
1420         * Modules/webaudio/RealtimeAnalyserNode.cpp:
1421         (WebCore::RealtimeAnalyserNode::setFftSize):
1422         (WebCore):
1423         * Modules/webaudio/RealtimeAnalyserNode.h:
1424         (RealtimeAnalyserNode):
1425         * Modules/webaudio/RealtimeAnalyserNode.idl:
1426
1427 2012-03-22  Leo Yang  <leo.yang@torchmobile.com.cn>
1428
1429         [BlackBerry] Add HistoryItemViewState for BlackBerry port
1430         https://bugs.webkit.org/show_bug.cgi?id=81867
1431
1432         Reviewed by Rob Buis.
1433
1434         HistoryItemViewState is the blackberry specific field of HistoryItem.
1435         It's used to maintain the porting specific view state.
1436
1437         No new test because the port can't be built yet.
1438
1439         * history/HistoryItem.h:
1440         (HistoryItem):
1441         (WebCore::HistoryItem::viewState):
1442
1443 2012-03-22  SravanKumar Sandela  <ssandela@innominds.com>
1444
1445         Fieldset unexpectedly stretches to minimum intrinsic width
1446         https://bugs.webkit.org/show_bug.cgi?id=79128
1447
1448         Reviewed by Julien Chaffraix.
1449
1450         Fieldset element width will now check if css width is specified explicitly
1451         before stretching to minimum intrinsic width. The reference
1452         can be taken from IE9, instead of FF(FF acknowledged the broken behavior). 
1453
1454         Tests: fast/forms/fieldset-width-nostretch-ifspecified-expected.html
1455                fast/forms/fieldset-width-nostretch-ifspecified.html
1456
1457         * rendering/RenderFieldset.cpp:
1458         (WebCore::RenderFieldset::stretchesToMinIntrinsicLogicalWidth):
1459         (WebCore):
1460         * rendering/RenderFieldset.h:
1461         (RenderFieldset):
1462
1463 2012-03-22  Shawn Singh  <shawnsingh@chromium.org>
1464
1465         [chromium] Target surface should be damaged for a new layers even when layer had no changes
1466         https://bugs.webkit.org/show_bug.cgi?id=81879
1467
1468         Reviewed by Adrienne Walker.
1469
1470         Unit test added to CCDamageTrackerTest.
1471
1472         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
1473         (WebCore::CCDamageTracker::removeRectFromCurrentFrame): added a
1474         boolean arg to detect if the layer is new on this update.
1475
1476         (WebCore::CCDamageTracker::extendDamageForLayer): added logic that
1477         damages the target surface if the layer is new.
1478
1479         (WebCore::CCDamageTracker::extendDamageForRenderSurface): added
1480         logic that damages the target surface if the descendant surface is
1481         new; similar logic for the surface's replica if the replica is new.
1482
1483         * platform/graphics/chromium/cc/CCDamageTracker.h:
1484         (CCDamageTracker):
1485
1486 2012-03-22  Charles Wei  <charles.wei@torchmobile.com.cn>
1487
1488         [BlackBerry] Need to store the meta info of a page in the ViewState of the history
1489         https://bugs.webkit.org/show_bug.cgi?id=82000
1490
1491         Reviewed by Rob Buis.
1492
1493         Internally reviewed by George Staikos.
1494
1495         No new tests, BlackBerry porting doesn't build yet upstreaming.
1496
1497         * history/blackberry/HistoryItemViewState.h:
1498         (WebCore::HistoryItemViewState::HistoryItemViewState):
1499         (HistoryItemViewState):
1500
1501 2012-03-22  Adam Klein  <adamk@chromium.org>
1502
1503         [v8] wrapSlow methods should ref underlying object before creating wrapper
1504         https://bugs.webkit.org/show_bug.cgi?id=81919
1505
1506         Reviewed by Adam Barth.
1507
1508         Because instatiating the wrapper can trigger GC, it's important that
1509         wrapSlow() hold a reference to an object when creating a wrapper for
1510         that object. Once the V8 wrapper exists and is associated with the object,
1511         the reference can be handed off (via leakRef) to be handled by the normal
1512         binding code logic (where derefObject is called if the handle is GCed).
1513
1514         Binding tests have been updated to reflect this change.
1515
1516         Testing the change directly is hard. Any test landed today would only
1517         be a valid test until V8's logic about when to GC changes, at which point
1518         it would become dead weight. So I don't think it's worth landing a
1519         layout test along with this.
1520
1521         * bindings/scripts/CodeGeneratorV8.pm:
1522         (GenerateHeader): Make wrapSlow take a PassRefPtr for RefCounted objects.
1523         (GenerateToV8Converters): Get rid of the explicit call to ref() and
1524         instead call leakRef() when adding a RefCounted object to the DOM map.
1525         (GetPassRefPtrType): Helper to generate "PassRefPtr<T>", or "PassRefPtr<T<U> >" as appropriate.
1526         * bindings/scripts/test/V8/V8Float64Array.cpp:
1527         (WebCore::V8Float64Array::wrapSlow):
1528         * bindings/scripts/test/V8/V8Float64Array.h:
1529         (V8Float64Array):
1530         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1531         (WebCore::V8TestActiveDOMObject::wrapSlow):
1532         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
1533         (V8TestActiveDOMObject):
1534         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1535         (WebCore::V8TestCustomNamedGetter::wrapSlow):
1536         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1537         (V8TestCustomNamedGetter):
1538         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1539         (WebCore::V8TestEventConstructor::wrapSlow):
1540         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1541         (V8TestEventConstructor):
1542         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1543         (WebCore::V8TestEventTarget::wrapSlow):
1544         * bindings/scripts/test/V8/V8TestEventTarget.h:
1545         (V8TestEventTarget):
1546         * bindings/scripts/test/V8/V8TestInterface.cpp:
1547         (WebCore::V8TestInterface::wrapSlow):
1548         * bindings/scripts/test/V8/V8TestInterface.h:
1549         (V8TestInterface):
1550         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1551         (WebCore::V8TestMediaQueryListListener::wrapSlow):
1552         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1553         (V8TestMediaQueryListListener):
1554         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1555         (WebCore::V8TestNamedConstructor::wrapSlow):
1556         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1557         (V8TestNamedConstructor):
1558         * bindings/scripts/test/V8/V8TestObj.cpp:
1559         (WebCore::V8TestObj::wrapSlow):
1560         * bindings/scripts/test/V8/V8TestObj.h:
1561         (V8TestObj):
1562         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1563         (WebCore::V8TestSerializedScriptValueInterface::wrapSlow):
1564         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1565         (V8TestSerializedScriptValueInterface):
1566
1567 2012-03-22  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1568
1569         [BlackBerry] add interface clearCredentials() and clearNeverRememberSites()
1570         https://bugs.webkit.org/show_bug.cgi?id=81887
1571
1572         Reviewed by Rob Buis.
1573
1574         Fixed SQL issue when clearing table logins and table never_remember.
1575
1576         No new tests.
1577
1578         * platform/network/blackberry/CredentialBackingStore.cpp:
1579         (WebCore::CredentialBackingStore::clearLogins):
1580         (WebCore::CredentialBackingStore::clearNeverRemember):
1581
1582 2012-03-22  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
1583
1584         [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
1585         https://bugs.webkit.org/show_bug.cgi?id=80135
1586
1587         Reviewed by Rob Buis.
1588
1589         Modified the interface function authenticationChallenge() in class
1590         PageClientBlackBerry, moved Credential from return value to the
1591         function's reference parameter, and returned a bool to indicate if
1592         user pressed Ok button or not.
1593         Removed the logic which checks m_currentWebChallenge not null,
1594         because we should challenge user again if the last provided credential
1595         is not valid; also added the logic that will popup challenge
1596         dialog again immediately if user press Ok buttton directly without
1597         inputting anything.
1598
1599         No new tests.
1600
1601         * platform/blackberry/PageClientBlackBerry.h:
1602         * platform/network/blackberry/NetworkJob.cpp:
1603         (WebCore::NetworkJob::handleAuthHeader):
1604         (WebCore::NetworkJob::sendRequestWithCredentials):
1605
1606 2012-03-22  Jason Liu  <jason.liu@torchmobile.com.cn>
1607
1608         [BlackBerry] Synchronize platform/network/blackberry
1609         https://bugs.webkit.org/show_bug.cgi?id=81874
1610
1611         We changed a lot in these files locally. But the changes are not upstreamed.
1612         It is not convenient to do the other upstreaming work based on these differences.
1613         So upstream these changes.
1614
1615         Reviewed by Rob Buis.
1616
1617         No new tests. Just synchronize codes.
1618
1619         * platform/network/blackberry/NetworkJob.cpp:
1620         (WebCore::NetworkJob::NetworkJob):
1621         (WebCore::NetworkJob::initialize):
1622         (WebCore::NetworkJob::handleNotifyHeaderReceived):
1623         (WebCore::NetworkJob::handleNotifyDataReceived):
1624         (WebCore::NetworkJob::sendResponseIfNeeded):
1625         (WebCore::NetworkJob::sendRequestWithCredentials):
1626         (WebCore::NetworkJob::handleAbout):
1627         * platform/network/blackberry/NetworkJob.h:
1628         (WebCore::NetworkJob::isError):
1629         (NetworkJob):
1630         * platform/network/blackberry/NetworkManager.cpp:
1631         (WebCore::NetworkManager::startJob):
1632         * platform/network/blackberry/ResourceRequest.h:
1633         (WebCore::ResourceRequest::ResourceRequest):
1634         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
1635         (WebCore::platformTargetTypeForRequest):
1636
1637 2012-03-22  Tom Sepez  <tsepez@chromium.org>
1638
1639         XSS Auditor bypass via script tag src=data:, URLS.
1640         https://bugs.webkit.org/show_bug.cgi?id=81948
1641
1642         Reviewed by Adam Barth.
1643
1644         This change fixes an XSSAuditor bypass wherby a script with a data: URL src
1645         attribute could evade detection by using characters from the page to create
1646         a snippet for matching not found in the URL's reflected vector.  This change 
1647         terminates the snippet for matching earlier in these cases.
1648         
1649         Test: http/tests/security/xssAuditor/script-tag-with-source-data-url2.html
1650
1651         * html/parser/XSSAuditor.cpp:
1652         (WebCore::XSSAuditor::decodedSnippetForAttribute):
1653
1654 2012-03-22  Dana Jansens  <danakj@chromium.org>
1655
1656         [chromium] Incorrect assert on animating opacity for a surface
1657         https://bugs.webkit.org/show_bug.cgi?id=81994
1658
1659         Reviewed by Adrienne Walker.
1660
1661         Draw opacity and animation state match on the surface itself. A
1662         surface with animating opacity always has an owning layer without
1663         animation, as the surface does the animation for it.
1664
1665         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1666         (WebCore::CCLayerTreeHost::paintLayerContents):
1667
1668 2012-03-22  Dana Jansens  <danakj@chromium.org>
1669
1670         [chromium] Skip frames when checkerboarding an animation
1671         https://bugs.webkit.org/show_bug.cgi?id=81716
1672
1673         Reviewed by Adrienne Walker.
1674
1675         This will stop drawing frames when prepareToDraw fails, if the draw is
1676         not forced. The expected behaviour is outlined below by the unit tests.
1677
1678         When a draw fails, we:
1679         1. Set m_needsRedraw to try again next vsync
1680         2. Set m_needsCommit because we need more data from webkit to succeed
1681         3. Set m_drawIfPossibleFailed. This allows us to try draw again within
1682         the same vsync *if* a commit finishes during this time.
1683
1684         Unit test: CCSchedulerTest.RequestRedrawInsideFailedDraw
1685                    CCSchedulerTest.RequestCommitInsideFailedDraw
1686                    CCSchedulerTest.NoBeginFrameWhenDrawFails
1687                    CCSchedulerStateMachineTest.TestFailedDrawSetsNeedsCommitAndDoesNotDrawAgain
1688                    CCSchedulerStateMachineTest.TestSetNeedsRedrawDuringFailedDrawDoesNotRemoveNeedsRedraw
1689                    CCSchedulerStateMachineTest.TestCommitAfterFailedDrawAllowsDrawInSameFrame
1690                    CCSchedulerStateMachineTest.TestCommitAfterFailedAndSuccessfulDrawDoesNotAllowDrawInSameFrame
1691                    CCSchedulerStateMachineTest.TestFailedDrawIsRetriedNextVSync
1692
1693         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1694         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1695         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
1696         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1697         (CCLayerTreeHostImpl):
1698         * platform/graphics/chromium/cc/CCScheduler.cpp:
1699         (WebCore::CCScheduler::processScheduledActions):
1700         * platform/graphics/chromium/cc/CCScheduler.h:
1701         (CCSchedulerClient):
1702         * platform/graphics/chromium/cc/CCSchedulerStateMachine.cpp:
1703         (WebCore::CCSchedulerStateMachine::CCSchedulerStateMachine):
1704         (WebCore::CCSchedulerStateMachine::nextAction):
1705         (WebCore::CCSchedulerStateMachine::updateState):
1706         (WebCore::CCSchedulerStateMachine::didDrawIfPossibleCompleted):
1707         (WebCore):
1708         * platform/graphics/chromium/cc/CCSchedulerStateMachine.h:
1709         (CCSchedulerStateMachine):
1710         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1711         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
1712         (WebCore):
1713         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapIfPossible):
1714         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapForced):
1715         * platform/graphics/chromium/cc/CCThreadProxy.h:
1716         (CCThreadProxy):
1717
1718 2012-03-22  W. James MacLean  <wjmaclean@chromium.org>
1719
1720         [chromium] Force update of nonFastScrollableRegion if target CCLayerImpl has been freshly created.
1721         https://bugs.webkit.org/show_bug.cgi?id=81968
1722
1723         Reviewed by Adrienne Walker.
1724
1725         Added unit test to existing tests for TreeSynchronizer.
1726
1727         When creating a new CCLayerImpl during tree synchronization, make sure we transfer the nonFastScrollableRegion as
1728         the new CCLayerImpl will default to an empty region.
1729
1730         * platform/graphics/chromium/LayerChromium.h:
1731         (WebCore::LayerChromium::nonFastScrollableRegion):
1732         (WebCore::LayerChromium::setNonFastScrollableRegionChanged):
1733         * platform/graphics/chromium/TreeSynchronizer.cpp:
1734         (WebCore::TreeSynchronizer::reuseOrCreateCCLayerImpl):
1735
1736 2012-03-22  Raphael Kubo da Costa  <rakuco@FreeBSD.org>
1737
1738         [CMake] Unreviewed build fix after r111778.
1739
1740         * CMakeLists.txt: Replace ${JAVASCRIPTCORE_DIR}/wtf includes with
1741         ${WTF_DIR}/wtf ones.
1742
1743 2012-03-22  Tony Chang  <tony@chromium.org>
1744
1745         Unreviewed, fix chromium build after wtf move.
1746
1747         Only use newwtf, remove references to wtf.
1748
1749         * WebCore.gyp/WebCore.gyp:
1750
1751 2012-03-22  Benjamin Poulain  <bpoulain@apple.com>
1752
1753         Remove an obsolete comment regarding magic frames from Geolocation
1754         https://bugs.webkit.org/show_bug.cgi?id=81871
1755
1756         Reviewed by Alexey Proskuryakov.
1757
1758         Moving a frame into another document is no longer possible after r111361. The comment
1759         is now irrelevant.
1760
1761         * Modules/geolocation/Geolocation.cpp:
1762         (WebCore::Geolocation::stop):
1763
1764 2012-03-22  Csaba Osztrogonác  <ossy@webkit.org>
1765
1766         Actually move WTF files to their new home
1767         https://bugs.webkit.org/show_bug.cgi?id=81844
1768
1769         [Qt] Unreviewed buildfix after r111778.
1770
1771         * Target.pri:
1772
1773 2012-03-22  Kentaro Hara  <haraken@chromium.org>
1774
1775         run-bindings-tests output a lot of errors in TestSerializedScriptValueInterface.idl
1776         https://bugs.webkit.org/show_bug.cgi?id=81852
1777
1778         Reviewed by Adam Barth.
1779
1780         run-bindings-tests output a lot of errors in TestSerializedScriptValueInterface.idl:
1781
1782         Use of uninitialized value in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2743.
1783         Use of uninitialized value $name in substitution (s///) at WebCore/bindings/scripts/CodeGenerator.pm line 119.
1784         Use of uninitialized value $type in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2969.
1785         Use of uninitialized value $type in string eq at WebCore/bindings/scripts/CodeGeneratorJS.pm line 2972.
1786         Use of uninitialized value $type in hash element at WebCore/bindings/scripts/CodeGenerator.pm line 367.
1787         Use of uninitialized value $type in hash element at WebCore/bindings/scripts/CodeGenerator.pm line 368.
1788         ...
1789
1790         This is because [Constructor(...)] does not yet support [Optional] arguments.
1791         It just supports [Optional=DefaultIsUndefined] and [Optional=DefaultIsNullString] arguments:
1792         https://trac.webkit.org/wiki/WebKitIDL#Constructor
1793
1794         This patch replaces [Optional] with [Optional=DefaultIsUndefined]
1795         in TestSerializedScriptValueInterface.idl.
1796
1797         Test: bindings/scripts/test/TestSerializedScriptValueInterface.idl
1798
1799         * bindings/scripts/CodeGeneratorJS.pm:
1800         (GenerateConstructorDefinition):
1801         * bindings/scripts/CodeGeneratorV8.pm:
1802         (GenerateConstructorCallback):
1803         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1804         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
1805         * bindings/scripts/test/TestSerializedScriptValueInterface.idl:
1806         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1807         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
1808
1809 2012-03-22  Michal Mocny  <mmocny@google.com>
1810
1811         [chromium] LayerRendererChromium should use GpuMemoryAllocationChanged callback to explicitly manage framebuffer.
1812         https://bugs.webkit.org/show_bug.cgi?id=81823
1813
1814         Reviewed by Adrienne Walker.
1815
1816         New UnitTests: LayerRendererChromiumTest
1817
1818         * platform/graphics/chromium/LayerRendererChromium.cpp:
1819         (LayerRendererGpuMemoryAllocationChangedCallbackAdapter):
1820         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::create):
1821         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::~LayerRendererGpuMemoryAllocationChangedCallbackAdapter):
1822         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::onGpuMemoryAllocationChanged):
1823         (WebCore::LayerRendererGpuMemoryAllocationChangedCallbackAdapter::LayerRendererGpuMemoryAllocationChangedCallbackAdapter):
1824         (WebCore):
1825         (WebCore::LayerRendererChromium::LayerRendererChromium):
1826         (WebCore::LayerRendererChromium::initialize):
1827         (WebCore::LayerRendererChromium::~LayerRendererChromium):
1828         (WebCore::LayerRendererChromium::setVisible):
1829         (WebCore::LayerRendererChromium::swapBuffers):
1830         (WebCore::LayerRendererChromium::discardFramebuffer):
1831         (WebCore::LayerRendererChromium::ensureFramebuffer):
1832         * platform/graphics/chromium/LayerRendererChromium.h:
1833         (WebCore):
1834         (LayerRendererChromiumClient):
1835         (LayerRendererChromium):
1836         (WebCore::LayerRendererChromium::isFramebufferDiscarded):
1837         (ScopedEnsureFramebufferAllocation):
1838         (WebCore::ScopedEnsureFramebufferAllocation::ScopedEnsureFramebufferAllocation):
1839         (WebCore::ScopedEnsureFramebufferAllocation::~ScopedEnsureFramebufferAllocation):
1840         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1841         (WebCore::LayerRendererCapabilities::LayerRendererCapabilities):
1842         (LayerRendererCapabilities):
1843         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1844         (WebCore::CCLayerTreeHostImpl::setVisible):
1845         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1846         (CCLayerTreeHostImpl):
1847         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1848         (WebCore::CCSingleThreadProxy::compositeAndReadback):
1849         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1850         (WebCore::CCThreadProxy::compositeAndReadback):
1851
1852 2012-03-22  Adam Barth  <abarth@webkit.org>
1853
1854         ContainerNode::insertedIntoTree and removedFromTree use weak iteration patterns
1855         https://bugs.webkit.org/show_bug.cgi?id=80570
1856
1857         Reviewed by Ryosuke Niwa.
1858
1859         These functions use weak iteration patterns, but as far as I can tell,
1860         we never execute script below these functions.  This patch adds ASSERTs
1861         to help us avoid adding events in the future.
1862
1863         * dom/ContainerNode.cpp:
1864         (WebCore::ContainerNode::insertedIntoTree):
1865         (WebCore::ContainerNode::removedFromTree):
1866         * html/HTMLMediaElement.cpp:
1867         (WebCore::HTMLMediaElement::loadInternal):
1868             - There's a somewhat complex call chain from insertedIntoTree into
1869               HTMLMediaElement, and somewhat complex control flow below
1870               loadInternal that eventually leads to the BeforeLoad event being
1871               fired.  In studying this code, I don't see a way for the
1872               BeforeLoad event to be fired during insertedIntoTree, but I've
1873               added this assert here to make sure we don't call loadInternal
1874               when we're not supposed to dispatch events.  This ASSERT should
1875               help us catch these BeforeLoad errors more quickly.
1876
1877 2012-03-22  Raphael Kubo da Costa  <rakuco@FreeBSD.org>
1878
1879         Crash in fast/dom/navigator-detached-nocrash.html
1880         https://bugs.webkit.org/show_bug.cgi?id=81773
1881
1882         Reviewed by Adam Barth.
1883
1884         BatteryManager::create() blindly assumes the Navigator* it
1885         receives has a valid Frame, which is not always the case, as made
1886         evident by the crashing test.
1887
1888         Follow abarth's suggestion and just stop
1889         NavigatorBattery::webkitBattery() before it reaches the call to
1890         BatteryManager::create() if that's the case.
1891
1892         No new tests, covered by fast/dom/navigator-detached-nocrash.html.
1893
1894         * Modules/battery/NavigatorBattery.cpp:
1895         (WebCore::NavigatorBattery::webkitBattery):
1896
1897 2012-03-22  Emil A Eklund  <eae@chromium.org>
1898
1899         Unreviewed, add missing include statement for CSSValueList.h.
1900
1901         * css/CSSStyleSelector.h:
1902
1903 2012-03-22  Tony Chang  <tony@chromium.org>
1904
1905         flexbox flexing implementation should match the spec
1906         https://bugs.webkit.org/show_bug.cgi?id=70796
1907
1908         Reviewed by Ojan Vafai.
1909
1910         Match the algorithm in the spec. Handling min/max constraints are slightly improved.
1911         http://dev.w3.org/csswg/css3-flexbox/#resolve-the-flexible-lengths
1912
1913         New test cases in css3/flexbox/flex-algorithm-min-max.html.
1914
1915         * rendering/RenderFlexibleBox.cpp:
1916         (WebCore::adjustFlexSizeForMinAndMax): Step 5 of resolving flexible lengths.
1917         (WebCore):
1918         (WebCore::RenderFlexibleBox::Violation::Violation):
1919         (RenderFlexibleBox::Violation):
1920         (WebCore::RenderFlexibleBox::freezeViolations): Used by step 6.
1921         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
1922         * rendering/RenderFlexibleBox.h:
1923
1924 2012-03-22  Emil A Eklund  <eae@chromium.org>
1925
1926         Unreviewed, add missing import.
1927
1928         * rendering/RenderThemeMac.mm:
1929
1930 2012-03-22  Anders Carlsson  <andersca@apple.com>
1931
1932         ASSERT(!needsLayout) in RenderView.cpp when visiting http://www.panic.com/blog/
1933         https://bugs.webkit.org/show_bug.cgi?id=81953
1934         <rdar://problem/11086998>
1935
1936         Reviewed by Sam Weinig.
1937
1938         If a page ends up creating CATiledLayers, CA transactions can be committed outside of the normal
1939         CA run loop observer, so we can't call setNeedsDisplay on tile cache layers directly because then
1940         we'll end up calling into painting code before all the layers have been flushed.
1941
1942         Fix this by adding a list of dirty rects to platformCALayerDidCreateTiles and change GraphicsLayerCA to
1943         mark them as dirty. This ensures that any CA transaction commits won't cause newly added layers to be painted.
1944
1945         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1946         (WebCore::LayerClient::platformCALayerDidCreateTiles):
1947         * platform/graphics/ca/GraphicsLayerCA.cpp:
1948         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
1949         * platform/graphics/ca/GraphicsLayerCA.h:
1950         (GraphicsLayerCA):
1951         * platform/graphics/ca/PlatformCALayerClient.h:
1952         (PlatformCALayerClient):
1953         * platform/graphics/ca/mac/TileCache.mm:
1954         (WebCore::TileCache::setScale):
1955         (WebCore::TileCache::revalidateTiles):
1956         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1957         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::LayerClient::platformCALayerDidCreateTiles):
1958
1959 2012-03-19  Robert Hogan  <robert@webkit.org>
1960
1961         Text should overflow when list item height set to 0
1962         https://bugs.webkit.org/show_bug.cgi?id=78726
1963
1964         Reviewed by Julien Chaffraix.
1965
1966         Tests: css2.1/20110323/height-applies-to-010a-expected.html
1967                fast/css/heightless-list-item-expected.html
1968                fast/css/heightless-list-item.html
1969
1970         * rendering/RenderListItem.cpp:
1971         (WebCore::RenderListItem::paint):
1972            If the list item has height:0, only paint it if the list item allows any block or inline content 
1973            to overflow unclipped. The zero-height check is a shortcut to avoid unnecessary painting and 
1974            this seems to be the only case where there's something to do.
1975
1976 2012-03-22  Dave Michael  <dmichael@chromium.org>
1977
1978         HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called
1979         https://bugs.webkit.org/show_bug.cgi?id=80428
1980
1981         Reviewed by Eric Seidel.
1982
1983         Make HTMLPluginElement release its m_NPObject in detach() to break a
1984         reference-counting cycle that happens on reload or navigation. With this
1985         change, HTMLPlugInElement::removedFromDocument is unnecessary, so it
1986         was removed. Note that Releasing m_NPObject does not result in a call to
1987         the plugin; it simply releases a reference count on the wrapper object
1988         for this HTMLPlugInElement. (The plugin's NPP_Deallocate is invoked
1989         when the render tree is destroyed, when PluginView calls
1990         PluginPackage::unload.) Thus, it is safe to release m_NPObject in
1991         detach, because it can not result in layout or style changes.
1992
1993         Also added numberOfLiveNodes() and numberOfLiveDocuments() to
1994         window.internals to enable testing.
1995
1996         Test: plugins/netscape-dom-access-and-reload.html
1997
1998         * WebCore.exp.in:
1999         * html/HTMLPlugInElement.cpp:
2000         (WebCore::HTMLPlugInElement::detach):
2001         * html/HTMLPlugInElement.h:
2002         (HTMLPlugInElement):
2003         * testing/Internals.cpp:
2004         (WebCore::Internals::numberOfLiveDocuments):
2005         (WebCore::Internals::numberOfLiveNodes):
2006         (WebCore):
2007         * testing/Internals.h:
2008         (Internals):
2009         * testing/Internals.idl:
2010
2011 2012-03-22  Shawn Singh  <shawnsingh@chromium.org>
2012
2013         [chromium] Make CCDamageTracker robust to empty layer lists
2014         https://bugs.webkit.org/show_bug.cgi?id=81831
2015
2016         Reviewed by Adrienne Walker.
2017
2018         Added a unit test in CCDamageTrackerTest that causes a crash in
2019         the old code. With this patch applied, the crash will not occur.
2020         In theory, that crash should never occur anyway, unless there is a
2021         bug outside the damage tracker, but for robustness it's
2022         appropriate to handle it properly.
2023
2024         In addition to this fix, performed some trivial maintenance on the
2025         damage tracker code.
2026
2027         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
2028         (WebCore::CCDamageTracker::updateDamageTrackingState): removed
2029         unclean code that accessed the targetSurface to get necessary
2030         information. Instead, we now pass those args through the damage
2031         tracker's API.
2032
2033         * platform/graphics/chromium/cc/CCDamageTracker.h:
2034         (CCDamageTracker): modified args passed to damage tracker on update.
2035
2036         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2037         (WebCore::CCLayerTreeHostImpl::trackDamageForAllSurfaces):
2038         modified args passed to damage tracker on update.
2039
2040 2012-03-22  Julien Chaffraix  <jchaffraix@webkit.org>
2041
2042         Enable style sharing for elements with a style attribute
2043         https://bugs.webkit.org/show_bug.cgi?id=81523
2044
2045         Reviewed by Antti Koivisto.
2046
2047         Memory improvement change only.
2048
2049         Overall, this is a performance wash (some benchmarks may regress a bit due to the increase in time taken
2050         by CSSStyleSelector::locateSharedStyle as we try more nodes, others increase their performance due to style sharing).
2051
2052         Instrumenting our style sharing, this should give us some nice memory shavings on some benchmarks:
2053         - HTML5 isn't impacted as it doesn't use much inline style
2054         - page cyclers' intl1 showed a 6% increase in style sharing.
2055
2056         * css/CSSStyleSelector.cpp:
2057         (WebCore::CSSStyleSelector::canShareStyleWithElement):
2058         This method now handles inline style like presentation attributes on the element.
2059
2060         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2061         (WebCore::CSSStyleSelector::locateSharedStyle):
2062         Don't bail out for an element with an inline style declaration.
2063
2064         (WebCore::CSSStyleSelector::stylesEqual):
2065         Generalized attributeStylesEqual to share the logic between attribute and
2066         inline style property set. This means that attribute checks are actually
2067         doing a little extra more work but that didn't impact our benchmarks.
2068
2069 2012-03-22  Kevin Ollivier  <kevino@theolliviers.com>
2070
2071         [wx] Unreviewed. WebDOM build fix after array type changes.
2072
2073         * bindings/scripts/CodeGeneratorCPP.pm:
2074         (ShouldSkipType):
2075
2076 2012-03-22  Pavel Feldman  <pfeldman@chromium.org>
2077
2078         Web Inspector: text gutter decorations should move upon edits.
2079         https://bugs.webkit.org/show_bug.cgi?id=81932
2080
2081         Reviewed by Vsevolod Vlasov.
2082
2083         Decorations set by the line number now shift as editing inserts / removes lines.
2084
2085         * inspector/front-end/TextViewer.js:
2086         (WebInspector.TextViewer.prototype._syncLineHeight):
2087         (WebInspector.TextEditorGutterPanel):
2088         (WebInspector.TextEditorGutterPanel.prototype.textChanged):
2089         (WebInspector.TextEditorGutterPanel.prototype.syncClientHeight):
2090         (WebInspector.TextEditorGutterPanel.prototype.addDecoration):
2091         (WebInspector.TextEditorGutterPanel.prototype.removeDecoration):
2092
2093 2012-03-21  Robert Hogan  <robert@webkit.org>
2094
2095         CSS 2.1 failure: fixed-table-layout-006 fails
2096         https://bugs.webkit.org/show_bug.cgi?id=78412
2097
2098         Reviewed by Julien Chaffraix.
2099
2100         Tests: css2.1/20110323/fixed-table-layout-006.htm
2101                fast/css/fixed-table-layout-cell-padding.htm
2102
2103         In fixed tables, positive width specified on a column should include borders and padding.
2104         See the thread at http://lists.w3.org/Archives/Public/www-style/2011Oct/0502.html. The discussion
2105         there resulted in a whole new set of tests for section 17.5.2.1 in the CSS 2.1 spec. See 
2106         http://test.csswg.org/harness/test/CSS21_DEV/section/17.5.2.1/. This patch allows WebKit
2107         to pass all of them, and all tests for the 17.5.2.1 section as a whole. I'll land them all separately.
2108     
2109         * rendering/FixedTableLayout.cpp:
2110         (WebCore::FixedTableLayout::calcWidthArray): Include border width and cell padding in the width of the column.
2111          Note that borderAndPaddingLogicalWidth() returns the border width for separate and collapsed borders as appropriate.
2112
2113 2012-03-22  Simon Fraser  <simon.fraser@apple.com>
2114
2115         Factor compositing layer updates after scroll into a new method
2116         https://bugs.webkit.org/show_bug.cgi?id=81943
2117
2118         Reviewed by Dean Jackson.
2119
2120         Move some code that updates compositing layers after scrolling
2121         into its own method, for cleanliness.
2122
2123         * rendering/RenderLayer.cpp:
2124         (WebCore::RenderLayer::scrollTo):
2125         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
2126         (WebCore):
2127         * rendering/RenderLayer.h:
2128         (RenderLayer):
2129
2130 2012-03-22  Gavin Barraclough  <barraclough@apple.com>
2131
2132         Add JSValue::isFunction
2133         https://bugs.webkit.org/show_bug.cgi?id=81935
2134
2135         Reviewed by Geoff Garen.
2136
2137         This would be useful in the WebCore bindings code.
2138         Also, remove asFunction, replace with jsCast<JSFunction*>.
2139
2140         * bindings/js/JSInjectedScriptHostCustom.cpp:
2141         (WebCore::JSInjectedScriptHost::functionDetails):
2142         * bindings/js/ScriptCallStackFactory.cpp:
2143         (WebCore::createScriptCallStack):
2144
2145 2012-03-22  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
2146
2147         TiledBackingStore: Fix test regressions that appeared with r111560.
2148         https://bugs.webkit.org/show_bug.cgi?id=81519
2149
2150         Reviewed by Kenneth Rohde Christiansen.
2151
2152         The visible rect wasn't intersected with the contents rect anymore which
2153         could lead to an astronomical layer size to check for intersecting tiles.
2154
2155         Add a visibleContentsRect that doesn't do the conversion and use it
2156         in visibleAreaIsCovered.
2157
2158         * platform/graphics/TiledBackingStore.cpp:
2159         (WebCore::TiledBackingStore::visibleContentsRect):
2160         (WebCore):
2161         (WebCore::TiledBackingStore::visibleRect):
2162         (WebCore::TiledBackingStore::visibleAreaIsCovered):
2163         * platform/graphics/TiledBackingStore.h:
2164         (TiledBackingStore):
2165
2166 2012-03-22  Joe Thomas  <joethomas@motorola.com>
2167
2168         Make Length Calculation functions non-inline
2169         https://bugs.webkit.org/show_bug.cgi?id=81733
2170
2171         Currently length calculation functions in LengthFunctions.h are inline. These functions are pretty big to be inline.
2172         And these functions are expected to grow again when new length units will be introduced in bug 27160.
2173
2174         A decent rule of thumb is to not inline a function if it is more than 10 lines long. Also it's typically not cost effective to inline
2175         functions with loops or switch statements. (Reference: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Inline_Functions).
2176
2177         Ran PerformanceTests/Parser/html5-full-render.html on Mac Snow-Leopard with and without the patch and did not see much performance difference.
2178
2179         Reviewed by Antti Koivisto.
2180
2181         * CMakeLists.txt:
2182         * GNUmakefile.list.am:
2183         * Target.pri:
2184         * WebCore.gypi:
2185         * WebCore.vcproj/WebCore.vcproj:
2186         * WebCore.xcodeproj/project.pbxproj:
2187         * css/LengthFunctions.cpp: Added.
2188         (WebCore):
2189         (WebCore::miminumValueForLength):
2190         (WebCore::valueForLength):
2191         (WebCore::floatValueForLength):
2192         * css/LengthFunctions.h:
2193         (WebCore):
2194
2195 2012-03-22  Alexis Menard  <alexis.menard@openbossa.org>
2196
2197         Increase code sharing between CSSParser and CSSPropertyLonghand.
2198         https://bugs.webkit.org/show_bug.cgi?id=81587
2199
2200         Reviewed by Antti Koivisto.
2201
2202         Expose the longhands declaration for a given shorthand in CSSPropertyLonghand and
2203         make CSSParser use them. It will make the declaration of longhands in one place only.
2204         Remove the map of CSSPropertyLonghand and replace it by a regular switch/case.
2205         The map doesn't bring much here and it's cleaner and faster to use the switch.
2206         It also shows a little performance improvement in CSS/CSSPropertySetterGetter.html.
2207
2208         No new tests : no behavior change.
2209
2210         * css/CSSParser.cpp:
2211         (WebCore::CSSParser::parseValue):
2212         (WebCore::CSSParser::parseAnimationShorthand):
2213         (WebCore::CSSParser::parseTransitionShorthand):
2214         (WebCore::CSSParser::parseShorthand):
2215         Modify the prototype of this function to directly use the CSSPropertyLonghand.
2216         * css/CSSParser.h:
2217         (WebCore):
2218         (CSSParser):
2219         * css/CSSPropertyLonghand.cpp:
2220         (WebCore):
2221         (WebCore::backgroundLonghand):
2222         (WebCore::backgroundPositionLonghand):
2223         (WebCore::backgroundRepeatLonghand):
2224         (WebCore::borderLonghand):
2225         (WebCore::borderBottomLonghand):
2226         (WebCore::borderColorLonghand):
2227         (WebCore::borderImageLonghand):
2228         (WebCore::borderLeftLonghand):
2229         (WebCore::borderRadiusLonghand):
2230         (WebCore::borderRightLonghand):
2231         (WebCore::borderSpacingLonghand):
2232         (WebCore::borderStyleLonghand):
2233         (WebCore::borderTopLonghand):
2234         (WebCore::borderWidthLonghand):
2235         (WebCore::listStyleLonghand):
2236         (WebCore::fontLonghand):
2237         (WebCore::marginLonghand):
2238         (WebCore::outlineLonghand):
2239         (WebCore::overflowLonghand):
2240         (WebCore::paddingLonghand):
2241         (WebCore::webkitAnimationLonghand):
2242         (WebCore::webkitBorderAfterLonghand):
2243         (WebCore::webkitBorderBeforeLonghand):
2244         (WebCore::webkitBorderEndLonghand):
2245         (WebCore::webkitBorderStartLonghand):
2246         (WebCore::webkitColumnsLonghand):
2247         (WebCore::webkitColumnRuleLonghand):
2248         (WebCore::webkitFlexFlowLonghand):
2249         (WebCore::webkitMarginCollapseLonghand):
2250         (WebCore::webkitMarqueeLonghand):
2251         (WebCore::webkitMaskLonghand):
2252         (WebCore::webkitMaskPositionLonghand):
2253         (WebCore::webkitMaskRepeatLonghand):
2254         (WebCore::webkitTextEmphasisLonghand):
2255         (WebCore::webkitTextStrokeLonghand):
2256         (WebCore::webkitTransitionLonghand):
2257         (WebCore::webkitTransformOriginLonghand):
2258         (WebCore::webkitWrapLonghand):
2259         (WebCore::longhandForProperty):
2260         * css/CSSPropertyLonghand.h:
2261         (WebCore):
2262
2263 2012-03-22  Emil A Eklund  <eae@chromium.org>
2264
2265         Unreviewed, touching file to force bots to pick up CSS_SHADERS flag change. 
2266
2267         * css/CSSStyleSelector.h:
2268         (CSSStyleSelector):
2269
2270 2012-03-22  Xingnan Wang  <xingnan.wang@intel.com>
2271
2272         ReverbConvolver::latencyFrames() should return 0.
2273         https://bugs.webkit.org/show_bug.cgi?id=81806
2274
2275         Reviewed by Chris Rogers.
2276
2277         * platform/audio/ReverbConvolver.cpp:
2278         (WebCore::ReverbConvolver::latencyFrames):
2279
2280 2012-03-22  Tony Chang  <tony@chromium.org>
2281
2282         refactor flexbox in preparation for flex-line-pack
2283         https://bugs.webkit.org/show_bug.cgi?id=81843
2284
2285         Reviewed by Ojan Vafai.
2286
2287         Replace WrapReverseContext with a vector of LineContexts that contain
2288         the same information, plus values needed for flex-align.
2289
2290         alignChildren has been moved to after all the lines have been
2291         positioned. We want to align children after flex-line-pack has changed
2292         the size of each line to avoid unnecessary layouts.
2293
2294         Take 2: Remove the assert. If there are no children, then there are no
2295         flex lines. Instead, assert that child is not null.
2296
2297         No new tests, just refactoring.
2298
2299         * rendering/RenderFlexibleBox.cpp:
2300         (WebCore::RenderFlexibleBox::LineContext::LineContext): New struct,
2301         holds information needed for wrap-reverse and aligning children.
2302         (RenderFlexibleBox::LineContext):
2303         (WebCore::RenderFlexibleBox::layoutFlexItems): alignChildren after layout out all the lines rather than after each line.
2304         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): don't alignChildren
2305         (WebCore::RenderFlexibleBox::alignChildren): align all flex items, not just a line at a time.
2306         (WebCore::RenderFlexibleBox::flipForWrapReverse): Update to use LineContext
2307         * rendering/RenderFlexibleBox.h:
2308
2309 2012-03-22  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2310
2311         Event dispatching in XMLHttpRequestProgressEventThrottle should go through XMLHttpRequestProgressEventThrottle::dispatchEvent
2312         https://bugs.webkit.org/show_bug.cgi?id=46743
2313
2314         Reviewed by Julien Chaffraix
2315         Based on original patch by Anton D'Auria
2316
2317         In preparation for platform-specific queuing of XMLHttpRequest events,
2318         this patch changes all calls to m_target->dispatchEvent to
2319         XMLHttpRequestProgressEventThrottle::dispatchEvent.
2320         Currently, we queue only one progress event on suspend() if we have
2321         throttled progress events. We should be able to queue all XHR events
2322         that can be generated after suspend(), if the platform network layer
2323         continues to receive data.
2324         XMLHttpRequest uses XMLHttpRequestProgressEventThrottle to dispatch only
2325         download events, so this doesn't change behavior of upload events, which
2326         aren't throttled or queued.
2327
2328         * xml/XMLHttpRequest.cpp:
2329         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
2330         * xml/XMLHttpRequestProgressEventThrottle.cpp:
2331         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchReadyStateChangeEvent):
2332         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchEvent):
2333         (WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent):
2334         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchPausedEvent):
2335         (WebCore::XMLHttpRequestProgressEventThrottle::fired):
2336         * xml/XMLHttpRequestProgressEventThrottle.h:
2337         (XMLHttpRequestProgressEventThrottle):
2338
2339 2012-03-22  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
2340
2341         [EFL] Map BackSpace key code to Unicode value
2342         https://bugs.webkit.org/show_bug.cgi?id=81130
2343
2344         Reviewed by Gustavo Noronha Silva.
2345
2346         Test: fast/events/backspace-navigates-back.html
2347
2348         * platform/efl/EflKeyboardUtilities.cpp:
2349         (WebCore::createKeyMap): Map BackSpace to Unicode value
2350
2351 2012-03-22  Abhishek Arya  <inferno@chromium.org>
2352
2353         Incorrect beforeChild parent calculation in RenderRubyBase::moveChildren.
2354         https://bugs.webkit.org/show_bug.cgi?id=80297
2355
2356         Reviewed by Julien Chaffraix.
2357
2358         beforeChild might share the same anonymous block parent with other previous
2359         siblings. Before moving the children across ruby bases, we need to make sure
2360         to split the tree across the beforeChild correctly.
2361
2362         Test: fast/ruby/ruby-text-before-child-split.html
2363
2364         * rendering/RenderRubyBase.cpp:
2365         (WebCore::RenderRubyBase::moveChildren):
2366
2367 2012-03-22  Kristóf Kosztyó  <kkristof@inf.u-szeged.hu>
2368
2369         [Qt] Fix Qt minimal build after r111692
2370
2371         Reviewed by Csaba Osztrogonác.
2372
2373         * bindings/js/JSScriptProfileNodeCustom.cpp:
2374
2375 2012-03-22  Adrienne Walker  <enne@google.com>
2376
2377         [chromium] Fix scrollbar layers holding onto invalid textures after lost context
2378         https://bugs.webkit.org/show_bug.cgi?id=81841
2379
2380         Reviewed by James Robinson.
2381
2382         Unit test: CCLayerTreeHostImplTest.scrollbarLayerLostContext
2383
2384         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
2385         (WebCore::CCScrollbarLayerImpl::willDraw):
2386
2387 2012-03-22  Philippe Normand  <pnormand@igalia.com>
2388
2389         [GTK] ASSERT bug in WebAudio (AudioFileReader)
2390         https://bugs.webkit.org/show_bug.cgi?id=81777
2391
2392         Reviewed by Martin Robinson.
2393
2394         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
2395         (WebCore::AudioFileReader::decodeAudioForBusCreation): Don't steal
2396         the GstBus floating reference.
2397         (WebCore::AudioFileReader::createBus): Ditto.
2398
2399 2012-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
2400
2401         Unreviewed: Web Inspector: fix syntax error in text.
2402
2403         * English.lproj/localizedStrings.js:
2404         * inspector/front-end/HeapSnapshotProxy.js:
2405         (WebInspector.HeapSnapshotWorker.prototype._messageReceived):
2406
2407 2012-03-22  Sheriff Bot  <webkit.review.bot@gmail.com>
2408
2409         Unreviewed, rolling out r111688.
2410         http://trac.webkit.org/changeset/111688
2411         https://bugs.webkit.org/show_bug.cgi?id=81912
2412
2413         "Heap profiler test fails" (Requested by yurys on #webkit).
2414
2415         * inspector/front-end/HeapSnapshot.js:
2416         (WebInspector.HeapSnapshot.prototype._buildRetainers):
2417
2418 2012-03-22  Dana Jansens  <danakj@chromium.org>
2419
2420         [chromium] Early out in a new prepareToDraw() step if checkerboarding an accelerated animation in order to skip the frame
2421         https://bugs.webkit.org/show_bug.cgi?id=81437
2422
2423         Reviewed by Adrienne Walker.
2424
2425         Split CCLayerTreeHostImpl::drawLayers() into two phases:
2426         prepareToDraw() and drawLayers().
2427
2428         When calculating a RenderPass, and we checkerboard a quad on a
2429         layer, bubble this info back up to CCLayerTreeHostImpl. If the
2430         layer is transforming in an animation, then abort the prepareToDraw()
2431         phase and cause it to return false back to the thread proxy.
2432
2433         Unit test: CCLayerTreeHostImplTest.prepareToDrawFailsWhenAnimationUsesCheckerboard
2434
2435         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2436         (WebCore::CCLayerImpl::appendQuads):
2437         * platform/graphics/chromium/cc/CCLayerImpl.h:
2438         (CCLayerImpl):
2439         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2440         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
2441         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
2442         (WebCore):
2443         (WebCore::CCLayerTreeHostImpl::drawLayers):
2444         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2445         (CCLayerTreeHostImpl):
2446         (FrameData):
2447         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
2448         (WebCore::CCQuadCuller::append):
2449         * platform/graphics/chromium/cc/CCQuadCuller.h:
2450         (CCQuadCuller):
2451         * platform/graphics/chromium/cc/CCRenderPass.cpp:
2452         (WebCore::CCRenderPass::appendQuadsForLayer):
2453         * platform/graphics/chromium/cc/CCRenderPass.h:
2454         (CCRenderPass):
2455         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
2456         (WebCore::CCScrollbarLayerImpl::appendQuads):
2457         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
2458         (CCScrollbarLayerImpl):
2459         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2460         (WebCore::CCSingleThreadProxy::doComposite):
2461         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
2462         (WebCore::CCSolidColorLayerImpl::appendQuads):
2463         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
2464         (CCSolidColorLayerImpl):
2465         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
2466         (WebCore::CCTextureLayerImpl::appendQuads):
2467         * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
2468         (CCTextureLayerImpl):
2469         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2470         (WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
2471         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
2472         (WebCore::CCTiledLayerImpl::appendQuads):
2473         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
2474         (CCTiledLayerImpl):
2475         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2476         (WebCore::CCVideoLayerImpl::appendQuads):
2477         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
2478         (CCVideoLayerImpl):
2479
2480 2012-03-22  Levi Weintraub  <leviw@chromium.org>
2481
2482         Correct LayoutUnit usage in Accessibility code
2483         https://bugs.webkit.org/show_bug.cgi?id=81789
2484
2485         Reviewed by Eric Seidel.
2486
2487         Reverting Accessibility hit testing code back to integers. Accessibility hit tests originate from
2488         the embedder and don't accumulate offsets, so we get nothing from using LayoutUnits, and needlessly
2489         expose them to the embedder.
2490
2491         No new tests. No change in behavior.
2492
2493         * accessibility/AccessibilityListBox.cpp:
2494         (WebCore::AccessibilityListBox::elementAccessibilityHitTest): See above.
2495         * accessibility/AccessibilityListBox.h:
2496         (AccessibilityListBox):
2497         * accessibility/AccessibilityObject.cpp:
2498         (WebCore::AccessibilityObject::clickPoint): This value is only ever used to display a context menu,
2499         which is always done with integer coordinates.
2500         (WebCore::AccessibilityObject::boundingBoxForQuads): This is a bounding box built from floats. We
2501         don't pixel snap floats, so we return an integer bounding box.
2502         (WebCore::AccessibilityObject::elementAccessibilityHitTest): See above.
2503         (WebCore::AccessibilityObject::scrollToMakeVisible): Pixel snapping the bounding box and simplifying
2504         up the code to position it at (0,0).
2505         * accessibility/AccessibilityObject.h:
2506         (WebCore::AccessibilityObject::accessibilityHitTest): See above.
2507         (AccessibilityObject):
2508         (WebCore::AccessibilityObject::pixelSnappedBoundingBoxRect): Convenience method for embedder callers.
2509         * accessibility/AccessibilityRenderObject.cpp:
2510         (WebCore::AccessibilityRenderObject::visiblePositionForPoint): The point passed in here is comes from
2511         screen coordinates and originates in embedder code. Reverting it to take an integer.
2512         (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest): See above.
2513         (WebCore::AccessibilityRenderObject::accessibilityHitTest): See above.
2514         * accessibility/AccessibilityRenderObject.h:
2515         (AccessibilityRenderObject):
2516         * accessibility/AccessibilityScrollView.cpp:
2517         (WebCore::AccessibilityScrollView::accessibilityHitTest): See above.
2518         * accessibility/AccessibilityScrollView.h:
2519         (AccessibilityScrollView):
2520         * accessibility/AccessibilitySlider.cpp:
2521         (WebCore::AccessibilitySlider::elementAccessibilityHitTest): See above.
2522         * accessibility/AccessibilitySlider.h:
2523         (AccessibilitySlider):
2524
2525 2012-03-21  Ilya Tikhonovsky  <loislo@chromium.org>
2526
2527         Web Inspector: HeapProfiler: Heap snapshot worker has to report the errors to the front-end
2528         https://bugs.webkit.org/show_bug.cgi?id=81804
2529
2530         Sometimes the worker process of HeapSnapshot does some wrong thing and throw an Exception.
2531         At this momemnt we have no way to see the error in the front-end.
2532
2533         Reviewed by Yury Semikhatsky.
2534
2535         * English.lproj/localizedStrings.js:
2536         * inspector/front-end/HeapSnapshotProxy.js: check the exception field and dump it into front-end's console.
2537         (WebInspector.HeapSnapshotWorker.prototype._messageReceived):
2538         * inspector/front-end/HeapSnapshotWorkerDispatcher.js: catch the exception and transfer it's text to requester's side.
2539         (WebInspector.HeapSnapshotWorkerDispatcher.prototype.dispatchMessage):
2540
2541 2012-03-22  Carlos Garcia Campos  <cgarcia@bb-webkit-rel-64.local.igalia.com>
2542
2543         [GTK] Use the angle-bracket form to include wtf headers
2544         https://bugs.webkit.org/show_bug.cgi?id=81884
2545
2546         Reviewed by Eric Seidel.
2547
2548         Use #include <wtf/foo> instead of #include "foo".
2549
2550         * platform/graphics/freetype/FontPlatformData.h:
2551         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2552         * platform/gtk/DataObjectGtk.h:
2553         * platform/network/ResourceHandleInternal.h:
2554         * platform/network/soup/SocketStreamHandleSoup.cpp:
2555
2556 2012-03-22  Alexander Pavlov  <apavlov@chromium.org>
2557
2558         Web Inspector: Case of the elements of the xml document should be shown as it is in the console
2559         https://bugs.webkit.org/show_bug.cgi?id=81902
2560
2561         When registering a detached root, DOMAgent always presumes it is a node,
2562         while it can also be a document.
2563
2564         Reviewed by Vsevolod Vlasov.
2565
2566         Test: inspector/console/console-xml-document.html
2567
2568         * inspector/front-end/ConsoleMessage.js:
2569         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
2570         * inspector/front-end/DOMAgent.js:
2571         (WebInspector.DOMAgent.prototype._setDetachedRoot):
2572
2573 2012-03-22  Vsevolod Vlasov  <vsevik@chromium.org>
2574
2575         Web Inspector: Introduce ScriptBound/ScriptUnbound events in ScriptMapping.
2576         https://bugs.webkit.org/show_bug.cgi?id=81904
2577
2578         Reviewed by Pavel Feldman.
2579
2580         This is another step on the way to cleaner BreakpointManager logic.
2581         Here we extract ScriptBound/ScriptUnbound events from UISourceCodeListChanged event.
2582         This allows us to handle script-uiSourceCode binding separately from
2583         uiSourceCode creation/deletion and to handle unbinding that was not
2584         possible at all before.
2585
2586         * inspector/front-end/CompilerScriptMapping.js:
2587         (WebInspector.CompilerScriptMapping.prototype._uiSourceCodesForSourceMap):
2588         (WebInspector.CompilerScriptMapping.prototype.addScript.get this):
2589         (WebInspector.CompilerScriptMapping.prototype.addScript):
2590         (WebInspector.CompilerScriptMapping.prototype.reset):
2591         * inspector/front-end/ResourceScriptMapping.js:
2592         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged):
2593         * inspector/front-end/ScriptMapping.js:
2594         (WebInspector.MainScriptMapping):
2595         (WebInspector.MainScriptMapping.prototype._updateLiveLocation):
2596         (WebInspector.MainScriptMapping.prototype._handleUISourceCodeListChanged):
2597         (WebInspector.MainScriptMapping.prototype._handleScriptBound):
2598         (WebInspector.MainScriptMapping.prototype._handleScriptUnbound):
2599         * inspector/front-end/SnippetsModel.js:
2600         (WebInspector.SnippetsScriptMapping.prototype.addScript.get this):
2601         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
2602         (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
2603         (WebInspector.SnippetsScriptMapping.prototype._snippetRemoved.get this):
2604         (WebInspector.SnippetsScriptMapping.prototype._snippetRemoved):
2605         (WebInspector.SnippetsScriptMapping.prototype.reset):
2606
2607 2012-03-22  Vineet Chaudhary  <rgf748@motorola.com>
2608
2609         https://bugs.webkit.org/show_bug.cgi?id=81893
2610         Remove custom bindings form ScriptProfileNode.idl of attribute type Array.
2611
2612         Reviewed by Kentaro Hara.
2613
2614         Replace [CustomGetter] Array with sequence<ScriptProfileNode>.
2615         To remove the custom bindings code.
2616
2617         Test: No new tests. LayoutTests/fast/profiler/* test are enough for this.
2618
2619         * bindings/js/JSScriptProfileNodeCustom.cpp: Removed custom function.
2620         (WebCore::JSScriptProfileNode::callUID):
2621         * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: Removed custom function.
2622         (WebCore):
2623         * inspector/ScriptProfileNode.idl: Replaced Array with sequence<ScriptProfileNode>.
2624
2625 2012-03-22  Andrey Kosyakov  <caseq@chromium.org>
2626
2627         Web Inspector: only update timeline overview categories strips when these are visible
2628         https://bugs.webkit.org/show_bug.cgi?id=81903
2629
2630         Reviewed by Pavel Feldman.
2631
2632         - factor out category strips update into a separate method;
2633         - only invoke it when "Timeline" overview mode is selected.
2634
2635         * inspector/front-end/TimelineOverviewPane.js:
2636         (WebInspector.TimelineOverviewPane.prototype._showTimelines):
2637         (WebInspector.TimelineOverviewPane.prototype.update):
2638         (WebInspector.TimelineOverviewPane.prototype._updateCategoryStrips):
2639
2640 2012-03-22  Levi Weintraub  <leviw@chromium.org>
2641
2642         Update LayoutUnit usage in FrameSelection
2643         https://bugs.webkit.org/show_bug.cgi?id=81754
2644
2645         Reviewed by Eric Seidel.
2646
2647         FrameSelection stores its caret and repaint bounds in absolute coordinates. Absolute coordinates
2648         we treat as pixel values, so this patch changes these values to integers. Sub-pixel precision
2649         will still be used when these coordinates are passed down and used locally.
2650
2651         No new tests. No change in behavior.
2652
2653         * editing/FrameSelection.cpp:
2654         (WebCore::absoluteCaretY): Uses absolute coordinates, which are ints.
2655         (WebCore::FrameSelection::modify): Uses absolute coordinates to handle vertical selection
2656         modification. Sub-pixel precision will be used when these values are converted to local ones.
2657         (WebCore::CaretBase::absoluteBoundsForLocalRect): Absolute coordinates -> ints.
2658         (WebCore::FrameSelection::absoluteCaretBounds): Ditto.
2659         (WebCore::CaretBase::caretRepaintRect): The caret repaint rect is stored in absolute coordinates.
2660         Reverting the values to ints.
2661         (WebCore::FrameSelection::recomputeCaretRect): Ditto.
2662         * editing/FrameSelection.h:
2663         (FrameSelection):
2664         * editing/mac/FrameSelectionMac.mm:
2665         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): Switching to store absolute
2666         coordinates as integers.
2667
2668 2012-03-22  Alexei Filippov  <alexeif@chromium.org>
2669
2670         Web Inspector: Speed up the build retainers phase.
2671         https://bugs.webkit.org/show_bug.cgi?id=81763
2672
2673         Replacing the edge iterator with a raw loop makes it
2674         faster by more than 10 times.
2675
2676         Reviewed by Yury Semikhatsky.
2677
2678         * inspector/front-end/HeapSnapshot.js:
2679         (WebInspector.HeapSnapshot.prototype._buildRetainers):
2680
2681 2012-03-22  No'am Rosenthal  <noam.rosenthal@nokia.com>
2682
2683         [Qt][WK2] The background appears to have one extra pixel from the contents
2684         https://bugs.webkit.org/show_bug.cgi?id=81830
2685
2686         Reviewed by Kenneth Rohde Christiansen.
2687
2688         TextureMapperGL applied a 1-offset that was covering for another bug,
2689         which was already fixed.
2690
2691         No new tests, this would be tested once we test GL rendering results.
2692
2693         * platform/graphics/texmap/TextureMapperGL.cpp:
2694         (WebCore::TextureMapperGLData::SharedGLData::scissorClip):
2695
2696 2012-03-22  W. James MacLean  <wjmaclean@chromium.org>
2697
2698         Rename touchpad fling curve, add curve parameters to constructor.
2699         https://bugs.webkit.org/show_bug.cgi?id=81820
2700
2701         Reviewed by Adrienne Walker.
2702
2703         Covered by existing unit tests.
2704
2705         * GNUmakefile.list.am:
2706         * WebCore.gypi:
2707         * platform/ScrollAnimatorNone.cpp:
2708         (WebCore::ScrollAnimatorNone::fireUpAnAnimation):
2709         * platform/TouchpadFlingPlatformGestureCurve.cpp: Renamed from Source/WebCore/platform/TouchFlingPlatformGestureCurve.cpp.
2710         (WebCore):
2711         (WebCore::TouchpadFlingPlatformGestureCurve::create):
2712         (WebCore::TouchpadFlingPlatformGestureCurve::TouchpadFlingPlatformGestureCurve):
2713         (WebCore::TouchpadFlingPlatformGestureCurve::~TouchpadFlingPlatformGestureCurve):
2714         (WebCore::TouchpadFlingPlatformGestureCurve::apply):
2715         * platform/TouchpadFlingPlatformGestureCurve.h: Renamed from Source/WebCore/platform/TouchFlingPlatformGestureCurve.h.
2716         (WebCore):
2717         (TouchpadFlingPlatformGestureCurve):
2718
2719 2012-03-22  Pavel Feldman  <pfeldman@chromium.org>
2720
2721         Web Inspector: make CSS and JavaScript files editable by default.
2722         https://bugs.webkit.org/show_bug.cgi?id=81787
2723
2724         Reviewed by Vsevolod Vlasov.
2725
2726         This change removes cancelEditing and setReadOnly capabilities from source frame.
2727         It removes dblclick handler as well since one does not need to enter editing mode.
2728         It also establishes proper content dispatching so that views are updated with the
2729         resource content. All these are inter-dependent, need to be landed simultaneously.
2730         Drive-by follow up to the r111675 where range is modified prior to the exiting
2731         edit mode.
2732
2733         * inspector/front-end/JavaScriptSourceFrame.js:
2734         (WebInspector.JavaScriptSourceFrame):
2735         (WebInspector.JavaScriptSourceFrame.prototype.requestContent):
2736         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
2737         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
2738         (WebInspector.JavaScriptSourceFrame.prototype.didEditContent):
2739         (WebInspector.JavaScriptSourceFrame.prototype._lineNumberAfterEditing):
2740         * inspector/front-end/ResourceView.js:
2741         (WebInspector.ResourceSourceFrame):
2742         (WebInspector.ResourceSourceFrame.prototype.suggestedFileName):
2743         (WebInspector.ResourceSourceFrame.prototype._contentChanged):
2744         (WebInspector.EditableResourceSourceFrame.prototype.canEditSource):
2745         (WebInspector.EditableResourceSourceFrame.prototype.editContent.callbackWrapper):
2746         (WebInspector.EditableResourceSourceFrame.prototype.editContent):
2747         (WebInspector.EditableResourceSourceFrame.prototype._contentChanged):
2748         * inspector/front-end/ResourcesPanel.js:
2749         (WebInspector.ResourcesPanel.prototype._innerShowView):
2750         (WebInspector.FrameResourceTreeElement.prototype._appendRevision):
2751         * inspector/front-end/ScriptsPanel.js:
2752         (WebInspector.ScriptsPanel.prototype.setScriptSourceIsDirty):
2753         * inspector/front-end/Settings.js:
2754         (WebInspector.ExperimentsSettings):
2755         * inspector/front-end/SourceFrame.js:
2756         (WebInspector.SourceFrame):
2757         (WebInspector.SourceFrame.prototype.wasShown):
2758         (WebInspector.SourceFrame.prototype.willHide):
2759         (WebInspector.SourceFrame.prototype.beforeTextChanged):
2760         (WebInspector.SourceFrame.prototype.setContent):
2761         (WebInspector.SourceFrame.prototype.commitEditing):
2762         (WebInspector.SourceFrame.prototype.didEditContent):
2763         (WebInspector.SourceFrame.prototype.editContent):
2764         * inspector/front-end/TextPrompt.js:
2765         (WebInspector.TextPrompt.prototype._startEditing):
2766         (WebInspector.TextPrompt.prototype._stopEditing):
2767         * inspector/front-end/TextViewer.js:
2768         (WebInspector.TextViewer):
2769         (WebInspector.TextViewer.prototype._registerShortcuts):
2770         (WebInspector.TextEditorMainPanel.prototype.handleEnterKey):
2771
2772 2012-03-22  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2773
2774         [Qt] Enable FAST_MOBILE_SCROLLING when scrolling is delegated.
2775         https://bugs.webkit.org/show_bug.cgi?id=81889
2776
2777         Reviewed by Kenneth Rohde Christiansen.
2778
2779         On the Qt platform only enable the fast mobile scroll feature when scrolling is delegated.
2780
2781         * rendering/RenderObject.cpp:
2782         (WebCore::RenderObject::styleWillChange):
2783
2784 2012-03-22  Pavel Feldman  <pfeldman@chromium.org>
2785
2786         Web Inspector: dispatch styleSheetChanged event synchronously.
2787         https://bugs.webkit.org/show_bug.cgi?id=81892
2788
2789         Reviewed by Vsevolod Vlasov.
2790
2791         Today, backend generates stylesheet change event synchronously from within set* command.
2792         But CSSStyleModel defers its dispatching until the stylesheet content is available. This
2793         prevents us from ignoring update events from within commands that initiated those updates.
2794
2795         This change makes stylesheet change event dispatch synchronously and delegates stylesheet
2796         content fetching to the event client.
2797
2798         * inspector/front-end/CSSStyleModel.js:
2799         (WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged):
2800         (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
2801         (WebInspector.CSSStyleModelResourceBinding.prototype.setContent):
2802         (WebInspector.CSSStyleModelResourceBinding.prototype._innerSetContent.callbackWrapper):
2803         (WebInspector.CSSStyleModelResourceBinding.prototype._innerSetContent):
2804         (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetChanged.callback):
2805         (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetChanged):
2806         (WebInspector.CSSStyleModelResourceBinding.prototype._innerStyleSheetChanged):
2807
2808 2012-03-21  Ian Vollick  <vollick@chromium.org>
2809
2810         [chromium] timing functions are getting incorrectly applied for accelerated css transitions
2811         https://bugs.webkit.org/show_bug.cgi?id=81692
2812
2813         Reviewed by Adrienne Walker.
2814
2815         Tested in CCLayerTreeHostTestAddAnimationWithTimingFunction
2816
2817         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
2818
2819 2012-03-22  Pavel Feldman  <pfeldman@chromium.org>
2820
2821         Web Inspector: allow on-hover popover while in edit mode.
2822         https://bugs.webkit.org/show_bug.cgi?id=81898
2823
2824         Reviewed by Vsevolod Vlasov.
2825
2826         This change allows popover while in-edit mode, hides it upon Esc. It also introduces anchorOverride
2827         concept in ObjectPopoverHelper that allows dynamically switching the anchor (say if we want to highlight anchor itself).
2828
2829         * inspector/front-end/DetailedHeapshotView.js:
2830         * inspector/front-end/ElementsPanel.js:
2831         * inspector/front-end/JavaScriptSourceFrame.js:
2832         (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover.showObjectPopover):
2833         (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover):
2834         (WebInspector.JavaScriptSourceFrame.prototype._onKeyDown):
2835         * inspector/front-end/NetworkPanel.js:
2836         * inspector/front-end/ObjectPopoverHelper.js:
2837         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover.showObjectPopover.):
2838         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
2839         * inspector/front-end/Popover.js:
2840         (WebInspector.PopoverHelper.prototype.isPopoverVisible):
2841         * inspector/front-end/TimelinePanel.js:
2842
2843 2012-03-22  Pavel Feldman  <pfeldman@chromium.org>
2844
2845         Web Inspector: breakpoints should shift when line break is inserted in the middle of the line.
2846         https://bugs.webkit.org/show_bug.cgi?id=81896
2847
2848         Reviewed by Vsevolod Vlasov.
2849
2850         There is a bug that collapses selection prior to exiting change mode, we should never
2851         collapse edit area prior committing.
2852
2853         * inspector/front-end/TextEditorModel.js:
2854         (WebInspector.TextEditorModel.endsWithBracketRegex.):
2855         * inspector/front-end/TextViewer.js:
2856         (WebInspector.TextViewer):
2857         (WebInspector.TextEditorMainPanel.prototype.highlightLine):
2858         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.callback):
2859         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo):
2860
2861 2012-03-22  Zoltan Herczeg  <zherczeg@webkit.org>
2862
2863         Merge SVGImageBufferTools to SVGRenderingContext
2864         https://bugs.webkit.org/show_bug.cgi?id=81890
2865
2866         Reviewed by Nikolas Zimmermann.
2867
2868         Copy the code to SVGRenderingContext and delete
2869         SVGImageBufferTools[.cpp.h]. Update build systems,
2870         no functionality change. This is the first step
2871         towards making SVGImageBufferTools stageful.
2872
2873         Existing tests cover this issue.
2874
2875         * CMakeLists.txt:
2876         * GNUmakefile.list.am:
2877         * Target.pri:
2878         * WebCore.gypi:
2879         * WebCore.xcodeproj/project.pbxproj:
2880         * platform/graphics/filters/FETile.cpp:
2881         (WebCore::FETile::platformApplySoftware):
2882         * rendering/svg/RenderSVGAllInOne.cpp:
2883         * rendering/svg/RenderSVGInlineText.cpp:
2884         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
2885         * rendering/svg/RenderSVGResourceClipper.cpp:
2886         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
2887         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
2888         * rendering/svg/RenderSVGResourceFilter.cpp:
2889         (WebCore::RenderSVGResourceFilter::applyResource):
2890         * rendering/svg/RenderSVGResourceGradient.cpp:
2891         (WebCore::createMaskAndSwapContextForTextGradient):
2892         (WebCore::clipToTextMask):
2893         * rendering/svg/RenderSVGResourceMasker.cpp:
2894         (WebCore::RenderSVGResourceMasker::applyResource):
2895         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
2896         * rendering/svg/RenderSVGResourcePattern.cpp:
2897         (WebCore::RenderSVGResourcePattern::applyResource):
2898         (WebCore::RenderSVGResourcePattern::createTileImage):
2899         * rendering/svg/SVGImageBufferTools.cpp: Removed.
2900         * rendering/svg/SVGImageBufferTools.h: Removed.
2901         * rendering/svg/SVGInlineTextBox.cpp:
2902         * rendering/svg/SVGRenderingContext.cpp:
2903         (WebCore::currentContentTransformation):
2904         (WebCore):
2905         (WebCore::SVGRenderingContext::calculateTransformationToOutermostSVGCoordinateSystem):
2906         (WebCore::SVGRenderingContext::createImageBuffer):
2907         (WebCore::SVGRenderingContext::createImageBufferForPattern):
2908         (WebCore::SVGRenderingContext::renderSubtreeToImageBuffer):
2909         (WebCore::SVGRenderingContext::clipToImageBuffer):
2910         (WebCore::SVGRenderingContext::clampedAbsoluteTargetRect):
2911         (WebCore::SVGRenderingContext::clampedAbsoluteSize):
2912         (WebCore::SVGRenderingContext::clear2DRotation):
2913         * rendering/svg/SVGRenderingContext.h:
2914         (SVGRenderingContext):
2915         (WebCore::SVGRenderingContext::calculateImageBufferRect):
2916         * svg/graphics/filters/SVGFEImage.cpp:
2917         (WebCore::FEImage::platformApplySoftware):
2918
2919 2012-03-22  Hyowon Kim  <hw1008.kim@samsung.com>
2920
2921         [EFL] Add PageClientEfl to WebCoreSupport.
2922         https://bugs.webkit.org/show_bug.cgi?id=80748
2923
2924         Reviewed by Noam Rosenthal.
2925
2926         * platform/Widget.h: Use PageClientEfl as type for PlatformPageClient.
2927         (WebCore):
2928         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2929         (WebCore::GraphicsContext3DPrivate::createSurface): Change the argument type.
2930         * plugins/efl/PluginViewEfl.cpp:
2931         (WebCore::PluginView::platformGetValue): Use PageClientEfl.
2932
2933 2012-03-22  Kaustubh Atrawalkar  <kaustubh@motorola.com>
2934
2935         blur() on shadow host should work when a shadow host contains a focused element in its shadow DOM subtrees
2936         https://bugs.webkit.org/show_bug.cgi?id=81102
2937
2938         Reviewed by Hajime Morita.
2939
2940         This implementation will support blur for a focused element when its shadowHost's blur() is called.
2941         To achieve this Element::blur() function is modified to blur the focused node in it's treeScope.
2942
2943         Test: fast/dom/shadow/shadow-root-blur.html
2944
2945         * dom/Element.cpp:
2946         (WebCore::Element::blur): Modified to blur current treeScope's focused node.
2947         * dom/ShadowRoot.h:
2948         (WebCore::ShadowRoot::activeElement): Rework for code sharing.
2949         * dom/TreeScope.cpp:
2950         (WebCore::TreeScope::focusedNode): Added new function to share code for getting focused node.
2951         * dom/TreeScope.h:
2952         (TreeScope): New function declartion.
2953         * html/HTMLDocument.cpp:
2954         (WebCore::HTMLDocument::activeElement): Rework for code sharing.
2955
2956 2012-03-22  Vsevolod Vlasov  <vsevik@chromium.org>
2957
2958         Web Inspector: RawSourceCode does not need uiSourceCode lists because it never has more than one.
2959         https://bugs.webkit.org/show_bug.cgi?id=81894
2960
2961         RawSourceCode never has more than one uiSourceCode, uiSourceCodeList
2962         are just remains of older implementation. This patch switches RawSourceCode
2963         and SourceMappings from uiSourceCodeList to uiSourceCode.
2964
2965         Reviewed by Pavel Feldman.
2966
2967         * inspector/front-end/RawSourceCode.js:
2968         (WebInspector.RawSourceCode.prototype.uiSourceCode):
2969         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
2970         (WebInspector.RawSourceCode.SourceMapping.prototype.uiLocationToRawLocation):
2971         (WebInspector.RawSourceCode.SourceMapping.prototype.uiSourceCode):
2972         (WebInspector.RawSourceCode.PlainSourceMapping):
2973         (WebInspector.RawSourceCode.PlainSourceMapping.prototype.rawLocationToUILocation):
2974         (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiLocationToRawLocation):
2975         (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiSourceCode):
2976         (WebInspector.RawSourceCode.FormattedSourceMapping):
2977         (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.rawLocationToUILocation):
2978         (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation):
2979         (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiSourceCode):
2980         * inspector/front-end/ResourceScriptMapping.js:
2981         (WebInspector.ResourceScriptMapping.prototype.uiSourceCodeList):
2982         (WebInspector.ResourceScriptMapping.prototype.addScript):
2983         (WebInspector.ResourceScriptMapping.prototype._handleUISourceCodeChanged):
2984         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged):
2985         (WebInspector.ResourceScriptMapping.prototype.reset):
2986
2987 2012-03-22  Mario Sanchez Prada  <msanchez@igalia.com>
2988
2989         [GTK] Fix the only remaining coding style issue in GTK accessibility code
2990         https://bugs.webkit.org/show_bug.cgi?id=81885
2991
2992         Reviewed by Xan Lopez.
2993
2994         Add needed extra line and remove an unneeded one.
2995
2996         * accessibility/gtk/AccessibilityObjectAtk.cpp:
2997
2998 2012-03-22  Kent Tamura  <tkent@chromium.org>
2999
3000         Expand RenderTextControlSingleLine::controlClipRect() to contain contentRect().
3001         https://bugs.webkit.org/show_bug.cgi?id=81866
3002
3003         Reviewed by Hajime Morita.
3004
3005         We need to expand the controlClipRect because the existing shadow
3006         tree of a text field can be wrapped by another shadow tree. e.g.
3007
3008         A current situation:
3009
3010         <input>
3011           ┗ ShadowRoot
3012              ┗ container element
3013         ┌────────────┐<input>'s border box
3014         │┌──────────┐│
3015         ││container box       ││
3016         │└──────────┘│
3017         └────────────┘
3018
3019         Wrapped by another ShadowRoot:
3020
3021         <input>
3022           ┗ New ShadowRoot
3023              ┣ <shadow> represents the existing shadow tree
3024              ┃  ┗ container element
3025              ┗ D: an additional decoration element
3026         ┌────────────┐<input>'s border box
3027         │┌───────┬──┐│
3028         ││container box │ D  ││
3029         │└───────┴──┘│
3030         └────────────┘
3031         In this case, if we clip child renderers by container box, D is not
3032         drawn. We should clip by the content box of the <input>.
3033
3034         A search field has an exceptional behavior. It can have the container
3035         box of which height is taller than the content box height. The
3036         controlClipRect should contain both of the container box and the content
3037         box in this case. In other cases, the container box is equivalent to the
3038         content box. So the code always unites them.
3039
3040         No new tests. This won't make any behavior change for now.
3041
3042         * rendering/RenderTextControlSingleLine.cpp:
3043         (WebCore::RenderTextControlSingleLine::controlClipRect):
3044
3045 2012-03-22  Yoshifumi Inoue  <yosin@chromium.org>
3046
3047         [Forms] The option element should not be form associated element.
3048         https://bugs.webkit.org/show_bug.cgi?id=79764
3049
3050         Reviewed by Kent Tamura.
3051
3052         This patch changes base class of HTMLOptionELement to HTMLElement
3053         from HTMLFormControlElement for saving memory space and iteration
3054         time of extra "option" elements in HTMLFormElement::m_formAssociatedElements
3055         and matching the HTML5 specification for ease of maintenance.
3056
3057         This patch changes behavior of handling of CSS pseudo classes "invalid"
3058         and "valid". The "option" elements no longer use these CSS pseudo classes
3059         as HTML5 specification. This bug was filed in https://bugs.webkit.org/show_bug.cgi?id=80088
3060
3061         Changes of TextIterator is lead by usage of isFormControlElement. This
3062         changes will be replaced with more meaningful predicate as part of
3063         https://bugs.webkit.org/show_bug.cgi?id=80381
3064
3065         No new tests but updated select-live-pseudo-selectors.html test.
3066
3067         * css/CSSStyleSelector.cpp:
3068         (WebCore::CSSStyleSelector::canShareStyleWithElement): Added checking of the "option" element and returns false as HTMLFormControlElement.
3069         * css/SelectorChecker.cpp:
3070         (WebCore::SelectorChecker::checkOneSelector): Removed isFormControlElement for PseudoDisabled and PseudoChecked.
3071         * html/HTMLKeygenElement.cpp:
3072         (WebCore::HTMLKeygenElement::HTMLKeygenElement): Removed form parameter of call site of HTMLOptionElement::create.
3073         * html/HTMLOptionElement.cpp:
3074         (WebCore::HTMLOptionElement::HTMLOptionElement): Removed form parameter which no longer needed. Changed base class in initialization list. Added m_disabled initialization.
3075         (WebCore::HTMLOptionElement::create): Removed form parameter which no longer needed.
3076         (WebCore::HTMLOptionElement::attach): Changeid base class.
3077         (WebCore::HTMLOptionElement::detach): Changed base class.
3078         (WebCore::HTMLOptionElement::parseAttribute): Changed base class. Added "disabled" attribute handling.
3079         (WebCore::HTMLOptionElement::childrenChanged): Changed base class.
3080         (WebCore::HTMLOptionElement::insertedIntoTree): Changed base class.
3081         * html/HTMLOptionElement.h:
3082         (HTMLOptionElement): Added new member variable m_disabled which was in HTMLFormControlElement.
3083         (WebCore::HTMLOptionElement::ownElementDisabled): Changed for using m_disabled.
3084         * html/HTMLTagNames.in: Removed constructorNeedsFormElement for the "option" element, which was used for passing form parameter to create function.
3085
3086 2012-03-21  Pavel Podivilov  <podivilov@chromium.org>
3087
3088         Web Inspector: rename ClosureCompilerSourceMapping to SourceMapParser and move it to CompilerScriptMapping.js.
3089         https://bugs.webkit.org/show_bug.cgi?id=81780
3090
3091         Reviewed by Pavel Feldman.
3092
3093         * WebCore.gypi:
3094         * WebCore.vcproj/WebCore.vcproj:
3095         * inspector/compile-front-end.py:
3096         * inspector/front-end/CompilerScriptMapping.js:
3097         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
3098         (WebInspector.SourceMapParserPayload):
3099         (WebInspector.SourceMapParser):
3100         (WebInspector.SourceMapParser.prototype.load):
3101         (WebInspector.SourceMapParser.prototype.compiledLocationToSourceLocation):
3102         (WebInspector.SourceMapParser.prototype.sourceLocationToCompiledLocation):
3103         (WebInspector.SourceMapParser.prototype.sources):
3104         (WebInspector.SourceMapParser.prototype.loadSourceCode):
3105         (WebInspector.SourceMapParser.prototype._findMapping):
3106         (WebInspector.SourceMapParser.prototype._parseMappingPayload):
3107         (WebInspector.SourceMapParser.prototype._parseSections):
3108         (WebInspector.SourceMapParser.prototype._parseMap):
3109         (WebInspector.SourceMapParser.prototype._isSeparator):
3110         (WebInspector.SourceMapParser.prototype._decodeVLQ):
3111         (WebInspector.SourceMapParser.prototype._canonicalizeURL):
3112         (WebInspector.SourceMapParser.StringCharIterator):
3113         (WebInspector.SourceMapParser.StringCharIterator.prototype.next):
3114         (WebInspector.SourceMapParser.StringCharIterator.prototype.peek):
3115         (WebInspector.SourceMapParser.StringCharIterator.prototype.hasNext):
3116         * inspector/front-end/CompilerSourceMapping.js: Removed.
3117         * inspector/front-end/WebKit.qrc:
3118         * inspector/front-end/inspector.html:
3119
3120 2012-03-21  Vsevolod Vlasov  <vsevik@chromium.org>
3121
3122         Web Inspector: IndexedDB transaction is not closed when requesting data.
3123         https://bugs.webkit.org/show_bug.cgi?id=81837
3124
3125         Reviewed by Pavel Feldman.
3126
3127         * inspector/InspectorIndexedDBAgent.cpp: Added missing IDBCursorBackendInterface::postSuccessHandlerCallback() call.
3128         (WebCore):
3129
3130 2012-03-21  Yury Semikhatsky  <yurys@chromium.org>
3131
3132         Web Inspector: event listeners section is broken for about:blank page
3133         https://bugs.webkit.org/show_bug.cgi?id=81795
3134
3135         Parse about:blank as a valid URL.
3136
3137         Reviewed by Pavel Feldman.
3138
3139         Test: inspector/elements/event-listeners-about-blank.html
3140
3141         * inspector/front-end/utilities.js:
3142         (String.prototype.asParsedURL):
3143
3144 2012-03-21  Dan Bernstein  <mitz@apple.com>
3145
3146         REGRESSION (r111635): Assertion failure in RenderFlexibleBox::layoutFlexItems() (!lineContexts.size()) in many flexbox tests
3147         https://bugs.webkit.org/show_bug.cgi?id=81870
3148
3149         Reverted r111635, the fix for bug 81843.
3150
3151         * rendering/RenderFlexibleBox.cpp:
3152         (WebCore::RenderFlexibleBox::WrapReverseContext::WrapReverseContext):
3153         (WebCore::RenderFlexibleBox::WrapReverseContext::addCrossAxisOffset):
3154         (RenderFlexibleBox::WrapReverseContext):
3155         (WebCore::RenderFlexibleBox::WrapReverseContext::addNumberOfChildrenOnLine):
3156         (WebCore::RenderFlexibleBox::WrapReverseContext::lineCrossAxisDelta):
3157         (WebCore::RenderFlexibleBox::layoutFlexItems):
3158         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
3159         (WebCore::RenderFlexibleBox::alignChildren):
3160         (WebCore::RenderFlexibleBox::flipForWrapReverse):
3161         * rendering/RenderFlexibleBox.h:
3162
3163 2012-03-21  Emil A Eklund  <eae@chromium.org>
3164
3165         Unreviewed change touching CustomFilterProgram.h to try
3166         to force the chromium-win bots to rebuilt it and pick up
3167         on the fact that CSS_SHADERS is not set (since r111610). 
3168
3169         * platform/graphics/filters/CustomFilterProgram.h:
3170
3171 2012-03-21  Vangelis Kokkevis  <vangelis@chromium.org>
3172
3173         [chromium] FPS counter causes garbage to be displayed at top left corner
3174         https://bugs.webkit.org/show_bug.cgi?id=81851
3175
3176         The HUD expects the PlatformCanvas it paints on to be cleared on creation which is
3177         no longer true after http://src.chromium.org/viewvc/chrome?view=rev&revision=127196 .
3178         This patch does an explicit clearRect before the HUD contents are painted.
3179
3180         Reviewed by Adrienne Walker.
3181
3182         TEST=Manually verified that --show-fps-counter and --show-composited-layer-tree work correctly.
3183
3184         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
3185         (WebCore::CCHeadsUpDisplay::draw):
3186
3187 2012-03-21  Ryosuke Niwa  <rniwa@webkit.org>
3188
3189         Touch a file to make Chromium Windows bots happy.
3190
3191         * css/CSSValueKeywords.in:
3192
3193 2012-03-19  Igor Oliveira  <igor.o@sisa.samsung.com>
3194
3195         Every call to RenderObject::setAnimatableStyle() iterates through all m_compositeAnimations: potentially O(N^2)
3196         https://bugs.webkit.org/show_bug.cgi?id=38025
3197
3198         Implement updateAnimationTimerForRender. This reduces unnecessary animation
3199         steps on the current RenderObject by checking the value of timeToNextService
3200         before starting a new timer.
3201
3202         Reviewed by Dean Jackson.
3203
3204         Test: animations/animation-welcome-safari.html
3205
3206         * page/animation/AnimationController.cpp:
3207         (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
3208         (WebCore):
3209         (WebCore::AnimationController::updateAnimations):
3210         * page/animation/AnimationControllerPrivate.h:
3211         (AnimationControllerPrivate):
3212
3213 2012-03-21  Sheriff Bot  <webkit.review.bot@gmail.com>
3214
3215         Unreviewed, rolling out r111616.
3216         http://trac.webkit.org/changeset/111616
3217         https://bugs.webkit.org/show_bug.cgi?id=81862
3218
3219         broke chromium mac (Requested by eae on #webkit).
3220
3221         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3222         (WebCore::CCLayerImpl::appendQuads):
3223         * platform/graphics/chromium/cc/CCLayerImpl.h:
3224         (CCLayerImpl):
3225         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3226         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
3227         (WebCore::CCLayerTreeHostImpl::drawLayers):
3228         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3229         (CCLayerTreeHostImpl):
3230         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
3231         (WebCore::CCQuadCuller::append):
3232         * platform/graphics/chromium/cc/CCQuadCuller.h:
3233         (CCQuadCuller):
3234         * platform/graphics/chromium/cc/CCRenderPass.cpp:
3235         (WebCore::CCRenderPass::appendQuadsForLayer):
3236         * platform/graphics/chromium/cc/CCRenderPass.h:
3237         (CCRenderPass):
3238         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
3239         (WebCore::CCScrollbarLayerImpl::appendQuads):
3240         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
3241         (CCScrollbarLayerImpl):
3242         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3243         (WebCore::CCSingleThreadProxy::doComposite):
3244         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
3245         (WebCore::CCSolidColorLayerImpl::appendQuads):
3246         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
3247         (CCSolidColorLayerImpl):
3248         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
3249         (WebCore::CCTextureLayerImpl::appendQuads):
3250         * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
3251         (CCTextureLayerImpl):
3252         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3253         (WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
3254         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3255         (WebCore::CCTiledLayerImpl::appendQuads):
3256         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3257         (CCTiledLayerImpl):
3258         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
3259         (WebCore::CCVideoLayerImpl::appendQuads):
3260         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
3261         (CCVideoLayerImpl):
3262
3263 2012-03-21  Beth Dakin  <bdakin@apple.com>
3264
3265         https://bugs.webkit.org/show_bug.cgi?id=80322
3266         Implement image-set
3267
3268         Reviewed by Dean Jackson.
3269
3270         This initial implementation of -webkit-image-set. 
3271         http://lists.w3.org/Archives/Public/www-style/2012Feb/1103.html
3272         The idea behind the feature is to allow authors to provide multiple variants 
3273         of the same image at differing resolutions, and to allow the User Agent to 
3274         choose the resource that is most appropriate at the time. This patch will 
3275         choose the most appropriate image based on device scale factor.
3276
3277         CSSImageSetValue inherits from CSSValueList and behaves a lot like 
3278         CSSImageValue.
3279         * WebCore.xcodeproj/project.pbxproj:
3280         * css/CSSImageSetValue.h: Added.
3281         (WebCore):
3282         (CSSImageSetValue):
3283         (WebCore::CSSImageSetValue::create):
3284         (WebCore::CSSImageSetValue::isPending):
3285         (ImageWithScale):
3286         (WebCore::CSSImageSetValue::compareByScaleFactor):
3287         * css/CSSImageSetValue.cpp: Added.
3288         (WebCore):
3289         (WebCore::CSSImageSetValue::CSSImageSetValue):
3290         (WebCore::CSSImageSetValue::~CSSImageSetValue):
3291         (WebCore::CSSImageSetValue::cachedOrPendingImageSet):
3292         (WebCore::CSSImageSetValue::customCssText):
3293
3294         fillImageSet() iterates through the value list and turns the information into 
3295         a sorted Vector of ImageWithScales (which is a struct containing image URLs 
3296         and scale factors).
3297         (WebCore::CSSImageSetValue::fillImageSet):
3298
3299         cachedImageSet() finds which image is most appropriate based on the device 
3300         scale factor, and it loads only that image. In the future, additional scale 
3301         factors will be taken into account.
3302         (WebCore::CSSImageSetValue::bestImageForScaleFactor):
3303         (WebCore::CSSImageSetValue::cachedImageSet):
3304
3305         parseImageSet() is called everywhere in the CSSParser that a regular image or 
3306         generated image can be found.
3307         * css/CSSParser.cpp:
3308         (WebCore::CSSParser::parseValue):
3309         (WebCore::CSSParser::parseContent):
3310         (WebCore::CSSParser::parseFillImage):
3311         (WebCore::CSSParser::parseBorderImage):
3312         (WebCore):
3313         (WebCore::CSSParser::parseImageSet):
3314         * css/CSSParser.h:
3315
3316         Since CSSImageSetValue is implemented as a value list, 
3317         ApplyPropertyFillLayer::applyValue() needs to be more specific when it's 
3318         looking for a list of multiple URLs.
3319         * css/CSSStyleApplyProperty.cpp:
3320         (WebCore::ApplyPropertyFillLayer::applyValue):
3321
3322         Handle image-set as a valid image value.
3323         * css/CSSStyleSelector.cpp:
3324         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3325         * css/CSSStyleSelector.h:
3326         (CSSStyleSelector):
3327         * css/CSSValue.cpp:
3328         (WebCore::CSSValue::cssText):
3329         (WebCore::CSSValue::destroy):
3330         * css/CSSValue.h:
3331         (CSSValue):
3332         (WebCore::CSSValue::isImageSetValue):
3333
3334         computeIntrinsicDimensions() now takes an optional scaleFactor parameter that represents the author-enforced "intrinsic" scale factor of the image.
3335         * loader/cache/CachedImage.cpp:
3336         (WebCore::CachedImage::computeIntrinsicDimensions):
3337         * loader/cache/CachedImage.h:
3338         (CachedImage):
3339         * platform/graphics/GeneratedImage.h:
3340         (GeneratedImage):
3341         * platform/graphics/GeneratorGeneratedImage.cpp:
3342         (WebCore::GeneratedImage::computeIntrinsicDimensions):
3343         * platform/graphics/Image.cpp:
3344         (WebCore::Image::computeIntrinsicDimensions):
3345         * platform/graphics/Image.h:
3346         (Image):
3347         * platform/graphics/cg/PDFDocumentImage.cpp:
3348         (WebCore::PDFDocumentImage::computeIntrinsicDimensions):
3349         * platform/graphics/cg/PDFDocumentImage.h:
3350         (PDFDocumentImage):
3351         * svg/graphics/SVGImage.cpp:
3352         (WebCore::SVGImage::computeIntrinsicDimensions):
3353         * svg/graphics/SVGImage.h:
3354         (SVGImage):
3355
3356         Inherits from StyleImage and returns a scaled size for imageSize() and 
3357         computeIntrinsicDimensions().
3358         * rendering/style/StyleCachedImageSet.cpp: Added.
3359         (WebCore):
3360         (WebCore::StyleCachedImageSet::StyleCachedImageSet):
3361         (WebCore::StyleCachedImageSet::cssValue):
3362         (WebCore::StyleCachedImageSet::canRender):
3363         (WebCore::StyleCachedImageSet::isLoaded):
3364         (WebCore::StyleCachedImageSet::errorOccurred):
3365         (WebCore::StyleCachedImageSet::imageSize):
3366         (WebCore::StyleCachedImageSet::imageHasRelativeWidth):
3367         (WebCore::StyleCachedImageSet::imageHasRelativeHeight):
3368         (WebCore::StyleCachedImageSet::computeIntrinsicDimensions):
3369         (WebCore::StyleCachedImageSet::usesImageContainerSize):
3370         (WebCore::StyleCachedImageSet::setContainerSizeForRenderer):
3371         (WebCore::StyleCachedImageSet::addClient):
3372         (WebCore::StyleCachedImageSet::removeClient):
3373         (WebCore::StyleCachedImageSet::image):
3374         * rendering/style/StyleCachedImageSet.h: Added.
3375         (WebCore):
3376         (StyleCachedImageSet):
3377         (WebCore::StyleCachedImageSet::create):
3378         (WebCore::StyleCachedImageSet::data):
3379         (WebCore::StyleCachedImageSet::cachedImage):
3380
3381         Handle image-set.
3382         * rendering/style/StyleImage.h:
3383         (WebCore::StyleImage::isCachedImageSet):
3384         (WebCore::StyleImage::StyleImage):
3385         (StyleImage):
3386         * rendering/style/StylePendingImage.h:
3387         (StylePendingImage):
3388         (WebCore::StylePendingImage::cssImageSetValue):
3389
3390 2012-03-21  David Barton  <dbarton@mathscribe.com>
3391
3392         MathML internals - improve naming in RenderMathMLSquareRoot.cpp and RenderMathMLRoot.cpp
3393         https://bugs.webkit.org/show_bug.cgi?id=81850
3394
3395         Reviewed by Eric Seidel.
3396
3397         This prepares these files for bug fixes, and eventually combining their common code. To
3398         understand this patch, I suggest you start with RenderMathMLSquareRoot.cpp, as it's
3399         simpler than RenderMathMLRoot.cpp.
3400
3401         No new tests. LayoutTests/mathml/presentation/roots.xhtml is thorough enough for this.
3402
3403         * rendering/mathml/RenderMathMLRoot.cpp:
3404         (WebCore):
3405         (WebCore::RenderMathMLRoot::addChild):
3406         (WebCore::RenderMathMLRoot::paint):
3407         (WebCore::RenderMathMLRoot::layout):
3408         * rendering/mathml/RenderMathMLRoot.h:
3409         (WebCore):
3410         (RenderMathMLRoot):
3411         * rendering/mathml/RenderMathMLSquareRoot.cpp:
3412         (WebCore):
3413         (WebCore::RenderMathMLSquareRoot::paint):
3414         (WebCore::RenderMathMLSquareRoot::layout):
3415         * rendering/mathml/RenderMathMLSquareRoot.h:
3416         (WebCore):
3417         (RenderMathMLSquareRoot):
3418         * rendering/mathml/RenderMathMLSubSup.h:
3419         (WebCore):
3420
3421 2012-03-21  Tony Chang  <tony@chromium.org>
3422
3423         refactor flexbox in preparation for flex-line-pack
3424         https://bugs.webkit.org/show_bug.cgi?id=81843
3425
3426         Reviewed by Ojan Vafai.
3427
3428         Replace WrapReverseContext with a vector of LineContexts that contain
3429         the same information, plus values needed for flex-align.
3430
3431         alignChildren has been moved to after all the lines have been
3432         positioned. We want to align children after flex-line-pack has changed
3433         the size of each line to avoid unnecessary layouts.
3434
3435         No new tests, just refactoring.
3436
3437         * rendering/RenderFlexibleBox.cpp:
3438         (WebCore::RenderFlexibleBox::LineContext::LineContext): New struct,
3439         holds information needed for wrap-reverse and aligning children.
3440         (RenderFlexibleBox::LineContext):
3441         (WebCore::RenderFlexibleBox::layoutFlexItems): alignChildren after layout out all the lines rather than after each line.
3442         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): don't alignChildren
3443         (WebCore::RenderFlexibleBox::alignChildren): align all flex items, not just a line at a time.
3444         (WebCore::RenderFlexibleBox::flipForWrapReverse): Update to use LineContext
3445         * rendering/RenderFlexibleBox.h:
3446
3447 2012-03-21  Ryosuke Niwa  <rniwa@webkit.org>
3448
3449         BDI element should have dir=auto by default
3450         https://bugs.webkit.org/show_bug.cgi?id=68773
3451
3452         Reviewed by Daniel Bates.
3453
3454         Treat bdi elements without dir content attribute as if they have dir=auto per spec: