refactor flexbox in preparation for flex-line-pack
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-03-22  Tony Chang  <tony@chromium.org>
2
3         refactor flexbox in preparation for flex-line-pack
4         https://bugs.webkit.org/show_bug.cgi?id=81843
5
6         Reviewed by Ojan Vafai.
7
8         Replace WrapReverseContext with a vector of LineContexts that contain
9         the same information, plus values needed for flex-align.
10
11         alignChildren has been moved to after all the lines have been
12         positioned. We want to align children after flex-line-pack has changed
13         the size of each line to avoid unnecessary layouts.
14
15         Take 2: Remove the assert. If there are no children, then there are no
16         flex lines. Instead, assert that child is not null.
17
18         No new tests, just refactoring.
19
20         * rendering/RenderFlexibleBox.cpp:
21         (WebCore::RenderFlexibleBox::LineContext::LineContext): New struct,
22         holds information needed for wrap-reverse and aligning children.
23         (RenderFlexibleBox::LineContext):
24         (WebCore::RenderFlexibleBox::layoutFlexItems): alignChildren after layout out all the lines rather than after each line.
25         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): don't alignChildren
26         (WebCore::RenderFlexibleBox::alignChildren): align all flex items, not just a line at a time.
27         (WebCore::RenderFlexibleBox::flipForWrapReverse): Update to use LineContext
28         * rendering/RenderFlexibleBox.h:
29
30 2012-03-22  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
31
32         Event dispatching in XMLHttpRequestProgressEventThrottle should go through XMLHttpRequestProgressEventThrottle::dispatchEvent
33         https://bugs.webkit.org/show_bug.cgi?id=46743
34
35         Reviewed by Julien Chaffraix
36         Based on original patch by Anton D'Auria
37
38         In preparation for platform-specific queuing of XMLHttpRequest events,
39         this patch changes all calls to m_target->dispatchEvent to
40         XMLHttpRequestProgressEventThrottle::dispatchEvent.
41         Currently, we queue only one progress event on suspend() if we have
42         throttled progress events. We should be able to queue all XHR events
43         that can be generated after suspend(), if the platform network layer
44         continues to receive data.
45         XMLHttpRequest uses XMLHttpRequestProgressEventThrottle to dispatch only
46         download events, so this doesn't change behavior of upload events, which
47         aren't throttled or queued.
48
49         * xml/XMLHttpRequest.cpp:
50         (WebCore::XMLHttpRequest::callReadyStateChangeListener):
51         * xml/XMLHttpRequestProgressEventThrottle.cpp:
52         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchReadyStateChangeEvent):
53         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchEvent):
54         (WebCore::XMLHttpRequestProgressEventThrottle::flushProgressEvent):
55         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchPausedEvent):
56         (WebCore::XMLHttpRequestProgressEventThrottle::fired):
57         * xml/XMLHttpRequestProgressEventThrottle.h:
58         (XMLHttpRequestProgressEventThrottle):
59
60 2012-03-22  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
61
62         [EFL] Map BackSpace key code to Unicode value
63         https://bugs.webkit.org/show_bug.cgi?id=81130
64
65         Reviewed by Gustavo Noronha Silva.
66
67         Test: fast/events/backspace-navigates-back.html
68
69         * platform/efl/EflKeyboardUtilities.cpp:
70         (WebCore::createKeyMap): Map BackSpace to Unicode value
71
72 2012-03-22  Abhishek Arya  <inferno@chromium.org>
73
74         Incorrect beforeChild parent calculation in RenderRubyBase::moveChildren.
75         https://bugs.webkit.org/show_bug.cgi?id=80297
76
77         Reviewed by Julien Chaffraix.
78
79         beforeChild might share the same anonymous block parent with other previous
80         siblings. Before moving the children across ruby bases, we need to make sure
81         to split the tree across the beforeChild correctly.
82
83         Test: fast/ruby/ruby-text-before-child-split.html
84
85         * rendering/RenderRubyBase.cpp:
86         (WebCore::RenderRubyBase::moveChildren):
87
88 2012-03-22  Kristóf Kosztyó  <kkristof@inf.u-szeged.hu>
89
90         [Qt] Fix Qt minimal build after r111692
91
92         Reviewed by Csaba Osztrogonác.
93
94         * bindings/js/JSScriptProfileNodeCustom.cpp:
95
96 2012-03-22  Adrienne Walker  <enne@google.com>
97
98         [chromium] Fix scrollbar layers holding onto invalid textures after lost context
99         https://bugs.webkit.org/show_bug.cgi?id=81841
100
101         Reviewed by James Robinson.
102
103         Unit test: CCLayerTreeHostImplTest.scrollbarLayerLostContext
104
105         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
106         (WebCore::CCScrollbarLayerImpl::willDraw):
107
108 2012-03-22  Philippe Normand  <pnormand@igalia.com>
109
110         [GTK] ASSERT bug in WebAudio (AudioFileReader)
111         https://bugs.webkit.org/show_bug.cgi?id=81777
112
113         Reviewed by Martin Robinson.
114
115         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
116         (WebCore::AudioFileReader::decodeAudioForBusCreation): Don't steal
117         the GstBus floating reference.
118         (WebCore::AudioFileReader::createBus): Ditto.
119
120 2012-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
121
122         Unreviewed: Web Inspector: fix syntax error in text.
123
124         * English.lproj/localizedStrings.js:
125         * inspector/front-end/HeapSnapshotProxy.js:
126         (WebInspector.HeapSnapshotWorker.prototype._messageReceived):
127
128 2012-03-22  Sheriff Bot  <webkit.review.bot@gmail.com>
129
130         Unreviewed, rolling out r111688.
131         http://trac.webkit.org/changeset/111688
132         https://bugs.webkit.org/show_bug.cgi?id=81912
133
134         "Heap profiler test fails" (Requested by yurys on #webkit).
135
136         * inspector/front-end/HeapSnapshot.js:
137         (WebInspector.HeapSnapshot.prototype._buildRetainers):
138
139 2012-03-22  Dana Jansens  <danakj@chromium.org>
140
141         [chromium] Early out in a new prepareToDraw() step if checkerboarding an accelerated animation in order to skip the frame
142         https://bugs.webkit.org/show_bug.cgi?id=81437
143
144         Reviewed by Adrienne Walker.
145
146         Split CCLayerTreeHostImpl::drawLayers() into two phases:
147         prepareToDraw() and drawLayers().
148
149         When calculating a RenderPass, and we checkerboard a quad on a
150         layer, bubble this info back up to CCLayerTreeHostImpl. If the
151         layer is transforming in an animation, then abort the prepareToDraw()
152         phase and cause it to return false back to the thread proxy.
153
154         Unit test: CCLayerTreeHostImplTest.prepareToDrawFailsWhenAnimationUsesCheckerboard
155
156         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
157         (WebCore::CCLayerImpl::appendQuads):
158         * platform/graphics/chromium/cc/CCLayerImpl.h:
159         (CCLayerImpl):
160         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
161         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
162         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
163         (WebCore):
164         (WebCore::CCLayerTreeHostImpl::drawLayers):
165         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
166         (CCLayerTreeHostImpl):
167         (FrameData):
168         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
169         (WebCore::CCQuadCuller::append):
170         * platform/graphics/chromium/cc/CCQuadCuller.h:
171         (CCQuadCuller):
172         * platform/graphics/chromium/cc/CCRenderPass.cpp:
173         (WebCore::CCRenderPass::appendQuadsForLayer):
174         * platform/graphics/chromium/cc/CCRenderPass.h:
175         (CCRenderPass):
176         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
177         (WebCore::CCScrollbarLayerImpl::appendQuads):
178         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
179         (CCScrollbarLayerImpl):
180         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
181         (WebCore::CCSingleThreadProxy::doComposite):
182         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
183         (WebCore::CCSolidColorLayerImpl::appendQuads):
184         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
185         (CCSolidColorLayerImpl):
186         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
187         (WebCore::CCTextureLayerImpl::appendQuads):
188         * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
189         (CCTextureLayerImpl):
190         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
191         (WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
192         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
193         (WebCore::CCTiledLayerImpl::appendQuads):
194         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
195         (CCTiledLayerImpl):
196         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
197         (WebCore::CCVideoLayerImpl::appendQuads):
198         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
199         (CCVideoLayerImpl):
200
201 2012-03-22  Levi Weintraub  <leviw@chromium.org>
202
203         Correct LayoutUnit usage in Accessibility code
204         https://bugs.webkit.org/show_bug.cgi?id=81789
205
206         Reviewed by Eric Seidel.
207
208         Reverting Accessibility hit testing code back to integers. Accessibility hit tests originate from
209         the embedder and don't accumulate offsets, so we get nothing from using LayoutUnits, and needlessly
210         expose them to the embedder.
211
212         No new tests. No change in behavior.
213
214         * accessibility/AccessibilityListBox.cpp:
215         (WebCore::AccessibilityListBox::elementAccessibilityHitTest): See above.
216         * accessibility/AccessibilityListBox.h:
217         (AccessibilityListBox):
218         * accessibility/AccessibilityObject.cpp:
219         (WebCore::AccessibilityObject::clickPoint): This value is only ever used to display a context menu,
220         which is always done with integer coordinates.
221         (WebCore::AccessibilityObject::boundingBoxForQuads): This is a bounding box built from floats. We
222         don't pixel snap floats, so we return an integer bounding box.
223         (WebCore::AccessibilityObject::elementAccessibilityHitTest): See above.
224         (WebCore::AccessibilityObject::scrollToMakeVisible): Pixel snapping the bounding box and simplifying
225         up the code to position it at (0,0).
226         * accessibility/AccessibilityObject.h:
227         (WebCore::AccessibilityObject::accessibilityHitTest): See above.
228         (AccessibilityObject):
229         (WebCore::AccessibilityObject::pixelSnappedBoundingBoxRect): Convenience method for embedder callers.
230         * accessibility/AccessibilityRenderObject.cpp:
231         (WebCore::AccessibilityRenderObject::visiblePositionForPoint): The point passed in here is comes from
232         screen coordinates and originates in embedder code. Reverting it to take an integer.
233         (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest): See above.
234         (WebCore::AccessibilityRenderObject::accessibilityHitTest): See above.
235         * accessibility/AccessibilityRenderObject.h:
236         (AccessibilityRenderObject):
237         * accessibility/AccessibilityScrollView.cpp:
238         (WebCore::AccessibilityScrollView::accessibilityHitTest): See above.
239         * accessibility/AccessibilityScrollView.h:
240         (AccessibilityScrollView):
241         * accessibility/AccessibilitySlider.cpp:
242         (WebCore::AccessibilitySlider::elementAccessibilityHitTest): See above.
243         * accessibility/AccessibilitySlider.h:
244         (AccessibilitySlider):
245
246 2012-03-21  Ilya Tikhonovsky  <loislo@chromium.org>
247
248         Web Inspector: HeapProfiler: Heap snapshot worker has to report the errors to the front-end
249         https://bugs.webkit.org/show_bug.cgi?id=81804
250
251         Sometimes the worker process of HeapSnapshot does some wrong thing and throw an Exception.
252         At this momemnt we have no way to see the error in the front-end.
253
254         Reviewed by Yury Semikhatsky.
255
256         * English.lproj/localizedStrings.js:
257         * inspector/front-end/HeapSnapshotProxy.js: check the exception field and dump it into front-end's console.
258         (WebInspector.HeapSnapshotWorker.prototype._messageReceived):
259         * inspector/front-end/HeapSnapshotWorkerDispatcher.js: catch the exception and transfer it's text to requester's side.
260         (WebInspector.HeapSnapshotWorkerDispatcher.prototype.dispatchMessage):
261
262 2012-03-22  Carlos Garcia Campos  <cgarcia@bb-webkit-rel-64.local.igalia.com>
263
264         [GTK] Use the angle-bracket form to include wtf headers
265         https://bugs.webkit.org/show_bug.cgi?id=81884
266
267         Reviewed by Eric Seidel.
268
269         Use #include <wtf/foo> instead of #include "foo".
270
271         * platform/graphics/freetype/FontPlatformData.h:
272         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
273         * platform/gtk/DataObjectGtk.h:
274         * platform/network/ResourceHandleInternal.h:
275         * platform/network/soup/SocketStreamHandleSoup.cpp:
276
277 2012-03-22  Alexander Pavlov  <apavlov@chromium.org>
278
279         Web Inspector: Case of the elements of the xml document should be shown as it is in the console
280         https://bugs.webkit.org/show_bug.cgi?id=81902
281
282         When registering a detached root, DOMAgent always presumes it is a node,
283         while it can also be a document.
284
285         Reviewed by Vsevolod Vlasov.
286
287         Test: inspector/console/console-xml-document.html
288
289         * inspector/front-end/ConsoleMessage.js:
290         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsNode):
291         * inspector/front-end/DOMAgent.js:
292         (WebInspector.DOMAgent.prototype._setDetachedRoot):
293
294 2012-03-22  Vsevolod Vlasov  <vsevik@chromium.org>
295
296         Web Inspector: Introduce ScriptBound/ScriptUnbound events in ScriptMapping.
297         https://bugs.webkit.org/show_bug.cgi?id=81904
298
299         Reviewed by Pavel Feldman.
300
301         This is another step on the way to cleaner BreakpointManager logic.
302         Here we extract ScriptBound/ScriptUnbound events from UISourceCodeListChanged event.
303         This allows us to handle script-uiSourceCode binding separately from
304         uiSourceCode creation/deletion and to handle unbinding that was not
305         possible at all before.
306
307         * inspector/front-end/CompilerScriptMapping.js:
308         (WebInspector.CompilerScriptMapping.prototype._uiSourceCodesForSourceMap):
309         (WebInspector.CompilerScriptMapping.prototype.addScript.get this):
310         (WebInspector.CompilerScriptMapping.prototype.addScript):
311         (WebInspector.CompilerScriptMapping.prototype.reset):
312         * inspector/front-end/ResourceScriptMapping.js:
313         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged):
314         * inspector/front-end/ScriptMapping.js:
315         (WebInspector.MainScriptMapping):
316         (WebInspector.MainScriptMapping.prototype._updateLiveLocation):
317         (WebInspector.MainScriptMapping.prototype._handleUISourceCodeListChanged):
318         (WebInspector.MainScriptMapping.prototype._handleScriptBound):
319         (WebInspector.MainScriptMapping.prototype._handleScriptUnbound):
320         * inspector/front-end/SnippetsModel.js:
321         (WebInspector.SnippetsScriptMapping.prototype.addScript.get this):
322         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
323         (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
324         (WebInspector.SnippetsScriptMapping.prototype._snippetRemoved.get this):
325         (WebInspector.SnippetsScriptMapping.prototype._snippetRemoved):
326         (WebInspector.SnippetsScriptMapping.prototype.reset):
327
328 2012-03-22  Vineet Chaudhary  <rgf748@motorola.com>
329
330         https://bugs.webkit.org/show_bug.cgi?id=81893
331         Remove custom bindings form ScriptProfileNode.idl of attribute type Array.
332
333         Reviewed by Kentaro Hara.
334
335         Replace [CustomGetter] Array with sequence<ScriptProfileNode>.
336         To remove the custom bindings code.
337
338         Test: No new tests. LayoutTests/fast/profiler/* test are enough for this.
339
340         * bindings/js/JSScriptProfileNodeCustom.cpp: Removed custom function.
341         (WebCore::JSScriptProfileNode::callUID):
342         * bindings/v8/custom/V8ScriptProfileNodeCustom.cpp: Removed custom function.
343         (WebCore):
344         * inspector/ScriptProfileNode.idl: Replaced Array with sequence<ScriptProfileNode>.
345
346 2012-03-22  Andrey Kosyakov  <caseq@chromium.org>
347
348         Web Inspector: only update timeline overview categories strips when these are visible
349         https://bugs.webkit.org/show_bug.cgi?id=81903
350
351         Reviewed by Pavel Feldman.
352
353         - factor out category strips update into a separate method;
354         - only invoke it when "Timeline" overview mode is selected.
355
356         * inspector/front-end/TimelineOverviewPane.js:
357         (WebInspector.TimelineOverviewPane.prototype._showTimelines):
358         (WebInspector.TimelineOverviewPane.prototype.update):
359         (WebInspector.TimelineOverviewPane.prototype._updateCategoryStrips):
360
361 2012-03-22  Levi Weintraub  <leviw@chromium.org>
362
363         Update LayoutUnit usage in FrameSelection
364         https://bugs.webkit.org/show_bug.cgi?id=81754
365
366         Reviewed by Eric Seidel.
367
368         FrameSelection stores its caret and repaint bounds in absolute coordinates. Absolute coordinates
369         we treat as pixel values, so this patch changes these values to integers. Sub-pixel precision
370         will still be used when these coordinates are passed down and used locally.
371
372         No new tests. No change in behavior.
373
374         * editing/FrameSelection.cpp:
375         (WebCore::absoluteCaretY): Uses absolute coordinates, which are ints.
376         (WebCore::FrameSelection::modify): Uses absolute coordinates to handle vertical selection
377         modification. Sub-pixel precision will be used when these values are converted to local ones.
378         (WebCore::CaretBase::absoluteBoundsForLocalRect): Absolute coordinates -> ints.
379         (WebCore::FrameSelection::absoluteCaretBounds): Ditto.
380         (WebCore::CaretBase::caretRepaintRect): The caret repaint rect is stored in absolute coordinates.
381         Reverting the values to ints.
382         (WebCore::FrameSelection::recomputeCaretRect): Ditto.
383         * editing/FrameSelection.h:
384         (FrameSelection):
385         * editing/mac/FrameSelectionMac.mm:
386         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): Switching to store absolute
387         coordinates as integers.
388
389 2012-03-22  Alexei Filippov  <alexeif@chromium.org>
390
391         Web Inspector: Speed up the build retainers phase.
392         https://bugs.webkit.org/show_bug.cgi?id=81763
393
394         Replacing the edge iterator with a raw loop makes it
395         faster by more than 10 times.
396
397         Reviewed by Yury Semikhatsky.
398
399         * inspector/front-end/HeapSnapshot.js:
400         (WebInspector.HeapSnapshot.prototype._buildRetainers):
401
402 2012-03-22  No'am Rosenthal  <noam.rosenthal@nokia.com>
403
404         [Qt][WK2] The background appears to have one extra pixel from the contents
405         https://bugs.webkit.org/show_bug.cgi?id=81830
406
407         Reviewed by Kenneth Rohde Christiansen.
408
409         TextureMapperGL applied a 1-offset that was covering for another bug,
410         which was already fixed.
411
412         No new tests, this would be tested once we test GL rendering results.
413
414         * platform/graphics/texmap/TextureMapperGL.cpp:
415         (WebCore::TextureMapperGLData::SharedGLData::scissorClip):
416
417 2012-03-22  W. James MacLean  <wjmaclean@chromium.org>
418
419         Rename touchpad fling curve, add curve parameters to constructor.
420         https://bugs.webkit.org/show_bug.cgi?id=81820
421
422         Reviewed by Adrienne Walker.
423
424         Covered by existing unit tests.
425
426         * GNUmakefile.list.am:
427         * WebCore.gypi:
428         * platform/ScrollAnimatorNone.cpp:
429         (WebCore::ScrollAnimatorNone::fireUpAnAnimation):
430         * platform/TouchpadFlingPlatformGestureCurve.cpp: Renamed from Source/WebCore/platform/TouchFlingPlatformGestureCurve.cpp.
431         (WebCore):
432         (WebCore::TouchpadFlingPlatformGestureCurve::create):
433         (WebCore::TouchpadFlingPlatformGestureCurve::TouchpadFlingPlatformGestureCurve):
434         (WebCore::TouchpadFlingPlatformGestureCurve::~TouchpadFlingPlatformGestureCurve):
435         (WebCore::TouchpadFlingPlatformGestureCurve::apply):
436         * platform/TouchpadFlingPlatformGestureCurve.h: Renamed from Source/WebCore/platform/TouchFlingPlatformGestureCurve.h.
437         (WebCore):
438         (TouchpadFlingPlatformGestureCurve):
439
440 2012-03-22  Pavel Feldman  <pfeldman@chromium.org>
441
442         Web Inspector: make CSS and JavaScript files editable by default.
443         https://bugs.webkit.org/show_bug.cgi?id=81787
444
445         Reviewed by Vsevolod Vlasov.
446
447         This change removes cancelEditing and setReadOnly capabilities from source frame.
448         It removes dblclick handler as well since one does not need to enter editing mode.
449         It also establishes proper content dispatching so that views are updated with the
450         resource content. All these are inter-dependent, need to be landed simultaneously.
451         Drive-by follow up to the r111675 where range is modified prior to the exiting
452         edit mode.
453
454         * inspector/front-end/JavaScriptSourceFrame.js:
455         (WebInspector.JavaScriptSourceFrame):
456         (WebInspector.JavaScriptSourceFrame.prototype.requestContent):
457         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
458         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
459         (WebInspector.JavaScriptSourceFrame.prototype.didEditContent):
460         (WebInspector.JavaScriptSourceFrame.prototype._lineNumberAfterEditing):
461         * inspector/front-end/ResourceView.js:
462         (WebInspector.ResourceSourceFrame):
463         (WebInspector.ResourceSourceFrame.prototype.suggestedFileName):
464         (WebInspector.ResourceSourceFrame.prototype._contentChanged):
465         (WebInspector.EditableResourceSourceFrame.prototype.canEditSource):
466         (WebInspector.EditableResourceSourceFrame.prototype.editContent.callbackWrapper):
467         (WebInspector.EditableResourceSourceFrame.prototype.editContent):
468         (WebInspector.EditableResourceSourceFrame.prototype._contentChanged):
469         * inspector/front-end/ResourcesPanel.js:
470         (WebInspector.ResourcesPanel.prototype._innerShowView):
471         (WebInspector.FrameResourceTreeElement.prototype._appendRevision):
472         * inspector/front-end/ScriptsPanel.js:
473         (WebInspector.ScriptsPanel.prototype.setScriptSourceIsDirty):
474         * inspector/front-end/Settings.js:
475         (WebInspector.ExperimentsSettings):
476         * inspector/front-end/SourceFrame.js:
477         (WebInspector.SourceFrame):
478         (WebInspector.SourceFrame.prototype.wasShown):
479         (WebInspector.SourceFrame.prototype.willHide):
480         (WebInspector.SourceFrame.prototype.beforeTextChanged):
481         (WebInspector.SourceFrame.prototype.setContent):
482         (WebInspector.SourceFrame.prototype.commitEditing):
483         (WebInspector.SourceFrame.prototype.didEditContent):
484         (WebInspector.SourceFrame.prototype.editContent):
485         * inspector/front-end/TextPrompt.js:
486         (WebInspector.TextPrompt.prototype._startEditing):
487         (WebInspector.TextPrompt.prototype._stopEditing):
488         * inspector/front-end/TextViewer.js:
489         (WebInspector.TextViewer):
490         (WebInspector.TextViewer.prototype._registerShortcuts):
491         (WebInspector.TextEditorMainPanel.prototype.handleEnterKey):
492
493 2012-03-22  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
494
495         [Qt] Enable FAST_MOBILE_SCROLLING when scrolling is delegated.
496         https://bugs.webkit.org/show_bug.cgi?id=81889
497
498         Reviewed by Kenneth Rohde Christiansen.
499
500         On the Qt platform only enable the fast mobile scroll feature when scrolling is delegated.
501
502         * rendering/RenderObject.cpp:
503         (WebCore::RenderObject::styleWillChange):
504
505 2012-03-22  Pavel Feldman  <pfeldman@chromium.org>
506
507         Web Inspector: dispatch styleSheetChanged event synchronously.
508         https://bugs.webkit.org/show_bug.cgi?id=81892
509
510         Reviewed by Vsevolod Vlasov.
511
512         Today, backend generates stylesheet change event synchronously from within set* command.
513         But CSSStyleModel defers its dispatching until the stylesheet content is available. This
514         prevents us from ignoring update events from within commands that initiated those updates.
515
516         This change makes stylesheet change event dispatch synchronously and delegates stylesheet
517         content fetching to the event client.
518
519         * inspector/front-end/CSSStyleModel.js:
520         (WebInspector.CSSStyleModel.prototype._fireStyleSheetChanged):
521         (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
522         (WebInspector.CSSStyleModelResourceBinding.prototype.setContent):
523         (WebInspector.CSSStyleModelResourceBinding.prototype._innerSetContent.callbackWrapper):
524         (WebInspector.CSSStyleModelResourceBinding.prototype._innerSetContent):
525         (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetChanged.callback):
526         (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetChanged):
527         (WebInspector.CSSStyleModelResourceBinding.prototype._innerStyleSheetChanged):
528
529 2012-03-21  Ian Vollick  <vollick@chromium.org>
530
531         [chromium] timing functions are getting incorrectly applied for accelerated css transitions
532         https://bugs.webkit.org/show_bug.cgi?id=81692
533
534         Reviewed by Adrienne Walker.
535
536         Tested in CCLayerTreeHostTestAddAnimationWithTimingFunction
537
538         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
539
540 2012-03-22  Pavel Feldman  <pfeldman@chromium.org>
541
542         Web Inspector: allow on-hover popover while in edit mode.
543         https://bugs.webkit.org/show_bug.cgi?id=81898
544
545         Reviewed by Vsevolod Vlasov.
546
547         This change allows popover while in-edit mode, hides it upon Esc. It also introduces anchorOverride
548         concept in ObjectPopoverHelper that allows dynamically switching the anchor (say if we want to highlight anchor itself).
549
550         * inspector/front-end/DetailedHeapshotView.js:
551         * inspector/front-end/ElementsPanel.js:
552         * inspector/front-end/JavaScriptSourceFrame.js:
553         (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover.showObjectPopover):
554         (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover):
555         (WebInspector.JavaScriptSourceFrame.prototype._onKeyDown):
556         * inspector/front-end/NetworkPanel.js:
557         * inspector/front-end/ObjectPopoverHelper.js:
558         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover.showObjectPopover.):
559         (WebInspector.ObjectPopoverHelper.prototype._showObjectPopover):
560         * inspector/front-end/Popover.js:
561         (WebInspector.PopoverHelper.prototype.isPopoverVisible):
562         * inspector/front-end/TimelinePanel.js:
563
564 2012-03-22  Pavel Feldman  <pfeldman@chromium.org>
565
566         Web Inspector: breakpoints should shift when line break is inserted in the middle of the line.
567         https://bugs.webkit.org/show_bug.cgi?id=81896
568
569         Reviewed by Vsevolod Vlasov.
570
571         There is a bug that collapses selection prior to exiting change mode, we should never
572         collapse edit area prior committing.
573
574         * inspector/front-end/TextEditorModel.js:
575         (WebInspector.TextEditorModel.endsWithBracketRegex.):
576         * inspector/front-end/TextViewer.js:
577         (WebInspector.TextViewer):
578         (WebInspector.TextEditorMainPanel.prototype.highlightLine):
579         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo.callback):
580         (WebInspector.TextEditorMainPanel.prototype.handleUndoRedo):
581
582 2012-03-22  Zoltan Herczeg  <zherczeg@webkit.org>
583
584         Merge SVGImageBufferTools to SVGRenderingContext
585         https://bugs.webkit.org/show_bug.cgi?id=81890
586
587         Reviewed by Nikolas Zimmermann.
588
589         Copy the code to SVGRenderingContext and delete
590         SVGImageBufferTools[.cpp.h]. Update build systems,
591         no functionality change. This is the first step
592         towards making SVGImageBufferTools stageful.
593
594         Existing tests cover this issue.
595
596         * CMakeLists.txt:
597         * GNUmakefile.list.am:
598         * Target.pri:
599         * WebCore.gypi:
600         * WebCore.xcodeproj/project.pbxproj:
601         * platform/graphics/filters/FETile.cpp:
602         (WebCore::FETile::platformApplySoftware):
603         * rendering/svg/RenderSVGAllInOne.cpp:
604         * rendering/svg/RenderSVGInlineText.cpp:
605         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
606         * rendering/svg/RenderSVGResourceClipper.cpp:
607         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
608         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
609         * rendering/svg/RenderSVGResourceFilter.cpp:
610         (WebCore::RenderSVGResourceFilter::applyResource):
611         * rendering/svg/RenderSVGResourceGradient.cpp:
612         (WebCore::createMaskAndSwapContextForTextGradient):
613         (WebCore::clipToTextMask):
614         * rendering/svg/RenderSVGResourceMasker.cpp:
615         (WebCore::RenderSVGResourceMasker::applyResource):
616         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
617         * rendering/svg/RenderSVGResourcePattern.cpp:
618         (WebCore::RenderSVGResourcePattern::applyResource):
619         (WebCore::RenderSVGResourcePattern::createTileImage):
620         * rendering/svg/SVGImageBufferTools.cpp: Removed.
621         * rendering/svg/SVGImageBufferTools.h: Removed.
622         * rendering/svg/SVGInlineTextBox.cpp:
623         * rendering/svg/SVGRenderingContext.cpp:
624         (WebCore::currentContentTransformation):
625         (WebCore):
626         (WebCore::SVGRenderingContext::calculateTransformationToOutermostSVGCoordinateSystem):
627         (WebCore::SVGRenderingContext::createImageBuffer):
628         (WebCore::SVGRenderingContext::createImageBufferForPattern):
629         (WebCore::SVGRenderingContext::renderSubtreeToImageBuffer):
630         (WebCore::SVGRenderingContext::clipToImageBuffer):
631         (WebCore::SVGRenderingContext::clampedAbsoluteTargetRect):
632         (WebCore::SVGRenderingContext::clampedAbsoluteSize):
633         (WebCore::SVGRenderingContext::clear2DRotation):
634         * rendering/svg/SVGRenderingContext.h:
635         (SVGRenderingContext):
636         (WebCore::SVGRenderingContext::calculateImageBufferRect):
637         * svg/graphics/filters/SVGFEImage.cpp:
638         (WebCore::FEImage::platformApplySoftware):
639
640 2012-03-22  Hyowon Kim  <hw1008.kim@samsung.com>
641
642         [EFL] Add PageClientEfl to WebCoreSupport.
643         https://bugs.webkit.org/show_bug.cgi?id=80748
644
645         Reviewed by Noam Rosenthal.
646
647         * platform/Widget.h: Use PageClientEfl as type for PlatformPageClient.
648         (WebCore):
649         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
650         (WebCore::GraphicsContext3DPrivate::createSurface): Change the argument type.
651         * plugins/efl/PluginViewEfl.cpp:
652         (WebCore::PluginView::platformGetValue): Use PageClientEfl.
653
654 2012-03-22  Kaustubh Atrawalkar  <kaustubh@motorola.com>
655
656         blur() on shadow host should work when a shadow host contains a focused element in its shadow DOM subtrees
657         https://bugs.webkit.org/show_bug.cgi?id=81102
658
659         Reviewed by Hajime Morita.
660
661         This implementation will support blur for a focused element when its shadowHost's blur() is called.
662         To achieve this Element::blur() function is modified to blur the focused node in it's treeScope.
663
664         Test: fast/dom/shadow/shadow-root-blur.html
665
666         * dom/Element.cpp:
667         (WebCore::Element::blur): Modified to blur current treeScope's focused node.
668         * dom/ShadowRoot.h:
669         (WebCore::ShadowRoot::activeElement): Rework for code sharing.
670         * dom/TreeScope.cpp:
671         (WebCore::TreeScope::focusedNode): Added new function to share code for getting focused node.
672         * dom/TreeScope.h:
673         (TreeScope): New function declartion.
674         * html/HTMLDocument.cpp:
675         (WebCore::HTMLDocument::activeElement): Rework for code sharing.
676
677 2012-03-22  Vsevolod Vlasov  <vsevik@chromium.org>
678
679         Web Inspector: RawSourceCode does not need uiSourceCode lists because it never has more than one.
680         https://bugs.webkit.org/show_bug.cgi?id=81894
681
682         RawSourceCode never has more than one uiSourceCode, uiSourceCodeList
683         are just remains of older implementation. This patch switches RawSourceCode
684         and SourceMappings from uiSourceCodeList to uiSourceCode.
685
686         Reviewed by Pavel Feldman.
687
688         * inspector/front-end/RawSourceCode.js:
689         (WebInspector.RawSourceCode.prototype.uiSourceCode):
690         (WebInspector.RawSourceCode.prototype._saveSourceMapping):
691         (WebInspector.RawSourceCode.SourceMapping.prototype.uiLocationToRawLocation):
692         (WebInspector.RawSourceCode.SourceMapping.prototype.uiSourceCode):
693         (WebInspector.RawSourceCode.PlainSourceMapping):
694         (WebInspector.RawSourceCode.PlainSourceMapping.prototype.rawLocationToUILocation):
695         (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiLocationToRawLocation):
696         (WebInspector.RawSourceCode.PlainSourceMapping.prototype.uiSourceCode):
697         (WebInspector.RawSourceCode.FormattedSourceMapping):
698         (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.rawLocationToUILocation):
699         (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiLocationToRawLocation):
700         (WebInspector.RawSourceCode.FormattedSourceMapping.prototype.uiSourceCode):
701         * inspector/front-end/ResourceScriptMapping.js:
702         (WebInspector.ResourceScriptMapping.prototype.uiSourceCodeList):
703         (WebInspector.ResourceScriptMapping.prototype.addScript):
704         (WebInspector.ResourceScriptMapping.prototype._handleUISourceCodeChanged):
705         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged):
706         (WebInspector.ResourceScriptMapping.prototype.reset):
707
708 2012-03-22  Mario Sanchez Prada  <msanchez@igalia.com>
709
710         [GTK] Fix the only remaining coding style issue in GTK accessibility code
711         https://bugs.webkit.org/show_bug.cgi?id=81885
712
713         Reviewed by Xan Lopez.
714
715         Add needed extra line and remove an unneeded one.
716
717         * accessibility/gtk/AccessibilityObjectAtk.cpp:
718
719 2012-03-22  Kent Tamura  <tkent@chromium.org>
720
721         Expand RenderTextControlSingleLine::controlClipRect() to contain contentRect().
722         https://bugs.webkit.org/show_bug.cgi?id=81866
723
724         Reviewed by Hajime Morita.
725
726         We need to expand the controlClipRect because the existing shadow
727         tree of a text field can be wrapped by another shadow tree. e.g.
728
729         A current situation:
730
731         <input>
732           ┗ ShadowRoot
733              ┗ container element
734         ┌────────────┐<input>'s border box
735         │┌──────────┐│
736         ││container box       ││
737         │└──────────┘│
738         └────────────┘
739
740         Wrapped by another ShadowRoot:
741
742         <input>
743           ┗ New ShadowRoot
744              ┣ <shadow> represents the existing shadow tree
745              ┃  ┗ container element
746              ┗ D: an additional decoration element
747         ┌────────────┐<input>'s border box
748         │┌───────┬──┐│
749         ││container box │ D  ││
750         │└───────┴──┘│
751         └────────────┘
752         In this case, if we clip child renderers by container box, D is not
753         drawn. We should clip by the content box of the <input>.
754
755         A search field has an exceptional behavior. It can have the container
756         box of which height is taller than the content box height. The
757         controlClipRect should contain both of the container box and the content
758         box in this case. In other cases, the container box is equivalent to the
759         content box. So the code always unites them.
760
761         No new tests. This won't make any behavior change for now.
762
763         * rendering/RenderTextControlSingleLine.cpp:
764         (WebCore::RenderTextControlSingleLine::controlClipRect):
765
766 2012-03-22  Yoshifumi Inoue  <yosin@chromium.org>
767
768         [Forms] The option element should not be form associated element.
769         https://bugs.webkit.org/show_bug.cgi?id=79764
770
771         Reviewed by Kent Tamura.
772
773         This patch changes base class of HTMLOptionELement to HTMLElement
774         from HTMLFormControlElement for saving memory space and iteration
775         time of extra "option" elements in HTMLFormElement::m_formAssociatedElements
776         and matching the HTML5 specification for ease of maintenance.
777
778         This patch changes behavior of handling of CSS pseudo classes "invalid"
779         and "valid". The "option" elements no longer use these CSS pseudo classes
780         as HTML5 specification. This bug was filed in https://bugs.webkit.org/show_bug.cgi?id=80088
781
782         Changes of TextIterator is lead by usage of isFormControlElement. This
783         changes will be replaced with more meaningful predicate as part of
784         https://bugs.webkit.org/show_bug.cgi?id=80381
785
786         No new tests but updated select-live-pseudo-selectors.html test.
787
788         * css/CSSStyleSelector.cpp:
789         (WebCore::CSSStyleSelector::canShareStyleWithElement): Added checking of the "option" element and returns false as HTMLFormControlElement.
790         * css/SelectorChecker.cpp:
791         (WebCore::SelectorChecker::checkOneSelector): Removed isFormControlElement for PseudoDisabled and PseudoChecked.
792         * html/HTMLKeygenElement.cpp:
793         (WebCore::HTMLKeygenElement::HTMLKeygenElement): Removed form parameter of call site of HTMLOptionElement::create.
794         * html/HTMLOptionElement.cpp:
795         (WebCore::HTMLOptionElement::HTMLOptionElement): Removed form parameter which no longer needed. Changed base class in initialization list. Added m_disabled initialization.
796         (WebCore::HTMLOptionElement::create): Removed form parameter which no longer needed.
797         (WebCore::HTMLOptionElement::attach): Changeid base class.
798         (WebCore::HTMLOptionElement::detach): Changed base class.
799         (WebCore::HTMLOptionElement::parseAttribute): Changed base class. Added "disabled" attribute handling.
800         (WebCore::HTMLOptionElement::childrenChanged): Changed base class.
801         (WebCore::HTMLOptionElement::insertedIntoTree): Changed base class.
802         * html/HTMLOptionElement.h:
803         (HTMLOptionElement): Added new member variable m_disabled which was in HTMLFormControlElement.
804         (WebCore::HTMLOptionElement::ownElementDisabled): Changed for using m_disabled.
805         * html/HTMLTagNames.in: Removed constructorNeedsFormElement for the "option" element, which was used for passing form parameter to create function.
806
807 2012-03-21  Pavel Podivilov  <podivilov@chromium.org>
808
809         Web Inspector: rename ClosureCompilerSourceMapping to SourceMapParser and move it to CompilerScriptMapping.js.
810         https://bugs.webkit.org/show_bug.cgi?id=81780
811
812         Reviewed by Pavel Feldman.
813
814         * WebCore.gypi:
815         * WebCore.vcproj/WebCore.vcproj:
816         * inspector/compile-front-end.py:
817         * inspector/front-end/CompilerScriptMapping.js:
818         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
819         (WebInspector.SourceMapParserPayload):
820         (WebInspector.SourceMapParser):
821         (WebInspector.SourceMapParser.prototype.load):
822         (WebInspector.SourceMapParser.prototype.compiledLocationToSourceLocation):
823         (WebInspector.SourceMapParser.prototype.sourceLocationToCompiledLocation):
824         (WebInspector.SourceMapParser.prototype.sources):
825         (WebInspector.SourceMapParser.prototype.loadSourceCode):
826         (WebInspector.SourceMapParser.prototype._findMapping):
827         (WebInspector.SourceMapParser.prototype._parseMappingPayload):
828         (WebInspector.SourceMapParser.prototype._parseSections):
829         (WebInspector.SourceMapParser.prototype._parseMap):
830         (WebInspector.SourceMapParser.prototype._isSeparator):
831         (WebInspector.SourceMapParser.prototype._decodeVLQ):
832         (WebInspector.SourceMapParser.prototype._canonicalizeURL):
833         (WebInspector.SourceMapParser.StringCharIterator):
834         (WebInspector.SourceMapParser.StringCharIterator.prototype.next):
835         (WebInspector.SourceMapParser.StringCharIterator.prototype.peek):
836         (WebInspector.SourceMapParser.StringCharIterator.prototype.hasNext):
837         * inspector/front-end/CompilerSourceMapping.js: Removed.
838         * inspector/front-end/WebKit.qrc:
839         * inspector/front-end/inspector.html:
840
841 2012-03-21  Vsevolod Vlasov  <vsevik@chromium.org>
842
843         Web Inspector: IndexedDB transaction is not closed when requesting data.
844         https://bugs.webkit.org/show_bug.cgi?id=81837
845
846         Reviewed by Pavel Feldman.
847
848         * inspector/InspectorIndexedDBAgent.cpp: Added missing IDBCursorBackendInterface::postSuccessHandlerCallback() call.
849         (WebCore):
850
851 2012-03-21  Yury Semikhatsky  <yurys@chromium.org>
852
853         Web Inspector: event listeners section is broken for about:blank page
854         https://bugs.webkit.org/show_bug.cgi?id=81795
855
856         Parse about:blank as a valid URL.
857
858         Reviewed by Pavel Feldman.
859
860         Test: inspector/elements/event-listeners-about-blank.html
861
862         * inspector/front-end/utilities.js:
863         (String.prototype.asParsedURL):
864
865 2012-03-21  Dan Bernstein  <mitz@apple.com>
866
867         REGRESSION (r111635): Assertion failure in RenderFlexibleBox::layoutFlexItems() (!lineContexts.size()) in many flexbox tests
868         https://bugs.webkit.org/show_bug.cgi?id=81870
869
870         Reverted r111635, the fix for bug 81843.
871
872         * rendering/RenderFlexibleBox.cpp:
873         (WebCore::RenderFlexibleBox::WrapReverseContext::WrapReverseContext):
874         (WebCore::RenderFlexibleBox::WrapReverseContext::addCrossAxisOffset):
875         (RenderFlexibleBox::WrapReverseContext):
876         (WebCore::RenderFlexibleBox::WrapReverseContext::addNumberOfChildrenOnLine):
877         (WebCore::RenderFlexibleBox::WrapReverseContext::lineCrossAxisDelta):
878         (WebCore::RenderFlexibleBox::layoutFlexItems):
879         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
880         (WebCore::RenderFlexibleBox::alignChildren):
881         (WebCore::RenderFlexibleBox::flipForWrapReverse):
882         * rendering/RenderFlexibleBox.h:
883
884 2012-03-21  Emil A Eklund  <eae@chromium.org>
885
886         Unreviewed change touching CustomFilterProgram.h to try
887         to force the chromium-win bots to rebuilt it and pick up
888         on the fact that CSS_SHADERS is not set (since r111610). 
889
890         * platform/graphics/filters/CustomFilterProgram.h:
891
892 2012-03-21  Vangelis Kokkevis  <vangelis@chromium.org>
893
894         [chromium] FPS counter causes garbage to be displayed at top left corner
895         https://bugs.webkit.org/show_bug.cgi?id=81851
896
897         The HUD expects the PlatformCanvas it paints on to be cleared on creation which is
898         no longer true after http://src.chromium.org/viewvc/chrome?view=rev&revision=127196 .
899         This patch does an explicit clearRect before the HUD contents are painted.
900
901         Reviewed by Adrienne Walker.
902
903         TEST=Manually verified that --show-fps-counter and --show-composited-layer-tree work correctly.
904
905         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
906         (WebCore::CCHeadsUpDisplay::draw):
907
908 2012-03-21  Ryosuke Niwa  <rniwa@webkit.org>
909
910         Touch a file to make Chromium Windows bots happy.
911
912         * css/CSSValueKeywords.in:
913
914 2012-03-19  Igor Oliveira  <igor.o@sisa.samsung.com>
915
916         Every call to RenderObject::setAnimatableStyle() iterates through all m_compositeAnimations: potentially O(N^2)
917         https://bugs.webkit.org/show_bug.cgi?id=38025
918
919         Implement updateAnimationTimerForRender. This reduces unnecessary animation
920         steps on the current RenderObject by checking the value of timeToNextService
921         before starting a new timer.
922
923         Reviewed by Dean Jackson.
924
925         Test: animations/animation-welcome-safari.html
926
927         * page/animation/AnimationController.cpp:
928         (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
929         (WebCore):
930         (WebCore::AnimationController::updateAnimations):
931         * page/animation/AnimationControllerPrivate.h:
932         (AnimationControllerPrivate):
933
934 2012-03-21  Sheriff Bot  <webkit.review.bot@gmail.com>
935
936         Unreviewed, rolling out r111616.
937         http://trac.webkit.org/changeset/111616
938         https://bugs.webkit.org/show_bug.cgi?id=81862
939
940         broke chromium mac (Requested by eae on #webkit).
941
942         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
943         (WebCore::CCLayerImpl::appendQuads):
944         * platform/graphics/chromium/cc/CCLayerImpl.h:
945         (CCLayerImpl):
946         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
947         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
948         (WebCore::CCLayerTreeHostImpl::drawLayers):
949         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
950         (CCLayerTreeHostImpl):
951         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
952         (WebCore::CCQuadCuller::append):
953         * platform/graphics/chromium/cc/CCQuadCuller.h:
954         (CCQuadCuller):
955         * platform/graphics/chromium/cc/CCRenderPass.cpp:
956         (WebCore::CCRenderPass::appendQuadsForLayer):
957         * platform/graphics/chromium/cc/CCRenderPass.h:
958         (CCRenderPass):
959         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
960         (WebCore::CCScrollbarLayerImpl::appendQuads):
961         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
962         (CCScrollbarLayerImpl):
963         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
964         (WebCore::CCSingleThreadProxy::doComposite):
965         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
966         (WebCore::CCSolidColorLayerImpl::appendQuads):
967         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
968         (CCSolidColorLayerImpl):
969         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
970         (WebCore::CCTextureLayerImpl::appendQuads):
971         * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
972         (CCTextureLayerImpl):
973         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
974         (WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
975         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
976         (WebCore::CCTiledLayerImpl::appendQuads):
977         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
978         (CCTiledLayerImpl):
979         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
980         (WebCore::CCVideoLayerImpl::appendQuads):
981         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
982         (CCVideoLayerImpl):
983
984 2012-03-21  Beth Dakin  <bdakin@apple.com>
985
986         https://bugs.webkit.org/show_bug.cgi?id=80322
987         Implement image-set
988
989         Reviewed by Dean Jackson.
990
991         This initial implementation of -webkit-image-set. 
992         http://lists.w3.org/Archives/Public/www-style/2012Feb/1103.html
993         The idea behind the feature is to allow authors to provide multiple variants 
994         of the same image at differing resolutions, and to allow the User Agent to 
995         choose the resource that is most appropriate at the time. This patch will 
996         choose the most appropriate image based on device scale factor.
997
998         CSSImageSetValue inherits from CSSValueList and behaves a lot like 
999         CSSImageValue.
1000         * WebCore.xcodeproj/project.pbxproj:
1001         * css/CSSImageSetValue.h: Added.
1002         (WebCore):
1003         (CSSImageSetValue):
1004         (WebCore::CSSImageSetValue::create):
1005         (WebCore::CSSImageSetValue::isPending):
1006         (ImageWithScale):
1007         (WebCore::CSSImageSetValue::compareByScaleFactor):
1008         * css/CSSImageSetValue.cpp: Added.
1009         (WebCore):
1010         (WebCore::CSSImageSetValue::CSSImageSetValue):
1011         (WebCore::CSSImageSetValue::~CSSImageSetValue):
1012         (WebCore::CSSImageSetValue::cachedOrPendingImageSet):
1013         (WebCore::CSSImageSetValue::customCssText):
1014
1015         fillImageSet() iterates through the value list and turns the information into 
1016         a sorted Vector of ImageWithScales (which is a struct containing image URLs 
1017         and scale factors).
1018         (WebCore::CSSImageSetValue::fillImageSet):
1019
1020         cachedImageSet() finds which image is most appropriate based on the device 
1021         scale factor, and it loads only that image. In the future, additional scale 
1022         factors will be taken into account.
1023         (WebCore::CSSImageSetValue::bestImageForScaleFactor):
1024         (WebCore::CSSImageSetValue::cachedImageSet):
1025
1026         parseImageSet() is called everywhere in the CSSParser that a regular image or 
1027         generated image can be found.
1028         * css/CSSParser.cpp:
1029         (WebCore::CSSParser::parseValue):
1030         (WebCore::CSSParser::parseContent):
1031         (WebCore::CSSParser::parseFillImage):
1032         (WebCore::CSSParser::parseBorderImage):
1033         (WebCore):
1034         (WebCore::CSSParser::parseImageSet):
1035         * css/CSSParser.h:
1036
1037         Since CSSImageSetValue is implemented as a value list, 
1038         ApplyPropertyFillLayer::applyValue() needs to be more specific when it's 
1039         looking for a list of multiple URLs.
1040         * css/CSSStyleApplyProperty.cpp:
1041         (WebCore::ApplyPropertyFillLayer::applyValue):
1042
1043         Handle image-set as a valid image value.
1044         * css/CSSStyleSelector.cpp:
1045         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1046         * css/CSSStyleSelector.h:
1047         (CSSStyleSelector):
1048         * css/CSSValue.cpp:
1049         (WebCore::CSSValue::cssText):
1050         (WebCore::CSSValue::destroy):
1051         * css/CSSValue.h:
1052         (CSSValue):
1053         (WebCore::CSSValue::isImageSetValue):
1054
1055         computeIntrinsicDimensions() now takes an optional scaleFactor parameter that represents the author-enforced "intrinsic" scale factor of the image.
1056         * loader/cache/CachedImage.cpp:
1057         (WebCore::CachedImage::computeIntrinsicDimensions):
1058         * loader/cache/CachedImage.h:
1059         (CachedImage):
1060         * platform/graphics/GeneratedImage.h:
1061         (GeneratedImage):
1062         * platform/graphics/GeneratorGeneratedImage.cpp:
1063         (WebCore::GeneratedImage::computeIntrinsicDimensions):
1064         * platform/graphics/Image.cpp:
1065         (WebCore::Image::computeIntrinsicDimensions):
1066         * platform/graphics/Image.h:
1067         (Image):
1068         * platform/graphics/cg/PDFDocumentImage.cpp:
1069         (WebCore::PDFDocumentImage::computeIntrinsicDimensions):
1070         * platform/graphics/cg/PDFDocumentImage.h:
1071         (PDFDocumentImage):
1072         * svg/graphics/SVGImage.cpp:
1073         (WebCore::SVGImage::computeIntrinsicDimensions):
1074         * svg/graphics/SVGImage.h:
1075         (SVGImage):
1076
1077         Inherits from StyleImage and returns a scaled size for imageSize() and 
1078         computeIntrinsicDimensions().
1079         * rendering/style/StyleCachedImageSet.cpp: Added.
1080         (WebCore):
1081         (WebCore::StyleCachedImageSet::StyleCachedImageSet):
1082         (WebCore::StyleCachedImageSet::cssValue):
1083         (WebCore::StyleCachedImageSet::canRender):
1084         (WebCore::StyleCachedImageSet::isLoaded):
1085         (WebCore::StyleCachedImageSet::errorOccurred):
1086         (WebCore::StyleCachedImageSet::imageSize):
1087         (WebCore::StyleCachedImageSet::imageHasRelativeWidth):
1088         (WebCore::StyleCachedImageSet::imageHasRelativeHeight):
1089         (WebCore::StyleCachedImageSet::computeIntrinsicDimensions):
1090         (WebCore::StyleCachedImageSet::usesImageContainerSize):
1091         (WebCore::StyleCachedImageSet::setContainerSizeForRenderer):
1092         (WebCore::StyleCachedImageSet::addClient):
1093         (WebCore::StyleCachedImageSet::removeClient):
1094         (WebCore::StyleCachedImageSet::image):
1095         * rendering/style/StyleCachedImageSet.h: Added.
1096         (WebCore):
1097         (StyleCachedImageSet):
1098         (WebCore::StyleCachedImageSet::create):
1099         (WebCore::StyleCachedImageSet::data):
1100         (WebCore::StyleCachedImageSet::cachedImage):
1101
1102         Handle image-set.
1103         * rendering/style/StyleImage.h:
1104         (WebCore::StyleImage::isCachedImageSet):
1105         (WebCore::StyleImage::StyleImage):
1106         (StyleImage):
1107         * rendering/style/StylePendingImage.h:
1108         (StylePendingImage):
1109         (WebCore::StylePendingImage::cssImageSetValue):
1110
1111 2012-03-21  David Barton  <dbarton@mathscribe.com>
1112
1113         MathML internals - improve naming in RenderMathMLSquareRoot.cpp and RenderMathMLRoot.cpp
1114         https://bugs.webkit.org/show_bug.cgi?id=81850
1115
1116         Reviewed by Eric Seidel.
1117
1118         This prepares these files for bug fixes, and eventually combining their common code. To
1119         understand this patch, I suggest you start with RenderMathMLSquareRoot.cpp, as it's
1120         simpler than RenderMathMLRoot.cpp.
1121
1122         No new tests. LayoutTests/mathml/presentation/roots.xhtml is thorough enough for this.
1123
1124         * rendering/mathml/RenderMathMLRoot.cpp:
1125         (WebCore):
1126         (WebCore::RenderMathMLRoot::addChild):
1127         (WebCore::RenderMathMLRoot::paint):
1128         (WebCore::RenderMathMLRoot::layout):
1129         * rendering/mathml/RenderMathMLRoot.h:
1130         (WebCore):
1131         (RenderMathMLRoot):
1132         * rendering/mathml/RenderMathMLSquareRoot.cpp:
1133         (WebCore):
1134         (WebCore::RenderMathMLSquareRoot::paint):
1135         (WebCore::RenderMathMLSquareRoot::layout):
1136         * rendering/mathml/RenderMathMLSquareRoot.h:
1137         (WebCore):
1138         (RenderMathMLSquareRoot):
1139         * rendering/mathml/RenderMathMLSubSup.h:
1140         (WebCore):
1141
1142 2012-03-21  Tony Chang  <tony@chromium.org>
1143
1144         refactor flexbox in preparation for flex-line-pack
1145         https://bugs.webkit.org/show_bug.cgi?id=81843
1146
1147         Reviewed by Ojan Vafai.
1148
1149         Replace WrapReverseContext with a vector of LineContexts that contain
1150         the same information, plus values needed for flex-align.
1151
1152         alignChildren has been moved to after all the lines have been
1153         positioned. We want to align children after flex-line-pack has changed
1154         the size of each line to avoid unnecessary layouts.
1155
1156         No new tests, just refactoring.
1157
1158         * rendering/RenderFlexibleBox.cpp:
1159         (WebCore::RenderFlexibleBox::LineContext::LineContext): New struct,
1160         holds information needed for wrap-reverse and aligning children.
1161         (RenderFlexibleBox::LineContext):
1162         (WebCore::RenderFlexibleBox::layoutFlexItems): alignChildren after layout out all the lines rather than after each line.
1163         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): don't alignChildren
1164         (WebCore::RenderFlexibleBox::alignChildren): align all flex items, not just a line at a time.
1165         (WebCore::RenderFlexibleBox::flipForWrapReverse): Update to use LineContext
1166         * rendering/RenderFlexibleBox.h:
1167
1168 2012-03-21  Ryosuke Niwa  <rniwa@webkit.org>
1169
1170         BDI element should have dir=auto by default
1171         https://bugs.webkit.org/show_bug.cgi?id=68773
1172
1173         Reviewed by Daniel Bates.
1174
1175         Treat bdi elements without dir content attribute as if they have dir=auto per spec:
1176         http://www.whatwg.org/specs/web-apps/current-work/multipage/text-level-semantics.html#the-bdi-element
1177
1178         The patch tries to encapsulate the logic to look for dir content attribute and dir=auto.
1179
1180         It also adds HTMLBDIElement interface (binding remains to use HTMLElement) to set
1181         selfOrAncestorHasDirAutoAttribute flag true by default, which is used by functions like
1182         directionalityIfhasDirAutoAttribute to look for elements with dir=auto. Since dir=auto-ness of bdi
1183         elements can be overridden by dir content attribute, we must change and only change the default value.
1184
1185         Tests: fast/text/international/bdi-dir-default-to-auto-expected.html
1186                fast/text/international/bdi-dir-default-to-auto.html
1187
1188         * GNUmakefile.list.am:
1189         * Target.pri:
1190         * WebCore.gypi:
1191         * WebCore.vcproj/WebCore.vcproj:
1192         * WebCore.xcodeproj/project.pbxproj:
1193         * css/CSSStyleSelector.cpp:
1194         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1195         * html/HTMLBDIElement.h: Added.
1196         (WebCore):
1197         (HTMLBDIElement):
1198         (WebCore::HTMLBDIElement::create):
1199         (WebCore::HTMLBDIElement::HTMLBDIElement): Sets selfOrAncestorHasDirAutoAttribute to true because
1200         bdi elements are treated as if it has dir=auto by default.
1201         * html/HTMLElement.cpp:
1202         (WebCore::elementAffectsDirectionality): Added. Checks if the specified element is bdi or
1203         has dir content attribute.
1204         (WebCore):
1205         (WebCore::setHasDirAutoFlagRecursively):
1206         (WebCore::HTMLElement::hasDirectionAuto): Added. Checks if the specified element should be treated
1207         as if it has dir=auto (bdi or element with dir=auto).
1208         (WebCore::HTMLElement::directionalityIfhasDirAutoAttribute):
1209         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildAttributeChanged):
1210         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
1211         * html/HTMLElement.h:
1212         (HTMLElement):
1213         * html/HTMLTagNames.in: Use HTMLBDIElement instead of HTMLElement for constructing bdi element
1214         to set selfOrAncestorHasDirAutoAttribute true but still use HTMLElement for binding.
1215
1216 2012-03-21  Luke Macpherson  <macpherson@chromium.org>
1217
1218         Use CSSPrimitiveValue::convertToLength() in a few places.
1219         https://bugs.webkit.org/show_bug.cgi?id=81492
1220
1221         Reviewed by Eric Seidel.
1222
1223         No new tests - refactoring only.
1224
1225         CSSPrimitiveValue::convertToLength() provides the same functionality that is duplicated
1226         in many places in CSSStyleSelector. This patch removes some of that code duplication.
1227
1228         * css/CSSStyleApplyProperty.cpp:
1229         (WebCore::ApplyPropertyVerticalAlign::applyValue):
1230         * css/CSSStyleSelector.cpp:
1231         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1232
1233 2012-03-21  Patrick Gansterer  <paroga@webkit.org>
1234
1235         Build fix for ENABLE(SVG) && !ENABLE(FILTERS) after r111601.
1236
1237         * rendering/svg/RenderSVGRoot.cpp:
1238
1239 2012-03-21  Patrick Gansterer  <paroga@webkit.org>
1240
1241         Build fix for !ENABLE(INSPECTOR) after r104831.
1242
1243         * bindings/js/ScriptDebugServer.cpp:
1244         (WebCore::ScriptDebugServer::dispatchDidParseSource):
1245
1246 2012-03-21  Xiaomei Ji  <xji@chromium.org>
1247
1248         visual word movement: using cache to decrease the number of collectLeafBoxesInLogicalOrder on RootInlineBox
1249         https://bugs.webkit.org/show_bug.cgi?id=81408
1250
1251         Reviewed by Ryosuke Niwa.
1252
1253         Cache logically ordered leaf boxes under a particular root box.
1254         Also, move 'Vector<UChar, 1024> string' declared in visualWordPosition() to outside of loop (it is always
1255         clear-ed before use).
1256
1257         * editing/visible_units.cpp:
1258         (CachedLogicallyOrderedLeafBoxes): Add class to cache logically ordered leaf boxes under a particular root box.
1259         (WebCore::CachedLogicallyOrderedLeafBoxes::size):
1260         (WebCore::CachedLogicallyOrderedLeafBoxes::firstBox):
1261         (WebCore):
1262         (WebCore::CachedLogicallyOrderedLeafBoxes::CachedLogicallyOrderedLeafBoxes):
1263         (WebCore::CachedLogicallyOrderedLeafBoxes::previousTextBox):
1264         (WebCore::CachedLogicallyOrderedLeafBoxes::nextTextBox):
1265         (WebCore::CachedLogicallyOrderedLeafBoxes::collectBoxes):
1266         (WebCore::CachedLogicallyOrderedLeafBoxes::boxIndexInLeaves):
1267         (WebCore::logicallyPreviousBox): Pass CachedLogicallyOrderedLeafBoxes object around.
1268         (WebCore::logicallyNextBox):
1269         (WebCore::wordBreakIteratorForMinOffsetBoundary):
1270         (WebCore::wordBreakIteratorForMaxOffsetBoundary):
1271         (WebCore::visualWordPosition):
1272
1273 2012-03-21  Dana Jansens  <danakj@chromium.org>
1274
1275         [chromium] Early out in a new prepareToDraw() step if checkerboarding an accelerated animation in order to skip the frame
1276         https://bugs.webkit.org/show_bug.cgi?id=81437
1277
1278         Reviewed by Adrienne Walker.
1279
1280         Split CCLayerTreeHostImpl::drawLayers() into two phases:
1281         prepareToDraw() and drawLayers().
1282
1283         When calculating a RenderPass, and we checkerboard a quad on a
1284         layer, bubble this info back up to CCLayerTreeHostImpl. If the
1285         layer is transforming in an animation, then abort the prepareToDraw()
1286         phase and cause it to return false back to the thread proxy.
1287
1288         Unit test: CCLayerTreeHostImplTest.prepareToDrawFailsWhenAnimationUsesCheckerboard
1289
1290         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1291         (WebCore::CCLayerImpl::appendQuads):
1292         * platform/graphics/chromium/cc/CCLayerImpl.h:
1293         (CCLayerImpl):
1294         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1295         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1296         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
1297         (WebCore):
1298         (WebCore::CCLayerTreeHostImpl::drawLayers):
1299         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1300         (CCLayerTreeHostImpl):
1301         (FrameData):
1302         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
1303         (WebCore::CCQuadCuller::append):
1304         * platform/graphics/chromium/cc/CCQuadCuller.h:
1305         (CCQuadCuller):
1306         * platform/graphics/chromium/cc/CCRenderPass.cpp:
1307         (WebCore::CCRenderPass::appendQuadsForLayer):
1308         * platform/graphics/chromium/cc/CCRenderPass.h:
1309         (CCRenderPass):
1310         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
1311         (WebCore::CCScrollbarLayerImpl::appendQuads):
1312         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
1313         (CCScrollbarLayerImpl):
1314         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1315         (WebCore::CCSingleThreadProxy::doComposite):
1316         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.cpp:
1317         (WebCore::CCSolidColorLayerImpl::appendQuads):
1318         * platform/graphics/chromium/cc/CCSolidColorLayerImpl.h:
1319         (CCSolidColorLayerImpl):
1320         * platform/graphics/chromium/cc/CCTextureLayerImpl.cpp:
1321         (WebCore::CCTextureLayerImpl::appendQuads):
1322         * platform/graphics/chromium/cc/CCTextureLayerImpl.h:
1323         (CCTextureLayerImpl):
1324         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1325         (WebCore::CCThreadProxy::scheduledActionDrawAndSwap):
1326         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
1327         (WebCore::CCTiledLayerImpl::appendQuads):
1328         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
1329         (CCTiledLayerImpl):
1330         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
1331         (WebCore::CCVideoLayerImpl::appendQuads):
1332         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
1333         (CCVideoLayerImpl):
1334
1335 2012-03-21  Enrica Casucci  <enrica@apple.com>
1336
1337         WebKitURLWithTitles pasteboard format should support URLs containing Emoji characters.
1338         https://bugs.webkit.org/show_bug.cgi?id=81835
1339         <rdar://problem/11082749>
1340
1341         Reviewed by Brady Eidson.
1342
1343         When writing the URL in the pasteboard for the WebURLWithTitles format,
1344         we use the user visible string instead of the original URL.
1345         In case of URL with Unicode characters, we lose the encoding.
1346         
1347         Added TestWebKitAPI test.
1348
1349         * platform/mac/PasteboardMac.mm:
1350         (WebCore::writeURLForTypes): Writes to the pasteboard the original URL.
1351
1352 2012-03-21  Levi Weintraub  <leviw@chromium.org>
1353
1354         Correct LayoutUnit usage in VisiblePosition.cpp
1355         https://bugs.webkit.org/show_bug.cgi?id=81775
1356
1357         Reviewed by Eric Seidel.
1358
1359         Correcting a mismatch between the .h and .cpp for the definition of localCaretRect,
1360         and properly using LayoutUnits for local coordinates.
1361
1362         No new tests. No change in behavior.
1363
1364         * editing/VisiblePosition.cpp:
1365         (WebCore::VisiblePosition::localCaretRect): Switching to return a LayoutRect, as in the
1366         header. Local coordinates are in LayoutUnits.
1367         (WebCore::VisiblePosition::absoluteCaretBounds): Using LayoutRect for the localCaretRect.
1368         (WebCore::VisiblePosition::lineDirectionPointForBlockDirectionNavigation): Ditto.
1369
1370 2012-03-21  Adam Klein  <adamk@chromium.org>
1371
1372         "this" argument for MutationCallbacks should be the MutationObserver
1373         https://bugs.webkit.org/show_bug.cgi?id=81712
1374
1375         Reviewed by Adam Barth.
1376
1377         Test: fast/mutation/callback-arguments.html
1378
1379         * bindings/js/JSCallbackData.cpp:
1380         (WebCore::JSCallbackData::invokeCallback): Add an overload that takes
1381         an explicit this argument and have the old method call the new one.
1382         * bindings/js/JSCallbackData.h:
1383         (JSCallbackData):
1384         * bindings/js/JSMutationCallbackCustom.cpp:
1385         (WebCore::JSMutationCallback::handleEvent): Call the new overload.
1386         * bindings/v8/custom/V8CustomVoidCallback.cpp:
1387         (WebCore::invokeCallback): Add an overload that takes an explicit this
1388         argument and have the old method call the new one.
1389         * bindings/v8/custom/V8CustomVoidCallback.h:
1390         (WebCore):
1391         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
1392         (WebCore::V8MutationCallback::handleEvent): Call the new overload.
1393
1394 2012-03-21  Alexandru Chiculita  <achicu@adobe.com>
1395
1396         [CSS Shaders] Make CSS Shaders compile on Chromium
1397         https://bugs.webkit.org/show_bug.cgi?id=81435
1398
1399         Reviewed by Stephen White.
1400
1401         This patch enables the CSS Shaders compile time flag, but keeps the runtime flag disabled.
1402         The only way to test the functionality now is to use the overridePreference from dump render tree.
1403
1404         Also part of this patch I fix a layering violation: I removed the "Document" reference from the FECustomFilter.cpp and passed the
1405         HostWindow directly. There should be no problem when the HostWindow changes, because the RenderLayer and the FECustomFilter
1406         get recreated anyway.
1407
1408         No new tests. I've updated the existing custom filter tests to run under Chromium and added the expected results.
1409         I've just added window.layoutTestController.overridePreference("WebKitCSSCustomFilterEnabled", "1") to force 
1410         enable the feature at runtime. 
1411
1412         * loader/cache/CachedResource.cpp: Made CachedResource::ShaderResource report as ResourceRequest::TargetIsSubresource for Chromium.
1413         (WebCore::cachedResourceTypeToTargetType):
1414
1415         * platform/graphics/filters/FECustomFilter.cpp:
1416         (WebCore::FECustomFilter::FECustomFilter): Removed Document and just used the HostWindow directly.
1417         (WebCore::FECustomFilter::create):
1418         (WebCore::FECustomFilter::initializeContext):
1419         (WebCore::FECustomFilter::bindVertexAttribute): There was a typo and instead of using the "size" parameter it always used 4 component attribute.
1420         Other drivers didn't complain about it, but it was clearly a bug.
1421         (WebCore::FECustomFilter::bindProgramAndBuffers): Reading the image back from GPU will flip vertically the framebuffer in Chromium. I've flipped the
1422         projection matrix only on Chromium, so that we get the correct result.
1423
1424         * rendering/FilterEffectRenderer.cpp:
1425         (WebCore::FilterEffectRenderer::build): Passing the HostWindow instead of the Document.
1426
1427 2012-03-21  Mark Pilgrim  <pilgrim@chromium.org>
1428
1429         Realphabetize about webaudio move
1430         https://bugs.webkit.org/show_bug.cgi?id=81825
1431
1432         Reviewed by Adam Barth.
1433
1434         No new tests, all existing tests pass.
1435
1436         * CMakeLists.txt:
1437
1438 2012-03-21  Anders Carlsson  <andersca@apple.com>
1439
1440         Evict tiles from pages in background tabs
1441         https://bugs.webkit.org/show_bug.cgi?id=81829
1442         <rdar://problem/10866152>
1443
1444         Reviewed by Andreas Kling.
1445
1446         When the tile cache for a page is no longer in a window (which happens when it's moved to 
1447         a background tab), schedule a tile revalidation after 4 seconds. This tile revalidation 
1448         will ensure that tiles outside of the visible rect will be dropped.
1449
1450         * platform/graphics/ca/mac/TileCache.h:
1451         (TileCache):
1452         * platform/graphics/ca/mac/TileCache.mm:
1453         (WebCore::TileCache::tileCacheLayerBoundsChanged):
1454         (WebCore::TileCache::setIsInWindow):
1455         (WebCore::TileCache::tileCoverageRect):
1456         (WebCore):
1457         (WebCore::TileCache::scheduleTileRevalidation):
1458         (WebCore::TileCache::revalidateTiles):
1459
1460 2012-03-21  Stephen Chenney  <schenney@chromium.org>
1461
1462         SVG layout leaves objects still needing layout
1463         https://bugs.webkit.org/show_bug.cgi?id=81006
1464
1465         Reviewed by Nikolas Zimmermann.
1466
1467         Change the layout of SVG objects such that resources that trigger
1468         layout of other objects are handled in a distinct pass, and then
1469         objects still requiring layout are laid out again.
1470
1471         Test: svg/custom/delete-text-innerText-crash.html
1472
1473         * rendering/svg/RenderSVGResourceContainer.cpp:
1474         (WebCore::RenderSVGResourceContainer::layout):
1475         * rendering/svg/RenderSVGResourceMarker.cpp:
1476         (WebCore::RenderSVGResourceMarker::layout):
1477         * rendering/svg/RenderSVGRoot.cpp:
1478         (WebCore::RenderSVGRoot::layout):
1479         (WebCore::RenderSVGRoot::addResourceForClientInvalidation):
1480         (WebCore):
1481         * rendering/svg/RenderSVGRoot.h:
1482         (RenderSVGRoot):
1483
1484 2012-03-21  Tim Horton  <timothy_horton@apple.com>
1485
1486         Make use of CG rounded-rect primitives
1487         https://bugs.webkit.org/show_bug.cgi?id=79932
1488         <rdar://problem/9274953>
1489
1490         Reviewed by Simon Fraser.
1491
1492         Portions of patch by Nikolas Zimmermann and Mustafizur Rahaman.
1493
1494         Dispatch to potentially platform-specific rounded rectangle path
1495         construction from addPathForRoundedRect. Make use of this to call
1496         wkCGPathAddRoundedRect on Lion and above, as long as the rounded
1497         corners are all equivalent.
1498
1499         The origin of the stroke dash differs between the bezier approach
1500         and the path added by wkCGPathAddRoundedRect, so Path::addRoundedRect()
1501         takes a new parameter allowing code which is sensitive to stroke dash
1502         origin (i.e. SVG) to fall back to the old behavior if need be.
1503
1504         Make use of the new Path::addRoundedRect() parameter to fall back to
1505         the old (bezier) rounded-rect behavior when constructing a dashed SVG path,
1506         in order to continue complying with the spec.
1507
1508         No new tests, as this is covered by many that use rounded corners,
1509         and is only a performance improvement.
1510
1511         * WebCore.exp.in:
1512         * platform/graphics/Path.cpp:
1513         (WebCore::Path::addRoundedRect):
1514         (WebCore):
1515         (WebCore::Path::addPathForRoundedRect):
1516         * platform/graphics/Path.h:
1517         (Path):
1518         * platform/graphics/cg/PathCG.cpp:
1519         (WebCore::Path::platformAddPathForRoundedRect):
1520         (WebCore):
1521         * platform/mac/WebCoreSystemInterface.h:
1522         * platform/mac/WebCoreSystemInterface.mm:
1523         * rendering/svg/SVGPathData.cpp:
1524         (WebCore::updatePathFromRectElement):
1525
1526 2012-03-21  David Reveman  <reveman@chromium.org>
1527
1528         [Chromium] GL_EXT_occlusion_query_boolean and GL_CHROMIUM_command_buffer_query support.
1529         https://bugs.webkit.org/show_bug.cgi?id=80988
1530
1531         Reviewed by Adrienne Walker.
1532
1533         Expose EXT_occlusion_query API to WebKit compositor. Add
1534         GL_EXT_occlusion_query_boolean and GL_CHROMIUM_command_buffer_query
1535         enums.
1536
1537         * platform/graphics/chromium/Extensions3DChromium.h:
1538         (Extensions3DChromium):
1539
1540 2012-03-21  Tony Chang  <tony@chromium.org>
1541
1542         compute the sign of flexibility for new flexbox
1543         https://bugs.webkit.org/show_bug.cgi?id=81722
1544
1545         Reviewed by Ojan Vafai.
1546
1547         This implements the computation of the sign of flexibility used by the
1548         new flexing algorithm.
1549         http://dev.w3.org/csswg/css3-flexbox/#resolve-the-flexible-lengths
1550
1551         No new tests, we don't use the sign of flexibility yet.
1552
1553         * rendering/RenderFlexibleBox.cpp:
1554         (WebCore::RenderFlexibleBox::layoutFlexItems):
1555         (WebCore::RenderFlexibleBox::computeNextFlexLine): Compute the size
1556         adjusted for min/max as well as not adjusted.
1557         (WebCore::RenderFlexibleBox::resolveFlexibleLengths): Renamed to match
1558         spec text better.
1559         * rendering/RenderFlexibleBox.h: Added enum for flex sign.
1560
1561 2012-03-21  Vsevolod Vlasov  <vsevik@chromium.org>
1562
1563         Web Inspector: Extract WebInspector.UIBreakpoint from WebInspector.Breakpoint.
1564         https://bugs.webkit.org/show_bug.cgi?id=81669
1565
1566         Reviewed by Pavel Feldman.
1567
1568         * inspector/front-end/BreakpointManager.js:
1569         (WebInspector.BreakpointManager.get for):
1570         (WebInspector.BreakpointManager):
1571         (WebInspector.BreakpointManager.prototype.uiSourceCodeAdded):
1572         (WebInspector.BreakpointManager.prototype.uiSourceCodeRemoved):
1573         (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode):
1574         (WebInspector.BreakpointManager.prototype.setBreakpoint):
1575         (WebInspector.BreakpointManager.prototype.removeBreakpoint):
1576         (WebInspector.BreakpointManager.prototype._innerRemoveBreakpoint):
1577         (WebInspector.BreakpointManager.prototype.removeAllBreakpoints):
1578         (WebInspector.BreakpointManager.prototype._moveBreakpointInUI):
1579         (WebInspector.BreakpointManager.prototype._uiBreakpoints.get this):
1580         (WebInspector.BreakpointManager.prototype._uiBreakpoints):
1581         (WebInspector.BreakpointManager.prototype.get _uiBreakpoint):
1582         (WebInspector.BreakpointManager.prototype._addBreakpointToUI):
1583         (WebInspector.BreakpointManager.prototype._removeBreakpointFromUI):
1584         (WebInspector.BreakpointManager.prototype._breakpoints):
1585         (WebInspector.BreakpointManager.prototype._breakpoint):
1586         (WebInspector.BreakpointManager.prototype._addBreakpointToModel):
1587         (WebInspector.BreakpointManager.prototype._removeBreakpointFromModel):
1588         (WebInspector.BreakpointManager.prototype._forEachBreakpoint):
1589         (WebInspector.BreakpointManager.prototype._setBreakpointInDebugger):
1590         (WebInspector.BreakpointManager.prototype._removeBreakpointFromDebugger):
1591         (WebInspector.BreakpointManager.prototype.debuggerReset):
1592         (WebInspector.Breakpoint.prototype.serialize):
1593         (WebInspector.Breakpoint.prototype.get uiBreakpoint):
1594         (WebInspector.Breakpoint.prototype.createUIBreakpoint):
1595         (WebInspector.Breakpoint.prototype.removeUIBreakpoint):
1596         (WebInspector.UIBreakpoint):
1597         * inspector/front-end/DebuggerPresentationModel.js:
1598         (WebInspector.DebuggerPresentationModel.prototype._handleUISourceCodeListChanged):
1599         (WebInspector.DebuggerPresentationModel.prototype.findBreakpoint):
1600         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
1601         (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
1602         * inspector/front-end/ScriptsPanel.js:
1603
1604 2012-03-21  Anders Carlsson  <andersca@apple.com>
1605
1606         TileCache needs to know if its containing page is in a window
1607         https://bugs.webkit.org/show_bug.cgi?id=81821
1608
1609         Reviewed by Andreas Kling.
1610
1611         This is in preparation for throwing away invisible tiles in background tabs to reduce memory usage.
1612
1613         * page/FrameView.cpp:
1614         (WebCore::FrameView::didMoveOnscreen):
1615         (WebCore::FrameView::willMoveOffscreen):
1616         * page/Page.cpp:
1617         (WebCore::Page::Page):
1618         (WebCore::Page::didMoveOnscreen):
1619         (WebCore::Page::willMoveOffscreen):
1620         * page/Page.h:
1621         (WebCore::Page::isOnscreen):
1622         (Page):
1623         * platform/graphics/TiledBacking.h:
1624         (TiledBacking):
1625         * platform/graphics/ca/mac/TileCache.h:
1626         (TileCache):
1627         * platform/graphics/ca/mac/TileCache.mm:
1628         (WebCore::TileCache::TileCache):
1629         (WebCore::TileCache::setIsInWindow):
1630         (WebCore):
1631         * rendering/RenderLayerBacking.cpp:
1632         (WebCore::RenderLayerBacking::RenderLayerBacking):
1633
1634 2012-03-21  Xingnan Wang  <xingnan.wang@intel.com>
1635
1636         Web audio layout test failed in debug with an ASSERT error in ReverbConvolverStage.cpp
1637         https://bugs.webkit.org/show_bug.cgi?id=81744
1638
1639         Reviewed by Chris Rogers.
1640
1641         * platform/audio/ReverbConvolverStage.cpp:
1642         (WebCore::ReverbConvolverStage::ReverbConvolverStage):
1643
1644 2012-03-21  Xiaomei Ji  <xji@chromium.org>
1645
1646         [chromium] Font fallback in cr-win is wrong for string contains zero-width-space.
1647         https://bugs.webkit.org/show_bug.cgi?id=79961
1648
1649         Reviewed by Adam Barth.
1650
1651         Treat zero-width-space (\u200B) as true for treatAsZeroWidthSpaceInComplexScipt().
1652
1653         * platform/graphics/Font.h:
1654         (WebCore::Font::treatAsZeroWidthSpaceInComplexScript):
1655         * platform/graphics/mac/ComplexTextController.cpp:
1656         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
1657         * platform/graphics/win/UniscribeController.cpp:
1658         (WebCore::UniscribeController::shapeAndPlaceItem):
1659
1660 2012-03-21  Patrick Gansterer  <paroga@webkit.org>
1661
1662         Build fix for !ENABLE(INSPECTOR) after r111005.
1663
1664         * inspector/ContentSearchUtils.h:
1665
1666 2012-03-21  Ulan Degenbaev  <ulan@chromium.org>
1667
1668         [V8] V8GCForContextDispose should indicate whether a context is disposed for the main frame or not
1669         https://bugs.webkit.org/show_bug.cgi?id=81200
1670
1671         Reviewed by Adam Barth.
1672
1673         Pass a hint to V8::IdleNotification that requests more aggressive GC
1674         when a main frame context is disposed and requests incremental GC otherwise.
1675
1676         * bindings/v8/V8DOMWindowShell.cpp:
1677         (WebCore::V8DOMWindowShell::disposeContextHandles):
1678         * bindings/v8/V8GCForContextDispose.cpp:
1679         (WebCore::V8GCForContextDispose::V8GCForContextDispose):
1680         (WebCore::V8GCForContextDispose::notifyContextDisposed):
1681         (WebCore::V8GCForContextDispose::pseudoIdleTimerFired):
1682         * bindings/v8/V8GCForContextDispose.h:
1683         (V8GCForContextDispose):
1684
1685 2012-03-21  Nat Duca  <nduca@chromium.org>
1686
1687         [chromium] CCThreadProxy must initialize frameBeginTime to monotonicallyIncreasingTime rather than zero
1688         https://bugs.webkit.org/show_bug.cgi?id=81790
1689
1690         Reviewed by James Robinson.
1691
1692         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1693         (WebCore::CCThreadProxy::scheduledActionBeginFrame):
1694
1695 2012-03-21  Xingnan Wang  <xingnan.wang@intel.com>
1696
1697         Add multichannel support in RealtimeAnalyser
1698         https://bugs.webkit.org/show_bug.cgi?id=81745
1699
1700         Reviewed by Chris Rogers.
1701
1702         * Modules/webaudio/RealtimeAnalyser.cpp:
1703         (WebCore::RealtimeAnalyser::writeInput):
1704         (WebCore):
1705
1706 2012-03-21  Eric Carlson  <eric.carlson@apple.com>
1707
1708         Removing HTMLTrackElement does not delete TextTrack
1709         https://bugs.webkit.org/show_bug.cgi?id=80873
1710
1711         Reviewed by Antti Koivisto.
1712
1713         No new tests, but media/track/track-language-preference.html has been updated
1714         to test this fix.
1715
1716         * html/HTMLMediaElement.cpp:
1717         (WebCore::HTMLMediaElement::didAddTrack): Renamed from trackWasAdded.
1718         (WebCore::HTMLMediaElement::willRemoveTrack): Renamed from trackWasRemoved because it is
1719         called before the track is removed, to allow the TextTrack to be removed.
1720         * html/HTMLMediaElement.h:
1721
1722         * html/HTMLTrackElement.cpp:
1723         (WebCore::HTMLTrackElement::insertedIntoTree): Renamed from insertedIntoDocument
1724         (WebCore::HTMLTrackElement::willRemove): Renamed from removedFromDocument.
1725         * html/HTMLTrackElement.h:
1726
1727         * html/track/LoadableTextTrack.cpp:
1728         (WebCore::LoadableTextTrack::trackElementIndex): Don't include tracks that are not in the
1729         document in the calcualtion.
1730
1731 2012-03-21  Zeno Albisser  <zeno@webkit.org>
1732
1733         [Qt][Mac] ranlib segfaults when creating symbol tables for libWebCore.a.
1734         https://bugs.webkit.org/show_bug.cgi?id=81750
1735
1736         Building WebCore on mac currently creates an archive that is bigger than
1737         4GB. But ranlib fails to create a symbol table for such a big archive,
1738         even on 64bit machines.
1739         Therefore we start using SVGAllInOne.cpp when building debug
1740         on mac. This reduces the size of the archive by about 300MB.
1741
1742         Reviewed by Tor Arne Vestbø.
1743
1744         * Target.pri:
1745
1746 2012-03-21  Tommy Widenflycht  <tommyw@google.com>
1747
1748         [chromium] MediaStream API (JSEP): Introducing WebSessionDescription and WebIceCandidate
1749         https://bugs.webkit.org/show_bug.cgi?id=81339
1750
1751         Reviewed by Adam Barth.
1752
1753         Not possible to test until the entire JSEP feature is commited.
1754
1755         * Modules/mediastream/IceCandidate.cpp:
1756         (WebCore::IceCandidate::toSdp):
1757         * Modules/mediastream/SessionDescription.cpp:
1758         (WebCore::SessionDescription::toSdp):
1759         * platform/mediastream/IceCandidateDescriptor.cpp:
1760         (WebCore::IceCandidateDescriptor::toSDP):
1761         * platform/mediastream/IceCandidateDescriptor.h:
1762         (IceCandidateDescriptor):
1763         * platform/mediastream/MediaStreamCenter.cpp:
1764         (WebCore::MediaStreamCenter::constructSDP):
1765         * platform/mediastream/MediaStreamCenter.h:
1766         (MediaStreamCenter):
1767         * platform/mediastream/SessionDescriptionDescriptor.cpp:
1768         (WebCore::SessionDescriptionDescriptor::SessionDescriptionDescriptor):
1769         (WebCore::SessionDescriptionDescriptor::toSDP):
1770         (WebCore::SessionDescriptionDescriptor::initialSDP):
1771         * platform/mediastream/SessionDescriptionDescriptor.h:
1772         (SessionDescriptionDescriptor):
1773
1774 2012-03-21  Yuta Kitamura  <yutak@chromium.org>
1775
1776         Use RFC version of WebSocket protocol by default
1777         https://bugs.webkit.org/show_bug.cgi?id=81718
1778
1779         Reviewed by Kent Tamura.
1780
1781         Flip the default value of Settings::m_useHixie76WebSocketProtocol so WebKit ports will use
1782         RFC version of WebSocket protocol by default.
1783
1784         All the existing ports already use the RFC protocol as of now, so this change will not make
1785         any impact (hopefully).
1786
1787         No new tests. No change in functionality.
1788
1789         * page/Settings.cpp:
1790         (WebCore::Settings::Settings):
1791
1792 2012-03-21  Andrey Kosyakov  <caseq@chromium.org>
1793
1794         Web Inspector: only show JS event listeners in Event Listeners tab of Elements panel
1795         https://bugs.webkit.org/show_bug.cgi?id=81798
1796
1797         Reviewed by Pavel Feldman.
1798
1799         * bindings/js/JSInjectedScriptHostCustom.cpp:
1800         (WebCore::getJSListenerFunctions):
1801         * bindings/js/ScriptEventListener.cpp:
1802         (WebCore::eventListenerHandlerBody):
1803         (WebCore::eventListenerHandlerLocation):
1804         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1805         (WebCore::getJSListenerFunctions):
1806         * inspector/InspectorDOMAgent.cpp:
1807         (WebCore::InspectorDOMAgent::getEventListeners):
1808
1809 2012-03-21  Andrey Kosyakov  <caseq@chromium.org>
1810
1811         EventListener::Type enum has unused member InspectorDOMAgentType
1812         https://bugs.webkit.org/show_bug.cgi?id=81794
1813
1814         Reviewed by Pavel Feldman.
1815
1816         * dom/EventListener.h:
1817
1818 2012-03-21  Tom Hudson  <tomhudson@google.com>
1819
1820         Incremental cleanup of BitmapImage: inlined virtual functions
1821         https://bugs.webkit.org/show_bug.cgi?id=81688
1822
1823         Reviewed by James Robinson.
1824
1825         No change in functionality, so no new tests.
1826
1827         Move virtual functions defined in headers into .cpp files.
1828
1829         * WebCore.gypi:
1830         * platform/graphics/BitmapImage.cpp:
1831         (WebCore::BitmapImage::isBitmapImage):
1832         (WebCore):
1833         (WebCore::BitmapImage::hasSingleSecurityOrigin):
1834         (WebCore::BitmapImage::nativeImageForCurrentFrame):
1835         (WebCore::BitmapImage::currentFrameHasAlpha):
1836         (WebCore::BitmapImage::notSolidColor):
1837         (WebCore::BitmapImage::decodedSize):
1838         (WebCore::BitmapImage::mayFillWithSolidColor):
1839         (WebCore::BitmapImage::solidColor):
1840         * platform/graphics/BitmapImage.h:
1841         (BitmapImage):
1842         * platform/graphics/skia/BitmapImageSingleFrameSkia.cpp: Added.
1843         (WebCore):
1844         (WebCore::BitmapImageSingleFrameSkia::isBitmapImage):
1845         (WebCore::BitmapImageSingleFrameSkia::currentFrameHasAlpha):
1846         (WebCore::BitmapImageSingleFrameSkia::size):
1847         (WebCore::BitmapImageSingleFrameSkia::destroyDecodedData):
1848         (WebCore::BitmapImageSingleFrameSkia::decodedSize):
1849         (WebCore::BitmapImageSingleFrameSkia::nativeImageForCurrentFrame):
1850         (WebCore::BitmapImageSingleFrameSkia::notSolidColor):
1851         * platform/graphics/skia/BitmapImageSingleFrameSkia.h:
1852         (BitmapImageSingleFrameSkia):
1853
1854 2012-03-21  Alexey Proskuryakov  <ap@apple.com>
1855
1856         Remove obsolete File attributes
1857         https://bugs.webkit.org/show_bug.cgi?id=79383
1858
1859         Reviewed by Hajime Morita.
1860
1861         * bindings/objc/PublicDOMInterfaces.h:
1862         * fileapi/File.h:
1863         * fileapi/File.idl:
1864         Removed fileName and fileSize, they have different names now.
1865
1866         * html/FileInputType.cpp:
1867         (WebCore::FileInputType::appendFormData):
1868         (WebCore::FileInputType::getTypeSpecificValue):
1869         (WebCore::FileInputType::defaultToolTip):
1870         Updated to use new function names.
1871
1872 2012-03-21  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1873
1874         TiledBackingStore: Create the first round of tiles synchronously after setting the visible rect.
1875         https://bugs.webkit.org/show_bug.cgi?id=81762
1876
1877         Reviewed by Kenneth Rohde Christiansen.
1878
1879         The first round of tiles should cover completely the visible rect.
1880         Creating the tiles synchronously allows us to get the new tiles immediately
1881         and prevents an extra AC layers sync to be able to remove the old tiles.
1882
1883         At some point it might also make sense to remove the tile creation timer
1884         completely.
1885
1886         * platform/graphics/TiledBackingStore.cpp:
1887         (WebCore::TiledBackingStore::coverWithTilesIfNeeded):
1888
1889 2012-03-19  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1890
1891         TiledBackingStore: When checking if the visible area is covered, only convert to scaled coordinates once.
1892         https://bugs.webkit.org/show_bug.cgi?id=81519
1893
1894         Reviewed by Kenneth Rohde Christiansen.
1895
1896         Both visibleRect and coverageRatio call mapFromContents on the input rect,
1897         this woulc cause the coverageRatio to never reach 1.0 when the contents is
1898         scaled up.
1899
1900         * platform/graphics/TiledBackingStore.cpp:
1901         (WebCore::TiledBackingStore::visibleAreaIsCovered):
1902
1903 2012-03-21  Mao Yujie  <yujie.mao@intel.com>
1904
1905         MediaStream API: Need to support MediaStream constructor for JSC
1906         https://bugs.webkit.org/show_bug.cgi?id=78781
1907
1908         Reviewed by Adam Barth.
1909
1910         No new tests.
1911
1912         * Modules/mediastream/DOMWindowMediaStream.idl:
1913         * bindings/generic/RuntimeEnabledFeatures.h:
1914         (WebCore::RuntimeEnabledFeatures::webkitMediaStreamEnabled):
1915
1916 2012-03-21  Philip Rogers  <pdr@google.com>
1917
1918         Skip building resources if SVGTRef is not in a document
1919         https://bugs.webkit.org/show_bug.cgi?id=81473
1920
1921         Reviewed by Nikolas Zimmermann.
1922
1923         We can skip the building of pending resources in SVGTRef if we're not
1924         yet in a document. This mirrors the nearly identical logic in
1925         SVGUseElement::buildPendingResource() and
1926         SVGFEImageElement::buildPendingResource().
1927
1928         Test: http/tests/svg/tref-adoptNode-crash.html
1929
1930         * svg/SVGTRefElement.cpp:
1931         (WebCore::SVGTRefElement::buildPendingResource):
1932
1933 2012-03-21  Sami Kyostila  <skyostil@chromium.org>
1934
1935         [chromium] Use floating point scroll deltas for layers
1936         https://bugs.webkit.org/show_bug.cgi?id=81546
1937
1938         Reviewed by James Robinson.
1939
1940         Use floating point scroll deltas for layers instead of integral scroll
1941         deltas. This is because due to page scaling it may be necessary to
1942         scroll layers in sub-CSS-pixel steps to avoid visible jumps. When the
1943         floating point scroll offset is committed to the main thread, it is
1944         truncated to integer, but the fractional part is kept on the CC side to
1945         make sure fractional scroll offsets are accumulated correctly over
1946         multiple commits.
1947
1948         Test: CCLayerTreeHostTestFractionalScroll
1949
1950         * platform/graphics/FloatPoint.h:
1951         (WebCore::toSize):
1952         (WebCore):
1953         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1954         (WebCore::CCLayerImpl::scrollBy):
1955         (WebCore::CCLayerImpl::setScrollDelta):
1956         * platform/graphics/chromium/cc/CCLayerImpl.h:
1957         (WebCore::CCLayerImpl::scrollDelta):
1958         (CCLayerImpl):
1959         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1960         (WebCore::CCLayerTreeHostImpl::startPageScaleAnimation):
1961         (WebCore::CCLayerTreeHostImpl::adjustScrollsForPageScaleChange):
1962         (WebCore::CCLayerTreeHostImpl::processScrollDeltas):
1963         (WebCore::CCLayerTreeHostImpl::animatePageScale):
1964
1965 2012-03-21  Li Yin  <li.yin@intel.com>
1966
1967         [WebSocket]The Sec-WebSocket-Accept MUST NOT appear more than once in an HTTP response
1968         https://bugs.webkit.org/show_bug.cgi?id=81655
1969
1970         Reviewed by Adam Barth.
1971
1972         Test: http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header.html
1973
1974         * Modules/websockets/WebSocketHandshake.cpp:
1975         (WebCore::WebSocketHandshake::readHTTPHeaders):
1976
1977 2012-03-21  Alexei Filippov  <alexeif@chromium.org>
1978
1979         Web Inspector: Speedup heap snapshot loading.
1980         https://bugs.webkit.org/show_bug.cgi?id=81788
1981
1982         Reviewed by Yury Semikhatsky.
1983
1984         * inspector/front-end/HeapSnapshot.js:
1985         (WebInspector.HeapSnapshotLoader.prototype._parseNodes):
1986
1987 2012-03-21  Pavel Feldman  <pfeldman@chromium.org>
1988
1989         Web Inspector: get rid of isInEditMode, use isBeingEdited on particular element.
1990         https://bugs.webkit.org/show_bug.cgi?id=81766
1991
1992         Reviewed by Yury Semikhatsky.
1993
1994         We should check event target and its ancestors for being edited, not use some
1995         global property. This change also introduces Event.prototype.consume so that we
1996         were consistently consuming events.
1997
1998         * inspector/front-end/AdvancedSearchController.js:
1999         (WebInspector.SearchView.prototype._onKeyDown):
2000         * inspector/front-end/BreakpointsSidebarPane.js:
2001         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._breakpointCheckboxClicked):
2002         * inspector/front-end/CSSSelectorProfileView.js:
2003         * inspector/front-end/Checkbox.js:
2004         (WebInspector.Checkbox.prototype.addEventListener):
2005         * inspector/front-end/ConsoleView.js:
2006         (WebInspector.ConsoleView.prototype._enterKeyPressed):
2007         (WebInspector.ConsoleGroup.prototype._titleClicked):
2008         * inspector/front-end/ContextMenu.js:
2009         (WebInspector.ContextMenu.prototype.show):
2010         * inspector/front-end/DataGrid.js:
2011         (WebInspector.DataGrid.prototype._keyDown):
2012         * inspector/front-end/DatabaseQueryView.js:
2013         (WebInspector.DatabaseQueryView.prototype._enterKeyPressed):
2014         * inspector/front-end/DetailedHeapshotView.js:
2015         (WebInspector.DetailedHeapshotView.prototype._mouseDownInContentsGrid):
2016         (WebInspector.DetailedHeapshotView.prototype._startRetainersHeaderDragging):
2017         (WebInspector.DetailedHeapshotView.prototype._retainersHeaderDragging):
2018         (WebInspector.DetailedHeapshotView.prototype._endRetainersHeaderDragging):
2019         * inspector/front-end/Dialog.js:
2020         (WebInspector.Dialog.prototype._onKeyDown):
2021         * inspector/front-end/Drawer.js:
2022         (WebInspector.Drawer.prototype._startStatusBarDragging):
2023         (WebInspector.Drawer.prototype._statusBarDragging):
2024         (WebInspector.Drawer.prototype._endStatusBarDragging):
2025         * inspector/front-end/EventListenersSidebarPane.js:
2026         (WebInspector.EventListenersSidebarPane.get if):
2027         * inspector/front-end/HelpScreen.js:
2028         (WebInspector.HelpScreen.prototype._onKeyDown):
2029         * inspector/front-end/InspectorView.js:
2030         (WebInspector.InspectorView.prototype._keyDown):
2031         * inspector/front-end/MetricsSidebarPane.js:
2032         (WebInspector.MetricsSidebarPane.prototype._highlightDOMNode):
2033         * inspector/front-end/NetworkPanel.js:
2034         * inspector/front-end/Object.js:
2035         (WebInspector.Event.prototype.preventDefault):
2036         (WebInspector.Event.prototype.consume):
2037         * inspector/front-end/ObjectPropertiesSection.js:
2038         (WebInspector.ObjectPropertyTreeElement.prototype._promptKeyDown):
2039         * inspector/front-end/ProfileView.js:
2040         * inspector/front-end/SearchController.js:
2041         (WebInspector.SearchController.prototype._onKeyDown):
2042         * inspector/front-end/Section.js:
2043         (WebInspector.Section.prototype.handleClick):
2044         * inspector/front-end/Settings.js:
2045         (WebInspector.ExperimentsSettings):
2046         * inspector/front-end/SoftContextMenu.js:
2047         (.WebInspector.SoftContextMenu.prototype.show):
2048         (.WebInspector.SoftContextMenu.prototype._menuItemMouseDown):
2049         (.WebInspector.SoftContextMenu.prototype._menuKeyDown):
2050         (.WebInspector.SoftContextMenu.prototype._discardMenu):
2051         * inspector/front-end/Spectrum.js:
2052         (WebInspector.Spectrum.draggable.consume):
2053         (WebInspector.Spectrum.draggable.start):
2054         (WebInspector.Spectrum.draggable.stop):
2055         (WebInspector.Spectrum.draggable):
2056         (WebInspector.Spectrum.prototype._onKeyDown):
2057         * inspector/front-end/StylesSidebarPane.js:
2058         (WebInspector.StylesSidebarPane.muteEventListener):
2059         (WebInspector.StylesSidebarPane):
2060         (WebInspector.StylesSidebarPane.prototype.set _createNewRule):
2061         (WebInspector.StylesSidebarPane.prototype._toggleElementStatePane):
2062         (WebInspector.StylePropertiesSection.prototype._handleEmptySpaceClick):
2063         (WebInspector.StylePropertiesSection.prototype._handleSelectorClick):
2064         (WebInspector.StylePropertyTreeElement.prototype.updateTitle.):
2065         (WebInspector.StylePropertyTreeElement.prototype):
2066         * inspector/front-end/TextPrompt.js:
2067         (WebInspector.TextPrompt.prototype.onKeyDown):
2068         (WebInspector.TextPromptWithHistory.prototype.defaultKeyHandler):
2069         (WebInspector.TextPrompt.SuggestBox.prototype._onItemMouseDown):
2070         * inspector/front-end/TextViewer.js:
2071         (WebInspector.TextViewer.prototype._handleKeyDown):
2072         * inspector/front-end/Toolbar.js:
2073         (WebInspector.ToolbarDropdown.prototype._onKeyDown):
2074         * inspector/front-end/UIUtils.js:
2075         (WebInspector.isBeingEdited):
2076         (WebInspector.startEditing):
2077         * inspector/front-end/View.js:
2078         (WebInspector.View.prototype._doLoadCSS):
2079         * inspector/front-end/WatchExpressionsSidebarPane.js:
2080         (WebInspector.WatchExpressionsSidebarPane.prototype._addButtonClicked):
2081         (WebInspector.WatchExpressionsSidebarPane.prototype._refreshButtonClicked):
2082         * inspector/front-end/inspector.js:
2083         (WebInspector.documentClick.followLink):
2084         (WebInspector.documentClick):
2085         (WebInspector.documentKeyDown):
2086         (WebInspector.postDocumentKeyDown):
2087         (WebInspector.addMainEventListeners):
2088         * inspector/front-end/treeoutline.js:
2089         (TreeOutline.prototype._treeKeyPress):
2090         (TreeOutline.prototype._treeKeyDown):
2091         (TreeOutline.prototype._searchInputKeyDown):
2092         (TreeElement.treeElementToggled):
2093         (TreeElement.prototype.selectOnMouseDown):
2094         * inspector/front-end/utilities.js:
2095         (Event.prototype.consume):
2096
2097 2012-03-21  Yury Semikhatsky  <yurys@chromium.org>
2098
2099         Web Inspector: event listener section doesn't show all event listeners of the element ancestors
2100         https://bugs.webkit.org/show_bug.cgi?id=81782
2101
2102         Event listeners section now contains all event listeners for the selected
2103         element ancestors chain (in case option "All Nodes" is selected).
2104
2105         Reviewed by Pavel Feldman.
2106
2107         * inspector/InspectorDOMAgent.cpp:
2108         (WebCore::InspectorDOMAgent::getEventListenersForNode):
2109         * inspector/front-end/EventListenersSidebarPane.js:
2110         (WebInspector.EventListenersSidebarPane.prototype.update.callback):
2111         (WebInspector.EventListenersSidebarPane.prototype.update):
2112         (WebInspector.EventListenersSidebarPane.prototype):
2113
2114 2012-03-21  Ilya Tikhonovsky  <loislo@chromium.org>
2115
2116         Web Inspector: HeapSnapshot: move all builders and calculation calls to HeapSnapshot._init function.
2117         https://bugs.webkit.org/show_bug.cgi?id=81784
2118
2119         Reviewed by Yury Semikhatsky.
2120
2121         * inspector/front-end/HeapSnapshot.js:
2122         (WebInspector.HeapSnapshot.prototype._init):
2123         (WebInspector.HeapSnapshot.prototype.dispose):
2124         (WebInspector.HeapSnapshot.prototype._retainersForNode):
2125         (WebInspector.HeapSnapshot.prototype._dominatedNodesOfNode):
2126         (WebInspector.HeapSnapshot.prototype._flagsOfNode):
2127         (WebInspector.HeapSnapshot.prototype.aggregates):
2128         (WebInspector.HeapSnapshot.prototype._buildRetainers):
2129         (WebInspector.HeapSnapshot.prototype.get nodeIndexes):
2130
2131 2012-03-21  Jessie Berlin  <jberlin@apple.com>
2132
2133         WTF headers should be in $(ConfigurationBuildDir)\include\private\wtf, not
2134         $(ConfigurationBuildDir)\include\private\JavaScriptCore\wtf.
2135         https://bugs.webkit.org/show_bug.cgi?id=81739
2136
2137         Reviewed by Dan Bernstein.
2138
2139         * WebCore.vcproj/WebCore.vcproj:
2140         Look for AtomicString.cpp, StringBuilder.cpp, StringImpl.cpp, and WTFString.cpp in the wtf
2141         subdirectory of the build output, not the JavaScriptCore/wtf subdirectory.
2142
2143 2012-03-21  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2144
2145         [BlackBerry] Credential save and autofill implemetation
2146         https://bugs.webkit.org/show_bug.cgi?id=80401
2147
2148         Reviewed by Rob Buis.
2149
2150         Added interface function authenticationChallenge() and
2151         notifyShouldSaveCredential() into PageClientBlackBerry.
2152         As this class is our platform specific interface,
2153         by doing this we don't need to add an interface function
2154         in class FrameLoaderClient which is a platform
2155         independent interface.
2156
2157         No new tests.
2158
2159         * platform/blackberry/PageClientBlackBerry.h:
2160         (WebCore):
2161         * platform/network/blackberry/NetworkJob.cpp:
2162         (WebCore::NetworkJob::sendRequestWithCredentials):
2163
2164 2012-03-21  Ilya Tikhonovsky  <loislo@chromium.org>
2165
2166         Web Inspector: HeapProfiler: DOM node id can overflow Int32.
2167         https://bugs.webkit.org/show_bug.cgi?id=81776
2168
2169         Reviewed by Pavel Feldman.
2170
2171         * inspector/front-end/HeapSnapshot.js:
2172         (WebInspector.Uint32Array):
2173         (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk):
2174         (WebInspector.HeapSnapshot.prototype._buildReverseIndex.var):
2175         (WebInspector.HeapSnapshot.prototype._buildReverseIndex):
2176         (WebInspector.HeapSnapshot.prototype._buildNodeIndex):
2177
2178 2012-03-21  Tim Dresser  <tdresser@chromium.org>
2179
2180         [chromium] Increase size of Combo Box Options for touch and high DPI devices
2181         https://bugs.webkit.org/show_bug.cgi?id=80027
2182
2183         Reviewed by Darin Fisher.
2184
2185         Scale Combo box popups by defaultDeviceScaleFactor, and add padding to
2186         <option> elements when touch is enabled.
2187
2188         Manually tested with --default-device-scale-factor=1,2 and unset.
2189         Each of these were tested with RuntimeEnabledFeatures::touchEnabled
2190         set to true and false.
2191
2192         * platform/chromium/PopupListBox.cpp:
2193         (WebCore::PopupListBox::paint):
2194         (WebCore::PopupListBox::paintRow):
2195         (WebCore::PopupListBox::getRowHeight):
2196         * platform/chromium/PopupListBox.h:
2197         (PopupContainerSettings):
2198         * platform/chromium/PopupMenuChromium.cpp:
2199         (WebCore):
2200         (WebCore::PopupMenuChromium::show):
2201         * platform/chromium/PopupMenuChromium.h:
2202         (WebCore::PopupMenuChromium::optionPaddingForTouch):
2203         (WebCore::PopupMenuChromium::setOptionPaddingForTouch):
2204         (PopupMenuChromium):
2205         * rendering/RenderMenuList.cpp:
2206         (WebCore::RenderMenuList::showPopup):
2207
2208 2012-03-21  Takashi Toyoshima  <toyoshim@chromium.org>
2209
2210         [Chromium] [WebSocket] provide WebFrameClient with a chance of
2211         accessing to opening WebSocketStreamHandle.
2212         https://bugs.webkit.org/show_bug.cgi?id=78459
2213
2214         Reviewed by Kent Tamura and Darin Fisher.
2215
2216         Add willOpenSocketStream client function to WebFrameClient with an
2217         argument representing an opening SocketStreamHandle.
2218         These mechanisms provide embedders with a chance to bind arbitrary
2219         data to a WebSocketStreamHandle from WebFrameClient to which the
2220         WebSocket object having the WebSocketStreamHandle belongs.
2221
2222         No new tests because this change just provide mechanisms to embedders.
2223
2224         * Modules/websockets/WebSocketChannel.cpp: Implement willOpenSocketStream to call a client function in WebFrameClient.
2225         (WebCore::WebSocketChannel::willOpenSocketStream):
2226         (WebCore):
2227         * Modules/websockets/WebSocketChannel.h: Add willOpenSocketStream declaration.
2228         (WebSocketChannel):
2229         * loader/FrameLoaderClient.h: Add dispatchWillOpenSocketStream declaration.
2230         (WebCore):
2231         (FrameLoaderClient):
2232         (WebCore::FrameLoaderClient::dispatchWillOpenSocketStream):
2233         * platform/network/SocketStreamHandleClient.h: Add willOpenSocketStream declaration.
2234         (WebCore::SocketStreamHandleClient::willOpenSocketStream):
2235
2236 2012-03-21  Vineet Chaudhary  <rgf748@motorola.com>
2237
2238         https://bugs.webkit.org/show_bug.cgi?id=81761
2239         Fix Gobject binding for sequence<T> for function return type.
2240
2241         Reviewed by Kentaro Hara.
2242
2243         No new tests.
2244
2245         * bindings/scripts/CodeGeneratorGObject.pm:
2246         (SkipFunction): Skip function with sequence<T> return type.
2247         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2248         (webkit_dom_test_obj_method_with_sequence_arg):
2249         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2250
2251 2012-03-21  Andrey Kosyakov  <caseq@chromium.org>
2252
2253         Unreviewed build fix for r111529.
2254
2255         * inspector/InjectedScriptHost.h:
2256         (WebCore):
2257
2258 2012-03-21  Sheriff Bot  <webkit.review.bot@gmail.com>
2259
2260         Unreviewed, rolling out r111497, r111506, r111508, and
2261         r111513.
2262         http://trac.webkit.org/changeset/111497
2263         http://trac.webkit.org/changeset/111506
2264         http://trac.webkit.org/changeset/111508
2265         http://trac.webkit.org/changeset/111513
2266         https://bugs.webkit.org/show_bug.cgi?id=81774
2267
2268         It broke 2 tests on all platform (Requested by Ossy on
2269         #webkit).
2270
2271         * css/CSSStyleSelector.cpp:
2272         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2273         * css/SelectorChecker.cpp:
2274         (WebCore::SelectorChecker::checkOneSelector):
2275         * html/HTMLKeygenElement.cpp:
2276         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
2277         * html/HTMLOptionElement.cpp:
2278         (WebCore::HTMLOptionElement::HTMLOptionElement):
2279         (WebCore::HTMLOptionElement::create):
2280         (WebCore::HTMLOptionElement::attach):
2281         (WebCore::HTMLOptionElement::detach):
2282         (WebCore::HTMLOptionElement::formControlType):
2283         (WebCore):
2284         (WebCore::HTMLOptionElement::parseAttribute):
2285         (WebCore::HTMLOptionElement::childrenChanged):
2286         (WebCore::HTMLOptionElement::insertedIntoTree):
2287         * html/HTMLOptionElement.h:
2288         (HTMLOptionElement):
2289         (WebCore::HTMLOptionElement::ownElementDisabled):
2290         * html/HTMLTagNames.in:
2291
2292 2012-03-21  Andrey Kosyakov  <caseq@chromium.org>
2293
2294         Web Inspector: expose getEventListeners() to console command line API
2295         https://bugs.webkit.org/show_bug.cgi?id=81658
2296
2297         Reviewed by Yury Semikhatsky.
2298
2299         Test: inspector/console/command-line-api-getEventListeners.html
2300
2301         * bindings/js/JSInjectedScriptHostCustom.cpp:
2302         (WebCore::JSInjectedScriptHost::functionDetails):
2303         (WebCore):
2304         (WebCore::getJSListenerFunctions):
2305         (WebCore::JSInjectedScriptHost::getEventListeners):
2306         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2307         (WebCore::getJSListenerFunctions):
2308         (WebCore):
2309         (WebCore::V8InjectedScriptHost::getEventListenersCallback):
2310         * inspector/InjectedScriptHost.cpp:
2311         (WebCore::InjectedScriptHost::InjectedScriptHost):
2312         (WebCore::InjectedScriptHost::disconnect):
2313         (WebCore::InjectedScriptHost::getEventListenersImpl):
2314         (WebCore):
2315         * inspector/InjectedScriptHost.h:
2316         (WebCore):
2317         (WebCore::InjectedScriptHost::init):
2318         (InjectedScriptHost):
2319         * inspector/InjectedScriptHost.idl:
2320         * inspector/InjectedScriptSource.js:
2321         (.):
2322         * inspector/InspectorController.cpp:
2323         (WebCore::InspectorController::InspectorController):
2324         * inspector/InspectorDOMAgent.cpp:
2325         (WebCore::InspectorDOMAgent::getEventListenersForNode):
2326         (WebCore::InspectorDOMAgent::getEventListeners):
2327         (WebCore):
2328         * inspector/InspectorDOMAgent.h:
2329         (InspectorDOMAgent):
2330         * inspector/WorkerInspectorController.cpp:
2331         (WebCore::WorkerInspectorController::WorkerInspectorController):
2332
2333 2012-03-21  Kentaro Hara  <haraken@chromium.org>
2334
2335         Unreviewed, rebaselined run-bindings-tests results.
2336
2337         * bindings/scripts/test/CPP/WebDOMFloat64Array.cpp:
2338         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
2339         * bindings/scripts/test/GObject/WebKitDOMFloat64ArrayPrivate.h:
2340         * bindings/scripts/test/ObjC/DOMFloat64Array.mm:
2341
2342 2012-03-21  Ian Vollick  <vollick@chromium.org>
2343
2344         [chromium] timing functions are getting incorrectly applied for accelerated css transitions
2345         https://bugs.webkit.org/show_bug.cgi?id=81692
2346
2347         Reviewed by Adrienne Walker.
2348
2349         Tested in CCLayerTreeHostTestAddAnimationWithTimingFunction
2350
2351         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
2352
2353 2012-03-21  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2354
2355         [Qt] Cookie Jar blocks on fsync in SQLITE
2356         https://bugs.webkit.org/show_bug.cgi?id=81755
2357
2358         Reviewed by Simon Hausmann.
2359
2360         Set PRAGMA synchronous to OFF, which tells SQLITE to never fsync.
2361
2362         * platform/qt/CookieJarQt.cpp:
2363         (WebCore::SharedCookieJarQt::ensureDatabaseTable):
2364
2365 2012-03-21  Ian Vollick  <vollick@chromium.org>
2366
2367         [chromium] Animation events should only be used for synchronizing animation start times
2368         https://bugs.webkit.org/show_bug.cgi?id=81484
2369
2370         Reviewed by Adrienne Walker.
2371
2372         Tested in CCLayerTreeHostTestSynchronizeAnimationStartTimes
2373
2374         Eliminated animation finished events. Animations will finish naturally on the
2375         main thread and the final values will be set.
2376
2377         Animation started events are now also used to synchronize the main thread
2378         animations' start times with their impl thread equivalents, preventing skew.
2379         Until main thread animations receive their synchronized start times, they will
2380         apply their initial values (i.e., they will be paused at time zero). This
2381         guarantees that we will not jump to the animation's final value on the main
2382         thread while we wait for the synchronized start time.
2383
2384         * WebCore.gypi:
2385         * platform/graphics/chromium/LayerChromium.cpp:
2386         (WebCore::LayerChromium::notifyAnimationStarted):
2387         * platform/graphics/chromium/LayerChromium.h:
2388         (WebCore):
2389         (LayerChromium):
2390         * platform/graphics/chromium/cc/CCActiveAnimation.cpp:
2391         (WebCore::CCActiveAnimation::CCActiveAnimation):
2392         * platform/graphics/chromium/cc/CCActiveAnimation.h:
2393         (CCActiveAnimation):
2394         (WebCore::CCActiveAnimation::needsSynchronizedStartTime):
2395         (WebCore::CCActiveAnimation::setNeedsSynchronizedStartTime):
2396         * platform/graphics/chromium/cc/CCAnimationEvents.cpp: Removed.
2397         * platform/graphics/chromium/cc/CCAnimationEvents.h:
2398         (WebCore::CCAnimationStartedEvent::CCAnimationStartedEvent):
2399         (CCAnimationStartedEvent):
2400         (WebCore):
2401         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
2402         (WebCore::CCLayerAnimationController::animate):
2403         (WebCore::CCLayerAnimationController::notifyAnimationStarted):
2404         (WebCore):
2405         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
2406         (WebCore::CCLayerAnimationController::startAnimationsWaitingForNextTick):
2407         (WebCore::CCLayerAnimationController::startAnimationsWaitingForStartTime):
2408         (WebCore::CCLayerAnimationController::startAnimationsWaitingForTargetAvailability):
2409         (WebCore::CCLayerAnimationController::purgeFinishedAnimations):
2410         (WebCore::CCLayerAnimationController::tickAnimations):
2411         * platform/graphics/chromium/cc/CCLayerAnimationController.h:
2412         (CCLayerAnimationController):
2413         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2414         (WebCore::CCLayerTreeHost::updateAnimations):
2415         (WebCore::CCLayerTreeHost::setAnimationEventsRecursive):
2416         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2417         (CCLayerTreeHost):
2418
2419 2012-03-21  Zeno Albisser  <zeno@webkit.org>
2420
2421         [Qt][WK2][Mac] MiniBrowser asserts at HashTable.h:480
2422         https://bugs.webkit.org/show_bug.cgi?id=81113
2423
2424         The GLContext is created by QWindow/QSurface using
2425         QOpenGLContext which is implemented using NSOpenGL functions
2426         on mac. Therefore we should use QOpenGLContext as well when
2427         querying for the current context. AGL is not supposed
2428         to be paired with NSOpenGL.
2429         Altering the typedef for GLContext is fine, since
2430         the GLContext type is only used as a key in a map.
2431
2432         Reviewed by Kenneth Rohde Christiansen.
2433
2434         * platform/graphics/texmap/TextureMapperGL.cpp:
2435         (SharedGLData):
2436         (WebCore::TextureMapperGLData::SharedGLData::getCurrentGLContext):
2437
2438 2012-03-21  Ilya Tikhonovsky  <loislo@chromium.org>
2439
2440         Web Inspector: HeapSnapshot: make _bfs twice as fast as the old version.
2441         https://bugs.webkit.org/show_bug.cgi?id=81756
2442
2443         Reviewed by Yury Semikhatsky.
2444
2445         * inspector/front-end/HeapSnapshot.js:
2446         (WebInspector.HeapSnapshot.prototype._calculateObjectToWindowDistance):
2447         (WebInspector.HeapSnapshot.prototype._bfs):
2448
2449 2012-03-21  Vineet Chaudhary  <rgf748@motorola.com>
2450
2451         https://bugs.webkit.org/show_bug.cgi?id=81705
2452         REGRESSION (r111416): fast/dom/prototype-inheritance-2.html is failing.
2453
2454         Reviewed by Csaba Osztrogonác.
2455
2456         No new tests.
2457
2458         * bindings/js/JSDOMBinding.h: Needs passing globalObject to constructArray().
2459         (WebCore::jsArray):
2460
2461 2012-03-21  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
2462
2463         [BlackBerry] Upstreaming blackberry specific css file
2464         https://bugs.webkit.org/show_bug.cgi?id=81650
2465
2466         Ustream BlackBerry specific css files, including:
2467         css/themeBlackBerry.css
2468         css/mediaControlsBlackBerry.css
2469
2470         Reviewed by Nikolas Zimmermann.
2471
2472         No new tests, this is the initial upstream patch
2473         for BlackBerry specific css files.
2474
2475         * css/mediaControlsBlackBerry.css: Added.
2476         (audio):
2477         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2478         (video:-webkit-full-page-media::-webkit-media-controls-panel):
2479         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
2480         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
2481         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
2482         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
2483         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
2484         (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button):
2485         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
2486         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
2487         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
2488         (audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
2489         (audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
2490         * css/themeBlackBerry.css: Added.
2491         (textarea):
2492         (input, textarea):
2493         (input[type="color"]):
2494         (select:focus):
2495         (select[size][multiple]):
2496         (select[size][multiple]:focus):
2497
2498 2012-03-21  Levi Weintraub  <leviw@chromium.org>
2499
2500         Update LayoutUnit usage in descendants of RenderReplaced
2501         https://bugs.webkit.org/show_bug.cgi?id=80918
2502
2503         Reviewed by Eric Seidel.
2504
2505         Replaced elements have to flow in the new sub-pixel Render Tree, but since the rendering of these
2506         often takes place outside of WebCore (or in cases such as foreign objects, in WebCore after
2507         passing through platform code), care must be taken to determine the final rendered size and
2508         location before render time. This patch brings these classes up to the latest and greatest in the
2509         subpixellayout branch.
2510
2511         See https://trac.webkit.org/wiki/LayoutUnit for more information.
2512
2513         No new tests. No change in behavior.
2514
2515         * rendering/RenderFrameBase.cpp:
2516         (WebCore::RenderFrameBase::layoutWithFlattening): Build Fix.
2517         * rendering/RenderFullScreen.cpp:
2518         (RenderFullScreen::createPlaceholder): Ditto.
2519         * rendering/RenderFullScreen.h:
2520         (RenderFullScreen): Ditto.
2521         * rendering/RenderHTMLCanvas.cpp:
2522         (WebCore::RenderHTMLCanvas::canvasSizeChanged): Ditto.
2523         * rendering/RenderIFrame.cpp:
2524         (WebCore::RenderIFrame::computeLogicalHeight): Ditto.
2525         (WebCore::RenderIFrame::computeLogicalWidth): Ditto.
2526         * rendering/RenderImage.cpp:
2527         (WebCore::RenderImage::updateIntrinsicSizeIfNeeded): Intrinsic sizes are always integers, since they
2528         originate outside of WebCore.
2529         (WebCore::RenderImage::paintIntoRect): Use pixel snapping to paint into an arbitrary rect.
2530         (WebCore::RenderImage::computeReplacedLogicalWidth): Intrinsic size is always integral -- rounding
2531         values to integers.
2532         * rendering/RenderImage.h:
2533         (RenderImage):
2534         * rendering/RenderVideo.cpp:
2535         (WebCore::RenderVideo::videoBox):
2536         (WebCore::RenderVideo::paintReplaced): Painting at integer boundaries.
2537         * rendering/RenderWidget.cpp:
2538         (WebCore):
2539         (WebCore::roundedIntRect): Widgets are rendered outside of WebCore, so we always align them to
2540         integer boundaries. This means we can actually round the size of our ultimate content box. This
2541         function is implemented here specifically to prevent its misuse if we put it elsewhere.
2542         (WebCore::RenderWidget::setWidgetGeometry): We simplify layout by taking a LayoutRect and rounding
2543         it to its final location within this function.
2544         (WebCore::RenderWidget::updateWidgetGeometry): We keep things in LayoutUnits until handing off to
2545         setWidgetGeometry.
2546         (WebCore::RenderWidget::paint): Rounding the paint location before handing painting off to the
2547         widget itself.
2548         * rendering/RenderWidget.h:
2549         (RenderWidget):
2550
2551 2012-03-21  Ilya Tikhonovsky  <loislo@chromium.org>
2552
2553         Web Inspector: HeapProfiler: support distance column in Summary View.
2554         https://bugs.webkit.org/show_bug.cgi?id=81675
2555
2556         In many cases when a page leaked an object we see not only this object
2557         but the all objects it retains. It is quite difficult to find out which
2558         the object is the root of leak. It'd be simpler to sort the leaked
2559         objects by Distance column and track down the first one.
2560
2561         Reviewed by Yury Semikhatsky.
2562
2563         * inspector/front-end/DetailedHeapshotGridNodes.js:
2564         (WebInspector.HeapSnapshotGenericObjectNode):
2565         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
2566         (WebInspector.HeapSnapshotInstanceNode.prototype.comparator):
2567         (WebInspector.HeapSnapshotConstructorNode):
2568         (WebInspector.HeapSnapshotConstructorNode.prototype.comparator):
2569         (WebInspector.HeapSnapshotConstructorNode.prototype.get data):
2570         * inspector/front-end/DetailedHeapshotView.js:
2571         (WebInspector.HeapSnapshotConstructorsDataGrid):
2572         (WebInspector.HeapSnapshotConstructorsDataGrid.prototype._defaultPopulateCount.100._sortFields):
2573         * inspector/front-end/HeapSnapshot.js:
2574         (WebInspector.HeapSnapshotNodesProvider.prototype._serialize):
2575
2576 2012-03-21  Charles Wei  <charles.wei@torchmobile.com.cn>
2577
2578         [BlackBerry] Remove redundant code in SocketStreamHandler
2579         https://bugs.webkit.org/show_bug.cgi?id=81726
2580
2581         Reviewed by George Staikos.
2582
2583         No new tests needed. Just remove redundant code.
2584
2585         * platform/network/blackberry/SocketStreamHandle.h:
2586         (SocketStreamHandle):
2587         * platform/network/blackberry/SocketStreamHandleBlackBerry.cpp:
2588
2589 2012-03-20  Eric Seidel  <eric@webkit.org>
2590
2591         Move wtf/Platform.h from JavaScriptCore to Source/WTF/wtf
2592         https://bugs.webkit.org/show_bug.cgi?id=80911
2593
2594         Reviewed by Adam Barth.
2595
2596         * CMakeLists.txt:
2597          - Look for headers in Source/WTF as well.
2598
2599 2012-03-20  Dana Jansens  <danakj@chromium.org>
2600
2601         [chromium] Use origin transform to transform occlusion from surface content space to its target content space
2602         https://bugs.webkit.org/show_bug.cgi?id=81730
2603
2604         Reviewed by Adrienne Walker.
2605
2606         Unit test: CCOcclusionTrackerTestSurfaceOcclusionTranslatesToParent
2607
2608         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2609         (WebCore::transformSurfaceOpaqueRegion):
2610         (WebCore::::leaveToTargetRenderSurface):
2611
2612 2012-03-19  Shinya Kawanaka  <shinyak@chromium.org>
2613
2614         [Crash] RenderMenuList::addChild() in Shadow DOM.
2615         https://bugs.webkit.org/show_bug.cgi?id=81201
2616
2617         Reviewed by Dimitri Glazkov.
2618
2619         <audio>, <video>, <meter>, <progress>, and <select> are implemented using
2620         Shadow DOM having HTMLContentElement. Their renderer children basically should not
2621         create a renderer unless they are on the upper shadow encapsulation boundary,
2622         which means they are the direct children of the shadow root.
2623
2624         However, current implementation allows their renderer children to create a renderer
2625         even if they are on a lower shadow encapsulation boundary, which means
2626         they are distributed elements of HTMLContentElement.
2627
2628         This patch makes there renderer children not to create a renderer if they are on a lower shadow
2629         encapsulation boudary.
2630
2631         Tests: fast/dom/shadow/content-element-in-media-element.html
2632                fast/dom/shadow/content-element-in-meter-element.html
2633                fast/dom/shadow/content-element-in-progress-element.html
2634                fast/dom/shadow/content-element-in-select-element.html
2635
2636         * dom/NodeRenderingContext.h:
2637         (NodeRenderingContext):
2638         (WebCore::NodeRenderingContext::isOnUpperEncapsulationBoundary):
2639         (WebCore):
2640         * html/HTMLMediaElement.cpp:
2641         (WebCore::HTMLMediaElement::childShouldCreateRenderer):
2642         * html/HTMLMeterElement.cpp:
2643         (WebCore::HTMLMeterElement::childShouldCreateRenderer):
2644         * html/HTMLProgressElement.cpp:
2645         (WebCore::HTMLProgressElement::childShouldCreateRenderer):
2646         * html/HTMLSelectElement.cpp:
2647         (WebCore::HTMLSelectElement::childShouldCreateRenderer):
2648
2649 2012-03-20  Dana Jansens  <danakj@chromium.org>
2650
2651         [chromium] Store origin/screen space transforms for surface and replica in the surface
2652         https://bugs.webkit.org/show_bug.cgi?id=81296
2653
2654         Reviewed by Adrienne Walker.
2655
2656         Compute and save a number of transforms for render surfaces. The origin
2657         tranform for the replica into its target surface. The origin transform
2658         for the replica into the screen. And the origin transform for the surface
2659         into the screen.
2660
2661         These transforms will allow us to detect occlusion of render surfaces,
2662         allowing us to cull (or partially-cull) the render surface quad during
2663         drawing.
2664
2665         This also fixes a subtle bug in the transforms used by the damage
2666         tracking code.
2667
2668         Unit test: CCLayerTreeHostCommonTest.verifyTransformsForSingleRenderSurface
2669                    CCLayerTreeHostCommonTest.verifyTransformsForReplica
2670                    CCLayerTreeHostCommonTest.verifyTransformsForRenderSurfaceHierarchy
2671
2672         * platform/graphics/chromium/RenderSurfaceChromium.h:
2673         (WebCore::RenderSurfaceChromium::screenSpaceTransform):
2674         (WebCore::RenderSurfaceChromium::setScreenSpaceTransform):
2675         (RenderSurfaceChromium):
2676         (WebCore::RenderSurfaceChromium::replicaOriginTransform):
2677         (WebCore::RenderSurfaceChromium::setReplicaOriginTransform):
2678         (WebCore::RenderSurfaceChromium::replicaScreenSpaceTransform):
2679         (WebCore::RenderSurfaceChromium::setReplicaScreenSpaceTransform):
2680         * platform/graphics/chromium/cc/CCDamageTracker.cpp:
2681         (WebCore::CCDamageTracker::extendDamageForRenderSurface):
2682         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2683         (WebCore::calculateDrawTransformsAndVisibilityInternal):
2684         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2685         (WebCore::damageInSurfaceSpace):
2686         * platform/graphics/chromium/cc/CCRenderSurface.h:
2687         (WebCore::CCRenderSurface::setDrawTransform):
2688         (WebCore::CCRenderSurface::drawTransform):
2689         (WebCore::CCRenderSurface::setScreenSpaceTransform):
2690         (WebCore::CCRenderSurface::screenSpaceTransform):
2691         (CCRenderSurface):
2692         (WebCore::CCRenderSurface::setReplicaDrawTransform):
2693         (WebCore::CCRenderSurface::replicaDrawTransform):
2694         (WebCore::CCRenderSurface::setReplicaOriginTransform):
2695         (WebCore::CCRenderSurface::replicaOriginTransform):
2696         (WebCore::CCRenderSurface::setReplicaScreenSpaceTransform):
2697         (WebCore::CCRenderSurface::replicaScreenSpaceTransform):
2698
2699 2012-03-20  Yoshifumi Inoue  <yosin@chromium.org>
2700
2701         [Forms] The option element should not be form associated element.
2702         https://bugs.webkit.org/show_bug.cgi?id=79764
2703
2704         Reviewed by Kent Tamura.
2705
2706         This patch changes base class of HTMLOptionELement to HTMLElement
2707         from HTMLFormControlElement for saving memory space and iteration
2708         time of extra "option" elements in HTMLFormElement::m_formAssociatedElements
2709         and matching the HTML5 specification for ease of maintenance.
2710
2711         This patch changes behavior of handling of CSS pseudo classes "invalid"
2712         and "valid". The "option" elements no longer use these CSS pseudo classes
2713         as HTML5 specification. This bug was filed in https://bugs.webkit.org/show_bug.cgi?id=80088
2714
2715         Changes of TextIterator is lead by usage of isFormControlElement. This
2716         changes will be replaced with more meaningful predicate as part of
2717         https://bugs.webkit.org/show_bug.cgi?id=80381
2718
2719         No new tests but updated select-live-pseudo-selectors.html test.
2720
2721         * css/CSSStyleSelector.cpp:
2722         (WebCore::CSSStyleSelector::canShareStyleWithElement): Added checking of the "option" element and returns false as HTMLFormControlElement.
2723         * css/SelectorChecker.cpp:
2724         (WebCore::SelectorChecker::checkOneSelector): Removed isFormControlElement for PseudoDisabled and PseudoChecked.
2725         * html/HTMLKeygenElement.cpp:
2726         (WebCore::HTMLKeygenElement::HTMLKeygenElement): Removed form parameter of call site of HTMLOptionElement::create.
2727         * html/HTMLOptionElement.cpp:
2728         (WebCore::HTMLOptionElement::HTMLOptionElement): Removed form parameter which no longer needed. Changed base class in initialization list. Added m_disabled initialization.
2729         (WebCore::HTMLOptionElement::create): Removed form parameter which no longer needed.
2730         (WebCore::HTMLOptionElement::attach): Changeid base class.
2731         (WebCore::HTMLOptionElement::detach): Changed base class.
2732         (WebCore::HTMLOptionElement::parseAttribute): Changed base class. Added "disabled" attribute handling.
2733         (WebCore::HTMLOptionElement::childrenChanged): Changed base class.
2734         (WebCore::HTMLOptionElement::insertedIntoTree): Changed base class.
2735         * html/HTMLOptionElement.h:
2736         (HTMLOptionElement): Added new member variable m_disabled which was in HTMLFormControlElement.
2737         (WebCore::HTMLOptionElement::ownElementDisabled): Changed for using m_disabled.
2738         * html/HTMLTagNames.in: Removed constructorNeedsFormElement for the "option" element, which was used for passing form parameter to create function.
2739
2740 2012-03-20  Xiaomei Ji  <xji@chromium.org>
2741
2742         Crash introduced in r110965.
2743         https://bugs.webkit.org/show_bug.cgi?id=81720
2744
2745         Reviewed by Ryosuke Niwa.
2746
2747         Since word break iterator just keeps a pointer to the UChar array given to the constructor,
2748         we need to allocate the UChar array deeper in the stack than the iterator.
2749
2750         Test: editing/selection/move-by-word-visually-crash-test-5.html
2751
2752         * editing/visible_units.cpp:
2753         (WebCore::wordBreakIteratorForMinOffsetBoundary):
2754         (WebCore::wordBreakIteratorForMaxOffsetBoundary):
2755         (WebCore::visualWordPosition):
2756
2757 2012-03-20  W. James MacLean  <wjmaclean@chromium.org>
2758
2759         [chromium] Convert TouchFlingPlatformGestureCurve to a 2-D Bezier for better control of curve shape.
2760         https://bugs.webkit.org/show_bug.cgi?id=81713
2761
2762         Reviewed by Dirk Pranke.
2763
2764         Exisiting unit test revised to cover this change.
2765
2766         Change the fling gesture animation curve to use a 2-D Bezier to obtain greater control
2767         over the shape of the curve. Also, change time scaling code to be logarithmic for more
2768         natural feel.
2769
2770         * platform/TouchFlingPlatformGestureCurve.cpp:
2771         (WebCore::TouchFlingPlatformGestureCurve::TouchFlingPlatformGestureCurve):
2772         (WebCore::TouchFlingPlatformGestureCurve::apply):
2773
2774 2012-03-18  Tim Horton  <timothy_horton@apple.com>
2775
2776         Infinite repaint loop with SVGImageCache and deferred repaint timers
2777         https://bugs.webkit.org/show_bug.cgi?id=78315
2778         <rdar://problem/10651634>
2779
2780         Reviewed by Nikolas Zimmermann.
2781
2782         Only defer image redraw on a timer if we're in layout. This breaks
2783         the repaint loop while still preventing us from drawing inside layout.
2784
2785         Completely disable repaint during relayout inside SVGImage::drawSVGToImageBuffer,
2786         preventing deferred repaint timers from being started during that process.
2787
2788         No new tests, as the problem only occurs in a nonstandard configuration.
2789
2790         * page/FrameView.cpp:
2791         (WebCore::FrameView::FrameView):
2792         (WebCore::FrameView::reset):
2793         (WebCore::FrameView::repaintContentRectangle):
2794         (WebCore::FrameView::endDeferredRepaints):
2795         (WebCore::FrameView::startDeferredRepaintTimer):
2796         (WebCore):
2797         (WebCore::FrameView::doDeferredRepaints):
2798         (WebCore::FrameView::deferredRepaintTimerFired):
2799         (WebCore::FrameView::beginDisableRepaints):
2800         (WebCore::FrameView::endDisableRepaints):
2801         * page/FrameView.h:
2802         (FrameView):
2803         (WebCore::FrameView::repaintsDisabled):
2804         * rendering/RenderView.cpp:
2805         (WebCore::RenderView::shouldRepaint):
2806         * svg/graphics/SVGImage.cpp:
2807         (WebCore::SVGImage::drawSVGToImageBuffer):
2808         (WebCore::SVGImage::draw):
2809         (WebCore::SVGImage::frameView):
2810         (WebCore):
2811         * svg/graphics/SVGImage.h:
2812         (WebCore):
2813         * svg/graphics/SVGImageCache.cpp:
2814         (WebCore::SVGImageCache::imageContentChanged):
2815         (WebCore::SVGImageCache::redraw):
2816         (WebCore::SVGImageCache::redrawTimerFired):
2817         (WebCore):
2818         * svg/graphics/SVGImageCache.h:
2819         (SVGImageCache):
2820
2821 2012-03-20  Adam Klein  <adamk@chromium.org>
2822
2823         Include fix for dom/xhtml test promised in r111449.
2824
2825         * dom/ContainerNode.cpp:
2826         (WebCore::ContainerNode::replaceChild): Check against next instead of
2827         prev when deciding there's no work to do.
2828
2829 2012-03-20  Jon Lee  <jonlee@apple.com>
2830
2831         Restrict access to notifications for unique origins and file URLs with no local file access
2832         https://bugs.webkit.org/show_bug.cgi?id=79704
2833         <rdar://problem/10912430>
2834
2835         Reviewed by Adam Barth.
2836
2837         Before checking or requesting permissions, we look at whether we can show notifications based on
2838         the security context. If not, we short circuit and do not forward the request to the client.
2839
2840         * notifications/Notification.cpp:
2841         (WebCore::Notification::Notification): Fix a bug where creating a notification goes through slightly
2842         different logic for checking permissions than when checking permissions through the
2843         notification center.
2844         * notifications/NotificationCenter.cpp:
2845         (WebCore::NotificationCenter::checkPermission): Check to see if the origin can show notifications.
2846         (WebCore::NotificationCenter::requestPermission): If we know whether an origin can show notifications,
2847         we asynchronously call the callback with that decision. Otherwise we ask the client.
2848
2849         Add new variable in the notification center to keep track of pending callbacks when we short-circuit
2850         requestPermission().
2851         * notifications/NotificationCenter.h:
2852         (NotificationRequestCallback): Add new private class encapsulating the callback.
2853         * notifications/NotificationCenter.cpp:
2854         (WebCore::NotificationCenter::requestTimedOut): Remove the request from the set of pending callbacks.
2855         (WebCore::NotificationCenter::NotificationRequest::createAndStartTimer): Because this is used when we already
2856         know the decision, and are not asking the client to decide, we can immediately trigger a one-shot timer
2857         to invoke the callback.
2858         (WebCore::NotificationCenter::NotificationRequest::NotificationRequest):
2859         (WebCore::NotificationCenter::NotificationRequest::startTimer):
2860         (WebCore::NotificationCenter::NotificationRequest::timerFired): Invoke the callback and tell the notification
2861         center.
2862         * page/SecurityOrigin.h: Add new toRawString() method to return the string representation of the origin,
2863         regardless of any restrictions that might otherwise cause toString() to return "null".
2864         * page/SecurityOrigin.cpp:
2865         (WebCore::SecurityOrigin::canShowNotifications): Added to return a tri-state regarding whether we know
2866         the origin can show notifications. If the origin is unique, we never let it show. If the origin has
2867         universal access, we always let it show. Otherwise the client should be asked.
2868         (WebCore::SecurityOrigin::toString): Refactor to use toRawString().
2869         (WebCore::SecurityOrigin::toRawString):
2870
2871         Added FIXME's regarding the naming of enforceFilePathSeparation().
2872         * dom/Document.cpp:
2873         (WebCore::Document::initSecurityContext): Also, tab reformatting.
2874
2875         * WebCore.exp.in: Export toRawString().
2876
2877 2012-03-20  Mark Pilgrim  <pilgrim@chromium.org>
2878
2879         Move webaudio to Modules/webaudio/
2880         https://bugs.webkit.org/show_bug.cgi?id=81541
2881
2882         Reviewed by Kentaro Hara.
2883
2884         No new tests, all existing tests pass.
2885
2886         * CMakeLists.txt:
2887         * DerivedSources.make:
2888         * DerivedSources.pri:
2889         * GNUmakefile.am:
2890         * GNUmakefile.list.am:
2891         * Modules/webaudio: Added.
2892         * Modules/webaudio/AsyncAudioDecoder.cpp: Copied from Source/WebCore/webaudio/AsyncAudioDecoder.cpp.
2893         * Modules/webaudio/AsyncAudioDecoder.h: Copied from Source/WebCore/webaudio/AsyncAudioDecoder.h.
2894         * Modules/webaudio/AudioBasicProcessorNode.cpp: Copied from Source/WebCore/webaudio/AudioBasicProcessorNode.cpp.
2895         * Modules/webaudio/AudioBasicProcessorNode.h: Copied from Source/WebCore/webaudio/AudioBasicProcessorNode.h.
2896         * Modules/webaudio/AudioBuffer.cpp: Copied from Source/WebCore/webaudio/AudioBuffer.cpp.
2897         * Modules/webaudio/AudioBuffer.h: Copied from Source/WebCore/webaudio/AudioBuffer.h.
2898         * Modules/webaudio/AudioBuffer.idl: Copied from Source/WebCore/webaudio/AudioBuffer.idl.
2899         * Modules/webaudio/AudioBufferCallback.h: Copied from Source/WebCore/webaudio/AudioBufferCallback.h.
2900         * Modules/webaudio/AudioBufferCallback.idl: Copied from Source/WebCore/webaudio/AudioBufferCallback.idl.
2901         * Modules/webaudio/AudioBufferSourceNode.cpp: Copied from Source/WebCore/webaudio/AudioBufferSourceNode.cpp.
2902         * Modules/webaudio/AudioBufferSourceNode.h: Copied from Source/WebCore/webaudio/AudioBufferSourceNode.h.
2903         * Modules/webaudio/AudioBufferSourceNode.idl: Copied from Source/WebCore/webaudio/AudioBufferSourceNode.idl.
2904         * Modules/webaudio/AudioChannelMerger.cpp: Copied from Source/WebCore/webaudio/AudioChannelMerger.cpp.
2905         * Modules/webaudio/AudioChannelMerger.h: Copied from Source/WebCore/webaudio/AudioChannelMerger.h.
2906         * Modules/webaudio/AudioChannelMerger.idl: Copied from Source/WebCore/webaudio/AudioChannelMerger.idl.
2907         * Modules/webaudio/AudioChannelSplitter.cpp: Copied from Source/WebCore/webaudio/AudioChannelSplitter.cpp.
2908         * Modules/webaudio/AudioChannelSplitter.h: Copied from Source/WebCore/webaudio/AudioChannelSplitter.h.
2909         * Modules/webaudio/AudioChannelSplitter.idl: Copied from Source/WebCore/webaudio/AudioChannelSplitter.idl.
2910         * Modules/webaudio/AudioContext.cpp: Copied from Source/WebCore/webaudio/AudioContext.cpp.
2911         * Modules/webaudio/AudioContext.h: Copied from Source/WebCore/webaudio/AudioContext.h.
2912         * Modules/webaudio/AudioContext.idl: Copied from Source/WebCore/webaudio/AudioContext.idl.
2913         * Modules/webaudio/AudioDestinationNode.cpp: Copied from Source/WebCore/webaudio/AudioDestinationNode.cpp.
2914         * Modules/webaudio/AudioDestinationNode.h: Copied from Source/WebCore/webaudio/AudioDestinationNode.h.
2915         * Modules/webaudio/AudioDestinationNode.idl: Copied from Source/WebCore/webaudio/AudioDestinationNode.idl.
2916         * Modules/webaudio/AudioGain.h: Copied from Source/WebCore/webaudio/AudioGain.h.
2917         * Modules/webaudio/AudioGain.idl: Copied from Source/WebCore/webaudio/AudioGain.idl.
2918         * Modules/webaudio/AudioGainNode.cpp: Copied from Source/WebCore/webaudio/AudioGainNode.cpp.
2919         * Modules/webaudio/AudioGainNode.h: Copied from Source/WebCore/webaudio/AudioGainNode.h.
2920         * Modules/webaudio/AudioGainNode.idl: Copied from Source/WebCore/webaudio/AudioGainNode.idl.
2921         * Modules/webaudio/AudioListener.cpp: Copied from Source/WebCore/webaudio/AudioListener.cpp.
2922         * Modules/webaudio/AudioListener.h: Copied from Source/WebCore/webaudio/AudioListener.h.
2923         * Modules/webaudio/AudioListener.idl: Copied from Source/WebCore/webaudio/AudioListener.idl.
2924         * Modules/webaudio/AudioNode.cpp: Copied from Source/WebCore/webaudio/AudioNode.cpp.
2925         * Modules/webaudio/AudioNode.h: Copied from Source/WebCore/webaudio/AudioNode.h.
2926         * Modules/webaudio/AudioNode.idl: Copied from Source/WebCore/webaudio/AudioNode.idl.
2927         * Modules/webaudio/AudioNodeInput.cpp: Copied from Source/WebCore/webaudio/AudioNodeInput.cpp.
2928         * Modules/webaudio/AudioNodeInput.h: Copied from Source/WebCore/webaudio/AudioNodeInput.h.
2929         * Modules/webaudio/AudioNodeOutput.cpp: Copied from Source/WebCore/webaudio/AudioNodeOutput.cpp.
2930         * Modules/webaudio/AudioNodeOutput.h: Copied from Source/WebCore/webaudio/AudioNodeOutput.h.
2931         * Modules/webaudio/AudioPannerNode.cpp: Copied from Source/WebCore/webaudio/AudioPannerNode.cpp.
2932         * Modules/webaudio/AudioPannerNode.h: Copied from Source/WebCore/webaudio/AudioPannerNode.h.
2933         * Modules/webaudio/AudioPannerNode.idl: Copied from Source/WebCore/webaudio/AudioPannerNode.idl.
2934         * Modules/webaudio/AudioParam.cpp: Copied from Source/WebCore/webaudio/AudioParam.cpp.
2935         * Modules/webaudio/AudioParam.h: Copied from Source/WebCore/webaudio/AudioParam.h.
2936         * Modules/webaudio/AudioParam.idl: Copied from Source/WebCore/webaudio/AudioParam.idl.
2937         * Modules/webaudio/AudioParamTimeline.cpp: Copied from Source/WebCore/webaudio/AudioParamTimeline.cpp.
2938         * Modules/webaudio/AudioParamTimeline.h: Copied from Source/WebCore/webaudio/AudioParamTimeline.h.
2939         * Modules/webaudio/AudioProcessingEvent.cpp: Copied from Source/WebCore/webaudio/AudioProcessingEvent.cpp.
2940         * Modules/webaudio/AudioProcessingEvent.h: Copied from Source/WebCore/webaudio/AudioProcessingEvent.h.
2941         * Modules/webaudio/AudioProcessingEvent.idl: Copied from Source/WebCore/webaudio/AudioProcessingEvent.idl.
2942         * Modules/webaudio/AudioSourceNode.h: Copied from Source/WebCore/webaudio/AudioSourceNode.h.
2943         * Modules/webaudio/AudioSourceNode.idl: Copied from Source/WebCore/webaudio/AudioSourceNode.idl.
2944         * Modules/webaudio/BiquadDSPKernel.cpp: Copied from Source/WebCore/webaudio/BiquadDSPKernel.cpp.
2945         * Modules/webaudio/BiquadDSPKernel.h: Copied from Source/WebCore/webaudio/BiquadDSPKernel.h.
2946         * Modules/webaudio/BiquadFilterNode.cpp: Copied from Source/WebCore/webaudio/BiquadFilterNode.cpp.
2947         * Modules/webaudio/BiquadFilterNode.h: Copied from Source/WebCore/webaudio/BiquadFilterNode.h.
2948         * Modules/webaudio/BiquadFilterNode.idl: Copied from Source/WebCore/webaudio/BiquadFilterNode.idl.
2949         * Modules/webaudio/BiquadProcessor.cpp: Copied from Source/WebCore/webaudio/BiquadProcessor.cpp.
2950         * Modules/webaudio/BiquadProcessor.h: Copied from Source/WebCore/webaudio/BiquadProcessor.h.
2951         * Modules/webaudio/ConvolverNode.cpp: Copied from Source/WebCore/webaudio/ConvolverNode.cpp.
2952         * Modules/webaudio/ConvolverNode.h: Copied from Source/WebCore/webaudio/ConvolverNode.h.
2953         * Modules/webaudio/ConvolverNode.idl: Copied from Source/WebCore/webaudio/ConvolverNode.idl.
2954         * Modules/webaudio/DOMWindowWebAudio.idl: Copied from Source/WebCore/webaudio/DOMWindowWebAudio.idl.
2955         * Modules/webaudio/DefaultAudioDestinationNode.cpp: Copied from Source/WebCore/webaudio/DefaultAudioDestinationNode.cpp.
2956         * Modules/webaudio/DefaultAudioDestinationNode.h: Copied from Source/WebCore/webaudio/DefaultAudioDestinationNode.h.
2957         * Modules/webaudio/DelayDSPKernel.cpp: Copied from Source/WebCore/webaudio/DelayDSPKernel.cpp.
2958         * Modules/webaudio/DelayDSPKernel.h: Copied from Source/WebCore/webaudio/DelayDSPKernel.h.
2959         * Modules/webaudio/DelayNode.cpp: Copied from Source/WebCore/webaudio/DelayNode.cpp.
2960         * Modules/webaudio/DelayNode.h: Copied from Source/WebCore/webaudio/DelayNode.h.
2961         * Modules/webaudio/DelayNode.idl: Copied from Source/WebCore/webaudio/DelayNode.idl.
2962         * Modules/webaudio/DelayProcessor.cpp: Copied from Source/WebCore/webaudio/DelayProcessor.cpp.
2963         * Modules/webaudio/DelayProcessor.h: Copied from Source/WebCore/webaudio/DelayProcessor.h.
2964         * Modules/webaudio/DynamicsCompressorNode.cpp: Copied from Source/WebCore/webaudio/DynamicsCompressorNode.cpp.
2965         * Modules/webaudio/DynamicsCompressorNode.h: Copied from Source/WebCore/webaudio/DynamicsCompressorNode.h.
2966         * Modules/webaudio/DynamicsCompressorNode.idl: Copied from Source/WebCore/webaudio/DynamicsCompressorNode.idl.
2967         * Modules/webaudio/HighPass2FilterNode.cpp: Copied from Source/WebCore/webaudio/HighPass2FilterNode.cpp.
2968         * Modules/webaudio/HighPass2FilterNode.h: Copied from Source/WebCore/webaudio/HighPass2FilterNode.h.
2969         * Modules/webaudio/HighPass2FilterNode.idl: Copied from Source/WebCore/webaudio/HighPass2FilterNode.idl.
2970         * Modules/webaudio/JavaScriptAudioNode.cpp: Copied from Source/WebCore/webaudio/JavaScriptAudioNode.cpp.
2971         * Modules/webaudio/JavaScriptAudioNode.h: Copied from Source/WebCore/webaudio/JavaScriptAudioNode.h.
2972         * Modules/webaudio/JavaScriptAudioNode.idl: Copied from Source/WebCore/webaudio/JavaScriptAudioNode.idl.
2973         * Modules/webaudio/LowPass2FilterNode.cpp: Copied from Source/WebCore/webaudio/LowPass2FilterNode.cpp.
2974         * Modules/webaudio/LowPass2FilterNode.h: Copied from Source/WebCore/webaudio/LowPass2FilterNode.h.
2975         * Modules/webaudio/LowPass2FilterNode.idl: Copied from Source/WebCore/webaudio/LowPass2FilterNode.idl.
2976         * Modules/webaudio/MediaElementAudioSourceNode.cpp: Copied from Source/WebCore/webaudio/MediaElementAudioSourceNode.cpp.
2977         * Modules/webaudio/MediaElementAudioSourceNode.h: Copied from Source/WebCore/webaudio/MediaElementAudioSourceNode.h.
2978         * Modules/webaudio/MediaElementAudioSourceNode.idl: Copied from Source/WebCore/webaudio/MediaElementAudioSourceNode.idl.
2979         * Modules/webaudio/OfflineAudioCompletionEvent.cpp: Copied from Source/WebCore/webaudio/OfflineAudioCompletionEvent.cpp.
2980         * Modules/webaudio/OfflineAudioCompletionEvent.h: Copied from Source/WebCore/webaudio/OfflineAudioCompletionEvent.h.
2981         * Modules/webaudio/OfflineAudioCompletionEvent.idl: Copied from Source/WebCore/webaudio/OfflineAudioCompletionEvent.idl.
2982         * Modules/webaudio/OfflineAudioDestinationNode.cpp: Copied from Source/WebCore/webaudio/OfflineAudioDestinationNode.cpp.
2983         * Modules/webaudio/OfflineAudioDestinationNode.h: Copied from Source/WebCore/webaudio/OfflineAudioDestinationNode.h.
2984         * Modules/webaudio/RealtimeAnalyser.cpp: Copied from Source/WebCore/webaudio/RealtimeAnalyser.cpp.
2985         * Modules/webaudio/RealtimeAnalyser.h: Copied from Source/WebCore/webaudio/RealtimeAnalyser.h.
2986         * Modules/webaudio/RealtimeAnalyserNode.cpp: Copied from Source/WebCore/webaudio/RealtimeAnalyserNode.cpp.
2987         * Modules/webaudio/RealtimeAnalyserNode.h: Copied from Source/WebCore/webaudio/RealtimeAnalyserNode.h.
2988         * Modules/webaudio/RealtimeAnalyserNode.idl: Copied from Source/WebCore/webaudio/RealtimeAnalyserNode.idl.
2989         * Modules/webaudio/WaveShaperDSPKernel.cpp: Copied from Source/WebCore/webaudio/WaveShaperDSPKernel.cpp.
2990         * Modules/webaudio/WaveShaperDSPKernel.h: Copied from Source/WebCore/webaudio/WaveShaperDSPKernel.h.
2991         * Modules/webaudio/WaveShaperNode.cpp: Copied from Source/WebCore/webaudio/WaveShaperNode.cpp.
2992         * Modules/webaudio/WaveShaperNode.h: Copied from Source/WebCore/webaudio/WaveShaperNode.h.
2993         * Modules/webaudio/WaveShaperNode.idl: Copied from Source/WebCore/webaudio/WaveShaperNode.idl.
2994         * Modules/webaudio/WaveShaperProcessor.cpp: Copied from Source/WebCore/webaudio/WaveShaperProcessor.cpp.
2995         * Modules/webaudio/WaveShaperProcessor.h: Copied from Source/WebCore/webaudio/WaveShaperProcessor.h.
2996         * WebCore.gyp/WebCore.gyp:
2997         * WebCore.gypi:
2998         * WebCore.pri:
2999         * WebCore.xcodeproj/project.pbxproj:
3000         * webaudio/AsyncAudioDecoder.cpp: Removed.
3001         * webaudio/AsyncAudioDecoder.h: Removed.
3002         * webaudio/AudioBasicProcessorNode.cpp: Removed.
3003         * webaudio/AudioBasicProcessorNode.h: Removed.
3004         * webaudio/AudioBuffer.cpp: Removed.
3005         * webaudio/AudioBuffer.h: Removed.
3006         * webaudio/AudioBuffer.idl: Removed.
3007         * webaudio/AudioBufferCallback.h: Removed.
3008         * webaudio/AudioBufferCallback.idl: Removed.
3009         * webaudio/AudioBufferSourceNode.cpp: Removed.
3010         * webaudio/AudioBufferSourceNode.h: Removed.
3011         * webaudio/AudioBufferSourceNode.idl: Removed.
3012         * webaudio/AudioChannelMerger.cpp: Removed.
3013         * webaudio/AudioChannelMerger.h: Removed.
3014         * webaudio/AudioChannelMerger.idl: Removed.
3015         * webaudio/AudioChannelSplitter.cpp: Removed.
3016         * webaudio/AudioChannelSplitter.h: Removed.
3017         * webaudio/AudioChannelSplitter.idl: Removed.
3018         * webaudio/AudioContext.cpp: Removed.
3019         * webaudio/AudioContext.h: Removed.
3020         * webaudio/AudioContext.idl: Removed.
3021         * webaudio/AudioDestinationNode.cpp: Removed.
3022         * webaudio/AudioDestinationNode.h: Removed.
3023         * webaudio/AudioDestinationNode.idl: Removed.
3024         * webaudio/AudioGain.h: Removed.
3025         * webaudio/AudioGain.idl: Removed.
3026         * webaudio/AudioGainNode.cpp: Removed.
3027         * webaudio/AudioGainNode.h: Removed.
3028         * webaudio/AudioGainNode.idl: Removed.
3029         * webaudio/AudioListener.cpp: Removed.
3030         * webaudio/AudioListener.h: Removed.
3031         * webaudio/AudioListener.idl: Removed.
3032         * webaudio/AudioNode.cpp: Removed.
3033         * webaudio/AudioNode.h: Removed.
3034         * webaudio/AudioNode.idl: Removed.
3035         * webaudio/AudioNodeInput.cpp: Removed.
3036         * webaudio/AudioNodeInput.h: Removed.
3037         * webaudio/AudioNodeOutput.cpp: Removed.
3038         * webaudio/AudioNodeOutput.h: Removed.
3039         * webaudio/AudioPannerNode.cpp: Removed.
3040         * webaudio/AudioPannerNode.h: Removed.
3041         * webaudio/AudioPannerNode.idl: Removed.
3042         * webaudio/AudioParam.cpp: Removed.
3043         * webaudio/AudioParam.h: Removed.
3044         * webaudio/AudioParam.idl: Removed.
3045         * webaudio/AudioParamTimeline.cpp: Removed.
3046         * webaudio/AudioParamTimeline.h: Removed.
3047         * webaudio/AudioProcessingEvent.cpp: Removed.
3048         * webaudio/AudioProcessingEvent.h: Removed.
3049         * webaudio/AudioProcessingEvent.idl: Removed.
3050         * webaudio/AudioSourceNode.h: Removed.
3051         * webaudio/AudioSourceNode.idl: Removed.
3052         * webaudio/BiquadDSPKernel.cpp: Removed.
3053         * webaudio/BiquadDSPKernel.h: Removed.
3054         * webaudio/BiquadFilterNode.cpp: Removed.
3055         * webaudio/BiquadFilterNode.h: Removed.
3056         * webaudio/BiquadFilterNode.idl: Removed.
3057         * webaudio/BiquadProcessor.cpp: Removed.
3058         * webaudio/BiquadProcessor.h: Removed.
3059         * webaudio/ConvolverNode.cpp: Removed.
3060         * webaudio/ConvolverNode.h: Removed.
3061         * webaudio/ConvolverNode.idl: Removed.
3062         * webaudio/DOMWindowWebAudio.idl: Removed.
3063         * webaudio/DefaultAudioDestinationNode.cpp: Removed.
3064         * webaudio/DefaultAudioDestinationNode.h: Removed.
3065         * webaudio/DelayDSPKernel.cpp: Removed.
3066         * webaudio/DelayDSPKernel.h: Removed.
3067         * webaudio/DelayNode.cpp: Removed.
3068         * webaudio/DelayNode.h: Removed.
3069         * webaudio/DelayNode.idl: Removed.
3070         * webaudio/DelayProcessor.cpp: Removed.
3071         * webaudio/DelayProcessor.h: Removed.
3072         * webaudio/DynamicsCompressorNode.cpp: Removed.
3073         * webaudio/DynamicsCompressorNode.h: Removed.
3074         * webaudio/DynamicsCompressorNode.idl: Removed.
3075         * webaudio/HighPass2FilterNode.cpp: Removed.
3076         * webaudio/HighPass2FilterNode.h: Removed.
3077         * webaudio/HighPass2FilterNode.idl: Removed.
3078         * webaudio/JavaScriptAudioNode.cpp: Removed.
3079         * webaudio/JavaScriptAudioNode.h: Removed.
3080         * webaudio/JavaScriptAudioNode.idl: Removed.
3081         * webaudio/LowPass2FilterNode.cpp: Removed.
3082         * webaudio/LowPass2FilterNode.h: Removed.
3083         * webaudio/LowPass2FilterNode.idl: Removed.
3084         * webaudio/MediaElementAudioSourceNode.cpp: Removed.
3085         * webaudio/MediaElementAudioSourceNode.h: Removed.
3086         * webaudio/MediaElementAudioSourceNode.idl: Removed.
3087         * webaudio/OfflineAudioCompletionEvent.cpp: Removed.
3088         * webaudio/OfflineAudioCompletionEvent.h: Removed.
3089         * webaudio/OfflineAudioCompletionEvent.idl: Removed.
3090         * webaudio/OfflineAudioDestinationNode.cpp: Removed.
3091         * webaudio/OfflineAudioDestinationNode.h: Removed.
3092         * webaudio/RealtimeAnalyser.cpp: Removed.
3093         * webaudio/RealtimeAnalyser.h: Removed.
3094         * webaudio/RealtimeAnalyserNode.cpp: Removed.
3095         * webaudio/RealtimeAnalyserNode.h: Removed.
3096         * webaudio/RealtimeAnalyserNode.idl: Removed.
3097         * webaudio/WaveShaperDSPKernel.cpp: Removed.
3098         * webaudio/WaveShaperDSPKernel.h: Removed.
3099         * webaudio/WaveShaperNode.cpp: Removed.
3100         * webaudio/WaveShaperNode.h: Removed.
3101         * webaudio/WaveShaperNode.idl: Removed.
3102         * webaudio/WaveShaperProcessor.cpp: Removed.
3103         * webaudio/WaveShaperProcessor.h: Removed.
3104
3105 2012-03-20  Anders Carlsson  <andersca@apple.com>
3106
3107         Add a per-ScrollableArea tile cache base class
3108         https://bugs.webkit.org/show_bug.cgi?id=81694
3109
3110         Reviewed by Sam Weinig.
3111
3112         Add an abstract base class, TiledBacking, that can be used to inform tile caches about changed
3113         state in scrollable areas (such as the currently visible rect, whether the page is active or not, etc).
3114
3115         Make TileCache inherit from TiledBacking and port updating the visible rect over to this new mechanism.
3116
3117         * WebCore.xcodeproj/project.pbxproj:
3118         * page/FrameView.cpp:
3119         (WebCore::FrameView::tiledBacking):
3120         (WebCore):
3121         * page/FrameView.h:
3122         (FrameView):
3123         * platform/ScrollableArea.h:
3124         (WebCore):
3125         (ScrollableArea):
3126         (WebCore::ScrollableArea::tiledBacking):
3127         * platform/graphics/GraphicsLayer.h:
3128         (WebCore):
3129         (WebCore::GraphicsLayer::tiledBacking):
3130         * platform/graphics/TiledBacking.h: Added.
3131         (WebCore):
3132         (TiledBacking):
3133         (WebCore::TiledBacking::~TiledBacking):
3134         * platform/graphics/ca/GraphicsLayerCA.cpp:
3135         (WebCore::GraphicsLayerCA::tiledBacking):
3136         * platform/graphics/ca/GraphicsLayerCA.h:
3137         (GraphicsLayerCA):
3138         * platform/graphics/ca/PlatformCALayer.h:
3139         (PlatformCALayer):
3140         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3141         (PlatformCALayer::tiledBacking):
3142         * platform/graphics/ca/mac/TileCache.h:
3143         (TileCache):
3144         * platform/graphics/ca/mac/WebTileCacheLayer.h:
3145         (WebCore):
3146         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
3147         (-[WebTileCacheLayer WebCore::]):
3148         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3149         (PlatformCALayer::tiledBacking):
3150         * rendering/RenderLayerCompositor.cpp:
3151         (WebCore::RenderLayerCompositor::frameViewDidScroll):
3152
3153 2012-03-20  Xiaomei Ji  <xji@chromium.org>
3154
3155         visual word movement: crashes on CSS generated content.
3156         https://bugs.webkit.org/show_bug.cgi?id=81581
3157
3158         Reviewed by Ryosuke Niwa.
3159
3160         Check for null pointer when referencing box->renderer()->node() in previousRootInlineBox and nextRootInlineBox.
3161
3162         Test: editing/selection/move-by-word-visually-crash-test-css-generated-content.html
3163
3164         * editing/visible_units.cpp:
3165         (WebCore::previousRootInlineBox):
3166         (WebCore::nextRootInlineBox):
3167
3168 2012-03-20  Luke Macpherson  <macpherson@chromium.org>
3169
3170         Use CSSPrimitiveValue::convertToLength() to handle CSSPropertyWebkitBoxReflect and in createGridTrackBreadth.
3171         https://bugs.webkit.org/show_bug.cgi?id=81633
3172
3173         Reviewed by Andreas Kling.
3174
3175         No new tests / refactoring only.
3176
3177         * css/CSSStyleSelector.cpp:
3178         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3179
3180 2012-03-20  Sheriff Bot  <webkit.review.bot@gmail.com>
3181
3182         Unreviewed, rolling out r111442.
3183         http://trac.webkit.org/changeset/111442
3184         https://bugs.webkit.org/show_bug.cgi?id=81711
3185
3186         Causes crashes and image mismatches in canvas tests (Requested
3187         by leviw on #webkit).
3188
3189         * html/HTMLCanvasElement.cpp:
3190         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
3191         (WebCore::HTMLCanvasElement::reset):
3192         (WebCore::HTMLCanvasElement::createImageBuffer):
3193         (WebCore::HTMLCanvasElement::clearCopiedImage):
3194         * html/HTMLCanvasElement.h:
3195         (HTMLCanvasElement):
3196         * html/canvas/CanvasRenderingContext2D.cpp:
3197         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
3198         (WebCore::CanvasRenderingContext2D::unwindStateStack):
3199         (WebCore::CanvasRenderingContext2D::reset):
3200
3201 2012-03-20  Adrienne Walker  <enne@google.com>
3202
3203         RenderLayerCompositor doesn't properly clip graphics layer sizes
3204         https://bugs.webkit.org/show_bug.cgi?id=80372
3205
3206         Reviewed by Simon Fraser.
3207
3208         To find the bounds for a composited layer, calculateCompositedBounds
3209         iterates through all non-composited child layers using z-order and
3210         normal flow lists. This does not preserve clipping from ancestor
3211         layers, because a clipping ancestor layer can end up as a sibling to
3212         its clipped descendent because it is not a stacking context.
3213
3214         Fix by explicitly checking cached clip roots.
3215
3216         Test: compositing/clip-child-by-non-stacking-ancestor.html
3217
3218         * rendering/RenderLayer.cpp:
3219         (WebCore::RenderLayer::localClipRect):
3220         (WebCore):
3221         * rendering/RenderLayer.h:
3222         (RenderLayer):
3223         * rendering/RenderLayerCompositor.cpp:
3224         (WebCore::RenderLayerCompositor::repaintOnCompositingChange):
3225         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
3226
3227 2012-03-20  Sheriff Bot  <webkit.review.bot@gmail.com>
3228
3229         Unreviewed, rolling out r111445 and r111446.
3230         http://trac.webkit.org/changeset/111445
3231         http://trac.webkit.org/changeset/111446
3232         https://bugs.webkit.org/show_bug.cgi?id=81708
3233
3234         It broke Qt and GTK build intentionally (Requested by Ossy on
3235         #webkit).
3236
3237         * WebCore.exp.in:
3238         * dom/Document.cpp:
3239         (WebCore::Document::initSecurityContext):
3240         * notifications/Notification.cpp:
3241         (WebCore::Notification::Notification):
3242         * notifications/NotificationCenter.cpp:
3243         (WebCore::NotificationCenter::checkPermission):
3244         (WebCore::NotificationCenter::requestPermission):
3245         * notifications/NotificationCenter.h:
3246         (NotificationCenter):
3247         * page/SecurityOrigin.cpp:
3248         (WebCore::SecurityOrigin::toString):
3249         * page/SecurityOrigin.h:
3250         (SecurityOrigin):
3251
3252 2012-03-20  Adam Klein  <adamk@chromium.org>
3253
3254         Refactor ContainerNode::replaceChild to match other mutation methods and share code
3255         https://bugs.webkit.org/show_bug.cgi?id=81579
3256
3257         Reviewed by Ojan Vafai.
3258
3259         Originally landed as r111310, this fixes a bug in replaceChild
3260         introduced when switching to the insert-before logic.
3261
3262         A future change will make use of the consistency among insertBefore/appendChild/replaceChild
3263         to handle insertion of DocumentFragments more cleanly.
3264
3265         No new tests, no change in behavior.
3266
3267         * dom/ContainerNode.cpp:
3268         (WebCore::ContainerNode::replaceChild): Use collectTargetNodes rather than walking through DocumentFragment children.
3269         Insert before rather than inserting after. Dispatch to other methods to update parent/sibling pointers.
3270         (WebCore::ContainerNode::appendChild): Call appendChildToContainer to update parent/sibling pointers.
3271         (WebCore::ContainerNode::parserAddChild): Use type inference in call to appendChildToContainer.
3272
3273 2012-03-20  Jon Lee  <jonlee@apple.com>
3274
3275         Restrict access to notifications for unique origins and file URLs with no local file access
3276         https://bugs.webkit.org/show_bug.cgi?id=79704
3277         <rdar://problem/10912430>
3278
3279         Reviewed by Adam Barth.
3280
3281         Before checking or requesting permissions, we look at whether we can show notifications based on
3282         the security context. If not, we short circuit and do not forward the request to the client.
3283
3284         * notifications/Notification.cpp:
3285         (WebCore::Notification::Notification): Fix a bug where creating a notification goes through slightly
3286         different logic for checking permissions than when checking permissions through the
3287         notification center.
3288         * notifications/NotificationCenter.cpp:
3289         (WebCore::NotificationCenter::checkPermission): Check to see if the origin can show notifications.
3290         (WebCore::NotificationCenter::requestPermission): If we know whether an origin can show notifications,
3291         we asynchronously call the callback with that decision. Otherwise we ask the client.
3292
3293         Add new variable in the notification center to keep track of pending callbacks when we short-circuit
3294         requestPermission().
3295         * notifications/NotificationCenter.h:
3296         (NotificationRequestCallback): Add new private class encapsulating the callback.
3297         * notifications/NotificationCenter.cpp:
3298         (WebCore::NotificationCenter::requestTimedOut): Remove the request from the set of pending callbacks.
3299         (WebCore::NotificationCenter::NotificationRequest::createAndStartTimer): Because this is used when we already
3300         know the decision, and are not asking the client to decide, we can immediately trigger a one-shot timer
3301         to invoke the callback.
3302         (WebCore::NotificationCenter::NotificationRequest::NotificationRequest):
3303         (WebCore::NotificationCenter::NotificationRequest::startTimer):
3304         (WebCore::NotificationCenter::NotificationRequest::timerFired): Invoke the callback and tell the notification
3305         center.
3306         * page/SecurityOrigin.h: Add new toRawString() method to return the string representation of the origin,
3307         regardless of any restrictions that might otherwise cause toString() to return "null".
3308         * page/SecurityOrigin.cpp:
3309         (WebCore::SecurityOrigin::canShowNotifications): Added to return a tri-state regarding whether we know
3310         the origin can show notifications. If the origin is unique, we never let it show. If the origin has
3311         universal access, we always let it show. Otherwise the client should be asked.
3312         (WebCore::SecurityOrigin::toString): Refactor to use toRawString().
3313         (WebCore::SecurityOrigin::toRawString):
3314
3315         Added FIXME's regarding the naming of enforceFilePathSeparation().
3316         * dom/Document.cpp:
3317         (WebCore::Document::initSecurityContext): Also, tab reformatting.
3318
3319         * WebCore.exp.in: Export toRawString().
3320
3321 2012-03-20  Andreas Kling  <kling@webkit.org>
3322
3323         Remove unused CSSPrimitiveValue constructors.
3324         <http://webkit.org/b/81695>
3325
3326         Reviewed by Antti Koivisto.
3327
3328         Kill off CSSPrimitiveValue constructors that aren't used anywhere.
3329
3330         * css/CSSPrimitiveValue.cpp:
3331         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3332         * css/CSSPrimitiveValue.h:
3333         (CSSPrimitiveValueBase):
3334         (WebCore::CSSPrimitiveValueBase::CSSPrimitiveValueBase):
3335         (CSSPrimitiveValue):
3336         * css/CSSPrimitiveValueMappings.h:
3337
3338 2012-03-20  Sami Kyostila  <skyostil@chromium.org>
3339
3340         Reuse buffer allocation if canvas size does not change
3341         https://bugs.webkit.org/show_bug.cgi?id=80871
3342
3343         Reviewed by Stephen White.
3344
3345         If the user changes the width or height attributes of a canvas element,
3346         the contents of the canvas should be cleared and the context state
3347         should be reset. This has become a common idiom to clear the canvas
3348         "efficiently" at the start of a frame.
3349
3350         Previously, this code path triggered a full reallocation of the image
3351         buffer backing the canvas, leading to reduced performance. This patch
3352         implements an optimization where we reuse the previous image buffer
3353         allocation if the size of the canvas did not change. Also, instead of
3354         clearing the canvas every time its dimensions are touched, we only clear
3355         if anything has been drawn into the canvas since it was previously
3356         cleared.
3357
3358         Note that for now this optimization only applies for 2D canvases,
3359         since it is not entirely clear how touching the dimensions of a WebGL
3360         canvas should work.
3361
3362         Test: fast/canvas/canvas-resize-after-paint-without-layout.html +
3363               existing layout tests for canvas resetting.
3364
3365         * html/HTMLCanvasElement.cpp:
3366         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
3367         (WebCore::HTMLCanvasElement::reset):
3368         (WebCore::HTMLCanvasElement::createImageBuffer):
3369         (WebCore::HTMLCanvasElement::clearImageBuffer):
3370         (WebCore):
3371         (WebCore::HTMLCanvasElement::clearCopiedImage):
3372         * html/HTMLCanvasElement.h:
3373         (HTMLCanvasElement):
3374         * html/canvas/CanvasRenderingContext2D.cpp:
3375         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Save the
3376         initial graphics context state so we can restore it without creating a
3377         new context.
3378         (WebCore::CanvasRenderingContext2D::unwindStateStack):
3379         (WebCore::CanvasRenderingContext2D::reset): No need to notify the
3380         compositor when the context is reset, because clearing the image buffer
3381         does the same thing. We can also skip the notification if we did not
3382         have an image buffer at the time of the reset, because the reset will
3383         not have any visual impact in this case. Finally, if the canvas size
3384         did change, the notification is also unnecessary because of the call
3385         to RenderObject::repaint() from HTMLCanvasElement::reset().
3386
3387 2012-03-20  Dana Jansens  <danakj@chromium.org>
3388
3389         [chromium] Allow us to disable overdraw metrics when tracing is off
3390         https://bugs.webkit.org/show_bug.cgi?id=81431
3391
3392         Reviewed by Adrienne Walker.
3393
3394         This change allows us to disable overdraw metrics conditionally in the
3395         future with a one-line change in each LayerTreeHost class.
3396
3397         Unit test: CCQuadCullerTest.verifyWithoutMetrics
3398
3399         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3400         (WebCore::CCLayerTreeHost::paintLayerContents):
3401         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3402         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
3403         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
3404         (WebCore::::CCOcclusionTrackerBase):
3405         (WebCore):
3406         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
3407         (CCOcclusionTrackerBase):
3408         * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
3409         (WebCore::CCOverdrawMetrics::CCOverdrawMetrics):
3410         (WebCore::CCOverdrawMetrics::didCull):
3411         (WebCore::CCOverdrawMetrics::didDraw):
3412         (WebCore::CCOverdrawMetrics::recordMetrics):
3413         * platform/graphics/chromium/cc/CCOverdrawMetrics.h:
3414         (WebCore::CCOverdrawMetrics::create):
3415         (CCOverdrawMetrics):
3416
3417 2012-03-20  Robert Hogan  <robert@webkit.org>
3418
3419         Use-after-free of continuation in RenderBlock::paintContinuationOutlines()