11bb6b958a1cbb941739e50ae1c42cb7c76c8bb8
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-12-10  Zoltan Nyul  <zoltan.nyul@intel.com>
2
3         Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner
4         https://bugs.webkit.org/show_bug.cgi?id=103886
5
6         Reviewed by Kenneth Rohde Christiansen.
7
8         Export symbol for WebCore::Page::setViewMode on Mac.
9
10         No new tests, no behavior change for layout tests.
11
12         * WebCore.exp.in:
13
14 2012-12-10  Martin Robinson  <mrobinson@igalia.com>
15
16         [GTK] Bring Harfbuzz-ng support to Gtk
17         https://bugs.webkit.org/show_bug.cgi?id=92098
18
19         Reviewed by Gustavo Noronha Silva.
20
21         Enable HarfBuzz support by default. With the Freetype backend we no longer
22         fall back to Pango for rendering complex text.
23
24         No new tests. This is covered by existing tests.
25
26         * GNUmakefile.am: Add HarfBuzz include directories and define.
27         * GNUmakefile.list.am: Add HarfBuzz files to source list and remove
28         Pango ones.
29         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
30         (WebCore::FontPlatformData::operator==): To properly render fallback
31         fonts via HarfBuzz , it's important that we actually ask Fontconfig
32         whether or not two patterns are the same. This ensures that when patterns
33         are just copies of one another they only take up one slot in the font cache
34         and appear to be the same font to HarfBuzzShaper.
35
36 2012-12-10  Alexander Pavlov  <apavlov@chromium.org>
37
38         Web Inspector: [Overrides] Unable to change values in Device Metrics override setting
39         https://bugs.webkit.org/show_bug.cgi?id=104542
40
41         Reviewed by Vsevolod Vlasov.
42
43         Remove inadvertent object property assignment.
44
45         * inspector/front-end/OverridesView.js:
46
47 2012-12-10  Michael BrĂ¼ning  <michael.bruning@digia.com>
48
49         [Qt] Builds for Mac are tied to the OS system instead of the SDK version.
50         https://bugs.webkit.org/show_bug.cgi?id=104529
51
52         Reviewed by Simon Hausmann.
53
54         Using work by Eike Ziller <eike.ziller@digia.com>.
55
56         The build system now first tries to assign the correct system libraries
57         for the SDK being used for Mac builds. If this does not yield any
58         result, it falls back to using the Mac OS version to determine the
59         correct library.
60
61         No new tests (not applicable).
62
63         * WebCore.pri:
64
65 2012-12-10  Ilya Tikhonovsky  <loislo@chromium.org>
66
67         Unreviewed: touch RenderingAllInOne.cpp to fix Apple Windows builder.
68
69         * rendering/RenderingAllInOne.cpp:
70
71 2012-12-10  Eugene Klyuchnikov  <eustas@chromium.org>
72
73         Web Inspector: Network: newly added items are not filtered.
74         https://bugs.webkit.org/show_bug.cgi?id=104021
75
76         Reviewed by Vsevolod Vlasov.
77
78         Extracted method to higlight/hide record according to filter.
79         Used this method to process newly created records.
80
81         * inspector/front-end/NetworkPanel.js:
82         (WebInspector.NetworkLogView.prototype._applyFilter): Extracted.
83         (WebInspector.NetworkLogView.prototype.performFilter): Refactored.
84
85 2012-12-09  Ilya Tikhonovsky  <loislo@chromium.org>
86
87         Web Inspector: Unreviewed: move reportMemoryUsage to public section.
88
89         * rendering/RenderBlock.h:
90         (RenderBlock):
91         * rendering/RenderBox.h:
92         (RenderBox):
93
94 2012-12-08  Pavel Feldman  <pfeldman@chromium.org>
95
96         Web Inspector: adds an option to remove toolbar icons.
97         https://bugs.webkit.org/show_bug.cgi?id=95654
98
99         Reviewed by Vsevolod Vlasov.
100
101         - removes compact mode in favor or dock-to-bottom
102         - introduces setting for hiding toolbar icons
103
104         * inspector/front-end/DockController.js:
105         (WebInspector.DockController.prototype._toggleDockState):
106         * inspector/front-end/Settings.js:
107         (WebInspector.ExperimentsSettings):
108         * inspector/front-end/Toolbar.js:
109         (WebInspector.Toolbar.prototype.setDockedToBottom):
110         (WebInspector.Toolbar.prototype._toolbarDragStart):
111         (WebInspector.Toolbar.prototype._toolbarDrag):
112         * inspector/front-end/helpScreen.css:
113         (body.dock-to-bottom .help-content):
114         * inspector/front-end/inspector.css:
115         (body.dock-to-bottom #toolbar):
116         (body.no-toolbar-icons #toolbar):
117         (body.dock-to-bottom.port-qt #toolbar):
118         (body.dock-to-bottom.inactive #toolbar):
119         (body.no-toolbar-icons .toolbar-item.toggleable):
120         (body.dock-to-bottom .toolbar-item.toggleable):
121         (body.dock-to-bottom .toolbar-icon):
122         (body.no-toolbar-icons .toolbar-icon):
123         (body.no-toolbar-icons #main):
124         (body.dock-to-bottom .toolbar-icon.custom-toolbar-icon):
125         (body.dock-to-bottom .toolbar-item:active .toolbar-icon):
126         (body.dock-to-bottom .toolbar-label):
127         (body.dock-to-bottom #search-toolbar-label):
128         (body.no-toolbar-icons .toolbar-label):
129         (body.no-toolbar-icons #toolbar-dropdown):
130         (#toolbar-dropdown .scrollable-content):
131         (#toolbar-dropdown .toolbar-item.toggleable:hover):
132         (body.no-toolbar-icons #toolbar-dropdown .toolbar-label):
133         (body.no-toolbar-icons #toolbar-dropdown .toolbar-item):
134         (body.dock-to-bottom .toolbar-item.resources .toolbar-icon):
135         (body.dock-to-bottom .toolbar-item.network .toolbar-icon):
136         (body.dock-to-bottom .toolbar-item.scripts .toolbar-icon):
137         (body.dock-to-bottom .toolbar-item.timeline .toolbar-icon):
138         (body.dock-to-bottom .toolbar-item.profiles .toolbar-icon):
139         (body.dock-to-bottom .toolbar-item.audits .toolbar-icon):
140         (body.dock-to-bottom .toolbar-item.console .toolbar-icon):
141         (body.dock-to-bottom.port-qt .toolbar-item.close-left, body.dock-to-bottom.port-qt .toolbar-item.close-right):
142         (body.dock-to-bottom #main):
143
144 2012-12-10  Kent Tamura  <tkent@chromium.org>
145
146         Refactoring: Remove HTMLFormControlElement::autofocus
147         https://bugs.webkit.org/show_bug.cgi?id=104524
148
149         Reviewed by Kentaro Hara.
150
151         autofocus function is used only by HTMLFormControlElement itself, no
152         sub-classes override it, and it is not exposed via an IDL attribute,
153
154         No new tests. This doesn't make any behavior changes.
155
156         * html/HTMLFormControlElement.cpp:
157         (WebCore::shouldAutofocus): Use fastHasAttribute instead of autofocus().
158         * html/HTMLFormControlElement.h: Remove autofocus().
159
160 2012-12-10  Jonathan Liu  <net147@gmail.com>
161
162         Fix GC3Dintptr and GC3Dsizeiptr typedefs for Win64
163         https://bugs.webkit.org/show_bug.cgi?id=104426
164
165         Reviewed by Simon Hausmann.
166
167         The GC3Dintptr and GC3Dsizeiptr typedefs are incorrect for Win64 as
168         LLP64 is used there. This would result in compile error due to
169         narrowing conversion of 64-bit pointer to signed long int which is
170         32-bit.
171
172         * platform/graphics/GraphicsTypes3D.h:
173
174 2012-12-10  Kent Tamura  <tkent@chromium.org>
175
176         Refactoring: Introduce HTMLFormControlElement::isDisabledOrReadOnly
177         https://bugs.webkit.org/show_bug.cgi?id=104508
178
179         Reviewed by Kentaro Hara.
180
181         We have a lot of code like element->disabled || element->readOnly().
182         isDisabledOrReadOnly makes them simpler.
183
184         No new tests. This make no behaivor change.
185
186         * html/HTMLFormControlElement.h:
187         (WebCore::HTMLFormControlElement::isDisabledOrReadOnly):
188         Added. Note that the implmentation of disabled() is not just "return m_disabled;".
189
190         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
191         (WebCore::BaseChooserOnlyDateAndTimeInputType::handleDOMActivateEvent):
192         Use isDisabledOrReadOnly.
193         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
194         (WebCore::BaseMultipleFieldsDateAndTimeInputType::shouldSpinButtonRespondToMouseEvents): Ditto.
195         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isPickerIndicatorOwnerDisabledOrReadOnly): Ditto.
196         * html/ColorInputType.cpp:
197         (WebCore::ColorInputType::handleDOMActivateEvent): Ditto.
198         (WebCore::ColorInputType::didChooseColor): Ditto.
199         * html/HTMLFormControlElement.cpp:
200         (WebCore::HTMLFormControlElement::recalcWillValidate): Ditto.
201         * html/HTMLTextAreaElement.h:
202         (WebCore::HTMLTextAreaElement::valueMissing): Ditto.
203         * html/RangeInputType.cpp:
204         (WebCore::RangeInputType::handleMouseDownEvent): Ditto.
205         (WebCore::RangeInputType::handleTouchEvent): Ditto.
206         (WebCore::RangeInputType::handleKeydownEvent): Ditto.
207         * html/SearchInputType.cpp:
208         (WebCore::SearchInputType::handleKeydownEvent): Ditto.
209         * html/TextFieldInputType.cpp:
210         (WebCore::TextFieldInputType::handleKeydownEventForSpinButton): Ditto.
211         (WebCore::TextFieldInputType::shouldSpinButtonRespondToMouseEvents): Ditto.
212         * html/shadow/TextControlInnerElements.cpp:
213         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): Ditto.
214         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents): Ditto.
215         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): Ditto.
216         * html/shadow/TextFieldDecorationElement.cpp:
217         (WebCore::TextFieldDecorationElement::defaultEventHandler): Ditto.
218         (WebCore::TextFieldDecorationElement::willRespondToMouseMoveEvents): Ditto.
219         (WebCore::TextFieldDecorationElement::willRespondToMouseClickEvents): Ditto.
220
221 2012-12-10  Pavel Feldman  <pfeldman@chromium.org>
222
223         Web Inspector: console broken? - console.dirxml behaves like console.log
224         https://bugs.webkit.org/show_bug.cgi?id=104245
225
226         Reviewed by Vsevolod Vlasov.
227
228         Do not generate preview for dirxml.
229
230         * inspector/front-end/ConsoleMessage.js:
231         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsArray):
232
233 2012-12-10  Kent Tamura  <tkent@chromium.org>
234
235         Refactoring: Remove HTMLFormControlElement::setDisabled
236         https://bugs.webkit.org/show_bug.cgi?id=104510
237
238         Reviewed by Kentaro Hara.
239
240         Remove it because the number of call sites is only one, and the
241         setDisabled implementation is equivalent to setBooleanAttribute.
242
243         No new tests. This should not make behavior changes.
244
245         * html/HTMLFormControlElement.cpp: Remove setDisabled.
246         * html/HTMLFormControlElement.h: Ditto.
247         * html/FileInputType.cpp:
248         (WebCore::FileInputType::disabledAttributeChanged):
249         Replace setDisabled with setBooleanAttribute.
250
251 2012-12-10  Hajime Morrita  <morrita@google.com>
252
253         [Shadow DOM][Refacdtoring] nextTo() and previousTo() can be part of ContentDistribution
254         https://bugs.webkit.org/show_bug.cgi?id=104514
255
256         Reviewed by Kentaro Hara.
257
258         InsertionPoint::nextTo() and InsertionPoint::previousTo() are an
259         query to distributed nodes, which is what ContentDistribution
260         represents. We can move them to better home.
261
262         No new tests. No behavior change.
263
264         * html/shadow/ContentDistributor.cpp:
265         (WebCore::ContentDistribution::nextTo): Moved from InsertionPoint
266         (WebCore):
267         (WebCore::ContentDistribution::previousTo): Moved from InsertionPoint
268         * html/shadow/ContentDistributor.h:
269         (ContentDistribution):
270         * html/shadow/InsertionPoint.cpp:
271         * html/shadow/InsertionPoint.h:
272         (WebCore::InsertionPoint::nextTo): Delegated to ContentDistribution
273         (WebCore::InsertionPoint::previousTo): Delegated to ContentDistribution
274
275 2012-12-10  Joanmarie Diggs  <jdiggs@igalia.com>
276
277         [GTK] accessibility/language-attribute.html is failing
278         https://bugs.webkit.org/show_bug.cgi?id=98369
279
280         Reviewed by Chris Fleizach.
281
282         The test is failing for two reasons: Not exposing the language
283         for accessible objects and AccessibilityUIElement::language() not
284         being implemented.
285
286         No new tests; instead, unskipped the previously-failing test.
287
288         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
289         (getAttributeSetForAccessibilityObject): Expose the language via AtkText attribute
290
291 2012-12-09  Takashi Sakamoto  <tasak@google.com>
292
293         [Shadow DOM]: reset-style-inheritance doesn't work for insertion point
294         https://bugs.webkit.org/show_bug.cgi?id=103711
295
296         Reviewed by Hajime Morita.
297
298         reset-style-inheritance can be specified by using insertion points'
299         attribute, e.g. <content reset-style-inheritance>.
300         c.f. shadow dom spec:
301         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles
302
303         No new tests. Updated an existing test,
304         fast/dom/shadow/insertion-point-resetStyleInheritance.html to cover
305         this feature.
306
307         * html/HTMLAttributeNames.in:
308         Added HTMLNames::reset_style_inheritanceAttr.
309         * html/shadow/InsertionPoint.cpp:
310         (WebCore::InsertionPoint::InsertionPoint):
311         (WebCore::InsertionPoint::parseAttribute):
312         Since both shadow and content elements have to support
313         reset-style-inheritance, added InsertionPoint::parseAttribute.
314         (WebCore::InsertionPoint::resetStyleInheritance):
315         (WebCore::InsertionPoint::setResetStyleInheritance):
316         Modified to update reset-style-inheritance attribute value.
317         * html/shadow/InsertionPoint.h:
318         (InsertionPoint):
319         Removed m_shouldResetStyleInheritance. Instead, use
320         reset-style-inheritance attribute value.
321
322 2012-12-09  Ilya Tikhonovsky  <loislo@chromium.org>
323
324         Native Memory Instrumentation: instrument a part of RenderObject class tree.
325         https://bugs.webkit.org/show_bug.cgi?id=103564
326
327         Reviewed by Eric Seidel.
328
329         Many RenderObject descendants have OwnPtrs and RefPtrs members.
330         Looks like we have to instrument all the RenderObject classes and visit
331         all the render objects instead of counting entire render arena memory.
332
333         * WebCore.exp.in:
334         * dom/Node.cpp:
335         (WebCore::Node::reportMemoryUsage):
336         * dom/WebCoreMemoryInstrumentation.cpp:
337         (WebCore):
338         * inspector/InspectorMemoryAgent.cpp:
339         (WebCore::reportRenderTreeInfo):
340         (WebCore):
341         * platform/PlatformMemoryInstrumentation.cpp:
342         (WebCore):
343         * platform/PlatformMemoryInstrumentation.h:
344         (PlatformMemoryTypes):
345         * platform/graphics/GraphicsLayer.cpp:
346         (WebCore::GraphicsLayer::reportMemoryUsage):
347         (WebCore):
348         * platform/graphics/GraphicsLayer.h:
349         (GraphicsLayer):
350         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
351         (WebCore::GraphicsLayerChromium::reportMemoryUsage):
352         (WebCore):
353         * platform/graphics/chromium/GraphicsLayerChromium.h:
354         (GraphicsLayerChromium):
355         * rendering/RenderBlock.cpp:
356         (WebCore::RenderBlock::reportMemoryUsage):
357         (WebCore):
358         * rendering/RenderBlock.h:
359         (RenderBlock):
360         * rendering/RenderBox.cpp:
361         (WebCore::RenderBox::reportMemoryUsage):
362         (WebCore):
363         * rendering/RenderBox.h:
364         (RenderBox):
365         * rendering/RenderInline.cpp:
366         (WebCore::RenderInline::reportMemoryUsage):
367         (WebCore):
368         * rendering/RenderInline.h:
369         (RenderInline):
370         * rendering/RenderLayer.cpp:
371         (WebCore::RenderLayer::reportMemoryUsage):
372         (WebCore):
373         * rendering/RenderLayer.h:
374         (RenderLayer):
375         * rendering/RenderLayerBacking.cpp:
376         (WebCore::RenderLayerBacking::reportMemoryUsage):
377         (WebCore):
378         * rendering/RenderLayerBacking.h:
379         (RenderLayerBacking):
380         * rendering/RenderLayerCompositor.cpp:
381         (WebCore::RenderLayerCompositor::reportMemoryUsage):
382         (WebCore):
383         * rendering/RenderLayerCompositor.h:
384         (RenderLayerCompositor):
385         * rendering/RenderLayerModelObject.cpp:
386         (WebCore::RenderLayerModelObject::reportMemoryUsage):
387         (WebCore):
388         * rendering/RenderLayerModelObject.h:
389         (RenderLayerModelObject):
390         * rendering/RenderObject.cpp:
391         (WebCore::RenderObject::reportMemoryUsage):
392         (WebCore):
393         * rendering/RenderObject.h:
394         (RenderObject):
395         * rendering/RenderText.cpp:
396         (WebCore::RenderText::reportMemoryUsage):
397         (WebCore):
398         * rendering/RenderText.h:
399         (RenderText):
400         * rendering/RenderView.cpp:
401         (WebCore::RenderView::reportMemoryUsage):
402         (WebCore):
403         * rendering/RenderView.h:
404         (RenderView):
405
406 2012-12-09  Ryosuke Niwa  <rniwa@webkit.org>
407
408         REGRESSION (r137003): failures in MicroData tests on EFL, GTK
409         https://bugs.webkit.org/show_bug.cgi?id=104469
410
411         Reviewed by Darin Adler.
412
413         Fix the regression by calling propertyNodeList on HTMLPropertiesCollection
414         in the named getter for HTMLCollection. It's a miracle that the old code prior to r137003
415         worked at all since the return type of namedItem was different.
416
417         Existing tests cover this.
418
419         * bindings/js/JSHTMLCollectionCustom.cpp:
420         (WebCore::JSHTMLCollection::nameGetter):
421         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
422         (WebCore::V8HTMLCollection::namedPropertyGetter):
423
424 2012-12-09  Joanmarie Diggs  <jdiggs@igalia.com>
425
426         [GTK] accessibility/placeholder.html is failing
427         https://bugs.webkit.org/show_bug.cgi?id=98373
428
429         Reviewed by Martin Robinson.
430
431         The test was failing because the placeholder text was not supported and
432         AccessibilityUIElement::stringAttributeValue() was not implemented.
433
434         No new tests; instead the failing test was unskipped.
435
436         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
437         (webkitAccessibleGetAttributes): Add the placeholder text as an AtkAttribute
438         of the AtkObject, as is done in Gtk+ 3.
439
440 2012-12-09  Kondapally Kalyan  <kalyan.kondapally@intel.com>
441
442         [EFL] [WebGL] Path is not resized correctly.
443         https://bugs.webkit.org/show_bug.cgi?id=104458.
444
445         Reviewed by Kenneth Rohde Christiansen.
446
447         In GraphicsContext3D::paintToCanvas, we flip the contents and draw on the surface.
448         The operations done to flip the image (translation and scale) are done before rectangle with correct size
449         is added to current path. This resulted in updating pixels at wrong positions.
450
451         Covered by existing tests.
452
453         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
454         (WebCore::GraphicsContext3D::paintToCanvas):
455
456 2012-12-09  Joone Hur  <joone.hur@intel.com>
457
458         [GTK][AC] build fix after r130525 and r133332
459         https://bugs.webkit.org/show_bug.cgi?id=104491
460
461         Reviewed by Martin Robinson.
462
463         Build fix for Accelerated Compositing Clutter backend after r130525 and r133332.
464
465         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
466         * platform/gtk/RedirectedXCompositeWindow.cpp:
467         * platform/gtk/RedirectedXCompositeWindow.h:
468
469 2012-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
470
471         [GTK] Use GObject casts instead of C++ cast for GObjects in DOM bindings
472         https://bugs.webkit.org/show_bug.cgi?id=104492
473
474         Reviewed by Martin Robinson.
475
476         * bindings/scripts/CodeGeneratorGObject.pm:
477         (GenerateCFile):
478         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
479         (WebKit::kit):
480         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
481         (WebKit::kit):
482         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
483         (WebKit::kit):
484         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
485         (WebKit::kit):
486         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
487         (WebKit::kit):
488         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
489         (WebKit::kit):
490         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
491         (WebKit::kit):
492         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
493         (WebKit::kit):
494         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
495         (WebKit::kit):
496         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
497         (WebKit::kit):
498         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
499         (WebKit::kit):
500         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
501         (WebKit::kit):
502         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
503         (WebKit::kit):
504         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
505         (WebKit::kit):
506
507 2012-12-09  Pavel Feldman  <pfeldman@chromium.org>
508
509         Web Inspector: do not treat object as equal to itself when logging to console
510         https://bugs.webkit.org/show_bug.cgi?id=104487
511
512         Reviewed by Alexander Pavlov.
513
514         Otherwise, mutating object in a loop results in the repeat count update instead of generation of the new preview.
515
516         Test: inspector/console/console-object-preview.html
517
518         * inspector/ConsoleMessage.cpp:
519         (WebCore::ConsoleMessage::isEqual):
520
521 2012-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
522
523         Remove unused code in GObject DOM bindings generator
524         https://bugs.webkit.org/show_bug.cgi?id=104490
525
526         Reviewed by Martin Robinson.
527
528         * bindings/scripts/CodeGeneratorGObject.pm:
529         (GenerateProperties): Remove code to install event listeners and
530         signals.
531
532 2012-12-09  Zan Dobersek  <zandobersek@gmail.com>
533
534         Unreviewed update for the GObject bindings after r137074 and r137078.
535
536         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
537         (webkit_dom_test_event_target_dispatch_event):
538         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
539         (webkit_dom_test_interface_supplemental_method2):
540         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
541         (webkit_dom_test_obj_method_that_requires_all_args_and_throws):
542         (webkit_dom_test_obj_method_with_exception):
543         (webkit_dom_test_obj_with_script_state_void_exception):
544         (webkit_dom_test_obj_with_script_state_obj_exception):
545         (webkit_dom_test_obj_with_script_execution_context_and_script_state_obj_exception):
546         (webkit_dom_test_obj_strict_function):
547         (webkit_dom_test_obj_get_attr_with_getter_exception):
548         (webkit_dom_test_obj_set_attr_with_setter_exception):
549         (webkit_dom_test_obj_get_string_attr_with_getter_exception):
550         (webkit_dom_test_obj_set_string_attr_with_setter_exception):
551         (webkit_dom_test_obj_get_with_script_state_attribute_raises):
552         (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises):
553         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute_raises):
554
555 2012-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
556
557         Fix the GError check in GObject DOM bindings.
558
559         Reviewed by Xan Lopez.
560
561         Previous commit introduced a check to make sure the passed GError
562         is valid in all DOM methods receiving an error.
563
564         * bindings/scripts/CodeGeneratorGObject.pm:
565         (GetGReturnMacro): Check that the passed GError either is NULL or
566         the pointer has been initialized to NULL.
567
568 2012-12-09  Leo Yang  <leoyang@rim.com>
569
570         [BlackBerry] Adapt to name change of createNetworkBufferByCopyingData()
571         https://bugs.webkit.org/show_bug.cgi?id=104449
572
573         Reviewed by Rob Buis.
574
575         Name change no new tests.
576
577         * platform/network/blackberry/rss/RSSFilterStream.cpp:
578         (WebCore::RSSFilterStream::handleRSSContent):
579
580 2012-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
581
582         [GTK] Clean up g_return macros usage in GObject DOM bindings
583         https://bugs.webkit.org/show_bug.cgi?id=101079
584
585         Reviewed by Xan Lopez.
586
587         Several improvements:
588
589           - Move g_return macros at the beginning of the methods.
590           - Use them only to check parameters of public API.
591           - Use GObject macros to check GObjects.
592           - Check also GError parameters.
593           - Use early returns in kit and core methods, since they should
594             work even if g_return macros are disabled handling NULL
595             gracefully.
596
597         * bindings/scripts/CodeGeneratorGObject.pm:
598         (GetGReturnMacro):
599         (GenerateFunction):
600         (GenerateCFile):
601         (Generate):
602         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
603         (WebKit::kit):
604         (WebKit::core):
605         (WebKit::wrapFloat64Array):
606         (webkit_dom_float64array_foo):
607         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
608         (WebKit::kit):
609         (WebKit::core):
610         (WebKit::wrapTestActiveDOMObject):
611         (webkit_dom_test_active_dom_object_exciting_function):
612         (webkit_dom_test_active_dom_object_post_message):
613         (webkit_dom_test_active_dom_object_get_exciting_attr):
614         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
615         (WebKit::kit):
616         (WebKit::core):
617         (WebKit::wrapTestCallback):
618         (webkit_dom_test_callback_callback_with_no_param):
619         (webkit_dom_test_callback_callback_with_class1param):
620         (webkit_dom_test_callback_callback_with_class2param):
621         (webkit_dom_test_callback_callback_with_non_bool_return_type):
622         (webkit_dom_test_callback_callback_with_string_list):
623         (webkit_dom_test_callback_callback_with_boolean):
624         (webkit_dom_test_callback_callback_requires_this_to_pass):
625         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
626         (WebKit::kit):
627         (WebKit::core):
628         (WebKit::wrapTestCustomNamedGetter):
629         (webkit_dom_test_custom_named_getter_another_function):
630         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
631         (WebKit::kit):
632         (WebKit::core):
633         (WebKit::wrapTestEventConstructor):
634         (webkit_dom_test_event_constructor_get_attr1):
635         (webkit_dom_test_event_constructor_get_attr2):
636         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
637         (WebKit::kit):
638         (WebKit::core):
639         (WebKit::wrapTestEventTarget):
640         (webkit_dom_test_event_target_item):
641         (webkit_dom_test_event_target_dispatch_event):
642         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
643         (WebKit::kit):
644         (WebKit::core):
645         (WebKit::wrapTestException):
646         (webkit_dom_test_exception_get_name):
647         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
648         (WebKit::kit):
649         (WebKit::core):
650         (WebKit::wrapTestInterface):
651         (webkit_dom_test_interface_supplemental_method1):
652         (webkit_dom_test_interface_supplemental_method2):
653         (webkit_dom_test_interface_supplemental_method4):
654         (webkit_dom_test_interface_get_supplemental_str1):
655         (webkit_dom_test_interface_get_supplemental_str2):
656         (webkit_dom_test_interface_set_supplemental_str2):
657         (webkit_dom_test_interface_get_supplemental_node):
658         (webkit_dom_test_interface_set_supplemental_node):
659         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
660         (WebKit::kit):
661         (WebKit::core):
662         (WebKit::wrapTestMediaQueryListListener):
663         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
664         (WebKit::kit):
665         (WebKit::core):
666         (WebKit::wrapTestNamedConstructor):
667         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
668         (WebKit::kit):
669         (WebKit::core):
670         (WebKit::wrapTestNode):
671         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
672         (WebKit::kit):
673         (WebKit::core):
674         (WebKit::wrapTestObj):
675         (webkit_dom_test_obj_void_method):
676         (webkit_dom_test_obj_void_method_with_args):
677         (webkit_dom_test_obj_long_method):
678         (webkit_dom_test_obj_long_method_with_args):
679         (webkit_dom_test_obj_obj_method):
680         (webkit_dom_test_obj_obj_method_with_args):
681         (webkit_dom_test_obj_method_that_requires_all_args_and_throws):
682         (webkit_dom_test_obj_serialized_value):
683         (webkit_dom_test_obj_idb_key):
684         (webkit_dom_test_obj_options_object):
685         (webkit_dom_test_obj_method_with_exception):
686         (webkit_dom_test_obj_with_script_state_void):
687         (webkit_dom_test_obj_with_script_state_obj):
688         (webkit_dom_test_obj_with_script_state_void_exception):
689         (webkit_dom_test_obj_with_script_state_obj_exception):
690         (webkit_dom_test_obj_with_script_execution_context):
691         (webkit_dom_test_obj_with_script_execution_context_and_script_state):
692         (webkit_dom_test_obj_with_script_execution_context_and_script_state_obj_exception):
693         (webkit_dom_test_obj_with_script_execution_context_and_script_state_with_spaces):
694         (webkit_dom_test_obj_method_with_optional_arg):
695         (webkit_dom_test_obj_method_with_non_optional_arg_and_optional_arg):
696         (webkit_dom_test_obj_method_with_non_optional_arg_and_two_optional_args):
697         (webkit_dom_test_obj_method_with_optional_string):
698         (webkit_dom_test_obj_method_with_optional_string_is_undefined):
699         (webkit_dom_test_obj_method_with_optional_string_is_null_string):
700         (webkit_dom_test_obj_conditional_method1):
701         (webkit_dom_test_obj_conditional_method2):
702         (webkit_dom_test_obj_conditional_method3):
703         (webkit_dom_test_obj_class_method):
704         (webkit_dom_test_obj_class_method_with_optional):
705         (webkit_dom_test_obj_overloaded_method1):
706         (webkit_dom_test_obj_convert1):
707         (webkit_dom_test_obj_convert2):
708         (webkit_dom_test_obj_convert4):
709         (webkit_dom_test_obj_convert5):
710         (webkit_dom_test_obj_mutable_point_function):
711         (webkit_dom_test_obj_immutable_point_function):
712         (webkit_dom_test_obj_orange):
713         (webkit_dom_test_obj_strict_function):
714         (webkit_dom_test_obj_variadic_string_method):
715         (webkit_dom_test_obj_variadic_double_method):
716         (webkit_dom_test_obj_variadic_node_method):
717         (webkit_dom_test_obj_get_read_only_long_attr):
718         (webkit_dom_test_obj_get_read_only_string_attr):
719         (webkit_dom_test_obj_get_read_only_test_obj_attr):
720         (webkit_dom_test_obj_get_short_attr):
721         (webkit_dom_test_obj_set_short_attr):
722         (webkit_dom_test_obj_get_unsigned_short_attr):
723         (webkit_dom_test_obj_set_unsigned_short_attr):
724         (webkit_dom_test_obj_get_long_attr):
725         (webkit_dom_test_obj_set_long_attr):
726         (webkit_dom_test_obj_get_long_long_attr):
727         (webkit_dom_test_obj_set_long_long_attr):
728         (webkit_dom_test_obj_get_unsigned_long_long_attr):
729         (webkit_dom_test_obj_set_unsigned_long_long_attr):
730         (webkit_dom_test_obj_get_string_attr):
731         (webkit_dom_test_obj_set_string_attr):
732         (webkit_dom_test_obj_get_test_obj_attr):
733         (webkit_dom_test_obj_set_test_obj_attr):
734         (webkit_dom_test_obj_get_xml_obj_attr):
735         (webkit_dom_test_obj_set_xml_obj_attr):
736         (webkit_dom_test_obj_get_create):
737         (webkit_dom_test_obj_set_create):
738         (webkit_dom_test_obj_get_reflected_string_attr):
739         (webkit_dom_test_obj_set_reflected_string_attr):
740         (webkit_dom_test_obj_get_reflected_integral_attr):
741         (webkit_dom_test_obj_set_reflected_integral_attr):
742         (webkit_dom_test_obj_get_reflected_unsigned_integral_attr):
743         (webkit_dom_test_obj_set_reflected_unsigned_integral_attr):
744         (webkit_dom_test_obj_get_reflected_boolean_attr):
745         (webkit_dom_test_obj_set_reflected_boolean_attr):
746         (webkit_dom_test_obj_get_reflected_url_attr):
747         (webkit_dom_test_obj_set_reflected_url_attr):
748         (webkit_dom_test_obj_get_reflected_custom_integral_attr):
749         (webkit_dom_test_obj_set_reflected_custom_integral_attr):
750         (webkit_dom_test_obj_get_reflected_custom_boolean_attr):
751         (webkit_dom_test_obj_set_reflected_custom_boolean_attr):
752         (webkit_dom_test_obj_get_reflected_custom_url_attr):
753         (webkit_dom_test_obj_set_reflected_custom_url_attr):
754         (webkit_dom_test_obj_get_attr_with_getter_exception):
755         (webkit_dom_test_obj_set_attr_with_getter_exception):
756         (webkit_dom_test_obj_get_attr_with_setter_exception):
757         (webkit_dom_test_obj_set_attr_with_setter_exception):
758         (webkit_dom_test_obj_get_string_attr_with_getter_exception):
759         (webkit_dom_test_obj_set_string_attr_with_getter_exception):
760         (webkit_dom_test_obj_get_string_attr_with_setter_exception):
761         (webkit_dom_test_obj_set_string_attr_with_setter_exception):
762         (webkit_dom_test_obj_get_with_script_state_attribute):
763         (webkit_dom_test_obj_set_with_script_state_attribute):
764         (webkit_dom_test_obj_get_with_script_execution_context_attribute):
765         (webkit_dom_test_obj_set_with_script_execution_context_attribute):
766         (webkit_dom_test_obj_get_with_script_state_attribute_raises):
767         (webkit_dom_test_obj_set_with_script_state_attribute_raises):
768         (webkit_dom_test_obj_get_with_script_execution_context_attribute_raises):
769         (webkit_dom_test_obj_set_with_script_execution_context_attribute_raises):
770         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute):
771         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute):
772         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_attribute_raises):
773         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_attribute_raises):
774         (webkit_dom_test_obj_get_with_script_execution_context_and_script_state_with_spaces_attribute):
775         (webkit_dom_test_obj_set_with_script_execution_context_and_script_state_with_spaces_attribute):
776         (webkit_dom_test_obj_get_conditional_attr1):
777         (webkit_dom_test_obj_set_conditional_attr1):
778         (webkit_dom_test_obj_get_conditional_attr2):
779         (webkit_dom_test_obj_set_conditional_attr2):
780         (webkit_dom_test_obj_get_conditional_attr3):
781         (webkit_dom_test_obj_set_conditional_attr3):
782         (webkit_dom_test_obj_get_any_attribute):
783         (webkit_dom_test_obj_set_any_attribute):
784         (webkit_dom_test_obj_get_content_document):
785         (webkit_dom_test_obj_get_mutable_point):
786         (webkit_dom_test_obj_set_mutable_point):
787         (webkit_dom_test_obj_get_immutable_point):
788         (webkit_dom_test_obj_set_immutable_point):
789         (webkit_dom_test_obj_get_strawberry):
790         (webkit_dom_test_obj_set_strawberry):
791         (webkit_dom_test_obj_get_strict_float):
792         (webkit_dom_test_obj_set_strict_float):
793         (webkit_dom_test_obj_get_description):
794         (webkit_dom_test_obj_get_id):
795         (webkit_dom_test_obj_set_id):
796         (webkit_dom_test_obj_get_hash):
797         (webkit_dom_test_obj_get_replaceable_attribute):
798         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
799         (WebKit::kit):
800         (WebKit::core):
801         (WebKit::wrapTestSerializedScriptValueInterface):
802         (webkit_dom_test_serialized_script_value_interface_accept_transfer_list):
803         (webkit_dom_test_serialized_script_value_interface_multi_transfer_list):
804         (webkit_dom_test_serialized_script_value_interface_get_value):
805         (webkit_dom_test_serialized_script_value_interface_set_value):
806         (webkit_dom_test_serialized_script_value_interface_get_readonly_value):
807         (webkit_dom_test_serialized_script_value_interface_get_cached_value):
808         (webkit_dom_test_serialized_script_value_interface_set_cached_value):
809         (webkit_dom_test_serialized_script_value_interface_get_ports):
810         (webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value):
811
812 2012-12-09  Carlos Garcia Campos  <cgarcia@igalia.com>
813
814         [GTK] Use a private struct and placement new syntax in GObject DOM bindings
815         https://bugs.webkit.org/show_bug.cgi?id=101074
816
817         Reviewed by Xan Lopez.
818
819         It allows to use RefPtr for the wrapped object and it simplifies
820         the code. Only the classes deriving from WebKitDOMObject keep a
821         reference of the wrapped object in a private struct. The wrapped
822         object is added to the cache in GObjectClass::constructor() and
823         removed in GObjectClass::finalize().
824
825         * bindings/gobject/WebKitDOMBinding.cpp:
826         (WebKit::createWrapper):
827         (WebKit::kit):
828         (WebKit::wrapEventTarget):
829         * bindings/scripts/CodeGeneratorGObject.pm:
830         (GetParentImplClassName):
831         (GenerateProperties):
832         (GenerateCFile):
833         (Generate):
834         (WriteData):
835         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
836         (WebKit::kit):
837         (WebKit::core):
838         (WebKit::wrapFloat64Array):
839         (webkit_dom_float64array_class_init):
840         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
841         (_WebKitDOMTestActiveDOMObjectPrivate):
842         (WebKit::kit):
843         (WebKit::core):
844         (WebKit::wrapTestActiveDOMObject):
845         (webkit_dom_test_active_dom_object_finalize):
846         (webkit_dom_test_active_dom_object_constructor):
847         (webkit_dom_test_active_dom_object_class_init):
848         (webkit_dom_test_active_dom_object_init):
849         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
850         (_WebKitDOMTestCallbackPrivate):
851         (WebKit::kit):
852         (WebKit::core):
853         (WebKit::wrapTestCallback):
854         (webkit_dom_test_callback_finalize):
855         (webkit_dom_test_callback_constructor):
856         (webkit_dom_test_callback_class_init):
857         (webkit_dom_test_callback_init):
858         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
859         (_WebKitDOMTestCustomNamedGetterPrivate):
860         (WebKit::kit):
861         (WebKit::core):
862         (WebKit::wrapTestCustomNamedGetter):
863         (webkit_dom_test_custom_named_getter_finalize):
864         (webkit_dom_test_custom_named_getter_constructor):
865         (webkit_dom_test_custom_named_getter_class_init):
866         (webkit_dom_test_custom_named_getter_init):
867         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
868         (_WebKitDOMTestEventConstructorPrivate):
869         (WebKit::kit):
870         (WebKit::core):
871         (WebKit::wrapTestEventConstructor):
872         (webkit_dom_test_event_constructor_finalize):
873         (webkit_dom_test_event_constructor_constructor):
874         (webkit_dom_test_event_constructor_class_init):
875         (webkit_dom_test_event_constructor_init):
876         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
877         (_WebKitDOMTestEventTargetPrivate):
878         (WebKit::kit):
879         (WebKit::core):
880         (WebKit::wrapTestEventTarget):
881         (webkit_dom_test_event_target_finalize):
882         (webkit_dom_test_event_target_constructor):
883         (webkit_dom_test_event_target_class_init):
884         (webkit_dom_test_event_target_init):
885         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
886         (_WebKitDOMTestExceptionPrivate):
887         (WebKit::kit):
888         (WebKit::core):
889         (WebKit::wrapTestException):
890         (webkit_dom_test_exception_finalize):
891         (webkit_dom_test_exception_constructor):
892         (webkit_dom_test_exception_class_init):
893         (webkit_dom_test_exception_init):
894         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
895         (_WebKitDOMTestInterfacePrivate):
896         (WebKit::kit):
897         (WebKit::core):
898         (WebKit::wrapTestInterface):
899         (webkit_dom_test_interface_finalize):
900         (webkit_dom_test_interface_constructor):
901         (webkit_dom_test_interface_class_init):
902         (webkit_dom_test_interface_init):
903         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
904         (_WebKitDOMTestMediaQueryListListenerPrivate):
905         (WebKit::kit):
906         (WebKit::core):
907         (WebKit::wrapTestMediaQueryListListener):
908         (webkit_dom_test_media_query_list_listener_finalize):
909         (webkit_dom_test_media_query_list_listener_constructor):
910         (webkit_dom_test_media_query_list_listener_class_init):
911         (webkit_dom_test_media_query_list_listener_init):
912         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
913         (_WebKitDOMTestNamedConstructorPrivate):
914         (WebKit::kit):
915         (WebKit::core):
916         (WebKit::wrapTestNamedConstructor):
917         (webkit_dom_test_named_constructor_finalize):
918         (webkit_dom_test_named_constructor_constructor):
919         (webkit_dom_test_named_constructor_class_init):
920         (webkit_dom_test_named_constructor_init):
921         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
922         (WebKit::kit):
923         (WebKit::core):
924         (WebKit::wrapTestNode):
925         (webkit_dom_test_node_class_init):
926         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
927         (_WebKitDOMTestObjPrivate):
928         (WebKit::kit):
929         (WebKit::core):
930         (WebKit::wrapTestObj):
931         (webkit_dom_test_obj_finalize):
932         (webkit_dom_test_obj_constructor):
933         (webkit_dom_test_obj_class_init):
934         (webkit_dom_test_obj_init):
935         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
936         (_WebKitDOMTestOverloadedConstructorsPrivate):
937         (WebKit::kit):
938         (WebKit::core):
939         (WebKit::wrapTestOverloadedConstructors):
940         (webkit_dom_test_overloaded_constructors_finalize):
941         (webkit_dom_test_overloaded_constructors_constructor):
942         (webkit_dom_test_overloaded_constructors_class_init):
943         (webkit_dom_test_overloaded_constructors_init):
944         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
945         (_WebKitDOMTestSerializedScriptValueInterfacePrivate):
946         (WebKit::kit):
947         (WebKit::core):
948         (WebKit::wrapTestSerializedScriptValueInterface):
949         (webkit_dom_test_serialized_script_value_interface_finalize):
950         (webkit_dom_test_serialized_script_value_interface_constructor):
951         (webkit_dom_test_serialized_script_value_interface_class_init):
952         (webkit_dom_test_serialized_script_value_interface_init):
953
954 2012-12-09  Jon Lee  <jonlee@apple.com>
955
956         [WK2] Move button image to injected bundle
957         https://bugs.webkit.org/show_bug.cgi?id=104107
958         <rdar://problem/12813842>
959
960         Reviewed by Simon Fraser.
961
962         Update RenderSnapshottedPlugIn to retrieve the start button image from the ChromeClient. Expand the
963         kinds of images available for use as the button. Try to find the best sized button to use for the plug-in,
964         otherwise use no image at all.
965
966         * rendering/RenderSnapshottedPlugIn.h: Add an enum representing the size to use. Remove the label rect
967         variable since it is unneeded.
968         * rendering/RenderSnapshottedPlugIn.cpp:
969         (WebCore::RenderSnapshottedPlugIn::startLabelImage): Maintain a cache of the images for reuse. Index into the
970         array using the enum. If the image has been loaded, or an attempt was made, then return the result. Otherwise
971         ask the chrome client for the image.
972         (WebCore::RenderSnapshottedPlugIn::paintLabel): Determine the proper label to use, and paint if the image is
973         available.
974         (WebCore::RenderSnapshottedPlugIn::tryToFitStartLabel): Compare the label size with the provided content
975         box. Return a LayoutRect representing the label's placement. If it doesn't fit, return an empty rect.
976         (WebCore::RenderSnapshottedPlugIn::layout): The rect is not needed because it is all determined at paint time.
977
978         * page/ChromeClient.h:
979         (WebCore::ChromeClient::plugInStartLabelImage): Added.
980
981         * WebCore.exp.in: Expose GraphicsContext::drawNativeImage() for WKImageCG.cpp.
982         * WebCore.xcodeproj/project.pbxproj: Remove start button assets.
983         * Resources/startButton.png: Removed.
984         * Resources/startButton@2x.png: Removed.
985
986 2012-12-09  Sheriff Bot  <webkit.review.bot@gmail.com>
987
988         Unreviewed, rolling out r137053.
989         http://trac.webkit.org/changeset/137053
990         https://bugs.webkit.org/show_bug.cgi?id=104471
991
992         Broke PerformanceTests/Parser/html-parser.html (Requested by
993         mkwst_ on #webkit).
994
995         * bindings/ScriptControllerBase.cpp:
996         (WebCore::ScriptController::canExecuteScripts):
997
998 2012-12-09  Kangil Han  <kangil.han@samsung.com>
999
1000         Fix unused parameter compile warnings
1001         https://bugs.webkit.org/show_bug.cgi?id=104463
1002
1003         Reviewed by Kentaro Hara.
1004
1005         Remove compile warning messages by omitting parameter name.
1006
1007         * platform/graphics/surfaces/GraphicsSurface.cpp:
1008         (WebCore::GraphicsSurface::GraphicsSurface):
1009
1010 2012-12-08  Rakesh KN  <rakeshchaitan@gmail.com>
1011
1012         Build break if SVG is disabled
1013         https://bugs.webkit.org/show_bug.cgi?id=104452
1014
1015         Reviewed by Darin Adler.
1016
1017         Build breaking after r136975 if SVG is disabled.
1018         No new tests required.
1019
1020         * rendering/FilterEffectRenderer.cpp:
1021         (WebCore::FilterEffectRenderer::buildReferenceFilter):
1022         As document is not an argument anymore, removing UNUSED_PARAM against it.
1023         * rendering/FilterEffectRenderer.h:
1024         Added forward declaration for RenderObject.
1025
1026 2012-12-08  Mike West  <mkwst@chromium.org>
1027
1028         Log to console when script is blocked by sandbox attributes.
1029         https://bugs.webkit.org/show_bug.cgi?id=104365
1030
1031         Reviewed by Ojan Vafai.
1032
1033         Adds a console message to cover script execution blocked within the
1034         context of a sandboxed frame which lacks the 'allow-scripts' permission.
1035
1036         * bindings/ScriptControllerBase.cpp:
1037         (WebCore::ScriptController::canExecuteScripts):
1038             Log a warning when sandboxing flags block script execution.
1039
1040 2012-12-08  No'am Rosenthal  <noam@webkit.org>
1041
1042         Use background color for GraphicsLayers when applicable
1043         https://bugs.webkit.org/show_bug.cgi?id=103786
1044
1045         Updated RenderLayerBacking to call GraphicsLayer::setContentsToBackgroundColor when the following conditions take place:
1046         1. The layer doesn't paint its own content, other than background/decoration.
1047         2. There are no borders or other box decorations (border radius, borders, outline, shadow etc.)
1048         3. The image has only a background color, and no background image.
1049         4. background-composite is set to source-over, and background-clip is anything apart from text.
1050         5. The port supports setContentsToBackgroundColor.
1051
1052         This allows any implementation of GraphicsLayer that supports setContentsToBackgroundColor to avoid allocating a backing store
1053         for that layer, but instead draw that solid color directly.
1054         In addition to setting the background color, the layer's contentsRect needs to be adjusted, since the default contents rect of
1055         a layer is not always equivalent to the rect where the background is supposed to be painted, which is derived from the box's
1056         background-clip property.
1057
1058         Reviewed by Simon Fraser.
1059
1060         Tests: compositing/background-color/background-color-alpha.html
1061                compositing/background-color/background-color-change-to-text.html
1062                compositing/background-color/background-color-composite.html
1063                compositing/background-color/background-color-container.html
1064                compositing/background-color/background-color-content-clip.html
1065                compositing/background-color/background-color-padding-change.html
1066                compositing/background-color/background-color-padding-clip.html
1067                compositing/background-color/background-color-simple.html
1068                compositing/background-color/background-color-text-change.html
1069                compositing/background-color/background-color-text-clip.html
1070
1071         * platform/graphics/GraphicsLayer.h:
1072         (WebCore::GraphicsLayer::supportsBackgroundColorContent):
1073             Allows different implementation of GraphicsLayer to identify whether they implement setContentsToBackgroundColor.
1074             Currently only the MAC implementation and TextureMapper falls under that category.
1075
1076         * rendering/RenderBox.h:
1077         (WebCore::RenderBox::paddingBoxRect):
1078             Added paddingBoxRect to compliment borderBoxRect and contentsBoxRect. paddingBoxRect corresponds to 
1079             background-clip: padding.
1080
1081         * rendering/RenderLayerBacking.cpp:
1082         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
1083             Update the background color if needed, for every configuration change.
1084             This should accomodate the old behavior for full-screen, while enabling background color changes for other layers.
1085
1086         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1087             Move the contentsRect logic to updateContentsRect.
1088
1089         (WebCore::RenderLayerBacking::updateContentsRect):
1090             Use the background box when directly compositing backgrounds.
1091
1092         (WebCore::RenderLayerBacking::updateBackgroundColor):
1093             Set the background color if applicable, otherwise set to trasnparent and clear.
1094             This was not needed in the past because background colors were only used for the special case of full-screen.
1095
1096         (WebCore::supportsDirectBoxDecorationsComposition):
1097             Helper function to determine whether a particular background can be directly composited. Right now only 
1098             background color can be composited, and only if the GraphicsLayer implementation supports background colors.
1099             Also we don't yet support background-clip: text and any background-composite other than source-over.
1100
1101         (WebCore::RenderLayerBacking::paintsBoxDecorations):
1102             Apply the new supportsDirectBoxDecorationsComposition logic.
1103
1104         (WebCore::RenderLayerBacking::contentsBox):
1105             Remove unnecessary local variable.
1106
1107         (WebCore::backgroundRectForBox):
1108         (WebCore::RenderLayerBacking::backgroundBox):
1109             Figure out the correct rect for the GraphicsLayer's contentsRect, based on the renderer's backgroundClip.
1110             The rectangle has to be adjusted based on the composited layer offset, and snapped to an IntRect as 
1111             GraphicsLayer::contentsRect expects snapped pixels.
1112
1113
1114 2012-12-08  Patrick Gansterer  <paroga@webkit.org>
1115
1116         Build fix for WinCE after r137011.
1117
1118         * platform/graphics/GraphicsContext.h:
1119         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1120         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1121         (WebCore::GraphicsContext::drawBitmap):
1122         * platform/graphics/wince/ImageBufferWinCE.cpp:
1123         (WebCore::BufferedImage::draw):
1124         (WebCore::ImageBuffer::draw):
1125         * platform/graphics/wince/ImageWinCE.cpp:
1126         (WebCore::BitmapImage::getHBITMAPOfSize):
1127         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
1128         (WebCore::BitmapImage::draw):
1129         * platform/graphics/wince/SharedBitmap.cpp:
1130         (WebCore::SharedBitmap::draw):
1131         * platform/graphics/wince/SharedBitmap.h:
1132
1133 2012-12-08  Gavin Peters  <gavinp@chromium.org>
1134
1135         Add status events on <link rel=prerender> elements.
1136         https://bugs.webkit.org/show_bug.cgi?id=96474
1137
1138         Reviewed by Adam Barth.
1139
1140         The new PrerenderStatusEvent is sent to link elements when
1141         prerenders are started by the embedder, and also sent when they
1142         are stopped. Pages using this feature can now serialize launching
1143         prerenders, and track timing performance.
1144
1145         Tested in a new WebKitUnitTest for the chromium port.
1146
1147         * GNUmakefile.list.am:
1148         * Target.pri:
1149         * WebCore.gypi:
1150         * WebCore.vcproj/WebCore.vcproj:
1151         * WebCore.xcodeproj/project.pbxproj:
1152         * dom/EventNames.h:
1153         (WebCore):
1154         * html/HTMLLinkElement.cpp:
1155         (WebCore):
1156         (WebCore::HTMLLinkElement::didStartLinkPrerender):
1157         (WebCore::HTMLLinkElement::didStopLinkPrerender):
1158         (WebCore::HTMLLinkElement::didSendLoadForLinkPrerender):
1159         (WebCore::HTMLLinkElement::didSendDOMContentLoadedForLinkPrerender):
1160         * html/HTMLLinkElement.h:
1161         (HTMLLinkElement):
1162         * loader/LinkLoader.cpp:
1163         (WebCore::LinkLoader::didStartPrerender):
1164         (WebCore):
1165         (WebCore::LinkLoader::didStopPrerender):
1166         (WebCore::LinkLoader::didSendLoadForPrerender):
1167         (WebCore::LinkLoader::didSendDOMContentLoadedForPrerender):
1168         (WebCore::LinkLoader::loadLink):
1169         * loader/LinkLoader.h:
1170         (LinkLoader):
1171         * loader/LinkLoaderClient.h:
1172         (LinkLoaderClient):
1173         * loader/Prerenderer.cpp:
1174         (WebCore::Prerenderer::render):
1175         * loader/Prerenderer.h:
1176         (WebCore):
1177         (Prerenderer):
1178         * platform/PrerenderClient.h: Copied from Source/WebCore/loader/LinkLoaderClient.h.
1179         (WebCore):
1180         (PrerenderClient):
1181         (WebCore::PrerenderClient::~PrerenderClient):
1182         * platform/PrerenderHandle.h:
1183         (WebCore):
1184         (PrerenderHandle):
1185         * platform/chromium/Prerender.cpp:
1186         (WebCore::Prerender::Prerender):
1187         (WebCore::Prerender::removeClient):
1188         (WebCore):
1189         (WebCore::Prerender::add):
1190         (WebCore::Prerender::cancel):
1191         (WebCore::Prerender::abandon):
1192         (WebCore::Prerender::didStartPrerender):
1193         (WebCore::Prerender::didStopPrerender):
1194         (WebCore::Prerender::didSendLoadForPrerender):
1195         (WebCore::Prerender::didSendDOMContentLoadedForPrerender):
1196         * platform/chromium/Prerender.h:
1197         (WebKit):
1198         (WebCore):
1199         (Prerender):
1200         * platform/chromium/PrerenderHandle.cpp:
1201         (WebCore::PrerenderHandle::create):
1202         (WebCore::PrerenderHandle::PrerenderHandle):
1203         (WebCore::PrerenderHandle::~PrerenderHandle):
1204         (WebCore::PrerenderHandle::removeClient):
1205         (WebCore):
1206         * platform/chromium/support/WebPrerender.cpp:
1207         (WebKit::WebPrerender::toPrerender):
1208         (WebKit):
1209         (WebKit::WebPrerender::assign):
1210         (WebKit::WebPrerender::isNull):
1211         (WebKit::WebPrerender::didStartPrerender):
1212         (WebKit::WebPrerender::didStopPrerender):
1213         (WebKit::WebPrerender::didSendLoadForPrerender):
1214         (WebKit::WebPrerender::didSendDOMContentLoadedForPrerender):
1215
1216 2012-12-08  Gustavo Noronha Silva  <gns@gnome.org>
1217
1218         Reviewed by Martin Robinson.
1219
1220         Update the Chromium/Chrome version we advertise in our User-Agent
1221         string to version 25, to better match our current reality.
1222
1223         * platform/gtk/UserAgentGtk.cpp:
1224         (WebCore::standardUserAgent):
1225
1226 2012-12-08  Sheriff Bot  <webkit.review.bot@gmail.com>
1227
1228         Unreviewed, rolling out r137006.
1229         http://trac.webkit.org/changeset/137006
1230         https://bugs.webkit.org/show_bug.cgi?id=104446
1231
1232         Broke plugin painting on Mac (youtube, etc.) (Requested by
1233         thorton_ on #webkit).
1234
1235         * platform/graphics/GraphicsLayer.h:
1236         (GraphicsLayer):
1237         * rendering/RenderBox.h:
1238         * rendering/RenderLayerBacking.cpp:
1239         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
1240         (WebCore::clipBox):
1241         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1242         (WebCore::RenderLayerBacking::updateDrawsContent):
1243         (WebCore::RenderLayerBacking::updateBackgroundColor):
1244         (WebCore::RenderLayerBacking::paintsBoxDecorations):
1245         (WebCore::RenderLayerBacking::contentChanged):
1246         (WebCore::RenderLayerBacking::updateImageContents):
1247         (WebCore::RenderLayerBacking::contentsBox):
1248         * rendering/RenderLayerBacking.h:
1249         (RenderLayerBacking):
1250
1251 2012-12-08  Wei James  <james.wei@intel.com>
1252
1253         Remove incorrect ASSERT for m_error in CachedResource
1254         https://bugs.webkit.org/show_bug.cgi?id=104333
1255
1256         Reviewed by Nate Chapin.
1257
1258         This assertion was brought in https://bugs.webkit.org/show_bug.cgi?id=100901 
1259         When the request is canceled, m_error.isNull() should be true.
1260
1261         run webkit_unit_tests Debug build.
1262
1263         * loader/cache/CachedResource.cpp:
1264         (WebCore::CachedResource::stopLoading):
1265
1266 2012-12-08  Ryosuke Niwa  <rniwa@webkit.org>
1267
1268         Qt Linux Minimal build fix after r136975.
1269
1270         * dom/ElementRareData.h:
1271         (ElementRareData):
1272
1273 2012-12-08  Ryosuke Niwa  <rniwa@webkit.org>
1274
1275         Qt Linux Minimal build fix attempt after r136959.
1276
1277         * inspector/InspectorInstrumentation.h:
1278         (WebCore::InspectorInstrumentation::layerTreeDidChange):
1279         (WebCore::InspectorInstrumentation::renderLayerDestroyed):
1280
1281 2012-12-08  Xan Lopez  <xlopez@igalia.com>
1282
1283         Build fix after r137003. Wrap Microdata only sections with ENABLE(MICRODATA).
1284
1285         * dom/NodeRareData.h:
1286         (NodeRareData):
1287
1288 2012-12-08  Ryosuke Niwa  <rniwa@webkit.org>
1289
1290         Build fix after r137003. Wrap NodeMutationObserverData with ENABLE(MUTATION_OBSERVERS).
1291
1292         * dom/NodeRareData.h:
1293         (NodeRareData):
1294
1295 2012-12-08  Patrick Gansterer  <paroga@webkit.org>
1296
1297         Build fix for ENABLE(SVG) && !ENABLE(FILTERS) after r136975.
1298
1299         * rendering/svg/SVGResources.cpp:
1300         (WebCore::SVGResources::buildCachedResources):
1301
1302 2012-12-08  Adam Klein  <adamk@chromium.org>
1303
1304         HTMLTemplateElement.innerHTML should be parsed into the template contents owner document
1305         https://bugs.webkit.org/show_bug.cgi?id=104407
1306
1307         Reviewed by Eric Seidel.
1308
1309         When parsing via innerHTML, ensure that all operations (including the
1310         initial fragment creation) occur in the proper document to avoid,
1311         e.g., images loading while being parsed into the template contents.
1312         This matches the parsing behavior during page load.
1313
1314         Test: fast/dom/HTMLTemplateElement/innerHTML-inert.html
1315
1316         * editing/markup.cpp:
1317         (WebCore::createFragmentForInnerOuterHTML):
1318
1319 2012-12-08  ChangSeok Oh  <shivamidow@gmail.com>
1320
1321         Assertion failed at WebCore::RedirectedXCompositeWindow::context()
1322         https://bugs.webkit.org/show_bug.cgi?id=104349
1323
1324         Reviewed by Martin Robinson.
1325
1326         We should return GLContext if m_needsContext is CreateGLContext. By the way
1327         CreateGLContext is a enum value and its default value is 0. So checking
1328         ASSERT(m_needsContext) causes a crash on debug build.
1329         ASSERT(m_needsContext == CreateGLContext) is better here.
1330
1331         No new tests since we can verify this with already existing AC tests.
1332
1333         * platform/gtk/RedirectedXCompositeWindow.cpp:
1334         (WebCore::RedirectedXCompositeWindow::context):
1335
1336 2012-12-07  Rik Cabanier  <cabanier@adobe.com>
1337
1338         Extend platform layer so it can pass blend modes to the compositing calls
1339         https://bugs.webkit.org/show_bug.cgi?id=104176
1340
1341         Reviewed by Dirk Schulze.
1342
1343         Adding blend mode enumeration to drawImage functions + stored blendmode in graphics context 
1344
1345         No new tests, no new functionality.
1346
1347         * html/HTMLCanvasElement.cpp:
1348         (WebCore::HTMLCanvasElement::paint):
1349         * platform/graphics/BitmapImage.h:
1350         * platform/graphics/CrossfadeGeneratedImage.cpp:
1351         (WebCore::CrossfadeGeneratedImage::draw):
1352         * platform/graphics/CrossfadeGeneratedImage.h:
1353         (CrossfadeGeneratedImage):
1354         * platform/graphics/GeneratedImage.h:
1355         (GeneratedImage):
1356         * platform/graphics/GeneratorGeneratedImage.cpp:
1357         (WebCore::GeneratorGeneratedImage::draw):
1358         * platform/graphics/GeneratorGeneratedImage.h:
1359         (GeneratorGeneratedImage):
1360         * platform/graphics/GraphicsContext.cpp:
1361         (WebCore::GraphicsContext::drawImage):
1362         (WebCore):
1363         (WebCore::GraphicsContext::drawImageBuffer):
1364         (WebCore::GraphicsContext::setCompositeOperation):
1365         * platform/graphics/GraphicsContext.h:
1366         (WebCore::GraphicsContextState::GraphicsContextState):
1367         (GraphicsContextState):
1368         (GraphicsContext):
1369         * platform/graphics/Image.cpp:
1370         (WebCore::Image::draw):
1371         (WebCore::Image::drawTiled):
1372         * platform/graphics/Image.h:
1373         (Image):
1374         * platform/graphics/ImageBuffer.h:
1375         (ImageBuffer):
1376         * platform/graphics/cairo/BitmapImageCairo.cpp:
1377         (WebCore::BitmapImage::draw):
1378         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1379         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1380         * platform/graphics/cairo/ImageBufferCairo.cpp:
1381         (WebCore::ImageBuffer::draw):
1382         * platform/graphics/cg/BitmapImageCG.cpp:
1383         (WebCore::BitmapImage::draw):
1384         * platform/graphics/cg/GraphicsContextCG.cpp:
1385         (WebCore::GraphicsContext::drawNativeImage):
1386         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1387         * platform/graphics/cg/ImageBufferCG.cpp:
1388         (WebCore::ImageBuffer::draw):
1389         * platform/graphics/cg/PDFDocumentImage.cpp:
1390         (WebCore::PDFDocumentImage::draw):
1391         * platform/graphics/cg/PDFDocumentImage.h:
1392         (PDFDocumentImage):
1393         * platform/graphics/qt/GraphicsContextQt.cpp:
1394         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1395         * platform/graphics/qt/ImageBufferQt.cpp:
1396         (WebCore::ImageBuffer::draw):
1397         * platform/graphics/qt/ImageQt.cpp:
1398         (WebCore::BitmapImage::draw):
1399         * platform/graphics/qt/StillImageQt.cpp:
1400         (WebCore::StillImage::draw):
1401         * platform/graphics/qt/StillImageQt.h:
1402         (StillImage):
1403         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
1404         (BitmapImageSingleFrameSkia):
1405         * platform/graphics/skia/GraphicsContextSkia.cpp:
1406         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1407         * platform/graphics/skia/ImageBufferSkia.cpp:
1408         (WebCore::ImageBuffer::draw):
1409         * platform/graphics/skia/ImageSkia.cpp:
1410         (WebCore::BitmapImage::draw):
1411         (WebCore::BitmapImageSingleFrameSkia::draw):
1412         * platform/graphics/win/ImageCGWin.cpp:
1413         (WebCore::BitmapImage::getHBITMAPOfSize):
1414         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
1415         * svg/graphics/SVGImage.cpp:
1416         (WebCore::SVGImage::drawSVGToImageBuffer):
1417         (WebCore::SVGImage::draw):
1418         (WebCore::SVGImage::nativeImageForCurrentFrame):
1419         * svg/graphics/SVGImage.h:
1420         (SVGImage):
1421
1422 2012-12-07  Alpha Lam  <hclam@chromium.org>
1423
1424         [chromium] ImageDecodingStore should cache partially decoded images
1425         https://bugs.webkit.org/show_bug.cgi?id=103796
1426
1427         Reviewed by Stephen White.
1428
1429         Implement caching for incomplete images, meaning the image is partially
1430         decoded. The image is cached together with partially decoded ImageDecoder.
1431         This allows decoding to resume in a later time.
1432
1433         Caching logic for incomplete images is implemented in ImageDecodingStore.
1434
1435         Logic for resuming image decoding is implemented in ImageFrameGenerator.
1436
1437         ImageDecodingStore allows storing incomplete image with the decoder.
1438         The cache entry can be used in a later time to read and write (i.e. resume
1439         decoding.) To avoid the same entry being written and read at the same time,
1440         an incomplete entry can be used by one user only. Concurrent access to
1441         an incomplete entry should never happen and is checked by an assert.
1442         An entry can becomes complete when decoding is finished. In this case
1443         the associated decoder is deleted. Once an entry becomes complete concurrent
1444         read is allowed.
1445
1446         ImageFrameGenerator performs the logic to resume image decoding. It
1447         performs the following operations in sequence:
1448         - Try to lookup a complete image
1449         - Try to perform scaling on a complete image
1450         - Try to lookup an incomplete image and resume decoding & scaling
1451         - Everything fails, start decoding from scratch
1452         The entire sequence of operations in under a mutex, hence there will be
1453         no more than 1 user of an incomplete cache entry at the same time.
1454
1455         New unit tests in ImageDecodingStoreTest and ImageFrameGeneratorTest.
1456
1457         * platform/graphics/chromium/ImageDecodingStore.cpp:
1458         (WebCore::ImageDecodingStore::lockCache):
1459         Change of method definition to return an image and ImageDecoder.
1460         (WebCore::ImageDecodingStore::unlockCache):
1461         (WebCore::ImageDecodingStore::insertAndLockCache):
1462         (WebCore::ImageDecodingStore::overwriteAndLockCache):
1463         New method to allow an incomplete cache entry be overwritten.
1464         (WebCore):
1465         * platform/graphics/chromium/ImageDecodingStore.h:
1466         (ImageDecodingStore):
1467         (WebCore::ImageDecodingStore::CacheEntry::createAndUse):
1468         (WebCore::ImageDecodingStore::CacheEntry::CacheEntry):
1469         (WebCore::ImageDecodingStore::CacheEntry::cachedImage):
1470         (WebCore::ImageDecodingStore::CacheEntry::cachedDecoder):
1471         (WebCore::ImageDecodingStore::CacheEntry::releaseCachedDecoder):
1472         (WebCore::ImageDecodingStore::CacheEntry::overwriteCachedImage):
1473         New method to allow an incomplete image be overwitten.
1474         (CacheEntry):
1475         * platform/graphics/chromium/ImageFrameGenerator.cpp:
1476         (WebCore::ImageFrameGenerator::ImageFrameGenerator):
1477         (WebCore::ImageFrameGenerator::decodeAndScale):
1478         (WebCore::ImageFrameGenerator::tryToLockCompleteCache):
1479         (WebCore::ImageFrameGenerator::tryToScale):
1480         (WebCore::ImageFrameGenerator::tryToResumeDecodeAndScale):
1481         New method to lookup an incomplete cache entry and resume decoding.
1482         (WebCore):
1483         (WebCore::ImageFrameGenerator::tryToDecodeAndScale):
1484         (WebCore::ImageFrameGenerator::decoder):
1485         New helper method to do decoding for a full sized image.
1486         (WebCore::ImageFrameGenerator::prepareData):
1487         New helper method to prepare data safely.
1488         * platform/graphics/chromium/ImageFrameGenerator.h:
1489         (ImageFrameGenerator):
1490         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
1491         (WebCore::LazyDecodingPixelRef::onLockPixels):
1492         * platform/graphics/chromium/ScaledImageFragment.h:
1493         (WebCore::ScaledImageFragment::setIsComplete):
1494
1495 2012-12-07  Alexis Menard  <alexis@webkit.org>
1496
1497         Enable CSS3 position offset for CSS Masking.
1498         https://bugs.webkit.org/show_bug.cgi?id=104252
1499
1500         Reviewed by Dirk Schulze.
1501
1502         To follow CSS3 background-position, mask-position should also support
1503         the new <position> type (http://dvcs.w3.org/hg/FXTF/raw-file/tip/masking/index.html#mask-property).
1504         Now the code is shared between background and mask I renamed the
1505         functions used to be more generic. Note that the feature flag is not
1506         meant to stay and will be removed in a following commit.
1507
1508         No new tests : I modified LayoutTests/fast/masking/parsing-mask.html to
1509         cover the new feature.
1510
1511         * css/CSSComputedStyleDeclaration.cpp:
1512         (WebCore::createPositionListForLayer):
1513         * css/CSSParser.cpp:
1514         (WebCore::isFillPositionKeyword):
1515         (WebCore::CSSParser::parse4ValuesFillPosition):
1516         (WebCore::CSSParser::parse3ValuesFillPosition):
1517         (WebCore::CSSParser::isPotentialPositionValue):
1518         (WebCore::CSSParser::parseFillPosition):
1519         (WebCore::CSSParser::parse2ValuesFillPosition):
1520         (WebCore::CSSParser::parseFillProperty):
1521         (WebCore::CSSParser::parseTransformOriginShorthand):
1522         (WebCore::CSSParser::parseRadialGradient):
1523         (WebCore::CSSParser::parsePerspectiveOrigin):
1524         * css/CSSParser.h:
1525         * css/CSSToStyleMap.cpp:
1526         (WebCore::CSSToStyleMap::mapFillXPosition):
1527         (WebCore::CSSToStyleMap::mapFillYPosition):
1528
1529 2012-12-07  No'am Rosenthal  <noam@webkit.org>
1530
1531         Use background color for GraphicsLayers when applicable
1532         https://bugs.webkit.org/show_bug.cgi?id=103786
1533
1534         Updated RenderLayerBacking to call GraphicsLayer::setContentsToBackgroundColor when the following conditions take place:
1535         1. The layer doesn't paint its own content, other than background/decoration.
1536         2. There are no borders or other box decorations (border radius, borders, outline, shadow etc.)
1537         3. The image has only a background color, and no background image.
1538         4. background-composite is set to source-over, and background-clip is anything apart from text.
1539         5. The port supports setContentsToBackgroundColor.
1540
1541         This allows any implementation of GraphicsLayer that supports setContentsToBackgroundColor to avoid allocating a backing store
1542         for that layer, but instead draw that solid color directly.
1543         In addition to setting the background color, the layer's contentsRect needs to be adjusted, since the default contents rect of
1544         a layer is not always equivalent to the rect where the background is supposed to be painted, which is derived from the box's
1545         background-clip property.
1546
1547         Reviewed by Simon Fraser.
1548
1549         Tests: compositing/background-color/background-color-alpha.html
1550                compositing/background-color/background-color-change-to-text.html
1551                compositing/background-color/background-color-composite.html
1552                compositing/background-color/background-color-container.html
1553                compositing/background-color/background-color-content-clip.html
1554                compositing/background-color/background-color-padding-change.html
1555                compositing/background-color/background-color-padding-clip.html
1556                compositing/background-color/background-color-simple.html
1557                compositing/background-color/background-color-text-change.html
1558                compositing/background-color/background-color-text-clip.html
1559
1560         * platform/graphics/GraphicsLayer.h:
1561         (WebCore::GraphicsLayer::supportsBackgroundColorContent):
1562             Allows different implementation of GraphicsLayer to identify whether they implement setContentsToBackgroundColor.
1563             Currently only the MAC implementation and TextureMapper falls under that category.
1564
1565         * rendering/RenderBox.h:
1566         (WebCore::RenderBox::paddingBoxRect):
1567             Added paddingBoxRect to compliment borderBoxRect and contentsBoxRect. paddingBoxRect corresponds to 
1568             background-clip: padding.
1569
1570         * rendering/RenderLayerBacking.cpp:
1571         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
1572             Update the background color if needed, for every configuration change.
1573             This should accomodate the old behavior for full-screen, while enabling background color changes for other layers.
1574
1575         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1576             Move the contentsRect logic to updateContentsRect.
1577
1578         (WebCore::RenderLayerBacking::updateContentsRect):
1579             Use the background box when directly compositing backgrounds.
1580
1581         (WebCore::RenderLayerBacking::updateBackgroundColor):
1582             Set the background color if applicable, otherwise set to trasnparent and clear.
1583             This was not needed in the past because background colors were only used for the special case of full-screen.
1584
1585         (WebCore::supportsDirectBoxDecorationsComposition):
1586             Helper function to determine whether a particular background can be directly composited. Right now only 
1587             background color can be composited, and only if the GraphicsLayer implementation supports background colors.
1588             Also we don't yet support background-clip: text and any background-composite other than source-over.
1589
1590         (WebCore::RenderLayerBacking::paintsBoxDecorations):
1591             Apply the new supportsDirectBoxDecorationsComposition logic.
1592
1593         (WebCore::RenderLayerBacking::contentsBox):
1594             Remove unnecessary local variable.
1595
1596         (WebCore::backgroundRectForBox):
1597         (WebCore::RenderLayerBacking::backgroundBox):
1598             Figure out the correct rect for the GraphicsLayer's contentsRect, based on the renderer's backgroundClip.
1599             The rectangle has to be adjusted based on the composited layer offset, and snapped to an IntRect as 
1600             GraphicsLayer::contentsRect expects snapped pixels.
1601
1602
1603 2012-12-06  Ryosuke Niwa  <rniwa@webkit.org>
1604
1605         Shrink the size of NodeRareData by moving pointers into separate objects
1606         https://bugs.webkit.org/show_bug.cgi?id=104312
1607
1608         Reviewed by Andreas Kling.
1609
1610         This patch does three things:
1611         1. Move ChildNodeList back into NodeListsNodeData.
1612         2. Move m_mutationObserverRegistry & m_transientMutationObserverRegistry into a separate object owned by NodeRareData.
1613         3. Move m_itemProp, m_itemRef, m_itemType & into a separate object owned by NodeRareData.
1614
1615         Moving m_childNodeList from NodeRareData to NodeListsNodeData also has a nice side-effect of making ChildNodeList
1616         behave more like other LiveNodeLists.
1617
1618         This patch also fixes Mac build when microdata is enabled.
1619
1620         There should be no user-visible behavior change.
1621
1622         * dom/ChildNodeList.cpp:
1623         (WebCore::ChildNodeList::~ChildNodeList):
1624         * dom/Node.cpp:
1625         (WebCore::Node::childNodes): Moved the code to create ChildNodeList into NodeListsNodeData to match other node lists.
1626         (WebCore::Node::invalidateNodeListCachesInAncestors):
1627         (WebCore): Removed removeCachedChildNodeList.
1628         * dom/Node.h:
1629         (Node):
1630         * dom/NodeRareData.cpp:
1631         (WebCore): Assert the size of NodeRareData at compilation time.
1632         (WebCore::NodeListsNodeData::reportMemoryUsage):
1633         (WebCore::NodeRareData::reportMemoryUsage):
1634         * dom/NodeRareData.h:
1635         (WebCore::NodeListsNodeData::clearChildNodeListCache): Moved from NodeRareData.
1636         (WebCore::NodeListsNodeData::ensureChildNodeList): Extracted from Node::childNodes.
1637         (WebCore::NodeListsNodeData::removeChildNodeList): Added.
1638         (WebCore::NodeListsNodeData::NodeListsNodeData): Initialize m_childNodeList.
1639         (WebCore::NodeRareData::NodeMutationObserverData): Extracted from NodeRareData.
1640         (WebCore::NodeRareData::NodeMutationObserverData::create):
1641         (WebCore::NodeRareData::NodeMicroDataTokenLists): Ditto.
1642         (WebCore::NodeRareData::NodeMicroDataTokenLists::create):
1643         (WebCore::NodeRareData::NodeRareData):
1644         (WebCore::NodeRareData::ensureNodeLists): Merged setNodeLists since it's not called elsewhere.
1645         (WebCore::NodeRareData::mutationObserverRegistry):
1646         (WebCore::NodeRareData::ensureMutationObserverRegistry): Added.
1647         (WebCore::NodeRareData::transientMutationObserverRegistry):
1648         (WebCore::NodeRareData::ensureTransientMutationObserverRegistry):
1649         (WebCore::NodeRareData::ensureMicroDataTokenLists):
1650         (NodeRareData):
1651         (WebCore::NodeRareData::itemProp):
1652         (WebCore::NodeRareData::setItemProp):
1653         (WebCore::NodeRareData::itemRef):
1654         (WebCore::NodeRareData::setItemRef):
1655         (WebCore::NodeRareData::itemType):
1656         (WebCore::NodeRareData::setItemType):
1657         * html/HTMLPropertiesCollection.cpp:
1658         (WebCore::HTMLPropertiesCollection::propertyNodeList): Renamed from namedItem since its return type, PropertyNodeList,
1659         is different from that, Node, of LiveNodeList::namedItem. It was shadowing the function name instead of overriding.
1660         * html/HTMLPropertiesCollection.h:
1661         (HTMLPropertiesCollection):
1662         * html/HTMLPropertiesCollection.idl:
1663
1664 2012-12-07  Sheriff Bot  <webkit.review.bot@gmail.com>
1665
1666         Unreviewed, rolling out r136993.
1667         http://trac.webkit.org/changeset/136993
1668         https://bugs.webkit.org/show_bug.cgi?id=104415
1669
1670         This patch breaks the mac build (Requested by cabanier on
1671         #webkit).
1672
1673         * html/HTMLCanvasElement.cpp:
1674         (WebCore::HTMLCanvasElement::paint):
1675         * platform/graphics/BitmapImage.h:
1676         * platform/graphics/CrossfadeGeneratedImage.cpp:
1677         (WebCore::CrossfadeGeneratedImage::draw):
1678         * platform/graphics/CrossfadeGeneratedImage.h:
1679         (CrossfadeGeneratedImage):
1680         * platform/graphics/GeneratedImage.h:
1681         (GeneratedImage):
1682         * platform/graphics/GeneratorGeneratedImage.cpp:
1683         (WebCore::GeneratorGeneratedImage::draw):
1684         * platform/graphics/GeneratorGeneratedImage.h:
1685         (GeneratorGeneratedImage):
1686         * platform/graphics/GraphicsContext.cpp:
1687         (WebCore::GraphicsContext::drawImage):
1688         (WebCore::GraphicsContext::drawImageBuffer):
1689         (WebCore::GraphicsContext::setCompositeOperation):
1690         * platform/graphics/GraphicsContext.h:
1691         (WebCore::GraphicsContextState::GraphicsContextState):
1692         (GraphicsContextState):
1693         (GraphicsContext):
1694         * platform/graphics/Image.cpp:
1695         (WebCore::Image::draw):
1696         (WebCore::Image::drawTiled):
1697         * platform/graphics/Image.h:
1698         (Image):
1699         * platform/graphics/ImageBuffer.h:
1700         (ImageBuffer):
1701         * platform/graphics/cairo/BitmapImageCairo.cpp:
1702         (WebCore::BitmapImage::draw):
1703         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1704         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1705         * platform/graphics/cairo/ImageBufferCairo.cpp:
1706         (WebCore::ImageBuffer::draw):
1707         * platform/graphics/cg/BitmapImageCG.cpp:
1708         (WebCore::BitmapImage::draw):
1709         * platform/graphics/cg/GraphicsContextCG.cpp:
1710         (WebCore::GraphicsContext::drawNativeImage):
1711         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1712         * platform/graphics/cg/ImageBufferCG.cpp:
1713         (WebCore::ImageBuffer::draw):
1714         * platform/graphics/cg/PDFDocumentImage.cpp:
1715         (WebCore::PDFDocumentImage::draw):
1716         * platform/graphics/cg/PDFDocumentImage.h:
1717         (PDFDocumentImage):
1718         * platform/graphics/qt/GraphicsContextQt.cpp:
1719         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1720         * platform/graphics/qt/ImageBufferQt.cpp:
1721         (WebCore::ImageBuffer::draw):
1722         * platform/graphics/qt/ImageQt.cpp:
1723         (WebCore::BitmapImage::draw):
1724         * platform/graphics/qt/StillImageQt.cpp:
1725         (WebCore::StillImage::draw):
1726         * platform/graphics/qt/StillImageQt.h:
1727         (StillImage):
1728         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
1729         (BitmapImageSingleFrameSkia):
1730         * platform/graphics/skia/GraphicsContextSkia.cpp:
1731         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1732         * platform/graphics/skia/ImageBufferSkia.cpp:
1733         (WebCore::ImageBuffer::draw):
1734         * platform/graphics/skia/ImageSkia.cpp:
1735         (WebCore::BitmapImage::draw):
1736         (WebCore::BitmapImageSingleFrameSkia::draw):
1737         * platform/graphics/win/ImageCGWin.cpp:
1738         (WebCore::BitmapImage::getHBITMAPOfSize):
1739         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
1740         * svg/graphics/SVGImage.cpp:
1741         (WebCore::SVGImage::drawSVGToImageBuffer):
1742         (WebCore::SVGImage::draw):
1743         (WebCore::SVGImage::nativeImageForCurrentFrame):
1744         * svg/graphics/SVGImage.h:
1745         (SVGImage):
1746
1747 2012-12-07  Alexey Proskuryakov  <ap@apple.com>
1748
1749         There is no need to change cached resource storage policy through ResourceHandleClient
1750         https://bugs.webkit.org/show_bug.cgi?id=104413
1751
1752         Reviewed by Brady Eidson.
1753
1754         This code was only needed to prevent storing responses to disk in private browsing
1755         mode, but we now have a storage session to take care of that in a cleaner and more
1756         reliable way.
1757
1758         * loader/ResourceLoader.cpp:
1759         * loader/ResourceLoader.h: (WebCore::ResourceLoader::receivedCancellation):
1760         * platform/network/ResourceHandleClient.h:
1761         * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::willCacheResponse):
1762         * platform/network/mac/ResourceHandleMac.mm:
1763         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]):
1764
1765 2012-12-07  Adam Klein  <adamk@chromium.org>
1766
1767         MutationRecord addedNodes/removedNodes should never be null
1768         https://bugs.webkit.org/show_bug.cgi?id=98921
1769
1770         Reviewed by Ryosuke Niwa.
1771
1772         Per an update to the DOM4 spec that matches Gecko's behavior,
1773         addedNodes/removedNodes should be empty NodeLists on 'attributes'
1774         and 'characterData' records, rather than null.
1775
1776         This is accomplished with lazy initialization of addedNodes/removedNodes
1777         attributes on 'attributes'/'characterData' records and the
1778         addition of a new StaticNodeList::createEmpty() factory method.
1779
1780         * dom/MutationRecord.cpp:
1781         * dom/MutationRecord.h:
1782         (MutationRecord):
1783         * dom/StaticNodeList.h:
1784         (WebCore::StaticNodeList::adopt):
1785         (StaticNodeList):
1786         (WebCore::StaticNodeList::createEmpty):
1787         (WebCore::StaticNodeList::StaticNodeList):
1788
1789 2012-12-07  Brent Fulgham  <bfulgham@webkit.org>
1790
1791         Unreviewed build correction after 136959.
1792
1793         The initialization list should follow the same compiler macro
1794         exclusions as the class members.
1795
1796         * inspector/InstrumentingAgents.h: Add USE(ACCELERATED_COMPOSITING)
1797           guards around m_inspectorLayerTreeAgent as this does not exist
1798           when the guard is false.
1799
1800 2012-12-07  Rik Cabanier  <cabanier@adobe.com>
1801
1802         Extend platform layer so it can pass blend modes to the compositing calls
1803         https://bugs.webkit.org/show_bug.cgi?id=104176
1804
1805         Reviewed by Dirk Schulze.
1806
1807         Adding blend mode enumeration to drawImage functions + stored blendmode in graphics context 
1808
1809         No new tests, no new functionality.
1810
1811         * html/HTMLCanvasElement.cpp:
1812         (WebCore::HTMLCanvasElement::paint):
1813         * platform/graphics/BitmapImage.h:
1814         * platform/graphics/CrossfadeGeneratedImage.cpp:
1815         (WebCore::CrossfadeGeneratedImage::draw):
1816         * platform/graphics/CrossfadeGeneratedImage.h:
1817         (CrossfadeGeneratedImage):
1818         * platform/graphics/GeneratedImage.h:
1819         (GeneratedImage):
1820         * platform/graphics/GeneratorGeneratedImage.cpp:
1821         (WebCore::GeneratorGeneratedImage::draw):
1822         * platform/graphics/GeneratorGeneratedImage.h:
1823         (GeneratorGeneratedImage):
1824         * platform/graphics/GraphicsContext.cpp:
1825         (WebCore::GraphicsContext::drawImage):
1826         (WebCore):
1827         (WebCore::GraphicsContext::drawImageBuffer):
1828         (WebCore::GraphicsContext::setCompositeOperation):
1829         * platform/graphics/GraphicsContext.h:
1830         (WebCore::GraphicsContextState::GraphicsContextState):
1831         (GraphicsContextState):
1832         (GraphicsContext):
1833         * platform/graphics/Image.cpp:
1834         (WebCore::Image::draw):
1835         (WebCore::Image::drawTiled):
1836         * platform/graphics/Image.h:
1837         (Image):
1838         * platform/graphics/ImageBuffer.h:
1839         (ImageBuffer):
1840         * platform/graphics/cairo/BitmapImageCairo.cpp:
1841         (WebCore::BitmapImage::draw):
1842         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1843         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1844         * platform/graphics/cairo/ImageBufferCairo.cpp:
1845         (WebCore::ImageBuffer::draw):
1846         * platform/graphics/cg/BitmapImageCG.cpp:
1847         (WebCore::BitmapImage::draw):
1848         * platform/graphics/cg/GraphicsContextCG.cpp:
1849         (WebCore::GraphicsContext::drawNativeImage):
1850         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1851         * platform/graphics/cg/ImageBufferCG.cpp:
1852         (WebCore::ImageBuffer::draw):
1853         * platform/graphics/cg/PDFDocumentImage.cpp:
1854         (WebCore::PDFDocumentImage::draw):
1855         * platform/graphics/cg/PDFDocumentImage.h:
1856         (PDFDocumentImage):
1857         * platform/graphics/qt/GraphicsContextQt.cpp:
1858         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1859         * platform/graphics/qt/ImageBufferQt.cpp:
1860         (WebCore::ImageBuffer::draw):
1861         * platform/graphics/qt/ImageQt.cpp:
1862         (WebCore::BitmapImage::draw):
1863         * platform/graphics/qt/StillImageQt.cpp:
1864         (WebCore::StillImage::draw):
1865         * platform/graphics/qt/StillImageQt.h:
1866         (StillImage):
1867         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
1868         (BitmapImageSingleFrameSkia):
1869         * platform/graphics/skia/GraphicsContextSkia.cpp:
1870         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1871         * platform/graphics/skia/ImageBufferSkia.cpp:
1872         (WebCore::ImageBuffer::draw):
1873         * platform/graphics/skia/ImageSkia.cpp:
1874         (WebCore::BitmapImage::draw):
1875         (WebCore::BitmapImageSingleFrameSkia::draw):
1876         * platform/graphics/win/ImageCGWin.cpp:
1877         (WebCore::BitmapImage::getHBITMAPOfSize):
1878         (WebCore::BitmapImage::drawFrameMatchingSourceSize):
1879         * svg/graphics/SVGImage.cpp:
1880         (WebCore::SVGImage::drawSVGToImageBuffer):
1881         (WebCore::SVGImage::draw):
1882         (WebCore::SVGImage::nativeImageForCurrentFrame):
1883         * svg/graphics/SVGImage.h:
1884         (SVGImage):
1885
1886 2012-12-07  Alec Flett  <alecflett@chromium.org>
1887
1888         IndexedDB: propagate transaction_ids through open/upgradeneeded
1889         https://bugs.webkit.org/show_bug.cgi?id=103922
1890
1891         Reviewed by Tony Chang.
1892
1893         Make sure front-end is always generating the transaction id,
1894         so that it can be relied upon as an alternative to the
1895         to-be-deprecated IDBTransactionBackendInterface pointer.
1896
1897         No new tests, this is one stage in a larger refactor.
1898
1899         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1900         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::create):
1901         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::VersionChangeOperation):
1902         (IDBDatabaseBackendImpl::VersionChangeOperation):
1903         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::create):
1904         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::transactionId):
1905         (WebCore::IDBDatabaseBackendImpl::PendingOpenCall::PendingOpenCall):
1906         (IDBDatabaseBackendImpl::PendingOpenCall):
1907         (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::create):
1908         (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::transactionId):
1909         (WebCore::IDBDatabaseBackendImpl::PendingOpenWithVersionCall::PendingOpenWithVersionCall):
1910         (IDBDatabaseBackendImpl::PendingOpenWithVersionCall):
1911         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
1912         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
1913         (WebCore::IDBDatabaseBackendImpl::createTransaction):
1914         (WebCore::IDBDatabaseBackendImpl::openConnection):
1915         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
1916         (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion):
1917         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1918         (IDBDatabaseBackendImpl):
1919         * Modules/indexeddb/IDBFactory.cpp:
1920         (WebCore::IDBFactory::openInternal):
1921         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
1922         (WebCore::IDBFactoryBackendImpl::open):
1923
1924 2012-12-07  Dima Gorbik  <dgorbik@apple.com>
1925
1926         Implement general ::cue pseudo element for the <video>
1927         https://bugs.webkit.org/show_bug.cgi?id=104043
1928
1929         Reviewed by Eric Carlson.
1930
1931         Implemented the ::cue pseudo element to be able to style all WebVTT cues.
1932         Added the subcontainer with a '::cue' pseudoId in between the TextTrackContainerElement and WebVTT nodes to separate
1933         user agent default styles from user defined styles for the cue elements.
1934
1935         Test: media/track/track-css-all-cues.html
1936
1937         * css/CSSSelector.cpp: ::cue pseudo selector doesn't have a valid prefix but should be allowed in the user-agent stylesheet.
1938         (WebCore::CSSSelector::parsePseudoType):
1939         * html/shadow/MediaControlElements.cpp:
1940         (WebCore):
1941         (WebCore::MediaControlTextTrackContainerElement::createSubtrees): create a subcontainer and set its pseudoId to '::cue'.
1942         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): append WebVTT nodes to the newly created subcontainer.
1943         * html/shadow/MediaControlElements.h:
1944         (MediaControlTextTrackContainerElement):
1945         * html/shadow/MediaControls.cpp:
1946         (WebCore::MediaControls::createTextTrackDisplay): initiate creating subtrees for the MediaControlTextTrackContainerElement.
1947         * html/shadow/MediaControlsChromium.cpp:
1948         (WebCore::MediaControlsChromium::createTextTrackDisplay):
1949
1950 2012-12-06  Geoffrey Garen  <ggaren@apple.com>
1951
1952         Crash in JSC::Bindings::RootObject::globalObject() sync'ing notes in Evernote
1953         https://bugs.webkit.org/show_bug.cgi?id=104321
1954         <rdar://problem/12770497>
1955
1956         Reviewed by Sam Weinig.
1957
1958         Missed a null check.
1959
1960         * bindings/objc/WebScriptObject.mm:
1961         (-[WebScriptObject JSObject]): If our root object has been cleared, don't
1962         try to dereference it. This happens in Evernote during tear-down.
1963
1964         This matches the behavior of other methods in the same class.
1965
1966         (_isSafeScript returns false if the root object has been cleared.)
1967
1968         If we believe _isSafeScript is a good idea, it's probably the right test
1969         to use here (as opposed to just null-checking _rootObject) because this API
1970         gives the client unlimited access to the underlying JavaScript object.
1971
1972 2012-12-07  Stephen Chenney  <schenney@chromium.org>
1973
1974         XMLSerializer is too aggressive in adding prefixes
1975         https://bugs.webkit.org/show_bug.cgi?id=104387
1976
1977         Reviewed by Ryosuke Niwa.
1978
1979         We have been adding "xlink:" and "xmlns:" and "xml:" prefixes to any
1980         attribute that is in one of those namespaces but which did not already
1981         have the matching prefix. This appears to be in error, at least
1982         compared to other browsers.
1983
1984         The correct behavior appears to be to add the prefix only if there is
1985         no existing prefix. If there is an existing prefix, we now leave it alone.
1986
1987         No new tests. Existing test expanded.
1988
1989         * editing/MarkupAccumulator.cpp:
1990         (WebCore::MarkupAccumulator::appendAttribute): Only replace the prefix
1991         attribute name prefix if it is empty, and in one of the recognised
1992         namespaces.
1993
1994 2012-12-07  Jon Lee  <jonlee@apple.com>
1995
1996         Display the auto-start label image after a delay
1997         https://bugs.webkit.org/show_bug.cgi?id=104173
1998         <rdar://problem/12820071>
1999
2000         Reviewed by Dan Bernstein.
2001
2002         Treat the button now as a label. Once the user has hovered over the plug-in, wait a little while before showing the label.
2003
2004         * rendering/RenderSnapshottedPlugIn.h:
2005         (RenderSnapshottedPlugIn): Add a one-shot timer, and a variable representing whether the label should
2006         be drawn. Remove the variable that determines whether the label is active.
2007
2008         * rendering/RenderSnapshottedPlugIn.cpp:
2009         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): Set the time to a delay of 1 second.
2010         (WebCore::RenderSnapshottedPlugIn::paintReplaced): Paint the label only when we should.
2011         (WebCore::RenderSnapshottedPlugIn::paintLabel): The label should only paint in its hovered state.
2012         (WebCore::startLabelImage): Renamed.
2013         (WebCore::RenderSnapshottedPlugIn::repaintLabel): Renamed.
2014         (WebCore::RenderSnapshottedPlugIn::hoverDelayTimerFired): Now that the timer has fired, we should paint
2015         the label. Repaint.
2016         (WebCore::RenderSnapshottedPlugIn::handleEvent): Update event handling. Click event handler is the
2017         same, except we move the label check inside so that if the click is not the left label we don't
2018         fall through to the other irrevelant if clauses.
2019             For the mouse down handler, make sure to check for the left label. If the hover timer is still running,
2020         stop it, so that we don't draw a label while the user is in the middle of a mouse gesture.
2021             Redo mouse over and out. On mouse over we start the delay timer. On mouse out we stop the delay timer
2022         if it is still running, reset state, and paint the label out.
2023         (WebCore::RenderSnapshottedPlugIn::layout): Refactor.
2024
2025         * Resources/startButtonPressed.png: Removed.
2026         * Resources/startButtonPressed@2x.png: Removed.
2027         * WebCore.xcodeproj/project.pbxproj:
2028
2029 2012-12-07  Scott Violet  <sky@chromium.org>
2030
2031         [chromium] Remove linux theme related files and switch to default
2032         https://bugs.webkit.org/show_bug.cgi?id=103897
2033
2034         Reviewed by Dimitri Glazkov.
2035
2036         Linux related theme files are now named Default.
2037
2038         No new tests, code cleanup.
2039
2040         * WebCore.gyp/WebCore.gyp: Update files
2041         * WebCore.gypi: Update files
2042         * platform/chromium/PlatformThemeChromiumLinux.cpp: Removed.
2043         * platform/chromium/PlatformThemeChromiumLinux.h: Removed.
2044         * platform/chromium/ScrollbarThemeChromiumLinux.cpp: Removed.
2045         * platform/chromium/ScrollbarThemeChromiumLinux.h: Removed.
2046         * rendering/RenderThemeChromiumAndroid.cpp:
2047         (WebCore::RenderThemeChromiumAndroid::extraDefaultStyleSheet): Linux->Default
2048         * rendering/RenderThemeChromiumAndroid.h: Change superclass
2049         * rendering/RenderThemeChromiumLinux.cpp: Removed.
2050         * rendering/RenderThemeChromiumLinux.h: Removed.
2051
2052 2012-12-07  Eric Carlson  <eric.carlson@apple.com>
2053
2054         Captions menu doesn't update to track changes
2055         https://bugs.webkit.org/show_bug.cgi?id=104393
2056
2057         Reviewed by Dean Jackson.
2058
2059         Flag the captions menu as needing an update when tracks are added or removed. Don't actually
2060         change the menu until it needs to be displayed.
2061
2062         No new tests, media/video-controls-captions-trackmenu.html was updated to test this.
2063
2064         * html/HTMLMediaElement.cpp:
2065         (WebCore::HTMLMediaElement::addTextTrack): Call closedCaptionTracksChanged().
2066         (WebCore::HTMLMediaElement::didRemoveTrack): Ditto.
2067         (WebCore::HTMLMediaElement::configureTextTracks): Ditto.
2068
2069         * html/shadow/MediaControlElements.cpp:
2070         (WebCore::MediaControlClosedCaptionsTrackListElement::MediaControlClosedCaptionsTrackListElement):
2071             Intialize m_trackListHasChanged.
2072         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Call rebuildTrackListMenu if
2073             the track list has changed.
2074         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu): Renamed from resetTrackListMenu.
2075         * html/shadow/MediaControlElements.h:
2076         (WebCore::MediaControlClosedCaptionsTrackListElement::resetTrackListMenu): Just set m_trackListHasChanged.
2077
2078         * html/shadow/MediaControls.h:
2079         (WebCore::MediaControls::closedCaptionTracksChanged): New, do nothing for base class.
2080
2081         * html/shadow/MediaControlsApple.cpp:
2082         (WebCore::MediaControlsApple::toggleClosedCaptionTrackList): Update the track list before 
2083             showing it.
2084         (WebCore::MediaControlsApple::closedCaptionTracksChanged):
2085         * html/shadow/MediaControlsApple.h:
2086
2087 2012-12-07  Stephen White  <senorblanco@chromium.org>
2088
2089         CSS url() filters with forward references don't work
2090         https://bugs.webkit.org/show_bug.cgi?id=90405
2091
2092         Based on a patch by Keyar Hood.
2093
2094         Reviewed by Dirk Schulze.
2095
2096         In order for CSS to reference SVG filters that will occur later in
2097         the document, or will be added at a future time, we need a way to
2098         notify the target element (the one the filter style is applied to)
2099         when the correct SVG filter is added to the DOM.
2100         There is already code for SVG elements that handles this problem, in
2101         SVGResourcesCache. This patch allows any element to have a reference to
2102         an SVG element in SVGResourceCache.
2103
2104         Tests: css3/filters/effect-reference-after.html
2105                css3/filters/effect-reference-delete-crash.html
2106                css3/filters/effect-reference-delete.html
2107                css3/filters/effect-reference-rename.html
2108                css3/filters/effect-reference-reset-style-delete-crash.html
2109                svg/filters/filter-cycle.html
2110
2111         * dom/Element.cpp:
2112         (WebCore::Element::hasPendingResources): Added
2113         (WebCore::Element::setHasPendingResources): Added
2114         (WebCore::Element::clearHasPendingResources): Added
2115         * dom/Element.h:
2116         Accessors for ElementRareData's new bit flag.
2117         (WebCore::Element::buildPendingResource):
2118         Virtual function to override for referenced elements (moved from SVGElement).
2119         * dom/ElementRareData.h:
2120         (WebCore::ElementRareData::ElementRareData):
2121         Add a new bit flag to indicate whether the element depends on pending resources or not.
2122         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2123         (WebCore::BitmapTextureImageBuffer::applyFilters):
2124         Changed to the new function signature for FilterEffectRenderer::build().
2125         * rendering/FilterEffectRenderer.cpp:
2126         (WebCore::FilterEffectRenderer::buildReferenceFilter):
2127         Changed signature to accept a RenderObject rather than a Document, so we know which node to notify when the SVG filter arrives.  If the referenced filter cannot be found, add its id as a pending reference.
2128         (WebCore::FilterEffectRenderer::build):
2129         Changed signature to accept a RenderObject rather than a Document, so we know which node to notify when the SVG filter arrives.
2130         * rendering/FilterEffectRenderer.h:
2131         Change to signatures of build() and buildReferenceFilter() to pass
2132         a RenderObject instead of a Document.
2133         * rendering/RenderLayer.cpp:
2134         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer):
2135         Use the new semantics for FilterEffectRenderer::build().
2136         * rendering/RenderObject.cpp:
2137         (WebCore::RenderObject::willBeDestroyed):
2138         Notify the cache if a RenderObject is destroyed.
2139         * rendering/svg/RenderSVGResourceContainer.cpp:
2140         (WebCore::RenderSVGResourceContainer::registerResource):
2141         Call clearHasPendingResourceIfPossible on the SVGDocumentExtensions, not
2142         on the element, since we want to support generic Elements.
2143         * rendering/svg/SVGResources.cpp:
2144         (WebCore::SVGResources::buildCachedResources):
2145         Add support for building filters on non-SVG elements.
2146         * rendering/svg/SVGResourcesCache.cpp:
2147         (WebCore::SVGResourcesCache::addResourcesFromRenderObject):
2148         Do cycle detection only on SVG elements.
2149         (WebCore::SVGResourcesCache::clientStyleChanged):
2150         For non-SVG elements, set a synthetic style change when parent resources
2151         are invalidated.
2152         (WebCore::SVGResourcesCache::resourceDestroyed):
2153         Add support for non-SVG Elements.
2154         * svg/SVGDocumentExtensions.cpp:
2155         (WebCore::SVGDocumentExtensions::addPendingResource):
2156         (WebCore::SVGDocumentExtensions::isElementPendingResources):
2157         (WebCore::SVGDocumentExtensions::isElementPendingResource):
2158         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
2159         (WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval):
2160         Changed to allow use of Element instead of SVGElement.
2161         (WebCore::SVGDocumentExtensions::clearHasPendingResourcesIfPossible):
2162         Moved from SVGElement, and made to work on any Element.  This way,
2163         we avoid adding this function to Element itself.
2164         * svg/SVGDocumentExtensions.h:
2165         SVGElement -> Element.
2166         * svg/SVGElement.cpp:
2167         * svg/SVGElement.h:
2168         All functions moved to Element, except for clearHasPendingResourcesIfPossible() moved to SVGDocumentExtensions.
2169         * svg/SVGElementRareData.h:
2170         (WebCore::SVGElementRareData::SVGElementRareData):
2171         m_hasPendingResources add accessors moved to ElementRareData.
2172         * svg/SVGStyledElement.cpp:
2173         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
2174         SVGElement -> Element, and call SVGDocumentExtensions for
2175         clearHasPendingResourcesIfPossible().
2176
2177 2012-12-07  Eberhard Graether  <egraether@google.com>
2178
2179         Web Inspector: Add shortcut to set visibility:hidden on elements in the ElementsPanel
2180         https://bugs.webkit.org/show_bug.cgi?id=104146
2181
2182         Reviewed by Pavel Feldman.
2183
2184         This change adds the shortcut H to set and unset visibility:hidden on the inline style
2185         of elements in the Elementspanel. This feature makes it easier to look for elements that
2186         cause bad rendering performance, because visibility:hidden does not paint the element,
2187         but preserves the layout.
2188
2189         No new tests.
2190
2191         * English.lproj/localizedStrings.js:
2192         * inspector/front-end/CSSStyleModel.js:
2193         (WebInspector.CSSStyleModel.prototype.toggleInlineVisibility):
2194         * inspector/front-end/ElementsPanelDescriptor.js:
2195         (WebInspector.ElementsPanelDescriptor.prototype.registerShortcuts):
2196         * inspector/front-end/ElementsTreeOutline.js:
2197         (WebInspector.ElementsTreeOutline.prototype.handleShortcut):
2198         * inspector/front-end/KeyboardShortcut.js:
2199
2200 2012-12-07  Andreas Kling  <akling@apple.com>
2201
2202         Improve our decoded data size estimation for style sheets.
2203         <http://webkit.org/b/104388>
2204
2205         Reviewed by Antti Koivisto.
2206
2207         Tweak how we estimate the total decoded size of a given style sheet. (We were guessing at about 30% of actual size.)
2208         This is just used as a hint to the WebCore cache.
2209
2210         * css/StylePropertySet.cpp:
2211         (WebCore::StylePropertySet::averageSizeInBytes):
2212         * css/StyleRule.cpp:
2213         (WebCore::StyleRule::averageSizeInBytes):
2214
2215 2012-12-07  Robert Hogan  <robert@webkit.org>
2216
2217         REGRESSION(r127163): Content is offset to the right at rea.ru
2218         https://bugs.webkit.org/show_bug.cgi?id=103116
2219
2220         Reviewed by David Hyatt.
2221
2222         The top margin edge of a self-collapsing block that clears a float intrudes up into it by the height of the margin,
2223         so to ensure any child floats of the self-collapsing block only go as far as the top content edge 
2224         add the margin back in to the block's current height before placing them.
2225
2226         Tests: fast/block/margin-collapse/self-collapsing-block-with-float-child-collapsed-margins.html
2227                fast/block/margin-collapse/self-collapsing-block-with-float-child.html
2228
2229         * rendering/RenderBlockLineLayout.cpp:
2230         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
2231
2232 2012-12-07  Alexis Menard  <alexis@webkit.org>
2233
2234         Improve r136754 by hardening checks of expected values for background-position.
2235         https://bugs.webkit.org/show_bug.cgi?id=104380
2236
2237         Reviewed by Antti Koivisto.
2238
2239         r136754 was landed to fix the problem of checking successively two calc
2240         values with validUnit. It was asserting as validUnit expect you to use
2241         the parsed value of the calc after the call. In this case we pre-check the
2242         background-position longhand to count how many values it has to then
2243         call the right parsing functions accordingly. While r136754 is not
2244         wrong it is better to harden isPotentialPositionValue with the real
2245         expected units and keywords. For this matter we can reuse the
2246         ReleaseParsedCalcValueCondition enum which was created with the same
2247         idea as this patch. If you are not interested of the calc parsed
2248         value when calling validUnit() you can now specify it, I believe it is
2249         good to have it explicit to avoid mistake in the future.
2250
2251         No new tests : this is covered by css3/*, fast/backgrounds/*.
2252
2253         * css/CSSParser.cpp:
2254         (WebCore::CSSParser::validCalculationUnit):
2255         (WebCore::CSSParser::validUnit):
2256         (WebCore::CSSParser::isPotentialPositionValue):
2257         * css/CSSParser.h:
2258         (WebCore::CSSParser::validUnit):
2259         (CSSParser):
2260
2261 2012-12-07  Brent Fulgham  <bfulgham@webkit.org>
2262
2263         Remove unnecessary casts in transformations.
2264         https://bugs.webkit.org/show_bug.cgi?id=104376
2265
2266         Reviewed by Simon Fraser.
2267
2268         Several casts from float-to-double are performed prior to
2269         storing the result in a double type. These casts are unnecessary
2270         overhead and reduce the clarity of the source code.
2271
2272         No new tests. Covered by existing CSS test cases.
2273
2274         * platform/graphics/transforms/RotateTransformOperation.cpp:
2275         * platform/graphics/transforms/TransformationMatrix.cpp:
2276
2277 2012-12-07  Antoine Quint  <graouts@apple.com>
2278
2279         Provide the backend for exposing the layer tree to the Web Inspector
2280         https://bugs.webkit.org/show_bug.cgi?id=103513
2281
2282         Reviewed by Pavel Feldman.
2283
2284         The purpose of this patch is to provide a new agent enabling the Web Inspector to interface
2285         with WebCore to access information about the render layer tree and, more specifically, expose
2286         useful information about layers backed by textures composited on the GPU such as metrics and
2287         backing store. Thus we now provide a LayerTreeAgent which will inform the front-end of 
2288         changes to the render layer tree via a new layerTreeDidChange event, providing an object
2289         containing the entire hierarchy of RenderLayers for the inspected document. This hierarchy 
2290         can be queried at any time using the .getLayerTree() method on the LayerTreeAgent. Finally, 
2291         the LayerTreeAgent also exposes a .nodeIdForLayerId() method allowing to get the id of the 
2292         node associated with the RenderLayer with the provided layer id.
2293         
2294         In terms of implementation, RenderLayerCompositor has been changed such that in its 
2295         updateCompositingLayers() method we call the layerTreeDidChange method on the 
2296         InspectorLayerTreeAgent instance via the InspectorInstrumentation.
2297
2298         Test: inspector-protocol/layer-tree.html
2299
2300         * CMakeLists.txt:
2301         * GNUmakefile.list.am:
2302         * Target.pri:
2303         * WebCore.gypi:
2304         * WebCore.vcproj/WebCore.vcproj:
2305         * WebCore.xcodeproj/project.pbxproj:
2306         * inspector/Inspector.json: Define new types IntRect (x, y, width, height) and Layer, which 
2307         holds the information for a RenderLayer (layerId, bounds, isComposited, memory, 
2308         compositedBounds) and its children (childLayers). We also define the methods of the 
2309         LayerTreeAgent object (enable, disable, getLayerTree, nodeIdForLayerId) and the 
2310         layerTreeDidChange event it  
2311         fires.
2312         * inspector/InspectorAllInOne.cpp:
2313         * inspector/InspectorController.cpp:
2314         (WebCore::InspectorController::InspectorController):
2315         * inspector/InspectorDOMAgent.cpp:
2316         (WebCore::InspectorDOMAgent::pushNodePathForRenderLayerToFrontend): New method facilitating 
2317         pushing the node associated with a given RenderLayer to the front-end.
2318         (WebCore):
2319         * inspector/InspectorDOMAgent.h:
2320         (InspectorDOMAgent):
2321         * inspector/InspectorInstrumentation.cpp:
2322         (WebCore):
2323         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
2324         (WebCore::InspectorInstrumentation::layerTreeDidChangeImpl):
2325         (WebCore::InspectorInstrumentation::renderLayerDestroyedImpl):
2326         * inspector/InspectorInstrumentation.h:
2327         (WebCore):
2328         (InspectorInstrumentation):
2329         (WebCore::InspectorInstrumentation::layerTreeDidChange):
2330         (WebCore::InspectorInstrumentation::renderLayerDestroyed):
2331         * inspector/InspectorLayerTreeAgent.cpp: Added.
2332         (WebCore):
2333         (LayerTreeAgentState):
2334         (WebCore::InspectorLayerTreeAgent::InspectorLayerTreeAgent):
2335         (WebCore::InspectorLayerTreeAgent::~InspectorLayerTreeAgent):
2336         (WebCore::InspectorLayerTreeAgent::setFrontend):
2337         (WebCore::InspectorLayerTreeAgent::clearFrontend):
2338         (WebCore::InspectorLayerTreeAgent::restore):
2339         (WebCore::InspectorLayerTreeAgent::reset):
2340         (WebCore::InspectorLayerTreeAgent::enable):
2341         (WebCore::InspectorLayerTreeAgent::disable):
2342         (WebCore::InspectorLayerTreeAgent::layerTreeDidChange):
2343         (WebCore::InspectorLayerTreeAgent::renderLayerDestroyed):
2344         (WebCore::InspectorLayerTreeAgent::getLayerTree):
2345         (WebCore::InspectorLayerTreeAgent::buildObjectForRootLayer):
2346         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer): Build the entire hierarchy of 
2347         RenderLayers from the provided RenderLayer.
2348         (WebCore::InspectorLayerTreeAgent::buildObjectForIntRect):
2349         (WebCore::InspectorLayerTreeAgent::bind):
2350         (WebCore::InspectorLayerTreeAgent::unbind):
2351         (WebCore::InspectorLayerTreeAgent::nodeIdForLayerId):
2352         * inspector/InspectorLayerTreeAgent.h: Added.
2353         (WebCore):
2354         (InspectorLayerTreeAgent):
2355         (WebCore::InspectorLayerTreeAgent::create):
2356         * inspector/InstrumentingAgents.h:
2357         (WebCore):
2358         (WebCore::InstrumentingAgents::InstrumentingAgents):
2359         (InstrumentingAgents):
2360         (WebCore::InstrumentingAgents::inspectorLayerTreeAgent):
2361         (WebCore::InstrumentingAgents::setInspectorLayerTreeAgent):
2362         * rendering/RenderLayerCompositor.cpp:
2363         (WebCore::RenderLayerCompositor::updateCompositingLayers): Call the layerTreeDidChange method 
2364         on the LayerTreeAgent via the InspectorInstrumentation to inform the front-end that the 
2365         RenderLayer hierarchy has changed.
2366         (WebCore):
2367         (WebCore::RenderLayerCompositor::layerBecameNonComposited): Call the renderLayerDestroyed 
2368         method on the LayerTreeAgent via the InspectorInstrumentation to unbind the layer that is 
2369         being destroyed.
2370         * rendering/RenderLayerCompositor.h:
2371         (RenderLayerCompositor):
2372
2373 2012-12-07  Joshua Bell  <jsbell@chromium.org>
2374
2375         IndexedDB: Check SSV version when opening database
2376         https://bugs.webkit.org/show_bug.cgi?id=102243
2377
2378         Reviewed by Tony Chang.
2379
2380         Ensure that the data format (SerializedScriptValue) isn't "from the future" when opening
2381         a backing store. Treat an unknown version the same as an unknown schema version.
2382
2383         Chromium-side test at https://codereview.chromium.org/11470013/ (same as other schema version tests)
2384
2385         * Modules/indexeddb/IDBBackingStore.cpp:
2386         (WebCore):
2387         (WebCore::isSchemaKnown): Check data version as well.
2388         (WebCore::setUpMetadata): Ensure data version is recorded; bump schema version.
2389         * Modules/indexeddb/IDBLevelDBCoding.cpp: Encoding for "DataVersion" global metadata entry.
2390         (IDBLevelDBCoding):
2391         (WebCore::IDBLevelDBCoding::compare):
2392         (WebCore::IDBLevelDBCoding::DataVersionKey::encode):
2393         * Modules/indexeddb/IDBLevelDBCoding.h:
2394         (DataVersionKey):
2395         (IDBLevelDBCoding):
2396         * bindings/js/SerializedScriptValue.cpp:
2397         (SerializedScriptValue::wireFormatVersion): New method (JSC side).
2398         * bindings/js/SerializedScriptValue.h:
2399         * bindings/v8/SerializedScriptValue.cpp:
2400         (WebCore::SerializedScriptValue::wireFormatVersion): New method (V8 side).
2401         (WebCore):
2402         * bindings/v8/SerializedScriptValue.h:
2403         (SerializedScriptValue):
2404
2405 2012-12-07  Andreas Kling  <akling@apple.com>
2406
2407         Throw away StyleResolvers that haven't been used for a long time.
2408         <http://webkit.org/b/104314>
2409
2410         Reviewed by Antti Koivisto.
2411
2412         A lot of memory gets tied up in StyleResolver and the structures and caches that hang from it.
2413         Add a mechanism to throw it away after it's been unused for a while (1 minute.)
2414         This frees up large amounts of memory on inactive pages (background tabs) and static content.
2415
2416         We already have a number of scenarios where the document style is invalidated by throwing away
2417         the StyleResolver so the major code paths are prepared for having a null StyleResolver* on occasion.
2418
2419         ~20MB progression on Membuster3.
2420
2421         * css/StyleResolver.cpp:
2422         (WebCore::StyleResolver::styleForElement):
2423         (WebCore::StyleResolver::styleForKeyframe):
2424         (WebCore::StyleResolver::pseudoStyleForElement):
2425         (WebCore::StyleResolver::styleForPage):
2426
2427             Call document()->didAccessStyleResolver() from the relevant parts of StyleResolver's public API.
2428             This prevents Document from throwing the StyleResolver away for 1 minute after it's used.
2429
2430         * dom/Document.h:
2431         * dom/Document.cpp:
2432         (WebCore::Document::Document):
2433         (WebCore::Document::createStyleResolver):
2434         (WebCore::Document::didAccessStyleResolver):
2435         (WebCore::Document::styleResolverThrowawayTimerFired):
2436
2437             Add a mechanism to call clearStyleResolver() on a refreshing timer.
2438
2439         * dom/Element.cpp:
2440         (WebCore::Element::attributeChanged):
2441
2442             If an attribute change occurs while the document doesn't have a StyleResolver, dirty the element style
2443             since we can't be sure that the attribute change didn't affect any rules.
2444
2445 2012-12-07  Antonio Gomes  <a1.gomes@sisa.samsung.com>
2446
2447         REGRESSION(r136947): Made two tests fail on all platforms (Requested by tonikitoo-ll on #webkit).
2448         https://bugs.webkit.org/show_bug.cgi?id=104368
2449
2450         Unreviewed partial rollout.
2451
2452         r136947 was too aggressive in the sense of fixing RenderBox::canBeScrolledAndHasScrollableArea
2453         as part of itself. Revert the related changes in order to fix both
2454         fast/events/autoscroll-should-not-stop-on-keypress.html and
2455         fast/events/autoscroll-in-textfield.html
2456
2457         * rendering/RenderBox.cpp:
2458         (WebCore::RenderBox::canBeScrolledAndHasScrollableArea):
2459         * rendering/RenderBox.h:
2460
2461 2012-12-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2462
2463         [TexMap] Can not do multiple accelerated animations
2464         https://bugs.webkit.org/show_bug.cgi?id=104364
2465
2466         Reviewed by Kenneth Rohde Christiansen.
2467
2468         By removing all animations with the same name, it is not possible to animate more than one property accelerated. 
2469         Instead only remove any animations with both same name and property.
2470
2471         Covered by animations/opacity-transform-animation.html.
2472
2473         * platform/graphics/GraphicsLayerAnimation.cpp:
2474         (WebCore::GraphicsLayerAnimations::add):
2475         (WebCore::GraphicsLayerAnimations::remove):
2476         * platform/graphics/GraphicsLayerAnimation.h:
2477         (GraphicsLayerAnimations):
2478
2479 2012-12-07  Sujin Park  <sujjin.park@gmail.com>
2480
2481         [EFL] Fix build warning in StyleResolver.cpp using gcc 4.7.2
2482         https://bugs.webkit.org/show_bug.cgi?id=104262
2483
2484         Reviewed by Alexis Menard.
2485
2486         EFL port treats build warning as compile error and there are
2487         maybe-uninitialized when building with gcc 4.7.2.
2488         This patch adds default case to resolve a build break.
2489
2490         * css/StyleResolver.cpp:
2491         (WebCore::getFontAndGlyphOrientation):
2492
2493 2012-12-06  Alexander Pavlov  <apavlov@chromium.org>
2494
2495         Web Inspector: [Chromium] Ctrl + ']' "Goto right panel" keyboard shortcut doesn't work
2496         https://bugs.webkit.org/show_bug.cgi?id=104250
2497
2498         Reviewed by Pavel Feldman.
2499
2500         Ignore "keypress" event resulting from a WM_CHAR message emitted by Win7 upon Ctrl + ']' keypress.
2501
2502         * inspector/front-end/InspectorView.js:
2503         (WebInspector.InspectorView.prototype._keyPress): Ignore all events with charCode < 32.
2504
2505 2012-10-03  Pavel Feldman  <pfeldman@chromium.org>
2506
2507         Web Inspector: provide a way to reload page with given script preprocessor.
2508         https://bugs.webkit.org/show_bug.cgi?id=80992
2509
2510         Reviewed by Yury Semikhatsky.
2511
2512         This change introduces a way to inject 'preprocessor' script that would process
2513         each JavaScript file before it gets into the VM for compilation. That way inspector
2514         can expose capabilities such as assessing code coverage or tracing all the calls.
2515
2516         Preprocessor script is stored in the page agent where it waits for reload to happen.
2517         Upon reload, ScriptDebugServer is using it to patch the script sources.
2518
2519         
2520         Test: inspector/debugger/debugger-script-preprocessor.html
2521
2522         * bindings/js/ScriptDebugServer.h:
2523         (WebCore::ScriptDebugServer::setScriptPreprocessor):
2524         (ScriptDebugServer):
2525         * bindings/v8/DebuggerScript.js:
2526         * bindings/v8/ScriptDebugServer.cpp:
2527         (ScriptDebugServer::ScriptPreprocessor):
2528         (WebCore::ScriptDebugServer::ScriptPreprocessor::ScriptPreprocessor):
2529         (WebCore::ScriptDebugServer::ScriptPreprocessor::preprocessSourceCode):
2530         (WebCore::ScriptDebugServer::ScriptPreprocessor::~ScriptPreprocessor):
2531         (WebCore):
2532         (WebCore::ScriptDebugServer::~ScriptDebugServer):
2533         (WebCore::ScriptDebugServer::setScriptSource):
2534         (WebCore::ScriptDebugServer::setScriptPreprocessor):
2535         (WebCore::ScriptDebugServer::handleV8DebugEvent):
2536         * bindings/v8/ScriptDebugServer.h:
2537         (ScriptDebugServer):
2538         * bindings/v8/custom/V8InjectedScriptManager.cpp:
2539         (WebCore::InjectedScriptManager::createInjectedScript):
2540         * inspector/Inspector.json:
2541         * inspector/InspectorController.cpp:
2542         (WebCore::InspectorController::InspectorController):
2543         * inspector/InspectorDebuggerAgent.h:
2544         (InspectorDebuggerAgent):
2545         * inspector/InspectorPageAgent.cpp:
2546         (WebCore::InspectorPageAgent::reload):
2547         (WebCore::InspectorPageAgent::frameNavigated):
2548         * inspector/InspectorPageAgent.h:
2549         (WebCore::InspectorPageAgent::page):
2550         (WebCore::InspectorPageAgent::scriptPreprocessor):
2551         (InspectorPageAgent):
2552         * inspector/PageDebuggerAgent.cpp:
2553         (WebCore::PageDebuggerAgent::create):
2554         (WebCore::PageDebuggerAgent::PageDebuggerAgent):
2555         (WebCore::PageDebuggerAgent::startListeningScriptDebugServer):
2556         (WebCore::PageDebuggerAgent::stopListeningScriptDebugServer):
2557         (WebCore::PageDebuggerAgent::injectedScriptForEval):
2558         (WebCore::PageDebuggerAgent::didClearMainFrameWindowObject):
2559         (WebCore):
2560         * inspector/PageDebuggerAgent.h:
2561         (WebCore):
2562         (PageDebuggerAgent):
2563
2564 2012-12-07  Alexander Pavlov  <apavlov@chromium.org>
2565
2566         Web Inspector: the "Sources" column is always empty in CSS selector profiles
2567         https://bugs.webkit.org/show_bug.cgi?id=104225
2568
2569         Reviewed by Pavel Feldman.
2570
2571         r112923 and preceding changesets modified the CSSOM wrapper creation for StyleRules in a way
2572         that would not specify the parent CSSStyleSheet for the CSSStyleRules created. Instead,
2573         styleResolver->ensureFullCSSOMWrapperForInspector(rule) is now used to make sure the CSSStyleRule
2574         has a valid parent CSSStyleSheet.
2575
2576         Test: inspector/profiler/selector-profiler-url.html
2577
2578         * css/StyleResolver.cpp:
2579         (WebCore::StyleResolver::collectMatchingRulesForList):
2580         (WebCore::StyleResolver::applyProperties):
2581         * inspector/InspectorInstrumentation.cpp:
2582         (WebCore):
2583         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
2584         (WebCore::InspectorInstrumentation::willProcessRuleImpl):
2585         * inspector/InspectorInstrumentation.h:
2586         (WebCore):
2587         (InspectorInstrumentation):
2588         (WebCore::InspectorInstrumentation::willMatchRule):
2589         (WebCore::InspectorInstrumentation::willProcessRule):
2590
2591 2012-12-05  Antonio Gomes  <a1.gomes@sisa.samsung.com>
2592
2593         Rework bug 97927 to not depend on RenderLayer::allowsScrolling
2594         https://bugs.webkit.org/show_bug.cgi?id=103999
2595
2596         Reviewed by James Robinson.
2597
2598         Patch makes it possible for methods like
2599         RenderLayer::{updateScrollbarsAfterLayout,updateScrollbarsAfterStyleChange}
2600         to not depend on RenderLayer::allowsScrolling to determine if a layer should
2601         be added or removed from its FrameView's ScrollableArea set.
2602
2603         Following the same logic, the patch also fixes RenderBox::canBeScrolledAndHasScrollableArea
2604         method to take into account the box' scroll allowance in a given direction only
2605         when it overflows. This allows simplifying custom methods like InRegionScrollerPrivate::canScrollRenderBox
2606         (@WebKit/blackberry/Api/InRegionScroller.cpp).
2607
2608         The naming pattern for the newly added methods were chosen to keep the consistency
2609         with the existing ones, in the same class.
2610
2611         No new test: it is already covered by ScrollingCoordinatorChromiumTest.clippedBodyTest.
2612
2613         * rendering/RenderBox.cpp:
2614         (WebCore::RenderBox::canBeScrolledAndHasScrollableArea):
2615         * rendering/RenderBox.h:
2616         (RenderBox):
2617         (WebCore::RenderBox::hasScrollableOverflowX):
2618         (WebCore::RenderBox::hasScrollableOverflowY):
2619         * rendering/RenderLayer.cpp:
2620         (WebCore::RenderLayer::hasScrollableHorizontalOverflow):
2621         (WebCore):
2622         (WebCore::RenderLayer::hasScrollableVerticalOverflow):
2623         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
2624         (WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
2625         * rendering/RenderLayer.h:
2626         (RenderLayer):
2627
2628 2012-12-07  Max Feil  <mfeil@rim.com>
2629
2630         [BlackBerry] make "isVideo" information available to platform media player
2631         https://bugs.webkit.org/show_bug.cgi?id=104334
2632
2633         Reviewed by Rob Buis.
2634
2635         The platform player needs to know whether the element is <video>
2636         or <audio>, so it can make certain decisions before metadata
2637         is ready. This is part of a performance optimization refactor
2638         which does not change functionality so no new tests are required.
2639
2640         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2641         (WebCore::MediaPlayerPrivate::load):
2642
2643 2012-12-07  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2644
2645         [EFL] [AC] Implement ImageExtractor::extractImage in GraphicsContext3DEfl.
2646         https://bugs.webkit.org/show_bug.cgi?id=104271.
2647
2648         Reviewed by Kenneth Rohde Christiansen.
2649
2650         This patch implements ImageExtractor::extractImage in GraphicsContext3DEfl.
2651
2652         Covered by existing tests.
2653
2654         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
2655         (WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
2656         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
2657
2658 2012-12-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2659
2660         Use always the order iterator from data member in RenderFlexibleBox
2661         https://bugs.webkit.org/show_bug.cgi?id=104112
2662
2663         Reviewed by Tony Chang.
2664
2665         Some methods receive it as parameter and others use the data
2666         member.
2667
2668         * rendering/RenderFlexibleBox.cpp:
2669         (WebCore::RenderFlexibleBox::layoutBlock):
2670         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
2671         (WebCore::RenderFlexibleBox::layoutFlexItems):
2672         (WebCore::RenderFlexibleBox::computeNextFlexLine):
2673         (WebCore::RenderFlexibleBox::alignFlexLines):
2674         (WebCore::RenderFlexibleBox::alignChildren):
2675         (WebCore::RenderFlexibleBox::flipForRightToLeftColumn):
2676         (WebCore::RenderFlexibleBox::flipForWrapReverse):
2677         * rendering/RenderFlexibleBox.h:
2678
2679 2012-12-07  Kent Tamura  <tkent@chromium.org>
2680
2681         Improve confusing code in BaseMultipleFieldsDateAndTimeInputType
2682         https://bugs.webkit.org/show_bug.cgi?id=104353
2683
2684         Reviewed by Kentaro Hara.
2685
2686         This doesn't change any behavior because call sites of
2687         isEditControlOwnerDisabled and isEditControlOwnerReadOnly treat them
2688         similarly.
2689
2690         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2691         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerDisabled):
2692         Checks element()->disabled, not readOnly.
2693         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerReadOnly):
2694         Checks element()->readOnly, not disabled.
2695
2696 2012-12-07  Jon Lee  <jonlee@apple.com>
2697
2698         Build fix.
2699
2700         * plugins/PlugInOriginHash.cpp:
2701         (WebCore::PlugInOriginHash::hash):
2702
2703 2012-12-04  Jon Lee  <jonlee@apple.com>
2704
2705         Add PlugInOriginHash
2706         https://bugs.webkit.org/show_bug.cgi?id=103655
2707         <rdar://problem/12778949>
2708
2709         Reviewed by Alexey Proskuryakov.
2710
2711         Add the concept of plug-in origin hashes, which are based on a combination of the base domains of the
2712         page's main frame and the plug-in, and the plug-in MIME type.
2713
2714         * plugins/PlugInOriginHash.cpp: Added.
2715         (WebCore::addCaseFoldedCharacters): Add the case-folded string to the hash.
2716         (WebCore::PlugInOriginHash::hash): The hash is based on the concatenation of the page's host, the plug-in
2717         URL's host, and the MIME type. We use StringHasher to get all 32-bits of the hash, since using StringImpl's hash
2718         masks out 8 of the hash bits to make room for bit flags.
2719         * plugins/PlugInOriginHash.h: Added.
2720
2721         * CMakeLists.txt:
2722         * GNUmakefile.list.am:
2723         * Target.pri:
2724         * WebCore.gypi:
2725         * WebCore.vcproj/WebCore.vcproj:
2726         * WebCore.xcodeproj/project.pbxproj:
2727
2728 2012-12-06  Kent Tamura  <tkent@chromium.org>
2729
2730         Refactoring: Clean up placeholder attribute usage
2731         https://bugs.webkit.org/show_bug.cgi?id=104337
2732
2733         Reviewed by Kentaro Hara.
2734
2735         No new tests. This doesn't change any behavior.
2736
2737         * html/HTMLInputElement.cpp: Remove placeholder and setPlacehodler.
2738         * html/HTMLInputElement.h: Ditto.
2739         * html/HTMLTextFormControlElement.cpp:
2740         (WebCore::HTMLTextFormControlElement::strippedPlaceholder):
2741         We can use fastGetAttribute for placeholder.
2742         (WebCore::HTMLTextFormControlElement::isPlaceholderEmpty):
2743         Ditto.
2744
2745 2012-12-06  Kent Tamura  <tkent@chromium.org>
2746
2747         Refactoring: Rename HTMLFormControlElement::required to isRequired
2748         https://bugs.webkit.org/show_bug.cgi?id=104336
2749
2750         Reviewed by Kentaro Hara.
2751
2752         m_required should be m_isRequired, and required() should be
2753         isRequired. It's safe to rename them because HTML*Element::required IDL
2754         attributes are [Reflected].
2755         http://www.webkit.org/coding/coding-style.html#names-bool
2756
2757         * accessibility/AccessibilityNodeObject.cpp:
2758         (WebCore::AccessibilityNodeObject::isRequired):
2759         * css/StyleResolver.cpp:
2760         (WebCore::StyleResolver::canShareStyleWithControl):
2761         * dom/CheckedRadioButtons.cpp:
2762         (WebCore::RadioButtonGroup::add):
2763         (WebCore::RadioButtonGroup::requiredAttributeChanged):
2764         (WebCore::RadioButtonGroup::remove):
2765         * html/CheckboxInputType.cpp:
2766         (WebCore::CheckboxInputType::valueMissing):
2767         * html/FileInputType.cpp:
2768         (WebCore::FileInputType::valueMissing):
2769         * html/HTMLFormControlElement.cpp:
2770         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
2771         (WebCore::HTMLFormControlElement::parseAttribute):
2772         (WebCore::HTMLFormControlElement::isRequired):
2773         * html/HTMLFormControlElement.h:
2774         (HTMLFormControlElement):
2775         * html/HTMLInputElement.cpp:
2776         (WebCore::HTMLInputElement::isRequiredFormControl):
2777         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
2778         * html/HTMLSelectElement.cpp:
2779         (WebCore::HTMLSelectElement::valueMissing):
2780         (WebCore::HTMLSelectElement::isRequiredFormControl):
2781         * html/HTMLTextAreaElement.h:
2782         (WebCore::HTMLTextAreaElement::isRequiredFormControl):
2783         * html/TextFieldInputType.cpp:
2784         (WebCore::TextFieldInputType::valueMissing):
2785
2786 2012-12-06  Hajime Morrita  <morrita@google.com>
2787
2788         [Shadow DOM] Implement Element::shadowRoot with prefix
2789         https://bugs.webkit.org/show_bug.cgi?id=102912
2790
2791         Reviewed by Dimitri Glazkov.
2792
2793         - Added Element::shadowRoot() which return the youngest author shadow root.
2794         - Renamed existing Node::shadowRoot() to containingShadowRoot() to avoid name shadowing.
2795           The name shadowRoot() is confusing anyway so this is good opportunity to rename it.
2796
2797         Test: fast/dom/shadow/shadow-aware-shadow-root.html
2798
2799         * css/SelectorChecker.cpp:
2800         (WebCore::SelectorChecker::checkSelector):
2801         * css/StyleScopeResolver.cpp:
2802         (WebCore::StyleScopeResolver::scopeFor):
2803         (WebCore::StyleScopeResolver::addHostRule):
2804         * dom/Element.cpp:
2805         (WebCore::Element::shadowRoot):
2806         (WebCore):
2807         * dom/Element.h:
2808         (Element):
2809         * dom/Element.idl:
2810         * dom/ElementShadow.cpp:
2811         (WebCore::ElementShadow::setShouldCollectSelectFeatureSet):
2812         * dom/Node.cpp:
2813         (WebCore::Node::rendererIsEditable):
2814         (WebCore::Node::shadowHost):
2815         (WebCore::Node::shadowAncestorNode):
2816         (WebCore::Node::containingShadowRoot):
2817         * dom/Node.h:
2818         (Node):
2819         * dom/Range.cpp:
2820         (WebCore::Range::shadowRoot):
2821         * dom/ShadowRoot.cpp:
2822         (WebCore::ShadowRoot::insertedInto):
2823         (WebCore::ShadowRoot::removedFrom):
2824         * dom/ShadowRoot.h:
2825         (WebCore::ShadowRoot::isAccessible):
2826         * editing/TextIterator.cpp:
2827         (WebCore::TextIterator::handleReplacedElement):
2828         * editing/htmlediting.cpp:
2829         (WebCore::indexForVisiblePosition):
2830         * html/HTMLStyleElement.cpp:
2831         (WebCore::HTMLStyleElement::scopedAttributeChanged):
2832         (WebCore::HTMLStyleElement::registerWithScopingNode):
2833         (WebCore::HTMLStyleElement::removedFrom):
2834         * html/shadow/ContentDistributor.cpp:
2835         (WebCore::ContentDistributor::distribute):
2836         * html/shadow/HTMLContentElement.cpp:
2837         (WebCore::HTMLContentElement::parseAttribute):
2838         (WebCore::HTMLContentElement::insertedInto):
2839         (WebCore::HTMLContentElement::removedFrom):
2840         * html/shadow/HTMLShadowElement.cpp:
2841         (WebCore::HTMLShadowElement::insertedInto):
2842         (WebCore::HTMLShadowElement::removedFrom):
2843         * html/shadow/InsertionPoint.cpp:
2844         (WebCore::InsertionPoint::attach):
2845         (WebCore::InsertionPoint::detach):
2846         (WebCore::InsertionPoint::isActive):
2847         (WebCore::InsertionPoint::childrenChanged):
2848         (WebCore::InsertionPoint::insertedInto):
2849         (WebCore::InsertionPoint::removedFrom):
2850         (WebCore::InsertionPoint::setResetStyleInheritance):
2851         * page/EventHandler.cpp:
2852         (WebCore::instanceAssociatedWithShadowTreeElement):
2853         * svg/SVGElement.cpp:
2854         (WebCore::SVGElement::correspondingElement):
2855         (WebCore::collectInstancesForSVGElement):
2856
2857 2012-12-06  Michael Pruett  <michael@68k.org>
2858
2859         IndexedDB: Replace int64 with int64_t
2860         https://bugs.webkit.org/show_bug.cgi?id=104338
2861
2862         Reviewed by Kentaro Hara.
2863
2864         Cleaning up coding inconsistencies, no change in behavior.
2865
2866         Tests: storage/indexeddb/*
2867
2868         * Modules/indexeddb/IDBFactory.cpp:
2869         (WebCore::IDBFactory::openInternal):
2870
2871 2012-12-06  James Simonsen  <simonjam@chromium.org>
2872
2873         [Resource Timing] Allow detailed timing on same origin sites
2874         https://bugs.webkit.org/show_bug.cgi?id=104328
2875
2876         Reviewed by Tony Gentilcore.
2877
2878         This block was lost when I moved it to PerformanceResourceTiming.cpp.
2879
2880         Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_attribute_order.html
2881
2882         * page/PerformanceResourceTiming.cpp:
2883         (WebCore::passesTimingAllowCheck):
2884
2885 2012-12-06  Rick Byers  <rbyers@chromium.org>
2886
2887         CSS cursor property should support webkit-image-set
2888         https://bugs.webkit.org/show_bug.cgi?id=99493
2889
2890         Reviewed by Beth Dakin.
2891
2892         Add support for image scale factors attached to custom mouse cursor images
2893         behind ENABLE(MOUSE_CURSOR_SCALE).
2894
2895         This required refactoring CSSCursorImageValue to derive directly from
2896         CSSValue since it can contain either a CSSImageValue or a CSSImageSetValue.
2897         If it contains an image-set, then we can plumb directly through to the
2898         CSSImageSetValue.  If it contains an image, then either we can plumb directly
2899         through to the CSSImageValue, or if the URL represents an SVG cursor we have
2900         to intercept the image loading in order to substitute the actual SVG image URL
2901         and do the appropriate lifetime management.
2902
2903         Tests: fast/css/cursor-parsing-image-set.html
2904                fast/events/mouse-cursor-image-set.html
2905
2906         * Configurations/FeatureDefines.xcconfig: Add ENABLE_MOUSE_CURSOR_SCALE - disabled
2907         * GNUmakefile.features.am: ditto
2908         * css/CSSCursorImageValue.cpp: Refactor to inherit directly from CSSValue and support image sets
2909         (WebCore::CSSCursorImageValue::CSSCursorImageValue):
2910         (WebCore::CSSCursorImageValue::~CSSCursorImageValue):
2911         (WebCore::CSSCursorImageValue::customCssText):
2912         (WebCore::CSSCursorImageValue::updateIfSVGCursorIsUsed):
2913         (WebCore::CSSCursorImageValue::cachedImage):
2914         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
2915         (WebCore::CSSCursorImageValue::isSVGCursor):
2916         (WebCore::CSSCursorImageValue::cachedImageURL):
2917         (WebCore::CSSCursorImageValue::clearCachedImage):
2918         (WebCore::CSSCursorImageValue::reportDescendantMemoryUsage):
2919         * css/CSSCursorImageValue.h: Remove cursor-specific hacks
2920         (WebCore::CSSCursorImageValue::create):
2921         (CSSCursorImageValue):
2922         * css/CSSImageValue.cpp:
2923         (WebCore::CSSImageValue::cachedImage):
2924         * css/CSSImageValue.h:
2925         (CSSImageValue):
2926         * css/CSSParser.cpp:
2927         (WebCore::CSSParser::parseValue): Parse cursor(-webkit-image-set(...)) rules
2928         * css/CSSValue.h:
2929         (WebCore::CSSValue::isImageValue):
2930         * css/StyleBuilder.cpp:
2931         (WebCore::ApplyPropertyCursor::applyValue):
2932         * css/StyleResolver.cpp: Hook up new CSSCursorImageValue support since it can't be handled like other images any more.
2933         (WebCore::StyleResolver::styleImage):
2934         (WebCore::StyleResolver::cursorOrPendingFromValue):
2935         (WebCore::StyleResolver::loadPendingImage):
2936         * css/StyleResolver.h:
2937         (StyleResolver):
2938         * page/EventHandler.cpp:
2939         (WebCore::EventHandler::selectCursor): Handle StyleCachedImageSet images and plumb scale factor through
2940         * platform/Cursor.cpp:
2941         (WebCore::Cursor::Cursor): Add imageScaleFactor
2942         * platform/Cursor.h: Add imageScaleFactor
2943         (Cursor):
2944         (WebCore::Cursor::imageScaleFactor):
2945         * platform/chromium/CursorChromium.cpp: Add imageScaleFactor
2946         (WebCore::Cursor::Cursor):
2947         (WebCore::Cursor::operator=):
2948         * rendering/style/CursorData.h: Clarify hotspot units
2949         (CursorData):
2950         * rendering/style/StyleCachedImage.h:
2951         (StyleCachedImage::cachedImage): Override new virtual.
2952         * rendering/style/StyleCachedImageSet.h:
2953         (StyleCachedImageSet::cachedImage): Override new virtual.
2954         * rendering/style/StyleImage.h:
2955         (StyleImage::cachedImage): Add new virtual method to avoid lots of casts and typechecks.
2956         * rendering/style/StylePendingImage.h: Add CSSCursorImageValue support
2957         (WebCore::StylePendingImage::cssCursorImageValue):
2958         * testing/Internals.cpp:
2959         (WebCore::Internals::getCurrentCursorInfo): Print non-identity scale factors for testing
2960
2961 2012-12-06  Hayato Ito  <hayato@chromium.org>
2962
2963         Event's relatedTarget re-targeting does not occur for manually fired mouse events created by event.initMouseEvent().
2964         https://bugs.webkit.org/show_bug.cgi?id=102681
2965
2966         Reviewed by Dimitri Glazkov.
2967
2968         Make sure that event's relatedTarget re-targeting occurs for mouse
2969         events created by event.initMouseEvent().  Since user-generated
2970         mouse events can have a relatedTarget which is same to the target
2971         node, the algorithm which calculates event's ancestors is also
2972         updated so that ancestors are not shrunk wrongly.
2973
2974         Test: fast/events/dispatch-synthetic-mouseevent.html
2975               fast/dom/shadow/shadow-dom-event-dispatching.html
2976
2977         * dom/EventDispatcher.cpp:
2978         (WebCore::EventRelatedTargetAdjuster::adjust):
2979         * dom/MouseEvent.cpp:
2980         (WebCore::MouseEventDispatchMediator::create):
2981         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator):
2982         (WebCore::MouseEventDispatchMediator::dispatchEvent):
2983         * dom/MouseEvent.h:
2984         (WebCore::MouseEventDispatchMediator::isSyntheticMouseEvent):
2985         (MouseEventDispatchMediator):
2986         * dom/Node.cpp:
2987         (WebCore::Node::dispatchEvent):
2988
2989 2012-12-06  Kunihiko Sakamoto  <ksakamoto@chromium.org>
2990
2991         Disabled file input box stops a certain other div from being rendered
2992         https://bugs.webkit.org/show_bug.cgi?id=104226
2993
2994         Reviewed by Dimitri Glazkov.
2995
2996         The bug was caused by setNeedsStyleRecalc() call during style recalculation,
2997         which resulted in inconsistent ChildNeedsStyleRecalc flags in DOM tree.
2998
2999         When reattach of file input happens during style recalculation,
3000         RenderFileUploadControl::updateFromElement() is called from attach().
3001         It may change the disabled state of the upload button in its shadow tree,
3002         but it triggers style recalculation.
3003
3004         This patch solves this issue by setting disabled state of the upload button in
3005         FileInputType::disabledAttributeChanged instead of RenderFileUploadControl.
3006
3007         Test: fast/forms/file/sibling-of-disabled-file-input.html
3008
3009         * html/FileInputType.cpp:
3010         (WebCore::FileInputType::disabledAttributeChanged): Added.
3011         * html/FileInputType.h:
3012         (FileInputType): Declare disabledAttributeChanged.
3013         * rendering/RenderFileUploadControl.cpp:
3014         (WebCore::RenderFileUploadControl::updateFromElement): Remove call to button->setDisabled().
3015
3016 2012-12-06  Dominic Cooney  <dominicc@chromium.org>
3017
3018         Element.pseudo property should be prefixed
3019         https://bugs.webkit.org/show_bug.cgi?id=104060
3020
3021         Reviewed by Hajime Morita.
3022
3023         Other Shadow DOM properties are prefixed; pseudo should be too.
3024
3025         Covered by updated tests in fast/dom/shadow.
3026
3027         * dom/Element.idl:
3028
3029 2012-12-06  Andrei Bucur  <abucur@adobe.com>
3030
3031         [CSS Regions] Remove the sanitize mechanism from LineFragmentationData
3032         https://bugs.webkit.org/show_bug.cgi?id=104234
3033
3034         Reviewed by David Hyatt.
3035
3036         Remove previous work that ensured an invalid region is never returned by the containingRegion getter. After r136793 the blocks always
3037         relayout children if the region chain changes. This means the sanitize() method is only necessary when all the regions are removed.
3038         This case is treated separately in layoutInlineChildren.
3039
3040         Tests: no new functionality, no bug fixed.
3041
3042         * rendering/RenderBlock.cpp:
3043         (WebCore::RenderBlock::lineWidthForPaginatedLineChanged):
3044         * rendering/RenderBlockLineLayout.cpp:
3045         (WebCore::RenderBlock::layoutInlineChildren):
3046         * rendering/RootInlineBox.cpp:
3047         (WebCore::RootInlineBox::containingRegion):
3048         (WebCore):
3049         (WebCore::RootInlineBox::setContainingRegion):
3050         * rendering/RootInlineBox.h:
3051         (RootInlineBox):
3052         (WebCore::RootInlineBox::LineFragmentationData::LineFragmentationData):
3053         (LineFragmentationData):
3054
3055 2012-12-06  Kenneth Russell  <kbr@google.com>
3056
3057         Associate URLs with GraphicsContext3D instances created for WebGL
3058         https://bugs.webkit.org/show_bug.cgi?id=103793
3059
3060         Reviewed by Adam Barth.
3061
3062         Pass down the URL of the topmost frame's document creating the
3063         WebGL context to the platform layer through
3064         GraphicsContext3D::Attributes.
3065
3066         Not feasible to write a layout test for this change; has no
3067         user-visible effect. Tested manually with failure injection in
3068         Chromium port.
3069
3070         * html/canvas/WebGLRenderingContext.cpp:
3071         (WebCore):
3072         (WebCore::WebGLRenderingContext::create):
3073             Pass top document's URL in context creation attributes.
3074         * platform/chromium/support/GraphicsContext3DChromium.cpp:
3075         (WebCore::GraphicsContext3D::create):
3076             Pass URL through WebKit API.
3077         * platform/graphics/GraphicsContext3D.h:
3078         (Attributes):
3079             Add top document's URL to context creation attributes.
3080
3081 2012-12-06  Philip Rogers  <pdr@google.com>
3082
3083         Unify SVG's animation and target tracking systems.
3084         https://bugs.webkit.org/show_bug.cgi?id=102655
3085
3086         Reviewed by Dirk Schulze.
3087
3088         This patch unifies our animation target tracking system and regular target tracking system.
3089         This simplifies the code, fixes a bug, and cleans up a historically security-sensitive area.
3090
3091         Background: When <use>, <mpath>, <animate>, etc. reference another element using
3092         xlink:href="#id", we need to track when #id changes to #otherId, when #id is removed, etc.
3093         This bookkeeping of element -> target is done in SVGDocumentExtensions. Additionally, when
3094         a target changes that causes layout (e.g., rect.x is changed), all dependent elements with
3095         renderers are notified (<animate> has no renderer and will not use this).
3096
3097         Previously, xlink:href changes were lazily resolved when targetElement() was called, target
3098         changes were tracked using the animation tracking framework, and pending targets did not
3099         work (e.g., <animate xlink:href="#p"><!--animate is now pending #p --><rect id="p"/>).
3100
3101         After this patch, we no longer lazily resolve targetElement() but instead change it when
3102         our xlink:href attribute changes. Instead of using the animation tracking framework in
3103         SVGDocumentExtensions, we now use the regular target tracking framework. Lastly, by using
3104         the regular target tracking framework we are able to hook into the pending resource handling
3105         which fixes a bug (see the test).
3106
3107         A test has been added to test that the order of animation elements does not matter. A second
3108         test has been added to show we do not regress a pending-while-pending case.
3109
3110         Tests: svg/animations/svg-animation-order.html
3111                svg/custom/svg-pending-twice.html
3112
3113         * svg/SVGAnimateElement.cpp:
3114         (WebCore::SVGAnimateElement::setTargetElement):
3115
3116             setTargetElement and setAttributeName now work similarly. When the corresponding attribute
3117             changes, we update our internal state (target or attributeName) and save it instead of
3118             looking these values up on each iteration.
3119
3120         (WebCore::SVGAnimateElement::setAttributeName):
3121         (WebCore):
3122         (WebCore::SVGAnimateElement::resetAnimatedPropertyType):
3123         * svg/SVGAnimateElement.h:
3124         (SVGAnimateElement):
3125         * svg/SVGAnimationElement.cpp:
3126         (WebCore::SVGAnimationElement::setAttributeType):
3127         (WebCore::SVGAnimationElement::setTargetElement):
3128         (WebCore::SVGAnimationElement::setAttributeName):
3129         * svg/SVGAnimationElement.h:
3130         (SVGAnimationElement):
3131         * svg/SVGDocumentExtensions.cpp:
3132         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
3133         (WebCore):
3134         * svg/SVGDocumentExtensions.h:
3135         (SVGDocumentExtensions):
3136         * svg/SVGElement.cpp:
3137         (WebCore::SVGElement::~SVGElement):
3138         (WebCore::SVGElement::removedFrom):
3139         (WebCore::SVGElement::attributeChanged):
3140         * svg/SVGElementInstance.cpp:
3141         (WebCore::SVGElementInstance::invalidateAllInstancesOfElement):
3142
3143             This can be removed after r131631 landed.
3144
3145         * svg/SVGMPathElement.cpp:
3146         (WebCore::SVGMPathElement::buildPendingResource):
3147         * svg/SVGTextPathElement.cpp:
3148         (WebCore::SVGTextPathElement::buildPendingResource):
3149
3150             A bug was discovered in review with our resource tracking in a pending-while-pending
3151             case. SVGMpathElement and SVGTextPathElement have been updated to fix this as well.
3152
3153         * svg/animation/SVGSMILElement.cpp:
3154
3155             The changes in SVGSMILElement should look very similar to SVGFEImageElement,
3156             SVGMPathElement, etc. The idea is to build pending resources when added or
3157             removed from the document, or when the href attribute changes.
3158
3159         (WebCore::SVGSMILElement::~SVGSMILElement):
3160         (WebCore):
3161         (WebCore::SVGSMILElement::clearResourceReferences):
3162         (WebCore::SVGSMILElement::buildPendingResource):
3163         (WebCore::SVGSMILElement::insertedInto):
3164         (WebCore::SVGSMILElement::removedFrom):
3165         (WebCore::SVGSMILElement::svgAttributeChanged):
3166         (WebCore::SVGSMILElement::setAttributeName):
3167         (WebCore::SVGSMILElement::setTargetElement):
3168         * svg/animation/SVGSMILElement.h:
3169         (WebCore):
3170         (WebCore::SVGSMILElement::targetElement):
3171         (SVGSMILElement):
3172
3173 2012-12-06  Jon Lee  <jonlee@apple.com>
3174
3175         Retry snapshots if they are too empty
3176         https://bugs.webkit.org/show_bug.cgi?id=104174
3177         <rdar://problem/12820146>
3178
3179         Reviewed by Simon Fraser.
3180
3181         * html/HTMLPlugInImageElement.cpp:
3182         (WebCore::HTMLPlugInImageElement::updateSnapshot): Change the state machine check so that even
3183         when the plug-in is displaying a snapshot, the snapshot can still be updated. This allows for the
3184         retries to be drawn.
3185
3186 2012-12-06  Adam Klein  <adamk@chromium.org>
3187
3188         [HTMLTemplateElement] make content readonly and cloneNode(deep) clone content
3189         https://bugs.webkit.org/show_bug.cgi?id=104181
3190
3191         Reviewed by Adam Barth.
3192
3193         Note that this patch also adds IDL attributes/custom code to tie the lifetime
3194         of the content DocumentFragment wrapper to the lifetime of the template element wrapper
3195         via a hidden JS property.
3196
3197         Based on a patch by Rafael Weinstein.
3198
3199         Test: fast/dom/HTMLTemplateElement/contentWrappers.html
3200
3201         * DerivedSources.cpp:
3202         * Target.pri:
3203         * UseJSC.cmake:
3204         * WebCore.gypi:
3205         * WebCore.xcodeproj/project.pbxproj:
3206         * bindings/js/JSBindingsAllInOne.cpp:
3207         * bindings/js/JSHTMLTemplateElementCustom.cpp: Copied from Source/WebCore/html/HTMLTemplateElement.idl.
3208         (WebCore):
3209         (WebCore::JSHTMLTemplateElement::content):
3210         * bindings/scripts/CodeGeneratorV8.pm: Add support for new V8CacheAttributeForGC attribute.
3211         * dom/Element.h:
3212         (Element): Annotate cloneNode() with OVERRIDE
3213         * html/HTMLTemplateElement.cpp:
3214         (WebCore::HTMLTemplateElement::cloneNode):
3215         * html/HTMLTemplateElement.h:
3216         (HTMLTemplateElement): override cloneNode
3217         * html/HTMLTemplateElement.idl: Make content readonly and add custom attributes.
3218
3219 2012-12-06  Brent Fulgham  <bfulgham@webkit.org>
3220
3221         [Windows, WinCairo] Unreviewed build correction.
3222
3223         Exclude 'DocumentSharedObjectPool.cpp' from build, since it is
3224         built as part of DOMAllInOne.cpp.  The build (besides wasting
3225         time) generates a bunch of build warnings for duplicate symbols.
3226
3227         * WebCore.vcproj/WebCore.vcproj: Mark DocumentSharedObjectPool.cpp
3228         to not build independently of DOMAllInOne.cpp.
3229
3230 2012-12-06  David Grogan  <dgrogan@chromium.org>
3231
3232         IndexedDB: Abort transactions because of leveldb errors part 4
3233         https://bugs.webkit.org/show_bug.cgi?id=103964
3234
3235         Reviewed by Tony Chang.
3236
3237         deleteDatabase, open, and deleteObjectStore will now fire more aborts
3238         and errors in case of leveldb problems
3239
3240         * Modules/indexeddb/IDBBackingStore.cpp:
3241         (WebCore::getVarInt): Make return value indicate leveldb error.
3242         (WebCore::getString): ditto.
3243         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
3244         Change return value to indicate leveldb error.
3245
3246         (WebCore::IDBBackingStore::deleteDatabase):
3247         Already had the desired return value semantics. As a consumer of
3248         getIDBDatabaseMetadata, will return an error (causing an abort) more
3249         often.
3250
3251         (WebCore::IDBBackingStore::deleteObjectStore):
3252         Needed return value change. Will return error to DatabaseBackend to
3253         indicate leveldb problems.
3254
3255         * Modules/indexeddb/IDBBackingStore.h:
3256         (IDBBackingStore):
3257         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3258         (WebCore::IDBDatabaseBackendImpl::openInternal):
3259         Pass leveldb errors up to callers, who already handle internal errors.
3260
3261         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
3262         Abort transaction if there were leveldb problems deleting an object
3263         store.
3264
3265 2012-12-06  David Grogan  <dgrogan@chromium.org>
3266
3267         IndexedDB: Add webkitErrorMessage to IDBTransaction
3268         https://bugs.webkit.org/show_bug.cgi?id=104199
3269
3270         Reviewed by Tony Chang.
3271
3272         Don't drop error messages on the floor.
3273
3274         Expose an error message on IDBTransaction to give developers more
3275         information than the opaque error code currently available. This is
3276         exactly what is done in IDBRequest. 
3277
3278         Tests - transaction-error.html
3279
3280         * Modules/indexeddb/IDBDatabaseError.h:
3281         (WebCore::IDBDatabaseError::create):
3282         * Modules/indexeddb/IDBRequest.cpp:
3283         (WebCore::IDBRequest::dispatchEvent):
3284         (WebCore::IDBRequest::uncaughtExceptionInEventHandler):
3285         * Modules/indexeddb/IDBTransaction.cpp:
3286         (WebCore::IDBTransaction::setError):
3287         (WebCore):
3288         (WebCore::IDBTransaction::webkitErrorMessage):
3289         (WebCore::IDBTransaction::onAbort):
3290         * Modules/indexeddb/IDBTransaction.h:
3291         (IDBTransaction):
3292         * Modules/indexeddb/IDBTransaction.idl:
3293
3294 2012-12-06  Alexander Shalamov  <alexander.shalamov@intel.com>
3295
3296         XMLHttpRequest Content-Type should be taken from Blob type
3297         https://bugs.webkit.org/show_bug.cgi?id=99983
3298
3299         Reviewed by Alexey Proskuryakov.
3300
3301         Fix XMLHttpRequest::send(Blob*) method, so that the Content-Type is set according to W3C specification.
3302         http://www.w3.org/TR/XMLHttpRequest/#the-send-method
3303
3304         Added test that check if content type is set correctly when blob object is sent.
3305
3306         Test: http/tests/xmlhttprequest/post-blob-content-type.html
3307
3308         * xml/XMLHttpRequest.cpp:
3309         (WebCore::XMLHttpRequest::send):
3310             Set correct MIME type for Blob objects.
3311         * WebCore.vcproj/WebCore.vcproj:
3312             Added ParsedContentType to project file.
3313
3314 2012-12-06  Min Qin  <qinmin@chromium.org>
3315
3316         Make LazyDecodingPixelRef inherit from skia::LazyPixelRef so that cc thread can access it
3317         https://bugs.webkit.org/show_bug.cgi?id=103555
3318
3319         Reviewed by Stephen White.
3320
3321         Expose LazyDecodingPixelRef to the cc thread by inheriting from skia::LazyPixelRef.
3322         No test added for now as impl side paiting is still WIP.
3323
3324         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
3325         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
3326         (WebCore::LazyDecodingPixelRef::PrepareToDecode):
3327         (WebCore):
3328         (WebCore::LazyDecodingPixelRef::Decode):
3329         * platform/graphics/chromium/LazyDecodingPixelRef.h:
3330         (LazyDecodingPixelRef):
3331
3332 2012-12-06  Kentaro Hara  <haraken@chromium.org>
3333
3334         [V8] Make an Isolate mandatory in v8UnsignedInteger()
3335         https://bugs.webkit.org/show_bug.cgi?id=104235
3336
3337         Reviewed by Adam Barth.
3338
3339         No tests. No change in behavior.
3340
3341         * bindings/v8/ArrayValue.cpp:
3342         (WebCore::ArrayValue::get):
3343         * bindings/v8/V8Binding.h:
3344         (WebCore::v8UnsignedInteger):
3345         * bindings/v8/V8LazyEventListener.cpp:
3346         (WebCore::V8LazyEventListener::prepareListenerObject):
3347
3348 2012-12-06  David Hyatt  <hyatt@apple.com>
3349
3350         [New Multicolumn] Add requiresBalancing booleans to track which column sets need to rebalance.
3351         https://bugs.webkit.org/show_bug.cgi?id=104297
3352
3353         Reviewed by Simon Fraser.
3354
3355         Add requiresBalancing booleans to RenderMultiColumnBlock and RenderMultiColumnSet. For now the former is just propagated
3356         to the latter, but eventually RenderMultiColumnSets will have a notion of balancing that has to be independent of the
3357         owning block (e.g., maybe only the last set rebalances, or maybe only a set that contains the content between two forced
3358         breaks wants to rebalance, etc.).
3359
3360         * rendering/RenderMultiColumnBlock.cpp:
3361         (WebCore::RenderMultiColumnBlock::RenderMultiColumnBlock):
3362         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
3363         (WebCore::RenderMultiColumnBlock::ensureColumnSets):
3364         * rendering/RenderMultiColumnBlock.h:
3365         (WebCore::RenderMultiColumnBlock::requiresBalancing):
3366         (RenderMultiColumnBlock):
3367         * rendering/RenderMultiColumnSet.cpp:
3368         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
3369         * rendering/RenderMultiColumnSet.h:
3370         (WebCore::RenderMultiColumnSet::requiresBalancing):
3371         (WebCore::RenderMultiColumnSet::setRequiresBalancing):
3372         (RenderMultiColumnSet):
3373         (WebCore::toRenderMultiColumnSet):
3374         (WebCore):
3375
3376 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
3377
3378         Unreviewed, rolling out r136871.
3379         http://trac.webkit.org/changeset/136871
3380         https://bugs.webkit.org/show_bug.cgi?id=104293
3381
3382         crashes on bots and memory leaks (Requested by esprehn on
3383         #webkit).
3384
3385         * dom/Document.h:
3386         (WebCore::Node::treeScope):
3387         * dom/Element.cpp:
3388         (WebCore::Element::createRareData):
3389         * dom/ElementRareData.h:
3390         (ElementRareData):
3391         (WebCore::ElementRareData::ElementRareData):
3392         * dom/Node.cpp:
3393         (WebCore::Node::setTreeScope):
3394         (WebCore::Node::ensureRareData):
3395         (WebCore::Node::createRareData):
3396         (WebCore::Node::clearRareData):
3397         * dom/Node.h:
3398         (WebCore::NodeRareDataBase::~NodeRareDataBase):
3399         (WebCore::NodeRareDataBase::NodeRareDataBase):
3400         (NodeRareDataBase):
3401         (WebCore::Node::renderer):
3402         (WebCore::Node::setRenderer):
3403         (Node):
3404         (WebCore::Node::hasRareData):
3405         * dom/NodeRareData.h:
3406         (WebCore::NodeRareData::NodeRareData):
3407         (NodeRareData):
3408
3409 2012-12-06  Adam Klein  <adamk@chromium.org>
3410
3411         Remove non-v8 binding files from WebCore.gypi
3412         https://bugs.webkit.org/show_bug.cgi?id=104288
3413
3414         Reviewed by Adam Barth.
3415
3416         Since the gyp build is only used by the Chromium project,
3417         there's no need for cpp, gobject, objc, or jsc bindings
3418         in these build files.
3419
3420         * WebCore.gypi:
3421
3422 2012-12-06  Tony Chang  <tony@chromium.org>
3423
3424         REGRESSION(r135082): Restore the ability to insert author level style sheets from script
3425         https://bugs.webkit.org/show_bug.cgi?id=104042
3426
3427         Reviewed by Antti Koivisto.
3428
3429         Add DocumentStyleSheetCollection::addAuthorSheet so embedders can allow scripts
3430         to insert author level styles. Expose the method to window.interals for testing.
3431
3432         Test: userscripts/insert-stylesheets.html
3433
3434         * WebCore.exp.in: Update exports for Internals.cpp.
3435         * WebCore.order: Update exports for Internals.cpp.
3436         * dom/DocumentStyleSheetCollection.cpp:
3437         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
3438         (WebCore::DocumentStyleSheetCollection::addAuthorSheet): Add the stylesheet and force a style recalc.
3439         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Include author level styles.
3440         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage): Include author styles.
3441         * dom/DocumentStyleSheetCollection.h:
3442         (WebCore::DocumentStyleSheetCollection::documentAuthorStyleSheets): Accessor.
3443         (DocumentStyleSheetCollection): Keep track of author styles added by script.
3444         * testing/Internals.cpp:
3445         (WebCore::Internals::insertAuthorCSS): Testing addAuthorSheet.
3446         (WebCore::Internals::insertUserCSS): Testing addUserSheet.
3447         * testing/Internals.h:
3448         * testing/Internals.idl: Add addAuthorSheet and addUserSheet.
3449
3450 2012-12-06  Elliott Sprehn  <esprehn@gmail.com>
3451
3452         Create only NodeRareDataBase when setting TreeScope
3453         https://bugs.webkit.org/show_bug.cgi?id=104202
3454
3455         Reviewed by Dimitri Glazkov.
3456
3457         Move many fields from NodeRareData into NodeRareDataBase and rename it
3458         UncommonNodeData and add a flag to determine if a UncommonNodeData is
3459         actually a full NodeRareData instance. By moving fields up from NodeRareData
3460         we ensure that this new flag in the base class doesn't make NodeRareData
3461         grow in size.
3462
3463         We then make setting the tree scope only allocate the UncommonNodeData
3464         instead of creating the full NodeRareData or ElementRareData. This is
3465         important because when putting nodes into ShadowRoot or any descendant
3466         we must associate the node with a tree scope which adds rare data to the
3467         node making NodeRareData and ElementRareData not very rare.
3468
3469         On 64bit, this reduces the overhead per element from 136 bytes to
3470         32 bytes for a 76% savings, and on other nodes from 64 bytes to 32 bytes
3471         for a 50% savings.
3472
3473         No new tests, no change in behavior.
3474
3475         * dom/Document.h:
3476         (WebCore::Node::treeScope):
3477         * dom/Element.cpp:
3478         (WebCore::Element::createRareData):
3479         * dom/ElementRareData.h:
3480         (ElementRareData):
3481         (WebCore::ElementRareData::ElementRareData):
3482         * dom/Node.cpp:
3483         (WebCore::Node::setTreeScope):
3484         (WebCore::Node::ensureRareData):
3485         (WebCore::Node::createRareData):
3486         (WebCore::Node::clearRareData):
3487         * dom/Node.h:
3488         (WebCore::UncommonNodeData::create):
3489         (UncommonNodeData):
3490         (WebCore::UncommonNodeData::~UncommonNodeData):
3491         (WebCore::UncommonNodeData::isNodeRareData):
3492         (WebCore::UncommonNodeData::UncommonNodeData):
3493         (WebCore::Node::renderer):
3494         (WebCore::Node::setRenderer):
3495         (Node):
3496         (WebCore::Node::hasRareData):
3497         (WebCore::Node::hasUncommonNodeData):
3498         * dom/NodeRareData.h:
3499         (WebCore::NodeRareData::NodeRareData):
3500         (NodeRareData):
3501
3502 2012-12-06  Joshua Bell  <jsbell@chromium.org>
3503
3504         IndexedDB: Remove IDBDatabaseException.idl
3505         https://bugs.webkit.org/show_bug.cgi?id=102961
3506
3507         Reviewed by Adam Barth.
3508
3509         Delete the IDL and references to it. No longer needed as a enum member
3510         in the autogenerated ExceptionCodeDescription.h so removed from the ".in"
3511         file; only direct references are retained in the autogenerated cpp file.
3512
3513         Ideally the code generator would handle these new-style DOMExceptions,
3514         but we don't have any other examples yet to know what pattern to follow.
3515
3516         No new tests - just removing dead code.
3517
3518         * CMakeLists.txt:
3519         * DerivedSources.cpp:
3520         * DerivedSources.make:
3521         * DerivedSources.pri:
3522         * GNUmakefile.list.am:
3523         * Modules/indexeddb/IDBDatabaseException.idl: Removed.
3524         * WebCore.gypi:
3525         * WebCore.vcproj/WebCore.vcproj:
3526         * WebCore.xcodeproj/project.pbxproj:
3527         * dom/DOMExceptions.in:
3528         * dom/make_dom_exceptions.pl:
3529         (generateImplementation):
3530
3531 2012-12-06  Andreas Kling  <akling@apple.com>
3532
3533         [Mac] Drain the CSSValuePool on memory pressure.
3534         <http://webkit.org/b/104274>
3535
3536         Reviewed by Antti Koivisto.
3537
3538         Add a drain() mechanism to CSSValuePool and call it when we're under memory pressure.
3539
3540         * WebCore.xcodeproj/project.pbxproj:
3541         * css/CSSValuePool.cpp:
3542         (WebCore::CSSValuePool::drain):
3543         * css/CSSValuePool.h:
3544         * platform/mac/MemoryPressureHandlerMac.mm:
3545         (WebCore::MemoryPressureHandler::releaseMemory):
3546
3547 2012-12-05  Adam Klein  <adamk@chromium.org>
3548
3549         Remove gyp config for incomplete and unused Apple Mac gyp build
3550         https://bugs.webkit.org/show_bug.cgi?id=104068
3551
3552         Reviewed by Adam Barth.
3553
3554         As part of the removal, move some files to the proper sections
3555         of the gypi file.
3556
3557         * WebCore.gyp/WebCore.gyp:
3558         * WebCore.gypi:
3559
3560 2012-12-06  Hans Muller  <hmuller@adobe.com>
3561
3562         [CSS Exclusions] Add support for computing the first included interval position.
3563         https://bugs.webkit.org/show_bug.cgi?id=103327
3564
3565         Reviewed by Levi Weintraub.
3566
3567         If the first "word" in a line doesn't fit within the shape-inside when lineTop
3568         is the top of the shape's logical bounding box, adjust lineTop downwards to where
3569         the word fits.  Currently only rounded rectangle shapes are supported.
3570
3571         Added ExclusionShape::firstIncludedIntervalLogicalTop(). The new virtual method
3572         computes the topmost/leftmost location where a line segment with the specified
3573         minLogicalIntervalSize will fit within the exclusion shape and returns the
3574         corresponding logical Y coordinate.  The result is additionally constrained to
3575         be at or below minLogicalIntervalTop. If the segment will not fit anywhere within
3576         the shape, then false is returned.
3577
3578         During layout, minLogicalIntervalTop is the nominal top of the line being laid
3579         out within the exclusion shape.
3580
3581         RenderBlock::layoutRunsAndFloatsInRange() now calls a new ExclusionShapeInsideInfo
3582         method, adjustLogicalLineTop(), which uses firstIncludedIntervalLogicalTop() to
3583         decide if the logical top of the line has to be moved downwards, for the first
3584         word to fit within the exclusion shape.
3585
3586         Tests: fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-001.html
3587                fast/exclusions/shape-inside/shape-inside-rounded-rectangle-fit-002.html
3588
3589         * rendering/ExclusionPolygon.cpp:
3590         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): This is a stub implementation.
3591         * rendering/ExclusionPolygon.h:
3592         * rendering/ExclusionRectangle.cpp:
3593         (WebCore::ellipseXIntercept): Added spaces to conform to webkit style and to be consistent with ellipseYIntercept()
3594         (WebCore::ellipseYIntercept): Compute an ellipse's Y intercept for an X coordinate.
3595         (WebCore::ExclusionRectangle::firstIncludedIntervalLogicalTop): See the description above.
3596         * rendering/ExclusionRectangle.h:
3597         * rendering/ExclusionShape.h:
3598         (ExclusionShape):
3599         (WebCore::ExclusionShape::logicalTopForMinY): Internal to logical coordinate conversion.
3600         * rendering/ExclusionShapeInsideInfo.cpp:
3601         (WebCore::ExclusionShapeInsideInfo::adjustLogicalLineTop): A new method that updates m_lineTop with firstIncludedIntervalPosition().
3602         * rendering/ExclusionShapeInsideInfo.h:
3603         (ExclusionShapeInsideInfo):
3604         (WebCore::ExclusionShapeInsideInfo::logicalLineTop): This is just a cover for the private m_lineTop field.
3605         * rendering/RenderBlockLineLayout.cpp:
3606         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Added code that restarts the layout loop if it's necessary to adjust the line's logicalTop.
3607         (WebCore::RenderBlock::restartLayoutRunsAndFloatsInRange): Factored newly common code into this helper function.
3608
3609 2012-12-06  Ryosuke Niwa  <rniwa@webkit.org>
3610
3611         Use ownerNode() instead of base() in HTMLCollection
3612         https://bugs.webkit.org/show_bug.cgi?id=104244
3613
3614         Reviewed by Adam Barth.
3615
3616         Use ownerNode() instead of base() in HTMLCollection to match LiveNodeList.
3617         Notice that the definition of base(), which this patch removes, is "return ownerNode()".
3618
3619         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
3620         (WebCore::getNamedItems):
3621         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
3622         (WebCore::JSHTMLOptionsCollection::indexSetter):
3623         (WebCore::JSHTMLOptionsCollection::remove):
3624         * bindings/scripts/CodeGeneratorJS.pm:
3625         (GenerateImplementation):
3626         * bindings/scripts/CodeGeneratorV8.pm:
3627         (GenerateOpaqueRootForGC):
3628         * bindings/scripts/IDLAttributes.txt:
3629         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
3630         (WebCore::getNamedItems):
3631         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
3632         (WebCore::V8HTMLOptionsCollection::removeCallback):
3633         (WebCore::V8HTMLOptionsCollection::indexedPropertySetter):
3634         * dom/WebKitNamedFlow.cpp:
3635         (WebCore::WebKitNamedFlow::ownerNode):
3636         * dom/WebKitNamedFlow.h:
3637         (WebKitNamedFlow):
3638         * dom/WebKitNamedFlow.idl:
3639         * html/HTMLAllCollection.idl:
3640         * html/HTMLCollection.h:
3641         (HTMLCollection):
3642         * html/HTMLCollection.idl:
3643         * html/HTMLFormControlsCollection.cpp:
3644         (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
3645         (WebCore::HTMLFormControlsCollection::create):
3646         (WebCore::HTMLFormControlsCollection::formControlElements):
3647         (WebCore::HTMLFormControlsCollection::formImageElements):
3648         (WebCore::HTMLFormControlsCollection::namedItem):
3649         (WebCore::HTMLFormControlsCollection::updateNameCache):
3650         * html/HTMLFormControlsCollection.idl:
3651         * html/HTMLNameCollection.cpp:
3652         (WebCore::HTMLNameCollection::~HTMLNameCollection):
3653         (WebCore::HTMLNameCollection::virtualItemAfter):
3654         * html/HTMLOptionsCollection.cpp:
3655         (WebCore::HTMLOptionsCollection::add):
3656         (WebCore::HTMLOptionsCollection::remove):
3657         (WebCore::HTMLOptionsCollection::selectedIndex):
3658         (WebCore::HTMLOptionsCollection::setSelectedIndex):
3659         (WebCore::HTMLOptionsCollection::setLength):
3660         * html/HTMLOptionsCollection.idl:
3661         * html/HTMLPropertiesCollection.cpp:
3662         (WebCore::HTMLPropertiesCollection::updateRefElements):
3663         (WebCore::HTMLPropertiesCollection::namedItem):
3664         * html/HTMLTableRowsCollection.cpp:
3665         (WebCore::HTMLTableRowsCollection::virtualItemAfter):
3666
3667 2012-12-06  Tommy Widenflycht  <tommyw@google.com>
3668
3669         Speech Recognition API: Change the error code to a string on SpeechRecognitionError
3670         https://bugs.webkit.org/show_bug.cgi?id=104254
3671
3672         Reviewed by Adam Barth.
3673
3674         SpeechRecognitionError::code (numeric value) has been changed to SpeechRecognitionError::error (string)
3675         in the latest specification.
3676
3677         http://dvcs.w3.org/hg/speech-api/raw-file/tip/speechapi.html#speechreco-error
3678
3679         Existing tests modified to cover this patch.
3680
3681         * Modules/speech/SpeechRecognitionError.cpp:
3682         (WebCore::ErrorCodeToString):
3683         (WebCore):
3684         (WebCore::SpeechRecognitionError::create):
3685         (WebCore::SpeechRecognitionError::SpeechRecognitionError):
3686         * Modules/speech/SpeechRecognitionError.h:
3687         (SpeechRecognitionErrorInit):
3688         (WebCore::SpeechRecognitionError::error):
3689         (SpeechRecognitionError):
3690         * Modules/speech/SpeechRecognitionError.idl:
3691
3692 2012-12-06  Stephen Chenney  <schenney@chromium.org>
3693
3694         SVG <use> element inside an svg-as-image fails
3695         https://bugs.webkit.org/show_bug.cgi?id=104007
3696
3697         Reviewed by Eric Seidel.
3698
3699         Upon redraw, SVGImage calls layout on the document it is drawing into
3700         the image if the image, provided it believes the redraw does not need
3701         to be delayed. Unfortunately, when an SVG <use> element is modified
3702         (by animation, say) and regenerates its shadow tree, the destructors
3703         invoke redraw, causing the SVGImage to call layout on something that
3704         is in the process of being deleted. That's bad.
3705
3706         This change causes SVGImage to always delay the redraw. It is the most robust
3707         way to protect against this problem, as there may be any number of
3708         ways to cause this issue (a node being deleted in an svg-as-image
3709         target) and this protects against them all.
3710
3711         The test case crashes in Asan Chromium.
3712
3713         Test: svg/as-image/animated-use-as-image-crash.html
3714
3715         * svg/graphics/SVGImageCache.cpp:
3716         (WebCore::SVGImageCache::imageContentChanged): Always redraw on the timer.
3717
3718 2012-12-06  Antoine Quint  <graouts@apple.com>
3719
3720         TextTrack's .cues not ordered correctly when two cues have the same .startTime
3721         https://bugs.webkit.org/show_bug.cgi?id=103266
3722
3723         Reviewed by Eric Carlson.
3724
3725         Adding a new method TextTrackCueList::updateCueIndex() to update the list of
3726         cues after changing the .startTime or .endTime of a TextTrackCue. I elected to
3727         add a new method to TextTrackCueList rather than calling remove() and then add()
3728         on the list from TextTrack::cueDidChange() so that the nature of the operation
3729         is abstracted and we can easily change the way we keep the cue list sorted at
3730         a later time should we choose to.
3731
3732         * html/track/TextTrack.cpp:
3733         (WebCore::TextTrack::cueDidChange):
3734         * html/track/TextTrackCueList.cpp:
3735         (WebCore::TextTrackCueList::updateCueIndex):
3736         (WebCore):
3737         * html/track/TextTrackCueList.h:
3738         (TextTrackCueList):
3739
3740 2012-12-06  Andras Becsi  <andras.becsi@digia.com>
3741
3742         [Qt][Mac] Fix libxslt and libxml2 config tests
3743         https://bugs.webkit.org/show_bug.cgi?id=104164
3744
3745         Reviewed by Simon Hausmann.
3746
3747         Since libxml2 is a dependency for libxslt and is not used
3748         standalone the configurations for it should also depend on
3749         whether XSLT is enabled.
3750         Also avoid using pkg-config on Mac, instead use direct
3751         include paths and add needed libraries to the linker.
3752
3753         No new tests needed.
3754
3755         * WebCore.pri:
3756
3757 2012-12-06  Shinya Kawanaka  <shinyak@chromium.org>
3758
3759         Internals.getElementByIdInShadowRoot is nonsense now.
3760         https://bugs.webkit.org/show_bug.cgi?id=104241
3761
3762         Reviewed by Kent Tamura.
3763
3764         Since we have ShadowRoot.getElementById() now, we don't need Internals.getElementByIdInShadowRoot, which is
3765         the same functionality of ShadowRoot.getElementById().
3766
3767         Test: fast/dom/shadow/get-element-by-id-in-shadow-root.html
3768
3769         * WebCore.exp.in:
3770         * testing/Internals.cpp:
3771         * testing/Internals.h:
3772         (Internals):
3773         * testing/Internals.idl:
3774
3775 2012-12-06  Kondapally Kalyan  <kalyan.kondapally@intel.com>
3776
3777         [EFL] Active texture state gets corrupted after updating graphics surface contents.
3778         https://bugs.webkit.org/show_bug.cgi?id=104248.
3779
3780         Reviewed by Kenneth Rohde Christiansen.
3781
3782         GraphicsContext3DPrivate::copyToGraphicsSurface() doesn't restore the previously bound texture
3783         after copying texture contents. This corrupts the texture state.
3784
3785         Existing Tests should cover this.
3786
3787         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
3788         (GraphicsContext3DPrivate::copyToGraphicsSurface):
3789         * platform/graphics/opengl/GLPlatformSurface.cpp:
3790         (WebCore::GLPlatformSurface::updateContents):
3791         * platform/graphics/opengl/GLPlatformSurface.h:
3792         (GLPlatformSurface):
3793
3794 2012-12-06  Alexander Pavlov  <apavlov@chromium.org>
3795
3796         Web Inspector: Goto panel shortcuts and description are reversed
3797         https://bugs.webkit.org/show_bug.cgi?id=103988
3798
3799         Reviewed by Pavel Feldman.
3800
3801         Swap the square brackets in the shortcuts.
3802
3803         * inspector/front-end/inspector.js:
3804         (WebInspector._registerShortcuts):
3805
3806 2012-12-06  Sheriff Bot  <webkit.review.bot@gmail.com>
3807
3808         Unreviewed, rolling out r136818.
3809         http://trac.webkit.org/changeset/136818
3810         https://bugs.webkit.org/show_bug.cgi?id=104249
3811
3812         simulatedClick does not work as per #chrmium irc. (Requested
3813         by hayato on #webkit).
3814
3815         * dom/EventDispatcher.cpp:
3816         (WebCore::EventRelatedTargetAdjuster::adjust):
3817         * dom/MouseEvent.cpp:
3818         (WebCore::MouseEventDispatchMediator::create):
3819         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator):
3820         (WebCore::MouseEventDispatchMediator::dispatchEvent):
3821         * dom/MouseEvent.h:
3822         (MouseEventDispatchMediator):
3823         * dom/Node.cpp:
3824         (WebCore::Node::dispatchEvent):
3825
3826 2012-12-06  Ulan Degenbaev  <ulan@chromium.org>
3827
3828         [v8] Fix hidden property name of V8ArrayBufferView flag.
3829         https://bugs.webkit.org/show_bug.cgi?id=104099
3830
3831         Reviewed by Kentaro Hara.
3832
3833         Fix hidden property name of V8ArrayBufferView hidden copy method.
3834
3835         * bindings/v8/V8HiddenPropertyName.h:
3836         (WebCore):
3837         * bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
3838         (WebCore::getHiddenCopyMethod):
3839         (WebCore::installHiddenCopyMethod):
3840
3841 2012-12-06  Kentaro Hara  <haraken@chromium.org>
3842
3843         Unreviewed. Fixed a wrong comment landed in r136822.
3844
3845         * bindings/v8/V8Binding.h:
3846         (WebCore):
3847
3848 2012-12-05  Kentaro Hara  <haraken@chromium.org>
3849
3850         [V8] Implement deprecatedV8String()
3851         https://bugs.webkit.org/show_bug.cgi?id=104230
3852
3853         Reviewed by Adam Barth.
3854
3855         To make an Isolate mandatory in v8String(), we implement
3856         deprecatedV8String() for call sites that don't have
3857         an Isolate. Eventually we want to kill the method though.
3858
3859         No tests. No change in behavior.
3860
3861         * bindings/scripts/test/V8/V8TestCallback.cpp:
3862         (WebCore::V8TestCallback::callbackWithClass2Param):
3863         * bindings/v8/Dictionary.cpp:
3864         (WebCore::Dictionary::getKey):
3865         * bindings/v8/IDBBindingUtilities.cpp:
3866         (WebCore::get):
3867         (WebCore::set):
3868         * bindings/v8/JavaScriptCallFrame.cpp:
3869         (WebCore::JavaScriptCallFrame::evaluate):
3870         * bindings/v8/ScriptController.cpp:
3871         (WebCore::ScriptController::compileAndRunScript):
3872         (WebCore::ScriptController::bindToWindowObject):
3873         (WebCore::ScriptController::disableEval):
3874         * bindings/v8/ScriptDebugServer.cpp:
3875         (WebCore::ScriptDebugServer::setBreakpoint):
3876         (WebCore::ScriptDebugServer::removeBreakpoint):
3877         (WebCore::ScriptDebugServer::setScriptSource):
3878         (WebCore::ScriptDebugServer::ensureDebuggerScriptCompiled):
3879         (WebCore::ScriptDebugServer::compileScript):
3880         * bindings/v8/ScriptFunctionCall.cpp:
3881         (WebCore::ScriptCallArgumentHandler::appendArgument):
3882         (WebCore::ScriptFunctionCall::call):
3883         (WebCore::ScriptFunctionCall::construct):
3884         * bindings/v8/ScriptProfiler.cpp:
3885         (WebCore::ScriptProfiler::start):
3886         (WebCore::ScriptProfiler::stop):
3887         (WebCore::ScriptProfiler::takeHeapSnapshot):
3888         * bindings/v8/ScriptSourceCode.cpp:
3889         (WebCore::ScriptSourceCode::compileScript):
3890         * bindings/v8/V8Binding.h:
3891         (WebCore):
3892         (WebCore::deprecatedV8String):
3893         * bindings/v8/V8DOMWindowShell.cpp:
3894         (WebCore::V8DOMWindowShell::initializeIfNeeded):
3895         (WebCore::V8DOMWindowShell::namedItemAdded):
3896         (WebCore::V8DOMWindowShell::namedItemRemoved):
3897         * bindings/v8/V8LazyEventListener.cpp:
3898         (WebCore::V8LazyEventListener::prepareListenerObject):
3899         * bindings/v8/V8WindowErrorHandler.cpp:
3900         (WebCore::V8WindowErrorHandler::callListenerFunction):
3901         * bindings/v8/V8WorkerContextErrorHandler.cpp:
3902         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
3903         * bindings/v8/WorkerScriptController.cpp:
3904         (WebCore::WorkerScriptController::evaluate):
3905         * bindings/v8/custom/V8ArrayBufferViewCustom.cpp:
3906         (WebCore::installHiddenCopyMethod):
3907         (WebCore::copyElements):
3908         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
3909         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
3910         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
3911         (WebCore::V8InjectedScriptHost::getEventListenersCallback):
3912         * bindings/v8/custom/V8InjectedScriptManager.cpp:
3913         (WebCore::InjectedScriptManager::createInjectedScript):
3914         * bindings/v8/custom/V8MessageEventCustom.cpp:
3915         (WebCore::V8MessageEvent::dataAccessorGetter):
3916         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3917         (WebCore::toV8Object):
3918         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
3919
3920 2012-12-06  Keishi Hattori  <keishi@webkit.org>
3921
3922         Page popup should align to the right when the anchor element is rtl
3923         https://bugs.webkit.org/show_bug.cgi?id=104219
3924
3925         Reviewed by Kent Tamura.
3926
3927         Page popup should align to the right edge of the anchor element when the anchor element is rtl.
3928
3929         No new tests. Mock page popup can't test popup window position.
3930
3931         * Resources/pagepopups/pickerCommon.js:
3932         (_adjustWindowRectHorizontally): Align to the right edge when anchor element is rtl. Removed some redundant lines.
3933         (setWindowRect): If the window is hidden we want to move first then resize so the popup doesn't flicker.
3934         (isWindowHidden): Returns true if the window is hidden using hideWindow().
3935
3936 2012-12-06  Kentaro Hara  <haraken@chromium.org>
3937
3938         [V8] Make an Isolate mandatory for v8StringOrNull() and v8StringOrUndefined()
3939         https://bugs.webkit.org/show_bug.cgi?id=104213
3940
3941         Reviewed by Adam Barth.
3942
3943         All call sites of v8StringOrNull() and v8StringOrUndefined() have an Isolate.
3944
3945         No tests. No change in behavior.
3946
3947         * bindings/v8/V8Binding.h:
3948         (WebCore::v8StringOrNull):
3949         (WebCore::v8StringOrUndefined):
3950
3951 2012-12-05  Kentaro Hara  <haraken@chromium.org>
3952
3953         [V8] Implement deprecatedV8Integer(int i)
3954         https://bugs.webkit.org/show_bug.cgi?id=104220
3955
3956         Reviewed by Adam Barth.
3957
3958         To make an Isolate mandatory in v8Integer(), we implement
3959         deprecatedV8Integer(int i) for call sites that don't have
3960         an Isolate. Eventually we want to kill deprecatedV8Integer(int i).
3961
3962         No new tests. No change in behavior.
3963
3964         * bindings/v8/Dictionary.cpp:
3965         (WebCore::Dictionary::get):
3966         * bindings/v8/NPV8Object.cpp:
3967         (_NPN_Enumerate):
3968         * bindings/v8/PageScriptDebugServer.cpp:
3969         (WebCore::PageScriptDebugServer::addListener):
3970         * bindings/v8/ScriptDebugServer.cpp:
3971         (WebCore::ScriptDebugServer::setBreakpoint):
3972         (WebCore::ScriptDebugServer::compileScript):
3973         * bindings/v8/ScriptSourceCode.cpp:
3974         (WebCore::ScriptSourceCode::compileScript):
3975         * bindings/v8/V8Binding.h:
3976         (WebCore):
3977         (WebCore::deprecatedV8Integer):
3978         * bindings/v8/V8DOMConfiguration.cpp:
3979         (WebCore::V8DOMConfiguration::batchConfigureConstants):
3980         * bindings/v8/V8NPUtils.cpp:
3981         (WebCore::convertNPVariantToV8Object):
3982         * bindings/v8/V8Utilities.cpp:
3983         (WebCore::createHiddenDependency):
3984         (WebCore::removeHiddenDependency):
3985         * bindings/v8/V8WindowErrorHandler.cpp:
3986         (WebCore::V8WindowErrorHandler::callListenerFunction):
3987         * bindings/v8/V8WorkerContextErrorHandler.cpp:
3988         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
3989         * bindings/v8/WorkerScriptDebugServer.cpp:
3990         (WebCore::WorkerScriptDebugServer::addListener):
3991         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
3992         (WebCore::V8MutationCallback::handleEvent):
3993
3994 2012-12-06  Hayato Ito  <hayato@chromium.org>
3995
3996         Event's relatedTarget re-targeting does not occur for manually fired mouse events created by event.initMouseEvent().
3997         https://bugs.webkit.org/show_bug.cgi?id=102681
3998
3999         Reviewed by Dimitri Glazkov.
4000
4001         Make sure that event's relatedTarget re-targeting occurs for mouse
4002         events created by event.initMouseEvent().  Since user-generated
4003         mouse events can have a relatedTarget which is same to the target
4004         node, the algorithm which calculates event's ancestors is also
4005         updated so that ancestors are not shrunk wrongly.
4006
4007         Test: fast/events/dispatch-synthetic-mouseevent.html
4008               fast/dom/shadow/shadow-dom-event-dispatching.html
4009
4010         * dom/EventDispatcher.cpp:
4011         (WebCore::EventRelatedTargetAdjuster::adjust):
4012         * dom/MouseEvent.cpp:
4013         (WebCore::MouseEventDispatchMediator::create):
4014         (WebCore::MouseEventDispatchMediator::MouseEventDispatchMediator):
4015         (WebCore::MouseEventDispatchMediator::dispatchEvent):
4016         * dom/MouseEvent.h:
4017         (WebCore::MouseEventDispatchMediator::isSyntheticMouseEvent):
4018         (MouseEventDispatchMediator):
4019         * dom/Node.cpp:
4020         (WebCore::Node::dispatchEvent):
4021
4022 2012-12-06  Michael Pruett  <michael@68k.org>
4023
4024         [JSC] Check whether property is an array before attempting conversion to array in JSDictionary
4025         https://bugs.webkit.org/show_bug.cgi?id=96614
4026
4027         Reviewed by Kentaro Hara.
4028
4029         JSDictionary should check whether the property being accessed in get()
4030         is an array before a