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