WebKit shouldn't accept "none, none" in transition shorthand property.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-15  Alexis Menard  <alexis@webkit.org>
2
3         WebKit shouldn't accept "none, none" in transition shorthand property.
4         https://bugs.webkit.org/show_bug.cgi?id=108751
5
6         Reviewed by Dean Jackson.
7
8         http://dev.w3.org/csswg/css3-transitions/#transition-shorthand-property
9         specifies that if there is more than one transition defined in the
10         shorthand and any of them has a value of 'none' then the declaration is
11         invalid. This patch fixes the problem by passing a parsing context to
12         track if a keyword has been set for the transition-property and if so
13         then use it to invalidate or not the declaration.
14
15         Test: transitions/transitions-parsing.html
16
17         * css/CSSParser.cpp:
18         (AnimationParseContext):
19         (WebCore::AnimationParseContext::AnimationParseContext):
20         (WebCore::AnimationParseContext::commitFirstAnimation): track whether
21         it's the first <single-transition/animation> or not defined in the
22         shorthand.
23         (WebCore::AnimationParseContext::hasCommittedFirstAnimation):
24         (WebCore::AnimationParseContext::commitAnimationPropertyKeywordInShorthand):
25         In the shorthand as soon as a keyword has been found then the parsing
26         is 'finished', if any other animation/transition declaration part of
27         the shorthand are with a keyword then it's invalid.
28         (WebCore::AnimationParseContext::animationPropertyKeywordInShorthandAllowed):
29         (WebCore::AnimationParseContext::hasSeenAnimationPropertyKeyword):
30         (WebCore::AnimationParseContext::sawAnimationPropertyKeyword):
31         (WebCore):
32         (WebCore::CSSParser::parseValue):
33         (WebCore::CSSParser::parseAnimationShorthand):
34         (WebCore::CSSParser::parseTransitionShorthand):
35         (WebCore::CSSParser::parseAnimationProperty):
36         * css/CSSParser.h:
37         (WebCore):
38
39 2013-02-15  Andreas Kling  <akling@apple.com>
40
41         ElementData: Move leafy things out of the base class.
42         <http://webkit.org/b/109888>
43
44         Reviewed by Antti Koivisto.
45
46         - Moved functions for mutating/adding/removing attributes into UniqueElementData.
47           Attempts to modify shared element data will now fail at compile-time.
48
49         - Removed mutableAttributeVector() and have call sites access the vector directly.
50
51         - Move immutableAttributeArray() to ShareableElementData.
52
53         - Move some function bodies from Element.h to Element.cpp since all clients are in there.
54
55         * dom/Element.cpp:
56         (WebCore::Element::addAttributeInternal):
57         (WebCore::ShareableElementData::ShareableElementData):
58         (WebCore::UniqueElementData::makeShareableCopy):
59         (WebCore::UniqueElementData::addAttribute):
60         (WebCore::UniqueElementData::removeAttribute):
61         (WebCore::ElementData::reportMemoryUsage):
62         (WebCore::UniqueElementData::getAttributeItem):
63         (WebCore::UniqueElementData::attributeItem):
64         * dom/Element.h:
65         (ElementData):
66         (WebCore::ShareableElementData::immutableAttributeArray):
67         (ShareableElementData):
68         (UniqueElementData):
69         (WebCore::ElementData::length):
70         (WebCore::ElementData::attributeItem):
71
72 2013-02-15  Hans Muller  <hmuller@adobe.com>
73
74         [CSS Exclusions] Enable shape-inside support for circles
75         https://bugs.webkit.org/show_bug.cgi?id=109713
76
77         Reviewed by Dirk Schulze.
78
79         Removed the test that disabled circle values for shape-inside.
80         The remaining support for circles, which is based on rounded rectangles
81         whose width/height is equal to their radiusX/radiusY, has not changed.
82
83         Test: fast/exclusions/shape-inside/shape-inside-circle.html
84
85         * rendering/ExclusionShapeInsideInfo.h:
86         (WebCore::ExclusionShapeInsideInfo::isEnabledFor): Now only disallows ellipse.
87
88 2013-02-15  Christophe Dumez  <ch.dumez@sisa.samsung.com>
89
90         [Soup] Leverage new soup_cookie_jar_get_cookie_list() API
91         https://bugs.webkit.org/show_bug.cgi?id=109931
92
93         Reviewed by Kenneth Rohde Christiansen.
94
95         In several cases, the CookieJarSoup implementation was retrieving / copying ALL the
96         cookies using soup_cookie_jar_all_cookies() and then using soup_cookie_applies_to_uri()
97         to filter out cookies it is not interested in. This was inefficient.
98
99         In libsoup 2.40, soup_cookie_jar_get_cookie_list() was introduced to retrieve only the
100         cookies that apply to a given URI. This patch leverages this new API in CookieJarSoup's
101         getRawCookies() and deleteCookie(). This way, only the cookies we are interested in
102         are retrieved and copied. Libsoup does not need to iterate over all the cookies itself
103         because it keeps the cookies in a hash table using the host names as key.
104
105         No new tests, no behavior change.
106
107         * platform/network/soup/CookieJarSoup.cpp:
108         (WebCore::getRawCookies):
109         (WebCore::deleteCookie):
110
111 2013-02-15  Vladislav Kaznacheev  <kaznacheev@chromium.org>
112
113         Web Inspector: Added an option to split Elements and Sources sidebars in two panes.
114         https://bugs.webkit.org/show_bug.cgi?id=109298.
115
116         Reviewed by Vsevolod Vlasov.
117
118         Introduced the "Split sidebar" context menu option that splits the horizontal sidebar into two panes.
119         The width split ratio is 1:1 by default and is preserved when the Inspector window is resized.
120         Elements sidebar is split into two tabbed panes, Sources sidebar is split into a pane stack and a tabbed pane.
121
122         No new tests.
123
124         * inspector/front-end/DOMBreakpointsSidebarPane.js:
125         (WebInspector.DOMBreakpointsSidebarPane.Proxy.prototype._reattachBody):
126         * inspector/front-end/ElementsPanel.js:
127         (WebInspector.ElementsPanel.get this):
128         (WebInspector.ElementsPanel):
129         (WebInspector.ElementsPanel.prototype._sidebarContextMenuEventFired):
130         (WebInspector.ElementsPanel.prototype._populateContextMenuForSidebar.toggleSetting):
131         (WebInspector.ElementsPanel.prototype.get _arrangeSidebarPanes.get this):
132         (WebInspector.ElementsPanel.prototype.addExtensionSidebarPane):
133         * inspector/front-end/ExtensionServer.js:
134         (WebInspector.ExtensionServer.prototype._onCreateSidebarPane):
135         * inspector/front-end/ScriptsPanel.js:
136         (WebInspector.ScriptsPanel):
137         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
138         (WebInspector.ScriptsPanel.prototype._contextMenuEventFired):
139         (WebInspector.ScriptsPanel.prototype._sidebarContextMenuEventFired):
140         (WebInspector.ScriptsPanel.prototype._populateContextMenuForSidebar.toggleSetting):
141         (WebInspector.ScriptsPanel.prototype.get _arrangeSidebarPanes.get this):
142         * inspector/front-end/SidebarPane.js:
143         (WebInspector.SidebarPane):
144         (WebInspector.SidebarPane.prototype.expand):
145         (WebInspector.SidebarPane.prototype.onContentReady):
146         (WebInspector.SidebarPane.prototype._setExpandCallback):
147         (WebInspector.SidebarPane.prototype.wasShown):
148         (WebInspector.SidebarPaneTitle):
149         (WebInspector.SidebarPaneTitle.prototype._expand):
150         (WebInspector.SidebarPaneTitle.prototype._collapse):
151         (WebInspector.SidebarPaneTitle.prototype._toggleExpanded):
152         (WebInspector.SidebarPaneTitle.prototype._onTitleKeyDown):
153         (WebInspector.SidebarPaneStack):
154         (WebInspector.SidebarPaneStack.prototype.addPane):
155         (WebInspector.SidebarTabbedPane):
156         (WebInspector.SidebarTabbedPane.prototype.addPane):
157         * inspector/front-end/SidebarView.js:
158         * inspector/front-end/SplitView.js:
159         (WebInspector.SplitView):
160         (WebInspector.SplitView.prototype.get mainElement):
161         (WebInspector.SplitView.prototype.get sidebarElement):
162
163 2013-02-15  Vsevolod Vlasov  <vsevik@chromium.org>
164
165         Web Inspector: Several consecutive Backspace or Delete strikes should not be marked as undoable state.
166         https://bugs.webkit.org/show_bug.cgi?id=109915
167
168         Reviewed by Pavel Feldman.
169
170         Extracted _isEditRangeUndoBoundary() and _isEditRangeAdjacentToLastCommand() in TextEditorModel
171         to detect if markUndoableState() call is needed before and after editRange.
172
173         * inspector/front-end/TextEditorModel.js:
174         (WebInspector.TextRange.prototype.immediatelyPrecedes):
175         (WebInspector.TextRange.prototype.immediatelyFollows):
176         (WebInspector.TextEditorModel.endsWithBracketRegex.):
177
178 2013-02-15  Andrey Adaikin  <aandrey@chromium.org>
179
180         Fix inconsistency in WebGLRenderingContext.idl for getAttribLocation
181         https://bugs.webkit.org/show_bug.cgi?id=109892
182
183         Reviewed by Kentaro Hara.
184
185         * html/canvas/WebGLRenderingContext.idl:
186
187 2013-02-15  Andrey Adaikin  <aandrey@chromium.org>
188
189         Web Inspector: [Canvas] show replay log grouped by draw calls
190         https://bugs.webkit.org/show_bug.cgi?id=109592
191
192         Reviewed by Pavel Feldman.
193
194         Show canvas capturing log grouped by drawing calls.
195         Drive-by: extended Array.prototype with a handy peekLast function.
196         Drive-by: removed code dups in few places.
197
198         * inspector/front-end/CanvasProfileView.js:
199         (WebInspector.CanvasProfileView):
200         (WebInspector.CanvasProfileView.prototype.dispose):
201         (WebInspector.CanvasProfileView.prototype._onReplayStepClick):
202         (WebInspector.CanvasProfileView.prototype._onReplayDrawingCallClick):
203         (WebInspector.CanvasProfileView.prototype._onReplayLastStepClick):
204         (WebInspector.CanvasProfileView.prototype._replayTraceLog.didReplayTraceLog):
205         (WebInspector.CanvasProfileView.prototype._replayTraceLog):
206         (WebInspector.CanvasProfileView.prototype._didReceiveTraceLog):
207         (WebInspector.CanvasProfileView.prototype._selectedCallIndex):
208         (WebInspector.CanvasProfileView.prototype._selectedDrawCallGroupIndex):
209         (WebInspector.CanvasProfileView.prototype._appendCallNode):
210         * inspector/front-end/DataGrid.js:
211         (WebInspector.DataGrid.prototype.setColumnVisible):
212         (WebInspector.DataGridNode.prototype.set hasChildren):
213         (WebInspector.DataGridNode.prototype.set revealed):
214         (WebInspector.DataGridNode.prototype.get leftPadding):
215         * inspector/front-end/externs.js:
216         (Array.prototype.peekLast):
217         * inspector/front-end/utilities.js:
218
219 2013-02-15  Yury Semikhatsky  <yurys@chromium.org>
220
221         Web Inspector: highlight record revealed in Timeline
222         https://bugs.webkit.org/show_bug.cgi?id=109930
223
224         Reviewed by Pavel Feldman.
225
226         Revealed timeline record is now highlighted with yellow background
227         that fades out in 2 seconds.
228
229         * inspector/front-end/TimelinePanel.js:
230         (WebInspector.TimelinePanel.prototype._revealRecord):
231         (WebInspector.TimelinePanel.prototype._refreshRecords):
232         (WebInspector.TimelinePanel.prototype._clearRecordHighlight):
233         * inspector/front-end/timelinePanel.css:
234         (.highlighted-timeline-record):
235         (@-webkit-keyframes timeline_record_highlight):
236         (to):
237
238 2013-02-15  Vsevolod Vlasov  <vsevik@chromium.org>
239
240         Web Inspector: Pass original selection to textModel to correctly restore it after undo.
241         https://bugs.webkit.org/show_bug.cgi?id=109911
242
243         Reviewed by Pavel Feldman.
244
245         We can distinguish backspace pressed with and without selection now.
246
247         * inspector/front-end/DefaultTextEditor.js:
248         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
249         (WebInspector.DefaultTextEditor.WordMovementController.prototype._handleCtrlBackspace):
250         * inspector/front-end/TextEditorModel.js:
251         (WebInspector.TextEditorCommand):
252         (WebInspector.TextEditorModel.endsWithBracketRegex.):
253
254 2013-02-15  Joe Mason  <jmason@rim.com>
255
256         [BlackBerry] Remove redundant requireAuth parameter of NetworkJob::notifyAuthReceived
257         https://bugs.webkit.org/show_bug.cgi?id=109855
258
259         Reviewed by Yong Li.
260
261         Internal PR: 296697
262         Internally Reviewed By: Leo Yang
263
264         Code cleanup: The requireAuth parameter of NetworkJob::notifyAuthReceived is redundant as its value
265         can be determined from "result" - if result is AuthResultRetry, requireAuth is false, otherwise it
266         is true.
267
268         No new tests as there is no behaviour change.
269
270         * platform/network/blackberry/NetworkJob.cpp:
271         (WebCore::NetworkJob::notifyAuthReceived):
272         * platform/network/blackberry/NetworkJob.h:
273         (NetworkJob):
274
275 2013-02-15  Vsevolod Vlasov  <vsevik@chromium.org>
276
277         Web Inspector: Redo in text editor should always collapse selection to end.
278         https://bugs.webkit.org/show_bug.cgi?id=109907
279
280         Reviewed by Pavel Feldman.
281
282         * inspector/front-end/TextEditorModel.js:
283         (WebInspector.TextEditorModel.endsWithBracketRegex.):
284
285 2013-02-15  Dan Carney  <dcarney@google.com>
286
287         [v8] persistent handle dispose before last use
288         https://bugs.webkit.org/show_bug.cgi?id=109927
289
290         Reviewed by Jochen Eisinger.
291
292         No new tests. No change in functionality.
293
294         * bindings/v8/ScriptWrappable.h:
295         (WebCore::ScriptWrappable::weakCallback):
296
297 2013-02-15  Keishi Hattori  <keishi@webkit.org>
298
299         PagePopupController.formatMonth should support short month format
300         https://bugs.webkit.org/show_bug.cgi?id=109530
301
302         Reviewed by Kent Tamura.
303
304         PagePopupController.formatMonth should support short month format so we
305         can use it in the new calendar picker.
306
307         Tested by LocaleMacTest::formatMonth.
308
309         * page/PagePopupController.cpp:
310         (WebCore::PagePopupController::formatMonth): Take an extra bool argument to switch to short month format.
311         * page/PagePopupController.h:
312         (PagePopupController):
313         * page/PagePopupController.idl:
314         * platform/text/LocaleICU.cpp:
315         (WebCore::LocaleICU::shortMonthFormat):
316         (WebCore):
317         * platform/text/LocaleICU.h:
318         (LocaleICU):
319         * platform/text/LocaleNone.cpp:
320         (WebCore::shortMonthFormat):
321         (WebCore):
322         * platform/text/PlatformLocale.cpp:
323         (WebCore::DateTimeStringBuilder::visitField):
324         (WebCore::Locale::formatDateTime):
325         * platform/text/PlatformLocale.h:
326         (Locale):
327         * platform/text/mac/LocaleMac.h:
328         (LocaleMac):
329         * platform/text/mac/LocaleMac.mm:
330         (WebCore::LocaleMac::shortMonthFormat):
331         (WebCore):
332         * platform/text/win/LocaleWin.cpp:
333         (WebCore::LocaleWin::shortMonthFormat): Windows doesn't have a short
334         month format so we just replace MMMM with MMM.
335         (WebCore):
336         * platform/text/win/LocaleWin.h:
337         (LocaleWin):
338
339 2013-02-15  Keishi Hattori  <keishi@webkit.org>
340
341         Add setValue and closePopup methods to PagePopupController
342         https://bugs.webkit.org/show_bug.cgi?id=109897
343
344         Reviewed by Kent Tamura.
345
346         The new calendar picker (Bug 109439) needs to set a value without
347         closing the popup. We can't do that with the existing
348         setValueAndClosePopup.
349
350         No new tests. Existing calendar picker and color suggestion picker tests
351         that closing and setting values work properly.
352
353         * Resources/pagepopups/pickerCommon.js:
354         (Picker.prototype.submitValue): Stop using setValueAndClosePopup.
355         (Picker.prototype.handleCancel): Ditto.
356         * page/PagePopupClient.h:
357         (PagePopupClient):
358         * page/PagePopupController.cpp:
359         (WebCore::PagePopupController::setValue): Sets value to element without closing popup.
360         (WebCore):
361         (WebCore::PagePopupController::closePopup): Just closes popup.
362         * page/PagePopupController.h:
363         (PagePopupController):
364         * page/PagePopupController.idl:
365
366 2013-02-15  Mihnea Ovidenie  <mihnea@adobe.com>
367
368         [CSS Regions] RenderRegion should inherit from RenderBlock
369         https://bugs.webkit.org/show_bug.cgi?id=74132
370
371         Reviewed by Julien Chaffraix.
372
373         Change the base class for RenderRegion to be RenderBlock instead of RenderReplaced.
374         Per spec http://dev.w3.org/csswg/css3-regions/#the-flow-from-property, a region is a non-replaced block container.
375         This change is covered by the existing regions tests (in fast/region and fast/repaint).
376
377         The RenderFlowThread object is a self-painting layer (it requires layer and is positioned).
378         Because of that, the RenderFlowThread object is responsible for painting its children,
379         the collected objects. When the RenderRegion::paintObject is called during paint, it delegates painting
380         of content collected inside the flow thread to the associated RenderFlowThread object.
381         Since we do not want to paint the flow thread content multiple times (for each paint phase
382         in which the RenderRegion::paintObject is called), we allow RenderFlowThread painting only for
383         selection and foreground paint phases.
384
385         * rendering/RenderBox.cpp: Clean-up the code from regions specific stuff, now that the regions are render blocks.
386         (WebCore::RenderBox::computePositionedLogicalWidth):
387         (WebCore::RenderBox::computePositionedLogicalHeight):
388         * rendering/RenderLayerBacking.cpp: A region should always render content from its associated flow thread,
389         even when it does not have children of its own.
390         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
391         * rendering/RenderMultiColumnSet.cpp: Make changes to match the new inheritance for RenderRegion.
392         (WebCore::RenderMultiColumnSet::paint):
393         (WebCore::RenderMultiColumnSet::paintColumnRules):
394         * rendering/RenderMultiColumnSet.h:
395         * rendering/RenderRegion.cpp:
396         (WebCore::RenderRegion::RenderRegion):
397         (WebCore::RenderRegion::paintObject):
398         (WebCore::RenderRegion::styleDidChange):
399         (WebCore::RenderRegion::layoutBlock):
400         (WebCore::RenderRegion::insertedIntoTree):
401         (WebCore::RenderRegion::willBeRemovedFromTree):
402         (WebCore::RenderRegion::computePreferredLogicalWidths): Use this method instead of min/maxPreferredLogicalWidth.
403         (WebCore::RenderRegion::updateLogicalHeight):
404         * rendering/RenderRegion.h: For now, assume the region is not allowed to have children.
405         When we will implement the processing model for pseudo-elements http://dev.w3.org/csswg/css3-regions/#processing-model,
406         we will have to remove this function. By having this function return false i was able to leave some tests unchanged.
407
408 2013-02-15  Andrey Lushnikov  <lushnikov@chromium.org>
409
410         Web Inspector: implement smart braces functionality
411         https://bugs.webkit.org/show_bug.cgi?id=109200
412
413         Reviewed by Pavel Feldman.
414
415         - implement SmartBraceController which will handle character insertions
416         and override them if brace character was inserted. Additionally it
417         should handle Backspace key and override it if a cursor is located
418         inside of a bracket pair.
419         - guard smart brace functionality via experiment checkbox.
420
421         New test: inspector/editor/text-editor-smart-braces.html
422
423         * inspector/front-end/DefaultTextEditor.js:
424         (WebInspector.TextEditorMainPanel):
425         (WebInspector.TextEditorMainPanel.prototype._registerShortcuts):
426         (WebInspector.TextEditorMainPanel.prototype._handleKeyPress):
427         (WebInspector.TextEditorMainPanel.SmartBraceController):
428         (WebInspector.TextEditorMainPanel.SmartBraceController.prototype.registerShortcuts):
429         (WebInspector.TextEditorMainPanel.SmartBraceController.prototype.registerCharOverrides):
430         (WebInspector.TextEditorMainPanel.SmartBraceController.prototype._handleBackspace):
431         (WebInspector.TextEditorMainPanel.SmartBraceController.prototype._handleBracePairInsertion):
432         (WebInspector.TextEditorMainPanel.SmartBraceController.prototype._handleClosingBraceOverride):
433         * inspector/front-end/Settings.js:
434         (WebInspector.ExperimentsSettings):
435
436 2013-02-15  Andrei Bucur  <abucur@adobe.com>
437
438         [CSS Regions][Mac] fast/regions/full-screen-video-from-region.html hits an assertion in RenderFlowThread::removeRenderBoxRegionInfo
439         https://bugs.webkit.org/show_bug.cgi?id=106075
440
441         Reviewed by Tony Chang.
442
443         The crash is caused by two issues.
444
445         The first problem is how a block inside a flow thread determines if the children needs relayout or not.
446         When the region chain is invalidated, the information is lost so we need to return true, even for the
447         enclosing RenderFlowThread. Because the video renderer is the first child of the flow thread this doesn't
448         happen.
449
450         The patch implements this behaviour by inspecting both if the region chain has changed and
451         if the block has no range computed yet.
452
453         The second problem is RenderMedia not inheriting from RenderBlock. The logic of child relayout doesn't apply
454         to it. In the test case, when the full screen button is pressed, the region changes width to fill the viewport,
455         the chain is invalidated and the box info hash map is cleared. When the video is laid out again (after fixing
456         the first issue) it has the same size so the controls don't do a layout. They remain without box info inside
457         the flow thread, thus causing the assertion.
458
459         The patch forces the controls to relayout if the region chain was invalidated. We can't use the
460         logicalWidthChangedInRegions method because it is block specific. This will be fixed in a later patch.
461
462         Tests: No new tests. fast/regions/full-screen-video-from-region.html no longer crashes.
463
464         * rendering/RenderBlock.cpp:
465         (WebCore::RenderBlock::checkForPaginationLogicalHeightChange):
466         * rendering/RenderFlowThread.cpp:
467         (WebCore::RenderFlowThread::RenderFlowThread):
468         (WebCore::RenderFlowThread::layout):
469         (WebCore::RenderFlowThread::logicalWidthChangedInRegions):
470         * rendering/RenderFlowThread.h: Renamed pageLogicalHeightChanged to pageLogicalSizeChanged.
471         * rendering/RenderMedia.cpp:
472         (WebCore::RenderMedia::layout):
473
474 2013-02-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
475
476         [CoordGfx] Regression from r135212: big layers with transform animations sometime fail to render tiles
477         https://bugs.webkit.org/show_bug.cgi?id=109179
478
479         Reviewed by Jocelyn Turcotte.
480
481         Fix adjustForContentsRect logic for AC layers that are higher or wider than the visible rect.
482
483         Force updates of the visible rect while it is animating, and until we have done one last update after
484         it stops animating.
485
486         Test: compositing/transitions/transform-on-large-layer.html
487
488         * platform/graphics/TiledBackingStore.cpp:
489         (WebCore::TiledBackingStore::adjustForContentsRect):
490         (WebCore::TiledBackingStore::computeCoverAndKeepRect):
491         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
492         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
493         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
494         (WebCore::CoordinatedGraphicsLayer::computePixelAlignment):
495         (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
496         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
497         (CoordinatedGraphicsLayer):
498
499 2013-02-15  Sheriff Bot  <webkit.review.bot@gmail.com>
500
501         Unreviewed, rolling out r142876.
502         http://trac.webkit.org/changeset/142876
503         https://bugs.webkit.org/show_bug.cgi?id=109920
504
505         Broke relative URL linkification in the computed styles pane
506         (Requested by apavlov on #webkit).
507
508         * inspector/front-end/StylesSidebarPane.js:
509         (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules):
510
511 2013-02-15  Allan Sandfeld Jensen  <allan.jensen@digia.com>
512
513         Simplify hitTestResultAtPoint and nodesFromRect APIs
514         https://bugs.webkit.org/show_bug.cgi?id=95720
515
516         Reviewed by Julien Chaffraix.
517
518         The existing API was overloaded and could be simplified by passing all the bool arguments in 
519         a HitTestRequest argument. This should also help clarify the call as the enum values explicitely
520         state what they do.
521
522         * WebCore.exp.in:
523         * WebCore.order:
524         * dom/Document.cpp:
525         (WebCore::Document::nodesFromRect):
526         * dom/Document.h:
527         (Document):
528         * page/ContextMenuController.cpp:
529         (WebCore::ContextMenuController::createContextMenu):
530         * page/DragController.cpp:
531         (WebCore::DragController::canProcessDrag):
532         (WebCore::DragController::startDrag):
533         * page/EventHandler.cpp:
534         (WebCore::EventHandler::hitTestResultAtPoint):
535         (WebCore::EventHandler::handleMousePressEvent):
536         (WebCore::EventHandler::handleGestureEvent):
537         (WebCore::EventHandler::handleGestureForTextSelectionOrContextMenu):
538         (WebCore::EventHandler::bestClickableNodeForTouchPoint):
539         (WebCore::EventHandler::bestContextMenuNodeForTouchPoint):
540         (WebCore::EventHandler::bestZoomableAreaForTouchPoint):
541         (WebCore::EventHandler::handleTouchEvent):
542         * page/EventHandler.h:
543         (WebCore):
544         (EventHandler):
545         * page/FocusController.cpp:
546         (WebCore::updateFocusCandidateIfNeeded):
547         * page/Frame.cpp:
548         (WebCore::Frame::visiblePositionForPoint):
549         (WebCore::Frame::documentAtPoint):
550         * page/TouchDisambiguation.cpp:
551         (WebCore::findGoodTouchTargets):
552         * rendering/HitTestRequest.h:
553         (WebCore::HitTestRequest::allowsFrameScrollbars):
554         * testing/Internals.cpp:
555         (WebCore::Internals::nodesFromRect):
556
557 2013-02-14  Pavel Feldman  <pfeldman@chromium.org>
558
559         Web Inspector: make component-based compile-front-end happy
560         https://bugs.webkit.org/show_bug.cgi?id=109798
561
562         Reviewed by Vsevolod Vlasov.
563
564         * inspector/Inspector.json:
565         * inspector/InspectorDebuggerAgent.cpp:
566         (WebCore::InspectorDebuggerAgent::setVariableValue):
567         * inspector/InspectorDebuggerAgent.h:
568         (InspectorDebuggerAgent):
569         * inspector/compile-front-end.py:
570         * inspector/front-end/AuditResultView.js:
571         * inspector/front-end/CPUProfileView.js:
572         * inspector/front-end/DataGrid.js:
573         * inspector/front-end/InspectorFrontendAPI.js:
574         (InspectorFrontendAPI.loadTimelineFromURL):
575
576 2013-02-14  Alexander Pavlov  <apavlov@chromium.org>
577
578         Web Inspector: Implement tracking of active stylesheets in the frontend
579         https://bugs.webkit.org/show_bug.cgi?id=105828
580
581         Reviewed by Pavel Feldman.
582
583         - This change introduces the CSS.styleSheetAdded() and CSS.styleSheetRemoved() events
584         that update the frontend with all active stylesheet changes in the inspected page.
585         As such, fetching stylesheet headers from the backend manually is no longer needed,
586         and many asynchronous methods have been turned into normal accessors.
587         - One notable change to the stylesheet binding process is that when a via-inspector stylesheet
588         is created, it is instantly reported through the instrumentation, and the viaInspectorStyleSheet() method
589         is [indirectly] called recursively from bindStyleSheet(). Thus, the actual creation and registration
590         of the respective InspectorStyleSheet have been moved into bindStyleSheet(),
591         which relies upon the m_creatingViaInspectorStyleSheet flag.
592
593         Test: inspector/styles/stylesheet-tracking.html
594
595         * dom/DocumentStyleSheetCollection.cpp:
596         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Instrumented.
597         * inspector/Inspector.json: Add events, update the CSS domain description.
598         * inspector/InspectorCSSAgent.cpp:
599         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
600         (WebCore::InspectorCSSAgent::clearFrontend):
601         (WebCore::InspectorCSSAgent::enable): Push all existing stylesheet headers into the frontend.
602         (WebCore::InspectorCSSAgent::activeStyleSheetsUpdated): Push added/removed stylesheet into the frontend.
603         (WebCore::InspectorCSSAgent::getAllStyleSheets): Slightly refactored to make use of collectAllStyleSheets().
604         (WebCore::InspectorCSSAgent::collectAllStyleSheets): Added to collect InspectorStyleSheets rather than headers.
605         (WebCore::InspectorCSSAgent::collectStyleSheets):
606         (WebCore::InspectorCSSAgent::bindStyleSheet): Binds via-inspector stylesheets, too.
607         (WebCore::InspectorCSSAgent::unbindStyleSheet): Now we can unbind stylesheets upon their removal from the document.
608         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet): Modifies m_creatingViaInspectorStyleSheet when necessary.
609         (WebCore::InspectorCSSAgent::detectOrigin): Modified to make use of m_creatingViaInspectorStyleSheet.
610         (WebCore::InspectorCSSAgent::buildObjectForRule): Removed extraneous bound InspectorStyleSheet 0-check.
611         * inspector/InspectorCSSAgent.h:
612         * inspector/InspectorInstrumentation.cpp: Instrumentation of active stylesheet set updates.
613         (WebCore::InspectorInstrumentation::activeStyleSheetsUpdatedImpl):
614         * inspector/InspectorInstrumentation.h: Ditto.
615         (WebCore::InspectorInstrumentation::activeStyleSheetsUpdated):
616         * inspector/front-end/CSSStyleModel.js:
617         (WebInspector.CSSStyleModel.prototype.styleSheetHeaders):
618         (WebInspector.CSSStyleModel.prototype._styleSheetAdded): Added.
619         (WebInspector.CSSStyleModel.prototype._styleSheetRemoved): Added.
620         (WebInspector.CSSStyleModel.prototype.viaInspectorResourceForRule):
621         (WebInspector.CSSStyleModelResourceBinding.prototype._setHeaderForStyleSheetId):
622         (WebInspector.CSSStyleModelResourceBinding.prototype.resourceURLForStyleSheetId):
623         (WebInspector.CSSStyleModelResourceBinding.prototype.styleSheetIdForResource):
624         (WebInspector.CSSStyleModelResourceBinding.prototype._headerKey): Calculate the (frameID + URL) key for CSSStyleSheetHeader.
625         (WebInspector.CSSStyleModelResourceBinding.prototype._createInspectorResource):
626         (WebInspector.CSSStyleModelResourceBinding.prototype._inspectorResource):
627         (WebInspector.CSSStyleModelResourceBinding.prototype._reset):
628         (WebInspector.CSSDispatcher.prototype.styleSheetAdded): Added.
629         (WebInspector.CSSDispatcher.prototype.styleSheetRemoved): Added.
630         * inspector/front-end/SASSSourceMapping.js: Get rid of async implementations.
631         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged):
632         * inspector/front-end/StylesSidebarPane.js: Ditto.
633         (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode):
634         * inspector/front-end/StylesSourceMapping.js: Ditto.
635         (WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged):
636
637 2013-02-15  Andrei Bucur  <abucur@adobe.com>
638
639         Implement the -webkit-margin-collapse properties correct rendering
640         https://bugs.webkit.org/show_bug.cgi?id=108168
641
642         Reviewed by David Hyatt.
643
644         The patch implements the correct behavior for the -webkit-margin-collapse properties:
645         - a value of "discard" on a margin will truncate all the margins collapsing with it;
646         - a value of "separate" will prevent the margin to collapse;
647         - a value of "collapse" is the default collapse behavior.
648
649         The implementation is aware of multiple writing-modes:
650         - if the writing mode of a child is parallel with the writing mode of the container and has the same direction,
651         the -webkit-margin-collapse properties on the child are left as is;
652         - if the writing mode of a child is parallel with the writing mode of the container but has a different direction,
653         the -webkit-margin-collapse properties on the child are reversed;
654         - if the writing mode of a child is perpendicular on the writing mode of the container,
655         the -webkit-margin-collapse properties on the child are ignored;
656
657         I. The "discard" value implementation
658         There are two new bits (before and after) added on the RenderBlockRareData structure specifying if the margins
659         of the block will be discarded or not. We can't rely only on the value from style() because
660         it's possible a block to discard it's margins because it has collapsed with a children that
661         specified "discard" for -webkit-margin-collapse. However, the bits are set only if it is
662         required.
663         Another bit is added on the MarginInfo structure specifying if the margin has to be discarded or not. When
664         collapsing at the before side of a block it will hold information if the container block needs to discard
665         or not. If the collapsing happens between siblings/with after side of the container it will tell if the previous
666         child discards the margin or not. The self collapsing blocks are a special case. If any of its margins
667         discards then both its margins discard and all the other margins collapsing with it.
668         To ensure an optimal behavior it is asserted margin values can't be set on the MarginInfo object if the
669         discard flag is active. If this happens it may indicate someone ignored the possibility of the margin being
670         discarded altogether and incorrectly updated the margin values.
671         Float clearing also needs to change because it may force margins to stop collapsing. If this happens the discard
672         flags and margins needs to be restored to their values before the collapse.
673
674         II. The "separate" value implementation
675         The implementation for separate was not changed too much. I've added new accessor methods for the property
676         that take writing mode into consideration and I've removed some code that didn't work correctly in layoutBlockChild.
677         The problem was the marginInfo structure was cleared if the child was specifying the "separate" value for before.
678         This is wrong because you lose the margin information of the previous child/before side.
679
680         Tests: fast/block/margin-collapse/webkit-margin-collapse-container.html
681                fast/block/margin-collapse/webkit-margin-collapse-floats.html
682                fast/block/margin-collapse/webkit-margin-collapse-siblings-bt.html
683                fast/block/margin-collapse/webkit-margin-collapse-siblings.html
684
685         * rendering/RenderBlock.cpp:
686         (WebCore::RenderBlock::MarginInfo::MarginInfo):
687         (WebCore::RenderBlock::layoutBlock):
688         (WebCore::RenderBlock::collapseMargins):
689         (WebCore::RenderBlock::clearFloatsIfNeeded):
690         (WebCore::RenderBlock::marginBeforeEstimateForChild):
691         (WebCore::RenderBlock::estimateLogicalTopPosition):
692         (WebCore::RenderBlock::setCollapsedBottomMargin):
693         (WebCore::RenderBlock::handleAfterSideOfBlock):
694         (WebCore::RenderBlock::layoutBlockChild):
695         (WebCore::RenderBlock::setMustDiscardMarginBefore):
696         (WebCore):
697         (WebCore::RenderBlock::setMustDiscardMarginAfter):
698         (WebCore::RenderBlock::mustDiscardMarginBefore):
699         (WebCore::RenderBlock::mustDiscardMarginAfter):
700         (WebCore::RenderBlock::mustDiscardMarginBeforeForChild):
701         (WebCore::RenderBlock::mustDiscardMarginAfterForChild):
702         (WebCore::RenderBlock::mustSeparateMarginBeforeForChild):
703         (WebCore::RenderBlock::mustSeparateMarginAfterForChild):
704         * rendering/RenderBlock.h:
705         (RenderBlock):
706         (WebCore::RenderBlock::initMaxMarginValues):
707         (MarginInfo):
708         (WebCore::RenderBlock::MarginInfo::setPositiveMargin):
709         (WebCore::RenderBlock::MarginInfo::setNegativeMargin):
710         (WebCore::RenderBlock::MarginInfo::setPositiveMarginIfLarger):
711         (WebCore::RenderBlock::MarginInfo::setNegativeMarginIfLarger):
712         (WebCore::RenderBlock::MarginInfo::setMargin):
713         (WebCore::RenderBlock::MarginInfo::setCanCollapseMarginAfterWithChildren):
714         (WebCore::RenderBlock::MarginInfo::setDiscardMargin):
715         (WebCore::RenderBlock::MarginInfo::discardMargin):
716         (WebCore::RenderBlock::RenderBlockRareData::RenderBlockRareData):
717         (WebCore::RenderBlock::RenderBlockRareData::positiveMarginBeforeDefault):
718         (RenderBlockRareData):
719         * rendering/style/RenderStyle.h:
720
721 2013-02-14  Yury Semikhatsky  <yurys@chromium.org>
722
723         Web Inspector: always show memory size in Mb on the native memory graph
724         https://bugs.webkit.org/show_bug.cgi?id=109813
725
726         Reviewed by Pavel Feldman.
727
728         Memory size vlue is alway shown in Mb on the native memory graph.
729
730         * inspector/front-end/NativeMemoryGraph.js:
731         (WebInspector.NativeMemoryCounterUI.prototype.updateCurrentValue):
732
733 2013-02-14  Andrey Adaikin  <aandrey@chromium.org>
734
735         Use GL typedefs in WebGLRenderingContext.idl
736         https://bugs.webkit.org/show_bug.cgi?id=109060
737
738         Reviewed by Kenneth Russell.
739
740         Use GL typedefs in WebGLRenderingContext.idl according to the specs.
741         Added a FIXME about inconsistency with the current WebGL spec for getAttribLocation.
742
743         Tested manually that generators V8, JS, ObjC, GObject, CPP produce same output.
744
745         * html/canvas/WebGLRenderingContext.idl:
746
747 2013-02-14  Vsevolod Vlasov  <vsevik@chromium.org>
748
749         Web Inspector: Copy-pasting selected text over itself should be an undoable state.
750         https://bugs.webkit.org/show_bug.cgi?id=109830
751
752         Reviewed by Pavel Feldman.
753
754         * inspector/front-end/TextEditorModel.js:
755         (WebInspector.TextEditorModel.endsWithBracketRegex.):
756
757 2013-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
758
759         Unreviewed, rolling out r142889.
760         http://trac.webkit.org/changeset/142889
761         https://bugs.webkit.org/show_bug.cgi?id=109891
762
763         It caused an assertion failure in scrollbars/overflow-
764         scrollbar-combinations.html (Requested by tkent on #webkit).
765
766         * rendering/RenderBox.cpp:
767         (WebCore::borderWidthChanged):
768         (WebCore::RenderBox::styleDidChange):
769
770 2013-02-14  Arpita Bahuguna  <arpitabahuguna@gmail.com>
771
772         Caret positioned at the end of a text line (followed by an empty block) in vertical writing mode disappears when pressing the right/down arrow key.
773         https://bugs.webkit.org/show_bug.cgi?id=106452
774
775         Reviewed by Ryosuke Niwa.
776
777         Pressing the down or the right arrow key at the end of a text line in
778         vertical writing mode would make the caret dissapear. This occurs only
779         when the text line is followed by an empty block.
780
781         When trying to compute the next position for placing the caret (for
782         down/right key), we try to ascertain whether the renderer (in this
783         case the empty block) is a valid candidate or not. For blockFlow
784         elements we check against their height.
785         In vertical writing mode though we would fail such a check since we
786         should instead be comparing against the renderer's width and not
787         it's height. Thus, a valid position for the placement of the caret
788         was not found in such a case.
789
790         Test: editing/selection/caret-at-end-of-text-line-followed-by-empty-block-in-vertical-mode.html
791
792         * dom/Position.cpp:
793         (WebCore::Position::isCandidate):
794         * dom/PositionIterator.cpp:
795         (WebCore::PositionIterator::isCandidate):
796         Instead of checking against the height(), check against the
797         logicalHeight() of the renderer has been added. logicalHeight()
798         on blockFlow renderer's returns a value in accordance with
799         the writing mode.
800
801 2013-02-14  Ryosuke Niwa  <rniwa@webkit.org>
802
803         Windows build fix after r142957.
804
805         * dom/DOMAllInOne.cpp:
806
807 2013-02-14  Ryosuke Niwa  <rniwa@webkit.org>
808
809         Fix a typo introduced in r142705.
810
811         Without this fix, text-input-controller.html can fail when DeleteButtonController is enabled.
812         e.g. "run-webkit-tests platform/mac/editing/deleting/deletionUI-single-instance.html
813             platform/mac/editing/input/text-input-controller.html --child-processes=1"
814
815         * editing/Editor.cpp:
816         (WebCore::Editor::avoidIntersectionWithDeleteButtonController):
817
818 2013-02-14  Hayato Ito  <hayato@chromium.org>
819
820         Factor Event retargeting code.
821         https://bugs.webkit.org/show_bug.cgi?id=109156
822
823         Reviewed by Dimitri Glazkov.
824
825         To supoort Touch event retargeting (bug 107800), we have to factor
826         event retargeting code so that it can support not only MouseEvent,
827         but also other events.
828
829         New class, EventRetargeter, was introduced. From now,
830         EventDispatchMediator (and its subclasses) should call, if event
831         retargeting is required, an appropriate function provided in
832         EventRetargeter rather than calling
833         EventDispatcher::adjustRelatedTarget(), which was removed in this
834         patch.
835
836         No tests. No change in behavior.
837
838         * CMakeLists.txt:
839         * GNUmakefile.list.am:
840         * Target.pri:
841         * WebCore.gypi:
842         * WebCore.xcodeproj/project.pbxproj:
843         * dom/EventDispatchMediator.cpp:
844         * dom/EventDispatcher.cpp:
845         (WebCore):
846         (WebCore::EventDispatcher::ensureEventPath): Changed to return an EventPath, which will be used by EventRetargeter.
847         (WebCore::EventDispatcher::dispatchScopedEvent):
848         (WebCore::EventDispatcher::dispatchEvent):
849         (WebCore::EventDispatcher::dispatchEventPostProcess):
850         * dom/EventDispatcher.h:
851         (WebCore):
852         (EventDispatcher):
853         * dom/EventRetargeter.cpp: Added.
854         (WebCore):
855         (WebCore::inTheSameScope):
856         (WebCore::determineDispatchBehavior):
857         (WebCore::EventRetargeter::calculateEventPath): Factored out from EventDispatcher::ensureEventPath().
858         (WebCore::EventRetargeter::adjustForMouseEvent):
859         (WebCore::EventRetargeter::adjustForFocusEvent):
860         (WebCore::EventRetargeter::adjustForRelatedTarget):
861         (WebCore::EventRetargeter::calculateAdjustedNodes): Factored out from EventRelatedTargetAjuster::adjustRelatedTarget().
862         (WebCore::EventRetargeter::buildRelatedNodeMap): Factored out from EventRelatedTargetAjuster::adjustRelatedTarget().
863         (WebCore::EventRetargeter::findRelatedNode):
864         * dom/EventRetargeter.h: Added.
865         (WebCore):
866         (EventRetargeter):
867         (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
868         * dom/FocusEvent.cpp:
869         (WebCore::FocusEventDispatchMediator::dispatchEvent): Changed to call EventRetargeter::adjustForFocusEvent().
870         (WebCore::BlurEventDispatchMediator::dispatchEvent): Ditto.
871         (WebCore::FocusInEventDispatchMediator::dispatchEvent): Ditto.
872         (WebCore::FocusOutEventDispatchMediator::dispatchEvent): Ditto.
873         * dom/MouseEvent.cpp:
874         (WebCore::MouseEventDispatchMediator::dispatchEvent): Changed to call EventRetargeter::adjustForMouseEvent().
875
876 2013-02-14  Simon Fraser  <simon.fraser@apple.com>
877
878         Reverting r142861. Hit testing inside of style recalc is fundamentally wrong
879
880         * page/EventHandler.cpp:
881         (WebCore::EventHandler::selectCursor):
882         (WebCore::EventHandler::handleMouseMoveEvent):
883         * page/EventHandler.h:
884         * rendering/RenderObject.cpp:
885         (WebCore::RenderObject::setStyle):
886         (WebCore::areNonIdenticalCursorListsEqual):
887         (WebCore::areCursorsEqual):
888         (WebCore::RenderObject::styleDidChange):
889
890 2013-02-14  Florin Malita  <fmalita@chromium.org>
891
892         [SVG] Cached filter results are not invalidated on repaint rect change
893         https://bugs.webkit.org/show_bug.cgi?id=106221
894
895         Reviewed by Dean Jackson.
896
897         Since the cached filter results are not invalidated for different repaint rects, we need
898         to render the content of the whole filter region upfront (otherwise elements not visible
899         during the initial paint due to scrolling/window size/etc. are never redrawn).
900
901         Tests: svg/filters/filter-hidden-content-expected.svg
902                svg/filters/filter-hidden-content.svg
903
904         * rendering/svg/RenderSVGResourceFilter.cpp:
905         (WebCore::RenderSVGResourceFilter::applyResource):
906         (WebCore::RenderSVGResourceFilter::drawingRegion):
907         (WebCore):
908         * rendering/svg/RenderSVGResourceFilter.h:
909         (FilterData):
910         (RenderSVGResourceFilter):
911         Track the filter drawing region in FilterData.
912
913         * rendering/svg/SVGRenderingContext.cpp:
914         (WebCore::SVGRenderingContext::~SVGRenderingContext):
915         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
916         * rendering/svg/SVGRenderingContext.h:
917         Update paintInfo.rect to cover the whole drawing region while rendering filter content, and
918         restore it when done.
919
920 2013-02-14  Jinwoo Song  <jinwoo7.song@samsung.com>
921
922         [EFL] Correct the mismatched cursor map
923         https://bugs.webkit.org/show_bug.cgi?id=109655
924
925         Reviewed by Laszlo Gombos.
926
927         Correct the mismatched ECORE_X_CURSOR values in the cursor map.
928
929         * platform/efl/EflScreenUtilities.cpp:
930         (WebCore::CursorMap::CursorMap):
931
932 2013-02-14  Kentaro Hara  <haraken@chromium.org>
933
934         Unreviewed. Rebaselined run-bindings-tests.
935
936         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
937         (WebDOMTestObj::anyAttribute):
938         (WebDOMTestObj::setAnyAttribute):
939         * bindings/scripts/test/CPP/WebDOMTestObj.h:
940         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
941         (webkit_dom_test_obj_get_any_attribute):
942         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
943         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
944         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
945         (WebCore::TestTypedefsV8Internal::funcWithClampCallback):
946
947 2013-02-14  Christian Biesinger  <cbiesinger@chromium.org>
948
949         Convert media controls from DeprecatedFlexibleBox to FlexibleBox
950         https://bugs.webkit.org/show_bug.cgi?id=109775
951
952         Reviewed by Ojan Vafai.
953
954         Covered by existing tests in media/.
955
956         * css/mediaControls.css:
957         * css/mediaControlsBlackBerry.css:
958         * css/mediaControlsChromium.css:
959         * css/mediaControlsChromiumAndroid.css:
960         * css/mediaControlsEfl.css:
961         * css/mediaControlsGtk.css:
962         * css/mediaControlsQt.css:
963         * css/mediaControlsQuickTime.css:
964         Automated search and replace of old flexbox CSS rules to new ones.
965         Minor tuning of the chromium rules.
966
967         * rendering/RenderMediaControlElements.cpp:
968         (WebCore::RenderMediaControlTimeDisplay::RenderMediaControlTimeDisplay):
969         (WebCore::RenderMediaControlTimeDisplay::layout):
970         * rendering/RenderMediaControlElements.h:
971         Make media controls inherit from RenderFlexibleBox
972
973 2013-02-14  Roger Fong  <roger_fong@apple.com>
974
975         Build fix for Windows.
976
977         * Modules/webdatabase/SQLTransactionStateMachine.cpp:
978         (WebCore::nameForSQLTransactionState):
979
980 2013-02-14  Dean Jackson  <dino@apple.com>
981
982         Inspector doesn't show rules from pluginsStyleSheet
983         https://bugs.webkit.org/show_bug.cgi?id=109872
984
985         Reviewed by Darin Adler.
986
987         Make sure getWrapperForRuleInSheets collects the rules
988         from CSSDefaultStyleSheets::plugInsStyleSheet.
989
990         Making a test for this is difficult because the rules in
991         this sheet only apply to snapshotted plugins at the moment,
992         which are disabled in DRT, and would require a fairly long
993         timeout in the test.
994
995         * css/InspectorCSSOMWrappers.cpp:
996         (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
997
998 2013-02-14  Hayato Ito  <hayato@chromium.org>
999
1000         Recover edge names used in MemoryInstrumentation for DocumentRuleSets.
1001         https://bugs.webkit.org/show_bug.cgi?id=109800
1002
1003         Reviewed by Hajime Morita.
1004
1005         This is a following patch for r142573.
1006         r142563 accidentally removes edge names for MemoryInstrumentation. We should recover edge names.
1007
1008         No tests. No change in behavior.
1009
1010         * css/DocumentRuleSets.cpp:
1011         (WebCore::DocumentRuleSets::reportMemoryUsage):
1012
1013 2013-02-14  Hajime Morrita  <morrita@google.com>
1014
1015         [V8] Assertion failure on an exception is thrown
1016         https://bugs.webkit.org/show_bug.cgi?id=109129
1017
1018         An assertion in V8AbstractEventListener is wrong. This change turns it into an error check.
1019
1020         Reviewed by Kentaro Hara.
1021
1022         Test: fast/events/onerror-no-constructor.html
1023
1024         * bindings/v8/V8AbstractEventListener.cpp:
1025         (WebCore::V8AbstractEventListener::handleEvent):
1026
1027 2013-02-14  Kentaro Hara  <haraken@chromium.org>
1028
1029         [V8] CodeGeneratorV8.pm can assume that DOMWindow has [CheckSecurity]
1030         https://bugs.webkit.org/show_bug.cgi?id=109788
1031
1032         Reviewed by Adam Barth.
1033
1034         There is code like this:
1035
1036           if ($extendedAttr{"CheckSecurity"} || $interfaceName eq "DOMWindow")
1037
1038         This check is redundant. DOMWindow has [CheckSecurity]. We can remove the
1039         DOMWindow check.
1040
1041         No tests. No change in behavior.
1042
1043         * bindings/scripts/CodeGeneratorV8.pm:
1044         (GenerateReplaceableAttrSetter):
1045         (GenerateFunctionCallback):
1046         (GenerateNonStandardFunction):
1047         (GenerateImplementation):
1048
1049 2013-02-14  Joshua Bell  <jsbell@chromium.org>
1050
1051         [V8] IndexedDB: Remove unused creationContext paramter from idbKeyToV8Value
1052         https://bugs.webkit.org/show_bug.cgi?id=109870
1053
1054         Reviewed by Kentaro Hara.
1055
1056         This parameter was left over from when the function was toV8(IDBKey). Remove it.
1057
1058         No new tests - just removing dead code.
1059
1060         * bindings/v8/IDBBindingUtilities.cpp:
1061         (WebCore::idbKeyToV8Value): Remove unused parameter.
1062         (WebCore::injectIDBKeyIntoScriptValue): No need for dummy handle.
1063         (WebCore::idbKeyToScriptValue): No need for dummy handle.
1064
1065 2013-02-14  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1066
1067         [WebGL][Qt] regression:r142786 Qt Build fix for Arm and Windows.
1068         https://bugs.webkit.org/show_bug.cgi?id=109797
1069
1070         Reviewed by Csaba Osztrogon√°c.
1071
1072         After r142786, we use OpenGLShims to load necessary GL functions
1073         exposed by ARB_vertex_array_object extension. Qt uses OpenGLShims
1074         to load functions with GLES too. This patch adds support for loading the
1075         equivalent functions on GLES exposed by OES_vertex_array_object.
1076         
1077         * platform/graphics/OpenGLShims.cpp:
1078         (WebCore::initializeOpenGLShims):
1079         * platform/graphics/OpenGLShims.h:
1080
1081 2013-02-14  Alexey Proskuryakov  <ap@apple.com>
1082
1083         <rdar://problem/13210723> CORS preflight broken with NetworkProcess
1084         https://bugs.webkit.org/show_bug.cgi?id=109753
1085
1086         Reviewed by Brady Eidson.
1087
1088         * loader/DocumentThreadableLoader.h:
1089         * loader/DocumentThreadableLoader.cpp:
1090         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
1091         (WebCore::DocumentThreadableLoader::cancel):
1092         (WebCore::DocumentThreadableLoader::didReceiveResponse):
1093         (WebCore::DocumentThreadableLoader::dataReceived):
1094         (WebCore::DocumentThreadableLoader::didReceiveData):
1095         (WebCore::DocumentThreadableLoader::notifyFinished):
1096         (WebCore::DocumentThreadableLoader::didFinishLoading):
1097         (WebCore::DocumentThreadableLoader::didFail):
1098         (WebCore::DocumentThreadableLoader::preflightFailure): Notify InspectorInstrumentation
1099         immediately. In addition to keeping up eith other changes, this means that an accurate
1100         error will be passed now, not a cancellation.
1101         (WebCore::DocumentThreadableLoader::loadRequest):
1102         Get rid of m_preflightRequestIdentifier. Every loader has an identifier, and tracking
1103         identifiers twice is wrong.
1104         Pass identifier explicitly to more internal functions, so that they would not have to
1105         second-guess callers.
1106
1107         * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSendRequest):
1108         Create an identifier for all loaders, not just those that we expect to have client
1109         callbacks about. Both Inspector and NetworkProcess need identifiers everywhere.
1110
1111         * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::deprecatedDidReceiveCachedResource):
1112         * loader/TextTrackLoader.h:
1113         * loader/cache/CachedResourceClient.h:
1114         (WebCore::CachedResourceClient::deprecatedDidReceiveCachedResource):
1115         * loader/cache/CachedTextTrack.cpp: (WebCore::CachedTextTrack::data):
1116         Renamed didReceiveData to avoid conflict with the new DocumentThreadableLoader::didReceiveData.
1117         And we should really get rid of this CachedResourceClient function anyway.
1118
1119 2013-02-14  Kentaro Hara  <haraken@chromium.org>
1120
1121         Replace 'DOMObject' with 'any'
1122         https://bugs.webkit.org/show_bug.cgi?id=109793
1123
1124         Reviewed by Dimitri Glazkov.
1125
1126         In the Web IDL spec, there is no type named 'DOMObject'.
1127         It should be 'any'. We should replace all 'DOMObject's in WebKit IDLs with 'any's.
1128
1129         * Modules/webdatabase/SQLResultSetRowList.idl:
1130         * bindings/scripts/CodeGeneratorCPP.pm:
1131         (GetClassName):
1132         (AddIncludesForType):
1133         * bindings/scripts/CodeGeneratorGObject.pm:
1134         (GenerateFunction):
1135         * bindings/scripts/CodeGeneratorJS.pm:
1136         (AddIncludesForType):
1137         (GenerateImplementation):
1138         (JSValueToNative):
1139         (NativeToJSValue):
1140         * bindings/scripts/CodeGeneratorV8.pm:
1141         (GetNativeType):
1142         (JSValueToNative):
1143         (GetV8HeaderName):
1144         * dom/CustomEvent.idl:
1145         * dom/MessageEvent.idl:
1146         * dom/PopStateEvent.idl:
1147         * fileapi/FileReader.idl:
1148         * html/HTMLCanvasElement.idl:
1149         * html/HTMLElement.idl:
1150         * html/canvas/DataView.idl:
1151         * inspector/InjectedScriptHost.idl:
1152         * inspector/InspectorFrontendHost.idl:
1153         * inspector/JavaScriptCallFrame.idl:
1154         * page/DOMWindow.idl:
1155         * page/Location.idl:
1156
1157 2013-02-14  Kentaro Hara  <haraken@chromium.org>
1158
1159         [V8] Remove GenerateEventListenerCallback() from CodeGeneratorV8.pm
1160         https://bugs.webkit.org/show_bug.cgi?id=109786
1161
1162         Reviewed by Adam Barth.
1163
1164         Some code is duplicated between GenerateEventListenerCallback()
1165         and GenerateFunctionCallback(). By inlining GenerateEventListenerCallback()
1166         into GenerateFunctionCallback(), we can remove the duplication.
1167
1168         No tests. No change in behavior.
1169
1170         * bindings/scripts/CodeGeneratorV8.pm:
1171         (GenerateFunctionCallback):
1172
1173 2013-02-14  Ojan Vafai  <ojan@chromium.org>
1174
1175         Intrinsic and preferred widths on replaced elements are wrong in many cases
1176         https://bugs.webkit.org/show_bug.cgi?id=109859
1177
1178         Reviewed by Levi Weintraub.
1179
1180         Test: fast/replaced/preferred-widths.html
1181
1182         * rendering/RenderReplaced.cpp:
1183         (WebCore::RenderReplaced::computeIntrinsicLogicalWidths):
1184         Separate out computing the intrinsic widths. Eventually,
1185         we should be able to share computePreferredLogicalWidth implementations
1186         for all replaced elements and form controls since only the intrinsic width
1187         changes.
1188
1189         (WebCore::RenderReplaced::computePreferredLogicalWidths):
1190         -Apply min-width and max-width constraints and then add borderAndPaddingLogicalWidth
1191         at the end to make sure it's always applied. This matches all our other
1192         computePreferredLogicalWidths override and makes use match Gecko's/Opera's rendering.
1193         -Only set the minPreferredLogicalWidth to 0 if the width or max-width is a percent value.
1194         Doing it for height values and for min-width doesn't make any sense and doesn't
1195         match other browsers. Doing this for max-width still doesn't match other browsers,
1196         but it sounds like Gecko at least would like to change that.
1197
1198         * rendering/RenderReplaced.h:
1199         (WebCore::RenderReplaced::hasRelativeIntrinsicLogicalWidth):
1200         * rendering/svg/RenderSVGRoot.cpp:
1201         (WebCore::RenderSVGRoot::hasRelativeIntrinsicLogicalWidth):
1202         Add a way to check if the logicalWidth is relative so that we only check
1203         the width in computePreferredLogicalWidths instead of also checking the height.
1204
1205         * rendering/svg/RenderSVGRoot.h:
1206
1207 2013-02-14  Stephen Chenney  <schenney@chromium.org>
1208
1209         Crash when selecting a HarfBuzz text run with SVG fonts included
1210         https://bugs.webkit.org/show_bug.cgi?id=109833
1211
1212         Reviewed by Tony Chang.
1213
1214         There is an assert in SimpleFontData::applyTransforms that should not
1215         be there, as the code is valid for SVG fonts. If we get past this,
1216         then the HarfBuzz text run shaping code assumes that font data has a
1217         SkTypeface member, and SVG fonts do not. So we crash there too.
1218
1219         For now, we fix the crashes. This still leaves incorrect selection
1220         rectangles in this situation, on all platforms, tracked in
1221         https://bugs.webkit.org/show_bug.cgi?id=108133
1222
1223         Test: svg/css/font-face-crash.html
1224
1225         * platform/graphics/SimpleFontData.h:
1226         (WebCore::SimpleFontData::applyTransforms): Remove ASSERT_NOT_REACHED as the code can legally be reached for SVG fonts.
1227         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
1228         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Check for SVG fonts in the text run, and abort if we find them.
1229
1230 2013-02-13 Joe Mason <jmason@rim.com>
1231
1232         [BlackBerry] Notify platform layer of failing to get authentication credentials
1233         https://bugs.webkit.org/show_bug.cgi?id=109751
1234
1235         Reviewed by Yong Li.
1236         Reviewed internally by Leo Yang
1237         Internal PR: 181302
1238
1239         The BlackBerry platform network layer needs to know if a stream failed to get authentication credentials.
1240         This patch is using newly added stream API to do it.
1241
1242         No functionality changed no new tests.
1243
1244         * platform/network/blackberry/NetworkJob.cpp:
1245         (WebCore::NetworkJob::notifyAuthReceived):
1246         (WebCore::NetworkJob::sendRequestWithCredentials):
1247         (WebCore::NetworkJob::notifyChallengeResult):
1248         * platform/network/blackberry/NetworkJob.h:
1249         * platform/network/blackberry/NetworkManager.cpp:
1250         (WebCore::protectionSpaceToPlatformAuth):
1251         (WebCore):
1252         (WebCore::setAuthCredentials):
1253         * platform/network/blackberry/NetworkManager.h:
1254         (WebCore):
1255
1256 2013-02-14  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1257
1258         [GTK] Fix indentation in GNUmakefile.list.am.
1259         https://bugs.webkit.org/show_bug.cgi?id=109854
1260
1261         Reviewed by Martin Robinson.
1262
1263         This patch fixes indentation in GNUmakefile.list.am.
1264
1265         * GNUmakefile.list.am:
1266
1267 2013-02-14  Tony Chang  <tony@chromium.org>
1268
1269         Unreviewed, set svn:eol-style native for .sln, .vcproj, and .vsprops files.
1270         https://bugs.webkit.org/show_bug.cgi?id=96934
1271
1272         * WebCore.vcproj/WebCore.sln: Modified property svn:eol-style.
1273         * WebCore.vcproj/WebCore.submit.sln: Modified property svn:eol-style.
1274
1275 2013-02-14  Abhishek Arya  <inferno@chromium.org>
1276
1277         Bad cast in RenderBlock::splitBlocks.
1278         https://bugs.webkit.org/show_bug.cgi?id=108691
1279
1280         Reviewed by Levi Weintraub.
1281
1282         Test: fast/multicol/remove-child-split-flow-crash.html
1283
1284         * rendering/RenderBlock.cpp:
1285         (WebCore):
1286         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks): rename gIsInColumnFlowSplit to gColumnFlowSplitEnabled
1287         and use it to decide when to do the column flow split or not.
1288         (WebCore::RenderBlock::removeChild): Do not allow column flow split inside removeChild
1289         since we might be merging anonymous blocks.
1290
1291 2013-02-14  Mark Lam  <mark.lam@apple.com>
1292
1293         Split SQLTransaction work between the frontend and backend.
1294         https://bugs.webkit.org/show_bug.cgi?id=104750.
1295
1296         Reviewed by Sam Weinig.
1297
1298         This is part of the webdatabase refactoring for webkit2.
1299
1300         1. Changed how transactions are created.
1301
1302            - Database::runTransaction() first creates a SQLTransaction frontend
1303              which encapsulates the 3 script callbacks. It then passes the
1304              SQLTransaction to the backend database to create the
1305              SQLTransactionBackend.
1306            - The SQLTransactionBackend manages all SQLiteTransaction work.
1307
1308         2. Introduced SQLTransactionState and SQLTransactionStateMachine.
1309
1310            - Instead of tracking the transaction phases as "steps" in m_nextStep,
1311              we now use m_nextState which is of enum class SQLTransactionState.
1312              Unlike m_nextStep which is a pointer to a "step" function,
1313              m_nextState is a state variable which is used to index into a
1314              state dispatch table.
1315
1316            - Both SQLTransaction and SQLTransactionBackend now extends
1317              SQLTransactionStateMachine, and uses its dispatch mechanism based on
1318              the SQLTransactionState.
1319
1320            - Instead of having 1 state machine instances, there are 2: 1 in the
1321              frontend, and 1 in the backend. The 2 have mirrored states, and
1322              transfers work to the other state machine when needed.
1323
1324            - Previously, state functions can be called inline from other states.
1325              They are now only called from the state machines runStateMachine()
1326              method. This makes it possible to isolate the state transition
1327              mechanism going between the sides (frontend and backend) to 2
1328              functions only: SQLTransaction::sendToBackendState() and
1329              SQLTransactionBackend::sendToFrontendState().
1330
1331         3. Consolidated cleanup work (mostly) to a unified cleanup function.
1332
1333         4. Changed the frontend Database::runTransaction() to use a
1334            ChangeVersionData* (instead of a ChangeVersionWrapper ref ptr).
1335
1336            - This is necessary because ChangeVersionWrapper contains functionality
1337              used in processing a transaction (to be invoked in the backend).
1338              Instead, what we want is to simply pass the 2 old and new version
1339              strings to the backend. The new ChangeVersionData simply packages up
1340              these 2 strings.
1341            - This makes ChangeVersionData easy to serialize for IPC messaging later.
1342
1343         5. Moved some transaction functions back to the frontend SQLTransaction
1344            because they belong there.
1345
1346         6. Moved some Database functions to its DatabaseBackendAsync backend
1347            now that the transaction has been split up.
1348
1349            - This is driven naturally by those functions being used exclusively
1350              in the backend for transaction work.
1351            - SQLTransactionClient, SQLTransactionCoordinator, and
1352              SQLTransactionWrapper are now exclusively backend data structures.
1353              SQLTransactionClient still has some frontend "pollution" that I'll
1354              fix later.
1355
1356         7. Made the few database report functions used only by Chromium conditional
1357            on PLATFORM(chromium).
1358
1359            - The report functions gets re-routed to Chromium's DatabaseObserver
1360              which further routes them elsewhere. It is unclear how Chromium uses
1361              these routed messages, and I am therefore not able to determine how
1362              they should work in a frontend/backend world. So, I'm #ifdef'ing
1363              them out. They still work like in the old way for Chromium.
1364
1365         8. Added new files to the build / project files.
1366
1367         9. Updated / added comments about how the transaction and its states work.
1368
1369         No new tests.
1370
1371         * CMakeLists.txt:
1372         * GNUmakefile.list.am:
1373         * Modules/webdatabase/AbstractDatabaseServer.h:
1374         * Modules/webdatabase/ChangeVersionData.h: Added.
1375         (ChangeVersionData):
1376         (WebCore::ChangeVersionData::ChangeVersionData):
1377         (WebCore::ChangeVersionData::oldVersion):
1378         (WebCore::ChangeVersionData::newVersion):
1379         * Modules/webdatabase/ChangeVersionWrapper.cpp:
1380         (WebCore::ChangeVersionWrapper::performPreflight):
1381         (WebCore::ChangeVersionWrapper::performPostflight):
1382         (WebCore::ChangeVersionWrapper::handleCommitFailedAfterPostflight):
1383         * Modules/webdatabase/ChangeVersionWrapper.h:
1384         (ChangeVersionWrapper):
1385         * Modules/webdatabase/Database.cpp:
1386         (WebCore::Database::Database):
1387         (WebCore::Database::close):
1388         (WebCore::Database::changeVersion):
1389         (WebCore::Database::transaction):
1390         (WebCore::Database::readTransaction):
1391         (WebCore::Database::runTransaction):
1392         (WebCore::Database::reportStartTransactionResult):
1393         (WebCore::Database::reportCommitTransactionResult):
1394         (WebCore::Database::reportExecuteStatementResult):
1395         * Modules/webdatabase/Database.h:
1396         (WebCore::Database::databaseContext):
1397         (Database):
1398         (WebCore::Database::reportStartTransactionResult):
1399         (WebCore::Database::reportCommitTransactionResult):
1400         (WebCore::Database::reportExecuteStatementResult):
1401         * Modules/webdatabase/DatabaseBackend.cpp:
1402         * Modules/webdatabase/DatabaseBackend.h:
1403         (DatabaseBackend):
1404         (WebCore::DatabaseBackend::reportOpenDatabaseResult):
1405         (WebCore::DatabaseBackend::reportChangeVersionResult):
1406         (WebCore::DatabaseBackend::reportStartTransactionResult):
1407         (WebCore::DatabaseBackend::reportCommitTransactionResult):
1408         (WebCore::DatabaseBackend::reportExecuteStatementResult):
1409         (WebCore::DatabaseBackend::reportVacuumDatabaseResult):
1410         * Modules/webdatabase/DatabaseBackendAsync.cpp:
1411         (WebCore::DatabaseBackendAsync::DatabaseBackendAsync):
1412         (WebCore::DatabaseBackendAsync::runTransaction):
1413         (WebCore::DatabaseBackendAsync::inProgressTransactionCompleted): Moved from frontend.
1414         (WebCore::DatabaseBackendAsync::scheduleTransaction): Moved from frontend.
1415         (WebCore::DatabaseBackendAsync::scheduleTransactionStep): Moved from frontend.
1416         (WebCore::DatabaseBackendAsync::transactionClient): Moved from frontend.
1417         (WebCore::DatabaseBackendAsync::transactionCoordinator): Moved from frontend.
1418         * Modules/webdatabase/DatabaseBackendAsync.h:
1419         (DatabaseBackendAsync):
1420         * Modules/webdatabase/DatabaseBackendContext.cpp:
1421         (WebCore::DatabaseBackendContext::frontend):
1422         * Modules/webdatabase/DatabaseBackendContext.h:
1423         (DatabaseBackendContext):
1424         * Modules/webdatabase/DatabaseManager.cpp:
1425         * Modules/webdatabase/DatabaseManager.h:
1426         (DatabaseManager):
1427         * Modules/webdatabase/DatabaseServer.cpp:
1428         * Modules/webdatabase/DatabaseServer.h:
1429         * Modules/webdatabase/DatabaseTask.cpp:
1430         (WebCore::DatabaseBackendAsync::DatabaseTransactionTask::doPerformTask):
1431         * Modules/webdatabase/SQLTransaction.cpp:
1432         (WebCore::SQLTransaction::create):
1433         (WebCore::SQLTransaction::SQLTransaction):
1434         (WebCore::SQLTransaction::setBackend):
1435         (WebCore::SQLTransaction::stateFunctionFor):
1436         (WebCore::SQLTransaction::requestTransitToState):
1437         (WebCore::SQLTransaction::nextStateForTransactionError):
1438             - was handleTransactionError(). There's also a backend version.
1439         (WebCore::SQLTransaction::deliverTransactionCallback): Moved from backend.
1440         (WebCore::SQLTransaction::deliverTransactionErrorCallback): Moved from backend.
1441         (WebCore::SQLTransaction::deliverStatementCallback): Moved from backend.
1442         (WebCore::SQLTransaction::deliverQuotaIncreaseCallback): Moved from backend.
1443         (WebCore::SQLTransaction::deliverSuccessCallback): Moved from backend.
1444         (WebCore::SQLTransaction::unreachableState):
1445         (WebCore::SQLTransaction::sendToBackendState):
1446         (WebCore::SQLTransaction::performPendingCallback): Moved from backend.
1447         (WebCore::SQLTransaction::executeSQL): Moved from backend.
1448         (WebCore::SQLTransaction::checkAndHandleClosedOrInterruptedDatabase):
1449         (WebCore::SQLTransaction::clearCallbackWrappers):
1450         * Modules/webdatabase/SQLTransaction.h:
1451         (SQLTransaction):
1452         (WebCore::SQLTransaction::database):
1453         (WebCore::SQLTransaction::hasCallback):
1454         (WebCore::SQLTransaction::hasSuccessCallback):
1455         (WebCore::SQLTransaction::hasErrorCallback):
1456         * Modules/webdatabase/SQLTransactionBackend.cpp:
1457         (WebCore::SQLTransactionBackend::create):
1458         (WebCore::SQLTransactionBackend::SQLTransactionBackend):
1459         (WebCore::SQLTransactionBackend::doCleanup):
1460         (WebCore::SQLTransactionBackend::transactionError):
1461         (WebCore::SQLTransactionBackend::setShouldRetryCurrentStatement):
1462         (WebCore::SQLTransactionBackend::stateFunctionFor):
1463         (WebCore::SQLTransactionBackend::enqueueStatement):
1464         (WebCore::SQLTransactionBackend::checkAndHandleClosedOrInterruptedDatabase):
1465         (WebCore::SQLTransactionBackend::performNextStep):
1466         (WebCore::SQLTransactionBackend::notifyDatabaseThreadIsShuttingDown):
1467         (WebCore::SQLTransactionBackend::acquireLock):
1468         (WebCore::SQLTransactionBackend::lockAcquired):
1469         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
1470         (WebCore::SQLTransactionBackend::runStatements):
1471         (WebCore::SQLTransactionBackend::runCurrentStatementAndGetNextState):
1472             - was runCurrentStatement().
1473         (WebCore::SQLTransactionBackend::nextStateForCurrentStatementError):
1474             - was handleCurrentStatementError().
1475         (WebCore::SQLTransactionBackend::postflightAndCommit):
1476         (WebCore::SQLTransactionBackend::cleanupAndTerminate):
1477         (WebCore::SQLTransactionBackend::nextStateForTransactionError):
1478             - was handleTransactionError(). There's also a frontend version.
1479         (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
1480         (WebCore::SQLTransactionBackend::requestTransitToState):
1481         (WebCore::SQLTransactionBackend::unreachableState):
1482         (WebCore::SQLTransactionBackend::sendToFrontendState):
1483         * Modules/webdatabase/SQLTransactionBackend.h:
1484         (SQLTransactionWrapper):
1485         (SQLTransactionBackend):
1486         (WebCore::SQLTransactionBackend::database):
1487         * Modules/webdatabase/SQLTransactionClient.cpp:
1488         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
1489         (WebCore::SQLTransactionClient::didExecuteStatement):
1490         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
1491         (WebCore::getDatabaseIdentifier):
1492         * Modules/webdatabase/SQLTransactionState.h: Added.
1493         * Modules/webdatabase/SQLTransactionStateMachine.cpp: Added.
1494         (WebCore::nameForSQLTransactionState):
1495             - was debugStepName().
1496         * Modules/webdatabase/SQLTransactionStateMachine.h: Added.
1497         (SQLTransactionStateMachine):
1498         (WebCore::SQLTransactionStateMachine::~SQLTransactionStateMachine):
1499         (WebCore::::SQLTransactionStateMachine):
1500         (WebCore::::setStateToRequestedState):
1501         (WebCore::::runStateMachine):
1502         * Target.pri:
1503         * WebCore.gypi:
1504         * WebCore.vcproj/WebCore.vcproj:
1505         * WebCore.vcxproj/WebCore.vcxproj:
1506         * WebCore.vcxproj/WebCore.vcxproj.filters:
1507         * WebCore.xcodeproj/project.pbxproj:
1508         * inspector/InspectorDatabaseAgent.cpp:
1509
1510 2013-02-14  Jer Noble  <jer.noble@apple.com>
1511
1512         EME: replace MediaKeySession.addKey() -> update()
1513         https://bugs.webkit.org/show_bug.cgi?id=109461
1514
1515         Reviewed by Eric Carlson.
1516
1517         No new tests; updated media/encrypted-media/encrypted-media-v2-syntax.html test.
1518
1519         In the latest draft of the Encrypted Media Spec, the addKeys() method has been replaced
1520         with update().
1521
1522         * Modules/encryptedmedia/CDM.h:
1523         * Modules/encryptedmedia/MediaKeySession.cpp:
1524         (WebCore::MediaKeySession::update):
1525         (WebCore::MediaKeySession::addKeyTimerFired):
1526         * Modules/encryptedmedia/MediaKeySession.h:
1527         * Modules/encryptedmedia/MediaKeySession.idl:
1528         * html/HTMLMediaElement.cpp:
1529         (WebCore::HTMLMediaElement::webkitAddKey):
1530         * testing/MockCDM.cpp:
1531         (WebCore::MockCDMSession::update):
1532
1533 2013-02-14  Tony Chang  <tony@chromium.org>
1534
1535         Unreviewed, set svn:eol-style CRLF for .sln files.
1536
1537         * WebCore.vcproj/WebCore.sln: Modified property svn:eol-style.
1538         * WebCore.vcproj/WebCore.submit.sln: Modified property svn:eol-style.
1539
1540 2013-02-14  Eric Carlson  <eric.carlson@apple.com>
1541
1542         [Mac] adjust caption color user preference calculation
1543         https://bugs.webkit.org/show_bug.cgi?id=109840
1544
1545         Reviewed by Dean Jackson.
1546
1547         No new tests, it isn't possible to test this with DRT.
1548
1549         * page/CaptionUserPreferencesMac.mm:
1550         (WebCore::CaptionUserPreferencesMac::captionsWindowCSS): The color is "important" if either the
1551             color or opacity are supposed to override.
1552         (WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Ditto.
1553         (WebCore::CaptionUserPreferencesMac::captionsTextColor): Ditto.
1554
1555         * WebCore.vcproj/WebCore.sln: Modified property svn:eol-style.
1556         * WebCore.vcproj/WebCore.submit.sln: Modified property svn:eol-style.
1557
1558 2013-02-14  Cosmin Truta  <ctruta@rim.com>
1559
1560         Numeric identifiers of events are not guaranteed to be unique
1561         https://bugs.webkit.org/show_bug.cgi?id=103259
1562
1563         Reviewed by Alexey Proskuryakov.
1564
1565         The results of setTimeout, setInterval and navigator.geolocation.watchPosition
1566         are positive integer values extracted from a simple circular sequential number
1567         generator, whose uniqueness can be guaranteed for no more than 2^31 calls to
1568         any of these functions. In order to provide this guarantee beyond this limit,
1569         we repeatedly ask for the next sequential id until we get one that's not used
1570         already.
1571
1572         This solution works instantly under normal circumstances, when there are few
1573         live timeout ids or geolocation ids at any given moment. Handling millions of
1574         live ids will require another solution.
1575
1576         No new tests. Brief tests of uniqueness already exist.
1577         Moreover, reproducing this particular issue would require 2^31 set/clear
1578         function calls, which is prohibitively expensive.
1579
1580         * Modules/geolocation/Geolocation.cpp:
1581         (WebCore::Geolocation::Watchers::add): Rename from Watchers::set; return false if watch id already exists.
1582         (WebCore::Geolocation::watchPosition): Repeat until the new watch id is unique.
1583         * Modules/geolocation/Geolocation.h:
1584         (Watchers): Rename Watchers::set to Watchers::add.
1585         * Modules/geolocation/Geolocation.idl: Rename the argument of Geolocation::clearWatch to WatchID.
1586         * dom/ScriptExecutionContext.cpp:
1587         (WebCore::ScriptExecutionContext::ScriptExecutionContext): Update initialization.
1588         (WebCore::ScriptExecutionContext::circularSequentialID): Rename from newUniqueID; remove FIXME note.
1589         * dom/ScriptExecutionContext.h:
1590         (ScriptExecutionContext): Rename ScriptExecutionContext::newUniqueID to ScriptExecutionContext::circularSequentialID.
1591         (WebCore::ScriptExecutionContext::addTimeout): Return false (do not assert) if timeout id already exists.
1592         * page/DOMTimer.cpp:
1593         (WebCore::DOMTimer::DOMTimer): Repeat until the new timeout id is unique.
1594
1595 2013-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1596
1597         Unreviewed, rolling out r142825.
1598         http://trac.webkit.org/changeset/142825
1599         https://bugs.webkit.org/show_bug.cgi?id=109856
1600
1601         Causes some inspector tests to time out (Requested by anttik
1602         on #webkit).
1603
1604         * platform/mac/SharedTimerMac.mm:
1605         (WebCore):
1606         (WebCore::PowerObserver::restartSharedTimer):
1607         (WebCore::setSharedTimerFireInterval):
1608         (WebCore::stopSharedTimer):
1609
1610 2013-02-14  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
1611
1612         Support the ch unit from css3-values
1613         https://bugs.webkit.org/show_bug.cgi?id=85755
1614
1615         Reviewed by David Hyatt.
1616
1617         Original patch by Sumedha Widyadharma <sumedha.widyadharma@basyskom.com>.
1618
1619         Test: fast/css/css3-ch-unit.html
1620
1621         * css/CSSCalculationValue.cpp:
1622         (WebCore::unitCategory):
1623         * css/CSSGrammar.y.in:
1624         * css/CSSParser.cpp:
1625         (WebCore::CSSParser::validUnit):
1626         (WebCore::CSSParser::createPrimitiveNumericValue):
1627         (WebCore::CSSParser::parseValidPrimitive):
1628         (WebCore::CSSParser::detectNumberToken):
1629         * css/CSSParserValues.cpp:
1630         (WebCore::CSSParserValue::createCSSValue):
1631         * css/CSSPrimitiveValue.cpp:
1632         (WebCore::isValidCSSUnitTypeForDoubleConversion):
1633         (WebCore::CSSPrimitiveValue::cleanup):
1634         (WebCore::CSSPrimitiveValue::computeLengthDouble):
1635         (WebCore::CSSPrimitiveValue::customCssText):
1636         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
1637         * css/CSSPrimitiveValue.h:
1638         (WebCore::CSSPrimitiveValue::isFontRelativeLength):
1639         (WebCore::CSSPrimitiveValue::isLength):
1640         * platform/graphics/FontMetrics.h:
1641         (WebCore::FontMetrics::FontMetrics):
1642         (WebCore::FontMetrics::zeroWidth):
1643         (WebCore::FontMetrics::setZeroWidth):
1644         (FontMetrics):
1645         (WebCore::FontMetrics::hasZeroWidth):
1646         (WebCore::FontMetrics::setHasZeroWidth):
1647         * platform/graphics/SimpleFontData.cpp:
1648         (WebCore::SimpleFontData::platformGlyphInit):
1649         * platform/graphics/SimpleFontData.h:
1650         (WebCore::SimpleFontData::zeroGlyph):
1651         (WebCore::SimpleFontData::setZeroGlyph):
1652         (SimpleFontData):
1653         * platform/graphics/qt/SimpleFontDataQt.cpp:
1654         (WebCore::SimpleFontData::platformInit):
1655
1656 2013-02-14  David Kilzer  <ddkilzer@apple.com>
1657
1658         [Mac] Clean up WARNING_CFLAGS
1659         <http://webkit.org/b/109747>
1660         <rdar://problem/13208373>
1661
1662         Reviewed by Mark Rowe.
1663
1664         * Configurations/Base.xcconfig: Use
1665         GCC_WARN_64_TO_32_BIT_CONVERSION to enable and disable
1666         -Wshorten-64-to-32 rather than WARNING_CFLAGS.
1667
1668 2013-02-14  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1669
1670         Add addHTTPHeaderField() method to ResourceResponse
1671         https://bugs.webkit.org/show_bug.cgi?id=109844
1672
1673         Reviewed by Adam Barth.
1674
1675         ResourceRequestBase provides both setHTTPHeaderField() and addHTTPHeaderField(). However,
1676         ResourceResponseBase only provides setHTTPHeaderField(). This is a bit inconsistent. As a
1677         result, the addHTTPHeaderField() functionality's implementation is duplicated in several
1678         ports (at least chromium and soup).
1679
1680         This patch introduces addHTTPHeaderField() to ResourceResponseBase and makes use of it
1681         in Chromium and Soup backends.
1682
1683         No new tests, no behavior change.
1684
1685         * platform/chromium/support/WebURLResponse.cpp:
1686         (WebKit::WebURLResponse::addHTTPHeaderField): Use ResourceResponseBase::addHTTPHeaderField().
1687         * platform/network/ResourceResponseBase.cpp:
1688         (WebCore::ResourceResponseBase::updateHeaderParsedState): Move headers' parsed state update code
1689         from setHTTPHeaderField() to a new updateHeaderParsedState() method to avoid code duplication.
1690         (WebCore):
1691         (WebCore::ResourceResponseBase::setHTTPHeaderField):
1692         (WebCore::ResourceResponseBase::addHTTPHeaderField):
1693         * platform/network/ResourceResponseBase.h:
1694         (ResourceResponseBase):
1695         * platform/network/soup/ResourceResponseSoup.cpp:
1696         (WebCore::ResourceResponse::updateFromSoupMessageHeaders): Use ResourceResponseBase::addHTTPHeaderField().
1697
1698 2013-02-14  Philip Rogers  <pdr@google.com>
1699
1700         Prevent inconsistent firstChild during document destruction
1701         https://bugs.webkit.org/show_bug.cgi?id=106530
1702
1703         Reviewed by Abhishek Arya.
1704
1705         During document destruction, addChildNodesToDeletionQueue can allow a container
1706         node to have an invalid first child, causing a crash. This patch updates
1707         addChildNodesToDeletionQueue to maintain a valid value for firstChild() even
1708         while updating its children.
1709
1710         Test: svg/custom/animateMotion-path-change-crash.svg
1711
1712         * dom/ContainerNodeAlgorithms.h:
1713         (WebCore::Private::addChildNodesToDeletionQueue):
1714             To ensure prevoiusSibling() is also valid, this code was slightly refactored
1715             to call setPreviousSibling(0) on the next node instead of the current node.
1716
1717 2013-02-14  Julien Chaffraix  <jchaffraix@webkit.org>
1718
1719         [CSS Grid Layout] Add an internal 2D grid representation to RenderGrid
1720         https://bugs.webkit.org/show_bug.cgi?id=109714
1721
1722         Reviewed by Ojan Vafai.
1723
1724         This change introduces a 2D grid representation of the grid areas. Our implementation
1725         is a straight Vector of Vectors for the grid areas, each grid area able to hold an
1726         arbitrary number of RenderBox* so they hold a Vector of RenderBoxes. As an optimization,
1727         each grid area has enough inline storage to hold one grid item which should cover
1728         most cases.
1729
1730         In order to keep the code readable, a GridIterator was introduced to hide the new grid.
1731
1732         Refactoring, covered by existing tests.
1733
1734         * rendering/RenderGrid.cpp:
1735         (RenderGrid::GridIterator):
1736         (WebCore::RenderGrid::GridIterator::GridIterator):
1737         (WebCore::RenderGrid::GridIterator::nextGridItem):
1738         Added a mono-directional iterator. In order to be more aligned with the rest of the code,
1739         this iterator actually walks orthogonally to the |direction| (ie fixing the |direction|'s track).
1740
1741         * rendering/RenderGrid.cpp:
1742         (WebCore::RenderGrid::computePreferredLogicalWidths):
1743         (WebCore::RenderGrid::layoutGridItems):
1744         Updated these 2 functions to place the items on the grid and clear it at the end.
1745
1746         (WebCore::RenderGrid::computePreferredTrackWidth):
1747         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
1748         Updated to use the GridIterator to walk over the rows / columns.
1749
1750         (WebCore::RenderGrid::placeItemsOnGrid):
1751         Added this function that inserts the grid items into the right grid area.
1752
1753         * rendering/RenderGrid.h:
1754         (WebCore::RenderGrid::gridColumnCount):
1755         (WebCore::RenderGrid::gridRowCount):
1756         Added these helper functions.
1757
1758 2013-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1759
1760         Unreviewed, rolling out r141990.
1761         http://trac.webkit.org/changeset/141990
1762         https://bugs.webkit.org/show_bug.cgi?id=109850
1763
1764         ~5% regression on intl2 page cycler (Requested by kling on
1765         #webkit).
1766
1767         * platform/graphics/GlyphPage.h:
1768         (WebCore::GlyphPage::create):
1769         (WebCore::GlyphPage::glyphDataForCharacter):
1770         (WebCore::GlyphPage::glyphDataForIndex):
1771         (WebCore::GlyphPage::fontDataForCharacter):
1772         (WebCore::GlyphPage::setGlyphDataForIndex):
1773         (GlyphPage):
1774         (WebCore::GlyphPage::copyFrom):
1775         (WebCore::GlyphPage::clear):
1776         (WebCore::GlyphPage::clearForFontData):
1777         (WebCore::GlyphPage::GlyphPage):
1778         * platform/graphics/GlyphPageTreeNode.cpp:
1779         (WebCore::GlyphPageTreeNode::initializePage):
1780         * rendering/svg/SVGTextRunRenderingContext.cpp:
1781         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
1782
1783 2013-02-14  Mark Pilgrim  <pilgrim@chromium.org>
1784
1785         [Chromium] Move PlatformMessagePortChannel to WebCore
1786         https://bugs.webkit.org/show_bug.cgi?id=109845
1787
1788         Reviewed by Adam Barth.
1789
1790         Part of a larger refactoring series; see tracking bug 106829.
1791
1792         * WebCore.gyp/WebCore.gyp:
1793         * WebCore.gypi:
1794         * dom/default/chromium: Added.
1795         * dom/default/chromium/PlatformMessagePortChannelChromium.cpp: Added.
1796         (WebCore):
1797         (WebCore::MessagePortChannel::create):
1798         (WebCore::MessagePortChannel::createChannel):
1799         (WebCore::MessagePortChannel::MessagePortChannel):
1800         (WebCore::MessagePortChannel::~MessagePortChannel):
1801         (WebCore::MessagePortChannel::entangleIfOpen):
1802         (WebCore::MessagePortChannel::disentangle):
1803         (WebCore::MessagePortChannel::postMessageToRemote):
1804         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
1805         (WebCore::MessagePortChannel::close):
1806         (WebCore::MessagePortChannel::isConnectedTo):
1807         (WebCore::MessagePortChannel::hasPendingActivity):
1808         (WebCore::MessagePortChannel::locallyEntangledPort):
1809         (WebCore::PlatformMessagePortChannel::create):
1810         (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
1811         (WebCore::PlatformMessagePortChannel::~PlatformMessagePortChannel):
1812         (WebCore::PlatformMessagePortChannel::createChannel):
1813         (WebCore::PlatformMessagePortChannel::messageAvailable):
1814         (WebCore::PlatformMessagePortChannel::entangleIfOpen):
1815         (WebCore::PlatformMessagePortChannel::disentangle):
1816         (WebCore::PlatformMessagePortChannel::postMessageToRemote):
1817         (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
1818         (WebCore::PlatformMessagePortChannel::close):
1819         (WebCore::PlatformMessagePortChannel::isConnectedTo):
1820         (WebCore::PlatformMessagePortChannel::hasPendingActivity):
1821         (WebCore::PlatformMessagePortChannel::setEntangledChannel):
1822         (WebCore::PlatformMessagePortChannel::webChannelRelease):
1823         * dom/default/chromium/PlatformMessagePortChannelChromium.h: Added.
1824         (WebKit):
1825         (WebCore):
1826         (PlatformMessagePortChannel):
1827
1828 2013-02-14  Chris Fleizach  <cfleizach@apple.com>
1829
1830         Remove Leopard Accessibility support from WebCore (now that no port builds on Leopard)
1831         https://bugs.webkit.org/show_bug.cgi?id=90250
1832
1833         Reviewed by Eric Seidel.
1834
1835         The Leopard era checks for accessibility lists and accessibility tables can be removed now.
1836
1837         * accessibility/AccessibilityARIAGrid.cpp:
1838         (WebCore):
1839         * accessibility/AccessibilityARIAGrid.h:
1840         (AccessibilityARIAGrid):
1841         (WebCore::AccessibilityARIAGrid::isTableExposableThroughAccessibility):
1842         * accessibility/AccessibilityList.cpp:
1843         (WebCore::AccessibilityList::computeAccessibilityIsIgnored):
1844         * accessibility/AccessibilityList.h:
1845         * accessibility/AccessibilityTable.cpp:
1846         (WebCore::AccessibilityTable::AccessibilityTable):
1847         (WebCore::AccessibilityTable::init):
1848         * accessibility/AccessibilityTable.h:
1849         (AccessibilityTable):
1850         * accessibility/mac/AXObjectCacheMac.mm:
1851         (WebCore::AXObjectCache::postPlatformNotification):
1852         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
1853         (createAccessibilityRoleMap):
1854
1855 2013-02-14  Bear Travis  <betravis@adobe.com>
1856
1857         Make outside-shape the default value for shape-inside
1858         https://bugs.webkit.org/show_bug.cgi?id=109605
1859
1860         Reviewed by Levi Weintraub.
1861
1862         Creating a single reference outside-shape value and setting it as the default
1863         for shape-inside.
1864
1865         Existing tests cover the default value, just updating them to use outside-shape.
1866
1867         * rendering/style/RenderStyle.cpp:
1868         (WebCore::RenderStyle::initialShapeInside): Define a local static outside-shape
1869         value.
1870         (WebCore):
1871         * rendering/style/RenderStyle.h: Move the initialShapeInside method to the .cpp
1872         file.
1873
1874 2013-02-14  Min Qin  <qinmin@chromium.org>
1875
1876         Passing alpha to DeferredImageDecoder once decoding completes
1877         https://bugs.webkit.org/show_bug.cgi?id=108892
1878
1879         Reviewed by Stephen White.
1880
1881         We should pass hasAlpha value back to the DeferredImageDecoder once decoding is completed
1882         Added unit tests in ImageFrameGeneratorTest.
1883
1884         * platform/graphics/chromium/DeferredImageDecoder.cpp:
1885         (WebCore::DeferredImageDecoder::frameHasAlphaAtIndex):
1886         * platform/graphics/chromium/ImageFrameGenerator.cpp:
1887         (WebCore::ImageFrameGenerator::tryToScale):
1888         (WebCore::ImageFrameGenerator::decode):
1889         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
1890         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
1891         (WebCore::LazyDecodingPixelRef::onUnlockPixels):
1892         * platform/graphics/chromium/LazyDecodingPixelRef.h:
1893         (WebCore::LazyDecodingPixelRef::hasAlpha):
1894         (LazyDecodingPixelRef):
1895         * platform/graphics/chromium/ScaledImageFragment.cpp:
1896         (WebCore::ScaledImageFragment::ScaledImageFragment):
1897         * platform/graphics/chromium/ScaledImageFragment.h:
1898         (WebCore::ScaledImageFragment::create):
1899         (ScaledImageFragment):
1900         (WebCore::ScaledImageFragment::hasAlpha):
1901
1902 2013-02-14  David Grogan  <dgrogan@chromium.org>
1903
1904         IndexedDB: Add a few more histogram calls
1905         https://bugs.webkit.org/show_bug.cgi?id=109762
1906
1907         Reviewed by Tony Chang.
1908
1909         A few places where commits could fail weren't being logged.
1910
1911         * Modules/indexeddb/IDBBackingStore.cpp:
1912         (WebCore::IDBBackingStore::deleteDatabase):
1913         (WebCore::IDBBackingStore::Transaction::commit):
1914
1915 2013-02-14  Tony Chang  <tony@chromium.org>
1916
1917         Padding and border changes doesn't trigger relayout of children
1918         https://bugs.webkit.org/show_bug.cgi?id=109639
1919
1920         Reviewed by Kent Tamura.
1921
1922         In RenderBlock::layoutBlock, we only relayout our children if our logical width
1923         changes. This misses cases where our logical width doesn't change (i.e., padding
1924         or border changes), but our content width does change.
1925
1926         This is a more general case of bug 104997.
1927
1928         Test: fast/block/dynamic-padding-border.html
1929
1930         * rendering/RenderBox.cpp:
1931         (WebCore::borderOrPaddingLogicalWidthChanged): Only check if the logical width changed.
1932         (WebCore::RenderBox::styleDidChange): Drop the border-box condition since this can happen
1933         even without border-box box sizing.
1934
1935 2013-02-14  Peter Rybin  <prybin@chromium.org>
1936
1937         Web Inspector: fix closure compilation warnings caused by setVariableValue change
1938         https://bugs.webkit.org/show_bug.cgi?id=109488
1939
1940         Reviewed by Pavel Feldman.
1941
1942         Annotations are fixed as required by closure compiler.
1943         Parameters in Inspector.json are reordered as required.
1944
1945         * inspector/InjectedScriptExterns.js:
1946         (InjectedScriptHost.prototype.setFunctionVariableValue):
1947         (JavaScriptCallFrame.prototype.setVariableValue):
1948         * inspector/InjectedScriptSource.js:
1949         (.):
1950         * inspector/Inspector.json:
1951         * inspector/InspectorDebuggerAgent.cpp:
1952         (WebCore::InspectorDebuggerAgent::setVariableValue):
1953         * inspector/InspectorDebuggerAgent.h:
1954         (InspectorDebuggerAgent):
1955
1956 2013-02-14  Tommy Widenflycht  <tommyw@google.com>
1957
1958         MediaStream API: RTCDataChannel triggers a use-after-free
1959         https://bugs.webkit.org/show_bug.cgi?id=109806
1960
1961         Reviewed by Adam Barth.
1962
1963         Making sure RTCPeerConnection::stop() is always called at least once.
1964         Also making sure that RTCDataChannels state gets set to Closed correctly.
1965
1966         Hard to test in WebKit but covered by Chromium tests.
1967
1968         * Modules/mediastream/RTCDataChannel.cpp:
1969         (WebCore::RTCDataChannel::stop):
1970         * Modules/mediastream/RTCPeerConnection.cpp:
1971         (WebCore::RTCPeerConnection::~RTCPeerConnection):
1972         (WebCore::RTCPeerConnection::stop):
1973
1974 2013-02-14  Vsevolod Vlasov  <vsevik@chromium.org>
1975
1976         Web Inspector: [Regression] When several consecutive characters are typed each of them is marked as undoable state.
1977         https://bugs.webkit.org/show_bug.cgi?id=109823
1978
1979         Reviewed by Pavel Feldman.
1980
1981         * inspector/front-end/TextEditorModel.js:
1982         (WebInspector.TextEditorModel.endsWithBracketRegex.):
1983
1984 2013-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1985
1986         Unreviewed, rolling out r142820.
1987         http://trac.webkit.org/changeset/142820
1988         https://bugs.webkit.org/show_bug.cgi?id=109839
1989
1990         Causing crashes on chromium canaries (Requested by atwilson_
1991         on #webkit).
1992
1993         * dom/Document.cpp:
1994         (WebCore::Document::updateLayout):
1995         (WebCore::Document::implicitClose):
1996         * rendering/RenderQuote.h:
1997         (RenderQuote):
1998         * rendering/RenderView.cpp:
1999         * rendering/RenderView.h:
2000
2001 2013-02-14  Mario Sanchez Prada  <mario.prada@samsung.com>
2002
2003         [GTK] Missing call to g_object_ref while retrieving accessible table cells
2004         https://bugs.webkit.org/show_bug.cgi?id=106903
2005
2006         Reviewed by Martin Robinson.
2007
2008         Add missing extra ref to implementation of atk_table_ref_at().
2009
2010         Test: accessibility/table-cell-for-column-and-row-crash.html
2011
2012         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
2013         (webkitAccessibleTableRefAt): This method transfers full ownership
2014         over the returned AtkObject, so an extra reference is needed here.
2015
2016 2013-02-14  Mike Fenton  <mifenton@rim.com>
2017
2018         [BlackBerry] Update keyboard event details to match platform details.
2019         https://bugs.webkit.org/show_bug.cgi?id=109693
2020
2021         Reviewed by Yong Li.
2022
2023         PR 220170.
2024
2025         Update the keyboard event details to match the
2026         platform details available.
2027
2028         Rename helper function to better describe the conversion.
2029
2030         Reviewed Internally by Nima Ghanavatian and Gen Mak.
2031
2032         * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
2033         (WebCore::windowsKeyCodeForBlackBerryKeycode):
2034         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2035
2036 2013-02-08  Andrey Kosyakov  <caseq@chromium.org>
2037
2038         Web Inspector: expose did{Begin,Cancel}Frame() and {will,did}Composite() on WebDebToolsAgent
2039         https://bugs.webkit.org/show_bug.cgi?id=109192
2040
2041         Reviewed by Pavel Feldman.
2042
2043         - remove frame and compositing instrumentation methods from InspectorInstrumentation;
2044         - expose those methods on InspectorController instead.
2045
2046         * WebCore.exp.in:
2047         * inspector/InspectorController.cpp:
2048         (WebCore::InspectorController::didBeginFrame):
2049         (WebCore):
2050         (WebCore::InspectorController::didCancelFrame):
2051         (WebCore::InspectorController::willComposite):
2052         (WebCore::InspectorController::didComposite):
2053         * inspector/InspectorController.h:
2054         (InspectorController):
2055         * inspector/InspectorInstrumentation.cpp:
2056         (WebCore):
2057         * inspector/InspectorInstrumentation.h:
2058         (InspectorInstrumentation):
2059         * testing/Internals.cpp:
2060         (WebCore::Internals::emitInspectorDidBeginFrame):
2061         (WebCore::Internals::emitInspectorDidCancelFrame):
2062
2063 2013-02-14  Vladislav Kaznacheev  <kaznacheev@chromium.org>
2064
2065         Web Inspector: Fixed a layout regression in CanvasProfileView.
2066         https://bugs.webkit.org/show_bug.cgi?id=109835
2067
2068         Reviewed by Pavel Feldman.
2069
2070         Changed splitView.css to supported nested SplitView instances.
2071
2072         * inspector/front-end/splitView.css:
2073         (.split-view-vertical > .split-view-contents):
2074         (.split-view-vertical > .split-view-contents-first):
2075         (.split-view-vertical > .split-view-contents-first.maximized):
2076         (.split-view-vertical > .split-view-contents-second):
2077         (.split-view-vertical > .split-view-contents-second.maximized):
2078         (.split-view-horizontal > .split-view-contents):
2079         (.split-view-horizontal > .split-view-contents-first):
2080         (.split-view-horizontal > .split-view-contents-first.maximized):
2081         (.split-view-horizontal > .split-view-contents-second):
2082         (.split-view-horizontal > .split-view-contents-second.maximized):
2083         (.split-view-vertical > .split-view-sidebar.split-view-contents-first:not(.maximized)):
2084         (.split-view-vertical > .split-view-sidebar.split-view-contents-second:not(.maximized)):
2085         (.split-view-horizontal > .split-view-sidebar.split-view-contents-first:not(.maximized)):
2086         (.split-view-horizontal > .split-view-sidebar.split-view-contents-second:not(.maximized)):
2087         (.split-view-vertical > .split-view-resizer):
2088         (.split-view-horizontal > .split-view-resizer):
2089
2090 2013-02-14  Vladislav Kaznacheev  <kaznacheev@chromium.org>
2091
2092         Web Inspector: Color picker should not be available in Computed Styles pane.
2093         https://bugs.webkit.org/show_bug.cgi?id=109697
2094
2095         Reviewed by Alexander Pavlov.
2096
2097         Changed the parentPane parameter of WebInspector.ComputedStylePropertiesSection to the correct value
2098         (the ComputedStyleSidebarPane instance).
2099
2100         * inspector/front-end/StylesSidebarPane.js:
2101         (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules):
2102
2103 2013-02-14  Yury Semikhatsky  <yurys@chromium.org>
2104
2105         Web Inspector: don't create static local string for program literal in InspectorTimelineAgent
2106         https://bugs.webkit.org/show_bug.cgi?id=109811
2107
2108         Reviewed by Pavel Feldman.
2109
2110         Use const char* constant value instead of creating String from it in thread-unsafe
2111         static local variable.
2112
2113         * inspector/InspectorTimelineAgent.cpp:
2114         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
2115
2116 2013-02-14  Pan Deng  <pan.deng@intel.com>
2117
2118         [Web Inspector] Fix initiator name issue in reload scenario for Network Panel.
2119         https://bugs.webkit.org/show_bug.cgi?id=108746.
2120
2121         Reviewed by Vsevolod Vlasov.
2122
2123         WebInspector.displayNameForURL() does not work as expected in the reload scenario,
2124         for example, "http://www.yahoo.com/" was trimed to "/" at one time, but at another,
2125         the full host name will be displayed.
2126         This fix return host + "/" in the issue scenario, and keep with get displayName() in ParsedURL.
2127
2128         No new tests.
2129
2130         * inspector/front-end/ParsedURL.js:
2131         (WebInspector.ParsedURL.prototype.get displayName): append "/" in the display host scenario.
2132         * inspector/front-end/ResourceUtils.js:
2133         (WebInspector.displayNameForURL): add host in the head if url trimed as a "/".
2134
2135 2013-02-14  Alexei Filippov  <alph@chromium.org>
2136
2137         Web Inspector: fix to record button remaining red after heap snapshot is taken
2138         https://bugs.webkit.org/show_bug.cgi?id=109804
2139
2140         Reviewed by Yury Semikhatsky.
2141
2142         Revert part of r142243 fix. Namely heap snapshot taking button made
2143         stateless as it was before.
2144
2145         * inspector/front-end/HeapSnapshotView.js:
2146         (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
2147         * inspector/front-end/ProfilesPanel.js:
2148         (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
2149
2150 2013-02-14  Alexander Pavlov  <apavlov@chromium.org>
2151
2152         Web Inspector: Consistently use SecurityOrigin::toRawString() for serialization across the backend code
2153         https://bugs.webkit.org/show_bug.cgi?id=109801
2154
2155         Reviewed by Yury Semikhatsky.
2156
2157         No new tests, as existing tests cover the change.
2158
2159         * inspector/InspectorAgent.cpp:
2160         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
2161         * inspector/InspectorIndexedDBAgent.cpp:
2162         (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
2163         * inspector/InspectorPageAgent.cpp:
2164         (WebCore::InspectorPageAgent::buildObjectForFrame):
2165         * inspector/PageRuntimeAgent.cpp:
2166         (WebCore::PageRuntimeAgent::notifyContextCreated):
2167
2168 2013-02-14  Sergio Villar Senin  <svillar@igalia.com>
2169
2170         Add logging support to IndexedDB for non-Chromium platforms
2171         https://bugs.webkit.org/show_bug.cgi?id=109809
2172
2173         Reviewed by Kentaro Hara.
2174
2175         Enable logging of IndexedDB through the StorageAPI log channel for
2176         non-Chromium architectures.
2177
2178         No new tests required, we're just enabling logging for IndexedDB
2179         using the currently available logging framework.
2180
2181         * Modules/indexeddb/IDBTracing.h:
2182
2183 2013-02-14  Vsevolod Vlasov  <vsevik@chromium.org>
2184
2185         Web Inspector: Remove uriForFile and fileForURI methods from FileSystemMapping.
2186         https://bugs.webkit.org/show_bug.cgi?id=109704
2187
2188         Reviewed by Alexander Pavlov.
2189
2190         Replaced this methods with one line implementation on the only call site.
2191
2192         * inspector/front-end/FileSystemMapping.js:
2193         * inspector/front-end/FileSystemProjectDelegate.js:
2194         (WebInspector.FileSystemProjectDelegate.prototype._filePathForURI):
2195         (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
2196         (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
2197         (WebInspector.FileSystemProjectDelegate.prototype._populate):
2198
2199 2013-02-14  Anton Vayvod  <avayvod@chromium.org>
2200
2201         [Text Autosizing] Process narrow descendants with the same multiplier for the font size.
2202         https://bugs.webkit.org/show_bug.cgi?id=109573
2203
2204         Reviewed by Julien Chaffraix.
2205
2206         Combine narrow descendants of the same autosizing cluster into a group that is autosized
2207         with the same multiplier.
2208
2209         For example, on sites with a sidebar, sometimes the paragraphs next to the sidebar will have
2210         a large margin individually applied (via a CSS selector), causing them all to individually
2211         appear narrower than their enclosing blockContainingAllText. Rather than making each of
2212         these paragraphs into a separate cluster, we want them all to share the same multiplier, as
2213         if they were a single cluster.
2214
2215         Test: fast/text-autosizing/narrow-descendants-combined.html
2216
2217         * rendering/TextAutosizer.cpp:
2218         (WebCore::TextAutosizer::processClusterInternal):
2219
2220             Common implementation for processCluster() and processCompositeCluster that accepts the
2221             text width and whether the cluster should be autosized as parameters instead of
2222             calculating it inline.
2223
2224         (WebCore::TextAutosizer::processCluster):
2225
2226             Calculates the text width for a single cluster and whether it should be autosized, then
2227             calls processClusterInternal() to apply the multiplier and process the cluster's
2228             descendants.
2229
2230         (WebCore::TextAutosizer::processCompositeCluster):
2231
2232             Calculates the text width for a group of renderers and if the group should be autosized,
2233             then calls processClusterInternal() repeatedly with the same multiplier to apply it and
2234             process all the descendants of the group.
2235
2236         (WebCore::TextAutosizer::clusterShouldBeAutosized):
2237
2238             Calls the multiple renderers version to avoid code duplication.
2239
2240         (WebCore::TextAutosizer::compositeClusterShouldBeAutosized):
2241
2242             The multiple renderers version of clusterShouldBeAutosized.
2243
2244         * rendering/TextAutosizer.h:
2245
2246             Updated method declarations.
2247
2248 2013-02-14  Andrey Adaikin  <aandrey@chromium.org>
2249
2250         Look into possibilities of typedef in webkit idl files
2251         https://bugs.webkit.org/show_bug.cgi?id=52340
2252
2253         Reviewed by Kentaro Hara.
2254
2255         Add typedef support for WebKit IDL parser.
2256         Drive by: fixed a bug of generating "unrestrictedfloat" without a space.
2257
2258         Added a new IDL test TestTypedefs.idl. The results were generated without typedefs.
2259
2260         * bindings/scripts/IDLParser.pm:
2261         (assertNoExtendedAttributesInTypedef):
2262         (parseDefinitions):
2263         (applyTypedefs):
2264         (applyTypedefsForSignature):
2265         (parseTypedef):
2266         (parseUnrestrictedFloatType):
2267         * bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp: Added.
2268         (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate::WebDOMTestTypedefsPrivate):
2269         (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate):
2270         (WebDOMTestTypedefs::WebDOMTestTypedefs):
2271         (WebDOMTestTypedefs::operator=):
2272         (WebDOMTestTypedefs::impl):
2273         (WebDOMTestTypedefs::~WebDOMTestTypedefs):
2274         (WebDOMTestTypedefs::unsignedLongLongAttr):
2275         (WebDOMTestTypedefs::setUnsignedLongLongAttr):
2276         (WebDOMTestTypedefs::immutableSerializedScriptValue):
2277         (WebDOMTestTypedefs::setImmutableSerializedScriptValue):
2278         (WebDOMTestTypedefs::func):
2279         (WebDOMTestTypedefs::multiTransferList):
2280         (WebDOMTestTypedefs::setShadow):
2281         (WebDOMTestTypedefs::nullableArrayArg):
2282         (WebDOMTestTypedefs::immutablePointFunction):
2283         (toWebCore):
2284         (toWebKit):
2285         * bindings/scripts/test/CPP/WebDOMTestTypedefs.h: Added.
2286         (WebCore):
2287         (WebDOMTestTypedefs):
2288         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp: Added.
2289         (_WebKitDOMTestTypedefsPrivate):
2290         (WebKit):
2291         (WebKit::kit):
2292         (WebKit::core):
2293         (WebKit::wrapTestTypedefs):
2294         (webkit_dom_test_typedefs_finalize):
2295         (webkit_dom_test_typedefs_set_property):
2296         (webkit_dom_test_typedefs_get_property):
2297         (webkit_dom_test_typedefs_constructor):
2298         (webkit_dom_test_typedefs_class_init):
2299         (webkit_dom_test_typedefs_init):
2300         (webkit_dom_test_typedefs_func):
2301         (webkit_dom_test_typedefs_multi_transfer_list):
2302         (webkit_dom_test_typedefs_set_shadow):
2303         (webkit_dom_test_typedefs_nullable_array_arg):
2304         (webkit_dom_test_typedefs_immutable_point_function):
2305         (webkit_dom_test_typedefs_string_array_function):
2306         (webkit_dom_test_typedefs_get_unsigned_long_long_attr):
2307         (webkit_dom_test_typedefs_set_unsigned_long_long_attr):
2308         (webkit_dom_test_typedefs_get_immutable_serialized_script_value):
2309         (webkit_dom_test_typedefs_set_immutable_serialized_script_value):
2310         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h: Added.
2311         (_WebKitDOMTestTypedefs):
2312         (_WebKitDOMTestTypedefsClass):
2313         * bindings/scripts/test/GObject/WebKitDOMTestTypedefsPrivate.h: Added.
2314         (WebKit):
2315         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Added.
2316         (WebCore):
2317         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
2318         (WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
2319         (WebCore::JSTestTypedefsConstructor::finishCreation):
2320         (WebCore::JSTestTypedefsConstructor::getOwnPropertySlot):
2321         (WebCore::JSTestTypedefsConstructor::getOwnPropertyDescriptor):
2322         (WebCore::JSTestTypedefsConstructor::getConstructData):
2323         (WebCore::JSTestTypedefsPrototype::self):
2324         (WebCore::JSTestTypedefsPrototype::getOwnPropertySlot):
2325         (WebCore::JSTestTypedefsPrototype::getOwnPropertyDescriptor):
2326         (WebCore::JSTestTypedefs::JSTestTypedefs):
2327         (WebCore::JSTestTypedefs::finishCreation):
2328         (WebCore::JSTestTypedefs::createPrototype):
2329         (WebCore::JSTestTypedefs::destroy):
2330         (WebCore::JSTestTypedefs::~JSTestTypedefs):
2331         (WebCore::JSTestTypedefs::getOwnPropertySlot):
2332         (WebCore::JSTestTypedefs::getOwnPropertyDescriptor):
2333         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
2334         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
2335         (WebCore::jsTestTypedefsConstructorTestSubObj):
2336         (WebCore::jsTestTypedefsConstructor):
2337         (WebCore::JSTestTypedefs::put):
2338         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
2339         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
2340         (WebCore::JSTestTypedefs::getConstructor):
2341         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
2342         (WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList):
2343         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
2344         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
2345         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
2346         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
2347         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
2348         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
2349         (WebCore::isObservable):
2350         (WebCore::JSTestTypedefsOwner::isReachableFromOpaqueRoots):
2351         (WebCore::JSTestTypedefsOwner::finalize):
2352         (WebCore::toJS):
2353         (WebCore::toTestTypedefs):
2354         * bindings/scripts/test/JS/JSTestTypedefs.h: Added.
2355         (WebCore):
2356         (JSTestTypedefs):
2357         (WebCore::JSTestTypedefs::create):
2358         (WebCore::JSTestTypedefs::createStructure):
2359         (WebCore::JSTestTypedefs::impl):
2360         (WebCore::JSTestTypedefs::releaseImpl):
2361         (WebCore::JSTestTypedefs::releaseImplIfNotNull):
2362         (JSTestTypedefsOwner):
2363         (WebCore::wrapperOwner):
2364         (WebCore::wrapperContext):
2365         (JSTestTypedefsPrototype):
2366         (WebCore::JSTestTypedefsPrototype::create):
2367         (WebCore::JSTestTypedefsPrototype::createStructure):
2368         (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
2369         (JSTestTypedefsConstructor):
2370         (WebCore::JSTestTypedefsConstructor::create):
2371         (WebCore::JSTestTypedefsConstructor::createStructure):
2372         * bindings/scripts/test/ObjC/DOMTestTypedefs.h: Added.
2373         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm: Added.
2374         (-[DOMTestTypedefs dealloc]):
2375         (-[DOMTestTypedefs finalize]):
2376         (-[DOMTestTypedefs unsignedLongLongAttr]):
2377         (-[DOMTestTypedefs setUnsignedLongLongAttr:]):
2378         (-[DOMTestTypedefs immutableSerializedScriptValue]):
2379         (-[DOMTestTypedefs setImmutableSerializedScriptValue:]):
2380         (-[DOMTestTypedefs multiTransferList:tx:second:txx:]):
2381         (-[DOMTestTypedefs setShadow:height:blur:color:alpha:]):
2382         (-[DOMTestTypedefs immutablePointFunction]):
2383         (core):
2384         (kit):
2385         * bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h: Added.
2386         (WebCore):
2387         * bindings/scripts/test/TestTypedefs.idl: Added.
2388         * bindings/scripts/test/V8/V8TestTypedefs.cpp: Added.
2389         (WebCore):
2390         (WebCore::checkTypeOrDieTrying):
2391         (TestTypedefsV8Internal):
2392         (WebCore::TestTypedefsV8Internal::V8_USE):
2393         (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrGetter):
2394         (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrSetter):
2395         (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrGetter):
2396         (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetter):
2397         (WebCore::TestTypedefsV8Internal::TestTypedefsConstructorGetter):
2398         (WebCore::TestTypedefsV8Internal::TestTypedefsReplaceableAttrSetter):
2399         (WebCore::TestTypedefsV8Internal::funcCallback):
2400         (WebCore::TestTypedefsV8Internal::multiTransferListCallback):
2401         (WebCore::TestTypedefsV8Internal::setShadowCallback):
2402         (WebCore::TestTypedefsV8Internal::methodWithSequenceArgCallback):
2403         (WebCore::TestTypedefsV8Internal::nullableArrayArgCallback):
2404         (WebCore::TestTypedefsV8Internal::funcWithClampCallback):
2405         (WebCore::TestTypedefsV8Internal::immutablePointFunctionCallback):
2406         (WebCore::TestTypedefsV8Internal::stringArrayFunctionCallback):
2407         (WebCore::V8TestTypedefs::constructorCallback):
2408         (WebCore::ConfigureV8TestTypedefsTemplate):
2409         (WebCore::V8TestTypedefs::GetRawTemplate):
2410         (WebCore::V8TestTypedefs::GetTemplate):
2411         (WebCore::V8TestTypedefs::HasInstance):
2412         (WebCore::V8TestTypedefs::createWrapper):
2413         (WebCore::V8TestTypedefs::derefObject):
2414         * bindings/scripts/test/V8/V8TestTypedefs.h: Added.
2415         (WebCore):
2416         (V8TestTypedefs):
2417         (WebCore::V8TestTypedefs::toNative):
2418         (WebCore::V8TestTypedefs::installPerContextProperties):
2419         (WebCore::V8TestTypedefs::installPerContextPrototypeProperties):
2420         (WebCore::wrap):
2421         (WebCore::toV8):
2422         (WebCore::toV8Fast):
2423
2424 2013-02-13  Kentaro Hara  <haraken@chromium.org>
2425
2426         [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(),
2427         and XXXAccessorSetter() to XXXAttrSetterCustom()
2428         https://bugs.webkit.org/show_bug.cgi?id=109679
2429
2430         Reviewed by Adam Barth.
2431
2432         For naming consistency and clarification.
2433
2434         No tests. No change in behavior.
2435
2436         * bindings/scripts/CodeGeneratorV8.pm:
2437         (GenerateHeader):
2438         (GenerateHeaderCustomCall):
2439         (GenerateNormalAttrGetter):
2440         (GenerateNormalAttrSetter):
2441         (GenerateImplementation):
2442         * bindings/scripts/test/V8/V8TestInterface.cpp:
2443         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
2444         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
2445         * bindings/scripts/test/V8/V8TestObj.cpp:
2446         (WebCore::TestObjV8Internal::customAttrAttrGetter):
2447         (WebCore::TestObjV8Internal::customAttrAttrSetter):
2448         * bindings/scripts/test/V8/V8TestObj.h:
2449         (V8TestObj):
2450         * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
2451         (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom):
2452         * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp:
2453         (WebCore::V8BiquadFilterNode::typeAttrSetterCustom):
2454         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
2455         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrGetterCustom):
2456         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrSetterCustom):
2457         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrGetterCustom):
2458         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrSetterCustom):
2459         * bindings/v8/custom/V8ClipboardCustom.cpp:
2460         (WebCore::V8Clipboard::typesAttrGetterCustom):
2461         * bindings/v8/custom/V8CoordinatesCustom.cpp:
2462         (WebCore::V8Coordinates::altitudeAttrGetterCustom):
2463         (WebCore::V8Coordinates::altitudeAccuracyAttrGetterCustom):
2464         (WebCore::V8Coordinates::headingAttrGetterCustom):
2465         (WebCore::V8Coordinates::speedAttrGetterCustom):
2466         * bindings/v8/custom/V8CustomEventCustom.cpp:
2467         (WebCore::V8CustomEvent::detailAttrGetterCustom):
2468         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2469         (WebCore::V8DOMWindow::eventAttrGetterCustom):
2470         (WebCore::V8DOMWindow::eventAttrSetterCustom):
2471         (WebCore::V8DOMWindow::locationAttrSetterCustom):
2472         (WebCore::V8DOMWindow::openerAttrSetterCustom):
2473         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
2474         (WebCore::V8DeviceMotionEvent::accelerationAttrGetterCustom):
2475         (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAttrGetterCustom):
2476         (WebCore::V8DeviceMotionEvent::rotationRateAttrGetterCustom):
2477         (WebCore::V8DeviceMotionEvent::intervalAttrGetterCustom):
2478         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
2479         (WebCore::V8DeviceOrientationEvent::alphaAttrGetterCustom):
2480         (WebCore::V8DeviceOrientationEvent::betaAttrGetterCustom):
2481         (WebCore::V8DeviceOrientationEvent::gammaAttrGetterCustom):
2482         (WebCore::V8DeviceOrientationEvent::absoluteAttrGetterCustom):
2483         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
2484         (WebCore::V8Document::locationAttrGetterCustom):
2485         (WebCore::V8Document::locationAttrSetterCustom):
2486         * bindings/v8/custom/V8EventCustom.cpp:
2487         (WebCore::V8Event::dataTransferAttrGetterCustom):
2488         (WebCore::V8Event::clipboardDataAttrGetterCustom):
2489         * bindings/v8/custom/V8FileReaderCustom.cpp:
2490         (WebCore::V8FileReader::resultAttrGetterCustom):
2491         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2492         (WebCore::V8HTMLDocument::allAttrSetterCustom):
2493         * bindings/v8/custom/V8HTMLElementCustom.cpp:
2494         (WebCore::V8HTMLElement::itemValueAttrGetterCustom):
2495         (WebCore::V8HTMLElement::itemValueAttrSetterCustom):
2496         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
2497         (WebCore::V8HTMLFrameElement::locationAttrSetterCustom):
2498         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
2499         (WebCore::V8HTMLInputElement::selectionStartAttrGetterCustom):
2500         (WebCore::V8HTMLInputElement::selectionStartAttrSetterCustom):
2501         (WebCore::V8HTMLInputElement::selectionEndAttrGetterCustom):
2502         (WebCore::V8HTMLInputElement::selectionEndAttrSetterCustom):
2503         (WebCore::V8HTMLInputElement::selectionDirectionAttrGetterCustom):
2504         (WebCore::V8HTMLInputElement::selectionDirectionAttrSetterCustom):
2505         * bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
2506         (WebCore::V8HTMLLinkElement::sizesAttrGetterCustom):
2507         (WebCore::V8HTMLLinkElement::sizesAttrSetterCustom):
2508         * bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
2509         (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom):
2510         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2511         (WebCore::V8HTMLOptionsCollection::lengthAttrSetterCustom):
2512         * bindings/v8/custom/V8HistoryCustom.cpp:
2513         (WebCore::V8History::stateAttrGetterCustom):
2514         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
2515         (WebCore::V8JavaScriptCallFrame::scopeChainAttrGetterCustom):
2516         (WebCore::V8JavaScriptCallFrame::thisObjectAttrGetterCustom):
2517         (WebCore::V8JavaScriptCallFrame::typeAttrGetterCustom):
2518         * bindings/v8/custom/V8LocationCustom.cpp:
2519         (WebCore::V8Location::hashAttrSetterCustom):
2520         (WebCore::V8Location::hostAttrSetterCustom):
2521         (WebCore::V8Location::hostnameAttrSetterCustom):
2522         (WebCore::V8Location::hrefAttrSetterCustom):
2523         (WebCore::V8Location::pathnameAttrSetterCustom):
2524         (WebCore::V8Location::portAttrSetterCustom):
2525         (WebCore::V8Location::protocolAttrSetterCustom):
2526         (WebCore::V8Location::searchAttrSetterCustom):
2527         (WebCore::V8Location::reloadAttrGetterCustom):
2528         (WebCore::V8Location::replaceAttrGetterCustom):
2529         (WebCore::V8Location::assignAttrGetterCustom):
2530         * bindings/v8/custom/V8MessageEventCustom.cpp:
2531         (WebCore::V8MessageEvent::dataAttrGetterCustom):
2532         (WebCore::V8MessageEvent::portsAttrGetterCustom):
2533         * bindings/v8/custom/V8OscillatorNodeCustom.cpp:
2534         (WebCore::V8OscillatorNode::typeAttrSetterCustom):
2535         * bindings/v8/custom/V8PannerNodeCustom.cpp:
2536         (WebCore::V8PannerNode::panningModelAttrSetterCustom):
2537         (WebCore::V8PannerNode::distanceModelAttrSetterCustom):
2538         * bindings/v8/custom/V8PopStateEventCustom.cpp:
2539         (WebCore::V8PopStateEvent::stateAttrGetterCustom):
2540         * bindings/v8/custom/V8SVGLengthCustom.cpp:
2541         (WebCore::V8SVGLength::valueAttrGetterCustom):
2542         (WebCore::V8SVGLength::valueAttrSetterCustom):
2543         * bindings/v8/custom/V8TrackEventCustom.cpp:
2544         (WebCore::V8TrackEvent::trackAttrGetterCustom):
2545         * bindings/v8/custom/V8WebKitAnimationCustom.cpp:
2546         (WebCore::V8WebKitAnimation::iterationCountAttrGetterCustom):
2547         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2548         (WebCore::V8XMLHttpRequest::responseTextAttrGetterCustom):
2549         (WebCore::V8XMLHttpRequest::responseAttrGetterCustom):
2550
2551 2013-02-14  Yury Semikhatsky  <yurys@chromium.org>
2552
2553         Web Inspector: extract DOM counters graph implementation into its own class
2554         https://bugs.webkit.org/show_bug.cgi?id=109796
2555
2556         Reviewed by Alexander Pavlov.
2557
2558         Extracted DOM counters graph implementation into DOMCountersGraph.js leaving
2559         in MemoryStatistics.js only common parts shared with NativeMemoryGraph.js
2560         Added some closure annotations and converted object literals into classes
2561         with named constructors.
2562
2563         * WebCore.gypi:
2564         * WebCore.vcproj/WebCore.vcproj:
2565         * inspector/compile-front-end.py:
2566         * inspector/front-end/DOMCountersGraph.js: Added.
2567         (WebInspector.DOMCountersGraph):
2568         (WebInspector.DOMCounterUI):
2569         (WebInspector.DOMCountersGraph.Counter):
2570         (WebInspector.DOMCounterUI.prototype.setRange):
2571         (WebInspector.DOMCounterUI.prototype.updateCurrentValue):
2572         (WebInspector.DOMCounterUI.prototype.clearCurrentValueAndMarker):
2573         (WebInspector.DOMCounterUI.prototype.saveImageUnderMarker):
2574         (WebInspector.DOMCounterUI.prototype.restoreImageUnderMarker):
2575         (WebInspector.DOMCounterUI.prototype.discardImageUnderMarker):
2576         (WebInspector.DOMCountersGraph.prototype._createCurrentValuesBar):
2577         (WebInspector.DOMCountersGraph.prototype._createCounterUIList):
2578         (WebInspector.DOMCountersGraph.prototype._createCounterUIList.getNodeCount):
2579         (WebInspector.DOMCountersGraph.prototype._createCounterUIList.getListenerCount):
2580         (WebInspector.DOMCountersGraph.prototype._canvasHeight):
2581         (WebInspector.DOMCountersGraph.prototype._onRecordAdded):
2582         (WebInspector.DOMCountersGraph.prototype._draw):
2583         (WebInspector.DOMCountersGraph.prototype._restoreImageUnderMarker):
2584         (WebInspector.DOMCountersGraph.prototype._saveImageUnderMarker):
2585         (WebInspector.DOMCountersGraph.prototype._drawMarker):
2586         (WebInspector.DOMCountersGraph.prototype._drawGraph):
2587         (WebInspector.DOMCountersGraph.prototype._discardImageUnderMarker):
2588         * inspector/front-end/MemoryStatistics.js:
2589         (WebInspector.MemoryStatistics):
2590         (WebInspector.MemoryStatistics.Counter):
2591         (WebInspector.MemoryStatistics.prototype._createCurrentValuesBar):
2592         (WebInspector.MemoryStatistics.prototype._createCounterUIList):
2593         (WebInspector.MemoryStatistics.prototype.setTopPosition):
2594         (WebInspector.MemoryStatistics.prototype._canvasHeight):
2595         (WebInspector.MemoryStatistics.prototype._onRecordAdded):
2596         (WebInspector.MemoryStatistics.prototype._draw):
2597         (WebInspector.MemoryStatistics.prototype._onClick):
2598         (WebInspector.MemoryStatistics.prototype._onMouseOut):
2599         (WebInspector.MemoryStatistics.prototype._onMouseOver):
2600         (WebInspector.MemoryStatistics.prototype._onMouseMove):
2601         (WebInspector.MemoryStatistics.prototype._restoreImageUnderMarker):
2602         (WebInspector.MemoryStatistics.prototype._drawMarker):
2603         (WebInspector.MemoryStatistics.prototype._discardImageUnderMarker):
2604         * inspector/front-end/NativeMemoryGraph.js:
2605         (WebInspector.NativeMemoryGraph.Counter):
2606         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
2607         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
2608         (WebInspector.NativeMemoryGraph.prototype._draw):
2609         * inspector/front-end/TimelinePanel.js:
2610         * inspector/front-end/WebKit.qrc:
2611
2612 2013-02-13  Ilya Tikhonovsky  <loislo@chromium.org>
2613
2614         Web Inspector: Native Memory Instrumentation: Report child nodes as direct members of a container node to make them look like a tree in the snapshot.
2615         https://bugs.webkit.org/show_bug.cgi?id=109703
2616
2617         Also we need to traverse the tree from the top root element down to the leaves.
2618
2619         Reviewed by Yury Semikhatsky.
2620
2621         * dom/ContainerNode.cpp:
2622         (WebCore::ContainerNode::reportMemoryUsage):
2623         * dom/Node.cpp:
2624         (WebCore::Node::reportMemoryUsage):
2625         * inspector/InspectorMemoryAgent.cpp:
2626         (WebCore):
2627
2628 2013-02-13  Hayato Ito  <hayato@chromium.org>
2629
2630         [Shadow DOM] Implements a '::distributed()' pseudo element.
2631         https://bugs.webkit.org/show_bug.cgi?id=82169
2632
2633         Reviewed by Dimitri Glazkov.
2634
2635         Implements a '::distributed()' pseudo element.
2636         See the Shadow DOM specification and the filed bug for the detail.
2637
2638         - http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#selecting-nodes-distributed-to-insertion-points
2639         - https://www.w3.org/Bugs/Public/show_bug.cgi?id=19684
2640
2641         For example, suppose we are given the following DOM tree and shadow tree:
2642
2643         - <A>
2644           - <B>
2645             - <C>
2646
2647         [A's ShadowRoot]
2648           <D>
2649           - <style>
2650               E content::distributed(B C) { color: green; }
2651           - <E>
2652             - <content>  (Node B is distributed to this insertion point.)
2653
2654         In this case, the style rule defined in the shadow tree matches node 'C'.
2655
2656         A '::distributed()' pseudo element can not be a pseudo class since
2657         an intersection between matched_elements(some_selector) and
2658         matched_elements(some_selector::distributed(...)) is always an
2659         empty set. A '::distributed()' pseudo element is the first-ever
2660         *functional* pseudo element which takes a parameter, which can be
2661         a selector.
2662
2663         This rule crosses the shadow boundary from a shadow tree to the
2664         tree of its shadow host. That means a rule which includes
2665         '::distributed()' pseudo element is defined in shadow tree, but
2666         the node which is matched in the rule, the subject of the
2667         selector, is outside of the shadow tree. Therefore, we cannot
2668         predict where the subject of the selector will be beforehand.
2669         Current CSS implementation assumes the subject of the selector
2670         must exist in the current scope.
2671
2672         To overcome this issue, DocumentRuleSets now has a instance of
2673         ShadowDistributedRules class.  A style rule will be stored in this
2674         instance if the rule includes a '::distributed()' pseudo element.
2675         This class also keeps track of each RuleSet by mapping it with a
2676         scope where the rule was originally defined. In the example, the
2677         scope is A's ShadowRoot.  The scope is used to check whether the
2678         left-most matched element (in the example, it's a node 'E') exists
2679         in the scope.
2680
2681         Internally, a '::distributed' pseudo element is represented by a
2682         newly introduced 'ShadowDistributed' relation.  That makes an
2683         implementation of SelectorChecker::checkSelector() much simpler.
2684         A transformation from a distributed pseudo element to a
2685         ShadowDistributed is done in parsing stage of CSS.
2686
2687         Since '::distributed()' is an experimental feature, it's actually
2688         prefixed with '-webkit-' and guarded by SHADOW_DOM flag.
2689
2690         Tests: fast/dom/shadow/distributed-pseudo-element-for-shadow-element.html
2691                fast/dom/shadow/distributed-pseudo-element-match-all.html
2692                fast/dom/shadow/distributed-pseudo-element-match-descendant.html
2693                fast/dom/shadow/distributed-pseudo-element-nested.html
2694                fast/dom/shadow/distributed-pseudo-element-no-match.html
2695                fast/dom/shadow/distributed-pseudo-element-reprojection.html
2696                fast/dom/shadow/distributed-pseudo-element-scoped.html
2697                fast/dom/shadow/distributed-pseudo-element-support-selector.html
2698                fast/dom/shadow/distributed-pseudo-element-used-in-selector-list.html
2699                fast/dom/shadow/distributed-pseudo-element-with-any.html
2700                fast/dom/shadow/distributed-pseudo-element.html
2701
2702         * css/CSSGrammar.y.in:
2703         CSS Grammar was updated to support '::distrbuted(selector)'.
2704         This pseudo element is the first pseudo element which can take a selector as a parameter.
2705         * css/CSSParser.cpp:
2706         (WebCore::CSSParser::detectDashToken):
2707         (WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded):
2708         (WebCore::CSSParser::rewriteSpecifiersWithElementName):
2709         Here we are converting a '::distributed' pseudo element into a
2710         ShadowDistributed relation internally.  To support the conversion,
2711         these rewriteSpecifiersXXX functions (formally called
2712         updateSpecifiersXXX) now return the specifiers which may be
2713         converted.
2714         (WebCore::CSSParser::rewriteSpecifiers):
2715         * css/CSSParser.h:
2716         * css/CSSParserValues.cpp:
2717         (WebCore::CSSParserSelector::CSSParserSelector):
2718         * css/CSSParserValues.h:
2719         (CSSParserSelector):
2720         (WebCore::CSSParserSelector::functionArgumentSelector):
2721         To hold an intermediate selector which appears at the position of an argument in
2722         functional pseudo element when parsing CSS.
2723         (WebCore::CSSParserSelector::setFunctionArgumentSelector):
2724         (WebCore::CSSParserSelector::isDistributedPseudoElement):
2725         * css/CSSSelector.cpp:
2726         Add new pseudo element, PseudoDistributed, and its internal representation, ShadowDistributed relation.
2727         (WebCore::CSSSelector::pseudoId):
2728         (WebCore::nameToPseudoTypeMap):
2729         (WebCore::CSSSelector::extractPseudoType):
2730         (WebCore::CSSSelector::selectorText):
2731         * css/CSSSelector.h:
2732         (CSSSelector):
2733         (WebCore):
2734         (WebCore::CSSSelector::isDistributedPseudoElement):
2735         (WebCore::CSSSelector::isShadowDistributed):
2736         * css/CSSSelectorList.cpp:
2737         (WebCore):
2738         (SelectorHasShadowDistributed):
2739         (WebCore::SelectorHasShadowDistributed::operator()):
2740         (WebCore::CSSSelectorList::hasShadowDistributedAt):
2741         * css/CSSSelectorList.h:
2742         (CSSSelectorList):
2743         * css/DocumentRuleSets.cpp:
2744         (WebCore):
2745         (WebCore::ShadowDistributedRules::addRule):
2746         Every CSS rule which includes '::distributed(...)' should be managed by calling this function.
2747         (WebCore::ShadowDistributedRules::collectMatchRequests):
2748         (WebCore::DocumentRuleSets::resetAuthorStyle):
2749         * css/DocumentRuleSets.h:
2750         (WebCore):
2751         (ShadowDistributedRules):
2752         (WebCore::ShadowDistributedRules::clear):
2753         (DocumentRuleSets):
2754         (WebCore::DocumentRuleSets::shadowDistributedRules)
2755         DocumentRuleSets owns an instance of ShadowDistributedRules.
2756         * css/RuleSet.cpp:
2757         (WebCore::RuleSet::addChildRules):
2758         Updated to check whether the rule contains '::distributed()' or not.
2759         * css/SelectorChecker.cpp:
2760         (WebCore::SelectorChecker::match):
2761         Support ShadowDistributed relation. Check all possible insertion points where a node is distributed.
2762         * css/SelectorChecker.h:
2763         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
2764         Adds enum of BehaviorAtBoundary. '::distributed()' is the only
2765         rule which uses 'CrossedBoundary' since it is the only rule which
2766         crosses shadow boundaries.
2767         (SelectorCheckingContext):
2768         * css/SelectorFilter.cpp:
2769         (WebCore::SelectorFilter::collectIdentifierHashes):
2770         * css/StyleResolver.cpp:
2771         (WebCore::StyleResolver::collectMatchingRules):
2772         (WebCore::StyleResolver::matchAuthorRules):
2773         (WebCore::StyleResolver::collectMatchingRulesForList):
2774         (WebCore::StyleResolver::ruleMatches):
2775         * css/StyleResolver.h:
2776         (MatchRequest):
2777         (WebCore::MatchRequest::MatchRequest): Add behaviorAtBoundary field.
2778         (WebCore):
2779         (StyleResolver):
2780         * html/shadow/InsertionPoint.cpp:
2781         (WebCore::collectInsertionPointsWhereNodeIsDistributed):
2782         (WebCore):
2783         * html/shadow/InsertionPoint.h:
2784         (WebCore):
2785
2786 2013-02-13  Kentaro Hara  <haraken@chromium.org>
2787
2788         [V8] Generate wrapper methods for custom methods
2789         https://bugs.webkit.org/show_bug.cgi?id=109678
2790
2791         Reviewed by Adam Barth.
2792
2793         Currently V8 directly calls back custom methods written
2794         in custom binding files. This makes it impossible for code
2795         generators to hook custom methods (e.g. Code generators cannot
2796         insert a code for FeatureObservation into custom methods).
2797         To solve the problem, we should generate wrapper methods for
2798         custom methods.
2799
2800         No tests. No change in behavior.
2801
2802         * page/DOMWindow.idl: Removed overloaded methods. The fact that methods in an IDL
2803         file are overloaded but they are not overloaded in custom bindings confuses code
2804         generators. (For some reason, this problem hasn't appeared before this change.)
2805         * xml/XMLHttpRequest.idl: Ditto.
2806
2807         * bindings/scripts/CodeGeneratorV8.pm:
2808         (GenerateHeader):
2809         (GenerateDomainSafeFunctionGetter):
2810         (GenerateEventListenerCallback):
2811         (GenerateFunctionCallback):
2812         (GenerateNonStandardFunction):
2813         (GenerateImplementation):
2814         * bindings/scripts/test/V8/V8TestInterface.cpp:
2815         (WebCore::TestInterfaceV8Internal::supplementalMethod3Callback):
2816         (TestInterfaceV8Internal):
2817         (WebCore):
2818         * bindings/scripts/test/V8/V8TestObj.cpp:
2819         (WebCore::TestObjV8Internal::customMethodCallback):
2820         (TestObjV8Internal):
2821         (WebCore::TestObjV8Internal::customMethodWithArgsCallback):
2822         (WebCore::TestObjV8Internal::classMethod2Callback):
2823         (WebCore):
2824         (WebCore::ConfigureV8TestObjTemplate):
2825         * bindings/scripts/test/V8/V8TestObj.h:
2826         (V8TestObj):
2827         * bindings/v8/custom/V8ClipboardCustom.cpp:
2828         (WebCore::V8Clipboard::clearDataCallbackCustom):
2829         (WebCore::V8Clipboard::setDragImageCallbackCustom):
2830         * bindings/v8/custom/V8ConsoleCustom.cpp:
2831         (WebCore::V8Console::traceCallbackCustom):
2832         (WebCore::V8Console::assertCallbackCustom):
2833         (WebCore::V8Console::profileCallbackCustom):
2834         (WebCore::V8Console::profileEndCallbackCustom):
2835         * bindings/v8/custom/V8CryptoCustom.cpp:
2836         (WebCore::V8Crypto::getRandomValuesCallbackCustom):
2837         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
2838         (WebCore::V8DOMFormData::appendCallbackCustom):
2839         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2840         (WebCore::V8DOMWindow::addEventListenerCallbackCustom):
2841         (WebCore::V8DOMWindow::removeEventListenerCallbackCustom):
2842         (WebCore::V8DOMWindow::postMessageCallbackCustom):
2843         (WebCore::V8DOMWindow::toStringCallbackCustom):
2844         (WebCore::V8DOMWindow::releaseEventsCallbackCustom):
2845         (WebCore::V8DOMWindow::captureEventsCallbackCustom):
2846         (WebCore::V8DOMWindow::showModalDialogCallbackCustom):
2847         (WebCore::V8DOMWindow::openCallbackCustom):
2848         (WebCore::V8DOMWindow::setTimeoutCallbackCustom):
2849         (WebCore::V8DOMWindow::setIntervalCallbackCustom):
2850         * bindings/v8/custom/V8DataViewCustom.cpp:
2851         (WebCore::V8DataView::getInt8CallbackCustom):
2852         (WebCore::V8DataView::getUint8CallbackCustom):
2853         (WebCore::V8DataView::setInt8CallbackCustom):
2854         (WebCore::V8DataView::setUint8CallbackCustom):
2855         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
2856         (WebCore::V8DedicatedWorkerContext::postMessageCallbackCustom):
2857         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
2858         (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallbackCustom):
2859         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
2860         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallbackCustom):
2861         * bindings/v8/custom/V8DocumentCustom.cpp:
2862         (WebCore::V8Document::evaluateCallbackCustom):
2863         (WebCore::V8Document::createTouchListCallbackCustom):
2864         * bindings/v8/custom/V8GeolocationCustom.cpp:
2865         (WebCore::V8Geolocation::getCurrentPositionCallbackCustom):
2866         (WebCore::V8Geolocation::watchPositionCallbackCustom):
2867         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
2868         (WebCore::V8HTMLAllCollection::itemCallbackCustom):
2869         (WebCore::V8HTMLAllCollection::namedItemCallbackCustom):
2870         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2871         (WebCore::V8HTMLCanvasElement::getContextCallbackCustom):
2872         (WebCore::V8HTMLCanvasElement::toDataURLCallbackCustom):
2873         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
2874         (WebCore::V8HTMLDocument::writeCallbackCustom):
2875         (WebCore::V8HTMLDocument::writelnCallbackCustom):
2876         (WebCore::V8HTMLDocument::openCallbackCustom):
2877         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
2878         (WebCore::V8HTMLFormControlsCollection::namedItemCallbackCustom):
2879         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
2880         (WebCore::v8HTMLImageElementConstructorCallbackCustom):
2881         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
2882         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
2883         (WebCore::V8HTMLInputElement::setSelectionRangeCallbackCustom):
2884         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2885         (WebCore::V8HTMLOptionsCollection::namedItemCallbackCustom):
2886         (WebCore::V8HTMLOptionsCollection::removeCallbackCustom):
2887         (WebCore::V8HTMLOptionsCollection::addCallbackCustom):
2888         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
2889         (WebCore::V8HTMLSelectElement::removeCallbackCustom):
2890         * bindings/v8/custom/V8HistoryCustom.cpp:
2891         (WebCore::V8History::pushStateCallbackCustom):
2892         (WebCore::V8History::replaceStateCallbackCustom):
2893         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
2894         (WebCore::V8InjectedScriptHost::inspectedObjectCallbackCustom):
2895         (WebCore::V8InjectedScriptHost::internalConstructorNameCallbackCustom):
2896         (WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallbackCustom):
2897         (WebCore::V8InjectedScriptHost::typeCallbackCustom):
2898         (WebCore::V8InjectedScriptHost::functionDetailsCallbackCustom):
2899         (WebCore::V8InjectedScriptHost::getInternalPropertiesCallbackCustom):
2900         (WebCore::V8InjectedScriptHost::getEventListenersCallbackCustom):
2901         (WebCore::V8InjectedScriptHost::inspectCallbackCustom):
2902         (WebCore::V8InjectedScriptHost::databaseIdCallbackCustom):
2903         (WebCore::V8InjectedScriptHost::storageIdCallbackCustom):
2904         (WebCore::V8InjectedScriptHost::evaluateCallbackCustom):
2905         (WebCore::V8InjectedScriptHost::setFunctionVariableValueCallbackCustom):
2906         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
2907         (WebCore::V8InspectorFrontendHost::platformCallbackCustom):
2908         (WebCore::V8InspectorFrontendHost::portCallbackCustom):
2909         (WebCore::V8InspectorFrontendHost::showContextMenuCallbackCustom):
2910         (WebCore::V8InspectorFrontendHost::recordActionTakenCallbackCustom):
2911         (WebCore::V8InspectorFrontendHost::recordPanelShownCallbackCustom):
2912         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallbackCustom):
2913         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
2914         (WebCore::V8JavaScriptCallFrame::evaluateCallbackCustom):
2915         (WebCore::V8JavaScriptCallFrame::restartCallbackCustom):
2916         (WebCore::V8JavaScriptCallFrame::setVariableValueCallbackCustom):
2917         (WebCore::V8JavaScriptCallFrame::scopeTypeCallbackCustom):
2918         * bindings/v8/custom/V8LocationCustom.cpp:
2919         (WebCore::V8Location::reloadAccessorGetter):
2920         (WebCore::V8Location::replaceAccessorGetter):
2921         (WebCore::V8Location::assignAccessorGetter):
2922         (WebCore::V8Location::reloadCallbackCustom):
2923         (WebCore::V8Location::replaceCallbackCustom):
2924         (WebCore::V8Location::assignCallbackCustom):
2925         (WebCore::V8Location::valueOfCallbackCustom):
2926         (WebCore::V8Location::toStringCallbackCustom):
2927         * bindings/v8/custom/V8MessageEventCustom.cpp:
2928         (WebCore::V8MessageEvent::initMessageEventCallbackCustom):
2929         (WebCore::V8MessageEvent::webkitInitMessageEventCallbackCustom):
2930         * bindings/v8/custom/V8MessagePortCustom.cpp:
2931         (WebCore::V8MessagePort::postMessageCallbackCustom):
2932         * bindings/v8/custom/V8NodeCustom.cpp:
2933         (WebCore::V8Node::insertBeforeCallbackCustom):
2934         (WebCore::V8Node::replaceChildCallbackCustom):
2935         (WebCore::V8Node::removeChildCallbackCustom):
2936         (WebCore::V8Node::appendChildCallbackCustom):
2937         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
2938         (WebCore::V8NotificationCenter::requestPermissionCallbackCustom):
2939         * bindings/v8/custom/V8NotificationCustom.cpp:
2940         (WebCore::V8Notification::requestPermissionCallbackCustom):
2941         * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
2942         (WebCore::V8SQLResultSetRowList::itemCallbackCustom):
2943         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
2944         (WebCore::V8SQLTransaction::executeSqlCallbackCustom):
2945         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
2946         (WebCore::V8SQLTransactionSync::executeSqlCallbackCustom):
2947         * bindings/v8/custom/V8SVGLengthCustom.cpp:
2948         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallbackCustom):
2949         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2950         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallbackCustom):
2951         (WebCore::V8WebGLRenderingContext::getBufferParameterCallbackCustom):
2952         (WebCore::V8WebGLRenderingContext::getExtensionCallbackCustom):
2953         (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallbackCustom):
2954         (WebCore::V8WebGLRenderingContext::getParameterCallbackCustom):
2955         (WebCore::V8WebGLRenderingContext::getProgramParameterCallbackCustom):
2956         (WebCore::V8WebGLRenderingContext::getRenderbufferParameterCallbackCustom):
2957         (WebCore::V8WebGLRenderingContext::getShaderParameterCallbackCustom):
2958         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallbackCustom):
2959         (WebCore::V8WebGLRenderingContext::getTexParameterCallbackCustom):
2960         (WebCore::V8WebGLRenderingContext::getUniformCallbackCustom):
2961         (WebCore::V8WebGLRenderingContext::getVertexAttribCallbackCustom):
2962         (WebCore::V8WebGLRenderingContext::uniform1fvCallbackCustom):
2963         (WebCore::V8WebGLRenderingContext::uniform1ivCallbackCustom):
2964         (WebCore::V8WebGLRenderingContext::uniform2fvCallbackCustom):
2965         (WebCore::V8WebGLRenderingContext::uniform2ivCallbackCustom):
2966         (WebCore::V8WebGLRenderingContext::uniform3fvCallbackCustom):
2967         (WebCore::V8WebGLRenderingContext::uniform3ivCallbackCustom):
2968         (WebCore::V8WebGLRenderingContext::uniform4fvCallbackCustom):
2969         (WebCore::V8WebGLRenderingContext::uniform4ivCallbackCustom):
2970         (WebCore::V8WebGLRenderingContext::uniformMatrix2fvCallbackCustom):
2971         (WebCore::V8WebGLRenderingContext::uniformMatrix3fvCallbackCustom):
2972         (WebCore::V8WebGLRenderingContext::uniformMatrix4fvCallbackCustom):
2973         (WebCore::V8WebGLRenderingContext::vertexAttrib1fvCallbackCustom):
2974         (WebCore::V8WebGLRenderingContext::vertexAttrib2fvCallbackCustom):
2975         (WebCore::V8WebGLRenderingContext::vertexAttrib3fvCallbackCustom):
2976         (WebCore::V8WebGLRenderingContext::vertexAttrib4fvCallbackCustom):
2977         * bindings/v8/custom/V8WorkerContextCustom.cpp:
2978         (WebCore::V8WorkerContext::importScriptsCallbackCustom):
2979         (WebCore::V8WorkerContext::setTimeoutCallbackCustom):
2980         (WebCore::V8WorkerContext::setIntervalCallbackCustom):
2981         * bindings/v8/custom/V8WorkerCustom.cpp:
2982         (WebCore::V8Worker::postMessageCallbackCustom):
2983         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2984         (WebCore::V8XMLHttpRequest::openCallbackCustom):
2985         (WebCore::V8XMLHttpRequest::sendCallbackCustom):
2986         * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
2987         (WebCore::V8XSLTProcessor::setParameterCallbackCustom):
2988         (WebCore::V8XSLTProcessor::getParameterCallbackCustom):
2989         (WebCore::V8XSLTProcessor::removeParameterCallbackCustom):
2990
2991 2013-02-13  Praveen R Jadhav  <praveen.j@samsung.com>
2992
2993         JSObject for ChannelSplitterNode and ChannelMergerNode are not created.
2994         https://bugs.webkit.org/show_bug.cgi?id=109542
2995
2996         Reviewed by Kentaro Hara.
2997
2998         "JSGenerateToJSObject" should be included in IDL files
2999         of ChannelSplitterNode and ChannelMergerNode in WebAudio.
3000         This ensures html files to access corresponding objects.
3001
3002         * Modules/webaudio/ChannelMergerNode.idl:
3003         * Modules/webaudio/ChannelSplitterNode.idl:
3004
3005 2013-02-13   Vineet Chaudhary  <rgf748@motorola.com>
3006
3007         [Regression] After r142831  collection-null-like-arguments.html layout test failing
3008         https://bugs.webkit.org/show_bug.cgi?id=109780
3009
3010         Reviewed by Kentaro Hara.
3011
3012         No new tests. LayoutTests/fast/dom/collection-null-like-arguments.html
3013         Should pass now.
3014
3015         * bindings/js/JSHTMLAllCollectionCustom.cpp: Return null for namedItem() only.
3016         (WebCore::getNamedItems):
3017         (WebCore::JSHTMLAllCollection::namedItem):
3018         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Ditto.
3019         (WebCore::getNamedItems):
3020         (WebCore::JSHTMLFormControlsCollection::namedItem):
3021         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Ditto.
3022         (WebCore::getNamedItems):
3023         (WebCore::JSHTMLOptionsCollection::namedItem):
3024
3025 2013-02-13  Soo-Hyun Choi  <sh9.choi@samsung.com>
3026
3027         Fix indentation error in MediaPlayerPrivateGStreamer.h
3028         https://bugs.webkit.org/show_bug.cgi?id=109768
3029
3030         Reviewed by Kentaro Hara.
3031
3032         No new tests as this patch just changes indentation style.
3033
3034         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3035         (MediaPlayerPrivateGStreamer):
3036         (WebCore::MediaPlayerPrivateGStreamer::hasVideo):
3037         (WebCore::MediaPlayerPrivateGStreamer::hasAudio):
3038         (WebCore::MediaPlayerPrivateGStreamer::engineDescription):
3039         (WebCore::MediaPlayerPrivateGStreamer::isLiveStream):
3040
3041 2013-02-13  Adam Barth  <abarth@webkit.org>
3042
3043         TokenPreloadScanner should be (mostly!) thread-safe
3044         https://bugs.webkit.org/show_bug.cgi?id=109760
3045
3046         Reviewed by Eric Seidel.
3047
3048         This patch makes the bulk of TokenPreloadScanner thread-safe.  The one
3049         remaining wart is processPossibleBaseTag because it wants to grub
3050         around in the base tag's attributes. I have a plan for that, but it's
3051         going to need to wait for the next patch.
3052
3053         * html/parser/HTMLPreloadScanner.cpp:
3054         (WebCore::isStartTag):
3055         (WebCore::isStartOrEndTag):
3056         (WebCore::TokenPreloadScanner::identifierFor):
3057         (WebCore::TokenPreloadScanner::inititatorFor):
3058         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
3059         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
3060         (TokenPreloadScanner::StartTagScanner):
3061         (WebCore::TokenPreloadScanner::processPossibleTemplateTag):
3062         (WebCore::TokenPreloadScanner::processPossibleStyleTag):
3063         (WebCore::TokenPreloadScanner::processPossibleBaseTag):
3064         (WebCore::TokenPreloadScanner::scan):
3065         (WebCore::HTMLPreloadScanner::scan):
3066         * html/parser/HTMLPreloadScanner.h:
3067         (WebCore):
3068
3069 2013-02-13  Adam Barth  <abarth@webkit.org>
3070
3071         StartTagScanner should be thread-safe
3072         https://bugs.webkit.org/show_bug.cgi?id=109750
3073
3074         Reviewed by Eric Seidel.
3075
3076         This patch weens the StartTagScanner off AtomicString using two
3077         techniques:
3078
3079         1) This patch creates an enum to represent the four tag names that the
3080            StartTagScanner needs to understand. Using an enum is better than
3081            using an AtomicString because we can use the enum on both the main
3082            thread and on the background thread.
3083
3084         2) For attributes, this patch uses threadSafeMatch. We're not able to
3085            use threadSafeMatch everywhere due to performance, but using it for
3086            attributes appears to be ok becaues we only call threadSafeMatch on
3087            the attributes of "interesting" tags.
3088
3089         I tested the performance of this patch using
3090         PerformanceTests/Parser/html-parser.html and did not see any slowdown.
3091         (There actually appeared to be a <1% speedup, but I'm attributing that
3092         to noise.)
3093
3094         * html/parser/HTMLPreloadScanner.cpp:
3095         (WebCore::identifierFor):
3096         (WebCore):
3097         (WebCore::inititatorFor):
3098         (WebCore::StartTagScanner::StartTagScanner):
3099         (WebCore::StartTagScanner::processAttributes):
3100         (StartTagScanner):
3101         (WebCore::StartTagScanner::createPreloadRequest):
3102         (WebCore::StartTagScanner::processAttribute):
3103         (WebCore::StartTagScanner::charset):
3104         (WebCore::StartTagScanner::resourceType):
3105         (WebCore::StartTagScanner::shouldPreload):
3106         (WebCore::HTMLPreloadScanner::processToken):
3107
3108 2013-02-13  Huang Dongsung  <luxtella@company100.net>
3109
3110         Coordinated Graphics: a long page is scaled vertically while loading.
3111         https://bugs.webkit.org/show_bug.cgi?id=109645
3112
3113         Reviewed by Noam Rosenthal.
3114
3115         When loading http://www.w3.org/TR/xpath-datamodel/, Coordinated Graphics draws
3116         vertically scaled contents. It is because there is the difference between the
3117         size of a layer and the size of CoordinatedBackingStore.
3118
3119         Currently, CoordinatedGraphicsScene notifies the size to CoordinatedBackingStore
3120         at the moment of creating, updating and removing a tile. However, it is not
3121         necessary to send tile-related messages when the size of layer is changed.
3122         So this patch resets the size of CoordinatedBackingStore when receiving the
3123         message that is created when the size is changed: SyncLayerState.
3124
3125         There is no current way to reliably test flicker issues.
3126
3127         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
3128           Add m_pendingSize to set m_size at the moment of flushing.
3129           After http://webkit.org/b/108294, m_pendingSize will be removed
3130           because the bug makes CoordinatedGraphicsScene execute all messages at
3131           the moment of flushing.
3132         (WebCore::CoordinatedBackingStore::setSize):
3133         (WebCore::CoordinatedBackingStore::commitTileOperations):
3134         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
3135         (CoordinatedBackingStore):
3136         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
3137         (WebCore::CoordinatedGraphicsScene::prepareContentBackingStore):
3138         (WebCore::CoordinatedGraphicsScene::createBackingStoreIfNeeded):
3139         (WebCore::CoordinatedGraphicsScene::resetBackingStoreSizeToLayerSize):
3140         (WebCore::CoordinatedGraphicsScene::createTile):
3141         (WebCore::CoordinatedGraphicsScene::removeTile):
3142         (WebCore::CoordinatedGraphicsScene::updateTile):
3143
3144 2013-02-13  Kentaro Hara  <haraken@chromium.org>
3145
3146         [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(),
3147         and XXXAccessorSetter() to XXXAttrSetterCustom()
3148         https://bugs.webkit.org/show_bug.cgi?id=109679
3149
3150         Reviewed by Adam Barth.
3151
3152         For naming consistency and clarification.
3153
3154         No tests. No change in behavior.
3155
3156         * bindings/scripts/CodeGeneratorV8.pm:
3157         (GenerateHeader):
3158         (GenerateHeaderCustomCall):
3159         (GenerateNormalAttrGetter):
3160         (GenerateNormalAttrSetter):
3161         (GenerateImplementation):
3162         * bindings/scripts/test/V8/V8TestInterface.cpp:
3163         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
3164         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
3165         * bindings/scripts/test/V8/V8TestObj.cpp:
3166         (WebCore::TestObjV8Internal::customAttrAttrGetter):
3167         (WebCore::TestObjV8Internal::customAttrAttrSetter):
3168         * bindings/scripts/test/V8/V8TestObj.h:
3169         (V8TestObj):
3170         * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
3171         (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom):
3172         * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp:
3173         (WebCore::V8BiquadFilterNode::typeAttrSetterCustom):
3174         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
3175         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrGetterCustom):
3176         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrSetterCustom):
3177         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrGetterCustom):
3178         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrSetterCustom):
3179         * bindings/v8/custom/V8ClipboardCustom.cpp:
3180         (WebCore::V8Clipboard::typesAttrGetterCustom):
3181         * bindings/v8/custom/V8CoordinatesCustom.cpp:
3182         (WebCore::V8Coordinates::altitudeAttrGetterCustom):
3183         (WebCore::V8Coordinates::altitudeAccuracyAttrGetterCustom):
3184         (WebCore::V8Coordinates::headingAttrGetterCustom):
3185         (WebCore::V8Coordinates::speedAttrGetterCustom):
3186         * bindings/v8/custom/V8CustomEventCustom.cpp:
3187         (WebCore::V8CustomEvent::detailAttrGetterCustom):
3188         * bindings/v8/custom/V8DOMWindowCustom.cpp:
3189         (WebCore::V8DOMWindow::eventAttrGetterCustom):
3190         (WebCore::V8DOMWindow::eventAttrSetterCustom):
3191         (WebCore::V8DOMWindow::locationAttrSetterCustom):
3192         (WebCore::V8DOMWindow::openerAttrSetterCustom):
3193         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
3194         (WebCore::V8DeviceMotionEvent::accelerationAttrGetterCustom):
3195         (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAttrGetterCustom):
3196         (WebCore::V8DeviceMotionEvent::rotationRateAttrGetterCustom):
3197         (WebCore::V8DeviceMotionEvent::intervalAttrGetterCustom):
3198         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
3199         (WebCore::V8DeviceOrientationEvent::alphaAttrGetterCustom):
3200         (WebCore::V8DeviceOrientationEvent::betaAttrGetterCustom):
3201         (WebCore::V8DeviceOrientationEvent::gammaAttrGetterCustom):
3202         (WebCore::V8DeviceOrientationEvent::absoluteAttrGetterCustom):
3203         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
3204         (WebCore::V8Document::locationAttrGetterCustom):
3205         (WebCore::V8Document::locationAttrSetterCustom):
3206         * bindings/v8/custom/V8EventCustom.cpp:
3207         (WebCore::V8Event::dataTransferAttrGetterCustom):
3208         (WebCore::V8Event::clipboardDataAttrGetterCustom):
3209         * bindings/v8/custom/V8FileReaderCustom.cpp:
3210         (WebCore::V8FileReader::resultAttrGetterCustom):
3211         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
3212         (WebCore::V8HTMLDocument::allAttrSetterCustom):
3213         * bindings/v8/custom/V8HTMLElementCustom.cpp:
3214         (WebCore::V8HTMLElement::itemValueAttrGetterCustom):
3215         (WebCore::V8HTMLElement::itemValueAttrSetterCustom):
3216         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
3217         (WebCore::V8HTMLFrameElement::locationAttrSetterCustom):
3218         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
3219         (WebCore::V8HTMLInputElement::selectionStartAttrGetterCustom):
3220         (WebCore::V8HTMLInputElement::selectionStartAttrSetterCustom):
3221         (WebCore::V8HTMLInputElement::selectionEndAttrGetterCustom):
3222         (WebCore::V8HTMLInputElement::selectionEndAttrSetterCustom):
3223         (WebCore::V8HTMLInputElement::selectionDirectionAttrGetterCustom):
3224         (WebCore::V8HTMLInputElement::selectionDirectionAttrSetterCustom):
3225         * bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
3226         (WebCore::V8HTMLLinkElement::sizesAttrGetterCustom):
3227         (WebCore::V8HTMLLinkElement::sizesAttrSetterCustom):
3228         * bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
3229         (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom):
3230         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
3231         (WebCore::V8HTMLOptionsCollection::lengthAttrSetterCustom):
3232         * bindings/v8/custom/V8HistoryCustom.cpp:
3233         (WebCore::V8History::stateAttrGetterCustom):
3234         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
3235         (WebCore::V8JavaScriptCallFrame::scopeChainAttrGetterCustom):
3236         (WebCore::V8JavaScriptCallFrame::thisObjectAttrGetterCustom):
3237         (WebCore::V8JavaScriptCallFrame::typeAttrGetterCustom):
3238         * bindings/v8/custom/V8LocationCustom.cpp:
3239         (WebCore::V8Location::hashAttrSetterCustom):
3240         (WebCore::V8Location::hostAttrSetterCustom):
3241         (WebCore::V8Location::hostnameAttrSetterCustom):
3242         (WebCore::V8Location::hrefAttrSetterCustom):
3243         (WebCore::V8Location::pathnameAttrSetterCustom):
3244         (WebCore::V8Location::portAttrSetterCustom):
3245         (WebCore::V8Location::protocolAttrSetterCustom):
3246         (WebCore::V8Location::searchAttrSetterCustom):
3247         (WebCore::V8Location::reloadAttrGetterCustom):
3248         (WebCore::V8Location::replaceAttrGetterCustom):
3249         (WebCore::V8Location::assignAttrGetterCustom):
3250         * bindings/v8/custom/V8MessageEventCustom.cpp:
3251         (WebCore::V8MessageEvent::dataAttrGetterCustom):
3252         (WebCore::V8MessageEvent::portsAttrGetterCustom):
3253         * bindings/v8/custom/V8OscillatorNodeCustom.cpp:
3254         (WebCore::V8OscillatorNode::typeAttrSetterCustom):
3255         * bindings/v8/custom/V8PannerNodeCustom.cpp:
3256         (WebCore::V8PannerNode::panningModelAttrSetterCustom):
3257         (WebCore::V8PannerNode::distanceModelAttrSetterCustom):
3258         * bindings/v8/custom/V8PopStateEventCustom.cpp:
3259         (WebCore::V8PopStateEvent::stateAttrGetterCustom):
3260         * bindings/v8/custom/V8SVGLengthCustom.cpp:
3261         (WebCore::V8SVGLength::valueAttrGetterCustom):
3262         (WebCore::V8SVGLength::valueAttrSetterCustom):
3263         * bindings/v8/custom/V8TrackEventCustom.cpp:
3264         (WebCore::V8TrackEvent::trackAttrGetterCustom):
3265         * bindings/v8/custom/V8WebKitAnimationCustom.cpp:
3266         (WebCore::V8WebKitAnimation::iterationCountAttrGetterCustom):
3267         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
3268         (WebCore::V8XMLHttpRequest::responseTextAttrGetterCustom):
3269         (WebCore::V8XMLHttpRequest::responseAttrGetterCustom):
3270
3271 2013-02-12  Kentaro Hara  <haraken@chromium.org>
3272
3273         [V8] Generate wrapper methods for custom getters/setters
3274         https://bugs.webkit.org/show_bug.cgi?id=109666
3275
3276         Reviewed by Adam Barth.
3277
3278         Currently V8 directly calls back custom getters/setters written
3279         in custom binding files. This makes it impossible for code generators
3280         to hook custom getters/setters (e.g. Code generators cannot insert a code
3281         for FeatureObservation into custom getters/setters). To solve the problem,
3282         we should generate wrapper methods for custom getters/setters.
3283
3284         No tests. No change in behavior.
3285
3286         * bindings/scripts/CodeGeneratorV8.pm:
3287         (GenerateNormalAttrGetter):
3288         (GenerateNormalAttrSetter):
3289         (GenerateSingleBatchedAttribute):
3290         (GenerateImplementation):
3291         * bindings/scripts/test/V8/V8TestInterface.cpp:
3292         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
3293         (TestInterfaceV8Internal):
3294         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
3295         (WebCore):
3296         * bindings/scripts/test/V8/V8TestObj.cpp:
3297         (WebCore::TestObjV8Internal::customAttrAttrGetter):
3298         (TestObjV8Internal):
3299         (WebCore::TestObjV8Internal::customAttrAttrSetter):
3300         (WebCore):
3301
3302 2013-02-13   Vineet Chaudhary  <rgf748@motorola.com>
3303
3304         HTMLCollections namedItem() methods should return null than undefined for empty collections.
3305         https://bugs.webkit.org/show_bug.cgi?id=104096
3306
3307         Reviewed by Kentaro Hara.
3308
3309         As per specification namedItem() should return null if collection is empty.
3310         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlallcollection
3311
3312         Test: fast/dom/htmlcollection-namedItem.html
3313
3314         * bindings/js/JSHTMLAllCollectionCustom.cpp: Returning null.
3315         (WebCore::getNamedItems):
3316         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Ditto.
3317         (WebCore::getNamedItems):
3318         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Ditto.
3319         (WebCore::getNamedItems):
3320         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: Ditto.
3321         (WebCore::V8HTMLAllCollection::namedItemCallback):
3322         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp: Ditto.
3323         (WebCore::V8HTMLFormControlsCollection::namedItemCallback):
3324         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: Ditto.
3325         (WebCore::V8HTMLOptionsCollection::namedItemCallback):
3326
3327 2013-02-13  Tony Gentilcore  <tonyg@chromium.org>
3328
3329         Fix svg/in-html/script-write.html with threaded HTML parser
3330         https://bugs.webkit.org/show_bug.cgi?id=109495
3331
3332         Reviewed by Eric Seidel.
3333
3334         This patch makes the background parser's simulateTreeBuilder() more realistic.
3335         1. The HTMLTreeBuilder does not call the updateStateFor() setState()s when in foreign content mode so we shouldn't do it when simulating the tree builder.
3336         2. HTMLTreeBuilder::processTokenInForeignContent has a list of tags which exit foreign content mode. We need to respect those.
3337         3. Support the <foreignObject> tag which enters and leaves foreign content mode.
3338         4. The tree builder sets state to DataState upon a </script> tag when not in foreign content mode. We need to do the same.
3339
3340         This involved creating a namespace stack where we push upon entering each namespace and pop upon leaving.
3341         We are in foreign content if the topmost namespace is SVG or MathML.
3342
3343         This fixes svg/in-html/script-write.html and likely others.
3344
3345         * html/parser/BackgroundHTMLParser.cpp:
3346         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
3347         * html/parser/BackgroundHTMLParser.h:
3348         (BackgroundHTMLParser):
3349         * html/parser/CompactHTMLToken.cpp:
3350         (WebCore::CompactHTMLToken::getAttributeItem): Returns the attribute of the given name. Necessary to test for <font> attributes in simulateTreeBuilder.
3351         (WebCore):
3352         * html/parser/CompactHTMLToken.h:
3353         (WebCore):
3354         (CompactHTMLToken):
3355
3356 2013-02-13  Andreas Kling  <akling@apple.com>
3357
3358         Remove Element::getAttributeItem() overload that returned a mutable Attribute*.
3359         <http://webkit.org/b/109756>
3360
3361         Reviewed by Antti Koivisto.
3362
3363         Remove this to prevent callers from accidentally causing elements to convert to UniqueElementData.
3364         There are two call sites (Attr and HTMLSelectElement) that legitimately need to mutate Attribute
3365         objects in-place, they now use Element::ensureUniqueElementData()->getAttributeItem() directly instead.
3366
3367         Small progression on Membuster3, mostly for peace of mind.
3368
3369         * dom/Attr.cpp:
3370         (WebCore::Attr::elementAttribute):
3371         * dom/Element.h:
3372         (Element):
3373         * html/HTMLInputElement.cpp:
3374         (WebCore::HTMLInputElement::updateType):
3375         * html/HTMLSelectElement.cpp:
3376         (WebCore::HTMLSelectElement::parseAttribute):
3377         * svg/SVGStyledElement.cpp:
3378         (WebCore::SVGStyledElement::getPresentationAttribute):
3379
3380 2013-02-13  Andreas Kling  <akling@apple.com>
3381
3382         Stronger ElementData pointer typing.
3383         <http://webkit.org/b/109752>
3384
3385         Reviewed by Antti Koivisto.
3386
3387         Use ShareableElementData/UniqueElementData pointers instead of generic ElementData pointers
3388         where possible. Moved some methods from base class into leaf classes that don't make sense
3389         for both classes.
3390
3391         * dom/DocumentSharedObjectPool.cpp:
3392         (WebCore::ShareableElementDataCacheEntry::ShareableElementDataCacheEntry):
3393         (ShareableElementDataCacheEntry):
3394         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
3395         * dom/DocumentSharedObjectPool.h:
3396         (DocumentSharedObjectPool):
3397         * dom/Element.cpp:
3398         (WebCore::Element::parserSetAttributes):
3399         (WebCore::Element::setAttributeNode):
3400         (WebCore::Element::removeAttributeInternal):
3401         (WebCore::Element::cloneAttributesFromElement):
3402         (WebCore::Element::createUniqueElementData):
3403         (WebCore::ShareableElementData::createWithAttributes):
3404         (WebCore::UniqueElementData::create):
3405         (WebCore::ElementData::makeUniqueCopy):
3406         (WebCore::UniqueElementData::makeShareableCopy):
3407         * dom/Element