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