842ef23b18fc4858ee43caeb8a1761c0e34ab27c
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-14  Mike Fenton  <mifenton@rim.com>
2
3         [BlackBerry] Update keyboard event details to match platform details.
4         https://bugs.webkit.org/show_bug.cgi?id=109693
5
6         Reviewed by Yong Li.
7
8         PR 220170.
9
10         Update the keyboard event details to match the
11         platform details available.
12
13         Rename helper function to better describe the conversion.
14
15         Reviewed Internally by Nima Ghanavatian and Gen Mak.
16
17         * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
18         (WebCore::windowsKeyCodeForBlackBerryKeycode):
19         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
20
21 2013-02-08  Andrey Kosyakov  <caseq@chromium.org>
22
23         Web Inspector: expose did{Begin,Cancel}Frame() and {will,did}Composite() on WebDebToolsAgent
24         https://bugs.webkit.org/show_bug.cgi?id=109192
25
26         Reviewed by Pavel Feldman.
27
28         - remove frame and compositing instrumentation methods from InspectorInstrumentation;
29         - expose those methods on InspectorController instead.
30
31         * WebCore.exp.in:
32         * inspector/InspectorController.cpp:
33         (WebCore::InspectorController::didBeginFrame):
34         (WebCore):
35         (WebCore::InspectorController::didCancelFrame):
36         (WebCore::InspectorController::willComposite):
37         (WebCore::InspectorController::didComposite):
38         * inspector/InspectorController.h:
39         (InspectorController):
40         * inspector/InspectorInstrumentation.cpp:
41         (WebCore):
42         * inspector/InspectorInstrumentation.h:
43         (InspectorInstrumentation):
44         * testing/Internals.cpp:
45         (WebCore::Internals::emitInspectorDidBeginFrame):
46         (WebCore::Internals::emitInspectorDidCancelFrame):
47
48 2013-02-14  Vladislav Kaznacheev  <kaznacheev@chromium.org>
49
50         Web Inspector: Fixed a layout regression in CanvasProfileView.
51         https://bugs.webkit.org/show_bug.cgi?id=109835
52
53         Reviewed by Pavel Feldman.
54
55         Changed splitView.css to supported nested SplitView instances.
56
57         * inspector/front-end/splitView.css:
58         (.split-view-vertical > .split-view-contents):
59         (.split-view-vertical > .split-view-contents-first):
60         (.split-view-vertical > .split-view-contents-first.maximized):
61         (.split-view-vertical > .split-view-contents-second):
62         (.split-view-vertical > .split-view-contents-second.maximized):
63         (.split-view-horizontal > .split-view-contents):
64         (.split-view-horizontal > .split-view-contents-first):
65         (.split-view-horizontal > .split-view-contents-first.maximized):
66         (.split-view-horizontal > .split-view-contents-second):
67         (.split-view-horizontal > .split-view-contents-second.maximized):
68         (.split-view-vertical > .split-view-sidebar.split-view-contents-first:not(.maximized)):
69         (.split-view-vertical > .split-view-sidebar.split-view-contents-second:not(.maximized)):
70         (.split-view-horizontal > .split-view-sidebar.split-view-contents-first:not(.maximized)):
71         (.split-view-horizontal > .split-view-sidebar.split-view-contents-second:not(.maximized)):
72         (.split-view-vertical > .split-view-resizer):
73         (.split-view-horizontal > .split-view-resizer):
74
75 2013-02-14  Vladislav Kaznacheev  <kaznacheev@chromium.org>
76
77         Web Inspector: Color picker should not be available in Computed Styles pane.
78         https://bugs.webkit.org/show_bug.cgi?id=109697
79
80         Reviewed by Alexander Pavlov.
81
82         Changed the parentPane parameter of WebInspector.ComputedStylePropertiesSection to the correct value
83         (the ComputedStyleSidebarPane instance).
84
85         * inspector/front-end/StylesSidebarPane.js:
86         (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules):
87
88 2013-02-14  Yury Semikhatsky  <yurys@chromium.org>
89
90         Web Inspector: don't create static local string for program literal in InspectorTimelineAgent
91         https://bugs.webkit.org/show_bug.cgi?id=109811
92
93         Reviewed by Pavel Feldman.
94
95         Use const char* constant value instead of creating String from it in thread-unsafe
96         static local variable.
97
98         * inspector/InspectorTimelineAgent.cpp:
99         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
100
101 2013-02-14  Pan Deng  <pan.deng@intel.com>
102
103         [Web Inspector] Fix initiator name issue in reload scenario for Network Panel.
104         https://bugs.webkit.org/show_bug.cgi?id=108746.
105
106         Reviewed by Vsevolod Vlasov.
107
108         WebInspector.displayNameForURL() does not work as expected in the reload scenario,
109         for example, "http://www.yahoo.com/" was trimed to "/" at one time, but at another,
110         the full host name will be displayed.
111         This fix return host + "/" in the issue scenario, and keep with get displayName() in ParsedURL.
112
113         No new tests.
114
115         * inspector/front-end/ParsedURL.js:
116         (WebInspector.ParsedURL.prototype.get displayName): append "/" in the display host scenario.
117         * inspector/front-end/ResourceUtils.js:
118         (WebInspector.displayNameForURL): add host in the head if url trimed as a "/".
119
120 2013-02-14  Alexei Filippov  <alph@chromium.org>
121
122         Web Inspector: fix to record button remaining red after heap snapshot is taken
123         https://bugs.webkit.org/show_bug.cgi?id=109804
124
125         Reviewed by Yury Semikhatsky.
126
127         Revert part of r142243 fix. Namely heap snapshot taking button made
128         stateless as it was before.
129
130         * inspector/front-end/HeapSnapshotView.js:
131         (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
132         * inspector/front-end/ProfilesPanel.js:
133         (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
134
135 2013-02-14  Alexander Pavlov  <apavlov@chromium.org>
136
137         Web Inspector: Consistently use SecurityOrigin::toRawString() for serialization across the backend code
138         https://bugs.webkit.org/show_bug.cgi?id=109801
139
140         Reviewed by Yury Semikhatsky.
141
142         No new tests, as existing tests cover the change.
143
144         * inspector/InspectorAgent.cpp:
145         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
146         * inspector/InspectorIndexedDBAgent.cpp:
147         (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
148         * inspector/InspectorPageAgent.cpp:
149         (WebCore::InspectorPageAgent::buildObjectForFrame):
150         * inspector/PageRuntimeAgent.cpp:
151         (WebCore::PageRuntimeAgent::notifyContextCreated):
152
153 2013-02-14  Sergio Villar Senin  <svillar@igalia.com>
154
155         Add logging support to IndexedDB for non-Chromium platforms
156         https://bugs.webkit.org/show_bug.cgi?id=109809
157
158         Reviewed by Kentaro Hara.
159
160         Enable logging of IndexedDB through the StorageAPI log channel for
161         non-Chromium architectures.
162
163         No new tests required, we're just enabling logging for IndexedDB
164         using the currently available logging framework.
165
166         * Modules/indexeddb/IDBTracing.h:
167
168 2013-02-14  Vsevolod Vlasov  <vsevik@chromium.org>
169
170         Web Inspector: Remove uriForFile and fileForURI methods from FileSystemMapping.
171         https://bugs.webkit.org/show_bug.cgi?id=109704
172
173         Reviewed by Alexander Pavlov.
174
175         Replaced this methods with one line implementation on the only call site.
176
177         * inspector/front-end/FileSystemMapping.js:
178         * inspector/front-end/FileSystemProjectDelegate.js:
179         (WebInspector.FileSystemProjectDelegate.prototype._filePathForURI):
180         (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
181         (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
182         (WebInspector.FileSystemProjectDelegate.prototype._populate):
183
184 2013-02-14  Anton Vayvod  <avayvod@chromium.org>
185
186         [Text Autosizing] Process narrow descendants with the same multiplier for the font size.
187         https://bugs.webkit.org/show_bug.cgi?id=109573
188
189         Reviewed by Julien Chaffraix.
190
191         Combine narrow descendants of the same autosizing cluster into a group that is autosized
192         with the same multiplier.
193
194         For example, on sites with a sidebar, sometimes the paragraphs next to the sidebar will have
195         a large margin individually applied (via a CSS selector), causing them all to individually
196         appear narrower than their enclosing blockContainingAllText. Rather than making each of
197         these paragraphs into a separate cluster, we want them all to share the same multiplier, as
198         if they were a single cluster.
199
200         Test: fast/text-autosizing/narrow-descendants-combined.html
201
202         * rendering/TextAutosizer.cpp:
203         (WebCore::TextAutosizer::processClusterInternal):
204
205             Common implementation for processCluster() and processCompositeCluster that accepts the
206             text width and whether the cluster should be autosized as parameters instead of
207             calculating it inline.
208
209         (WebCore::TextAutosizer::processCluster):
210
211             Calculates the text width for a single cluster and whether it should be autosized, then
212             calls processClusterInternal() to apply the multiplier and process the cluster's
213             descendants.
214
215         (WebCore::TextAutosizer::processCompositeCluster):
216
217             Calculates the text width for a group of renderers and if the group should be autosized,
218             then calls processClusterInternal() repeatedly with the same multiplier to apply it and
219             process all the descendants of the group.
220
221         (WebCore::TextAutosizer::clusterShouldBeAutosized):
222
223             Calls the multiple renderers version to avoid code duplication.
224
225         (WebCore::TextAutosizer::compositeClusterShouldBeAutosized):
226
227             The multiple renderers version of clusterShouldBeAutosized.
228
229         * rendering/TextAutosizer.h:
230
231             Updated method declarations.
232
233 2013-02-14  Andrey Adaikin  <aandrey@chromium.org>
234
235         Look into possibilities of typedef in webkit idl files
236         https://bugs.webkit.org/show_bug.cgi?id=52340
237
238         Reviewed by Kentaro Hara.
239
240         Add typedef support for WebKit IDL parser.
241         Drive by: fixed a bug of generating "unrestrictedfloat" without a space.
242
243         Added a new IDL test TestTypedefs.idl. The results were generated without typedefs.
244
245         * bindings/scripts/IDLParser.pm:
246         (assertNoExtendedAttributesInTypedef):
247         (parseDefinitions):
248         (applyTypedefs):
249         (applyTypedefsForSignature):
250         (parseTypedef):
251         (parseUnrestrictedFloatType):
252         * bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp: Added.
253         (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate::WebDOMTestTypedefsPrivate):
254         (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate):
255         (WebDOMTestTypedefs::WebDOMTestTypedefs):
256         (WebDOMTestTypedefs::operator=):
257         (WebDOMTestTypedefs::impl):
258         (WebDOMTestTypedefs::~WebDOMTestTypedefs):
259         (WebDOMTestTypedefs::unsignedLongLongAttr):
260         (WebDOMTestTypedefs::setUnsignedLongLongAttr):
261         (WebDOMTestTypedefs::immutableSerializedScriptValue):
262         (WebDOMTestTypedefs::setImmutableSerializedScriptValue):
263         (WebDOMTestTypedefs::func):
264         (WebDOMTestTypedefs::multiTransferList):
265         (WebDOMTestTypedefs::setShadow):
266         (WebDOMTestTypedefs::nullableArrayArg):
267         (WebDOMTestTypedefs::immutablePointFunction):
268         (toWebCore):
269         (toWebKit):
270         * bindings/scripts/test/CPP/WebDOMTestTypedefs.h: Added.
271         (WebCore):
272         (WebDOMTestTypedefs):
273         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp: Added.
274         (_WebKitDOMTestTypedefsPrivate):
275         (WebKit):
276         (WebKit::kit):
277         (WebKit::core):
278         (WebKit::wrapTestTypedefs):
279         (webkit_dom_test_typedefs_finalize):
280         (webkit_dom_test_typedefs_set_property):
281         (webkit_dom_test_typedefs_get_property):
282         (webkit_dom_test_typedefs_constructor):
283         (webkit_dom_test_typedefs_class_init):
284         (webkit_dom_test_typedefs_init):
285         (webkit_dom_test_typedefs_func):
286         (webkit_dom_test_typedefs_multi_transfer_list):
287         (webkit_dom_test_typedefs_set_shadow):
288         (webkit_dom_test_typedefs_nullable_array_arg):
289         (webkit_dom_test_typedefs_immutable_point_function):
290         (webkit_dom_test_typedefs_string_array_function):
291         (webkit_dom_test_typedefs_get_unsigned_long_long_attr):
292         (webkit_dom_test_typedefs_set_unsigned_long_long_attr):
293         (webkit_dom_test_typedefs_get_immutable_serialized_script_value):
294         (webkit_dom_test_typedefs_set_immutable_serialized_script_value):
295         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h: Added.
296         (_WebKitDOMTestTypedefs):
297         (_WebKitDOMTestTypedefsClass):
298         * bindings/scripts/test/GObject/WebKitDOMTestTypedefsPrivate.h: Added.
299         (WebKit):
300         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Added.
301         (WebCore):
302         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
303         (WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
304         (WebCore::JSTestTypedefsConstructor::finishCreation):
305         (WebCore::JSTestTypedefsConstructor::getOwnPropertySlot):
306         (WebCore::JSTestTypedefsConstructor::getOwnPropertyDescriptor):
307         (WebCore::JSTestTypedefsConstructor::getConstructData):
308         (WebCore::JSTestTypedefsPrototype::self):
309         (WebCore::JSTestTypedefsPrototype::getOwnPropertySlot):
310         (WebCore::JSTestTypedefsPrototype::getOwnPropertyDescriptor):
311         (WebCore::JSTestTypedefs::JSTestTypedefs):
312         (WebCore::JSTestTypedefs::finishCreation):
313         (WebCore::JSTestTypedefs::createPrototype):
314         (WebCore::JSTestTypedefs::destroy):
315         (WebCore::JSTestTypedefs::~JSTestTypedefs):
316         (WebCore::JSTestTypedefs::getOwnPropertySlot):
317         (WebCore::JSTestTypedefs::getOwnPropertyDescriptor):
318         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
319         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
320         (WebCore::jsTestTypedefsConstructorTestSubObj):
321         (WebCore::jsTestTypedefsConstructor):
322         (WebCore::JSTestTypedefs::put):
323         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
324         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
325         (WebCore::JSTestTypedefs::getConstructor):
326         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
327         (WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList):
328         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
329         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
330         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
331         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
332         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
333         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
334         (WebCore::isObservable):
335         (WebCore::JSTestTypedefsOwner::isReachableFromOpaqueRoots):
336         (WebCore::JSTestTypedefsOwner::finalize):
337         (WebCore::toJS):
338         (WebCore::toTestTypedefs):
339         * bindings/scripts/test/JS/JSTestTypedefs.h: Added.
340         (WebCore):
341         (JSTestTypedefs):
342         (WebCore::JSTestTypedefs::create):
343         (WebCore::JSTestTypedefs::createStructure):
344         (WebCore::JSTestTypedefs::impl):
345         (WebCore::JSTestTypedefs::releaseImpl):
346         (WebCore::JSTestTypedefs::releaseImplIfNotNull):
347         (JSTestTypedefsOwner):
348         (WebCore::wrapperOwner):
349         (WebCore::wrapperContext):
350         (JSTestTypedefsPrototype):
351         (WebCore::JSTestTypedefsPrototype::create):
352         (WebCore::JSTestTypedefsPrototype::createStructure):
353         (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
354         (JSTestTypedefsConstructor):
355         (WebCore::JSTestTypedefsConstructor::create):
356         (WebCore::JSTestTypedefsConstructor::createStructure):
357         * bindings/scripts/test/ObjC/DOMTestTypedefs.h: Added.
358         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm: Added.
359         (-[DOMTestTypedefs dealloc]):
360         (-[DOMTestTypedefs finalize]):
361         (-[DOMTestTypedefs unsignedLongLongAttr]):
362         (-[DOMTestTypedefs setUnsignedLongLongAttr:]):
363         (-[DOMTestTypedefs immutableSerializedScriptValue]):
364         (-[DOMTestTypedefs setImmutableSerializedScriptValue:]):
365         (-[DOMTestTypedefs multiTransferList:tx:second:txx:]):
366         (-[DOMTestTypedefs setShadow:height:blur:color:alpha:]):
367         (-[DOMTestTypedefs immutablePointFunction]):
368         (core):
369         (kit):
370         * bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h: Added.
371         (WebCore):
372         * bindings/scripts/test/TestTypedefs.idl: Added.
373         * bindings/scripts/test/V8/V8TestTypedefs.cpp: Added.
374         (WebCore):
375         (WebCore::checkTypeOrDieTrying):
376         (TestTypedefsV8Internal):
377         (WebCore::TestTypedefsV8Internal::V8_USE):
378         (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrGetter):
379         (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrSetter):
380         (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrGetter):
381         (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetter):
382         (WebCore::TestTypedefsV8Internal::TestTypedefsConstructorGetter):
383         (WebCore::TestTypedefsV8Internal::TestTypedefsReplaceableAttrSetter):
384         (WebCore::TestTypedefsV8Internal::funcCallback):
385         (WebCore::TestTypedefsV8Internal::multiTransferListCallback):
386         (WebCore::TestTypedefsV8Internal::setShadowCallback):
387         (WebCore::TestTypedefsV8Internal::methodWithSequenceArgCallback):
388         (WebCore::TestTypedefsV8Internal::nullableArrayArgCallback):
389         (WebCore::TestTypedefsV8Internal::funcWithClampCallback):
390         (WebCore::TestTypedefsV8Internal::immutablePointFunctionCallback):
391         (WebCore::TestTypedefsV8Internal::stringArrayFunctionCallback):
392         (WebCore::V8TestTypedefs::constructorCallback):
393         (WebCore::ConfigureV8TestTypedefsTemplate):
394         (WebCore::V8TestTypedefs::GetRawTemplate):
395         (WebCore::V8TestTypedefs::GetTemplate):
396         (WebCore::V8TestTypedefs::HasInstance):
397         (WebCore::V8TestTypedefs::createWrapper):
398         (WebCore::V8TestTypedefs::derefObject):
399         * bindings/scripts/test/V8/V8TestTypedefs.h: Added.
400         (WebCore):
401         (V8TestTypedefs):
402         (WebCore::V8TestTypedefs::toNative):
403         (WebCore::V8TestTypedefs::installPerContextProperties):
404         (WebCore::V8TestTypedefs::installPerContextPrototypeProperties):
405         (WebCore::wrap):
406         (WebCore::toV8):
407         (WebCore::toV8Fast):
408
409 2013-02-13  Kentaro Hara  <haraken@chromium.org>
410
411         [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(),
412         and XXXAccessorSetter() to XXXAttrSetterCustom()
413         https://bugs.webkit.org/show_bug.cgi?id=109679
414
415         Reviewed by Adam Barth.
416
417         For naming consistency and clarification.
418
419         No tests. No change in behavior.
420
421         * bindings/scripts/CodeGeneratorV8.pm:
422         (GenerateHeader):
423         (GenerateHeaderCustomCall):
424         (GenerateNormalAttrGetter):
425         (GenerateNormalAttrSetter):
426         (GenerateImplementation):
427         * bindings/scripts/test/V8/V8TestInterface.cpp:
428         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
429         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
430         * bindings/scripts/test/V8/V8TestObj.cpp:
431         (WebCore::TestObjV8Internal::customAttrAttrGetter):
432         (WebCore::TestObjV8Internal::customAttrAttrSetter):
433         * bindings/scripts/test/V8/V8TestObj.h:
434         (V8TestObj):
435         * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
436         (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom):
437         * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp:
438         (WebCore::V8BiquadFilterNode::typeAttrSetterCustom):
439         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
440         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrGetterCustom):
441         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrSetterCustom):
442         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrGetterCustom):
443         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrSetterCustom):
444         * bindings/v8/custom/V8ClipboardCustom.cpp:
445         (WebCore::V8Clipboard::typesAttrGetterCustom):
446         * bindings/v8/custom/V8CoordinatesCustom.cpp:
447         (WebCore::V8Coordinates::altitudeAttrGetterCustom):
448         (WebCore::V8Coordinates::altitudeAccuracyAttrGetterCustom):
449         (WebCore::V8Coordinates::headingAttrGetterCustom):
450         (WebCore::V8Coordinates::speedAttrGetterCustom):
451         * bindings/v8/custom/V8CustomEventCustom.cpp:
452         (WebCore::V8CustomEvent::detailAttrGetterCustom):
453         * bindings/v8/custom/V8DOMWindowCustom.cpp:
454         (WebCore::V8DOMWindow::eventAttrGetterCustom):
455         (WebCore::V8DOMWindow::eventAttrSetterCustom):
456         (WebCore::V8DOMWindow::locationAttrSetterCustom):
457         (WebCore::V8DOMWindow::openerAttrSetterCustom):
458         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
459         (WebCore::V8DeviceMotionEvent::accelerationAttrGetterCustom):
460         (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAttrGetterCustom):
461         (WebCore::V8DeviceMotionEvent::rotationRateAttrGetterCustom):
462         (WebCore::V8DeviceMotionEvent::intervalAttrGetterCustom):
463         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
464         (WebCore::V8DeviceOrientationEvent::alphaAttrGetterCustom):
465         (WebCore::V8DeviceOrientationEvent::betaAttrGetterCustom):
466         (WebCore::V8DeviceOrientationEvent::gammaAttrGetterCustom):
467         (WebCore::V8DeviceOrientationEvent::absoluteAttrGetterCustom):
468         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
469         (WebCore::V8Document::locationAttrGetterCustom):
470         (WebCore::V8Document::locationAttrSetterCustom):
471         * bindings/v8/custom/V8EventCustom.cpp:
472         (WebCore::V8Event::dataTransferAttrGetterCustom):
473         (WebCore::V8Event::clipboardDataAttrGetterCustom):
474         * bindings/v8/custom/V8FileReaderCustom.cpp:
475         (WebCore::V8FileReader::resultAttrGetterCustom):
476         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
477         (WebCore::V8HTMLDocument::allAttrSetterCustom):
478         * bindings/v8/custom/V8HTMLElementCustom.cpp:
479         (WebCore::V8HTMLElement::itemValueAttrGetterCustom):
480         (WebCore::V8HTMLElement::itemValueAttrSetterCustom):
481         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
482         (WebCore::V8HTMLFrameElement::locationAttrSetterCustom):
483         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
484         (WebCore::V8HTMLInputElement::selectionStartAttrGetterCustom):
485         (WebCore::V8HTMLInputElement::selectionStartAttrSetterCustom):
486         (WebCore::V8HTMLInputElement::selectionEndAttrGetterCustom):
487         (WebCore::V8HTMLInputElement::selectionEndAttrSetterCustom):
488         (WebCore::V8HTMLInputElement::selectionDirectionAttrGetterCustom):
489         (WebCore::V8HTMLInputElement::selectionDirectionAttrSetterCustom):
490         * bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
491         (WebCore::V8HTMLLinkElement::sizesAttrGetterCustom):
492         (WebCore::V8HTMLLinkElement::sizesAttrSetterCustom):
493         * bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
494         (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom):
495         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
496         (WebCore::V8HTMLOptionsCollection::lengthAttrSetterCustom):
497         * bindings/v8/custom/V8HistoryCustom.cpp:
498         (WebCore::V8History::stateAttrGetterCustom):
499         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
500         (WebCore::V8JavaScriptCallFrame::scopeChainAttrGetterCustom):
501         (WebCore::V8JavaScriptCallFrame::thisObjectAttrGetterCustom):
502         (WebCore::V8JavaScriptCallFrame::typeAttrGetterCustom):
503         * bindings/v8/custom/V8LocationCustom.cpp:
504         (WebCore::V8Location::hashAttrSetterCustom):
505         (WebCore::V8Location::hostAttrSetterCustom):
506         (WebCore::V8Location::hostnameAttrSetterCustom):
507         (WebCore::V8Location::hrefAttrSetterCustom):
508         (WebCore::V8Location::pathnameAttrSetterCustom):
509         (WebCore::V8Location::portAttrSetterCustom):
510         (WebCore::V8Location::protocolAttrSetterCustom):
511         (WebCore::V8Location::searchAttrSetterCustom):
512         (WebCore::V8Location::reloadAttrGetterCustom):
513         (WebCore::V8Location::replaceAttrGetterCustom):
514         (WebCore::V8Location::assignAttrGetterCustom):
515         * bindings/v8/custom/V8MessageEventCustom.cpp:
516         (WebCore::V8MessageEvent::dataAttrGetterCustom):
517         (WebCore::V8MessageEvent::portsAttrGetterCustom):
518         * bindings/v8/custom/V8OscillatorNodeCustom.cpp:
519         (WebCore::V8OscillatorNode::typeAttrSetterCustom):
520         * bindings/v8/custom/V8PannerNodeCustom.cpp:
521         (WebCore::V8PannerNode::panningModelAttrSetterCustom):
522         (WebCore::V8PannerNode::distanceModelAttrSetterCustom):
523         * bindings/v8/custom/V8PopStateEventCustom.cpp:
524         (WebCore::V8PopStateEvent::stateAttrGetterCustom):
525         * bindings/v8/custom/V8SVGLengthCustom.cpp:
526         (WebCore::V8SVGLength::valueAttrGetterCustom):
527         (WebCore::V8SVGLength::valueAttrSetterCustom):
528         * bindings/v8/custom/V8TrackEventCustom.cpp:
529         (WebCore::V8TrackEvent::trackAttrGetterCustom):
530         * bindings/v8/custom/V8WebKitAnimationCustom.cpp:
531         (WebCore::V8WebKitAnimation::iterationCountAttrGetterCustom):
532         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
533         (WebCore::V8XMLHttpRequest::responseTextAttrGetterCustom):
534         (WebCore::V8XMLHttpRequest::responseAttrGetterCustom):
535
536 2013-02-14  Yury Semikhatsky  <yurys@chromium.org>
537
538         Web Inspector: extract DOM counters graph implementation into its own class
539         https://bugs.webkit.org/show_bug.cgi?id=109796
540
541         Reviewed by Alexander Pavlov.
542
543         Extracted DOM counters graph implementation into DOMCountersGraph.js leaving
544         in MemoryStatistics.js only common parts shared with NativeMemoryGraph.js
545         Added some closure annotations and converted object literals into classes
546         with named constructors.
547
548         * WebCore.gypi:
549         * WebCore.vcproj/WebCore.vcproj:
550         * inspector/compile-front-end.py:
551         * inspector/front-end/DOMCountersGraph.js: Added.
552         (WebInspector.DOMCountersGraph):
553         (WebInspector.DOMCounterUI):
554         (WebInspector.DOMCountersGraph.Counter):
555         (WebInspector.DOMCounterUI.prototype.setRange):
556         (WebInspector.DOMCounterUI.prototype.updateCurrentValue):
557         (WebInspector.DOMCounterUI.prototype.clearCurrentValueAndMarker):
558         (WebInspector.DOMCounterUI.prototype.saveImageUnderMarker):
559         (WebInspector.DOMCounterUI.prototype.restoreImageUnderMarker):
560         (WebInspector.DOMCounterUI.prototype.discardImageUnderMarker):
561         (WebInspector.DOMCountersGraph.prototype._createCurrentValuesBar):
562         (WebInspector.DOMCountersGraph.prototype._createCounterUIList):
563         (WebInspector.DOMCountersGraph.prototype._createCounterUIList.getNodeCount):
564         (WebInspector.DOMCountersGraph.prototype._createCounterUIList.getListenerCount):
565         (WebInspector.DOMCountersGraph.prototype._canvasHeight):
566         (WebInspector.DOMCountersGraph.prototype._onRecordAdded):
567         (WebInspector.DOMCountersGraph.prototype._draw):
568         (WebInspector.DOMCountersGraph.prototype._restoreImageUnderMarker):
569         (WebInspector.DOMCountersGraph.prototype._saveImageUnderMarker):
570         (WebInspector.DOMCountersGraph.prototype._drawMarker):
571         (WebInspector.DOMCountersGraph.prototype._drawGraph):
572         (WebInspector.DOMCountersGraph.prototype._discardImageUnderMarker):
573         * inspector/front-end/MemoryStatistics.js:
574         (WebInspector.MemoryStatistics):
575         (WebInspector.MemoryStatistics.Counter):
576         (WebInspector.MemoryStatistics.prototype._createCurrentValuesBar):
577         (WebInspector.MemoryStatistics.prototype._createCounterUIList):
578         (WebInspector.MemoryStatistics.prototype.setTopPosition):
579         (WebInspector.MemoryStatistics.prototype._canvasHeight):
580         (WebInspector.MemoryStatistics.prototype._onRecordAdded):
581         (WebInspector.MemoryStatistics.prototype._draw):
582         (WebInspector.MemoryStatistics.prototype._onClick):
583         (WebInspector.MemoryStatistics.prototype._onMouseOut):
584         (WebInspector.MemoryStatistics.prototype._onMouseOver):
585         (WebInspector.MemoryStatistics.prototype._onMouseMove):
586         (WebInspector.MemoryStatistics.prototype._restoreImageUnderMarker):
587         (WebInspector.MemoryStatistics.prototype._drawMarker):
588         (WebInspector.MemoryStatistics.prototype._discardImageUnderMarker):
589         * inspector/front-end/NativeMemoryGraph.js:
590         (WebInspector.NativeMemoryGraph.Counter):
591         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
592         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
593         (WebInspector.NativeMemoryGraph.prototype._draw):
594         * inspector/front-end/TimelinePanel.js:
595         * inspector/front-end/WebKit.qrc:
596
597 2013-02-14  Aivo Paas  <aivopaas@gmail.com>
598
599         Updating mouse cursor on style changes without emitting fake mousemove event
600         https://bugs.webkit.org/show_bug.cgi?id=101857
601
602         Reviewed by Allan Sandfeld Jensen.
603
604         Mouse cursor changes in styles used to be reflected in UI through dispatching a fake
605         mousemove event. The old approach has some flaws: it emits a mousemove event in
606         javascript when there is no mouse movement involved (bug 85343); the fake mousemove
607         event is cancelled while there is a mouse button held down - cursor won't change
608         until mouse is moved or the button released (bug 53341); it has extra overhead of
609         using a timer which was introduced to make scrolling smoother.
610
611         The new approach does not use the fake mousemove event. Instead, it uses only the logic
612         needed for the actual cursor change to happen. This bypasses all the mousemove event related
613         overhead. The remaining code is a stripped version of what was run through the mousemove
614         event path. Everything that was not needed for changing a cursor is stripped off, everything
615         that is needed, remains the same.
616
617         The call to update cursor was moved up in the call tree from RenderObject::StyleDidChange
618         to RenderObject::SetStyle right after the StyleDidChange call. This allows to any updates
619         and style propagations in StyleDidChange to happen and makes sure that a cursor change is
620         not missed. Previous place was at the end of RenderObject::StyleDidChange, where it could
621         have been missed because of an early exit. For example, cursor change on mousedown/up on
622         a text node missed the correct cursor in the first pass.
623
624         Refactored EventHandler::selectCursor to not take a whole mouse event but instead work with
625         HitTestResult so that EventHandler::updateCursor must not create a useless PlatformEvent.
626
627         Fixes: https://bugs.webkit.org/show_bug.cgi?id=85343 (mousemove event on cursor change)
628                https://bugs.webkit.org/show_bug.cgi?id=53341 (no cursor change when mouse button down)
629
630         Tests: fast/events/mouse-cursor-change.html
631                fast/events/mouse-cursor-no-mousemove.html
632
633         * page/EventHandler.cpp:
634         (WebCore::EventHandler::updateCursor): Newly added method for updating mouse cursor
635         (WebCore):
636         (WebCore::EventHandler::selectCursor):
637         (WebCore::EventHandler::handleMouseMoveEvent):
638         * page/EventHandler.h:
639         (EventHandler):
640         * rendering/RenderObject.cpp:
641         (WebCore::areNonIdenticalCursorListsEqual):
642         (WebCore):
643         (WebCore::areCursorsEqual):
644         (WebCore::RenderObject::setStyle):
645         (WebCore::RenderObject::styleDidChange):
646
647 2013-02-13  Ilya Tikhonovsky  <loislo@chromium.org>
648
649         Web Inspector: Native Memory Instrumentation: Report child nodes as direct members of a container node to make them look like a tree in the snapshot.
650         https://bugs.webkit.org/show_bug.cgi?id=109703
651
652         Also we need to traverse the tree from the top root element down to the leaves.
653
654         Reviewed by Yury Semikhatsky.
655
656         * dom/ContainerNode.cpp:
657         (WebCore::ContainerNode::reportMemoryUsage):
658         * dom/Node.cpp:
659         (WebCore::Node::reportMemoryUsage):
660         * inspector/InspectorMemoryAgent.cpp:
661         (WebCore):
662
663 2013-02-13  Hayato Ito  <hayato@chromium.org>
664
665         [Shadow DOM] Implements a '::distributed()' pseudo element.
666         https://bugs.webkit.org/show_bug.cgi?id=82169
667
668         Reviewed by Dimitri Glazkov.
669
670         Implements a '::distributed()' pseudo element.
671         See the Shadow DOM specification and the filed bug for the detail.
672
673         - http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#selecting-nodes-distributed-to-insertion-points
674         - https://www.w3.org/Bugs/Public/show_bug.cgi?id=19684
675
676         For example, suppose we are given the following DOM tree and shadow tree:
677
678         - <A>
679           - <B>
680             - <C>
681
682         [A's ShadowRoot]
683           <D>
684           - <style>
685               E content::distributed(B C) { color: green; }
686           - <E>
687             - <content>  (Node B is distributed to this insertion point.)
688
689         In this case, the style rule defined in the shadow tree matches node 'C'.
690
691         A '::distributed()' pseudo element can not be a pseudo class since
692         an intersection between matched_elements(some_selector) and
693         matched_elements(some_selector::distributed(...)) is always an
694         empty set. A '::distributed()' pseudo element is the first-ever
695         *functional* pseudo element which takes a parameter, which can be
696         a selector.
697
698         This rule crosses the shadow boundary from a shadow tree to the
699         tree of its shadow host. That means a rule which includes
700         '::distributed()' pseudo element is defined in shadow tree, but
701         the node which is matched in the rule, the subject of the
702         selector, is outside of the shadow tree. Therefore, we cannot
703         predict where the subject of the selector will be beforehand.
704         Current CSS implementation assumes the subject of the selector
705         must exist in the current scope.
706
707         To overcome this issue, DocumentRuleSets now has a instance of
708         ShadowDistributedRules class.  A style rule will be stored in this
709         instance if the rule includes a '::distributed()' pseudo element.
710         This class also keeps track of each RuleSet by mapping it with a
711         scope where the rule was originally defined. In the example, the
712         scope is A's ShadowRoot.  The scope is used to check whether the
713         left-most matched element (in the example, it's a node 'E') exists
714         in the scope.
715
716         Internally, a '::distributed' pseudo element is represented by a
717         newly introduced 'ShadowDistributed' relation.  That makes an
718         implementation of SelectorChecker::checkSelector() much simpler.
719         A transformation from a distributed pseudo element to a
720         ShadowDistributed is done in parsing stage of CSS.
721
722         Since '::distributed()' is an experimental feature, it's actually
723         prefixed with '-webkit-' and guarded by SHADOW_DOM flag.
724
725         Tests: fast/dom/shadow/distributed-pseudo-element-for-shadow-element.html
726                fast/dom/shadow/distributed-pseudo-element-match-all.html
727                fast/dom/shadow/distributed-pseudo-element-match-descendant.html
728                fast/dom/shadow/distributed-pseudo-element-nested.html
729                fast/dom/shadow/distributed-pseudo-element-no-match.html
730                fast/dom/shadow/distributed-pseudo-element-reprojection.html
731                fast/dom/shadow/distributed-pseudo-element-scoped.html
732                fast/dom/shadow/distributed-pseudo-element-support-selector.html
733                fast/dom/shadow/distributed-pseudo-element-used-in-selector-list.html
734                fast/dom/shadow/distributed-pseudo-element-with-any.html
735                fast/dom/shadow/distributed-pseudo-element.html
736
737         * css/CSSGrammar.y.in:
738         CSS Grammar was updated to support '::distrbuted(selector)'.
739         This pseudo element is the first pseudo element which can take a selector as a parameter.
740         * css/CSSParser.cpp:
741         (WebCore::CSSParser::detectDashToken):
742         (WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded):
743         (WebCore::CSSParser::rewriteSpecifiersWithElementName):
744         Here we are converting a '::distributed' pseudo element into a
745         ShadowDistributed relation internally.  To support the conversion,
746         these rewriteSpecifiersXXX functions (formally called
747         updateSpecifiersXXX) now return the specifiers which may be
748         converted.
749         (WebCore::CSSParser::rewriteSpecifiers):
750         * css/CSSParser.h:
751         * css/CSSParserValues.cpp:
752         (WebCore::CSSParserSelector::CSSParserSelector):
753         * css/CSSParserValues.h:
754         (CSSParserSelector):
755         (WebCore::CSSParserSelector::functionArgumentSelector):
756         To hold an intermediate selector which appears at the position of an argument in
757         functional pseudo element when parsing CSS.
758         (WebCore::CSSParserSelector::setFunctionArgumentSelector):
759         (WebCore::CSSParserSelector::isDistributedPseudoElement):
760         * css/CSSSelector.cpp:
761         Add new pseudo element, PseudoDistributed, and its internal representation, ShadowDistributed relation.
762         (WebCore::CSSSelector::pseudoId):
763         (WebCore::nameToPseudoTypeMap):
764         (WebCore::CSSSelector::extractPseudoType):
765         (WebCore::CSSSelector::selectorText):
766         * css/CSSSelector.h:
767         (CSSSelector):
768         (WebCore):
769         (WebCore::CSSSelector::isDistributedPseudoElement):
770         (WebCore::CSSSelector::isShadowDistributed):
771         * css/CSSSelectorList.cpp:
772         (WebCore):
773         (SelectorHasShadowDistributed):
774         (WebCore::SelectorHasShadowDistributed::operator()):
775         (WebCore::CSSSelectorList::hasShadowDistributedAt):
776         * css/CSSSelectorList.h:
777         (CSSSelectorList):
778         * css/DocumentRuleSets.cpp:
779         (WebCore):
780         (WebCore::ShadowDistributedRules::addRule):
781         Every CSS rule which includes '::distributed(...)' should be managed by calling this function.
782         (WebCore::ShadowDistributedRules::collectMatchRequests):
783         (WebCore::DocumentRuleSets::resetAuthorStyle):
784         * css/DocumentRuleSets.h:
785         (WebCore):
786         (ShadowDistributedRules):
787         (WebCore::ShadowDistributedRules::clear):
788         (DocumentRuleSets):
789         (WebCore::DocumentRuleSets::shadowDistributedRules)
790         DocumentRuleSets owns an instance of ShadowDistributedRules.
791         * css/RuleSet.cpp:
792         (WebCore::RuleSet::addChildRules):
793         Updated to check whether the rule contains '::distributed()' or not.
794         * css/SelectorChecker.cpp:
795         (WebCore::SelectorChecker::match):
796         Support ShadowDistributed relation. Check all possible insertion points where a node is distributed.
797         * css/SelectorChecker.h:
798         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
799         Adds enum of BehaviorAtBoundary. '::distributed()' is the only
800         rule which uses 'CrossedBoundary' since it is the only rule which
801         crosses shadow boundaries.
802         (SelectorCheckingContext):
803         * css/SelectorFilter.cpp:
804         (WebCore::SelectorFilter::collectIdentifierHashes):
805         * css/StyleResolver.cpp:
806         (WebCore::StyleResolver::collectMatchingRules):
807         (WebCore::StyleResolver::matchAuthorRules):
808         (WebCore::StyleResolver::collectMatchingRulesForList):
809         (WebCore::StyleResolver::ruleMatches):
810         * css/StyleResolver.h:
811         (MatchRequest):
812         (WebCore::MatchRequest::MatchRequest): Add behaviorAtBoundary field.
813         (WebCore):
814         (StyleResolver):
815         * html/shadow/InsertionPoint.cpp:
816         (WebCore::collectInsertionPointsWhereNodeIsDistributed):
817         (WebCore):
818         * html/shadow/InsertionPoint.h:
819         (WebCore):
820
821 2013-02-13  Kentaro Hara  <haraken@chromium.org>
822
823         [V8] Generate wrapper methods for custom methods
824         https://bugs.webkit.org/show_bug.cgi?id=109678
825
826         Reviewed by Adam Barth.
827
828         Currently V8 directly calls back custom methods written
829         in custom binding files. This makes it impossible for code
830         generators to hook custom methods (e.g. Code generators cannot
831         insert a code for FeatureObservation into custom methods).
832         To solve the problem, we should generate wrapper methods for
833         custom methods.
834
835         No tests. No change in behavior.
836
837         * page/DOMWindow.idl: Removed overloaded methods. The fact that methods in an IDL
838         file are overloaded but they are not overloaded in custom bindings confuses code
839         generators. (For some reason, this problem hasn't appeared before this change.)
840         * xml/XMLHttpRequest.idl: Ditto.
841
842         * bindings/scripts/CodeGeneratorV8.pm:
843         (GenerateHeader):
844         (GenerateDomainSafeFunctionGetter):
845         (GenerateEventListenerCallback):
846         (GenerateFunctionCallback):
847         (GenerateNonStandardFunction):
848         (GenerateImplementation):
849         * bindings/scripts/test/V8/V8TestInterface.cpp:
850         (WebCore::TestInterfaceV8Internal::supplementalMethod3Callback):
851         (TestInterfaceV8Internal):
852         (WebCore):
853         * bindings/scripts/test/V8/V8TestObj.cpp:
854         (WebCore::TestObjV8Internal::customMethodCallback):
855         (TestObjV8Internal):
856         (WebCore::TestObjV8Internal::customMethodWithArgsCallback):
857         (WebCore::TestObjV8Internal::classMethod2Callback):
858         (WebCore):
859         (WebCore::ConfigureV8TestObjTemplate):
860         * bindings/scripts/test/V8/V8TestObj.h:
861         (V8TestObj):
862         * bindings/v8/custom/V8ClipboardCustom.cpp:
863         (WebCore::V8Clipboard::clearDataCallbackCustom):
864         (WebCore::V8Clipboard::setDragImageCallbackCustom):
865         * bindings/v8/custom/V8ConsoleCustom.cpp:
866         (WebCore::V8Console::traceCallbackCustom):
867         (WebCore::V8Console::assertCallbackCustom):
868         (WebCore::V8Console::profileCallbackCustom):
869         (WebCore::V8Console::profileEndCallbackCustom):
870         * bindings/v8/custom/V8CryptoCustom.cpp:
871         (WebCore::V8Crypto::getRandomValuesCallbackCustom):
872         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
873         (WebCore::V8DOMFormData::appendCallbackCustom):
874         * bindings/v8/custom/V8DOMWindowCustom.cpp:
875         (WebCore::V8DOMWindow::addEventListenerCallbackCustom):
876         (WebCore::V8DOMWindow::removeEventListenerCallbackCustom):
877         (WebCore::V8DOMWindow::postMessageCallbackCustom):
878         (WebCore::V8DOMWindow::toStringCallbackCustom):
879         (WebCore::V8DOMWindow::releaseEventsCallbackCustom):
880         (WebCore::V8DOMWindow::captureEventsCallbackCustom):
881         (WebCore::V8DOMWindow::showModalDialogCallbackCustom):
882         (WebCore::V8DOMWindow::openCallbackCustom):
883         (WebCore::V8DOMWindow::setTimeoutCallbackCustom):
884         (WebCore::V8DOMWindow::setIntervalCallbackCustom):
885         * bindings/v8/custom/V8DataViewCustom.cpp:
886         (WebCore::V8DataView::getInt8CallbackCustom):
887         (WebCore::V8DataView::getUint8CallbackCustom):
888         (WebCore::V8DataView::setInt8CallbackCustom):
889         (WebCore::V8DataView::setUint8CallbackCustom):
890         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
891         (WebCore::V8DedicatedWorkerContext::postMessageCallbackCustom):
892         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
893         (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallbackCustom):
894         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
895         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallbackCustom):
896         * bindings/v8/custom/V8DocumentCustom.cpp:
897         (WebCore::V8Document::evaluateCallbackCustom):
898         (WebCore::V8Document::createTouchListCallbackCustom):
899         * bindings/v8/custom/V8GeolocationCustom.cpp:
900         (WebCore::V8Geolocation::getCurrentPositionCallbackCustom):
901         (WebCore::V8Geolocation::watchPositionCallbackCustom):
902         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
903         (WebCore::V8HTMLAllCollection::itemCallbackCustom):
904         (WebCore::V8HTMLAllCollection::namedItemCallbackCustom):
905         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
906         (WebCore::V8HTMLCanvasElement::getContextCallbackCustom):
907         (WebCore::V8HTMLCanvasElement::toDataURLCallbackCustom):
908         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
909         (WebCore::V8HTMLDocument::writeCallbackCustom):
910         (WebCore::V8HTMLDocument::writelnCallbackCustom):
911         (WebCore::V8HTMLDocument::openCallbackCustom):
912         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
913         (WebCore::V8HTMLFormControlsCollection::namedItemCallbackCustom):
914         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
915         (WebCore::v8HTMLImageElementConstructorCallbackCustom):
916         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
917         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
918         (WebCore::V8HTMLInputElement::setSelectionRangeCallbackCustom):
919         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
920         (WebCore::V8HTMLOptionsCollection::namedItemCallbackCustom):
921         (WebCore::V8HTMLOptionsCollection::removeCallbackCustom):
922         (WebCore::V8HTMLOptionsCollection::addCallbackCustom):
923         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
924         (WebCore::V8HTMLSelectElement::removeCallbackCustom):
925         * bindings/v8/custom/V8HistoryCustom.cpp:
926         (WebCore::V8History::pushStateCallbackCustom):
927         (WebCore::V8History::replaceStateCallbackCustom):
928         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
929         (WebCore::V8InjectedScriptHost::inspectedObjectCallbackCustom):
930         (WebCore::V8InjectedScriptHost::internalConstructorNameCallbackCustom):
931         (WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallbackCustom):
932         (WebCore::V8InjectedScriptHost::typeCallbackCustom):
933         (WebCore::V8InjectedScriptHost::functionDetailsCallbackCustom):
934         (WebCore::V8InjectedScriptHost::getInternalPropertiesCallbackCustom):
935         (WebCore::V8InjectedScriptHost::getEventListenersCallbackCustom):
936         (WebCore::V8InjectedScriptHost::inspectCallbackCustom):
937         (WebCore::V8InjectedScriptHost::databaseIdCallbackCustom):
938         (WebCore::V8InjectedScriptHost::storageIdCallbackCustom):
939         (WebCore::V8InjectedScriptHost::evaluateCallbackCustom):
940         (WebCore::V8InjectedScriptHost::setFunctionVariableValueCallbackCustom):
941         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
942         (WebCore::V8InspectorFrontendHost::platformCallbackCustom):
943         (WebCore::V8InspectorFrontendHost::portCallbackCustom):
944         (WebCore::V8InspectorFrontendHost::showContextMenuCallbackCustom):
945         (WebCore::V8InspectorFrontendHost::recordActionTakenCallbackCustom):
946         (WebCore::V8InspectorFrontendHost::recordPanelShownCallbackCustom):
947         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallbackCustom):
948         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
949         (WebCore::V8JavaScriptCallFrame::evaluateCallbackCustom):
950         (WebCore::V8JavaScriptCallFrame::restartCallbackCustom):
951         (WebCore::V8JavaScriptCallFrame::setVariableValueCallbackCustom):
952         (WebCore::V8JavaScriptCallFrame::scopeTypeCallbackCustom):
953         * bindings/v8/custom/V8LocationCustom.cpp:
954         (WebCore::V8Location::reloadAccessorGetter):
955         (WebCore::V8Location::replaceAccessorGetter):
956         (WebCore::V8Location::assignAccessorGetter):
957         (WebCore::V8Location::reloadCallbackCustom):
958         (WebCore::V8Location::replaceCallbackCustom):
959         (WebCore::V8Location::assignCallbackCustom):
960         (WebCore::V8Location::valueOfCallbackCustom):
961         (WebCore::V8Location::toStringCallbackCustom):
962         * bindings/v8/custom/V8MessageEventCustom.cpp:
963         (WebCore::V8MessageEvent::initMessageEventCallbackCustom):
964         (WebCore::V8MessageEvent::webkitInitMessageEventCallbackCustom):
965         * bindings/v8/custom/V8MessagePortCustom.cpp:
966         (WebCore::V8MessagePort::postMessageCallbackCustom):
967         * bindings/v8/custom/V8NodeCustom.cpp:
968         (WebCore::V8Node::insertBeforeCallbackCustom):
969         (WebCore::V8Node::replaceChildCallbackCustom):
970         (WebCore::V8Node::removeChildCallbackCustom):
971         (WebCore::V8Node::appendChildCallbackCustom):
972         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
973         (WebCore::V8NotificationCenter::requestPermissionCallbackCustom):
974         * bindings/v8/custom/V8NotificationCustom.cpp:
975         (WebCore::V8Notification::requestPermissionCallbackCustom):
976         * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
977         (WebCore::V8SQLResultSetRowList::itemCallbackCustom):
978         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
979         (WebCore::V8SQLTransaction::executeSqlCallbackCustom):
980         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
981         (WebCore::V8SQLTransactionSync::executeSqlCallbackCustom):
982         * bindings/v8/custom/V8SVGLengthCustom.cpp:
983         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallbackCustom):
984         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
985         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallbackCustom):
986         (WebCore::V8WebGLRenderingContext::getBufferParameterCallbackCustom):
987         (WebCore::V8WebGLRenderingContext::getExtensionCallbackCustom):
988         (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallbackCustom):
989         (WebCore::V8WebGLRenderingContext::getParameterCallbackCustom):
990         (WebCore::V8WebGLRenderingContext::getProgramParameterCallbackCustom):
991         (WebCore::V8WebGLRenderingContext::getRenderbufferParameterCallbackCustom):
992         (WebCore::V8WebGLRenderingContext::getShaderParameterCallbackCustom):
993         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallbackCustom):
994         (WebCore::V8WebGLRenderingContext::getTexParameterCallbackCustom):
995         (WebCore::V8WebGLRenderingContext::getUniformCallbackCustom):
996         (WebCore::V8WebGLRenderingContext::getVertexAttribCallbackCustom):
997         (WebCore::V8WebGLRenderingContext::uniform1fvCallbackCustom):
998         (WebCore::V8WebGLRenderingContext::uniform1ivCallbackCustom):
999         (WebCore::V8WebGLRenderingContext::uniform2fvCallbackCustom):
1000         (WebCore::V8WebGLRenderingContext::uniform2ivCallbackCustom):
1001         (WebCore::V8WebGLRenderingContext::uniform3fvCallbackCustom):
1002         (WebCore::V8WebGLRenderingContext::uniform3ivCallbackCustom):
1003         (WebCore::V8WebGLRenderingContext::uniform4fvCallbackCustom):
1004         (WebCore::V8WebGLRenderingContext::uniform4ivCallbackCustom):
1005         (WebCore::V8WebGLRenderingContext::uniformMatrix2fvCallbackCustom):
1006         (WebCore::V8WebGLRenderingContext::uniformMatrix3fvCallbackCustom):
1007         (WebCore::V8WebGLRenderingContext::uniformMatrix4fvCallbackCustom):
1008         (WebCore::V8WebGLRenderingContext::vertexAttrib1fvCallbackCustom):
1009         (WebCore::V8WebGLRenderingContext::vertexAttrib2fvCallbackCustom):
1010         (WebCore::V8WebGLRenderingContext::vertexAttrib3fvCallbackCustom):
1011         (WebCore::V8WebGLRenderingContext::vertexAttrib4fvCallbackCustom):
1012         * bindings/v8/custom/V8WorkerContextCustom.cpp:
1013         (WebCore::V8WorkerContext::importScriptsCallbackCustom):
1014         (WebCore::V8WorkerContext::setTimeoutCallbackCustom):
1015         (WebCore::V8WorkerContext::setIntervalCallbackCustom):
1016         * bindings/v8/custom/V8WorkerCustom.cpp:
1017         (WebCore::V8Worker::postMessageCallbackCustom):
1018         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1019         (WebCore::V8XMLHttpRequest::openCallbackCustom):
1020         (WebCore::V8XMLHttpRequest::sendCallbackCustom):
1021         * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
1022         (WebCore::V8XSLTProcessor::setParameterCallbackCustom):
1023         (WebCore::V8XSLTProcessor::getParameterCallbackCustom):
1024         (WebCore::V8XSLTProcessor::removeParameterCallbackCustom):
1025
1026 2013-02-13  Praveen R Jadhav  <praveen.j@samsung.com>
1027
1028         JSObject for ChannelSplitterNode and ChannelMergerNode are not created.
1029         https://bugs.webkit.org/show_bug.cgi?id=109542
1030
1031         Reviewed by Kentaro Hara.
1032
1033         "JSGenerateToJSObject" should be included in IDL files
1034         of ChannelSplitterNode and ChannelMergerNode in WebAudio.
1035         This ensures html files to access corresponding objects.
1036
1037         * Modules/webaudio/ChannelMergerNode.idl:
1038         * Modules/webaudio/ChannelSplitterNode.idl:
1039
1040 2013-02-13   Vineet Chaudhary  <rgf748@motorola.com>
1041
1042         [Regression] After r142831  collection-null-like-arguments.html layout test failing
1043         https://bugs.webkit.org/show_bug.cgi?id=109780
1044
1045         Reviewed by Kentaro Hara.
1046
1047         No new tests. LayoutTests/fast/dom/collection-null-like-arguments.html
1048         Should pass now.
1049
1050         * bindings/js/JSHTMLAllCollectionCustom.cpp: Return null for namedItem() only.
1051         (WebCore::getNamedItems):
1052         (WebCore::JSHTMLAllCollection::namedItem):
1053         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Ditto.
1054         (WebCore::getNamedItems):
1055         (WebCore::JSHTMLFormControlsCollection::namedItem):
1056         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Ditto.
1057         (WebCore::getNamedItems):
1058         (WebCore::JSHTMLOptionsCollection::namedItem):
1059
1060 2013-02-13  Soo-Hyun Choi  <sh9.choi@samsung.com>
1061
1062         Fix indentation error in MediaPlayerPrivateGStreamer.h
1063         https://bugs.webkit.org/show_bug.cgi?id=109768
1064
1065         Reviewed by Kentaro Hara.
1066
1067         No new tests as this patch just changes indentation style.
1068
1069         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1070         (MediaPlayerPrivateGStreamer):
1071         (WebCore::MediaPlayerPrivateGStreamer::hasVideo):
1072         (WebCore::MediaPlayerPrivateGStreamer::hasAudio):
1073         (WebCore::MediaPlayerPrivateGStreamer::engineDescription):
1074         (WebCore::MediaPlayerPrivateGStreamer::isLiveStream):
1075
1076 2013-02-13  Adam Barth  <abarth@webkit.org>
1077
1078         TokenPreloadScanner should be (mostly!) thread-safe
1079         https://bugs.webkit.org/show_bug.cgi?id=109760
1080
1081         Reviewed by Eric Seidel.
1082
1083         This patch makes the bulk of TokenPreloadScanner thread-safe.  The one
1084         remaining wart is processPossibleBaseTag because it wants to grub
1085         around in the base tag's attributes. I have a plan for that, but it's
1086         going to need to wait for the next patch.
1087
1088         * html/parser/HTMLPreloadScanner.cpp:
1089         (WebCore::isStartTag):
1090         (WebCore::isStartOrEndTag):
1091         (WebCore::TokenPreloadScanner::identifierFor):
1092         (WebCore::TokenPreloadScanner::inititatorFor):
1093         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
1094         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1095         (TokenPreloadScanner::StartTagScanner):
1096         (WebCore::TokenPreloadScanner::processPossibleTemplateTag):
1097         (WebCore::TokenPreloadScanner::processPossibleStyleTag):
1098         (WebCore::TokenPreloadScanner::processPossibleBaseTag):
1099         (WebCore::TokenPreloadScanner::scan):
1100         (WebCore::HTMLPreloadScanner::scan):
1101         * html/parser/HTMLPreloadScanner.h:
1102         (WebCore):
1103
1104 2013-02-13  Adam Barth  <abarth@webkit.org>
1105
1106         StartTagScanner should be thread-safe
1107         https://bugs.webkit.org/show_bug.cgi?id=109750
1108
1109         Reviewed by Eric Seidel.
1110
1111         This patch weens the StartTagScanner off AtomicString using two
1112         techniques:
1113
1114         1) This patch creates an enum to represent the four tag names that the
1115            StartTagScanner needs to understand. Using an enum is better than
1116            using an AtomicString because we can use the enum on both the main
1117            thread and on the background thread.
1118
1119         2) For attributes, this patch uses threadSafeMatch. We're not able to
1120            use threadSafeMatch everywhere due to performance, but using it for
1121            attributes appears to be ok becaues we only call threadSafeMatch on
1122            the attributes of "interesting" tags.
1123
1124         I tested the performance of this patch using
1125         PerformanceTests/Parser/html-parser.html and did not see any slowdown.
1126         (There actually appeared to be a <1% speedup, but I'm attributing that
1127         to noise.)
1128
1129         * html/parser/HTMLPreloadScanner.cpp:
1130         (WebCore::identifierFor):
1131         (WebCore):
1132         (WebCore::inititatorFor):
1133         (WebCore::StartTagScanner::StartTagScanner):
1134         (WebCore::StartTagScanner::processAttributes):
1135         (StartTagScanner):
1136         (WebCore::StartTagScanner::createPreloadRequest):
1137         (WebCore::StartTagScanner::processAttribute):
1138         (WebCore::StartTagScanner::charset):
1139         (WebCore::StartTagScanner::resourceType):
1140         (WebCore::StartTagScanner::shouldPreload):
1141         (WebCore::HTMLPreloadScanner::processToken):
1142
1143 2013-02-13  Huang Dongsung  <luxtella@company100.net>
1144
1145         Coordinated Graphics: a long page is scaled vertically while loading.
1146         https://bugs.webkit.org/show_bug.cgi?id=109645
1147
1148         Reviewed by Noam Rosenthal.
1149
1150         When loading http://www.w3.org/TR/xpath-datamodel/, Coordinated Graphics draws
1151         vertically scaled contents. It is because there is the difference between the
1152         size of a layer and the size of CoordinatedBackingStore.
1153
1154         Currently, CoordinatedGraphicsScene notifies the size to CoordinatedBackingStore
1155         at the moment of creating, updating and removing a tile. However, it is not
1156         necessary to send tile-related messages when the size of layer is changed.
1157         So this patch resets the size of CoordinatedBackingStore when receiving the
1158         message that is created when the size is changed: SyncLayerState.
1159
1160         There is no current way to reliably test flicker issues.
1161
1162         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
1163           Add m_pendingSize to set m_size at the moment of flushing.
1164           After http://webkit.org/b/108294, m_pendingSize will be removed
1165           because the bug makes CoordinatedGraphicsScene execute all messages at
1166           the moment of flushing.
1167         (WebCore::CoordinatedBackingStore::setSize):
1168         (WebCore::CoordinatedBackingStore::commitTileOperations):
1169         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
1170         (CoordinatedBackingStore):
1171         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1172         (WebCore::CoordinatedGraphicsScene::prepareContentBackingStore):
1173         (WebCore::CoordinatedGraphicsScene::createBackingStoreIfNeeded):
1174         (WebCore::CoordinatedGraphicsScene::resetBackingStoreSizeToLayerSize):
1175         (WebCore::CoordinatedGraphicsScene::createTile):
1176         (WebCore::CoordinatedGraphicsScene::removeTile):
1177         (WebCore::CoordinatedGraphicsScene::updateTile):
1178
1179 2013-02-13  Kentaro Hara  <haraken@chromium.org>
1180
1181         [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(),
1182         and XXXAccessorSetter() to XXXAttrSetterCustom()
1183         https://bugs.webkit.org/show_bug.cgi?id=109679
1184
1185         Reviewed by Adam Barth.
1186
1187         For naming consistency and clarification.
1188
1189         No tests. No change in behavior.
1190
1191         * bindings/scripts/CodeGeneratorV8.pm:
1192         (GenerateHeader):
1193         (GenerateHeaderCustomCall):
1194         (GenerateNormalAttrGetter):
1195         (GenerateNormalAttrSetter):
1196         (GenerateImplementation):
1197         * bindings/scripts/test/V8/V8TestInterface.cpp:
1198         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
1199         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
1200         * bindings/scripts/test/V8/V8TestObj.cpp:
1201         (WebCore::TestObjV8Internal::customAttrAttrGetter):
1202         (WebCore::TestObjV8Internal::customAttrAttrSetter):
1203         * bindings/scripts/test/V8/V8TestObj.h:
1204         (V8TestObj):
1205         * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
1206         (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom):
1207         * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp:
1208         (WebCore::V8BiquadFilterNode::typeAttrSetterCustom):
1209         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
1210         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrGetterCustom):
1211         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrSetterCustom):
1212         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrGetterCustom):
1213         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrSetterCustom):
1214         * bindings/v8/custom/V8ClipboardCustom.cpp:
1215         (WebCore::V8Clipboard::typesAttrGetterCustom):
1216         * bindings/v8/custom/V8CoordinatesCustom.cpp:
1217         (WebCore::V8Coordinates::altitudeAttrGetterCustom):
1218         (WebCore::V8Coordinates::altitudeAccuracyAttrGetterCustom):
1219         (WebCore::V8Coordinates::headingAttrGetterCustom):
1220         (WebCore::V8Coordinates::speedAttrGetterCustom):
1221         * bindings/v8/custom/V8CustomEventCustom.cpp:
1222         (WebCore::V8CustomEvent::detailAttrGetterCustom):
1223         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1224         (WebCore::V8DOMWindow::eventAttrGetterCustom):
1225         (WebCore::V8DOMWindow::eventAttrSetterCustom):
1226         (WebCore::V8DOMWindow::locationAttrSetterCustom):
1227         (WebCore::V8DOMWindow::openerAttrSetterCustom):
1228         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
1229         (WebCore::V8DeviceMotionEvent::accelerationAttrGetterCustom):
1230         (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAttrGetterCustom):
1231         (WebCore::V8DeviceMotionEvent::rotationRateAttrGetterCustom):
1232         (WebCore::V8DeviceMotionEvent::intervalAttrGetterCustom):
1233         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
1234         (WebCore::V8DeviceOrientationEvent::alphaAttrGetterCustom):
1235         (WebCore::V8DeviceOrientationEvent::betaAttrGetterCustom):
1236         (WebCore::V8DeviceOrientationEvent::gammaAttrGetterCustom):
1237         (WebCore::V8DeviceOrientationEvent::absoluteAttrGetterCustom):
1238         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
1239         (WebCore::V8Document::locationAttrGetterCustom):
1240         (WebCore::V8Document::locationAttrSetterCustom):
1241         * bindings/v8/custom/V8EventCustom.cpp:
1242         (WebCore::V8Event::dataTransferAttrGetterCustom):
1243         (WebCore::V8Event::clipboardDataAttrGetterCustom):
1244         * bindings/v8/custom/V8FileReaderCustom.cpp:
1245         (WebCore::V8FileReader::resultAttrGetterCustom):
1246         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1247         (WebCore::V8HTMLDocument::allAttrSetterCustom):
1248         * bindings/v8/custom/V8HTMLElementCustom.cpp:
1249         (WebCore::V8HTMLElement::itemValueAttrGetterCustom):
1250         (WebCore::V8HTMLElement::itemValueAttrSetterCustom):
1251         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
1252         (WebCore::V8HTMLFrameElement::locationAttrSetterCustom):
1253         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
1254         (WebCore::V8HTMLInputElement::selectionStartAttrGetterCustom):
1255         (WebCore::V8HTMLInputElement::selectionStartAttrSetterCustom):
1256         (WebCore::V8HTMLInputElement::selectionEndAttrGetterCustom):
1257         (WebCore::V8HTMLInputElement::selectionEndAttrSetterCustom):
1258         (WebCore::V8HTMLInputElement::selectionDirectionAttrGetterCustom):
1259         (WebCore::V8HTMLInputElement::selectionDirectionAttrSetterCustom):
1260         * bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
1261         (WebCore::V8HTMLLinkElement::sizesAttrGetterCustom):
1262         (WebCore::V8HTMLLinkElement::sizesAttrSetterCustom):
1263         * bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
1264         (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom):
1265         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1266         (WebCore::V8HTMLOptionsCollection::lengthAttrSetterCustom):
1267         * bindings/v8/custom/V8HistoryCustom.cpp:
1268         (WebCore::V8History::stateAttrGetterCustom):
1269         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
1270         (WebCore::V8JavaScriptCallFrame::scopeChainAttrGetterCustom):
1271         (WebCore::V8JavaScriptCallFrame::thisObjectAttrGetterCustom):
1272         (WebCore::V8JavaScriptCallFrame::typeAttrGetterCustom):
1273         * bindings/v8/custom/V8LocationCustom.cpp:
1274         (WebCore::V8Location::hashAttrSetterCustom):
1275         (WebCore::V8Location::hostAttrSetterCustom):
1276         (WebCore::V8Location::hostnameAttrSetterCustom):
1277         (WebCore::V8Location::hrefAttrSetterCustom):
1278         (WebCore::V8Location::pathnameAttrSetterCustom):
1279         (WebCore::V8Location::portAttrSetterCustom):
1280         (WebCore::V8Location::protocolAttrSetterCustom):
1281         (WebCore::V8Location::searchAttrSetterCustom):
1282         (WebCore::V8Location::reloadAttrGetterCustom):
1283         (WebCore::V8Location::replaceAttrGetterCustom):
1284         (WebCore::V8Location::assignAttrGetterCustom):
1285         * bindings/v8/custom/V8MessageEventCustom.cpp:
1286         (WebCore::V8MessageEvent::dataAttrGetterCustom):
1287         (WebCore::V8MessageEvent::portsAttrGetterCustom):
1288         * bindings/v8/custom/V8OscillatorNodeCustom.cpp:
1289         (WebCore::V8OscillatorNode::typeAttrSetterCustom):
1290         * bindings/v8/custom/V8PannerNodeCustom.cpp:
1291         (WebCore::V8PannerNode::panningModelAttrSetterCustom):
1292         (WebCore::V8PannerNode::distanceModelAttrSetterCustom):
1293         * bindings/v8/custom/V8PopStateEventCustom.cpp:
1294         (WebCore::V8PopStateEvent::stateAttrGetterCustom):
1295         * bindings/v8/custom/V8SVGLengthCustom.cpp:
1296         (WebCore::V8SVGLength::valueAttrGetterCustom):
1297         (WebCore::V8SVGLength::valueAttrSetterCustom):
1298         * bindings/v8/custom/V8TrackEventCustom.cpp:
1299         (WebCore::V8TrackEvent::trackAttrGetterCustom):
1300         * bindings/v8/custom/V8WebKitAnimationCustom.cpp:
1301         (WebCore::V8WebKitAnimation::iterationCountAttrGetterCustom):
1302         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1303         (WebCore::V8XMLHttpRequest::responseTextAttrGetterCustom):
1304         (WebCore::V8XMLHttpRequest::responseAttrGetterCustom):
1305
1306 2013-02-12  Kentaro Hara  <haraken@chromium.org>
1307
1308         [V8] Generate wrapper methods for custom getters/setters
1309         https://bugs.webkit.org/show_bug.cgi?id=109666
1310
1311         Reviewed by Adam Barth.
1312
1313         Currently V8 directly calls back custom getters/setters written
1314         in custom binding files. This makes it impossible for code generators
1315         to hook custom getters/setters (e.g. Code generators cannot insert a code
1316         for FeatureObservation into custom getters/setters). To solve the problem,
1317         we should generate wrapper methods for custom getters/setters.
1318
1319         No tests. No change in behavior.
1320
1321         * bindings/scripts/CodeGeneratorV8.pm:
1322         (GenerateNormalAttrGetter):
1323         (GenerateNormalAttrSetter):
1324         (GenerateSingleBatchedAttribute):
1325         (GenerateImplementation):
1326         * bindings/scripts/test/V8/V8TestInterface.cpp:
1327         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
1328         (TestInterfaceV8Internal):
1329         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
1330         (WebCore):
1331         * bindings/scripts/test/V8/V8TestObj.cpp:
1332         (WebCore::TestObjV8Internal::customAttrAttrGetter):
1333         (TestObjV8Internal):
1334         (WebCore::TestObjV8Internal::customAttrAttrSetter):
1335         (WebCore):
1336
1337 2013-02-13   Vineet Chaudhary  <rgf748@motorola.com>
1338
1339         HTMLCollections namedItem() methods should return null than undefined for empty collections.
1340         https://bugs.webkit.org/show_bug.cgi?id=104096
1341
1342         Reviewed by Kentaro Hara.
1343
1344         As per specification namedItem() should return null if collection is empty.
1345         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlallcollection
1346
1347         Test: fast/dom/htmlcollection-namedItem.html
1348
1349         * bindings/js/JSHTMLAllCollectionCustom.cpp: Returning null.
1350         (WebCore::getNamedItems):
1351         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Ditto.
1352         (WebCore::getNamedItems):
1353         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Ditto.
1354         (WebCore::getNamedItems):
1355         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: Ditto.
1356         (WebCore::V8HTMLAllCollection::namedItemCallback):
1357         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp: Ditto.
1358         (WebCore::V8HTMLFormControlsCollection::namedItemCallback):
1359         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: Ditto.
1360         (WebCore::V8HTMLOptionsCollection::namedItemCallback):
1361
1362 2013-02-13  Tony Gentilcore  <tonyg@chromium.org>
1363
1364         Fix svg/in-html/script-write.html with threaded HTML parser
1365         https://bugs.webkit.org/show_bug.cgi?id=109495
1366
1367         Reviewed by Eric Seidel.
1368
1369         This patch makes the background parser's simulateTreeBuilder() more realistic.
1370         1. The HTMLTreeBuilder does not call the updateStateFor() setState()s when in foreign content mode so we shouldn't do it when simulating the tree builder.
1371         2. HTMLTreeBuilder::processTokenInForeignContent has a list of tags which exit foreign content mode. We need to respect those.
1372         3. Support the <foreignObject> tag which enters and leaves foreign content mode.
1373         4. The tree builder sets state to DataState upon a </script> tag when not in foreign content mode. We need to do the same.
1374
1375         This involved creating a namespace stack where we push upon entering each namespace and pop upon leaving.
1376         We are in foreign content if the topmost namespace is SVG or MathML.
1377
1378         This fixes svg/in-html/script-write.html and likely others.
1379
1380         * html/parser/BackgroundHTMLParser.cpp:
1381         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
1382         * html/parser/BackgroundHTMLParser.h:
1383         (BackgroundHTMLParser):
1384         * html/parser/CompactHTMLToken.cpp:
1385         (WebCore::CompactHTMLToken::getAttributeItem): Returns the attribute of the given name. Necessary to test for <font> attributes in simulateTreeBuilder.
1386         (WebCore):
1387         * html/parser/CompactHTMLToken.h:
1388         (WebCore):
1389         (CompactHTMLToken):
1390
1391 2013-02-13  Andreas Kling  <akling@apple.com>
1392
1393         Remove Element::getAttributeItem() overload that returned a mutable Attribute*.
1394         <http://webkit.org/b/109756>
1395
1396         Reviewed by Antti Koivisto.
1397
1398         Remove this to prevent callers from accidentally causing elements to convert to UniqueElementData.
1399         There are two call sites (Attr and HTMLSelectElement) that legitimately need to mutate Attribute
1400         objects in-place, they now use Element::ensureUniqueElementData()->getAttributeItem() directly instead.
1401
1402         Small progression on Membuster3, mostly for peace of mind.
1403
1404         * dom/Attr.cpp:
1405         (WebCore::Attr::elementAttribute):
1406         * dom/Element.h:
1407         (Element):
1408         * html/HTMLInputElement.cpp:
1409         (WebCore::HTMLInputElement::updateType):
1410         * html/HTMLSelectElement.cpp:
1411         (WebCore::HTMLSelectElement::parseAttribute):
1412         * svg/SVGStyledElement.cpp:
1413         (WebCore::SVGStyledElement::getPresentationAttribute):
1414
1415 2013-02-13  Andreas Kling  <akling@apple.com>
1416
1417         Stronger ElementData pointer typing.
1418         <http://webkit.org/b/109752>
1419
1420         Reviewed by Antti Koivisto.
1421
1422         Use ShareableElementData/UniqueElementData pointers instead of generic ElementData pointers
1423         where possible. Moved some methods from base class into leaf classes that don't make sense
1424         for both classes.
1425
1426         * dom/DocumentSharedObjectPool.cpp:
1427         (WebCore::ShareableElementDataCacheEntry::ShareableElementDataCacheEntry):
1428         (ShareableElementDataCacheEntry):
1429         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
1430         * dom/DocumentSharedObjectPool.h:
1431         (DocumentSharedObjectPool):
1432         * dom/Element.cpp:
1433         (WebCore::Element::parserSetAttributes):
1434         (WebCore::Element::setAttributeNode):
1435         (WebCore::Element::removeAttributeInternal):
1436         (WebCore::Element::cloneAttributesFromElement):
1437         (WebCore::Element::createUniqueElementData):
1438         (WebCore::ShareableElementData::createWithAttributes):
1439         (WebCore::UniqueElementData::create):
1440         (WebCore::ElementData::makeUniqueCopy):
1441         (WebCore::UniqueElementData::makeShareableCopy):
1442         * dom/Element.h:
1443         (ElementData):
1444         (ShareableElementData):
1445         (UniqueElementData):
1446         (Element):
1447         (WebCore::Element::ensureUniqueElementData):
1448         * dom/StyledElement.cpp:
1449         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
1450
1451 2013-02-13  Antti Koivisto  <antti@apple.com>
1452
1453         Reschedule shared CFRunLoopTimer instead of reconstructing it
1454         https://bugs.webkit.org/show_bug.cgi?id=109765
1455
1456         Reviewed by Andreas Kling and Anders Carlsson.
1457
1458         Using CFRunLoopTimerSetNextFireDate is over 2x faster than deleting and reconstructing timers.
1459
1460         * platform/mac/SharedTimerMac.mm:
1461         (WebCore):
1462         (WebCore::PowerObserver::restartSharedTimer):
1463         (WebCore::sharedTimer):
1464         (WebCore::setSharedTimerFireInterval):
1465         (WebCore::stopSharedTimer):
1466
1467 2013-02-13  Emil A Eklund  <eae@chromium.org>
1468
1469         getComputedStyle returns truncated value for margin-right
1470         https://bugs.webkit.org/show_bug.cgi?id=109759
1471
1472         Reviewed by Tony Chang.
1473         
1474         Due to an unfortunate cast in CSSComputedStyleDeclaration::
1475         getPropertyCSSValue getComputedStyle returns truncated styles
1476         for margin-right in cases where it isn't set to a specific pixel
1477         value.
1478
1479         Test: fast/sub-pixel/computedstylemargin.html
1480
1481         * css/CSSComputedStyleDeclaration.cpp:
1482         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1483         Change type of temporary value variable to float to prevent loss of precision.
1484
1485 2013-02-13  Max Vujovic  <mvujovic@adobe.com>
1486
1487         [CSS Filters] Refactor filter outsets into a class
1488         https://bugs.webkit.org/show_bug.cgi?id=109330
1489
1490         Reviewed by Dean Jackson.
1491
1492         In filters related code, we're often operating on 4 ints representing the top, right,
1493         bottom, and left filter outsets. These outsets come from a filter like blur or drop-shadow.
1494         This patch packages those ints and their related operations into a class called
1495         IntRectExtent.
1496
1497         Here are some signs that we should make a class to hold those 4 ints:
1498         1) In RenderLayer.cpp, we have a expandRectForFilterOutsets function, which looks like
1499            feature envy.
1500         2) RenderStyle and other classes have methods like getFilterOutsets which set the 4 ints by
1501            reference. The calling code has to define 4 ints, which looks bloated.
1502         3) To fix bug 109098, we will need to check if filter outsets changed, which sounds like a
1503            nice job for an inequality operator. (https://bugs.webkit.org/show_bug.cgi?id=109098)
1504
1505         No new tests. No change in behavior. Just refactoring.
1506
1507         * GNUmakefile.list.am:
1508         * Target.pri:
1509         * WebCore.gypi:
1510         * WebCore.xcodeproj/project.pbxproj:
1511         * platform/graphics/IntRectExtent.h: Added.
1512         (WebCore):
1513         (IntRectExtent):
1514         (WebCore::IntRectExtent::IntRectExtent):
1515         (WebCore::IntRectExtent::top):
1516         (WebCore::IntRectExtent::setTop):
1517         (WebCore::IntRectExtent::right):
1518         (WebCore::IntRectExtent::setRight):
1519         (WebCore::IntRectExtent::bottom):
1520         (WebCore::IntRectExtent::setBottom):
1521         (WebCore::IntRectExtent::left):
1522         (WebCore::IntRectExtent::setLeft):
1523         (WebCore::IntRectExtent::expandRect):
1524         (WebCore::IntRectExtent::isZero):
1525         (WebCore::operator==):
1526         (WebCore::operator!=):
1527         (WebCore::operator+=):
1528         * platform/graphics/filters/FilterOperations.cpp:
1529         (WebCore::FilterOperations::outsets):
1530         * platform/graphics/filters/FilterOperations.h:
1531         (FilterOperations):
1532         * platform/graphics/texmap/TextureMapperLayer.cpp:
1533         (WebCore::TextureMapperLayer::intermediateSurfaceRect):
1534         * rendering/FilterEffectRenderer.cpp:
1535         (WebCore::FilterEffectRenderer::FilterEffectRenderer):
1536         (WebCore::FilterEffectRenderer::build):
1537         (WebCore::FilterEffectRenderer::computeSourceImageRectForDirtyRect):
1538         * rendering/FilterEffectRenderer.h:
1539         (FilterEffectRenderer):
1540         * rendering/RenderLayer.cpp:
1541         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
1542         (WebCore::transparencyClipBox):
1543         (WebCore::RenderLayer::calculateLayerBounds):
1544         * rendering/style/RenderStyle.h:
1545
1546 2013-02-13  Adam Barth  <abarth@webkit.org>
1547
1548         Factor HTMLTokenScanner out of HTMLPreloadScanner
1549         https://bugs.webkit.org/show_bug.cgi?id=109754
1550
1551         Reviewed by Eric Seidel.
1552
1553         This patch is just a mechanical separation of the per-token "scanning"
1554         logic from HTMLPreloadScanner into a separate class.
1555         HTMLPreloadScanner's job is now to keep track of the input stream and
1556         to pump the tokenizer.
1557
1558         This factorization class will let us use HTMLTokenScanner on the
1559         background thread (once we finish making it thread-safe). In a follow
1560         up patch, I'll move HTMLTokenScanner to its own file.
1561
1562         * html/parser/HTMLPreloadScanner.cpp:
1563         (WebCore::HTMLTokenScanner::HTMLTokenScanner):
1564         (WebCore::HTMLTokenScanner::~HTMLTokenScanner):
1565         (WebCore::HTMLTokenScanner::processPossibleTemplateTag):
1566         (WebCore::HTMLTokenScanner::processPossibleStyleTag):
1567         (WebCore::HTMLTokenScanner::processPossibleBaseTag):
1568         (WebCore::HTMLTokenScanner::scan):
1569         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
1570         (WebCore):
1571         (WebCore::HTMLPreloadScanner::~HTMLPreloadScanner):
1572         (WebCore::HTMLPreloadScanner::appendToEnd):
1573         (WebCore::HTMLPreloadScanner::scan):
1574         * html/parser/HTMLPreloadScanner.h:
1575         (HTMLTokenScanner):
1576         (WebCore::HTMLTokenScanner::setPredictedBaseElementURL):
1577         (HTMLPreloadScanner):
1578         (WebCore):
1579
1580 2013-02-13  Elliott Sprehn  <esprehn@chromium.org>
1581
1582         ASSERT(!renderer()->needsLayout()) when calling Element::focus() with generated content
1583         https://bugs.webkit.org/show_bug.cgi?id=109616
1584
1585         Reviewed by Julien Chaffraix.
1586
1587         Test: fast/css-generated-content/quote-layout-focus-crash.html
1588
1589         In some cases RenderQuote may mark itself and containing blocks as needing layout
1590         during a layout, but then one of it's containing blocks will mark itself as having
1591         finished layout so the RenderQuote and potentially some of it's ancestor renderers
1592         needLayout(), but the ancestors above those do not.
1593
1594         Until we have proper pre-layout tasks we should just walk the list of quotes
1595         right before layout and mark all their ancestors as needing layout if the quote
1596         needs layout.
1597
1598         * dom/Document.cpp:
1599         (WebCore::Document::updateLayout): Call markQuoteContainingBlocksForLayoutIfNeeded.
1600         (WebCore::Document::implicitClose): Call markQuoteContainingBlocksForLayoutIfNeeded.
1601         * rendering/RenderQuote.h:
1602         (WebCore::RenderQuote::next): Added.
1603         * rendering/RenderView.cpp:
1604         (WebCore::RenderView::markQuoteContainingBlocksForLayoutIfNeeded): Added.
1605         * rendering/RenderView.h:
1606         (RenderView):
1607
1608 2013-02-13  Jer Noble  <jer.noble@apple.com>
1609
1610         EME: MediaPlayer::keyNeede() should return a bool indicating whether an event listener was triggered.
1611         https://bugs.webkit.org/show_bug.cgi?id=109701
1612
1613         Reviewed by Eric Carlson.
1614
1615         Clients of MediaPlayer may need to do cleanup if calling keyNeeded()
1616         results in no event listener being triggered. Return a bool (like the
1617         v1 equivalent keyNeeded method) to indicate this.
1618
1619         * html/HTMLMediaElement.cpp:
1620         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
1621         * html/HTMLMediaElement.h:
1622         * platform/graphics/MediaPlayer.cpp:
1623         (WebCore::MediaPlayer::keyNeeded):
1624         * platform/graphics/MediaPlayer.h:
1625         (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
1626
1627 2013-02-13  Abhishek Arya  <inferno@chromium.org>
1628
1629         ASSERTION FAILED: !object || object->isBox(), Bad cast in RenderBox::computeLogicalHeight
1630         https://bugs.webkit.org/show_bug.cgi?id=107748
1631
1632         Reviewed by Levi Weintraub.
1633
1634         Make sure that body renderer is not an inline-block display
1635         when determining that it stretches to viewport or when paginated
1636         content needs base height.
1637
1638         Test: fast/block/body-inline-block-crash.html
1639
1640         * rendering/RenderBox.cpp:
1641         (WebCore::RenderBox::computeLogicalHeight):
1642         * rendering/RenderBox.h:
1643         (WebCore::RenderBox::stretchesToViewport):
1644
1645 2013-02-13  Shawn Singh  <shawnsingh@chromium.org>
1646
1647         Fix debug assertion being triggered because we may access dirty normalFlowList.
1648         https://bugs.webkit.org/show_bug.cgi?id=109740
1649
1650         A debug assertion in RenderLayer.h is being hit when trying to
1651         access the normalFlowList when it is dirty.  This is caused by a
1652         new recursion that I added in RenderLayerBacking::hasVisibleNonCompositingDescendant(),
1653         but I overlooked the need to call updateLayerListsIfNeeded()
1654         recursively as well.
1655
1656         Reviewed by Simon Fraser.
1657
1658         No test, because there's no reliable way to test this (same as bug 85512).
1659
1660         * rendering/RenderLayerBacking.cpp:
1661         (WebCore::hasVisibleNonCompositingDescendant):
1662         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
1663
1664 2013-02-13  Antti Koivisto  <antti@apple.com>
1665
1666         Don't restart shared timer if both the current and the new fire time are in the past
1667         https://bugs.webkit.org/show_bug.cgi?id=109731
1668
1669         Reviewed by Andreas Kling.
1670
1671         In 40-50% of cases we reschedule the shared timer both the old and the new fire time have already passed. This can happen at least when rescheduling 
1672         a zero duration timer and when stopping a timer that was ready to fire.
1673
1674         We can skip rescheduling in this case, the shared timer will fire immediately anyway.
1675         
1676         Scheduling timers calls into platform layer and can be slow. This about halves the time under setSharedTimerFireInterval in PLT3
1677         for ~0.1% total CPU time reduction.
1678
1679         * platform/ThreadTimers.cpp:
1680         (WebCore::ThreadTimers::ThreadTimers):
1681         (WebCore::ThreadTimers::setSharedTimer):
1682         (WebCore::ThreadTimers::updateSharedTimer):
1683         (WebCore::ThreadTimers::sharedTimerFiredInternal):
1684         * platform/ThreadTimers.h:
1685         (ThreadTimers):
1686
1687 2013-02-13  Zan Dobersek  <zdobersek@igalia.com>
1688
1689         The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
1690         https://bugs.webkit.org/show_bug.cgi?id=109325
1691
1692         Reviewed by Anders Carlsson.
1693
1694         Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
1695         two methods as they're provided by the C++ standard library being used.
1696
1697         No new tests as there's no change in functionality.
1698
1699         * Modules/mediasource/MediaSource.cpp:
1700         (WebCore::MediaSource::setDuration):
1701         * Modules/webaudio/AudioBufferSourceNode.cpp:
1702         (WebCore::AudioBufferSourceNode::totalPitchRate):
1703         * Modules/webaudio/AudioParam.cpp:
1704         (WebCore::AudioParam::setValue):
1705         * Modules/webaudio/AudioParamTimeline.cpp:
1706         (WebCore::isValidNumber):
1707         * Modules/webaudio/PannerNode.cpp:
1708         (WebCore::fixNANs):
1709         * bindings/js/IDBBindingUtilities.cpp:
1710         (WebCore::createIDBKeyFromValue):
1711         * bindings/js/JSDataViewCustom.cpp:
1712         (WebCore::getDataViewMember):
1713         * bindings/js/JSGeolocationCustom.cpp:
1714         (WebCore::setTimeout):
1715         (WebCore::setMaximumAge):
1716         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1717         (WebCore::JSHTMLOptionsCollection::setLength):
1718         * bindings/js/JSWebKitPointCustom.cpp:
1719         (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint):
1720         * bindings/scripts/CodeGeneratorJS.pm:
1721         (GenerateImplementation):
1722         (GenerateParametersCheck):
1723         * bindings/scripts/CodeGeneratorV8.pm:
1724         (GenerateParametersCheck):
1725         * bindings/scripts/test/JS/JSFloat64Array.cpp:
1726         (WebCore::JSFloat64Array::getByIndex):
1727         * bindings/scripts/test/JS/JSTestObj.cpp:
1728         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
1729         * bindings/scripts/test/V8/V8TestObj.cpp:
1730         (WebCore::TestObjV8Internal::classMethodWithClampCallback):
1731         * bindings/v8/IDBBindingUtilities.cpp:
1732         (WebCore::createIDBKeyFromValue):
1733         * bindings/v8/V8Binding.cpp:
1734         (WebCore::toInt32):
1735         (WebCore::toUInt32):
1736         * bindings/v8/custom/V8GeolocationCustom.cpp:
1737         (WebCore::createPositionOptions):
1738         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1739         (WebCore::V8HTMLOptionsCollection::lengthAccessorSetter):
1740         * bindings/v8/custom/V8WebKitPointCustom.cpp:
1741         (WebCore::V8WebKitPoint::constructorCallbackCustom):
1742         * bridge/qt/qt_runtime.cpp:
1743         (JSC::Bindings::convertValueToQVariant):
1744         * css/WebKitCSSMatrix.cpp:
1745         (WebCore::WebKitCSSMatrix::translate):
1746         (WebCore::WebKitCSSMatrix::scale):
1747         (WebCore::WebKitCSSMatrix::rotate):
1748         (WebCore::WebKitCSSMatrix::rotateAxisAngle):
1749         (WebCore::WebKitCSSMatrix::skewX):
1750         (WebCore::WebKitCSSMatrix::skewY):
1751         * html/HTMLMediaElement.cpp:
1752         (WebCore::HTMLMediaElement::percentLoaded):
1753         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
1754         (WebCore::HTMLMediaElement::endedPlayback):
1755         * html/MediaController.cpp:
1756         (MediaController::duration):
1757         * html/canvas/WebGLRenderingContext.cpp:
1758         (WebCore):
1759         (WebCore::WebGLRenderingContext::clearColor):
1760         * html/track/TextTrack.cpp:
1761         (WebCore::TextTrack::addCue):
1762         * html/track/TextTrackCue.cpp:
1763         (WebCore::TextTrackCue::setStartTime):
1764         (WebCore::TextTrackCue::setEndTime):
1765         * page/DOMWindow.cpp:
1766         (WebCore::DOMWindow::adjustWindowRect):
1767         * page/WindowFeatures.cpp:
1768         (WebCore::WindowFeatures::floatFeature): Also include an opportunistic style fix.
1769         * platform/CalculationValue.cpp:
1770         (WebCore::CalculationValue::evaluate):
1771         * platform/Decimal.cpp:
1772         (WebCore::Decimal::fromDouble):
1773         * platform/Length.cpp:
1774         (WebCore::Length::nonNanCalculatedValue):
1775         * platform/audio/AudioResampler.cpp:
1776         (WebCore::AudioResampler::setRate):
1777         * platform/audio/DynamicsCompressorKernel.cpp:
1778         (WebCore::DynamicsCompressorKernel::process):
1779         * platform/audio/Reverb.cpp:
1780         (WebCore::calculateNormalizationScale):
1781         * platform/graphics/Font.cpp:
1782         (WebCore::Font::width):
1783         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1784         (WebCore::MediaPlayerPrivateAVFoundation::isLiveStream):
1785         * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
1786         (LoopBlinnMathUtils):
1787         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1788         (WebCore::MediaPlayerPrivateGStreamer::buffered):
1789         (WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable):
1790         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1791         (WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable):
1792         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
1793         (WebCore::OpenTypeVerticalData::getVerticalTranslationsForGlyphs):
1794         * platform/graphics/transforms/TransformationMatrix.cpp:
1795         (WebCore::clampEdgeValue):
1796         (WebCore::TransformationMatrix::clampedBoundsOfProjectedQuad):
1797         * platform/network/ResourceResponseBase.cpp:
1798         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
1799         * rendering/RenderMediaControlsChromium.cpp:
1800         (WebCore::paintMediaSlider):
1801         (WebCore::paintMediaVolumeSlider):
1802         * rendering/RenderThemeMac.mm:
1803         (WebCore::RenderThemeMac::paintMediaSliderTrack):
1804         * svg/SVGAnimationElement.cpp:
1805         (WebCore::SVGAnimationElement::beginElementAt):
1806         (WebCore::SVGAnimationElement::endElementAt):
1807         * svg/SVGSVGElement.cpp:
1808         (WebCore::SVGSVGElement::setCurrentTime):
1809         * svg/animation/SMILTime.h:
1810         (WebCore::SMILTime::SMILTime):
1811         * svg/animation/SVGSMILElement.cpp:
1812         (WebCore::SVGSMILElement::addBeginTime):
1813         (WebCore::SVGSMILElement::addEndTime):
1814         * xml/XPathFunctions.cpp:
1815         (WebCore::XPath::FunSubstring::evaluate):
1816         (WebCore::XPath::FunRound::round):
1817         * xml/XPathValue.cpp:
1818         (WebCore::XPath::Value::toBoolean): Also include an opportunistic style fix.
1819         (WebCore::XPath::Value::toString):
1820
1821 2013-02-13  Eric Carlson  <eric.carlson@apple.com>
1822
1823         [Mac] Caption menu should have only one item selected
1824         https://bugs.webkit.org/show_bug.cgi?id=109730
1825
1826         Reviewed by Dean Jackson.
1827
1828         No new tests, media/track/track-user-preferences.html was modified to test the changes.
1829
1830         * CMakeLists.txt: Add CaptionUserPreferences.cpp.
1831         * GNUmakefile.list.am: Ditto.
1832         * Target.pri: Ditto.
1833         * WebCore.gypi: Ditto.
1834         * WebCore.vcproj/WebCore.vcproj: Ditto.
1835         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
1836         * WebCore.xcodeproj/project.pbxproj: Ditto.
1837
1838         * html/HTMLMediaElement.cpp:
1839         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_processingPreferenceChange.
1840         (WebCore::HTMLMediaElement::configureTextTrackGroup): Only end up with one selected track when
1841             called because of a preferences change.
1842         (WebCore::HTMLMediaElement::captionPreferencesChanged): Call setClosedCaptionsVisible instead
1843             of calling markCaptionAndSubtitleTracksAsUnconfigured directly.
1844         (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): Process all tracks, 
1845             not just track elements.
1846         * html/HTMLMediaElement.h:
1847
1848         * page/CaptionUserPreferences.cpp: Added so the functionality can be tested in DRT.
1849         (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks):
1850         (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks):
1851         (WebCore::CaptionUserPreferences::setUserPrefersCaptions):
1852         (WebCore::CaptionUserPreferences::captionPreferencesChanged):
1853         (WebCore::CaptionUserPreferences::preferredLanguages):
1854         (WebCore::CaptionUserPreferences::setPreferredLanguage):
1855         (WebCore::CaptionUserPreferences::displayNameForTrack):
1856         * page/CaptionUserPreferences.h:
1857
1858         * page/CaptionUserPreferencesMac.h:
1859         * page/CaptionUserPreferencesMac.mm:
1860         (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Moved some logic
1861             to base class.
1862         (WebCore::CaptionUserPreferencesMac::captionPreferencesChanged): Ditto.
1863
1864 2013-02-13  Hans Muller  <hmuller@adobe.com>
1865
1866         [CSS Exclusions] ExclusionPolygon reflex vertices should constrain the first fit location.
1867         https://bugs.webkit.org/show_bug.cgi?id=107568
1868
1869         Reviewed by Dirk Schulze.
1870
1871         The ExclusionPolygon::firstIncludedIntervalLogicalTop() method now includes offset edges
1872         for each of the polygon's reflex vertices. The motivation for this change is explained
1873         here: http://hansmuller-webkit.blogspot.com/2013/01/getting-to-point-reflex-vertices.html.
1874
1875         Test: fast/exclusions/shape-inside/shape-inside-first-fit-reflex.html
1876
1877         * rendering/ExclusionPolygon.cpp:
1878         (WebCore::isReflexVertex): Given three vertices that represent a pair of connected polygon edges, return true if the second vertex is a reflex vertex.
1879         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): This method now includes offset edges for reflex vertices.
1880         * rendering/ExclusionPolygon.h:
1881         (WebCore::OffsetPolygonEdge::OffsetPolygonEdge): Added a constructor for creating an OffsetPolygonEdge given a reflex vertex.
1882         (WebCore::OffsetPolygonEdge::edgeIndex): Changed this property from unsigned to int. Now using -1 to indicate that the offset edge doesn't correspond to a single polygon edge.
1883
1884 2013-02-13  Adam Barth  <abarth@webkit.org>
1885
1886         CSSPreloadScanner should not depend on HTMLToken
1887         https://bugs.webkit.org/show_bug.cgi?id=109742
1888
1889         Reviewed by Eric Seidel.
1890
1891         There's no need for the CSSPreloadScanner to depend on HTMLToken. On
1892         the background thread, we'll likely want to use a CompactHTMLToken for
1893         preload scanning, so this dependency is problematic. This patch also
1894         teaches the CSSPreloadScanner how to scan LChars.
1895
1896         * html/parser/CSSPreloadScanner.cpp:
1897         (WebCore::CSSPreloadScanner::~CSSPreloadScanner):
1898         (WebCore):
1899         (WebCore::CSSPreloadScanner::scan):
1900         * html/parser/CSSPreloadScanner.h:
1901         (CSSPreloadScanner):
1902         * html/parser/HTMLPreloadScanner.cpp:
1903         (WebCore::HTMLPreloadScanner::processToken):
1904
1905 2013-02-13  Julien Chaffraix  <jchaffraix@webkit.org>
1906
1907         [CSS Grid Layout] Adding or removing grid items doesn't properly recompute the track sizes
1908         https://bugs.webkit.org/show_bug.cgi?id=109100
1909
1910         Reviewed by Ojan Vafai.
1911
1912         Test: fast/css-grid-layout/grid-item-removal-track-breadth-update.html
1913
1914         The test uncovered several bugs in our implementation that is fixed as part
1915         of this change. They will be detailed below.
1916
1917         * rendering/RenderGrid.cpp:
1918         (WebCore::RenderGrid::logicalContentHeightForChild):
1919         Added this function to share the code between minContentForChild and maxContentForChild.
1920         Also forced a relayout in this case to avoid getting a wrong answer (e.g. the logical height
1921         constrained by the previous layout's grid breadth).
1922
1923         (WebCore::RenderGrid::minContentForChild):
1924         (WebCore::RenderGrid::maxContentForChild):
1925         Updated to use logicalContentHeightForChild.
1926
1927         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
1928         Updated to match the specification and set max breadth to current breadth per the specification.
1929         This made us over-grow some cases in the test.
1930
1931         (WebCore::RenderGrid::distributeSpaceToTracks):
1932         Updated to match the specification and use an extra variable to do the intermediate spreading. Also removed
1933         a now unneeded max. This fixes the case of multiple grid items in the same grid area that was completely broken.
1934
1935         (WebCore::RenderGrid::layoutGridItems):
1936         Added a FIXME about always relaying out content sized tracks' children.
1937
1938         * rendering/RenderGrid.h:
1939         Added logicalContentHeightForChild.
1940
1941 2013-02-13  Adam Barth  <abarth@webkit.org>
1942
1943         Clean up some style nits in HTMLPreloadScanner
1944         https://bugs.webkit.org/show_bug.cgi?id=109738
1945
1946         Reviewed by Tony Gentilcore.
1947
1948         This patch just fixes a few style nits I noticed when reading through
1949         the code.
1950
1951         * html/parser/HTMLPreloadScanner.cpp:
1952         (WebCore::StartTagScanner::StartTagScanner):
1953         (WebCore::HTMLPreloadScanner::processPossibleStyleTag):
1954         (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
1955         * html/parser/HTMLResourcePreloader.cpp:
1956         (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
1957         * html/parser/HTMLResourcePreloader.h:
1958         (PreloadRequest):
1959         (WebCore::PreloadRequest::PreloadRequest):
1960         (WebCore::HTMLResourcePreloader::HTMLResourcePreloader):
1961
1962 2013-02-13  Sheriff Bot  <webkit.review.bot@gmail.com>
1963
1964         Unreviewed, rolling out r142747.
1965         http://trac.webkit.org/changeset/142747
1966         https://bugs.webkit.org/show_bug.cgi?id=109746
1967
1968         broke component build (Requested by alecf_gardening on
1969         #webkit).
1970
1971         * inspector/HeapGraphSerializer.cpp:
1972         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
1973         (WebCore::HeapGraphSerializer::pushUpdate):
1974         (WebCore::HeapGraphSerializer::reportNode):
1975         (WebCore::HeapGraphSerializer::toNodeId):
1976         (WebCore::HeapGraphSerializer::addRootNode):
1977         * inspector/HeapGraphSerializer.h:
1978         (WebCore):
1979         (HeapGraphSerializer):
1980         * inspector/InspectorMemoryAgent.cpp:
1981         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
1982
1983 2013-02-13  Levi Weintraub  <leviw@chromium.org>
1984
1985         Bidi-Isolated inlines can cause subsequent content to not be rendered
1986         https://bugs.webkit.org/show_bug.cgi?id=108137
1987
1988         Reviewed by Eric Seidel.
1989
1990         First step in fixing how inline isolates behave with collapsed spaces.
1991         webkit.org/b/109624 tracks the overarching issue.
1992
1993         Test: fast/text/content-following-inline-isolate-with-collapsed-whitespace.html
1994
1995         * rendering/InlineIterator.h:
1996         (WebCore::IsolateTracker::addFakeRunIfNecessary): If we enter an isolate while
1997         ignoring spaces, ensure we leave it considering them again. This can result in
1998         including spaces that should be ignored following the isolate on the line, but
1999         failing to do so results in those contents not being rendered at all.
2000
2001 2013-02-13  Andreas Kling  <akling@apple.com>
2002
2003         Better names for ElementAttributeData & subclasses.
2004         <http://webkit.org/b/109529>
2005
2006         Reviewed by Antti Koivisto.
2007
2008         - ElementAttributeData => ElementData
2009
2010             Because ElementAttributeData won't be a good name once we move some non-attribute related
2011             things to this structure.
2012
2013         - ImmutableElementAttributeData => ShareableElementData
2014
2015             These objects can be shared with other Elements that have the same attribute name/value pairs.
2016
2017         - MutableElementAttributeData => UniqueElementData
2018
2019             These objects contain data that is unique to a specific Element, and cannot be shared with
2020             other Elements. This is what's important about it, not that its underlying storage is mutable.
2021
2022         - attributeData() -> elementData()
2023         - updatedAttributeData() -> elementDataWithSynchronizedAttributes()
2024         - ensureUpdatedAttributeData() -> ensureElementDataWithSynchronizedAttributes()
2025         - mutableAttributeData() -> ensureUniqueElementData()
2026
2027             Ride-along renames. Much less vague than previous names IMO.
2028
2029         * css/StyleResolver.cpp:
2030         (WebCore::StyleResolver::canShareStyleWithControl):
2031         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
2032         * dom/Attr.cpp:
2033         (WebCore::Attr::elementAttribute):
2034         * dom/DocumentSharedObjectPool.cpp:
2035         (WebCore::ShareableElementDataCacheKey::ShareableElementDataCacheKey):
2036         (WebCore::ShareableElementDataCacheKey::operator!=):
2037         (WebCore::ShareableElementDataCacheEntry::ShareableElementDataCacheEntry):
2038         (ShareableElementDataCacheEntry):
2039         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
2040         * dom/DocumentSharedObjectPool.h:
2041         (DocumentSharedObjectPool):
2042         * dom/Element.cpp:
2043         (WebCore::Element::detachAttribute):
2044         (WebCore::Element::removeAttribute):
2045         (WebCore::Element::attributes):
2046         (WebCore::Element::getAttribute):
2047         (WebCore::Element::setAttribute):
2048         (WebCore::Element::setSynchronizedLazyAttribute):
2049         (WebCore::Element::setAttributeInternal):
2050         (WebCore::Element::attributeChanged):
2051         (WebCore::Element::classAttributeChanged):
2052         (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
2053         (WebCore::Element::parserSetAttributes):
2054         (WebCore::Element::hasAttributes):
2055         (WebCore::Element::hasEquivalentAttributes):
2056         (WebCore::Element::setAttributeNode):
2057         (WebCore::Element::removeAttributeNode):
2058         (WebCore::Element::removeAttributeInternal):
2059         (WebCore::Element::addAttributeInternal):
2060         (WebCore::Element::getAttributeNode):
2061         (WebCore::Element::getAttributeNodeNS):
2062         (WebCore::Element::hasAttribute):
2063         (WebCore::Element::hasAttributeNS):
2064         (WebCore::Element::computeInheritedLanguage):
2065         (WebCore::Element::getURLAttribute):
2066         (WebCore::Element::getNonEmptyURLAttribute):
2067         (WebCore::Element::cloneAttributesFromElement):
2068         (WebCore::Element::createUniqueElementData):
2069         (WebCore::Element::reportMemoryUsage):
2070         (WebCore::ElementData::deref):
2071         (WebCore::ElementData::ElementData):
2072         (WebCore::sizeForShareableElementDataWithAttributeCount):
2073         (WebCore::ElementData::createShareableWithAttributes):
2074         (WebCore::ElementData::createUnique):
2075         (WebCore::ShareableElementData::ShareableElementData):
2076         (WebCore::ShareableElementData::~ShareableElementData):
2077         (WebCore::UniqueElementData::UniqueElementData):
2078         (WebCore::ElementData::makeMutableCopy):
2079         (WebCore::ElementData::makeImmutableCopy):
2080         (WebCore::ElementData::setPresentationAttributeStyle):
2081         (WebCore::ElementData::addAttribute):
2082         (WebCore::ElementData::removeAttribute):
2083         (WebCore::ElementData::isEquivalent):
2084         (WebCore::ElementData::reportMemoryUsage):
2085         (WebCore::ElementData::getAttributeItemIndexSlowCase):
2086         * dom/Element.h:
2087         (ElementData):
2088         (WebCore::ElementData::isUnique):
2089         (ShareableElementData):
2090         (UniqueElementData):
2091         (WebCore::Element::getAttributeItemIndex):
2092         (WebCore::Element::elementData):
2093         (Element):
2094         (WebCore::Element::elementDataWithSynchronizedAttributes):
2095         (WebCore::Element::ensureElementDataWithSynchronizedAttributes):
2096         (WebCore::Element::fastHasAttribute):
2097         (WebCore::Element::fastGetAttribute):
2098         (WebCore::Element::hasAttributesWithoutUpdate):
2099         (WebCore::Element::idForStyleResolution):
2100         (WebCore::Element::classNames):
2101         (WebCore::Element::attributeCount):
2102         (WebCore::Element::attributeItem):
2103         (WebCore::Element::getAttributeItem):
2104         (WebCore::Element::updateInvalidAttributes):
2105         (WebCore::Element::hasID):
2106         (WebCore::Element::hasClass):
2107         (WebCore::Element::ensureUniqueElementData):
2108         (WebCore::ElementData::mutableAttributeVector):
2109         (WebCore::ElementData::immutableAttributeArray):
2110         (WebCore::ElementData::length):
2111         (WebCore::ElementData::presentationAttributeStyle):
2112         (WebCore::ElementData::getAttributeItem):
2113         (WebCore::ElementData::getAttributeItemIndex):
2114         (WebCore::ElementData::attributeItem):
2115         * dom/Node.cpp:
2116         (WebCore::Node::dumpStatistics):
2117         (WebCore::Node::compareDocumentPosition):
2118         * dom/StyledElement.cpp:
2119         (WebCore::StyledElement::updateStyleAttribute):
2120         (WebCore::StyledElement::ensureMutableInlineStyle):
2121         (WebCore::StyledElement::attributeChanged):
2122         (WebCore::StyledElement::inlineStyleCSSOMWrapper):
2123         (WebCore::StyledElement::setInlineStyleFromString):
2124         (WebCore::StyledElement::styleAttributeChanged):
2125         (WebCore::StyledElement::inlineStyleChanged):
2126         (WebCore::StyledElement::addSubresourceAttributeURLs):
2127         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2128         * dom/StyledElement.h:
2129         (WebCore::StyledElement::inlineStyle):
2130         (WebCore::StyledElement::invalidateStyleAttribute):
2131         (WebCore::StyledElement::presentationAttributeStyle):
2132         * html/ClassList.cpp:
2133         (WebCore::ClassList::classNames):
2134         * html/HTMLInputElement.cpp:
2135         (WebCore::HTMLInputElement::updateType):
2136         * html/parser/HTMLConstructionSite.cpp:
2137         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
2138         * svg/SVGElement.cpp:
2139         (WebCore::SVGElement::updateAnimatedSVGAttribute):
2140         * svg/SVGElement.h:
2141         (WebCore::SVGElement::invalidateSVGAttributes):
2142         * xml/parser/XMLDocumentParserQt.cpp:
2143         (WebCore::XMLDocumentParser::XMLDocumentParser):
2144
2145 2013-02-13  Christian Biesinger  <cbiesinger@chromium.org>
2146
2147         Crash when encountering <object style="resize:both;">
2148         https://bugs.webkit.org/show_bug.cgi?id=109728
2149
2150         See also https://code.google.com/p/chromium/issues/detail?id=175535
2151         This bug can be reproduced on
2152         http://dramalink.net/tudou.y/?xink=162601060
2153
2154         Reviewed by Eric Seidel.
2155
2156         Test: fast/css/resize-object-crash.html
2157
2158         * rendering/RenderWidget.cpp:
2159         (WebCore::RenderWidget::paint):
2160         Only call paintResizer() if we have a layer and canResize() is true
2161
2162 2013-02-13  Arko Saha  <arko@motorola.com>
2163
2164         [Microdata] HTMLPropertiesCollection code cleanup
2165         https://bugs.webkit.org/show_bug.cgi?id=109721
2166
2167         Reviewed by Ryosuke Niwa.
2168
2169         Removed forward declaration of DOMStringList class.
2170         Removed unused findRefElements() method declaration.
2171         Also Removed unused parameter Element* from updatePropertyCache() method.
2172
2173         No new test since no change in behavior.
2174
2175         * html/HTMLPropertiesCollection.cpp:
2176         (WebCore::HTMLPropertiesCollection::updateNameCache):
2177         * html/HTMLPropertiesCollection.h:
2178         (WebCore):
2179         (HTMLPropertiesCollection):
2180         (WebCore::HTMLPropertiesCollection::updatePropertyCache):
2181
2182 2013-02-13  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2183
2184         [WebGL][EFL][GTK][Qt]Add support for OES_vertex_array_object.
2185         https://bugs.webkit.org/show_bug.cgi?id=109382
2186
2187         Reviewed by Kenneth Russell.
2188
2189         Covered by fast/canvas/webgl/oes-vertex-array-object.html
2190
2191         This patch adds support for using Vertex Array Object with OpenGl.
2192         The patch adds support for loading necessary opengl functions
2193         and support for checking GL_ARB_vertex_array_object. The support
2194         for OES_vertex_array_object is advertised if GL_ARB_vertex_array_object is
2195         supported.
2196
2197         * platform/graphics/OpenGLShims.cpp:
2198         (WebCore::initializeOpenGLShims):
2199         * platform/graphics/OpenGLShims.h:
2200         (_OpenGLFunctionTable):
2201         Added support for loading the necessary functions.
2202
2203         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2204         (WebCore::Extensions3DOpenGL::createVertexArrayOES):
2205         (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
2206         (WebCore::Extensions3DOpenGL::isVertexArrayOES):
2207         (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
2208         (WebCore::Extensions3DOpenGL::supportsExtension):
2209
2210         (WebCore):
2211         (WebCore::Extensions3DOpenGL::isVertexArrayObjectSupported):
2212         * platform/graphics/opengl/Extensions3DOpenGL.h:
2213         (Extensions3DOpenGL):
2214
2215 2013-02-13  Eberhard Graether  <egraether@google.com>
2216
2217         chromium: remove CompositorHUDFontAtlas
2218         https://bugs.webkit.org/show_bug.cgi?id=109328
2219
2220         Reviewed by James Robinson.
2221
2222         After switching the HudLayer to use skia's font rendering the
2223         CompositorHUDFontAtlas has become obsolete. This change removes
2224         this class and the related WebLayerTreeView API.
2225
2226         No new tests.
2227
2228         * WebCore.gypi:
2229         * platform/graphics/chromium/CompositorHUDFontAtlas.cpp: Removed.
2230         * platform/graphics/chromium/CompositorHUDFontAtlas.h: Removed.
2231
2232 2013-02-13  Dean Jackson  <dino@apple.com>
2233
2234         Small update to speech bubble for captions menu [Mac]
2235         https://bugs.webkit.org/show_bug.cgi?id=109641
2236
2237         Reviewed by Eric Carlson
2238
2239         Small adjustment to the embedded SVG that draws a speech bubble
2240         for the captions button. Remove a polygon that was so small
2241         it looked like a rendering error.
2242
2243         * css/mediaControlsQuickTime.css:
2244         (video::-webkit-media-controls-toggle-closed-captions-button):
2245
2246 2013-02-13  Dean Jackson  <dino@apple.com>
2247
2248         Clicking outside captions menu should dismiss it
2249         https://bugs.webkit.org/show_bug.cgi?id=109648
2250
2251         Reviewed by Eric Carlson.
2252
2253         Add a virtual override to the platform-specific
2254         defaultEventHandler to intercept any click in the controls,
2255         and hide the captions menu if it is showing.
2256
2257         Test: media/video-controls-captions-trackmenu-hide-on-click.html
2258
2259         * html/shadow/MediaControlsApple.cpp:
2260         (WebCore::MediaControlsApple::defaultEventHandler): Override from MediaControls. Hide
2261             captions menu if a click event comes in.
2262         * html/shadow/MediaControlsApple.h:
2263
2264 2013-02-13  Tommy Widenflycht  <tommyw@google.com>
2265
2266         MediaStream API: Use the source id when creating new tracks
2267         https://bugs.webkit.org/show_bug.cgi?id=109688
2268
2269         Reviewed by Adam Barth.
2270
2271         This patch reuses the ids from the source when creating tracks instead of creating a new one.
2272         This was requested by the chromium port to greatly simplify their implementation.
2273         In the longer run the API should be rewritten to only use tracks instead of sources.
2274
2275         Covered by existing tests.
2276
2277         * platform/chromium/support/WebMediaStream.cpp:
2278         (WebKit::WebMediaStream::audioTracks):
2279         (WebKit::WebMediaStream::videoTracks):
2280         (WebKit::WebMediaStream::initialize):
2281         (WebKit):
2282         * platform/chromium/support/WebMediaStreamTrack.cpp:
2283         (WebKit::WebMediaStreamTrack::initialize):
2284         (WebKit):
2285         * platform/mediastream/MediaStreamComponent.h:
2286         (WebCore::MediaStreamComponent::create):
2287         (MediaStreamComponent):
2288         (WebCore::MediaStreamComponent::MediaStreamComponent):
2289         (WebCore):
2290         * platform/mediastream/MediaStreamDescriptor.h:
2291         (WebCore::MediaStreamDescriptor::create):
2292         (MediaStreamDescriptor):
2293         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
2294
2295 2013-02-13  Eric Seidel  <eric@webkit.org>
2296
2297         Use fancy new Vector-based String constructors in the WebVTT parser
2298         https://bugs.webkit.org/show_bug.cgi?id=109619
2299
2300         Reviewed by Benjamin Poulain.
2301
2302         No change in behavior. Added some FIXMEs for future perf optimization.
2303
2304         * html/track/WebVTTParser.cpp:
2305         (WebCore::WebVTTParser::constructTreeFromToken):
2306
2307 2013-02-13  Morten Stenshorne  <mstensho@opera.com>
2308
2309         WebKit ignores column-rules wider than column-gap
2310         https://bugs.webkit.org/show_bug.cgi?id=15553
2311
2312         Paint column rules even if they are wider than the gap.
2313         Rules wider than the gap should just overlap with column contents.
2314
2315         Reviewed by Eric Seidel.
2316
2317         Test: fast/multicol/rule-thicker-than-gap.html
2318
2319         * rendering/RenderBlock.cpp:
2320         (WebCore::RenderBlock::paintColumnRules):
2321
2322 2013-02-13  Philip Rogers  <pdr@google.com>
2323
2324         Replace SVG bitmap cache with directly-rendered SVG
2325         https://bugs.webkit.org/show_bug.cgi?id=106159
2326
2327         Reviewed by Tim Horton.
2328
2329         This patch removes the caching of SVG bitmaps so SVG images are rendered directly. This
2330         enables WebKit to pass the IE Chalkboard demo in 10s on a Z620:
2331         http://ie.microsoft.com/testdrive/Performance/Chalkboard/
2332
2333         On a simple scaled SVG benchmark similar to the IE10 Chalkboard demo
2334         (http://philbit.com/SvgImagePerformance/viewport.html):
2335             without patch: ~20FPS
2336             with patch: ~55FPS
2337
2338         The bitmap SVG image cache had several shortcomings:
2339             - The bitmap cache prevented viewport rendering. (WK104693)
2340             - Bitmap memory usage was high. (WK106484)
2341             - Caching animating images was expensive.
2342
2343         This change removes almost all of the SVGImageCache implementation, replacing it with
2344         directly-rendered SVG. Instead of caching bitmaps, an SVGImageForContainer is cached which
2345         is a thin wrapper around an SVG image with the associated container size and scale.
2346         When rendering patterns (e.g., tiled backgrounds), a temporary bitmap is used for
2347         performance. This change also removes the redraw timer of the old cache, instead relying
2348         on the SVG image to notify clients if the image changes (e.g., during animations).
2349
2350         This patch fixes two existing bugs (WK99481 and WK104189) that were due to caching bitmaps
2351         at a fixed size. A test has been added for each of these bugs.
2352
2353         Tests: svg/as-image/svg-image-scaled.html
2354                svg/as-image/svg-image-viewbox.html
2355
2356         * CMakeLists.txt:
2357         * GNUmakefile.list.am:
2358         * Target.pri:
2359         * WebCore.gypi:
2360         * WebCore.vcproj/WebCore.vcproj:
2361         * WebCore.xcodeproj/project.pbxproj:
2362         * loader/cache/CachedImage.cpp:
2363         (WebCore::CachedImage::lookupOrCreateImageForRenderer):
2364         (WebCore::CachedImage::setContainerSizeForRenderer):
2365         (WebCore::CachedImage::clear):
2366         (WebCore::CachedImage::changedInRect):
2367
2368             SVG images are no longer special-cased here. When the SVG image changes, users are
2369             notified through this function, and users can then request their content to be redrawn.
2370
2371         * svg/graphics/SVGImage.cpp:
2372         (WebCore::SVGImage::setContainerSize):
2373         (WebCore::SVGImage::drawForContainer):
2374
2375             drawForContainer lays out the SVG content for a specific container size and renders it.
2376             The logic is fairly straightforward but a note about the scales and zooms here:
2377                 the destination rect parameter is zoomed but not scaled
2378                 the source rect parameter is zoomed but not scaled
2379                 the context is scaled but not zoomed
2380             SVGImage::draw(...) only accepts a source and destination rect but does not consider
2381             scale or zoom. Therefore, drawForContainer removes the zoom component from the source
2382             so SVGImage::draw(...) will draw from the pre-zoom source to the post-zoom destination.
2383
2384         (WebCore::SVGImage::drawPatternForContainer):
2385
2386             For performance, drawPatternForContainer renders the SVG content onto a bitmap, then
2387             has the bitmap image draw the pattern. This is necessary because drawPattern is used
2388             for tiling.
2389
2390         (WebCore):
2391         (WebCore::SVGImage::startAnimation):
2392         (WebCore::SVGImage::stopAnimation):
2393         (WebCore::SVGImage::resetAnimation):
2394         (WebCore::SVGImage::reportMemoryUsage):
2395         * svg/graphics/SVGImage.h:
2396         (WebCore):
2397         (SVGImage):
2398         * svg/graphics/SVGImageCache.cpp:
2399
2400             Instead of storing a SizeAndScales values for each renderer, a SVGImageForContainer
2401             is stored which is just a thin wrapper around an SVG image that contains container
2402             sizing information. By combining the image and size information, the two maps of
2403             SVGImageCache have been merged into one.
2404
2405             To make this patch easier to review, SVGImageCache still exists and works similar to
2406             how it did before the patch. Now, SVGImageCache simply stores the SVGImageForContainers.
2407             In a followup patch it will be removed.
2408
2409             Note: the redraw timer of SVGImageCache has been removed because animation
2410             invalidation is now properly propagated back to the image clients.
2411
2412         (WebCore):
2413         (WebCore::SVGImageCache::SVGImageCache):
2414         (WebCore::SVGImageCache::~SVGImageCache):
2415         (WebCore::SVGImageCache::removeClientFromCache):
2416         (WebCore::SVGImageCache::setContainerSizeForRenderer):
2417         (WebCore::SVGImageCache::imageSizeForRenderer):
2418
2419             Previously, this function returned the scaled image size which was incorrect. The image
2420             size is used by clients such as GraphicsContext2D to determine the source size
2421             for drawing the image. draw() accepts zoomed but not scaled values, so this has been
2422             changed.
2423
2424         (WebCore::SVGImageCache::imageForRenderer):
2425
2426             A FIXME has been added here to not set the scale on every lookup. This can be improved
2427             by setting the page scale factor in setContainerSizeForRenderer() in a future patch.
2428
2429         * svg/graphics/SVGImageCache.h:
2430         (WebCore):
2431         (SVGImageCache):
2432         * svg/graphics/SVGImageForContainer.cpp: Added.
2433         (WebCore):
2434
2435             SVGImageForContainer is a thin wrapper around an SVG image. The lifetime of the
2436             SVGImage will be longer than the image cache.
2437
2438         (WebCore::SVGImageForContainer::size):
2439
2440             This is the only logic in SVGImageForContainer. The size returned needs to be zoomed
2441             but not scaled because it is used (e.g., by RenderImage) to pass back into draw() which
2442             takes zoomed but not scaled values.
2443
2444         (WebCore::SVGImageForContainer::draw):
2445         (WebCore::SVGImageForContainer::drawPattern):
2446         * svg/graphics/SVGImageForContainer.h: Added.
2447         (WebCore):
2448         (SVGImageForContainer):
2449
2450             In a future patch SVGImageForContainer can be made immutable but without a refactoring
2451             for not setting the page scale factor in SVGImageCache::lookupOrCreateImageForRenderer,
2452             setters are needed.
2453
2454         (WebCore::SVGImageForContainer::create):
2455         (WebCore::SVGImageForContainer::containerSize):
2456         (WebCore::SVGImageForContainer::pageScale):
2457         (WebCore::SVGImageForContainer::zoom):
2458         (WebCore::SVGImageForContainer::setSize):
2459         (WebCore::SVGImageForContainer::setZoom):
2460         (WebCore::SVGImageForContainer::setPageScale):
2461         (WebCore::SVGImageForContainer::SVGImageForContainer):
2462         (WebCore::SVGImageForContainer::destroyDecodedData):
2463         (WebCore::SVGImageForContainer::decodedSize):
2464
2465 2013-02-12  Antti Koivisto  <antti@apple.com>
2466
2467         Avoid updating timer heap when nothing changes
2468         https://bugs.webkit.org/show_bug.cgi?id=109630
2469
2470         Reviewed by Andreas Kling.
2471
2472         When the fire time of a Timer is changed we remove it from the timer heap and reinsert it. This is pretty slow. 
2473         Turns out that in ~80% of cases we are already in the heap and the insertion position is the same as the 
2474         original position. We can check if anything is actually going to change before doing this work.
2475         
2476         This makes starting a timer ~30% faster in average, ~0.1% progression in PLT3.
2477         
2478         * platform/Timer.cpp:
2479         (TimerHeapLessThanFunction):
2480         (WebCore::TimerHeapLessThanFunction::operator()):
2481         (WebCore::parentHeapPropertyHolds):
2482         (WebCore):
2483         (WebCore::childHeapPropertyHolds):
2484         (WebCore::TimerBase::hasValidHeapPosition):
2485         
2486             The code here assumes that STL heap is a normal binary heap. If there is a different implementation
2487             somewhere the assertions will catch it.
2488
2489         (WebCore::TimerBase::updateHeapIfNeeded):
2490         
2491             Skip updating the heap if it is already valid.
2492
2493         (WebCore::TimerBase::setNextFireTime):
2494         * platform/Timer.h:
2495         (TimerBase):
2496
2497 2013-02-13  Martin Robinson  <mrobinson@igalia.com>
2498
2499         [GTK] Remove remaining dead code from the GLib unicode backend
2500         https://bugs.webkit.org/show_bug.cgi?id=109707
2501
2502         Reviewed by Philippe Normand.
2503
2504         * platform/KURL.cpp:
2505         (WebCore::appendEncodedHostname):
2506         * platform/text/TextEncoding.cpp:
2507         (WebCore::TextEncoding::encode):
2508         * platform/text/TextEncodingRegistry.cpp:
2509         (WebCore::buildBaseTextCodecMaps):
2510         (WebCore::extendTextCodecMaps):
2511
2512 2013-02-13  Xianzhu Wang  <wangxianzhu@chromium.org>
2513
2514         Heap-use-after-free in WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects
2515         https://bugs.webkit.org/show_bug.cgi?id=108695
2516
2517         See comments of RenderLayerModelObject::willBeDestroyed() below for details.
2518
2519         Reviewed by Abhishek Arya.
2520
2521         Test: ManulTests/scrolling-coordinator-viewport-constrained-crash.html
2522         Unable to write a normal layout test because
2523         1) must waitUntilDone() to reproduce the crash but the redirected URL can't notifyDone();
2524         2) Can't use a frame to contain the test because ScrollingCoordinator handles only the main frame.
2525
2526         * rendering/RenderBoxModelObject.cpp:
2527         (WebCore::RenderBoxModelObject::willBeDestroyed): Moved removeViewportConstrainedObject() call into RenderLayerModelObject::willBeDestroyed() because only RenderLayerModelObjects can be added as viewportConstrainedObjects.
2528         * rendering/RenderLayerModelObject.cpp:
2529         (WebCore::RenderLayerModelObject::willBeDestroyed): Changed this->view() (then view->frameView()) to this->frame() (then frame->view()) because when willBeDestroyed() is called, the document has set its renderView to 0 thus this->view() will return 0, causing removeViewportConstrainedObject() not called and a deleted RenderLayerModelObject in FrameView's viewportConstrainedObjects.
2530
2531 2013-02-13  Florin Malita  <fmalita@chromium.org>
2532
2533         [SVG] OOB access in SVGListProperty::replaceItemValues()
2534         https://bugs.webkit.org/show_bug.cgi?id=109293
2535
2536         Replacing a list property item with itself should be a no-op. This patch updates the related
2537         APIs and logic to detect the self-replace case and prevent removal of the item from the list.
2538
2539         To avoid scanning the list multiple times, removeItemFromList() is updated to operate on
2540         indices and a findItem() method is added to resolve an item to an index.
2541
2542         Reviewed by Dirk Schulze.
2543
2544         No new tests: updated existing tests cover the change.
2545
2546         * svg/properties/SVGAnimatedListPropertyTearOff.h:
2547         (WebCore::SVGAnimatedListPropertyTearOff::findItem):
2548         (SVGAnimatedListPropertyTearOff):
2549         (WebCore::SVGAnimatedListPropertyTearOff::removeItemFromList):
2550         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
2551         (WebCore::SVGAnimatedPathSegListPropertyTearOff::findItem):
2552         (SVGAnimatedPathSegListPropertyTearOff):
2553         (WebCore::SVGAnimatedPathSegListPropertyTearOff::removeItemFromList):
2554         Add a findItem() delegating method, and update removeItemFromList() to use the new
2555         index-based API.
2556
2557         * svg/properties/SVGListProperty.h:
2558         (WebCore::SVGListProperty::insertItemBeforeValues):
2559         (WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
2560         (WebCore::SVGListProperty::replaceItemValues):
2561         (WebCore::SVGListProperty::replaceItemValuesAndWrappers):
2562         (SVGListProperty):
2563         Updated to handle the no-op case for insertItemBefore() & replaceItem().
2564
2565         * svg/properties/SVGListPropertyTearOff.h:
2566         (WebCore::SVGListPropertyTearOff::findItem):
2567         (WebCore::SVGListPropertyTearOff::removeItemFromList):
2568         Index-based API updates.
2569
2570         (WebCore::SVGListPropertyTearOff::processIncomingListItemValue):
2571         (WebCore::SVGListPropertyTearOff::processIncomingListItemWrapper):
2572         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
2573         (WebCore::SVGPathSegListPropertyTearOff::processIncomingListItemValue):
2574         Detect the self-replace case and return without removing the item from the list.
2575
2576         * svg/properties/SVGPathSegListPropertyTearOff.h:
2577         (WebCore::SVGPathSegListPropertyTearOff::findItem):
2578         (WebCore::SVGPathSegListPropertyTearOff::removeItemFromList):
2579         (SVGPathSegListPropertyTearOff):
2580         (WebCore::SVGPathSegListPropertyTearOff::processIncomingListItemWrapper):
2581         * svg/properties/SVGStaticListPropertyTearOff.h:
2582         (WebCore::SVGStaticListPropertyTearOff::processIncomingListItemValue):
2583         (WebCore::SVGStaticListPropertyTearOff::processIncomingListItemWrapper):
2584         Index-based API updates.
2585
2586 2013-02-13  Takashi Sakamoto  <tasak@google.com>
2587
2588         [Refactoring] StyleResolver::State should have methods to access its member variables.
2589         https://bugs.webkit.org/show_bug.cgi?id=108563
2590
2591         Reviewed by Antti Koivisto.
2592
2593         Made all member variables private and added methods to access the
2594         variables, because most of the member variables are read-only.
2595         We don't need to update those read-only variables while resolving
2596         styles.
2597
2598         No new tests, because just refactoring.
2599
2600         * css/SVGCSSStyleSelector.cpp:
2601         (WebCore::StyleResolver::applySVGProperty):
2602         * css/StyleResolver.cpp:
2603         (WebCore):
2604         (WebCore::StyleResolver::collectMatchingRules):
2605         (WebCore::StyleResolver::collectMatchingRulesForRegion):
2606         (WebCore::StyleResolver::sortAndTransferMatchedRules):
2607         (WebCore::StyleResolver::matchScopedAuthorRules):
2608         (WebCore::StyleResolver::styleSharingCandidateMatchesHostRules):
2609         (WebCore::StyleResolver::matchHostRules):
2610         (WebCore::StyleResolver::matchAuthorRules):
2611         (WebCore::StyleResolver::matchUserRules):
2612         (WebCore::StyleResolver::matchUARules):
2613         (WebCore::StyleResolver::collectMatchingRulesForList):
2614         (WebCore::StyleResolver::sortMatchedRules):
2615         (WebCore::StyleResolver::matchAllRules):
2616         (WebCore::StyleResolver::State::initElement):
2617         (WebCore::StyleResolver::initElement):
2618         Modified to invoke m_state.initElement if a given element is
2619         different from current m_state's element.
2620         (WebCore::StyleResolver::State::initForStyleResolve):
2621         Moved from StyleResolver.
2622         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
2623         (WebCore::StyleResolver::canShareStyleWithControl):
2624         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
2625         (WebCore::StyleResolver::canShareStyleWithElement):
2626         (WebCore::StyleResolver::locateSharedStyle):
2627         (WebCore::StyleResolver::styleForElement):
2628         (WebCore::StyleResolver::styleForKeyframe):
2629         (WebCore::StyleResolver::keyframeStylesForAnimation):
2630         (WebCore::StyleResolver::pseudoStyleForElement):
2631         Changed ASSERT in the first line. ASSERT(m_state.parentStyle) would be
2632         wrong, because it depends on previous resolving. However,
2633         initForStyleResolve will also update m_state.parentStyle. No code in
2634         pseudoStyleForElement depends on previous resolving state.
2635         (WebCore::StyleResolver::styleForPage):
2636         (WebCore::StyleResolver::defaultStyleForElement):
2637         (WebCore::StyleResolver::adjustRenderStyle):
2638         (WebCore::StyleResolver::updateFont):
2639         (WebCore::StyleResolver::pseudoStyleRulesForElement):
2640         (WebCore::StyleResolver::ruleMatches):
2641         Added one more parameter, dynamicPseudo, because dynamicPseudo in
2642         State class is just used for returning matched pseudo style from
2643         this ruleMatches to collectMatchingRulesForList. No need to keep
2644         dynamicPseudo while resolving styles.
2645         (WebCore::StyleResolver::checkRegionSelector):
2646         Removed m_pseudoStyle = NOPSEUDO, because this method uses just
2647         SelectorChecker::matched. SelectorChecker doesn't see StyleResolver's
2648         m_pseudoStyle directly. Need to use SelectorCheckerContext. So no
2649         need to set m_pseudoStyle to be NOPSEUDO.
2650         (WebCore::StyleResolver::applyProperties):
2651         (WebCore::StyleResolver::applyMatchedProperties):
2652         (WebCore::StyleResolver::isLeftPage):
2653         (WebCore::StyleResolver::applyPropertyToStyle):
2654         (WebCore::StyleResolver::useSVGZoomRules):
2655         (WebCore::createGridTrackBreadth):
2656         (WebCore::StyleResolver::resolveVariables):
2657         (WebCore::StyleResolver::applyProperty):
2658         (WebCore::StyleResolver::cachedOrPendingFromValue):
2659         (WebCore::StyleResolver::generatedOrPendingFromValue):
2660         (WebCore::StyleResolver::setOrPendingFromValue):
2661         (WebCore::StyleResolver::cursorOrPendingFromValue):
2662         (WebCore::StyleResolver::checkForTextSizeAdjust):
2663         (WebCore::StyleResolver::initializeFontStyle):
2664         (WebCore::StyleResolver::setFontSize):
2665         (WebCore::StyleResolver::colorFromPrimitiveValue):
2666         (WebCore::StyleResolver::loadPendingSVGDocuments):
2667         (WebCore::StyleResolver::cachedOrPendingStyleShaderFromValue):
2668         (WebCore::StyleResolver::loadPendingShaders):
2669         (WebCore::StyleResolver::parseCustomFilterTransformParameter):
2670         (WebCore::StyleResolver::createFilterOperations):
2671         (WebCore::StyleResolver::loadPendingImage):
2672         (WebCore::StyleResolver::loadPendingImages):
2673         * css/StyleResolver.h:
2674         (WebCore::StyleResolver::style):
2675         (WebCore::StyleResolver::parentStyle):
2676         (WebCore::StyleResolver::rootElementStyle):
2677         (WebCore::StyleResolver::element):
2678         (WebCore::StyleResolver::hasParentNode):
2679         (StyleResolver):
2680         (WebCore::StyleResolver::State::State):
2681         (State):
2682         (WebCore::StyleResolver::State::clear):
2683         Modified to use clear at the end of styleForElement.
2684         (WebCore::StyleResolver::State::document):
2685         (WebCore::StyleResolver::State::element):
2686         (WebCore::StyleResolver::State::styledElement):
2687         (WebCore::StyleResolver::State::setStyle):
2688         (WebCore::StyleResolver::State::style):
2689         (WebCore::StyleResolver::State::takeStyle):
2690         (WebCore::StyleResolver::State::ensureRuleList):
2691         (WebCore::StyleResolver::State::takeRuleList):
2692         (WebCore::StyleResolver::State::parentNode):
2693         (WebCore::StyleResolver::State::setParentStyle):
2694         (WebCore::StyleResolver::State::parentStyle):
2695         (WebCore::StyleResolver::State::rootElementStyle):
2696         (WebCore::StyleResolver::State::regionForStyling):
2697         (WebCore::StyleResolver::State::setSameOriginOnly):
2698         (WebCore::StyleResolver::State::isSameOriginOnly):
2699         (WebCore::StyleResolver::State::pseudoStyle):
2700         (WebCore::StyleResolver::State::elementLinkState):
2701         (WebCore::StyleResolver::State::distributedToInsertionPoint):
2702         (WebCore::StyleResolver::State::setElementAffectedByClassRules):
2703         (WebCore::StyleResolver::State::elementAffectedByClassRules):
2704         (WebCore::StyleResolver::State::setApplyPropertyToRegularStyle):
2705         (WebCore::StyleResolver::State::setApplyPropertyToVisitedLinkStyle):
2706         (WebCore::StyleResolver::State::applyPropertyToRegularStyle):
2707         (WebCore::StyleResolver::State::applyPropertyToVisitedLinkStyle):
2708         (WebCore::StyleResolver::State::pendingImageProperties):
2709         (WebCore::StyleResolver::State::pendingSVGDocuments):
2710         (WebCore::StyleResolver::State::setHasPendingShaders):
2711         (WebCore::StyleResolver::State::hasPendingShaders):
2712         (WebCore::StyleResolver::State::setLineHeightValue):
2713         (WebCore::StyleResolver::State::lineHeightValue):
2714         (WebCore::StyleResolver::State::setFontDirty):
2715         (WebCore::StyleResolver::State::fontDirty):
2716         (WebCore::StyleResolver::State::cacheBorderAndBackground):
2717         (WebCore::StyleResolver::State::hasUAAppearance):
2718         (WebCore::StyleResolver::State::borderData):
2719         (WebCore::StyleResolver::State::backgroundData):
2720         (WebCore::StyleResolver::State::backgroundColor):
2721         (WebCore::StyleResolver::State::fontDescription):
2722         (WebCore::StyleResolver::State::parentFontDescription):
2723         (WebCore::StyleResolver::State::setFontDescription):
2724         (WebCore::StyleResolver::State::setZoom):
2725         (WebCore::StyleResolver::State::setEffectiveZoom):
2726         (WebCore::StyleResolver::State::setTextSizeAdjust):
2727         (WebCore::StyleResolver::State::setWritingMode):
2728         (WebCore::StyleResolver::State::setTextOrientation):
2729         fontDescription, ... and setTextOrientation were moved from
2730         StyleResolver.
2731         (WebCore::StyleResolver::State::matchedRules):
2732         (WebCore::StyleResolver::State::addMatchedRule):
2733         Moved from StyleResolver.
2734         (WebCore::StyleResolver::applyPropertyToRegularStyle):
2735         (WebCore::StyleResolver::applyPropertyToVisitedLinkStyle):
2736         (WebCore::StyleResolver::fontDescription):
2737         (WebCore::StyleResolver::parentFontDescription):
2738         (WebCore::StyleResolver::setFontDescription):
2739         (WebCore::StyleResolver::setZoom):
2740         (WebCore::StyleResolver::setEffectiveZoom):
2741         (WebCore::StyleResolver::setTextSizeAdjust):
2742         (WebCore::StyleResolver::setWritingMode):
2743         (WebCore::StyleResolver::setTextOrientation):
2744         These fontDescription, ..., setTextOrientation are wrappers to
2745         invoke State's methods. StyleBuilder still depends on StyleResolver
2746         and invokes these methods. So we need these wrappers.
2747
2748 2013-02-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2749
2750         [Qt] window.open passes height and width parameters even if not defined in a page
2751         https://bugs.webkit.org/show_bug.cgi?id=107705
2752
2753         Reviewed by Kenneth Rohde Christiansen.
2754
2755         Do not override width or height of 0, as that indicates default size, and not minimum size.
2756
2757         Tested by tst_qwebpage.
2758
2759         * page/DOMWindow.cpp:
2760         (WebCore::DOMWindow::adjustWindowRect):
2761
2762 2013-02-13  Rashmi Shyamasundar  <rashmi.s2@samsung.com>
2763
2764         The 2D Canvas functions fillText()/strokeText() should display nothing when maxWidth is less then or equal to zero
2765         https://bugs.webkit.org/show_bug.cgi?id=102656
2766
2767         Reviewed by Dirk Schulze.
2768
2769         The functions fillText()/strokeText() should not display anything when 
2770         maxWidth is less than or equal to zero, according to spec :
2771         http://www.w3.org/TR/2dcontext/#text-preparation-algorithm
2772
2773         Test: fast/canvas/canvas-fillText-maxWidth-zero.html
2774
2775         * html/canvas/CanvasRenderingContext2D.cpp:
2776         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2777
2778 2013-02-13  ChangSeok Oh  <shivamidow@gmail.com>
2779
2780         [GTK][AC] Implement basic transform animations with clutter ac backend
2781         https://bugs.webkit.org/show_bug.cgi?id=109363
2782
2783         Reviewed by Gustavo Noronha Silva.
2784
2785         Implement basic transform animation with clutter ac backend.
2786         GraphicsLayerClutter is almost same with GraphicsLayerCA. And PlatformClutterAnimation
2787         interfaces are also similar with PlatformCAAnimation, but they are implemented
2788         with native clutter APIs. Clutter backend AC supports a basic single transform animation
2789         with this patch now, but additive animation combination and keyframe animation
2790         are not supported yet.
2791
2792         Covered by existing animation tests.
2793
2794         * platform/graphics/clutter/GraphicsLayerActor.cpp:
2795         (graphicsLayerActorSetTransform):
2796         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2797         (WebCore::isTransformTypeTransformationMatrix):
2798         (WebCore):
2799         (WebCore::isTransformTypeFloatPoint3D):
2800         (WebCore::isTransformTypeNumber):
2801         (WebCore::getTransformFunctionValue):
2802         (WebCore::getValueFunctionNameForTransformOperation):
2803         (WebCore::GraphicsLayerClutter::setTransformAnimationEndpoints):
2804         (WebCore::GraphicsLayerClutter::appendToUncommittedAnimations):
2805         (WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
2806         * platform/graphics/clutter/GraphicsLayerClutter.h:
2807         (GraphicsLayerClutter):
2808         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
2809         (WebCore::toClutterActorPropertyString):
2810         (WebCore):
2811         (WebCore::PlatformClutterAnimation::supportsValueFunction):
2812         (WebCore::PlatformClutterAnimation::duration):
2813         (WebCore::PlatformClutterAnimation::setDuration):
2814         (WebCore::PlatformClutterAnimation::setAdditive):
2815         (WebCore::PlatformClutterAnimation::valueFunction):
2816         (WebCore::PlatformClutterAnimation::setValueFunction):
2817         (WebCore::PlatformClutterAnimation::setFromValue):
2818         (WebCore::PlatformClutterAnimation::setToValue):
2819         (WebCore::PlatformClutterAnimation::timeline):
2820         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
2821         (WebCore::PlatformClutterAnimation::addOpacityTransition):
2822         (WebCore::PlatformClutterAnimation::addTransformTransition):
2823         (WebCore::PlatformClutterAnimation::addAnimationForKey):
2824         * platform/graphics/clutter/PlatformClutterAnimation.h:
2825         (PlatformClutterAnimation):
2826
2827 2013-02-13  Ilya Tikhonovsky  <loislo@chromium.org>
2828
2829         Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
2830         https://bugs.webkit.org/show_bug.cgi?id=109554
2831
2832         In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
2833         can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
2834
2835         Drive by fix: I introduced a client interface for the HeapGraphSerializer.
2836         It helps me to do the tests for the serializer.
2837
2838         Reviewed by Yury Semikhatsky.
2839
2840         It is covered by newly added tests in TestWebKitAPI.
2841
2842         * inspector/HeapGraphSerializer.cpp:
2843         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
2844         (WebCore::HeapGraphSerializer::pushUpdate):
2845         (WebCore::HeapGraphSerializer::reportNode):
2846         (WebCore::HeapGraphSerializer::toNodeId):
2847         (WebCore::HeapGraphSerializer::addRootNode):
2848         * inspector/HeapGraphSerializer.h:
2849         (HeapGraphSerializer):
2850         (Client):
2851         (WebCore::HeapGraphSerializer::Client::~Client):
2852         * inspector/InspectorMemoryAgent.cpp:
2853         (WebCore):
2854         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
2855
2856 2013-02-13  Yury Semikhatsky  <yurys@chromium.org>
2857
2858         Web Inspector: add experimental native heap graph to Timeline panel
2859         https://bugs.webkit.org/show_bug.cgi?id=109687
2860
2861         Reviewed by Alexander Pavlov.
2862
2863         Added experimentatl support for native heap graph on the Timeline panel.
2864         Native memory usage data is collected after each top level task and can
2865         be displayed instead of DOM counters graph on the Timeline panel if
2866         corresponding experiment is enabled in the inspector settings.
2867
2868         * inspector/Inspector.json:
2869         * inspector/InspectorController.cpp:
2870         (WebCore::InspectorController::InspectorController):
2871         * inspector/InspectorTimelineAgent.cpp:
2872         (TimelineAgentState):
2873         (WebCore::InspectorTimelineAgent::setIncludeDomCounters):
2874         (WebCore):
2875         (WebCore::InspectorTimelineAgent::setIncludeNativeMemoryStatistics):
2876         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
2877         (WebCore::InspectorTimelineAgent::setDOMCounters):
2878         (WebCore::InspectorTimelineAgent::setNativeHeapStatistics):
2879         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
2880         * inspector/InspectorTimelineAgent.h:
2881         (WebCore):
2882         (WebCore::InspectorTimelineAgent::create):
2883         (InspectorTimelineAgent):
2884         * inspector/WorkerInspectorController.cpp:
2885         (WebCore::WorkerInspectorController::WorkerInspectorController):
2886         * inspector/front-end/MemoryStatistics.js:
2887         (WebInspector.MemoryStatistics):
2888         * inspector/front-end/NativeMemoryGraph.js:
2889         (WebInspector.NativeMemoryGraph):
2890         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
2891         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
2892         * inspector/front-end/Settings.js:
2893         (WebInspector.ExperimentsSettings):
2894         * inspector/front-end/TimelinePanel.js:
2895
2896 2013-02-13  Vladislav Kaznacheev  <kaznacheev@chromium.org>
2897
2898         Web Inspector: Fixed colorpicker editing and scrolling.
2899         https://bugs.webkit.org/show_bug.cgi?id=109434.
2900
2901         Reviewed by Alexander Pavlov.
2902
2903         The color picker scrolling logic relied on the fixed DOM structure which changed with the introduction of
2904         SidebarPaneStack (https://bugs.webkit.org/show_bug.cgi?id=108183).
2905         Added a special CSS class to mark the scroll target.
2906
2907         No new tests.
2908
2909         * inspector/front-end/SplitView.js:
2910         (WebInspector.SplitView):
2911         * inspector/front-end/StylesSidebarPane.js:
2912         (WebInspector.StylePropertyTreeElement.prototype.updateTitle.):
2913         * inspector/front-end/TabbedPane.js:
2914         (WebInspector.TabbedPane):
2915  
2916 2013-02-13  Andrey Lushnikov  <lushnikov@chromium.org>
2917
2918         Web Inspector: fix js compilation warnings in TextPrompt
2919         https://bugs.webkit.org/show_bug.cgi?id=109685
2920
2921         Reviewed by Alexander Pavlov.
2922
2923         Mark last argument of _applySuggestion function as optional.
2924
2925         No new tests: no change in behaviour.
2926
2927         * inspector/front-end/TextPrompt.js:
2928
2929 2013-02-13  Pablo Flouret  <pablof@motorola.com>
2930
2931         Implement css-conditional's CSS.supports()
2932         https://bugs.webkit.org/show_bug.cgi?id=100324
2933
2934         Reviewed by Antti Koivisto.
2935
2936         http://dev.w3.org/csswg/css3-conditional/#the-css-interface
2937
2938         The supports() method provides the css @supports rule's corresponding
2939         dom api.
2940         The patch also adds the CSS interface on DOMWindow, which holds "useful
2941         CSS-related functions that do not belong elsewhere". This is where
2942         supports() lives.
2943
2944         Test: css3/supports-dom-api.html
2945
2946         * CMakeLists.txt:
2947         * DerivedSources.cpp:
2948         * DerivedSources.make:
2949         * DerivedSources.pri:
2950         * GNUmakefile.list.am:
2951         * Target.pri:
2952         * WebCore.exp.in:
2953         * WebCore.gypi:
2954         * WebCore.vcproj/WebCore.vcproj:
2955         * WebCore.xcodeproj/project.pbxproj:
2956         * bindings/gobject/GNUmakefile.am:
2957         * bindings/scripts/CodeGeneratorGObject.pm:
2958         (SkipFunction):
2959             Add DOMWindowCSS.* to the build systems.
2960
2961         * bindings/scripts/CodeGenerator.pm:
2962         (WK_lcfirst):
2963             Handle CSS prefixes correctly (s/cSS/css/).
2964
2965         * css/CSSGrammar.y.in:
2966         * css/CSSParser.cpp:
2967         (WebCore::CSSParser::CSSParser):
2968         (WebCore::CSSParser::parseSupportsCondition):
2969         (WebCore::CSSParser::detectAtToken):
2970         * css/CSSParser.h:
2971             webkit_supports_condition parses just the condition part of an
2972             @supports rule and evaluates it, outputting whether the condition
2973             is supported or not.
2974
2975         * css/CSSAllInOne.cpp:
2976         * css/DOMWindowCSS.cpp: Added.
2977         * css/DOMWindowCSS.h: Added.
2978         * css/DOMWindowCSS.idl: Added.
2979             The CSS interface object.
2980
2981         * page/DOMWindow.cpp:
2982         (WebCore::DOMWindow::css):
2983         * page/DOMWindow.h:
2984         * page/DOMWindow.idl:
2985             window.CSS
2986
2987 2013-02-13  Vladislav Kaznacheev  <kaznacheev@chromium.org>
2988
2989         Web Inspector: Simplify SplitView to rely more on CSS
2990         https://bugs.webkit.org/show_bug.cgi?id=109426
2991
2992         Reviewed by Vsevolod Vlasov.
2993
2994         Simplified Javascript code by moving large part of the layout logic into CSS rules. The patch is larger than it
2995         should be because one of the clients (TimelinePanel) is breaking SplitView incapsulation by reparenting its
2996         resizer.
2997
2998         No new tests.
2999
3000         * inspector/front-end/SidebarView.js:
3001         (WebInspector.SidebarView):
3002         * inspector/front-end/SplitView.js:
3003         (WebInspector.SplitView):
3004         (WebInspector.SplitView.prototype._innerSetVertical):
3005         (WebInspector.SplitView.prototype.setSecondIsSidebar):
3006         (WebInspector.SplitView.prototype._showOnly):
3007         (WebInspector.SplitView.prototype._removeAllLayoutProperties):
3008         * inspector/front-end/TimelinePanel.js:
3009         * inspector/front-end/cssNamedFlows.css:
3010         (.css-named-flow-collections-view .split-view-sidebar):
3011         (.css-named-flow-collections-view .split-view-sidebar .sidebar-content):
3012         (.css-named-flow-collections-view .split-view-sidebar .selection):
3013         (.css-named-flow-collections-view .split-view-sidebar .named-flow-overflow::before, .css-named-flow-collections-view .region-empty:before, .css-named-flow-collections-view .region-fit::before, .css-named-flow-collections-view .region-overset::before):
3014         (.css-named-flow-collections-view .split-view-sidebar .named-flow-overflow::before):
3015         * inspector/front-end/splitView.css:
3016         (.split-view-contents.maximized):
3017         (.split-view-vertical .split-view-contents):
3018         (.split-view-vertical .split-view-contents-first):
3019         (.split-view-vertical .split-view-contents-first.maximized):
3020         (.split-view-vertical .split-view-contents-second):
3021         (.split-view-vertical .split-view-contents-second.maximized):
3022         (.split-view-horizontal .split-view-contents):
3023         (.split-view-horizontal .split-view-contents-first):
3024         (.split-view-horizontal .split-view-contents-first.maximized):
3025         (.split-view-horizontal .split-view-contents-second):
3026         (.split-view-horizontal .split-view-contents-second.maximized):
3027         (.split-view-vertical .split-view-sidebar.split-view-contents-first:not(.maximized)):
3028         (.split-view-vertical .split-view-sidebar.split-view-contents-second:not(.maximized)):
3029         (.split-view-horizontal .split-view-sidebar.split-view-contents-first:not(.maximized)):
3030         (.split-view-horizontal .split-view-sidebar.split-view-contents-second:not(.maximized)):
3031         (.split-view-vertical .split-view-resizer):
3032         (.split-view-horizontal .split-view-resizer):
3033         * inspector/front-end/timelinePanel.css:
3034         (.timeline.split-view-vertical .split-view-resizer):
3035         (#timeline-container .split-view-sidebar):
3036
3037 2013-02-13  Kentaro Hara  <haraken@chromium.org>
3038
3039         Unreviewed, rolling out r142730.
3040         http://trac.webkit.org/changeset/142730
3041         https://bugs.webkit.org/show_bug.cgi?id=109666
3042
3043         chromium browser tests are failing
3044
3045         * bindings/scripts/CodeGeneratorV8.pm:
3046         (GenerateNormalAttrGetter):
3047         (GenerateNormalAttrSetter):
3048         (GenerateSingleBatchedAttribute):
3049         (GenerateImplementation):
3050         * bindings/scripts/test/V8/V8TestInterface.cpp:
3051         (TestInterfaceV8Internal):
3052         (WebCore):
3053         * bindings/scripts/test/V8/V8TestObj.cpp:
3054         (WebCore):
3055
3056 2013-02-13  Tamas Czene  <tczene@inf.u-szeged.hu>
3057
3058         OpenCL implementation of Flood SVG filters.
3059         https://bugs.webkit.org/show_bug.cgi?id=109580
3060
3061         Reviewed by Zoltan Herczeg.
3062
3063         * Target.pri:
3064         * platform/graphics/filters/FEFlood.h:
3065         (FEFlood):
3066         * platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
3067         (WebCore):
3068         (WebCore::PROGRAM_STR):
3069         (WebCore::FilterContextOpenCL::compileFill):
3070         (WebCore::FilterContextOpenCL::fill):
3071         * platform/graphics/gpu/opencl/FilterContextOpenCL.h:
3072         (WebCore::FilterContextOpenCL::FilterContextOpenCL):
3073         (FilterContextOpenCL):
3074         * platform/graphics/gpu/opencl/OpenCLFEFlood.cpp: Added.
3075         (WebCore):
3076         (WebCore::FEFlood::platformApplyOpenCL):
3077
3078 2013-02-13  Mike West  <mkwst@chromium.org>
3079
3080         location.href does not throw SECURITY_ERR when accessed across origins with JSC bindings
3081         https://bugs.webkit.org/show_bug.cgi?id=43891
3082
3083         Reviewed by Adam Barth.
3084
3085         Other browsers (IE, Firefox, and Opera) throw an exception when accessing
3086         properties of a Location object across origins, as the spec suggests[1].
3087         WebKit is currently the outlier.
3088
3089         This has a few negative effects: developers are forced to hack around
3090         access violations in two ways rather than having a single code path, and
3091         (more annoyingly) developers are unable to avoid generating the error
3092         message. See every ad on the internet for the effect on the console. :)
3093
3094         This patch adds a SECURITY_ERR exception to these access violations,
3095         which is the first step towards getting rid of the console spam. Getting
3096         rid of the message entirely will require a solution to
3097         http://wkbug.com/98050.
3098
3099         A fairly inconclusive thread[2] on webkit-dev popped up in 2010 and
3100         trailed off without reaching conclusion. A more recent thread reached
3101         agreement that this patch seems like a reasonable thing to do[3].
3102
3103         This is the JSC half of the patch. V8 is coming in http://wkbug.com/43892
3104
3105         [1]: http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#security-location
3106         [2]: https://lists.webkit.org/pipermail/webkit-dev/2010-August/013880.html
3107         [2]: https://lists.webkit.org/pipermail/webkit-dev/2012-February/023636.html
3108
3109         * bindings/js/JSLocationCustom.cpp:
3110         (WebCore::JSLocation::getOwnPropertySlotDelegate):
3111
3112 2013-02-13  Andrew Wilson  <atwilson@chromium.org>
3113
3114         Unreviewed Chromium gyp-file cleanup after glib backend removal.
3115         https://bugs.webkit.org/show_bug.cgi?id=109672
3116
3117         Removed references to GLib unicode backend:
3118
3119         * WebCore.gypi:
3120
3121 2013-02-12  Kentaro Hara  <haraken@chromium.org>
3122
3123         [V8] Generate wrapper methods for custom getters/setters
3124         https://bugs.webkit.org/show_bug.cgi?id=109666
3125
3126         Reviewed by Adam Barth.
3127
3128         Currently V8 directly calls back custom getters/setters written
3129         in custom binding files. This makes it impossible for code generators
3130         to hook custom getters/setters (e.g. Code generators cannot insert a code
3131         for FeatureObservation into custom getters/setters). We should generate
3132         wrapper methods for custom getters/setters.
3133
3134         In the future, I will insert TRACE_EVENT() macros into these wrapper methods
3135         to profile DOM getters/setters/methods.
3136
3137         * bindings/scripts/CodeGeneratorV8.pm:
3138         (GenerateNormalAttrGetter):
3139         (GenerateNormalAttrSetter):
3140         (GenerateSingleBatchedAttribute):
3141         (GenerateImplementation):
3142         * bindings/scripts/test/V8/V8TestInterface.cpp:
3143         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
3144         (TestInterfaceV8Internal):
3145         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
3146         (WebCore):
3147         * bindings/scripts/test/V8/V8TestObj.cpp:
3148         (WebCore::TestObjV8Internal::customAttrAttrGetter):
3149         (TestObjV8Internal):
3150         (WebCore::TestObjV8Internal::customAttrAttrSetter):
3151         (WebCore):
3152
3153 2013-02-13  Sheriff Bot  <webkit.review.bot@gmail.com>
3154
3155         Unreviewed, rolling out r142611.
3156         http://trac.webkit.org/changeset/142611
3157         https://bugs.webkit.org/show_bug.cgi?id=109668
3158
3159         Suggest box is not shown anymore when user types "window." in
3160         inspector console. (Requested by vsevik on #webkit).
3161
3162         * inspector/front-end/TextPrompt.js:
3163         (WebInspector.TextPrompt.prototype.complete):
3164
3165 2013-02-13  Kentaro Hara  <haraken@chromium.org>
3166
3167         [V8] There is no XXXConstructor that requires a custom getter
3168         https://bugs.webkit.org/show_bug.cgi?id=109667
3169
3170         Reviewed by Adam Barth.
3171
3172         Currently '[Custom] attribute XXXConstructor xxx' generates
3173         XXXAttrGetter(). However, there is no XXXConstructor with [Custom].
3174         In addition, it does make no sense to generate XXXAttrGetter() for such cases.
3175         We can remove the logic from CodeGeneratorV8.pm.
3176
3177         * bindings/scripts/CodeGeneratorV8.pm:
3178         (GenerateSingleBatchedAttribute):
3179
3180 2013-02-12  Hajime Morrita  <morrita@google.com>
3181
3182         [Internals] setShadowDOMEnabled() shouldn't be used except a few tests.
3183         https://bugs.webkit.org/show_bug.cgi?id=109642
3184
3185         Reviewed by Kent Tamura.
3186
3187         InternalSettings.setShadowDOMEnabled() shouldn't be called after
3188         any relevant DOM bindings are touched. However for fuzzers, it
3189         isn't trivial to regulate its behavior.
3190
3191         This change whitelists the URL of running test for prevent
3192         unintended API calls. This doesn't hurt the Internals usability
3193         since the API is called from just a couple of tests and the number
3194         isn't expected to grow.
3195
3196         Test: fast/dom/shadow/shadow-dom-enabled-flag-whitelist.html
3197
3198         * testing/InternalSettings.cpp:
3199         (WebCore::urlIsWhitelisted):
3200         (WebCore):
3201         (WebCore::InternalSettings::setShadowDOMEnabled):
3202
3203 2013-02-12  Vsevolod Vlasov  <vsevik@chromium.org>
3204
3205         Web Inspector: Introduce version controller to migrate settings versions.
3206         https://bugs.webkit.org/show_bug.cgi?id=109553
3207
3208         Reviewed by Yury Semikhatsky.
3209
3210         This patch introduces version controller that could be used to migrate inspector settings.
3211
3212         Test: inspector/version-controller.html
3213
3214         * inspector/front-end/Settings.js:
3215         (WebInspector.Settings):
3216         (WebInspector.VersionController):
3217         (WebInspector.VersionController.prototype.set _methodsToRunToUpdateVersion):
3218         (WebInspector.VersionController.prototype._updateVersionFrom0To1):
3219         * inspector/front-end/inspector.js:
3220
3221 2013-02-12  Martin Robinson  <mrobinson@igalia.com>
3222
3223         [GTK] Remove the GLib unicode backend
3224         https://bugs.webkit.org/show_bug.cgi?id=109627
3225
3226         Reviewed by Benjamin Poulain.
3227
3228         Remove references to the GLib unicode backend from WebCore.
3229
3230         * GNUmakefile.list.am: Update the source list.
3231         * platform/text/gtk/TextBreakIteratorGtk.cpp: Removed.
3232         * platform/text/gtk/TextCodecGtk.cpp: Removed.
3233         * platform/text/gtk/TextCodecGtk.h: Removed.
3234
3235 2013-02-12  Chris Fleizach  <cfleizach@apple.com>
3236
3237          AX: crash when accessing AccessibilityScrollbar after page has been unloaded
3238          https://bugs.webkit.org/show_bug.cgi?id=109524
3239
3240          Reviewed by Ryosuke Niwa.
3241
3242          AX clients can hold onto AccesibilityScrollbar references that reference parent
3243          AccessibilityScrollViews that have already gone away.
3244
3245          AccessibilityScrollView is not calling detachFromParent after it is removed, which
3246          leads to a crash. The fix is to clearChildren() when an object is deallocated.
3247
3248          I could not create a test because the crash only manifests over multiple page loads.
3249
3250          * accessibility/AccessibilityObject.cpp:
3251          (WebCore::AccessibilityObject::detach):
3252
3253 2013-02-12  Hayato Ito  <hayato@chromium.org>
3254
3255         Use FocusEvent.relatedTarget in {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator.
3256         https://bugs.webkit.org/show_bug.cgi?id=109650
3257
3258         Reviewed by Dimitri Glazkov.
3259
3260         Set FocusEvent.relatedTarget in its constructor so that each
3261         EventDispatchMediator can use FocusEvent.relatedTarget rather than
3262         its redundant m_{old,new}FocusedNode member variable.
3263
3264         I've also removed FIXME comments, mentioning bug 109261, since I
3265         can not reproduce the issue.
3266
3267         No new tests. No change in functionality.
3268
3269         * dom/FocusEvent.cpp:
3270         (WebCore::FocusEventDispatchMediator::create):
3271         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
3272         (WebCore::FocusEventDispatchMediator::dispatchEvent):
3273         (WebCore::BlurEventDispatchMediator::create):
3274         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
3275         (WebCore::BlurEventDispatchMediator::dispatchEvent):
3276         (WebCore::FocusInEventDispatchMediator::create):
3277         (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
3278         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
3279         (WebCore::FocusOutEventDispatchMediator::create):
3280         (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
3281         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
3282         * dom/FocusEvent.h:
3283         (FocusEventDispatchMediator):
3284         (BlurEventDispatchMediator):
3285         (FocusInEventDispatchMediator):
3286         (FocusOutEventDispatchMediator):
3287         * dom/Node.cpp:
3288         (WebCore::Node::dispatchFocusInEvent):
3289         (WebCore::Node::dispatchFocusOutEvent):
3290         (WebCore::Node::dispatchFocusEvent):
3291         (WebCore::Node::dispatchBlurEvent):
3292
3293 2013-02-12  Takashi Sakamoto  <tasak@google.com>
3294
3295         [Refactoring] Make SelectorChecker::mode a constructor parameter.
3296         https://bugs.webkit.org/show_bug.cgi?id=109653
3297
3298         Reviewed by Dimitri Glazkov.
3299
3300         No new tests, because just refactoring.
3301
3302         * css/SelectorChecker.cpp:
3303         (WebCore::SelectorChecker::SelectorChecker):
3304         Made mode a constructor parameter.
3305         * css/SelectorChecker.h:
3306         Removed setMode.
3307         (SelectorChecker):
3308         * css/StyleResolver.cpp:
3309         (WebCore::StyleResolver::ruleMatches):
3310         (WebCore::StyleResolver::checkRegionSelector):
3311         * dom/SelectorQuery.cpp:
3312         (WebCore::SelectorQuery::matches):
3313         (WebCore::SelectorQuery::queryAll):
3314         (WebCore::SelectorQuery::queryFirst):
3315         * html/shadow/ContentSelectorQuery.cpp:
3316         (WebCore::ContentSelectorChecker::ContentSelectorChecker):
3317
3318 2013-02-12  Andreas Kling  <akling@apple.com>
3319
3320         Remove Element::ensureAttributeData().
3321         <http://webkit.org/b/109643>
3322
3323         Reviewed by Anders Carlsson.
3324
3325         * dom/Element.h:
3326         * dom/Element.cpp:
3327         (WebCore::Element::classAttributeChanged):
3328         (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
3329
3330             Use attributeData() instead of ensureAttributeData(), it's already guaranteed to exist in
3331             both these functions as they are called in response to attribute changes.
3332
3333         * svg/SVGElement.h:
3334         (WebCore::SVGElement::invalidateSVGAttributes):
3335
3336             Use mutableAttributeData() instead of ensureAttributeData() when invalidating animated
3337             SVG attributes. While I can't find any bugs caused by this, an element with property animations
3338             shouldn't share attribute data with other elements.
3339
3340 2013-02-12  Hayato Ito  <hayato@chromium.org>
3341
3342         Make {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator type safe.
3343         https://bugs.webkit.org/show_bug.cgi?id=109561
3344
3345         Reviewed by Dimitri Glazkov.
3346
3347         Use FocusEvent rather than Event in {FocusIn,FocusOut,Focus,Blur}EventDispatchMediator.
3348
3349         No new tests. No change in functionality.
3350
3351         * dom/FocusEvent.cpp:
3352         (WebCore::FocusEventDispatchMediator::create):
3353         (WebCore::FocusEventDispatchMediator::FocusEventDispatchMediator):
3354         (WebCore::BlurEventDispatchMediator::create):
3355         (WebCore::BlurEventDispatchMediator::BlurEventDispatchMediator):
3356         (WebCore::FocusInEventDispatchMediator::create):
3357         (WebCore::FocusInEventDispatchMediator::FocusInEventDispatchMediator):
3358         (WebCore::FocusOutEventDispatchMediator::create):
3359         (WebCore::FocusOutEventDispatchMediator::FocusOutEventDispatchMediator):
3360         * dom/FocusEvent.h:
3361         (FocusEventDispatchMediator):
3362         (WebCore::FocusEventDispatchMediator::event):
3363         (BlurEventDispatchMediator):
3364         (WebCore::BlurEventDispatchMediator::event):
3365         (FocusInEventDispatchMediator):
3366         (WebCore::FocusInEventDispatchMediator::event):
3367         (FocusOutEventDispatchMediator):
3368         (WebCore::FocusOutEventDispatchMediator::event):
3369
3370 2013-02-12  Eric Seidel  <eric@webkit.org>
3371
3372         Fix HTMLToken::Attribute member naming and update callsites to use Vector-based String functions
3373         https://bugs.webkit.org/show_bug.cgi?id=109638
3374
3375         Reviewed by Adam Barth.
3376
3377         Darin Adler noted in:
3378         https://bugs.webkit.org/show_bug.cgi?id=109408#c4
3379         that HTMLToken::Attribute (then MarkupTokenBase::Attribute)
3380         was a struct, yet incorrectly used m_ for its public members.
3381
3382         This patch fixes the members to not have the m_, and since I was
3383         touching all callers, I also updated all callers to use modern
3384         Vector-based String creation/append functions instead of manually
3385         calling UChar*, size_t versions.
3386
3387         There should be no behavior change to this patch.  Where I saw
3388         performance/memory bugs, I noted them with FIXMEs to keep
3389         this change simple.
3390
3391         * html/HTMLViewSourceDocument.cpp:
3392         (WebCore::HTMLViewSourceDocument::processTagToken):
3393         * html/parser/AtomicHTMLToken.h:
3394         (WebCore::AtomicHTMLToken::publicIdentifier):
3395         (WebCore::AtomicHTMLToken::systemIdentifier):
3396         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
3397         (WebCore::AtomicHTMLToken::initializeAttributes):
3398         * html/parser/CompactHTMLToken.cpp:
3399         (WebCore::CompactHTMLToken::CompactHTMLToken):
3400         * html/parser/HTMLMetaCharsetParser.cpp:
3401         (WebCore::HTMLMetaCharsetParser::processMeta):
3402         (WebCore::HTMLMetaCharsetParser::checkForMetaCharset):
3403         * html/parser/HTMLPreloadScanner.cpp:
3404         (WebCore::StartTagScanner::processAttributes):
3405         (WebCore::HTMLPreloadScanner::scan):
3406         (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
3407         (WebCore::HTMLPreloadScanner::processToken):
3408         * html/parser/HTMLToken.h:
3409         (Range):
3410         (Attribute):
3411         (WebCore::HTMLToken::clear):
3412         (WebCore::HTMLToken::startIndex):
3413         (WebCore::HTMLToken::endIndex):
3414         (WebCore::HTMLToken::end):
3415         (WebCore::HTMLToken::nameString):
3416         (WebCore::HTMLToken::addNewAttribute):
3417         (WebCore::HTMLToken::beginAttributeName):
3418         (WebCore::HTMLToken::endAttributeName):
3419         (WebCore::HTMLToken::beginAttributeValue):
3420         (WebCore::HTMLToken::endAttributeValue):
3421         (WebCore::HTMLToken::appendToAttributeName):
3422         (WebCore::HTMLToken::appendToAttributeValue):
3423         (WebCore::HTMLToken::eraseValueOfAttribute):
3424         * html/parser/HTMLTokenizer.cpp:
3425         (WebCore::AtomicHTMLToken::nameForAttribute):
3426         * html/parser/HTMLViewSourceParser.cpp:
3427         (WebCore::HTMLViewSourceParser::updateTokenizerState):
3428         * html/parser/XSSAuditor.cpp:
3429         (WebCore::findAttributeWithName):
3430         (WebCore::XSSAuditor::filterParamToken):
3431         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
3432         (WebCore::XSSAuditor::eraseAttributeIfInjected):
3433         (WebCore::XSSAuditor::decodedSnippetForAttribute):
3434
3435 2013-02-12  Ryosuke Niwa  <rniwa@webkit.org>
3436
3437         Build fix.
3438
3439         * editing/Editor.h:
3440         (WebCore::Editor::avoidIntersectionWithDeleteButtonController):
3441
3442 2013-02-12  Nate Chapin  <japhet@chromium.org>
3443
3444         REGRESSION: Reloading a local file doesn't pick up changes
3445         https://bugs.webkit.org/show_bug.cgi?id=109344
3446
3447         Reviewed by Alexey Proskuryakov.
3448
3449         Test: http/tests/cache/reload-main-resource.php
3450
3451         * loader/cache/CachedResource.cpp:
3452         (WebCore::CachedResource::load):
3453         * loader/cache/CachedResourceLoader.cpp:
3454         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
3455         (WebCore::CachedResourceLoader::cachePolicy): Don't use subresourceCachePolicy()
3456             for main resources.
3457         * loader/cache/CachedResourceLoader.h:
3458         (CachedResourceLoader):
3459
3460 2013-02-12  Ryosuke Niwa  <rniwa@webkit.org>
3461
3462         Turn avoidIntersectionWithNode into Editor member functions to encapsulate delete button controller
3463         https://bugs.webkit.org/show_bug.cgi?id=109549
3464
3465         Reviewed by Tony Chang.
3466
3467         Renamed avoidIntersectionWithNode to Editor::avoidIntersectionWithDeleteButtonController and added trivial
3468         implementations when delete button controllers are disabled (ENABLE_DELETION_UI is 0).
3469
3470         * editing/DeleteButtonController.cpp:
3471         * editing/EditCommand.cpp:
3472         (WebCore::EditCommand::EditCommand):
3473         * editing/Editor.cpp:
3474         (WebCore::Editor::avoidIntersectionWithDeleteButtonController): Moved from htmlediting.cpp and renamed.
3475         The version that takes VisibleSelection has been updated to use updatePositionForNodeRemoval to share
3476         mode code with that function.
3477         (WebCore::Editor::rangeForPoint):
3478         * editing/Editor.h:
3479         (WebCore::Editor::avoidIntersectionWithDeleteButtonController): Added; trivial implementations.
3480         * editing/htmlediting.cpp:
3481         * editing/htmlediting.h:
3482         * editing/markup.cpp:
3483         (WebCore::createMarkupInternal): Extracted from createMarkup.
3484         (WebCore::createMarkup):
3485
3486 2013-02-12  Joseph Pecoraro  <pecoraro@apple.com>
3487
3488         [iOS] Enable PAGE_VISIBILITY_API
3489         https://bugs.webkit.org/show_bug.cgi?id=109399
3490
3491         Reviewed by David Kilzer.
3492
3493         * Configurations/FeatureDefines.xcconfig:
3494
3495 2013-02-12  Andreas Kling  <akling@apple.com>
3496
3497         Move ElementAttributeData into Element.cpp/h
3498         <http://webkit.org/b/109610>
3499
3500         Reviewed by Anders Carlsson.
3501
3502         Removed ElementAttributeData.cpp/h and moved the class itself into Element headquarters.
3503         In the near future, Element should be the only client of this class, and thus it won't
3504         be necessary for other classes to know anything about it.
3505
3506         * dom/ElementAttributeData.cpp: Removed.
3507         * dom/ElementAttributeData.h: Removed.
3508         * CMakeLists.txt:
3509         * GNUmakefile.list.am:
3510         * Target.pri:
3511         * WebCore.gypi:
3512         * WebCore.xcodeproj/project.pbxproj:
3513         * dom/DOMAllInOne.cpp:
3514         * dom/DocumentSharedObjectPool.cpp:
3515         * dom/Element.cpp:
3516         * dom/Element.h:
3517         * workers/SharedWorker.cpp:
3518         * Modules/webdatabase/DatabaseManager.cpp: Add ExceptionCode.h since Element.h doesn't pull it in anymore.
3519
3520 2013-02-12  Simon Fraser  <simon.fraser@apple.com>
3521
3522         Crash when scrolling soon after page starts loading
3523         https://bugs.webkit.org/show_bug.cgi?id=109631
3524         <rdar://problem/13157533&13159627&13196727>
3525         
3526         Reviewed by Anders Carlsson.
3527         
3528         Make the scrolling tree more robust when the root state node,
3529         and/or scrolling node are null. This can happen if we try to
3530         handle a wheel event before we've done the first scrolling
3531         tree commit.
3532
3533         * page/scrolling/ScrollingStateTree.cpp:
3534         (WebCore::ScrollingStateTree::commit): Handle the case where
3535         m_rootStateNode is null. We'll still commit, but the state tree
3536         will have no state nodes.
3537         * page/scrolling/ScrollingTree.cpp:
3538         (WebCore::ScrollingTree::handleWheelEvent): Null-check m_rootNode.
3539         (WebCore::ScrollingTree::commitNewTreeState): Handle a null root node.
3540         (WebCore::ScrollingTree::updateTreeFromStateNode): If the rood state node
3541         is null, just clear the map and null out the root scrolling node.
3542         * page/scrolling/ScrollingTree.h: m_debugInfoLayer was unused.
3543         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3544         (WebCore::ScrollingCoordinatorMac::ensureRootStateNodeForFrameView): It may be possible
3545         to get here before we've registered the root scroll layer, in which case scrollLayerID()
3546         will be 0. Assert to see if this can ever happen.
3547         (WebCore::ScrollingCoordinatorMac::scrollingStateTreeAsText): Handle case of rootStateNode()
3548         being null.
3549
3550 2013-02-12  Raymond Toy  <rtoy@google.com>
3551
3552         Synchronize setting of panner node model and processing
3553         https://bugs.webkit.org/show_bug.cgi?id=109599
3554
3555         Reviewed by Chris Rogers.
3556
3557         No new tests.
3558
3559         * Modules/webaudio/PannerNode.cpp:
3560         (WebCore::PannerNode::process):
3561         (WebCore::PannerNode::setPanningModel):
3562         * Modules/webaudio/PannerNode.h:
3563
3564 2013-02-12  Dean Jackson  <dino@apple.com>
3565
3566         Add class name for snapshotted plugin based on dimensions
3567         https://bugs.webkit.org/show_bug.cgi?id=108369
3568
3569         Reviewed by Simon Fraser.
3570
3571         As the size of the plugin changes, the Shadow Root for the snapshot
3572         might want to toggle different interfaces. Expose "tiny", "small",
3573         "medium" and "large" classes on the Shadow. (The dimensions are
3574         currently chosen fairly arbitrarily).
3575
3576         Because we only know the dimensions after layout, we set up
3577         a post layout task to add the class. Luckily there already was
3578         a post layout task for plugins - I just updated it to handle
3579         both real and snapshotted plugins. This involved modifying
3580         the list of RenderEmbeddedObjects in FrameView to take generic
3581         RenderObjects, and decide which type they are when calling
3582         the update method.
3583
3584         * html/HTMLPlugInImageElement.cpp: Some new dimensions for the various size thresholds.
3585         (WebCore::classNameForShadowRootSize): New static function that returns a class name
3586             after examining the size of the object.
3587         (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Sets the class name for
3588             the shadow root. This is called in the post layout task.
3589         (WebCore::shouldPlugInShowLabelAutomatically): Use new size names.
3590         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Ditto.
3591         * html/HTMLPlugInImageElement.h:
3592         (HTMLPlugInImageElement): New method updateSnapshotInfo.
3593
3594         * page/FrameView.cpp:
3595         (WebCore::FrameView::addWidgetToUpdate): Change RenderEmbeddedObject* to RenderObject*.
3596         (WebCore::FrameView::removeWidgetToUpdate): Ditto
3597         (WebCore::FrameView::updateWidget): Branch based on EmbeddedObject vs SnapshottedPlugIn. Call
3598             plugin snapshot update if necessary.
3599         (WebCore::FrameView::updateWidgets): Handle both EmbeddedObject and SnapshottedPlugIn cases.
3600         * page/FrameView.h: Change RenderEmbeddedObject* to RenderObject* for post layout widget updates.
3601
3602         * rendering/RenderSnapshottedPlugIn.cpp:
3603         (WebCore::RenderSnapshottedPlugIn::layout): New virtual override. If size has changed, ask the
3604             FrameView to recalculate size after layout.
3605         * rendering/RenderSnapshottedPlugIn.h: New layout() method.
3606
3607 2013-02-12  Mike West  <mkwst@chromium.org>
3608
3609         Implement script MIME restrictions for X-Content-Type-Options: nosniff
3610         https://bugs.webkit.org/show_bug.cgi?id=71851
3611
3612         Reviewed by Adam Barth.
3613
3614         This patch adds support for 'X-Content-Type-Options: nosniff' when
3615         deciding whether or not to execute a given chunk of JavaScript. If the
3616         header is present, script will only execute if it matches a predefined
3617         set of MIME types[1] that are deemed "executable". Scripts served with
3618         types that don't match the list will not execute.
3619
3620         IE introduced this feature, and Gecko is working on an implementation[2]
3621         now. There's been some discussion on the WHATWG list about formalizing
3622         the specification for this feature[3], but nothing significant has been
3623         decided.
3624
3625         This implementation's list of acceptible MIME types differs from IE's:
3626         it matches the list of supported JavaScript MIME types defined in
3627         MIMETypeRegistry::initializeSupportedJavaScriptMIMETypes()[4]. In
3628         particular, the VBScript types are not accepted, and
3629         'text/javascript1.{1,2,3}' are accepted, along with 'text/livescript'.
3630
3631         This feature is locked tightly behind the ENABLE_NOSNIFF flag, which is
3632         currently only enabled on the Chromium port.
3633
3634         [1]: http://msdn.microsoft.com/en-us/library/gg622941(v=vs.85).aspx
3635         [2]: https://bugzilla.mozilla.org/show_bug.cgi?id=471020
3636         [3]: http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2012-November/037974.html
3637         [4]: http://trac.webkit.org/browser/trunk/Source/WebCore/platform/MIMETypeRegistry.cpp?rev=142086#L307
3638
3639         Tests: http/tests/security/contentTypeOptions/invalid-content-type-options-allowed.html
3640                http/tests/security/contentTypeOptions/nosniff-script-allowed.html
3641                http/tests/security/contentTypeOptions/nosniff-script-blocked.html
3642                http/tests/security/contentTypeOptions/nosniff-script-without-content-type-allowed.html
3643
3644         * dom/ScriptElement.cpp:
3645         (WebCore::ScriptElement::executeScript):
3646             Before executing script, ensure that it shouldn't be blocked due to
3647             its MIME type. If it is blocked, write an error message to the
3648             console.
3649         * loader/cache/CachedScript.cpp:
3650         (WebCore::CachedScript::mimeType):
3651             Make scripts' MIME type available outside the context of
3652             CachedScript in order to correctly populate error messages we write
3653             to the console in ScriptElement::executeScript
3654         (WebCore):
3655         (WebCore::CachedScript::mimeTypeAllowedByNosniff):
3656         * loader/cache/CachedScript.h:
3657         (CachedScript):
3658             A new method which checks the resource's HTTP headers to set the
3659             'nosniff' disposition, and compares the resource's MIME type against
3660             the list of allowed executable types. Returns true iff the script
3661             is allowed.
3662         * platform/network/HTTPParsers.cpp:
3663         (WebCore):
3664         (WebCore::parseContentTypeOptionsHeader):
3665         * platform/network/HTTPParsers.h:
3666             Adds a new enum which relates the sniffable status of the resource,
3667             and a method to parse the HTTP header.
3668
3669 2013-02-12  Adam Barth  <abarth@webkit.org>
3670
3671         Threaded HTML parser should pass the remaining fast/tokenizer tests
3672         https://bugs.webkit.org/show_bug.cgi?id=109607
3673
3674         Reviewed by Eric Seidel.
3675
3676         This patch fixes some edge cases involving document.write. Previously,
3677         we would drop input characters on the floor if the tokenizer wasn't
3678         able to consume them synchronously. In this patch, we send the unparsed
3679         characters to the background thread for consumption after rewinding the
3680         input stream.
3681
3682         * html/parser/BackgroundHTMLInputStream.cpp:
3683         (WebCore::BackgroundHTMLInputStream::rewindTo):
3684         * html/parser/BackgroundHTMLInputStream.h:
3685         (BackgroundHTMLInputStream):
3686         * html/parser/BackgroundHTMLParser.cpp:
3687         (WebCore::BackgroundHTMLParser::resumeFrom):
3688         * html/parser/BackgroundHTMLParser.h:
3689         (Checkpoint):
3690         * html/parser/HTMLDocumentParser.cpp:
3691         (WebCore::HTMLDocumentParser::canTakeNextToken):
3692         (WebCore::HTMLDocumentParser::didFailSpeculation):
3693         (WebCore::HTMLDocumentParser::pumpTokenizer):
3694         (WebCore::HTMLDocumentParser::finish):
3695         * html/parser/HTMLInputStream.h:
3696         (WebCore::HTMLInputStream::closeWithoutMarkingEndOfFile):
3697         (HTMLInputStream):
3698
3699 2013-02-12  Csaba Osztrogon√°c  <ossy@webkit.org>
3700
3701         Unreviewed buildfix for !ENABLE(INSPECTOR) platforms after r142654.
3702
3703         * inspector/InspectorInstrumentation.h:
3704         (WebCore::InspectorInstrumentation::scriptsEnabled):
3705
3706 2013-02-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
3707
3708         Remove remaining traces of Web Intents
3709         https://bugs.webkit.org/show_bug.cgi?id=109586
3710
3711         Reviewed by Eric Seidel.
3712
3713         Remove remaining traces of Web Intents as the functionality was
3714         removed in r142549.
3715
3716         No new tests, no behavior change for layout tests.
3717
3718         * GNUmakefile.features.am.in:
3719         * html/HTMLTagNames.in:
3720
3721 2013-02-12  Robert Hogan  <robert@webkit.org>
3722
3723         REGRESSION(r136967): Combination of float and clear yields to bad layout
3724         https://bugs.webkit.org/show_bug.cgi?id=109476
3725
3726         Reviewed by Levi Weintraub.
3727
3728         Test: fast/block/margin-collapse/self-collapsing-block-with-float-children.html
3729
3730         The change made at http://trac.webkit.org/changeset/136967 only needs to worry about the first floated
3731         child of a self-collapsing block. The ones that follow are not affected by its margins.
3732
3733         * rendering/RenderBlockLineLayout.cpp:
3734         (WebCore::RenderBlock::LineBreaker::skipLeadingWhitespace):
3735
3736 2013-02-12  Levi Weintraub  <leviw@chromium.org>
3737
3738         ASSERTION FAILED: !object || object->isBox(), UNKNOWN in WebCore::RenderListItem::positionListMarker
3739         https://bugs.webkit.org/show_bug.cgi?id=108699
3740
3741         Reviewed by Abhishek Arya.
3742
3743         RenderListItems performs special management of its children to maintain list markers. Splitting a flow
3744         through a list item results in assumptions made inside RenderListItem failing, so for now, avoid splitting
3745         flows when inside one.
3746
3747         Test: fast/multicol/span/list-multi-column-crash.html
3748
3749         * rendering/RenderBlock.cpp:
3750         (WebCore::RenderBlock::containingColumnsBlock):
3751
3752 2013-02-12  Roger Fong  <roger_fong@apple.com>
3753
3754         Unreviewed Windows build fix.
3755
3756         * testing/Internals.cpp:
3757         (WebCore::Internals::resetToConsistentState):
3758         (WebCore::Internals::Internals):
3759
3760 2013-02-12  Vivek Galatage  <vivek.vg@samsung.com>
3761
3762         Web Inspector: JavaScript execution disabled by browser/UA should be notified to the front-end
3763         https://bugs.webkit.org/show_bug.cgi?id=109402
3764
3765         Reviewed by Yury Semikhatsky.
3766
3767         Whenever the UA/Browser changes the Script Execution state of a page, it should notify the
3768         inspector front-end. Added the InspectorInstrumentation method didScriptExecutionStateChange
3769         to achieve this. Also the state change triggered by the inspector should be ignored to avoid
3770         infinite loop.
3771
3772         Test: inspector/script-execution-state-change-notification.html
3773
3774         * inspector/Inspector.json:
3775         * inspector/InspectorInstrumentation.cpp:
3776         (WebCore):
3777         (WebCore::InspectorInstrumentation::scriptsEnabledImpl):
3778         * inspector/InspectorInstrumentation.h:
3779         (InspectorInstrumentation):
3780         (WebCore::InspectorInstrumentation::scriptsEnabled):
3781         (WebCore):
3782         * inspector/InspectorPageAgent.cpp:
3783         (WebCore::InspectorPageAgent::InspectorPageAgent):
3784         (WebCore::InspectorPageAgent::setScriptExecutionDisabled):
3785         (WebCore::InspectorPageAgent::scriptsEnabled):
3786         (WebCore):
3787         * inspector/InspectorPageAgent.h:
3788         (InspectorPageAgent):
3789         * inspector/front-end/ResourceTreeModel.js:
3790         (WebInspector.PageDispatcher.prototype.javascriptDialogClosed):
3791         (WebInspector.PageDispatcher.prototype.scriptsEnabled):
3792         * page/Settings.cpp:
3793         (WebCore::Settings::setScriptEnabled):
3794
3795 2013-02-12  Antti Koivisto  <antti@apple.com>
3796
3797         Cache timer heap pointer to timers
3798         https://bugs.webkit.org/show_bug.cgi?id=109597
3799
3800         Reviewed by Andreas Kling.
3801
3802         Accessing timer heap through thread global storage is slow (~0.1% in PLT3). We can cache the heap pointer to
3803         each TimerBase. There are not huge numbers of timers around so memory is not an issue and many timers are heavily reused.
3804
3805         * platform/Timer.cpp:
3806         (WebCore::threadGlobalTimerHeap):
3807         (WebCore::TimerHeapReference::operator=):
3808         (WebCore::TimerHeapIterator::checkConsistency):
3809         (WebCore::TimerBase::TimerBase):
3810         (WebCore::TimerBase::checkHeapIndex):
3811         (WebCore::TimerBase::setNextFireTime):
3812         * platform/Timer.h:
3813         (WebCore::TimerBase::timerHeap):
3814         (TimerBase):
3815
3816 2013-02-12  Adam Barth  <abarth@webkit.org>
3817
3818         BackgroundHTMLParser::resumeFrom should take a struct
3819         https://bugs.webkit.org/show_bug.cgi?id=109598
3820
3821         Reviewed by Eric Seidel.
3822
3823         This patch is purely a syntatic change that paves the way for fixing
3824         the partial-entity document.write tests. To fix those tests, we'll need
3825         to pass more information to resumeFrom, but we're hitting the argument
3826         limits in Functional.h. Rather than adding yet more arguments, this
3827         patch moves to a single argument that's a struct.
3828
3829         * html/parser/BackgroundHTMLParser.cpp:
3830         (WebCore::BackgroundHTMLParser::resumeFrom):
3831         * html/parser/BackgroundHTMLParser.h:
3832         (Checkpoint):
3833         (BackgroundHTMLParser):
3834         * html/parser/HTMLDocumentParser.cpp:
3835         (WebCore::HTMLDocumentParser::didFailSpeculation):
3836
3837 2013-02-12  Elliott Sprehn  <esprehn@chromium.org>
3838
3839         rootRenderer in FrameView is really RenderView
3840         https://bugs.webkit.org/show_bug.cgi?id=109510
3841
3842         Reviewed by Eric Seidel.
3843
3844         The global function rootRenderer(FrameView*) is really just a way
3845         to get the RenderView from the Frame so replace it with a renderView()
3846         method and replace usage of the word "root" with renderView so it's
3847         obvious the root we're talking about is the renderView. This is an
3848         important distinction to make since we also have rootRenderer in the code
3849         for the documentElement()'s renderer and we also have a "layout root" which
3850         is entirely different.
3851
3852         No new tests, just refactoring.
3853
3854         * page/FrameView.cpp:
3855         (WebCore::FrameView::rootRenderer): Removed.
3856         (WebCore::FrameView::setFrameRect):
3857         (WebCore::FrameView::adjustViewSize):
3858         (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
3859         (WebCore::FrameView::updateCompositingLayersAfterLayout):
3860         (WebCore::FrameView::clearBackingStores):
3861         (WebCore::FrameView::restoreBackingStores):
3862         (WebCore::FrameView::usesCompositedScrolling):
3863         (WebCore::FrameView::layerForHorizontalScrollbar):
3864         (WebCore::FrameView::layerForVerticalScrollbar):
3865         (WebCore::FrameView::layerForScrollCorner):
3866         (WebCore::FrameView::tiledBacking):
3867         (WebCore::FrameView::scrollLayerID):
3868         (WebCore::FrameView::layerForOverhangAreas):
3869         (WebCore::FrameView::flushCompositingStateForThisFrame):
3870         (WebCore::FrameView::hasCompositedContent):
3871         (WebCore::FrameView::enterCompositingMode):
3872         (WebCore::FrameView::isSoftwareRenderable):
3873         (WebCore::FrameView::didMoveOnscreen):
3874         (WebCore::FrameView::willMoveOffscreen):
3875         (WebCore::FrameView::layout):
3876         (WebCore::FrameView::embeddedContentBox):
3877         (WebCore::FrameView::contentsInCompositedLayer):
3878         (WebCore::FrameView::scrollContentsFastPath):
3879         (WebCore::FrameView::scrollContentsSlowPath):
3880         (WebCore::FrameView::maintainScrollPositionAtAnchor):
3881         (WebCore::FrameView::scrollPositionChanged):
3882         (WebCore::FrameView::repaintFixedElementsAfterScrolling):
3883         (WebCore::FrameView::updateFixedElementsAfterScrolling):
3884         (WebCore::FrameView::visibleContentsResized):
3885         (WebCore::FrameView::scheduleRelayoutOfSubtree):
3886         (WebCore::FrameView::needsLayout):
3887         (WebCore::FrameView::setNeedsLayout):
3888         (WebCore::FrameView::performPostLayoutTasks):
3889         (WebCore::FrameView::updateControlTints):
3890         (WebCore::FrameView::paintContents):
3891         (WebCore::FrameView::forceLayoutForPagination):
3892         (WebCore::FrameView::adjustPageHeightDeprecated):
3893         (WebCore::FrameView::resetTrackedRepaints):
3894         (WebCore::FrameView::isVerticalDocument):
3895         (WebCore::FrameView::isFlippedDocument):
3896         * page/FrameView.h:
3897         (WebCore::FrameView::renderView): Added.
3898
3899 2013-02-12  Tomas Popela  <tpopela@redhat.com>
3900
3901         [GTK][Introspection] GObject bindings for DataTransferItemList - one add() method must be removed from .idl
3902         https://bugs.webkit.org/show_bug.cgi?id=109180
3903
3904         Reviewed by Xan Lopez.
3905
3906         When compiling WebKit with --enable-introspection and generating GObject bindings
3907         for DataTransferItemList we must disable one add() method, because GObject is
3908         based on C and C does not allow two functions with the same name.
3909
3910         No tests needed.
3911
3912         * bindings/scripts/CodeGeneratorGObject.pm:
3913
3914 2013-02-12  Uday Kiran  <udaykiran@motorola.com>
3915
3916         Background size width specified in viewport percentage units not working
3917         https://bugs.webkit.org/show_bug.cgi?id=109536
3918
3919         Reviewed by Antti Koivisto.
3920
3921         Corrected the check for viewport percentage unit while calculating
3922         background image width.
3923
3924         Test: fast/backgrounds/size/backgroundSize-viewportPercentage-width.html
3925
3926         * rendering/RenderBoxModelObject.cpp:
3927         (WebCore::RenderBoxModelObject::calculateFillTileSize):
3928
3929 2013-02-12  Abhishek Arya  <inferno@chromium.org>
3930
3931         Heap-use-after-free in WebCore::DeleteButtonController::enable
3932         https://bugs.webkit.org/show_bug.cgi?id=109447
3933
3934         Reviewed by Ryosuke Niwa.
3935
3936         RefPtr frame pointer since it can get deleted due to mutation events
3937         fired inside AppendNodeCommand::doUnapply.
3938
3939         No new tests. Testcase is hard to minimize due to recursive
3940         calls with DOMNodeRemovedFromDocument mutation event.
3941
3942         * editing/CompositeEditCommand.cpp:
3943         (WebCore::EditCommandComposition::unapply):
3944         (WebCore::EditCommandComposition::reapply):
3945
3946 2013-02-12  Eric Seidel  <eric@webkit.org>
3947
3948         Remove HTMLTokenTypes header (and split out AtomicHTMLToken.h from HTMLToken.h)
3949         https://bugs.webkit.org/show_bug.cgi?id=109525
3950
3951         Reviewed by Adam Barth.
3952
3953         We no longer need a separate HTMLTokenTypes class now that NEW_XML is gone.
3954         However, to remove HTMLTokenTypes, I had to split AtomicHTMLToken.h from
3955         HTMLToken.h (to fix a circular dependancy).
3956
3957         * GNUmakefile.list.am:
3958         * Target.pri:
3959         * WebCore.gypi:
3960         * WebCore.vcproj/WebCore.vcproj:
3961         * WebCore.vcxproj/WebCore.vcxproj:
3962         * WebCore.vcxproj/WebCore.vcxproj.filters:
3963         * WebCore.xcodeproj/project.pbxproj:
3964         * html/HTMLViewSourceDocument.cpp:
3965         (WebCore::HTMLViewSourceDocument::addSource):
3966         * html/parser/AtomicHTMLToken.h: Added.
3967         (WebCore):
3968         (AtomicHTMLToken):
3969         (WebCore::AtomicHTMLToken::create):
3970         (WebCore::AtomicHTMLToken::forceQuirks):
3971         (WebCore::AtomicHTMLToken::type):
3972         (WebCore::AtomicHTMLToken::name):
3973         (WebCore::AtomicHTMLToken::setName):
3974         (WebCore::AtomicHTMLToken::selfClosing):
3975         (WebCore::AtomicHTMLToken::getAttributeItem):
3976         (WebCore::AtomicHTMLToken::attributes):
3977         (WebCore::AtomicHTMLToken::characters):
3978         (WebCore::AtomicHTMLToken::charactersLength):
3979         (WebCore::AtomicHTMLToken::isAll8BitData):
3980         (WebCore::AtomicHTMLToken::comment):
3981         (WebCore::AtomicHTMLToken::publicIdentifier):
3982         (WebCore::AtomicHTMLToken::systemIdentifier):
3983         (WebCore::AtomicHTMLToken::clearExternalCharacters):
3984         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
3985         (WebCore::AtomicHTMLToken::initializeAttributes):
3986         * html/parser/BackgroundHTMLParser.cpp:
3987         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
3988         * html/parser/CompactHTMLToken.cpp:
3989         (WebCore::CompactHTMLToken::CompactHTMLToken):
3990         * html/parser/CompactHTMLToken.h:
3991         (WebCore::CompactHTMLToken::type):
3992         * html/parser/HTMLConstructionSite.cpp:
3993         (WebCore::HTMLConstructionSite::insertDoctype):
3994         (WebCore::HTMLConstructionSite::insertComment):
3995         (WebCore::HTMLConstructionSite::insertCommentOnDocument):
3996         (WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
3997         (WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
3998         (WebCore::HTMLConstructionSite::insertForeignElement):
3999         * html/parser/HTMLDocumentParser.cpp: