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