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