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