Unreviewed, rolling out r142825.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
2
3         Unreviewed, rolling out r142825.
4         http://trac.webkit.org/changeset/142825
5         https://bugs.webkit.org/show_bug.cgi?id=109856
6
7         Causes some inspector tests to time out (Requested by anttik
8         on #webkit).
9
10         * platform/mac/SharedTimerMac.mm:
11         (WebCore):
12         (WebCore::PowerObserver::restartSharedTimer):
13         (WebCore::setSharedTimerFireInterval):
14         (WebCore::stopSharedTimer):
15
16 2013-02-14  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
17
18         Support the ch unit from css3-values
19         https://bugs.webkit.org/show_bug.cgi?id=85755
20
21         Reviewed by David Hyatt.
22
23         Original patch by Sumedha Widyadharma <sumedha.widyadharma@basyskom.com>.
24
25         Test: fast/css/css3-ch-unit.html
26
27         * css/CSSCalculationValue.cpp:
28         (WebCore::unitCategory):
29         * css/CSSGrammar.y.in:
30         * css/CSSParser.cpp:
31         (WebCore::CSSParser::validUnit):
32         (WebCore::CSSParser::createPrimitiveNumericValue):
33         (WebCore::CSSParser::parseValidPrimitive):
34         (WebCore::CSSParser::detectNumberToken):
35         * css/CSSParserValues.cpp:
36         (WebCore::CSSParserValue::createCSSValue):
37         * css/CSSPrimitiveValue.cpp:
38         (WebCore::isValidCSSUnitTypeForDoubleConversion):
39         (WebCore::CSSPrimitiveValue::cleanup):
40         (WebCore::CSSPrimitiveValue::computeLengthDouble):
41         (WebCore::CSSPrimitiveValue::customCssText):
42         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
43         * css/CSSPrimitiveValue.h:
44         (WebCore::CSSPrimitiveValue::isFontRelativeLength):
45         (WebCore::CSSPrimitiveValue::isLength):
46         * platform/graphics/FontMetrics.h:
47         (WebCore::FontMetrics::FontMetrics):
48         (WebCore::FontMetrics::zeroWidth):
49         (WebCore::FontMetrics::setZeroWidth):
50         (FontMetrics):
51         (WebCore::FontMetrics::hasZeroWidth):
52         (WebCore::FontMetrics::setHasZeroWidth):
53         * platform/graphics/SimpleFontData.cpp:
54         (WebCore::SimpleFontData::platformGlyphInit):
55         * platform/graphics/SimpleFontData.h:
56         (WebCore::SimpleFontData::zeroGlyph):
57         (WebCore::SimpleFontData::setZeroGlyph):
58         (SimpleFontData):
59         * platform/graphics/qt/SimpleFontDataQt.cpp:
60         (WebCore::SimpleFontData::platformInit):
61
62 2013-02-14  David Kilzer  <ddkilzer@apple.com>
63
64         [Mac] Clean up WARNING_CFLAGS
65         <http://webkit.org/b/109747>
66         <rdar://problem/13208373>
67
68         Reviewed by Mark Rowe.
69
70         * Configurations/Base.xcconfig: Use
71         GCC_WARN_64_TO_32_BIT_CONVERSION to enable and disable
72         -Wshorten-64-to-32 rather than WARNING_CFLAGS.
73
74 2013-02-14  Christophe Dumez  <ch.dumez@sisa.samsung.com>
75
76         Add addHTTPHeaderField() method to ResourceResponse
77         https://bugs.webkit.org/show_bug.cgi?id=109844
78
79         Reviewed by Adam Barth.
80
81         ResourceRequestBase provides both setHTTPHeaderField() and addHTTPHeaderField(). However,
82         ResourceResponseBase only provides setHTTPHeaderField(). This is a bit inconsistent. As a
83         result, the addHTTPHeaderField() functionality's implementation is duplicated in several
84         ports (at least chromium and soup).
85
86         This patch introduces addHTTPHeaderField() to ResourceResponseBase and makes use of it
87         in Chromium and Soup backends.
88
89         No new tests, no behavior change.
90
91         * platform/chromium/support/WebURLResponse.cpp:
92         (WebKit::WebURLResponse::addHTTPHeaderField): Use ResourceResponseBase::addHTTPHeaderField().
93         * platform/network/ResourceResponseBase.cpp:
94         (WebCore::ResourceResponseBase::updateHeaderParsedState): Move headers' parsed state update code
95         from setHTTPHeaderField() to a new updateHeaderParsedState() method to avoid code duplication.
96         (WebCore):
97         (WebCore::ResourceResponseBase::setHTTPHeaderField):
98         (WebCore::ResourceResponseBase::addHTTPHeaderField):
99         * platform/network/ResourceResponseBase.h:
100         (ResourceResponseBase):
101         * platform/network/soup/ResourceResponseSoup.cpp:
102         (WebCore::ResourceResponse::updateFromSoupMessageHeaders): Use ResourceResponseBase::addHTTPHeaderField().
103
104 2013-02-14  Philip Rogers  <pdr@google.com>
105
106         Prevent inconsistent firstChild during document destruction
107         https://bugs.webkit.org/show_bug.cgi?id=106530
108
109         Reviewed by Abhishek Arya.
110
111         During document destruction, addChildNodesToDeletionQueue can allow a container
112         node to have an invalid first child, causing a crash. This patch updates
113         addChildNodesToDeletionQueue to maintain a valid value for firstChild() even
114         while updating its children.
115
116         Test: svg/custom/animateMotion-path-change-crash.svg
117
118         * dom/ContainerNodeAlgorithms.h:
119         (WebCore::Private::addChildNodesToDeletionQueue):
120             To ensure prevoiusSibling() is also valid, this code was slightly refactored
121             to call setPreviousSibling(0) on the next node instead of the current node.
122
123 2013-02-14  Julien Chaffraix  <jchaffraix@webkit.org>
124
125         [CSS Grid Layout] Add an internal 2D grid representation to RenderGrid
126         https://bugs.webkit.org/show_bug.cgi?id=109714
127
128         Reviewed by Ojan Vafai.
129
130         This change introduces a 2D grid representation of the grid areas. Our implementation
131         is a straight Vector of Vectors for the grid areas, each grid area able to hold an
132         arbitrary number of RenderBox* so they hold a Vector of RenderBoxes. As an optimization,
133         each grid area has enough inline storage to hold one grid item which should cover
134         most cases.
135
136         In order to keep the code readable, a GridIterator was introduced to hide the new grid.
137
138         Refactoring, covered by existing tests.
139
140         * rendering/RenderGrid.cpp:
141         (RenderGrid::GridIterator):
142         (WebCore::RenderGrid::GridIterator::GridIterator):
143         (WebCore::RenderGrid::GridIterator::nextGridItem):
144         Added a mono-directional iterator. In order to be more aligned with the rest of the code,
145         this iterator actually walks orthogonally to the |direction| (ie fixing the |direction|'s track).
146
147         * rendering/RenderGrid.cpp:
148         (WebCore::RenderGrid::computePreferredLogicalWidths):
149         (WebCore::RenderGrid::layoutGridItems):
150         Updated these 2 functions to place the items on the grid and clear it at the end.
151
152         (WebCore::RenderGrid::computePreferredTrackWidth):
153         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
154         Updated to use the GridIterator to walk over the rows / columns.
155
156         (WebCore::RenderGrid::placeItemsOnGrid):
157         Added this function that inserts the grid items into the right grid area.
158
159         * rendering/RenderGrid.h:
160         (WebCore::RenderGrid::gridColumnCount):
161         (WebCore::RenderGrid::gridRowCount):
162         Added these helper functions.
163
164 2013-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
165
166         Unreviewed, rolling out r141990.
167         http://trac.webkit.org/changeset/141990
168         https://bugs.webkit.org/show_bug.cgi?id=109850
169
170         ~5% regression on intl2 page cycler (Requested by kling on
171         #webkit).
172
173         * platform/graphics/GlyphPage.h:
174         (WebCore::GlyphPage::create):
175         (WebCore::GlyphPage::glyphDataForCharacter):
176         (WebCore::GlyphPage::glyphDataForIndex):
177         (WebCore::GlyphPage::fontDataForCharacter):
178         (WebCore::GlyphPage::setGlyphDataForIndex):
179         (GlyphPage):
180         (WebCore::GlyphPage::copyFrom):
181         (WebCore::GlyphPage::clear):
182         (WebCore::GlyphPage::clearForFontData):
183         (WebCore::GlyphPage::GlyphPage):
184         * platform/graphics/GlyphPageTreeNode.cpp:
185         (WebCore::GlyphPageTreeNode::initializePage):
186         * rendering/svg/SVGTextRunRenderingContext.cpp:
187         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter):
188
189 2013-02-14  Mark Pilgrim  <pilgrim@chromium.org>
190
191         [Chromium] Move PlatformMessagePortChannel to WebCore
192         https://bugs.webkit.org/show_bug.cgi?id=109845
193
194         Reviewed by Adam Barth.
195
196         Part of a larger refactoring series; see tracking bug 106829.
197
198         * WebCore.gyp/WebCore.gyp:
199         * WebCore.gypi:
200         * dom/default/chromium: Added.
201         * dom/default/chromium/PlatformMessagePortChannelChromium.cpp: Added.
202         (WebCore):
203         (WebCore::MessagePortChannel::create):
204         (WebCore::MessagePortChannel::createChannel):
205         (WebCore::MessagePortChannel::MessagePortChannel):
206         (WebCore::MessagePortChannel::~MessagePortChannel):
207         (WebCore::MessagePortChannel::entangleIfOpen):
208         (WebCore::MessagePortChannel::disentangle):
209         (WebCore::MessagePortChannel::postMessageToRemote):
210         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
211         (WebCore::MessagePortChannel::close):
212         (WebCore::MessagePortChannel::isConnectedTo):
213         (WebCore::MessagePortChannel::hasPendingActivity):
214         (WebCore::MessagePortChannel::locallyEntangledPort):
215         (WebCore::PlatformMessagePortChannel::create):
216         (WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
217         (WebCore::PlatformMessagePortChannel::~PlatformMessagePortChannel):
218         (WebCore::PlatformMessagePortChannel::createChannel):
219         (WebCore::PlatformMessagePortChannel::messageAvailable):
220         (WebCore::PlatformMessagePortChannel::entangleIfOpen):
221         (WebCore::PlatformMessagePortChannel::disentangle):
222         (WebCore::PlatformMessagePortChannel::postMessageToRemote):
223         (WebCore::PlatformMessagePortChannel::tryGetMessageFromRemote):
224         (WebCore::PlatformMessagePortChannel::close):
225         (WebCore::PlatformMessagePortChannel::isConnectedTo):
226         (WebCore::PlatformMessagePortChannel::hasPendingActivity):
227         (WebCore::PlatformMessagePortChannel::setEntangledChannel):
228         (WebCore::PlatformMessagePortChannel::webChannelRelease):
229         * dom/default/chromium/PlatformMessagePortChannelChromium.h: Added.
230         (WebKit):
231         (WebCore):
232         (PlatformMessagePortChannel):
233
234 2013-02-14  Chris Fleizach  <cfleizach@apple.com>
235
236         Remove Leopard Accessibility support from WebCore (now that no port builds on Leopard)
237         https://bugs.webkit.org/show_bug.cgi?id=90250
238
239         Reviewed by Eric Seidel.
240
241         The Leopard era checks for accessibility lists and accessibility tables can be removed now.
242
243         * accessibility/AccessibilityARIAGrid.cpp:
244         (WebCore):
245         * accessibility/AccessibilityARIAGrid.h:
246         (AccessibilityARIAGrid):
247         (WebCore::AccessibilityARIAGrid::isTableExposableThroughAccessibility):
248         * accessibility/AccessibilityList.cpp:
249         (WebCore::AccessibilityList::computeAccessibilityIsIgnored):
250         * accessibility/AccessibilityList.h:
251         * accessibility/AccessibilityTable.cpp:
252         (WebCore::AccessibilityTable::AccessibilityTable):
253         (WebCore::AccessibilityTable::init):
254         * accessibility/AccessibilityTable.h:
255         (AccessibilityTable):
256         * accessibility/mac/AXObjectCacheMac.mm:
257         (WebCore::AXObjectCache::postPlatformNotification):
258         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
259         (createAccessibilityRoleMap):
260
261 2013-02-14  Bear Travis  <betravis@adobe.com>
262
263         Make outside-shape the default value for shape-inside
264         https://bugs.webkit.org/show_bug.cgi?id=109605
265
266         Reviewed by Levi Weintraub.
267
268         Creating a single reference outside-shape value and setting it as the default
269         for shape-inside.
270
271         Existing tests cover the default value, just updating them to use outside-shape.
272
273         * rendering/style/RenderStyle.cpp:
274         (WebCore::RenderStyle::initialShapeInside): Define a local static outside-shape
275         value.
276         (WebCore):
277         * rendering/style/RenderStyle.h: Move the initialShapeInside method to the .cpp
278         file.
279
280 2013-02-14  Min Qin  <qinmin@chromium.org>
281
282         Passing alpha to DeferredImageDecoder once decoding completes
283         https://bugs.webkit.org/show_bug.cgi?id=108892
284
285         Reviewed by Stephen White.
286
287         We should pass hasAlpha value back to the DeferredImageDecoder once decoding is completed
288         Added unit tests in ImageFrameGeneratorTest.
289
290         * platform/graphics/chromium/DeferredImageDecoder.cpp:
291         (WebCore::DeferredImageDecoder::frameHasAlphaAtIndex):
292         * platform/graphics/chromium/ImageFrameGenerator.cpp:
293         (WebCore::ImageFrameGenerator::tryToScale):
294         (WebCore::ImageFrameGenerator::decode):
295         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
296         (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
297         (WebCore::LazyDecodingPixelRef::onUnlockPixels):
298         * platform/graphics/chromium/LazyDecodingPixelRef.h:
299         (WebCore::LazyDecodingPixelRef::hasAlpha):
300         (LazyDecodingPixelRef):
301         * platform/graphics/chromium/ScaledImageFragment.cpp:
302         (WebCore::ScaledImageFragment::ScaledImageFragment):
303         * platform/graphics/chromium/ScaledImageFragment.h:
304         (WebCore::ScaledImageFragment::create):
305         (ScaledImageFragment):
306         (WebCore::ScaledImageFragment::hasAlpha):
307
308 2013-02-14  David Grogan  <dgrogan@chromium.org>
309
310         IndexedDB: Add a few more histogram calls
311         https://bugs.webkit.org/show_bug.cgi?id=109762
312
313         Reviewed by Tony Chang.
314
315         A few places where commits could fail weren't being logged.
316
317         * Modules/indexeddb/IDBBackingStore.cpp:
318         (WebCore::IDBBackingStore::deleteDatabase):
319         (WebCore::IDBBackingStore::Transaction::commit):
320
321 2013-02-14  Tony Chang  <tony@chromium.org>
322
323         Padding and border changes doesn't trigger relayout of children
324         https://bugs.webkit.org/show_bug.cgi?id=109639
325
326         Reviewed by Kent Tamura.
327
328         In RenderBlock::layoutBlock, we only relayout our children if our logical width
329         changes. This misses cases where our logical width doesn't change (i.e., padding
330         or border changes), but our content width does change.
331
332         This is a more general case of bug 104997.
333
334         Test: fast/block/dynamic-padding-border.html
335
336         * rendering/RenderBox.cpp:
337         (WebCore::borderOrPaddingLogicalWidthChanged): Only check if the logical width changed.
338         (WebCore::RenderBox::styleDidChange): Drop the border-box condition since this can happen
339         even without border-box box sizing.
340
341 2013-02-14  Peter Rybin  <prybin@chromium.org>
342
343         Web Inspector: fix closure compilation warnings caused by setVariableValue change
344         https://bugs.webkit.org/show_bug.cgi?id=109488
345
346         Reviewed by Pavel Feldman.
347
348         Annotations are fixed as required by closure compiler.
349         Parameters in Inspector.json are reordered as required.
350
351         * inspector/InjectedScriptExterns.js:
352         (InjectedScriptHost.prototype.setFunctionVariableValue):
353         (JavaScriptCallFrame.prototype.setVariableValue):
354         * inspector/InjectedScriptSource.js:
355         (.):
356         * inspector/Inspector.json:
357         * inspector/InspectorDebuggerAgent.cpp:
358         (WebCore::InspectorDebuggerAgent::setVariableValue):
359         * inspector/InspectorDebuggerAgent.h:
360         (InspectorDebuggerAgent):
361
362 2013-02-14  Tommy Widenflycht  <tommyw@google.com>
363
364         MediaStream API: RTCDataChannel triggers a use-after-free
365         https://bugs.webkit.org/show_bug.cgi?id=109806
366
367         Reviewed by Adam Barth.
368
369         Making sure RTCPeerConnection::stop() is always called at least once.
370         Also making sure that RTCDataChannels state gets set to Closed correctly.
371
372         Hard to test in WebKit but covered by Chromium tests.
373
374         * Modules/mediastream/RTCDataChannel.cpp:
375         (WebCore::RTCDataChannel::stop):
376         * Modules/mediastream/RTCPeerConnection.cpp:
377         (WebCore::RTCPeerConnection::~RTCPeerConnection):
378         (WebCore::RTCPeerConnection::stop):
379
380 2013-02-14  Vsevolod Vlasov  <vsevik@chromium.org>
381
382         Web Inspector: [Regression] When several consecutive characters are typed each of them is marked as undoable state.
383         https://bugs.webkit.org/show_bug.cgi?id=109823
384
385         Reviewed by Pavel Feldman.
386
387         * inspector/front-end/TextEditorModel.js:
388         (WebInspector.TextEditorModel.endsWithBracketRegex.):
389
390 2013-02-14  Sheriff Bot  <webkit.review.bot@gmail.com>
391
392         Unreviewed, rolling out r142820.
393         http://trac.webkit.org/changeset/142820
394         https://bugs.webkit.org/show_bug.cgi?id=109839
395
396         Causing crashes on chromium canaries (Requested by atwilson_
397         on #webkit).
398
399         * dom/Document.cpp:
400         (WebCore::Document::updateLayout):
401         (WebCore::Document::implicitClose):
402         * rendering/RenderQuote.h:
403         (RenderQuote):
404         * rendering/RenderView.cpp:
405         * rendering/RenderView.h:
406
407 2013-02-14  Mario Sanchez Prada  <mario.prada@samsung.com>
408
409         [GTK] Missing call to g_object_ref while retrieving accessible table cells
410         https://bugs.webkit.org/show_bug.cgi?id=106903
411
412         Reviewed by Martin Robinson.
413
414         Add missing extra ref to implementation of atk_table_ref_at().
415
416         Test: accessibility/table-cell-for-column-and-row-crash.html
417
418         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
419         (webkitAccessibleTableRefAt): This method transfers full ownership
420         over the returned AtkObject, so an extra reference is needed here.
421
422 2013-02-14  Mike Fenton  <mifenton@rim.com>
423
424         [BlackBerry] Update keyboard event details to match platform details.
425         https://bugs.webkit.org/show_bug.cgi?id=109693
426
427         Reviewed by Yong Li.
428
429         PR 220170.
430
431         Update the keyboard event details to match the
432         platform details available.
433
434         Rename helper function to better describe the conversion.
435
436         Reviewed Internally by Nima Ghanavatian and Gen Mak.
437
438         * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
439         (WebCore::windowsKeyCodeForBlackBerryKeycode):
440         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
441
442 2013-02-08  Andrey Kosyakov  <caseq@chromium.org>
443
444         Web Inspector: expose did{Begin,Cancel}Frame() and {will,did}Composite() on WebDebToolsAgent
445         https://bugs.webkit.org/show_bug.cgi?id=109192
446
447         Reviewed by Pavel Feldman.
448
449         - remove frame and compositing instrumentation methods from InspectorInstrumentation;
450         - expose those methods on InspectorController instead.
451
452         * WebCore.exp.in:
453         * inspector/InspectorController.cpp:
454         (WebCore::InspectorController::didBeginFrame):
455         (WebCore):
456         (WebCore::InspectorController::didCancelFrame):
457         (WebCore::InspectorController::willComposite):
458         (WebCore::InspectorController::didComposite):
459         * inspector/InspectorController.h:
460         (InspectorController):
461         * inspector/InspectorInstrumentation.cpp:
462         (WebCore):
463         * inspector/InspectorInstrumentation.h:
464         (InspectorInstrumentation):
465         * testing/Internals.cpp:
466         (WebCore::Internals::emitInspectorDidBeginFrame):
467         (WebCore::Internals::emitInspectorDidCancelFrame):
468
469 2013-02-14  Vladislav Kaznacheev  <kaznacheev@chromium.org>
470
471         Web Inspector: Fixed a layout regression in CanvasProfileView.
472         https://bugs.webkit.org/show_bug.cgi?id=109835
473
474         Reviewed by Pavel Feldman.
475
476         Changed splitView.css to supported nested SplitView instances.
477
478         * inspector/front-end/splitView.css:
479         (.split-view-vertical > .split-view-contents):
480         (.split-view-vertical > .split-view-contents-first):
481         (.split-view-vertical > .split-view-contents-first.maximized):
482         (.split-view-vertical > .split-view-contents-second):
483         (.split-view-vertical > .split-view-contents-second.maximized):
484         (.split-view-horizontal > .split-view-contents):
485         (.split-view-horizontal > .split-view-contents-first):
486         (.split-view-horizontal > .split-view-contents-first.maximized):
487         (.split-view-horizontal > .split-view-contents-second):
488         (.split-view-horizontal > .split-view-contents-second.maximized):
489         (.split-view-vertical > .split-view-sidebar.split-view-contents-first:not(.maximized)):
490         (.split-view-vertical > .split-view-sidebar.split-view-contents-second:not(.maximized)):
491         (.split-view-horizontal > .split-view-sidebar.split-view-contents-first:not(.maximized)):
492         (.split-view-horizontal > .split-view-sidebar.split-view-contents-second:not(.maximized)):
493         (.split-view-vertical > .split-view-resizer):
494         (.split-view-horizontal > .split-view-resizer):
495
496 2013-02-14  Vladislav Kaznacheev  <kaznacheev@chromium.org>
497
498         Web Inspector: Color picker should not be available in Computed Styles pane.
499         https://bugs.webkit.org/show_bug.cgi?id=109697
500
501         Reviewed by Alexander Pavlov.
502
503         Changed the parentPane parameter of WebInspector.ComputedStylePropertiesSection to the correct value
504         (the ComputedStyleSidebarPane instance).
505
506         * inspector/front-end/StylesSidebarPane.js:
507         (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules):
508
509 2013-02-14  Yury Semikhatsky  <yurys@chromium.org>
510
511         Web Inspector: don't create static local string for program literal in InspectorTimelineAgent
512         https://bugs.webkit.org/show_bug.cgi?id=109811
513
514         Reviewed by Pavel Feldman.
515
516         Use const char* constant value instead of creating String from it in thread-unsafe
517         static local variable.
518
519         * inspector/InspectorTimelineAgent.cpp:
520         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
521
522 2013-02-14  Pan Deng  <pan.deng@intel.com>
523
524         [Web Inspector] Fix initiator name issue in reload scenario for Network Panel.
525         https://bugs.webkit.org/show_bug.cgi?id=108746.
526
527         Reviewed by Vsevolod Vlasov.
528
529         WebInspector.displayNameForURL() does not work as expected in the reload scenario,
530         for example, "http://www.yahoo.com/" was trimed to "/" at one time, but at another,
531         the full host name will be displayed.
532         This fix return host + "/" in the issue scenario, and keep with get displayName() in ParsedURL.
533
534         No new tests.
535
536         * inspector/front-end/ParsedURL.js:
537         (WebInspector.ParsedURL.prototype.get displayName): append "/" in the display host scenario.
538         * inspector/front-end/ResourceUtils.js:
539         (WebInspector.displayNameForURL): add host in the head if url trimed as a "/".
540
541 2013-02-14  Alexei Filippov  <alph@chromium.org>
542
543         Web Inspector: fix to record button remaining red after heap snapshot is taken
544         https://bugs.webkit.org/show_bug.cgi?id=109804
545
546         Reviewed by Yury Semikhatsky.
547
548         Revert part of r142243 fix. Namely heap snapshot taking button made
549         stateless as it was before.
550
551         * inspector/front-end/HeapSnapshotView.js:
552         (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
553         * inspector/front-end/ProfilesPanel.js:
554         (WebInspector.ProfilesPanel.prototype.toggleRecordButton):
555
556 2013-02-14  Alexander Pavlov  <apavlov@chromium.org>
557
558         Web Inspector: Consistently use SecurityOrigin::toRawString() for serialization across the backend code
559         https://bugs.webkit.org/show_bug.cgi?id=109801
560
561         Reviewed by Yury Semikhatsky.
562
563         No new tests, as existing tests cover the change.
564
565         * inspector/InspectorAgent.cpp:
566         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
567         * inspector/InspectorIndexedDBAgent.cpp:
568         (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
569         * inspector/InspectorPageAgent.cpp:
570         (WebCore::InspectorPageAgent::buildObjectForFrame):
571         * inspector/PageRuntimeAgent.cpp:
572         (WebCore::PageRuntimeAgent::notifyContextCreated):
573
574 2013-02-14  Sergio Villar Senin  <svillar@igalia.com>
575
576         Add logging support to IndexedDB for non-Chromium platforms
577         https://bugs.webkit.org/show_bug.cgi?id=109809
578
579         Reviewed by Kentaro Hara.
580
581         Enable logging of IndexedDB through the StorageAPI log channel for
582         non-Chromium architectures.
583
584         No new tests required, we're just enabling logging for IndexedDB
585         using the currently available logging framework.
586
587         * Modules/indexeddb/IDBTracing.h:
588
589 2013-02-14  Vsevolod Vlasov  <vsevik@chromium.org>
590
591         Web Inspector: Remove uriForFile and fileForURI methods from FileSystemMapping.
592         https://bugs.webkit.org/show_bug.cgi?id=109704
593
594         Reviewed by Alexander Pavlov.
595
596         Replaced this methods with one line implementation on the only call site.
597
598         * inspector/front-end/FileSystemMapping.js:
599         * inspector/front-end/FileSystemProjectDelegate.js:
600         (WebInspector.FileSystemProjectDelegate.prototype._filePathForURI):
601         (WebInspector.FileSystemProjectDelegate.prototype.setFileContent):
602         (WebInspector.FileSystemProjectDelegate.prototype._populate.filesLoaded):
603         (WebInspector.FileSystemProjectDelegate.prototype._populate):
604
605 2013-02-14  Anton Vayvod  <avayvod@chromium.org>
606
607         [Text Autosizing] Process narrow descendants with the same multiplier for the font size.
608         https://bugs.webkit.org/show_bug.cgi?id=109573
609
610         Reviewed by Julien Chaffraix.
611
612         Combine narrow descendants of the same autosizing cluster into a group that is autosized
613         with the same multiplier.
614
615         For example, on sites with a sidebar, sometimes the paragraphs next to the sidebar will have
616         a large margin individually applied (via a CSS selector), causing them all to individually
617         appear narrower than their enclosing blockContainingAllText. Rather than making each of
618         these paragraphs into a separate cluster, we want them all to share the same multiplier, as
619         if they were a single cluster.
620
621         Test: fast/text-autosizing/narrow-descendants-combined.html
622
623         * rendering/TextAutosizer.cpp:
624         (WebCore::TextAutosizer::processClusterInternal):
625
626             Common implementation for processCluster() and processCompositeCluster that accepts the
627             text width and whether the cluster should be autosized as parameters instead of
628             calculating it inline.
629
630         (WebCore::TextAutosizer::processCluster):
631
632             Calculates the text width for a single cluster and whether it should be autosized, then
633             calls processClusterInternal() to apply the multiplier and process the cluster's
634             descendants.
635
636         (WebCore::TextAutosizer::processCompositeCluster):
637
638             Calculates the text width for a group of renderers and if the group should be autosized,
639             then calls processClusterInternal() repeatedly with the same multiplier to apply it and
640             process all the descendants of the group.
641
642         (WebCore::TextAutosizer::clusterShouldBeAutosized):
643
644             Calls the multiple renderers version to avoid code duplication.
645
646         (WebCore::TextAutosizer::compositeClusterShouldBeAutosized):
647
648             The multiple renderers version of clusterShouldBeAutosized.
649
650         * rendering/TextAutosizer.h:
651
652             Updated method declarations.
653
654 2013-02-14  Andrey Adaikin  <aandrey@chromium.org>
655
656         Look into possibilities of typedef in webkit idl files
657         https://bugs.webkit.org/show_bug.cgi?id=52340
658
659         Reviewed by Kentaro Hara.
660
661         Add typedef support for WebKit IDL parser.
662         Drive by: fixed a bug of generating "unrestrictedfloat" without a space.
663
664         Added a new IDL test TestTypedefs.idl. The results were generated without typedefs.
665
666         * bindings/scripts/IDLParser.pm:
667         (assertNoExtendedAttributesInTypedef):
668         (parseDefinitions):
669         (applyTypedefs):
670         (applyTypedefsForSignature):
671         (parseTypedef):
672         (parseUnrestrictedFloatType):
673         * bindings/scripts/test/CPP/WebDOMTestTypedefs.cpp: Added.
674         (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate::WebDOMTestTypedefsPrivate):
675         (WebDOMTestTypedefs::WebDOMTestTypedefsPrivate):
676         (WebDOMTestTypedefs::WebDOMTestTypedefs):
677         (WebDOMTestTypedefs::operator=):
678         (WebDOMTestTypedefs::impl):
679         (WebDOMTestTypedefs::~WebDOMTestTypedefs):
680         (WebDOMTestTypedefs::unsignedLongLongAttr):
681         (WebDOMTestTypedefs::setUnsignedLongLongAttr):
682         (WebDOMTestTypedefs::immutableSerializedScriptValue):
683         (WebDOMTestTypedefs::setImmutableSerializedScriptValue):
684         (WebDOMTestTypedefs::func):
685         (WebDOMTestTypedefs::multiTransferList):
686         (WebDOMTestTypedefs::setShadow):
687         (WebDOMTestTypedefs::nullableArrayArg):
688         (WebDOMTestTypedefs::immutablePointFunction):
689         (toWebCore):
690         (toWebKit):
691         * bindings/scripts/test/CPP/WebDOMTestTypedefs.h: Added.
692         (WebCore):
693         (WebDOMTestTypedefs):
694         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp: Added.
695         (_WebKitDOMTestTypedefsPrivate):
696         (WebKit):
697         (WebKit::kit):
698         (WebKit::core):
699         (WebKit::wrapTestTypedefs):
700         (webkit_dom_test_typedefs_finalize):
701         (webkit_dom_test_typedefs_set_property):
702         (webkit_dom_test_typedefs_get_property):
703         (webkit_dom_test_typedefs_constructor):
704         (webkit_dom_test_typedefs_class_init):
705         (webkit_dom_test_typedefs_init):
706         (webkit_dom_test_typedefs_func):
707         (webkit_dom_test_typedefs_multi_transfer_list):
708         (webkit_dom_test_typedefs_set_shadow):
709         (webkit_dom_test_typedefs_nullable_array_arg):
710         (webkit_dom_test_typedefs_immutable_point_function):
711         (webkit_dom_test_typedefs_string_array_function):
712         (webkit_dom_test_typedefs_get_unsigned_long_long_attr):
713         (webkit_dom_test_typedefs_set_unsigned_long_long_attr):
714         (webkit_dom_test_typedefs_get_immutable_serialized_script_value):
715         (webkit_dom_test_typedefs_set_immutable_serialized_script_value):
716         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h: Added.
717         (_WebKitDOMTestTypedefs):
718         (_WebKitDOMTestTypedefsClass):
719         * bindings/scripts/test/GObject/WebKitDOMTestTypedefsPrivate.h: Added.
720         (WebKit):
721         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Added.
722         (WebCore):
723         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
724         (WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
725         (WebCore::JSTestTypedefsConstructor::finishCreation):
726         (WebCore::JSTestTypedefsConstructor::getOwnPropertySlot):
727         (WebCore::JSTestTypedefsConstructor::getOwnPropertyDescriptor):
728         (WebCore::JSTestTypedefsConstructor::getConstructData):
729         (WebCore::JSTestTypedefsPrototype::self):
730         (WebCore::JSTestTypedefsPrototype::getOwnPropertySlot):
731         (WebCore::JSTestTypedefsPrototype::getOwnPropertyDescriptor):
732         (WebCore::JSTestTypedefs::JSTestTypedefs):
733         (WebCore::JSTestTypedefs::finishCreation):
734         (WebCore::JSTestTypedefs::createPrototype):
735         (WebCore::JSTestTypedefs::destroy):
736         (WebCore::JSTestTypedefs::~JSTestTypedefs):
737         (WebCore::JSTestTypedefs::getOwnPropertySlot):
738         (WebCore::JSTestTypedefs::getOwnPropertyDescriptor):
739         (WebCore::jsTestTypedefsUnsignedLongLongAttr):
740         (WebCore::jsTestTypedefsImmutableSerializedScriptValue):
741         (WebCore::jsTestTypedefsConstructorTestSubObj):
742         (WebCore::jsTestTypedefsConstructor):
743         (WebCore::JSTestTypedefs::put):
744         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
745         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
746         (WebCore::JSTestTypedefs::getConstructor):
747         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
748         (WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList):
749         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
750         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
751         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
752         (WebCore::jsTestTypedefsPrototypeFunctionFuncWithClamp):
753         (WebCore::jsTestTypedefsPrototypeFunctionImmutablePointFunction):
754         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
755         (WebCore::isObservable):
756         (WebCore::JSTestTypedefsOwner::isReachableFromOpaqueRoots):
757         (WebCore::JSTestTypedefsOwner::finalize):
758         (WebCore::toJS):
759         (WebCore::toTestTypedefs):
760         * bindings/scripts/test/JS/JSTestTypedefs.h: Added.
761         (WebCore):
762         (JSTestTypedefs):
763         (WebCore::JSTestTypedefs::create):
764         (WebCore::JSTestTypedefs::createStructure):
765         (WebCore::JSTestTypedefs::impl):
766         (WebCore::JSTestTypedefs::releaseImpl):
767         (WebCore::JSTestTypedefs::releaseImplIfNotNull):
768         (JSTestTypedefsOwner):
769         (WebCore::wrapperOwner):
770         (WebCore::wrapperContext):
771         (JSTestTypedefsPrototype):
772         (WebCore::JSTestTypedefsPrototype::create):
773         (WebCore::JSTestTypedefsPrototype::createStructure):
774         (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
775         (JSTestTypedefsConstructor):
776         (WebCore::JSTestTypedefsConstructor::create):
777         (WebCore::JSTestTypedefsConstructor::createStructure):
778         * bindings/scripts/test/ObjC/DOMTestTypedefs.h: Added.
779         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm: Added.
780         (-[DOMTestTypedefs dealloc]):
781         (-[DOMTestTypedefs finalize]):
782         (-[DOMTestTypedefs unsignedLongLongAttr]):
783         (-[DOMTestTypedefs setUnsignedLongLongAttr:]):
784         (-[DOMTestTypedefs immutableSerializedScriptValue]):
785         (-[DOMTestTypedefs setImmutableSerializedScriptValue:]):
786         (-[DOMTestTypedefs multiTransferList:tx:second:txx:]):
787         (-[DOMTestTypedefs setShadow:height:blur:color:alpha:]):
788         (-[DOMTestTypedefs immutablePointFunction]):
789         (core):
790         (kit):
791         * bindings/scripts/test/ObjC/DOMTestTypedefsInternal.h: Added.
792         (WebCore):
793         * bindings/scripts/test/TestTypedefs.idl: Added.
794         * bindings/scripts/test/V8/V8TestTypedefs.cpp: Added.
795         (WebCore):
796         (WebCore::checkTypeOrDieTrying):
797         (TestTypedefsV8Internal):
798         (WebCore::TestTypedefsV8Internal::V8_USE):
799         (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrGetter):
800         (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrSetter):
801         (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrGetter):
802         (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetter):
803         (WebCore::TestTypedefsV8Internal::TestTypedefsConstructorGetter):
804         (WebCore::TestTypedefsV8Internal::TestTypedefsReplaceableAttrSetter):
805         (WebCore::TestTypedefsV8Internal::funcCallback):
806         (WebCore::TestTypedefsV8Internal::multiTransferListCallback):
807         (WebCore::TestTypedefsV8Internal::setShadowCallback):
808         (WebCore::TestTypedefsV8Internal::methodWithSequenceArgCallback):
809         (WebCore::TestTypedefsV8Internal::nullableArrayArgCallback):
810         (WebCore::TestTypedefsV8Internal::funcWithClampCallback):
811         (WebCore::TestTypedefsV8Internal::immutablePointFunctionCallback):
812         (WebCore::TestTypedefsV8Internal::stringArrayFunctionCallback):
813         (WebCore::V8TestTypedefs::constructorCallback):
814         (WebCore::ConfigureV8TestTypedefsTemplate):
815         (WebCore::V8TestTypedefs::GetRawTemplate):
816         (WebCore::V8TestTypedefs::GetTemplate):
817         (WebCore::V8TestTypedefs::HasInstance):
818         (WebCore::V8TestTypedefs::createWrapper):
819         (WebCore::V8TestTypedefs::derefObject):
820         * bindings/scripts/test/V8/V8TestTypedefs.h: Added.
821         (WebCore):
822         (V8TestTypedefs):
823         (WebCore::V8TestTypedefs::toNative):
824         (WebCore::V8TestTypedefs::installPerContextProperties):
825         (WebCore::V8TestTypedefs::installPerContextPrototypeProperties):
826         (WebCore::wrap):
827         (WebCore::toV8):
828         (WebCore::toV8Fast):
829
830 2013-02-13  Kentaro Hara  <haraken@chromium.org>
831
832         [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(),
833         and XXXAccessorSetter() to XXXAttrSetterCustom()
834         https://bugs.webkit.org/show_bug.cgi?id=109679
835
836         Reviewed by Adam Barth.
837
838         For naming consistency and clarification.
839
840         No tests. No change in behavior.
841
842         * bindings/scripts/CodeGeneratorV8.pm:
843         (GenerateHeader):
844         (GenerateHeaderCustomCall):
845         (GenerateNormalAttrGetter):
846         (GenerateNormalAttrSetter):
847         (GenerateImplementation):
848         * bindings/scripts/test/V8/V8TestInterface.cpp:
849         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
850         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
851         * bindings/scripts/test/V8/V8TestObj.cpp:
852         (WebCore::TestObjV8Internal::customAttrAttrGetter):
853         (WebCore::TestObjV8Internal::customAttrAttrSetter):
854         * bindings/scripts/test/V8/V8TestObj.h:
855         (V8TestObj):
856         * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
857         (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom):
858         * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp:
859         (WebCore::V8BiquadFilterNode::typeAttrSetterCustom):
860         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
861         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrGetterCustom):
862         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrSetterCustom):
863         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrGetterCustom):
864         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrSetterCustom):
865         * bindings/v8/custom/V8ClipboardCustom.cpp:
866         (WebCore::V8Clipboard::typesAttrGetterCustom):
867         * bindings/v8/custom/V8CoordinatesCustom.cpp:
868         (WebCore::V8Coordinates::altitudeAttrGetterCustom):
869         (WebCore::V8Coordinates::altitudeAccuracyAttrGetterCustom):
870         (WebCore::V8Coordinates::headingAttrGetterCustom):
871         (WebCore::V8Coordinates::speedAttrGetterCustom):
872         * bindings/v8/custom/V8CustomEventCustom.cpp:
873         (WebCore::V8CustomEvent::detailAttrGetterCustom):
874         * bindings/v8/custom/V8DOMWindowCustom.cpp:
875         (WebCore::V8DOMWindow::eventAttrGetterCustom):
876         (WebCore::V8DOMWindow::eventAttrSetterCustom):
877         (WebCore::V8DOMWindow::locationAttrSetterCustom):
878         (WebCore::V8DOMWindow::openerAttrSetterCustom):
879         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
880         (WebCore::V8DeviceMotionEvent::accelerationAttrGetterCustom):
881         (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAttrGetterCustom):
882         (WebCore::V8DeviceMotionEvent::rotationRateAttrGetterCustom):
883         (WebCore::V8DeviceMotionEvent::intervalAttrGetterCustom):
884         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
885         (WebCore::V8DeviceOrientationEvent::alphaAttrGetterCustom):
886         (WebCore::V8DeviceOrientationEvent::betaAttrGetterCustom):
887         (WebCore::V8DeviceOrientationEvent::gammaAttrGetterCustom):
888         (WebCore::V8DeviceOrientationEvent::absoluteAttrGetterCustom):
889         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
890         (WebCore::V8Document::locationAttrGetterCustom):
891         (WebCore::V8Document::locationAttrSetterCustom):
892         * bindings/v8/custom/V8EventCustom.cpp:
893         (WebCore::V8Event::dataTransferAttrGetterCustom):
894         (WebCore::V8Event::clipboardDataAttrGetterCustom):
895         * bindings/v8/custom/V8FileReaderCustom.cpp:
896         (WebCore::V8FileReader::resultAttrGetterCustom):
897         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
898         (WebCore::V8HTMLDocument::allAttrSetterCustom):
899         * bindings/v8/custom/V8HTMLElementCustom.cpp:
900         (WebCore::V8HTMLElement::itemValueAttrGetterCustom):
901         (WebCore::V8HTMLElement::itemValueAttrSetterCustom):
902         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
903         (WebCore::V8HTMLFrameElement::locationAttrSetterCustom):
904         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
905         (WebCore::V8HTMLInputElement::selectionStartAttrGetterCustom):
906         (WebCore::V8HTMLInputElement::selectionStartAttrSetterCustom):
907         (WebCore::V8HTMLInputElement::selectionEndAttrGetterCustom):
908         (WebCore::V8HTMLInputElement::selectionEndAttrSetterCustom):
909         (WebCore::V8HTMLInputElement::selectionDirectionAttrGetterCustom):
910         (WebCore::V8HTMLInputElement::selectionDirectionAttrSetterCustom):
911         * bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
912         (WebCore::V8HTMLLinkElement::sizesAttrGetterCustom):
913         (WebCore::V8HTMLLinkElement::sizesAttrSetterCustom):
914         * bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
915         (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom):
916         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
917         (WebCore::V8HTMLOptionsCollection::lengthAttrSetterCustom):
918         * bindings/v8/custom/V8HistoryCustom.cpp:
919         (WebCore::V8History::stateAttrGetterCustom):
920         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
921         (WebCore::V8JavaScriptCallFrame::scopeChainAttrGetterCustom):
922         (WebCore::V8JavaScriptCallFrame::thisObjectAttrGetterCustom):
923         (WebCore::V8JavaScriptCallFrame::typeAttrGetterCustom):
924         * bindings/v8/custom/V8LocationCustom.cpp:
925         (WebCore::V8Location::hashAttrSetterCustom):
926         (WebCore::V8Location::hostAttrSetterCustom):
927         (WebCore::V8Location::hostnameAttrSetterCustom):
928         (WebCore::V8Location::hrefAttrSetterCustom):
929         (WebCore::V8Location::pathnameAttrSetterCustom):
930         (WebCore::V8Location::portAttrSetterCustom):
931         (WebCore::V8Location::protocolAttrSetterCustom):
932         (WebCore::V8Location::searchAttrSetterCustom):
933         (WebCore::V8Location::reloadAttrGetterCustom):
934         (WebCore::V8Location::replaceAttrGetterCustom):
935         (WebCore::V8Location::assignAttrGetterCustom):
936         * bindings/v8/custom/V8MessageEventCustom.cpp:
937         (WebCore::V8MessageEvent::dataAttrGetterCustom):
938         (WebCore::V8MessageEvent::portsAttrGetterCustom):
939         * bindings/v8/custom/V8OscillatorNodeCustom.cpp:
940         (WebCore::V8OscillatorNode::typeAttrSetterCustom):
941         * bindings/v8/custom/V8PannerNodeCustom.cpp:
942         (WebCore::V8PannerNode::panningModelAttrSetterCustom):
943         (WebCore::V8PannerNode::distanceModelAttrSetterCustom):
944         * bindings/v8/custom/V8PopStateEventCustom.cpp:
945         (WebCore::V8PopStateEvent::stateAttrGetterCustom):
946         * bindings/v8/custom/V8SVGLengthCustom.cpp:
947         (WebCore::V8SVGLength::valueAttrGetterCustom):
948         (WebCore::V8SVGLength::valueAttrSetterCustom):
949         * bindings/v8/custom/V8TrackEventCustom.cpp:
950         (WebCore::V8TrackEvent::trackAttrGetterCustom):
951         * bindings/v8/custom/V8WebKitAnimationCustom.cpp:
952         (WebCore::V8WebKitAnimation::iterationCountAttrGetterCustom):
953         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
954         (WebCore::V8XMLHttpRequest::responseTextAttrGetterCustom):
955         (WebCore::V8XMLHttpRequest::responseAttrGetterCustom):
956
957 2013-02-14  Yury Semikhatsky  <yurys@chromium.org>
958
959         Web Inspector: extract DOM counters graph implementation into its own class
960         https://bugs.webkit.org/show_bug.cgi?id=109796
961
962         Reviewed by Alexander Pavlov.
963
964         Extracted DOM counters graph implementation into DOMCountersGraph.js leaving
965         in MemoryStatistics.js only common parts shared with NativeMemoryGraph.js
966         Added some closure annotations and converted object literals into classes
967         with named constructors.
968
969         * WebCore.gypi:
970         * WebCore.vcproj/WebCore.vcproj:
971         * inspector/compile-front-end.py:
972         * inspector/front-end/DOMCountersGraph.js: Added.
973         (WebInspector.DOMCountersGraph):
974         (WebInspector.DOMCounterUI):
975         (WebInspector.DOMCountersGraph.Counter):
976         (WebInspector.DOMCounterUI.prototype.setRange):
977         (WebInspector.DOMCounterUI.prototype.updateCurrentValue):
978         (WebInspector.DOMCounterUI.prototype.clearCurrentValueAndMarker):
979         (WebInspector.DOMCounterUI.prototype.saveImageUnderMarker):
980         (WebInspector.DOMCounterUI.prototype.restoreImageUnderMarker):
981         (WebInspector.DOMCounterUI.prototype.discardImageUnderMarker):
982         (WebInspector.DOMCountersGraph.prototype._createCurrentValuesBar):
983         (WebInspector.DOMCountersGraph.prototype._createCounterUIList):
984         (WebInspector.DOMCountersGraph.prototype._createCounterUIList.getNodeCount):
985         (WebInspector.DOMCountersGraph.prototype._createCounterUIList.getListenerCount):
986         (WebInspector.DOMCountersGraph.prototype._canvasHeight):
987         (WebInspector.DOMCountersGraph.prototype._onRecordAdded):
988         (WebInspector.DOMCountersGraph.prototype._draw):
989         (WebInspector.DOMCountersGraph.prototype._restoreImageUnderMarker):
990         (WebInspector.DOMCountersGraph.prototype._saveImageUnderMarker):
991         (WebInspector.DOMCountersGraph.prototype._drawMarker):
992         (WebInspector.DOMCountersGraph.prototype._drawGraph):
993         (WebInspector.DOMCountersGraph.prototype._discardImageUnderMarker):
994         * inspector/front-end/MemoryStatistics.js:
995         (WebInspector.MemoryStatistics):
996         (WebInspector.MemoryStatistics.Counter):
997         (WebInspector.MemoryStatistics.prototype._createCurrentValuesBar):
998         (WebInspector.MemoryStatistics.prototype._createCounterUIList):
999         (WebInspector.MemoryStatistics.prototype.setTopPosition):
1000         (WebInspector.MemoryStatistics.prototype._canvasHeight):
1001         (WebInspector.MemoryStatistics.prototype._onRecordAdded):
1002         (WebInspector.MemoryStatistics.prototype._draw):
1003         (WebInspector.MemoryStatistics.prototype._onClick):
1004         (WebInspector.MemoryStatistics.prototype._onMouseOut):
1005         (WebInspector.MemoryStatistics.prototype._onMouseOver):
1006         (WebInspector.MemoryStatistics.prototype._onMouseMove):
1007         (WebInspector.MemoryStatistics.prototype._restoreImageUnderMarker):
1008         (WebInspector.MemoryStatistics.prototype._drawMarker):
1009         (WebInspector.MemoryStatistics.prototype._discardImageUnderMarker):
1010         * inspector/front-end/NativeMemoryGraph.js:
1011         (WebInspector.NativeMemoryGraph.Counter):
1012         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
1013         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
1014         (WebInspector.NativeMemoryGraph.prototype._draw):
1015         * inspector/front-end/TimelinePanel.js:
1016         * inspector/front-end/WebKit.qrc:
1017
1018 2013-02-14  Aivo Paas  <aivopaas@gmail.com>
1019
1020         Updating mouse cursor on style changes without emitting fake mousemove event
1021         https://bugs.webkit.org/show_bug.cgi?id=101857
1022
1023         Reviewed by Allan Sandfeld Jensen.
1024
1025         Mouse cursor changes in styles used to be reflected in UI through dispatching a fake
1026         mousemove event. The old approach has some flaws: it emits a mousemove event in
1027         javascript when there is no mouse movement involved (bug 85343); the fake mousemove
1028         event is cancelled while there is a mouse button held down - cursor won't change
1029         until mouse is moved or the button released (bug 53341); it has extra overhead of
1030         using a timer which was introduced to make scrolling smoother.
1031
1032         The new approach does not use the fake mousemove event. Instead, it uses only the logic
1033         needed for the actual cursor change to happen. This bypasses all the mousemove event related
1034         overhead. The remaining code is a stripped version of what was run through the mousemove
1035         event path. Everything that was not needed for changing a cursor is stripped off, everything
1036         that is needed, remains the same.
1037
1038         The call to update cursor was moved up in the call tree from RenderObject::StyleDidChange
1039         to RenderObject::SetStyle right after the StyleDidChange call. This allows to any updates
1040         and style propagations in StyleDidChange to happen and makes sure that a cursor change is
1041         not missed. Previous place was at the end of RenderObject::StyleDidChange, where it could
1042         have been missed because of an early exit. For example, cursor change on mousedown/up on
1043         a text node missed the correct cursor in the first pass.
1044
1045         Refactored EventHandler::selectCursor to not take a whole mouse event but instead work with
1046         HitTestResult so that EventHandler::updateCursor must not create a useless PlatformEvent.
1047
1048         Fixes: https://bugs.webkit.org/show_bug.cgi?id=85343 (mousemove event on cursor change)
1049                https://bugs.webkit.org/show_bug.cgi?id=53341 (no cursor change when mouse button down)
1050
1051         Tests: fast/events/mouse-cursor-change.html
1052                fast/events/mouse-cursor-no-mousemove.html
1053
1054         * page/EventHandler.cpp:
1055         (WebCore::EventHandler::updateCursor): Newly added method for updating mouse cursor
1056         (WebCore):
1057         (WebCore::EventHandler::selectCursor):
1058         (WebCore::EventHandler::handleMouseMoveEvent):
1059         * page/EventHandler.h:
1060         (EventHandler):
1061         * rendering/RenderObject.cpp:
1062         (WebCore::areNonIdenticalCursorListsEqual):
1063         (WebCore):
1064         (WebCore::areCursorsEqual):
1065         (WebCore::RenderObject::setStyle):
1066         (WebCore::RenderObject::styleDidChange):
1067
1068 2013-02-13  Ilya Tikhonovsky  <loislo@chromium.org>
1069
1070         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.
1071         https://bugs.webkit.org/show_bug.cgi?id=109703
1072
1073         Also we need to traverse the tree from the top root element down to the leaves.
1074
1075         Reviewed by Yury Semikhatsky.
1076
1077         * dom/ContainerNode.cpp:
1078         (WebCore::ContainerNode::reportMemoryUsage):
1079         * dom/Node.cpp:
1080         (WebCore::Node::reportMemoryUsage):
1081         * inspector/InspectorMemoryAgent.cpp:
1082         (WebCore):
1083
1084 2013-02-13  Hayato Ito  <hayato@chromium.org>
1085
1086         [Shadow DOM] Implements a '::distributed()' pseudo element.
1087         https://bugs.webkit.org/show_bug.cgi?id=82169
1088
1089         Reviewed by Dimitri Glazkov.
1090
1091         Implements a '::distributed()' pseudo element.
1092         See the Shadow DOM specification and the filed bug for the detail.
1093
1094         - http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#selecting-nodes-distributed-to-insertion-points
1095         - https://www.w3.org/Bugs/Public/show_bug.cgi?id=19684
1096
1097         For example, suppose we are given the following DOM tree and shadow tree:
1098
1099         - <A>
1100           - <B>
1101             - <C>
1102
1103         [A's ShadowRoot]
1104           <D>
1105           - <style>
1106               E content::distributed(B C) { color: green; }
1107           - <E>
1108             - <content>  (Node B is distributed to this insertion point.)
1109
1110         In this case, the style rule defined in the shadow tree matches node 'C'.
1111
1112         A '::distributed()' pseudo element can not be a pseudo class since
1113         an intersection between matched_elements(some_selector) and
1114         matched_elements(some_selector::distributed(...)) is always an
1115         empty set. A '::distributed()' pseudo element is the first-ever
1116         *functional* pseudo element which takes a parameter, which can be
1117         a selector.
1118
1119         This rule crosses the shadow boundary from a shadow tree to the
1120         tree of its shadow host. That means a rule which includes
1121         '::distributed()' pseudo element is defined in shadow tree, but
1122         the node which is matched in the rule, the subject of the
1123         selector, is outside of the shadow tree. Therefore, we cannot
1124         predict where the subject of the selector will be beforehand.
1125         Current CSS implementation assumes the subject of the selector
1126         must exist in the current scope.
1127
1128         To overcome this issue, DocumentRuleSets now has a instance of
1129         ShadowDistributedRules class.  A style rule will be stored in this
1130         instance if the rule includes a '::distributed()' pseudo element.
1131         This class also keeps track of each RuleSet by mapping it with a
1132         scope where the rule was originally defined. In the example, the
1133         scope is A's ShadowRoot.  The scope is used to check whether the
1134         left-most matched element (in the example, it's a node 'E') exists
1135         in the scope.
1136
1137         Internally, a '::distributed' pseudo element is represented by a
1138         newly introduced 'ShadowDistributed' relation.  That makes an
1139         implementation of SelectorChecker::checkSelector() much simpler.
1140         A transformation from a distributed pseudo element to a
1141         ShadowDistributed is done in parsing stage of CSS.
1142
1143         Since '::distributed()' is an experimental feature, it's actually
1144         prefixed with '-webkit-' and guarded by SHADOW_DOM flag.
1145
1146         Tests: fast/dom/shadow/distributed-pseudo-element-for-shadow-element.html
1147                fast/dom/shadow/distributed-pseudo-element-match-all.html
1148                fast/dom/shadow/distributed-pseudo-element-match-descendant.html
1149                fast/dom/shadow/distributed-pseudo-element-nested.html
1150                fast/dom/shadow/distributed-pseudo-element-no-match.html
1151                fast/dom/shadow/distributed-pseudo-element-reprojection.html
1152                fast/dom/shadow/distributed-pseudo-element-scoped.html
1153                fast/dom/shadow/distributed-pseudo-element-support-selector.html
1154                fast/dom/shadow/distributed-pseudo-element-used-in-selector-list.html
1155                fast/dom/shadow/distributed-pseudo-element-with-any.html
1156                fast/dom/shadow/distributed-pseudo-element.html
1157
1158         * css/CSSGrammar.y.in:
1159         CSS Grammar was updated to support '::distrbuted(selector)'.
1160         This pseudo element is the first pseudo element which can take a selector as a parameter.
1161         * css/CSSParser.cpp:
1162         (WebCore::CSSParser::detectDashToken):
1163         (WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded):
1164         (WebCore::CSSParser::rewriteSpecifiersWithElementName):
1165         Here we are converting a '::distributed' pseudo element into a
1166         ShadowDistributed relation internally.  To support the conversion,
1167         these rewriteSpecifiersXXX functions (formally called
1168         updateSpecifiersXXX) now return the specifiers which may be
1169         converted.
1170         (WebCore::CSSParser::rewriteSpecifiers):
1171         * css/CSSParser.h:
1172         * css/CSSParserValues.cpp:
1173         (WebCore::CSSParserSelector::CSSParserSelector):
1174         * css/CSSParserValues.h:
1175         (CSSParserSelector):
1176         (WebCore::CSSParserSelector::functionArgumentSelector):
1177         To hold an intermediate selector which appears at the position of an argument in
1178         functional pseudo element when parsing CSS.
1179         (WebCore::CSSParserSelector::setFunctionArgumentSelector):
1180         (WebCore::CSSParserSelector::isDistributedPseudoElement):
1181         * css/CSSSelector.cpp:
1182         Add new pseudo element, PseudoDistributed, and its internal representation, ShadowDistributed relation.
1183         (WebCore::CSSSelector::pseudoId):
1184         (WebCore::nameToPseudoTypeMap):
1185         (WebCore::CSSSelector::extractPseudoType):
1186         (WebCore::CSSSelector::selectorText):
1187         * css/CSSSelector.h:
1188         (CSSSelector):
1189         (WebCore):
1190         (WebCore::CSSSelector::isDistributedPseudoElement):
1191         (WebCore::CSSSelector::isShadowDistributed):
1192         * css/CSSSelectorList.cpp:
1193         (WebCore):
1194         (SelectorHasShadowDistributed):
1195         (WebCore::SelectorHasShadowDistributed::operator()):
1196         (WebCore::CSSSelectorList::hasShadowDistributedAt):
1197         * css/CSSSelectorList.h:
1198         (CSSSelectorList):
1199         * css/DocumentRuleSets.cpp:
1200         (WebCore):
1201         (WebCore::ShadowDistributedRules::addRule):
1202         Every CSS rule which includes '::distributed(...)' should be managed by calling this function.
1203         (WebCore::ShadowDistributedRules::collectMatchRequests):
1204         (WebCore::DocumentRuleSets::resetAuthorStyle):
1205         * css/DocumentRuleSets.h:
1206         (WebCore):
1207         (ShadowDistributedRules):
1208         (WebCore::ShadowDistributedRules::clear):
1209         (DocumentRuleSets):
1210         (WebCore::DocumentRuleSets::shadowDistributedRules)
1211         DocumentRuleSets owns an instance of ShadowDistributedRules.
1212         * css/RuleSet.cpp:
1213         (WebCore::RuleSet::addChildRules):
1214         Updated to check whether the rule contains '::distributed()' or not.
1215         * css/SelectorChecker.cpp:
1216         (WebCore::SelectorChecker::match):
1217         Support ShadowDistributed relation. Check all possible insertion points where a node is distributed.
1218         * css/SelectorChecker.h:
1219         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
1220         Adds enum of BehaviorAtBoundary. '::distributed()' is the only
1221         rule which uses 'CrossedBoundary' since it is the only rule which
1222         crosses shadow boundaries.
1223         (SelectorCheckingContext):
1224         * css/SelectorFilter.cpp:
1225         (WebCore::SelectorFilter::collectIdentifierHashes):
1226         * css/StyleResolver.cpp:
1227         (WebCore::StyleResolver::collectMatchingRules):
1228         (WebCore::StyleResolver::matchAuthorRules):
1229         (WebCore::StyleResolver::collectMatchingRulesForList):
1230         (WebCore::StyleResolver::ruleMatches):
1231         * css/StyleResolver.h:
1232         (MatchRequest):
1233         (WebCore::MatchRequest::MatchRequest): Add behaviorAtBoundary field.
1234         (WebCore):
1235         (StyleResolver):
1236         * html/shadow/InsertionPoint.cpp:
1237         (WebCore::collectInsertionPointsWhereNodeIsDistributed):
1238         (WebCore):
1239         * html/shadow/InsertionPoint.h:
1240         (WebCore):
1241
1242 2013-02-13  Kentaro Hara  <haraken@chromium.org>
1243
1244         [V8] Generate wrapper methods for custom methods
1245         https://bugs.webkit.org/show_bug.cgi?id=109678
1246
1247         Reviewed by Adam Barth.
1248
1249         Currently V8 directly calls back custom methods written
1250         in custom binding files. This makes it impossible for code
1251         generators to hook custom methods (e.g. Code generators cannot
1252         insert a code for FeatureObservation into custom methods).
1253         To solve the problem, we should generate wrapper methods for
1254         custom methods.
1255
1256         No tests. No change in behavior.
1257
1258         * page/DOMWindow.idl: Removed overloaded methods. The fact that methods in an IDL
1259         file are overloaded but they are not overloaded in custom bindings confuses code
1260         generators. (For some reason, this problem hasn't appeared before this change.)
1261         * xml/XMLHttpRequest.idl: Ditto.
1262
1263         * bindings/scripts/CodeGeneratorV8.pm:
1264         (GenerateHeader):
1265         (GenerateDomainSafeFunctionGetter):
1266         (GenerateEventListenerCallback):
1267         (GenerateFunctionCallback):
1268         (GenerateNonStandardFunction):
1269         (GenerateImplementation):
1270         * bindings/scripts/test/V8/V8TestInterface.cpp:
1271         (WebCore::TestInterfaceV8Internal::supplementalMethod3Callback):
1272         (TestInterfaceV8Internal):
1273         (WebCore):
1274         * bindings/scripts/test/V8/V8TestObj.cpp:
1275         (WebCore::TestObjV8Internal::customMethodCallback):
1276         (TestObjV8Internal):
1277         (WebCore::TestObjV8Internal::customMethodWithArgsCallback):
1278         (WebCore::TestObjV8Internal::classMethod2Callback):
1279         (WebCore):
1280         (WebCore::ConfigureV8TestObjTemplate):
1281         * bindings/scripts/test/V8/V8TestObj.h:
1282         (V8TestObj):
1283         * bindings/v8/custom/V8ClipboardCustom.cpp:
1284         (WebCore::V8Clipboard::clearDataCallbackCustom):
1285         (WebCore::V8Clipboard::setDragImageCallbackCustom):
1286         * bindings/v8/custom/V8ConsoleCustom.cpp:
1287         (WebCore::V8Console::traceCallbackCustom):
1288         (WebCore::V8Console::assertCallbackCustom):
1289         (WebCore::V8Console::profileCallbackCustom):
1290         (WebCore::V8Console::profileEndCallbackCustom):
1291         * bindings/v8/custom/V8CryptoCustom.cpp:
1292         (WebCore::V8Crypto::getRandomValuesCallbackCustom):
1293         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
1294         (WebCore::V8DOMFormData::appendCallbackCustom):
1295         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1296         (WebCore::V8DOMWindow::addEventListenerCallbackCustom):
1297         (WebCore::V8DOMWindow::removeEventListenerCallbackCustom):
1298         (WebCore::V8DOMWindow::postMessageCallbackCustom):
1299         (WebCore::V8DOMWindow::toStringCallbackCustom):
1300         (WebCore::V8DOMWindow::releaseEventsCallbackCustom):
1301         (WebCore::V8DOMWindow::captureEventsCallbackCustom):
1302         (WebCore::V8DOMWindow::showModalDialogCallbackCustom):
1303         (WebCore::V8DOMWindow::openCallbackCustom):
1304         (WebCore::V8DOMWindow::setTimeoutCallbackCustom):
1305         (WebCore::V8DOMWindow::setIntervalCallbackCustom):
1306         * bindings/v8/custom/V8DataViewCustom.cpp:
1307         (WebCore::V8DataView::getInt8CallbackCustom):
1308         (WebCore::V8DataView::getUint8CallbackCustom):
1309         (WebCore::V8DataView::setInt8CallbackCustom):
1310         (WebCore::V8DataView::setUint8CallbackCustom):
1311         * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp:
1312         (WebCore::V8DedicatedWorkerContext::postMessageCallbackCustom):
1313         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
1314         (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallbackCustom):
1315         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
1316         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallbackCustom):
1317         * bindings/v8/custom/V8DocumentCustom.cpp:
1318         (WebCore::V8Document::evaluateCallbackCustom):
1319         (WebCore::V8Document::createTouchListCallbackCustom):
1320         * bindings/v8/custom/V8GeolocationCustom.cpp:
1321         (WebCore::V8Geolocation::getCurrentPositionCallbackCustom):
1322         (WebCore::V8Geolocation::watchPositionCallbackCustom):
1323         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp:
1324         (WebCore::V8HTMLAllCollection::itemCallbackCustom):
1325         (WebCore::V8HTMLAllCollection::namedItemCallbackCustom):
1326         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1327         (WebCore::V8HTMLCanvasElement::getContextCallbackCustom):
1328         (WebCore::V8HTMLCanvasElement::toDataURLCallbackCustom):
1329         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1330         (WebCore::V8HTMLDocument::writeCallbackCustom):
1331         (WebCore::V8HTMLDocument::writelnCallbackCustom):
1332         (WebCore::V8HTMLDocument::openCallbackCustom):
1333         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp:
1334         (WebCore::V8HTMLFormControlsCollection::namedItemCallbackCustom):
1335         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
1336         (WebCore::v8HTMLImageElementConstructorCallbackCustom):
1337         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
1338         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
1339         (WebCore::V8HTMLInputElement::setSelectionRangeCallbackCustom):
1340         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1341         (WebCore::V8HTMLOptionsCollection::namedItemCallbackCustom):
1342         (WebCore::V8HTMLOptionsCollection::removeCallbackCustom):
1343         (WebCore::V8HTMLOptionsCollection::addCallbackCustom):
1344         * bindings/v8/custom/V8HTMLSelectElementCustom.cpp:
1345         (WebCore::V8HTMLSelectElement::removeCallbackCustom):
1346         * bindings/v8/custom/V8HistoryCustom.cpp:
1347         (WebCore::V8History::pushStateCallbackCustom):
1348         (WebCore::V8History::replaceStateCallbackCustom):
1349         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1350         (WebCore::V8InjectedScriptHost::inspectedObjectCallbackCustom):
1351         (WebCore::V8InjectedScriptHost::internalConstructorNameCallbackCustom):
1352         (WebCore::V8InjectedScriptHost::isHTMLAllCollectionCallbackCustom):
1353         (WebCore::V8InjectedScriptHost::typeCallbackCustom):
1354         (WebCore::V8InjectedScriptHost::functionDetailsCallbackCustom):
1355         (WebCore::V8InjectedScriptHost::getInternalPropertiesCallbackCustom):
1356         (WebCore::V8InjectedScriptHost::getEventListenersCallbackCustom):
1357         (WebCore::V8InjectedScriptHost::inspectCallbackCustom):
1358         (WebCore::V8InjectedScriptHost::databaseIdCallbackCustom):
1359         (WebCore::V8InjectedScriptHost::storageIdCallbackCustom):
1360         (WebCore::V8InjectedScriptHost::evaluateCallbackCustom):
1361         (WebCore::V8InjectedScriptHost::setFunctionVariableValueCallbackCustom):
1362         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
1363         (WebCore::V8InspectorFrontendHost::platformCallbackCustom):
1364         (WebCore::V8InspectorFrontendHost::portCallbackCustom):
1365         (WebCore::V8InspectorFrontendHost::showContextMenuCallbackCustom):
1366         (WebCore::V8InspectorFrontendHost::recordActionTakenCallbackCustom):
1367         (WebCore::V8InspectorFrontendHost::recordPanelShownCallbackCustom):
1368         (WebCore::V8InspectorFrontendHost::recordSettingChangedCallbackCustom):
1369         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
1370         (WebCore::V8JavaScriptCallFrame::evaluateCallbackCustom):
1371         (WebCore::V8JavaScriptCallFrame::restartCallbackCustom):
1372         (WebCore::V8JavaScriptCallFrame::setVariableValueCallbackCustom):
1373         (WebCore::V8JavaScriptCallFrame::scopeTypeCallbackCustom):
1374         * bindings/v8/custom/V8LocationCustom.cpp:
1375         (WebCore::V8Location::reloadAccessorGetter):
1376         (WebCore::V8Location::replaceAccessorGetter):
1377         (WebCore::V8Location::assignAccessorGetter):
1378         (WebCore::V8Location::reloadCallbackCustom):
1379         (WebCore::V8Location::replaceCallbackCustom):
1380         (WebCore::V8Location::assignCallbackCustom):
1381         (WebCore::V8Location::valueOfCallbackCustom):
1382         (WebCore::V8Location::toStringCallbackCustom):
1383         * bindings/v8/custom/V8MessageEventCustom.cpp:
1384         (WebCore::V8MessageEvent::initMessageEventCallbackCustom):
1385         (WebCore::V8MessageEvent::webkitInitMessageEventCallbackCustom):
1386         * bindings/v8/custom/V8MessagePortCustom.cpp:
1387         (WebCore::V8MessagePort::postMessageCallbackCustom):
1388         * bindings/v8/custom/V8NodeCustom.cpp:
1389         (WebCore::V8Node::insertBeforeCallbackCustom):
1390         (WebCore::V8Node::replaceChildCallbackCustom):
1391         (WebCore::V8Node::removeChildCallbackCustom):
1392         (WebCore::V8Node::appendChildCallbackCustom):
1393         * bindings/v8/custom/V8NotificationCenterCustom.cpp:
1394         (WebCore::V8NotificationCenter::requestPermissionCallbackCustom):
1395         * bindings/v8/custom/V8NotificationCustom.cpp:
1396         (WebCore::V8Notification::requestPermissionCallbackCustom):
1397         * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp:
1398         (WebCore::V8SQLResultSetRowList::itemCallbackCustom):
1399         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
1400         (WebCore::V8SQLTransaction::executeSqlCallbackCustom):
1401         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
1402         (WebCore::V8SQLTransactionSync::executeSqlCallbackCustom):
1403         * bindings/v8/custom/V8SVGLengthCustom.cpp:
1404         (WebCore::V8SVGLength::convertToSpecifiedUnitsCallbackCustom):
1405         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1406         (WebCore::V8WebGLRenderingContext::getAttachedShadersCallbackCustom):
1407         (WebCore::V8WebGLRenderingContext::getBufferParameterCallbackCustom):
1408         (WebCore::V8WebGLRenderingContext::getExtensionCallbackCustom):
1409         (WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallbackCustom):
1410         (WebCore::V8WebGLRenderingContext::getParameterCallbackCustom):
1411         (WebCore::V8WebGLRenderingContext::getProgramParameterCallbackCustom):
1412         (WebCore::V8WebGLRenderingContext::getRenderbufferParameterCallbackCustom):
1413         (WebCore::V8WebGLRenderingContext::getShaderParameterCallbackCustom):
1414         (WebCore::V8WebGLRenderingContext::getSupportedExtensionsCallbackCustom):
1415         (WebCore::V8WebGLRenderingContext::getTexParameterCallbackCustom):
1416         (WebCore::V8WebGLRenderingContext::getUniformCallbackCustom):
1417         (WebCore::V8WebGLRenderingContext::getVertexAttribCallbackCustom):
1418         (WebCore::V8WebGLRenderingContext::uniform1fvCallbackCustom):
1419         (WebCore::V8WebGLRenderingContext::uniform1ivCallbackCustom):
1420         (WebCore::V8WebGLRenderingContext::uniform2fvCallbackCustom):
1421         (WebCore::V8WebGLRenderingContext::uniform2ivCallbackCustom):
1422         (WebCore::V8WebGLRenderingContext::uniform3fvCallbackCustom):
1423         (WebCore::V8WebGLRenderingContext::uniform3ivCallbackCustom):
1424         (WebCore::V8WebGLRenderingContext::uniform4fvCallbackCustom):
1425         (WebCore::V8WebGLRenderingContext::uniform4ivCallbackCustom):
1426         (WebCore::V8WebGLRenderingContext::uniformMatrix2fvCallbackCustom):
1427         (WebCore::V8WebGLRenderingContext::uniformMatrix3fvCallbackCustom):
1428         (WebCore::V8WebGLRenderingContext::uniformMatrix4fvCallbackCustom):
1429         (WebCore::V8WebGLRenderingContext::vertexAttrib1fvCallbackCustom):
1430         (WebCore::V8WebGLRenderingContext::vertexAttrib2fvCallbackCustom):
1431         (WebCore::V8WebGLRenderingContext::vertexAttrib3fvCallbackCustom):
1432         (WebCore::V8WebGLRenderingContext::vertexAttrib4fvCallbackCustom):
1433         * bindings/v8/custom/V8WorkerContextCustom.cpp:
1434         (WebCore::V8WorkerContext::importScriptsCallbackCustom):
1435         (WebCore::V8WorkerContext::setTimeoutCallbackCustom):
1436         (WebCore::V8WorkerContext::setIntervalCallbackCustom):
1437         * bindings/v8/custom/V8WorkerCustom.cpp:
1438         (WebCore::V8Worker::postMessageCallbackCustom):
1439         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1440         (WebCore::V8XMLHttpRequest::openCallbackCustom):
1441         (WebCore::V8XMLHttpRequest::sendCallbackCustom):
1442         * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
1443         (WebCore::V8XSLTProcessor::setParameterCallbackCustom):
1444         (WebCore::V8XSLTProcessor::getParameterCallbackCustom):
1445         (WebCore::V8XSLTProcessor::removeParameterCallbackCustom):
1446
1447 2013-02-13  Praveen R Jadhav  <praveen.j@samsung.com>
1448
1449         JSObject for ChannelSplitterNode and ChannelMergerNode are not created.
1450         https://bugs.webkit.org/show_bug.cgi?id=109542
1451
1452         Reviewed by Kentaro Hara.
1453
1454         "JSGenerateToJSObject" should be included in IDL files
1455         of ChannelSplitterNode and ChannelMergerNode in WebAudio.
1456         This ensures html files to access corresponding objects.
1457
1458         * Modules/webaudio/ChannelMergerNode.idl:
1459         * Modules/webaudio/ChannelSplitterNode.idl:
1460
1461 2013-02-13   Vineet Chaudhary  <rgf748@motorola.com>
1462
1463         [Regression] After r142831  collection-null-like-arguments.html layout test failing
1464         https://bugs.webkit.org/show_bug.cgi?id=109780
1465
1466         Reviewed by Kentaro Hara.
1467
1468         No new tests. LayoutTests/fast/dom/collection-null-like-arguments.html
1469         Should pass now.
1470
1471         * bindings/js/JSHTMLAllCollectionCustom.cpp: Return null for namedItem() only.
1472         (WebCore::getNamedItems):
1473         (WebCore::JSHTMLAllCollection::namedItem):
1474         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Ditto.
1475         (WebCore::getNamedItems):
1476         (WebCore::JSHTMLFormControlsCollection::namedItem):
1477         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Ditto.
1478         (WebCore::getNamedItems):
1479         (WebCore::JSHTMLOptionsCollection::namedItem):
1480
1481 2013-02-13  Soo-Hyun Choi  <sh9.choi@samsung.com>
1482
1483         Fix indentation error in MediaPlayerPrivateGStreamer.h
1484         https://bugs.webkit.org/show_bug.cgi?id=109768
1485
1486         Reviewed by Kentaro Hara.
1487
1488         No new tests as this patch just changes indentation style.
1489
1490         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1491         (MediaPlayerPrivateGStreamer):
1492         (WebCore::MediaPlayerPrivateGStreamer::hasVideo):
1493         (WebCore::MediaPlayerPrivateGStreamer::hasAudio):
1494         (WebCore::MediaPlayerPrivateGStreamer::engineDescription):
1495         (WebCore::MediaPlayerPrivateGStreamer::isLiveStream):
1496
1497 2013-02-13  Adam Barth  <abarth@webkit.org>
1498
1499         TokenPreloadScanner should be (mostly!) thread-safe
1500         https://bugs.webkit.org/show_bug.cgi?id=109760
1501
1502         Reviewed by Eric Seidel.
1503
1504         This patch makes the bulk of TokenPreloadScanner thread-safe.  The one
1505         remaining wart is processPossibleBaseTag because it wants to grub
1506         around in the base tag's attributes. I have a plan for that, but it's
1507         going to need to wait for the next patch.
1508
1509         * html/parser/HTMLPreloadScanner.cpp:
1510         (WebCore::isStartTag):
1511         (WebCore::isStartOrEndTag):
1512         (WebCore::TokenPreloadScanner::identifierFor):
1513         (WebCore::TokenPreloadScanner::inititatorFor):
1514         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
1515         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
1516         (TokenPreloadScanner::StartTagScanner):
1517         (WebCore::TokenPreloadScanner::processPossibleTemplateTag):
1518         (WebCore::TokenPreloadScanner::processPossibleStyleTag):
1519         (WebCore::TokenPreloadScanner::processPossibleBaseTag):
1520         (WebCore::TokenPreloadScanner::scan):
1521         (WebCore::HTMLPreloadScanner::scan):
1522         * html/parser/HTMLPreloadScanner.h:
1523         (WebCore):
1524
1525 2013-02-13  Adam Barth  <abarth@webkit.org>
1526
1527         StartTagScanner should be thread-safe
1528         https://bugs.webkit.org/show_bug.cgi?id=109750
1529
1530         Reviewed by Eric Seidel.
1531
1532         This patch weens the StartTagScanner off AtomicString using two
1533         techniques:
1534
1535         1) This patch creates an enum to represent the four tag names that the
1536            StartTagScanner needs to understand. Using an enum is better than
1537            using an AtomicString because we can use the enum on both the main
1538            thread and on the background thread.
1539
1540         2) For attributes, this patch uses threadSafeMatch. We're not able to
1541            use threadSafeMatch everywhere due to performance, but using it for
1542            attributes appears to be ok becaues we only call threadSafeMatch on
1543            the attributes of "interesting" tags.
1544
1545         I tested the performance of this patch using
1546         PerformanceTests/Parser/html-parser.html and did not see any slowdown.
1547         (There actually appeared to be a <1% speedup, but I'm attributing that
1548         to noise.)
1549
1550         * html/parser/HTMLPreloadScanner.cpp:
1551         (WebCore::identifierFor):
1552         (WebCore):
1553         (WebCore::inititatorFor):
1554         (WebCore::StartTagScanner::StartTagScanner):
1555         (WebCore::StartTagScanner::processAttributes):
1556         (StartTagScanner):
1557         (WebCore::StartTagScanner::createPreloadRequest):
1558         (WebCore::StartTagScanner::processAttribute):
1559         (WebCore::StartTagScanner::charset):
1560         (WebCore::StartTagScanner::resourceType):
1561         (WebCore::StartTagScanner::shouldPreload):
1562         (WebCore::HTMLPreloadScanner::processToken):
1563
1564 2013-02-13  Huang Dongsung  <luxtella@company100.net>
1565
1566         Coordinated Graphics: a long page is scaled vertically while loading.
1567         https://bugs.webkit.org/show_bug.cgi?id=109645
1568
1569         Reviewed by Noam Rosenthal.
1570
1571         When loading http://www.w3.org/TR/xpath-datamodel/, Coordinated Graphics draws
1572         vertically scaled contents. It is because there is the difference between the
1573         size of a layer and the size of CoordinatedBackingStore.
1574
1575         Currently, CoordinatedGraphicsScene notifies the size to CoordinatedBackingStore
1576         at the moment of creating, updating and removing a tile. However, it is not
1577         necessary to send tile-related messages when the size of layer is changed.
1578         So this patch resets the size of CoordinatedBackingStore when receiving the
1579         message that is created when the size is changed: SyncLayerState.
1580
1581         There is no current way to reliably test flicker issues.
1582
1583         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
1584           Add m_pendingSize to set m_size at the moment of flushing.
1585           After http://webkit.org/b/108294, m_pendingSize will be removed
1586           because the bug makes CoordinatedGraphicsScene execute all messages at
1587           the moment of flushing.
1588         (WebCore::CoordinatedBackingStore::setSize):
1589         (WebCore::CoordinatedBackingStore::commitTileOperations):
1590         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
1591         (CoordinatedBackingStore):
1592         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1593         (WebCore::CoordinatedGraphicsScene::prepareContentBackingStore):
1594         (WebCore::CoordinatedGraphicsScene::createBackingStoreIfNeeded):
1595         (WebCore::CoordinatedGraphicsScene::resetBackingStoreSizeToLayerSize):
1596         (WebCore::CoordinatedGraphicsScene::createTile):
1597         (WebCore::CoordinatedGraphicsScene::removeTile):
1598         (WebCore::CoordinatedGraphicsScene::updateTile):
1599
1600 2013-02-13  Kentaro Hara  <haraken@chromium.org>
1601
1602         [V8] Rename XXXAccessorGetter() to XXXAttrGetterCustom(),
1603         and XXXAccessorSetter() to XXXAttrSetterCustom()
1604         https://bugs.webkit.org/show_bug.cgi?id=109679
1605
1606         Reviewed by Adam Barth.
1607
1608         For naming consistency and clarification.
1609
1610         No tests. No change in behavior.
1611
1612         * bindings/scripts/CodeGeneratorV8.pm:
1613         (GenerateHeader):
1614         (GenerateHeaderCustomCall):
1615         (GenerateNormalAttrGetter):
1616         (GenerateNormalAttrSetter):
1617         (GenerateImplementation):
1618         * bindings/scripts/test/V8/V8TestInterface.cpp:
1619         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
1620         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
1621         * bindings/scripts/test/V8/V8TestObj.cpp:
1622         (WebCore::TestObjV8Internal::customAttrAttrGetter):
1623         (WebCore::TestObjV8Internal::customAttrAttrSetter):
1624         * bindings/scripts/test/V8/V8TestObj.h:
1625         (V8TestObj):
1626         * bindings/v8/custom/V8AudioBufferSourceNodeCustom.cpp:
1627         (WebCore::V8AudioBufferSourceNode::bufferAttrSetterCustom):
1628         * bindings/v8/custom/V8BiquadFilterNodeCustom.cpp:
1629         (WebCore::V8BiquadFilterNode::typeAttrSetterCustom):
1630         * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
1631         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrGetterCustom):
1632         (WebCore::V8CanvasRenderingContext2D::strokeStyleAttrSetterCustom):
1633         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrGetterCustom):
1634         (WebCore::V8CanvasRenderingContext2D::fillStyleAttrSetterCustom):
1635         * bindings/v8/custom/V8ClipboardCustom.cpp:
1636         (WebCore::V8Clipboard::typesAttrGetterCustom):
1637         * bindings/v8/custom/V8CoordinatesCustom.cpp:
1638         (WebCore::V8Coordinates::altitudeAttrGetterCustom):
1639         (WebCore::V8Coordinates::altitudeAccuracyAttrGetterCustom):
1640         (WebCore::V8Coordinates::headingAttrGetterCustom):
1641         (WebCore::V8Coordinates::speedAttrGetterCustom):
1642         * bindings/v8/custom/V8CustomEventCustom.cpp:
1643         (WebCore::V8CustomEvent::detailAttrGetterCustom):
1644         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1645         (WebCore::V8DOMWindow::eventAttrGetterCustom):
1646         (WebCore::V8DOMWindow::eventAttrSetterCustom):
1647         (WebCore::V8DOMWindow::locationAttrSetterCustom):
1648         (WebCore::V8DOMWindow::openerAttrSetterCustom):
1649         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
1650         (WebCore::V8DeviceMotionEvent::accelerationAttrGetterCustom):
1651         (WebCore::V8DeviceMotionEvent::accelerationIncludingGravityAttrGetterCustom):
1652         (WebCore::V8DeviceMotionEvent::rotationRateAttrGetterCustom):
1653         (WebCore::V8DeviceMotionEvent::intervalAttrGetterCustom):
1654         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
1655         (WebCore::V8DeviceOrientationEvent::alphaAttrGetterCustom):
1656         (WebCore::V8DeviceOrientationEvent::betaAttrGetterCustom):
1657         (WebCore::V8DeviceOrientationEvent::gammaAttrGetterCustom):
1658         (WebCore::V8DeviceOrientationEvent::absoluteAttrGetterCustom):
1659         * bindings/v8/custom/V8DocumentLocationCustom.cpp:
1660         (WebCore::V8Document::locationAttrGetterCustom):
1661         (WebCore::V8Document::locationAttrSetterCustom):
1662         * bindings/v8/custom/V8EventCustom.cpp:
1663         (WebCore::V8Event::dataTransferAttrGetterCustom):
1664         (WebCore::V8Event::clipboardDataAttrGetterCustom):
1665         * bindings/v8/custom/V8FileReaderCustom.cpp:
1666         (WebCore::V8FileReader::resultAttrGetterCustom):
1667         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1668         (WebCore::V8HTMLDocument::allAttrSetterCustom):
1669         * bindings/v8/custom/V8HTMLElementCustom.cpp:
1670         (WebCore::V8HTMLElement::itemValueAttrGetterCustom):
1671         (WebCore::V8HTMLElement::itemValueAttrSetterCustom):
1672         * bindings/v8/custom/V8HTMLFrameElementCustom.cpp:
1673         (WebCore::V8HTMLFrameElement::locationAttrSetterCustom):
1674         * bindings/v8/custom/V8HTMLInputElementCustom.cpp:
1675         (WebCore::V8HTMLInputElement::selectionStartAttrGetterCustom):
1676         (WebCore::V8HTMLInputElement::selectionStartAttrSetterCustom):
1677         (WebCore::V8HTMLInputElement::selectionEndAttrGetterCustom):
1678         (WebCore::V8HTMLInputElement::selectionEndAttrSetterCustom):
1679         (WebCore::V8HTMLInputElement::selectionDirectionAttrGetterCustom):
1680         (WebCore::V8HTMLInputElement::selectionDirectionAttrSetterCustom):
1681         * bindings/v8/custom/V8HTMLLinkElementCustom.cpp:
1682         (WebCore::V8HTMLLinkElement::sizesAttrGetterCustom):
1683         (WebCore::V8HTMLLinkElement::sizesAttrSetterCustom):
1684         * bindings/v8/custom/V8HTMLMediaElementCustom.cpp:
1685         (WebCore::V8HTMLMediaElement::controllerAttrSetterCustom):
1686         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1687         (WebCore::V8HTMLOptionsCollection::lengthAttrSetterCustom):
1688         * bindings/v8/custom/V8HistoryCustom.cpp:
1689         (WebCore::V8History::stateAttrGetterCustom):
1690         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
1691         (WebCore::V8JavaScriptCallFrame::scopeChainAttrGetterCustom):
1692         (WebCore::V8JavaScriptCallFrame::thisObjectAttrGetterCustom):
1693         (WebCore::V8JavaScriptCallFrame::typeAttrGetterCustom):
1694         * bindings/v8/custom/V8LocationCustom.cpp:
1695         (WebCore::V8Location::hashAttrSetterCustom):
1696         (WebCore::V8Location::hostAttrSetterCustom):
1697         (WebCore::V8Location::hostnameAttrSetterCustom):
1698         (WebCore::V8Location::hrefAttrSetterCustom):
1699         (WebCore::V8Location::pathnameAttrSetterCustom):
1700         (WebCore::V8Location::portAttrSetterCustom):
1701         (WebCore::V8Location::protocolAttrSetterCustom):
1702         (WebCore::V8Location::searchAttrSetterCustom):
1703         (WebCore::V8Location::reloadAttrGetterCustom):
1704         (WebCore::V8Location::replaceAttrGetterCustom):
1705         (WebCore::V8Location::assignAttrGetterCustom):
1706         * bindings/v8/custom/V8MessageEventCustom.cpp:
1707         (WebCore::V8MessageEvent::dataAttrGetterCustom):
1708         (WebCore::V8MessageEvent::portsAttrGetterCustom):
1709         * bindings/v8/custom/V8OscillatorNodeCustom.cpp:
1710         (WebCore::V8OscillatorNode::typeAttrSetterCustom):
1711         * bindings/v8/custom/V8PannerNodeCustom.cpp:
1712         (WebCore::V8PannerNode::panningModelAttrSetterCustom):
1713         (WebCore::V8PannerNode::distanceModelAttrSetterCustom):
1714         * bindings/v8/custom/V8PopStateEventCustom.cpp:
1715         (WebCore::V8PopStateEvent::stateAttrGetterCustom):
1716         * bindings/v8/custom/V8SVGLengthCustom.cpp:
1717         (WebCore::V8SVGLength::valueAttrGetterCustom):
1718         (WebCore::V8SVGLength::valueAttrSetterCustom):
1719         * bindings/v8/custom/V8TrackEventCustom.cpp:
1720         (WebCore::V8TrackEvent::trackAttrGetterCustom):
1721         * bindings/v8/custom/V8WebKitAnimationCustom.cpp:
1722         (WebCore::V8WebKitAnimation::iterationCountAttrGetterCustom):
1723         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
1724         (WebCore::V8XMLHttpRequest::responseTextAttrGetterCustom):
1725         (WebCore::V8XMLHttpRequest::responseAttrGetterCustom):
1726
1727 2013-02-12  Kentaro Hara  <haraken@chromium.org>
1728
1729         [V8] Generate wrapper methods for custom getters/setters
1730         https://bugs.webkit.org/show_bug.cgi?id=109666
1731
1732         Reviewed by Adam Barth.
1733
1734         Currently V8 directly calls back custom getters/setters written
1735         in custom binding files. This makes it impossible for code generators
1736         to hook custom getters/setters (e.g. Code generators cannot insert a code
1737         for FeatureObservation into custom getters/setters). To solve the problem,
1738         we should generate wrapper methods for custom getters/setters.
1739
1740         No tests. No change in behavior.
1741
1742         * bindings/scripts/CodeGeneratorV8.pm:
1743         (GenerateNormalAttrGetter):
1744         (GenerateNormalAttrSetter):
1745         (GenerateSingleBatchedAttribute):
1746         (GenerateImplementation):
1747         * bindings/scripts/test/V8/V8TestInterface.cpp:
1748         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrGetter):
1749         (TestInterfaceV8Internal):
1750         (WebCore::TestInterfaceV8Internal::supplementalStr3AttrSetter):
1751         (WebCore):
1752         * bindings/scripts/test/V8/V8TestObj.cpp:
1753         (WebCore::TestObjV8Internal::customAttrAttrGetter):
1754         (TestObjV8Internal):
1755         (WebCore::TestObjV8Internal::customAttrAttrSetter):
1756         (WebCore):
1757
1758 2013-02-13   Vineet Chaudhary  <rgf748@motorola.com>
1759
1760         HTMLCollections namedItem() methods should return null than undefined for empty collections.
1761         https://bugs.webkit.org/show_bug.cgi?id=104096
1762
1763         Reviewed by Kentaro Hara.
1764
1765         As per specification namedItem() should return null if collection is empty.
1766         Spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmlallcollection
1767
1768         Test: fast/dom/htmlcollection-namedItem.html
1769
1770         * bindings/js/JSHTMLAllCollectionCustom.cpp: Returning null.
1771         (WebCore::getNamedItems):
1772         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Ditto.
1773         (WebCore::getNamedItems):
1774         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: Ditto.
1775         (WebCore::getNamedItems):
1776         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: Ditto.
1777         (WebCore::V8HTMLAllCollection::namedItemCallback):
1778         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp: Ditto.
1779         (WebCore::V8HTMLFormControlsCollection::namedItemCallback):
1780         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp: Ditto.
1781         (WebCore::V8HTMLOptionsCollection::namedItemCallback):
1782
1783 2013-02-13  Tony Gentilcore  <tonyg@chromium.org>
1784
1785         Fix svg/in-html/script-write.html with threaded HTML parser
1786         https://bugs.webkit.org/show_bug.cgi?id=109495
1787
1788         Reviewed by Eric Seidel.
1789
1790         This patch makes the background parser's simulateTreeBuilder() more realistic.
1791         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.
1792         2. HTMLTreeBuilder::processTokenInForeignContent has a list of tags which exit foreign content mode. We need to respect those.
1793         3. Support the <foreignObject> tag which enters and leaves foreign content mode.
1794         4. The tree builder sets state to DataState upon a </script> tag when not in foreign content mode. We need to do the same.
1795
1796         This involved creating a namespace stack where we push upon entering each namespace and pop upon leaving.
1797         We are in foreign content if the topmost namespace is SVG or MathML.
1798
1799         This fixes svg/in-html/script-write.html and likely others.
1800
1801         * html/parser/BackgroundHTMLParser.cpp:
1802         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
1803         * html/parser/BackgroundHTMLParser.h:
1804         (BackgroundHTMLParser):
1805         * html/parser/CompactHTMLToken.cpp:
1806         (WebCore::CompactHTMLToken::getAttributeItem): Returns the attribute of the given name. Necessary to test for <font> attributes in simulateTreeBuilder.
1807         (WebCore):
1808         * html/parser/CompactHTMLToken.h:
1809         (WebCore):
1810         (CompactHTMLToken):
1811
1812 2013-02-13  Andreas Kling  <akling@apple.com>
1813
1814         Remove Element::getAttributeItem() overload that returned a mutable Attribute*.
1815         <http://webkit.org/b/109756>
1816
1817         Reviewed by Antti Koivisto.
1818
1819         Remove this to prevent callers from accidentally causing elements to convert to UniqueElementData.
1820         There are two call sites (Attr and HTMLSelectElement) that legitimately need to mutate Attribute
1821         objects in-place, they now use Element::ensureUniqueElementData()->getAttributeItem() directly instead.
1822
1823         Small progression on Membuster3, mostly for peace of mind.
1824
1825         * dom/Attr.cpp:
1826         (WebCore::Attr::elementAttribute):
1827         * dom/Element.h:
1828         (Element):
1829         * html/HTMLInputElement.cpp:
1830         (WebCore::HTMLInputElement::updateType):
1831         * html/HTMLSelectElement.cpp:
1832         (WebCore::HTMLSelectElement::parseAttribute):
1833         * svg/SVGStyledElement.cpp:
1834         (WebCore::SVGStyledElement::getPresentationAttribute):
1835
1836 2013-02-13  Andreas Kling  <akling@apple.com>
1837
1838         Stronger ElementData pointer typing.
1839         <http://webkit.org/b/109752>
1840
1841         Reviewed by Antti Koivisto.
1842
1843         Use ShareableElementData/UniqueElementData pointers instead of generic ElementData pointers
1844         where possible. Moved some methods from base class into leaf classes that don't make sense
1845         for both classes.
1846
1847         * dom/DocumentSharedObjectPool.cpp:
1848         (WebCore::ShareableElementDataCacheEntry::ShareableElementDataCacheEntry):
1849         (ShareableElementDataCacheEntry):
1850         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
1851         * dom/DocumentSharedObjectPool.h:
1852         (DocumentSharedObjectPool):
1853         * dom/Element.cpp:
1854         (WebCore::Element::parserSetAttributes):
1855         (WebCore::Element::setAttributeNode):
1856         (WebCore::Element::removeAttributeInternal):
1857         (WebCore::Element::cloneAttributesFromElement):
1858         (WebCore::Element::createUniqueElementData):
1859         (WebCore::ShareableElementData::createWithAttributes):
1860         (WebCore::UniqueElementData::create):
1861         (WebCore::ElementData::makeUniqueCopy):
1862         (WebCore::UniqueElementData::makeShareableCopy):
1863         * dom/Element.h:
1864         (ElementData):
1865         (ShareableElementData):
1866         (UniqueElementData):
1867         (Element):
1868         (WebCore::Element::ensureUniqueElementData):
1869         * dom/StyledElement.cpp:
1870         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
1871
1872 2013-02-13  Antti Koivisto  <antti@apple.com>
1873
1874         Reschedule shared CFRunLoopTimer instead of reconstructing it
1875         https://bugs.webkit.org/show_bug.cgi?id=109765
1876
1877         Reviewed by Andreas Kling and Anders Carlsson.
1878
1879         Using CFRunLoopTimerSetNextFireDate is over 2x faster than deleting and reconstructing timers.
1880
1881         * platform/mac/SharedTimerMac.mm:
1882         (WebCore):
1883         (WebCore::PowerObserver::restartSharedTimer):
1884         (WebCore::sharedTimer):
1885         (WebCore::setSharedTimerFireInterval):
1886         (WebCore::stopSharedTimer):
1887
1888 2013-02-13  Emil A Eklund  <eae@chromium.org>
1889
1890         getComputedStyle returns truncated value for margin-right
1891         https://bugs.webkit.org/show_bug.cgi?id=109759
1892
1893         Reviewed by Tony Chang.
1894         
1895         Due to an unfortunate cast in CSSComputedStyleDeclaration::
1896         getPropertyCSSValue getComputedStyle returns truncated styles
1897         for margin-right in cases where it isn't set to a specific pixel
1898         value.
1899
1900         Test: fast/sub-pixel/computedstylemargin.html
1901
1902         * css/CSSComputedStyleDeclaration.cpp:
1903         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1904         Change type of temporary value variable to float to prevent loss of precision.
1905
1906 2013-02-13  Max Vujovic  <mvujovic@adobe.com>
1907
1908         [CSS Filters] Refactor filter outsets into a class
1909         https://bugs.webkit.org/show_bug.cgi?id=109330
1910
1911         Reviewed by Dean Jackson.
1912
1913         In filters related code, we're often operating on 4 ints representing the top, right,
1914         bottom, and left filter outsets. These outsets come from a filter like blur or drop-shadow.
1915         This patch packages those ints and their related operations into a class called
1916         IntRectExtent.
1917
1918         Here are some signs that we should make a class to hold those 4 ints:
1919         1) In RenderLayer.cpp, we have a expandRectForFilterOutsets function, which looks like
1920            feature envy.
1921         2) RenderStyle and other classes have methods like getFilterOutsets which set the 4 ints by
1922            reference. The calling code has to define 4 ints, which looks bloated.
1923         3) To fix bug 109098, we will need to check if filter outsets changed, which sounds like a
1924            nice job for an inequality operator. (https://bugs.webkit.org/show_bug.cgi?id=109098)
1925
1926         No new tests. No change in behavior. Just refactoring.
1927
1928         * GNUmakefile.list.am:
1929         * Target.pri:
1930         * WebCore.gypi:
1931         * WebCore.xcodeproj/project.pbxproj:
1932         * platform/graphics/IntRectExtent.h: Added.
1933         (WebCore):
1934         (IntRectExtent):
1935         (WebCore::IntRectExtent::IntRectExtent):
1936         (WebCore::IntRectExtent::top):
1937         (WebCore::IntRectExtent::setTop):
1938         (WebCore::IntRectExtent::right):
1939         (WebCore::IntRectExtent::setRight):
1940         (WebCore::IntRectExtent::bottom):
1941         (WebCore::IntRectExtent::setBottom):
1942         (WebCore::IntRectExtent::left):
1943         (WebCore::IntRectExtent::setLeft):
1944         (WebCore::IntRectExtent::expandRect):
1945         (WebCore::IntRectExtent::isZero):
1946         (WebCore::operator==):
1947         (WebCore::operator!=):
1948         (WebCore::operator+=):
1949         * platform/graphics/filters/FilterOperations.cpp:
1950         (WebCore::FilterOperations::outsets):
1951         * platform/graphics/filters/FilterOperations.h:
1952         (FilterOperations):
1953         * platform/graphics/texmap/TextureMapperLayer.cpp:
1954         (WebCore::TextureMapperLayer::intermediateSurfaceRect):
1955         * rendering/FilterEffectRenderer.cpp:
1956         (WebCore::FilterEffectRenderer::FilterEffectRenderer):
1957         (WebCore::FilterEffectRenderer::build):
1958         (WebCore::FilterEffectRenderer::computeSourceImageRectForDirtyRect):
1959         * rendering/FilterEffectRenderer.h:
1960         (FilterEffectRenderer):
1961         * rendering/RenderLayer.cpp:
1962         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
1963         (WebCore::transparencyClipBox):
1964         (WebCore::RenderLayer::calculateLayerBounds):
1965         * rendering/style/RenderStyle.h:
1966
1967 2013-02-13  Adam Barth  <abarth@webkit.org>
1968
1969         Factor HTMLTokenScanner out of HTMLPreloadScanner
1970         https://bugs.webkit.org/show_bug.cgi?id=109754
1971
1972         Reviewed by Eric Seidel.
1973
1974         This patch is just a mechanical separation of the per-token "scanning"
1975         logic from HTMLPreloadScanner into a separate class.
1976         HTMLPreloadScanner's job is now to keep track of the input stream and
1977         to pump the tokenizer.
1978
1979         This factorization class will let us use HTMLTokenScanner on the
1980         background thread (once we finish making it thread-safe). In a follow
1981         up patch, I'll move HTMLTokenScanner to its own file.
1982
1983         * html/parser/HTMLPreloadScanner.cpp:
1984         (WebCore::HTMLTokenScanner::HTMLTokenScanner):
1985         (WebCore::HTMLTokenScanner::~HTMLTokenScanner):
1986         (WebCore::HTMLTokenScanner::processPossibleTemplateTag):
1987         (WebCore::HTMLTokenScanner::processPossibleStyleTag):
1988         (WebCore::HTMLTokenScanner::processPossibleBaseTag):
1989         (WebCore::HTMLTokenScanner::scan):
1990         (WebCore::HTMLPreloadScanner::HTMLPreloadScanner):
1991         (WebCore):
1992         (WebCore::HTMLPreloadScanner::~HTMLPreloadScanner):
1993         (WebCore::HTMLPreloadScanner::appendToEnd):
1994         (WebCore::HTMLPreloadScanner::scan):
1995         * html/parser/HTMLPreloadScanner.h:
1996         (HTMLTokenScanner):
1997         (WebCore::HTMLTokenScanner::setPredictedBaseElementURL):
1998         (HTMLPreloadScanner):
1999         (WebCore):
2000
2001 2013-02-13  Elliott Sprehn  <esprehn@chromium.org>
2002
2003         ASSERT(!renderer()->needsLayout()) when calling Element::focus() with generated content
2004         https://bugs.webkit.org/show_bug.cgi?id=109616
2005
2006         Reviewed by Julien Chaffraix.
2007
2008         Test: fast/css-generated-content/quote-layout-focus-crash.html
2009
2010         In some cases RenderQuote may mark itself and containing blocks as needing layout
2011         during a layout, but then one of it's containing blocks will mark itself as having
2012         finished layout so the RenderQuote and potentially some of it's ancestor renderers
2013         needLayout(), but the ancestors above those do not.
2014
2015         Until we have proper pre-layout tasks we should just walk the list of quotes
2016         right before layout and mark all their ancestors as needing layout if the quote
2017         needs layout.
2018
2019         * dom/Document.cpp:
2020         (WebCore::Document::updateLayout): Call markQuoteContainingBlocksForLayoutIfNeeded.
2021         (WebCore::Document::implicitClose): Call markQuoteContainingBlocksForLayoutIfNeeded.
2022         * rendering/RenderQuote.h:
2023         (WebCore::RenderQuote::next): Added.
2024         * rendering/RenderView.cpp:
2025         (WebCore::RenderView::markQuoteContainingBlocksForLayoutIfNeeded): Added.
2026         * rendering/RenderView.h:
2027         (RenderView):
2028
2029 2013-02-13  Jer Noble  <jer.noble@apple.com>
2030
2031         EME: MediaPlayer::keyNeede() should return a bool indicating whether an event listener was triggered.
2032         https://bugs.webkit.org/show_bug.cgi?id=109701
2033
2034         Reviewed by Eric Carlson.
2035
2036         Clients of MediaPlayer may need to do cleanup if calling keyNeeded()
2037         results in no event listener being triggered. Return a bool (like the
2038         v1 equivalent keyNeeded method) to indicate this.
2039
2040         * html/HTMLMediaElement.cpp:
2041         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
2042         * html/HTMLMediaElement.h:
2043         * platform/graphics/MediaPlayer.cpp:
2044         (WebCore::MediaPlayer::keyNeeded):
2045         * platform/graphics/MediaPlayer.h:
2046         (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
2047
2048 2013-02-13  Abhishek Arya  <inferno@chromium.org>
2049
2050         ASSERTION FAILED: !object || object->isBox(), Bad cast in RenderBox::computeLogicalHeight
2051         https://bugs.webkit.org/show_bug.cgi?id=107748
2052
2053         Reviewed by Levi Weintraub.
2054
2055         Make sure that body renderer is not an inline-block display
2056         when determining that it stretches to viewport or when paginated
2057         content needs base height.
2058
2059         Test: fast/block/body-inline-block-crash.html
2060
2061         * rendering/RenderBox.cpp:
2062         (WebCore::RenderBox::computeLogicalHeight):
2063         * rendering/RenderBox.h:
2064         (WebCore::RenderBox::stretchesToViewport):
2065
2066 2013-02-13  Shawn Singh  <shawnsingh@chromium.org>
2067
2068         Fix debug assertion being triggered because we may access dirty normalFlowList.
2069         https://bugs.webkit.org/show_bug.cgi?id=109740
2070
2071         A debug assertion in RenderLayer.h is being hit when trying to
2072         access the normalFlowList when it is dirty.  This is caused by a
2073         new recursion that I added in RenderLayerBacking::hasVisibleNonCompositingDescendant(),
2074         but I overlooked the need to call updateLayerListsIfNeeded()
2075         recursively as well.
2076
2077         Reviewed by Simon Fraser.
2078
2079         No test, because there's no reliable way to test this (same as bug 85512).
2080
2081         * rendering/RenderLayerBacking.cpp:
2082         (WebCore::hasVisibleNonCompositingDescendant):
2083         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
2084
2085 2013-02-13  Antti Koivisto  <antti@apple.com>
2086
2087         Don't restart shared timer if both the current and the new fire time are in the past
2088         https://bugs.webkit.org/show_bug.cgi?id=109731
2089
2090         Reviewed by Andreas Kling.
2091
2092         In 40-50% of cases we reschedule the shared timer both the old and the new fire time have already passed. This can happen at least when rescheduling 
2093         a zero duration timer and when stopping a timer that was ready to fire.
2094
2095         We can skip rescheduling in this case, the shared timer will fire immediately anyway.
2096         
2097         Scheduling timers calls into platform layer and can be slow. This about halves the time under setSharedTimerFireInterval in PLT3
2098         for ~0.1% total CPU time reduction.
2099
2100         * platform/ThreadTimers.cpp:
2101         (WebCore::ThreadTimers::ThreadTimers):
2102         (WebCore::ThreadTimers::setSharedTimer):
2103         (WebCore::ThreadTimers::updateSharedTimer):
2104         (WebCore::ThreadTimers::sharedTimerFiredInternal):
2105         * platform/ThreadTimers.h:
2106         (ThreadTimers):
2107
2108 2013-02-13  Zan Dobersek  <zdobersek@igalia.com>
2109
2110         The 'global isinf/isnan' compiler quirk required when using clang with libstdc++
2111         https://bugs.webkit.org/show_bug.cgi?id=109325
2112
2113         Reviewed by Anders Carlsson.
2114
2115         Prefix calls to the isinf and isnan methods with std::, declaring we want to use the
2116         two methods as they're provided by the C++ standard library being used.
2117
2118         No new tests as there's no change in functionality.
2119
2120         * Modules/mediasource/MediaSource.cpp:
2121         (WebCore::MediaSource::setDuration):
2122         * Modules/webaudio/AudioBufferSourceNode.cpp:
2123         (WebCore::AudioBufferSourceNode::totalPitchRate):
2124         * Modules/webaudio/AudioParam.cpp:
2125         (WebCore::AudioParam::setValue):
2126         * Modules/webaudio/AudioParamTimeline.cpp:
2127         (WebCore::isValidNumber):
2128         * Modules/webaudio/PannerNode.cpp:
2129         (WebCore::fixNANs):
2130         * bindings/js/IDBBindingUtilities.cpp:
2131         (WebCore::createIDBKeyFromValue):
2132         * bindings/js/JSDataViewCustom.cpp:
2133         (WebCore::getDataViewMember):
2134         * bindings/js/JSGeolocationCustom.cpp:
2135         (WebCore::setTimeout):
2136         (WebCore::setMaximumAge):
2137         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2138         (WebCore::JSHTMLOptionsCollection::setLength):
2139         * bindings/js/JSWebKitPointCustom.cpp:
2140         (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint):
2141         * bindings/scripts/CodeGeneratorJS.pm:
2142         (GenerateImplementation):
2143         (GenerateParametersCheck):
2144         * bindings/scripts/CodeGeneratorV8.pm:
2145         (GenerateParametersCheck):
2146         * bindings/scripts/test/JS/JSFloat64Array.cpp:
2147         (WebCore::JSFloat64Array::getByIndex):
2148         * bindings/scripts/test/JS/JSTestObj.cpp:
2149         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
2150         * bindings/scripts/test/V8/V8TestObj.cpp:
2151         (WebCore::TestObjV8Internal::classMethodWithClampCallback):
2152         * bindings/v8/IDBBindingUtilities.cpp:
2153         (WebCore::createIDBKeyFromValue):
2154         * bindings/v8/V8Binding.cpp:
2155         (WebCore::toInt32):
2156         (WebCore::toUInt32):
2157         * bindings/v8/custom/V8GeolocationCustom.cpp:
2158         (WebCore::createPositionOptions):
2159         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2160         (WebCore::V8HTMLOptionsCollection::lengthAccessorSetter):
2161         * bindings/v8/custom/V8WebKitPointCustom.cpp:
2162         (WebCore::V8WebKitPoint::constructorCallbackCustom):
2163         * bridge/qt/qt_runtime.cpp:
2164         (JSC::Bindings::convertValueToQVariant):
2165         * css/WebKitCSSMatrix.cpp:
2166         (WebCore::WebKitCSSMatrix::translate):
2167         (WebCore::WebKitCSSMatrix::scale):
2168         (WebCore::WebKitCSSMatrix::rotate):
2169         (WebCore::WebKitCSSMatrix::rotateAxisAngle):
2170         (WebCore::WebKitCSSMatrix::skewX):
2171         (WebCore::WebKitCSSMatrix::skewY):
2172         * html/HTMLMediaElement.cpp:
2173         (WebCore::HTMLMediaElement::percentLoaded):
2174         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
2175         (WebCore::HTMLMediaElement::endedPlayback):
2176         * html/MediaController.cpp:
2177         (MediaController::duration):
2178         * html/canvas/WebGLRenderingContext.cpp:
2179         (WebCore):
2180         (WebCore::WebGLRenderingContext::clearColor):
2181         * html/track/TextTrack.cpp:
2182         (WebCore::TextTrack::addCue):
2183         * html/track/TextTrackCue.cpp:
2184         (WebCore::TextTrackCue::setStartTime):
2185         (WebCore::TextTrackCue::setEndTime):
2186         * page/DOMWindow.cpp:
2187         (WebCore::DOMWindow::adjustWindowRect):
2188         * page/WindowFeatures.cpp:
2189         (WebCore::WindowFeatures::floatFeature): Also include an opportunistic style fix.
2190         * platform/CalculationValue.cpp:
2191         (WebCore::CalculationValue::evaluate):
2192         * platform/Decimal.cpp:
2193         (WebCore::Decimal::fromDouble):
2194         * platform/Length.cpp:
2195         (WebCore::Length::nonNanCalculatedValue):
2196         * platform/audio/AudioResampler.cpp:
2197         (WebCore::AudioResampler::setRate):
2198         * platform/audio/DynamicsCompressorKernel.cpp:
2199         (WebCore::DynamicsCompressorKernel::process):
2200         * platform/audio/Reverb.cpp:
2201         (WebCore::calculateNormalizationScale):
2202         * platform/graphics/Font.cpp:
2203         (WebCore::Font::width):
2204         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2205         (WebCore::MediaPlayerPrivateAVFoundation::isLiveStream):
2206         * platform/graphics/gpu/LoopBlinnMathUtils.cpp:
2207         (LoopBlinnMathUtils):
2208         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2209         (WebCore::MediaPlayerPrivateGStreamer::buffered):
2210         (WebCore::MediaPlayerPrivateGStreamer::maxTimeSeekable):
2211         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2212         (WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable):
2213         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
2214         (WebCore::OpenTypeVerticalData::getVerticalTranslationsForGlyphs):
2215         * platform/graphics/transforms/TransformationMatrix.cpp:
2216         (WebCore::clampEdgeValue):
2217         (WebCore::TransformationMatrix::clampedBoundsOfProjectedQuad):
2218         * platform/network/ResourceResponseBase.cpp:
2219         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
2220         * rendering/RenderMediaControlsChromium.cpp:
2221         (WebCore::paintMediaSlider):
2222         (WebCore::paintMediaVolumeSlider):
2223         * rendering/RenderThemeMac.mm:
2224         (WebCore::RenderThemeMac::paintMediaSliderTrack):
2225         * svg/SVGAnimationElement.cpp:
2226         (WebCore::SVGAnimationElement::beginElementAt):
2227         (WebCore::SVGAnimationElement::endElementAt):
2228         * svg/SVGSVGElement.cpp:
2229         (WebCore::SVGSVGElement::setCurrentTime):
2230         * svg/animation/SMILTime.h:
2231         (WebCore::SMILTime::SMILTime):
2232         * svg/animation/SVGSMILElement.cpp:
2233         (WebCore::SVGSMILElement::addBeginTime):
2234         (WebCore::SVGSMILElement::addEndTime):
2235         * xml/XPathFunctions.cpp:
2236         (WebCore::XPath::FunSubstring::evaluate):
2237         (WebCore::XPath::FunRound::round):
2238         * xml/XPathValue.cpp:
2239         (WebCore::XPath::Value::toBoolean): Also include an opportunistic style fix.
2240         (WebCore::XPath::Value::toString):
2241
2242 2013-02-13  Eric Carlson  <eric.carlson@apple.com>
2243
2244         [Mac] Caption menu should have only one item selected
2245         https://bugs.webkit.org/show_bug.cgi?id=109730
2246
2247         Reviewed by Dean Jackson.
2248
2249         No new tests, media/track/track-user-preferences.html was modified to test the changes.
2250
2251         * CMakeLists.txt: Add CaptionUserPreferences.cpp.
2252         * GNUmakefile.list.am: Ditto.
2253         * Target.pri: Ditto.
2254         * WebCore.gypi: Ditto.
2255         * WebCore.vcproj/WebCore.vcproj: Ditto.
2256         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
2257         * WebCore.xcodeproj/project.pbxproj: Ditto.
2258
2259         * html/HTMLMediaElement.cpp:
2260         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_processingPreferenceChange.
2261         (WebCore::HTMLMediaElement::configureTextTrackGroup): Only end up with one selected track when
2262             called because of a preferences change.
2263         (WebCore::HTMLMediaElement::captionPreferencesChanged): Call setClosedCaptionsVisible instead
2264             of calling markCaptionAndSubtitleTracksAsUnconfigured directly.
2265         (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): Process all tracks, 
2266             not just track elements.
2267         * html/HTMLMediaElement.h:
2268
2269         * page/CaptionUserPreferences.cpp: Added so the functionality can be tested in DRT.
2270         (WebCore::CaptionUserPreferences::registerForPreferencesChangedCallbacks):
2271         (WebCore::CaptionUserPreferences::unregisterForPreferencesChangedCallbacks):
2272         (WebCore::CaptionUserPreferences::setUserPrefersCaptions):
2273         (WebCore::CaptionUserPreferences::captionPreferencesChanged):
2274         (WebCore::CaptionUserPreferences::preferredLanguages):
2275         (WebCore::CaptionUserPreferences::setPreferredLanguage):
2276         (WebCore::CaptionUserPreferences::displayNameForTrack):
2277         * page/CaptionUserPreferences.h:
2278
2279         * page/CaptionUserPreferencesMac.h:
2280         * page/CaptionUserPreferencesMac.mm:
2281         (WebCore::CaptionUserPreferencesMac::registerForPreferencesChangedCallbacks): Moved some logic
2282             to base class.
2283         (WebCore::CaptionUserPreferencesMac::captionPreferencesChanged): Ditto.
2284
2285 2013-02-13  Hans Muller  <hmuller@adobe.com>
2286
2287         [CSS Exclusions] ExclusionPolygon reflex vertices should constrain the first fit location.
2288         https://bugs.webkit.org/show_bug.cgi?id=107568
2289
2290         Reviewed by Dirk Schulze.
2291
2292         The ExclusionPolygon::firstIncludedIntervalLogicalTop() method now includes offset edges
2293         for each of the polygon's reflex vertices. The motivation for this change is explained
2294         here: http://hansmuller-webkit.blogspot.com/2013/01/getting-to-point-reflex-vertices.html.
2295
2296         Test: fast/exclusions/shape-inside/shape-inside-first-fit-reflex.html
2297
2298         * rendering/ExclusionPolygon.cpp:
2299         (WebCore::isReflexVertex): Given three vertices that represent a pair of connected polygon edges, return true if the second vertex is a reflex vertex.
2300         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): This method now includes offset edges for reflex vertices.
2301         * rendering/ExclusionPolygon.h:
2302         (WebCore::OffsetPolygonEdge::OffsetPolygonEdge): Added a constructor for creating an OffsetPolygonEdge given a reflex vertex.
2303         (WebCore::OffsetPolygonEdge::edgeIndex): Changed this property from unsigned to int. Now using -1 to indicate that the offset edge doesn't correspond to a single polygon edge.
2304
2305 2013-02-13  Adam Barth  <abarth@webkit.org>
2306
2307         CSSPreloadScanner should not depend on HTMLToken
2308         https://bugs.webkit.org/show_bug.cgi?id=109742
2309
2310         Reviewed by Eric Seidel.
2311
2312         There's no need for the CSSPreloadScanner to depend on HTMLToken. On
2313         the background thread, we'll likely want to use a CompactHTMLToken for
2314         preload scanning, so this dependency is problematic. This patch also
2315         teaches the CSSPreloadScanner how to scan LChars.
2316
2317         * html/parser/CSSPreloadScanner.cpp:
2318         (WebCore::CSSPreloadScanner::~CSSPreloadScanner):
2319         (WebCore):
2320         (WebCore::CSSPreloadScanner::scan):
2321         * html/parser/CSSPreloadScanner.h:
2322         (CSSPreloadScanner):
2323         * html/parser/HTMLPreloadScanner.cpp:
2324         (WebCore::HTMLPreloadScanner::processToken):
2325
2326 2013-02-13  Julien Chaffraix  <jchaffraix@webkit.org>
2327
2328         [CSS Grid Layout] Adding or removing grid items doesn't properly recompute the track sizes
2329         https://bugs.webkit.org/show_bug.cgi?id=109100
2330
2331         Reviewed by Ojan Vafai.
2332
2333         Test: fast/css-grid-layout/grid-item-removal-track-breadth-update.html
2334
2335         The test uncovered several bugs in our implementation that is fixed as part
2336         of this change. They will be detailed below.
2337
2338         * rendering/RenderGrid.cpp:
2339         (WebCore::RenderGrid::logicalContentHeightForChild):
2340         Added this function to share the code between minContentForChild and maxContentForChild.
2341         Also forced a relayout in this case to avoid getting a wrong answer (e.g. the logical height
2342         constrained by the previous layout's grid breadth).
2343
2344         (WebCore::RenderGrid::minContentForChild):
2345         (WebCore::RenderGrid::maxContentForChild):
2346         Updated to use logicalContentHeightForChild.
2347
2348         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2349         Updated to match the specification and set max breadth to current breadth per the specification.
2350         This made us over-grow some cases in the test.
2351
2352         (WebCore::RenderGrid::distributeSpaceToTracks):
2353         Updated to match the specification and use an extra variable to do the intermediate spreading. Also removed
2354         a now unneeded max. This fixes the case of multiple grid items in the same grid area that was completely broken.
2355
2356         (WebCore::RenderGrid::layoutGridItems):
2357         Added a FIXME about always relaying out content sized tracks' children.
2358
2359         * rendering/RenderGrid.h:
2360         Added logicalContentHeightForChild.
2361
2362 2013-02-13  Adam Barth  <abarth@webkit.org>
2363
2364         Clean up some style nits in HTMLPreloadScanner
2365         https://bugs.webkit.org/show_bug.cgi?id=109738
2366
2367         Reviewed by Tony Gentilcore.
2368
2369         This patch just fixes a few style nits I noticed when reading through
2370         the code.
2371
2372         * html/parser/HTMLPreloadScanner.cpp:
2373         (WebCore::StartTagScanner::StartTagScanner):
2374         (WebCore::HTMLPreloadScanner::processPossibleStyleTag):
2375         (WebCore::HTMLPreloadScanner::processPossibleBaseTag):
2376         * html/parser/HTMLResourcePreloader.cpp:
2377         (WebCore::PreloadRequest::isSafeToSendToAnotherThread):
2378         * html/parser/HTMLResourcePreloader.h:
2379         (PreloadRequest):
2380         (WebCore::PreloadRequest::PreloadRequest):
2381         (WebCore::HTMLResourcePreloader::HTMLResourcePreloader):
2382
2383 2013-02-13  Sheriff Bot  <webkit.review.bot@gmail.com>
2384
2385         Unreviewed, rolling out r142747.
2386         http://trac.webkit.org/changeset/142747
2387         https://bugs.webkit.org/show_bug.cgi?id=109746
2388
2389         broke component build (Requested by alecf_gardening on
2390         #webkit).
2391
2392         * inspector/HeapGraphSerializer.cpp:
2393         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
2394         (WebCore::HeapGraphSerializer::pushUpdate):
2395         (WebCore::HeapGraphSerializer::reportNode):
2396         (WebCore::HeapGraphSerializer::toNodeId):
2397         (WebCore::HeapGraphSerializer::addRootNode):
2398         * inspector/HeapGraphSerializer.h:
2399         (WebCore):
2400         (HeapGraphSerializer):
2401         * inspector/InspectorMemoryAgent.cpp:
2402         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
2403
2404 2013-02-13  Levi Weintraub  <leviw@chromium.org>
2405
2406         Bidi-Isolated inlines can cause subsequent content to not be rendered
2407         https://bugs.webkit.org/show_bug.cgi?id=108137
2408
2409         Reviewed by Eric Seidel.
2410
2411         First step in fixing how inline isolates behave with collapsed spaces.
2412         webkit.org/b/109624 tracks the overarching issue.
2413
2414         Test: fast/text/content-following-inline-isolate-with-collapsed-whitespace.html
2415
2416         * rendering/InlineIterator.h:
2417         (WebCore::IsolateTracker::addFakeRunIfNecessary): If we enter an isolate while
2418         ignoring spaces, ensure we leave it considering them again. This can result in
2419         including spaces that should be ignored following the isolate on the line, but
2420         failing to do so results in those contents not being rendered at all.
2421
2422 2013-02-13  Andreas Kling  <akling@apple.com>
2423
2424         Better names for ElementAttributeData & subclasses.
2425         <http://webkit.org/b/109529>
2426
2427         Reviewed by Antti Koivisto.
2428
2429         - ElementAttributeData => ElementData
2430
2431             Because ElementAttributeData won't be a good name once we move some non-attribute related
2432             things to this structure.
2433
2434         - ImmutableElementAttributeData => ShareableElementData
2435
2436             These objects can be shared with other Elements that have the same attribute name/value pairs.
2437
2438         - MutableElementAttributeData => UniqueElementData
2439
2440             These objects contain data that is unique to a specific Element, and cannot be shared with
2441             other Elements. This is what's important about it, not that its underlying storage is mutable.
2442
2443         - attributeData() -> elementData()
2444         - updatedAttributeData() -> elementDataWithSynchronizedAttributes()
2445         - ensureUpdatedAttributeData() -> ensureElementDataWithSynchronizedAttributes()
2446         - mutableAttributeData() -> ensureUniqueElementData()
2447
2448             Ride-along renames. Much less vague than previous names IMO.
2449
2450         * css/StyleResolver.cpp:
2451         (WebCore::StyleResolver::canShareStyleWithControl):
2452         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
2453         * dom/Attr.cpp:
2454         (WebCore::Attr::elementAttribute):
2455         * dom/DocumentSharedObjectPool.cpp:
2456         (WebCore::ShareableElementDataCacheKey::ShareableElementDataCacheKey):
2457         (WebCore::ShareableElementDataCacheKey::operator!=):
2458         (WebCore::ShareableElementDataCacheEntry::ShareableElementDataCacheEntry):
2459         (ShareableElementDataCacheEntry):
2460         (WebCore::DocumentSharedObjectPool::cachedShareableElementDataWithAttributes):
2461         * dom/DocumentSharedObjectPool.h:
2462         (DocumentSharedObjectPool):
2463         * dom/Element.cpp:
2464         (WebCore::Element::detachAttribute):
2465         (WebCore::Element::removeAttribute):
2466         (WebCore::Element::attributes):
2467         (WebCore::Element::getAttribute):
2468         (WebCore::Element::setAttribute):
2469         (WebCore::Element::setSynchronizedLazyAttribute):
2470         (WebCore::Element::setAttributeInternal):
2471         (WebCore::Element::attributeChanged):
2472         (WebCore::Element::classAttributeChanged):
2473         (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
2474         (WebCore::Element::parserSetAttributes):
2475         (WebCore::Element::hasAttributes):
2476         (WebCore::Element::hasEquivalentAttributes):
2477         (WebCore::Element::setAttributeNode):
2478         (WebCore::Element::removeAttributeNode):
2479         (WebCore::Element::removeAttributeInternal):
2480         (WebCore::Element::addAttributeInternal):
2481         (WebCore::Element::getAttributeNode):
2482         (WebCore::Element::getAttributeNodeNS):
2483         (WebCore::Element::hasAttribute):
2484         (WebCore::Element::hasAttributeNS):
2485         (WebCore::Element::computeInheritedLanguage):
2486         (WebCore::Element::getURLAttribute):
2487         (WebCore::Element::getNonEmptyURLAttribute):
2488         (WebCore::Element::cloneAttributesFromElement):
2489         (WebCore::Element::createUniqueElementData):
2490         (WebCore::Element::reportMemoryUsage):
2491         (WebCore::ElementData::deref):
2492         (WebCore::ElementData::ElementData):
2493         (WebCore::sizeForShareableElementDataWithAttributeCount):
2494         (WebCore::ElementData::createShareableWithAttributes):
2495         (WebCore::ElementData::createUnique):
2496         (WebCore::ShareableElementData::ShareableElementData):
2497         (WebCore::ShareableElementData::~ShareableElementData):
2498         (WebCore::UniqueElementData::UniqueElementData):
2499         (WebCore::ElementData::makeMutableCopy):
2500         (WebCore::ElementData::makeImmutableCopy):
2501         (WebCore::ElementData::setPresentationAttributeStyle):
2502         (WebCore::ElementData::addAttribute):
2503         (WebCore::ElementData::removeAttribute):
2504         (WebCore::ElementData::isEquivalent):
2505         (WebCore::ElementData::reportMemoryUsage):
2506         (WebCore::ElementData::getAttributeItemIndexSlowCase):
2507         * dom/Element.h:
2508         (ElementData):
2509         (WebCore::ElementData::isUnique):
2510         (ShareableElementData):
2511         (UniqueElementData):
2512         (WebCore::Element::getAttributeItemIndex):
2513         (WebCore::Element::elementData):
2514         (Element):
2515         (WebCore::Element::elementDataWithSynchronizedAttributes):
2516         (WebCore::Element::ensureElementDataWithSynchronizedAttributes):
2517         (WebCore::Element::fastHasAttribute):
2518         (WebCore::Element::fastGetAttribute):
2519         (WebCore::Element::hasAttributesWithoutUpdate):
2520         (WebCore::Element::idForStyleResolution):
2521         (WebCore::Element::classNames):
2522         (WebCore::Element::attributeCount):
2523         (WebCore::Element::attributeItem):
2524         (WebCore::Element::getAttributeItem):
2525         (WebCore::Element::updateInvalidAttributes):
2526         (WebCore::Element::hasID):
2527         (WebCore::Element::hasClass):
2528         (WebCore::Element::ensureUniqueElementData):
2529         (WebCore::ElementData::mutableAttributeVector):
2530         (WebCore::ElementData::immutableAttributeArray):
2531         (WebCore::ElementData::length):
2532         (WebCore::ElementData::presentationAttributeStyle):
2533         (WebCore::ElementData::getAttributeItem):
2534         (WebCore::ElementData::getAttributeItemIndex):
2535         (WebCore::ElementData::attributeItem):
2536         * dom/Node.cpp:
2537         (WebCore::Node::dumpStatistics):
2538         (WebCore::Node::compareDocumentPosition):
2539         * dom/StyledElement.cpp:
2540         (WebCore::StyledElement::updateStyleAttribute):
2541         (WebCore::StyledElement::ensureMutableInlineStyle):
2542         (WebCore::StyledElement::attributeChanged):
2543         (WebCore::StyledElement::inlineStyleCSSOMWrapper):
2544         (WebCore::StyledElement::setInlineStyleFromString):
2545         (WebCore::StyledElement::styleAttributeChanged):
2546         (WebCore::StyledElement::inlineStyleChanged):
2547         (WebCore::StyledElement::addSubresourceAttributeURLs):
2548         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2549         * dom/StyledElement.h:
2550         (WebCore::StyledElement::inlineStyle):
2551         (WebCore::StyledElement::invalidateStyleAttribute):
2552         (WebCore::StyledElement::presentationAttributeStyle):
2553         * html/ClassList.cpp:
2554         (WebCore::ClassList::classNames):
2555         * html/HTMLInputElement.cpp:
2556         (WebCore::HTMLInputElement::updateType):
2557         * html/parser/HTMLConstructionSite.cpp:
2558         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
2559         * svg/SVGElement.cpp:
2560         (WebCore::SVGElement::updateAnimatedSVGAttribute):
2561         * svg/SVGElement.h:
2562         (WebCore::SVGElement::invalidateSVGAttributes):
2563         * xml/parser/XMLDocumentParserQt.cpp:
2564         (WebCore::XMLDocumentParser::XMLDocumentParser):
2565
2566 2013-02-13  Christian Biesinger  <cbiesinger@chromium.org>
2567
2568         Crash when encountering <object style="resize:both;">
2569         https://bugs.webkit.org/show_bug.cgi?id=109728
2570
2571         See also https://code.google.com/p/chromium/issues/detail?id=175535
2572         This bug can be reproduced on
2573         http://dramalink.net/tudou.y/?xink=162601060
2574
2575         Reviewed by Eric Seidel.
2576
2577         Test: fast/css/resize-object-crash.html
2578
2579         * rendering/RenderWidget.cpp:
2580         (WebCore::RenderWidget::paint):
2581         Only call paintResizer() if we have a layer and canResize() is true
2582
2583 2013-02-13  Arko Saha  <arko@motorola.com>
2584
2585         [Microdata] HTMLPropertiesCollection code cleanup
2586         https://bugs.webkit.org/show_bug.cgi?id=109721
2587
2588         Reviewed by Ryosuke Niwa.
2589
2590         Removed forward declaration of DOMStringList class.
2591         Removed unused findRefElements() method declaration.
2592         Also Removed unused parameter Element* from updatePropertyCache() method.
2593
2594         No new test since no change in behavior.
2595
2596         * html/HTMLPropertiesCollection.cpp:
2597         (WebCore::HTMLPropertiesCollection::updateNameCache):
2598         * html/HTMLPropertiesCollection.h:
2599         (WebCore):
2600         (HTMLPropertiesCollection):
2601         (WebCore::HTMLPropertiesCollection::updatePropertyCache):
2602
2603 2013-02-13  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2604
2605         [WebGL][EFL][GTK][Qt]Add support for OES_vertex_array_object.
2606         https://bugs.webkit.org/show_bug.cgi?id=109382
2607
2608         Reviewed by Kenneth Russell.
2609
2610         Covered by fast/canvas/webgl/oes-vertex-array-object.html
2611
2612         This patch adds support for using Vertex Array Object with OpenGl.
2613         The patch adds support for loading necessary opengl functions
2614         and support for checking GL_ARB_vertex_array_object. The support
2615         for OES_vertex_array_object is advertised if GL_ARB_vertex_array_object is
2616         supported.
2617
2618         * platform/graphics/OpenGLShims.cpp:
2619         (WebCore::initializeOpenGLShims):
2620         * platform/graphics/OpenGLShims.h:
2621         (_OpenGLFunctionTable):
2622         Added support for loading the necessary functions.
2623
2624         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2625         (WebCore::Extensions3DOpenGL::createVertexArrayOES):
2626         (WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
2627         (WebCore::Extensions3DOpenGL::isVertexArrayOES):
2628         (WebCore::Extensions3DOpenGL::bindVertexArrayOES):
2629         (WebCore::Extensions3DOpenGL::supportsExtension):
2630
2631         (WebCore):
2632         (WebCore::Extensions3DOpenGL::isVertexArrayObjectSupported):
2633         * platform/graphics/opengl/Extensions3DOpenGL.h:
2634         (Extensions3DOpenGL):
2635
2636 2013-02-13  Eberhard Graether  <egraether@google.com>
2637
2638         chromium: remove CompositorHUDFontAtlas
2639         https://bugs.webkit.org/show_bug.cgi?id=109328
2640
2641         Reviewed by James Robinson.
2642
2643         After switching the HudLayer to use skia's font rendering the
2644         CompositorHUDFontAtlas has become obsolete. This change removes
2645         this class and the related WebLayerTreeView API.
2646
2647         No new tests.
2648
2649         * WebCore.gypi:
2650         * platform/graphics/chromium/CompositorHUDFontAtlas.cpp: Removed.
2651         * platform/graphics/chromium/CompositorHUDFontAtlas.h: Removed.
2652
2653 2013-02-13  Dean Jackson  <dino@apple.com>
2654
2655         Small update to speech bubble for captions menu [Mac]
2656         https://bugs.webkit.org/show_bug.cgi?id=109641
2657
2658         Reviewed by Eric Carlson
2659
2660         Small adjustment to the embedded SVG that draws a speech bubble
2661         for the captions button. Remove a polygon that was so small
2662         it looked like a rendering error.
2663
2664         * css/mediaControlsQuickTime.css:
2665         (video::-webkit-media-controls-toggle-closed-captions-button):
2666
2667 2013-02-13  Dean Jackson  <dino@apple.com>
2668
2669         Clicking outside captions menu should dismiss it
2670         https://bugs.webkit.org/show_bug.cgi?id=109648
2671
2672         Reviewed by Eric Carlson.
2673
2674         Add a virtual override to the platform-specific
2675         defaultEventHandler to intercept any click in the controls,
2676         and hide the captions menu if it is showing.
2677
2678         Test: media/video-controls-captions-trackmenu-hide-on-click.html
2679
2680         * html/shadow/MediaControlsApple.cpp:
2681         (WebCore::MediaControlsApple::defaultEventHandler): Override from MediaControls. Hide
2682             captions menu if a click event comes in.
2683         * html/shadow/MediaControlsApple.h:
2684
2685 2013-02-13  Tommy Widenflycht  <tommyw@google.com>
2686
2687         MediaStream API: Use the source id when creating new tracks
2688         https://bugs.webkit.org/show_bug.cgi?id=109688
2689
2690         Reviewed by Adam Barth.
2691
2692         This patch reuses the ids from the source when creating tracks instead of creating a new one.
2693         This was requested by the chromium port to greatly simplify their implementation.
2694         In the longer run the API should be rewritten to only use tracks instead of sources.
2695
2696         Covered by existing tests.
2697
2698         * platform/chromium/support/WebMediaStream.cpp:
2699         (WebKit::WebMediaStream::audioTracks):
2700         (WebKit::WebMediaStream::videoTracks):
2701         (WebKit::WebMediaStream::initialize):
2702         (WebKit):
2703         * platform/chromium/support/WebMediaStreamTrack.cpp:
2704         (WebKit::WebMediaStreamTrack::initialize):
2705         (WebKit):
2706         * platform/mediastream/MediaStreamComponent.h:
2707         (WebCore::MediaStreamComponent::create):
2708         (MediaStreamComponent):
2709         (WebCore::MediaStreamComponent::MediaStreamComponent):
2710         (WebCore):
2711         * platform/mediastream/MediaStreamDescriptor.h:
2712         (WebCore::MediaStreamDescriptor::create):
2713         (MediaStreamDescriptor):
2714         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
2715
2716 2013-02-13  Eric Seidel  <eric@webkit.org>
2717
2718         Use fancy new Vector-based String constructors in the WebVTT parser
2719         https://bugs.webkit.org/show_bug.cgi?id=109619
2720
2721         Reviewed by Benjamin Poulain.
2722
2723         No change in behavior. Added some FIXMEs for future perf optimization.
2724
2725         * html/track/WebVTTParser.cpp:
2726         (WebCore::WebVTTParser::constructTreeFromToken):
2727
2728 2013-02-13  Morten Stenshorne  <mstensho@opera.com>
2729
2730         WebKit ignores column-rules wider than column-gap
2731         https://bugs.webkit.org/show_bug.cgi?id=15553
2732
2733         Paint column rules even if they are wider than the gap.
2734         Rules wider than the gap should just overlap with column contents.
2735
2736         Reviewed by Eric Seidel.
2737
2738         Test: fast/multicol/rule-thicker-than-gap.html
2739
2740         * rendering/RenderBlock.cpp:
2741         (WebCore::RenderBlock::paintColumnRules):
2742
2743 2013-02-13  Philip Rogers  <pdr@google.com>
2744
2745         Replace SVG bitmap cache with directly-rendered SVG
2746         https://bugs.webkit.org/show_bug.cgi?id=106159
2747
2748         Reviewed by Tim Horton.
2749
2750         This patch removes the caching of SVG bitmaps so SVG images are rendered directly. This
2751         enables WebKit to pass the IE Chalkboard demo in 10s on a Z620:
2752         http://ie.microsoft.com/testdrive/Performance/Chalkboard/
2753
2754         On a simple scaled SVG benchmark similar to the IE10 Chalkboard demo
2755         (http://philbit.com/SvgImagePerformance/viewport.html):
2756             without patch: ~20FPS
2757             with patch: ~55FPS
2758
2759         The bitmap SVG image cache had several shortcomings:
2760             - The bitmap cache prevented viewport rendering. (WK104693)
2761             - Bitmap memory usage was high. (WK106484)
2762             - Caching animating images was expensive.
2763
2764         This change removes almost all of the SVGImageCache implementation, replacing it with
2765         directly-rendered SVG. Instead of caching bitmaps, an SVGImageForContainer is cached which
2766         is a thin wrapper around an SVG image with the associated container size and scale.
2767         When rendering patterns (e.g., tiled backgrounds), a temporary bitmap is used for
2768         performance. This change also removes the redraw timer of the old cache, instead relying
2769         on the SVG image to notify clients if the image changes (e.g., during animations).
2770
2771         This patch fixes two existing bugs (WK99481 and WK104189) that were due to caching bitmaps
2772         at a fixed size. A test has been added for each of these bugs.
2773
2774         Tests: svg/as-image/svg-image-scaled.html
2775                svg/as-image/svg-image-viewbox.html
2776
2777         * CMakeLists.txt:
2778         * GNUmakefile.list.am:
2779         * Target.pri:
2780         * WebCore.gypi:
2781         * WebCore.vcproj/WebCore.vcproj:
2782         * WebCore.xcodeproj/project.pbxproj:
2783         * loader/cache/CachedImage.cpp:
2784         (WebCore::CachedImage::lookupOrCreateImageForRenderer):
2785         (WebCore::CachedImage::setContainerSizeForRenderer):
2786         (WebCore::CachedImage::clear):
2787         (WebCore::CachedImage::changedInRect):
2788
2789             SVG images are no longer special-cased here. When the SVG image changes, users are
2790             notified through this function, and users can then request their content to be redrawn.
2791
2792         * svg/graphics/SVGImage.cpp:
2793         (WebCore::SVGImage::setContainerSize):
2794         (WebCore::SVGImage::drawForContainer):
2795
2796             drawForContainer lays out the SVG content for a specific container size and renders it.
2797             The logic is fairly straightforward but a note about the scales and zooms here:
2798                 the destination rect parameter is zoomed but not scaled
2799                 the source rect parameter is zoomed but not scaled
2800                 the context is scaled but not zoomed
2801             SVGImage::draw(...) only accepts a source and destination rect but does not consider
2802             scale or zoom. Therefore, drawForContainer removes the zoom component from the source
2803             so SVGImage::draw(...) will draw from the pre-zoom source to the post-zoom destination.
2804
2805         (WebCore::SVGImage::drawPatternForContainer):
2806
2807             For performance, drawPatternForContainer renders the SVG content onto a bitmap, then
2808             has the bitmap image draw the pattern. This is necessary because drawPattern is used
2809             for tiling.
2810
2811         (WebCore):
2812         (WebCore::SVGImage::startAnimation):
2813         (WebCore::SVGImage::stopAnimation):
2814         (WebCore::SVGImage::resetAnimation):
2815         (WebCore::SVGImage::reportMemoryUsage):
2816         * svg/graphics/SVGImage.h:
2817         (WebCore):
2818         (SVGImage):
2819         * svg/graphics/SVGImageCache.cpp:
2820
2821             Instead of storing a SizeAndScales values for each renderer, a SVGImageForContainer
2822             is stored which is just a thin wrapper around an SVG image that contains container
2823             sizing information. By combining the image and size information, the two maps of
2824             SVGImageCache have been merged into one.
2825
2826             To make this patch easier to review, SVGImageCache still exists and works similar to
2827             how it did before the patch. Now, SVGImageCache simply stores the SVGImageForContainers.
2828             In a followup patch it will be removed.
2829
2830             Note: the redraw timer of SVGImageCache has been removed because animation
2831             invalidation is now properly propagated back to the image clients.
2832
2833         (WebCore):
2834         (WebCore::SVGImageCache::SVGImageCache):
2835         (WebCore::SVGImageCache::~SVGImageCache):
2836         (WebCore::SVGImageCache::removeClientFromCache):
2837         (WebCore::SVGImageCache::setContainerSizeForRenderer):
2838         (WebCore::SVGImageCache::imageSizeForRenderer):
2839
2840             Previously, this function returned the scaled image size which was incorrect. The image
2841             size is used by clients such as GraphicsContext2D to determine the source size
2842             for drawing the image. draw() accepts zoomed but not scaled values, so this has been
2843             changed.
2844
2845         (WebCore::SVGImageCache::imageForRenderer):
2846
2847             A FIXME has been added here to not set the scale on every lookup. This can be improved
2848             by setting the page scale factor in setContainerSizeForRenderer() in a future patch.
2849
2850         * svg/graphics/SVGImageCache.h:
2851         (WebCore):
2852         (SVGImageCache):
2853         * svg/graphics/SVGImageForContainer.cpp: Added.
2854         (WebCore):
2855
2856             SVGImageForContainer is a thin wrapper around an SVG image. The lifetime of the
2857             SVGImage will be longer than the image cache.
2858
2859         (WebCore::SVGImageForContainer::size):
2860
2861             This is the only logic in SVGImageForContainer. The size returned needs to be zoomed
2862             but not scaled because it is used (e.g., by RenderImage) to pass back into draw() which
2863             takes zoomed but not scaled values.
2864
2865         (WebCore::SVGImageForContainer::draw):
2866         (WebCore::SVGImageForContainer::drawPattern):
2867         * svg/graphics/SVGImageForContainer.h: Added.
2868         (WebCore):
2869         (SVGImageForContainer):
2870
2871             In a future patch SVGImageForContainer can be made immutable but without a refactoring
2872             for not setting the page scale factor in SVGImageCache::lookupOrCreateImageForRenderer,
2873             setters are needed.
2874
2875         (WebCore::SVGImageForContainer::create):
2876         (WebCore::SVGImageForContainer::containerSize):
2877         (WebCore::SVGImageForContainer::pageScale):
2878         (WebCore::SVGImageForContainer::zoom):
2879         (WebCore::SVGImageForContainer::setSize):
2880         (WebCore::SVGImageForContainer::setZoom):
2881         (WebCore::SVGImageForContainer::setPageScale):
2882         (WebCore::SVGImageForContainer::SVGImageForContainer):
2883         (WebCore::SVGImageForContainer::destroyDecodedData):
2884         (WebCore::SVGImageForContainer::decodedSize):
2885
2886 2013-02-12  Antti Koivisto  <antti@apple.com>
2887
2888         Avoid updating timer heap when nothing changes
2889         https://bugs.webkit.org/show_bug.cgi?id=109630
2890
2891         Reviewed by Andreas Kling.
2892
2893         When the fire time of a Timer is changed we remove it from the timer heap and reinsert it. This is pretty slow. 
2894         Turns out that in ~80% of cases we are already in the heap and the insertion position is the same as the 
2895         original position. We can check if anything is actually going to change before doing this work.
2896         
2897         This makes starting a timer ~30% faster in average, ~0.1% progression in PLT3.
2898         
2899         * platform/Timer.cpp:
2900         (TimerHeapLessThanFunction):
2901         (WebCore::TimerHeapLessThanFunction::operator()):
2902         (WebCore::parentHeapPropertyHolds):
2903         (WebCore):
2904         (WebCore::childHeapPropertyHolds):
2905         (WebCore::TimerBase::hasValidHeapPosition):
2906         
2907             The code here assumes that STL heap is a normal binary heap. If there is a different implementation
2908             somewhere the assertions will catch it.
2909
2910         (WebCore::TimerBase::updateHeapIfNeeded):
2911         
2912             Skip updating the heap if it is already valid.
2913
2914         (WebCore::TimerBase::setNextFireTime):
2915         * platform/Timer.h:
2916         (TimerBase):
2917
2918 2013-02-13  Martin Robinson  <mrobinson@igalia.com>
2919
2920         [GTK] Remove remaining dead code from the GLib unicode backend
2921         https://bugs.webkit.org/show_bug.cgi?id=109707
2922
2923         Reviewed by Philippe Normand.
2924
2925         * platform/KURL.cpp:
2926         (WebCore::appendEncodedHostname):
2927         * platform/text/TextEncoding.cpp:
2928         (WebCore::TextEncoding::encode):
2929         * platform/text/TextEncodingRegistry.cpp:
2930         (WebCore::buildBaseTextCodecMaps):
2931         (WebCore::extendTextCodecMaps):
2932
2933 2013-02-13  Xianzhu Wang  <wangxianzhu@chromium.org>
2934
2935         Heap-use-after-free in WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects
2936         https://bugs.webkit.org/show_bug.cgi?id=108695
2937
2938         See comments of RenderLayerModelObject::willBeDestroyed() below for details.
2939
2940         Reviewed by Abhishek Arya.
2941
2942         Test: ManulTests/scrolling-coordinator-viewport-constrained-crash.html
2943         Unable to write a normal layout test because
2944         1) must waitUntilDone() to reproduce the crash but the redirected URL can't notifyDone();
2945         2) Can't use a frame to contain the test because ScrollingCoordinator handles only the main frame.
2946
2947         * rendering/RenderBoxModelObject.cpp:
2948         (WebCore::RenderBoxModelObject::willBeDestroyed): Moved removeViewportConstrainedObject() call into RenderLayerModelObject::willBeDestroyed() because only RenderLayerModelObjects can be added as viewportConstrainedObjects.
2949         * rendering/RenderLayerModelObject.cpp:
2950         (WebCore::RenderLayerModelObject::willBeDestroyed): Changed this->view() (then view->frameView()) to this->frame() (then frame->view()) because when willBeDestroyed() is called, the document has set its renderView to 0 thus this->view() will return 0, causing removeViewportConstrainedObject() not called and a deleted RenderLayerModelObject in FrameView's viewportConstrainedObjects.
2951
2952 2013-02-13  Florin Malita  <fmalita@chromium.org>
2953
2954         [SVG] OOB access in SVGListProperty::replaceItemValues()
2955         https://bugs.webkit.org/show_bug.cgi?id=109293
2956
2957         Replacing a list property item with itself should be a no-op. This patch updates the related
2958         APIs and logic to detect the self-replace case and prevent removal of the item from the list.
2959
2960         To avoid scanning the list multiple times, removeItemFromList() is updated to operate on
2961         indices and a findItem() method is added to resolve an item to an index.
2962
2963         Reviewed by Dirk Schulze.
2964
2965         No new tests: updated existing tests cover the change.
2966
2967         * svg/properties/SVGAnimatedListPropertyTearOff.h:
2968         (WebCore::SVGAnimatedListPropertyTearOff::findItem):
2969         (SVGAnimatedListPropertyTearOff):
2970         (WebCore::SVGAnimatedListPropertyTearOff::removeItemFromList):
2971         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
2972         (WebCore::SVGAnimatedPathSegListPropertyTearOff::findItem):
2973         (SVGAnimatedPathSegListPropertyTearOff):
2974         (WebCore::SVGAnimatedPathSegListPropertyTearOff::removeItemFromList):
2975         Add a findItem() delegating method, and update removeItemFromList() to use the new
2976         index-based API.
2977
2978         * svg/properties/SVGListProperty.h:
2979         (WebCore::SVGListProperty::insertItemBeforeValues):
2980         (WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
2981         (WebCore::SVGListProperty::replaceItemValues):
2982         (WebCore::SVGListProperty::replaceItemValuesAndWrappers):
2983         (SVGListProperty):
2984         Updated to handle the no-op case for insertItemBefore() & replaceItem().
2985
2986         * svg/properties/SVGListPropertyTearOff.h:
2987         (WebCore::SVGListPropertyTearOff::findItem):
2988         (WebCore::SVGListPropertyTearOff::removeItemFromList):
2989         Index-based API updates.
2990
2991         (WebCore::SVGListPropertyTearOff::processIncomingListItemValue):
2992         (WebCore::SVGListPropertyTearOff::processIncomingListItemWrapper):
2993         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
2994         (WebCore::SVGPathSegListPropertyTearOff::processIncomingListItemValue):
2995         Detect the self-replace case and return without removing the item from the list.
2996
2997         * svg/properties/SVGPathSegListPropertyTearOff.h:
2998         (WebCore::SVGPathSegListPropertyTearOff::findItem):
2999         (WebCore::SVGPathSegListPropertyTearOff::removeItemFromList):
3000         (SVGPathSegListPropertyTearOff):
3001         (WebCore::SVGPathSegListPropertyTearOff::processIncomingListItemWrapper):
3002         * svg/properties/SVGStaticListPropertyTearOff.h:
3003         (WebCore::SVGStaticListPropertyTearOff::processIncomingListItemValue):
3004         (WebCore::SVGStaticListPropertyTearOff::processIncomingListItemWrapper):
3005         Index-based API updates.
3006
3007 2013-02-13  Takashi Sakamoto  <tasak@google.com>
3008
3009         [Refactoring] StyleResolver::State should have methods to access its member variables.
3010         https://bugs.webkit.org/show_bug.cgi?id=108563
3011
3012         Reviewed by Antti Koivisto.
3013
3014         Made all member variables private and added methods to access the
3015         variables, because most of the member variables are read-only.
3016         We don't need to update those read-only variables while resolving
3017         styles.
3018
3019         No new tests, because just refactoring.
3020
3021         * css/SVGCSSStyleSelector.cpp:
3022         (WebCore::StyleResolver::applySVGProperty):
3023         * css/StyleResolver.cpp:
3024         (WebCore):
3025         (WebCore::StyleResolver::collectMatchingRules):
3026         (WebCore::StyleResolver::collectMatchingRulesForRegion):
3027         (WebCore::StyleResolver::sortAndTransferMatchedRules):
3028         (WebCore::StyleResolver::matchScopedAuthorRules):
3029         (WebCore::StyleResolver::styleSharingCandidateMatchesHostRules):
3030         (WebCore::StyleResolver::matchHostRules):
3031         (WebCore::StyleResolver::matchAuthorRules):
3032         (WebCore::StyleResolver::matchUserRules):
3033         (WebCore::StyleResolver::matchUARules):
3034         (WebCore::StyleResolver::collectMatchingRulesForList):
3035         (WebCore::StyleResolver::sortMatchedRules):
3036         (WebCore::StyleResolver::matchAllRules):
3037         (WebCore::StyleResolver::State::initElement):
3038         (WebCore::StyleResolver::initElement):
3039         Modified to invoke m_state.initElement if a given element is
3040         different from current m_state's element.
3041         (WebCore::StyleResolver::State::initForStyleResolve):
3042         Moved from StyleResolver.
3043         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
3044         (WebCore::StyleResolver::canShareStyleWithControl):
3045         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
3046         (WebCore::StyleResolver::canShareStyleWithElement):
3047         (WebCore::StyleResolver::locateSharedStyle):
3048         (WebCore::StyleResolver::styleForElement):
3049         (WebCore::StyleResolver::styleForKeyframe):
3050         (WebCore::StyleResolver::keyframeStylesForAnimation):
3051         (WebCore::StyleResolver::pseudoStyleForElement):
3052         Changed ASSERT in the first line. ASSERT(m_state.parentStyle) would be
3053         wrong, because it depends on previous resolving. However,
3054         initForStyleResolve will also update m_state.parentStyle. No code in
3055         pseudoStyleForElement depends on previous resolving state.
3056         (WebCore::StyleResolver::styleForPage):
3057         (WebCore::StyleResolver::defaultStyleForElement):
3058         (WebCore::StyleResolver::adjustRenderStyle):
3059         (WebCore::StyleResolver::updateFont):
3060         (WebCore::StyleResolver::pseudoStyleRulesForElement):
3061         (WebCore::StyleResolver::ruleMatches):
3062         Added one more parameter, dynamicPseudo, because dynamicPseudo in
3063         State class is just used for returning matched pseudo style from
3064         this ruleMatches to collectMatchingRulesForList. No need to keep
3065         dynamicPseudo while resolving styles.
3066         (WebCore::StyleResolver::checkRegionSelector):
3067         Removed m_pseudoStyle = NOPSEUDO, because this method uses just
3068         SelectorChecker::matched. SelectorChecker doesn't see StyleResolver's
3069         m_pseudoStyle directly. Need to use SelectorCheckerContext. So no
3070         need to set m_pseudoStyle to be NOPSEUDO.
3071         (WebCore::StyleResolver::applyProperties):
3072         (WebCore::StyleResolver::applyMatchedProperties):
3073         (WebCore::StyleResolver::isLeftPage):
3074         (WebCore::StyleResolver::applyPropertyToStyle):
3075         (WebCore::StyleResolver::useSVGZoomRules):
3076         (WebCore::createGridTrackBreadth):
3077         (WebCore::StyleResolver::resolveVariables):
3078         (WebCore::StyleResolver::applyProperty):
3079         (WebCore::StyleResolver::cachedOrPendingFromValue):
3080         (WebCore::StyleResolver::generatedOrPendingFromValue):
3081         (WebCore::StyleResolver::setOrPendingFromValue):
3082         (WebCore::StyleResolver::cursorOrPendingFromValue):
3083         (WebCore::StyleResolver::checkForTextSizeAdjust):
3084         (WebCore::StyleResolver::initializeFontStyle):
3085         (WebCore::StyleResolver::setFontSize):
3086         (WebCore::StyleResolver::colorFromPrimitiveValue):
3087         (WebCore::StyleResolver::loadPendingSVGDocuments):
3088         (WebCore::StyleResolver::cachedOrPendingStyleShaderFromValue):
3089         (WebCore::StyleResolver::loadPendingShaders):
3090         (WebCore::StyleResolver::parseCustomFilterTransformParameter):
3091         (WebCore::StyleResolver::createFilterOperations):
3092         (WebCore::StyleResolver::loadPendingImage):
3093         (WebCore::StyleResolver::loadPendingImages):
3094         * css/StyleResolver.h:
3095         (WebCore::StyleResolver::style):
3096         (WebCore::StyleResolver::parentStyle):
3097         (WebCore::StyleResolver::rootElementStyle):
3098         (WebCore::StyleResolver::element):
3099         (WebCore::StyleResolver::hasParentNode):
3100         (StyleResolver):
3101         (WebCore::StyleResolver::State::State):
3102         (State):
3103         (WebCore::StyleResolver::State::clear):
3104         Modified to use clear at the end of styleForElement.
3105         (WebCore::StyleResolver::State::document):
3106         (WebCore::StyleResolver::State::element):
3107         (WebCore::StyleResolver::State::styledElement):
3108         (WebCore::StyleResolver::State::setStyle):
3109         (WebCore::StyleResolver::State::style):
3110         (WebCore::StyleResolver::State::takeStyle):
3111         (WebCore::StyleResolver::State::ensureRuleList):
3112         (WebCore::StyleResolver::State::takeRuleList):
3113         (WebCore::StyleResolver::State::parentNode):
3114         (WebCore::StyleResolver::State::setParentStyle):
3115         (WebCore::StyleResolver::State::parentStyle):
3116         (WebCore::StyleResolver::State::rootElementStyle):
3117         (WebCore::StyleResolver::State::regionForStyling):
3118         (WebCore::StyleResolver::State::setSameOriginOnly):
3119         (WebCore::StyleResolver::State::isSameOriginOnly):
3120         (WebCore::StyleResolver::State::pseudoStyle):
3121         (WebCore::StyleResolver::State::elementLinkState):
3122         (WebCore::StyleResolver::State::distributedToInsertionPoint):
3123         (WebCore::StyleResolver::State::setElementAffectedByClassRules):
3124         (WebCore::StyleResolver::State::elementAffectedByClassRules):
3125         (WebCore::StyleResolver::State::setApplyPropertyToRegularStyle):
3126         (WebCore::StyleResolver::State::setApplyPropertyToVisitedLinkStyle):
3127         (WebCore::StyleResolver::State::applyPropertyToRegularStyle):
3128         (WebCore::StyleResolver::State::applyPropertyToVisitedLinkStyle):
3129         (WebCore::StyleResolver::State::pendingImageProperties):
3130         (WebCore::StyleResolver::State::pendingSVGDocuments):
3131         (WebCore::StyleResolver::State::setHasPendingShaders):
3132         (WebCore::StyleResolver::State::hasPendingShaders):
3133         (WebCore::StyleResolver::State::setLineHeightValue):
3134         (WebCore::StyleResolver::State::lineHeightValue):
3135         (WebCore::StyleResolver::State::setFontDirty):
3136         (WebCore::StyleResolver::State::fontDirty):
3137         (WebCore::StyleResolver::State::cacheBorderAndBackground):
3138         (WebCore::StyleResolver::State::hasUAAppearance):
3139         (WebCore::StyleResolver::State::borderData):
3140         (WebCore::StyleResolver::State::backgroundData):
3141         (WebCore::StyleResolver::State::backgroundColor):
3142         (WebCore::StyleResolver::State::fontDescription):
3143         (WebCore::StyleResolver::State::parentFontDescription):
3144         (WebCore::StyleResolver::State::setFontDescription):
3145         (WebCore::StyleResolver::State::setZoom):
3146         (WebCore::StyleResolver::State::setEffectiveZoom):
3147         (WebCore::StyleResolver::State::setTextSizeAdjust):
3148         (WebCore::StyleResolver::State::setWritingMode):
3149         (WebCore::StyleResolver::State::setTextOrientation):
3150         fontDescription, ... and setTextOrientation were moved from
3151         StyleResolver.
3152         (WebCore::StyleResolver::State::matchedRules):
3153         (WebCore::StyleResolver::State::addMatchedRule):
3154         Moved from StyleResolver.
3155         (WebCore::StyleResolver::applyPropertyToRegularStyle):
3156         (WebCore::StyleResolver::applyPropertyToVisitedLinkStyle):
3157         (WebCore::StyleResolver::fontDescription):
3158         (WebCore::StyleResolver::parentFontDescription):
3159         (WebCore::StyleResolver::setFontDescription):
3160         (WebCore::StyleResolver::setZoom):
3161         (WebCore::StyleResolver::setEffectiveZoom):
3162         (WebCore::StyleResolver::setTextSizeAdjust):
3163         (WebCore::StyleResolver::setWritingMode):
3164         (WebCore::StyleResolver::setTextOrientation):
3165         These fontDescription, ..., setTextOrientation are wrappers to
3166         invoke State's methods. StyleBuilder still depends on StyleResolver
3167         and invokes these methods. So we need these wrappers.
3168
3169 2013-02-13  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3170
3171         [Qt] window.open passes height and width parameters even if not defined in a page
3172         https://bugs.webkit.org/show_bug.cgi?id=107705
3173
3174         Reviewed by Kenneth Rohde Christiansen.
3175
3176         Do not override width or height of 0, as that indicates default size, and not minimum size.
3177
3178         Tested by tst_qwebpage.
3179
3180         * page/DOMWindow.cpp:
3181         (WebCore::DOMWindow::adjustWindowRect):
3182
3183 2013-02-13  Rashmi Shyamasundar  <rashmi.s2@samsung.com>
3184
3185         The 2D Canvas functions fillText()/strokeText() should display nothing when maxWidth is less then or equal to zero
3186         https://bugs.webkit.org/show_bug.cgi?id=102656
3187
3188         Reviewed by Dirk Schulze.
3189
3190         The functions fillText()/strokeText() should not display anything when 
3191         maxWidth is less than or equal to zero, according to spec :
3192         http://www.w3.org/TR/2dcontext/#text-preparation-algorithm
3193
3194         Test: fast/canvas/canvas-fillText-maxWidth-zero.html
3195
3196         * html/canvas/CanvasRenderingContext2D.cpp:
3197         (WebCore::CanvasRenderingContext2D::drawTextInternal):
3198
3199 2013-02-13  ChangSeok Oh  <shivamidow@gmail.com>
3200
3201         [GTK][AC] Implement basic transform animations with clutter ac backend
3202         https://bugs.webkit.org/show_bug.cgi?id=109363
3203
3204         Reviewed by Gustavo Noronha Silva.
3205
3206         Implement basic transform animation with clutter ac backend.
3207         GraphicsLayerClutter is almost same with GraphicsLayerCA. And PlatformClutterAnimation
3208         interfaces are also similar with PlatformCAAnimation, but they are implemented
3209         with native clutter APIs. Clutter backend AC supports a basic single transform animation
3210         with this patch now, but additive animation combination and keyframe animation
3211         are not supported yet.
3212
3213         Covered by existing animation tests.
3214
3215         * platform/graphics/clutter/GraphicsLayerActor.cpp:
3216         (graphicsLayerActorSetTransform):
3217         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
3218         (WebCore::isTransformTypeTransformationMatrix):
3219         (WebCore):
3220         (WebCore::isTransformTypeFloatPoint3D):
3221         (WebCore::isTransformTypeNumber):
3222         (WebCore::getTransformFunctionValue):
3223         (WebCore::getValueFunctionNameForTransformOperation):
3224         (WebCore::GraphicsLayerClutter::setTransformAnimationEndpoints):
3225         (WebCore::GraphicsLayerClutter::appendToUncommittedAnimations):
3226         (WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
3227         * platform/graphics/clutter/GraphicsLayerClutter.h:
3228         (GraphicsLayerClutter):
3229         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
3230         (WebCore::toClutterActorPropertyString):
3231         (WebCore):
3232         (WebCore::PlatformClutterAnimation::supportsValueFunction):
3233         (WebCore::PlatformClutterAnimation::duration):
3234         (WebCore::PlatformClutterAnimation::setDuration):
3235         (WebCore::PlatformClutterAnimation::setAdditive):
3236         (WebCore::PlatformClutterAnimation::valueFunction):
3237         (WebCore::PlatformClutterAnimation::setValueFunction):
3238         (WebCore::PlatformClutterAnimation::setFromValue):
3239         (WebCore::PlatformClutterAnimation::setToValue):
3240         (WebCore::PlatformClutterAnimation::timeline):
3241         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
3242         (WebCore::PlatformClutterAnimation::addOpacityTransition):
3243         (WebCore::PlatformClutterAnimation::addTransformTransition):
3244         (WebCore::PlatformClutterAnimation::addAnimationForKey):
3245         * platform/graphics/clutter/PlatformClutterAnimation.h:
3246         (PlatformClutterAnimation):
3247
3248 2013-02-13  Ilya Tikhonovsky  <loislo@chromium.org>
3249
3250         Web Inspector: Native Memory Instrumentation: reportLeaf method doesn't report the leaf node properly.
3251         https://bugs.webkit.org/show_bug.cgi?id=109554
3252
3253         In some cases leaves have no pointer so with the old schema we can't generate nodeId for them because we
3254         can't insert 0 into hashmap. It happens when we call addPrivateBuffer method.
3255
3256         Drive by fix: I introduced a client interface for the HeapGraphSerializer.
3257         It helps me to do the tests for the serializer.
3258
3259         Reviewed by Yury Semikhatsky.
3260
3261         It is covered by newly added tests in TestWebKitAPI.
3262
3263         * inspector/HeapGraphSerializer.cpp:
3264         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
3265         (WebCore::HeapGraphSerializer::pushUpdate):
3266         (WebCore::HeapGraphSerializer::reportNode):
3267         (WebCore::HeapGraphSerializer::toNodeId):
3268         (WebCore::HeapGraphSerializer::addRootNode):
3269         * inspector/HeapGraphSerializer.h:
3270         (HeapGraphSerializer):
3271         (Client):
3272         (WebCore::HeapGraphSerializer::Client::~Client):
3273         * inspector/InspectorMemoryAgent.cpp:
3274         (WebCore):
3275         (WebCore::InspectorMemoryAgent::getProcessMemoryDistributionImpl):
3276
3277 2013-02-13  Yury Semikhatsky  <yurys@chromium.org>
3278
3279         Web Inspector: add experimental native heap graph to Timeline panel
3280         https://bugs.webkit.org/show_bug.cgi?id=109687
3281
3282         Reviewed by Alexander Pavlov.
3283
3284         Added experimentatl support for native heap graph on the Timeline panel.
3285         Native memory usage data is collected after each top level task and can
3286         be displayed instead of DOM counters graph on the Timeline panel if
3287         corresponding experiment is enabled in the inspector settings.
3288
3289         * inspector/Inspector.json:
3290         * inspector/InspectorController.cpp:
3291         (WebCore::InspectorController::InspectorController):
3292         * inspector/InspectorTimelineAgent.cpp:
3293         (TimelineAgentState):
3294         (WebCore::InspectorTimelineAgent::setIncludeDomCounters):
3295         (WebCore):
3296         (WebCore::InspectorTimelineAgent::setIncludeNativeMemoryStatistics):
3297         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
3298         (WebCore::InspectorTimelineAgent::setDOMCounters):
3299         (WebCore::InspectorTimelineAgent::setNativeHeapStatistics):
3300         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
3301         * inspector/InspectorTimelineAgent.h:
3302         (WebCore):
3303         (WebCore::InspectorTimelineAgent::create):
3304         (InspectorTimelineAgent):
3305         * inspector/WorkerInspectorController.cpp:
3306         (WebCore::WorkerInspectorController::WorkerInspectorController):
3307         * inspector/front-end/MemoryStatistics.js:
3308         (WebInspector.MemoryStatistics):
3309         * inspector/front-end/NativeMemoryGraph.js:
3310         (WebInspector.NativeMemoryGraph):
3311         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded.addStatistics):
3312         (WebInspector.NativeMemoryGraph.prototype._onRecordAdded):
3313         * inspector/front-end/Settings.js:
3314         (WebInspector.ExperimentsSettings):
3315         * inspector/front-end/TimelinePanel.js:
3316
3317 2013-02-13  Vladislav Kaznacheev  <kaznacheev@chromium.org>
3318
3319         Web Inspector: Fixed colorpicker editing and scrolling.
3320         https://bugs.webkit.org/show_bug.cgi?id=109434.
3321
3322         Reviewed by Alexander Pavlov.
3323
3324         The color picker scrolling logic relied on the fixed DOM structure which changed with the introduction of
3325         SidebarPaneStack (https://bugs.webkit.org/show_bug.cgi?id=108183).
3326         Added a special CSS class to mark the scroll target.
3327
3328         No new tests.
3329
3330         * inspector/front-end/SplitView.js:
3331         (WebInspector.SplitView):
3332         * inspector/front-end/StylesSidebarPane.js:
3333         (WebInspector.StylePropertyTreeElement.prototype.updateTitle.):
3334         * inspector/front-end/TabbedPane.js:
3335         (WebInspector.TabbedPane):
3336  
3337 2013-02-13  Andrey Lushnikov  <lushnikov@chromium.org>
3338
3339         Web Inspector: fix js compilation warnings in TextPrompt
3340         https://bugs.webkit.org/show_bug.cgi?id=109685
3341
3342         Reviewed by Alexander Pavlov.
3343
3344         Mark last argument of _applySuggestion function as optional.
3345
3346         No new tests: no change in behaviour.
3347
3348         * inspector/front-end/TextPrompt.js:
3349
3350 2013-02-13  Pablo Flouret  <pablof@motorola.com>
3351
3352         Implement css-conditional's CSS.supports()
3353         https://bugs.webkit.org/show_bug.cgi?id=100324
3354
3355         Reviewed by Antti Koivisto.
3356
3357         http://dev.w3.org/csswg/css3-conditional/#the-css-interface
3358
3359         The supports() method provides the css @supports rule's corresponding
3360         dom api.
3361         The patch also adds the CSS interface on DOMWindow, which holds "useful
3362         CSS-related functions that do not belong elsewhere". This is where
3363         supports() lives.
3364
3365         Test: css3/supports-dom-api.html
3366
3367         * CMakeLists.txt:
3368         * DerivedSources.cpp:
3369         * DerivedSources.make:
3370         * DerivedSources.pri:
3371         * GNUmakefile.list.am:
3372         * Target.pri:
3373         * WebCore.exp.in:
3374         * WebCore.gypi:
3375         * WebCore.vcproj/WebCore.vcproj:
3376         * WebCore.xcodeproj/project.pbxproj:
3377         * bindings/gobject/GNUmakefile.am:
3378         * bindings/scripts/CodeGeneratorGObject.pm:
3379         (SkipFunction):
3380             Add DOMWindowCSS.* to the build systems.
3381
3382         * bindings/scripts/CodeGenerator.pm:
3383         (WK_lcfirst):
3384             Handle CSS prefixes correctly (s/cSS/css/).
3385
3386         * css/CSSGrammar.y.in:
3387         * css/CSSParser.cpp:
3388         (WebCore::CSSParser::CSSParser):
3389         (WebCore::CSSParser::parseSupportsCondition):
3390         (WebCore::CSSParser::detectAtToken):
3391         * css/CSSParser.h:
3392             webkit_supports_condition parses just the condition part of an
3393             @supports rule and evaluates it, outputting whether the condition
3394             is supported or not.
3395
3396         * css/CSSAllInOne.cpp:
3397         * css/DOMWindowCSS.cpp: Added.
3398         * css/DOMWindowCSS.h: Added.
3399         * css/DOMWindowCSS.idl: Added.
3400             The CSS interface object.
3401
3402         * page/DOMWindow.cpp:
3403         (WebCore::DOMWindow::css):
3404         * page/DOMWindow.h:
3405         * page/DOMWindow.idl:
3406             window.CSS
3407
3408 2013-02-13  Vladislav Kaznacheev  <kaznacheev@chromium.org>
3409
3410         Web Inspector: Simplify SplitView to rely more on CSS
3411         https://bugs.webkit.org/show_bug.cgi?id=109426
3412
3413         Reviewed by Vsevolod Vlasov.
3414
3415         Simplified Javascript code by moving large part of the layout logic into CSS rules. The patch is larger than it
3416         should be because one of the clients (TimelinePanel) is breaking SplitView incapsulation by reparenting its
3417         resizer.
3418
3419         No new tests.
3420