[BlackBerry] Pass String::StrictConversion instead of true to String::utf8()
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         [BlackBerry] Pass String::StrictConversion instead of true to String::utf8()
4         https://bugs.webkit.org/show_bug.cgi?id=111546
5
6         Reviewed by Rob Buis.
7
8         String::utf8() API changed in r134173.
9
10         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
11         (WebCore::MediaPlayerPrivate::notifyChallengeResult):
12
13 2013-03-06  Julien Chaffraix  <jchaffraix@webkit.org>
14
15         Remove the (dead) code for handling shorthands in StyleResolver / StyleBuilder
16         https://bugs.webkit.org/show_bug.cgi?id=111505
17
18         Unreviewed minimal build fix.
19
20         * css/StyleResolver.cpp:
21         (WebCore::StyleResolver::applyProperty):
22         Put CSSPropertyWebkitWrap under the proper if-guard.
23
24 2013-03-06  Vsevolod Vlasov  <vsevik@chromium.org>
25
26         Unreviewed follow up to r144928: front-end closure compilation fixes.
27
28         * inspector/front-end/FilteredItemSelectionDialog.js:
29         (WebInspector.JavaScriptOutlineDialog.prototype.dispose):
30         (WebInspector.OpenResourceDialog.prototype.dispose):
31         * inspector/front-end/StyleSheetOutlineDialog.js:
32         (WebInspector.StyleSheetOutlineDialog.prototype.dispose):
33
34 2013-03-06  Vsevolod Vlasov  <vsevik@chromium.org>
35
36         Web Inspector: Update open resource dialog when new uiSourceCodes are loaded.
37         https://bugs.webkit.org/show_bug.cgi?id=111327
38
39         Reviewed by Pavel Feldman.
40
41         * inspector/front-end/FilteredItemSelectionDialog.js:
42         (WebInspector.FilteredItemSelectionDialog):
43         (WebInspector.FilteredItemSelectionDialog.prototype.willHide):
44         (WebInspector.FilteredItemSelectionDialog.prototype._itemsLoaded):
45         (WebInspector.FilteredItemSelectionDialog.prototype._updateAfterItemsLoaded):
46         (WebInspector.FilteredItemSelectionDialog.prototype._filterItems.compareFunction):
47         (WebInspector.FilteredItemSelectionDialog.prototype._filterItems):
48         (WebInspector.SelectionDialogContentProvider.prototype.dispose):
49         (WebInspector.JavaScriptOutlineDialog.prototype._didBuildOutlineChunk):
50         (WebInspector.OpenResourceDialog):
51         (WebInspector.OpenResourceDialog.prototype.requestItems):
52         (WebInspector.OpenResourceDialog.prototype._filterUISourceCode):
53         (WebInspector.OpenResourceDialog.prototype._uiSourceCodeAdded):
54         (WebInspector.OpenResourceDialog.prototype.dispose):
55         * inspector/front-end/StyleSheetOutlineDialog.js:
56         (WebInspector.StyleSheetOutlineDialog.prototype.requestItems):
57         (WebInspector.StyleSheetOutlineDialog.prototype.requestItems.didGetStyleSheet):
58
59 2013-03-06  Vladislav Kaznacheev  <kaznacheev@chromium.org>
60
61         Web Inspector: Move sidebar-specific styles to a separate file.
62         https://bugs.webkit.org/show_bug.cgi?id=111173
63
64         Reviewed by Pavel Feldman.
65
66         * WebCore.gypi:
67         * inspector/front-end/BreakpointsSidebarPane.js:
68         (WebInspector.JavaScriptBreakpointsSidebarPane):
69         (WebInspector.EventListenerBreakpointsSidebarPane):
70         * inspector/front-end/NativeBreakpointsSidebarPane.js:
71         (WebInspector.NativeBreakpointsSidebarPane):
72         * inspector/front-end/SidebarPane.js:
73         (WebInspector.SidebarPaneTitle):
74         (WebInspector.SidebarPaneStack):
75         (WebInspector.SidebarTabbedPane):
76         * inspector/front-end/WebKit.qrc:
77         * inspector/front-end/breakpointsList.css: Added.
78         (.sidebar-pane > .body .breakpoint-condition):
79         (#breakpoint-condition-input):
80         (ol.breakpoint-list):
81         (.breakpoints-list-deactivated):
82         (.breakpoint-list li):
83         (.breakpoint-list li:hover):
84         (.breakpoint-list .checkbox-elem):
85         (.breakpoint-list .source-text):
86         (.sidebar-pane .breakpoint-hit):
87         (li.breakpoint-hit .breakpoint-hit-marker):
88         (.event-listener-breakpoints .event-category):
89         (.event-listener-breakpoints.properties-tree .children li):
90         (.event-listener-breakpoints .checkbox-elem):
91         * inspector/front-end/elementsPanel.css:
92         (.panel.elements .sidebar-pane-toolbar > select):
93         (.panel.elements .sidebar-pane-toolbar > select:hover):
94         (.panel.elements .sidebar-pane-toolbar > select:active):
95         (.panel.elements .sidebar-pane-toolbar > select.select-settings):
96         (.panel.elements .sidebar-pane-toolbar > select.select-filter):
97         (.panel.elements .sidebar-pane-toolbar > select > option, .panel.elements .sidebar-pane-toolbar > select > hr):
98         * inspector/front-end/inspector.css:
99         (.event-bar .event-properties):
100         * inspector/front-end/scriptsPanel.css:
101         (.workers-list > li):
102         (a.worker-item):
103         (a.worker-item:hover):
104         * inspector/front-end/sidebarPane.css: Added.
105         (.sidebar-pane):
106         (.sidebar-pane > .body):
107         (.sidebar-pane > .body .info):
108         (.sidebar-pane > .body .placard + .info):
109         (.sidebar-pane.visible > .body):
110         (.sidebar-pane .section .properties):
111         (.sidebar-tabbed-pane .tabbed-pane-header):
112         (.sidebar-pane-stack > .sidebar-pane.visible:nth-last-of-type(1)):
113         (.sidebar-pane-title):
114         (.sidebar-pane-title + .sidebar-pane-title, .pane:not(.visible) + .sidebar-pane-title, .sidebar-pane-title:first-of-type):
115         (.sidebar-pane-title:active):
116         (.sidebar-pane-title::before):
117         (.sidebar-pane-title.expanded::before):
118         (.sidebar-pane-toolbar):
119         (.sidebar-pane-toolbar > *):
120         (.sidebar-pane-toolbar > .pane-title-button):
121         (.sidebar-pane-toolbar > .pane-title-button:hover):
122         (.sidebar-pane-toolbar > .pane-title-button:active, .sidebar-pane-toolbar > .pane-title-button.toggled):
123         (.sidebar-pane-toolbar > .pane-title-button.add):
124         (.sidebar-pane-toolbar > .pane-title-button.element-state):
125         (.sidebar-pane-toolbar > .pane-title-button.refresh):
126         (.sidebar-pane-subtitle):
127         (body.platform-windows .sidebar-pane-subtitle):
128         (.sidebar-pane-subtitle input, .section .header input[type=checkbox]):
129
130 2013-03-06  Vladislav Kaznacheev  <kaznacheev@chromium.org>
131
132         Web Inspector: Combine style-related panes into a single tab when Elements panel is split horizontally.
133         https://bugs.webkit.org/show_bug.cgi?id=111550
134         Reviewed by Pavel Feldman.
135
136         Grouping the Elements sidebar panes into two tabbed panes proved to be
137         confusing and inconvenient. Put all the Elements sidebar panes into a single tabbed pane.
138         Combined Styles, Computed Style and Metrics into a single pane.
139
140         * inspector/front-end/ElementsPanel.js:
141         (WebInspector.ElementsPanel.prototype._splitVertically):
142         (WebInspector.ElementsPanel.prototype.addExtensionSidebarPane):
143         * inspector/front-end/elementsPanel.css:
144         (.sidebar-pane.composite):
145         (.sidebar-pane.composite > .body):
146         (.sidebar-pane.composite .metrics):
147         (.sidebar-pane.composite .sidebar-pane-toolbar):
148         (.sidebar-pane.composite .sidebar-pane-toolbar > .sidebar-pane-subtitle):
149         (.sidebar-pane.composite .styles-section.read-only):
150
151 2013-03-05  Yury Semikhatsky  <yurys@chromium.org>
152
153         Web Inspector: support stable remote object ids
154         https://bugs.webkit.org/show_bug.cgi?id=109908
155
156         Reviewed by Pavel Feldman.
157
158         Introduced a map from javascript object to its id. It guarantees
159         that object is assined id only once (unless it is explicitely
160         released). The map is per execution context and is stored in
161         InjectedScriptManager.
162
163         Test: inspector-protocol/persistent-id.html
164
165         * bindings/js/JSInjectedScriptHostCustom.cpp:
166         (WebCore::JSInjectedScriptHost::objectId):
167         (WebCore):
168         (WebCore::JSInjectedScriptHost::releaseObjectId):
169         * bindings/js/ScriptObject.h:
170         (WTF):
171         (WTF::ScriptObjectHash::hash):
172         (WTF::ScriptObjectHash::equal):
173         (ScriptObjectHash):
174         * bindings/v8/ScriptObject.h:
175         (WTF):
176         (WTF::ScriptObjectHash::hash):
177         (WTF::ScriptObjectHash::equal):
178         (ScriptObjectHash):
179         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
180         (WebCore::V8InjectedScriptHost::objectIdMethodCustom):
181         (WebCore):
182         (WebCore::V8InjectedScriptHost::releaseObjectIdMethodCustom):
183         * inspector/InjectedScriptHost.cpp:
184         (WebCore::InjectedScriptHost::create):
185         (WebCore::InjectedScriptHost::InjectedScriptHost):
186         (WebCore::InjectedScriptHost::disconnect):
187         (WebCore::InjectedScriptHost::objectId):
188         (WebCore):
189         (WebCore::InjectedScriptHost::releaseObjectId):
190         * inspector/InjectedScriptHost.h:
191         (WebCore):
192         (InjectedScriptHost):
193         * inspector/InjectedScriptHost.idl:
194         * inspector/InjectedScriptManager.cpp:
195         (InjectedScriptManager::ObjectIdMap):
196         (WebCore::InjectedScriptManager::ObjectIdMap::ObjectIdMap):
197         (WebCore::InjectedScriptManager::ObjectIdMap::objectId):
198         (WebCore::InjectedScriptManager::ObjectIdMap::releaseObjectId):
199         (WebCore):
200         (WebCore::InjectedScriptManager::InjectedScriptManager):
201         (WebCore::InjectedScriptManager::discardInjectedScripts):
202         (WebCore::InjectedScriptManager::discardInjectedScriptsFor):
203         (WebCore::InjectedScriptManager::objectId):
204         (WebCore::InjectedScriptManager::releaseObjectId):
205         * inspector/InjectedScriptManager.h:
206         (InjectedScriptManager):
207         * inspector/InjectedScriptSource.js:
208         (.):
209
210 2013-03-06  Marja Hölttä  <marja@chromium.org>
211
212         REGRESSION(r144617): Wrong usage of overwritten variable in toDOMWindow (V8Binding.cpp)
213         https://bugs.webkit.org/show_bug.cgi?id=111565
214
215         Reviewed by Jochen Eisinger.
216
217         In toDOMWindow, the variable "global" was first nuked, and then used again. This
218         change was introduced in r144617.
219
220         No new tests (no functional changes).
221
222         * bindings/v8/V8Binding.cpp:
223         (WebCore::toDOMWindow):
224
225 2013-03-06  Yury Semikhatsky  <yurys@chromium.org>
226
227         Web Inspector: use regular eval instead of injectScript for front-end extension API
228         https://bugs.webkit.org/show_bug.cgi?id=111529
229
230         Reviewed by Pavel Feldman.
231
232         Removed InjectedScriptManager::injectScript and replaced all of it calls
233         except the actual script injection with ScriptController::executeScript.
234
235         * inspector/InjectedScriptManager.cpp:
236         (WebCore::InjectedScriptManager::injectedScriptFor):
237         * inspector/InjectedScriptManager.h:
238         (InjectedScriptManager):
239         * inspector/InspectorAgent.cpp:
240         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
241         * inspector/InspectorPageAgent.cpp:
242         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
243         * inspector/front-end/DOMAgent.js:
244         (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged.get if):
245         * inspector/front-end/ExtensionAPI.js:
246         (buildExtensionAPIInjectedScript):
247         * inspector/front-end/ExtensionServer.js:
248         (WebInspector.ExtensionServer.prototype._onReload):
249
250 2013-03-06  Allan Sandfeld Jensen  <allan.jensen@digia.com>
251
252         [Qt] Do not disable C++0x
253         https://bugs.webkit.org/show_bug.cgi?id=111559
254
255         Reviewed by Kenneth Rohde Christiansen.
256
257         * WebCore.pri:
258
259 2013-03-06  Julien Chaffraix  <jchaffraix@webkit.org>
260
261         Remove the (dead) code for handling shorthands in StyleResolver / StyleBuilder
262         https://bugs.webkit.org/show_bug.cgi?id=111505
263
264         Reviewed by Alexis Menard.
265
266         The CSS parsing code expands shorthands (with the exception of 'font') to their longhands.
267         This means that all the code in StyleResolver / StyleBuilder to handle shorthands is basically
268         dead and shouldn't be there. The reason for it to be is that people didn't know about shorthands
269         expansion and thus copied existing code.
270
271         This change addresses both issues by removing the code and adding ASSERTs that should prevent people
272         from adding more dead code.
273
274         Refactoring, covered by existing tests.
275
276         * css/StylePropertyShorthand.h: Added isExpandedShorthand.
277         * css/StylePropertyShorthand.cpp:
278         (WebCore::isExpandedShorthand):
279         Added this function that ignores 'font' as it is the only shorthand that is no consistently expanded
280         to account for system fonts.
281
282         * css/StyleBuilder.cpp:
283         (WebCore::StyleBuilder::StyleBuilder):
284         Removed the shorthands.
285
286         * css/StyleBuilder.h:
287         (WebCore::StyleBuilder::setPropertyHandler):
288         Added ASSERTs that people don't add shorthand handling.
289
290         * css/StyleResolver.cpp:
291         (WebCore::isValidVisitedLinkProperty):
292         Removed all the shorthands (shouldn't be reachable unless the ASSERT in applyProperty
293         triggers).
294
295         (WebCore::StyleResolver::applyProperty):
296         Removed all shorthand handling code, moved the shorthands together and added some ASSERT
297         to ensure people don't abuse the code and re-add some of it back by mistake.
298
299 2013-03-05  Kent Tamura  <tkent@chromium.org>
300
301         Rename WebCore/editing/visible_units.* to VisibleUnits.*
302         https://bugs.webkit.org/show_bug.cgi?id=111426
303
304         Reviewed by Alexey Proskuryakov.
305
306         No new tests. Just a refactoring.
307
308         * CMakeLists.txt:
309         * GNUmakefile.list.am:
310         * Target.pri:
311         * WebCore.gypi:
312         * WebCore.vcproj/WebCore.vcproj:
313         * WebCore.vcxproj/WebCore.vcxproj:
314         * WebCore.vcxproj/WebCore.vcxproj.filters:
315         * WebCore.xcodeproj/project.pbxproj:
316         * accessibility/AccessibilityNodeObject.cpp:
317         * accessibility/AccessibilityObject.cpp:
318         * accessibility/AccessibilityRenderObject.cpp:
319         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
320         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
321         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
322         * dom/Position.cpp:
323         * dom/Range.cpp:
324         * editing/AlternativeTextController.cpp:
325         * editing/ApplyBlockElementCommand.cpp:
326         * editing/ApplyStyleCommand.cpp:
327         * editing/CompositeEditCommand.cpp:
328         * editing/DeleteSelectionCommand.cpp:
329         * editing/EditingAllInOne.cpp:
330         * editing/EditingStyle.cpp:
331         * editing/Editor.cpp:
332         * editing/FormatBlockCommand.cpp:
333         * editing/FrameSelection.cpp:
334         * editing/IndentOutdentCommand.cpp:
335         * editing/InsertLineBreakCommand.cpp:
336         * editing/InsertListCommand.cpp:
337         * editing/InsertParagraphSeparatorCommand.cpp:
338         * editing/InsertTextCommand.cpp:
339         * editing/ReplaceSelectionCommand.cpp:
340         * editing/SurroundingText.cpp:
341         * editing/TextCheckingHelper.cpp:
342         * editing/TextIterator.cpp:
343         * editing/TypingCommand.cpp:
344         * editing/VisiblePosition.cpp:
345         * editing/VisibleSelection.cpp:
346         * editing/VisibleUnits.cpp: Copied from Source/WebCore/editing/visible_units.cpp.
347         * editing/VisibleUnits.h: Copied from Source/WebCore/editing/visible_units.h.
348         * editing/htmlediting.cpp:
349         * editing/markup.cpp:
350         * editing/visible_units.cpp: Removed.
351         * editing/visible_units.h: Removed.
352         * page/Frame.cpp:
353         * page/mac/FrameMac.mm:
354         * platform/win/EditorWin.cpp:
355
356 2013-03-06  Alexis Menard  <alexis@webkit.org>
357
358         Do not add CSSPropertyBorderImage shorthand part of the property list when parsing CSS border property
359         https://bugs.webkit.org/show_bug.cgi?id=111481
360
361         Reviewed by Julien Chaffraix.
362
363         After http://trac.webkit.org/changeset/135848 and more generally we do not 
364         add shorthand directly into the property list used afterwards to build
365         StylePropertySet but we rather expand the shorthand to add the
366         longhands. CSSPropertyBorderImage is a shorthand and it should follow
367         that rule, so when we successfully parsed CSS border property and we
368         should reset border-image then we should reset the longhands too.
369
370         Test: LayoutTests/inspector/styles/styles-new-API-expected.txt which
371         reflects the fact that we add longhands instead of the shorthand. All
372         the other tests should not regress.
373
374         * css/CSSParser.cpp:
375         (WebCore::CSSParser::parseValue):
376
377 2013-03-06  Luiz Agostini  <luiz.agostini@nokia.com>
378
379         Accelerated overflow scrolling for Coordinated Graphics.
380         https://bugs.webkit.org/show_bug.cgi?id=110323
381
382         Reviewed by Noam Rosenthal.
383
384         A scroll offset is applied to individual layers on UI process and the
385         web process is notified assynchronously.
386         The new API WKCoordinatedScene may be used to scroll layers in the UI process.
387
388         Tests will be added on bug #111140.
389
390         Scrolling coordinator is used to provide a ScrollableArea to CoordinatedGraphicsLayer.
391
392         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
393         (WebCore::ScrollingCoordinatorCoordinatedGraphics::scrollableAreaScrollLayerDidChange):
394         (WebCore):
395         (WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):
396         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
397         (ScrollingCoordinatorCoordinatedGraphics):
398
399         GraphicsLayerTextureMapper is responsible for receiving the 'did commit' messages and to pass
400         them to its TextureMapperLayer on the appropriated time.
401
402         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
403         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
404         (WebCore::GraphicsLayerTextureMapper::didCommitScrollOffset):
405         (WebCore):
406         (WebCore::GraphicsLayerTextureMapper::setIsScrollable):
407         (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
408         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
409         (WebCore::GraphicsLayerTextureMapper::setScrollClient):
410         (WebCore::GraphicsLayerTextureMapper::setID):
411         (GraphicsLayerTextureMapper):
412         (WebCore::GraphicsLayerTextureMapper::isScrollable):
413
414         TextureMapperLayer is responsible for applying the requested scroll offset and for
415         sending the commit messages to web process. It is also able to hittest layers and identify
416         the ones that are scrollable.
417
418         * platform/graphics/texmap/TextureMapperLayer.cpp:
419         (WebCore::TextureMapperLayer::hitTest):
420         (WebCore):
421         (WebCore::TextureMapperLayer::scrollableLayerHitTestCondition):
422         (WebCore::TextureMapperLayer::findScrollableContentsLayerAt):
423         (WebCore::TextureMapperLayer::mapScrollOffset):
424         (WebCore::TextureMapperLayer::commitScrollOffset):
425         (WebCore::TextureMapperLayer::scrollBy):
426         (WebCore::TextureMapperLayer::didCommitScrollOffset):
427         * platform/graphics/texmap/TextureMapperLayer.h:
428         (TextureMapperLayer):
429         (ScrollingClient):
430         (WebCore::TextureMapperLayer::TextureMapperLayer):
431         (WebCore::TextureMapperLayer::setID):
432         (WebCore::TextureMapperLayer::id):
433         (WebCore::TextureMapperLayer::setScrollClient):
434         (WebCore::TextureMapperLayer::setIsScrollable):
435         (WebCore::TextureMapperLayer::isScrollable):
436         (WebCore::TextureMapperLayer::adjustedPosition):
437
438         CoordinatedGraphicsLayer receives the commit messages and updates its ScrollableArea.
439
440         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
441         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
442         (WebCore::CoordinatedGraphicsLayer::setScrollableArea):
443         (WebCore):
444         (WebCore::CoordinatedGraphicsLayer::commitScrollOffset):
445         (WebCore::CoordinatedGraphicsLayer::resetLayerState):
446         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
447         (WebCore):
448         (CoordinatedGraphicsLayer):
449         (WebCore::CoordinatedGraphicsLayer::isScrollable):
450
451         CoordinatedGraphicsScene receives the commit messages from TextureMapperLayer and
452         dispatches them on the main thread. It also has a new method that is used to find
453         the topmost scrollable layer at a given point.
454
455         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
456         (WebCore::CoordinatedGraphicsScene::setLayerState):
457         (WebCore::CoordinatedGraphicsScene::createLayer):
458         (WebCore::CoordinatedGraphicsScene::dispatchCommitScrollOffset):
459         (WebCore):
460         (WebCore::CoordinatedGraphicsScene::commitScrollOffset):
461         (WebCore::CoordinatedGraphicsScene::findScrollableContentsLayerAt):
462         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
463         (WebCore):
464         (CoordinatedGraphicsSceneClient):
465         (CoordinatedGraphicsScene):
466
467         New fields have been added to CoordinatedGraphicsLayerState.
468
469         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
470         (CoordinatedGraphicsLayerState):
471
472 2013-03-06  Allan Sandfeld Jensen  <allan.jensen@digia.com>
473
474         REGGRESSION (r142112): It made compositing tests fail on EFL, Qt.
475         https://bugs.webkit.org/show_bug.cgi?id=109291
476
477         Reviewed by Kenneth Rohde Christiansen.
478
479         Report we support fixed layers.
480
481         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
482         (WebCore::ScrollingCoordinatorCoordinatedGraphics::supportsFixedPositionLayers):
483         (ScrollingCoordinatorCoordinatedGraphics):
484
485 2013-03-06  Sheriff Bot  <webkit.review.bot@gmail.com>
486
487         Unreviewed, rolling out r144859.
488         http://trac.webkit.org/changeset/144859
489         https://bugs.webkit.org/show_bug.cgi?id=111519
490
491         Introduced a test that calls non-exist function on non-
492         Chromium ports and crash on Chromium (Requested by rniwa on
493         #webkit).
494
495         * html/HTMLAudioElement.h:
496         (WebCore::HTMLAudioElement::hasPendingActivity):
497         (HTMLAudioElement):
498         * html/HTMLAudioElement.idl:
499         * html/HTMLMediaElement.cpp:
500         (WebCore::HTMLMediaElement::hasPendingActivity):
501         * html/HTMLMediaElement.idl:
502
503 2013-03-06  Ilya Tikhonovsky  <loislo@chromium.org>
504
505         Web Inspector: Could not open Profiles panel.
506         https://bugs.webkit.org/show_bug.cgi?id=111535
507
508         Reviewed by Alexander Pavlov.
509
510         * inspector/front-end/CPUProfileView.js:
511         * inspector/front-end/ProfilesPanel.js:
512
513 2013-03-06  Tony Chang  <tony@chromium.org>
514
515         Crash during middle mouse click when page is removed
516         https://bugs.webkit.org/show_bug.cgi?id=111489
517
518         Reviewed by Hajime Morrita.
519
520         Check for a null page that can happen if we remove the document from the DOM.
521         The other methods in EventHandler also check for a null page.
522
523         Test: editing/pasteboard/selection-paste-crash.html
524
525         * page/EventHandler.cpp:
526         (WebCore::EventHandler::handlePasteGlobalSelection):
527
528 2013-03-05  Eric Seidel  <eric@webkit.org>
529
530         Replace shouldLazyAttach bool with an enum for readability
531         https://bugs.webkit.org/show_bug.cgi?id=111503
532
533         Reviewed by Dimitri Glazkov.
534
535         No behavioral change.
536
537         * bindings/cpp/WebDOMNodeCustom.cpp:
538         (WebDOMNode::insertBefore):
539         (WebDOMNode::replaceChild):
540         (WebDOMNode::appendChild):
541         * bindings/js/JSNodeCustom.cpp:
542         (WebCore::JSNode::insertBefore):
543         (WebCore::JSNode::replaceChild):
544         (WebCore::JSNode::appendChild):
545         * bindings/v8/custom/V8NodeCustom.cpp:
546         (WebCore):
547         (WebCore::V8Node::insertBeforeMethodCustom):
548         (WebCore::V8Node::replaceChildMethodCustom):
549         (WebCore::V8Node::appendChildMethodCustom):
550         * dom/ContainerNode.cpp:
551         (WebCore):
552         (WebCore::ContainerNode::insertBefore):
553         (WebCore::ContainerNode::replaceChild):
554         (WebCore::ContainerNode::appendChild):
555         (WebCore::updateTreeAfterInsertion):
556         * dom/ContainerNode.h:
557         (ContainerNode):
558         * dom/Node.cpp:
559         (WebCore::Node::insertBefore):
560         (WebCore::Node::replaceChild):
561         (WebCore::Node::appendChild):
562         * dom/Node.h:
563         (Node):
564         * editing/AppendNodeCommand.cpp:
565         (WebCore::AppendNodeCommand::doApply):
566         * editing/InsertNodeBeforeCommand.cpp:
567         (WebCore::InsertNodeBeforeCommand::doApply):
568         * html/shadow/MediaControlsApple.cpp:
569         (WebCore::MediaControlsApple::createControls):
570         * html/shadow/MediaControlsBlackBerry.cpp:
571         (WebCore::MediaControlsBlackBerry::createControls):
572         * html/shadow/MediaControlsChromium.cpp:
573         (WebCore::MediaControlsChromium::initializeControls):
574         * html/shadow/MediaControlsChromiumAndroid.cpp:
575         (WebCore::MediaControlsChromiumAndroid::createControls):
576
577 2013-03-05  Hajime Morrita  <morrita@google.com>
578
579         Custom Elements: CustomElementConstructor::m_name doesn't have any good use.
580         https://bugs.webkit.org/show_bug.cgi?id=111523
581
582         Reviewed by Kentaro Hara.
583
584         This change removes CustomElementConstructor::m_name and renames
585         m_tagName to m_name. Now generated function name is same as interface name.
586
587         Originally, m_name was added to specify the generated constructor
588         name. An early version of custom element allows to give the name,
589         but it no longer says anything about that.
590
591         The rename is to align the semantics of type extension mechanism
592         of Custom Elements, where the name of a custom element isn't
593         necessarily a tag name.
594
595         No new tests. Just removing old code.
596
597         * bindings/scripts/CodeGeneratorV8.pm:
598         (GenerateHeader):
599         * dom/CustomElementConstructor.cpp:
600         (WebCore::CustomElementConstructor::create):
601         (WebCore::CustomElementConstructor::CustomElementConstructor):
602         (WebCore::CustomElementConstructor::createElement):
603         * dom/CustomElementConstructor.h:
604         (CustomElementConstructor):
605         (WebCore::CustomElementConstructor::name):
606         * dom/CustomElementRegistry.cpp:
607         (WebCore::CustomElementRegistry::registerElement):
608
609 2013-03-05  Ilya Tikhonovsky  <loislo@chromium.org>
610
611         Web Inspector: Flame Chart. Provide node context info in a popover when mouse hovers over a flame chart item.
612         https://bugs.webkit.org/show_bug.cgi?id=111442
613
614         Reviewed by Yury Semikhatsky.
615
616         FlameChart is a canvas so it is not possible to attach the popover to the items on it.
617         It would be a bit tricky to support an offset due to complex behaviour of the popover.
618         The simplest solution is to create a fake anchor element and move it to the right position.
619
620         * inspector/front-end/FlameChart.js:
621         (WebInspector.FlameChart):
622         (WebInspector.FlameChart.prototype._getPopoverAnchor):
623         (WebInspector.FlameChart.prototype._showPopover):
624         (WebInspector.FlameChart.prototype._onMouseMove):
625         (WebInspector.FlameChart.prototype.findNodeCallback):
626         (WebInspector.FlameChart.prototype._coordinatesToNode):
627         (WebInspector.FlameChart.prototype.onResize):
628         * inspector/front-end/flameChart.css:
629         (.flame-chart .item-anchor):
630
631 2013-03-05  Csaba Osztrogonác  <ossy@webkit.org>
632
633         Unreviewed buildfix after r144787. Add missing USE(GRAPHICS_SURFACE) guards.
634
635         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
636         (WebCore::CoordinatedGraphicsScene::setLayerState):
637         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
638         (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
639
640 2013-03-05  Geoffrey Garen  <ggaren@apple.com>
641
642         Autoreleased cached pages slow down the PLT by 2%
643         https://bugs.webkit.org/show_bug.cgi?id=111522
644
645         Reviewed by Filip Pizlo.
646
647         Let's stop doing that.
648
649         2% PLT speedup.
650
651         * history/PageCache.cpp:
652         (WebCore::PageCache::remove):
653
654 2013-03-05  Hayato Ito  <hayato@chromium.org>
655
656         [Shadow] Implements event re-targeting for Touch Events.
657         https://bugs.webkit.org/show_bug.cgi?id=107800
658
659         Reviewed by Dimitri Glazkov.
660
661         So far, Touch Events have been intentionally disabled in shadow
662         tree since it allows users to access internal nodes in shadow tree
663         by accessing Touch Event's information.
664
665         This patch re-targets all individual touch point's target in
666         TouchList (touches, targetTouches and changedTouches) owned by a Touch Event
667         before the Touch Event is dispatched so that we won't break an
668         upper boundary of shadow DOM.
669
670         Touch Events re-targeting is similar to that of Mouse Events
671         re-targeting. The difference is that a Touch Event can have more
672         than one related target because of multiple touches. We must
673         re-target all individual touch points which can be referred from
674         the Touch Event.
675
676         Now, Touch Events can be fired in shadow tree. I've removed the
677         existing limitation.
678
679         Test: fast/dom/shadow/touch-event-retargeting.html
680
681         * dom/EventContext.cpp:
682         (WebCore::EventContext::isTouchEventContext):
683         (WebCore):
684         (WebCore::TouchEventContext::TouchEventContext):
685         (WebCore::TouchEventContext::~TouchEventContext):
686         (WebCore::TouchEventContext::handleLocalEvents):
687         (WebCore::TouchEventContext::isTouchEventContext):
688         (WebCore::TouchEventContext::checkReachability):  Used for assertion of reachability for each Touch point.
689         * dom/EventContext.h:
690         (WebCore):
691         (EventContext):
692         (TouchEventContext): Introduced to hold necessary information for re-targeting Touch event.
693         (WebCore::TouchEventContext::touches):
694         (WebCore::TouchEventContext::targetTouches):
695         (WebCore::TouchEventContext::changedTouches):
696         (WebCore::EventContext::isReachable):
697         * dom/EventRetargeter.cpp:
698         (WebCore::EventRetargeter::calculateEventPath):
699         (WebCore::EventRetargeter::adjustForTouchEvent):
700         (WebCore):
701         (WebCore::EventRetargeter::adjustTouchList):
702         (WebCore::EventRetargeter::adjustForRelatedTarget):
703         (WebCore::EventRetargeter::calculateAdjustedNodes): Updated so that this can be used for Touch point re-targeting.
704         (WebCore::EventRetargeter::buildRelatedNodeMap):
705         * dom/EventRetargeter.h:
706         (WebCore):
707         (EventRetargeter):
708         * dom/Node.cpp:
709         (WebCore::Node::dispatchEvent):
710         (WebCore):
711         (WebCore::Node::dispatchTouchEvent):
712         * dom/Node.h:
713         (WebCore):
714         (Node):
715         * dom/Touch.cpp:
716         (WebCore::Touch::Touch):
717         (WebCore):
718         (WebCore::Touch::cloneWithNewTarget):
719         * dom/Touch.h:
720         (Touch):
721         * dom/TouchEvent.cpp:
722         (WebCore::TouchEventDispatchMediator::create):
723         (WebCore):
724         (WebCore::TouchEventDispatchMediator::TouchEventDispatchMediator):
725         (WebCore::TouchEventDispatchMediator::event):
726         (WebCore::TouchEventDispatchMediator::dispatchEvent):
727         * dom/TouchEvent.h:
728         (TouchEvent):
729         (WebCore::TouchEvent::setTouches):
730         (WebCore::TouchEvent::setTargetTouches):
731         (WebCore::TouchEvent::setChangedTouches):
732         (TouchEventDispatchMediator):
733         (WebCore):
734         (WebCore::toTouchEvent):
735         * dom/TouchList.cpp:
736         (WebCore::TouchList::item):
737         (WebCore):
738         * dom/TouchList.h:
739         (TouchList):
740         * page/EventHandler.cpp:
741         (WebCore::EventHandler::hitTestResultInFrame): Removed the limitation. Adjusting is no longer done here.
742         (WebCore::EventHandler::handleTouchEvent):
743
744 2013-03-05  Hajime Morrita  <morrita@google.com>
745
746         [Custom Elements][V8] Custom Element doesn't need its own WrapperTypeInfo
747         https://bugs.webkit.org/show_bug.cgi?id=111411
748
749         Reviewed by Kentaro Hara.
750
751         No new tests. No observable change yet.
752
753         This is a preparation for Bug 110436, where WebKit is going to
754         allow any HTML element to be a superclass of custom elements.
755
756         This change eliminates WrapperTypeInfo for custom element. Instead
757         of that, the wrapper of a custom element picks WrapperTypeInfo
758         from most descendant built-in HTML element. For example, think about
759         following hierarchy:
760
761         - ... <- HTMLElement <- HTMLDivElememnt <- ExistingCustomElement <- NewCustomElement
762
763         In this case, both ExistingCustomElement and NewCustomElement has
764         HTMLDivElememnt's type info. This is because HTMLDivElememnt is
765         the most descendant (or "the nearest") built-in HTML
766         element. (HTMLElement isn't the most descendant.
767         ExistingCustomElement isn't a built-in.)
768
769         Using such WrapperTypeInfos, created custom element wrappers can
770         get appropriate set of method and properties regardless of its
771         super-elements.
772
773         This change tells the prototype object of each built-in object
774         which WrapperTypeInfo the native backing wants:
775         HTMLDivElememnt.prototype knows V8HTMLDivElement::info for
776         example. The pointer to the type info is stored into an internal
777         field. On wrapper construction, createWrapper() walks up the
778         prototype chain and pick the first one.
779
780         * bindings/v8/V8DOMConfiguration.cpp:
781         (WebCore::V8DOMConfiguration::configureTemplate):
782         * bindings/v8/V8HTMLCustomElement.cpp:
783         (WebCore::findWrapperTypeOf):
784         (WebCore::V8HTMLCustomElement::createWrapper):
785         * bindings/v8/V8HTMLCustomElement.h:
786         * bindings/v8/V8PerContextData.cpp:
787         (WebCore::V8PerContextData::constructorForTypeSlowCase):
788         * bindings/v8/WrapperTypeInfo.h:
789         (WebCore):
790
791 2013-03-05  Aaron Colwell  <acolwell@chromium.org>
792
793         Heap-use-after-free in WebCore::HTMLMediaElement::~HTMLMediaElement
794         https://bugs.webkit.org/show_bug.cgi?id=110623
795
796         Reviewed by Eric Seidel.
797
798         Test: http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html
799
800         * html/HTMLAudioElement.h:
801         (HTMLAudioElement):
802         * html/HTMLAudioElement.idl:
803         * html/HTMLMediaElement.cpp:
804         (WebCore::HTMLMediaElement::hasPendingActivity):
805         * html/HTMLMediaElement.idl:
806
807 2013-03-05  Chris Fleizach  <cfleizach@apple.com>
808  
809         AX: Support aria-posinset/setsize
810         https://bugs.webkit.org/show_bug.cgi?id=109725
811
812         Reviewed by Tim Horton.
813
814         Expose aria-setsize and aria-posinset through accessibility.
815         Right now only the Mac platform exposes them.
816
817         Test: platform/mac/accessibility/aria-setsize-posinset.html
818
819         * accessibility/AccessibilityObject.cpp:
820         (WebCore::AccessibilityObject::supportsARIASetSize):
821         (WebCore):
822         (WebCore::AccessibilityObject::supportsARIAPosInset):
823         (WebCore::AccessibilityObject::ariaSetSize):
824         (WebCore::AccessibilityObject::ariaPosInset):
825         * accessibility/AccessibilityObject.h:
826         (AccessibilityObject):
827         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
828         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
829         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
830         * html/HTMLAttributeNames.in:
831
832
833 2013-03-05  Peter Nelson  <peter@peterdn.com>
834
835         [WinCairo] Support for cookies is incomplete
836         https://bugs.webkit.org/show_bug.cgi?id=110147
837         
838         Expired and HttpOnly cookies no longer accessible from JavaScript.
839         Cookies set in JavaScript now have correct domain/path.
840
841         Reviewed by Brent Fulgham.
842
843         Test: http/tests/cookies/http-get-cookie-set-in-js.html
844
845         * platform/network/curl/CookieJarCurl.cpp:
846         (WebCore):
847         (WebCore::addMatchingCurlCookie):
848         (WebCore::getNetscapeCookieFormat):
849         (WebCore::setCookiesFromDOM):
850         (WebCore::cookieRequestHeaderFieldValue):
851
852 2013-03-05  Alec Flett  <alecflett@chromium.org>
853
854         Fix mac clang build with long long
855         https://bugs.webkit.org/show_bug.cgi?id=111495
856
857         Unreviewed fix for mac build.
858
859         * Modules/indexeddb/IDBBackingStore.cpp:
860         (WebCore::IDBBackingStore::IDBBackingStore):
861
862 2013-03-05  Alec Flett  <alecflett@chromium.org>
863
864         Fix mac clang build with long long
865         https://bugs.webkit.org/show_bug.cgi?id=111495
866
867         Unreviewed fix for mac build.
868
869         * Modules/indexeddb/IDBBackingStore.cpp:
870         (WebCore::IDBBackingStore::IDBBackingStore):
871
872 2013-03-05  Aaron Colwell  <acolwell@chromium.org>
873
874         Add V8Document.h include when the V8 code generator creates a toV8(Document*) call.
875         https://bugs.webkit.org/show_bug.cgi?id=111486
876
877         Reviewed by Adam Barth.
878
879         No new tests. This doesn't change user visible behavior.
880
881         * bindings/scripts/CodeGeneratorV8.pm:
882         (GenerateNamedConstructor):
883         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
884
885 2013-03-05  Shawn Singh  <shawnsingh@chromium.org>
886
887         Fix default background of a dragged image.
888         https://bugs.webkit.org/show_bug.cgi?id=110512
889
890         Reviewed by Tony Chang.
891
892         Transparent background color (particularly visible in the padding
893         of an element) was not being respected. The solution is to
894         initially fill the drag image with transparent instead of white,
895         so that any color background works correctly. This patch does not
896         affect Apple Mac or Win platforms, given that this part of the
897         code is #if guarded from those platforms.
898
899         Manual test added:
900           ManualTests/drag-background-with-padding.html
901
902         Infrastructure for retrieving the drag image for pixel testing
903         does not yet exist.
904
905         * page/Frame.cpp:
906         (WebCore::Frame::nodeImage):
907
908 2013-03-05  Emil A Eklund  <eae@chromium.org>
909
910         ASSERTION FAILED: i < size(), UNKNOWN in WebCore::RenderTableSection::layout
911         https://bugs.webkit.org/show_bug.cgi?id=108838
912
913         Reviewed by Levi Weintraub.
914         
915         Ensure that RenderTable::recalcSections is called when moving a
916         TableSection by calling setNeedsSectionRecalc in addChild for
917         TableSections.
918
919         Test: fullscreen/full-screen-table-section.html
920
921         * rendering/RenderTable.cpp:
922         (WebCore::RenderTable::addChild):
923
924 2013-03-05  Kenneth Russell  <kbr@google.com>
925
926         Upgrade ANGLE to r1987
927         https://bugs.webkit.org/show_bug.cgi?id=111381
928
929         Reviewed by Dean Jackson.
930
931         Covered by existing tests. Ran WebGL conformance tests in Safari
932         to ensure correct operation of patch.
933
934         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
935         (WebCore::GraphicsContext3D::GraphicsContext3D):
936         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
937         (WebCore::GraphicsContext3D::GraphicsContext3D):
938         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
939         (WebCore::GraphicsContext3D::GraphicsContext3D):
940         * platform/graphics/mac/GraphicsContext3DMac.mm:
941         (WebCore::GraphicsContext3D::GraphicsContext3D):
942         * platform/graphics/qt/GraphicsContext3DQt.cpp:
943         (WebCore::GraphicsContext3DPrivate::initializeANGLE):
944             Changed all ports to query for highp support in fragment
945             shaders and conditionally enable it in ANGLE shader translator.
946
947 2013-03-05  Alec Flett  <alecflett@chromium.org>
948
949         IndexedDB: Add IDBBackingStoreTest
950         https://bugs.webkit.org/show_bug.cgi?id=111233
951
952         Reviewed by Adam Barth.
953
954         These are tweaks to make IDBBackingStore more easily testable.
955
956         * Modules/indexeddb/IDBBackingStore.cpp:
957         (WebCore::IDBBackingStore::IDBBackingStore): Allow use without a backing store.
958
959 2013-03-04  James Robinson  <jamesr@chromium.org>
960
961         [chromium] Move check for threaded compositing from WebCompositorSupport to Platform
962         https://bugs.webkit.org/show_bug.cgi?id=111386
963
964         Reviewed by Adrienne Walker.
965
966         This moves checks for whether threaded compositing is enabled from WebCompositorSupport
967         to Platform. In the case of Canvas2DLayerBridge, the check is moved completely out of
968         the class to make it easier for tests to specify the threaded configuration to use in the test.
969
970         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
971         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
972         * platform/graphics/chromium/Canvas2DLayerBridge.h:
973         (WebCore::Canvas2DLayerBridge::create):
974         (Canvas2DLayerBridge):
975         * platform/graphics/chromium/DrawingBufferChromium.cpp:
976         (WebCore::DrawingBuffer::DrawingBuffer):
977         * platform/graphics/skia/ImageBufferSkia.cpp:
978         (WebCore::createAcceleratedCanvas):
979
980 2013-03-05  Anders Carlsson  <andersca@apple.com>
981
982         Split up the storage event dispatch functions further
983         https://bugs.webkit.org/show_bug.cgi?id=111482
984
985         Reviewed by Beth Dakin.
986
987         Add new functions for dispatching storage events to a set of frames.
988
989         * storage/StorageAreaImpl.cpp:
990         (WebCore::StorageAreaImpl::dispatchStorageEvent):
991         * storage/StorageEventDispatcher.cpp:
992         (WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
993         (WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
994         (WebCore):
995         (WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
996         (WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames):
997         * storage/StorageEventDispatcher.h:
998         (WebCore):
999         (StorageEventDispatcher):
1000
1001 2013-03-05  Stephen Chenney  <schenney@chromium.org>
1002
1003         Crash when ImageLoader deletes Element inside SVGImageElement
1004         https://bugs.webkit.org/show_bug.cgi?id=111085
1005
1006         Reviewed by Abhishek Arya.
1007
1008         Elements with ImageLoader objects associated with them may have their
1009         final reference held by the ImageLoader (to allow events to be sent
1010         and handled). Any call on Element that causes the ImageLoader to
1011         dispatch events might then result in the final deref of the Element
1012         itself, thus leaving all the Element's "this" pointers up the stack
1013         pointing to invalid memory.
1014
1015         This change puts the deref of the Element on a timer so that, if the
1016         deref is called via a method on Element, the call stack will unwind
1017         before the deref occurs.
1018
1019         Test: svg/custom/image-with-attr-change-after-delete-crash.html
1020
1021         * loader/ImageLoader.cpp:
1022         (WebCore::ImageLoader::ImageLoader): Initialize a timer
1023         (WebCore::ImageLoader::updatedHasPendingEvent): Put deref of the
1024           element on a oneShotTimer, with appropriate assertions and checks to
1025           ensure we only ref/deref once.
1026         (WebCore::ImageLoader::timerFired): Deref the element when the timer fires.
1027         * loader/ImageLoader.h:
1028         (ImageLoader): Define a timer for controlling deref of the element.
1029
1030 2013-03-05  Antoine Quint  <graouts@apple.com>
1031
1032         Web Inspector: identify reflection layers in LayerTreeAgent
1033         https://bugs.webkit.org/show_bug.cgi?id=111419
1034
1035         We add a new property "isReflection" to the Layer objects returned
1036         to the front-end to indicate whether the layer was created to host
1037         the reflection for an element. When this new property is true, the
1038         "nodeId" property is set to point to the reflected element's node
1039         id, since there is no node per-se directly associated with this layer.
1040         We also change the "bounds" property to return absolute page coordinates
1041         such that the front-end can use this information to highlight that
1042         region in the page since metrics would otherwise be unavailable.
1043
1044         Reviewed by Dean Jackson.
1045
1046         Test: inspector-protocol/layers/layers-reflected-content.html
1047
1048         * inspector/Inspector.json:
1049         * inspector/InspectorLayerTreeAgent.cpp:
1050         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
1051
1052 2013-03-05  peavo@outlook.com  <peavo@outlook.com>
1053
1054         [WinCairo] Compile fix after r144024.
1055         https://bugs.webkit.org/show_bug.cgi?id=111306
1056
1057         Reviewed by James Robinson.
1058
1059         * page/scrolling/ScrollingCoordinator.cpp: Added guard for USE(ACCELERATED_COMPOSITING).
1060         * page/scrolling/ScrollingCoordinator.h: Added guard for USE(ACCELERATED_COMPOSITING).
1061
1062 2013-03-05  James Weatherall  <wez@chromium.org>
1063
1064         keydown and keyup events have zero keycode for some numeric pad keys under Chromium on Linux
1065         https://bugs.webkit.org/show_bug.cgi?id=85642
1066
1067         Add missing key mappings for GDK_KP_Begin, GDK_KP_Insert, GDK_KP_Delete and GDK_ISO_Level3_Shift.
1068
1069         Reviewed by Ojan Vafai.
1070
1071         * platform/chromium/KeyCodeConversionGtk.cpp:
1072         (WebCore::windowsKeyCodeForKeyEvent):
1073
1074 2013-03-05  Alec Flett  <alecflett@chromium.org>
1075
1076         IndexedDB: Properly refactor frontend/backend code by #includes
1077         https://bugs.webkit.org/show_bug.cgi?id=110653
1078
1079         Reviewed by Dimitri Glazkov.
1080
1081         IndexedDB has a distinct backend and frontend, with well defined
1082         *Interface / *Callbacks classes distinguishing them, respectively.
1083         
1084         This makes sure that the frontend and backend do not include each
1085         other and fixes build problems that occurred as a result.
1086
1087         Specifically this moves enums out of IDBCursor and IDBTransaction
1088         into IndexedDB.h in a new WebCore::IndexedDB namespace.
1089
1090         No new tests, as this is just a refactor.
1091
1092 2013-03-05  Jeffrey Pfau  <jpfau@apple.com>
1093
1094         Clear associated cache partitions when deleting origins' cache
1095         https://bugs.webkit.org/show_bug.cgi?id=111383
1096
1097         Reviewed by Maciej Stachowiak.
1098
1099         Clear the cache partitions associated with the origin being cleared.
1100
1101         Not possible to test with current automated test tools, must be tested manually.
1102
1103         * loader/cache/MemoryCache.cpp:
1104         (WebCore::MemoryCache::removeResourcesWithOrigin):
1105
1106 2013-03-04  Ojan Vafai  <ojan@chromium.org>
1107
1108         Inline min/maxInstrinsicLogicalWidth functions
1109         https://bugs.webkit.org/show_bug.cgi?id=111399
1110
1111         Reviewed by Tony Chang.
1112
1113         Turns out these functions don't need to be public and only
1114         have one caller. This patch is in preparation for supporting
1115         intrinsic widths on tables, which will need to pass in the
1116         border and padding width as an argument.
1117
1118         * rendering/RenderBox.cpp:
1119         (WebCore::RenderBox::fillAvailableMeasure):
1120         (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
1121         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1122         * rendering/RenderBox.h:
1123
1124 2013-03-05  Victor Carbune  <vcarbune@chromium.org>
1125
1126         Cue line-height property shouldn't be inherited from the video element
1127         https://bugs.webkit.org/show_bug.cgi?id=111262
1128
1129         Reviewed by Eric Carlson.
1130
1131         Test: media/track/track-cue-rendering-on-resize.html
1132
1133         * css/mediaControls.css:
1134         (video::-webkit-media-text-track-container): Set the default font size
1135         and family using the "font" property to also reset the line-height property.
1136
1137 2013-03-05  Joshua Bell  <jsbell@chromium.org>
1138
1139         IndexedDB: Remove some unused binding code
1140         https://bugs.webkit.org/show_bug.cgi?id=111463
1141
1142         Reviewed by Adam Barth.
1143
1144         IDBRequest got a custom V8 getter for |request| to help diagnose an issue, but the
1145         root cause was found/fixed (http://wkbug.com/110916 and http://wkbug.com/110206) so
1146         remove it. Also, IDBKey was marked ScriptWrappable but it is now explicitly converted
1147         to a ScriptValue before it gets anywhere near the binding code, so remove that too.
1148         Finally, createIDBKeyFromValue doesn't need to be exposed from IDBBindingUtilities.
1149
1150         No new tests - just removing dead code.
1151
1152         * Modules/indexeddb/IDBKey.h: No need for ScriptWrappable.
1153         * Modules/indexeddb/IDBRequest.idl: Remove custom binding (root cause of bug found).
1154         * WebCore.gypi: Ditto.
1155         * bindings/js/IDBBindingUtilities.h: Don't expose internal createIDBKeyFromValue().
1156         * bindings/v8/IDBBindingUtilities.h: Ditto.
1157         * bindings/v8/custom/V8IDBRequestCustom.cpp: Removed.
1158
1159 2013-03-05  Sheriff Bot  <webkit.review.bot@gmail.com>
1160
1161         Unreviewed, rolling out r144798.
1162         http://trac.webkit.org/changeset/144798
1163         https://bugs.webkit.org/show_bug.cgi?id=111478
1164
1165         "broke chromium windows build" (Requested by dpranke on
1166         #webkit).
1167
1168         * GNUmakefile.list.am:
1169         * Modules/indexeddb/IDBBackingStore.cpp:
1170         (WebCore::IDBBackingStore::Cursor::continueFunction):
1171         (WebCore::objectStoreCursorOptions):
1172         (WebCore::indexCursorOptions):
1173         (WebCore::IDBBackingStore::openObjectStoreCursor):
1174         (WebCore::IDBBackingStore::openObjectStoreKeyCursor):
1175         (WebCore::IDBBackingStore::openIndexKeyCursor):
1176         (WebCore::IDBBackingStore::openIndexCursor):
1177         * Modules/indexeddb/IDBBackingStore.h:
1178         (IDBBackingStore):
1179         * Modules/indexeddb/IDBCursor.cpp:
1180         (WebCore::IDBCursor::create):
1181         (WebCore::IDBCursor::IDBCursor):
1182         (WebCore::IDBCursor::continueFunction):
1183         (WebCore::IDBCursor::stringToDirection):
1184         (WebCore::IDBCursor::directionToString):
1185         * Modules/indexeddb/IDBCursor.h:
1186         (IDBCursor):
1187         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
1188         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
1189         (WebCore::IDBCursorBackendImpl::deleteFunction):
1190         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
1191         * Modules/indexeddb/IDBCursorBackendImpl.h:
1192         (WebCore::IDBCursorBackendImpl::create):
1193         (WebCore::IDBCursorBackendImpl::value):
1194         (IDBCursorBackendImpl):
1195         * Modules/indexeddb/IDBCursorBackendInterface.h:
1196         (WebCore):
1197         * Modules/indexeddb/IDBCursorWithValue.cpp:
1198         (WebCore::IDBCursorWithValue::create):
1199         (WebCore::IDBCursorWithValue::IDBCursorWithValue):
1200         * Modules/indexeddb/IDBCursorWithValue.h:
1201         (IDBCursorWithValue):
1202         * Modules/indexeddb/IDBDatabase.cpp:
1203         (WebCore::IDBDatabase::transaction):
1204         * Modules/indexeddb/IDBDatabase.h:
1205         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1206         (WebCore::GetOperation::create):
1207         (WebCore::GetOperation::GetOperation):
1208         (GetOperation):
1209         (WebCore::OpenCursorOperation::create):
1210         (WebCore::OpenCursorOperation::OpenCursorOperation):
1211         (OpenCursorOperation):
1212         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
1213         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
1214         (WebCore::IDBDatabaseBackendImpl::createIndex):
1215         (WebCore::IDBDatabaseBackendImpl::deleteIndex):
1216         (WebCore::IDBDatabaseBackendImpl::get):
1217         (WebCore::GetOperation::perform):
1218         (WebCore::IDBDatabaseBackendImpl::put):
1219         (WebCore::PutOperation::perform):
1220         (WebCore::IDBDatabaseBackendImpl::setIndexKeys):
1221         (WebCore::IDBDatabaseBackendImpl::openCursor):
1222         (WebCore::OpenCursorOperation::perform):
1223         (WebCore::CountOperation::perform):
1224         (WebCore::IDBDatabaseBackendImpl::deleteRange):
1225         (WebCore::DeleteRangeOperation::perform):
1226         (WebCore::IDBDatabaseBackendImpl::clear):
1227         (WebCore::IDBDatabaseBackendImpl::transactionStarted):
1228         (WebCore::IDBDatabaseBackendImpl::transactionFinished):
1229         (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndAbortFired):
1230         (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndCompleteFired):
1231         (WebCore::IDBDatabaseBackendImpl::createTransaction):
1232         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
1233         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1234         (IDBDatabaseBackendImpl):
1235         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
1236         * Modules/indexeddb/IDBFactory.h:
1237         * Modules/indexeddb/IDBIndex.cpp:
1238         (WebCore):
1239         (WebCore::IDBIndex::openCursor):
1240         (WebCore::IDBIndex::openKeyCursor):
1241         * Modules/indexeddb/IDBObjectStore.cpp:
1242         (WebCore):
1243         (WebCore::IDBObjectStore::openCursor):
1244         * Modules/indexeddb/IDBRequest.cpp:
1245         (WebCore::IDBRequest::IDBRequest):
1246         (WebCore::IDBRequest::setCursorDetails):
1247         (WebCore::IDBRequest::setResultCursor):
1248         (WebCore::IDBRequest::onSuccess):
1249         * Modules/indexeddb/IDBRequest.h:
1250         (IDBRequest):
1251         * Modules/indexeddb/IDBTransaction.cpp:
1252         (WebCore::IDBTransaction::create):
1253         (WebCore::IDBTransaction::IDBTransaction):
1254         (WebCore::IDBTransaction::stringToMode):
1255         (WebCore::IDBTransaction::modeToString):
1256         * Modules/indexeddb/IDBTransaction.h:
1257         (WebCore::IDBTransaction::isReadOnly):
1258         (WebCore::IDBTransaction::isVersionChange):
1259         (IDBTransaction):
1260         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
1261         (WebCore::IDBTransactionBackendImpl::create):
1262         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
1263         * Modules/indexeddb/IDBTransactionBackendImpl.h:
1264         (IDBTransactionBackendImpl):
1265         (WebCore::IDBTransactionBackendImpl::mode):
1266         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
1267         (WebCore::IDBTransactionCoordinator::processStartedTransactions):
1268         (WebCore::IDBTransactionCoordinator::canRunTransaction):
1269         * Modules/indexeddb/IndexedDB.h: Removed.
1270         * Target.pri:
1271         * WebCore.gypi:
1272
1273 2013-03-05  Tommy Widenflycht  <tommyw@google.com>
1274
1275         MediaStream API: Allow local and remote descriptions to be accessed after close
1276         https://bugs.webkit.org/show_bug.cgi?id=111437
1277
1278         Reviewed by Adam Barth.
1279
1280         It's quite clear in the standard that the getters should still return the old value.
1281         Also overhauling the state setters a bit to check if the new state is different.
1282
1283         Existing tests expanded to cover patch.
1284
1285         * Modules/mediastream/RTCPeerConnection.cpp:
1286         (WebCore::RTCPeerConnection::localDescription):
1287         (WebCore::RTCPeerConnection::remoteDescription):
1288         (WebCore::RTCPeerConnection::changeSignalingState):
1289         (WebCore::RTCPeerConnection::changeIceGatheringState):
1290         (WebCore::RTCPeerConnection::changeIceConnectionState):
1291
1292 2013-03-05  Charlie Reis  <creis@chromium.org>
1293
1294         Add FrameLoaderClient::didAccessInitialDocument
1295         https://bugs.webkit.org/show_bug.cgi?id=107963
1296
1297         Notifies the FrameLoaderClient if another page accesses the
1298         initial empty document of a main frame.  In this case, it is
1299         no longer safe to display the provisional URL.
1300
1301         Only takes effect for PLATFORM(CHROMIUM), since no other platforms
1302         listen to the notification.
1303
1304         Reviewed by Adam Barth.
1305
1306         * bindings/v8/V8DOMWindowShell.cpp:
1307         (WebCore::V8DOMWindowShell::setSecurityToken):
1308             Use default token for initial document.
1309         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1310             Notify loader if initial document is accessed.
1311         (WebCore::V8DOMWindow::namedSecurityCheck):
1312         (WebCore::V8DOMWindow::indexedSecurityCheck):
1313         * loader/FrameLoader.cpp:
1314         (WebCore::FrameLoader::FrameLoader):
1315         (WebCore::FrameLoader::didAccessInitialDocument):
1316         (WebCore):
1317         * loader/FrameLoader.h:
1318         (FrameLoader):
1319         * loader/FrameLoaderClient.h:
1320         (FrameLoaderClient):
1321         (WebCore::FrameLoaderClient::didAccessInitialDocument):
1322
1323 2013-03-05  Otto Derek Cheung  <otcheung@rim.com>
1324
1325         [BlackBerry] Fix assertion in CookieManager::getBackingStoreCookies
1326         https://bugs.webkit.org/show_bug.cgi?id=111468
1327
1328         Reviewed by Rob Buis.
1329         Internally reviewed by Konrad Piascik.
1330
1331         The assert in getBackingStoreCookies could be giving out false positives now
1332         that we have our fixes for cookie loading in PR 286189. The cookie store could
1333         be half loaded if the first cookie get/set call happens before the db is fully loaded.
1334         A full webkit sync call to reload the database will cause the assert to be hit.
1335
1336         Safer to flush everything out and try again.
1337
1338         * platform/blackberry/CookieManager.cpp:
1339         (WebCore::CookieManager::getBackingStoreCookies):
1340
1341 2013-03-05  Tony Gentilcore  <tonyg@chromium.org>
1342
1343         CompactHTMLToken does not need an XSSInfo pointer
1344         https://bugs.webkit.org/show_bug.cgi?id=111423
1345
1346         Reviewed by Eric Seidel.
1347
1348         The CompactHTMLToken should remain as small as possible because it is copied. This shrinks the size by one pointer
1349         by moving a relatively uncommon attribute out to its own Vector.
1350
1351         No new tests because no new functionality.
1352
1353         * html/parser/BackgroundHTMLParser.cpp:
1354         (WebCore::checkThatXSSInfosAreSafeToSendToAnotherThread):
1355         (WebCore):
1356         (WebCore::BackgroundHTMLParser::pumpTokenizer):
1357         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
1358         * html/parser/BackgroundHTMLParser.h:
1359         (BackgroundHTMLParser):
1360         * html/parser/CompactHTMLToken.cpp:
1361         (SameSizeAsCompactHTMLToken):
1362         (WebCore::CompactHTMLToken::isSafeToSendToAnotherThread):
1363         * html/parser/CompactHTMLToken.h:
1364         (WebCore):
1365         (CompactHTMLToken):
1366         * html/parser/HTMLDocumentParser.cpp:
1367         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
1368         * html/parser/HTMLDocumentParser.h:
1369         (ParsedChunk):
1370         * html/parser/XSSAuditorDelegate.h:
1371         (XSSInfo):
1372         (WebCore):
1373
1374 2013-03-05  Anders Carlsson  <andersca@apple.com>
1375
1376         Split StorageEventDispatcher::dispatch into two functions
1377         https://bugs.webkit.org/show_bug.cgi?id=111464
1378
1379         Reviewed by Beth Dakin.
1380
1381         Split StorageEventDispatcher::dispatch into dispatchSessionStorageEvent and
1382         dispatchLocalStorageEvent and make StorageAreaImpl::dispatchStorageEvent call
1383         the right function based on the storage area type.
1384
1385         * storage/StorageAreaImpl.cpp:
1386         (WebCore::StorageAreaImpl::dispatchStorageEvent):
1387         * storage/StorageEventDispatcher.cpp:
1388         (WebCore::StorageEventDispatcher::dispatchSessionStorageEvent):
1389         (WebCore):
1390         (WebCore::StorageEventDispatcher::dispatchLocalStorageEvent):
1391         * storage/StorageEventDispatcher.h:
1392         (StorageEventDispatcher):
1393
1394 2013-03-05  Brent Fulgham  <bfulgham@webkit.org>
1395
1396         [WinCairo] Unreviewed build fix after r144024.
1397
1398         * page/scrolling/ScrollingCoordinator.cpp:
1399         (WebCore::ScrollingCoordinator::scrollLayerForScrollableArea): Handle
1400         case of not using Accelerated Compositing
1401         (WebCore::ScrollingCoordinator::horizontalScrollbarLayerForScrollableArea):
1402         (WebCore::ScrollingCoordinator::verticalScrollbarLayerForScrollableArea): Ditto.
1403
1404 2013-03-05  Alec Flett  <alecflett@chromium.org>
1405
1406         IndexedDB: Properly refactor frontend/backend code by #includes
1407         https://bugs.webkit.org/show_bug.cgi?id=110653
1408
1409         Reviewed by Dimitri Glazkov.
1410
1411         IndexedDB has a distinct backend and frontend, with well defined
1412         *Interface / *Callbacks classes distinguishing them, respectively.
1413         
1414         This makes sure that the frontend and backend do not include each
1415         other and fixes build problems that occurred as a result.
1416
1417         Specifically this moves enums out of IDBCursor and IDBTransaction
1418         into IndexedDB.h in a new WebCore::IndexedDB namespace.
1419
1420         No new tests, as this is just a refactor.
1421
1422 2013-03-05  James Robinson  <jamesr@chromium.org>
1423
1424         ContainerNode::setActive should not sleep for 100ms on platforms that do not implement synchronous repaint(true) semantics
1425         https://bugs.webkit.org/show_bug.cgi?id=87054
1426
1427         Reviewed by Darin Adler.
1428
1429         Adds a new ChromeClient function to query if the platform supports the immediate parameter
1430         to the invalidation APIs and guards the synchronous repaint logic in ContainerNode::setActive()
1431         with it.
1432
1433         * dom/ContainerNode.cpp:
1434         (WebCore::ContainerNode::setActive):
1435         * page/ChromeClient.h:
1436         (WebCore::ChromeClient::supportsImmediateInvalidation):
1437
1438 2013-03-05  Anders Carlsson  <andersca@apple.com>
1439
1440         Simplify storage event dispatch somewhat
1441         https://bugs.webkit.org/show_bug.cgi?id=111461
1442
1443         Reviewed by Beth Dakin.
1444
1445         Add a StorageAreaImpl::dispatchStorageEvent to avoid replicating the calls to
1446         StorageEventDispatcher::dispatch there times. This is in preparation for changing the
1447         interface of StorageEventDispatcher so it can be used by WebKit2.
1448
1449         * storage/StorageAreaImpl.cpp:
1450         (WebCore::StorageAreaImpl::setItem):
1451         (WebCore::StorageAreaImpl::removeItem):
1452         (WebCore::StorageAreaImpl::clear):
1453         (WebCore::StorageAreaImpl::dispatchStorageEvent):
1454
1455         * storage/StorageAreaImpl.h:
1456         Reindent.
1457
1458 2013-03-05  Tony Chang  <tony@chromium.org>
1459
1460         Fix some crashes in render sliders
1461         https://bugs.webkit.org/show_bug.cgi?id=111458
1462
1463         Reviewed by Ojan Vafai.
1464
1465         Fix some cases where we assumed the renderer is a renderBox.
1466
1467         Test: fast/forms/range/slider-inline-crash.html
1468
1469         * html/shadow/SliderThumbElement.cpp:
1470         (WebCore::RenderSliderContainer::layout): Use renderBox() which will return 0 if the renderer is not a RenderBox.
1471         (WebCore::SliderThumbElement::setPositionFromPoint): Bail out early if renderBox() is 0.
1472
1473 2013-03-04  Andrew Scherkus  <scherkus@chromium.org>
1474
1475         REGRESSION(r142191): Fix closed caption buttons for ports still using the painting path.
1476         https://bugs.webkit.org/show_bug.cgi?id=111109
1477
1478         Reviewed by Eric Carlson.
1479
1480         Covered by following tests:
1481         media/track/track-cue-rendering-horizontal.html
1482         media/track/track-cue-rendering-vertical.html
1483
1484         * rendering/RenderTheme.cpp:
1485         (WebCore::RenderTheme::paint):
1486         * rendering/RenderTheme.h:
1487         (WebCore::RenderTheme::paintMediaToggleClosedCaptionsButton):
1488
1489 2013-03-05  Gwang Yoon Hwang  <ryumiel@company100.net>
1490
1491         Coordinated Graphics: CoordinatedGraphicsLayer makes CoordinatedGraphicsScene perform via CoordinatedGraphicsState.
1492         https://bugs.webkit.org/show_bug.cgi?id=108294
1493
1494         Reviewed by Anders Carlsson.
1495
1496         CoordinatedLayerTreeHostProxy has too many IPC messages (e.g. SyncCanvas and
1497         CreateTile), and there is a long function chain from CoordinatedGraphicsLayer to
1498         CoordinatedGraphicsScene (4 classes).
1499         If we want to add a new message, we need to add similar functions into 4 classes.
1500
1501         Now CoordinatedLayerTreeHost has only one IPC message for CoordinatedGraphicsLayer:
1502         CommitCoordinatedGraphicsState.
1503         CoordinatedGraphicsLayer makes CoordinatedGraphicsScene run as follows:
1504         1. CoordinatedGraphicsLayer makes a CoordinatedGraphicsLayerState.
1505         2. CoordinatedLayerTreeHost stores all LayerStates.
1506         3. CoordinatedLayerTreeHost sends GraphicsState includes LayerStates to CoordinatedLayerTreeHostProxy
1507         at the moment of flushing via CommitCoordinatedGraphicsState message.
1508         4. CoordinatedGraphicsScene applies all state changes to layers.
1509
1510         There is one big behavior change. All states changes (e.g.
1511         UpdateTiles, SetLayerChildren, and etc..) are performed at the same time, when
1512         CoordinatedGraphicsScene::commitCoordinatedGraphicsState is called.
1513
1514         This patch is based on Dongsung Huang, and Noam's work in
1515         https://bugs.webkit.org/show_bug.cgi?id=108294
1516
1517         No new tests, covered by existing tests.
1518
1519         * Target.pri:
1520         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1521         (WebCore::CoordinatedGraphicsLayer::setPosition):
1522         (WebCore::CoordinatedGraphicsLayer::setAnchorPoint):
1523         (WebCore::CoordinatedGraphicsLayer::setSize):
1524         (WebCore::CoordinatedGraphicsLayer::setTransform):
1525         (WebCore::CoordinatedGraphicsLayer::setChildrenTransform):
1526         (WebCore::CoordinatedGraphicsLayer::setPreserves3D):
1527         (WebCore::CoordinatedGraphicsLayer::setMasksToBounds):
1528         (WebCore::CoordinatedGraphicsLayer::setDrawsContent):
1529         (WebCore::CoordinatedGraphicsLayer::setContentsVisible):
1530         (WebCore::CoordinatedGraphicsLayer::setContentsOpaque):
1531         (WebCore::CoordinatedGraphicsLayer::setBackfaceVisibility):
1532         (WebCore::CoordinatedGraphicsLayer::setOpacity):
1533         (WebCore::CoordinatedGraphicsLayer::setContentsRect):
1534         (WebCore::CoordinatedGraphicsLayer::setFilters):
1535         (WebCore::CoordinatedGraphicsLayer::setContentsToSolidColor):
1536         (WebCore::CoordinatedGraphicsLayer::setShowDebugBorder):
1537         (WebCore::CoordinatedGraphicsLayer::setShowRepaintCounter):
1538         (WebCore::CoordinatedGraphicsLayer::setMaskLayer):
1539         (WebCore::CoordinatedGraphicsLayer::setReplicatedByLayer):
1540         (WebCore::CoordinatedGraphicsLayer::setFixedToViewport):
1541         (WebCore::CoordinatedGraphicsLayer::syncChildren):
1542         (WebCore::CoordinatedGraphicsLayer::syncFilters):
1543         (WebCore::CoordinatedGraphicsLayer::syncImageBacking):
1544         (WebCore::CoordinatedGraphicsLayer::syncLayerState):
1545         (WebCore::CoordinatedGraphicsLayer::setDebugBorder):
1546         (WebCore::CoordinatedGraphicsLayer::syncAnimations):
1547         (WebCore::CoordinatedGraphicsLayer::syncCanvas):
1548         (WebCore::CoordinatedGraphicsLayer::destroyCanvasIfNeeded):
1549         (WebCore::CoordinatedGraphicsLayer::createCanvasIfNeeded):
1550         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
1551         (WebCore::CoordinatedGraphicsLayer::resetLayerState):
1552         (WebCore):
1553         (WebCore::CoordinatedGraphicsLayer::releaseImageBackingIfNeeded):
1554         (WebCore::CoordinatedGraphicsLayer::setRootLayer):
1555         (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintEnd):
1556         (WebCore::CoordinatedGraphicsLayer::createTile):
1557         (WebCore::CoordinatedGraphicsLayer::updateTile):
1558         (WebCore::CoordinatedGraphicsLayer::removeTile):
1559         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1560         (CoordinatedGraphicsLayerClient):
1561         (CoordinatedGraphicsLayer):
1562         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1563         (WebCore::CoordinatedGraphicsScene::createCanvasIfNeeded):
1564         (WebCore::CoordinatedGraphicsScene::syncCanvasIfNeeded):
1565         (WebCore::CoordinatedGraphicsScene::destroyCanvasIfNeeded):
1566         (WebCore::CoordinatedGraphicsScene::setLayerRepaintCountIfNeeded):
1567         (WebCore::CoordinatedGraphicsScene::setLayerChildrenIfNeeded):
1568         (WebCore::CoordinatedGraphicsScene::setLayerFiltersIfNeeded):
1569         (WebCore::CoordinatedGraphicsScene::setLayerState):
1570         (WebCore::CoordinatedGraphicsScene::deleteLayer):
1571         (WebCore::CoordinatedGraphicsScene::createTilesIfNeeded):
1572         (WebCore::CoordinatedGraphicsScene::removeTilesIfNeeded):
1573         (WebCore::CoordinatedGraphicsScene::updateTilesIfNeeded):
1574         (WebCore::CoordinatedGraphicsScene::assignImageBackingToLayer):
1575         (WebCore::CoordinatedGraphicsScene::commitSceneState):
1576         (WebCore::CoordinatedGraphicsScene::setLayerAnimationsIfNeeded):
1577         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1578         (WebCore):
1579         (CoordinatedGraphicsScene):
1580         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h: Added.
1581         (WebCore):
1582         (TileUpdateInfo):
1583         (TileCreationInfo):
1584         (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
1585         (CoordinatedGraphicsLayerState):
1586         (CoordinatedGraphicsState):
1587         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
1588         * platform/graphics/texmap/coordinated/CoordinatedLayerInfo.h: Removed.
1589         * platform/graphics/texmap/coordinated/SurfaceUpdateInfo.h:
1590
1591 2013-03-05  Roger Fong  <roger_fong@apple.com>
1592
1593         Unreviewed. AppleWin VS2010 build fix.
1594
1595         * WebCore.vcxproj/WebCore.vcxproj:
1596         * WebCore.vcxproj/WebCore.vcxproj.filters:
1597         * rendering/RenderingAllInOne.cpp:
1598
1599 2013-03-05  Bem Jones-Bey  <bjonesbe@adobe.com>
1600
1601         [CSS Exclusions] shape-outside on floats for polygon shapes
1602         https://bugs.webkit.org/show_bug.cgi?id=98676
1603
1604         Reviewed by David Hyatt.
1605
1606         Implement support for polygonal shape-outside on floats. The basic
1607         tack taken here is to keep using the bounding box of the shape to
1608         position the float, but to compute the offset (caused by the shape)
1609         from the bounding box for each line when creating and positioning
1610         other inline content.
1611
1612         Test: fast/exclusions/shape-outside-floats/shape-outside-floats-simple-polygon.html
1613
1614         * rendering/ExclusionShapeInfo.cpp:
1615         (WebCore):
1616         (WebCore::::computedShape): Add new template parameter.
1617         (WebCore::::logicalTopOffset): Add new template parameter.
1618         (WebCore::::computeSegmentsForLine): Move here from
1619             ExclusionShapeInsideInfo, since ExclusionShapeOutsideInfo needs it
1620             as well. Make virtual since there is slightly different behavior
1621             between each class even though the vast majority of the code is
1622             common.
1623         * rendering/ExclusionShapeInfo.h:
1624         (WebCore):
1625         (WebCore::ExclusionShapeInfo::~ExclusionShapeInfo): Since
1626             computeSegmentsForLine is virtual, the destructor must be virtual
1627             as well.
1628         (ExclusionShapeInfo): Add new data members to support
1629             computeSegmentsForLine.
1630         (WebCore::ExclusionShapeInfo::shapeLogicalRight): Fix bug, the logical
1631             right is based off of maxX, not y. (it's a logical bounding box!)
1632         (WebCore::ExclusionShapeInfo::logicalLineTop): Moved from
1633             ExclusionShapeInsideInfo for use by computeSegmentsForLine and
1634             lineOverlapsShapeBounds.
1635         (WebCore::ExclusionShapeInfo::logicalLineBottom): Moved from
1636             ExclusionShapeInsideInfo for use by computeSegmentsForLine and
1637             lineOverlapsShapeBounds.
1638         (WebCore::ExclusionShapeInfo::lineOverlapsShapeBounds): Moved from
1639             ExclusionShapeInsideInfo for use by computeSegmentsForLine.
1640         * rendering/ExclusionShapeInsideInfo.cpp: Moved common code from
1641             computeSegmentsForLine into ExclusionShapeInfo.
1642         * rendering/ExclusionShapeInsideInfo.h:
1643         (WebCore): Moved some methods to ExclusionShapeInfo.
1644         (ExclusionShapeInsideInfo): Update for new template parameter.
1645         (WebCore::ExclusionShapeInsideInfo::compyteSegmentsForLine): Override
1646             superclass method to clear the segment ranges. Segement ranges
1647             aren't used by shape outside, and have some complex dependencies
1648             that make it very hard to try and move up into ExclusionShapeInfo.
1649         (WebCore::ExclusionShapeInsideInfo::ExclusionShapeInsideInfo): Update
1650             for new template parameter.
1651         * rendering/ExclusionShapeOutsideInfo.cpp:
1652         (WebCore::ExclusionShapeOutsideInfo::isEnabledFor): Add polygons as a
1653             supported shape.
1654         (WebCore::ExclusionShapeOutsideInfo::computeSegmentsForLine): Override
1655             superclass method to not recompute if it isn't needed (this isn't
1656             straightfoward for shape inside, which is why it isn't common),
1657             and to save the left and right offsets caused by the shape
1658             outside, since that's all that is needed to properly do layout in
1659             the case of floats.
1660         * rendering/ExclusionShapeOutsideInfo.h:
1661         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalOffset): Reformat to
1662             be on a single line, like most other methods of it's type in
1663             WebKit headers.
1664         (ExclusionShapeOutsideInfo): Update for new template parameter.
1665         (WebCore::ExclusionShapeOutsideInfo::logicalLeftOffsetForLine):
1666             Accessor method to get the left offset between the shape and the
1667             shape's bounding box.
1668         (WebCore::ExclusionShapeOutsideInfo::logicalRightOffsetForLine):
1669             Accessor method to get the left offset between the shape and the
1670             shape's bounding box.
1671         (WebCore::ExclusionShapeOutsideInfo::ExclusionShapeOutsideInfo):
1672             Update for new template parameter.
1673         * rendering/RenderBlock.cpp:
1674         (WebCore::::collectIfNeeded): Save the last float encountered so that
1675             the shape outside offset can be accounted for.
1676         (WebCore::RenderBlock::logicalLeftOffsetForLine): Account for the
1677             shape outside offset on the outermost float.
1678         (WebCore::RenderBlock::logicalRightOffsetForLine): Account for the
1679             shape outside offset on the outermost float.
1680         * rendering/RenderBlock.h:
1681         (WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter):
1682             Initialize the lastFloat member.
1683         (WebCore::RenderBlock::FloatIntervalSearchAdapter::lastFloat): Get the
1684             last float encountered.
1685         (FloatIntervalSearchAdapter): Add a pointer to the last float
1686             encountered. Note that the variable is mutable because
1687             collectIfNeeded is declared as a const method even though it isn't
1688             (it uses loopholes to update m_offset and m_heightRemaining).
1689             Instead of trying to come up with a hack to stick with the
1690             loopholes, I decided to be explicit about it.
1691         * rendering/RenderBlockLineLayout.cpp:
1692         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Take
1693             into account the offset from any polygonal shape outside.
1694         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Add a FIXME
1695             because the current code will not work properly with stacked
1696             floats that have polygonal shape outside.
1697
1698 2013-03-04  David Hyatt  <hyatt@apple.com>
1699
1700         [New Multicolumn] Autogenerate regions for columns.
1701         https://bugs.webkit.org/show_bug.cgi?id=111363
1702
1703         Reviewed by Dean Jackson.
1704
1705         In CSS Regions, we lay out the regions first, and then
1706         we put the flow thread into the regions. This model doesn't
1707         really work for multicolumn layout, which needs to be able
1708         to auto-generate new regions lazily in response to the flow
1709         thread asking for regions at particular offsets.
1710
1711         With the multi-column model, where the regions can't just occur
1712         anywhere, its ok not to lay them out before the flow thread, as
1713         long as we have at least given them the correct size.
1714         
1715         This patch changes the layout algorithm for columns to:
1716         (1) Size any existing regions (without worrying about placement).
1717         (2) Lay out the flow thread (generating and sizing regions lazily
1718         that need to be created).
1719         (3) Lay out the regions (to give them correct placement and to
1720         compute overflow correctly for the multi-column block that contains
1721         the regions).
1722
1723         There are no new tests, since there are no behavioral changes. This
1724         is just groundwork for being able to add new sets in response to
1725         spans, balancing, and nested pagination contexts.
1726
1727         * rendering/RenderBlock.cpp:
1728         (WebCore::RenderBlock::determineLogicalLeftPositionForChild):
1729         (WebCore::RenderBlock::layoutBlockChild):
1730         * rendering/RenderBlock.h:
1731         (RenderBlock):
1732         Since we want to be able to call determineLogicalLeftPositionForChild
1733         to place the flow thread properly, and we don't want to apply a layout
1734         delta (flow threads repaint themselves), we parameterize the method
1735         here so that it can be called without applying a layout delta.
1736         
1737         * rendering/RenderFlowThread.cpp:
1738         (WebCore::RenderFlowThread::addRegionToThread):
1739         (WebCore::RenderFlowThread::removeRegionFromThread):
1740         These methods are only used by RenderMultiColumnFlowThread, since
1741         RenderNamedFlowThread overrides them. Remove the code that invalidates
1742         the flow threads region set as regions come and go, since that is now
1743         going to be expected with auto-generation.
1744
1745         (WebCore::RenderFlowThread::validateRegions):
1746         Refactor the code in RenderFlowThread::layout that validates the regions
1747         into its own method, so that we can re-validate regions at any time
1748         after generating new ones.
1749         
1750         (WebCore::RenderFlowThread::layout):
1751         Changed to move the region validation code into its own function that is
1752         now called from here.
1753
1754         (WebCore::RenderFlowThread::updateLogicalWidth):
1755         Don't assert if a region set needs layout.
1756
1757         (WebCore::RenderFlowThread::computeLogicalHeight):
1758         Ditto. Don't assert if a region set needs layout. That's expected now.
1759
1760         (WebCore::RenderFlowThread::regionAtBlockOffset):
1761         Add code to regionAtBlockOffset to auto-generate regions up to
1762         the offset. This ensures the region that is being asked for
1763         exists.
1764
1765         (WebCore::RenderFlowThread::pageLogicalTopForOffset):
1766         (WebCore::RenderFlowThread::pageLogicalWidthForOffset):
1767         (WebCore::RenderFlowThread::pageLogicalHeightForOffset):
1768         (WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
1769         These functions are no longer const, since the act of asking for
1770         pagination offsets can cause us to generate new regions.
1771
1772         (WebCore::RenderFlowThread::mapFromFlowToRegion):
1773         Modified to turn auto-generation off, since this is not really
1774         a "layout-time" function.
1775
1776         (WebCore::RenderFlowThread::logicalWidthChangedInRegions):
1777         Modified to not assert if a region set needs layout, since that is
1778         expected now.
1779
1780         * rendering/RenderFlowThread.h:
1781         Changes to remove const from the methods that can trigger region
1782         auto-generation.
1783
1784         * rendering/RenderMultiColumnBlock.cpp:
1785         (WebCore::RenderMultiColumnBlock::styleDidChange):
1786         Make sure to propagate style changes down into the regions. I don't know
1787         of any correctness bugs around this, but I figured I'd be thorough.
1788
1789         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
1790         We no longer build a column set aggressively. We wait for the flow thread
1791         to ask us for a region at a particular offset, and only then do we
1792         build the set.
1793         
1794         (WebCore::RenderMultiColumnBlock::addChild):
1795         Now that we lay out the flow thread as a special excluded child, we don't
1796         care about the ordering of it relative to the region children.
1797
1798         (WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
1799         We now lay out the flow thread as a special excluded child (like the legend
1800         of a fieldset).
1801
1802         * rendering/RenderMultiColumnBlock.h:
1803         (RenderMultiColumnBlock):
1804         Add new overrides like layoutSpecialExcludedChild.
1805         
1806         * rendering/RenderMultiColumnFlowThread.cpp:
1807         (WebCore::RenderMultiColumnFlowThread::initialLogicalWidth):
1808         Set the flow thread to the initial column width even when no regions exist
1809         yet. This way we ensure the width is right even when we don't have any
1810         regions yet.
1811
1812         (WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset):
1813         This method handles autogenerating the new region for a given offset.
1814         Right now it's simplistic, since we only have one column set. This method
1815         will be enhanced in future patches when we start supporting multiple column
1816         sets.
1817
1818         * rendering/RenderMultiColumnFlowThread.h:
1819         (RenderMultiColumnFlowThread):
1820         Adding new method declarations like autoGenerateRegionsToBlockOffset.
1821
1822         * rendering/RenderMultiColumnSet.cpp:
1823         (WebCore::RenderMultiColumnSet::updateLogicalWidth):
1824         Since regions lay out after flow threads, we don't need to make 
1825         setFlowThreadPortionRect virtual any longer. We can just get our column set's
1826         width correct immediately. This is the same logic, just moved into updateLogicalWidth().
1827
1828         * rendering/RenderMultiColumnSet.h:
1829         Remove setFlowThreadPortionRect override, since the function can just be simple
1830         and non-virtual in RenderRegion now.
1831
1832         * rendering/RenderRegion.cpp:
1833         (WebCore::RenderRegion::layoutBlock):
1834         Don't ever invalidate region sets in response to our size changing during layout. Since
1835         our size is always determined outside of layout now, we don't need to do any of
1836         these checks.
1837
1838         * rendering/RenderRegion.h:
1839         (WebCore::RenderRegion::setFlowThreadPortionRect):
1840         Changed to be non-virtual now that RenderMultiColumnSet doesn't need to override.
1841
1842 2013-03-04  Alexey Proskuryakov  <ap@apple.com>
1843
1844         Make AsyncFileReader work without ScriptExecutionContext
1845         https://bugs.webkit.org/show_bug.cgi?id=111376
1846
1847         Reviewed by Anders Carlsson.
1848
1849         * WebCore.xcodeproj/project.pbxproj: Added MainThreadTask.h.
1850
1851         * dom/ScriptExecutionContext.cpp:
1852         * dom/ScriptExecutionContext.h:
1853         Removed fileThread(). Creating a thread for every context that acesses files appears
1854         wasteful and unnecessary.
1855
1856         * fileapi/AsyncFileStream.h:
1857         * fileapi/AsyncFileStream.cpp:
1858         (WebCore::createFileThread): FileThread is now a singleton.
1859         (WebCore::fileThread): Ditto.
1860         (WebCore::AsyncFileStream::AsyncFileStream):
1861         (WebCore::AsyncFileStream::create):
1862         (WebCore::didStart):
1863         (WebCore::AsyncFileStream::startOnFileThread):
1864         (WebCore::AsyncFileStream::stop):
1865         (WebCore::derefProxyOnMainThread):
1866         (WebCore::AsyncFileStream::stopOnFileThread):
1867         (WebCore::didGetSize):
1868         (WebCore::AsyncFileStream::getSizeOnFileThread):
1869         (WebCore::didOpen):
1870         (WebCore::AsyncFileStream::openForReadOnFileThread):
1871         (WebCore::AsyncFileStream::openForWriteOnFileThread):
1872         (WebCore::didRead):
1873         (WebCore::AsyncFileStream::readOnFileThread):
1874         (WebCore::didWrite):
1875         (WebCore::AsyncFileStream::writeOnFileThread):
1876         (WebCore::didTruncate):
1877         (WebCore::AsyncFileStream::truncateOnFileThread):
1878         Use callOnMainThread() instead of posting messages through a context. We never used
1879         other threads, and don't plan to.
1880
1881         * loader/ResourceLoader.cpp:
1882         * loader/ResourceLoader.h:
1883         We no longer need this pseudo-client call to create an AsyncFileStream, now that
1884         we don't need to get a ScriptExecutionContext somewhere.
1885
1886         * platform/MainThreadTask.h: Added. This implements callOnMainThread with multiple
1887         strongly typed arguments. Closely based on CrossThreadTask.h.
1888
1889         * platform/network/BlobResourceHandle.cpp:
1890         (WebCore::BlobResourceHandle::BlobResourceHandle): Create AsyncFileStream directly.
1891
1892         * platform/network/ResourceHandleClient.h: Removed createAsyncFileStream().
1893
1894 2013-03-05  Jessie Berlin  <jberlin@apple.com>
1895
1896         Update the localizable strings file.
1897
1898         Rubber-stamped by Anders Carlsson.
1899
1900         * English.lproj/Localizable.strings:
1901
1902 2013-03-05  Chris Fleizach  <cfleizach@apple.com>
1903
1904         AX: aria-label does not override text content on iOS
1905         https://bugs.webkit.org/show_bug.cgi?id=111222
1906
1907         Reviewed by David Kilzer.
1908
1909         Make iOS use the same text alternative computation that Mac is using. The main difference
1910         is that description and title need to be concatenated, because iOS doesn't have two attributes
1911         to return those values.
1912
1913         Test: platform/iphone-simulator/accessibility/aria-label-with-internal-text.html
1914
1915         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1916         (-[WebAccessibilityObjectWrapper stringValueShouldBeUsedInLabel]):
1917         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
1918         (-[WebAccessibilityObjectWrapper accessibilityHint]):
1919         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
1920
1921 2013-03-05  David Kilzer  <ddkilzer@apple.com>
1922
1923         BUILD FIX (r144698): Only enable SPEECH_SYNTHESIS for Mac
1924         <http://webkit.org/b/106742>
1925
1926         Fixes the following build failures:
1927
1928             Undefined symbols for architecture i386:
1929               "__ZTVN7WebCore25PlatformSpeechSynthesizerE", referenced from:
1930                   __ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE in PlatformSpeechSynthesizer.o
1931               NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
1932               "__ZN7WebCore25PlatformSpeechSynthesizer19initializeVoiceListEv", referenced from:
1933                   __ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE in PlatformSpeechSynthesizer.o
1934             ld: symbol(s) not found for architecture i386
1935
1936         * Configurations/FeatureDefines.xcconfig:
1937         - Only set ENABLE_SPEECH_SYNTHESIS for the macosx platform.
1938
1939 2013-03-05  Dmitry Zvorygin  <zvorygin@chromium.org>
1940
1941         Web Inspector: registered new MIME type application/font-woff for WOFF fonts.
1942         https://bugs.webkit.org/show_bug.cgi?id=111418
1943
1944         The WOFF MIME Type was formally registered as application/font-woff (FINALLY):
1945         http://www.iana.org/assignments/media-types/application/font-woff
1946
1947         Reviewed by Pavel Feldman.
1948
1949         * inspector/front-end/NetworkManager.js:
1950         (WebInspector.NetworkManager):
1951         (WebInspector.NetworkDispatcher.prototype._updateNetworkRequestWithResponse):
1952
1953 2013-03-05  Julien Chaffraix  <jchaffraix@webkit.org>
1954
1955         [CSS Grid Layout] Add parsing for grid-{end|after}
1956         https://bugs.webkit.org/show_bug.cgi?id=111372
1957
1958         Reviewed by Tony Chang.
1959
1960         Test: fast/css-grid-layout/grid-item-end-after-get-set.html
1961
1962         This change adds the proper support for grid-{end|after}. It doesn't update
1963         grid-{row|column} to be a shorthand for both grid-{before|start} and grid-{after|end}
1964         though.
1965
1966         * css/CSSComputedStyleDeclaration.cpp:
1967         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1968         Added the new properties to our known properties. Also added
1969         support for getComputedStyle.
1970
1971         * css/CSSParser.cpp:
1972         (WebCore::CSSParser::parseValue):
1973         Added parsing for the new properties.
1974
1975         * css/CSSProperty.cpp:
1976         (WebCore::CSSProperty::isInheritedProperty):
1977         The new properties are not inherited.
1978
1979         * css/CSSPropertyNames.in:
1980         Added the new properties.
1981
1982         * css/StyleResolver.cpp:
1983         (WebCore::StyleResolver::applyProperty):
1984         Added code to handle applying them to our style.
1985
1986         * rendering/style/RenderStyle.h:
1987         * rendering/style/StyleGridItemData.cpp:
1988         (WebCore::StyleGridItemData::StyleGridItemData):
1989         * rendering/style/StyleGridItemData.h:
1990         (WebCore::StyleGridItemData::operator==):
1991         (StyleGridItemData):
1992         Updated our representation to store the new properties.
1993
1994 2013-03-05  Andrey Kosyakov  <caseq@chromium.org>
1995
1996         Unreviewed follow-up to r144756, fix broken inspector-less build.
1997
1998         * inspector/InspectorInstrumentation.h:
1999         (WebCore::InspectorInstrumentation::willWriteHTML):
2000
2001 2013-03-05  Mark Lam  <mark.lam@apple.com>
2002
2003         Improve robustness of WebSQL quota management.
2004         https://bugs.webkit.org/show_bug.cgi?id=110600.
2005
2006         Reviewed by Geoffrey Garen.
2007
2008         1. Introduced the OriginLock for synchronizing write access to the
2009            database origin directory. This allows us to more accurately
2010            compute the disk usage.
2011
2012            The OriginLock uses a mutex to provide mutual exclusion between
2013            threads and a file lock for mutual exclusion between processes.
2014            The file lock part is conditional on USE(FILE_LOCK).
2015
2016            The mutex mutual exclusion also serves to ensure that only 1 thread
2017            can write to a sqlite database at one time.
2018
2019         2. Change the SQLTransactionCoordinator to only allow one write
2020            transaction to an origin instead of one write transaction per
2021            database. This is needed in order to accurately compute the
2022            disk usage. It is also necessary so that the OriginLock does not
2023            deadlock itself (as would be the case if concurrent write transactions
2024            to different databases in the same origin are allowed).
2025
2026         3. Fix DatabaseTracker::getMaxSizeForDatabase() to check for when
2027            disk usage may exceed the quota, and ensure that we will return
2028            an appropriate max database size.
2029
2030            Disk usage can exceed the usage if it is already near the quota limit
2031            but have not exceeded it yet. If a new database is opened in that
2032            origin, it may bump the usage above the quota, but should not
2033            continually repeat this. Subsequent attempts to open a database
2034            will find that the quota is already exhausted and fail.
2035
2036            There is still a race condition pertaining to the tracker database
2037            getting out of sync that may still enable runaway growth in the
2038            database sizes. That issue only manifest in a multi-process
2039            environment, and will be fixed in another changeset.
2040
2041         4. Fixed a bug in SQLStatement to check if the errorCallback exists
2042            before invoking it.
2043
2044         No new layout tests. A quota-test.html was attached to bugzilla for manual
2045         testing of multi-tab concurrent consumption of storage resource, and also
2046         to test handling situations when the user deletes the database files while
2047         the script is still using the database.
2048
2049         * CMakeLists.txt:
2050         * GNUmakefile.list.am:
2051         * Modules/webdatabase/DatabaseTracker.cpp:
2052         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
2053         (WebCore::DatabaseTracker::originLockFor):
2054         (WebCore::DatabaseTracker::deleteOriginLockFor):
2055         (WebCore::DatabaseTracker::deleteOrigin):
2056         * Modules/webdatabase/DatabaseTracker.h:
2057         * Modules/webdatabase/OriginLock.cpp: Added.
2058         (WebCore::OriginLock::lockFileNameForPath):
2059         (WebCore::OriginLock::OriginLock):
2060         (WebCore::OriginLock::~OriginLock):
2061         (WebCore::OriginLock::lock):
2062         (WebCore::OriginLock::unlock):
2063         * Modules/webdatabase/OriginLock.h: Added.
2064         * Modules/webdatabase/SQLStatement.cpp:
2065         (WebCore::SQLStatement::performCallback):
2066         * Modules/webdatabase/SQLTransactionBackend.cpp:
2067         (WebCore::SQLTransactionBackend::doCleanup):
2068         (WebCore::SQLTransactionBackend::computeNextStateAndCleanupIfNeeded):
2069         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
2070         (WebCore::SQLTransactionBackend::postflightAndCommit):
2071         (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
2072         (WebCore::SQLTransactionBackend::acquireOriginLock):
2073         (WebCore::SQLTransactionBackend::releaseOriginLockIfNeeded):
2074         * Modules/webdatabase/SQLTransactionBackend.h:
2075         (SQLTransactionBackend):
2076         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
2077         (WebCore::getDatabaseIdentifier):
2078         * Target.pri:
2079         * WebCore.gypi:
2080         * WebCore.vcproj/WebCore.vcproj:
2081         * WebCore.vcxproj/WebCore.vcxproj:
2082         * WebCore.vcxproj/WebCore.vcxproj.filters:
2083         * WebCore.xcodeproj/project.pbxproj:
2084         * config.h:
2085         * platform/FileSystem.h:
2086         * platform/posix/FileSystemPOSIX.cpp:
2087         (WebCore::lockFile):
2088         (WebCore::unlockFile):
2089
2090 2013-03-05  Ilya Tikhonovsky  <loislo@chromium.org>
2091
2092         Web Inspector: move PopoverContentHelper from TimelinePresentationModel.js to Popover.js.
2093         https://bugs.webkit.org/show_bug.cgi?id=111431
2094
2095         Reviewed by Yury Semikhatsky.
2096
2097         class WebInspector.TimelinePresentationModel.PopoverContentHelper was renamed to WebInspector.PopoverContentHelper.
2098         Style names were changed accordingly.
2099
2100         * inspector/front-end/Popover.js:
2101         (WebInspector.PopoverContentHelper):
2102         (WebInspector.PopoverContentHelper.prototype.contentTable):
2103         (WebInspector.PopoverContentHelper.prototype._createCell):
2104         (WebInspector.PopoverContentHelper.prototype.appendTextRow):
2105         (WebInspector.PopoverContentHelper.prototype.appendElementRow):
2106         (WebInspector.PopoverContentHelper.prototype.appendStackTrace):
2107         * inspector/front-end/TimelinePresentationModel.js:
2108         (WebInspector.TimelinePresentationModel.prototype.generateMainThreadBarPopupContent):
2109         (WebInspector.TimelinePresentationModel.Record.prototype._generatePopupContentWithImagePreview):
2110         (WebInspector.TimelinePresentationModel.generatePopupContentForFrame):
2111         (WebInspector.TimelinePresentationModel.generatePopupContentForFrameStatistics):
2112         * inspector/front-end/popover.css:
2113         (.popover-details):
2114         (.popover-function-name):
2115         (.popover-stacktrace-title):
2116         (.popover-details-row-title):
2117         (.popover-details-row-data):
2118         (.popover-details-title):
2119         * inspector/front-end/timelinePanel.css:
2120
2121 2013-03-05  Yury Semikhatsky  <yurys@chromium.org>
2122
2123         Web Inspector: remove "Live native memory chart" experiment
2124         https://bugs.webkit.org/show_bug.cgi?id=111432
2125
2126         Reviewed by Alexander Pavlov.
2127
2128         Removed support for live native memory chart.
2129
2130         * English.lproj/localizedStrings.js:
2131         * inspector/front-end/NativeMemorySnapshotView.js:
2132         * inspector/front-end/ProfileLauncherView.js:
2133         (WebInspector.ProfileLauncherView):
2134         * inspector/front-end/ProfilesPanel.js:
2135         (WebInspector.ProfilesPanel):
2136         * inspector/front-end/Settings.js:
2137         (WebInspector.ExperimentsSettings):
2138         * inspector/front-end/nativeMemoryProfiler.css:
2139
2140 2013-03-05  Andrey Kosyakov  <caseq@chromium.org>
2141
2142         Web Inspector: remove length parameter from Parse HTML timeline event
2143         https://bugs.webkit.org/show_bug.cgi?id=111421
2144
2145         Reviewed by Yury Semikhatsky.
2146
2147         - remove length parameter in all instrumentation methods used to emit ParseHTML timeline event;
2148         - drive-by style fixes.
2149
2150         * html/parser/HTMLDocumentParser.cpp:
2151         (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
2152         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
2153         (WebCore::HTMLDocumentParser::pumpTokenizer):
2154         * inspector/InspectorInstrumentation.cpp:
2155         (WebCore):
2156         (WebCore::InspectorInstrumentation::willWriteHTMLImpl):
2157         (WebCore::InspectorInstrumentation::didWriteHTMLImpl):
2158         * inspector/InspectorInstrumentation.h:
2159         (InspectorInstrumentation):
2160         (WebCore::InspectorInstrumentation::willWriteHTML):
2161         (WebCore::InspectorInstrumentation::didWriteHTML):
2162         * inspector/InspectorTimelineAgent.cpp:
2163         (WebCore::InspectorTimelineAgent::willWriteHTML):
2164         (WebCore::InspectorTimelineAgent::didWriteHTML):
2165         * inspector/InspectorTimelineAgent.h:
2166         (InspectorTimelineAgent):
2167         * inspector/TimelineRecordFactory.cpp:
2168         (WebCore::TimelineRecordFactory::createParseHTMLData):
2169         * inspector/TimelineRecordFactory.h:
2170         (TimelineRecordFactory):
2171
2172 2013-03-05  Alexei Filippov  <alph@chromium.org>
2173
2174         Web Inspector: allow each profiler panel to have own landing page
2175         https://bugs.webkit.org/show_bug.cgi?id=111298
2176
2177         Reviewed by Yury Semikhatsky.
2178
2179         Refactor profiler landing page to allow different profiler panels to have own landing pages.
2180           - MultiProfileLauncherView is inherited from ProfileLauncherView
2181           - Native memory distribution profiler has got a custom page.
2182
2183         No new tests: code refactoring.
2184
2185         * inspector/front-end/HeapSnapshotView.js:
2186         (WebInspector.HeapSnapshotView.prototype.get profile):
2187         (WebInspector.HeapSnapshotView.prototype.get baseProfile):
2188         (WebInspector.HeapSnapshotView.prototype._profiles):
2189         * inspector/front-end/NativeMemorySnapshotView.js:
2190         * inspector/front-end/ProfileLauncherView.js:
2191         (WebInspector.ProfileLauncherView):
2192         (WebInspector.ProfileLauncherView.prototype.addProfileType):
2193         (WebInspector.ProfileLauncherView.prototype._controlButtonClicked):
2194         (WebInspector.ProfileLauncherView.prototype._updateControls):
2195         (WebInspector.ProfileLauncherView.prototype.profileStarted):
2196         (WebInspector.ProfileLauncherView.prototype.profileFinished):
2197         (WebInspector.MultiProfileLauncherView):
2198         (WebInspector.MultiProfileLauncherView.prototype.addProfileType):
2199         (WebInspector.MultiProfileLauncherView.prototype._profileTypeChanged):
2200         (WebInspector.NativeProfileLauncherView):
2201         * inspector/front-end/ProfilesPanel.js:
2202         (WebInspector.ProfilesPanel):
2203         (WebInspector.ProfilesPanel.prototype._createLauncherView):
2204         (WebInspector.CPUProfilerPanel):
2205         (WebInspector.CSSSelectorProfilerPanel):
2206         (WebInspector.HeapProfilerPanel):
2207         (WebInspector.CanvasProfilerPanel):
2208         (WebInspector.MemoryChartProfilerPanel):
2209         (WebInspector.MemoryChartProfilerPanel.prototype._createLauncherView):
2210         (WebInspector.NativeMemoryProfilerPanel):
2211         * inspector/front-end/profilesPanel.css:
2212         (.panel-enabler-view.profile-launcher-view button:not(.status-bar-item)):
2213
2214 2013-03-05  Eugene Klyuchnikov  <eustas@chromium.org>
2215
2216         Web Inspector: Clarify some StylesSidebarPanel and CSSMetadata JSDocs.
2217         https://bugs.webkit.org/show_bug.cgi?id=111427
2218
2219         Reviewed by Alexander Pavlov.
2220
2221         Goal: reflect in JSDoc that non-null array is passed to completionsReady callback.
2222
2223         * inspector/front-end/CSSMetadata.js:
2224         Added JSDocs, avoided possible NPEs.
2225         * inspector/front-end/StylesSidebarPane.js:
2226         Fixed JSDocs, removed unused assignment.
2227
2228 2013-03-05  David Kilzer  <ddkilzer@apple.com>
2229
2230         BUILD FIX (r144727): Change type of columnRange and rowRange to pair<unsigned, unsigned>
2231         <http://webkit.org/b/110050>
2232
2233         Fixes the following build failures:
2234
2235             Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:741:30: error: non-const lvalue reference to type 'pair<unsigned int, unsigned int>' cannot bind to a value of unrelated type 'pair<int, int>'
2236                 tableCell->rowIndexRange(rowRange);
2237                                          ^~~~~~~~
2238             In file included from Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:33:
2239             Source/WebCore/accessibility/AccessibilityTableCell.h:47:58: note: passing argument to parameter 'rowRange' here
2240                 virtual void rowIndexRange(pair<unsigned, unsigned>& rowRange);
2241                                                                      ^
2242             Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:742:33: error: non-const lvalue reference to type 'pair<unsigned int, unsigned int>' cannot bind to a value of unrelated type 'pair<int, int>'
2243                 tableCell->columnIndexRange(columnRange);
2244                                             ^~~~~~~~~~~
2245             In file included from Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:33:
2246             Source/WebCore/accessibility/AccessibilityTableCell.h:49:61: note: passing argument to parameter 'columnRange' here
2247                 virtual void columnIndexRange(pair<unsigned, unsigned>& columnRange);
2248                                                                         ^
2249             Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:804:30: error: non-const lvalue reference to type 'pair<unsigned int, unsigned int>' cannot bind to a value of unrelated type 'pair<int, int>'
2250                 tableCell->rowIndexRange(rowRange);
2251                                          ^~~~~~~~
2252             In file included from Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:33:
2253             Source/WebCore/accessibility/AccessibilityTableCell.h:47:58: note: passing argument to parameter 'rowRange' here
2254                 virtual void rowIndexRange(pair<unsigned, unsigned>& rowRange);
2255                                                                      ^
2256             Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:818:33: error: non-const lvalue reference to type 'pair<unsigned int, unsigned int>' cannot bind to a value of unrelated type 'pair<int, int>'
2257                 tableCell->columnIndexRange(columnRange);
2258                                             ^~~~~~~~~~~
2259             In file included from Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:33:
2260             Source/WebCore/accessibility/AccessibilityTableCell.h:49:61: note: passing argument to parameter 'columnRange' here
2261                 virtual void columnIndexRange(pair<unsigned, unsigned>& columnRange);
2262                                                             ^
2263             4 errors generated.
2264
2265         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2266         (-[WebAccessibilityObjectWrapper accessibilityHeaderElements]):
2267         (-[WebAccessibilityObjectWrapper accessibilityRowRange]):
2268         (-[WebAccessibilityObjectWrapper accessibilityColumnRange]):
2269
2270 2013-03-04  Andrey Kosyakov  <caseq@chromium.org>
2271
2272         Web Inspector: [refactoring] set frame identifiers in timeline records early, do not keep them in event stack
2273         https://bugs.webkit.org/show_bug.cgi?id=111345
2274
2275         Reviewed by Pavel Feldman.
2276
2277         * inspector/InspectorTimelineAgent.cpp:
2278         (WebCore::InspectorTimelineAgent::pushGCEventRecords):
2279         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
2280         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
2281         (WebCore::InspectorTimelineAgent::setFrameIdentifier):
2282         (WebCore):
2283         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
2284         (WebCore::InspectorTimelineAgent::appendRecord):
2285         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
2286         (WebCore::InspectorTimelineAgent::commitFrameRecord):
2287         * inspector/InspectorTimelineAgent.h:
2288         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
2289         (TimelineRecordEntry):
2290         (InspectorTimelineAgent):
2291
2292 2013-03-05  Tommy Widenflycht  <tommyw@google.com>
2293
2294         MediaStream API: Add the getStreamById method on RTCPeerConnection
2295         https://bugs.webkit.org/show_bug.cgi?id=111311
2296
2297         Reviewed by Adam Barth.
2298
2299         Adding the missing method on RTCPeerConnection defined here:
2300         http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-RTCPeerConnection-getStreamById-MediaStream-DOMString-streamId
2301
2302         Existing tests have been extended to cover patch.
2303
2304         * Modules/mediastream/RTCPeerConnection.cpp:
2305         (WebCore::RTCPeerConnection::getStreamById):
2306         (WebCore):
2307         * Modules/mediastream/RTCPeerConnection.h:
2308         (RTCPeerConnection):
2309         * Modules/mediastream/RTCPeerConnection.idl:
2310         * platform/chromium/support/WebMediaStream.cpp:
2311         (WebKit::WebMediaStream::initialize):
2312         (WebKit):
2313         * platform/mediastream/MediaStreamSource.cpp:
2314         (WebCore::MediaStreamSource::setReadyState):
2315
2316 2013-03-05  Antoine Quint  <graouts@apple.com>
2317
2318         Web Inspector: allow retrieval of composited layers in a given DOM subtree
2319         https://bugs.webkit.org/show_bug.cgi?id=111312
2320
2321         Introduce the LayerTreeAgent.layersForNode(node) method allowing the front-end
2322         to gather all composited layers associated with nodes in the subtree of which
2323         the provided node is the root.
2324
2325         In order to gather the layers in the subtree, we first traverse the node's
2326         renderer's RenderObject hierarchy and whenever we encounter a RenderObject
2327         that has a RenderLayer, we then traverse that renderLayer's RenderLayer
2328         hierarchy. This allows for a quick path through the relevant objects we're
2329         gathering.
2330
2331         Layers gathered will push the node to which they're associated, allowing a
2332         nodeId for this layer to be listed in the Layer object sent to the front-end.
2333         It is crucial to be able to provide a nodeId as well as a layerId for a Layer
2334         object in order to be able to correctly assess mutations in the layer tree.
2335         For instance, it is expected that a node's layer be replaced by a new layer
2336         to represent a slightly different rendering of its content, but the front-end
2337         should be able to represent this layer as an object for which only certain
2338         attributes have changed (like the "paintCount" property).
2339
2340         Layer objects also indicate whether they're associated to a node hosted in a
2341         shadow tree (the optional "isInShadowTree" property) in order for the front-end
2342         to be able to only show this layer if the option to show nodes hosted in shadow
2343         tree is enabled.
2344
2345         Finally, since we're only gathering composited layers, we're removing the
2346         "isLayerComposited" property and removing the optional flag on the "paintCount",
2347         "memory" and "compositedBounds" properties.
2348
2349         Reviewed by Simon Fraser.
2350
2351         Test: inspector-protocol/layers/layers-for-node.html
2352
2353         * inspector/Inspector.json:
2354         * inspector/InspectorLayerTreeAgent.cpp:
2355         (WebCore::InspectorLayerTreeAgent::layersForNode):
2356         (WebCore):
2357         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
2358         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
2359         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
2360         (WebCore::InspectorLayerTreeAgent::idForNode):
2361         * inspector/InspectorLayerTreeAgent.h:
2362         (InspectorLayerTreeAgent):
2363
2364 2013-03-04  Andrey Kosyakov  <caseq@chromium.org>
2365
2366         Web Inspector: use timestamps consistent with rest of Timeline in WebSocket events.
2367         https://bugs.webkit.org/show_bug.cgi?id=111344
2368
2369         - create web socket related records in a manner consistent with the rest of timeline.
2370
2371         Reviewed by Pavel Feldman.
2372
2373         * inspector/InspectorTimelineAgent.cpp:
2374         (WebCore::InspectorTimelineAgent::didCreateWebSocket):
2375         (WebCore::InspectorTimelineAgent::willSendWebSocketHandshakeRequest):
2376         (WebCore::InspectorTimelineAgent::didReceiveWebSocketHandshakeResponse):
2377         (WebCore::InspectorTimelineAgent::didDestroyWebSocket):
2378         * inspector/InspectorTimelineAgent.h:
2379         (InspectorTimelineAgent):
2380
2381 2013-03-05  Andrei Bucur  <abucur@adobe.com>
2382
2383         [CSS Regions] Crash when MathML used in CSS Regions
2384         https://bugs.webkit.org/show_bug.cgi?id=110686
2385
2386         Reviewed by David Hyatt.
2387
2388         The MathML blocks trigger a children layout when computing the preferred widths. This happens to determine the preferred
2389         logical heights of the children. When the layout reaches the line boxes computation the preferred width of the containing block
2390         is requested. Because it wasn't computed, the layout of the children is started again to determine the preferred logical heights.
2391         This causes an infinite recursion and triggers a stack overflow.
2392
2393         The patch introduces a new RAII utility class that disables fragmentation when the constructor is called and restores it
2394         on the destructor. This class is used when computing the preferred height for the children of a MathML block.
2395
2396         Test: fast/regions/mathml-crash.html
2397
2398         * rendering/RenderObject.cpp:
2399         (WebCore::RenderObject::setFlowThreadStateIncludingDescendants): Do not cross RenderFlowThread boundaries when updating the flow thread
2400         state flag. The innermost flow threads need to manage their descendants flag values.
2401         * rendering/RenderView.cpp:
2402         (WebCore::FragmentationDisabler::FragmentationDisabler):
2403         (WebCore):
2404         (WebCore::FragmentationDisabler::~FragmentationDisabler):
2405         * rendering/RenderView.h:
2406         (FragmentationDisabler):
2407         (WebCore):
2408         * rendering/mathml/RenderMathMLBlock.cpp:
2409         (WebCore::RenderMathMLBlock::computeChildrenPreferredLogicalHeights):
2410
2411 2013-03-05  Mike West  <mkwst@chromium.org>
2412
2413         Cleanup: Move HitTestLocation and HitTestResult into separate files.
2414         https://bugs.webkit.org/show_bug.cgi?id=111294
2415
2416         Reviewed by Allan Sandfeld Jensen.
2417
2418         HitTestLocation and HitTestResult currently both live in
2419         HitTestResult.h. That makes things more difficult to understand than
2420         they should be, and violates the one-class-one-file principle that
2421         WebKit generally follows. Happily, it's fairly trivial to fix.
2422
2423         This should have no visible change; it's strictly an internal
2424         refactoring. It doesn't even touch any implementation code: we're
2425         just moving bits from one place to another.
2426
2427         * CMakeLists.txt:
2428         * GNUmakefile.list.am:
2429         * Target.pri:
2430         * WebCore.gypi:
2431         * WebCore.vcproj/WebCore.vcproj:
2432         * WebCore.xcodeproj/project.pbxproj:
2433             Hey, look: a new file! Let's add it to six different build systems! :)
2434         * rendering/HitTestLocation.cpp: Added.
2435         (WebCore):
2436         (WebCore::HitTestLocation::HitTestLocation):
2437         (WebCore::HitTestLocation::~HitTestLocation):
2438         (WebCore::HitTestLocation::operator=):
2439         (WebCore::HitTestLocation::move):
2440         (WebCore::HitTestLocation::intersectsRect):
2441         (WebCore::HitTestLocation::intersects):
2442         (WebCore::HitTestLocation::rectForPoint):
2443         * rendering/HitTestLocation.h: Added.
2444         (WebCore):
2445         (HitTestLocation):
2446         (WebCore::HitTestLocation::point):
2447         (WebCore::HitTestLocation::roundedPoint):
2448         (WebCore::HitTestLocation::region):
2449         (WebCore::HitTestLocation::isRectBasedTest):
2450         (WebCore::HitTestLocation::isRectilinear):
2451         (WebCore::HitTestLocation::boundingBox):
2452         (WebCore::HitTestLocation::topPadding):
2453         (WebCore::HitTestLocation::rightPadding):
2454         (WebCore::HitTestLocation::bottomPadding):
2455         (WebCore::HitTestLocation::leftPadding):
2456         (WebCore::HitTestLocation::transformedPoint):
2457         (WebCore::HitTestLocation::transformedRect):
2458         * rendering/HitTestResult.cpp:
2459         * rendering/HitTestResult.h:
2460             Move all this code from HitTestResult.* to HitTestLocation.*.
2461         * rendering/RenderBlock.cpp:
2462             Include HitTestLocation.h.
2463
2464 2013-03-05  Jochen Eisinger  <jochen@chromium.org>
2465
2466         Refactor UserGestureIndicator::Token to be a top-level class
2467         https://bugs.webkit.org/show_bug.cgi?id=111412
2468
2469         Reviewed by Nico Weber.
2470
2471         This will allow for forward declaring the class in a public WebKit
2472         API header. The goal is to enable the embedder to hold on to a
2473         UserGestureToken.
2474
2475         * dom/UserGestureIndicator.cpp:
2476         (WebCore::UserGestureIndicator::UserGestureIndicator):
2477         (WebCore::UserGestureIndicator::currentToken):
2478         * dom/UserGestureIndicator.h:
2479         (UserGestureToken):
2480         (WebCore::UserGestureToken::~UserGestureToken):
2481         (WebCore):
2482         (UserGestureIndicator):
2483         * page/DOMTimer.h:
2484         (DOMTimer):
2485         * page/EventHandler.h:
2486
2487 2013-03-05  Mike West  <mkwst@chromium.org>
2488
2489         Remove redundant code in Document::updateHoverActiveState.
2490         https://bugs.webkit.org/show_bug.cgi?id=111303
2491
2492         Reviewed by Darin Adler.
2493
2494         Document::updateHoverActiveState currently looks for touchrelease events
2495         and explictly clears out the hover state for all nodes between the
2496         currently hovered node and the top of the hover chain. This is actually
2497         redundant with the logic in the rest of the function; we can simplify by
2498         setting the Element* we're working with to 0, which causes the later
2499         loops to do the necessary work.
2500
2501         There should be no web-visible effect from this change; it should simply
2502         make this function less complex.
2503
2504         Extracted from Allan Sandfeld Jensen's original patch to wkbug.com/98168
2505
2506         * dom/Document.cpp:
2507         (WebCore::Document::updateHoverActiveState):
2508             Set innerElementInDocument to 0 rather than walking the hover chain
2509             and clearing it when we see a touchrelease event. The rest of the
2510             code in this function will have the same effect.
2511
2512 2013-03-05  Koji Hara  <kojih@chromium.org>
2513
2514         [V8] Remove unused custom indexedPropertyGetter
2515         https://bugs.webkit.org/show_bug.cgi?id=111409
2516
2517         Reviewed by Kentaro Hara.
2518
2519         Remove unused custom indexedPropertyGetter.
2520         There are 9 custom indexedPropertyGetter, including an unused one(NamedNodeMap).
2521         This commit assures all existing custom indexedPropertyGetter(for V8) are used.
2522
2523         No new tests. Simple refactoring.
2524
2525         * bindings/v8/custom/V8NamedNodeMapCustom.cpp: Remove indexedPropertyGetter
2526
2527 2013-03-05  Hajime Morrita  <morrita@google.com>
2528
2529         ShadowRoot needs guardRef() and guardDeref()
2530         https://bugs.webkit.org/show_bug.cgi?id=109777
2531
2532         Reviewed by Dimitri Glazkov.
2533
2534         This change moves m_guardRefCount from Document to TreeScope,
2535         which allows ShadowRoot to be guarded by guardRef() mechanism as
2536         Document. After r137524, Node referes TreeScope instead of
2537         Document. This is natural consequence of the change: It no longer
2538         makes sense to guardRef() Document pointer from Node.
2539
2540         Detail:
2541
2542         - Document::m_guardRefCount and related funcdtions are moved to TreeScope
2543         - Document::removedLastRef is factored out into TreeScope::removedLastRefToScope(),
2544           TreeScope::dispose() and Docuent::dispose(). ShadowRoot also got its own dispose() implementation.
2545         - Moved guardRef() and guardDeref() calls to TreeScope and Node.
2546           Note that there are two "guarded" TreeScope references. One is
2547           Node::m_treeScope and another is TreeScope::m_parentTreeScope.
2548           The guarded-ref management is now encapsulated in these two classes.
2549
2550         No new tests. Covered by existing tests.
2551
2552         * WebCore.exp.in:
2553         * dom/Document.cpp:
2554         (WebCore::Document::Document):
2555         (WebCore::Document::~Document):
2556         (WebCore::Document::dispose): Extracted from removedLastRef()
2557         * dom/Document.h:
2558         (WebCore::Node::isTreeScope):
2559         (WebCore::Node::Node):
2560         * dom/DocumentFragment.cpp:
2561         (WebCore::DocumentFragment::DocumentFragment): Remove ASSERT() and move it to ...
2562         (WebCore::DocumentFragment::create): ... here, to allow NULL document from ShadowRoot.
2563         * dom/Node.cpp:
2564         (WebCore::Node::~Node):
2565         (WebCore::Node::removedLastRef):
2566         * dom/Node.h:
2567         (WebCore::Node::setTreeScope):
2568         * dom/Element.cpp:
2569         (WebCore::Element::ensureAttr): This has been wrong and is fixed in this revision since the incorrectness is unveiled by this change.
2570         * dom/ShadowRoot.cpp:
2571         (WebCore::ShadowRoot::ShadowRoot): Passed NULL document to superclass. This aligns what Document is doing.
2572         (WebCore::ShadowRoot::dispose): Added.
2573         * dom/ShadowRoot.h:
2574         (ShadowRoot):
2575         * dom/TreeScope.cpp:
2576         (SameSizeAsTreeScope):
2577         (WebCore::TreeScope::TreeScope):
2578         (WebCore::TreeScope::~TreeScope):
2579         (WebCore::TreeScope::dispose): Added.
2580         (WebCore::TreeScope::setParentTreeScope):
2581         (WebCore::TreeScope::deletionHasBegun):
2582         (WebCore::TreeScope::beginDeletion):
2583         (WebCore::TreeScope::refCount): Added.
2584         * dom/TreeScope.h: Turned m_rootNode to Node* from ContainerNode* for Node::isTreeScope to be inlined.
2585         (WebCore::TreeScope::guardRef): Pulled up from Document.
2586         (WebCore::TreeScope::guardDeref): Ditto.
2587         (WebCore::TreeScope::hasGuardRefCount): Added to hide m_guardRefCount.
2588         (WebCore::TreeScope::deletionHasBegun): Added.
2589         (WebCore::TreeScope::beginDeletion): Added.
2590         (WebCore::TreeScope::removedLastRefToScope): Pulled up from Document.
2591         * dom/TreeScopeAdopter.cpp:
2592         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2593         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
2594
2595 2013-03-04  Uday Kiran  <udaykiran@motorola.com>
2596
2597         getPropertyValue for -webkit-text-stroke returns null, should compute the shorthand value
2598         https://bugs.webkit.org/show_bug.cgi?id=111018
2599
2600         Reviewed by Alexander Pavlov.
2601
2602         Test: fast/css/getPropertyValue-webkit-text-stroke.html
2603
2604         * css/StylePropertySet.cpp:
2605         (WebCore::StylePropertySet::getPropertyValue):
2606
2607 2013-03-04  Uday Kiran  <udaykiran@motorola.com>
2608
2609         getPropertyValue for -webkit-columns returns null, should compute the shorthand value
2610         https://bugs.webkit.org/show_bug.cgi?id=111011
2611
2612         Reviewed by Alexander Pavlov.
2613
2614         Test: fast/css/getPropertyValue-columns.html
2615
2616         * css/StylePropertySet.cpp:
2617         (WebCore::StylePropertySet::getPropertyValue):
2618
2619 2013-03-04  Vsevolod Vlasov  <vsevik@chromium.org>
2620
2621         Web Inspector: Do not accumulate file system files, add them to workspace immediately
2622         https://bugs.webkit.org/show_bug.cgi?id=111325
2623
2624         Reviewed by Pavel Feldman.
2625
2626         * inspector/front-end/FileSystemProjectDelegate.js:
2627         (WebInspector.FileSystemProjectDelegate.prototype.populate.fileLoaded):
2628         (WebInspector.FileSystemProjectDelegate.prototype.populate):
2629         * inspector/front-end/IsolatedFileSystem.js:
2630         (WebInspector.IsolatedFileSystem.prototype.innerCallback):
2631         (WebInspector.IsolatedFileSystem.prototype.requestFilesRecursive):
2632
2633 2013-03-04  Kinuko Yasuda  <kinuko@chromium.org>
2634
2635         Unreviewed Windows build fix attempt.
2636
2637         floor method is ambigious so explicitly specify the type.
2638
2639         * html/canvas/WebGLRenderingContext.cpp:
2640         (WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
2641
2642 2013-03-04  Chris Fleizach  <cfleizach@apple.com>
2643
2644         AX: cellForColumnAndRow fails for tables with hidden table cells
2645         https://bugs.webkit.org/show_bug.cgi?id=110050
2646
2647         Reviewed by Tim Horton.
2648
2649         If a table had hidden cells, then accessibility code was being confused in a few ways.
2650         1) The cellForColumnAndRow method would return the wrong information since that was
2651            using the RenderTableSection to retrieve a cell, which did not have the same data as the AXTable
2652         2) The way we were adding children made it impossible to determine column and row range because we 
2653            would skip rows that had hidden children
2654         3) AccessibilityARIAGrid and AccessibilityTable were using different methods for cellForColumnAndRow
2655
2656         The fix does a few things to make things right:
2657         1) Always add an accessibility row, even if there are no visible cells in that row.
2658         2) Have one method for AXTable and AXARIAGrid for cellForColumnAndRow.
2659         3) Change cellForColumnAndRow to query the accessibility children rather than the RenderTableSection in determining the row, col info.
2660         4) cellForColumnAndRow should use unsigned values instead of int values.
2661
2662         Test: accessibility/table-with-hidden-head-section.html
2663
2664         * accessibility/AccessibilityARIAGrid.cpp:
2665         (WebCore):
2666         * accessibility/AccessibilityARIAGrid.h:
2667         (AccessibilityARIAGrid):
2668         * accessibility/AccessibilityARIAGridCell.cpp:
2669         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
2670         (WebCore::AccessibilityARIAGridCell::columnIndexRange):
2671         * accessibility/AccessibilityARIAGridCell.h:
2672         (AccessibilityARIAGridCell):
2673         * accessibility/AccessibilityTable.cpp:
2674         (WebCore::AccessibilityTable::addChildren):
2675         (WebCore::AccessibilityTable::cellForColumnAndRow):
2676         * accessibility/AccessibilityTable.h:
2677         (WebCore):
2678         (AccessibilityTable):
2679         * accessibility/AccessibilityTableCell.cpp:
2680         (WebCore::AccessibilityTableCell::rowIndexRange):
2681         (WebCore::AccessibilityTableCell::columnIndexRange):
2682         * accessibility/AccessibilityTableCell.h:
2683         (AccessibilityTableCell):
2684         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
2685         (webkitAccessibleTableGetColumnAtIndex):
2686         (webkitAccessibleTableGetRowAtIndex):
2687         (webkitAccessibleTableGetColumnExtentAt):
2688         (webkitAccessibleTableGetRowExtentAt):
2689         (webkitAccessibleTableGetColumnHeader):
2690         (webkitAccessibleTableGetRowHeader):
2691         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2692         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2693         * rendering/RenderTableSection.h:
2694         (RenderTableSection):
2695         (WebCore::RenderTableSection::rowRendererAt):
2696
2697 2013-03-04  Arpita Bahuguna  <a.bah@samsung.com>
2698
2699         getAttribute does not behave correctly for mixed-case attributes on HTML elements
2700         https://bugs.webkit.org/show_bug.cgi?id=105713
2701
2702         Reviewed by Andreas Kling.
2703
2704         getAttribute() and getAttributeNode() APIs do not convert the
2705         passed attribute name to lowercase before comparing against the
2706         existing attributes.
2707         The specification however states that the passed name should
2708         be converted to ASCII lowercase before checking for the existence
2709         of the given attribute. [www.w3.org/TR/domcore/#dom-element-getattribute]
2710
2711         Test: fast/dom/Element/getAttribute-case-insensitivity.html
2712
2713         * dom/Element.h:
2714         (WebCore::ElementData::getAttributeItemIndex):
2715         getAttributeItemIndex() accepts a bool param 'shouldIgnoreAttributeCase'
2716         which specifies whether the attribute's case should be ignored
2717         before comparison. But inspite of this param's value we still carry
2718         out a case sensitive search.
2719         Have modified the same to convert the passed attribute's name to
2720         lowercase if 'shouldIgnoreAttributeCase' is true.
2721
2722 2013-03-04  Kunihiko Sakamoto  <ksakamoto@chromium.org>
2723
2724         [Chromium] Add runtime flag for font load events
2725         https://bugs.webkit.org/show_bug.cgi?id=111296
2726
2727         Reviewed by Kent Tamura.
2728
2729         Add a runtime feature flag for FontLoader interface (disabled by default),
2730         and enable ENABLE_FONT_LOAD_EVENTS build flag for chromium.
2731
2732         * bindings/generic/RuntimeEnabledFeatures.cpp:
2733         (WebCore):
2734         * bindings/generic/RuntimeEnabledFeatures.h:
2735         (RuntimeEnabledFeatures):
2736         (WebCore::RuntimeEnabledFeatures::setFontLoadEventsEnabled):
2737         (WebCore::RuntimeEnabledFeatures::fontLoadEventsEnabled):
2738
2739 2013-03-04  Brandon Jones  <bajones@google.com>
2740
2741         WEBGL_compressed_texture_atc implementation
2742         https://bugs.webkit.org/show_bug.cgi?id=110496
2743
2744         Reviewed by Kenneth Russell.
2745
2746         Test: webgl/conformance/extensions/webgl-compressed-texture-atc.html
2747
2748         Exposes the WEBGL_compressed_texture_atc extension, but is unverified since no desktop hardware supports
2749         the format that I am aware of. Should enable mobile ports to expose the format, however.
2750
2751         * CMakeLists.txt:
2752         * DerivedSources.make:
2753         * DerivedSources.pri:
2754         * GNUmakefile.list.am:
2755         * Target.pri:
2756         * WebCore.gypi:
2757         * WebCore.xcodeproj/project.pbxproj:
2758         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2759         (WebCore::toJS):
2760         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2761         (WebCore::toV8Object):
2762         * html/canvas/WebGLCompressedTextureATC.cpp: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
2763         (WebCore):
2764         (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
2765         (WebCore::WebGLCompressedTextureATC::~WebGLCompressedTextureATC):
2766         (WebCore::WebGLCompressedTextureATC::getName):
2767         (WebCore::WebGLCompressedTextureATC::create):
2768         (WebCore::WebGLCompressedTextureATC::supported):
2769         * html/canvas/WebGLCompressedTextureATC.h: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
2770         (WebCore):
2771         (WebGLCompressedTextureATC):
2772         * html/canvas/WebGLCompressedTextureATC.idl: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
2773         * html/canvas/WebGLExtension.h:
2774         * html/canvas/WebGLRenderingContext.cpp:
2775         (WebCore):
2776         (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
2777         (WebCore::WebGLRenderingContext::getExtension):
2778         (WebCore::WebGLRenderingContext::getSupportedExtensions):
2779         (WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
2780         * html/canvas/WebGLRenderingContext.h:
2781         (WebCore):
2782         (WebGLRenderingContext):
2783         * platform/graphics/Extensions3D.h:
2784
2785
2786 2013-03-04  Eugene Klyuchnikov  <eustas@chromium.org>
2787
2788         Web Inspector: Exceptions when WebInspector run in hosted mode.
2789         https://bugs.webkit.org/show_bug.cgi?id=111326
2790
2791         Reviewed by Pavel Feldman.
2792
2793         There is bug in commands code generation in InspectorBackend.js
2794         As a consequence all protocol enums have wrong names and cause
2795         exception when refererenced.
2796
2797         Currently protocol enums are referenced only from NetworkManager.
2798
2799         Test: inspector/inspector-backend-commands-generation.html
2800
2801         * inspector/front-end/InspectorBackend.js:
2802         (InspectorBackendClass.prototype.loadFromJSONIfNeeded):
2803         Use static method to generate code.
2804         (InspectorBackendClass._generateCommands):
2805         Extracted from loadFromJSONIfNeeded. Typo fixed.
2806
2807 2013-03-04  Chris Rogers  <crogers@google.com>
2808
2809         Add audio hardware support for multi-channel output by implementing AudioDestinationNode.maxChannelCount
2810         https://bugs.webkit.org/show_bug.cgi?id=111385
2811
2812         Reviewed by James Robinson.
2813         
2814         See specification details for .maxChannelCount:
2815         https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioDestinationNode
2816         
2817         * Modules/webaudio/AudioDestinationNode.h:
2818         (WebCore::AudioDestinationNode::maxChannelCount):
2819         * Modules/webaudio/AudioDestinationNode.idl:
2820         * Modules/webaudio/AudioNode.h:
2821         Implement .maxChannelCount attribute.
2822         
2823         (AudioNode):
2824         * Modules/webaudio/DefaultAudioDestinationNode.h:
2825         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
2826         (WebCore::DefaultAudioDestinationNode::initialize):
2827         (WebCore::DefaultAudioDestinationNode::createDestination):
2828         (WebCore::DefaultAudioDestinationNode::enableInput):
2829         Call to createDestination() now takes no argument.
2830         Instead we maintain a member variable for the input device ID.
2831         (WebCore::DefaultAudioDestinationNode::maxChannelCount):
2832         (WebCore::DefaultAudioDestinationNode::setChannelCount):
2833         Check port-specific hardware support for maxChannelCount(),
2834         and allow setting the channel count based on what the hardware
2835         supports.
2836         
2837         * platform/audio/AudioDestination.h:
2838         (AudioDestination):
2839         * platform/audio/chromium/AudioDestinationChromium.cpp:
2840         (WebCore::AudioDestination::maxChannelCount):
2841         (WebCore::AudioDestinationChromium::render):
2842         Call into chromium WebKit API: audioHardwareOutputChannels().
2843
2844         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
2845         (WebCore::AudioDestination::maxChannelCount):
2846         Add basic implementation for maxChannelCount() only supporting stereo output.
2847
2848         * platform/audio/mac/AudioDestinationMac.cpp:
2849         (WebCore::AudioDestination::maxChannelCount):
2850         Add basic implementation for maxChannelCount() only supporting stereo output.
2851         Later, the mac port can support more than this with some small improvements to AudioDestinationMac.
2852
2853 2013-03-04  Adam Barth  <abarth@webkit.org>
2854
2855         Background HTML parser can rewind the tokenizer after end-of-file
2856         https://bugs.webkit.org/show_bug.cgi?id=111365
2857
2858         Reviewed by Eric Seidel.
2859
2860         Prior to this patch, it was possible to call didFailSpeculation after
2861         processing the end-of-file token because checkForSpeculationFailure
2862         didn't zero out m_tokenizer in some control paths.
2863
2864         This patch renames checkForSpeculationFailure to validateSpeculations
2865         and ensures that it always takes ownership of the main thread's
2866         HTMLTokenizer.
2867
2868         This patch also adds a number of ASSERTs to make sure the parser state
2869         machine stays in the correct configuration (e.g., that we don't have a
2870         main thread tokenizer while we're supposed to be tokenizing on the
2871         background thread).
2872
2873         Test: fast/parser/document-write-fighting-eof.html
2874
2875         * html/parser/BackgroundHTMLInputStream.cpp:
2876         (WebCore::BackgroundHTMLInputStream::rewindTo):
2877         * html/parser/BackgroundHTMLParser.cpp:
2878         (WebCore::BackgroundHTMLParser::append):
2879         * html/parser/HTMLDocumentParser.cpp:
2880         (WebCore::HTMLDocumentParser::validateSpeculations):
2881         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
2882         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
2883         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
2884         * html/parser/HTMLDocumentParser.h:
2885         (HTMLDocumentParser):
2886
2887 2013-03-04  Tim 'mithro' Ansell  <mithro@mithis.com>
2888
2889         Make sure that clearOwnerNode also clears StyleResolver references (via didMutate).
2890         https://bugs.webkit.org/show_bug.cgi?id=109446
2891
2892         Reviewed by Eric Seidel.
2893
2894         Test: fast/css/stylesheet.innerHTML-calls-didmutate.html
2895
2896         * css/CSSStyleSheet.h:
2897
2898 2013-03-04  Kentaro Hara  <haraken@chromium.org>
2899
2900         Unreviewd build fix after r144701.
2901
2902         * platform/EventTracer.cpp:
2903         (WebCore::EventTracer::initialize):
2904
2905 2013-03-04  Min Qin  <qinmin@chromium.org>
2906
2907         Fix some style issues in RenderLayerCompositor
2908         https://bugs.webkit.org/show_bug.cgi?id=111369
2909
2910         Reviewed by Simon Fraser.
2911
2912         Just style fix, no test needed
2913
2914         * rendering/RenderLayerCompositor.cpp:
2915         (WebCore::RenderLayerCompositor::frameViewDidScroll):
2916         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2917
2918 2013-03-04  Terry Anderson  <tdanderson@chromium.org>
2919
2920         Revert changes to RenderLayer::scrollByRecursively() that were added for gesture-scrolling
2921         https://bugs.webkit.org/show_bug.cgi?id=111007
2922
2923         Reviewed by Simon Fraser.
2924
2925         Due to http://trac.webkit.org/changeset/144519 landing, the changes made to RenderLayer in
2926         http://trac.webkit.org/changeset/142057,
2927         http://trac.webkit.org/changeset/140177, and  
2928         http://trac.webkit.org/changeset/142195
2929         are no longer necessary (as RenderLayer::scrollByRecursively() is not used for
2930         gesture-scrolling) and should be reverted.
2931
2932         No change in behavior, so no new tests needed.
2933
2934         * rendering/RenderLayer.cpp:
2935         (WebCore::RenderLayer::scrollByRecursively):
2936         * rendering/RenderLayer.h:
2937
2938 2013-03-04  Kentaro Hara  <haraken@chromium.org>
2939
2940         Unreviewed build fix after r144701.
2941
2942         * platform/EventTracer.cpp:
2943         (WebCore::EventTracer::initialize):
2944
2945 2013-03-04  Christian Biesinger  <cbiesinger@chromium.org>
2946
2947         REGRESSION (r143643): Buttons containing floats render differently
2948         https://bugs.webkit.org/show_bug.cgi?id=110933
2949
2950         Reviewed by Ojan Vafai.
2951
2952         Test: fast/forms/button-with-float.html
2953
2954         * rendering/RenderBlock.cpp:
2955         (WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
2956         Also include new flexbox as a renderer that needs to enclose
2957         overhanging floats. Flex boxes establish a block formatting context,
2958         so they need to contain floats:
2959         http://dev.w3.org/csswg/css3-flexbox/#flex-items
2960
2961 2013-03-04  Chris Fleizach  <cfleizach@apple.com>
2962
2963         Support WebSpeech - Speech Synthesis
2964         https://bugs.webkit.org/show_bug.cgi?id=106742
2965
2966         Build fix.
2967
2968         * Modules/speech/SpeechSynthesis.cpp:
2969
2970 2013-03-04  Rafael Weinstein  <rafaelw@chromium.org>
2971
2972         Unreviewed, rolling out r144595.
2973         http://trac.webkit.org/changeset/144595
2974         https://bugs.webkit.org/show_bug.cgi?id=90341
2975
2976         Causing multiple crashes in fast/dom/Element/* tests (hits
2977         assert in Attr.cp:215)
2978
2979         * dom/Element.cpp:
2980         (WebCore::Element::setAttributeNode):
2981
2982 2013-02-26  Kentaro Hara  <haraken@chromium.org>
2983
2984         [chromium] Implement TRACE_EVENT macros for sampling profiling
2985         https://bugs.webkit.org/show_bug.cgi?id=110932
2986
2987         Reviewed by Adam Barth.
2988
2989         We are implementing TRACE_EVENT macros for sampling profiling.
2990         It works in the following mechanism:
2991
2992         - Chromium defines global state variables for sampling profiling.
2993         (i.e. g_trace_state0, g_trace_state1, g_trace_state2 in trace_event.h)
2994
2995         - WebKit gets the addresses of the global state variables at the
2996         initialization step. (i.e. EventTracer::initialize())
2997
2998         - WebKit updates the global states by using TRACE_EVENT_SAMPLING_STATE()
2999         macros every time WebKit changes its state. (e.g. DOM attribute
3000         getters/setters/methods)
3001
3002         - A sampling thread running in Chrome reads the global states
3003         periodically and visualizes the profiling results into about://tracing.
3004
3005         This patch implements (1) a WebKit API to get the addresses of
3006         the global states and (2) the TRACE_EVENT_SAMPLING_STATE() macro.
3007
3008         No tests. The sampling profiler is not enabled in Chrome by default.
3009         I manually inserted TRACE_EVENT_SAMPLING_STATE() macros and
3010         confirmed that the sampling profiling is working as expected.
3011
3012         * platform/EventTracer.cpp:
3013         (WebCore::EventTracer::initialize):
3014         (WebCore::EventTracer::getTraceCategoryEnabledFlag):
3015         (WebCore):
3016         * platform/EventTracer.h:
3017         (WebCore):
3018         (EventTracer):
3019         * platform/chromium/EventTracerChromium.cpp:
3020         (WebCore):
3021         (WebCore::EventTracer::initialize):
3022         * platform/chromium/TraceEvent.h:
3023
3024 2013-03-04  Chris Fleizach  <cfleizach@apple.com>
3025
3026         Support WebSpeech - Speech Synthesis
3027         https://bugs.webkit.org/show_bug.cgi?id=106742
3028
3029         Reviewed by Simon Fraser.
3030
3031         Enable speech synthesis for the Mac.
3032
3033         * Configurations/FeatureDefines.xcconfig:
3034
3035 2013-03-04  Ruslan Abdikeev  <aruslan@chromium.org>
3036
3037         <link rel="apple-touch-icon"> tag is not honored on CNN.com, workflowy.com etc
3038         https://bugs.webkit.org/show_bug.cgi?id=109061
3039
3040         Reviewed by Adam Barth.
3041
3042         Test: fast/dom/icon-url-list-apple-touch.html
3043
3044         Added iconTypes parameter to Document::iconURLs().
3045         Added Document::shortcutIconURLs() with original semantics of iconURLs().
3046         Fixed IconController.cpp to provide iconTypesMask to iconURLs().
3047         Renamed iconTypes to iconTypesMask to make the meaning clearer.
3048
3049         * WebCore.exp.in:
3050         * dom/Document.cpp:
3051         (WebCore::Document::shortcutIconURLs):
3052         (WebCore):
3053         (WebCore::Document::iconURLs):
3054         * dom/Document.h:
3055         (Document):
3056         * loader/icon/IconController.cpp:
3057         (WebCore::IconController::iconURL):
3058         (WebCore::IconController::urlsForTypes):
3059         * testing/Internals.cpp:
3060         (WebCore::Internals::iconURLs):
3061         (WebCore::Internals::shortcutIconURLs):
3062         (WebCore):
3063         (WebCore::Internals::allIconURLs):
3064         * testing/Internals.h:
3065         * testing/Internals.idl:
3066
3067 2013-02-27  Jeffrey Pfau  <jpfau@apple.com>
3068
3069         Cache partitioning does not affect iframe MainResources
3070         https://bugs.webkit.org/show_bug.cgi?id=111022
3071
3072         Reviewed by David Kilzer.
3073
3074         Set the partition of a main resource request if in a subframe.
3075
3076         Test: http/tests/cache/partitioned-cache-iframe.html
3077
3078         * loader/FrameLoader.cpp:
3079         (WebCore::FrameLoader::loadURL):
3080
3081 2013-03-04  Chris Fleizach  <cfleizach@apple.com>
3082
3083         AX: user agent shadow roots for plugins should be 'accessible'
3084         https://bugs.webkit.org/show_bug.cgi?id=111339
3085
3086         Reviewed by Tim Horton.
3087
3088         If a plugin element uses a user agent shadow element, we should make that shadow element
3089         into a button with the title and subtitle put together, and use that as the label. This 
3090         will probably be the best accessibility experience.
3091
3092         * html/HTMLPlugInImageElement.cpp:
3093         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
3094
3095 2013-03-04  Alok Priyadarshi  <alokp@chromium.org>
3096
3097         [chromium] Form controls on composited layers are not painted properly
3098         https://bugs.webkit.org/show_bug.cgi?id=111366
3099
3100         Reviewed by James Robinson.
3101
3102         Set PlatformContextSkia::m_drawingToImageBuffer which is used as a hint to properly blend GDI-painted bitmap.
3103
3104         * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp:
3105         (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents):
3106
3107 2013-03-04  Simon Fraser  <simon.fraser@apple.com>
3108
3109         Give ViewportConstraints classes copy constructors
3110         https://bugs.webkit.org/show_bug.cgi?id=111367
3111
3112         Reviewed by Beth Dakin.
3113         
3114         Downstream code requires that ViewportConstraints objects have
3115         copy constructors, so add them.
3116         
3117         Also clean up some redundant initialization of stack objects
3118         in RenderLayerCompositor.
3119
3120         No behavior change.
3121
3122         * page/scrolling/ScrollingConstraints.h:
3123         (WebCore::ViewportConstraints::ViewportConstraints):
3124         (ViewportConstraints):
3125         (WebCore::FixedPositionViewportConstraints::FixedPositionViewportConstraints):
3126         (FixedPositionViewportConstraints):
3127         (WebCore::StickyPositionViewportConstraints::StickyPositionViewportConstraints):
3128         (StickyPositionViewportConstraints):
3129         * rendering/RenderLayerCompositor.cpp:
3130         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
3131         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
3132
3133 2013-03-04  Roger Fong  <roger_fong@apple.com>
3134
3135         Unreviewed. AppleWin build fix.
3136
3137         * html/parser/XSSAuditor.cpp:
3138         (WebCore::isSemicolonSeparatedAttribute):
3139
3140 2013-03-04  Andreas Kling  <akling@apple.com>
3141
3142         CSSParser: Avoid temporary String when parsing hex colors.
3143         <http://webkit.org/b/111341>
3144
3145         Reviewed by Anders Carlsson.
3146
3147         Templatize CSSParser::fastParseColor() so we can pass a CSSParserString as the color name.
3148         This avoids creating a temporary WTF::String from the parser string.
3149
3150         * css/CSSParser.cpp:
3151         (WebCore::CSSParser::fastParseColor):
3152         * css/CSSParser.h:
3153         * css/CSSParserValues.h:
3154         (CSSParserString):
3155
3156 2013-03-04  Julien Chaffraix  <jchaffraix@webkit.org>
3157
3158         [CSS Grid Layout] Add parsing for grid-{start|before}
3159         https://bugs.webkit.org/show_bug.cgi?id=110988
3160
3161         Reviewed by Tony Chang.
3162
3163         Test: fast/css-grid-layout/grid-item-start-before-get-set.html
3164
3165         Refactored how we store internally grid-{row|column} to be based on grid-{before|start}.
3166         This is required as grid-{row|column} are shorthands for resp. grid-{before|after} and grid-{start|end}
3167         in the specification and will also be in the code. That means a lot of methods were renamed to be more
3168         aligned with the new design.
3169
3170         * css/CSSComputedStyleDeclaration.cpp:
3171         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3172         * css/CSSParser.cpp:
3173         (WebCore::CSSParser::parseValue):
3174         * css/CSSProperty.cpp:
3175         (WebCore::CSSProperty::isInheritedProperty):
3176         * css/CSSPropertyNames.in:
3177         * css/StyleResolver.cpp:
3178         (WebCore::StyleResolver::applyProperty):
3179         Added the code to parse, apply and get back the new properties. Also
3180         some renaming after the internal naming change below.
3181
3182         * rendering/RenderGrid.cpp:
3183         (WebCore::RenderGrid::maximumIndexInDirection):
3184         (WebCore::RenderGrid::placeItemsOnGrid):
3185         (WebCore::RenderGrid::autoPlacementMajorAxisPositionForChild):
3186         (WebCore::RenderGrid::autoPlacementMinorAxisPositionForChild):
3187         * rendering/style/RenderStyle.h:
3188         * rendering/style/StyleGridItemData.cpp:
3189         (WebCore::StyleGridItemData::StyleGridItemData):
3190         * rendering/style/StyleGridItemData.h:
3191         (WebCore::StyleGridItemData::operator==):
3192         Updated the naming now that we manipulate grid-{before|start} instead of grid-{row|column}.
3193
3194 2013-03-04  Chris Fleizach  <cfleizach@apple.com>
3195
3196         WebSpeech: change voiceURI to voice
3197         https://bugs.webkit.org/show_bug.cgi?id=110773
3198
3199         Reviewed by Tim Horton.
3200
3201         Change the voiceURI property to a voice property that takes a SpeechSynthesisVoice.
3202         This was recently added to the errata of the WebSpeech spec.
3203
3204         Test: platform/mac/fast/speechsynthesis/speech-synthesis-utterance-uses-voice.html
3205
3206         * Modules/speech/SpeechSynthesisUtterance.cpp:
3207         (WebCore):
3208         (WebCore::SpeechSynthesisUtterance::voice):
3209         (WebCore::SpeechSynthesisUtterance::setVoice):
3210         * Modules/speech/SpeechSynthesisUtterance.h:
3211         (SpeechSynthesisUtterance):
3212         * Modules/speech/SpeechSynthesisUtterance.idl:
3213         * Modules/speech/SpeechSynthesisVoice.h:
3214         (WebCore::SpeechSynthesisVoice::platformVoice):
3215         (SpeechSynthesisVoice):
3216         * platform/PlatformSpeechSynthesisUtterance.cpp:
3217         (WebCore::PlatformSpeechSynthesisUtterance::PlatformSpeechSynthesisUtterance):
3218         * platform/PlatformSpeechSynthesisUtterance.h:
3219         (WebCore::PlatformSpeechSynthesisUtterance::voice):
3220         (WebCore::PlatformSpeechSynthesisUtterance::setVoice):
3221         (PlatformSpeechSynthesisUtterance):
3222         * platform/mac/PlatformSpeechSynthesizerMac.mm:
3223         (-[WebSpeechSynthesisWrapper speakUtterance:WebCore::]):
3224
3225 2013-03-04  Victor Costan <costan@gmail.com>
3226
3227         Filename passed to FormData.append() takes precedence over filename in
3228         File.
3229         https://bugs.webkit.org/show_bug.cgi?id=111255
3230
3231         Reviewed by Alexey Proskuryakov.
3232
3233         Test: http/tests/local/formdata/send-form-data-with-filename.html
3234
3235         * platform/network/FormData.cpp:
3236         (WebCore::FormData::appendKeyValuePairItems): changed to implement the
3237         behavior in the XMLHttpRequest W3C spec.
3238
3239 2013-03-04  Alexis Hetu  <sugoi@chromium.org>
3240
3241         Canvas and DOM go out of sync
3242         https://bugs.webkit.org/show_bug.cgi?id=107701
3243
3244         Reviewed by Simon Fraser.
3245
3246         Test: fast/canvas/canvas-overflow-hidden-animation.html
3247
3248         Added an update of the current compositor from the layer's stacking
3249         container when the layer itself isn't a stacking container.
3250
3251         * rendering/RenderLayerBacking.cpp:
3252         (WebCore::RenderLayerBacking::updateAfterLayout):
3253         Added an update of the stacking container of the owning layer of the
3254         layer backing when the owning layer isn't a stacking container itself.
3255
3256 2013-03-04  Alexey Proskuryakov  <ap@apple.com>
3257
3258         Small BlobResourceHandle cleanup
3259         https://bugs.webkit.org/show_bug.cgi?id=111352
3260
3261         Reviewed by Sam Weinig.
3262
3263         1. Don't use PassRefPtr<BlobStorageData> when ownership is not being passed.
3264         2. Added OVERRIDE to some functions.
3265         3. Added const to ResourceHandle::firstRequest().
3266
3267         * platform/network/BlobRegistryImpl.cpp:
3268         (WebCore::loadResourceSynchronously):
3269         (WebCore::BlobRegistryImpl::createResourceHandle):
3270         (WebCore::BlobRegistryImpl::getBlobDataFromURL):
3271         * platform/network/BlobRegistryImpl.h:
3272         (BlobRegistryImpl):
3273         * platform/network/BlobResourceHandle.cpp:
3274         (WebCore::BlobResourceHandle::createAsync):
3275         (WebCore::BlobResourceHandle::loadResourceSynchronously):
3276         * platform/network/BlobResourceHandle.h:
3277         (BlobResourceHandle):
3278         * platform/network/FormData.cpp:
3279         (WebCore::appendBlobResolved):
3280         * platform/network/ResourceHandle.cpp:
3281         (WebCore::ResourceHandle::firstRequest):
3282         * platform/network/ResourceHandle.h:
3283         (ResourceHandle):
3284
3285 2013-03-04  Vsevolod Vlasov  <vsevik@chromium.org>
3286
3287         Web Inspector: Introduce WebInspector.EventTarget interface for interfaces that dispatch events.
3288         https://bugs.webkit.org/show_bug.cgi?id=111320
3289
3290         Reviewed by Pavel Feldman.
3291
3292         * inspector/front-end/Object.js:
3293         (WebInspector.EventTarget):
3294         (WebInspector.EventTarget.prototype.addEventListener):
3295         (WebInspector.EventTarget.prototype.removeEventListener):
3296         (WebInspector.EventTarget.prototype.removeAllListeners):
3297         (WebInspector.EventTarget.prototype.hasEventListeners):
3298         (WebInspector.EventTarget.prototype.dispatchEventToListeners):
3299         * inspector/front-end/ResourceScriptMapping.js:
3300         * inspector/front-end/UISourceCode.js:
3301         * inspector/front-end/Workspace.js:
3302         (WebInspector.ProjectDelegate.prototype.searchInFileContent):
3303
3304 2013-03-04  Tom Sepez  <tsepez@chromium.org>
3305
3306         XSSAuditor bypass with --> comment syntax.
3307         https://bugs.webkit.org/show_bug.cgi?id=111349
3308
3309         Reviewed by Adam Barth.
3310
3311         Test: http/tests/security/xssAuditor/open-iframe-src-03.html
3312
3313         * html/parser/XSSAuditor.cpp:
3314         (WebCore::isTerminatingCharacter):
3315         Adds ">" to the list of terminating characters, so that comments of
3316         the form --> end the snippet we seek to match.
3317
3318 2013-03-04  Vsevolod Vlasov  <vsevik@chromium.org>
3319
3320         Web Inspector: Modal dialogs sometimes lose focus.
3321         https://bugs.webkit.org/show_bug.cgi?id=111317
3322
3323         Reviewed by Pavel Feldman.
3324
3325         setCurrentFocusElement doesn't give focus to an element anymore
3326         if modal glass pane is shown and element is not inside it.
3327
3328         * inspector/front-end/Dialog.js:
3329         (WebInspector.Dialog):
3330         (WebInspector.Dialog.prototype._hide):
3331         * inspector/front-end/InspectorView.js:
3332         (WebInspector.InspectorView.prototype.defaultFocusedElement):
3333         * inspector/front-end/ScriptsPanel.js:
3334         (WebInspector.ScriptsPanel.prototype.defaultFocusedElement):
3335         * inspector/front-end/UIUtils.js:
3336         (WebInspector.GlassPane):
3337         (WebInspector.GlassPane.prototype.dispose):
3338         (WebInspector.setCurrentFocusElement):
3339         * inspector/front-end/dialog.css:
3340
3341 2013-03-04  Roger Fong  <roger_fong@apple.com>
3342
3343         Unreviewed. AppleWin build fix.
3344
3345         * WebCore.vcxproj/WebCore.vcxproj:
3346
3347 2013-03-04  Dan Carney  <dcarney@google.com>
3348
3349         [v8] add isolate parameter to heap statistics calls
3350         https://bugs.webkit.org/show_bug.cgi?id=111308
3351
3352         Reviewed by Jochen Eisinger.
3353
3354         No new tests.
3355
3356         * bindings/v8/ScriptGCEvent.cpp:
3357         (WebCore::ScriptGCEvent::getHeapSize):
3358         (WebCore::ScriptGCEvent::getUsedHeapSize):
3359         * bindings/v8/V8AdaptorFunction.cpp:
3360         (WebCore::V8AdaptorFunction::getTemplate):
3361         * bindings/v8/V8GCController.cpp:
3362         (WebCore::V8GCController::checkMemoryUsage):
3363
3364 2013-03-04  Jochen Eisinger  <jochen@chromium.org>
3365
3366         [chromium] remove deprecated hyphenation methods from Platform
3367         https://bugs.webkit.org/show_bug.cgi?id=111101
3368
3369         Reviewed by Adam Barth.
3370
3371         * platform/text/chromium/Hyphenation.cpp:
3372         (WebCore::canHyphenate):
3373         (WebCore::lastHyphenLocation):
3374
3375 2013-03-04  Benjamin Poulain  <benjamin@webkit.org>
3376
3377         Use initialization from literal for MediaFeatureNames
3378         https://bugs.webkit.org/show_bug.cgi?id=111283
3379
3380         Reviewed by Andreas Kling.
3381
3382         * css/MediaFeatureNames.cpp:
3383         (WebCore::MediaFeatureNames::init):
3384         Initialization from literal is faster and use less memory. The names are
3385         defined statically in MediaFeatureNames.h.
3386
3387         Also use the NotNull placement new to avoid a branch on silly allocators.
3388
3389 2013-03-04  Joshua Bell  <jsbell@chromium.org>
3390
3391         [V8] Unreviewed. Rebaselined run-bindings-tests following r144617
3392
3393         * bindings/scripts/test/V8/V8Float64Array.cpp:
3394         (WebCore::ConfigureV8Float64ArrayTemplate):
3395         (WebCore::V8Float64Array::GetTemplate):
3396         * bindings/scripts/test/V8/V8Float64Array.h:
3397         (V8Float64Array):
3398         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
3399         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
3400         (WebCore::TestActiveDOMObjectV8Internal::TestActiveDOMObjectDomainSafeFunctionSetter):
3401         (WebCore::ConfigureV8TestActiveDOMObjectTemplate):
3402         (WebCore::V8TestActiveDOMObject::GetTemplate):
3403         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
3404         (V8TestActiveDOMObject):
3405         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
3406         (WebCore::ConfigureV8TestCustomNamedGetterTemplate):
3407         (WebCore::V8TestCustomNamedGetter::GetTemplate):
3408         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
3409         (V8TestCustomNamedGetter):
3410         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3411         (WebCore::ConfigureV8TestEventConstructorTemplate):
3412         (WebCore::V8TestEventConstructor::GetTemplate):
3413         * bindings/scripts/test/V8/V8TestEventConstructor.h:
3414         (V8TestEventConstructor):
3415         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3416         (WebCore::ConfigureV8TestEventTargetTemplate):
3417         (WebCore::V8TestEventTarget::GetTemplate):
3418         * bindings/scripts/test/V8/V8TestEventTarget.h:
3419         (V8TestEventTarget):
3420         * bindings/scripts/test/V8/V8TestException.cpp:
3421         (WebCore::ConfigureV8TestExceptionTemplate):
3422         (WebCore::V8TestException::GetTemplate):
3423         * bindings/scripts/test/V8/V8TestException.h:
3424         (V8TestException):
3425         * bindings/scripts/test/V8/V8TestInterface.cpp:
3426         (WebCore::ConfigureV8TestInterfaceTemplate):
3427         (WebCore::V8TestInterface::GetTemplate):
3428         * bindings/scripts/test/V8/V8TestInterface.h:
3429         (V8TestInterface):
3430         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3431         (WebCore::ConfigureV8TestMediaQueryListListenerTemplate):
3432         (WebCore::V8TestMediaQueryListListener::GetTemplate):
3433         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
3434         (V8TestMediaQueryListListener):
3435         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3436         (WebCore::V8TestNamedConstructorConstructor::GetTemplate):
3437         (WebCore::ConfigureV8TestNamedConstructorTemplate):
3438         (WebCore::V8TestNamedConstructor::GetTemplate):
3439         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
3440         (V8TestNamedConstructorConstructor):
3441         (V8TestNamedConstructor):
3442         * bindings/scripts/test/V8/V8TestNode.cpp:
3443         (WebCore::ConfigureV8TestNodeTemplate):
3444         (WebCore::V8TestNode::GetTemplate):
3445         * bindings/scripts/test/V8/V8TestNode.h:
3446         (V8TestNode):
3447         * bindings/scripts/test/V8/V8TestObj.cpp:
3448         (WebCore::ConfigureV8TestObjTemplate):
3449<