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