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