Heap-use-after-free in WTF::HashMap<int, WTF::RefPtr<WebCore::CalculationValue>,...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-05-13  Mike Lawther  <mikelawther@chromium.org>
2
3         Heap-use-after-free in WTF::HashMap<int, WTF::RefPtr<WebCore::CalculationValue>, WTF::IntHash<unsigned int>, WTF::HashTrait
4         https://bugs.webkit.org/show_bug.cgi?id=85195
5
6         This bug was caused by Length not understanding that calc expressions shouldn't be 
7         blended - a Length with a calc expression handle was created without incrementing
8         the ref count of the expression. Length no longer attempts to blend calc expressions,
9         http://webkit.org/b/86160 has been filed to track expression blending. Fixing this fixed
10         the crash.
11
12         Once this was fixed, the RenderStyle diff checker thought the style was changing,
13         as Length didn't know how to compare calc expressions, resulting in an infinite
14         loop of style recalcs. Expressions can now compare themselves.
15
16         Reviewed by Darin Adler.
17
18         Tests: css3/calc/transition-crash.html
19                css3/calc/transition-crash2.html
20
21         * platform/CalculationValue.h:
22         (WebCore::CalcExpressionNode::CalcExpressionNode):
23         (CalcExpressionNode):
24         (WebCore::CalcExpressionNode::type):
25         (CalculationValue):
26         (WebCore::CalculationValue::operator==):
27         (WebCore::CalcExpressionNumber::CalcExpressionNumber):
28         (WebCore::CalcExpressionNumber::operator==):
29         (CalcExpressionNumber):
30         (WebCore::CalcExpressionLength::CalcExpressionLength):
31         (WebCore::CalcExpressionLength::operator==):
32         (CalcExpressionLength):
33         (WebCore::CalcExpressionBinaryOperation::CalcExpressionBinaryOperation):
34         (WebCore::CalcExpressionBinaryOperation::operator==):
35         (CalcExpressionBinaryOperation):
36         * platform/Length.cpp:
37         (WebCore::Length::isCalculatedEqual):
38         (WebCore):
39         * platform/Length.h:
40         (WebCore::Length::operator==):
41         (Length):
42         (WebCore::Length::blend):
43
44 2012-05-13  Darin Adler  <darin@apple.com>
45
46         Roll out local changes accidentally landed in r116905.
47
48         * platform/graphics/GraphicsContext.h:
49         * platform/graphics/cg/GraphicsContextCG.cpp:
50         * platform/graphics/cg/ImageCG.cpp:
51
52 2012-05-13  Rob Buis  <rbuis@rim.com>
53
54         Use emptyString instead of String("")
55         https://bugs.webkit.org/show_bug.cgi?id=86305
56
57         Reviewed by Darin Adler.
58
59         Use emptyString() instead of String("") because it is better style and faster.
60
61         No new tests. No change in behavior.
62
63         * Modules/webdatabase/AbstractDatabase.cpp:
64         (WebCore::AbstractDatabase::performOpenAndVerify):
65         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
66         (WebCore::ThreadableWebSocketChannelClientWrapper::subprotocol):
67         (WebCore::ThreadableWebSocketChannelClientWrapper::extensions):
68         * html/HTMLInputElement.cpp:
69         (WebCore::HTMLInputElement::setValueFromRenderer):
70         * platform/SharedBufferChunkReader.cpp:
71         (WebCore::SharedBufferChunkReader::nextChunkAsUTF8StringWithLatin1Fallback):
72         * platform/network/curl/ResourceHandleManager.cpp:
73         (WebCore::ResourceHandleManager::setProxyInfo):
74         * platform/text/LocaleICU.cpp:
75         (WebCore::LocaleICU::initializeLocalizedDateFormatText):
76         * rendering/RenderQuote.cpp:
77         (WebCore::RenderQuote::originalText):
78         * storage/StorageNamespaceImpl.cpp:
79         (WebCore::StorageNamespaceImpl::localStorageNamespace):
80         * svg/SVGStringList.cpp:
81         (WebCore::SVGStringList::reset):
82
83 2012-05-13  Darin Adler  <darin@apple.com>
84
85         Image::initPlatformData is always an empty function so we can remove it
86         https://bugs.webkit.org/show_bug.cgi?id=86297
87
88         Reviewed by Dan Bernstein.
89
90         * platform/graphics/BitmapImage.h: Removed declaration of initPlatformData.
91
92         * platform/graphics/BitmapImage.cpp:
93         (WebCore::BitmapImage::BitmapImage): Removed call to initPlatformData.
94         * platform/graphics/cairo/BitmapImageCairo.cpp:
95         (WebCore::BitmapImage::BitmapImage): Ditto.
96         * platform/graphics/cg/ImageCG.cpp:
97         (WebCore::BitmapImage::BitmapImage): Ditto.
98         * platform/graphics/chromium/ImageChromiumMac.mm: Removed empty
99         initPlatformData function.
100         * platform/graphics/efl/ImageEfl.cpp: Ditto.
101         * platform/graphics/gtk/ImageGtk.cpp:
102         * platform/graphics/mac/ImageMac.mm:
103         * platform/graphics/openvg/ImageOpenVG.cpp:
104         (WebCore::BitmapImage::BitmapImage): Removed call to initPlatformData.
105         Removed empty initPlatformData function.
106         * platform/graphics/qt/ImageQt.cpp:
107         (WebCore::BitmapImage::BitmapImage): Removed call to initPlatformData.
108         Removed empty initPlatformData function.
109         * platform/graphics/skia/ImageSkia.cpp: Removed empty initPlatformData function.
110         * platform/graphics/win/ImageWin.cpp: Ditto.
111         * platform/graphics/wx/ImageWx.cpp: Ditto.
112         (WebCore::BitmapImage::BitmapImage): Removed call to initPlatformData.
113
114 2012-05-13  Darin Adler  <darin@apple.com>
115
116         RenderView::selectionBounds and RenderView::setSelection use maps with raw pointers that should be OwnPtr
117         https://bugs.webkit.org/show_bug.cgi?id=86300
118
119         Reviewed by Eric Seidel.
120
121         * rendering/RenderView.cpp:
122         (WebCore::RenderView::selectionBounds): Changed SelectionMap type to use OwnPtr.
123         Added code to do adoptPtr as needed and removed explicit delete code.
124         (WebCore::RenderView::setSelection): Changed SelectedBlockMap type to use OwnPtr.
125         Added code to do adoptPtr as needed and removed explicit delete code.
126
127 2012-05-13  Darin Adler  <darin@apple.com>
128
129         FractionalLayoutUnit class has unneeded redundant uses of "inline" keyword
130         https://bugs.webkit.org/show_bug.cgi?id=86301
131
132         Reviewed by Andreas Kling.
133
134         * platform/FractionalLayoutUnit.h: Removed uses of inline for functions
135         defined inside a class definition. The C++ language defines that all such
136         functions are treated as if specified with inline, and explicitly stating
137         inline in addition does not add anything or change behavior.
138
139 2012-05-13  Darin Adler  <darin@apple.com>
140
141         Dangling node to ID maps vector uses raw pointers, but should use OwnPtr
142         https://bugs.webkit.org/show_bug.cgi?id=86299
143
144         Reviewed by Pavel Feldman.
145
146         * inspector/InspectorDOMAgent.cpp:
147         (WebCore::InspectorDOMAgent::releaseDanglingNodes): Removed now-unneeded call
148         to deleteAllValues since the clear function now takes care of that.
149         (WebCore::InspectorDOMAgent::pushNodePathToFrontend): Added code that uses
150         adoptPtr and release as neeed to deal with a Vector<OwnPtr>.
151         * inspector/InspectorDOMAgent.h: Changed m_danglingNodeToIdMaps to be
152         Vector<OwnPtr> instead of a vector of raw pointers.
153
154 2012-05-13  Victor Carbune  <vcarbune@adobe.com>
155
156         Volume slider needs to be displayed below the mute button
157         https://bugs.webkit.org/show_bug.cgi?id=85990
158
159         Reviewed by Dimitri Glazkov.
160
161         Added back code for rendering offset, but used only when the volume slider
162         needs to be displayed below the controls.
163
164         Test: media/media-volume-slider-rendered-below.html
165
166         * css/mediaControlsChromium.css:
167         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
168         Changed positioning of the slider to absolute, otherwise it is not possible to position it from the layout() method.
169         * css/mediaControlsQuickTime.css:
170         Added back the double mute-button and changed the z-index of the original button. When the slider is displayed
171         the second mute button is actually there.
172         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
173         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
174         (audio::-webkit-media-controls-volume-slider-mute-button, video::-webkit-media-controls-volume-slider-mute-button):
175         Added copy.
176         * html/shadow/MediaControlElements.cpp:
177         (WebCore::MediaControlPanelElement::makeTransparent): Disabled the possible of hiding controls. WebVTT rendering
178         in the place of controls when these are visible is not possible with the current code.
179         (RenderMediaVolumeSliderContainer):
180         (WebCore):
181         (WebCore::RenderMediaVolumeSliderContainer::RenderMediaVolumeSliderContainer):
182         (WebCore::RenderMediaVolumeSliderContainer::layout):
183         Checked if the absolute coordinates of the corner of the slider would be rendered outside the page. This part of the
184         code is faulty if display:none is toggled on the controls.
185         (WebCore::MediaControlVolumeSliderContainerElement::createRenderer):
186         * html/shadow/MediaControlElements.h:
187         (MediaControlVolumeSliderContainerElement):
188         * html/shadow/MediaControlRootElement.cpp:
189         (WebCore::MediaControlRootElement::create):
190
191 2012-05-13  Igor Oliveira  <igor.o@sisa.samsung.com>
192
193         [Texmap] TextureMapperAnimations does not support keyframe with multiple animations
194         https://bugs.webkit.org/show_bug.cgi?id=86303
195
196         Qt and GTK, in WebKit1, use TextureMapper to store AC animations using
197         TextureMapperAnimations::add(keyframeName, TextureMapperAnimation). And when a 
198         CSS animation animates several CSS properties, TextureMapperAnimations::add is
199         called more than once with the same keyframeName value. However, currently,
200         TextureMapperAnimations can not store more than one animated property in the keyframe
201         because it is using HashMap<String, TextureMapperAnimation>, and WebKit HashMap 
202         does not support add the same key twice.
203
204         Reviewed by Noam Rosenthal.
205
206         * platform/graphics/texmap/TextureMapperAnimation.cpp:
207         (WebCore::TextureMapperAnimations::hasActiveAnimationsOfType):
208         (WebCore::TextureMapperAnimations::hasRunningAnimations):
209         (WebCore::TextureMapperAnimations::add):
210         (WebCore):
211         (WebCore::TextureMapperAnimations::pause):
212         (WebCore::TextureMapperAnimations::apply):
213         * platform/graphics/texmap/TextureMapperAnimation.h:
214         (TextureMapperAnimations): Use HashMap<String, Vector<TextureMapperAnimation> >,
215         so we can support an keyframe with multiple animations.
216
217 2012-05-12  Abhishek Arya  <inferno@chromium.org>
218
219         Crash in HTMLSelectElement::setOption
220         https://bugs.webkit.org/show_bug.cgi?id=85420
221
222         Reviewed by Eric Seidel
223         
224         RefPtr before option in HTMLSelectElement::setOption since it
225         can get destroyed due to mutation events.
226
227         Test: fast/dom/HTMLSelectElement/option-add-crash.html
228
229         * html/HTMLSelectElement.cpp:
230         (WebCore::HTMLSelectElement::setOption):
231
232 2012-05-12  Robin Dunn  <robin@alldunn.com>
233
234         [wx] Restore text paste implementation.
235         https://bugs.webkit.org/show_bug.cgi?id=86311
236
237         Reviewed by Kevin Ollivier.
238
239         * platform/wx/PasteboardWx.cpp:
240         (WebCore::Pasteboard::plainText):
241
242 2012-05-12  Philip Rogers  <pdr@google.com>
243
244         Cleanup before changing attributeName in SVG <animate>
245         https://bugs.webkit.org/show_bug.cgi?id=86100
246
247         Reviewed by Nikolas Zimmermann.
248
249         Changing attributeName caused a crash because references were not removed from the old target.
250         This change simply cleans up before changing attributeName in SVG animation elements.
251
252         Test: svg/animations/dynamic-modify-attributename-crash.svg
253
254         * svg/animation/SVGSMILElement.cpp:
255         (WebCore::SVGSMILElement::svgAttributeChanged):
256
257 2012-05-12  Max Feil  <mfeil@rim.com>
258
259         [BlackBerry] Allow the platform media player to determine the media element's paused/playing status
260         https://bugs.webkit.org/show_bug.cgi?id=86235
261
262         Reviewed by George Staikos.
263
264         The platform media player needs to know when the HTMLMediaElement
265         is not paused. This is to address problems when switching
266         source element, which causes the destruction of the old
267         MediaPlayerPrivate object and construction of a new one. The
268         new one must resume playing ASAP if the old one was playing.
269
270         Test: media/media-continues-playing-after-replace-source.html
271
272         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
273         (WebCore::MediaPlayerPrivate::isElementPaused):
274         (WebCore):
275         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
276         (MediaPlayerPrivate):
277
278 2012-05-12  Yury Semikhatsky  <yurys@chromium.org>
279
280         Web Inspector: heap profiler should allow revealing an element which is logged to the console
281         https://bugs.webkit.org/show_bug.cgi?id=86204
282
283         Reviewed by Pavel Feldman.
284
285         JS objects in the console have context menu item that allows to reveal them in a heap snapshot view.
286
287         * English.lproj/localizedStrings.js:
288         * inspector/front-end/ConsoleMessage.js:
289         (WebInspector.ConsoleMessageImpl.prototype._formatParameterAsObject):
290         * inspector/front-end/ContextMenu.js:
291         (WebInspector.ContextMenu.prototype.isEmpty):
292         * inspector/front-end/DataGrid.js:
293         (WebInspector.DataGridNode.prototype._detach):
294         (WebInspector.DataGridNode.prototype.wasDetached):
295         * inspector/front-end/HeapSnapshot.js:
296         (WebInspector.HeapSnapshot.prototype.nodeClassName):
297         (WebInspector.HeapSnapshotNodesProvider.prototype.nodePosition):
298         * inspector/front-end/HeapSnapshotDataGrids.js:
299         (WebInspector.HeapSnapshotSortableDataGrid):
300         (WebInspector.HeapSnapshotSortableDataGrid.prototype.highlightObjectByHeapSnapshotId):
301         (WebInspector.HeapSnapshotSortableDataGrid.prototype.highlightNode):
302         (WebInspector.HeapSnapshotSortableDataGrid.prototype.nodeWasDetached):
303         (WebInspector.HeapSnapshotSortableDataGrid.prototype._clearCurrentHighlight):
304         (WebInspector.HeapSnapshotViewportDataGrid):
305         (WebInspector.HeapSnapshotViewportDataGrid.prototype.highlightNode):
306         (WebInspector.HeapSnapshotViewportDataGrid.prototype._onScroll):
307         (WebInspector.HeapSnapshotConstructorsDataGrid):
308         (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.highlightObjectByHeapSnapshotId.didGetClassName):
309         (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.highlightObjectByHeapSnapshotId):
310         (WebInspector.HeapSnapshotConstructorsDataGrid.prototype.setDataSource):
311         * inspector/front-end/HeapSnapshotGridNodes.js:
312         (WebInspector.HeapSnapshotGridNode.prototype.wasDetached):
313         (WebInspector.HeapSnapshotConstructorNode.prototype.revealNodeBySnapshotObjectId):
314         (WebInspector.HeapSnapshotConstructorNode.prototype.revealNodeBySnapshotObjectId.didPopulateChildren):
315         * inspector/front-end/HeapSnapshotProxy.js:
316         (WebInspector.HeapSnapshotProxy.prototype.nodeClassName):
317         (WebInspector.HeapSnapshotProviderProxy.prototype.nodePosition):
318         * inspector/front-end/ObjectPropertiesSection.js:
319         (WebInspector.ObjectPropertiesSection.ContextMenuProvider):
320         (WebInspector.ObjectPropertiesSection.ContextMenuProvider.prototype.populateContextMenu):
321         (WebInspector.ObjectPropertiesSection.addContextMenuProvider):
322         (WebInspector.ObjectPropertiesSection.prototype.enableContextMenu):
323         (WebInspector.ObjectPropertiesSection.prototype._contextMenuEventFired):
324         * inspector/front-end/ProfilesPanel.js:
325         (WebInspector.ProfilesPanel.prototype.showObject):
326         (WebInspector.RevealInHeapSnapshotContextMenuProvider):
327         (WebInspector.RevealInHeapSnapshotContextMenuProvider.prototype.populateContextMenu.revealInSummaryView):
328         (WebInspector.RevealInHeapSnapshotContextMenuProvider.prototype.populateContextMenu.didReceiveHeapObjectId):
329         (WebInspector.RevealInHeapSnapshotContextMenuProvider.prototype.populateContextMenu):
330         * inspector/front-end/profilesPanel.css:
331         (.highlighted-row):
332         (@-webkit-keyframes row_highlight):
333         (to):
334
335 2012-05-12  Ilya Tikhonovsky  <loislo@chromium.org>
336
337         Web Inspector: move recording button state control out of addProfileHeader.
338         https://bugs.webkit.org/show_bug.cgi?id=86293
339
340         Reviewed by Yury Semikhatsky.
341
342         * inspector/front-end/CSSSelectorProfileView.js:
343         (WebInspector.CSSSelectorProfileType.prototype.buttonClicked):
344         * inspector/front-end/HeapSnapshotView.js:
345         (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
346         * inspector/front-end/ProfileView.js:
347         (WebInspector.CPUProfileType.prototype.buttonClicked):
348         * inspector/front-end/ProfilesPanel.js:
349         (WebInspector.ProfileType.prototype.buttonClicked):
350         (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
351         (WebInspector.ProfilesPanel.prototype.addProfileHeader):
352         (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
353         (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot.done):
354         (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
355
356 2012-05-12  Eugene Klyuchnikov  <eustas.bug@gmail.com>
357
358         Web Inspector: Turn HelpScreen to be View.
359         https://bugs.webkit.org/show_bug.cgi?id=85711
360
361         Reviewed by Yury Semikhatsky.
362
363         Motivation: for further UI changes, HelpSceen needs to be View.
364         It is planned to combine Settings Screen and Shortcuts Screen in one
365         tabbed screen.
366         Bonus: "helpScreen.css" will be lazy-loaded.
367         Additional changes: move settingsScreen logic out of inspector.js
368
369         UI change, no test required.
370
371         * WebCore.gypi: Change "helpScreen.css" file group.
372         * inspector/front-end/HelpScreen.js: 
373         (WebInspector.HelpScreen): Turned to View subclass.
374         (WebInspector.HelpScreen.prototype.showModal): Remove "onHide" param
375         (WebInspector.HelpScreen.prototype.hide): Ditto.
376         (WebInspector.HelpScreen.prototype._onKeyDown): Adopt View members.
377         (WebInspector.HelpScreen.prototype._onBlur): Ditto.
378         * inspector/front-end/SettingsScreen.js: Adopt new workflow.
379         (WebInspector.SettingsScreen): Put onHide function to member
380         (WebInspector.SettingsScreen.prototype.willHide): Invoke onHide
381         (WebInspector.SettingsController): Mediator pattern - this class
382         takes care of status bar button - settings screen relationship.
383         (WebInspector.SettingsController.prototype.get statusBarItem):
384         Getter fot representative element.
385         (WebInspector.SettingsController.prototype._buttonClicked):
386         Classifies user action.
387         (WebInspector.SettingsController.prototype._onHideSettingsScreen):
388         Cleanup after settings screen is hidden.
389         (WebInspector.SettingsController.prototype._showSettingsScreen):
390         Presents settings screen.
391         (WebInspector.SettingsController.prototype._hideSettingsScreen):
392         Hides settings screen.
393         * inspector/front-end/ShortcutsScreen.js: Adopt new workflow.
394         (WebInspector.ShortcutsScreen.prototype.wasShown): Lazy initialization.
395         * inspector/front-end/WorkerManager.js: Adopt new workflow.
396         (WebInspector.WorkerManager.prototype._disconnectedFromWorker): Ditto.
397         (WebInspector.WorkerTerminatedScreen.prototype.willHide): Ditto.
398         * inspector/front-end/helpScreen.css: Fix spacing.
399         (.help-window-outer): Ditto.
400         (body.compact .help-window-outer): Ditto.
401         (body.compact .help-window-main): Ditto.
402         (body.compact .help-window-caption): Ditto.
403         (.help-content): Ditto.
404         (body.compact .help-content): Ditto.
405         (.help-content select): Ditto.
406         * inspector/front-end/inspector.html: Ditto.
407         * inspector/front-end/inspector.js: Ditto.
408         (WebInspector._createGlobalStatusBarItems): Create SettingsController.
409         (WebInspector.documentKeyDown): Adopt new workflow.
410
411 2012-05-12  Pavel Feldman  <pfeldman@chromium.org>
412
413         Web Inspector: add tab context menu
414         https://bugs.webkit.org/show_bug.cgi?id=86292
415
416         Reviewed by Yury Semikhatsky.
417
418         This tab context menu will have "Close", "Close Others" and "Close All".
419
420         * English.lproj/localizedStrings.js:
421         * inspector/front-end/TabbedPane.js:
422         (WebInspector.TabbedPane.prototype.closeOtherTabs):
423         (WebInspector.TabbedPaneTab.prototype._createTabElement):
424         (WebInspector.TabbedPaneTab.prototype._tabClicked):
425         (WebInspector.TabbedPaneTab.prototype._tabContextMenu):
426         (WebInspector.TabbedPaneTab.prototype._tabContextMenu.closeOthers):
427         (WebInspector.TabbedPaneTab.prototype._tabContextMenu.closeAll):
428
429 2012-05-12  Pavel Feldman  <pfeldman@chromium.org>
430
431         Web Inspector: make call frame selector pane focusable, allow Up / Down to select current call frame.
432         https://bugs.webkit.org/show_bug.cgi?id=86291
433
434         Reviewed by Yury Semikhatsky.
435
436         This change makes sidebar section focusable, introduces key listeners for Up and Down.
437
438         * inspector/front-end/CallStackSidebarPane.js:
439         (WebInspector.CallStackSidebarPane):
440         (WebInspector.CallStackSidebarPane.prototype.setStatus):
441         (WebInspector.CallStackSidebarPane.prototype._treeKeyDown):
442         * inspector/front-end/UISourceCode.js:
443         * inspector/front-end/scriptsPanel.css:
444         (#scripts-debug-toolbar img):
445
446 2012-05-12  Ilya Tikhonovsky  <loislo@chromium.org>
447
448         Web Inspector: unreviewed one line fix.
449
450         * inspector/front-end/HeapSnapshotProxy.js:
451         (WebInspector.HeapSnapshotWorker):
452
453 2012-05-12  Ilya Tikhonovsky  <loislo@chromium.org>
454
455         Web Inspector: Load context menu item has to be shown for all Profiles panel.
456         https://bugs.webkit.org/show_bug.cgi?id=86290
457
458         Reviewed by Pavel Feldman.
459
460         * inspector/front-end/ProfilesPanel.js:
461         (WebInspector.ProfilesPanel.prototype._handleContextMenuEvent):
462
463 2012-05-12  Pavel Feldman  <pfeldman@chromium.org>
464
465         Web Inspector: shrink SourceFrame editing API to two methods (was 4).
466         https://bugs.webkit.org/show_bug.cgi?id=86288
467
468         Reviewed by Yury Semikhatsky.
469
470         Used specific workflow in two SourceFrame implementations.
471
472         * inspector/front-end/JavaScriptSourceFrame.js:
473         (WebInspector.JavaScriptSourceFrame.prototype.commitEditing):
474         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
475         (WebInspector.JavaScriptSourceFrame.prototype._didEditContent):
476         * inspector/front-end/ResourceView.js:
477         (WebInspector.EditableResourceSourceFrame.prototype.commitEditing.callbackWrapper):
478         (WebInspector.EditableResourceSourceFrame.prototype.commitEditing):
479         * inspector/front-end/SourceFrame.js:
480         (WebInspector.SourceFrame.prototype.commitEditing):
481         (WebInspector.TextViewerDelegateForSourceFrame.prototype.commitEditing):
482
483 2012-05-11  Yury Semikhatsky  <yurys@chromium.org>
484
485         Web Inspector: allow showing arbitrary range of nodes in heap snapshot view
486         https://bugs.webkit.org/show_bug.cgi?id=86230
487
488         Reviewed by Pavel Feldman.
489
490         Test: inspector/profiler/heap-snapshot-summary-show-ranges.html
491
492         It was only possible to expand heap snapshot node children sequentially starting
493         from the first child and then pressing either "Show next X items" or "Show all X items".
494         This change makes it possible to show any range of children.
495
496         * inspector/front-end/HeapSnapshot.js:
497         (WebInspector.HeapSnapshotFilteredOrderedIterator):
498         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.serializeItemsRange):
499         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.sortAll):
500         (WebInspector.HeapSnapshotFilteredOrderedIterator.prototype.sortAndRewind):
501         (WebInspector.HeapSnapshotEdgesProvider.prototype.serializeItem):
502         (WebInspector.HeapSnapshotNodesProvider.prototype.serializeItem):
503         * inspector/front-end/HeapSnapshotGridNodes.js:
504         (WebInspector.HeapSnapshotGridNode):
505         (WebInspector.HeapSnapshotGridNode.prototype._populate.sorted):
506         (WebInspector.HeapSnapshotGridNode.prototype._populate):
507         (WebInspector.HeapSnapshotGridNode.prototype._populateChildren.serializeNextChunk):
508         (WebInspector.HeapSnapshotGridNode.prototype._populateChildren.insertRetrievedChild):
509         (WebInspector.HeapSnapshotGridNode.prototype._populateChildren.insertShowMoreButton):
510         (WebInspector.HeapSnapshotGridNode.prototype._populateChildren.childrenRetrieved):
511         (WebInspector.HeapSnapshotGridNode.prototype._populateChildren):
512         (WebInspector.HeapSnapshotGridNode.prototype._saveChildren):
513         (WebInspector.HeapSnapshotGridNode.prototype.sort.afterSort):
514         (WebInspector.HeapSnapshotGridNode.prototype.sort):
515         (WebInspector.HeapSnapshotDiffNodesProvider):
516         (WebInspector.HeapSnapshotDiffNodesProvider.prototype.serializeItemsRange):
517         (WebInspector.HeapSnapshotDiffNodesProvider.prototype.serializeItemsRange.didReceiveDeletedItems):
518         (WebInspector.HeapSnapshotDiffNodesProvider.prototype.serializeItemsRange.didReceiveAddedItems):
519         (WebInspector.HeapSnapshotDiffNodesProvider.prototype.sortAndRewind):
520         * inspector/front-end/HeapSnapshotProxy.js:
521         (WebInspector.HeapSnapshotWorker):
522         (WebInspector.HeapSnapshotProviderProxy.prototype.serializeItemsRange):
523         * inspector/front-end/ShowMoreDataGridNode.js:
524         (WebInspector.ShowMoreDataGridNode):
525         (WebInspector.ShowMoreDataGridNode.prototype._showNextChunk):
526         (WebInspector.ShowMoreDataGridNode.prototype._showAll):
527         (WebInspector.ShowMoreDataGridNode.prototype._updateLabels):
528         (WebInspector.ShowMoreDataGridNode.prototype.setStartPosition):
529         (WebInspector.ShowMoreDataGridNode.prototype.setEndPosition):
530         * inspector/front-end/utilities.js:
531
532 2012-05-12  Pavel Feldman  <pfeldman@chromium.org>
533
534         Web Inspector: remove UISourceCode.id since it is no longer used.
535         https://bugs.webkit.org/show_bug.cgi?id=86286
536
537         Reviewed by Vsevolod Vlasov.
538
539         We are now using breakpointStorageId property for breakpoint persistence.
540
541         * inspector/front-end/BreakpointManager.js:
542         (WebInspector.BreakpointManager):
543         (WebInspector.BreakpointManager.prototype._debuggerReset):
544         (WebInspector.BreakpointManager.prototype._uiLocationAdded.get if):
545         (WebInspector.BreakpointManager.prototype._uiLocationAdded):
546         (WebInspector.BreakpointManager.prototype._uiLocationRemoved.get if):
547         (WebInspector.BreakpointManager.prototype._uiLocationRemoved):
548         * inspector/front-end/CompilerScriptMapping.js:
549         * inspector/front-end/JavaScriptSource.js:
550         (WebInspector.JavaScriptSource):
551         * inspector/front-end/RawSourceCode.js:
552         (WebInspector.RawSourceCode):
553         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
554         (WebInspector.RawSourceCode.prototype._createUISourceCode):
555         (WebInspector.RawSourceCode.prototype._finishedLoading):
556         * inspector/front-end/SnippetsModel.js:
557         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
558         (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
559         * inspector/front-end/UISourceCode.js:
560         (WebInspector.UISourceCode):
561
562 2012-05-12  Pavel Feldman  <pfeldman@chromium.org>
563
564         Web Inspector: merge MainScriptMapping into DebuggerPresentationModel; move other classes into their own files.
565         https://bugs.webkit.org/show_bug.cgi?id=86285
566
567         Reviewed by Yury Semikhatsky.
568
569         The only purpose of the debugger presentation model now is to manage mappings. Merging main script mapping back into it.
570         Other classes defined in that class are moved out into their own files.
571
572         * WebCore.gypi:
573         * WebCore.vcproj/WebCore.vcproj:
574         * inspector/compile-front-end.py:
575         * inspector/front-end/DebuggerPresentationModel.js:
576         (WebInspector.DebuggerPresentationModel):
577         (WebInspector.DebuggerPresentationModel.prototype._parsedScriptSource):
578         (WebInspector.DebuggerPresentationModel.prototype.uiSourceCodes):
579         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
580         * inspector/front-end/DebuggerResourceBinding.js: Added.
581         (WebInspector.DebuggerResourceBinding):
582         (WebInspector.DebuggerResourceBinding.canEditScriptSource):
583         (WebInspector.DebuggerResourceBinding.setScriptSource.didEditScriptSource):
584         (WebInspector.DebuggerResourceBinding.setScriptSource):
585         (WebInspector.DebuggerResourceBinding.prototype.canSetContent):
586         (WebInspector.DebuggerResourceBinding.prototype.setContent):
587         (WebInspector.DebuggerResourceBinding.prototype._uiSourceCodeForResource):
588         (WebInspector.DebuggerResourceBinding.prototype._setContentWithInitialContent):
589         * inspector/front-end/PresentationConsoleMessageHelper.js: Added.
590         (WebInspector.PresentationConsoleMessageHelper):
591         (WebInspector.PresentationConsoleMessageHelper.prototype._consoleMessageAdded):
592         (WebInspector.PresentationConsoleMessageHelper.prototype._addConsoleMessageToScript):
593         (WebInspector.PresentationConsoleMessageHelper.prototype._addPendingConsoleMessage):
594         (WebInspector.PresentationConsoleMessageHelper.prototype._parsedScriptSource):
595         (WebInspector.PresentationConsoleMessageHelper.prototype._consoleCleared):
596         (WebInspector.PresentationConsoleMessageHelper.prototype._debuggerReset):
597         (WebInspector.PresentationConsoleMessage):
598         (WebInspector.PresentationConsoleMessage.prototype._updateLocation):
599         (WebInspector.PresentationConsoleMessage.prototype.get lineNumber):
600         (WebInspector.PresentationConsoleMessage.prototype.dispose):
601         * inspector/front-end/ScriptMapping.js:
602         * inspector/front-end/ScriptsPanel.js:
603         * inspector/front-end/WebKit.qrc:
604         * inspector/front-end/inspector.html:
605         * inspector/front-end/inspector.js:
606
607 2012-05-12  Mike West  <mkwst@chromium.org>
608
609         Cleanup ContentSecurityPolicy naming conventions.
610         https://bugs.webkit.org/show_bug.cgi?id=86282
611
612         Reviewed by Adam Barth.
613
614         Two tiny changes:
615         
616         1. `reportURI` and `reportURL` are both used within the CSP
617            implementation. We should standardize on `reportURI` to match the
618            spec.
619         
620         2. Renames `ContentSecurityPolicy::allowConnectFromSource` to
621            `ContentSecurityPolicy::allowConnectToSource` for clarity.
622
623         No new tests, as there's no user-visible change.
624
625         * Modules/websockets/WebSocket.cpp:
626         (WebCore::WebSocket::connect):
627         * page/ContentSecurityPolicy.cpp:
628         (CSPDirectiveList):
629         (WebCore::CSPDirectiveList::reportViolation):
630         (WebCore::CSPDirectiveList::allowConnectToSource):
631         (WebCore::CSPDirectiveList::parseReportURI):
632         (WebCore::CSPDirectiveList::addDirective):
633         (WebCore::ContentSecurityPolicy::allowConnectToSource):
634         * page/ContentSecurityPolicy.h:
635         * page/EventSource.cpp:
636         (WebCore::EventSource::create):
637         * xml/XMLHttpRequest.cpp:
638         (WebCore::XMLHttpRequest::open):
639
640 2012-05-11  Mark Pilgrim  <pilgrim@chromium.org>
641
642         [Chromium] Call isLinkVisited directly
643         https://bugs.webkit.org/show_bug.cgi?id=85412
644
645         Reviewed by Adam Barth.
646
647         Part of a refactoring series. See tracking bug 82948.
648
649         * CMakeLists.txt:
650         * GNUmakefile.list.am:
651         * Target.pri:
652         * WebCore.gypi:
653         * WebCore.vcproj/WebCore.vcproj:
654         * WebCore.xcodeproj/project.pbxproj:
655         * page/PageGroup.cpp:
656         (WebCore::PageGroup::isLinkVisited):
657         * platform/VisitedLinks.cpp: Added.
658         (WebCore):
659         (WebCore::VisitedLinks::isLinkVisited):
660         * platform/VisitedLinks.h: Added.
661         (WebCore):
662         (VisitedLinks):
663         * platform/chromium/PlatformSupport.h:
664         * platform/chromium/VisitedLinksChromium.cpp: Added.
665         (WebCore):
666         (WebCore::VisitedLinks::isLinkVisited):
667
668 2012-05-11  Martin Robinson  <mrobinson@igalia.com>
669
670         [TextureMapper] Tiles are not created for large textures
671         https://bugs.webkit.org/show_bug.cgi?id=86245
672
673         Reviewed by Noam Rosenthal.
674
675         No new tests. This will not produce any observable behavior changes,
676         unless run on a machine with a small texture size limit.
677
678         The maxTextureSize() method on TextureMapperGL was missing a "const"
679         keyword, meaning that it was not properly overriding the version in
680         the abstract base class (TextureMapper). This patch adds the const
681         modifier and cleans up the list of override methods in the two 
682         TextureMapper sublcasses, adding the OVERRIDE macro for compilers that
683         support it and removing a couple unused methods.
684
685         * platform/graphics/texmap/TextureMapperGL.cpp:
686         * platform/graphics/texmap/TextureMapperGL.h:
687         (WebCore::TextureMapperGL::create):
688         * platform/graphics/texmap/TextureMapperImageBuffer.h:
689         (TextureMapperImageBuffer):
690
691 2012-05-11  Adrienne Walker  <enne@google.com>
692
693         [chromium] Prevent deadlock on CCVideoLayerImpl destruction
694         https://bugs.webkit.org/show_bug.cgi?id=86258
695
696         Reviewed by James Robinson.
697
698         ~CCVideoLayerImpl had a common deadlock issue where if it got
699         destroyed before WebMediaPlayerClientImpl, it would take a lock,
700         call WebMediaPlayerClientImpl::setVideoFrameProviderClient(0),
701         which in turn would call CCVideoLayerImpl::stopUsingProvider(),
702         which would try to take the same lock and would deadlock.
703
704         CCVideoLayerImpl is only created and destroyed during tree
705         synchronization in a commit or during synchronous compositor thread
706         destruction. In either case, the main thread is blocked, and so no
707         lock needs to be taken at all.
708
709         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
710         (WebCore::CCVideoLayerImpl::CCVideoLayerImpl):
711         (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl):
712         (WebCore::CCVideoLayerImpl::stopUsingProvider):
713
714 2012-05-11  Jeffrey Pfau  <jpfau@apple.com>
715
716         REGRESSION (r114170): Scroll areas in nested frames improperly placed when tiled drawing is enabled
717         https://bugs.webkit.org/show_bug.cgi?id=86239
718
719         Reviewed by Anders Carlsson.
720
721         Fixes a regression introduced in r114170 by recursively adding positions of parent frames to placement of nested frame scroll areas.
722
723         Manual tests: ManualTests/scrollable-positioned-frame.html
724                       ManualTests/scrollable-positioned-nested-frame.html
725
726         * page/scrolling/ScrollingCoordinator.cpp:
727         (WebCore::computeNonFastScrollableRegion):
728         (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
729
730 2012-05-11  Beth Dakin  <bdakin@apple.com>
731
732         https://bugs.webkit.org/show_bug.cgi?id=86278
733         Composited layers should only run the overlay scrollbars painting pass 
734         if necessary
735
736         Reviewed by Dan Bernstein.
737
738         It's not enough that the rootLayer has dirty scrollbars; we also have 
739         to actually be doing the overlay scrollbars painting pass to skip the 
740         early return.
741         * rendering/RenderLayer.cpp:
742         (WebCore::RenderLayer::paintLayer):
743
744 2012-05-11  Anders Carlsson  <andersca@apple.com>
745
746         Comcast website displays bottom of page when loaded
747         https://bugs.webkit.org/show_bug.cgi?id=86277
748         <rdar://problem/11426887>
749
750         Reviewed by Beth Dakin.
751
752         There were two bugs here. The first bug was that FrameView::setScrollPosition didn't end up calling into the scrolling coordinator
753         to update the scroll position. The second bug was that ScrollingTreeNodeMac::setScrollPosition didn't constrain the scroll position
754         to the edge of the page.
755
756         * page/FrameView.cpp:
757         (WebCore::FrameView::setScrollPosition):
758         Call requestScrollPositionUpdate.
759
760         * page/scrolling/ScrollingTree.cpp:
761         * page/scrolling/ScrollingTree.h:
762         Remove setMainFrameScrollPosition, it is not called by anyone.
763
764         * page/scrolling/mac/ScrollingTreeNodeMac.h:
765         * page/scrolling/mac/ScrollingTreeNodeMac.mm:
766         (WebCore::ScrollingTreeNodeMac::setScrollPosition):
767         Clamp to the page size and call setScrollPositionWithoutContentEdgeConstraints.
768
769         (WebCore::ScrollingTreeNodeMac::setScrollPositionWithoutContentEdgeConstraints):
770         Update the scroll layer position and call back to the main thread.
771
772         (WebCore::ScrollingTreeNodeMac::scrollBy):
773         Call setScrollPosition.
774
775         (WebCore::ScrollingTreeNodeMac::scrollByWithoutContentEdgeConstraints):
776         Call setScrollPositionWithoutContentEdgeConstraints.
777
778 2012-05-11  Gavin Barraclough  <barraclough@apple.com>
779
780         Introduce PropertyName class
781         https://bugs.webkit.org/show_bug.cgi?id=86241
782
783         Reviewed by Geoff Garen.
784
785         Replace 'const Identifier&' arguments to functions accessing object properties with a new 'PropertyName' type.
786         This change paves the way to allow for properties keyed by values that are not Identifiers.
787
788         This change is largely a mechanical find & replace.
789         It also changes JSFunction's constructor to take a UString& instead of an Identifier&
790         (since in some cases we can no longer guarantee that we'lll have an Identifier), and
791         unifies Identifier's methods to obtain array indices onto PropertyName.
792
793         The new PropertyName class retains the ability to support .impl() and .ustring(), but
794         in a future patch we may need to rework this, since not all PropertyNames should be
795         equal based on their string representation.
796
797         * WebCore.exp.in:
798         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
799         (WebCore::cssPropertyIDForJSCSSPropertyName):
800         (WebCore::JSCSSStyleDeclaration::getOwnPropertySlotDelegate):
801         (WebCore::JSCSSStyleDeclaration::getOwnPropertyDescriptorDelegate):
802         (WebCore::JSCSSStyleDeclaration::putDelegate):
803         * bindings/js/JSDOMBinding.cpp:
804         (WebCore::findAtomicString):
805         (WebCore::objectToStringFunctionGetter):
806         * bindings/js/JSDOMBinding.h:
807         (WebCore):
808         (WebCore::propertyNameToString):
809         (WebCore::propertyNameToAtomicString):
810         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
811         (WebCore::JSDOMMimeTypeArray::canGetItemsForName):
812         (WebCore::JSDOMMimeTypeArray::nameGetter):
813         * bindings/js/JSDOMPluginArrayCustom.cpp:
814         (WebCore::JSDOMPluginArray::canGetItemsForName):
815         (WebCore::JSDOMPluginArray::nameGetter):
816         * bindings/js/JSDOMPluginCustom.cpp:
817         (WebCore::JSDOMPlugin::canGetItemsForName):
818         (WebCore::JSDOMPlugin::nameGetter):
819         * bindings/js/JSDOMStringMapCustom.cpp:
820         (WebCore::JSDOMStringMap::canGetItemsForName):
821         (WebCore::JSDOMStringMap::nameGetter):
822         (WebCore::JSDOMStringMap::deleteProperty):
823         (WebCore::JSDOMStringMap::putDelegate):
824         * bindings/js/JSDOMWindowCustom.cpp:
825         (WebCore::nonCachingStaticFunctionGetter):
826         (WebCore::childFrameGetter):
827         (WebCore::namedItemGetter):
828         (WebCore::JSDOMWindow::getOwnPropertySlot):
829         (WebCore::JSDOMWindow::getOwnPropertyDescriptor):
830         (WebCore::JSDOMWindow::put):
831         (WebCore::JSDOMWindow::deleteProperty):
832         (WebCore::JSDOMWindow::defineOwnProperty):
833         * bindings/js/JSDOMWindowShell.cpp:
834         (WebCore::JSDOMWindowShell::getOwnPropertySlot):
835         (WebCore::JSDOMWindowShell::getOwnPropertyDescriptor):
836         (WebCore::JSDOMWindowShell::put):
837         (WebCore::JSDOMWindowShell::putDirectVirtual):
838         (WebCore::JSDOMWindowShell::defineOwnProperty):
839         (WebCore::JSDOMWindowShell::deleteProperty):
840         * bindings/js/JSDOMWindowShell.h:
841         (JSDOMWindowShell):
842         * bindings/js/JSHTMLAllCollectionCustom.cpp:
843         (WebCore::getNamedItems):
844         (WebCore::callHTMLAllCollection):
845         (WebCore::JSHTMLAllCollection::canGetItemsForName):
846         (WebCore::JSHTMLAllCollection::nameGetter):
847         (WebCore::JSHTMLAllCollection::item):
848         * bindings/js/JSHTMLAppletElementCustom.cpp:
849         (WebCore::JSHTMLAppletElement::getOwnPropertySlotDelegate):
850         (WebCore::JSHTMLAppletElement::getOwnPropertyDescriptorDelegate):
851         (WebCore::JSHTMLAppletElement::putDelegate):
852         * bindings/js/JSHTMLCollectionCustom.cpp:
853         (WebCore::getNamedItems):
854         (WebCore::JSHTMLCollection::canGetItemsForName):
855         (WebCore::JSHTMLCollection::nameGetter):
856         * bindings/js/JSHTMLDocumentCustom.cpp:
857         (WebCore::JSHTMLDocument::canGetItemsForName):
858         (WebCore::JSHTMLDocument::nameGetter):
859         * bindings/js/JSHTMLEmbedElementCustom.cpp:
860         (WebCore::JSHTMLEmbedElement::getOwnPropertySlotDelegate):
861         (WebCore::JSHTMLEmbedElement::getOwnPropertyDescriptorDelegate):
862         (WebCore::JSHTMLEmbedElement::putDelegate):
863         * bindings/js/JSHTMLFormElementCustom.cpp:
864         (WebCore::JSHTMLFormElement::canGetItemsForName):
865         (WebCore::JSHTMLFormElement::nameGetter):
866         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
867         (WebCore::JSHTMLFrameSetElement::canGetItemsForName):
868         (WebCore::JSHTMLFrameSetElement::nameGetter):
869         * bindings/js/JSHTMLObjectElementCustom.cpp:
870         (WebCore::JSHTMLObjectElement::getOwnPropertySlotDelegate):
871         (WebCore::JSHTMLObjectElement::getOwnPropertyDescriptorDelegate):
872         (WebCore::JSHTMLObjectElement::putDelegate):
873         * bindings/js/JSHistoryCustom.cpp:
874         (WebCore::nonCachingStaticBackFunctionGetter):
875         (WebCore::nonCachingStaticForwardFunctionGetter):
876         (WebCore::nonCachingStaticGoFunctionGetter):
877         (WebCore::JSHistory::getOwnPropertySlotDelegate):
878         (WebCore::JSHistory::getOwnPropertyDescriptorDelegate):
879         (WebCore::JSHistory::putDelegate):
880         (WebCore::JSHistory::deleteProperty):
881         * bindings/js/JSLocationCustom.cpp:
882         (WebCore::nonCachingStaticReplaceFunctionGetter):
883         (WebCore::nonCachingStaticReloadFunctionGetter):
884         (WebCore::nonCachingStaticAssignFunctionGetter):
885         (WebCore::JSLocation::getOwnPropertySlotDelegate):
886         (WebCore::JSLocation::getOwnPropertyDescriptorDelegate):
887         (WebCore::JSLocation::putDelegate):
888         (WebCore::JSLocation::deleteProperty):
889         (WebCore::JSLocation::defineOwnProperty):
890         (WebCore::JSLocationPrototype::putDelegate):
891         (WebCore::JSLocationPrototype::defineOwnProperty):
892         * bindings/js/JSNamedNodeMapCustom.cpp:
893         (WebCore::JSNamedNodeMap::canGetItemsForName):
894         (WebCore::JSNamedNodeMap::nameGetter):
895         * bindings/js/JSNodeListCustom.cpp:
896         (WebCore::JSNodeList::canGetItemsForName):
897         (WebCore::JSNodeList::nameGetter):
898         * bindings/js/JSPluginElementFunctions.cpp:
899         (WebCore::runtimeObjectPropertyGetter):
900         (WebCore::runtimeObjectCustomGetOwnPropertySlot):
901         (WebCore::runtimeObjectCustomGetOwnPropertyDescriptor):
902         (WebCore::runtimeObjectCustomPut):
903         * bindings/js/JSPluginElementFunctions.h:
904         (WebCore):
905         * bindings/js/JSStorageCustom.cpp:
906         (WebCore::JSStorage::canGetItemsForName):
907         (WebCore::JSStorage::nameGetter):
908         (WebCore::JSStorage::deleteProperty):
909         (WebCore::JSStorage::putDelegate):
910         * bindings/js/JSStyleSheetListCustom.cpp:
911         (WebCore::JSStyleSheetList::canGetItemsForName):
912         (WebCore::JSStyleSheetList::nameGetter):
913         * bindings/js/JSWorkerContextCustom.cpp:
914         (WebCore::JSWorkerContext::getOwnPropertySlotDelegate):
915         (WebCore::JSWorkerContext::getOwnPropertyDescriptorDelegate):
916         * bindings/scripts/CodeGeneratorJS.pm:
917         (GenerateGetOwnPropertySlotBody):
918         (GenerateGetOwnPropertyDescriptorBody):
919         (GenerateHeader):
920         (GenerateImplementation):
921         (GenerateConstructorDeclaration):
922         (GenerateConstructorDefinition):
923         * bridge/c/c_class.cpp:
924         (JSC::Bindings::CClass::methodsNamed):
925         (JSC::Bindings::CClass::fieldNamed):
926         * bridge/c/c_class.h:
927         (CClass):
928         * bridge/c/c_instance.cpp:
929         (JSC::Bindings::CRuntimeMethod::create):
930         (JSC::Bindings::CRuntimeMethod::finishCreation):
931         (JSC::Bindings::CInstance::getMethod):
932         * bridge/c/c_instance.h:
933         (CInstance):
934         * bridge/jni/jsc/JavaClassJSC.cpp:
935         (JavaClass::methodsNamed):
936         (JavaClass::fieldNamed):
937         * bridge/jni/jsc/JavaClassJSC.h:
938         (JavaClass):
939         * bridge/jni/jsc/JavaInstanceJSC.cpp:
940         (JavaRuntimeMethod::create):
941         (JavaRuntimeMethod::finishCreation):
942         * bridge/jni/jsc/JavaInstanceJSC.h:
943         (JavaInstance):
944         * bridge/jsc/BridgeJSC.h:
945         (Class):
946         (JSC::Bindings::Class::fallbackObject):
947         (JSC::Bindings::Instance::setValueOfUndefinedField):
948         (Instance):
949         (JSC::Bindings::Instance::getOwnPropertySlot):
950         (JSC::Bindings::Instance::getOwnPropertyDescriptor):
951         (JSC::Bindings::Instance::put):
952         * bridge/objc/objc_class.h:
953         (ObjcClass):
954         * bridge/objc/objc_class.mm:
955         (JSC::Bindings::ObjcClass::methodsNamed):
956         (JSC::Bindings::ObjcClass::fieldNamed):
957         (JSC::Bindings::ObjcClass::fallbackObject):
958         * bridge/objc/objc_instance.h:
959         (ObjcInstance):
960         * bridge/objc/objc_instance.mm:
961         (ObjCRuntimeMethod::create):
962         (ObjCRuntimeMethod::finishCreation):
963         (ObjcInstance::setValueOfUndefinedField):
964         (ObjcInstance::getValueOfUndefinedField):
965         * bridge/objc/objc_runtime.h:
966         (JSC::Bindings::ObjcFallbackObjectImp::create):
967         (JSC::Bindings::ObjcFallbackObjectImp::propertyName):
968         (ObjcFallbackObjectImp):
969         * bridge/objc/objc_runtime.mm:
970         (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
971         (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertySlot):
972         (JSC::Bindings::ObjcFallbackObjectImp::getOwnPropertyDescriptor):
973         (JSC::Bindings::ObjcFallbackObjectImp::put):
974         (JSC::Bindings::callObjCFallbackObject):
975         (JSC::Bindings::ObjcFallbackObjectImp::deleteProperty):
976         (JSC::Bindings::ObjcFallbackObjectImp::defaultValue):
977         * bridge/runtime_array.cpp:
978         (JSC::RuntimeArray::lengthGetter):
979         (JSC::RuntimeArray::getOwnPropertySlot):
980         (JSC::RuntimeArray::getOwnPropertyDescriptor):
981         (JSC::RuntimeArray::put):
982         (JSC::RuntimeArray::deleteProperty):
983         * bridge/runtime_array.h:
984         (RuntimeArray):
985         * bridge/runtime_method.cpp:
986         (JSC::RuntimeMethod::finishCreation):
987         (JSC::RuntimeMethod::lengthGetter):
988         (JSC::RuntimeMethod::getOwnPropertySlot):
989         (JSC::RuntimeMethod::getOwnPropertyDescriptor):
990         * bridge/runtime_method.h:
991         (JSC::RuntimeMethod::create):
992         (RuntimeMethod):
993         * bridge/runtime_object.cpp:
994         (JSC::Bindings::RuntimeObject::fallbackObjectGetter):
995         (JSC::Bindings::RuntimeObject::fieldGetter):
996         (JSC::Bindings::RuntimeObject::methodGetter):
997         (JSC::Bindings::RuntimeObject::getOwnPropertySlot):
998         (JSC::Bindings::RuntimeObject::getOwnPropertyDescriptor):
999         (JSC::Bindings::RuntimeObject::put):
1000         (JSC::Bindings::RuntimeObject::deleteProperty):
1001         * bridge/runtime_object.h:
1002         (RuntimeObject):
1003
1004 2012-05-11  David Barton  <dbarton@mathscribe.com>
1005
1006         use after free in WebCore::RenderObject::document
1007         https://bugs.webkit.org/show_bug.cgi?id=84891
1008
1009         Reviewed by Julien Chaffraix.
1010
1011         Change RenderMathMLFenced::addChild() to use the beforeChild parameter. When beforeChild
1012         is 0, insert child renderers before the closing fence, which might not be the same as
1013         this->lastChild(), e.g. possibly due to anonymous blocks or generated content.
1014
1015         Tests: mathml/presentation/mfenced-add-child1-expected.html
1016                mathml/presentation/mfenced-add-child1.html
1017                mathml/presentation/mfenced-add-child2-expected.html
1018                mathml/presentation/mfenced-add-child2.html
1019
1020         * rendering/mathml/RenderMathMLFenced.cpp:
1021         (WebCore::RenderMathMLFenced::RenderMathMLFenced):
1022         (WebCore::RenderMathMLFenced::makeFences):
1023         (WebCore::RenderMathMLFenced::addChild):
1024         * rendering/mathml/RenderMathMLFenced.h:
1025         (RenderMathMLFenced):
1026
1027 2012-05-11  Anders Carlsson  <andersca@apple.com>
1028
1029         Can't scroll on webpage after following links from Blogger
1030         https://bugs.webkit.org/show_bug.cgi?id=86274
1031         <rdar://problem/11431352>
1032
1033         Reviewed by Beth Dakin.
1034
1035         When committing a new scroll layer, make sure to reset the scroll position.
1036
1037         * page/scrolling/ScrollingTree.cpp:
1038         (WebCore::ScrollingTree::commitNewTreeState):
1039
1040 2012-05-11  Martin Robinson  <mrobinson@igalia.com>
1041
1042         [TextureMapper] Support drawing debug borders
1043         https://bugs.webkit.org/show_bug.cgi?id=86237
1044
1045         Reviewed by Noam Rosenthal.
1046
1047         No new tests. This is the implementation of an interactive debugging
1048         feature.
1049
1050         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1051         (WebCore::GraphicsLayer::create): Moved this to the top of the file to
1052         reduce contention for the coveted last spot in the file. This also
1053         follows the pattern used in many WebCore files of having the factories
1054         at the top.
1055         (WebCore::GraphicsLayerTextureMapper::setDebugBorder): Added this
1056         plumbing.
1057         * platform/graphics/texmap/GraphicsLayerTextureMapper.h: Added
1058         plumbing.
1059         * platform/graphics/texmap/TextureMapper.h: Ditto.
1060         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
1061         (WebCore::TextureMapperTiledBackingStore::TextureMapperTiledBackingStore):
1062         Initialize the new member.
1063         (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper): When
1064         debug borders are enabled call the new drawBorder method on the TM.
1065         (WebCore::TextureMapperTiledBackingStore::setDebugBorder): Added this
1066         plumbing.
1067         * platform/graphics/texmap/TextureMapperBackingStore.h: Added plumbing
1068         and members to store debug border states. This is necessary because of
1069         the when painting there is no handle on the GraphicsLayers.
1070         * platform/graphics/texmap/TextureMapperGL.cpp:
1071         (WebCore::TextureMapperGL::drawRect): Factored out the common bits of
1072         drawTexture and drawBorder into this helper.
1073         (WebCore::TextureMapperGL::drawBorder): Added this method, which works
1074         very similarly to drawTexture, but uses a different shader program and
1075         must also set the line width and color.
1076         (WebCore::TextureMapperGL::drawTexture): Factored out the bits that
1077         are shared with drawRect.
1078         * platform/graphics/texmap/TextureMapperGL.h:
1079         (TextureMapperGL): Added the new method declarations.
1080         * platform/graphics/texmap/TextureMapperImageBuffer.h:
1081         (WebCore::TextureMapperImageBuffer::drawBorder): Added an empty
1082         implementation. Later we can add an implementation for the ImageBuffer
1083         TM.
1084         * platform/graphics/texmap/TextureMapperLayer.cpp:
1085         (WebCore::TextureMapperLayer::updateBackingStore): When updating the
1086         backing store send the debug border information through.
1087         (WebCore::TextureMapperLayer::syncCompositingStateSelf): When updating
1088         the layer state, also update the debug indicators. This is required to
1089         initialize the debug border values for the layer.
1090         (WebCore::TextureMapperLayer::setDebugBorder): Added this plumbing.
1091         * platform/graphics/texmap/TextureMapperLayer.h: Ditto.
1092         * platform/graphics/texmap/TextureMapperShaderManager.cpp: Added a
1093         solid color shader that doesn't care about texture coordinates or
1094         opacity values.
1095         (WebCore::TextureMapperShaderManager::solidColorProgram): Added. This
1096         is a shorter getter for the solid color program that doesn't require
1097         casting from the caller.
1098         (WebCore::TextureMapperShaderManager::getShaderProgram): Added support
1099         for the solid color program.
1100         (WebCore::TextureMapperShaderProgramSolidColor::create): Added.
1101         (WebCore::TextureMapperShaderProgramSolidColor::TextureMapperShaderProgramSolidColor):
1102         Ditto.
1103         (WebCore::TextureMapperShaderProgramSolidColor::vertexShaderSource):
1104         Ditto.
1105         (WebCore::TextureMapperShaderProgramSolidColor::fragmentShaderSource):
1106         Ditto.
1107         * platform/graphics/texmap/TextureMapperShaderManager.h:
1108         (TextureMapperShaderProgramSolidColor): Added.
1109         (WebCore::TextureMapperShaderProgramSolidColor::colorVariable): Added.
1110
1111 2012-05-10  Timothy Hatcher  <timothy@apple.com>
1112
1113         Instrument timer function calls so they show up in the Web Inspector Timeline.
1114
1115         https://webkit.org/b/86173
1116
1117         Reviewed by Pavel Feldman.
1118
1119         Test: inspector/timeline/timeline-timer.html
1120
1121         * bindings/js/ScheduledAction.cpp:
1122         (WebCore::ScheduledAction::executeFunctionInContext): Wrap the call with JSMainThreadExecState::instrumentFunctionCall
1123         and InspectorInstrumentation::didCallFunction.
1124
1125 2012-05-11  Nico Weber  <thakis@chromium.org>
1126
1127         [chromium/mac] Let libwebkit.dylib link in Debug/components build
1128         https://bugs.webkit.org/show_bug.cgi?id=86244
1129
1130         Reviewed by James Robinson.
1131
1132         In static builds, this was not needed because the targets depending on
1133         'webkit' already link in QuartzCore. In Release components builds, it wasn't
1134         needed because they are built with -dead_strip, which stripped the referencing
1135         code.
1136
1137         * WebCore.gyp/WebCore.gyp:
1138
1139 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
1140
1141         Unreviewed, rolling out r116802.
1142         http://trac.webkit.org/changeset/116802
1143         https://bugs.webkit.org/show_bug.cgi?id=86260
1144
1145         This patch causes compiling error to chromium builds
1146         (Requested by jianli_ on #webkit).
1147
1148         * WebCore.gypi:
1149
1150 2012-05-11  Ryosuke Niwa  <rniwa@webkit.org>
1151
1152         Regression fix after r116798.
1153
1154         We need to return true for the html element in the design mode
1155         in which case parentNode() is editable and is not a body element.
1156
1157         * dom/Node.cpp:
1158         (WebCore::Node::isRootEditableElement):
1159
1160 2012-05-11  James Robinson  <jamesr@chromium.org>
1161
1162         [chromium] Move implementation of WebCore::GraphicsContext3D and related from WebKit/chromium/src to WebCore/platform/chromium/support
1163         https://bugs.webkit.org/show_bug.cgi?id=86257
1164
1165         Reviewed by Adam Barth.
1166
1167         The WebCore platform interfaces GraphicsContext3D and Extensions3DChromium are implemented in chromium on top of
1168         the Platform interface WebGraphicsContext3D. This moves the implementation support code from WebKit/chromium/src
1169         to WebCore/platform/chromium/support, which avoids having code in WebKit/ implementing WebCore interfaces and
1170         allows code in WebCore/platform to use this support code directly where appropriate.
1171
1172         Refactor only, no new functionality or tests.
1173
1174         * WebCore.gypi:
1175         * platform/chromium/support/Extensions3DChromium.cpp: Renamed from Source/WebKit/chromium/src/Extensions3DChromium.cpp.
1176         (WebCore):
1177         (WebCore::Extensions3DChromium::Extensions3DChromium):
1178         (WebCore::Extensions3DChromium::~Extensions3DChromium):
1179         (WebCore::Extensions3DChromium::supports):
1180         (WebCore::Extensions3DChromium::ensureEnabled):
1181         (WebCore::Extensions3DChromium::isEnabled):
1182         (WebCore::Extensions3DChromium::getGraphicsResetStatusARB):
1183         (WebCore::Extensions3DChromium::blitFramebuffer):
1184         (WebCore::Extensions3DChromium::renderbufferStorageMultisample):
1185         (WebCore::Extensions3DChromium::postSubBufferCHROMIUM):
1186         (WebCore::Extensions3DChromium::mapBufferSubDataCHROMIUM):
1187         (WebCore::Extensions3DChromium::unmapBufferSubDataCHROMIUM):
1188         (WebCore::Extensions3DChromium::mapTexSubImage2DCHROMIUM):
1189         (WebCore::Extensions3DChromium::unmapTexSubImage2DCHROMIUM):
1190         (WebCore::Extensions3DChromium::setVisibilityCHROMIUM):
1191         (WebCore::Extensions3DChromium::discardFramebufferEXT):
1192         (WebCore::Extensions3DChromium::ensureFramebufferCHROMIUM):
1193         (WebCore::Extensions3DChromium::setGpuMemoryAllocationChangedCallbackCHROMIUM):
1194         (WebCore::Extensions3DChromium::createVertexArrayOES):
1195         (WebCore::Extensions3DChromium::deleteVertexArrayOES):
1196         (WebCore::Extensions3DChromium::isVertexArrayOES):
1197         (WebCore::Extensions3DChromium::bindVertexArrayOES):
1198         (WebCore::Extensions3DChromium::getTranslatedShaderSourceANGLE):
1199         (WebCore::Extensions3DChromium::setSwapBuffersCompleteCallbackCHROMIUM):
1200         (WebCore::Extensions3DChromium::rateLimitOffscreenContextCHROMIUM):
1201         (WebCore::Extensions3DChromium::paintFramebufferToCanvas):
1202         (WebCore::Extensions3DChromium::texImageIOSurface2DCHROMIUM):
1203         (WebCore::Extensions3DChromium::texStorage2DEXT):
1204         (WebCore::Extensions3DChromium::createQueryEXT):
1205         (WebCore::Extensions3DChromium::deleteQueryEXT):
1206         (WebCore::Extensions3DChromium::isQueryEXT):
1207         (WebCore::Extensions3DChromium::beginQueryEXT):
1208         (WebCore::Extensions3DChromium::endQueryEXT):
1209         (WebCore::Extensions3DChromium::getQueryivEXT):
1210         (WebCore::Extensions3DChromium::getQueryObjectuivEXT):
1211         * platform/chromium/support/GraphicsContext3DChromium.cpp: Renamed from Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp.
1212         (WebCore):
1213         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1214         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
1215         (WebCore::GraphicsContext3DPrivate::createGraphicsContextFromWebContext):
1216         (WebCore::GraphicsContext3DPrivate::extractWebGraphicsContext3D):
1217         (WebCore::GraphicsContext3DPrivate::platformGraphicsContext3D):
1218         (WebCore::GraphicsContext3DPrivate::platformTexture):
1219         (GrMemoryAllocationChangedCallback):
1220         (WebCore::GrMemoryAllocationChangedCallback::GrMemoryAllocationChangedCallback):
1221         (WebCore::GrMemoryAllocationChangedCallback::onGpuMemoryAllocationChanged):
1222         (WebCore::GraphicsContext3DPrivate::grContext):
1223         (WebCore::GraphicsContext3DPrivate::prepareTexture):
1224         (WebCore::GraphicsContext3DPrivate::markContextChanged):
1225         (WebCore::GraphicsContext3DPrivate::markLayerComposited):
1226         (WebCore::GraphicsContext3DPrivate::layerComposited):
1227         (WebCore::GraphicsContext3DPrivate::paintFramebufferToCanvas):
1228         (WebCore::GraphicsContext3DPrivate::paintRenderingResultsToCanvas):
1229         (WebCore::GraphicsContext3DPrivate::paintCompositedResultsToCanvas):
1230         (WebCore::GraphicsContext3DPrivate::paintRenderingResultsToImageData):
1231         (WebCore::GraphicsContext3DPrivate::reshape):
1232         (WebCore::GraphicsContext3DPrivate::getInternalFramebufferSize):
1233         (WebCore::GraphicsContext3DPrivate::isContextLost):
1234         (WebCore::GraphicsContext3DPrivate::isGLES2Compliant):
1235         (WebCore::GraphicsContext3DPrivate::bindAttribLocation):
1236         (WebCore::GraphicsContext3DPrivate::bufferData):
1237         (WebCore::GraphicsContext3DPrivate::bufferSubData):
1238         (WebCore::GraphicsContext3DPrivate::getActiveAttrib):
1239         (WebCore::GraphicsContext3DPrivate::getActiveUniform):
1240         (WebCore::GraphicsContext3DPrivate::getAttribLocation):
1241         (WebCore::GraphicsContext3DPrivate::getContextAttributes):
1242         (WebCore::GraphicsContext3DPrivate::getProgramInfoLog):
1243         (WebCore::GraphicsContext3DPrivate::getShaderInfoLog):
1244         (WebCore::GraphicsContext3DPrivate::getShaderSource):
1245         (WebCore::GraphicsContext3DPrivate::getString):
1246         (WebCore::GraphicsContext3DPrivate::getUniformLocation):
1247         (WebCore::GraphicsContext3DPrivate::shaderSource):
1248         (WebCore::GraphicsContext3DPrivate::texImage2D):
1249         (WebCore::GraphicsContext3DPrivate::texSubImage2D):
1250         (WebCore::GraphicsContext3DPrivate::uniform1fv):
1251         (WebCore::GraphicsContext3DPrivate::uniform1iv):
1252         (WebCore::GraphicsContext3DPrivate::uniform2fv):
1253         (WebCore::GraphicsContext3DPrivate::uniform2iv):
1254         (WebCore::GraphicsContext3DPrivate::uniform3fv):
1255         (WebCore::GraphicsContext3DPrivate::uniform3iv):
1256         (WebCore::GraphicsContext3DPrivate::uniform4fv):
1257         (WebCore::GraphicsContext3DPrivate::uniform4iv):
1258         (WebCore::GraphicsContext3DPrivate::uniformMatrix2fv):
1259         (WebCore::GraphicsContext3DPrivate::uniformMatrix3fv):
1260         (WebCore::GraphicsContext3DPrivate::uniformMatrix4fv):
1261         (WebCore::GraphicsContext3DPrivate::getExtensions):
1262         (WebCore::GraphicsContext3DPrivate::isResourceSafe):
1263         (WebCore::GraphicsContext3DPrivate::initializeExtensions):
1264         (WebCore::GraphicsContext3DPrivate::supportsExtension):
1265         (WebCore::GraphicsContext3DPrivate::ensureExtensionEnabled):
1266         (WebCore::GraphicsContext3DPrivate::isExtensionEnabled):
1267         (WebCore::GraphicsContext3D::GraphicsContext3D):
1268         (WebCore::GraphicsContext3D::~GraphicsContext3D):
1269         (WebCore::GraphicsContext3D::create):
1270         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
1271         (WebCore::GraphicsContext3D::platformTexture):
1272         (WebCore::GraphicsContext3D::grContext):
1273         (WebCore::GraphicsContext3D::prepareTexture):
1274         (WebCore::GraphicsContext3D::getInternalFramebufferSize):
1275         (WebCore::GraphicsContext3D::isResourceSafe):
1276         (WebCore::GraphicsContext3D::platformLayer):
1277         (WebCore::GraphicsContext3D::layerComposited):
1278         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
1279         (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
1280         (GraphicsContextLostCallbackAdapter):
1281         (WebCore::GraphicsContextLostCallbackAdapter::~GraphicsContextLostCallbackAdapter):
1282         (WebCore::GraphicsContextLostCallbackAdapter::GraphicsContextLostCallbackAdapter):
1283         (WebCore::GraphicsContextLostCallbackAdapter::onContextLost):
1284         (WebCore::GraphicsContextLostCallbackAdapter::create):
1285         (WebCore::GraphicsContext3DPrivate::setContextLostCallback):
1286         (GraphicsErrorMessageCallbackAdapter):
1287         (WebCore::GraphicsErrorMessageCallbackAdapter::~GraphicsErrorMessageCallbackAdapter):
1288         (WebCore::GraphicsErrorMessageCallbackAdapter::GraphicsErrorMessageCallbackAdapter):
1289         (WebCore::GraphicsErrorMessageCallbackAdapter::onErrorMessage):
1290         (WebCore::GraphicsErrorMessageCallbackAdapter::create):
1291         (WebCore::GraphicsContext3DPrivate::setErrorMessageCallback):
1292         (WebCore::GraphicsContext3D::isGLES2Compliant):
1293         (GraphicsContext3DSwapBuffersCompleteCallbackAdapter):
1294         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::~GraphicsContext3DSwapBuffersCompleteCallbackAdapter):
1295         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::GraphicsContext3DSwapBuffersCompleteCallbackAdapter):
1296         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::onSwapBuffersComplete):
1297         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::create):
1298         (WebCore::GraphicsContext3DPrivate::setSwapBuffersCompleteCallbackCHROMIUM):
1299         (GraphicsContext3DMemoryAllocationChangedCallbackAdapter):
1300         (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::GraphicsContext3DMemoryAllocationChangedCallbackAdapter):
1301         (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::~GraphicsContext3DMemoryAllocationChangedCallbackAdapter):
1302         (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::onMemoryAllocationChanged):
1303         (WebCore::GraphicsContext3DPrivate::setGpuMemoryAllocationChangedCallbackCHROMIUM):
1304         * platform/chromium/support/GraphicsContext3DPrivate.h: Renamed from Source/WebKit/chromium/src/GraphicsContext3DPrivate.h.
1305         (WebKit):
1306         (WebCore):
1307         (GraphicsContext3DPrivate):
1308
1309 2012-05-11  Keyar Hood  <keyar@chromium.org>
1310
1311         ImageSkia.cpp does not conform to style guidelines
1312         https://bugs.webkit.org/show_bug.cgi?id=86219
1313
1314         Reviewed by Stephen White.
1315
1316         No tests as this is purely style changees.
1317
1318         * platform/graphics/skia/ImageSkia.cpp:
1319         (WebCore::TransformDimensions):
1320         (WebCore::BitmapImage::draw):
1321         (WebCore::BitmapImageSingleFrameSkia::draw):
1322
1323 2012-05-11  Tim Horton  <timothy_horton@apple.com>
1324
1325         Unreviewed Chromium build fix after http://trac.webkit.org/changeset/116799.
1326
1327         * rendering/RenderLayerBacking.cpp:
1328
1329 2012-05-11  Terry Anderson  <tdanderson@chromium.org>
1330
1331         [chromium] Compute the best target node on a GestureTap event
1332         https://bugs.webkit.org/show_bug.cgi?id=85101
1333
1334         Reviewed by Adam Barth.
1335
1336         Will be using the tests in the touchadjustment/ directory.
1337
1338         * WebCore.gypi:
1339         Include TouchAdjustment.* files.
1340
1341 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
1342
1343         Unreviewed, rolling out r116498.
1344         http://trac.webkit.org/changeset/116498
1345         https://bugs.webkit.org/show_bug.cgi?id=86251
1346
1347         Causes crashes in major sites and security issues (Requested
1348         by schenney on #webkit).
1349
1350         * rendering/svg/RenderSVGInline.cpp:
1351         (WebCore::RenderSVGInline::addChild):
1352         * rendering/svg/RenderSVGInlineText.cpp:
1353         (WebCore::RenderSVGInlineText::willBeDestroyed):
1354         (WebCore::RenderSVGInlineText::setTextInternal):
1355         (WebCore::RenderSVGInlineText::styleDidChange):
1356         * rendering/svg/RenderSVGText.cpp:
1357         (WebCore::recursiveUpdateLayoutAttributes):
1358         (WebCore::RenderSVGText::layoutAttributesChanged):
1359         (WebCore::RenderSVGText::layoutAttributesWillBeDestroyed):
1360         (WebCore::RenderSVGText::invalidateTextPositioningElements):
1361         (WebCore::recursiveUpdateScaledFont):
1362         (WebCore::RenderSVGText::layout):
1363         (WebCore::RenderSVGText::addChild):
1364         (WebCore::recursiveCollectLayoutAttributes):
1365         (WebCore::RenderSVGText::rebuildLayoutAttributes):
1366         (WebCore):
1367         * rendering/svg/RenderSVGText.h:
1368         (RenderSVGText):
1369         (WebCore::RenderSVGText::layoutAttributes):
1370         * rendering/svg/SVGRootInlineBox.cpp:
1371         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
1372         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
1373         (WebCore::SVGTextLayoutAttributesBuilder::buildLayoutAttributes):
1374
1375 2012-05-11  Tim Horton  <timothy_horton@apple.com>
1376
1377         FrameView->m_lastPaintTime is not updated in the tiled drawing case
1378         https://bugs.webkit.org/show_bug.cgi?id=86246
1379         <rdar://problem/11248475>
1380
1381         Reviewed by Simon Fraser.
1382
1383         Update FrameView's m_lastPaintTime from RenderLayerBacking::paintContents
1384         if the RenderLayerBacking is backing a tiled drawing layer.
1385
1386         In the future we might want to consider updating m_lastPaintTime when any
1387         compositing layer is painted into, but this change gets us on par with the
1388         non-tiled-drawing case as it stands now.
1389
1390         No new tests.
1391
1392         * page/FrameView.h:
1393         (WebCore::FrameView::setLastPaintTime):
1394         * rendering/RenderLayerBacking.cpp:
1395         (WebCore::RenderLayerBacking::paintContents):
1396
1397 2012-05-11  Shezan Baig  <shezbaig.wk@gmail.com>
1398
1399         Add helper function for node()->rootEditableElement() == node()
1400         https://bugs.webkit.org/show_bug.cgi?id=86217
1401
1402         Reviewed by Ryosuke Niwa.
1403
1404         Added Node::isRootEditableElement and updated existing code that did
1405         (node->rootEditableElement() == node) to use isRootEditableElement
1406         instead.
1407
1408         No new tests. No change in behavior.
1409
1410         * dom/Node.cpp:
1411         (WebCore::Node::isRootEditableElement):
1412         (WebCore):
1413         * dom/Node.h:
1414         (Node):
1415         Added new helper function.
1416
1417         * dom/Document.cpp:
1418         (WebCore::Document::setFocusedNode):
1419         * dom/Element.cpp:
1420         (WebCore::Element::updateFocusAppearance):
1421         * editing/CompositeEditCommand.cpp:
1422         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
1423         * editing/DeleteSelectionCommand.cpp:
1424         (WebCore::DeleteSelectionCommand::removeNode):
1425         * editing/InsertParagraphSeparatorCommand.cpp:
1426         (WebCore::InsertParagraphSeparatorCommand::doApply):
1427         * page/FocusController.cpp:
1428         (WebCore::FocusController::setFocusedNode):
1429         * rendering/RenderBlock.cpp:
1430         (WebCore::RenderBlock::hasLineIfEmpty):
1431         * rendering/RenderBlockLineLayout.cpp:
1432         (WebCore::RenderBlock::addOverflowFromInlineChildren):
1433         Updates to existing code to use the new helper function.
1434
1435 2012-05-11  Shawn Singh  <shawnsingh@chromium.org>
1436
1437         [chromium] Create WebTransformationMatrix interface for chromium platform
1438         https://bugs.webkit.org/show_bug.cgi?id=86049
1439
1440         Reviewed by James Robinson.
1441
1442         This patch creates a WebTransformationMatrix interface. It will
1443         remain unused at the moment, until (a) unit tests are created
1444         and (b) when we are ready to make a brief transition of all other
1445         chromium code to use it.
1446
1447         * WebCore.gypi:
1448         * platform/chromium/support/WebTransformationMatrix.cpp: Added.
1449         (WebKit):
1450         (WebKit::WebTransformationMatrix::WebTransformationMatrix):
1451         (WebKit::WebTransformationMatrix::operator=):
1452         (WebKit::WebTransformationMatrix::operator==):
1453         (WebKit::WebTransformationMatrix::operator*):
1454         (WebKit::WebTransformationMatrix::inverse):
1455         (WebKit::WebTransformationMatrix::to2dTransform):
1456         (WebKit::WebTransformationMatrix::multiply):
1457         (WebKit::WebTransformationMatrix::makeIdentity):
1458         (WebKit::WebTransformationMatrix::translate):
1459         (WebKit::WebTransformationMatrix::translate3d):
1460         (WebKit::WebTransformationMatrix::translateRight3d):
1461         (WebKit::WebTransformationMatrix::scale):
1462         (WebKit::WebTransformationMatrix::scaleNonUniform):
1463         (WebKit::WebTransformationMatrix::scale3d):
1464         (WebKit::WebTransformationMatrix::rotate):
1465         (WebKit::WebTransformationMatrix::rotate3d):
1466         (WebKit::WebTransformationMatrix::skewX):
1467         (WebKit::WebTransformationMatrix::skewY):
1468         (WebKit::WebTransformationMatrix::applyPerspective):
1469         (WebKit::WebTransformationMatrix::blend):
1470         (WebKit::WebTransformationMatrix::hasPerspective):
1471         (WebKit::WebTransformationMatrix::isInvertible):
1472         (WebKit::WebTransformationMatrix::isBackFaceVisible):
1473         (WebKit::WebTransformationMatrix::isIdentity):
1474         (WebKit::WebTransformationMatrix::isIdentityOrTranslation):
1475         (WebKit::WebTransformationMatrix::isIntegerTranslation):
1476         (WebKit::WebTransformationMatrix::m11):
1477         (WebKit::WebTransformationMatrix::setM11):
1478         (WebKit::WebTransformationMatrix::m12):
1479         (WebKit::WebTransformationMatrix::setM12):
1480         (WebKit::WebTransformationMatrix::m13):
1481         (WebKit::WebTransformationMatrix::setM13):
1482         (WebKit::WebTransformationMatrix::m14):
1483         (WebKit::WebTransformationMatrix::setM14):
1484         (WebKit::WebTransformationMatrix::m21):
1485         (WebKit::WebTransformationMatrix::setM21):
1486         (WebKit::WebTransformationMatrix::m22):
1487         (WebKit::WebTransformationMatrix::setM22):
1488         (WebKit::WebTransformationMatrix::m23):
1489         (WebKit::WebTransformationMatrix::setM23):
1490         (WebKit::WebTransformationMatrix::m24):
1491         (WebKit::WebTransformationMatrix::setM24):
1492         (WebKit::WebTransformationMatrix::m31):
1493         (WebKit::WebTransformationMatrix::setM31):
1494         (WebKit::WebTransformationMatrix::m32):
1495         (WebKit::WebTransformationMatrix::setM32):
1496         (WebKit::WebTransformationMatrix::m33):
1497         (WebKit::WebTransformationMatrix::setM33):
1498         (WebKit::WebTransformationMatrix::m34):
1499         (WebKit::WebTransformationMatrix::setM34):
1500         (WebKit::WebTransformationMatrix::m41):
1501         (WebKit::WebTransformationMatrix::setM41):
1502         (WebKit::WebTransformationMatrix::m42):
1503         (WebKit::WebTransformationMatrix::setM42):
1504         (WebKit::WebTransformationMatrix::m43):
1505         (WebKit::WebTransformationMatrix::setM43):
1506         (WebKit::WebTransformationMatrix::m44):
1507         (WebKit::WebTransformationMatrix::setM44):
1508         (WebKit::WebTransformationMatrix::a):
1509         (WebKit::WebTransformationMatrix::setA):
1510         (WebKit::WebTransformationMatrix::b):
1511         (WebKit::WebTransformationMatrix::setB):
1512         (WebKit::WebTransformationMatrix::c):
1513         (WebKit::WebTransformationMatrix::setC):
1514         (WebKit::WebTransformationMatrix::d):
1515         (WebKit::WebTransformationMatrix::setD):
1516         (WebKit::WebTransformationMatrix::e):
1517         (WebKit::WebTransformationMatrix::setE):
1518         (WebKit::WebTransformationMatrix::f):
1519         (WebKit::WebTransformationMatrix::setF):
1520         (WebKit::WebTransformationMatrix::toWebCoreTransform):
1521         (WebKit::WebTransformationMatrix::mapRect):
1522         (WebKit::WebTransformationMatrix::mapPoint):
1523         (WebKit::WebTransformationMatrix::mapQuad):
1524         (WebKit::WebTransformationMatrix::projectPoint):
1525
1526 2012-05-11  Alexandru Chiculita  <achicu@adobe.com>
1527
1528         [CSS Shaders] Make CSS Shaders render to texture framebuffers
1529         https://bugs.webkit.org/show_bug.cgi?id=85113
1530
1531         Reviewed by Dean Jackson.
1532
1533         Added the required members to store the framebuffer, the texture and the depth buffer. Also removed the m_drawingBuffer
1534         because context->readPixels doesn't require one anymore.
1535
1536         ReadPixels is not flipping the result, so I've also removed the flipping projection matrix that was specific only to Chromium.
1537
1538         Added a test to check that colors are not switched and the resulting image is not mirrored.
1539
1540         Test: css3/filters/custom/effect-color-check.html
1541
1542         * platform/graphics/filters/FECustomFilter.cpp:
1543         (WebCore::FECustomFilter::FECustomFilter):
1544         (WebCore::FECustomFilter::~FECustomFilter):
1545         (WebCore):
1546         (WebCore::FECustomFilter::deleteRenderBuffers):
1547         (WebCore::FECustomFilter::platformApplySoftware):
1548         (WebCore::FECustomFilter::initializeContext):
1549         (WebCore::FECustomFilter::resizeContext):
1550         (WebCore::FECustomFilter::bindProgramAndBuffers):
1551         * platform/graphics/filters/FECustomFilter.h:
1552         (FECustomFilter):
1553
1554 2012-05-11  Anders Carlsson  <andersca@apple.com>
1555
1556         REGRESSION(r116687): [Chromium] plugins/embed-attributes-style.html shows a garbled string
1557         https://bugs.webkit.org/show_bug.cgi?id=86170
1558
1559         Reviewed by Andreas Kling.
1560
1561         The string we are passing to the TextRun constructor needs to stay alive for longer so revert back to the old
1562         behavior where we store it as a member variable.
1563
1564         * rendering/RenderEmbeddedObject.cpp:
1565         (WebCore::unavailablePluginReplacementText):
1566         (WebCore):
1567         (WebCore::RenderEmbeddedObject::setPluginUnavailabilityReason):
1568         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
1569         * rendering/RenderEmbeddedObject.h:
1570         (RenderEmbeddedObject):
1571
1572 2012-05-11  Simon Fraser  <simon.fraser@apple.com>
1573
1574         CVDisplayLink keeps running after a single requestAnimationFrame
1575         https://bugs.webkit.org/show_bug.cgi?id=86174
1576         
1577         Reviewed by Sam Weinig.
1578         
1579         A DisplayRefreshMonitor would keep its CVDisplayLink alive for as long
1580         as it had clients, and the client is the ScriptedAnimationController, which
1581         lives on the document. So a single requestAnimationFrame call would kick
1582         off a CVDisplayLink which lived until the document was destroyed.
1583         
1584         Fix by having the DisplayRefreshMonitor kill itself if the CVDisplayLink
1585         fires for 10 times with no scheduled callbacks (to avoid creation/deletion
1586         thrash on pages that call requestAnimationFrames with short setTimeouts,
1587         as some do).
1588         
1589         Use a HashMap in DisplayRefreshMonitorManager for the set of DisplayRefreshMonitor,
1590         with the displayID as the key (using UnsignedWithZeroKeyHashTraits<uint64_t> since
1591         we want to allow for 0 to be a valid displayID).
1592         
1593         Use a HashSet in DisplayRefreshMonitor for the client set, so that we don't have to
1594         worry about adding clients twice.
1595         
1596         Also fix a possible crash when the only client of a DisplayRefreshMonitor
1597         was removed from inside the callback by making DisplayRefreshMonitor ref-counted,
1598         with a protector.
1599
1600         Test: fast/animation/request-animation-frame-detach-element2.html
1601
1602         * platform/graphics/DisplayRefreshMonitor.cpp:
1603         (WebCore::DisplayRefreshMonitor::DisplayRefreshMonitor): Initialize m_unscheduledFireCount
1604         (WebCore::DisplayRefreshMonitor::handleDisplayRefreshedNotificationOnMainThread): Renamed
1605         from refreshDisplayOnMainThread, since it doesn't just refresh the display.
1606         (WebCore::DisplayRefreshMonitor::addClient): No longer inline.
1607         (WebCore::DisplayRefreshMonitor::removeClient): No longer inline.
1608         (WebCore::DisplayRefreshMonitor::displayDidRefresh): Keep track of m_unscheduledFireCount,
1609         which we used to kill this monitor if it has been idle for a while.
1610         Use a RefPtr<DisplayRefreshMonitor> to prevent deletion while running the callback.
1611         Copy the clients to a vector to protect against mutating the set while enumerating it.
1612         Notify the DisplayRefreshMonitorManager when we're done, so that it can decide
1613         to delete inactive monitors.
1614         
1615         (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient): find or allocate
1616         a DisplayRefreshMonitor for a given client.
1617         (WebCore::DisplayRefreshMonitorManager::registerClient): Simplified by use of HashMap.
1618         (WebCore::DisplayRefreshMonitorManager::unregisterClient): Ditto.
1619         (WebCore::DisplayRefreshMonitorManager::scheduleAnimation): Ditto. Uses
1620         ensureMonitorForClient() since an earlier inactive monitor may have been removed.
1621         (WebCore::DisplayRefreshMonitorManager::displayDidRefresh): Remove inactive
1622         monitors.
1623         * platform/graphics/DisplayRefreshMonitor.h: Make DisplayRefreshMonitor
1624         ref-counted, to make it easier to avoid deletion while it's on the stack.
1625         (WebCore::DisplayRefreshMonitor::create):
1626         (DisplayRefreshMonitor):
1627         (WebCore::DisplayRefreshMonitor::shouldBeTerminated):
1628         (DisplayRefreshMonitorManager):
1629         * platform/graphics/blackberry/DisplayRefreshMonitorBlackBerry.cpp: Attempt to
1630         keep things building.
1631         (WebCore::DisplayRefreshMonitor::~DisplayRefreshMonitor):
1632         (WebCore::DisplayRefreshMonitor::displayLinkFired):
1633         to give the manager a chance to kill this monitor.
1634         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
1635         (WebCore::DisplayRefreshMonitor::~DisplayRefreshMonitor):
1636         (WebCore::DisplayRefreshMonitor::displayLinkFired): Don't bail early
1637         if not scheduled; we want to call handleDisplayRefreshedNotificationOnMainThread(),
1638
1639 2012-05-11  Pavel Feldman  <pfeldman@chromium.org>
1640
1641         Web Inspector: move canEditScriptSource and setScriptSource from DebuggerPresentationModel into ResourceBinding
1642         https://bugs.webkit.org/show_bug.cgi?id=86234
1643
1644         Reviewed by Vsevolod Vlasov.
1645
1646         Simple move refactoring.
1647
1648         * inspector/front-end/DebuggerPresentationModel.js:
1649         (WebInspector.DebuggerPresentationModel):
1650         (WebInspector.DebuggerResourceBinding):
1651         (WebInspector.DebuggerResourceBinding.canEditScriptSource):
1652         (WebInspector.DebuggerResourceBinding.setScriptSource.didEditScriptSource):
1653         (WebInspector.DebuggerResourceBinding.setScriptSource):
1654         (WebInspector.DebuggerResourceBinding.prototype.canSetContent):
1655         (WebInspector.DebuggerResourceBinding.prototype._uiSourceCodeForResource):
1656         (WebInspector.DebuggerResourceBinding.prototype._setContentWithInitialContent):
1657         * inspector/front-end/JavaScriptSourceFrame.js:
1658         (WebInspector.JavaScriptSourceFrame.prototype.canEditSource):
1659         (WebInspector.JavaScriptSourceFrame.prototype.editContent):
1660
1661 2012-05-11  Julien Chaffraix  <jchaffraix@webkit.org>
1662
1663         Remove RenderLayer::m_scrollOverflow
1664         https://bugs.webkit.org/show_bug.cgi?id=86226
1665
1666         Reviewed by Simon Fraser.
1667
1668         No expected change in behavior.
1669
1670         * rendering/RenderLayer.cpp:
1671         (WebCore::RenderLayer::computeScrollDimensions):
1672         Added 2 local variables to compute the left / top scrollable overflows.
1673
1674         * rendering/RenderLayer.h:
1675         (WebCore::RenderLayer::scrolledContentOffset):
1676         Returned m_scrollOffset directly as this is what the old code was doing by adding
1677         m_scrollOrigin then adding m_scrollOverflow (which was set to -m_scrollOrigin in
1678         computeScrollDimensions).
1679
1680         (RenderLayer::m_scrollOffset): Improved the comment about what m_scrollOffset is.
1681
1682 2012-05-11  Pavel Feldman  <pfeldman@chromium.org>
1683
1684         Web Inspector: extract PresentationConsoleMessageHelper from DebuggerPresentationModel.
1685         https://bugs.webkit.org/show_bug.cgi?id=86229
1686
1687         Reviewed by Vsevolod Vlasov.
1688
1689         This change also starts tracking messages along with the live location changes.
1690
1691         Tested with script-formatter-console.html.
1692
1693         * inspector/front-end/BreakpointManager.js:
1694         * inspector/front-end/DebuggerPresentationModel.js:
1695         (WebInspector.DebuggerPresentationModel):
1696         (WebInspector.DebuggerPresentationModel.prototype._parsedScriptSource):
1697         (WebInspector.DebuggerPresentationModel.prototype._debuggerReset):
1698         (WebInspector.PresentationConsoleMessageHelper):
1699         (WebInspector.PresentationConsoleMessageHelper.prototype._addPendingConsoleMessage):
1700         (WebInspector.PresentationConsoleMessageHelper.prototype._parsedScriptSource):
1701         (WebInspector.PresentationConsoleMessageHelper.prototype._debuggerReset):
1702         (WebInspector.PresentationConsoleMessage):
1703         * inspector/front-end/JavaScriptSourceFrame.js:
1704         (WebInspector.JavaScriptSourceFrame.prototype.populateLineGutterContextMenu):
1705         (WebInspector.JavaScriptSourceFrame.prototype._consoleMessageAdded):
1706         (WebInspector.JavaScriptSourceFrame.prototype._setBreakpoint):
1707
1708 2012-05-11  Emil A Eklund  <eae@chromium.org>
1709
1710         Simplify FloatingObject by removing unnecessary convenience methods.
1711         https://bugs.webkit.org/show_bug.cgi?id=86163
1712
1713         Reviewed by Eric Seidel.
1714
1715         Simplify the pixel snapping in FloatingObject by getting rid of a bunch
1716         of convenience methods.
1717
1718         No new tests, no change in functionality.
1719
1720         * rendering/RenderBlock.cpp:
1721         (WebCore::RenderBlock::addOverhangingFloats):
1722         (WebCore::RenderBlock::addIntrudingFloats):
1723         (WebCore::RenderBlock::FloatingObjects::intervalForFloatingObject):
1724         (WebCore::::string):
1725         * rendering/RenderBlock.h:
1726         (FloatingObject):
1727         (WebCore::RenderBlock::pixelSnappedLogicalTopForFloat):
1728         (WebCore::RenderBlock::pixelSnappedLogicalBottomForFloat):
1729         (WebCore::RenderBlock::pixelSnappedLogicalLeftForFloat):
1730         (WebCore::RenderBlock::pixelSnappedLogicalRightForFloat):
1731
1732 2012-05-11  Ian Vollick  <vollick@chromium.org>
1733
1734         [chromium] Ensure that animations continue to run when transform-style is changed
1735         https://bugs.webkit.org/show_bug.cgi?id=83283
1736
1737         Make sure that we transfer animations when changing layers due to a transform-style change.
1738         Unit tested in GraphicsLayerChromiumTest.updateLayerPreserves3DWithAnimations
1739
1740         Reviewed by James Robinson.
1741
1742         Test: animations/change-transform-style-during-animation.html
1743
1744         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1745         (WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
1746         * platform/graphics/chromium/LayerChromium.cpp:
1747         (WebCore::LayerChromium::setLayerAnimationController):
1748         (WebCore::LayerChromium::releaseLayerAnimationController):
1749         (WebCore):
1750         (WebCore::LayerChromium::notifyAnimationStarted):
1751         * platform/graphics/chromium/LayerChromium.h:
1752         (LayerChromium):
1753         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
1754         (WebCore::CCLayerAnimationController::CCLayerAnimationController):
1755         (WebCore::CCLayerAnimationController::pushAnimationUpdatesTo):
1756         (WebCore::CCLayerAnimationController::notifyAnimationStarted):
1757         (WebCore::CCLayerAnimationController::setClient):
1758         (WebCore):
1759         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
1760         (WebCore::CCLayerAnimationController::replaceImplThreadAnimations):
1761         * platform/graphics/chromium/cc/CCLayerAnimationController.h:
1762         (CCLayerAnimationController):
1763         (WebCore::CCLayerAnimationController::setForceSync):
1764
1765 2012-05-11  Tommy Widenflycht  <tommyw@google.com>
1766
1767         MediaStream API: Fix a reference counting issue in UserMediaRequest
1768         https://bugs.webkit.org/show_bug.cgi?id=86210
1769
1770         Reviewed by Abhishek Arya.
1771
1772         When contextDestroyed() is called on UserMediaRequest it does a callback to the
1773         page client. If the receiving code clears their stored copy the UserMediaRequest
1774         object is destroyed in the middle of the call.
1775
1776         Currently only testable manually against chrome, preferably with asan turned on.
1777         I have added a manual test that verifies the fix, but I have started work
1778         to make DumpRenderTree able to test this and many other things. The first patch is here:
1779         https://bugs.webkit.org/show_bug.cgi?id=86215
1780
1781         * Modules/mediastream/UserMediaRequest.cpp:
1782         (WebCore::UserMediaRequest::contextDestroyed):
1783
1784 2012-05-11  Min Qin  <qinmin@google.com>
1785
1786         split MediaPlayer::enterFullscreen into 2 seperate functions
1787         https://bugs.webkit.org/show_bug.cgi?id=86052
1788
1789         Reviewed by Adam Barth.
1790
1791         It is confusing that enterFullscreen returns a boolean while exitFullscreen does
1792         not do the same. And ios does not need the return value.
1793         So remove the return value on enterFullscreen and make a seperate canEnterFullscreen()
1794         function for android.
1795         No tests as there are no behavior change, just refactoring.
1796
1797         * platform/graphics/MediaPlayer.cpp:
1798         (WebCore::MediaPlayer::enterFullscreen):
1799         (WebCore):
1800         (WebCore::MediaPlayer::canEnterFullscreen):
1801         * platform/graphics/MediaPlayer.h:
1802         (MediaPlayer):
1803         * platform/graphics/MediaPlayerPrivate.h:
1804         (WebCore::MediaPlayerPrivateInterface::enterFullscreen):
1805         (MediaPlayerPrivateInterface):
1806         (WebCore::MediaPlayerPrivateInterface::canEnterFullscreen):
1807
1808 2012-05-11  Pavel Feldman  <pfeldman@chromium.org>
1809
1810         Web Inspector: move breakpoint manager from debuggerPresentationModel to WebInspector.
1811         https://bugs.webkit.org/show_bug.cgi?id=86220
1812
1813         Reviewed by Yury Semikhatsky.
1814
1815         Now that breakpoint manager does not depend on the source mapping instance from the
1816         debugger presentation model, it can be moved out.
1817
1818         * inspector/front-end/DebuggerPresentationModel.js:
1819         (WebInspector.DebuggerPresentationModel):
1820         * inspector/front-end/JavaScriptSource.js:
1821         (WebInspector.JavaScriptSource):
1822         (WebInspector.JavaScriptSource.prototype.setFormatted.didGetContent.didFormatContent):
1823         (WebInspector.JavaScriptSource.prototype.setFormatted.didGetContent):
1824         (WebInspector.JavaScriptSource.prototype.setFormatted):
1825         * inspector/front-end/JavaScriptSourceFrame.js:
1826         (WebInspector.JavaScriptSourceFrame):
1827         * inspector/front-end/ScriptsPanel.js:
1828         * inspector/front-end/inspector.js:
1829
1830 2012-05-11  David Reveman  <reveman@chromium.org>
1831
1832         [Chromium] Move instantiation of texture uploader to LayerRendererChromium.
1833         https://bugs.webkit.org/show_bug.cgi?id=85893
1834
1835         Reviewed by Adrienne Walker.
1836
1837         Move instantiation of texture uploader to LayerRendererChromium and
1838         allow CCProxy to decide between a throttled or unthrottled uploader
1839         using a flag passed to the LayerRendererChromium constructor.
1840
1841         * platform/graphics/chromium/LayerRendererChromium.cpp:
1842         (WebCore::LayerRendererChromium::create):
1843         (WebCore::LayerRendererChromium::LayerRendererChromium):
1844         (WebCore::LayerRendererChromium::initializeSharedObjects):
1845         * platform/graphics/chromium/LayerRendererChromium.h:
1846         (LayerRendererChromium):
1847         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1848         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
1849         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1850         (CCLayerTreeHostImpl):
1851         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1852         (WebCore::CCSingleThreadProxy::initializeLayerRenderer):
1853         (WebCore::CCSingleThreadProxy::recreateContext):
1854         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
1855         (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread):
1856         (WebCore::CCThreadProxy::recreateContextOnImplThread):
1857
1858 2012-05-10  Pavel Feldman  <pfeldman@chromium.org>
1859
1860         Web Inspector: pass source mapping into UISourceCode's constructor; move formatting outside mapping.
1861         https://bugs.webkit.org/show_bug.cgi?id=86099
1862
1863         Reviewed by Vsevolod Vlasov.
1864
1865         This changes moves formatting out of the source mapping machinery.
1866         As a result, it removes most of the DebuggerPresentation's mapping-related code as well
1867         as most of the raw source code's code.
1868
1869         * inspector/front-end/BreakpointManager.js:
1870         (WebInspector.BreakpointManager):
1871         (WebInspector.BreakpointManager.prototype.restoreBreakpoints):
1872         (WebInspector.BreakpointManager.Breakpoint):
1873         * inspector/front-end/CallStackSidebarPane.js:
1874         (WebInspector.CallStackSidebarPane.prototype.setStatus):
1875         * inspector/front-end/CompilerScriptMapping.js:
1876         * inspector/front-end/DebuggerPresentationModel.js:
1877         (WebInspector.DebuggerPresentationModel):
1878         (WebInspector.DebuggerPresentationModel.prototype._callFrameSelected):
1879         (WebInspector.DebuggerPresentationModel.prototype._handleUISourceCodeListChanged):
1880         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
1881         * inspector/front-end/JavaScriptSource.js:
1882         (WebInspector.JavaScriptSource):
1883         (WebInspector.JavaScriptSource.prototype.fireContentAvailable):
1884         (WebInspector.JavaScriptSource.prototype.setFormatted.if):
1885         (WebInspector.JavaScriptSource.prototype.setFormatted.didGetContent.didFormatContent):
1886         (WebInspector.JavaScriptSource.prototype.setFormatted.didGetContent):
1887         (WebInspector.JavaScriptSource.prototype.setFormatted):
1888         (WebInspector.JavaScriptSource.prototype.togglingFormatter):
1889         (WebInspector.JavaScriptSource.prototype.uiLocationToRawLocation):
1890         (WebInspector.JavaScriptSource.prototype.overrideLocation):
1891         (WebInspector.JavaScriptSource.prototype.breakpointStorageId):
1892         (WebInspector):
1893         * inspector/front-end/JavaScriptSourceFrame.js:
1894         (WebInspector.JavaScriptSourceFrame.prototype._onContentChanged):
1895         (WebInspector.JavaScriptSourceFrame.prototype._breakpointRemoved):
1896         * inspector/front-end/RawSourceCode.js:
1897         (WebInspector.RawSourceCode):
1898         (WebInspector.RawSourceCode.prototype.addScript):
1899         (WebInspector.RawSourceCode.prototype.rawLocationToUILocation):
1900         (WebInspector.RawSourceCode.prototype._createUISourceCode):
1901         (WebInspector.RawSourceCode.prototype.uiLocationToRawLocation):
1902         (WebInspector.RawSourceCode.prototype.uiSourceCode):
1903         (WebInspector.RawSourceCode.prototype._finishedLoading):
1904         * inspector/front-end/ResourceScriptMapping.js:
1905         (WebInspector.ResourceScriptMapping):
1906         (WebInspector.ResourceScriptMapping.prototype.addScript):
1907         (WebInspector.ResourceScriptMapping.prototype._handleUISourceCodeChanged):
1908         (WebInspector.ResourceScriptMapping.prototype._uiSourceCodeChanged):
1909         * inspector/front-end/Script.js:
1910         (WebInspector.Script.prototype.rawLocationToUILocation):
1911         * inspector/front-end/ScriptFormatter.js:
1912         (WebInspector.ScriptFormatter.prototype._didFormatContent):
1913         (WebInspector.FormatterSourceMapping):
1914         (WebInspector.FormatterSourceMapping.prototype.originalToFormatted):
1915         (WebInspector.FormatterSourceMapping.prototype.formattedToOriginal):
1916         (WebInspector.IdentityFormatterSourceMapping):
1917         (WebInspector.IdentityFormatterSourceMapping.prototype.originalToFormatted):
1918         (WebInspector.IdentityFormatterSourceMapping.prototype.formattedToOriginal):
1919         (WebInspector.FormatterSourceMappingImpl):
1920         (WebInspector.FormatterSourceMappingImpl.prototype.originalToFormatted):
1921         (WebInspector.FormatterSourceMappingImpl.prototype.formattedToOriginal):
1922         * inspector/front-end/ScriptMapping.js:
1923         (WebInspector.MainScriptMapping):
1924         (WebInspector.MainScriptMapping.prototype._handleUISourceCodeListChanged):
1925         (WebInspector.MainScriptMapping.prototype.reset):
1926         * inspector/front-end/ScriptsPanel.js:
1927         (WebInspector.ScriptsPanel.prototype._handleUISourceCodeAdded):
1928         (WebInspector.ScriptsPanel.prototype.showFunctionDefinition):
1929         (WebInspector.ScriptsPanel.prototype._showFile):
1930         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
1931         (WebInspector.ScriptsPanel.prototype._toggleFormatSource):
1932         * inspector/front-end/ScriptsSearchScope.js:
1933         (WebInspector.ScriptsSearchResultsPane.prototype.createAnchor):
1934         * inspector/front-end/SnippetsModel.js:
1935         (WebInspector.SnippetsScriptMapping.prototype._snippetAdded):
1936         (WebInspector.SnippetsScriptMapping.prototype._createUISourceCodeForScript):
1937         * inspector/front-end/UISourceCode.js:
1938         (WebInspector.UISourceCode):
1939         (WebInspector.UISourceCode.prototype.requestContent):
1940         (WebInspector.UISourceCode.prototype.mimeType):
1941         (WebInspector.UISourceCode.prototype.content):
1942         (WebInspector.UISourceCode.prototype.fireContentAvailable):
1943         (WebInspector.UISourceCode.prototype.contentLoaded):
1944         (WebInspector.UISourceCode.prototype.uiLocationToRawLocation):
1945
1946 2012-05-11  Dominik Röttsches  <dominik.rottsches@intel.com>
1947
1948         [EFL][DRT] Input Attribute Placeholder RefTests failing
1949         https://bugs.webkit.org/show_bug.cgi?id=85603
1950
1951         Unreviewed, build fix for EFL.
1952
1953         * platform/efl/RenderThemeEfl.cpp:
1954
1955 2012-05-11  Alexei Filippov  <alexeif@chromium.org>
1956
1957         Web Inspector: Remove support of combined nodes and edges serialization schema.
1958         https://bugs.webkit.org/show_bug.cgi?id=86209
1959
1960         Reviewed by Yury Semikhatsky.
1961
1962         * inspector/front-end/HeapSnapshot.js:
1963         (WebInspector.HeapSnapshotNode.prototype.get _nodes):
1964         (WebInspector.HeapSnapshotNode.prototype._edgeIndexesStart):
1965         (WebInspector.HeapSnapshotNode.prototype._edgeIndexesEnd):
1966         (WebInspector.HeapSnapshot):
1967         (WebInspector.HeapSnapshot.prototype._init):
1968         (WebInspector.HeapSnapshot.prototype._buildRetainers):
1969         (WebInspector.HeapSnapshot.prototype._bfs):
1970         (WebInspector.HeapSnapshot.prototype._buildAggregates):
1971         (WebInspector.HeapSnapshot.prototype._calculateClassesRetainedSize):
1972         (WebInspector.HeapSnapshot.prototype._buildDominatedNodes):
1973         * inspector/front-end/HeapSnapshotLoader.js:
1974         (WebInspector.HeapSnapshotLoader.prototype.pushJSONChunk):
1975
1976 2012-05-11  Yury Semikhatsky  <yurys@chromium.org>
1977
1978         Web Inspector: add Profiler.getHeapObjectId command
1979         https://bugs.webkit.org/show_bug.cgi?id=86211
1980
1981         Reviewed by Pavel Feldman.
1982
1983         Added Profiler.getHeapObjectId command to the protocol which allows to convert remote
1984         object id to heap snapshot object id.
1985
1986         * bindings/js/ScriptProfiler.cpp:
1987         (WebCore::ScriptProfiler::getHeapObjectId):
1988         (WebCore):
1989         * bindings/js/ScriptProfiler.h:
1990         (WebCore):
1991         (ScriptProfiler):
1992         * bindings/v8/ScriptProfiler.cpp:
1993         (WebCore::ScriptProfiler::getHeapObjectId):
1994         (WebCore):
1995         * bindings/v8/ScriptProfiler.h:
1996         (WebCore):
1997         (ScriptProfiler):
1998         * inspector/InjectedScript.cpp:
1999         (WebCore::InjectedScript::findObjectById):
2000         (WebCore):
2001         * inspector/InjectedScript.h:
2002         (InjectedScript):
2003         * inspector/InjectedScriptSource.js:
2004         (.):
2005         * inspector/Inspector.json:
2006         * inspector/InspectorProfilerAgent.cpp:
2007         (WebCore::InspectorProfilerAgent::getHeapObjectId):
2008         (WebCore):
2009         * inspector/InspectorProfilerAgent.h:
2010         (InspectorProfilerAgent):
2011
2012 2012-05-11  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2013
2014         Qt support for new layout types.
2015         https://bugs.webkit.org/show_bug.cgi?id=85607
2016
2017         Reviewed by Simon Hausmann.
2018
2019         Adds similar Qt support to FractionalLayout classes as Qt has for
2020         FloatSomething and IntSomething classes. This means Qt code can stay
2021         unchanged from after the redefinition of Layout classes.
2022
2023         No new functionality. No new tests.
2024
2025         * Target.pri:
2026         * platform/FractionalLayoutUnit.h:
2027         (WebCore::operator<<):
2028         (WebCore::operator>>):
2029         * platform/graphics/FractionalLayoutPoint.h:
2030         (FractionalLayoutPoint):
2031         * platform/graphics/FractionalLayoutRect.h:
2032         (FractionalLayoutRect):
2033         * platform/graphics/FractionalLayoutSize.h:
2034         (FractionalLayoutSize):
2035         * platform/graphics/qt/FractionalLayoutPointQt.cpp: Added.
2036         (WebCore::FractionalLayoutPoint::FractionalLayoutPoint):
2037         (WebCore::FractionalLayoutPoint::operator QPointF):
2038         * platform/graphics/qt/FractionalLayoutRectQt.cpp: Added.
2039         (WebCore::FractionalLayoutRect::FractionalLayoutRect):
2040         (WebCore::FractionalLayoutRect::operator QRectF):
2041         * platform/graphics/qt/FractionalLayoutSizeQt.cpp: Added.
2042         (WebCore::FractionalLayoutSize::FractionalLayoutSize):
2043         (WebCore::FractionalLayoutSize::operator QSizeF):
2044
2045 2012-05-11  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
2046
2047         Internals::touchPositionAdjustedToBestClickableNode adjust twice for scroll-offset
2048         https://bugs.webkit.org/show_bug.cgi?id=86205
2049
2050         Reviewed by Simon Hausmann.
2051
2052         Remove the redundant conversion from document to window coords.
2053
2054         Test: touchadjustment/scroll-offset.html
2055
2056         * testing/Internals.cpp:
2057         (WebCore::Internals::touchPositionAdjustedToBestClickableNode):
2058         (WebCore::Internals::bestZoomableAreaForTouchPoint):
2059
2060 2012-05-11  Ilya Tikhonovsky  <loislo@chromium.org>
2061
2062         Web Inspector: load heap snapshot implementation.
2063         https://bugs.webkit.org/show_bug.cgi?id=86097
2064
2065         The idea is to have a hidden file selector control.
2066         When the user select a context menu item or click a button
2067         we redirect this user-action to file selector.
2068         As result we see the standard file selector dialog.
2069         When the user selects a file we load it's chunks and push the chunks to the worker.
2070         The loaded snapshot can be completely unrelated to the current page.
2071         Thats why we have to skip range selection options in Summary tab.
2072
2073         Reviewed by Yury Semikhatsky.
2074
2075         * English.lproj/localizedStrings.js:
2076         * inspector/front-end/CSSSelectorProfileView.js:
2077         (WebInspector.CSSSelectorProfileType.prototype.createTemporaryProfile): now it accepts a custom title.
2078         * inspector/front-end/HeapSnapshotView.js:
2079         (WebInspector.HeapSnapshotView.prototype._updateFilterOptions): we have to skip the profiles loaded from file because there is no guaranty t
2080         (WebInspector.HeapSnapshotProfileType.prototype.createTemporaryProfile): now it accepts a custom title.
2081         (WebInspector.HeapSnapshotProfileType.prototype.createProfile): cosmetic changes.
2082         (WebInspector.HeapProfileHeader):
2083         (WebInspector.HeapProfileHeader.prototype._setupWorker): a common part was extracted from load method and reused in loadFromFile.
2084         (WebInspector.HeapProfileHeader.prototype._saveStatusUpdate): cosmetic changes.
2085         (WebInspector.HeapProfileHeader.prototype.finishHeapSnapshot):
2086         (WebInspector.HeapProfileHeader.prototype.canSaveToFile): cosmetic rename for better consistency with 'load' part.
2087         (WebInspector.HeapProfileHeader.prototype.saveToFile): cosmetic rename for better consistency with 'load' part.
2088         (WebInspector.HeapProfileHeader.prototype.canLoadFromFile): cosmetic rename for better consistency with 'load' part.
2089         (WebInspector.HeapProfileHeader.prototype.loadFromFile): chunk based file loader.
2090         (WebInspector.HeapProfileHeader.prototype.loadFromFile.loadNextChunk):
2091         (WebInspector.HeapProfileHeader.prototype.loadFromFile.onLoad):
2092         * inspector/front-end/ProfileView.js:
2093         (WebInspector.CPUProfileType.prototype.createTemporaryProfile): now it accepts a custom title.
2094         * inspector/front-end/ProfilesPanel.js:
2095         (WebInspector.ProfileType.prototype.createTemporaryProfile): now it accepts a custom title.
2096         (WebInspector.ProfileHeader.prototype.canSaveToFile): cosmetic rename for better consistency with 'load' part.
2097         (WebInspector.ProfileHeader.prototype.saveToFile): cosmetic rename for better consistency with 'load' part.
2098         (WebInspector.ProfileHeader.prototype.canLoadFromFile): default implementation for 'load' part.
2099         (WebInspector.ProfileHeader.prototype.loadFromFile): default implementation for 'load' part.
2100         (WebInspector.ProfilesPanel.prototype._createFileSelectorElement):
2101         (WebInspector.ProfilesPanel.prototype._loadFromFile):
2102         (WebInspector.ProfileSidebarTreeElement.prototype.handleContextMenuEvent):
2103
2104 2012-05-11  Dominik Röttsches  <dominik.rottsches@intel.com>
2105
2106         [EFL][DRT] Input Attribute Placeholder RefTests failing
2107         https://bugs.webkit.org/show_bug.cgi?id=85603
2108
2109         Reviewed by Hajime Morita.
2110
2111         Refrain from overriding style coloring by theme coloring.
2112         RenderThemeEfl was always overriding colors and whitespace
2113         handling leading to failures in reftests that verify placeholder styling
2114         which expect the user agent stylesheet to be applied correctly
2115         without any color overrides. Also, leave whitespace handling untouched.
2116
2117         No new tests, covered by existing tests. See also
2118         the LayoutTests/ChangeLog in this commit for the required
2119         rebaselining.
2120
2121         * platform/efl/RenderThemeEfl.cpp:
2122         (WebCore::RenderThemeEfl::createEdje):
2123         (WebCore::RenderThemeEfl::applyEdjeColors):
2124         (WebCore::RenderThemeEfl::RenderThemeEfl):
2125         (WebCore::RenderThemeEfl::adjustButtonStyle):
2126         (WebCore::RenderThemeEfl::adjustMenuListStyle):
2127         (WebCore::RenderThemeEfl::adjustTextFieldStyle):
2128         (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
2129         * platform/efl/RenderThemeEfl.h:
2130         (RenderThemeEfl):
2131
2132 2012-05-11  Christophe Dumez  <christophe.dumez@intel.com>
2133
2134         Web Intents code only supports V8
2135         https://bugs.webkit.org/show_bug.cgi?id=85954
2136
2137         Reviewed by Adam Barth.
2138
2139         Add necessary abstraction for js Dictionary and ScriptValue so that
2140         the Web Intents code in WebCore compiles with JSC, not just V8.
2141
2142         This required changes in the JSC bindings generator to pass
2143         callback arguments of type SerializedScriptValue as raw pointers
2144         instead of RefPtr. This matches the change made to the V8 bindings
2145         generator in r104531.
2146
2147         * CMakeLists.txt:
2148         * Modules/intents/Intent.cpp:
2149         * Modules/intents/Intent.h:
2150         * bindings/js/Dictionary.cpp:
2151         (WebCore::Dictionary::Dictionary):
2152         (WebCore):
2153         (WebCore::Dictionary::getOwnPropertiesAsStringHashMap):
2154         * bindings/js/Dictionary.h:
2155         (Dictionary):
2156         * bindings/js/JSBindingsAllInOne.cpp:
2157         * bindings/js/JSDictionary.cpp:
2158         (WebCore::JSDictionary::convertValue):
2159         (WebCore):
2160         * bindings/js/JSDictionary.h:
2161         (WebCore):
2162         (WebCore::JSDictionary::initializerObject):
2163         * bindings/js/ScriptValue.cpp:
2164         (WebCore::ScriptValue::serialize):
2165         (WebCore):
2166         * bindings/js/ScriptValue.h:
2167         (ScriptValue):
2168         * bindings/scripts/CodeGeneratorJS.pm:
2169         (AddIncludesForType):
2170         (GenerateCallbackHeader):
2171         (GenerateCallbackImplementation):
2172         (GetNativeTypeForCallbacks):
2173
2174 2012-05-11  Alexander Pavlov  <apavlov@chromium.org>
2175
2176         Web Inspector: Can't type spaces in "Override User Agent" field
2177         https://bugs.webkit.org/show_bug.cgi?id=86202
2178
2179         Reviewed by Yury Semikhatsky.
2180
2181         * inspector/front-end/HelpScreen.js:
2182         (WebInspector.HelpScreen.prototype.isClosingKey):
2183         (WebInspector.HelpScreen.prototype._onKeyDown):
2184         * inspector/front-end/SettingsScreen.js:
2185         (WebInspector.SettingsScreen.prototype.isClosingKey):
2186
2187 2012-05-11  Dominik Röttsches  <dominik.rottsches@intel.com>
2188
2189         [EFL][DRT] Input Attribute Placeholder RefTests failing
2190         https://bugs.webkit.org/show_bug.cgi?id=85603
2191
2192         Reviewed by Hajime Morita.
2193
2194         Refrain from overriding style coloring by theme coloring.
2195         RenderThemeEfl was always overriding colors and whitespace
2196         handling leading to failures in reftests that verify placeholder styling
2197         which expect the user agent stylesheet to be applied correctly
2198         without any color overrides. Also, leave whitespace handling untouched.
2199
2200         No new tests, covered by existing tests. See also
2201         the LayoutTests/ChangeLog in this commit for the required
2202         rebaselining.
2203
2204         * platform/efl/RenderThemeEfl.cpp:
2205         (WebCore::RenderThemeEfl::createEdje):
2206         (WebCore::RenderThemeEfl::applyEdjeColors):
2207         (WebCore::RenderThemeEfl::RenderThemeEfl):
2208         (WebCore::RenderThemeEfl::adjustButtonStyle):
2209         (WebCore::RenderThemeEfl::adjustMenuListStyle):
2210         (WebCore::RenderThemeEfl::adjustTextFieldStyle):
2211         (WebCore::RenderThemeEfl::adjustSearchFieldStyle):
2212         * platform/efl/RenderThemeEfl.h:
2213         (RenderThemeEfl):
2214
2215 2012-05-11  Gustavo Noronha Silva  <gns@gnome.org>
2216
2217         REGRESSION(r116205): [GTK]: build no longer supports thin archives
2218         https://bugs.webkit.org/show_bug.cgi?id=86207
2219
2220         * GNUmakefile.am: go back to not linking libWebCoreModules into
2221         libWebCore; when linking 2 convenience libraries libtools tries to
2222         extract the object files from one of them to add to the other, breaking
2223         thin archive builds
2224
2225 2012-05-11  Keishi Hattori  <keishi@webkit.org>
2226
2227         Sanitization algorithm for input type=email should strip whitespaces
2228         https://bugs.webkit.org/show_bug.cgi?id=86177
2229
2230         Reviewed by Kent Tamura.
2231
2232         No new tests. Covered by: fast/forms/ValidityState-typeMismatch-email.html
2233
2234         The spec says that the value sanitization algorithm should
2235         > Strip line breaks from the value, then strip leading and trailing whitespace from the value.
2236
2237         * html/EmailInputType.cpp:
2238         (WebCore::EmailInputType::sanitizeValue):
2239
2240 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2241
2242         Unreviewed, rolling out r116752.
2243         http://trac.webkit.org/changeset/116752
2244         https://bugs.webkit.org/show_bug.cgi?id=86201
2245
2246         Build failure on Chromium-mac (Requested by tkent on #webkit).
2247
2248         * html/FormAssociatedElement.cpp:
2249         * html/FormAssociatedElement.h:
2250         (FormAssociatedElement):
2251         * html/HTMLFormControlElement.cpp:
2252         (WebCore::HTMLFormControlElement::setCustomValidity):
2253         * html/HTMLFormControlElement.h:
2254         (HTMLFormControlElement):
2255         * html/HTMLInputElement.cpp:
2256         (WebCore::HTMLInputElement::isValidValue):
2257         (WebCore::HTMLInputElement::typeMismatch):
2258         (WebCore::HTMLInputElement::valueMissing):
2259         (WebCore::HTMLInputElement::patternMismatch):
2260         (WebCore::HTMLInputElement::rangeUnderflow):
2261         (WebCore::HTMLInputElement::rangeOverflow):
2262         (WebCore::HTMLInputElement::minimum):
2263         (WebCore::HTMLInputElement::maximum):
2264         (WebCore::HTMLInputElement::stepMismatch):
2265         (WebCore::HTMLInputElement::minimumString):
2266         (WebCore::HTMLInputElement::maximumString):
2267         (WebCore):
2268         (WebCore::HTMLInputElement::stepBaseString):
2269         (WebCore::HTMLInputElement::stepString):
2270         (WebCore::HTMLInputElement::typeMismatchText):
2271         (WebCore::HTMLInputElement::valueMissingText):
2272         (WebCore::HTMLInputElement::isInRange):
2273         (WebCore::HTMLInputElement::isOutOfRange):
2274         * html/HTMLInputElement.h:
2275         (HTMLInputElement):
2276         * html/HTMLObjectElement.h:
2277         (WebCore::HTMLObjectElement::setCustomValidity):
2278         * html/HTMLSelectElement.cpp:
2279         (WebCore::HTMLSelectElement::valueMissing):
2280         * html/HTMLSelectElement.h:
2281         (HTMLSelectElement):
2282         * html/HTMLTextAreaElement.cpp:
2283         * html/HTMLTextAreaElement.h:
2284         (WebCore::HTMLTextAreaElement::valueMissing):
2285         (HTMLTextAreaElement):
2286         * html/InputType.cpp:
2287         (WebCore::InputType::alignValueForStep):
2288         (WebCore::InputType::stepUpFromRenderer):
2289         * html/InputType.h:
2290         (InputType):
2291         * html/ValidityState.cpp:
2292         (WebCore::ValidityState::validationMessage):
2293         (WebCore):
2294         (WebCore::ValidityState::setCustomErrorMessage):
2295         (WebCore::ValidityState::valueMissing):
2296         (WebCore::ValidityState::typeMismatch):
2297         (WebCore::ValidityState::patternMismatch):
2298         (WebCore::ValidityState::tooLong):
2299         (WebCore::ValidityState::rangeUnderflow):
2300         (WebCore::ValidityState::rangeOverflow):
2301         (WebCore::ValidityState::stepMismatch):
2302         (WebCore::ValidityState::customError):
2303         (WebCore::ValidityState::valid):
2304         * html/ValidityState.h:
2305         (ValidityState):
2306
2307 2012-05-11  Alexander Pavlov  <apavlov@chromium.org>
2308
2309         Web Inspector: Search box doesn't allow CSS selectors anymore
2310         https://bugs.webkit.org/show_bug.cgi?id=86196
2311
2312         Reviewed by Pavel Feldman.
2313
2314         Refactoring in http://trac.webkit.org/changeset/99983 inadvertently removed the selector matching during
2315         node search in the InspectorDOMAgent. This change re-introduces the Document::querySelectorAll() evaluation
2316         for the user query.
2317
2318         * inspector/InspectorDOMAgent.cpp:
2319         (WebCore::InspectorDOMAgent::performSearch):
2320
2321 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2322
2323         Unreviewed, rolling out r116527.
2324         http://trac.webkit.org/changeset/116527
2325         https://bugs.webkit.org/show_bug.cgi?id=86199
2326
2327         Causing crashes on ClusterFuzz (Requested by inferno-sec on
2328         #webkit).
2329
2330         * rendering/RenderScrollbar.cpp:
2331         (WebCore::RenderScrollbar::updateScrollbarPart):
2332         * rendering/RenderScrollbarPart.h:
2333
2334 2012-05-11  Yoshifumi Inoue  <yosin@chromium.org>
2335
2336         [Forms] Move ValidityState methods implementation to another place
2337         https://bugs.webkit.org/show_bug.cgi?id=86058
2338
2339         Reviewed by Kent Tamura.
2340
2341         This patch changes ValidityState class for limiting scope of
2342         number/range input type related methods for introducing decimal
2343         arithmetic.
2344
2345         Methods related to validation are moved from ValidateState to
2346         input, select and textarea elements with virtual method based
2347         dispatching via FormAssociateElement instead of tag name
2348         dispatching so far for code simplification.
2349
2350         No new tests. This patch doesn't change behavior.
2351
2352         * html/FormAssociatedElement.cpp:
2353         (WebCore::FormAssociatedElement::customError): Added. Called from ValidateState. Returns custom error mssage in member variable.
2354         (WebCore::FormAssociatedElement::patternMismatch): Added.  Called from ValidateState. This is default implementation.
2355         (WebCore::FormAssociatedElement::rangeOverflow): Added.  Called from ValidateState. This is default implementation.
2356         (WebCore::FormAssociatedElement::rangeUnderflow): Added.  Called from ValidateState. This is default implementation.
2357         (WebCore::FormAssociatedElement::stepMismatch): Added.  Called from ValidateState. This is default implementation.
2358         (WebCore::FormAssociatedElement::tooLong): Added.  Called from ValidateState. This is default implementation.
2359         (WebCore::FormAssociatedElement::typeMismatch): Added.  Called from ValidateState. This is default implementation.
2360         (WebCore::FormAssociatedElement::valid): Added.  Called from ValidateState. This is default implementation.
2361         (WebCore::FormAssociatedElement::valueMissing): Added.  Called from ValidateState. This is default implementation.
2362         (WebCore::FormAssociatedElement::customValidationMessage): Added.  Called from ValidateState. This is default implementation.
2363         (WebCore::FormAssociatedElement::validationMessage): Added.  Called from ValidateState. This is default implementation.
2364         (WebCore::FormAssociatedElement::setCustomValidity): Added.  set custom error message.
2365         * html/FormAssociatedElement.h:
2366         (FormAssociatedElement): Added new instance value m_customValidationMessage.
2367         * html/HTMLFormControlElement.cpp:
2368         (WebCore::HTMLFormControlElement::setCustomValidity): Changed. Calls base class setCustomValidity.
2369         * html/HTMLFormControlElement.h:
2370         (HTMLFormControlElement):
2371         * html/HTMLInputElement.cpp:
2372         (WebCore::HTMLInputElement::isValidValue): Call m_inputType methods instead of HTMLInputElement's.
2373         (WebCore::HTMLInputElement::tooLong): Call m_inputType methods instead of HTMLInputElement's.
2374         (WebCore):
2375         (WebCore::HTMLInputElement::typeMismatch): Move implementation to InputType.
2376         (WebCore::HTMLInputElement::valueMissing):  Move implementation to InputType.
2377         (WebCore::HTMLInputElement::patternMismatch): Move implementation to InputType.
2378         (WebCore::HTMLInputElement::rangeUnderflow): Move implementation to InputType.
2379         (WebCore::HTMLInputElement::rangeOverflow): Move implementation to InputType.
2380         (WebCore::HTMLInputElement::validationMessage): Move implementation to InputType.
2381         (WebCore::HTMLInputElement::stepMismatch): Move implementation to InputType.
2382         (WebCore::HTMLInputElement::isInRange): Call m_inputType methods instead of HTMLInputElement's.
2383         (WebCore::HTMLInputElement::isOutOfRange): Call m_inputType methods instead of HTMLInputElement's.
2384         * html/HTMLInputElement.h:
2385         (HTMLInputElement): Make tooLong method private.
2386         * html/HTMLObjectElement.h: Add "virtual" and "OVERRIDE".
2387         * html/HTMLSelectElement.cpp:
2388         (WebCore::HTMLSelectElement::validationMessage): Added. Implementation for HTMLSelectElement.
2389         (WebCore::HTMLSelectElement::valueMissing): Added. Implementation for HTMLSelectElement.
2390         * html/HTMLSelectElement.h:
2391         (HTMLSelectElement):  Added entries for newly added methods.
2392         * html/HTMLTextAreaElement.cpp:
2393         (WebCore::HTMLTextAreaElement::validationMessage): Added. Implementation for HTMLTextAreaElement.
2394         (WebCore::HTMLTextAreaElement::valueMissing): Added. Implementation for HTMLTextAreaElement.
2395         (WebCore::HTMLTextAreaElement::tooLong): Added. Implementation for HTMLTextAreaElement.
2396         * html/HTMLTextAreaElement.h:
2397         (HTMLTextAreaElement): Added entries for newly added methods. Change tooLong and valueMissing private.
2398         * html/InputType.cpp:
2399         (WebCore::InputType::stepMismatch): Change method signature.
2400         (WebCore::InputType::alignValueForStep):  Changed for calling InputClass instead of HTMLINputElement.
2401         (WebCore::InputType::stepUpFromRenderer):  Added. Moved from HTMLInputElement.
2402         (WebCore::InputType::validationMessage): Added.  Moved from HTMLInputElement.
2403         * html/InputType.h:
2404         (InputType): Added entries for newly added methods and update methods signature.
2405         * html/ValidityState.cpp: Move actual implementation to FormAssociatedElement and derived classes for localizing implementation change of elements and input types.
2406         (WebCore::ValidityState::validationMessage): Changed to call FormAssociatedElement's method.
2407         (WebCore::ValidityState::valueMissing): Changed to call FormAssociatedElement's method.
2408         (WebCore::ValidityState::typeMismatch): Changed to call FormAssociatedElement's method.
2409         (WebCore::ValidityState::patternMismatch): Changed to call FormAssociatedElement's method.
2410         (WebCore::ValidityState::tooLong): Changed to call FormAssociatedElement's method.
2411         (WebCore::ValidityState::rangeUnderflow): Changed to call FormAssociatedElement's method.
2412         (WebCore::ValidityState::rangeOverflow): Changed to call FormAssociatedElement's method.
2413         (WebCore::ValidityState::stepMismatch): Changed to call FormAssociatedElement's method.
2414         (WebCore::ValidityState::customError): Changed to call FormAssociatedElement's method.
2415         (WebCore::ValidityState::valid):
2416         * html/ValidityState.h:
2417         (ValidityState): Remove custom validation message related things.
2418
2419 2012-05-11  Kent Tamura  <tkent@chromium.org>
2420
2421         Fix a build error without SVG, introduced by tab-size support.
2422
2423         * css/StyleResolver.cpp:
2424         (WebCore::StyleResolver::collectMatchingRulesForList):
2425
2426 2012-05-11  Shinya Kawanaka  <shinyak@chromium.org>
2427
2428         [Refactoring] Move Selection from DOMWindow to TreeScope.
2429         https://bugs.webkit.org/show_bug.cgi?id=82699
2430
2431         Reviewed by Ryosuke Niwa.
2432
2433         Since ShadowRoot will also manage its own version of DOMSelection, we would like to
2434         share the code among Document and DOMSelection. This patch moves DOMSelection from DOMWindow to TreeScope
2435         so that ShadowRoot can also use it.
2436
2437         No new tests, should covered by existing tests.
2438
2439         * dom/Document.cpp:
2440         (WebCore::Document::updateFocusAppearanceTimerFired):
2441         * dom/Document.h:
2442         (Document):
2443         * dom/ShadowRoot.cpp:
2444         (WebCore::ShadowRoot::selection):
2445         * dom/TreeScope.cpp:
2446         (WebCore::TreeScope::~TreeScope):
2447         (WebCore::TreeScope::getSelection):
2448         (WebCore):
2449         * dom/TreeScope.h:
2450         (WebCore):
2451         (TreeScope):
2452         * page/DOMSelection.cpp:
2453         (WebCore::DOMSelection::DOMSelection):
2454         (WebCore::DOMSelection::clearTreeScope):
2455         (WebCore):
2456         * page/DOMSelection.h:
2457         (WebCore):
2458         (WebCore::DOMSelection::create):
2459         (DOMSelection):
2460         * page/DOMWindow.cpp:
2461         (WebCore::DOMWindow::~DOMWindow):
2462         (WebCore::DOMWindow::clearDOMWindowProperties):
2463         (WebCore::DOMWindow::getSelection):
2464         * page/DOMWindow.h:
2465         (DOMWindow):
2466
2467 2012-05-04  Yury Semikhatsky  <yurys@chromium.org>
2468
2469         Web Inspector: console should allow JS execution in the context of an isolated world
2470         https://bugs.webkit.org/show_bug.cgi?id=85612
2471
2472         Reviewed by Pavel Feldman.
2473
2474         Added an option to select not only a frame but also isolated world in which
2475         to perform evaluation of the code typed into the console.
2476
2477         Each execution context can be identified using it injected script id. We call it
2478         execution context id in the protocol. Runtime agent is extended with an event that
2479         is sent when new ExecutionContext is created. The event tracking can be enabled/disabled
2480         using setReportExecutionContextCreation command.
2481
2482         * bindings/js/ScriptController.cpp:
2483         (WebCore):
2484         (WebCore::isolatedWorldToSecurityOriginMap):
2485         * bindings/js/ScriptController.h:
2486         (ScriptController):
2487         * bindings/js/ScriptState.cpp:
2488         (WebCore::isolatedWorldScriptState):
2489         (WebCore):
2490         * bindings/js/ScriptState.h:
2491         (WebCore):
2492         * bindings/v8/ScriptController.cpp:
2493         (WebCore):
2494         (WebCore::ScriptController::isolatedWorldToSecurityOriginMap):
2495         * bindings/v8/ScriptController.h:
2496         (ScriptController):
2497         * bindings/v8/ScriptState.cpp:
2498         (WebCore::isolatedWorldScriptState):
2499         (WebCore):
2500         * bindings/v8/ScriptState.h:
2501         (WebCore):
2502         * bindings/v8/V8IsolatedContext.cpp:
2503         (WebCore::V8IsolatedContext::setSecurityOrigin):
2504         * bindings/v8/V8Proxy.cpp:
2505         (WebCore::V8Proxy::setIsolatedWorldSecurityOrigin):
2506         (WebCore::V8Proxy::isolatedWorldContext):
2507         (WebCore):
2508         (WebCore::V8Proxy::isolatedWorldToSecurityOriginMap):
2509         * bindings/v8/V8Proxy.h:
2510         (V8Proxy):
2511         * inspector/CodeGeneratorInspector.py:
2512         (DomainNameFixes):
2513         * inspector/Inspector.json:
2514         * inspector/InspectorInstrumentation.cpp:
2515         (WebCore::InspectorInstrumentation::didCreateIsolatedContextImpl):
2516         (WebCore):
2517         * inspector/InspectorInstrumentation.h:
2518         (WebCore):
2519         (InspectorInstrumentation):
2520         (WebCore::InspectorInstrumentation::didCreateIsolatedContext):
2521         * inspector/InspectorRuntimeAgent.cpp:
2522         (WebCore::InspectorRuntimeAgent::evaluate):
2523         * inspector/InspectorRuntimeAgent.h:
2524         (InspectorRuntimeAgent):
2525         * inspector/InstrumentingAgents.h:
2526         (WebCore):
2527         (WebCore::InstrumentingAgents::InstrumentingAgents):
2528         (WebCore::InstrumentingAgents::pageRuntimeAgent):
2529         (WebCore::InstrumentingAgents::setPageRuntimeAgent):
2530         (InstrumentingAgents):
2531         * inspector/PageRuntimeAgent.cpp:
2532         (PageRuntimeAgentState):
2533         (WebCore):
2534         (WebCore::PageRuntimeAgent::PageRuntimeAgent):
2535         (WebCore::PageRuntimeAgent::setFrontend):
2536         (WebCore::PageRuntimeAgent::clearFrontend):
2537         (WebCore::PageRuntimeAgent::restore):
2538         (WebCore::PageRuntimeAgent::setReportExecutionContextCreation):
2539         (WebCore::PageRuntimeAgent::didCreateExecutionContext):
2540         (WebCore::PageRuntimeAgent::getScriptStateForEval):
2541         * inspector/PageRuntimeAgent.h:
2542         (WebCore):
2543         (PageRuntimeAgent):
2544         * inspector/WorkerRuntimeAgent.cpp:
2545         (WebCore::WorkerRuntimeAgent::setReportExecutionContextCreation):
2546         (WebCore::WorkerRuntimeAgent::getScriptStateForEval):
2547         * inspector/WorkerRuntimeAgent.h:
2548         (WorkerRuntimeAgent):
2549         * inspector/front-end/ConsoleView.js:
2550         (WebInspector.ConsoleView.prototype.get statusBarItems):
2551         (WebInspector.ConsoleView.prototype.addContext):
2552         (WebInspector.ConsoleView.prototype.removeContext):
2553         (WebInspector.ConsoleView.prototype._updateIsolatedWorldSelector):
2554         (WebInspector.ConsoleView.prototype._contextUpdated):
2555         (WebInspector.ConsoleView.prototype._addedExecutionContext):
2556         (WebInspector.ConsoleView.prototype._currentEvaluationContextId):
2557         (WebInspector.ConsoleView.prototype._currentEvaluationContext):
2558         (WebInspector.ConsoleView.prototype._currentIsolatedWorldId):
2559         (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
2560         * inspector/front-end/ExtensionPanel.js:
2561         (WebInspector.ExtensionSidebarPane.prototype.setExpression):
2562         * inspector/front-end/ExtensionServer.js:
2563         (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
2564         * inspector/front-end/JavaScriptContextManager.js:
2565         (WebInspector.JavaScriptContextManager):
2566         (WebInspector.JavaScriptContextManager.prototype._didLoadCachedResources):
2567         (WebInspector.JavaScriptContextManager.prototype.isolatedContextCreated):
2568         (WebInspector.RuntimeDispatcher):
2569         (WebInspector.RuntimeDispatcher.prototype.isolatedContextCreated):
2570         (WebInspector.ExecutionContext):
2571         (WebInspector.ExecutionContext.comparator):
2572         (WebInspector.FrameEvaluationContext):
2573         (WebInspector.FrameEvaluationContext.prototype._frameNavigated):
2574         (WebInspector.FrameEvaluationContext.prototype._addExecutionContext):
2575         (WebInspector.FrameEvaluationContext.prototype._ensureMainWorldContextAdded):
2576         (WebInspector.FrameEvaluationContext.prototype.isolatedContexts):
2577
2578 2012-05-11  Andrey Kosyakov  <caseq@chromium.org>
2579
2580         Web Inspector: use div, not span as a parent element for ElementsTreeOutline in Audits panel
2581         https://bugs.webkit.org/show_bug.cgi?id=86188
2582
2583         Reviewed by Yury Semikhatsky.
2584
2585         We need to use <div>, not <span> as a container for ElementsTreeOutline, as latter accesses its parent offsetWidth
2586         within _treeElementFromEvent(), which returns 0 for inline elements.
2587
2588         * inspector/front-end/AuditFormatters.js:
2589         (WebInspector.AuditFormatters.node.onNodeAvailable):
2590         (WebInspector.AuditFormatters.node):
2591
2592 2012-05-11  Antti Koivisto  <antti@apple.com>
2593
2594         Inline Node::traverseNextNode
2595         https://bugs.webkit.org/show_bug.cgi?id=85844
2596
2597         Reviewed by Ryosuke Niwa.
2598         
2599         Inline traverseNextNode and traverseNextSibling to reduce entry/exit overhead and allow better code generation
2600         for many hot loops.
2601
2602         In this version only the firstChild()/nextSibling() tests are inlined and the ancestor traversal is not.
2603         
2604         Performance bots will tell if this was worthwhile.
2605
2606         * dom/ContainerNode.h:
2607         (WebCore::Node::traverseNextNode):
2608         (WebCore):
2609         (WebCore::Node::traverseNextSibling):
2610         * dom/Node.cpp:
2611         (WebCore::Node::traverseNextAncestorSibling):
2612         * dom/Node.h:
2613         (Node):
2614         * bindings/v8/RetainedDOMInfo.cpp:
2615
2616 2012-05-07  Yury Semikhatsky  <yurys@chromium.org>
2617
2618         Web Inspector: get rid of InspectorAgent::emitCommitLoadIfNeeded method
2619         https://bugs.webkit.org/show_bug.cgi?id=85708
2620
2621         Reviewed by Pavel Feldman.
2622
2623         Instead of calling emitCommitLoadIfNeeded after all agents are restored
2624         required actions are performed directly in the restore() methods.
2625
2626         * inspector/InspectorAgent.cpp:
2627         * inspector/InspectorAgent.h:
2628         (WebCore::InspectorAgent::didCommitLoadFired):
2629         * inspector/InspectorController.cpp:
2630         (WebCore::InspectorController::InspectorController):
2631         (WebCore::InspectorController::restoreInspectorStateFromCookie):
2632         * inspector/InspectorDatabaseAgent.cpp:
2633         (WebCore::InspectorDatabaseAgent::restore):
2634         * inspector/InspectorPageAgent.cpp:
2635         (WebCore::InspectorPageAgent::create):
2636         (WebCore::InspectorPageAgent::InspectorPageAgent):
2637         (WebCore::InspectorPageAgent::restore):
2638         * inspector/InspectorPageAgent.h:
2639         (WebCore):
2640         * inspector/InspectorResourceAgent.cpp:
2641         (WebCore::InspectorResourceAgent::restore):
2642
2643 2012-05-10  Andrey Kosyakov  <caseq@chromium.org>
2644
2645         Web Inspector: [Extensions API] add audit formatters for remote objects and DOM elements
2646         https://bugs.webkit.org/show_bug.cgi?id=86108
2647
2648         Reviewed by Pavel Feldman.
2649
2650        - added two new formatters to AuditResults object of webInspector.audits API;
2651
2652         * inspector/front-end/AuditFormatters.js:
2653         (WebInspector.AuditFormatters.resourceLink):
2654         (WebInspector.AuditFormatters.object.onEvaluate):
2655         (WebInspector.AuditFormatters.object): format as a remote object property list;
2656         (WebInspector.AuditFormatters.node.onNodeAvailable):
2657         (WebInspector.AuditFormatters.node.onEvaluate):
2658         (WebInspector.AuditFormatters.node): format as a DOM elements sub-tree;
2659         (WebInspector.AuditFormatters.Utilities.evaluate): common expression evaluation logic for both new formatters;
2660         * inspector/front-end/ExtensionAPI.js:
2661         (injectedExtensionAPI.AuditResultImpl):
2662         * inspector/front-end/auditsPanel.css:
2663         (.audit-result-tree ol.outline-disclosure):
2664         (.audit-result-tree .section .header):
2665         (.audit-result-tree .section .header::before):
2666
2667 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2668
2669         Unreviewed, rolling out r116727.
2670         http://trac.webkit.org/changeset/116727
2671         https://bugs.webkit.org/show_bug.cgi?id=86181
2672
2673         Build error on Chromium-Android (Requested by tkent on
2674         #webkit).
2675
2676         * platform/graphics/MediaPlayer.cpp:
2677         (WebCore::MediaPlayer::enterFullscreen):
2678         (WebCore):
2679         * platform/graphics/MediaPlayer.h:
2680         (MediaPlayer):
2681         * platform/graphics/MediaPlayerPrivate.h:
2682         (WebCore::MediaPlayerPrivateInterface::enterFullscreen):
2683         (MediaPlayerPrivateInterface):
2684
2685 2012-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
2686
2687         Unreviewed, rolling out r116731.
2688         http://trac.webkit.org/changeset/116731
2689         https://bugs.webkit.org/show_bug.cgi?id=86178
2690
2691         Build failure on Chromium-mac (Requested by tkent on #webkit).
2692
2693         * platform/graphics/chromium/LayerRendererChromium.cpp:
2694         (WebCore::LayerRendererChromium::create):
2695         (WebCore::LayerRendererChromium::LayerRendererChromium):
2696         (WebCore::LayerRendererChromium::initializeSharedObjects):
2697         * platform/graphics/chromium/LayerRendererChromium.h:
2698         (LayerRendererChromium):
2699         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2700         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
2701         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2702         (CCLayerTreeHostImpl):
2703         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2704         (UnthrottledTextureUploader):
2705         (WebCore::UnthrottledTextureUploader::create):
2706         (WebCore::UnthrottledTextureUploader::~UnthrottledTextureUploader):
2707         (WebCore::UnthrottledTextureUploader::isBusy):
2708         (WebCore::UnthrottledTextureUploader::beginUploads):
2709         (WebCore::UnthrottledTextureUploader::endUploads):
2710         (WebCore::UnthrottledTextureUploader::uploadTexture):
2711         (WebCore::UnthrottledTextureUploader::UnthrottledTextureUploader):
2712         (WebCore):
2713         (WebCore::CCSingleThreadProxy::initializeLayerRenderer):
2714         (WebCore::CCSingleThreadProxy::recreateContext):
2715         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2716         (WebCore):
2717         (UnthrottledTextureUploader):
2718         (WebCore::UnthrottledTextureUploader::create):
2719         (WebCore::UnthrottledTextureUploader::~UnthrottledTextureUploader):
2720         (WebCore::UnthrottledTextureUploader::isBusy):
2721         (WebCore::UnthrottledTextureUploader::beginUploads):
2722         (WebCore::UnthrottledTextureUploader::endUploads):
2723         (WebCore::UnthrottledTextureUploader::uploadTexture):
2724         (WebCore::UnthrottledTextureUploader::UnthrottledTextureUploader):
2725         (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread):
2726         (WebCore::CCThreadProxy::recreateContextOnImplThread):
2727
2728 2012-05-10  David Reveman  <reveman@chromium.org>
2729
2730         [Chromium] Move instantiation of texture uploader to LayerRendererChromium.
2731         https://bugs.webkit.org/show_bug.cgi?id=85893
2732
2733         Reviewed by Adrienne Walker.
2734
2735         Move instantiation of texture uploader to LayerRendererChromium and
2736         allow CCProxy to decide between a throttled or unthrottled uploader
2737         using a flag passed to the LayerRendererChromium constructor.
2738
2739         * platform/graphics/chromium/LayerRendererChromium.cpp:
2740         (WebCore::LayerRendererChromium::create):
2741         (WebCore::LayerRendererChromium::LayerRendererChromium):
2742         (WebCore::LayerRendererChromium::initializeSharedObjects):
2743         * platform/graphics/chromium/LayerRendererChromium.h:
2744         (LayerRendererChromium):
2745         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2746         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
2747         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2748         (CCLayerTreeHostImpl):
2749         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
2750         (WebCore::CCSingleThreadProxy::initializeLayerRenderer):
2751         (WebCore::CCSingleThreadProxy::recreateContext):
2752         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2753         (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread):
2754         (WebCore::CCThreadProxy::recreateContextOnImplThread):
2755
2756 2012-05-10  MORITA Hajime  <morrita@google.com>
2757
2758         ElementShadow should minimize the usage of "ShadowRoot" name
2759         https://bugs.webkit.org/show_bug.cgi?id=85970
2760
2761         Reviewed by Dimitri Glazkov.
2762
2763         This change cleans two out dated assumptions which brought in at
2764         early stage of Shadow DOM implementation.
2765
2766         - Removed Element::hasShadowRoot(): shadow existence can be checked by Element::shadow().
2767         - Made ElementShadow::removeAllShadowRoots() private: we no longer allow ShadowRoot removal.
2768           It can only happens at the ElementShadow destruction.
2769
2770         Most of changes in element implementations are basically simple
2771         replacement from hasShadowRoot() to shadow().
2772
2773         No new tests. Covered by existing tests.
2774
2775         * WebCore.exp.in:
2776         * dom/ContainerNodeAlgorithms.h:
2777         (WebCore::ChildFrameDisconnector::collectDescendant):
2778         * dom/ComposedShadowTreeWalker.cpp:
2779         (WebCore::ComposedShadowTreeWalker::traverseChild):
2780         * dom/Document.cpp:
2781         (WebCore::Document::buildAccessKeyMap):
2782         * dom/Element.cpp:
2783         (WebCore::Element::recalcStyle):
2784         (WebCore::Element::ensureShadowRoot):
2785         (WebCore::Element::childrenChanged):
2786         * dom/Element.h:
2787         (Element):
2788         (WebCore::isShadowHost):
2789         (WebCore):
2790         * dom/ElementShadow.cpp:
2791         (WebCore::ElementShadow::~ElementShadow):
2792         (WebCore::ElementShadow::removeAllShadowRoots):
2793         * dom/ElementShadow.h:
2794         (ElementShadow):
2795         (WebCore::ElementShadow::host):
2796         * dom/EventDispatcher.cpp:
2797         * dom/Node.cpp:
2798         (WebCore::oldestShadowRootFor):
2799         * dom/NodeRenderingContext.cpp:
2800         (WebCore::NodeRenderingContext::NodeRenderingContext):
2801         * dom/ShadowRoot.cpp:
2802         (WebCore::ShadowRoot::create):
2803         * html/ColorInputType.cpp:
2804         (WebCore::ColorInputType::createShadowSubtree):
2805         * html/FileInputType.cpp:
2806         (WebCore::FileInputType::createShadowSubtree):
2807         (WebCore::FileInputType::multipleAttributeChanged):
2808         * html/HTMLDetailsElement.cpp:
2809         (WebCore::HTMLDetailsElement::createShadowSubtree):
2810         * html/HTMLInputElement.cpp:
2811         (WebCore::HTMLInputElement::createShadowSubtree):
2812         * html/HTMLKeygenElement.cpp:
2813         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
2814         (WebCore::HTMLKeygenElement::shadowSelect):
2815         * html/HTMLMediaElement.cpp:
2816         (WebCore::HTMLMediaElement::hasMediaControls):
2817         * html/HTMLMeterElement.cpp:
2818         (WebCore::HTMLMeterElement::createShadowSubtree):
2819         * html/HTMLProgressElement.cpp:
2820         (WebCore::HTMLProgressElement::createShadowSubtree):
2821         * html/HTMLSummaryElement.cpp:
2822         (WebCore::HTMLSummaryElement::createShadowSubtree):
2823         * html/HTMLTextAreaElement.cpp:
2824         (WebCore::HTMLTextAreaElement::createShadowSubtree):
2825         * html/InputType.cpp:
2826         (WebCore::InputType::destroyShadowSubtree):
2827         * html/RangeInputType.cpp:
2828         (WebCore::RangeInputType::handleMouseDownEvent):
2829         (WebCore::RangeInputType::createShadowSubtree):
2830         * html/TextFieldInputType.cpp:
2831         (WebCore::TextFieldInputType::createShadowSubtree):
2832         * html/shadow/SliderThumbElement.cpp:
2833         (WebCore::trackLimiterElementOf):
2834         * inspector/InspectorDOMAgent.cpp:
2835         (WebCore::InspectorDOMAgent::unbind):
2836         (WebCore::InspectorDOMAgent::buildObjectForNode):
2837         * page/FocusController.cpp:
2838         (WebCore):
2839         * rendering/RenderFileUploadControl.cpp:
2840         (WebCore::RenderFileUploadControl::uploadButton):
2841         * svg/SVGTRefElement.cpp:
2842         (WebCore::SVGTRefElement::updateReferencedText):
2843         (WebCore::SVGTRefElement::detachTarget):
2844         * testing/Internals.cpp:
2845         (WebCore::Internals::ensureShadowRoot):
2846         (WebCore::Internals::youngestShadowRoot):
2847         (WebCore::Internals::oldestShadowRoot):
2848         * testing/Internals.h:
2849         (Internals):
2850         * testing/Internals.idl:
2851
2852 2012-05-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2853
2854         Move resumeAnimations to use Internals interface
2855         https://bugs.webkit.org/show_bug.cgi?id=86063
2856
2857         Reviewed by Alexey Proskuryakov.
2858
2859         Add resumeAnimations functions, because it is able to work in the
2860         cross-port way through the Internals interface.
2861
2862         No new tests, since we are improving here the infra-structure for testing
2863         a specific method.
2864
2865         * testing/Internals.cpp:
2866         (WebCore::Internals::resumeAnimations):
2867         (WebCore):
2868         * testing/Internals.h:
2869         (Internals):
2870         * testing/Internals.idl:
2871
2872 2012-05-10  Min Qin  <qinmin@google.com>
2873
2874         split MediaPlayer::enterFullscreen into 2 seperate functions
2875         https://bugs.webkit.org/show_bug.cgi?id=86052
2876
2877         Reviewed by Benjamin Poulain.
2878
2879         It is confusing that enterFullscreen returns a boolean while exitFullscreen does
2880         not do the same. And ios does not need the return value.
2881         So remove the return value on enterFullscreen and make a seperate canEnterFullscreen()
2882         function for android.
2883         No tests as there are no behavior change, just refactoring.
2884
2885         * platform/graphics/MediaPlayer.cpp:
2886         (WebCore::MediaPlayer::enterFullscreen):
2887         (WebCore):
2888         (WebCore::MediaPlayer::canEnterFullscreen):
2889         * platform/graphics/MediaPlayer.h:
2890         (MediaPlayer):
2891         * platform/graphics/MediaPlayerPrivate.h:
2892         (WebCore::MediaPlayerPrivateInterface::enterFullscreen):
2893         (MediaPlayerPrivateInterface):
2894         (WebCore::MediaPlayerPrivateInterface::canEnterFullscreen):
2895
2896 2012-05-10  Sheriff Bot  <webkit.review.bot@gmail.com>
2897
2898         Unreviewed, rolling out r116715.
2899         http://trac.webkit.org/changeset/116715
2900         https://bugs.webkit.org/show_bug.cgi?id=86172
2901
2902         Broke http/tests/security/cross-frame-access-selection.html
2903         (Requested by tkent on #webkit).
2904
2905         * dom/Document.cpp:
2906         (WebCore):
2907         (WebCore::Document::getSelection):
2908         * dom/Document.h:
2909         (Document):
2910         * dom/ShadowRoot.cpp:
2911         (WebCore::ShadowRoot::selection):
2912         * dom/TreeScope.cpp:
2913         (WebCore::TreeScope::~TreeScope):
2914         * dom/TreeScope.h:
2915         (WebCore):
2916         (TreeScope):
2917         * page/DOMSelection.cpp:
2918         (WebCore::DOMSelection::DOMSelection):
2919         * page/DOMSelection.h:
2920         (WebCore):
2921         (WebCore::DOMSelection::create):
2922         (DOMSelection):
2923         * page/DOMWindow.cpp:
2924         (WebCore::DOMWindow::~DOMWindow):
2925         (WebCore::DOMWindow::clearDOMWindowProperties):
2926         (WebCore::DOMWindow::getSelection):
2927         * page/DOMWindow.h:
2928         (DOMWindow):
2929
2930 2012-05-10  Hajime Morrita  <morrita@google.com>
2931
2932         WebKit should support tab-size.
2933         https://bugs.webkit.org/show_bug.cgi?id=52994
2934
2935         - Added boilerplate for "tab-size" CSS property.
2936         - Added RenderStye::tabSize() as a RareInheritedData.
2937         - Replaced TextRun::m_allowTabs into TextRun::m_tabSize.
2938
2939         Reviewed by Simon Fraser.
2940
2941         Tests: fast/css/tab-size-expected.html
2942                fast/css/tab-size.html
2943
2944         * css/CSSComputedStyleDeclaration.cpp:
2945         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2946         * css/CSSParser.cpp:
2947         (WebCore::CSSParser::parseValue):
2948         * css/CSSProperty.cpp:
2949         (WebCore::CSSProperty::isInheritedProperty):
2950         * css/CSSPropertyNames.in:
2951         * css/CSSStyleSelector.cpp:
2952         (WebCore::CSSStyleSelector::applyProperty):
2953         * html/canvas/CanvasRenderingContext2D.cpp:
2954         (WebCore::CanvasRenderingContext2D::drawTextInternal):
2955         * platform/chromium/PopupListBox.cpp:
2956         (WebCore::PopupListBox::paintRow):
2957         * platform/graphics/Font.h:
2958         (WebCore::Font::tabWidth):
2959         * platform/graphics/TextRun.h:
2960         (WebCore::TextRun::TextRun):
2961         (WebCore::TextRun::allowTabs):
2962         (WebCore::TextRun::tabSize):
2963         (WebCore::TextRun::setTabSize):
2964         * platform/graphics/WidthIterator.cpp:
2965         (WebCore::WidthIterator::advance):
2966         * platform/graphics/mac/ComplexTextController.cpp:
2967         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2968         * platform/win/PopupMenuWin.cpp:
2969         (WebCore::PopupMenuWin::paint):
2970         * rendering/InlineTextBox.cpp:
2971         (WebCore::InlineTextBox::constructTextRun):
2972         * rendering/RenderBlock.cpp:
2973         (WebCore::RenderBlock::constructTextRun):
2974         * rendering/RenderBlockLineLayout.cpp:
2975         (WebCore::textWidth):
2976         (WebCore::tryHyphenating):
2977         * rendering/RenderText.cpp:
2978         (WebCore::RenderText::widthFromCache):
2979         (WebCore::RenderText::computePreferredLogicalWidths):
2980         (WebCore::RenderText::width):
2981         * rendering/RenderText.h:
2982         * rendering/style/RenderStyle.cpp:
2983         (WebCore::RenderStyle::diff):
2984         * rendering/style/RenderStyle.h:
2985         (WebCore::RenderStyleBitfields::tabSize):
2986         (WebCore::RenderStyleBitfields::collapsedTabSize):
2987         (WebCore::RenderStyleBitfields::setTabSize):
2988         (WebCore::RenderStyleBitfields::initialTabSize):
2989         * rendering/style/StyleRareInheritedData.cpp:
2990         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2991         (WebCore::StyleRareInheritedData::operator==):
2992         * rendering/style/StyleRareInheritedData.h:
2993         * rendering/svg/SVGInlineTextBox.cpp:
2994         (WebCore::SVGInlineTextBox::constructTextRun):
2995         * rendering/svg/SVGTextMetrics.cpp:
2996         (WebCore::constructTextRun):
2997
2998 2012-05-10  Antoine Labour  <piman@chromium.org>
2999
3000         Sync with impl thread when removing references to external textures
3001         https://bugs.webkit.org/show_bug.cgi?id=86054
3002
3003         We want to ensure the client side is safe to release textures, so we
3004         sync with the impl thread when:
3005         - we change the texture (and we had one)
3006         - the layer is removed from the tree (and we had a texture)
3007         - the layer is destroyed (and we had a texture)
3008
3009         Reviewed by James Robinson.
3010
3011         Test: TextureLayerChromiumTest.
3012
3013         * platform/graphics/chromium/TextureLayerChromium.cpp:
3014         (WebCore::TextureLayerChromium::~TextureLayerChromium):
3015         (WebCore::TextureLayerChromium::setTextureId):
3016         (WebCore::TextureLayerChromium::setLayerTreeHost):
3017         (WebCore):
3018         * platform/graphics/chromium/TextureLayerChromium.h:
3019         (TextureLayerChromium):
3020
3021 2012-05-10  Kent Tamura  <tkent@chromium.org>
3022
3023         [Chromium] attempt to build fix for Chromium-mac.
3024         r116697 introduced an override of a system function. It's intentional
3025         and WebCoreTextFieldCell should be in the whitelist.
3026
3027         * WebCore.gyp/WebCore.gyp:
3028
3029 2012-05-10  Anders Carlsson  <andersca@apple.com>
3030
3031         PDF files won't scroll in Safari when using Adobe plug-in
3032         https://bugs.webkit.org/show_bug.cgi?id=86167
3033         <rdar://problem/11389719>
3034
3035         Reviewed by Sam Weinig.
3036
3037         * page/scrolling/ScrollingCoordinator.cpp:
3038         (WebCore::computeNonFastScrollableRegion):
3039         Loop over the frame view children looking for plug-in views that want wheel events
3040         and add them to the non-fast scrollable region. Ideally, the plug-ins should be added
3041         to the set of scrollable areas, but PluginView in WebKit2 is not a ScrollableArea yet.
3042
3043         * plugins/PluginViewBase.h:
3044         (PluginViewBase):
3045         (WebCore::PluginViewBase::wantsWheelEvents):
3046
3047 2012-05-10  Alexey Proskuryakov  <ap@apple.com>
3048
3049         Crash in 3rd party WebKit apps that disable cache at a wrong time
3050         https://bugs.webkit.org/show_bug.cgi?id=86027
3051         <rdar://problem/10615880>
3052
3053         Reviewed by Antti Koivisto.
3054
3055         Added an API test.
3056
3057         The fix is to use CachedResourceHandle throughout MemoryCache, which will certainly
3058         keep the resource alive. Also removed earlier fixes.
3059
3060         * css/CSSImageSetValue.cpp: (WebCore::CSSImageSetValue::cachedImageSet):
3061         * css/CSSImageValue.cpp: (WebCore::CSSImageValue::cachedImage):
3062         * css/WebKitCSSShaderValue.cpp: (WebCore::WebKitCSSShaderValue::cachedShader):
3063         * history/PageCache.cpp: (WebCore::PageCache::releaseAutoreleasedPagesNow):
3064         * loader/ImageLoader.cpp: (WebCore::ImageLoader::updateFromElement):
3065         * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::load):
3066         * loader/cache/CachedResourceLoader.cpp:
3067         (WebCore::CachedResourceLoader::requestImage):
3068         (WebCore::CachedResourceLoader::requestFont):
3069         (WebCore::CachedResourceLoader::requestTextTrack):
3070         (WebCore::CachedResourceLoader::requestShader):
3071         (WebCore::CachedResourceLoader::requestCSSStyleSheet):
3072         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
3073         (WebCore::CachedResourceLoader::requestScript):
3074         (WebCore::CachedResourceLoader::requestXSLStyleSheet):
3075         (WebCore::CachedResourceLoader::requestSVGDocument):
3076         (WebCore::CachedResourceLoader::requestLinkResource):
3077         (WebCore::CachedResourceLoader::requestRawResource):
3078         (WebCore::CachedResourceLoader::requestResource):
3079         (WebCore::CachedResourceLoader::revalidateResource):
3080         (WebCore::CachedResourceLoader::loadResource):
3081         (WebCore::CachedResourceLoader::requestPreload):
3082         * loader/cache/CachedResourceLoader.h: (CachedResourceLoader):
3083         * loader/cache/MemoryCache.h: (WebCore::MemoryCache::setPruneEnabled):
3084
3085         * loader/cache/CachedResourceHandle.h:
3086         (WebCore::CachedResourceHandle::CachedResourceHandle):
3087         (WebCore::CachedResourceHandle::operator=):
3088         Teach CachedResourceHandle how to make CachedResourceHandle<CachedResource> from
3089         a handle to subclass.
3090
3091 2012-05-10  Tien-Ren Chen  <trchen@chromium.org>
3092
3093         Eliminate duplicated code for culled line box in RenderInline
3094         https://bugs.webkit.org/show_bug.cgi?id=85725
3095
3096         This patch extracts the common part of culledInlineBoundingBox() /
3097         culledInlineAbsoluteRects() / culledInlineAbsoluteQuads() to become a
3098         template function generateCulledLineBoxRects(). The template function
3099         accepts a new parameter, GeneratorContext functor, which will be
3100         invoked everytime a new line box rect has been generated. The generated
3101         rect will be in local coordinate. The functor will be responsible for
3102         appropriate transformation, then appending to vector or union with
3103         existing bounding box.
3104
3105         Reviewed by Eric Seidel.
3106
3107         No new tests. No change in behavior.
3108
3109         * rendering/RenderInline.cpp:
3110         (WebCore):
3111         (WebCore::RenderInline::generateLineBoxRects):
3112         (WebCore::RenderInline::generateCulledLineBoxRects):
3113         (WebCore::RenderInline::absoluteRects):
3114         (WebCore::RenderInline::absoluteQuads):
3115         (WebCore::RenderInline::linesBoundingBox):
3116         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
3117         (WebCore::RenderInline::addFocusRingRects):
3118         * rendering/RenderInline.h:
3119         (RenderInline):
3120
3121 2012-05-10  Abhishek Arya  <inferno@chromium.org>
3122
3123         Crash in swapInNodePreservingAttributesAndChildren.
3124         https://bugs.webkit.org/show_bug.cgi?id=85197
3125  
3126         Reviewed by Ryosuke Niwa.
3127  
3128         Keep the children in a ref vector before adding them to newNode.
3129         They can get destroyed due to mutation events.
3130
3131         No new tests because we don't have a reduction.
3132
3133         * editing/ReplaceNodeWithSpanCommand.cpp:
3134         (WebCore::swapInNodePreservingAttributesAndChildren):
3135
3136 2012-05-10  Shinya Kawanaka  <shinyak@chromium.org>
3137
3138         [Refactoring] Move Selection from DOMWindow to TreeScope.
3139         https://bugs.webkit.org/show_bug.cgi?id=82699
3140
3141         Reviewed by Ryosuke Niwa.
3142
3143         Since ShadowRoot will also manage its own version of DOMSelection, we would like to
3144         share the code among Document and DOMSelection. This patch moves DOMSelection from DOMWindow to TreeScope
3145         so that ShadowRoot can also use it.
3146
3147         No new tests, should covered by existing tests.
3148
3149         * dom/Document.cpp:
3150         (WebCore::Document::updateFocusAppearanceTimerFired):
3151         * dom/Document.h:
3152         (Document):
3153         * dom/ShadowRoot.cpp:
3154         (WebCore::ShadowRoot::selection):
3155         * do/mTreeScope.cpp:
3156         (WebCore::TreeScope::~TreeScope):
3157         (WebCore::TreeScope::getSelection):
3158         (WebCore):
3159         * dom/TreeScope.h:
3160         (WebCore):
3161         (TreeScope):
3162         * page/DOMSelection.cpp:
3163         (WebCore::DOMSelection::DOMSelection):
3164         (WebCore::DOMSelection::clearTreeScope):
3165         (WebCore):
3166         * page/DOMSelection.h:
3167         (WebCore):
3168         (WebCore::DOMSelection::create):
3169         (DOMSelection):
3170         (WebCore::DOMSelection::frame):
3171         * page/DOMWindow.cpp:
3172         (WebCore::DOMWindow::~DOMWindow):
3173         (WebCore::DOMWindow::clearDOMWindowProperties):
3174         (WebCore::DOMWindow::getSelection):
3175         * page/DOMWindow.h:
3176         (DOMWindow):
3177
3178 2012-05-10  Kent Tamura  <tkent@chromium.org>
3179
3180         Unreviewed, rolling out r116594.
3181         http://trac.webkit.org/changeset/116594
3182         https://bugs.webkit.org/show_bug.cgi?id=86013
3183
3184         r116594 might have made some composition tests flaky.
3185
3186         * platform/graphics/chromium/LayerChromium.cpp:
3187         (WebCore::LayerChromium::addAnimation):
3188         * platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
3189         (WebCore::CCLayerAnimationController::pushNewAnimationsToImplThread):
3190         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3191         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
3192         (WebCore::CCLayerTreeHost::didBecomeInvisibleOnImplThread):
3193         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
3194         (CCLayerTreeHost):
3195         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3196         (WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
3197         * platform/graphics/chromium/cc/CCProxy.h:
3198         (CCProxy):
3199         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
3200         (WebCore::CCSingleThreadProxy::CCSingleThreadProxy):
3201         (WebCore::CCSingleThreadProxy::doComposite):
3202         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
3203         (WebCore):
3204         * platform/graphics/chromium/cc/CCThreadProxy.h:
3205         (CCThreadProxy):
3206
3207 2012-05-10  Michael Nordman  <michaeln@google.com>
3208
3209         [chromium] DomStorage events handling needs TLC (2)
3210         https://bugs.webkit.org/show_bug.cgi?id=85221
3211         Alter the StorageArea virtual interface such that the mutators no longer
3212         return old values. This is to allow implementations of the interface to operate
3213         more asynchronously.
3214
3215         Reviewed by Adam Barth.
3216
3217         No new tests. Existing tests cover this.
3218
3219         * storage/StorageArea.h: Alter the interface so the mutators no longer return previous values
3220         * storage/StorageAreaImpl.cpp:
3221         (WebCore::StorageAreaImpl::disabledByPrivateBrowsingInFrame):  removed an unneeded PLATFORM(CHROMIUM) guard
3222         (WebCore::StorageAreaImpl::setItem): no longer return the old value
3223         (WebCore::StorageAreaImpl::removeItem): no longer return the old value
3224         (WebCore::StorageAreaImpl::clear): no longer return whether something was cleared
3225         * storage/StorageAreaImpl.h: match StorageArea's virtual interface
3226
3227 2012-05-10  Beth Dakin  <bdakin@apple.com>
3228
3229         https://bugs.webkit.org/show_bug.cgi?id=86158
3230         Overlay scrollbars without layers never paint in overflow regions in 
3231         tiled drawing mode
3232         -and corresponding-
3233         <rdar://problem/11289546>
3234
3235         Reviewed by Darin Adler.
3236
3237         RenderLayers paint scrollbars that do not have their own layers by 
3238         running a second pass through the layer tree after the layer tree has 
3239         painted. This ensures that the scrollbars always paint on top of 
3240         content. However, this mechanism was relying on 
3241         FrameView::paintContents() as a choke-point for all painting to 
3242         trigger the second painting pass. That is not a reasonable choke-point 
3243         in tiled drawing, so this patch adds similar code to 
3244         RenderLayerBacking.
3245
3246         Only opt into the second painting pass for scrollbars that do not have 
3247         their own layers.
3248         * rendering/RenderLayer.cpp:
3249         (WebCore::RenderLayer::paintOverflowControls):
3250         
3251         A layer that paints into its backing cannot return early here if it 
3252         has overlay scrollbars to paint.
3253         (WebCore::RenderLayer::paintLayer):
3254         
3255         This replicates code in FrameView::paintContents(). After painting the 
3256         owning layer, do a second pass if there are overlay scrollbars to 
3257         paint.
3258         * rendering/RenderLayerBacking.cpp:
3259         (WebCore::RenderLayerBacking::paintIntoLayer):
3260
3261 2012-05-10  Anders Carlsson  <andersca@apple.com>
3262
3263         Well, at least fixing the GTK+ build is something!
3264
3265         * platform/gtk/LocalizedStringsGtk.cpp:
3266         (WebCore::insecurePluginVersionText):
3267         (WebCore):
3268
3269 2012-05-10  Anders Carlsson  <andersca@apple.com>
3270
3271         Add insecurePluginVersionText stubs.
3272
3273         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
3274         (WebCore::insecurePluginVersionText):
3275         (WebCore):
3276         * platform/efl/LocalizedStringsEfl.cpp:
3277         (WebCore::insecurePluginVersionText):
3278         (WebCore):
3279         * platform/qt/LocalizedStringsQt.cpp:
3280         (WebCore::insecurePluginVersionText):
3281         (WebCore):
3282
3283 2012-05-10  Sheriff Bot  <webkit.review.bot@gmail.com>
3284
3285         Unreviewed, rolling out r116677.
3286         http://trac.webkit.org/changeset/116677
3287         https://bugs.webkit.org/show_bug.cgi?id=86159
3288
3289         This patch causes linker error to some mac bots (Requested by
3290         jianli_ on #webkit).
3291
3292         * WebCore.exp.in:
3293         * dom/ContainerNode.h:
3294         * dom/Node.cpp:
3295         (WebCore::Node::traverseNextNode):
3296         (WebCore::Node::traverseNextSibling):
3297         * dom/Node.h:
3298         (Node):
3299
3300 2012-05-10  Abhishek Arya  <inferno@chromium.org>
3301
3302         Crash in FontCache::releaseFontData due to infinite float size.
3303         https://bugs.webkit.org/show_bug.cgi?id=86110
3304
3305         Reviewed by Andreas Kling.
3306
3307         New callers always forget to clamp the font size, which overflows
3308         to infinity on multiplication. It is best to clamp it at the end
3309         to avoid getting greater than std::numeric_limits<float>::max().
3310
3311         Test: fast/css/large-font-size-crash.html
3312
3313         * platform/graphics/FontDescription.h:
3314         (WebCore::FontDescription::setComputedSize):
3315         (WebCore::FontDescription::setSpecifiedSize):
3316
3317 2012-05-10  Beth Dakin  <bdakin@apple.com>
3318
3319         https://bugs.webkit.org/show_bug.cgi?id=82131
3320         [Mac] REGRESSION (r110480): Text field that specifies background-color 
3321         (or is auto-filled) gets un-themed border
3322         -and corresponding-
3323         <rdar://problem/11115221>
3324
3325         Reviewed by Maciej Stachowiak.
3326
3327         This change rolls out r110480 which is what caused styled text fields 
3328         to get the un-themed border, and it does a bunch of work to make sure 
3329         we get the pretty, new version of the NSTextField art whenever 
3330         possible. We do this differently for post-Lion OS's since there is now 
3331         a way to opt into it all the time. Lion and SnowLeopard can only use 
3332         the new art in HiDPI mode when the background color of the text field 
3333         is just white.
3334
3335         RenderThemeMac::textField() takes a boolean paramter used to determine 
3336         if the new gradient will be used.
3337         * rendering/RenderThemeMac.h:
3338         (RenderThemeMac):
3339         
3340         This is the post-Lion workaround. This code has no effect on Lion and 
3341         SnowLeopard. This allows up to opt into a version of [NSTextField drawWithFrame:] that will only draw the frame of the text field; without this, it will draw the frame and the background, which creates a number of problems with styled text fields and text fields in HiDPI. There is a less comprehesive workaround for Lion and SnowLeopard in place in RenderThemeMac::textField().
3342         * rendering/RenderThemeMac.mm:
3343         (-[WebCoreTextFieldCell _coreUIDrawOptionsWithFrame:inView:includeFocus:]):
3344         
3345         This is the roll-out of r110480.
3346         (WebCore::RenderThemeMac::isControlStyled):
3347         
3348         See the comments for a full explanation, but this is mostly code for 
3349         Lion and SnowLeopard to determine if we can opt into the new artwork.
3350         (WebCore::RenderThemeMac::paintTextField):
3351         (WebCore::RenderThemeMac::textField):
3352
3353 2012-05-10  Anders Carlsson  <andersca@apple.com>
3354
3355         WebKit1: Add a way to blacklist specific plug-ins/plug-in versions
3356         https://bugs.webkit.org/show_bug.cgi?id=86150
3357         <rdar://problem/9551196>
3358
3359         Reviewed by Sam Weinig.
3360
3361         * English.lproj/Localizable.strings:
3362         Update.
3363
3364         * loader/SubframeLoader.cpp:
3365         (WebCore::SubframeLoader::loadPlugin):
3366         It is possible that the client has already set the unavailability reason so don't try to set it twice.
3367
3368         * platform/LocalizedStrings.cpp:
3369         (WebCore::insecurePluginVersionText):
3370         * platform/LocalizedStrings.h:
3371         Add insecure plug-in version text.
3372
3373         * rendering/RenderEmbeddedObject.cpp:
3374         (WebCore::RenderEmbeddedObject::unavailablePluginReplacementText):
3375         * rendering/RenderEmbeddedObject.h:
3376         Add InsecurePluginVersion unavailability reason.
3377
3378 2012-05-10  Eric Seidel  <eric@webkit.org>
3379
3380         Make IFRAME_SEAMLESS child documents inherit styles from their parent iframe element
3381         https://bugs.webkit.org/show_bug.cgi?id=85940
3382
3383         Reviewed by Ojan Vafai.
3384
3385         The HTML5 <iframe seamless> spec says:
3386         In a CSS-supporting user agent: the user agent must, for the purpose of CSS property
3387         inheritance only, treat the root element of the active document of the iframe
3388         element's nested browsing context as being a child of the iframe element.
3389         (Thus inherited properties on the root element of the document in the
3390         iframe will inherit the computed values of those properties on the iframe
3391         element instead of taking their initial values.)
3392
3393         Initially I implemented this support to the letter of the spec. However, doing so I learned
3394         that WebKit has a RenderStyle for the Document Node, not just the root element of the document.
3395         In this RenderStyle on the Document, we add a bunch of per-document styles from settings
3396         including designMode.
3397
3398         This change makes StyleResolver::styleForDocument inherit style from the parent iframe's
3399         style, before applying any of these per-document styles.  This may or may not be correct
3400         depending on what behavior we want for rtl-ordering, page-zoom, locale, design mode, etc.
3401         For now, we continue to treat the iframe's document as independent in these regards, and
3402         the settings on that document override those inherited from the iframe.
3403
3404         Also, intially when making this work, I added redirects in recalcStyle and scheduleStyleRecalc
3405         from the child document to the parent document in the case of seamless (since the parent
3406         document effectively manages the style resolve and layout of the child in seamless mode).
3407         However, I was not able to find a test which depended on this code change, so in this final patch
3408         I have removed both of these modifications and replaced them with FIXMEs.  Based on discussions
3409         with Ojan and James Robinson, I believe both of those changes may eventually be wanted.
3410
3411         This change basically does 3 things:
3412         1.  Makes StyleResolver::styleForDocument inherit from the parent iframe.
3413         2.  Makes any recalcStyle calls on the iframe propogate down into the child document (HTMLIFrameElement::didRecalcStyle).
3414         3.  Makes Document::recalcStyle aware of the fact that the Document's style *can* change
3415             for reasons other than recalcStyle(Force).
3416
3417         I'm open to more testing suggestions, if reviewers have settings on the Document's style
3418         that you want to make sure we inherit from the parent iframe, or don't inherit, etc.
3419         I view this as a complete solution to this aspect of the current <iframe seamless> spec,
3420         but likely not the last code we will write for this aspect of the seamless feature. :)