Improve test cases for network information APIs
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-03  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2
3         Improve test cases for network information APIs
4         https://bugs.webkit.org/show_bug.cgi?id=90162
5
6         Reviewed by Adam Barth.
7
8         Existing implementation doesn't test port implementation in network info APIs.
9         This patch lets test cases use bandwidth and metered functions implemented by port layer.
10
11         In addition, expected results need to check return type instead of property name.
12
13         No new tests. Covered by existing tests.
14
15         * Modules/networkinfo/NetworkInfoConnection.cpp:
16         (WebCore::NetworkInfoConnection::bandwidth):
17         (WebCore::NetworkInfoConnection::metered):
18
19 2012-07-03  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
20
21         [EFL] [WK2] Don't call eina_iterator_free() if iterator is NULL
22         https://bugs.webkit.org/show_bug.cgi?id=90076
23
24         Reviewed by Kenneth Rohde Christiansen.
25
26         Add a null check to prevent calling eina_iterator_free() when
27         iterator is NULL.
28
29         No new tests. This patch doesn't change behavior.
30
31         * platform/efl/FileSystemEfl.cpp:
32         (WebCore::listDirectory): Early return when iterator is NULL.
33
34 2012-07-03  Alexander Pavlov  <apavlov@chromium.org>
35
36         Web Inspector: [Elements] Text formatting is not retained when editing <script> or <style> contents as text
37         https://bugs.webkit.org/show_bug.cgi?id=90440
38
39         Reviewed by Vsevolod Vlasov.
40
41         * inspector/front-end/ElementsTreeOutline.js:
42         (WebInspector.ElementsTreeElement.prototype._startEditingTextNode):
43
44 2012-07-03  Vsevolod Vlasov  <vsevik@chromium.org>
45
46         Web Inspector: Save scroll selection and cursor position of SourceFrames in sources panel.
47         https://bugs.webkit.org/show_bug.cgi?id=90294
48
49         Reviewed by Yury Semikhatsky.
50
51         Scroll and selection change handling is now delegated from TextViewer to SourceFrame.
52         SourceFrame now dispatches ScrollChanged and SelectionChanged events.
53         TabbedEditorContainer now saves scroll and selection information together
54         with the url history and restores scroll and selection on resource opening.
55
56         * inspector/front-end/JavaScriptSourceFrame.js:
57         (WebInspector.JavaScriptSourceFrame.prototype.setExecutionLine):
58         * inspector/front-end/SourceFrame.js:
59         (WebInspector.SourceFrame.prototype.wasShown):
60         (WebInspector.SourceFrame.prototype.highlightLine):
61         (WebInspector.SourceFrame.prototype._innerHighlightLineIfNeeded):
62         (WebInspector.SourceFrame.prototype._clearLineHighlight):
63         (WebInspector.SourceFrame.prototype.revealLine):
64         (WebInspector.SourceFrame.prototype._innerRevealLineIfNeeded):
65         (WebInspector.SourceFrame.prototype._clearLineToReveal):
66         (WebInspector.SourceFrame.prototype.scrollToLine):
67         (WebInspector.SourceFrame.prototype._innerScrollToLineIfNeeded):
68         (WebInspector.SourceFrame.prototype._clearLineToScrollTo):
69         (WebInspector.SourceFrame.prototype.setSelection):
70         (WebInspector.SourceFrame.prototype._innerSetSelectionIfNeeded):
71         (WebInspector.SourceFrame.prototype._wasShownOrLoaded):
72         (WebInspector.SourceFrame.prototype.setContent):
73         (WebInspector.SourceFrame.prototype.commitEditing):
74         (WebInspector.SourceFrame.prototype.selectionChanged):
75         (WebInspector.SourceFrame.prototype.scrollChanged):
76         (WebInspector.TextViewerDelegateForSourceFrame.prototype.selectionChanged):
77         (WebInspector.TextViewerDelegateForSourceFrame.prototype.scrollChanged):
78         * inspector/front-end/TabbedEditorContainer.js:
79         (WebInspector.TabbedEditorContainer):
80         (WebInspector.TabbedEditorContainer.prototype._addScrollAndSelectionListeners):
81         (WebInspector.TabbedEditorContainer.prototype._removeScrollAndSelectionListeners):
82         (WebInspector.TabbedEditorContainer.prototype._scrollChanged):
83         (WebInspector.TabbedEditorContainer.prototype._selectionChanged):
84         (WebInspector.TabbedEditorContainer.prototype._appendFileTab):
85         (WebInspector.TabbedEditorContainer.prototype._tabClosed):
86         (WebInspector.TabbedEditorContainer.HistoryItem):
87         (WebInspector.TabbedEditorContainer.HistoryItem.fromObject):
88         (WebInspector.TabbedEditorContainer.HistoryItem.prototype.serializeToObject):
89         (WebInspector.TabbedEditorContainer.History):
90         (WebInspector.TabbedEditorContainer.History.fromObject):
91         (WebInspector.TabbedEditorContainer.History.prototype.index):
92         (WebInspector.TabbedEditorContainer.History.prototype.selectionRange):
93         (WebInspector.TabbedEditorContainer.History.prototype.updateSelectionRange):
94         (WebInspector.TabbedEditorContainer.History.prototype.scrollLineNumber):
95         (WebInspector.TabbedEditorContainer.History.prototype.updateScrollLineNumber):
96         (WebInspector.TabbedEditorContainer.History.prototype.update):
97         (WebInspector.TabbedEditorContainer.History.prototype.remove):
98         (WebInspector.TabbedEditorContainer.History.prototype.save):
99         (WebInspector.TabbedEditorContainer.History.prototype.set _serializeToObject):
100         * inspector/front-end/TextEditorModel.js:
101         (WebInspector.TextRange.fromObject):
102         (WebInspector.TextRange.prototype.clone):
103         (WebInspector.TextRange.prototype.serializeToObject):
104         * inspector/front-end/TextViewer.js:
105         (WebInspector.TextViewer.prototype._handleScrollChanged):
106         (WebInspector.TextViewer.prototype.scrollToLine):
107         (WebInspector.TextViewer.prototype._handleSelectionChange):
108         (WebInspector.TextViewer.prototype.setSelection):
109         (WebInspector.TextViewer.prototype.wasShown):
110         (WebInspector.TextViewer.prototype._handleFocused):
111         (WebInspector.TextViewer.prototype.willHide):
112         (WebInspector.TextViewerDelegate.prototype.selectionChanged):
113         (WebInspector.TextViewerDelegate.prototype.scrollChanged):
114         (WebInspector.TextEditorChunkedPanel.prototype.scrollToLine):
115
116 2012-07-03  Taiju Tsuiki  <tzik@chromium.org>
117
118         Web Inspector: Make DirectoryContentView sortable
119         https://bugs.webkit.org/show_bug.cgi?id=90361
120
121         Reviewed by Vsevolod Vlasov.
122
123         * inspector/Inspector.json:
124         * inspector/InspectorFileSystemAgent.cpp:
125         (WebCore):
126         * inspector/front-end/DirectoryContentView.js:
127         (WebInspector.DirectoryContentView):
128         (WebInspector.DirectoryContentView.prototype.showEntries):
129         (WebInspector.DirectoryContentView.prototype._sort):
130         (WebInspector.DirectoryContentView.Node.comparator.isDirectoryCompare):
131         (WebInspector.DirectoryContentView.Node.comparator.nameCompare):
132         (WebInspector.DirectoryContentView.Node.comparator.typeCompare):
133         (WebInspector.DirectoryContentView.Node.comparator.sizeCompare):
134         (WebInspector.DirectoryContentView.Node.comparator):
135         (WebInspector.DirectoryContentView.Node.prototype._metadataReceived):
136
137 2012-07-03  Jan Keromnes  <janx@linux.com>
138
139         Web Inspector: WebInspector.TextViewer should be renamed WebInspector.TextEditor
140         https://bugs.webkit.org/show_bug.cgi?id=89939
141
142         Reviewed by Vsevolod Vlasov.
143
144         Fixed LayoutTests and PerformanceTests accordingly.
145
146         * WebCore.gypi:
147         * WebCore.vcproj/WebCore.vcproj:
148         * inspector/compile-front-end.py:
149         * inspector/front-end/AdvancedSearchController.js:
150         (WebInspector.SearchView):
151         * inspector/front-end/JavaScriptSourceFrame.js:
152         (WebInspector.JavaScriptSourceFrame):
153         (WebInspector.JavaScriptSourceFrame.prototype._onHidePopover):
154         (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration):
155         (WebInspector.JavaScriptSourceFrame.prototype._removeBreakpointDecoration):
156         (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition.finishEditing):
157         (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition):
158         (WebInspector.JavaScriptSourceFrame.prototype.setExecutionLine):
159         (WebInspector.JavaScriptSourceFrame.prototype.clearExecutionLine):
160         (WebInspector.JavaScriptSourceFrame.prototype.onTextEditorContentLoaded):
161         (WebInspector.JavaScriptSourceFrame.prototype.toggleBreakpointOnCurrentLine):
162         * inspector/front-end/SourceFrame.js:
163         (WebInspector.SourceFrame):
164         (WebInspector.SourceFrame.prototype.wasShown):
165         (WebInspector.SourceFrame.prototype.willHide):
166         (WebInspector.SourceFrame.prototype.defaultFocusedElement):
167         (WebInspector.SourceFrame.prototype.get textEditor):
168         (WebInspector.SourceFrame.prototype.clearMessages):
169         (WebInspector.SourceFrame.prototype.highlightLine):
170         (WebInspector.SourceFrame.prototype._clearLineHighlight):
171         (WebInspector.SourceFrame.prototype.revealLine):
172         (WebInspector.SourceFrame.prototype.setSelection):
173         (WebInspector.SourceFrame.prototype.setContent):
174         (WebInspector.SourceFrame.prototype.onTextEditorContentLoaded):
175         (WebInspector.SourceFrame.prototype._setTextEditorDecorations):
176         (WebInspector.SourceFrame.prototype.searchCanceled):
177         (WebInspector.SourceFrame.prototype.jumpToSearchResult):
178         (WebInspector.SourceFrame.prototype.addMessageToSource):
179         (WebInspector.SourceFrame.prototype.removeMessageFromSource):
180         (WebInspector.SourceFrame.prototype.inheritScrollPositions):
181         (WebInspector.TextEditorDelegateForSourceFrame):
182         * inspector/front-end/TextViewer.js: Removed.
183         * inspector/front-end/WebKit.qrc:
184         * inspector/front-end/inspector.html:
185         * inspector/front-end/textViewer.css: Removed.
186
187 2012-07-03  Charles Wei  <charles.wei@torchmobile.com.cn>
188
189         IndexedDB: should make the LevelDB persistant to the directory indicated in PageGroupSettings::indexedDBDataBasePath
190         https://bugs.webkit.org/show_bug.cgi?id=88338
191
192         Reviewed by David Levin.
193
194         If the indexedDB runs in main thread it can access the GroupSettings via the document;
195         otherwise, we need to pass the page GroupSettings to the worker thread so that accessible
196         to the indexedDB running in WorkerContext. 
197
198         * Modules/indexeddb/IDBFactory.cpp:
199         (WebCore::IDBFactory::open):
200         * workers/DedicatedWorkerThread.cpp:
201         (WebCore::DedicatedWorkerThread::create):
202         (WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
203         * workers/DedicatedWorkerThread.h:
204         (DedicatedWorkerThread):
205         * workers/DefaultSharedWorkerRepository.cpp:
206         (SharedWorkerProxy):
207         (WebCore::SharedWorkerProxy::groupSettings):
208         (WebCore):
209         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
210         * workers/SharedWorkerThread.cpp:
211         (WebCore::SharedWorkerThread::create):
212         (WebCore::SharedWorkerThread::SharedWorkerThread):
213         * workers/SharedWorkerThread.h:
214         (SharedWorkerThread):
215         * workers/WorkerMessagingProxy.cpp:
216         (WebCore::WorkerMessagingProxy::startWorkerContext):
217         * workers/WorkerThread.cpp:
218         (WebCore::WorkerThreadStartupData::create):
219         (WorkerThreadStartupData):
220         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
221         (WebCore::WorkerThread::WorkerThread):
222         (WebCore::WorkerThread::groupSettings):
223         (WebCore):
224         * workers/WorkerThread.h:
225         (WorkerThread):
226
227 2012-07-03  Balazs Kelemen  <kbalazs@webkit.org>
228
229         [Qt][WK2] fast/viewport/viewport-91.html still fails after r121555 and r121661
230         https://bugs.webkit.org/show_bug.cgi?id=90376
231
232         Reviewed by Csaba Osztrogonác.
233
234         No new tests, this is only a build alignment.
235
236         Export ViewportArguments::deprecatedTargetDPI since it is used in WebKit2.
237         * WebCore.exp.in:
238
239 2012-07-02  Martin Robinson  <mrobinson@igalia.com>
240
241         [TextureMapper] The TextureMapper should support edge-distance anti-antialiasing
242         https://bugs.webkit.org/show_bug.cgi?id=90308
243
244         Reviewed by Noam Rosenthal.
245
246         Add an edge-distance anti-aliasing implementation for the TextureMapper. Currently
247         this implementation is not active for tiled layers. This implementation is based
248         on the one in the Chromium compositor originally written by David Raveman.
249
250         When a layer is transformed in a way that leaves its edge dimensions across pixel
251         boundaries, edge distance anti-aliasing will do a cheaper form of anti-aliasing
252         than full-scene anti-aliasing to make the transition from the layer pixel
253         to the background pixel smoother.
254
255         No new tests. This will be covered by pixel tests for Qt and GTK+ accelerated
256         compositing and 3D transforms, when those test harnesses are capable of
257         producing pixel output (in progress).
258
259         * platform/graphics/texmap/TextureMapper.h: Add an enum which is used to tell
260         the texture mapper what edges of a texture are exposed. This will be used for
261         properly dealing with tiled layers in the future.
262         * platform/graphics/texmap/TextureMapperBackingStore.cpp: Properly pass information
263         about exposed layer edges to the TextureMapper while painting.
264         * platform/graphics/texmap/TextureMapperBackingStore.h:
265         (TextureMapperTile): Modified arguments include exposed edges.
266         * platform/graphics/texmap/TextureMapperGL.cpp:
267         (WebCore::TextureMapperGL::drawQuad): Renamed from drawRect, this method can now
268         draw quads that have non unit-rect texture coordinates. This is necessary because
269         the edge distance approach draws such quad.
270         (WebCore::TextureMapperGL::drawBorder): Call drawQuad now instead of drawRect.
271         (WebCore::TextureMapperGL::drawTexture): Pass the exposedEdges argument down.
272         (WebCore::TextureMapperGL::drawTextureRectangleARB): Call drawQuad now instead of
273         drawRect.
274         (WebCore::viewportMatrix): Added this helper which can calculate the viewport
275         transform based on the current OpenGL viewport settings.
276         (WebCore::scaleLineEquationCoeffecientsToOptimizeDistanceCalculation): Added this
277         helper which optimizes the fragment shader by precalculating some constant parts
278         of the distance calculation.
279         (WebCore::getStandardEquationCoeffecientsForLine): Given two end points of line segment
280         get the coeffecients of the line in the standard form of the line equation.
281         (WebCore::quadToEdgeArray): Converts a FloatQuad to an array of four sets of pre-scaled
282         line coefficients so that they can be passed to OpenGL.
283         (WebCore::scaledVectorDifference): Helper which helps expand a quad of arbitrary
284         orientation.
285         (WebCore::inflateQuad): Inflate a quad of arbitrary orientation. The transform may
286         flip it so we have to look at neighboring points to expand the quad.
287         (WebCore::TextureMapperGL::drawTextureWithAntialiasing): Activate the anti-aliasing
288         program and set up all uniforms.
289         (WebCore::TextureMapperGL::drawTexturedQuadWithProgram): Abstract out common operations
290         from drawTexture to be used with drawTextureWithAntialiasing.
291         * platform/graphics/texmap/TextureMapperGL.h:
292         (WebCore::TextureMapperGL::DrawQuad::DrawQuad): Add this small type which stores information
293         necessary to draw a quad -- it's original destination rect and the final size mapped to
294         texture coordinates.
295         (TextureMapperGL):
296         * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Add the new exposedEdges argument.
297         * platform/graphics/texmap/TextureMapperImageBuffer.h: Ditto.
298         * platform/graphics/texmap/TextureMapperShaderManager.cpp: Add the new fragment shader for
299         doing edge-distance AA and a program which uses that shader.
300         * platform/graphics/texmap/TextureMapperShaderManager.h: Ditto.
301
302 2012-07-02  Dan Bernstein  <mitz@apple.com>
303
304         Column height and count calculation ignores most overflow
305         https://bugs.webkit.org/show_bug.cgi?id=90392
306
307         Reviewed by Dean Jackson.
308
309         Test: fast/multicol/overflow-content.html
310
311         * rendering/RenderBlock.cpp:
312         (WebCore::RenderBlock::relayoutForPagination): Changed to compute the overflow from children
313         and use the layout overflow height rather the content height.
314
315 2012-07-02  Chris Guan  <chris.guan@torchmobile.com.cn>
316
317         [BlackBerry] Refactor : move the implementation of getMIMETypeForExtension and getPreferredExtensionForMIMEType into BlackBerry platform
318         https://bugs.webkit.org/show_bug.cgi?id=90360
319
320         Reviewed by Antonio Gomes.
321
322         We should have one implementation for getMIMETypeForExtension
323         and getPreferredExtensionForMIMEType for both webkit and platform,
324         so I move this implementation to BlackBerry platform.
325         
326         No new test cases , because no behavior changed.
327
328         * platform/blackberry/MIMETypeRegistryBlackBerry.cpp:
329         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
330         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
331
332 2012-07-02  Emil A Eklund  <eae@chromium.org>
333
334         Position replaced elements on pixel bounds
335         https://bugs.webkit.org/show_bug.cgi?id=90354
336
337         Reviewed by Eric Seidel.
338
339         To avoid sizing and repaint issues we should layout replaced elements on
340         pixel bounds. We already ensure that replaced elements are sized in full
341         pixels and that they are painted on pixel bounds. By also ensuring that
342         they are placed on pixel bounds we avoid pixel having the size be
343         expanded by pixel snapping and repainting/invalidation rect issues when
344         scrolling.
345
346         Test: fast/repaint/repaint-during-scroll-with-zoom.html
347
348         * rendering/RenderBox.cpp:
349         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
350         (WebCore::RenderBox::computePositionedLogicalHeightReplaced):
351
352 2012-07-02  Nico Weber  <thakis@chromium.org>
353
354         Fix new -Wunused-private-field violations
355         https://bugs.webkit.org/show_bug.cgi?id=90417
356
357         Reviewed by Ryosuke Niwa.
358
359         No intended behavior change.
360
361         * inspector/InspectorFileSystemAgent.cpp:
362         (WebCore):
363         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp:
364         (WebCore::CCPrioritizedTextureManager::CCPrioritizedTextureManager):
365         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
366         (CCPrioritizedTextureManager):
367
368 2012-07-02  Yoshifumi Inoue  <yosin@chromium.org>
369
370         Build fix for Chromimum
371
372         r121710 removed WebCore/platform/qt/GraphicsLayerQt.{cpp,h}.
373         However, that patch didn't remove them from WebCore.gypi.
374
375         * WebCore.gypi: Removed GraphicsLayerQt.{cpp,h}
376
377 2012-07-02  Joshua Bell  <jsbell@chromium.org>
378
379         IDL overloads should not treat wrapper types as nullable by default
380         https://bugs.webkit.org/show_bug.cgi?id=90218
381
382         Reviewed by Kentaro Hara.
383
384         Wrapper types were being treated as Nullable by default during overloaded
385         method dispatching, which deviates from the WebIDL specification. This change
386         introduces the "?" type suffix into the parser, and treats wrapper types
387         only nullable if specified. (The behavior of array types and other non-wrapper
388         types are not changed, and only overloaded methods are checked.)
389
390         IDL files with affected overloads are modified to include the "?" suffix
391         so that no behavior changes are introduced by this patch - the JS and V8
392         generator results before/after the change show no diffs.
393
394         Test: bindings/scripts/test/TestObj.idl (a non-nullable overload)
395
396         * Modules/indexeddb/IDBDatabase.idl: Added "?" where necessary.
397         * Modules/indexeddb/IDBIndex.idl: Added "?" where necessary.
398         * Modules/indexeddb/IDBObjectStore.idl: Added "?" where necessary.
399         * Modules/webaudio/AudioContext.idl: Added "?" where necessary.
400         * Modules/webaudio/AudioNode.idl: Added "?" where necessary.
401         * bindings/scripts/CodeGeneratorJS.pm:
402         (GenerateParametersCheckExpression): Add isNullable check.
403         * bindings/scripts/CodeGeneratorV8.pm:
404         (GenerateParametersCheckExpression): Add isNullable check.
405         * bindings/scripts/IDLParser.pm: Parse/set isNullable.
406         (parseParameters):
407         * bindings/scripts/IDLStructure.pm: Add basic type suffix parsing.
408         * bindings/scripts/test/JS/JSTestObj.cpp:
409         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
410         (WebCore):
411         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod):
412         * bindings/scripts/test/TestObj.idl: Mark previous overload params with ?, add new one without.
413         * bindings/scripts/test/V8/V8TestObj.cpp:
414         (WebCore::TestObjV8Internal::overloadedMethod8Callback):
415         (TestObjV8Internal):
416         (WebCore::TestObjV8Internal::overloadedMethodCallback):
417         * dom/DataTransferItemList.idl: Added "?" where necessary.
418         * fileapi/WebKitBlobBuilder.idl: Added "?" where necessary.
419         * html/DOMURL.idl: Added "?" where necessary.
420         * html/canvas/CanvasRenderingContext2D.idl: Added "?" where necessary.
421         * html/canvas/WebGLRenderingContext.idl: Added "?" where necessary.
422
423 2012-07-02  No'am Rosenthal  <noam.rosenthal@nokia.com>
424
425         [Qt] Get rid of GraphicsLayerQt
426         https://bugs.webkit.org/show_bug.cgi?id=78598
427
428         Reviewed by Luiz Agostini.
429
430         Remove GraphicsLayerQt.h/cpp, as well as references to the non-TextureMapper code paths
431         in GraphicsContext3DQt and MediaPlayerPrivateQt.
432
433         No new tests, removing unused code paths.
434
435         * Target.pri:
436         * platform/graphics/PlatformLayer.h:
437         * platform/graphics/qt/GraphicsContext3DQt.cpp:
438         (GraphicsContext3DPrivate):
439         (WebCore):
440         * platform/graphics/qt/GraphicsContextQt.cpp:
441         (WebCore):
442         * platform/graphics/qt/GraphicsLayerQt.cpp: Removed.
443         * platform/graphics/qt/GraphicsLayerQt.h: Removed.
444         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
445         (WebCore):
446         * platform/graphics/qt/MediaPlayerPrivateQt.h:
447         (MediaPlayerPrivateQt):
448         * plugins/qt/PluginViewQt.cpp:
449         (WebCore::PluginView::invalidateRect):
450         (WebCore::PluginView::platformStart):
451
452 2012-07-02  Behdad Esfahbod  <behdad@behdad.org>
453
454         LayoutUnit::epsilon() is wrong
455         https://bugs.webkit.org/show_bug.cgi?id=90083
456
457         Reviewed by Eric Seidel.
458
459         Do division in floats, not integers.
460
461         No new tests. No code using the affected function.
462
463         * platform/FractionalLayoutUnit.h:
464         (WebCore::FractionalLayoutUnit::epsilon):
465
466 2012-07-02  Tim Horton  <timothy_horton@apple.com>
467
468         Compositing layer sync should cause deferred repaints to be fired immediately
469         https://bugs.webkit.org/show_bug.cgi?id=90401
470         <rdar://problem/11792028>
471
472         Reviewed by Simon Fraser and Antti Koivisto.
473
474         If we sync compositing layers and allow the repaint to be deferred, there is time for a
475         visible flash to occur. Instead, stop the deferred repaint timer and repaint immediately.
476
477         No new tests, configuration and timing dependent.
478
479         * page/FrameView.cpp:
480         (WebCore::FrameView::syncCompositingStateForThisFrame):
481         (WebCore::FrameView::checkStopDelayingDeferredRepaints):
482         (WebCore::FrameView::stopDelayingDeferredRepaints): Split off from checkStopDelayingDeferredRepaints.
483         * page/FrameView.h:
484         (FrameView): Add stopDelayingDeferredRepaints.
485
486 2012-07-02  Benjamin Poulain  <bpoulain@apple.com>
487
488         Do not do any logging initialization when logging is disabled
489         https://bugs.webkit.org/show_bug.cgi?id=90228
490
491         Reviewed by Simon Fraser.
492
493         Initializating of the logging channels was taking time on startup. When logging is disabled
494         (and the LOG macro does nothing), we should aslo disable logging channels and initialization.
495
496         This patch #ifdef the Logging initialization with the macro LOG_DISABLED.
497
498         * WebCore.exp.in:
499         * make-export-file-generator: Explicitely adds Assertions.h so that LOG_DISABLED is defined.
500         * platform/Logging.cpp:
501         * platform/Logging.h:
502         * platform/blackberry/LoggingBlackBerry.cpp:
503         * platform/efl/LoggingEfl.cpp:
504         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
505         * platform/gtk/LoggingGtk.cpp:
506         * platform/mac/LoggingMac.mm:
507         * platform/network/soup/ResourceHandleSoup.cpp:
508         (WebCore::ensureSessionIsInitialized):
509         * platform/qt/LoggingQt.cpp:
510         * platform/win/LoggingWin.cpp:
511         * platform/wx/LoggingWx.cpp:
512
513 2012-07-02  Dan Bernstein  <mitz@apple.com>
514
515         <rdar://problem/11787030> In vertical writing modes, child following float-clearing block has incorrect logical top
516         https://bugs.webkit.org/show_bug.cgi?id=90359
517
518         Reviewed by Anders Carlsson.
519
520         Test: fast/writing-mode/logical-height-after-clear.html
521
522         * rendering/RenderBlock.cpp:
523         (WebCore::RenderBlock::clearFloatsIfNeeded): Changed to use logicalTop() and logicalHeight()
524         instead of y() and height().
525
526 2012-07-02  Arko Saha  <arko@motorola.com>
527
528         Microdata: Fix build failure after r121580.
529         https://bugs.webkit.org/show_bug.cgi?id=90378
530
531         Reviewed by Ryosuke Niwa.
532
533         * html/HTMLElement.cpp:
534         (WebCore::HTMLElement::properties):
535         * html/HTMLElement.h:
536
537 2012-07-02  Tommy Widenflycht  <tommyw@google.com>
538
539         MediaStream API: Update MediaStreamTrackList to match the specification
540         https://bugs.webkit.org/show_bug.cgi?id=90171
541
542         Reviewed by Adam Barth.
543
544         The latest update to the specification added add and remove methods with corresponding callbacks.
545         The callbacks can be triggered both from JS and from the platform layer.
546
547         Test: fast/mediastream/MediaStreamTrackList.html
548
549         * CMakeLists.txt:
550         * GNUmakefile.list.am:
551         * Modules/mediastream/MediaStream.cpp:
552         (WebCore::MediaStream::MediaStream):
553         (WebCore::MediaStream::~MediaStream):
554         (WebCore::MediaStream::streamEnded):
555         (WebCore::MediaStream::addTrack):
556         (WebCore):
557         (WebCore::MediaStream::removeTrack):
558         * Modules/mediastream/MediaStream.h:
559         (MediaStream):
560         * Modules/mediastream/MediaStreamTrackEvent.cpp: Copied from Source/WebCore/Modules/mediastream/MediaStreamTrackList.cpp.
561         (WebCore):
562         (WebCore::MediaStreamTrackEvent::create):
563         (WebCore::MediaStreamTrackEvent::MediaStreamTrackEvent):
564         (WebCore::MediaStreamTrackEvent::~MediaStreamTrackEvent):
565         (WebCore::MediaStreamTrackEvent::track):
566         (WebCore::MediaStreamTrackEvent::interfaceName):
567         * Modules/mediastream/MediaStreamTrackEvent.h: Copied from Source/WebCore/Modules/mediastream/MediaStreamTrackList.h.
568         (WebCore):
569         (MediaStreamTrackEvent):
570         * Modules/mediastream/MediaStreamTrackEvent.idl: Copied from Source/WebCore/Modules/mediastream/MediaStreamTrackList.idl.
571         * Modules/mediastream/MediaStreamTrackList.cpp:
572         (WebCore::MediaStreamTrackList::create):
573         (WebCore::MediaStreamTrackList::MediaStreamTrackList):
574         (WebCore::MediaStreamTrackList::detachOwner):
575         (WebCore):
576         (WebCore::MediaStreamTrackList::add):
577         (WebCore::MediaStreamTrackList::remove):
578         (WebCore::MediaStreamTrackList::stop):
579         (WebCore::MediaStreamTrackList::interfaceName):
580         (WebCore::MediaStreamTrackList::scriptExecutionContext):
581         (WebCore::MediaStreamTrackList::eventTargetData):
582         (WebCore::MediaStreamTrackList::ensureEventTargetData):
583         * Modules/mediastream/MediaStreamTrackList.h:
584         (MediaStreamTrackList):
585         * Modules/mediastream/MediaStreamTrackList.idl:
586         * WebCore.gypi:
587         * dom/EventNames.h:
588         (WebCore):
589         * dom/EventNames.in:
590         * dom/EventTargetFactory.in:
591         * platform/mediastream/MediaStreamCenter.cpp:
592         (WebCore::MediaStreamCenter::addMediaStreamTrack):
593         (WebCore):
594         (WebCore::MediaStreamCenter::removeMediaStreamTrack):
595         * platform/mediastream/MediaStreamCenter.h:
596         (MediaStreamCenter):
597         * platform/mediastream/MediaStreamDescriptor.h:
598         (MediaStreamDescriptorOwner):
599         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
600         (WebCore::MediaStreamCenterChromium::didAddMediaStreamTrack):
601         (WebCore):
602         (WebCore::MediaStreamCenterChromium::didRemoveMediaStreamTrack):
603         (WebCore::MediaStreamCenterChromium::addMediaStreamTrack):
604         (WebCore::MediaStreamCenterChromium::removeMediaStreamTrack):
605         * platform/mediastream/chromium/MediaStreamCenterChromium.h:
606         (WebKit):
607         (MediaStreamCenterChromium):
608         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:
609         (WebCore::MediaStreamCenterGStreamer::didAddMediaStreamTrack):
610         (WebCore):
611         (WebCore::MediaStreamCenterGStreamer::didRemoveMediaStreamTrack):
612         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h:
613         (MediaStreamCenterGStreamer):
614
615 2012-07-02  Andrey Kosyakov  <caseq@chromium.org>
616
617         Web Inspector: incorrect height of main timeline pane after switching to memory mode
618         https://bugs.webkit.org/show_bug.cgi?id=90387
619
620         Reviewed by Pavel Feldman.
621
622         - update cached container height when setting vertical splitter position.
623
624         * inspector/front-end/TimelinePanel.js:
625         (WebInspector.TimelinePanel.prototype.set _setSplitterPosition):
626
627 2012-07-02  Christophe Dumez  <christophe.dumez@intel.com>
628
629         [MICRODATA] Build failure in html/HTMLPropertiesCollection.h
630         https://bugs.webkit.org/show_bug.cgi?id=90379
631
632         Reviewed by Ryosuke Niwa.
633
634         Switch HTMLCollection::append() visibility from private
635         to protected so that HTMLPropertiesCollection subclass
636         can call it. This fixes build when MICRODATA flag is
637         turned on.
638
639         No new tests, build fix.
640
641         * html/HTMLCollection.h:
642         (HTMLCollectionCacheBase):
643
644 2012-07-02  Kwang Yul Seo  <skyul@company100.net>
645
646         A start "body" tag in the "in body" insertion mode is a parse error
647         https://bugs.webkit.org/show_bug.cgi?id=90373
648
649         Reviewed by Eric Seidel.
650
651         According to HTML5 specification (http://www.w3.org/TR/html5/tree-construction.html#parsing-main-inbody),
652         a start "body" tag in the "in body" insertion mode is a parse error. So parseError(token) is required here.
653         No behavior change because parseError(token) is just a marker.
654
655         * html/parser/HTMLTreeBuilder.cpp:
656         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
657
658 2012-07-02  Raphael Kubo da Costa  <rakuco@webkit.org>
659
660         [EFL] Unreviewed build fix with ENABLE_NETSCAPE_PLUGIN_API after r121467.
661
662         * plugins/efl/PluginPackageEfl.cpp:
663         (WebCore::PluginPackage::load): Move the declaration of `err'
664         before the first `goto' statement.
665
666 2012-07-02  Alexei Filippov  <alexeif@chromium.org>
667
668         Web Inspector: replace recursion with a stack in DOM nodes snapshot traversal.
669         https://bugs.webkit.org/show_bug.cgi?id=89889
670
671         Number of DOM nodes native snapshots can handle was limited
672         by the process stack size because of recursion used to traverse the nodes.
673         The patch changes the recursion to a stack based algorithm.
674
675         Reviewed by Yury Semikhatsky.
676
677         * dom/MemoryInstrumentation.h:
678         (MemoryInstrumentation):
679         (InstrumentedPointerBase):
680         (WebCore::MemoryInstrumentation::InstrumentedPointerBase::~InstrumentedPointerBase):
681         (InstrumentedPointer):
682         (WebCore::MemoryInstrumentation::InstrumentedPointer::InstrumentedPointer):
683         (WebCore::MemoryInstrumentation::reportInstrumentedPointer):
684         (WebCore):
685         (WebCore::::process):
686         * inspector/InspectorMemoryAgent.cpp:
687         (WebCore):
688
689 2012-07-02  Taiju Tsuiki  <tzik@chromium.org>
690
691         Web Inspector: Add requestFileContent command and fileContentReceived event
692         https://bugs.webkit.org/show_bug.cgi?id=89642
693
694         Reviewed by Vsevolod Vlasov.
695
696         Test: http/tests/inspector/filesystem/read-file.html
697
698         * inspector/Inspector.json:
699         * inspector/InspectorFileSystemAgent.cpp:
700         (WebCore):
701         (WebCore::InspectorFileSystemAgent::requestFileContent):
702         * inspector/InspectorFileSystemAgent.h:
703         (InspectorFileSystemAgent):
704         * inspector/front-end/FileSystemModel.js:
705         (WebInspector.FileSystemModel.prototype.requestMetadata):
706         (WebInspector.FileSystemModel.prototype.requestFileContent):
707         (WebInspector.FileSystemModel.File.prototype.get resourceType):
708         (WebInspector.FileSystemModel.File.prototype.requestFileContent):
709         (WebInspector.FileSystemRequestManager):
710         (WebInspector.FileSystemRequestManager.prototype._metadataReceived):
711         (WebInspector.FileSystemRequestManager.prototype.requestFileContent.requestAccepted):
712         (WebInspector.FileSystemRequestManager.prototype.requestFileContent):
713         (WebInspector.FileSystemRequestManager.prototype._fileContentReceived):
714         (WebInspector.FileSystemDispatcher.prototype.metadataReceived):
715         (WebInspector.FileSystemDispatcher.prototype.fileContentReceived):
716
717 2012-07-02  Taiju Tsuiki  <tzik@chromium.org>
718
719         Web Inspector: Add refresh button to FileSystemView status bar
720         https://bugs.webkit.org/show_bug.cgi?id=90244
721
722         Reviewed by Vsevolod Vlasov.
723
724         * inspector/front-end/FileSystemView.js:
725         (WebInspector.FileSystemView):
726         (WebInspector.FileSystemView.prototype.get statusBarItems):
727         (WebInspector.FileSystemView.prototype.showView):
728         (WebInspector.FileSystemView.prototype._refresh):
729         (WebInspector.FileSystemView.EntryTreeElement.prototype._directoryContentReceived):
730
731 2012-06-22  Vsevolod Vlasov  <vsevik@chromium.org>
732
733         Web Inspector: Implement snippets evaluation.
734         https://bugs.webkit.org/show_bug.cgi?id=88707
735
736         Reviewed by Pavel Feldman.
737
738         Implemented snippet evaluation and adjusted breakpoints behavior when editing snippet.
739         Snippets are evaluated using separate compile and run.
740         Breakpoints are updated after compilation (once scriptId is available they can be set in debugger).
741         If separate compile and run is not supported by port or debugger is paused we fall back to evaluation in console.
742
743         * inspector/front-end/ConsoleView.js:
744         (WebInspector.ConsoleView.prototype.runScript.runCallback):
745         (WebInspector.ConsoleView.prototype.runScript):
746         (WebInspector.ConsoleView.prototype._printResult):
747         * inspector/front-end/JavaScriptSource.js:
748         (WebInspector.JavaScriptSource.prototype.supportsEnabledBreakpointsWhileEditing):
749         * inspector/front-end/JavaScriptSourceFrame.js:
750         (WebInspector.JavaScriptSourceFrame.prototype.afterTextChanged):
751         (WebInspector.JavaScriptSourceFrame.prototype.beforeTextChanged):
752         (WebInspector.JavaScriptSourceFrame.prototype._didEditContent):
753         (WebInspector.JavaScriptSourceFrame.prototype._removeBreakpointsBeforeEditing):
754         (WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing):
755         (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration):
756         (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
757         * inspector/front-end/ScriptSnippetModel.js:
758         (WebInspector.ScriptSnippetModel.prototype.deleteScriptSnippet):
759         (WebInspector.ScriptSnippetModel.prototype._setScriptSnippetContent):
760         (WebInspector.ScriptSnippetModel.prototype.evaluateScriptSnippet.compileCallback):
761         (WebInspector.ScriptSnippetModel.prototype.evaluateScriptSnippet):
762         (WebInspector.ScriptSnippetModel.prototype._rawLocationToUILocation):
763         (WebInspector.ScriptSnippetModel.prototype._removeBreakpoints):
764         (WebInspector.ScriptSnippetModel.prototype._restoreBreakpoints):
765         (WebInspector.ScriptSnippetModel.prototype._evaluationSourceURL):
766         (WebInspector.SnippetJavaScriptSource.prototype.isDivergedFromVM):
767         (WebInspector.SnippetJavaScriptSource.prototype.workingCopyCommitted):
768         (WebInspector.SnippetJavaScriptSource.prototype.workingCopyChanged):
769         (WebInspector.SnippetJavaScriptSource.prototype.evaluate):
770         (WebInspector.SnippetJavaScriptSource.prototype.supportsEnabledBreakpointsWhileEditing):
771         (WebInspector.SnippetJavaScriptSource.prototype.breakpointStorageId):
772         * inspector/front-end/ScriptsNavigator.js:
773         (WebInspector.SnippetsNavigatorView.prototype._handleEvaluateSnippet):
774
775 2012-06-26  Vsevolod Vlasov  <vsevik@chromium.org>
776
777         Web Inspector: StyleSource should set content using CSSStyleModelResourceBinding directly.
778         https://bugs.webkit.org/show_bug.cgi?id=89891
779
780         Reviewed by Pavel Feldman.
781
782         StyleSource now calls CSS resource binding directly.
783         CSS resource binding now adds resource revision only after setStyleSheetText call returns from backend.
784         Resource.revertAndClearHistory is now clearing history asynchronously
785         since Resource.setContent adds revision that should be removed as well.
786
787         * inspector/front-end/CSSStyleModel.js:
788         (WebInspector.CSSStyleModel.prototype.getViaInspectorResourceForRule):
789         (WebInspector.CSSStyleModel.prototype.resourceBinding):
790         (WebInspector.CSSStyleModelResourceBinding.prototype.setStyleContent.innerCallback):
791         (WebInspector.CSSStyleModelResourceBinding.prototype.setStyleContent):
792         (WebInspector.CSSStyleModelResourceBinding.prototype.setContent):
793         * inspector/front-end/Resource.js:
794         (WebInspector.Resource.prototype.revertAndClearHistory):
795         (WebInspector.Resource.prototype.revertAndClearHistory.clearHistory):
796         * inspector/front-end/RevisionHistoryView.js:
797         (WebInspector.RevisionHistoryView.prototype._createResourceItem):
798         * inspector/front-end/StylesPanel.js:
799         (WebInspector.StyleSource.prototype.workingCopyCommitted):
800         (WebInspector.StyleSource.prototype.workingCopyChanged):
801
802 2012-07-02  Taiju Tsuiki  <tzik@chromium.org>
803
804         Web Inspector: Add DirectoryContentView for FileSystemView
805         https://bugs.webkit.org/show_bug.cgi?id=89961
806
807         Reviewed by Vsevolod Vlasov.
808
809         * WebCore.gypi:
810         * WebCore.vcproj/WebCore.vcproj:
811         * inspector/compile-front-end.py:
812         * inspector/front-end/DirectoryContentView.js: Added.
813         * inspector/front-end/FileSystemView.js:
814         (WebInspector.FileSystemView):
815         (WebInspector.FileSystemView.EntryTreeElement.prototype.onattach):
816         (WebInspector.FileSystemView.EntryTreeElement.prototype.onselect):
817         (WebInspector.FileSystemView.EntryTreeElement.prototype._directoryContentReceived):
818         * inspector/front-end/WebKit.qrc:
819         * inspector/front-end/inspector.html:
820
821 2012-07-02  Christophe Dumez  <christophe.dumez@intel.com>
822
823         [EFL] Fix compilation error in GamepadsEfl.cpp in debug mode
824         https://bugs.webkit.org/show_bug.cgi?id=90369
825
826         Unreviewed, EFL build fix.
827
828         * platform/efl/GamepadsEfl.cpp:
829         (WebCore::GamepadsEfl::registerDevice):
830         (WebCore::GamepadsEfl::unregisterDevice):
831
832 2012-07-02  Nikita Vasilyev  <me@elv1s.ru>
833
834         Web Inspector: Design WebSockets panel
835         https://bugs.webkit.org/show_bug.cgi?id=89461
836
837         Use DataGrid to display the data.
838         Put "Data" column first. Make it wider.
839         Remove "Mask" column since it appears to be always true for outgoing frames,
840         and false for incoming.
841
842         Reviewed by Pavel Feldman.
843
844         * English.lproj/localizedStrings.js:
845         * inspector/front-end/NetworkItemView.js:
846         (WebInspector.NetworkItemView): Don't show Preview, Response, Cookies
847         and Timing tabs for succefuly established WebSocket connection.
848
849         * inspector/front-end/ResourceWebSocketFrameView.js:
850         (WebInspector.ResourceWebSocketFrameView):
851         * inspector/front-end/networkPanel.css:
852         (.resource-websocket):
853         (.resource-websocket, .resource-websocket .data-grid):
854         (.resource-websocket .data-grid .data):
855         (.resource-websocket td):
856         (.resource-websocket .data-column div):
857         (.resource-websocket-row-outcoming):
858         (.resource-websocket-row-outcoming:not(.selected) td):
859         (.resource-websocket-row-outcoming:not(.selected) td, .resource-websocket-row-outcoming:not(.selected) + tr td):
860         (.resource-websocket-row-opcode):
861         (.resource-websocket-row-opcode td):
862         (.resource-websocket-row-opcode td, .resource-websocket-row-opcode + tr td):
863         (.resource-websocket-row-error):
864
865 2012-07-02  Vineet Chaudhary  <rgf748@motorola.com>
866
867         [V8Binding] Merging v8NumberArray()/v8NumberArrayToVector() to v8Array()/toNativeArray() respectively.
868         https://bugs.webkit.org/show_bug.cgi?id=90338
869
870         Reviewed by Kentaro Hara.
871
872         We can remove v8NumberArray() and v8NumberArrayToVector() implementaion
873         merging them to current v8Array() and toNativeArray() traits.
874
875         Tests: TestObj.idl
876         Shouldn't cause any behavioural changes.
877
878         * bindings/scripts/CodeGeneratorV8.pm: Removed float[]/double[] specific binding code.
879         (IsRefPtrType):
880         (GetNativeType):
881         (JSValueToNative):
882         (NativeToJSValue):
883         * bindings/scripts/test/V8/V8TestObj.cpp: Rebased binding test.
884         (WebCore::TestObjV8Internal::floatArrayAttrGetter):
885         (WebCore::TestObjV8Internal::floatArrayAttrSetter):
886         (WebCore::TestObjV8Internal::doubleArrayAttrGetter):
887         (WebCore::TestObjV8Internal::doubleArrayAttrSetter):
888         * bindings/v8/V8Binding.h: Added templates for float and double.
889         (WebCore::v8Array):
890         (WebCore::toNativeArray):
891
892 2012-07-02  Konrad Piascik  <kpiascik@rim.com>
893
894         [EFL] [GTK] [QT] fast/viewport/viewport-91.html is failing after r121555
895         https://bugs.webkit.org/show_bug.cgi?id=90286
896
897         Reviewed by Daniel Bates.
898
899         Since the deprecatedTargetDPI was an int and the deviceDPI was also an int the result
900         was truncated.  Changed deprecatedTargetDPI to a float value. Viewport test 91 now passes.
901
902         * dom/ViewportArguments.h:
903         (ViewportArguments):
904
905 2012-06-28  Yury Semikhatsky  <yurys@chromium.org>
906
907         Web Inspector: add v8 bindings memory info to the native memory graph
908         https://bugs.webkit.org/show_bug.cgi?id=90149
909
910         Reviewed by Pavel Feldman.
911
912         Size of V8 binding maps is now reported on the memory chart.
913
914         * bindings/js/ScriptProfiler.h:
915         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
916         * bindings/v8/DOMDataStore.cpp:
917         (WebCore::DOMDataStore::reportMemoryUsage):
918         (WebCore):
919         * bindings/v8/DOMDataStore.h:
920         (WebCore):
921         (DOMDataStore):
922         * bindings/v8/IntrusiveDOMWrapperMap.h:
923         (WebCore::ChunkedTable::reportMemoryUsage):
924         (ChunkedTable):
925         * bindings/v8/ScriptProfiler.cpp:
926         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
927         (WebCore):
928         * bindings/v8/ScriptProfiler.h:
929         (WebCore):
930         (ScriptProfiler):
931         * bindings/v8/V8Binding.cpp:
932         (WebCore::V8BindingPerIsolateData::reportMemoryUsage):
933         (WebCore):
934         (WebCore::StringCache::reportMemoryUsage):
935         * bindings/v8/V8Binding.h:
936         (WebCore):
937         (StringCache):
938         (V8BindingPerIsolateData):
939         * bindings/v8/V8DOMMap.h:
940         (WebCore):
941         (AbstractWeakReferenceMap):
942         * dom/MemoryInstrumentation.h:
943         (MemoryInstrumentation):
944         (WebCore):
945         (WebCore::MemoryInstrumentation::reportHashMap): added a method for reporting
946         size of a HashMap.
947         * inspector/InspectorMemoryAgent.cpp:
948         (MemoryBlockName):
949         (WebCore):
950         (WebCore::domTreeInfo):
951
952 2012-07-01  Christophe Dumez  <christophe.dumez@intel.com>
953
954         [EFL] Add Gamepad support
955         https://bugs.webkit.org/show_bug.cgi?id=90170
956
957         Reviewed by Kenneth Rohde Christiansen.
958
959         Add support for the Gamepad feature on the EFL port.
960
961         The implementation of this class relies on the Linux
962         kernel joystick API.
963
964         Gamepad devices are recognized through the GamepadsEfl
965         class, of which implementation is based on Eeze
966         library. This way devices are properly registered on
967         connection as objects of the GamepadDeviceEfl class
968         which inherits GamepadDeviceLinux. GamepadDeviceEfl
969         reads the joystick data through an Ecore_Fd_Handler
970         and updates the device state accordingly. The
971         GamepadsEfl object is then polled for gamepads data
972         through the sampleGamepads method.
973
974         No new tests - already tested by gamepad/*
975
976         * CMakeLists.txt:
977         * PlatformEfl.cmake:
978         * platform/efl/GamepadsEfl.cpp: Added.
979         (WebCore):
980         (GamepadDeviceEfl):
981         (WebCore::GamepadDeviceEfl::create):
982         (WebCore::GamepadDeviceEfl::GamepadDeviceEfl):
983         (WebCore::GamepadDeviceEfl::~GamepadDeviceEfl):
984         (WebCore::GamepadDeviceEfl::readCallback):
985         (GamepadsEfl):
986         (WebCore::GamepadsEfl::onGamePadChange):
987         (WebCore::GamepadsEfl::GamepadsEfl):
988         (WebCore::GamepadsEfl::~GamepadsEfl):
989         (WebCore::GamepadsEfl::registerDevice):
990         (WebCore::GamepadsEfl::unregisterDevice):
991         (WebCore::GamepadsEfl::updateGamepadList):
992         (WebCore::sampleGamepads):
993
994 2012-07-01  James Robinson  <jamesr@chromium.org>
995
996         Unreviewed, rolling out r121635.
997         http://trac.webkit.org/changeset/121635
998         https://bugs.webkit.org/show_bug.cgi?id=90286
999
1000         Breaks compile on clang error: in-class initializer for static
1001         data member of type 'const float' is a GNU extension
1002         [-Werror,-Wgnu]
1003
1004         * dom/ViewportArguments.h:
1005         (ViewportArguments):
1006
1007 2012-07-01  Timothy Hatcher  <timothy@apple.com>
1008
1009         Make the "Inspect Element" context menu item appear in nightly builds again.
1010
1011         rdar://problem/11702613
1012         https://webkit.org/b/89323
1013
1014         Reviewed by Dan Bernstein.
1015
1016         * platform/ContextMenuItem.h:
1017         Fix the order of the ContextMenuAction enum to be binary compatible with
1018         older versions of WebKit.
1019
1020 2012-07-01  Dan Bernstein  <mitz@apple.com>
1021
1022         <rdar://problem/11785743> [mac] Non-BMP characters in vertical text appear as missing glyphs
1023         https://bugs.webkit.org/show_bug.cgi?id=90349
1024
1025         Reviewed by Dean Jackson.
1026
1027         Test: platform/mac/fast/text/vertical-surrogate-pair.html
1028
1029         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
1030         (WebCore::GlyphPage::fill): When calling wkGetVerticalGlyphsForCharacters or
1031         CTFontGetGlyphsForCharacters with a buffer consisting of surrogate pair, account for those
1032         functions’ behavior of placing glyphs at indices corresponding to the first character of
1033         each pair.
1034
1035 2012-07-01  Kenichi Ishibashi  <bashi@chromium.org>
1036
1037         Arabic shaping is incorrect if ZWNJ exist
1038         https://bugs.webkit.org/show_bug.cgi?id=89843
1039
1040         Reviewed by Dan Bernstein.
1041
1042         mac port treats ZWJ (zero-width-joiner) and ZWNJ (zero-width-non-joiner) as a part of combining
1043         character sequence. This could cause a problem when the font doesn't have glyph mapping of ZWJ and ZWNJ.
1044         Suppose the text to be rendered is "U+0645(MEEM) U+06CC(FARSI YEH) U+200C(ZWNJ)". In this case, U+0645
1045         and U+06CC are rendered in isolated form if the font doesn't have a glyph for ZWNJ. They should be joined.
1046
1047         This patch changes handling of ZWJ and ZWNJ. Treats ZWJ and ZWNJ as base characters so that a complex text
1048         run isn't separate at the point of ZWJ and ZWNJ even the font doesn't contain glyphs for them.
1049         If ComplexTextController finds ZWJ, it doesn't split the current complex text run.
1050
1051         Test: platform/mac/fast/text/arabic-zwj-and-zwnj.html
1052
1053         * platform/graphics/mac/ComplexTextController.cpp:
1054         (WebCore::advanceByCombiningCharacterSequence): Don't treat ZWJ and ZWNJ as a part of combining character sequence.
1055         (WebCore::ComplexTextController::collectComplexTextRuns): Set fontData to nextFontData if the baseCharacter is ZWJ.
1056
1057 2012-07-01  Konrad Piascik  <kpiascik@rim.com>
1058
1059         [EFL] [GTK] [QT] fast/viewport/viewport-91.html is failing after r121555
1060         https://bugs.webkit.org/show_bug.cgi?id=90286
1061
1062         Reviewed by Daniel Bates.
1063
1064         Since the deprecatedTargetDPI was an int and the deviceDPI was also an int the result
1065         was truncated.  Changed deprecatedTargetDPI to a float value. Viewport test 91 now passes.
1066
1067         * dom/ViewportArguments.h:
1068         (ViewportArguments):
1069
1070 2012-06-30  Ian Vollick  <vollick@chromium.org>
1071
1072         [chromium] CanvasLayerTextureUpdater needs to convert opaque rects back to content space.
1073         https://bugs.webkit.org/show_bug.cgi?id=90092
1074
1075         The CanvasLayerTextureUpdater currently receives its opaque rects in
1076         layer space, but is expected to return them in content space and does
1077         not convert them. This patch adds this conversion. To avoid numerical
1078         errors, this patch also switches to using float rects to store opaque
1079         rects where appropriate.
1080
1081         Reviewed by Adrienne Walker.
1082
1083         Unit test: ContentLayerTest.ContentLayerPainterWithDeviceScale
1084
1085         * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
1086         (WebCore::CanvasLayerTextureUpdater::paintContents):
1087         * platform/graphics/chromium/ContentLayerChromium.cpp:
1088         (WebCore::ContentLayerPainter::ContentLayerPainter):
1089         (WebCore::ContentLayerPainter::create):
1090         (WebCore::ContentLayerPainter::paint):
1091         * platform/graphics/chromium/ContentLayerChromium.h:
1092         (WebCore):
1093         (ContentLayerDelegate):
1094         (ContentLayerPainter):
1095         * platform/graphics/chromium/LayerPainterChromium.h:
1096         (WebCore):
1097         (LayerPainterChromium):
1098         * platform/graphics/chromium/LinkHighlight.cpp:
1099         (WebCore::LinkHighlight::paintContents):
1100         * platform/graphics/chromium/LinkHighlight.h:
1101         (LinkHighlight):
1102         * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp:
1103         (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents):
1104         * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.h:
1105         (OpaqueRectTrackingContentLayerDelegate):
1106         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
1107
1108 2012-06-30  Kwang Yul Seo  <skyul@company100.net>
1109
1110         Unreviewed. Remove unused declaration.
1111         HTMLDocumentParser::begin() has no method definition.
1112
1113         * html/parser/HTMLDocumentParser.h:
1114
1115 2012-06-29  No'am Rosenthal  <noam.rosenthal@nokia.com>
1116
1117         Unreviewed, rolling out r121569.
1118         http://trac.webkit.org/changeset/121569
1119         https://bugs.webkit.org/show_bug.cgi?id=90082
1120
1121         It broke a couple of tests in Qt Linux Release
1122
1123         * platform/graphics/qt/GraphicsContextQt.cpp:
1124         (WebCore::GraphicsContext::fillRect):
1125
1126 2012-06-29  Simon Fraser  <simon.fraser@apple.com>
1127
1128         updateDescendantDependentFlags() is inside #if USE(ACCELERATED_COMPOSITING)
1129         https://bugs.webkit.org/show_bug.cgi?id=90245
1130
1131         Reviewed by Dan Bernstein.
1132
1133         updateDescendantDependentFlags() and updateTransform() should be
1134         outside the USE(ACCELERATED_COMPOSITING) #ifdef. They do work
1135         that is needed even if accelerated compositing is disabled.
1136
1137         * rendering/RenderLayer.cpp:
1138         (WebCore::RenderLayer::styleChanged):
1139
1140 2012-06-29  Erik Arvidsson  <arv@chromium.org>
1141
1142         [V8] HTMLCollection wrappers are not retained
1143         https://bugs.webkit.org/show_bug.cgi?id=90208
1144
1145         Reviewed by Adam Barth.
1146
1147         Generate visitDOMWrapper for HTMLCollection and HTMLAllCollection so that we add an implicit reference from the owner
1148         to the collection.
1149
1150         Tests: fast/dom/htmlallcollection-reachable.html
1151                fast/dom/htmlcollection-reachable.html
1152
1153         * bindings/scripts/CodeGeneratorJS.pm:
1154         (GenerateImplementation): Instead of hard coding to use base() for HTMLAllCollection and HTMLCollection we now
1155         annotate the IDL file to use GenerateIsReachable=ImplBaseRoot.
1156         * bindings/scripts/CodeGeneratorV8.pm:
1157         (GenerateVisitDOMWrapper): Generate visitDOMWrapper if GenerateIsReachable is ImplBaseRoot.
1158         * bindings/scripts/IDLAttributes.txt: Added ImplBaseRoot.
1159         * html/HTMLAllCollection.idl: Added annotations.
1160         * html/HTMLCollection.idl: Ditto.
1161
1162 2012-06-29  Tony Chang  <tony@chromium.org>
1163
1164         All child elements of a flex container should be turned into a flex item
1165         https://bugs.webkit.org/show_bug.cgi?id=90323
1166
1167         Reviewed by Ojan Vafai.
1168
1169         We used to only convert some elements to blocks, but now we convert everything except text nodes.
1170         This was recently changed here:
1171         http://wiki.csswg.org/topics/css3-flexbox-flexbox-replaced-children
1172
1173         Tests: css3/flexbox/anonymous-block.html : Add new test case.
1174                css3/flexbox/flexitem.html: Update results.
1175
1176         * css/StyleResolver.cpp:
1177         (WebCore::StyleResolver::collectMatchingRulesForList):
1178
1179 2012-06-29  Joshua Bell  <jsbell@chromium.org>
1180
1181         IndexedDB: Keep direction on IDBCursor to avoid calls to back end
1182         https://bugs.webkit.org/show_bug.cgi?id=90114
1183
1184         Reviewed by Tony Chang.
1185
1186         Let IDBCursor handle direction() accessor locally, without a call to
1187         the IDBCursorBackendImpl which (in some ports) may reside in a different
1188         process. Not a heavily called function, but further reduces the surface
1189         area exposed by the XXXInterface classes.
1190
1191         No new tests - no functional changes.
1192
1193         * Modules/indexeddb/IDBCursor.cpp:
1194         (WebCore::IDBCursor::create): Accept direction, known at creation time.
1195         (WebCore::IDBCursor::IDBCursor): Stash in member.
1196         (WebCore::IDBCursor::direction): Use local copy
1197         (WebCore::IDBCursor::stringToDirection): Return enum value, not int.
1198         * Modules/indexeddb/IDBCursor.h:
1199         (IDBCursor):
1200         * Modules/indexeddb/IDBCursorBackendImpl.cpp: Remove accessor.
1201         * Modules/indexeddb/IDBCursorBackendImpl.h:
1202         (IDBCursorBackendImpl):
1203         * Modules/indexeddb/IDBCursorBackendInterface.h: Remove accessor.
1204         * Modules/indexeddb/IDBCursorWithValue.cpp:
1205         (WebCore::IDBCursorWithValue::create):
1206         (WebCore::IDBCursorWithValue::IDBCursorWithValue):
1207         * Modules/indexeddb/IDBCursorWithValue.h:
1208         (IDBCursorWithValue):
1209         * Modules/indexeddb/IDBIndex.cpp: Prep IDBRequest with cursor direction too.
1210         (WebCore::IDBIndex::openCursor):
1211         (WebCore::IDBIndex::openKeyCursor):
1212         * Modules/indexeddb/IDBObjectStore.cpp: Ditto.
1213         (WebCore::IDBObjectStore::openCursor):
1214         * Modules/indexeddb/IDBRequest.cpp: Stash direction for pending cursor too.
1215         (WebCore::IDBRequest::IDBRequest):
1216         (WebCore::IDBRequest::setCursorDetails):
1217         (WebCore::IDBRequest::onSuccess): Apply stashed direction to new cursor.
1218         * Modules/indexeddb/IDBRequest.h:
1219         (IDBRequest):
1220
1221 2012-06-29  Tony Chang  <tony@chromium.org>
1222
1223         Allow align-self: stretch to cause the item size to shrink below its intrinsic size
1224         https://bugs.webkit.org/show_bug.cgi?id=90304
1225
1226         Reviewed by Ojan Vafai.
1227
1228         The spec used to say that stretch could only make items grow, but now
1229         it allows items to shrink.
1230         http://dev.w3.org/csswg/css3-flexbox/#align-items-stretch
1231
1232         Tests: css3/flexbox/flex-align-stretch.html Updated expectations.
1233                css3/flexbox/child-overflow.html Updated expectations.
1234
1235         * rendering/RenderFlexibleBox.cpp:
1236         (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
1237
1238 2012-06-29  James Weatherall  <wez@chromium.org>
1239
1240         NPObjectWrapper may not address all window script object lifetime issues
1241         https://bugs.webkit.org/show_bug.cgi?id=85679
1242
1243         The ScriptController implementations force-deallocate the window script object to ensure that DOM objects are not leaked if an NPAPI plugin fails to release a reference to it before being destroyed. The NPObjectWrapper was added to ensure that NPAPI scripting could not touch the real window script object after it had been deallocated, by providing the plugin with a small wrapper which will leak if the plugin fails to dereference it.
1244
1245         This patch removes NPObjectWrapper and instead drops the window script NPObject's reference to the underlying V8Object in ScriptController::clearScriptObjects(). If a plugin fails to dereference the object then the NPV8Object wrapper will be leaked but the DOM objects it references will not.
1246
1247         Reviewed by Nate Chapin.
1248
1249         Test: plugins/npruntime/leak-window-scriptable-object.html
1250
1251         * WebCore.gypi:
1252         * bindings/v8/NPObjectWrapper.cpp: Removed.
1253         * bindings/v8/NPObjectWrapper.h: Removed.
1254         * bindings/v8/NPV8Object.cpp:
1255         (WebCore::disposeUnderlyingV8Object):
1256         (WebCore):
1257         (WebCore::freeV8NPObject):
1258         (_NPN_Invoke):
1259         (_NPN_InvokeDefault):
1260         (_NPN_EvaluateHelper):
1261         (_NPN_GetProperty):
1262         (_NPN_SetProperty):
1263         (_NPN_RemoveProperty):
1264         (_NPN_HasProperty):
1265         (_NPN_HasMethod):
1266         (_NPN_Enumerate):
1267         (_NPN_Construct):
1268         * bindings/v8/NPV8Object.h:
1269         (WebCore):
1270         * bindings/v8/ScriptController.cpp:
1271         (WebCore::ScriptController::ScriptController):
1272         (WebCore::ScriptController::clearScriptObjects):
1273         (WebCore::ScriptController::windowScriptNPObject):
1274         * bindings/v8/ScriptController.h:
1275         (ScriptController):
1276
1277 2012-06-29  Adam Barth  <abarth@webkit.org>
1278
1279         Update complex fonts on Android to use fonts from a newer SDK
1280         https://bugs.webkit.org/show_bug.cgi?id=90296
1281
1282         Reviewed by Nate Chapin.
1283
1284         These fonts are available in the Jelly Bean SDK.
1285
1286         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
1287         (WebCore::ComplexTextController::ComplexTextController):
1288         (WebCore::ComplexTextController::getComplexFontPlatformData):
1289
1290 2012-06-29  Ryosuke Niwa  <rniwa@webkit.org>
1291
1292         HTMLCollection's caches should be owned by either ElementRareData or Document
1293         https://bugs.webkit.org/show_bug.cgi?id=90322
1294
1295         Reviewed by Anders Carlsson.
1296
1297         Removed all instances of OwnPtr<HTMLCollection> except ones on ElementRareData and Document.
1298         ElementRareData::ensureCachedHTMLCollection then polymorphically creates HTMLCollection or
1299         its subclass as deemed necessary.
1300
1301         This refactoring allows us to move HTMLCollection to use the same invalidation model as
1302         DynamicNodeList (invalidated during DOM mutations) in a follow up.
1303
1304         * dom/Document.cpp:
1305         (WebCore::Document::all):
1306         * dom/Document.h:
1307         (Document):
1308         * dom/Element.cpp:
1309         (WebCore::ElementRareData::ensureCachedHTMLCollection):
1310         (WebCore):
1311         (WebCore::Element::cachedHTMLCollection):
1312         * dom/Element.h:
1313         (Element):
1314         * dom/ElementRareData.h:
1315         (WebCore):
1316         (ElementRareData):
1317         (WebCore::ElementRareData::cachedHTMLCollection):
1318         * dom/Node.cpp:
1319         (WebCore):
1320         * dom/Node.h:
1321         (Node):
1322         * dom/NodeRareData.h:
1323         (WebCore::NodeRareData::setItemType):
1324         (NodeRareData):
1325         * html/CollectionType.h:
1326         * html/HTMLCollection.cpp:
1327         (WebCore::shouldIncludeChildren):
1328         (WebCore::HTMLCollection::isAcceptableElement):
1329         * html/HTMLElement.cpp:
1330         (WebCore):
1331         (WebCore::HTMLElement::properties):
1332         * html/HTMLElement.h:
1333         (HTMLElement):
1334         * html/HTMLFieldSetElement.cpp:
1335         (WebCore::HTMLFieldSetElement::elements):
1336         * html/HTMLFieldSetElement.h:
1337         (HTMLFieldSetElement):
1338         * html/HTMLFormCollection.cpp:
1339         (WebCore::HTMLFormCollection::HTMLFormCollection):
1340         (WebCore::HTMLFormCollection::create):
1341         * html/HTMLFormCollection.h:
1342         (HTMLFormCollection):
1343         * html/HTMLFormElement.cpp:
1344         (WebCore::HTMLFormElement::elements):
1345         * html/HTMLFormElement.h:
1346         * html/HTMLOptionsCollection.cpp:
1347         (WebCore::HTMLOptionsCollection::HTMLOptionsCollection):
1348         (WebCore::HTMLOptionsCollection::create):
1349         * html/HTMLOptionsCollection.h:
1350         (HTMLOptionsCollection):
1351         * html/HTMLSelectElement.cpp:
1352         (WebCore::HTMLSelectElement::selectedOptions):
1353         (WebCore::HTMLSelectElement::options):
1354         (WebCore::HTMLSelectElement::invalidateSelectedItems):
1355         (WebCore::HTMLSelectElement::setRecalcListItems):
1356         * html/HTMLSelectElement.h:
1357         * html/HTMLTableElement.cpp:
1358         (WebCore::HTMLTableElement::rows):
1359         * html/HTMLTableElement.h:
1360         * html/HTMLTableRowsCollection.cpp:
1361         (WebCore::HTMLTableRowsCollection::HTMLTableRowsCollection):
1362         (WebCore::HTMLTableRowsCollection::create):
1363         * html/HTMLTableRowsCollection.h:
1364         (HTMLTableRowsCollection):
1365
1366 2012-06-29  Ojan Vafai  <ojan@chromium.org>
1367
1368         Add FIXMEs for vertical writing mode and override sizes.
1369         * rendering/RenderBox.cpp:
1370         (WebCore::RenderBox::overrideLogicalContentWidth):
1371         (WebCore::RenderBox::overrideLogicalContentHeight):
1372
1373 2012-06-29  James Robinson  <jamesr@chromium.org>
1374
1375         [chromium] Use CCThread::Task in compositor's RateLimiter instead of Timer
1376         https://bugs.webkit.org/show_bug.cgi?id=90300
1377
1378         Reviewed by Adrienne Walker.
1379
1380         * platform/graphics/chromium/RateLimiter.cpp:
1381         (RateLimiter::Task):
1382         (WebCore::RateLimiter::Task::create):
1383         (WebCore::RateLimiter::Task::~Task):
1384         (WebCore::RateLimiter::Task::Task):
1385         (WebCore):
1386         (WebCore::RateLimiter::RateLimiter):
1387         (WebCore::RateLimiter::start):
1388         (WebCore::RateLimiter::stop):
1389         (WebCore::RateLimiter::rateLimitContext):
1390         * platform/graphics/chromium/RateLimiter.h:
1391         (WebCore):
1392         (RateLimiter):
1393         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1394         (WebCore::CCLayerTreeHost::~CCLayerTreeHost):
1395
1396 2012-06-29  Tony Payne  <tpayne@chromium.org>
1397
1398         Remove type from screenColorProfile API
1399         https://bugs.webkit.org/show_bug.cgi?id=90299
1400
1401         Reviewed by Adam Barth.
1402
1403         Covered by existing tests.
1404
1405         * platform/PlatformScreen.h:
1406         (WebCore): Removed type from screenColorProfile().
1407         * platform/blackberry/PlatformScreenBlackBerry.cpp:
1408         (WebCore::screenColorProfile):
1409         * platform/chromium/PlatformScreenChromium.cpp:
1410         (WebCore::screenColorProfile):
1411         * platform/efl/PlatformScreenEfl.cpp:
1412         (WebCore::screenColorProfile):
1413         * platform/gtk/PlatformScreenGtk.cpp:
1414         (WebCore::screenColorProfile):
1415         * platform/image-decoders/ImageDecoder.h:
1416         (WebCore::ImageDecoder::qcmsOutputDeviceProfile): Updated call to
1417         screenColorProfile() to not pass type param.
1418         * platform/mac/PlatformScreenMac.mm:
1419         (WebCore::screenColorProfile):
1420         * platform/qt/PlatformScreenQt.cpp:
1421         (WebCore::screenColorProfile):
1422         * platform/win/PlatformScreenWin.cpp:
1423         (WebCore::screenColorProfile):
1424
1425 2012-06-29  Emil A Eklund  <eae@chromium.org>
1426
1427         Allow non-borders to be adjusted to less than 1 when zoomed out
1428         https://bugs.webkit.org/show_bug.cgi?id=90104
1429
1430         Reviewed by Eric Seidel.
1431
1432         Change CSSPrimitiveValue::computeLengthDouble to allow values to be
1433         adjusted to less than 1.0 when zoomed out. This avoids an off by one
1434         error for floats with margins when zoomed out that can cause floats to
1435         wrap and break pages.
1436
1437         The logic that prevents the value from being adjusted to less than 1 was
1438         added to ensure that borders are still painted even when zoomed out.
1439         By moving the logic to ApplyPropertyComputeLength::applyValue, which is
1440         used for borders and outlines, that functionality is preserved.
1441
1442         Test: fast/sub-pixel/float-with-margin-in-container.html
1443
1444         * css/CSSPrimitiveValue.cpp:
1445         (WebCore::CSSPrimitiveValue::computeLengthDouble):
1446         * css/StyleBuilder.cpp:
1447         (WebCore::ApplyPropertyComputeLength::applyValue):
1448
1449 2012-06-29  Ryosuke Niwa  <rniwa@webkit.org>
1450
1451         Let Xcode have its own way after r121513.
1452
1453         * WebCore.xcodeproj/project.pbxproj:
1454
1455 2012-06-29  Mihai Balan  <mibalan@adobe.com>
1456
1457         [CSS Regions] Adding feature defines for CSS Regions for Windows
1458         https://bugs.webkit.org/show_bug.cgi?id=88645
1459
1460         Reviewed by Tony Chang.
1461
1462         Re-trying to enable CSS regions on Windows. This time only enabling
1463         regions (not exclusions) because of some strange compilation/linking
1464         issues.
1465
1466         * css/CSSPropertyNames.in: Touched file to make sure property names get properly rebuilt.
1467
1468 2012-06-29  Hanna Ma  <Hanma@rim.com>
1469
1470         Web Inspector: Add data length to resource events on timeline to
1471         keep track of the amount of data loaded and the total data length
1472         https://bugs.webkit.org/show_bug.cgi?id=89244
1473
1474         Reviewed by Pavel Feldman.
1475
1476         Added data length to inspector timeline popup
1477         content for resources to keep track of the amount of data loaded.
1478         Tests: inspector/timeline/timeline-network-received-data.html
1479
1480         * English.lproj/localizedStrings.js:
1481         * inspector/InspectorInstrumentation.cpp:
1482         (WebCore::InspectorInstrumentation::willReceiveResourceDataImpl):
1483         * inspector/InspectorInstrumentation.h:
1484         (InspectorInstrumentation):
1485         (WebCore::InspectorInstrumentation::willReceiveResourceData):
1486         * inspector/InspectorTimelineAgent.cpp:
1487         (WebCore::InspectorTimelineAgent::willReceiveResourceData):
1488         * inspector/InspectorTimelineAgent.h:
1489         (InspectorTimelineAgent):
1490         * inspector/TimelineRecordFactory.cpp:
1491         (WebCore::TimelineRecordFactory::createReceiveResourceData):
1492         * inspector/TimelineRecordFactory.h:
1493         (TimelineRecordFactory):
1494         * inspector/front-end/TimelinePanel.js:
1495         (WebInspector.TimelinePanel.prototype._showPopover):
1496         * inspector/front-end/TimelinePresentationModel.js:
1497         (WebInspector.TimelinePresentationModel.prototype.reset):
1498         (WebInspector.TimelinePresentationModel.Record):
1499         (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):
1500         * loader/ResourceLoader.cpp:
1501         (WebCore::ResourceLoader::didReceiveData):
1502         * inspector/timeline/timeline-network-received-data.html: Added.
1503         * inspector/timeline/timeline-network-received-data-expected.txt: Added.
1504         * inspector/timeline/timeline-test.js:
1505
1506 2012-06-29  Shawn Singh  <shawnsingh@chromium.org>
1507
1508         Unreviewed build fix after 121580.
1509
1510         WebKit Linux debug bots was complaining about signed vs unsigned integer comparison.
1511
1512         * html/HTMLCollection.h:
1513         (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
1514
1515 2012-06-28  James Robinson  <jamesr@chromium.org>
1516
1517         [chromium] Remove mapRect and mapQuad from WebTransformationMatrix
1518         https://bugs.webkit.org/show_bug.cgi?id=90230
1519
1520         Reviewed by Adrienne Walker.
1521
1522         Replaces calls to WebTransformationMatrix::mapRect/mapQuad with clipping-aware calls to CCMathUtils. In most
1523         cases, we do not expect clipping to happen. For others (such as area calculations in CCOverdrawMetrics) we can
1524         handle a clipped quad easily.
1525
1526         * platform/chromium/support/WebTransformationMatrix.cpp:
1527         * platform/graphics/chromium/LayerRendererChromium.cpp:
1528         (WebCore::LayerRendererChromium::drawRenderPassQuad):
1529         (WebCore::LayerRendererChromium::drawTileQuad):
1530         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
1531         (WebCore::RenderSurfaceChromium::drawableContentRect):
1532         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1533         (WebCore::CCLayerImpl::getDrawRect):
1534         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
1535         (WebCore::transformSurfaceOpaqueRegion):
1536         (WebCore::addOcclusionBehindLayer):
1537         * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
1538         (WebCore):
1539         (WebCore::polygonArea):
1540         (WebCore::areaOfMappedQuad):
1541         (WebCore::CCOverdrawMetrics::didUpload):
1542         (WebCore::CCOverdrawMetrics::didCullForDrawing):
1543         (WebCore::CCOverdrawMetrics::didDraw):
1544         * platform/graphics/chromium/cc/CCRenderPass.cpp:
1545         (WebCore::CCRenderPass::appendQuadsToFillScreen):
1546         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
1547         (WebCore::CCRenderSurface::drawableContentRect):
1548         * platform/graphics/chromium/cc/CCSharedQuadState.cpp:
1549         (WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect):
1550
1551 2012-06-29  Ryosuke Niwa  <rniwa@webkit.org>
1552
1553         Mac build fix after r121575. It rolls out r121547 but didn't roll out the follow up build fix r121553.
1554
1555         * platform/graphics/mac/FontCustomPlatformData.h:
1556         (FontCustomPlatformData):
1557
1558 2012-06-29  Ryosuke Niwa  <rniwa@webkit.org>
1559
1560         Share the same cache in HTMLCollection and DynamicNodeLists
1561         https://bugs.webkit.org/show_bug.cgi?id=90118
1562
1563         Reviewed by Anders Carlsson.
1564
1565         This patch introduces two new base classes DynamicNodeListCacheBase and HTMLCollectionCacheBase to share
1566         the cache object between DynamicNodeList and HTMLCollection. HTMLCollectionCacheBase inherits from
1567         DynamicNodeListCacheBase and contains extra caches and bit flags for HTMLCollection. DynamicNodeList::Cache
1568         and HTMLCollection::Cache had been removed and flattened into these two classes for the easy inheritance.
1569
1570         In DynamicNodeList, we have a very straight forward one-to-one mapping from old Caches member variables:
1571
1572         m_caches.lastItem -> cachedItem()
1573         m_caches.lastItemOffset -> cachedItemOffset()
1574         m_caches.cachedLength -> cachedLength()
1575         m_caches.isItemCacheValid -> isItemCacheValid()
1576         m_caches.isLengthCacheValid -> isLengthCacheValid()
1577         m_caches.type -> removed because it was never used.
1578         m_caches.rootedAtDocument -> isRootedAtDocument()
1579         m_caches.shouldInvalidateOnAttributeChange -> shouldInvalidateOnAttributeChange()
1580
1581         In HTMLCollection, there is one semantic change in the way item cache is managed. Previously, we only had
1582         m_cache.current which was used as both cachedItem() and isItemCacheValid() (not valid when current is null).
1583         There are some asymmetric code changes due to one-to-many relationship. Also, all method names have been updated
1584         to use that of DynamicNodeList terminology. Thus we have the following correspondence:
1585
1586         m_cache.current -> cachedItem() / isItemCacheValid()
1587         m_cache.position -> cachedItemOffset()
1588         m_cache.length -> cachedLength()
1589         m_cache.elementsArrayPosition -> cachedElementsArrayOffset()
1590         m_cache.hasLength -> isLengthCacheValid()
1591         m_cache.hasNameCache -> hasNameCache() / setHasNameCache()
1592         m_cache.idCache -> idCache() / addIdCache()
1593         m_cache.nameCache -> idCache() / addNameCache()
1594
1595         In addition, we had to rename HTMLCollection::clearCache to invalidateCache to avoid the name collision with
1596         HTMLCollectionCacheBase::clearCache.
1597
1598         * dom/ChildNodeList.cpp:
1599         (WebCore::ChildNodeList::length):
1600         (WebCore::ChildNodeList::item):
1601         * dom/DynamicNodeList.cpp:
1602         (WebCore::DynamicSubtreeNodeList::length):
1603         (WebCore::DynamicSubtreeNodeList::itemForwardsFromCurrent):
1604         (WebCore::DynamicSubtreeNodeList::itemBackwardsFromCurrent):
1605         (WebCore::DynamicSubtreeNodeList::item):
1606         * dom/DynamicNodeList.h:
1607         (DynamicNodeListCacheBase):
1608         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
1609         (WebCore::DynamicNodeListCacheBase::isRootedAtDocument):
1610         (WebCore::DynamicNodeListCacheBase::shouldInvalidateOnAttributeChange):
1611         (WebCore::DynamicNodeListCacheBase::isItemCacheValid):
1612         (WebCore::DynamicNodeListCacheBase::cachedItem):
1613         (WebCore::DynamicNodeListCacheBase::cachedItemOffset):
1614         (WebCore::DynamicNodeListCacheBase::isLengthCacheValid):
1615         (WebCore::DynamicNodeListCacheBase::cachedLength):
1616         (WebCore::DynamicNodeListCacheBase::setLengthCache):
1617         (WebCore::DynamicNodeListCacheBase::setItemCache):
1618         (WebCore::DynamicNodeListCacheBase::clearCache):
1619         (WebCore):
1620         (WebCore::DynamicNodeList::DynamicNodeList):
1621         (WebCore::DynamicNodeList::invalidateCache):
1622         (WebCore::DynamicNodeList::rootNode):
1623         (DynamicNodeList):
1624         * html/HTMLAllCollection.cpp:
1625         (WebCore::HTMLAllCollection::namedItemWithIndex):
1626         * html/HTMLCollection.cpp:
1627         (WebCore::HTMLCollection::HTMLCollection):
1628         (WebCore::HTMLCollection::invalidateCacheIfNeeded):
1629         (WebCore::HTMLCollection::invalidateCache):
1630         (WebCore::HTMLCollection::isAcceptableElement):
1631         (WebCore::HTMLCollection::itemAfter):
1632         (WebCore::HTMLCollection::length):
1633         (WebCore::HTMLCollection::item):
1634         (WebCore::HTMLCollection::checkForNameMatch):
1635         (WebCore::HTMLCollection::namedItem):
1636         (WebCore::HTMLCollection::updateNameCache):
1637         (WebCore::HTMLCollection::hasNamedItem):
1638         (WebCore::HTMLCollection::namedItems):
1639         (WebCore::HTMLCollectionCacheBase::append):
1640         * html/HTMLCollection.h:
1641         (HTMLCollectionCacheBase):
1642         (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase):
1643         (WebCore::HTMLCollectionCacheBase::type):
1644         (WebCore::HTMLCollectionCacheBase::clearCache):
1645         (WebCore::HTMLCollectionCacheBase::setItemCache):
1646         (WebCore::HTMLCollectionCacheBase::cachedElementsArrayOffset):
1647         (WebCore::HTMLCollectionCacheBase::includeChildren):
1648         (WebCore::HTMLCollectionCacheBase::cacheTreeVersion):
1649         (WebCore::HTMLCollectionCacheBase::idCache):
1650         (WebCore::HTMLCollectionCacheBase::nameCache):
1651         (WebCore::HTMLCollectionCacheBase::appendIdCache):
1652         (WebCore::HTMLCollectionCacheBase::appendNameCache):
1653         (WebCore::HTMLCollectionCacheBase::hasNameCache):
1654         (WebCore::HTMLCollectionCacheBase::setHasNameCache):
1655         (WebCore):
1656         (WebCore::HTMLCollection::isEmpty):
1657         (WebCore::HTMLCollection::hasExactlyOneItem):
1658         (WebCore::HTMLCollection::base):
1659         (HTMLCollection):
1660         * html/HTMLFormCollection.cpp:
1661         (WebCore::HTMLFormCollection::item):
1662         (WebCore::HTMLFormCollection::updateNameCache):
1663         * html/HTMLNameCollection.cpp:
1664         (WebCore::HTMLNameCollection::itemAfter):
1665         * html/HTMLNameCollection.h:
1666         (HTMLNameCollection):
1667         * html/HTMLSelectElement.cpp:
1668         (WebCore::HTMLSelectElement::invalidateSelectedItems):
1669         * html/HTMLTableRowsCollection.cpp:
1670         (WebCore::HTMLTableRowsCollection::itemAfter):
1671         * html/HTMLTableRowsCollection.h:
1672         (HTMLTableRowsCollection):
1673
1674 2012-06-29  Tony Chang  <tony@chromium.org>
1675
1676         Unreviewed, rolling out r121572.
1677         http://trac.webkit.org/changeset/121572
1678         https://bugs.webkit.org/show_bug.cgi?id=90249
1679
1680         Breaks Mac build since it depends on r121547, which was rolled
1681         out
1682
1683         * WebCore.exp.in:
1684         * page/AlternativeTextClient.h:
1685         * page/ContextMenuController.cpp:
1686         (WebCore::ContextMenuController::populate):
1687         * platform/graphics/cg/ImageBufferDataCG.h:
1688         * platform/graphics/mac/GraphicsContextMac.mm:
1689         (WebCore::GraphicsContext::drawLineForDocumentMarker):
1690         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1691         (WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible):
1692         * platform/mac/WebCoreSystemInterface.h:
1693         * platform/network/Credential.h:
1694         * platform/network/cf/ResourceRequestCFNet.cpp:
1695         (WebCore):
1696         (WebCore::initializeMaximumHTTPConnectionCountPerHost):
1697         * platform/text/TextChecking.h:
1698         (WebCore):
1699         * rendering/RenderLayerBacking.cpp:
1700         (WebCore::RenderLayerBacking::containsPaintedContent):
1701
1702 2012-06-29  Tony Chang  <tony@chromium.org>
1703
1704         Unreviewed, rolling out r121547.
1705         http://trac.webkit.org/changeset/121547
1706         https://bugs.webkit.org/show_bug.cgi?id=90256
1707
1708         Breaks Chromium Mac build
1709
1710         * platform/LocalizedStrings.cpp:
1711         (WebCore::imageTitle):
1712         * platform/graphics/cg/GraphicsContextCG.cpp:
1713         (WebCore::GraphicsContext::setAllowsFontSmoothing):
1714         * platform/graphics/cg/ImageCG.cpp:
1715         (WebCore::Image::drawPattern):
1716         * platform/graphics/cg/ImageSourceCG.cpp:
1717         (WebCore::ImageSource::clear):
1718         * platform/graphics/cg/PathCG.cpp:
1719         (WebCore::Path::boundingRect):
1720         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1721         (WebCore):
1722         (WebCore::canSetCascadeListForCustomFont):
1723         (WebCore::FontPlatformData::ctFont):
1724         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1725         * platform/graphics/mac/ComplexTextController.cpp:
1726         * platform/graphics/mac/FontCacheMac.mm:
1727         (WebCore):
1728         (WebCore::fontCacheATSNotificationCallback):
1729         (WebCore::FontCache::platformInit):
1730         * platform/graphics/mac/FontCustomPlatformData.cpp:
1731         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1732         (WebCore::createFontCustomPlatformData):
1733         * platform/graphics/mac/FontCustomPlatformData.h:
1734         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
1735         * platform/graphics/mac/SimpleFontDataMac.mm:
1736         (WebCore::SimpleFontData::platformInit):
1737         * platform/graphics/mac/WebLayer.h:
1738         * platform/mac/CursorMac.mm:
1739         (WebCore::Cursor::ensurePlatformCursor):
1740         * platform/mac/DisplaySleepDisabler.cpp:
1741         (WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
1742         (WebCore):
1743         (WebCore::DisplaySleepDisabler::systemActivityTimerFired):
1744         * platform/mac/DisplaySleepDisabler.h:
1745         (DisplaySleepDisabler):
1746         * platform/mac/HTMLConverter.h:
1747         * platform/mac/HTMLConverter.mm:
1748         * platform/mac/PopupMenuMac.mm:
1749         (WebCore::PopupMenuMac::populate):
1750         * platform/mac/ScrollElasticityController.mm:
1751
1752 2012-06-29  Eric Penner  <epenner@google.com>
1753
1754         [chromium] Adding PrioritizedTexture and replacing ContentsTextureManager
1755         https://bugs.webkit.org/show_bug.cgi?id=84308
1756
1757         Reviewed by Adrienne Walker.
1758
1759         PrioritizedTextures have a priority such that all texture requests can be
1760         prioritized. There are three steps involved:
1761             - Call setRequestPriority()
1762             - Check if the request succeeded with canAcquireBackingTexture()
1763             - Call acquireBackingTexture() when uploading a new texture.
1764
1765         Internally both the texture requests and the backing textures get sorted.
1766         Requests are sorted so they can be prioritized. Backing textures are sorted
1767         so that they can be recycled/evicted in the right order (lowest priority first).
1768
1769         Prioritizing textures doesn't assign backing textures to texture requests but
1770         rather just marks which textures can have a backing texture "when needed". This
1771         allows us to keep the old textures in use as long as possible.
1772
1773         The unit tests support all the use cases from the original texture manager
1774         but also adds assumptions about priority order throughout all the tests. The
1775         function assertInvariants() is added to test the validity of the manager
1776         and all textures/allocations within it.
1777
1778         The TiledLayerChromium tests are updated to request textures first with
1779         prioritizeTextures(), and update them with the updater (such that allocate
1780         gets called) before pushPropertiesTo is called (when they need to be valid).
1781
1782         * WebCore.gypi:
1783         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
1784         (WebCore::BitmapCanvasLayerTextureUpdater::Texture::Texture):
1785         (WebCore::BitmapCanvasLayerTextureUpdater::createTexture):
1786         (WebCore::BitmapCanvasLayerTextureUpdater::updateTextureRect):
1787         * platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.h:
1788         (WebCore):
1789         (Texture):
1790         (BitmapCanvasLayerTextureUpdater):
1791         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.cpp:
1792         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::Texture::Texture):
1793         (WebCore::BitmapSkPictureCanvasLayerTextureUpdater::createTexture):
1794         * platform/graphics/chromium/BitmapSkPictureCanvasLayerTextureUpdater.h:
1795         (Texture):
1796         (BitmapSkPictureCanvasLayerTextureUpdater):
1797         * platform/graphics/chromium/ContentLayerChromium.cpp:
1798         (WebCore::ContentLayerChromium::setTexturePriorities):
1799         (WebCore):
1800         (WebCore::ContentLayerChromium::update):
1801         * platform/graphics/chromium/ContentLayerChromium.h:
1802         (ContentLayerChromium):
1803         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.cpp:
1804         (WebCore::createAcceleratedCanvas):
1805         (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::Texture::Texture):
1806         (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::createTexture):
1807         (WebCore::FrameBufferSkPictureCanvasLayerTextureUpdater::updateTextureRect):
1808         * platform/graphics/chromium/FrameBufferSkPictureCanvasLayerTextureUpdater.h:
1809         (Texture):
1810         (FrameBufferSkPictureCanvasLayerTextureUpdater):
1811         * platform/graphics/chromium/ImageLayerChromium.cpp:
1812         (WebCore::ImageLayerTextureUpdater::Texture::Texture):
1813         (WebCore::ImageLayerTextureUpdater::createTexture):
1814         (WebCore::ImageLayerTextureUpdater::updateTextureRect):
1815         (WebCore::ImageLayerChromium::setTexturePriorities):
1816         (WebCore):
1817         * platform/graphics/chromium/ImageLayerChromium.h:
1818         (ImageLayerChromium):
1819         * platform/graphics/chromium/LayerChromium.h:
1820         (LayerChromium):
1821         (WebCore::LayerChromium::setTexturePriorities):
1822         * platform/graphics/chromium/LayerTextureUpdater.h:
1823         (WebCore::LayerTextureUpdater::Texture::texture):
1824         (WebCore::LayerTextureUpdater::Texture::swapTextureWith):
1825         (WebCore::LayerTextureUpdater::Texture::Texture):
1826         (Texture):
1827         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
1828         (WebCore::ScrollbarLayerChromium::pushPropertiesTo):
1829         (WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded):
1830         (WebCore::ScrollbarLayerChromium::updatePart):
1831         (WebCore):
1832         (WebCore::ScrollbarLayerChromium::setTexturePriorities):
1833         * platform/graphics/chromium/ScrollbarLayerChromium.h:
1834         (ScrollbarLayerChromium):
1835         * platform/graphics/chromium/TiledLayerChromium.cpp:
1836         (WebCore::UpdatableTile::managedTexture):
1837         (WebCore::TiledLayerChromium::pushPropertiesTo):
1838         (WebCore::TiledLayerChromium::textureManager):
1839         (WebCore::TiledLayerChromium::createTile):
1840         (WebCore::TiledLayerChromium::tileNeedsBufferedUpdate):
1841         (WebCore::TiledLayerChromium::updateTiles):
1842         (WebCore::TiledLayerChromium::setTexturePriorities):
1843         (WebCore):
1844         (WebCore::TiledLayerChromium::setTexturePrioritiesInRect):
1845         (WebCore::TiledLayerChromium::resetUpdateState):
1846         (WebCore::TiledLayerChromium::updateLayerRect):
1847         (WebCore::TiledLayerChromium::idleUpdateLayerRect):
1848         (WebCore::TiledLayerChromium::needsIdlePaint):
1849         (WebCore::TiledLayerChromium::idlePaintRect):
1850         * platform/graphics/chromium/TiledLayerChromium.h:
1851         (TiledLayerChromium):
1852         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
1853         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
1854         (WebCore::CCLayerTreeHost::deleteContentsTexturesOnImplThread):
1855         (WebCore::CCLayerTreeHost::beginCommitOnImplThread):
1856         (WebCore::CCLayerTreeHost::commitComplete):
1857         (WebCore::CCLayerTreeHost::evictAllContentTextures):
1858         (WebCore::CCLayerTreeHost::contentsTextureManager):
1859         (WebCore::CCLayerTreeHost::updateLayers):
1860         (WebCore::CCLayerTreeHost::prioritizeTextures):
1861         (WebCore::CCLayerTreeHost::deleteTextureAfterCommit):
1862         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
1863         (WebCore):
1864         (CCLayerTreeHost):
1865         * platform/graphics/chromium/cc/CCPrioritizedTexture.cpp: Added.
1866         (WebCore):
1867         (WebCore::CCPrioritizedTexture::CCPrioritizedTexture):
1868         (WebCore::CCPrioritizedTexture::~CCPrioritizedTexture):
1869         (WebCore::CCPrioritizedTexture::setTextureManager):
1870         (WebCore::CCPrioritizedTexture::setDimensions):
1871         (WebCore::CCPrioritizedTexture::requestLate):
1872         (WebCore::CCPrioritizedTexture::acquireBackingTexture):
1873         (WebCore::CCPrioritizedTexture::textureId):
1874         (WebCore::CCPrioritizedTexture::bindTexture):
1875         (WebCore::CCPrioritizedTexture::framebufferTexture2D):
1876         (WebCore::CCPrioritizedTexture::setCurrentBacking):
1877         * platform/graphics/chromium/cc/CCPrioritizedTexture.h: Added.
1878         (WebCore):
1879         (CCPrioritizedTexture):
1880         (WebCore::CCPrioritizedTexture::create):
1881         (WebCore::CCPrioritizedTexture::textureManager):
1882         (WebCore::CCPrioritizedTexture::format):
1883         (WebCore::CCPrioritizedTexture::size):
1884         (WebCore::CCPrioritizedTexture::memorySizeBytes):
1885         (WebCore::CCPrioritizedTexture::setRequestPriority):
1886         (WebCore::CCPrioritizedTexture::requestPriority):
1887         (WebCore::CCPrioritizedTexture::canAcquireBackingTexture):
1888         (WebCore::CCPrioritizedTexture::haveBackingTexture):
1889         (Backing):
1890         (WebCore::CCPrioritizedTexture::Backing::size):
1891         (WebCore::CCPrioritizedTexture::Backing::format):
1892         (WebCore::CCPrioritizedTexture::Backing::memorySizeBytes):
1893         (WebCore::CCPrioritizedTexture::Backing::textureId):
1894         (WebCore::CCPrioritizedTexture::Backing::currentTexture):
1895         (WebCore::CCPrioritizedTexture::Backing::setCurrentTexture):
1896         (WebCore::CCPrioritizedTexture::Backing::Backing):
1897         (WebCore::CCPrioritizedTexture::Backing::~Backing):
1898         (WebCore::CCPrioritizedTexture::isAbovePriorityCutoff):
1899         (WebCore::CCPrioritizedTexture::setAbovePriorityCutoff):
1900         (WebCore::CCPrioritizedTexture::setManagerInternal):
1901         (WebCore::CCPrioritizedTexture::currentBacking):
1902         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.cpp: Added.
1903         (WebCore):
1904         (WebCore::CCPrioritizedTextureManager::CCPrioritizedTextureManager):
1905         (WebCore::CCPrioritizedTextureManager::~CCPrioritizedTextureManager):
1906         (WebCore::CCPrioritizedTextureManager::setMemoryAllocationLimitBytes):
1907         (WebCore::CCPrioritizedTextureManager::prioritizeTextures):
1908         (WebCore::CCPrioritizedTextureManager::clearPriorities):
1909         (WebCore::CCPrioritizedTextureManager::requestLate):
1910         (WebCore::CCPrioritizedTextureManager::acquireBackingTextureIfNeeded):
1911         (WebCore::CCPrioritizedTextureManager::reduceMemory):
1912         (WebCore::CCPrioritizedTextureManager::clearAllMemory):
1913         (WebCore::CCPrioritizedTextureManager::allBackingTexturesWereDeleted):
1914         (WebCore::CCPrioritizedTextureManager::unlink):
1915         (WebCore::CCPrioritizedTextureManager::link):
1916         (WebCore::CCPrioritizedTextureManager::registerTexture):
1917         (WebCore::CCPrioritizedTextureManager::unregisterTexture):
1918         (WebCore::CCPrioritizedTextureManager::returnBackingTexture):
1919         (WebCore::CCPrioritizedTextureManager::createBacking):
1920         (WebCore::CCPrioritizedTextureManager::destroyBacking):
1921         (WebCore::CCPrioritizedTextureManager::assertInvariants):
1922         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h: Added.
1923         (WebCore):
1924         (CCPrioritizedTextureManager):
1925         (WebCore::CCPrioritizedTextureManager::create):
1926         (WebCore::CCPrioritizedTextureManager::createTexture):
1927         (WebCore::CCPrioritizedTextureManager::memoryUseBytes):
1928         (WebCore::CCPrioritizedTextureManager::memoryAboveCutoffBytes):
1929         (WebCore::CCPrioritizedTextureManager::setMaxMemoryLimitBytes):
1930         (WebCore::CCPrioritizedTextureManager::maxMemoryLimitBytes):
1931         (WebCore::CCPrioritizedTextureManager::setPreferredMemoryLimitBytes):
1932         (WebCore::CCPrioritizedTextureManager::preferredMemoryLimitBytes):
1933         (WebCore::CCPrioritizedTextureManager::setMaxMemoryPriorityCutoff):
1934         (WebCore::CCPrioritizedTextureManager::maxMemoryPriorityCutoff):
1935         (WebCore::CCPrioritizedTextureManager::compareTextures):
1936         (WebCore::CCPrioritizedTextureManager::compareBackings):
1937         * platform/graphics/chromium/cc/CCPriorityCalculator.cpp: Added.
1938         (WebCore):
1939         (WebCore::CCPriorityCalculator::uiPriority):
1940         (WebCore::CCPriorityCalculator::visiblePriority):
1941         (WebCore::CCPriorityCalculator::lingeringPriority):
1942         (WebCore::CCPriorityCalculator::priorityFromDistance):
1943         (WebCore::CCPriorityCalculator::priorityFromVisibility):
1944         * platform/graphics/chromium/cc/CCPriorityCalculator.h: Added.
1945         (WebCore):
1946         (CCPriorityCalculator):
1947         (WebCore::CCPriorityCalculator::highestPriority):
1948         (WebCore::CCPriorityCalculator::lowestPriority):
1949         (WebCore::CCPriorityCalculator::priorityIsLower):
1950         (WebCore::CCPriorityCalculator::priorityIsHigher):
1951         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
1952
1953 2012-06-29  Eric Seidel  <eric@webkit.org>
1954
1955         Remove BUILDING_ON_LEOPARD now that no ports build on Leopard
1956         https://bugs.webkit.org/show_bug.cgi?id=90249
1957
1958         Reviewed by Ryosuke Niwa.
1959
1960         I don't think I quite got it all yet, but this is another step towards
1961         removing Leopard support in WebCore.
1962
1963         * WebCore.exp.in:
1964         * page/AlternativeTextClient.h:
1965         * page/ContextMenuController.cpp:
1966         (WebCore::ContextMenuController::populate):
1967         * platform/graphics/cg/ImageBufferDataCG.h:
1968         * platform/graphics/mac/GraphicsContextMac.mm:
1969         (WebCore::GraphicsContext::drawLineForDocumentMarker):
1970         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1971         (WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible):
1972         * platform/mac/WebCoreSystemInterface.h:
1973         * platform/network/Credential.h:
1974         * platform/network/cf/ResourceRequestCFNet.cpp:
1975         (WebCore):
1976         (WebCore::initializeMaximumHTTPConnectionCountPerHost):
1977         * platform/text/TextChecking.h:
1978         (WebCore):
1979         * rendering/RenderLayerBacking.cpp:
1980         (WebCore::RenderLayerBacking::containsPaintedContent):
1981
1982 2012-06-29  Andreas Kling  <kling@webkit.org>
1983
1984         Unreviewed, rolling out r121562.
1985         http://trac.webkit.org/changeset/121562
1986         https://bugs.webkit.org/show_bug.cgi?id=89945
1987
1988         Broke a couple of editing/pasteboard tests.
1989
1990         * css/PropertySetCSSStyleDeclaration.cpp:
1991         (WebCore::PropertySetCSSStyleDeclaration::length):
1992         (WebCore::PropertySetCSSStyleDeclaration::item):
1993         (WebCore::PropertySetCSSStyleDeclaration::cssText):
1994         (WebCore::PropertySetCSSStyleDeclaration::setCssText):
1995         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
1996         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
1997         (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority):
1998         (WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand):
1999         (WebCore::PropertySetCSSStyleDeclaration::isPropertyImplicit):
2000         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
2001         (WebCore::PropertySetCSSStyleDeclaration::removeProperty):
2002         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
2003         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
2004         (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
2005         (WebCore::PropertySetCSSStyleDeclaration::copy):
2006         (WebCore::PropertySetCSSStyleDeclaration::makeMutable):
2007         (WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches):
2008         (WebCore::InlineCSSStyleDeclaration::didMutate):
2009         (WebCore::InlineCSSStyleDeclaration::parentStyleSheet):
2010         * css/PropertySetCSSStyleDeclaration.h:
2011         (WebCore::PropertySetCSSStyleDeclaration::clearParentElement):
2012         (PropertySetCSSStyleDeclaration):
2013         (WebCore::InlineCSSStyleDeclaration::InlineCSSStyleDeclaration):
2014         * css/StylePropertySet.cpp:
2015         (WebCore::StylePropertySet::ensureInlineCSSStyleDeclaration):
2016         (WebCore::StylePropertySet::clearParentElement):
2017         (WebCore):
2018         * css/StylePropertySet.h:
2019         (StylePropertySet):
2020         * dom/ElementAttributeData.cpp:
2021         (WebCore::ElementAttributeData::destroyInlineStyle):
2022         (WebCore):
2023         * dom/ElementAttributeData.h:
2024         (ElementAttributeData):
2025         * dom/StyledElement.cpp:
2026         (WebCore::StyledElement::~StyledElement):
2027         (WebCore):
2028         (WebCore::StyledElement::styleAttributeChanged):
2029         * dom/StyledElement.h:
2030         (StyledElement):
2031         (WebCore::StyledElement::destroyInlineStyle):
2032
2033 2012-06-29  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
2034
2035         [Qt] Add missing support for tiled shadow blur on fillRect
2036         https://bugs.webkit.org/show_bug.cgi?id=90082
2037
2038         Reviewed by Noam Rosenthal.
2039
2040         This overloaded fillRect implementation also supports this optimization in
2041         certain situations.
2042
2043         * platform/graphics/qt/GraphicsContextQt.cpp:
2044         (WebCore::GraphicsContext::fillRect):
2045
2046 2012-06-29  Brady Eidson  <beidson@apple.com>
2047
2048         Build fix - These should not be executable!
2049
2050         Rubberstamped by Jessie Berlin.
2051
2052         * loader/cache/CachedSVGDocument.cpp: Removed property svn:executable.
2053         * loader/cache/CachedSVGDocument.h: Removed property svn:executable.
2054
2055 2012-06-29  Kwang Yul Seo  <skyul@company100.net>
2056
2057         Update FIXME comment in XMLDocumentParser::wellFormed
2058         https://bugs.webkit.org/show_bug.cgi?id=90223
2059
2060         Reviewed by Adam Barth.
2061
2062         XMLDocumentParser::wellFormed is still used by the XMLHttpRequest to check if the responseXML was well formed.
2063         So it can't be removed.
2064
2065         * xml/parser/XMLDocumentParser.h:
2066         (XMLDocumentParser):
2067
2068 2012-06-29  Andreas Kling  <kling@webkit.org>
2069
2070         Separate mutating CSSStyleDeclaration operations.
2071         <http://webkit.org/b/89945>
2072
2073         Reviewed by Antti Koivisto.
2074
2075         Use separate paths for mutating the StylePropertySet wrapped by a CSSStyleDeclaration.
2076         PropertySetCSSStyleDeclaration now has:
2077
2078             - propertySet() const
2079             - ensureMutablePropertySet()
2080
2081         This is prep work for supporting immutable ElementAttributeData objects, the idea being
2082         that calling ensureMutablePropertySet() may cause the element to convert its internal
2083         attribute storage (which also holds the inline StylePropertySet.)
2084
2085         To that end, also removed the weird logic that allowed you to kill the inline style object
2086         by removing the 'style' attribute. We now simply clear out all the properties in that case
2087         which saves us a bunch of hassle (no need for a ~StyledElement anymore.)
2088         Note that InlineCSSStyleDeclaration now refs the element rather than the inline style.
2089
2090         There should be no web-facing behavior change from any of this.
2091
2092         * css/PropertySetCSSStyleDeclaration.cpp:
2093         (WebCore::PropertySetCSSStyleDeclaration::length):
2094         (WebCore::PropertySetCSSStyleDeclaration::item):
2095         (WebCore::PropertySetCSSStyleDeclaration::cssText):
2096         (WebCore::PropertySetCSSStyleDeclaration::setCssText):
2097         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
2098         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValue):
2099         (WebCore::PropertySetCSSStyleDeclaration::getPropertyPriority):
2100         (WebCore::PropertySetCSSStyleDeclaration::getPropertyShorthand):
2101         (WebCore::PropertySetCSSStyleDeclaration::isPropertyImplicit):
2102         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
2103         (WebCore::PropertySetCSSStyleDeclaration::removeProperty):
2104         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
2105         (WebCore::PropertySetCSSStyleDeclaration::getPropertyValueInternal):
2106         (WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal):
2107         (WebCore::PropertySetCSSStyleDeclaration::copy):
2108         (WebCore::PropertySetCSSStyleDeclaration::makeMutable):
2109         (WebCore::PropertySetCSSStyleDeclaration::cssPropertyMatches):
2110         (WebCore::InlineCSSStyleDeclaration::InlineCSSStyleDeclaration):
2111         (WebCore::InlineCSSStyleDeclaration::ref):
2112         (WebCore::InlineCSSStyleDeclaration::deref):
2113         (WebCore::InlineCSSStyleDeclaration::didMutate):
2114         (WebCore::InlineCSSStyleDeclaration::parentStyleSheet):
2115         (WebCore::InlineCSSStyleDeclaration::ensureMutablePropertySet):
2116         * css/PropertySetCSSStyleDeclaration.h:
2117         (PropertySetCSSStyleDeclaration):
2118         (WebCore::PropertySetCSSStyleDeclaration::propertySet):
2119         (WebCore::PropertySetCSSStyleDeclaration::ensureMutablePropertySet):
2120         (InlineCSSStyleDeclaration):
2121         * css/StylePropertySet.cpp:
2122         (WebCore::StylePropertySet::ensureInlineCSSStyleDeclaration):
2123         * css/StylePropertySet.h:
2124         (StylePropertySet):
2125         * dom/ElementAttributeData.cpp:
2126         * dom/ElementAttributeData.h:
2127         (ElementAttributeData):
2128         * dom/StyledElement.cpp:
2129         (WebCore::StyledElement::styleAttributeChanged):
2130         * dom/StyledElement.h:
2131         (WebCore::StyledElement::~StyledElement):
2132         (StyledElement):
2133
2134 2012-06-29  Kwang Yul Seo  <skyul@company100.net>
2135
2136         Don't call SegmentedString::toString() twice in XMLDocumentParser::append(const SegmentedString&)
2137         https://bugs.webkit.org/show_bug.cgi?id=90254
2138
2139         Reviewed by Adam Barth.
2140
2141         We can reuse the local variable parseString instead of calling s.toString() again.
2142         No behavior change, so no new tests.
2143
2144         * xml/parser/XMLDocumentParser.cpp:
2145         (WebCore::XMLDocumentParser::append):
2146
2147 2012-06-29  Mihnea Ovidenie  <mihnea@adobe.com>
2148
2149         Crash when flowing a fixed positioned element into a region.
2150         https://bugs.webkit.org/show_bug.cgi?id=88133
2151
2152         Reviewed by Julien Chaffraix and Abhishek Arya.
2153
2154         When a fixed positioned element is collected into a named flow, we have to make sure
2155         that such element has the RenderFlowThread as containing block instead of RenderView,
2156         so that the fixed positioned element is laid out properly.
2157         Making the RenderFlowThread the top most containing block for named flow elements required the
2158         modification of RenderLayer::convertToLayerCoords so that the fixed positioned elements inside the
2159         named flow take the same code path as the absolute positioned elements inside the named flow.
2160         I also added a method, checkBlockPositionedObjectsNeedLayout, in order to verify that a block
2161         that is ending its layout, setNeedsLayout(false), has all the positioned children laid out.
2162         This way, we will hit an assertion if an out-of-flow positioned child inside a RenderFlowThread
2163         is not laid out after the RenderFlowThread is laid out.
2164
2165         Tests: fast/regions/absolute-pos-elem-in-named-flow.html
2166                fast/regions/absolute-pos-elem-in-region.html
2167                fast/regions/fixed-pos-elem-in-named-flow.html
2168                fast/regions/fixed-pos-elem-in-named-flow2.html
2169                fast/regions/fixed-pos-elem-in-region.html
2170
2171         * rendering/RenderBlock.cpp:
2172         (WebCore::RenderBlock::checkPositionedObjectsNeedLayout):
2173         * rendering/RenderBlock.h:
2174         (RenderBlock):
2175         * rendering/RenderLayer.cpp:
2176         (WebCore::RenderLayer::convertToLayerCoords):
2177         * rendering/RenderObject.cpp:
2178         (WebCore):
2179         (WebCore::RenderObject::checkBlockPositionedObjectsNeedLayout):
2180         (WebCore::RenderObject::containingBlock):
2181         (WebCore::RenderObject::container):
2182         * rendering/RenderObject.h:
2183         (RenderObject):
2184         (WebCore::RenderObject::setNeedsLayout):
2185
2186 2012-06-29  Konrad Piascik  <kpiascik@rim.com>
2187
2188         Don't hardcode target dpi of 160 (it should be 96 on desktop)
2189         https://bugs.webkit.org/show_bug.cgi?id=88114
2190
2191         Reviewed by Adam Barth.
2192
2193         No behavioural change, current tests in fast/viewport cover all
2194         functionality.
2195
2196         * WebCore.exp.in: Updated symbol for computeViewportAttributes.
2197         * dom/ViewportArguments.cpp: Use new parameter for devicePixelRatio
2198                                      and don't calculate it anymore.
2199         (WebCore::computeViewportAttributes):
2200         * dom/ViewportArguments.h: Change the deviceDPI parameter to
2201                                    devicePixelRatio and put the onus
2202                                    on the embedder to supply the
2203                                    correct value.  Add temporary constant.
2204         (WebCore):
2205
2206 2012-06-29  Vineet Chaudhary  <rgf748@motorola.com>
2207
2208         JS binding code generator doesn't handle "attribute unsigned long[]" well.
2209         https://bugs.webkit.org/show_bug.cgi?id=84540
2210
2211         Reviewed by Kentaro Hara.
2212
2213         In JS/V8 Bindings using traits instead of specialised functions.
2214         Also added support for "unsigned long" in JSDOMBinding and V8Binding.
2215
2216         No new tests, as no behavioural changes.
2217
2218         * bindings/js/JSDOMBinding.h:
2219         (WebCore::Traits::arrayJSValue):
2220         (WebCore::jsArray):
2221         * bindings/v8/V8Binding.h:
2222         (WebCore::Traits::arrayV8Value):
2223         (WebCore::v8Array):
2224
2225 2012-06-29  Andreas Kling  <kling@webkit.org>
2226
2227         Unreviewed mac build fix after r121547.
2228         Remove the now-unused FontCustomPlatformData::m_atsContainer.
2229
2230         * platform/graphics/mac/FontCustomPlatformData.h:
2231         (FontCustomPlatformData):
2232
2233 2012-06-29  Kent Tamura  <tkent@chromium.org>
2234
2235         <textarea> unnecessarily saves the value in some cases
2236         https://bugs.webkit.org/show_bug.cgi?id=90259
2237
2238         Reviewed by Hajime Morita.
2239
2240         Test: fast/forms/textarea/textarea-state-restore.html
2241
2242         * html/HTMLTextAreaElement.cpp:
2243         (WebCore::HTMLTextAreaElement::saveFormControlState):
2244         We apply EOL normalization to value(), but don't apply it to
2245         defaultValue(). Also value() can return a null string, which never
2246         equals to any strings. To check m_isDirty is what we need..
2247
2248 2012-06-25  Alexander Pavlov  <apavlov@chromium.org>
2249
2250         Web Inspector: Provide source data for all known rule types in CSSParser, except "keyframe" and "region"
2251         https://bugs.webkit.org/show_bug.cgi?id=88420
2252
2253         Reviewed by Antti Koivisto.
2254
2255         This change transitions the CSS source code model from a flat list of style rules to a tree of all types of CSS rules
2256         (some of them lack actual source code data), which is crucial to model-based CSS stylesheet source editing
2257         (add/remove CSS rule) and navigation.
2258         As a side effect, the CSS parsing performance on PerformanceTests/Parser/css-parser-yui.html is improved roughly by 2%:
2259         - originally: median= 282.051282051 runs/s, stdev= 1.51236798322 runs/s, min= 278.481012658 runs/s, max= 283.870967742 runs/s
2260         - with patch applied: median= 287.206266319 runs/s, stdev= 1.31518320219 runs/s, min= 282.051282051 runs/s, max= 288.713910761 runs/s
2261
2262         No new tests, as there is no client-visible behavior change. Existing Inspector tests will be modified
2263         to test the new data provided, along with the necessary Inspector plumbing.
2264
2265         * css/CSSGrammar.y:
2266         * css/CSSMediaRule.cpp:
2267         (WebCore::CSSMediaRule::reattach): Check for mediaQueries() validity before reattaching.
2268         * css/CSSParser.cpp: Unless explicitly specified below, the method changes are related to the extension of the
2269         source-based CSS model provided by the parser.
2270         (WebCore::CSSParser::CSSParser):
2271         (WebCore::CSSParser::setupParser):
2272         (WebCore::CSSParser::parseDeclaration): Accept a CSSRuleSourceData for filling, since it now contains
2273         the related style source range.
2274         (WebCore::CSSParser::createImportRule):
2275         (WebCore::CSSParser::createMediaRule): Create CSSMediaRule even if media and rules are empty,
2276         which is consistent with Mozilla.
2277         (WebCore::CSSParser::processAndAddNewRuleToSourceTreeIfNeeded):
2278         (WebCore):
2279         (WebCore::CSSParser::addNewRuleToSourceTree):
2280         (WebCore::CSSParser::createKeyframesRule):
2281         (WebCore::CSSParser::createStyleRule):
2282         (WebCore::CSSParser::createFontFaceRule):
2283         (WebCore::CSSParser::createPageRule):
2284         (WebCore::CSSParser::createRegionRule):
2285         (WebCore::CSSParser::fixUnparsedPropertyRanges):
2286         (WebCore::CSSParser::markRuleHeaderStart):
2287         (WebCore::CSSParser::markRuleHeaderEnd):
2288         (WebCore::CSSParser::markRuleBodyStart):
2289         (WebCore::CSSParser::markRuleBodyEnd):
2290         (WebCore::CSSParser::markPropertyStart):
2291         (WebCore::CSSParser::markPropertyEnd):
2292         * css/CSSParser.h:
2293         (CSSParser):
2294         * css/CSSPropertySourceData.h: Extend the model to handle more types of rules and their containments.
2295         (WebCore):
2296         (WebCore::CSSRuleSourceData::create):
2297         (WebCore::CSSRuleSourceData::createUnknown):
2298         (CSSRuleSourceData):
2299         (WebCore::CSSRuleSourceData::CSSRuleSourceData):
2300         * inspector/InspectorStyleSheet.cpp: Follow the CSSParser API changes but retain the flat stored CSS rules structure.
2301         (ParsedStyleSheet):
2302         (flattenSourceData): Flatten the rule tree to retain the existing rule-handling code intact.
2303         (ParsedStyleSheet::setSourceData):
2304         (ParsedStyleSheet::ruleSourceDataAt):
2305         (WebCore::InspectorStyle::buildObjectForStyle):
2306         (WebCore::InspectorStyle::setPropertyText):
2307         (WebCore::InspectorStyle::styleText):
2308         (WebCore::InspectorStyleSheet::setRuleSelector):
2309         (WebCore::InspectorStyleSheet::deleteRule):
2310         (WebCore::InspectorStyleSheet::buildObjectForRule):
2311         (WebCore::InspectorStyleSheet::buildObjectForStyle):
2312         (WebCore::InspectorStyleSheet::ensureSourceData):
2313         (WebCore::InspectorStyleSheet::styleSheetTextWithChangedStyle):
2314         (WebCore::InspectorStyleSheetForInlineStyle::ensureParsedDataReady):
2315         (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
2316         * inspector/InspectorStyleSheet.h:
2317
2318 2012-06-29  Vsevolod Vlasov  <vsevik@chromium.org>
2319
2320         Web Inspector: Annotate TextViewer.js
2321         https://bugs.webkit.org/show_bug.cgi?id=90266
2322
2323         Reviewed by Yury Semikhatsky.
2324
2325         Annotated TextViewer.js and fixed found errors.
2326         Drive-by: Fixed NativeMemorySnapshotView.js compilation.
2327         Drive-by: Fixed protocol-externs.js compilation.
2328         Drive-by: Removed unused platform parameter from TextViewer constructor.
2329
2330         * inspector/Inspector.json:
2331         * inspector/InspectorDebuggerAgent.cpp:
2332         (WebCore::InspectorDebuggerAgent::runScript):
2333         * inspector/InspectorDebuggerAgent.h:
2334         (InspectorDebuggerAgent):
2335         * inspector/front-end/NativeMemorySnapshotView.js:
2336         (WebInspector.NativeMemoryBarChart.prototype._updateView):
2337         * inspector/front-end/SourceFrame.js:
2338         (WebInspector.SourceFrame):
2339         * inspector/front-end/TextViewer.js:
2340         (WebInspector.TextEditorMainPanel.prototype._updateHighlightsForRange):
2341
2342 2012-06-29  Eric Seidel  <eric@webkit.org>
2343
2344         Remove still more BUILDING_ON_LEOPARD branches now that no port supports leopard
2345         https://bugs.webkit.org/show_bug.cgi?id=90256
2346
2347         Reviewed by Ryosuke Niwa.
2348
2349         * platform/LocalizedStrings.cpp:
2350         (WebCore::imageTitle):
2351         * platform/graphics/cg/GraphicsContextCG.cpp:
2352         (WebCore::GraphicsContext::setAllowsFontSmoothing):
2353         * platform/graphics/cg/ImageCG.cpp:
2354         (WebCore::Image::drawPattern):
2355         * platform/graphics/cg/ImageSourceCG.cpp:
2356         (WebCore::ImageSource::clear):
2357         * platform/graphics/cg/PathCG.cpp:
2358         (WebCore::Path::boundingRect):
2359         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2360         (WebCore::FontPlatformData::ctFont):
2361         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2362         * platform/graphics/mac/ComplexTextController.cpp:
2363         * platform/graphics/mac/FontCacheMac.mm:
2364         (WebCore::fontCacheRegisteredFontsChangedNotificationCallback):
2365         (WebCore::FontCache::platformInit):
2366         * platform/graphics/mac/FontCustomPlatformData.cpp:
2367         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
2368         (WebCore::createFontCustomPlatformData):
2369         * platform/graphics/mac/FontCustomPlatformData.h:
2370         (WebCore::FontCustomPlatformData::FontCustomPlatformData):
2371         * platform/graphics/mac/SimpleFontDataMac.mm:
2372         (WebCore::SimpleFontData::platformInit):
2373         * platform/graphics/mac/WebLayer.h:
2374         * platform/mac/CursorMac.mm:
2375         (WebCore::Cursor::ensurePlatformCursor):
2376         * platform/mac/DisplaySleepDisabler.cpp:
2377         (WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
2378         (WebCore::DisplaySleepDisabler::~DisplaySleepDisabler):
2379         * platform/mac/DisplaySleepDisabler.h:
2380         (DisplaySleepDisabler):
2381         * platform/mac/HTMLConverter.h:
2382         * platform/mac/HTMLConverter.mm:
2383         * platform/mac/PopupMenuMac.mm:
2384         (WebCore::PopupMenuMac::populate):
2385         * platform/mac/ScrollElasticityController.mm:
2386
2387 2012-06-29  Zan Dobersek  <zandobersek@gmail.com>
2388
2389         Unreviewed attempt at a build fix for 64-bit debug build,
2390         touch InsertionPoint.cpp to try to get it rebuilt.
2391
2392         * html/shadow/InsertionPoint.cpp:
2393         (WebCore):
2394
2395 2012-06-29  Oswald Buddenhagen  <oswald.buddenhagen@nokia.com>
2396
2397         [Qt] Don't add Qt module dependencies in features.prf
2398
2399         The required dependencies are already added in WebCore.pri.
2400
2401         Reviewed by Tor Arne Vestbø.
2402
2403         * WebCore.pri:
2404
2405 2012-06-29  Taiju Tsuiki  <tzik@chromium.org>
2406
2407         Web Inspector: Add FileSystemView
2408         https://bugs.webkit.org/show_bug.cgi?id=73301
2409
2410         This patch introduce a split view as FileSystemView. Including directory tree as sidebar tree.
2411
2412         Reviewed by Vsevolod Vlasov.
2413
2414         Test: http/tests/inspector/filesystem/directory-tree.html
2415
2416         * WebCore.gypi:
2417         * WebCore.vcproj/WebCore.vcproj:
2418         * inspector/compile-front-end.py:
2419         * inspector/front-end/FileSystemModel.js:
2420         (WebInspector.FileSystemModel.Entry.compare):
2421         * inspector/front-end/FileSystemView.js: Added.
2422         * inspector/front-end/ResourcesPanel.js:
2423         (WebInspector.ResourcesPanel.prototype.showFileSystem):
2424         (WebInspector.FileSystemTreeElement.prototype.get itemURL):
2425         (WebInspector.FileSystemTreeElement.prototype.onattach):
2426         (WebInspector.FileSystemTreeElement.prototype._handleContextMenuEvent):
2427         (WebInspector.FileSystemTreeElement.prototype._refreshFileSystem):
2428         (WebInspector.FileSystemTreeElement.prototype.onselect):
2429         (WebInspector.FileSystemTreeElement.prototype.clear):
2430         * inspector/front-end/WebKit.qrc:
2431         * inspector/front-end/inspector.html:
2432
2433 2012-06-29  Kentaro Hara  <haraken@chromium.org>
2434
2435         [V8] Replace v8::Integer::New() with v8Integer() in custom bindings
2436         https://bugs.webkit.org/show_bug.cgi?id=90242
2437
2438         Reviewed by Yury Semikhatsky.
2439
2440         v8Integer() is a fast wrapper of v8::Integer::New().
2441         This patch replaces v8::Integer::New() with v8Integer() in custom bindings,
2442         and pass isolates.
2443
2444         No tests. No change in behavior.
2445
2446         * bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
2447         (WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator):
2448         (WebCore::V8CSSStyleDeclaration::namedPropertyQuery):
2449         * bindings/v8/custom/V8ClipboardCustom.cpp:
2450         (WebCore::V8Clipboard::typesAccessorGetter):
2451         * bindings/v8/custom/V8DOMStringMapCustom.cpp:
2452         (WebCore::V8DOMStringMap::namedPropertyQuery):
2453         (WebCore::V8DOMStringMap::namedPropertyEnumerator):
2454         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2455         (WebCore::WindowSetTimeoutImpl):
2456         * bindings/v8/custom/V8DataViewCustom.cpp:
2457         (WebCore::V8DataView::getInt8Callback):
2458         (WebCore::V8DataView::getUint8Callback):
2459         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
2460         (WebCore::V8HTMLInputElement::selectionStartAccessorGetter):
2461         (WebCore::V8HTMLInputElement::selectionEndAccessorGetter):
2462         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2463         (WebCore::V8HTMLOptionsCollection::lengthAccessorGetter):
2464         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2465         (WebCore::V8InjectedScriptHost::functionDetailsCallback):
2466         * bindings/v8/custom/V8MessageEventCustom.cpp:
2467         (WebCore::V8MessageEvent::portsAccessorGetter):
2468         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
2469         (WebCore::V8MutationCallback::handleEvent):
2470         * bindings/v8/custom/V8NodeListCustom.cpp:
2471         (WebCore::V8NodeList::namedPropertyGetter):
2472         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
2473         (WebCore::V8SQLTransaction::executeSqlCallback):
2474         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
2475         (WebCore::V8SQLTransactionSync::executeSqlCallback):
2476         * bindings/v8/custom/V8StorageCustom.cpp:
2477         (WebCore::V8Storage::namedPropertyEnumerator):
2478         (WebCore::V8Storage::indexedPropertyGetter):
2479         (WebCore::V8Storage::namedPropertyQuery):
2480         (WebCore::V8Storage::indexedPropertySetter):
2481         (WebCore::V8Storage::indexedPropertyDeleter):
2482         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2483         (WebCore::toV8Object):
2484         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
2485         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallback):
2486         * bindings/v8/custom/V8WorkerContextCustom.cpp:
2487         (WebCore::SetTimeoutOrInterval):
2488
2489 2012-06-29  Kentaro Hara  <haraken@chromium.org>
2490
2491         Unreviewed, rolling out r121520.
2492         http://trac.webkit.org/changeset/121520
2493         https://bugs.webkit.org/show_bug.cgi?id=90246
2494
2495         the performance optimization needs more investigation
2496
2497         * dom/DatasetDOMStringMap.cpp:
2498         (WebCore::convertPropertyNameToAttributeName):
2499         * dom/Element.cpp:
2500         (WebCore::Element::getAttributeNS):
2501         (WebCore::Element::removeAttribute):
2502         (WebCore::Element::removeAttributeNS):
2503         (WebCore::Element::getAttributeNode):
2504         (WebCore::Element::getAttributeNodeNS):
2505         (WebCore::Element::hasAttribute):
2506         (WebCore::Element::hasAttributeNS):
2507         * dom/Element.h:
2508         (Element):
2509         * dom/ElementAttributeData.cpp:
2510         (WebCore::ElementAttributeData::getAttributeNode):
2511         * dom/ElementAttributeData.h:
2512         (ElementAttributeData):
2513
2514 2012-06-29  Kentaro Hara  <haraken@chromium.org>
2515
2516         [V8] Replace v8::Integer::New() with v8Integer() in bindings/v8/*.{h,cpp}
2517         https://bugs.webkit.org/show_bug.cgi?id=90238
2518
2519         Reviewed by Yury Semikhatsky.
2520
2521         v8Integer() is a fast wrapper of v8::Integer::New().
2522         We can replace v8::Integer::New() with v8Integer()
2523         in bindings/v8/*.{h,cpp}. In addition, we pass isolate
2524         to v8Integer() where possible.
2525
2526         No tests. No change in behavior.
2527
2528         * bindings/v8/Dictionary.cpp:
2529         (WebCore::Dictionary::get):
2530         * bindings/v8/NPV8Object.cpp:
2531         (_NPN_Enumerate): Changed v8::None to 0, for consistency with other code.
2532         * bindings/v8/PageScriptDebugServer.cpp:
2533         (WebCore::PageScriptDebugServer::addListener):
2534         * bindings/v8/ScriptDebugServer.cpp:
2535         (WebCore::ScriptDebugServer::setBreakpoint):
2536         (WebCore::ScriptDebugServer::compileScript):
2537         * bindings/v8/SerializedScriptValue.cpp:
2538         * bindings/v8/V8Binding.cpp:
2539         (WebCore::v8Array):
2540         (WebCore::v8ValueToWebCoreDOMStringList):
2541         * bindings/v8/V8Binding.h:
2542         (WebCore::v8Array):
2543         (WebCore::v8NumberArrayToVector):
2544         * bindings/v8/V8Collection.h:
2545         (WebCore::nodeCollectionIndexedPropertyEnumerator):
2546         (WebCore::collectionIndexedPropertyEnumerator):
2547         * bindings/v8/V8LazyEventListener.cpp:
2548         (WebCore::V8LazyEventListener::prepareListenerObject):
2549         * bindings/v8/V8NPObject.cpp:
2550         (WebCore::npObjectQueryProperty):
2551         (WebCore::npObjectPropertyEnumerator):
2552         * bindings/v8/V8NPUtils.cpp:
2553         (WebCore::convertNPVariantToV8Object):
2554         * bindings/v8/V8Proxy.cpp:
2555         (WebCore::batchConfigureConstants):
2556         (WebCore::V8Proxy::compileScript):
2557         * bindings/v8/V8Utilities.cpp:
2558         (WebCore::createHiddenDependency):
2559         (WebCore::removeHiddenDependency):
2560         * bindings/v8/V8WindowErrorHandler.cpp:
2561         (WebCore::V8WindowErrorHandler::callListenerFunction):
2562         * bindings/v8/V8WorkerContextErrorHandler.cpp:
2563         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
2564         * bindings/v8/WorkerScriptDebugServer.cpp:
2565         (WebCore::WorkerScriptDebugServer::addListener):
2566
2567 2012-06-28  Vsevolod Vlasov  <vsevik@chromium.org>
2568
2569         Web Inspector: Resource content is not loaded if Resource.requestContent method is called before network request is finished.
2570         https://bugs.webkit.org/show_bug.cgi?id=90153
2571
2572         Reviewed by Yury Semikhatsky.
2573
2574         Test: http/tests/inspector/resource-tree/resource-request-content-while-loading.html
2575
2576         * inspector/front-end/NetworkRequest.js:
2577         * inspector/front-end/Resource.js:
2578         (WebInspector.Resource):
2579         (WebInspector.Resource.prototype.requestContent):
2580         (WebInspector.Resource.prototype._requestFinished):
2581
2582 2012-06-29  Sheriff Bot  <webkit.review.bot@gmail.com>
2583
2584         Unreviewed, rolling out r121529.
2585         http://trac.webkit.org/changeset/121529
2586         https://bugs.webkit.org/show_bug.cgi?id=90260
2587
2588         Failed to compile on Chromium WebKitMacBuilder (Requested by
2589         keishi on #webkit).
2590
2591         * platform/LocalizedStrings.cpp:
2592         (WebCore):
2593         * platform/graphics/cg/PathCG.cpp:
2594         (WebCore::Path::platformAddPathForRoundedRect):
2595         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2596         (WebCore::FontPlatformData::FontPlatformData):
2597         (WebCore::FontPlatformData::setFont):
2598         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2599         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
2600         * platform/graphics/mac/FontMac.mm:
2601         (WebCore::showGlyphsWithAdvances):
2602         * platform/graphics/mac/SimpleFontDataMac.mm:
2603         (WebCore):
2604         * platform/mac/CursorMac.mm:
2605         (WebCore::Cursor::ensurePlatformCursor):
2606         * platform/mac/MemoryPressureHandlerMac.mm:
2607         (WebCore):
2608         * platform/mac/PlatformEventFactoryMac.mm:
2609         (WebCore::momentumPhaseForEvent):
2610         (WebCore::phaseForEvent):
2611         * platform/mac/WebCoreSystemInterface.h:
2612         * platform/mac/WebCoreSystemInterface.mm:
2613         * platform/network/mac/ResourceHandleMac.mm:
2614         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2615         * platform/network/mac/ResourceRequestMac.mm:
2616         (WebCore::ResourceRequest::doUpdateResourceRequest):
2617         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2618         * platform/text/cf/HyphenationCF.cpp:
2619         * rendering/RenderThemeMac.mm:
2620         (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
2621
2622 2012-06-28  Vsevolod Vlasov  <vsevik@chromium.org>
2623
2624         Web Inspector: Add toggle breakpoint shortcut.
2625         https://bugs.webkit.org/show_bug.cgi?id=90188
2626
2627         Reviewed by Yury Semikhatsky.
2628
2629         * inspector/front-end/JavaScriptSourceFrame.js:
2630         (WebInspector.JavaScriptSourceFrame.prototype._onMouseDown):
2631         (WebInspector.JavaScriptSourceFrame.prototype._toggleBreakpoint):
2632         (WebInspector.JavaScriptSourceFrame.prototype.toggleBreakpointOnCurrentLine):
2633         * inspector/front-end/ScriptsPanel.js:
2634         (WebInspector.ScriptsPanel.prototype._toggleBreakpoint):
2635         (WebInspector.ScriptsPanel.prototype._showOutlineDialog):
2636         * inspector/front-end/TextViewer.js:
2637         (WebInspector.TextViewer.prototype.selection):
2638
2639 2012-06-28  Vsevolod Vlasov  <vsevik@chromium.org>
2640
2641         Web Inspector: Cursor should follow execution line when debugging.
2642         https://bugs.webkit.org/show_bug.cgi?id=90184
2643
2644         Reviewed by Yury Semikhatsky.
2645
2646         Added TextViewer.setSelection public method to set cursor selection in the editor.
2647         Added TextRange.createFromLocation method to create TextRanges with the same start and end points.
2648         Drive-by: removed unused _setCaretLocation() method in TextViewer.js
2649
2650         * inspector/front-end/JavaScriptSourceFrame.js:
2651         (WebInspector.JavaScriptSourceFrame.prototype.setExecutionLine):
2652         * inspector/front-end/ScriptsPanel.js:
2653         (WebInspector.ScriptsPanel.prototype._revealExecutionLine):
2654         (WebInspector.ScriptsPanel.prototype._editorSelected):
2655         * inspector/front-end/SourceFrame.js:
2656         (WebInspector.SourceFrame.prototype.setSelection):
2657         (WebInspector.SourceFrame.prototype.setContent):
2658         * inspector/front-end/TextEditorModel.js:
2659         (WebInspector.TextRange.createFromLocation):
2660         * inspector/front-end/TextViewer.js:
2661         (WebInspector.TextViewer.prototype.setSelection):
2662         (WebInspector.TextEditorMainPanel.prototype.highlightLine):
2663
2664 2012-06-27  Vsevolod Vlasov  <vsevik@chromium.org>
2665
2666         Web Inspector: IDBObjectStore.autoIncrement flag not exposed
2667         https://bugs.webkit.org/show_bug.cgi?id=89701
2668
2669         Reviewed by Yury Semikhatsky.
2670
2671         Plumbed objectStore.autoIncrement to inspector front-end and added it to tooltip.
2672
2673         * English.lproj/localizedStrings.js:
2674         * inspector/Inspector.json:
2675         * inspector/InspectorIndexedDBAgent.cpp:
2676         (WebCore):
2677         * inspector/front-end/IndexedDBModel.js:
2678         (WebInspector.IndexedDBModel.prototype._loadDatabase.callback):
2679         (WebInspector.IndexedDBModel.prototype._loadDatabase):
2680         (WebInspector.IndexedDBModel.ObjectStore):
2681         * inspector/front-end/ResourcesPanel.js:
2682         (WebInspector.IDBObjectStoreTreeElement.prototype._updateTooltip):
2683
2684 2012-06-28  Alexander Pavlov  <apavlov@chromium.org>
2685
2686         Use floating keyframe rule list when parsing @-webkit-keyframes and allow abrupt rule termination
2687         https://bugs.webkit.org/show_bug.cgi?id=90073
2688
2689         Reviewed by Antti Koivisto.
2690
2691         - The grammar is changed to allow abruptly terminated stylesheet in the @-webkit-keyframes (use closing_brace, not '}').
2692         - A floating StyleKeyframe vector is introduced to separate the creation and filling of StyleRuleKeyframes, as other rules do.
2693
2694         Test: fast/css/css-keyframe-unexpected-end.html
2695
2696         * css/CSSGrammar.y:
2697         * css/CSSParser.cpp:
2698         (WebCore::CSSParser::createFloatingKeyframeVector):
2699         (WebCore):
2700         (WebCore::CSSParser::sinkFloatingKeyframeVector):
2701         (WebCore::CSSParser::createKeyframesRule):
2702         * css/CSSParser.h:
2703
2704 2012-06-26  Yury Semikhatsky  <yurys@chromium.org>
2705
2706         Web Inspector: add character data to the DOM section of native memory view
2707         https://bugs.webkit.org/show_bug.cgi?id=89968
2708
2709         Reviewed by Vsevolod Vlasov.
2710
2711         Count strings referenced from CharacterData node and its descendants
2712         as part of the DOM tree structures in the native memory view.
2713
2714         * dom/CharacterData.cpp:
2715         (WebCore::CharacterData::reportMemoryUsage):
2716         (WebCore):
2717         * dom/CharacterData.h:
2718         (CharacterData):
2719         * dom/MemoryInstrumentation.h:
2720         (MemoryInstrumentation):
2721         (WebCore::MemoryObjectInfo::reportString):
2722         (MemoryObjectInfo):
2723         * inspector/InspectorMemoryAgent.cpp:
2724         (WebCore):
2725         (WebCore::domTreeInfo):
2726         (WebCore::jsExternalResourcesInfo):
2727         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
2728         * inspector/front-end/NativeMemorySnapshotView.js:
2729         (WebInspector.MemoryBlockViewProperties._initialize):
2730
2731 2012-06-29  Eric Seidel  <eric@webkit.org>
2732
2733         Remove more BUILDING_ON_LEOPARD branches now that no port builds on Leopard
2734         https://bugs.webkit.org/show_bug.cgi?id=90252
2735
2736         Reviewed by Ryosuke Niwa.
2737
2738         * platform/LocalizedStrings.cpp:
2739         (WebCore):
2740         * platform/graphics/cg/PathCG.cpp:
2741         (WebCore::Path::platformAddPathForRoundedRect):
2742         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2743         (WebCore::FontPlatformData::FontPlatformData):
2744         (WebCore::FontPlatformData::setFont):
2745         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2746         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText):
2747         * platform/graphics/mac/FontMac.mm:
2748         (WebCore::showGlyphsWithAdvances):
2749         * platform/graphics/mac/SimpleFontDataMac.mm:
2750         (WebCore):
2751         * platform/mac/CursorMac.mm:
2752         (WebCore::Cursor::ensurePlatformCursor):
2753         * platform/mac/MemoryPressureHandlerMac.mm:
2754         (WebCore):
2755         * platform/mac/PlatformEventFactoryMac.mm:
2756         (WebCore::momentumPhaseForEvent):
2757         (WebCore::phaseForEvent):
2758         * platform/mac/WebCoreSystemInterface.h:
2759         * platform/mac/WebCoreSystemInterface.mm:
2760         * platform/network/mac/ResourceHandleMac.mm:
2761         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2762         * platform/network/mac/ResourceRequestMac.mm:
2763         (WebCore::ResourceRequest::doUpdateResourceRequest):
2764         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2765         * platform/text/cf/HyphenationCF.cpp:
2766         * rendering/RenderThemeMac.mm:
2767         (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
2768
2769 2012-06-27  Vsevolod Vlasov  <vsevik@chromium.org>
2770
2771         Web Inspector: showConsole() should close previous view in drawer.
2772         https://bugs.webkit.org/show_bug.cgi?id=90070
2773
2774         Reviewed by Yury Semikhatsky.
2775
2776         * inspector/front-end/inspector.js:
2777         (WebInspector.showConsole):
2778         (WebInspector.showPanel):
2779
2780 2012-06-29  Ryosuke Niwa  <rniwa@webkit.org>
2781
2782         Remove a #include erroneously added in r120896.
2783
2784         * editing/VisibleSelection.h:
2785
2786 2012-06-29  Yoshifumi Inoue  <yosin@chromium.org>
2787
2788         [Platform] Implement Date Time format parser
2789         https://bugs.webkit.org/show_bug.cgi?id=89963
2790
2791         Reviewed by Kent Tamura.
2792
2793         This patch introduces Unicode TR35 LDML date time format parser for
2794         input type "time" if ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS) is true.
2795
2796         Test: WebKit/chromium/tests/DateTimeFormatTest.cpp
2797
2798         * CMakeLists.txt: Added DateTimeFormat.cpp
2799         * GNUmakefile.list.am: Added DateTimeFormat.{cpp,h}
2800         * Target.pri: ditto
2801         * WebCore.gypi: ditto
2802         * WebCore.vcproj/WebCore.vcproj: ditto
2803         * WebCore.xcodeproj/product.pbxproj: ditto
2804         * platform/text/DateTimeFormat.cpp: Added.
2805         (WebCore::mapCharacterToFieldTypeInternal):
2806         (WebCore::DateTimeFormat::DateTimeFormat):
2807         (WebCore::DateTimeFormat::mapCharacterToFieldType):
2808         (WebCore::DateTimeFormat::parse):
2809         * platform/text/DateTimeFormat.h: Added.
2810         (DateTimeFormat):
2811         (TokenHandler):
2812         (WebCore::DateTimeFormat::TokenHandler::~TokenHandler):
2813
2814 2012-06-29  Eric Seidel  <eric@webkit.org>
2815
2816         Remove more BUILDING_ON_LEOPARD usage in PLATFORM(MAC) code
2817         https://bugs.webkit.org/show_bug.cgi?id=85846
2818
2819         Reviewed by Adam Barth.
2820
2821         PLATFORM(MAC) has not supported Leopard for several months now.
2822         This change removes about 1/3 of the remaining BUILDING_ON_LEOPARD
2823         uses in the PLATFORM(MAC) codepaths.  PLATFORM(CHROMIUM) still
2824         supports BUILDING_ON_LEOPARD for now.
2825
2826         * WebCore.exp.in:
2827         * dom/Document.cpp:
2828         (WebCore::Document::updateRangesAfterChildrenChanged):
2829         (WebCore::Document::nodeChildrenWillBeRemoved):
2830         (WebCore::Document::nodeWillBeRemoved):
2831         (WebCore::Document::textInserted):
2832         (WebCore::Document::textRemoved):
2833         (WebCore::Document::textNodesMerged):
2834         (WebCore::Document::textNodeSplit):
2835         * editing/Editor.cpp:
2836         (WebCore::Editor::respondToChangedSelection):
2837         * editing/TypingCommand.cpp:
2838         (WebCore::TypingCommand::markMisspellingsAfterTyping):
2839         (WebCore::TypingCommand::typingAddedToOpenCommand):
2840         * editing/mac/EditorMac.mm:
2841         (WebCore::Editor::pasteWithPasteboard):
2842         * loader/EmptyClients.h:
2843         (EmptyEditorClient):
2844         * page/ContextMenuController.cpp:
2845         (WebCore::ContextMenuController::contextMenuItemSelected):
2846         (WebCore::ContextMenuController::createAndAppendSpellingAndGrammarSubMenu):
2847         (WebCore):
2848         (WebCore::ContextMenuController::populate):
2849         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
2850         * page/EditorClient.h:
2851         (EditorClient):
2852         * platform/LocalizedStrings.cpp:
2853         (WebCore::contextMenuItemTagSearchWeb):
2854         * platform/MemoryPressureHandler.cpp:
2855         (WebCore):
2856         * platform/SuddenTermination.h:
2857         (WebCore):
2858         * platform/graphics/ca/GraphicsLayerCA.cpp:
2859         (WebCore::GraphicsLayerCA::updateContentsImage):
2860         (WebCore::GraphicsLayerCA::constrainedSize):
2861         * platform/graphics/ca/PlatformCALayer.h:
2862         (PlatformCALayer):
2863         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
2864         (fromCAValueFunctionType):
2865         (PlatformCAAnimation::valueFunction):
2866         (PlatformCAAnimation::setValueFunction):
2867         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2868         (toCAFilterType):
2869         (PlatformCALayer::anchorPoint):
2870         (PlatformCALayer::setAnchorPoint):
2871         (PlatformCALayer::contentsTransform):
2872         (PlatformCALayer::setContentsTransform):
2873         (PlatformCALayer::isGeometryFlipped):
2874         (PlatformCALayer::setGeometryFlipped):
2875         (PlatformCALayer::acceleratesDrawing):
2876         (PlatformCALayer::setAcceleratesDrawing):
2877         (PlatformCALayer::setMinificationFilter):
2878         (PlatformCALayer::setMagnificationFilter):
2879         (PlatformCALayer::contentsScale):
2880         (PlatformCALayer::setContentsScale):
2881         * platform/graphics/ca/mac/TileCache.mm:
2882         (WebCore::TileCache::setScale):
2883         (WebCore::TileCache::setAcceleratesDrawing):
2884         (WebCore::TileCache::createTileLayer):
2885
2886 2012-06-29  Kwang Yul Seo  <skyul@company100.net>
2887
2888         Use StringBuilder in SegmentedString::toString()
2889         https://bugs.webkit.org/show_bug.cgi?id=90247
2890
2891         Reviewed by Adam Barth.
2892
2893         Use a StringBuilder instead of String concatenation because StringBuilder is generally faster.
2894         No new tests. Covered by existing tests.
2895
2896         * platform/text/SegmentedString.cpp:
2897         (WebCore::SegmentedString::toString):
2898         * platform/text/SegmentedString.h:
2899         (WebCore::SegmentedSubstring::appendTo):
2900
2901 2012-06-28  Ryosuke Niwa  <rniwa@webkit.org>
2902
2903         Mac build fix after r121518.
2904
2905         * WebCore.exp.in:
2906
2907 2012-06-28  Ryosuke Niwa  <rniwa@webkit.org>
2908
2909         DOMHTMLCollection::item may return a wrong element after namedItem is called
2910         https://bugs.webkit.org/show_bug.cgi?id=90240
2911
2912         Reviewed by Antti Koivisto.
2913
2914         The bug was caused by namedItem updating m_cache.current without updating m_cache.position.
2915         Fixed the bug by updating both. This is similar to the bug I fixed in r121478.
2916
2917         WebKit API Test: WebKit1.HTMLCollectionNamedItemTest
2918
2919         * html/HTMLCollection.cpp:
2920         (WebCore::HTMLCollection::namedItem):
2921
2922 2012-06-28  Kentaro Hara  <haraken@chromium.org>
2923
2924         Change argument types of Element::getAttribute*() from String to AtomicString
2925         https://bugs.webkit.org/show_bug.cgi?id=90246
2926
2927         Reviewed by Ryosuke Niwa.
2928
2929         This is a follow-up patch for r121439. r121439 changed an argument type of
2930         Element::getAttribute() from String to AtomicString, which optimized
2931         performance of Dromaeo/dom-attr.html. This patch changes other argument types
2932         of Element::getAttribute*() from String to AtomicString. See the ChangeLog in
2933         http://trac.webkit.org/changeset/121439 for more details about why this change
2934         optimizes performance.
2935
2936         No tests. No change in behavior.
2937
2938         * dom/DatasetDOMStringMap.cpp:
2939         (WebCore::convertPropertyNameToAttributeName):
2940         * dom/Element.cpp:
2941         (WebCore::Element::getAttributeNS):
2942         (WebCore::Element::removeAttribute):
2943         (WebCore::Element::removeAttributeNS):
2944         (WebCore::Element::getAttributeNode):
2945         (WebCore::Element::getAttributeNodeNS):
2946         (WebCore::Element::hasAttribute):
2947         (WebCore::Element::hasAttributeNS):
2948         * dom/Element.h:
2949         (Element):
2950         * dom/ElementAttributeData.cpp:
2951         (WebCore::ElementAttributeData::getAttributeNode):
2952         * dom/ElementAttributeData.h:
2953         (ElementAttributeData):
2954
2955 2012-06-28  Kent Tamura  <tkent@chromium.org>
2956
2957         REGRESSION(r106388): Form hidden element values being restored
2958         incorrectly for dynamically generated content
2959         https://bugs.webkit.org/show_bug.cgi?id=88685
2960
2961         Reviewed by Hajime Morita.
2962
2963         We should not save value attribute updated during parsing.
2964
2965         Test: fast/forms/state-restore-to-non-edited-controls.html
2966
2967         * html/HTMLInputElement.cpp:
2968         (WebCore::HTMLInputElement::HTMLInputElement):
2969         Initialize m_valueAttributeWasUpdatedAfterParsing.
2970         (WebCore::HTMLInputElement::parseAttribute):
2971         Set true to m_valueAttributeWasUpdatedAfterParsing if value
2972         attribute is updated and it's not in parsing.
2973         * html/HTMLInputElement.h:
2974         (WebCore::HTMLInputElement::valueAttributeWasUpdatedAfterParsing):
2975         Added for HiddenInputType.
2976         * html/HiddenInputType.cpp:
2977         (WebCore::HiddenInputType::saveFormControlState):
2978         Save the value only if valueAttributeWasUpdatedAfterParsing() is true.
2979
2980 2012-06-28  MORITA Hajime  <morrita@google.com>
2981
2982         [Refactoring] NodeRenderingContext ctor could be built on top of the ComposedShadowTreeWalker
2983         https://bugs.webkit.org/show_bug.cgi?id=89732
2984
2985         Reviewed by Dimitri Glazkov.
2986
2987         The constructor of NodeRenderingContext implements almost same
2988         logic as ComposedShadowTreeWalker::parent().  This change
2989         eliminates the duplication by employing ComposedShadowTreeWalker in the constructor.
2990
2991         ComposedShadowTreeWalker has same difference from
2992         NodeRenderingContext though. So this change also extends
2993         ComposedShadowTreeWalker to support these missing pieces, which
2994         are encapsulated in newly introduced ParentTranversalDetails
2995         class where:
2996
2997         - not only the parent, but also the insertion point of the child is returned,
2998         - resetStyleInheritance from the child-parent traversal is computed and
2999         - if the starting point is out of the composition, it returns null as a parent.
3000
3001         This change also inlines some ComposedShadowTreeWalker methods for speed.
3002
3003         No new tests. Covered by existing tests.
3004
3005         * WebCore.exp.in:
3006         * dom/ComposedShadowTreeWalker.cpp:
3007         (WebCore::shadowOfParent):
3008         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::didTraverseInsertionPoint):
3009         (WebCore):
3010         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::didTraverseShadowRoot):
3011         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::didFindNode):
3012         (WebCore::ComposedShadowTreeWalker::findParent):
3013         (WebCore::ComposedShadowTreeWalker::escapeFallbackContentElement):
3014         (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
3015         (WebCore::ComposedShadowTreeWalker::traverseParent):
3016         (WebCore::ComposedShadowTreeWalker::traverseParentInCurrentTree):
3017         (WebCore::ComposedShadowTreeWalker::traverseParentBackToYoungerShadowRootOrHost):
3018         * dom/ComposedShadowTreeWalker.h:
3019         (ParentTranversalDetails):
3020         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::ParentTranversalDetails):
3021         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::node):
3022         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::insertionPoint):
3023         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::resetStyleInheritance):
3024         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::outOfComposition):
3025         (WebCore::ComposedShadowTreeWalker::ParentTranversalDetails::childWasOutOfComposition):
3026         (ComposedShadowTreeWalker):
3027         (WebCore::ComposedShadowTreeWalker::ComposedShadowTreeWalker):
3028         (WebCore):
3029         * dom/NodeRenderingContext.cpp:
3030         (WebCore::NodeRenderingContext::NodeRenderingContext):
3031         (WebCore::NodeRenderingContext::nextRenderer):
3032         (WebCore::NodeRenderingContext::previousRenderer):
3033         (WebCore::NodeRenderingContext::parentRenderer):
3034         (WebCore::NodeRenderingContext::shouldCreateRenderer):
3035         (WebCore::NodeRenderingContext::isOnEncapsulationBoundary):
3036         * dom/NodeRenderingContext.h:
3037         (NodeRenderingContext):
3038         (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle):
3039         (WebCore::NodeRenderingContext::resetStyleInheritance):
3040         (WebCore::NodeRenderingContext::insertionPoint):
3041
3042 2012-06-28  Stephen White  <senorblanco@chromium.org>
3043
3044         Implement filter url() function.
3045         https://bugs.webkit.org/show_bug.cgi?id=72443
3046
3047         url() references can be internal, in which case the DOM nodes are
3048         retrieved directly from the current document, or external, in which
3049         case a CachedSVGDocument request is made, and the filter node build is
3050         deferred until the document is loaded.  WebKitSVGDocumentValue
3051         holds the CachedSVGDocument (if any) and the URL as a CSSValue,
3052         and is stored in the CSSValue chain as the argument to the reference
3053         filter.
3054
3055         One notable difference between internal and external references is
3056         that internal references will automatically update on an SVG filter node
3057         attribute change, while external references will not, since they live
3058         in a separate document.  This is consistent with the Mozilla
3059         implementation.  In order to make this work, the RenderLayer is made a
3060         client of the RenderSVGResourceContainer, and calls
3061         filterNeedsRepaint() when the SVG nodes are invalidated.
3062
3063         Some plumbing:  The CSS StyleResolver was refactored to load all
3064         all external resources (images, shaders and (now) SVG filters) in a
3065         single function, loadPendingResources().  The PlatformLayer typedef
3066         was moved out into its own file, in order to break a cyclic
3067         dependency.  SVGFilterBuilder was modified to accept the SourceGraphic
3068         and SourceAlpha FilterEffects in its constructor and factory function,
3069         rather than extracting them from the parent Filter.  (This is necessary
3070         so that the url() filter can correctly hook up its inputs from
3071         previous CSS filters.)
3072
3073         Reviewed by Dean Jackson.
3074
3075         Tests: css3/filters/effect-reference-external.html
3076                css3/filters/effect-reference-hw.html
3077                css3/filters/effect-reference-ordering.html
3078                css3/filters/effect-reference.html
3079
3080         * CMakeLists.txt:
3081         * GNUmakefile.list.am:
3082         * Target.pri:
3083         * WebCore.gypi:
3084         * WebCore.vcproj/WebCore.vcproj:
3085         * WebCore.xcodeproj/project.pbxproj:
3086         Add WebKitCSSSVGDocumentValue to the various build files.
3087         * css/CSSComputedStyleDeclaration.cpp:
3088         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
3089         Use the reference filter's url when getting the computed style for
3090         a reference filter.
3091         * css/CSSParser.cpp:
3092         (WebCore::CSSParser::parseFilter):
3093         Create the referenceFilterValue's argument as a
3094         WebKitCSSSVGDocumentValue instead of a CSS string.
3095         * css/CSSValue.cpp:
3096         (WebCore::CSSValue::cssText):
3097         Add support for WebKitCSSSVGDocumentValue.
3098         (WebCore::CSSValue::destroy):
3099         Add support for WebKitCSSSVGDocumentValue.
3100         * css/CSSValue.h:
3101         (WebCore::CSSValue::isWebKitCSSSVGDocumentValue):
3102         Add support for WebKitCSSSVGDocumentValue.
3103         * css/StyleResolver.cpp:
3104         (WebCore::StyleResolver::collectMatchingRulesForList):
3105         Keep track of pending SVG document references, and load them when
3106         necessary.
3107         * css/StyleResolver.h:
3108         * css/WebKitCSSSVGDocumentValue.cpp: Added.
3109         New CSSValue subclass for holding SVG document references.
3110         (WebCore::WebKitCSSSVGDocumentValue::WebKitCSSSVGDocumentValue):
3111         (WebCore::WebKitCSSSVGDocumentValue::~WebKitCSSSVGDocumentValue):
3112         (WebCore::WebKitCSSSVGDocumentValue::load):
3113         (WebCore::WebKitCSSSVGDocumentValue::customCssText):
3114         * css/WebKitCSSSVGDocumentValue.h: Added.
3115         (WebCore::WebKitCSSSVGDocumentValue::create):
3116         (WebCore::WebKitCSSSVGDocumentValue::cachedSVGDocument):
3117         (WebCore::WebKitCSSSVGDocumentValue::url):
3118         (WebCore::WebKitCSSSVGDocumentValue::loadRequested):
3119         * platform/graphics/GraphicsLayer.h:
3120         Refactor PlatformLayer out into its own file, to avoid circular
3121         includes.
3122         * platform/graphics/ImageBuffer.h:
3123         Include PlatformLayer.h instead of GraphicsLayer.h.
3124         * platform/graphics/PlatformLayer.h: Added.
3125         Refactor PlatformLayer out into its own file, to avoid circular
3126         includes.
3127         * platform/graphics/filters/FilterOperation.h:
3128         (WebCore::ReferenceFilterOperation::create):
3129         (WebCore::ReferenceFilterOperation::clone):
3130         (WebCore::ReferenceFilterOperation::url):
3131         (WebCore::ReferenceFilterOperation::fragment):
3132         (ReferenceFilterOperation):
3133         (WebCore::ReferenceFilterOperation::data):
3134         (WebCore::ReferenceFilterOperation::setData):
3135         (WebCore::ReferenceFilterOperation::operator==):
3136         (WebCore::ReferenceFilterOperation::ReferenceFilterOperation):
3137         Augment ReferenceFilterOperation to maintain a data pointer,
3138         in order to preserve context while loading external SVG documents.
3139         Replace "reference" with "url" and "fragment" members, in order to
3140         ease retrieval of the appropriate DOM objects.
3141         * platform/graphics/filters/FilterOperations.cpp:
3142         (WebCore::FilterOperations::hasReferenceFilter):
3143         Convenience function for finding reference filters.
3144         * platform/graphics/filters/FilterOperations.h:
3145         (FilterOperations):
3146         * platform/mac/ScrollbarThemeMac.mm:
3147         Include GraphicsLayer.h explicitly, since ImageBuffer.h no longer
3148         includes it (and only includes PlatformLayer.h).
3149         * rendering/FilterEffectRenderer.cpp:
3150         (WebCore::FilterEffectRenderer::buildReferenceFilter):
3151         Utility function to build a FilterEffect node graph for a
3152         ReferenceFilterOperation.
3153         (WebCore::FilterEffectRenderer::build):
3154         Call the above builder function for ReferenceFilterOperations.
3155         * rendering/FilterEffectRenderer.h:
3156         * rendering/RenderLayer.cpp:
3157         (WebCore::RenderLayer::updateOrRemoveFilterEffect):
3158         If we have reference filters, update them along with other filters.
3159         (WebCore::RenderLayer::filterNeedsRepaint):
3160         * rendering/RenderLayerFilterInfo.cpp:
3161         (WebCore::RenderLayerFilterInfo::~RenderLayerFilterInfo):
3162         (WebCore::RenderLayerFilterInfo::notifyFinished):
3163         Implement callback function when external SVGDocuments are loaded.
3164         (WebCore::RenderLayerFilterInfo::updateReferenceFilterClients):
3165         Add the FilterInfo as a client to be called when SVGDocuments are
3166         loaded.
3167         (WebCore::RenderLayerFilterInfo::removeReferenceFilterClients):
3168         Remove this from the list of notified clients.
3169         * rendering/RenderLayerFilterInfo.h:
3170         Add new member vars for tracking internal and external SVG
3171         references, so we can remove ourselves as a client when done.
3172         * rendering/svg/RenderSVGResourceContainer.cpp:
3173         (WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation):
3174         When marking client DOM nodes for repaint, also mark any RenderLayers
3175         referring to this DOM tree via filters as needing repaint.
3176         (WebCore::RenderSVGResourceContainer::addClientRenderLayer):
3177         (WebCore::RenderSVGResourceContainer::removeClientRenderLayer):
3178         * rendering/svg/RenderSVGResourceContainer.h:
3179         Maintain a list of RenderLayer clients on each SVG resource container,
3180         and turn SVG DOM repaint notifications into filter repaint (CSS)
3181         notifications.
3182         * rendering/svg/RenderSVGResourceFilter.cpp:
3183         (WebCore::RenderSVGResourceFilter::buildPrimitives):
3184         Construct a SourceGraphic and SourceAlpha node explicitly for the
3185         SVG builder case.
3186         * svg/graphics/filters/SVGFilterBuilder.cpp:
3187         (WebCore::SVGFilterBuilder::SVGFilterBuilder):
3188         * svg/graphics/filters/SVGFilterBuilder.h:
3189         (WebCore::SVGFilterBuilder::create):
3190         Add the SourceGraphic and SourceAlpha as parameters to the constructor
3191         and create() methods, so they can be supplied by the caller.
3192
3193 2012-06-28  Kenichi Ishibashi  <bashi@chromium.org>
3194
3195         [Chromium] CTFontCopyTable of MacOSX10.5 SDK doesn't work for layout tables
3196         https://bugs.webkit.org/show_bug.cgi?id=90235
3197
3198         Reviewed by Kent Tamura.
3199
3200         Use CGFontCopyTableForTag instead.
3201
3202         No new tests. css3/font-feature-settings-rendering.html should pass. I'll rebase expectations once bots get the result.
3203
3204         * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp:
3205         (WebCore::harfbuzzCoreTextGetTable):
3206
3207 2012-06-28  Philip Rogers  <pdr@google.com>
3208
3209         Add preventative assert in SVGTRefElement
3210         https://bugs.webkit.org/show_bug.cgi?id=90203
3211
3212         Reviewed by Abhishek Arya.
3213
3214         SVGTRefElement::detachTarget() adds a pending resource via addPendingResource.
3215         Due to some recent bugs in this area, an assert is being added to prevent
3216         users from calling detachTarget when not in a document. Doing
3217         so would create a bug such as in WK90042.
3218
3219         This assert will not fire currently because detachTarget is only called after
3220         a DOMNodeRemovedFromDocumentEvent event fires, which only comes from
3221         dispatchChildRemovalEvents when the node is in a document.
3222
3223         * svg/SVGTRefElement.cpp:
3224         (WebCore::SVGTRefElement::detachTarget):
3225
3226 2012-06-28  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
3227
3228         [Qt] Remove unnecessary AffineTransform calls
3229         https://bugs.webkit.org/show_bug.cgi?id=90178
3230
3231         Reviewed by Noam Rosenthal.
3232
3233         Qt currently ignores the const AffineTransform& parameter on
3234         Pattern::createPlatformPattern, so removing it from all its Qt calls and
3235         changing the function signature if platform is Qt.
3236
3237         * platform/graphics/Pattern.h:
3238         (Pattern):
3239         * platform/graphics/qt/FontQt.cpp:
3240         (WebCore::fillPenForContext):
3241         (WebCore::strokePenForContext):
3242         * platform/graphics/qt/FontQt4.cpp:
3243         (WebCore::fillPenForContext):
3244         (WebCore::strokePenForContext):
3245         * platform/graphics/qt/GraphicsContextQt.cpp:
3246         (WebCore::GraphicsContext::fillPath):
3247         (WebCore::GraphicsContext::strokePath):
3248         (WebCore::drawRepeatPattern):
3249         * platform/graphics/qt/PatternQt.cpp:
3250         (WebCore::Pattern::createPlatformPattern):
3251
3252 2012-06-28  No'am Rosenthal  <noam.rosenthal@nokia.com>
3253
3254         [Qt] When uploading an opaque image to a texture for TextureMapper, unnecessary alpha operations take place
3255         https://bugs.webkit.org/show_bug.cgi?id=90229
3256
3257         Reviewed by Luiz Agostini.
3258
3259         For opaque web content in WebKit2, we use the RGB32 image format. When we special-case
3260         it in GraphicsContext3DQt, we can avoid any alpha operations and perform a regular copy.
3261
3262         Covered existing API tests, as this code path is always used when rendering.
3263
3264         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3265         (WebCore::GraphicsContext3D::getImageData):
3266
3267 2012-06-28  James Robinson  <jamesr@chromium.org>
3268
3269         [chromium] Compile chromium compositor implementation files into separate .lib
3270         https://bugs.webkit.org/show_bug.cgi?id=90233
3271
3272         Reviewed by Adam Barth.
3273
3274         * WebCore.gyp/WebCore.gyp:
3275
3276 2012-06-28  Erik Arvidsson  <arv@chromium.org>
3277
3278         [V8] NodeList wrappers are not kept alive as needed
3279         https://bugs.webkit.org/show_bug.cgi?id=90194
3280
3281         Reviewed by Ojan Vafai.
3282
3283         We need to add custom reachability code for DynamicNodeLists. If the owner of
3284         a DynamicNodeList is reachable then the DynamicNodeList must also be reachable.
3285
3286         Test: fast/dom/NodeList/nodelist-reachable.html
3287
3288         * bindings/v8/custom/V8NodeListCustom.cpp:
3289         (WebCore::V8NodeList::visitDOMWrapper): AddImplicitReferences from the owner wrapper.
3290         (WebCore):
3291         * dom/NodeList.idl:
3292
3293 2012-06-28  Elliott Sprehn  <esprehn@gmail.com>
3294
3295         frameborder="no" on frameset is ignored if border attribute set
3296         https://bugs.webkit.org/show_bug.cgi?id=17767
3297
3298         Reviewed by Tony Chang.
3299
3300         Fixes <frameset> frameborder and border handling. Previously we'd
3301         override the frameborder=no setting if border was set. We also
3302         treated frameborder="anything" the same as frameborder=0 since we
3303         we just converted it to a number so frameborder=yes was incorrectly
3304         treated the same as frameborder=no.
3305
3306         Tests: fast/frames/frameset-frameborder-boolean-values.html
3307                fast/frames/frameset-frameborder-inheritance.html
3308                fast/frames/frameset-frameborder-overrides-border.html
3309
3310         * html/HTMLFrameSetElement.cpp: Proper parsing of yes,no,1,0 values.
3311         (WebCore::HTMLFrameSetElement::parseAttribute):
3312         * html/HTMLFrameSetElement.h:
3313         (WebCore::HTMLFrameSetElement::border): Border should be 0 if frameborder=no.
3314
3315 2012-06-28  Joshua Bell  <jsbell@chromium.org>
3316
3317         IndexedDB: Implement IDBTransaction internal active flag
3318         https://bugs.webkit.org/show_bug.cgi?id=89379
3319
3320         Reviewed by Tony Chang.
3321
3322         IDB transactions should only be "active" during IDB success/error callbacks;
3323         attempts to make new requests otherwise (e.g. in a setTimeout callback)
3324         should fail even if the transaction has not yet finished. Implement this logic,
3325         and the closely related requirement that transactions are deactivated when
3326         the context they were created in returns to the event loop, and finally that
3327         when so deactivated they should commit rather than abort (as previously
3328         implemented) if no requests have been filed.
3329
3330         Tests: storage/indexeddb/transaction-active-flag.html
3331                storage/indexeddb/transaction-complete-with-js-recursion-cross-frame.html
3332                storage/indexeddb/transaction-complete-with-js-recursion.html
3333                storage/indexeddb/transaction-complete-workers.html
3334
3335         * Modules/indexeddb/IDBPendingTransactionMonitor.cpp: Simplify API.
3336         (WebCore::transactions):
3337         (WebCore::IDBPendingTransactionMonitor::addNewTransaction):
3338         (WebCore::IDBPendingTransactionMonitor::deactivateNewTransactions):
3339         * Modules/indexeddb/IDBPendingTransactionMonitor.h:
3340         (WebCore):
3341         (IDBPendingTransactionMonitor):
3342         * Modules/indexeddb/IDBRequest.cpp: Unregisters from transaction when done,
3343         not on destruction. No longer responsible for working with the pending monitor.
3344         (WebCore::IDBRequest::IDBRequest):
3345         (WebCore::IDBRequest::~IDBRequest):
3346         (WebCore::IDBRequest::markEarlyDeath):
3347         (WebCore::IDBRequest::resetReadyState):
3348         (WebCore::IDBRequest::onSuccess):
3349         (WebCore::IDBRequest::dispatchEvent): Set active flag on transaction during callback.
3350         * Modules/indexeddb/IDBTransaction.cpp: Use state enum to better track lifecycle, and
3351         take ownership of relationship with pending monitor.
3352         (WebCore::IDBTransaction::IDBTransaction): Special cases for version change
3353         transactions.
3354         (WebCore::IDBTransaction::~IDBTransaction):
3355         (WebCore::IDBTransaction::error):
3356         (WebCore::IDBTransaction::setError):
3357         (WebCore::IDBTransaction::objectStore):
3358         (WebCore::IDBTransaction::objectStoreCreated):
3359         (WebCore::IDBTransaction::objectStoreDeleted):
3360         (WebCore::IDBTransaction::setActive): Let IDBRequest and IDBPendingTransactionMonitor
3361         toggle the active state. Needs some smarts because (1) state may move to Finishing during
3362         the request's dispatch phase due to an implicit/explicit abort, and (2) a monitor call
3363         will only trigger a commit if the transaction hasn't had any requests filed.
3364         (WebCore):
3365         (WebCore::IDBTransaction::abort):
3366         (WebCore::IDBTransaction::registerRequest):
3367         (WebCore::IDBTransaction::unregisterRequest):
3368         (WebCore::IDBTransaction::onAbort):
3369         (WebCore::IDBTransaction::onComplete):
3370         (WebCore::IDBTransaction::hasPendingActivity):
3371         (WebCore::IDBTransaction::dispatchEvent):
3372         (WebCore::IDBTransaction::canSuspend):
3373         (WebCore::IDBTransaction::enqueueEvent):
3374         * Modules/indexeddb/IDBTransaction.h:
3375         (WebCore::IDBTransaction::isFinished):
3376         (IDBTransaction):
3377         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
3378         (WebCore::IDBTransactionBackendImpl::commit): Allow explicit commit() calls from the front end
3379         if no requests have been filed.
3380         * Modules/indexeddb/IDBTransactionBackendInterface.h:
3381         (IDBTransactionBackendInterface): Expose commit() method.
3382         * bindings/js/JSMainThreadExecState.cpp:
3383         (WebCore::JSMainThreadExecState::didLeaveScriptContext): Change target function name.
3384         * bindings/v8/V8RecursionScope.cpp:
3385         (WebCore::V8RecursionScope::didLeaveScriptContext): Change target function name.
3386
3387 2012-06-28  Philip Rogers  <pdr@google.com>
3388
3389         Prevent crash in animate resource handling
3390         https://bugs.webkit.org/show_bug.cgi?id=90042
3391
3392         Reviewed by Abhishek Arya.
3393
3394         This patch adds a check that we are in a document before registering animation
3395         resources and creating a target element in SVGSMILElement. This prevents a crash where
3396         we would register resources and create the target when we were not in a document
3397         but fail to deregister / reset the target when we were removed from a document.
3398         In failing to reset the target, we can crash when trying to deregister resources that
3399         were not created after being inserted into a document and then removed.
3400
3401         The existence of m_targetResources and registered animation resources is now
3402         tied to being in a document.
3403
3404         Test: svg/custom/animate-reference-crash.html
3405
3406         * svg/animation/SVGSMILElement.cpp:
3407         (WebCore::SVGSMILElement::targetElement):
3408
3409 2012-06-28  Joshua Bell  <jsbell@chromium.org>
3410
3411         IndexedDB: IDBDatabase should have a close pending field.
3412         https://bugs.webkit.org/show_bug.cgi?id=71129
3413
3414         Reviewed by Tony Chang.
3415
3416         Handle the IDB spec case that "versionchange" events should not be fired 
3417         against connections that have the internal "closePending" flag set but 
3418         are not yet closed due to running transactions.
3419
3420         Test: storage/indexeddb/database-closepending-flag.html
3421
3422         * Modules/indexeddb/IDBDatabase.cpp:
3423         (WebCore::IDBDatabase::onVersionChange):
3424
3425 2012-06-28  Adrienne Walker  <enne@google.com>
3426
3427         [chromium] Split WebScrollbar into WebPluginScrollbar and WebScrollbar
3428         https://bugs.webkit.org/show_bug.cgi?id=90117
3429
3430         Reviewed by James Robinson.
3431
3432         Make WebCore also depend on Platform.
3433
3434         * WebCore.gyp/WebCore.gyp:
3435
3436 2012-06-28  Hayato Ito  <hayato@chromium.org>
3437
3438         CompositeShadowTreeWalker should use InsertionPoint::hasDistribution() instead of InsertionPoint::isActive().
3439         https://bugs.webkit.org/show_bug.cgi?id=89177
3440
3441         Reviewed&nb