WebSocket's MessageEvent.origin attribute is an empty string
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-11-23  Christophe Dumez  <christophe.dumez@intel.com>
2
3         WebSocket's MessageEvent.origin attribute is an empty string
4         https://bugs.webkit.org/show_bug.cgi?id=102889
5
6         Reviewed by Kentaro Hara.
7
8         Fix WebSocket implementation so that the message event's origin
9         attribute is properly set to the Unicode serialization of the
10         origin of the URL that was passed to the WebSocket object's
11         constructor, instead of an empty string.
12
13         The new behavior is according to the specification:
14         http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#feedback-from-the-protocol
15
16         It also matches the behavior of Firefox.
17
18         Tests: http/tests/websocket/tests/hybi/send-blob-onmessage-origin.html
19                http/tests/websocket/tests/hybi/send-onmessage-origin.html
20
21         * Modules/websockets/WebSocket.cpp:
22         (WebCore::WebSocket::didReceiveMessage):
23         (WebCore::WebSocket::didReceiveBinaryData):
24         * dom/MessageEvent.cpp:
25         (WebCore::MessageEvent::MessageEvent):
26         * dom/MessageEvent.h:
27         (WebCore::MessageEvent::create):
28         (MessageEvent):
29
30 2012-11-22  Eugene Klyuchnikov  <eustas.bug@gmail.com>
31
32         Web Inspector: No "Save Heap Snapshot" option after canceling save to file dialog.
33         https://bugs.webkit.org/show_bug.cgi?id=100916
34
35         Reviewed by Yury Semikhatsky.
36
37         Fixed order of operations - now receiver is assigned only when save
38         dialog responds.
39
40         * inspector/front-end/HeapSnapshotView.js: Fixed order of operations.
41
42 2012-11-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
43
44         [Qt] REGRESSION(r135507): It made 13 tests fail
45         https://bugs.webkit.org/show_bug.cgi?id=103069
46
47         Reviewed by Simon Hausmann.
48
49         The subframe loading logic depends on that script extensions are not recognized,
50         so avoid recognizing them in getMIMETypeForExtension which is used for pre-load
51         mimetype detection.
52
53         * platform/qt/MIMETypeRegistryQt.cpp:
54         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
55
56 2012-11-23  Jochen Eisinger  <jochen@chromium.org>
57
58         REGRESSION (r135455): Compilation without SVG enabled broken
59         https://bugs.webkit.org/show_bug.cgi?id=103108
60
61         Reviewed by Yury Semikhatsky.
62
63         Move SVG-only code behind #if ENABLE(SVG) that was accidentially moved
64         outside of the #if block during the refactoring.
65
66         * platform/graphics/filters/FilterOperation.h:
67         (ReferenceFilterOperation):
68
69 2012-11-23  Julian Pastarmov  <pastarmovj@chromium.org>
70
71         REGRESSION (r128633): td changes size during re-layout of table although it shouldn't
72         https://bugs.webkit.org/show_bug.cgi?id=102802
73
74         Reviewed by Ojan Vafai.
75
76         The bug was caused by incorrectly rewriting a nested condition which caused the else
77         clause to trigger in wrong cases.
78
79         Test: fast/table/nested-tables-with-div-offset.html
80
81         * rendering/RenderBox.cpp:
82         (WebCore::RenderBox::computePercentageLogicalHeight):
83         Reverted wrong combination of nested if statements.
84
85 2012-11-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
86
87         [Qt] REGRESSION(r135507): It made 13 tests fail
88         https://bugs.webkit.org/show_bug.cgi?id=103069
89
90         Reviewed by Simon Hausmann.
91
92         Fix regression in recognizing MHTML on some platforms.
93
94         * platform/qt/MIMETypeRegistryQt.cpp:
95         (ExtensionMap):
96         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
97         (WebCore::MIMETypeRegistry::getMIMETypeForPath):
98
99 2012-11-22  Pavel Feldman  <pfeldman@chromium.org>
100
101         Web Inspector: ctrl+end in editor does not select the last symbol.
102         https://bugs.webkit.org/show_bug.cgi?id=103078
103
104         Reviewed by Vsevolod Vlasov.
105
106         Test: inspector/editor/text-editor-selection.html
107
108         * inspector/front-end/DefaultTextEditor.js:
109         (WebInspector.DefaultTextEditor.prototype._handleScrollChanged):
110         (WebInspector.DefaultTextEditor.prototype.overrideViewportForTest):
111         (WebInspector.TextEditorChunkedPanel.prototype._repaintAll):
112         (WebInspector.TextEditorChunkedPanel.prototype._scrollTop):
113         (WebInspector.TextEditorChunkedPanel.prototype._clientHeight):
114         (WebInspector.TextEditorMainPanel.prototype._paintLineChunks):
115         (WebInspector.TextEditorMainPanel.prototype._selectionToPosition):
116         (WebInspector.TextEditorMainPanel.prototype._updateHighlightsForRange):
117
118 2012-11-23  Yury Semikhatsky  <yurys@chromium.org>
119
120         Remove references to non-chromium entries from WebCore.gypi
121         https://bugs.webkit.org/show_bug.cgi?id=103103
122
123         Reviewed by Pavel Feldman.
124
125         * WebCore.gypi: Removed references to files specific for wince, cairo, qt, wx and efl.
126
127 2012-11-23  Alexander Pavlov  <apavlov@chromium.org>
128
129         Web Inspector: inspector overlay is always updated when inspector is open
130         https://bugs.webkit.org/show_bug.cgi?id=103106
131
132         Reviewed by Pavel Feldman.
133
134         Provide empty size into the InspectorOverlay if the metrics emulation is disabled,
135         so that it will not get painted in all cases.
136
137         * inspector/InspectorController.cpp:
138         (WebCore::InspectorController::webViewResized): Call InspectorPageAgent::webViewResized() rather than InspectorOverlay::resize().
139         * inspector/InspectorPageAgent.cpp:
140         (WebCore::InspectorPageAgent::webViewResized): Provide empty size into InspectorOverlay::resize() if device metrics are not emulated.
141         * inspector/InspectorPageAgent.h:
142
143 2012-11-23  Krzysztof Czech  <k.czech@samsung.com>
144
145         [EFL] Platform support for Accessibility feature.
146         https://bugs.webkit.org/show_bug.cgi?id=100848
147
148         Reviewed by Gyuyoung Kim.
149
150         Add EFL platform's definitions to enable proper accessibility routines.
151
152         No new tests. Covered by existing layout tests.
153
154         * PlatformEfl.cmake: Add accessibility/atk content to compilation.
155         * accessibility/AccessibilityObject.cpp:
156         (WebCore::AccessibilityObject::AccessibilityObject):
157         * accessibility/AccessibilityObject.h:
158         (AccessibilityObject):
159         * accessibility/efl/AccessibilityObjectEfl.cpp: Removed. No needed platform specific implementation. ATK shared implementation will be used.
160
161 2012-11-23  Thiago Marcos P. Santos  <thiago.santos@intel.com>
162
163         Expose DOM interface for CSS Device Adaptation
164         https://bugs.webkit.org/show_bug.cgi?id=95966
165
166         Reviewed by Kenneth Rohde Christiansen.
167
168         Added V8 and JSC bindings for CSS Device Adapation.
169
170         Test: css3/device-adapt/opera/cssom-001.xhtml
171
172         * CMakeLists.txt:
173         * DerivedSources.make:
174         * DerivedSources.pri:
175         * GNUmakefile.list.am:
176         * WebCore.gypi:
177         * WebCore.xcodeproj/project.pbxproj:
178         * bindings/js/JSCSSRuleCustom.cpp:
179         (WebCore::toJS):
180         * bindings/objc/DOMCSS.mm:
181         (kitClass):
182         * bindings/v8/custom/V8CSSRuleCustom.cpp:
183         (WebCore::wrap):
184         * css/CSSRule.idl:
185         * css/WebKitCSSViewportRule.idl: Added.
186         * page/DOMWindow.idl:
187
188 2012-11-22  Sheriff Bot  <webkit.review.bot@gmail.com>
189
190         Unreviewed, rolling out r135549.
191         http://trac.webkit.org/changeset/135549
192         https://bugs.webkit.org/show_bug.cgi?id=103102
193
194         Multiple layout test crashes (Requested by yurys on #webkit).
195
196         * rendering/RenderTable.cpp:
197         (WebCore::RenderTable::layout):
198         * rendering/RenderTable.h:
199         (RenderTable):
200
201 2012-11-22  Rick Byers  <rbyers@chromium.org>
202
203         window is missing Touch and TouchList - touch event conformance test failure
204         https://bugs.webkit.org/show_bug.cgi?id=96295
205
206         Reviewed by Adam Barth.
207
208         Add Touch and TouchList constructors to window for ENABLE(TOUCH_EVENTS).
209
210         Tests: fast/js/global-constructors.html
211                fast/events/touch/document-create-touch-list.html
212
213         * page/DOMWindow.idl:
214
215 2012-11-22  Dan Carney  <dcarney@google.com>
216
217         [V8] Make worker context prototype chain match other browsers
218         https://bugs.webkit.org/show_bug.cgi?id=103057
219
220         Reviewed by Adam Barth.
221
222         The following should be defined in a worker:
223         Object.getOwnPropertyDescriptor(this.__proto__, "postMessage")
224         It is currently undefined in chrome only. This patch fixes that.
225
226         No new tests. No change in functionality.
227
228         * bindings/scripts/CodeGeneratorV8.pm:
229         (GenerateImplementation):
230
231 2012-11-22  Rafael Brandao  <rafael.lobo@openbossa.org>
232
233         Remove PLATFORM(HAIKU) leftovers code
234         https://bugs.webkit.org/show_bug.cgi?id=103086
235
236         Reviewed by Antti Koivisto.
237
238         * platform/PlatformWheelEvent.h:
239         (PlatformWheelEvent):
240
241 2012-11-22  Dirk Schulze  <krit@webkit.org>
242
243         -webkit-mask shorthand switches -webkit-mask-clip and -webkit-mask-origin values
244         https://bugs.webkit.org/show_bug.cgi?id=103083
245
246         Reviewed by Antti Koivisto.
247
248         The order of CSSPropertyWebkitMaskOrigin and CSSPropertyWebkitMaskClip was not correct
249         for property value. Just changed the order in the property array to match behavior of
250         background and CSS Masking spec.
251
252         Test: fast/masking/parsing-mask.html
253
254         * css/StylePropertyShorthand.cpp:
255         (WebCore::webkitMaskShorthand):
256
257 2012-11-22  John Mellor  <johnme@chromium.org>
258
259         Text Autosizing: Improve handling of nested comments on reddit.com
260         https://bugs.webkit.org/show_bug.cgi?id=102409
261
262         Reviewed by Kenneth Rohde Christiansen.
263
264         No longer consider overflow != visible as requiring an independent
265         cluster. Some sites (e.g. reddit.com) wrap ordinary blocks (such as
266         comments) in overflow:hidden or overflow:auto, for various reasons
267         (like allowing it to be scrollable, or clipping an element that sticks
268         out). These reasons are not sufficient justification for a new cluster.
269
270         On reddit.com this means that comments will all get the same multiplier,
271         rather than being independently assigned a variety of multipliers based
272         on how much text each comment contains (etc), which significantly
273         improves the look.
274
275         Test: fast/text-autosizing/cluster-narrow-in-wide-ohidden.html
276
277         * rendering/TextAutosizer.cpp:
278         (WebCore::TextAutosizer::isAutosizingCluster):
279
280 2012-11-22  Pravin D  <pravind.2k4@gmail.com>
281
282         max-height property not respected in case of tables
283         https://bugs.webkit.org/show_bug.cgi?id=98633
284
285         Reviewed by Julien Chaffraix.
286
287         The max-height property determines the maximum computed height an element can have. In case of tables
288         the computed height was not being limited by the max-height property. The current patch fixes the same.
289
290         Test: fast/table/css-table-max-height.html
291
292         * rendering/RenderTable.cpp:
293         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
294           Helper function to compute height from the given style height.
295           This function handles style height of type fixed, percent and viewport percent.
296           As height of type 'calculated' gets internally resolved to either fixed or percent
297           there is no special handling required for the same.
298
299         (WebCore):
300         (WebCore::RenderTable::layout):
301           Logic to compute the logical height of an element such that it does not exceed the max-height value given that
302           min-width < Content height < max-height, when min-height < max-height.
303           However max-height value is not respected if either min-height > max-height or Content height > max-height.
304
305         * rendering/RenderTable.h:
306         (RenderTable):
307           Function definition for the newly add function convertStyleLogicalHeightToComputedHeight().
308
309 2012-11-22  Kentaro Hara  <haraken@chromium.org>
310
311         Remove 'module' from IDL parser
312         https://bugs.webkit.org/show_bug.cgi?id=102670
313
314         Reviewed by Adam Barth.
315
316         The Web IDL spec no longer supports 'module'. We already removed
317         'module's from WebKit IDL files. So this patch removes 'module'
318         from the IDL parser.
319
320         No tests. No change in behavior.
321
322         * bindings/scripts/IDLParser.pm:
323         (Parse):
324         (parseDefinitionOld):
325
326 2012-11-22  Dan Carney  <dcarney@google.com>
327
328         [V8] fix DOMWrapperWorld destructor
329         https://bugs.webkit.org/show_bug.cgi?id=103066
330
331         Reviewed by Jochen Eisinger.
332
333         DOMWrapperWorld had a workaround in place during deletion.
334         This patch brings it in line with WebKit standards.
335
336         No new tests: refactor.
337
338         * bindings/v8/DOMWrapperWorld.cpp:
339         (WebCore::DOMWrapperWorld::~DOMWrapperWorld):
340         (WebCore::DOMWrapperWorld::ensureIsolatedWorld):
341         * bindings/v8/DOMWrapperWorld.h:
342         (DOMWrapperWorld):
343         (WebCore::DOMWrapperWorld::isolatedWorldDOMDataStore):
344
345 2012-11-22  Antti Koivisto  <antti@apple.com>
346
347         Remove SVGShadowText class
348         https://bugs.webkit.org/show_bug.cgi?id=103088
349
350         Reviewed by Ryosuke Niwa.
351
352         Remove SVGShadowText class and merge the little functionality it has to Text.
353
354         * dom/Text.cpp:
355         (WebCore):
356         (WebCore::isSVGShadowText):
357         
358             Figure out if we are a SVGShadowText from the context.
359
360         (WebCore::isSVGText):
361         (WebCore::Text::createRenderer):
362         (WebCore::Text::recalcTextStyle):
363         
364             Factor SVG special case testing to functions.
365
366         * dom/Text.h:
367         (Text):
368
369             Get rid of the now unnecessary willRecalcTextStyle mechanism.
370
371         * svg/SVGTRefElement.cpp:
372         (WebCore):
373         (WebCore::SVGTRefElement::updateReferencedText):
374
375 2012-11-22  Andreas Kling  <akling@apple.com>
376
377         Style sharing: Remove O(n^2) presentation attribute checks that never found anything anyway.
378         <http://webkit.org/b/103019>
379
380         Reviewed by Ojan Vafai.
381
382         Rely on the global presentation attribute cache and remove the slow-path code that compares
383         the full StylePropertySets for attribute-derived style.
384         There are virtually no cases of logically equivalent presentation attribute styles that don't
385         already share the same memory address. (Zero hits on Apple and Chromium PLT content.)
386
387         * css/StyleResolver.cpp:
388         (WebCore::haveIdenticalStyleAffectingAttributes):
389         (WebCore::StyleResolver::canShareStyleWithElement):
390
391 2012-11-22  Pavel Feldman  <pfeldman@chromium.org>
392
393         Web Inspector: evaluate on hover regressed with the editor change
394         https://bugs.webkit.org/show_bug.cgi?id=103063
395
396         Reviewed by Vsevolod Vlasov.
397
398         We are no longer mutating the editor's dom from outside.
399
400         * inspector/front-end/DOMExtension.js:
401         (Element.prototype.remove):
402         * inspector/front-end/DefaultTextEditor.js:
403         (WebInspector.DefaultTextEditor.prototype.highlightRangesWithStyleClass):
404         (WebInspector.DefaultTextEditor.prototype.highlightExpression):
405         (WebInspector.DefaultTextEditor.prototype.hideHighlightedExpression):
406         * inspector/front-end/JavaScriptSourceFrame.js:
407         (WebInspector.JavaScriptSourceFrame.prototype._getPopoverAnchor):
408         (WebInspector.JavaScriptSourceFrame.prototype._onHidePopover):
409         (WebInspector.JavaScriptSourceFrame.prototype._highlightExpression):
410
411 2012-09-26  Gustavo Noronha Silva  <gns@gnome.org>
412
413         [GTK] Split SVG from WebCore to work-around make limitation
414         https://bugs.webkit.org/show_bug.cgi?id=97735
415
416         Reviewed by Carlos Garcia Campos.
417
418         Add a new libtool convenience library, libWebCoreSVG.la, to work-around
419         make limitation when linking libWebCore.
420
421         * GNUmakefile.am: new libWebCoreSVG.la library.
422         * GNUmakefile.list.am: move SVG-related files to be part of the new library.
423
424 2012-11-22  Pan Deng  <pan.deng@intel.com>
425
426         [Web Inspector]Code Style changes in TimelinePresentationModel.js.
427         https://bugs.webkit.org/show_bug.cgi?id=102885.
428
429         Reviewed by Pavel Feldman.
430
431         This patch changes "switch" code style for TimelinePresentationModel.js, no functionality update.
432
433         No new tests.
434
435         * inspector/front-end/TimelinePresentationModel.js:
436         (WebInspector.TimelinePresentationModel.Record.prototype._getRecordDetails):
437
438 2012-11-22  Ryosuke Niwa  <rniwa@webkit.org>
439
440         Build fix attempt.
441
442         * html/HTMLCollection.h:
443         (HTMLCollection):
444
445 2012-11-22  Ryosuke Niwa  <rniwa@webkit.org>
446
447         Get rid of HTMLCollectionCacheBase
448         https://bugs.webkit.org/show_bug.cgi?id=103085
449
450         Reviewed by Sam Weinig.
451
452         Merged HTMLCollectionCacheBase into HTMLCollection now that DynamicNodeList and HTMLCollection
453         share one implementation.
454
455         * dom/DynamicNodeList.cpp:
456         (WebCore::DynamicNodeListCacheBase::rootNode): Merged ownerNodeHasItemRefAttribute since this was
457         the only caller of this function, and the function name didn't match what it was checking.
458         (WebCore::DynamicNodeListCacheBase::invalidateCache):
459         (WebCore::DynamicNodeListCacheBase::invalidateIdNameCacheMaps):
460         * dom/DynamicNodeList.h:
461         (WebCore):
462         (WebCore::DynamicNodeListCacheBase::cachedItemOffset):
463         (DynamicNodeListCacheBase):
464         * html/HTMLCollection.cpp:
465         (WebCore::HTMLCollection::HTMLCollection):
466         (WebCore::DynamicNodeListCacheBase::setItemCache):
467         (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfterCachedItem): Merged cachedElementsArrayOffset()
468         now that this is the only caller.
469         (WebCore::HTMLCollection::append):
470         * html/HTMLCollection.h:
471         (HTMLCollection):
472         (WebCore::HTMLCollection::idCache): Moved from HTMLCollectionCacheBase.
473         (WebCore::HTMLCollection::nameCache): Ditto.
474         (WebCore::HTMLCollection::appendIdCache): Ditto.
475         (WebCore::HTMLCollection::appendNameCache): Ditto.
476
477 2012-11-22  Antti Koivisto  <antti@apple.com>
478
479         Merge EditingText into Text
480         https://bugs.webkit.org/show_bug.cgi?id=103060
481
482         Reviewed by Ryosuke Niwa.
483
484         Remove the EditingText class. Its only function beyond the regular Text is that it always creates a renderer.
485         It can be replaced with a bit.
486
487         * CMakeLists.txt:
488         * GNUmakefile.list.am:
489         * Target.pri:
490         * WebCore.gypi:
491         * WebCore.vcproj/WebCore.vcproj:
492         * WebCore.xcodeproj/project.pbxproj:
493         * dom/CDATASection.cpp:
494         (WebCore::CDATASection::CDATASection):
495         * dom/Document.cpp:
496         (WebCore::Document::createEditingTextNode):
497         * dom/Document.h:
498         (WebCore):
499         (Document):
500         * dom/EditingText.cpp: Removed.
501         * dom/EditingText.h: Removed.
502         * dom/Node.h:
503         (WebCore::Node::hasName):
504         (WebCore::Node::isEditingText):
505         (WebCore::Node::setHasName):
506         
507             Use the same bit as hasName() which is Element specific.
508
509         * dom/Text.cpp:
510         (WebCore::Text::create):
511         (WebCore):
512         (WebCore::Text::createEditingText):
513         (WebCore::Text::rendererIsNeeded):
514         * dom/Text.h:
515         (Text):
516         (WebCore::Text::Text):
517         * editing/Editor.cpp:
518         * editing/InsertTextCommand.cpp:
519         * editing/ReplaceSelectionCommand.cpp:
520         * editing/htmlediting.cpp:
521         * editing/mac/EditorMac.mm:
522         * page/Frame.cpp:
523
524 2012-11-22  Eugene Klyuchnikov  <eustas.bug@gmail.com>
525
526         Web Inspector: Timeline: Disclosure arrows rendered underneath frame boundaries
527         https://bugs.webkit.org/show_bug.cgi?id=101053
528
529         Reviewed by Yury Semikhatsky.
530
531         In Timeline, when in "frames" mode, event disclosure arrows are rendered
532         below the dividing lines for the frame (div.timeline-frame-divider).
533         When this happens, the frame divider can capture mouse clicks and make
534         it difficult to open the disclosure arrow.
535
536         * inspector/front-end/timelinePanel.css:
537         (#timeline-grid-header): Render dividers under timeline bars.
538
539 2012-11-22  Huang Dongsung  <luxtella@company100.net>
540
541         [TexMap] Reduce public methods of TextureMapperTiledBackingStore.
542         https://bugs.webkit.org/show_bug.cgi?id=103032
543
544         Reviewed by Noam Rosenthal.
545
546         This patch makes two methods private and removes one method.
547
548         No new tests, refactoring only.
549
550         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
551         (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
552         * platform/graphics/texmap/TextureMapperBackingStore.h:
553         (WebCore::TextureMapperTiledBackingStore::create):
554         (TextureMapperTiledBackingStore):
555         (WebCore::TextureMapperTiledBackingStore::setContentsToImage):
556         (WebCore::TextureMapperTiledBackingStore::rect):
557
558 2012-11-22  Simon Hausmann  <simon.hausmann@digia.com>, Pierre Rossi <pierre.rossi@digia.com>
559
560         [Qt] Separate QWidget dependant code into separate WebKitWidgets static library
561         https://bugs.webkit.org/show_bug.cgi?id=102800
562
563         Reviewed by Tor Arne Vestbø.
564
565         This patch separates code that needs to use QWidget related APIs in
566         WebKit/qt/WebCoreSupport and Api from code that doesn't. This means for
567         example FrameLoaderClientQt.cpp remains in the WebKit1 static library,
568         while qwebpage.cpp and qwebframe.cpp become part of the WebKitWidgets
569         static library. WebKit1 is compiled without QT += widgets and therefore
570         any widget related dependency has been moved "up" and out of WebKit1 into
571         the WebKitWidgets library.
572
573         Between the code in WebKit.a and WebKitWidgets.a new adapters and
574         interfaces have been introduced, such as QWebPageAdapter and
575         QWebFrameAdapter. QWebPageAdapter, when used from WebKit1, is a way to
576         call out into the API layer, implemented by QWebPage (QWebPagePrivate).
577         The other way around if QWebPage wants to access WebCore or
578         WebCoreSupport related functionality, it will go through
579         QWebPageAdapater (as base class). The separation in the direction up
580         into the API layer is complete with this patch, no code in WebKit1
581         depends on QtWidgets. The separation the other way around, code in the
582         API layer not using any WebCore types, is not complete yet.
583
584         Some classes such as QWebSettings, QWebElement or
585         DumpRenderTreeSupportQt remain in WebKit1. While they are API layer,
586         they do not depend on widget related Qt APIs and they make much more
587         use of WebCore internal APIs and therefore are easier to keep in
588         WebKit1.
589
590         In the future we plan to place a real shared library boundary between
591         WebKit1 and WebKitWidgets, by keeping the WebKit1 static library as
592         part of the QtWebKit shared library and by turning the WebKitWidgets
593         static library into a shared one.
594
595         * platform/qt/QWebPageClient.h:
596         (QWebPageClient):
597
598 2012-11-22  Dan Carney  <dcarney@google.com>
599
600         [V8] Add context checks to WorldContextHandle and V8DOMWindowShell
601         https://bugs.webkit.org/show_bug.cgi?id=101573
602
603         Reviewed by Adam Barth.
604
605         Added a bunch of assertions to ensure the problems with IndexedDB
606         contexts cannot reemerge.
607
608         No new tests. No change in functionality.
609
610         * bindings/v8/V8DOMWindowShell.cpp:
611         (WebCore):
612         (WebCore::V8DOMWindowShell::assertContextHasCorrectPrototype):
613         * bindings/v8/V8DOMWindowShell.h:
614         (V8DOMWindowShell):
615         (WebCore::V8DOMWindowShell::isolated):
616         * bindings/v8/WorldContextHandle.cpp:
617         (WebCore::WorldContextHandle::WorldContextHandle):
618
619 2012-11-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
620
621         [Qt] Correct extensions on preferredFilename
622         https://bugs.webkit.org/show_bug.cgi?id=103054
623
624         Reviewed by Simon Hausmann.
625
626         When guessing a filename we will now ensure it has an extension that is valid for its mimetype.
627         To do this the two missing methods getExtensionsForMIMEType and getPreferredExtensionForMIMEType
628         have been added to the Qt implementation of MIMETypeRegistry.
629
630         * platform/network/qt/QNetworkReplyHandler.cpp:
631         (WebCore::QNetworkReplyHandler::sendResponseIfNeeded):
632         * platform/qt/MIMETypeRegistryQt.cpp:
633         (WebCore::MIMETypeRegistry::getExtensionsForMIMEType):
634         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
635
636 2012-11-22  Kent Tamura  <tkent@chromium.org>
637
638         INPUT_MULTIPLE_FIELDS_UI: Refactoring: Do not call updateInnerTextValue if only read-only sub-fields have values
639         https://bugs.webkit.org/show_bug.cgi?id=103033
640
641         Reviewed by Kentaro Hara.
642
643         input[type=time] can have read-only sub fields. If only read-only fields
644         have values, we don't need to call updateInnerTextValue when
645         HTMLInputElement::value is set to "".
646
647         Tests: this patch doesn't change any visible behavior, but we add test cases to
648         fast/forms/time-multiple-fields/time-multiple-fields-value-set-empty.html
649         just in case.
650
651         * html/shadow/DateTimeEditElement.h:
652         (DateTimeEditElement): Declare anyEditableFieldsHaveValues.
653         * html/shadow/DateTimeEditElement.cpp:
654         (WebCore::DateTimeEditElement::anyEditableFieldsHaveValues):
655         Added. This function checks value existence against only editable sub-fields.
656         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
657         (WebCore::BaseMultipleFieldsDateAndTimeInputType::setValue):
658         Call DateTimeEditElement::anyEditableFieldsHaveValues() instead of
659         DateTimeFieldsState::hasAnyValue().
660         * html/DateTimeFieldsState.h: Remove hasAnyValue.
661
662 2012-11-22  Allan Sandfeld Jensen  <allan.jensen@digia.com>
663
664         [Qt] Lookup mimetypes using QMimeDatabase
665         https://bugs.webkit.org/show_bug.cgi?id=102667
666
667         Reviewed by Simon Hausmann.
668
669         The Qt backend of MIMETypeRegistry now looks up using QMimeDatabase.
670
671         * loader/archive/ArchiveFactory.cpp:
672         (WebCore::archiveMIMETypes):
673             Also map the preferred freedesktop mimetype for MIME archives to MIME archive constructor.
674         * platform/MIMETypeRegistry.cpp:
675         (WebCore::MIMETypeRegistry::getNormalizedMIMEType):
676         * platform/qt/MIMETypeRegistryQt.cpp:
677         (WebCore::MIMETypeRegistry::getMIMETypeForExtension):
678         (WebCore::MIMETypeRegistry::getMIMETypeForPath):
679         (WebCore::MIMETypeRegistry::getNormalizedMIMEType):
680
681 2012-11-22  Cosmin Truta  <ctruta@rim.com>
682
683         Move URL-checking code into Frame
684         https://bugs.webkit.org/show_bug.cgi?id=103014
685
686         Reviewed by Ojan Vafai.
687
688         Move the common URL checking logic from HTMLFrameElementBase::isURLAllowed
689         and HTMLPlugInImageElement::allowedToLoadFrameURL into Frame::isURLAllowed.
690
691         No new tests. Refactoring.
692
693         * html/HTMLFrameElementBase.cpp:
694         (WebCore::HTMLFrameElementBase::isURLAllowed): Call Frame::isURLAllowed.
695         * html/HTMLPlugInImageElement.cpp:
696         (WebCore::HTMLPlugInImageElement::allowedToLoadFrameURL): Call Frame::isURLAllowed.
697         * page/Frame.cpp:
698         (WebCore::Frame::isURLAllowed): Added.
699         * page/Frame.h:
700         (Frame): Added isURLAllowed.
701
702 2012-11-22  Kentaro Hara  <haraken@chromium.org>
703
704         [V8] Rename toWebCoreStringWithNullOrUndefinedCheck() with toWebCoreStringWithUndefinedOrNullCheck()
705         https://bugs.webkit.org/show_bug.cgi?id=103013
706
707         Reviewed by Adam Barth.
708
709         IDL attributes and other V8 and JSC files use "UndefinedOrNull" instead of "NullOrUndefined".
710
711         No tests. No change in behavior.
712
713         * bindings/v8/JavaScriptCallFrame.cpp:
714         (WebCore::JavaScriptCallFrame::functionName):
715         * bindings/v8/ScriptDebugServer.cpp:
716         (WebCore::ScriptDebugServer::setScriptSource):
717         (WebCore::ScriptDebugServer::dispatchDidParseSource):
718         (WebCore::ScriptDebugServer::compileScript):
719         (WebCore::ScriptDebugServer::runScript):
720         * bindings/v8/ScriptEventListener.cpp:
721         (WebCore::eventListenerHandlerLocation):
722         * bindings/v8/V8Binding.h:
723         (WebCore::toWebCoreStringWithUndefinedOrNullCheck):
724         * bindings/v8/custom/V8DOMWindowCustom.cpp:
725         (WebCore::V8DOMWindow::showModalDialogCallback):
726         (WebCore::V8DOMWindow::openCallback):
727         * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
728         (WebCore::V8JavaScriptCallFrame::evaluateCallback):
729
730 2012-11-22  Harald Alvestrand  <hta@google.com>
731
732         Name enumerator function for GetStats RTCStatsElement
733         https://bugs.webkit.org/show_bug.cgi?id=102933
734
735         Reviewed by Adam Barth.
736
737         Tested by extensions to the RTCPeerConnection-stats test.
738
739         * Modules/mediastream/RTCStatsElement.cpp:
740         (WebCore::RTCStatsElement::names):
741         (WebCore):
742         * Modules/mediastream/RTCStatsElement.h:
743         (RTCStatsElement):
744         * Modules/mediastream/RTCStatsElement.idl:
745
746 2012-11-22  Kentaro Hara  <haraken@chromium.org>
747
748         Rename the "eden" bit to something more descriptive
749         https://bugs.webkit.org/show_bug.cgi?id=102985
750
751         Reviewed by Adam Barth.
752
753         InEdenFlag is not descriptive. Per the discussion in IRC,
754         we rename InEdenFlag to V8CollectableDuringMinorGCFlag.
755
756         No tests. No change in behavior.
757
758         * bindings/v8/V8GCController.cpp:
759         (WebCore::gcTree):
760         (WebCore::V8GCController::didCreateWrapperForNode):
761         (WebCore::V8GCController::minorGCPrologue):
762         * dom/Node.h:
763         (WebCore::Node::isV8CollectableDuringMinorGC):
764         (WebCore::Node::setV8CollectableDuringMinorGC):
765
766 2012-11-22  Kentaro Hara  <haraken@chromium.org>
767
768         [V8] Move AddMessageListener() from WorkerContextExecutionProxy::initializeIfNeeded() to WorkerContextExecutionProxy::initIsolate()
769         https://bugs.webkit.org/show_bug.cgi?id=102998
770
771         Reviewed by Adam Barth.
772
773         This is an incremental step for moving initializeIfNeeded()
774         to V8Initializer.h. Given that AddMessageListener() needs to
775         be called once per Isolate, we can move AddMessageListener()
776         from initializeIfNeeded() to initIsolate().
777
778         No tests. No change in behavior.
779
780         * bindings/v8/WorkerContextExecutionProxy.cpp:
781         (WebCore::WorkerContextExecutionProxy::initIsolate):
782         (WebCore::WorkerContextExecutionProxy::initializeIfNeeded):
783
784 2012-11-22  Michael Saboff  <msaboff@apple.com>
785
786         HTML integer parsing functions don't natively handle 8 bit strings
787         https://bugs.webkit.org/show_bug.cgi?id=102997
788
789         Reviewed by Filip Pizlo.
790
791         In order to avoid unnecessary up convering of 8 bit strings to 16 bits, added 8 bit paths to
792         parseHTMLInteger() and parseHTMLNonNegativeInteger() by breaking out the core logic into
793         templated helper functions.  These methods are primarily used to process attribute values.
794
795         No new tests needed, functionnality covered by existing tests.
796
797         * html/parser/HTMLParserIdioms.cpp:
798         (WebCore::parseHTMLIntegerInternal):
799         (WebCore::parseHTMLInteger):
800         (WebCore::parseHTMLNonNegativeIntegerInternal):
801         (WebCore::parseHTMLNonNegativeInteger):
802
803 2012-11-22  Kentaro Hara  <haraken@chromium.org>
804
805         [V8] WebCoreStringResourceBase should be located in V8StringResource.h
806         https://bugs.webkit.org/show_bug.cgi?id=103002
807
808         Reviewed by Adam Barth.
809
810         Currently WebCoreStringResourceBase is mis-located in V8ValueCache.h.
811         It should be in V8StringResource.h.
812
813         No tests. No change in behavior.
814
815         * bindings/v8/V8StringResource.cpp:
816         (WebCore::WebCoreStringResourceBase::toWebCoreStringResourceBase):
817         (WebCore):
818         (WebCore::WebCoreStringResourceBase::visitStrings):
819         * bindings/v8/V8StringResource.h:
820         (WebCore):
821         (WebCoreStringResourceBase):
822         (WebCore::WebCoreStringResourceBase::WebCoreStringResourceBase):
823         (WebCore::WebCoreStringResourceBase::~WebCoreStringResourceBase):
824         (WebCore::WebCoreStringResourceBase::webcoreString):
825         (WebCore::WebCoreStringResourceBase::atomicString):
826         (WebCore::WebCoreStringResourceBase::memoryConsumption):
827         (WebCoreStringResource16):
828         (WebCore::WebCoreStringResource16::WebCoreStringResource16):
829         (WebCoreStringResource8):
830         (WebCore::WebCoreStringResource8::WebCoreStringResource8):
831         * bindings/v8/V8ValueCache.cpp:
832         * bindings/v8/V8ValueCache.h:
833         (WebCore):
834
835 2012-11-21  Ilya Tikhonovsky  <loislo@chromium.org>
836
837         Web Inspector: NMI add instrumentation to DynamicNodeList classes hierarchy.
838         https://bugs.webkit.org/show_bug.cgi?id=103025
839
840         Reviewed by Yury Semikhatsky.
841
842         RNiwa changed pointer type in NodeRareData::NodeListAtomicNameCacheMap from the topmost
843         DynamicSubtreeNodeList to the base DynamicNodeListCacheBase at r135429.
844         As a result we got non zero count of pointers that don't match with tcmalloc data,
845         because DynamicNodeList uses multiple inheritance.
846         It could be fixed with help of explicit native memory instrumentation for DynamicNodeList class hierarchy.
847
848         No change in behavior, so no new tests.
849
850         * dom/Document.cpp: drive by fix.
851         (WebCore::Document::reportMemoryUsage):
852         * dom/DynamicNodeList.cpp:
853         (WebCore::DynamicNodeListCacheBase::reportMemoryUsage):
854         (WebCore):
855         (WebCore::DynamicNodeList::reportMemoryUsage):
856         (WebCore::DynamicSubtreeNodeList::reportMemoryUsage):
857         * dom/DynamicNodeList.h:
858         (WebCore::DynamicNodeListCacheBase::~DynamicNodeListCacheBase):
859         (DynamicNodeListCacheBase):
860         (DynamicNodeList):
861         (DynamicSubtreeNodeList):
862
863 2012-11-22  Kentaro Hara  <haraken@chromium.org>
864
865         Unreviewed, rolling out r135482.
866         http://trac.webkit.org/changeset/135482
867         https://bugs.webkit.org/show_bug.cgi?id=103002
868
869         It broke Chrome/Linux Debug build
870
871         * bindings/v8/V8StringResource.cpp:
872         * bindings/v8/V8StringResource.h:
873         * bindings/v8/V8ValueCache.cpp:
874         (WebCore::WebCoreStringResourceBase::toWebCoreStringResourceBase):
875         (WebCore):
876         (WebCore::WebCoreStringResourceBase::visitStrings):
877         * bindings/v8/V8ValueCache.h:
878         (WebCore):
879         (WebCoreStringResourceBase):
880         (WebCore::WebCoreStringResourceBase::WebCoreStringResourceBase):
881         (WebCore::WebCoreStringResourceBase::~WebCoreStringResourceBase):
882         (WebCore::WebCoreStringResourceBase::webcoreString):
883         (WebCore::WebCoreStringResourceBase::atomicString):
884         (WebCore::WebCoreStringResourceBase::memoryConsumption):
885         (WebCoreStringResource16):
886         (WebCore::WebCoreStringResource16::WebCoreStringResource16):
887         (WebCoreStringResource8):
888         (WebCore::WebCoreStringResource8::WebCoreStringResource8):
889
890 2012-11-22  Sheriff Bot  <webkit.review.bot@gmail.com>
891
892         Unreviewed, rolling out r134927 and r134944.
893         http://trac.webkit.org/changeset/134927
894         http://trac.webkit.org/changeset/134944
895         https://bugs.webkit.org/show_bug.cgi?id=103028
896
897         Reverting the reverts after merging. (Requested by vsevik on
898         #webkit).
899
900         * English.lproj/localizedStrings.js:
901         * WebCore.gypi:
902         * WebCore.vcproj/WebCore.vcproj:
903         * inspector/compile-front-end.py:
904         * inspector/front-end/AdvancedSearchController.js:
905         * inspector/front-end/CallStackSidebarPane.js:
906         (WebInspector.CallStackSidebarPane.prototype.registerShortcuts):
907         * inspector/front-end/ConsoleView.js:
908         (WebInspector.ConsoleView.prototype._registerShortcuts):
909         * inspector/front-end/ElementsPanel.js:
910         (WebInspector.ElementsPanel):
911         * inspector/front-end/ElementsPanelDescriptor.js:
912         (WebInspector.ElementsPanelDescriptor.prototype.registerShortcuts):
913         * inspector/front-end/GoToLineDialog.js:
914         (WebInspector.GoToLineDialog.install):
915         * inspector/front-end/KeyboardShortcut.js:
916         (WebInspector.KeyboardShortcut._keyName):
917         * inspector/front-end/Panel.js:
918         (WebInspector.Panel.prototype.registerShortcuts):
919         (WebInspector.PanelDescriptor.prototype.panel):
920         (WebInspector.PanelDescriptor.prototype.registerShortcuts):
921         * inspector/front-end/ScriptsPanel.js:
922         (WebInspector.ScriptsPanel):
923         (WebInspector.ScriptsPanel.prototype._createDebugToolbar):
924         (WebInspector.ScriptsPanel.prototype._createButtonAndRegisterShortcuts):
925         * inspector/front-end/ScriptsPanelDescriptor.js:
926         (WebInspector.ScriptsPanelDescriptor.prototype.registerShortcuts):
927         * inspector/front-end/ShortcutsScreen.js:
928         (WebInspector.ShortcutsScreen):
929         (WebInspector.ShortcutsSection):
930         (WebInspector.ShortcutsSection.prototype._renderKey):
931         * inspector/front-end/StylesSidebarPane.js:
932         * inspector/front-end/TimelinePanel.js:
933         (WebInspector.TimelinePanel.prototype._registerShortcuts):
934         * inspector/front-end/TimelinePanelDescriptor.js: Copied from Source/WebCore/inspector/front-end/ScriptsPanelDescriptor.js.
935         (WebInspector.TimelinePanelDescriptor):
936         (WebInspector.TimelinePanelDescriptor.prototype.registerShortcuts):
937         * inspector/front-end/WebKit.qrc:
938         * inspector/front-end/inspector.html:
939         * inspector/front-end/inspector.js:
940         (WebInspector._panelDescriptors):
941         (WebInspector._registerShortcuts):
942
943 2012-11-21  Sheriff Bot  <webkit.review.bot@gmail.com>
944
945         Unreviewed, rolling out r135433 and r135479.
946         http://trac.webkit.org/changeset/135433
947         http://trac.webkit.org/changeset/135479
948         https://bugs.webkit.org/show_bug.cgi?id=103029
949
950         "IDBRequestTest.EventsAfterStopping crashes" (Requested by
951         yurys on #webkit).
952
953         * bindings/v8/DOMDataStore.cpp:
954         (WebCore::DOMDataStore::current):
955         * bindings/v8/DOMWrapperWorld.cpp:
956         * bindings/v8/DOMWrapperWorld.h:
957         * bindings/v8/ScriptController.cpp:
958         (WebCore::ScriptController::existingWindowShell):
959         (WebCore::ScriptController::windowShell):
960         (WebCore::ScriptController::evaluateInIsolatedWorld):
961         (WebCore::ScriptController::currentWorldContext):
962         (WebCore::ScriptController::collectIsolatedContexts):
963         * bindings/v8/ScriptController.h:
964         (ScriptController):
965         * bindings/v8/V8Binding.h:
966         (WebCore::worldForEnteredContextIfIsolated):
967         * bindings/v8/V8DOMWindowShell.cpp:
968         (WebCore::V8DOMWindowShell::destroyIsolatedShell):
969         (WebCore::isolatedContextWeakCallback):
970         (WebCore):
971         (WebCore::V8DOMWindowShell::disposeContext):
972         (WebCore::V8DOMWindowShell::initializeIfNeeded):
973         (WebCore::V8DOMWindowShell::installDOMWindow):
974         * bindings/v8/V8DOMWindowShell.h:
975         (WebCore::V8DOMWindowShell::isolated):
976         (V8DOMWindowShell):
977         * bindings/v8/V8PerContextData.h:
978         * bindings/v8/WorldContextHandle.cpp:
979         (WebCore::WorldContextHandle::WorldContextHandle):
980
981 2012-11-21  Pavel Feldman  <pfeldman@chromium.org>
982
983         Web Inspector: simplify the _updateChunksForRanges routine
984         https://bugs.webkit.org/show_bug.cgi?id=102927
985
986         Reviewed by Vsevolod Vlasov.
987
988         * inspector/front-end/DefaultTextEditor.js:
989         (WebInspector.TextEditorMainPanel.prototype._updateChunksForRanges):
990         (WebInspector.TextEditorMainChunk.prototype.updateCollapsedLineRow):
991         (WebInspector.TextEditorMainChunk.prototype.detachFromDOM):
992         (WebInspector.TextEditorMainChunk.prototype.anchorElement):
993
994 2012-11-21  Kentaro Hara  <haraken@chromium.org>
995
996         [V8] WebCoreStringResourceBase should be located in V8StringResource.h
997         https://bugs.webkit.org/show_bug.cgi?id=103002
998
999         Reviewed by Adam Barth.
1000
1001         Currently WebCoreStringResourceBase is mis-located in V8ValueCache.h.
1002         It should be in V8StringResource.h.
1003
1004         No tests. No change in behavior.
1005
1006         * bindings/v8/V8StringResource.cpp:
1007         (WebCore::WebCoreStringResourceBase::toWebCoreStringResourceBase):
1008         (WebCore):
1009         (WebCore::WebCoreStringResourceBase::visitStrings):
1010         * bindings/v8/V8StringResource.h:
1011         (WebCore):
1012         (WebCoreStringResourceBase):
1013         (WebCore::WebCoreStringResourceBase::WebCoreStringResourceBase):
1014         (WebCore::WebCoreStringResourceBase::~WebCoreStringResourceBase):
1015         (WebCore::WebCoreStringResourceBase::webcoreString):
1016         (WebCore::WebCoreStringResourceBase::atomicString):
1017         (WebCore::WebCoreStringResourceBase::memoryConsumption):
1018         (WebCoreStringResource16):
1019         (WebCore::WebCoreStringResource16::WebCoreStringResource16):
1020         (WebCoreStringResource8):
1021         (WebCore::WebCoreStringResource8::WebCoreStringResource8):
1022         * bindings/v8/V8ValueCache.cpp:
1023         * bindings/v8/V8ValueCache.h:
1024         (WebCore):
1025
1026 2012-11-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1027
1028         Unreviewed, rolling out r135464.
1029         http://trac.webkit.org/changeset/135464
1030         https://bugs.webkit.org/show_bug.cgi?id=103026
1031
1032         breaks gtk bot (Requested by morrita on #webkit).
1033
1034         * dom/Element.cpp:
1035         * dom/Element.h:
1036         (Element):
1037         * dom/Element.idl:
1038
1039 2012-11-21  Dan Carney  <dcarney@google.com>
1040
1041         Remove V8DOMWindowShell::getEntered
1042         https://bugs.webkit.org/show_bug.cgi?id=96637
1043
1044         Reviewed by Adam Barth.
1045
1046         V8DOMWindowShell::getEntered was refactored so that the window shell
1047         no longer has to be kept alive by a v8 context. Instead, only
1048         the DOMWrapperWorld will be kept alive.
1049
1050         No new tests. No change in functionality.
1051
1052         * bindings/v8/DOMDataStore.cpp:
1053         (WebCore::DOMDataStore::current):
1054         * bindings/v8/DOMWrapperWorld.cpp:
1055         (WebCore::isolatedWorldWeakCallback):
1056         (WebCore):
1057         (WebCore::DOMWrapperWorld::makeContextWeak):
1058         (WebCore::DOMWrapperWorld::setIsolatedWorldField):
1059         * bindings/v8/DOMWrapperWorld.h:
1060         (DOMWrapperWorld):
1061         (WebCore::DOMWrapperWorld::isolated):
1062         * bindings/v8/ScriptController.cpp:
1063         (WebCore::ScriptController::existingWindowShell):
1064         (WebCore::ScriptController::windowShell):
1065         (WebCore::ScriptController::evaluateInIsolatedWorld):
1066         (WebCore::ScriptController::currentWorldContext):
1067         (WebCore::ScriptController::collectIsolatedContexts):
1068         * bindings/v8/ScriptController.h:
1069         (ScriptController):
1070         * bindings/v8/V8Binding.h:
1071         (WebCore::worldForEnteredContextIfIsolated):
1072         * bindings/v8/V8DOMWindowShell.cpp:
1073         (WebCore::V8DOMWindowShell::destroyIsolatedShell):
1074         (WebCore::V8DOMWindowShell::disposeContext):
1075         (WebCore::V8DOMWindowShell::initializeIfNeeded):
1076         * bindings/v8/V8DOMWindowShell.h:
1077         (V8DOMWindowShell):
1078         * bindings/v8/V8PerContextData.h:
1079         * bindings/v8/WorldContextHandle.cpp:
1080         (WebCore::WorldContextHandle::WorldContextHandle):
1081
1082 2012-11-21  Cosmin Truta  <ctruta@rim.com>
1083
1084         Numeric identifiers of events should not be globally sequential
1085         https://bugs.webkit.org/show_bug.cgi?id=102244
1086
1087         Reviewed by Alexey Proskuryakov.
1088
1089         The functions setTimeout, setInterval and navigator.geolocation.watchPosition
1090         are currently returning values that are unique across all JavaScript execution
1091         contexts, due to their dependency on global variables.
1092         Such a guarantee is unnecessarily strong. In this patch, we constrain uniqueness
1093         to these functions' own script execution context only.
1094
1095         Tests: fast/dom/Geolocation/watchPosition-unique.html
1096                fast/dom/Window/setTimeout-setInterval-unique.html
1097
1098         * Modules/geolocation/Geolocation.cpp:
1099         (WebCore): Remove firstAvailableWatchId.
1100         (WebCore::Geolocation::watchPosition): Get new watchID from script execution context.
1101         (WebCore::Geolocation::clearWatch): Invalid watchID means less than or equal to 0.
1102         * Modules/geolocation/Geolocation.h:
1103         (Geolocation): Renamed the argument of Geolocation::clearWatch to WatchID.
1104         * dom/ScriptExecutionContext.cpp:
1105         (WebCore::ScriptExecutionContext::ScriptExecutionContext): Update initialization.
1106         (WebCore::ScriptExecutionContext::newUniqueID): Add.
1107         * dom/ScriptExecutionContext.h:
1108         (ScriptExecutionContext): Add m_sequentialID.
1109         (WebCore::ScriptExecutionContext::addTimeout): Inline.
1110         (WebCore::ScriptExecutionContext::removeTimeout): Inline.
1111         (WebCore::ScriptExecutionContext::findTimeout): Inline.
1112         * page/DOMTimer.cpp:
1113         (WebCore): Remove timeoutId.
1114         (WebCore::DOMTimer::DOMTimer): Get new timeoutId from script execution context.
1115
1116 2012-11-21  Ryosuke Niwa  <rniwa@webkit.org>
1117
1118         CollectionType and DynamicNodeList::NodeListType should be merged
1119         https://bugs.webkit.org/show_bug.cgi?id=102983
1120
1121         Reviewed by Antti Koivisto.
1122
1123         Merged DynamicNodeList::NodeListType (for live NodeList) into CollectionType.
1124
1125         * dom/ClassNodeList.cpp:
1126         (WebCore::ClassNodeList::~ClassNodeList):
1127         * dom/Document.cpp:
1128         (WebCore::Document::registerNodeListCache):
1129         (WebCore::Document::unregisterNodeListCache):
1130         (WebCore::Document::getItems):
1131         * dom/DynamicNodeList.cpp:
1132         (WebCore::DynamicNodeListCacheBase::invalidateCache):
1133         (WebCore::DynamicNodeListCacheBase::invalidateIdNameCacheMaps):
1134         * dom/DynamicNodeList.h:
1135         (WebCore::DynamicNodeListCacheBase::DynamicNodeListCacheBase):
1136         (WebCore::DynamicNodeListCacheBase::hasIdNameCache): Added. Returns iff this is a HTMLCollection.
1137         (WebCore::DynamicNodeListCacheBase::invalidateCache):
1138         (WebCore::DynamicNodeList::DynamicNodeList):
1139         (WebCore::DynamicSubtreeNodeList::DynamicSubtreeNodeList):
1140         * dom/MicroDataItemList.cpp:
1141         (WebCore::MicroDataItemList::~MicroDataItemList):
1142         * dom/NameNodeList.cpp:
1143         (WebCore::NameNodeList::~NameNodeList):
1144         * dom/Node.cpp:
1145         (WebCore::Node::getElementsByTagName):
1146         (WebCore::Node::getElementsByName):
1147         (WebCore::Node::getElementsByClassName):
1148         (WebCore::Node::radioNodeList):
1149         (WebCore::Node::propertyNodeList):
1150         * dom/NodeRareData.h:
1151         (WebCore::NodeListsNodeData::addCacheWithAtomicName): No longer converts CollectionType to
1152         a NodeListType equivalent since two enums have been merged.
1153         (WebCore::NodeListsNodeData::cacheWithAtomicName): Ditto.
1154         (WebCore::NodeListsNodeData::addCacheWithName): Ditto.
1155         (WebCore::NodeListsNodeData::removeCacheWithAtomicName): Ditto.
1156         (WebCore::NodeListsNodeData::removeCacheWithName): Ditto.
1157         (WebCore::NodeListsNodeData::namedNodeListKey): Ignore types before FirstNodeCollectionType
1158         to minimize the hash conflicts.
1159         * dom/PropertyNodeList.cpp:
1160         (WebCore::PropertyNodeList::~PropertyNodeList):
1161         * dom/TagNodeList.cpp:
1162         (WebCore::TagNodeList::~TagNodeList):
1163         * html/CollectionType.h:
1164         (WebCore::isNodeList): Added.
1165         * html/HTMLCollection.cpp:
1166         (WebCore::shouldOnlyIncludeDirectChildren):
1167         (WebCore::rootTypeFromCollectionType):
1168         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
1169         (WebCore::isAcceptableElement):
1170         (WebCore::DynamicNodeListCacheBase::iterateForNextNode):
1171         (WebCore::DynamicNodeListCacheBase::itemBeforeOrAfter):
1172         * html/LabelableElement.cpp:
1173         (WebCore::LabelableElement::labels):
1174         * html/LabelsNodeList.cpp:
1175         (WebCore::LabelsNodeList::~LabelsNodeList):
1176         * html/RadioNodeList.cpp:
1177         (WebCore::RadioNodeList::~RadioNodeList):
1178
1179 2012-11-21  Michael Pruett  <michael@68k.org>
1180
1181         IndexedDB: Obtain ScriptState from IDL binding generator
1182         https://bugs.webkit.org/show_bug.cgi?id=102552
1183
1184         Reviewed by Kentaro Hara.
1185
1186         Obtain ScriptState from IDL binding generator rather than directly
1187         calling ScriptState::current() since that method does not exist
1188         in JSC.
1189
1190         Tests: storage/indexeddb/*
1191
1192         * Modules/indexeddb/IDBCursor.cpp:
1193         (WebCore::IDBCursor::update):
1194         * Modules/indexeddb/IDBCursor.h:
1195         (IDBCursor):
1196         * Modules/indexeddb/IDBCursor.idl:
1197         * Modules/indexeddb/IDBObjectStore.cpp:
1198         (WebCore::IDBObjectStore::add):
1199         (WebCore::IDBObjectStore::put):
1200         * Modules/indexeddb/IDBObjectStore.h:
1201         (WebCore::IDBObjectStore::add):
1202         (WebCore::IDBObjectStore::put):
1203         (IDBObjectStore):
1204         * Modules/indexeddb/IDBObjectStore.idl:
1205
1206 2012-11-21  Filip Pizlo  <fpizlo@apple.com>
1207
1208         Rename dataLog() and dataLogV() to dataLogF() and dataLogFV()
1209         https://bugs.webkit.org/show_bug.cgi?id=103001
1210
1211         Rubber stamped by Dan Bernstein.
1212
1213         No change in behavior, so no new tests.
1214
1215         * platform/KURLWTFURL.cpp:
1216         (WebCore::KURL::print):
1217
1218 2012-11-21  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1219
1220         [EFL] Refactor GraphicsContext3DEFL.
1221         https://bugs.webkit.org/show_bug.cgi?id=101291.
1222
1223         Reviewed by Kenneth Rohde Christiansen.
1224
1225         GraphicsContext3DEfl creates GraphicsContext3DPrivate, which acts as its platform Layer.
1226         GraphicsContext3DPrivate needs to handle the following cases:
1227         1) To provide an off-screen buffer for accelerated composition.
1228         2) Render to a current context.
1229         3) To render directly to host window. (currently not supported.)
1230
1231         Before this patch Evas was used to provide us an off-screen context and buffer. GLX was used in
1232         the other supported case. Evas acts as a glue layer to provide us with appropriate
1233         GL bindings (OpenGL functions), GL context and drawable (surface/offscreenbuffer).
1234         However, primitive rendering is handled by TextureMapper and OpenGLShims is used to load the needed GL functions.
1235
1236         It would be for our advantage to be able to take in to use any optimisations/extensions
1237         provided by underlying drivers, specific to a platform (e.g. GLX_MESA_copy_sub_buffer etc.).
1238         This patch introduces an abstraction layer to make it easy to add support for any GL backend (GLX, EGL etc.)
1239         and do any platform specific optimizations as needed without complicating GraphicsContext3DPrivate class.
1240         Two new classes are added with this implementation, GLPlatformContext and GLPlatformSurface.
1241         GraphicsContext3DPrivate would create and own a GLPlatformContext and GLPlatformSurface.
1242
1243         GLPlatformContext encapsulates an OpenGL context hiding any platform specific management.
1244         It uses GL extension ARB_robustness (when available) to detect driver resets.
1245         It defines a simple interface for things that need to be handled by the context. Support
1246         for multi-threaded usage and shared context-group would be added later.
1247
1248         GLPlatformSurface encapsulates an OpenGL drawable hiding any platform specific management.
1249         It defines a simple interface for things that need to be handled by the surface.
1250         It creates an off-screen rendering area. Any GLPlatformContext (compatible with the surface)
1251         can be used to render into this off-screen area.
1252
1253         This patch also adds GLX implementation. To keep the patch to minimum EGL support would be added in another changeset.
1254
1255         * PlatformEfl.cmake:
1256         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1257         (WebCore::GraphicsContext3D::create):
1258         (WebCore::GraphicsContext3D::GraphicsContext3D):
1259         (WebCore::GraphicsContext3D::~GraphicsContext3D):
1260         (WebCore::GraphicsContext3D::makeContextCurrent):
1261         (WebCore::GraphicsContext3D::setContextLostCallback):
1262         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
1263         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1264         (GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
1265         (GraphicsContext3DPrivate::releaseResources):
1266         (GraphicsContext3DPrivate::setContextLostCallback):
1267         (GraphicsContext3DPrivate::platformGraphicsContext3D):
1268         (GraphicsContext3DPrivate::makeContextCurrent):
1269         (GraphicsContext3DPrivate::createGraphicsSurfaces):
1270         (GraphicsContext3DPrivate::copyToGraphicsSurface):
1271         (GraphicsContext3DPrivate::graphicsSurfaceToken):
1272         * platform/graphics/efl/GraphicsContext3DPrivate.h:
1273         (GraphicsContext3DPrivate):
1274         * platform/graphics/opengl/GLDefs.h: Added.
1275         (WebCore):
1276         * platform/graphics/opengl/GLPlatformContext.cpp: Added.
1277         (WebCore):
1278         (WebCore::GLPlatformContext::createContext):
1279         (WebCore::GLPlatformContext::createOffScreenContext):
1280         (WebCore::GLPlatformContext::createCurrentContextWrapper):
1281         (WebCore::GLPlatformContext::GLPlatformContext):
1282         (WebCore::GLPlatformContext::~GLPlatformContext):
1283         (WebCore::GLPlatformContext::makeCurrent):
1284         (WebCore::GLPlatformContext::isValid):
1285         (WebCore::GLPlatformContext::releaseCurrent):
1286         (WebCore::GLPlatformContext::handle):
1287         (WebCore::GLPlatformContext::isCurrentContext):
1288         (WebCore::GLPlatformContext::initialize):
1289         (WebCore::GLPlatformContext::getCurrent):
1290         (WebCore::GLPlatformContext::platformMakeCurrent):
1291         (WebCore::GLPlatformContext::platformReleaseCurrent):
1292         (WebCore::GLPlatformContext::destroy):
1293         * platform/graphics/opengl/GLPlatformContext.h: Added.
1294         (WebCore):
1295         (GLPlatformContext):
1296         * platform/graphics/opengl/GLPlatformSurface.cpp: Added.
1297         (WebCore):
1298         (WebCore::GLPlatformSurface::createOffscreenSurface):
1299         (WebCore::GLPlatformSurface::createTransportSurface):
1300         (WebCore::GLPlatformSurface::GLPlatformSurface):
1301         (WebCore::GLPlatformSurface::~GLPlatformSurface):
1302         (WebCore::GLPlatformSurface::handle):
1303         (WebCore::GLPlatformSurface::geometry):
1304         (WebCore::GLPlatformSurface::sharedDisplay):
1305         (WebCore::GLPlatformSurface::configuration):
1306         (WebCore::GLPlatformSurface::swapBuffers):
1307         (WebCore::GLPlatformSurface::copyTexture):
1308         (WebCore::GLPlatformSurface::updateContents):
1309         (WebCore::GLPlatformSurface::setGeometry):
1310         (WebCore::GLPlatformSurface::destroy):
1311         * platform/graphics/opengl/GLPlatformSurface.h: Added.
1312         (WebCore):
1313         (GLPlatformSurface):
1314             GLXOffScreenContext creates an off-screen context. This is used when
1315             renderstyle is RenderOffscreen.
1316             It uses GL extension GLX_ARB_create_context (when available)
1317             to create a context else falls back to use glXCreateNewContext.
1318         * platform/graphics/surfaces/glx/GLXContext.cpp: Added.
1319         (WebCore):
1320         (WebCore::initializeARBExtensions):
1321         (WebCore::GLXOffScreenContext::GLXOffScreenContext):
1322         (WebCore::GLXOffScreenContext::initialize):
1323         (WebCore::GLXOffScreenContext::~GLXOffScreenContext):
1324         (WebCore::GLXOffScreenContext::isCurrentContext):
1325         (WebCore::GLXOffScreenContext::platformMakeCurrent):
1326         (WebCore::GLXOffScreenContext::platformReleaseCurrent):
1327         (WebCore::GLXOffScreenContext::freeResources):
1328         (WebCore::GLXOffScreenContext::destroy):
1329             GLXCurrentContextWrapper acts as a wrapper for current context.
1330             This is used when renderstyle is RenderToCurrentGLContext.
1331         * platform/graphics/surfaces/glx/GLXContext.h: Added.
1332         (WebCore):
1333         (GLXCurrentContextWrapper):
1334         (WebCore::GLXCurrentContextWrapper::GLXCurrentContextWrapper):
1335         (WebCore::GLXCurrentContextWrapper::~GLXCurrentContextWrapper):
1336         (GLXOffScreenContext):
1337         * platform/graphics/surfaces/glx/GLXSurface.cpp: Added.
1338         (WebCore):
1339         (WebCore::GLXSurface::GLXSurface):
1340         (WebCore::GLXSurface::~GLXSurface):
1341         (WebCore::GLXSurface::visualInfo):
1342         (WebCore::GLXSurface::xWindow):
1343         (WebCore::GLXSurface::pBufferConfiguration):
1344         (WebCore::GLXSurface::transportSurfaceConfiguration):
1345         (WebCore::GLXSurface::isXRenderExtensionSupported):
1346             GLXTransportSurface creates Window and uses it as an off-screen surface.
1347             Any GLContext that was created with respect to configuration can be used
1348             to render into this.
1349             This is used when contents of the buffer are to be provided to UI Process
1350             for display.
1351         (WebCore::GLXTransportSurface::GLXTransportSurface):
1352         (WebCore::GLXTransportSurface::~GLXTransportSurface):
1353         (WebCore::GLXTransportSurface::configuration):
1354         (WebCore::GLXTransportSurface::swapBuffers):
1355         (WebCore::GLXTransportSurface::setGeometry):
1356         (WebCore::GLXTransportSurface::initialize):
1357         (WebCore::GLXTransportSurface::destroy):
1358         (WebCore::GLXTransportSurface::freeResources):
1359            GLXPBuffer, Creates a GL surface (PBuffer) used for offscreen rendering.
1360            Any GLContext that was created with respect to configuration can be used
1361            to render into this.
1362         (WebCore::GLXPBuffer::GLXPBuffer):
1363         (WebCore::GLXPBuffer::~GLXPBuffer):
1364         (WebCore::GLXPBuffer::initialize):
1365         (WebCore::GLXPBuffer::configuration):
1366         (WebCore::GLXPBuffer::destroy):
1367         (WebCore::GLXPBuffer::freeResources):
1368         * platform/graphics/surfaces/glx/GLXSurface.h: Added.
1369         (WebCore):
1370             Creates X resources which are shared between surface and context.
1371         (SharedX11Resources):
1372         (WebCore::SharedX11Resources::create):
1373         (WebCore::SharedX11Resources::deref):
1374         (WebCore::SharedX11Resources::getXWindow):
1375         (WebCore::SharedX11Resources::display):
1376         (WebCore::SharedX11Resources::visualInfo):
1377         (WebCore::SharedX11Resources::createConfig):
1378         (WebCore::SharedX11Resources::pBufferContextConfig):
1379         (WebCore::SharedX11Resources::surfaceContextConfig):
1380         (WebCore::SharedX11Resources::isXRenderExtensionSupported):
1381         (WebCore::SharedX11Resources::SharedX11Resources):
1382         (WebCore::SharedX11Resources::~SharedX11Resources):
1383         (GLXSurface):
1384         (GLXTransportSurface):
1385         (GLXPBuffer):
1386
1387 2012-11-21  Andreas Kling  <akling@apple.com>
1388
1389         Re-virtualize CSSRule.
1390         <http://webkit.org/b/103003>
1391
1392         Reviewed by Anders Carlsson.
1393
1394         Make CSSRule virtual once again, since it's no longer important to keep it as small as possible.
1395         StyleRuleBase and its various subclasses are the relevant ones now.
1396
1397         * css/CSSCharsetRule.cpp:
1398         (WebCore::CSSCharsetRule::CSSCharsetRule):
1399         (WebCore::CSSCharsetRule::reportMemoryUsage):
1400         * css/CSSCharsetRule.h:
1401         (WebCore::CSSCharsetRule::~CSSCharsetRule):
1402         (WebCore::CSSCharsetRule::encoding):
1403         (WebCore::CSSCharsetRule::setEncoding):
1404         * css/CSSFontFaceRule.cpp:
1405         (WebCore::CSSFontFaceRule::CSSFontFaceRule):
1406         (WebCore::CSSFontFaceRule::reattach):
1407         (WebCore::CSSFontFaceRule::reportMemoryUsage):
1408         * css/CSSFontFaceRule.h:
1409         (CSSFontFaceRule):
1410         * css/CSSImportRule.cpp:
1411         (WebCore::CSSImportRule::CSSImportRule):
1412         (WebCore::CSSImportRule::reportMemoryUsage):
1413         (WebCore::CSSImportRule::reattach):
1414         (WebCore):
1415         * css/CSSImportRule.h:
1416         (CSSImportRule):
1417         * css/CSSMediaRule.cpp:
1418         (WebCore::CSSMediaRule::CSSMediaRule):
1419         (WebCore::CSSMediaRule::reattach):
1420         (WebCore::CSSMediaRule::reportMemoryUsage):
1421         * css/CSSMediaRule.h:
1422         (CSSMediaRule):
1423         * css/CSSPageRule.cpp:
1424         (WebCore::CSSPageRule::CSSPageRule):
1425         (WebCore::CSSPageRule::reattach):
1426         (WebCore::CSSPageRule::reportMemoryUsage):
1427         * css/CSSPageRule.h:
1428         (CSSPageRule):
1429         * css/CSSRule.cpp:
1430         (SameSizeAsCSSRule):
1431         (WebCore::CSSRule::reportMemoryUsage):
1432         * css/CSSRule.h:
1433         (WebCore::CSSRule::~CSSRule):
1434         (CSSRule):
1435         (WebCore::CSSRule::CSSRule):
1436         * css/CSSStyleRule.cpp:
1437         (WebCore::CSSStyleRule::CSSStyleRule):
1438         (WebCore::CSSStyleRule::reattach):
1439         (WebCore::CSSStyleRule::reportMemoryUsage):
1440         * css/CSSStyleRule.h:
1441         (CSSStyleRule):
1442         (WebCore::CSSStyleRule::type):
1443         * css/CSSStyleSheet.cpp:
1444         (WebCore::CSSStyleSheet::rules):
1445         * css/CSSUnknownRule.h:
1446         (WebCore::CSSUnknownRule::CSSUnknownRule):
1447         (WebCore::CSSUnknownRule::~CSSUnknownRule):
1448         * css/StyleResolver.cpp:
1449         (WebCore::collectCSSOMWrappers):
1450         * css/WebKitCSSKeyframeRule.cpp:
1451         (WebCore::WebKitCSSKeyframeRule::WebKitCSSKeyframeRule):
1452         (WebCore::WebKitCSSKeyframeRule::reportMemoryUsage):
1453         (WebCore::WebKitCSSKeyframeRule::reattach):
1454         (WebCore):
1455         * css/WebKitCSSKeyframeRule.h:
1456         (WebKitCSSKeyframeRule):
1457         * css/WebKitCSSKeyframesRule.cpp:
1458         (WebCore::WebKitCSSKeyframesRule::WebKitCSSKeyframesRule):
1459         (WebCore::WebKitCSSKeyframesRule::reattach):
1460         (WebCore::WebKitCSSKeyframesRule::reportMemoryUsage):
1461         * css/WebKitCSSKeyframesRule.h:
1462         (WebKitCSSKeyframesRule):
1463         * css/WebKitCSSRegionRule.cpp:
1464         (WebCore::WebKitCSSRegionRule::WebKitCSSRegionRule):
1465         (WebCore::WebKitCSSRegionRule::reattach):
1466         (WebCore::WebKitCSSRegionRule::reportMemoryUsage):
1467         * css/WebKitCSSRegionRule.h:
1468         (WebKitCSSRegionRule):
1469         * css/WebKitCSSViewportRule.cpp:
1470         (WebCore::WebKitCSSViewportRule::WebKitCSSViewportRule):
1471         (WebCore::WebKitCSSViewportRule::reattach):
1472         (WebCore::WebKitCSSViewportRule::reportMemoryUsage):
1473         * css/WebKitCSSViewportRule.h:
1474         * inspector/InspectorCSSAgent.cpp:
1475         (WebCore::InspectorCSSAgent::asCSSStyleRule):
1476         (WebCore::InspectorCSSAgent::collectStyleSheets):
1477         * inspector/InspectorStyleSheet.cpp:
1478         (WebCore::asCSSRuleList):
1479         (WebCore::fillMediaListChain):
1480         * page/PageSerializer.cpp:
1481         (WebCore::PageSerializer::serializeCSSStyleSheet):
1482
1483 2012-11-21  Hajime Morrita  <morrita@google.com>
1484
1485         [Shadow DOM] Implement Element::createShadowRoot()
1486         https://bugs.webkit.org/show_bug.cgi?id=102911
1487
1488         Reviewed by Kentaro Hara.
1489
1490         Added an API implementation and exposed it.
1491
1492         This is basically an alias of the ShadowRoot constructor, which
1493         will be removed as bug 102913.
1494
1495         Test: fast/dom/shadow/shadow-aware-create-shdow-root.html
1496
1497         * dom/Element.cpp:
1498         (WebCore::Element::createShadowRoot):
1499         (WebCore):
1500         * dom/Element.h:
1501         (Element):
1502         * dom/Element.idl:
1503
1504 2012-11-20  James Simonsen  <simonjam@chromium.org>
1505
1506         [Resource Timing] Populate PerformanceResourceTiming structs with timing data
1507         https://bugs.webkit.org/show_bug.cgi?id=102862
1508
1509         Reviewed by Tony Gentilcore.
1510
1511         This allows CachedResourceLoader to pass in all of the necessary values and populates
1512         them in the PerformanceResourceTiming struct. A follow up patch will actually call
1513         addResourceTiming() as necessary.
1514
1515         Tests: http/tests/w3c/webperf/submission/resource-timing
1516
1517         * page/Performance.cpp:
1518         (WebCore::Performance::addResourceTiming): Accept all necessary timing data.
1519         * page/Performance.h:
1520         (WebCore):
1521         (Performance):
1522         * page/PerformanceEntry.cpp:
1523         (WebCore::PerformanceEntry::PerformanceEntry):
1524         * page/PerformanceEntry.h:
1525         (PerformanceEntry):
1526         * page/PerformanceResourceTiming.cpp:
1527         (WebCore::monotonicTimeToDocumentMilliseconds):
1528         (WebCore):
1529         (WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
1530         (WebCore::PerformanceResourceTiming::initiatorType): Return the spec'd values.
1531         (WebCore::PerformanceResourceTiming::fetchStart):
1532         (WebCore::PerformanceResourceTiming::domainLookupStart):
1533         (WebCore::PerformanceResourceTiming::domainLookupEnd):
1534         (WebCore::PerformanceResourceTiming::connectStart):
1535         (WebCore::PerformanceResourceTiming::connectEnd):
1536         (WebCore::PerformanceResourceTiming::secureConnectionStart):
1537         (WebCore::PerformanceResourceTiming::requestStart):
1538         (WebCore::PerformanceResourceTiming::responseStart):
1539         (WebCore::PerformanceResourceTiming::responseEnd):
1540         (WebCore::PerformanceResourceTiming::resourceTimeToDocumentMilliseconds):
1541         * page/PerformanceResourceTiming.h:
1542         (WebCore::PerformanceResourceTiming::create):
1543         (PerformanceResourceTiming):
1544
1545 2012-11-21  Hajime Morrita  <morrita@google.com>
1546
1547         [Shadow DOM][V8] Assertion failure when shadow host is reclaimed before ShadowRoot
1548         https://bugs.webkit.org/show_bug.cgi?id=102893
1549
1550         Reviewed by Kentaro Hara.
1551
1552         Due to bug 88834, shadow hosts can be reclaimed before
1553         corresponding ShadowRoots are.  This breaks an invariant, that is,
1554         the host is always available for any ShadowRoot.  This change adds
1555         guards for the possibly broken invariant.
1556
1557         Since bug 88834 is planned to be fixed shortly, this change
1558         doesn't aim to fix this problem by make it work correctly, but
1559         just lays a safety net which is needed until the root cause is
1560         gone.
1561
1562         Test: fast/dom/shadow/host-wrapper-reclaimed.html
1563
1564         * dom/ShadowRoot.cpp:
1565         (WebCore::ShadowRoot::setInnerHTML):
1566         (WebCore::ShadowRoot::setApplyAuthorStyles):
1567         (WebCore::ShadowRoot::setResetStyleInheritance):
1568         (WebCore::ShadowRoot::childrenChanged):
1569
1570 2012-11-21  Dirk Schulze  <krit@webkit.org>
1571
1572         Make CachedSVGDocumentReference independent of FilterOperation
1573         https://bugs.webkit.org/show_bug.cgi?id=102967
1574
1575         Reviewed by Antti Koivisto.
1576
1577         Make CachedSVGDocumentReference independent of FilterOperation to reuse the code for clip-path and masking.
1578
1579         No new tests, refactoring.
1580
1581         * GNUmakefile.list.am: Move CachedSVGDocumentReference to it's proper location and it to the projects. 
1582         * WebCore.gypi:
1583         * WebCore.vcproj/WebCore.vcproj:
1584         * WebCore.xcodeproj/project.pbxproj:
1585         * css/StyleResolver.cpp:
1586         (WebCore::StyleResolver::loadPendingSVGDocuments):
1587         (WebCore::StyleResolver::createFilterOperations):
1588         * loader/cache/CachedSVGDocumentReference.h: Renamed from Source/WebCore/css/CachedSVGDocumentReference.h.
1589         (WebCore):
1590         (CachedSVGDocumentReference):
1591         (WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
1592         (WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
1593         (WebCore::CachedSVGDocumentReference::document):
1594         * platform/graphics/filters/FilterOperation.h: Rename data() and setData() to
1595             cachedSVGDocumentReference() and its setter. Adapt other classes.
1596         (WebCore::FilterOperation::ReferenceFilterOperation::cachedSVGDocumentReference):
1597         (WebCore::FilterOperation::ReferenceFilterOperation::setCachedSVGDocumentReference):
1598         (ReferenceFilterOperation):
1599         * rendering/FilterEffectRenderer.cpp:
1600         (WebCore::FilterEffectRenderer::buildReferenceFilter):
1601         * rendering/RenderLayerFilterInfo.cpp:
1602         (WebCore::RenderLayerFilterInfo::updateReferenceFilterClients):
1603
1604 2012-11-21  James Simonsen  <simonjam@chromium.org>
1605
1606         Remove the concept of initiatorDocument from CachedResourceRequest
1607         https://bugs.webkit.org/show_bug.cgi?id=102855
1608
1609         Reviewed by Sam Weinig.
1610
1611         It turns out this isn't necessary for the new implementation of Resource Timing. Instead,
1612         we can get at it from the CachedResourceLoader. I don't think anyone else needed it either.
1613
1614         No new tests. This was never used.
1615
1616         * css/CSSFontFaceSrcValue.cpp:
1617         (WebCore::CSSFontFaceSrcValue::cachedFont):
1618         * css/CSSImageSetValue.cpp:
1619         (WebCore::CSSImageSetValue::cachedImageSet):
1620         * css/CSSImageValue.cpp:
1621         (WebCore::CSSImageValue::cachedImage):
1622         * css/StyleRuleImport.cpp:
1623         (WebCore::StyleRuleImport::requestStyleSheet):
1624         * css/WebKitCSSSVGDocumentValue.cpp:
1625         (WebCore::WebKitCSSSVGDocumentValue::load):
1626         * css/WebKitCSSShaderValue.cpp:
1627         (WebCore::WebKitCSSShaderValue::cachedShader):
1628         * html/parser/CSSPreloadScanner.cpp:
1629         (WebCore::CSSPreloadScanner::emitRule):
1630         * html/parser/HTMLPreloadScanner.cpp:
1631         (WebCore::PreloadTask::preload):
1632         * loader/cache/CachedResourceRequest.cpp:
1633         (WebCore::CachedResourceRequest::setInitiator):
1634         * loader/cache/CachedResourceRequest.h:
1635         (CachedResourceRequest):
1636         * loader/icon/IconLoader.cpp:
1637         (WebCore::IconLoader::startLoading):
1638
1639 2012-11-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1640
1641         Unreviewed, rolling out r135437.
1642         http://trac.webkit.org/changeset/135437
1643         https://bugs.webkit.org/show_bug.cgi?id=102986
1644
1645         This patch causes crash to some layout tests (Requested by
1646         jianli on #webkit).
1647
1648         * dom/NodeRenderingContext.cpp:
1649         (WebCore::NodeRenderingContext::createRendererIfNeeded):
1650         * rendering/RenderObject.cpp:
1651         (WebCore::RenderObject::createObject):
1652
1653 2012-11-21  Andreas Kling  <akling@apple.com>
1654
1655         Style sharing: Compare class lists via SpaceSplitString instead of string comparison.
1656         <http://webkit.org/b/102982>
1657
1658         Reviewed by Antti Koivisto.
1659
1660         Add an operator!= to SpaceSplitString and use that check if two elements are eligible
1661         for style sharing instead of comparing the fastGetAttribute(classAttr) return values.
1662         This works because SpaceSplitString maps equal strings to the same data internally.
1663
1664         * css/StyleResolver.cpp:
1665         (WebCore::haveIdenticalStyleAffectingAttributes):
1666         * dom/SpaceSplitString.h:
1667         (WebCore::SpaceSplitString::operator!=):
1668         (SpaceSplitString):
1669
1670 2012-11-21  Sheriff Bot  <webkit.review.bot@gmail.com>
1671
1672         Unreviewed, rolling out r135338, r135359, and r135378.
1673         http://trac.webkit.org/changeset/135338
1674         http://trac.webkit.org/changeset/135359
1675         http://trac.webkit.org/changeset/135378
1676         https://bugs.webkit.org/show_bug.cgi?id=102981
1677
1678         Likely caused a 10% regression in
1679         dromaeo_domcoreattr/dom_attr_getAttribute (Requested by abarth
1680         on #webkit).
1681
1682         * bindings/scripts/CodeGeneratorV8.pm:
1683         (GenerateEventConstructorCallback):
1684         (ConvertToV8Parameter):
1685         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1686         (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):
1687         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1688         (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):
1689         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1690         (WebCore::V8TestEventConstructor::constructorCallback):
1691         * bindings/scripts/test/V8/V8TestInterface.cpp:
1692         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrSetter):
1693         (WebCore::TestInterfaceV8Internal::supplementalStr2AttrSetter):
1694         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
1695         (WebCore::V8TestInterface::constructorCallback):
1696         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1697         (WebCore::V8TestNamedConstructorConstructorCallback):
1698         * bindings/scripts/test/V8/V8TestObj.cpp:
1699         (WebCore::TestObjV8Internal::staticStringAttrAttrSetter):
1700         (WebCore::TestObjV8Internal::stringAttrAttrSetter):
1701         (WebCore::TestObjV8Internal::reflectedStringAttrAttrSetter):
1702         (WebCore::TestObjV8Internal::reflectedURLAttrAttrSetter):
1703         (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrSetter):
1704         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrSetter):
1705         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrSetter):
1706         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
1707         (WebCore::TestObjV8Internal::longMethodWithArgsCallback):
1708         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
1709         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
1710         (WebCore::TestObjV8Internal::methodWithOptionalStringCallback):
1711         (WebCore::TestObjV8Internal::methodWithOptionalStringIsUndefinedCallback):
1712         (WebCore::TestObjV8Internal::methodWithOptionalStringIsNullStringCallback):
1713         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
1714         (WebCore::TestObjV8Internal::overloadedMethod3Callback):
1715         (WebCore::TestObjV8Internal::overloadedMethod11Callback):
1716         (WebCore::TestObjV8Internal::overloadedMethod12Callback):
1717         (WebCore::TestObjV8Internal::strictFunctionCallback):
1718         (WebCore::TestObjV8Internal::variadicStringMethodCallback):
1719         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
1720         (WebCore::V8TestOverloadedConstructors::constructor4Callback):
1721         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1722         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
1723         * bindings/v8/V8BindingMacros.h:
1724         * bindings/v8/V8StringResource.h:
1725         (WebCore::V8Parameter::V8Parameter):
1726         (V8Parameter):
1727         (WebCore::V8Parameter::prepareBase):
1728         (WebCore::V8Parameter::object):
1729         (WebCore::::prepare):
1730         * bindings/v8/custom/V8ConsoleCustom.cpp:
1731         (WebCore::V8Console::profileCallback):
1732         (WebCore::V8Console::profileEndCallback):
1733         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1734         (WebCore::handlePostMessageCallback):
1735         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
1736         (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallback):
1737         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
1738         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallback):
1739         * bindings/v8/custom/V8HistoryCustom.cpp:
1740         (WebCore::V8History::pushStateCallback):
1741         (WebCore::V8History::replaceStateCallback):
1742         * bindings/v8/custom/V8IntentCustom.cpp:
1743         (WebCore::V8Intent::constructorCallbackCustom):
1744         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
1745         (WebCore::V8SQLTransaction::executeSqlCallback):
1746         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
1747         (WebCore::V8SQLTransactionSync::executeSqlCallback):
1748         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
1749         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
1750
1751 2012-11-21  Tien-Ren Chen  <trchen@chromium.org>
1752
1753         Invalidate non-composited content host when page scale factor changes
1754         https://bugs.webkit.org/show_bug.cgi?id=100718
1755
1756         Reviewed by Adam Barth.
1757
1758         During a scale change, non-composited content layer doesn't get invalidated
1759         automatically by the transformation change on RenderView. Need to force
1760         update non-composited contents ourself.
1761
1762         Test: compositing/repaint/page-scale-repaint.html
1763
1764         * page/Page.cpp:
1765         (WebCore::Page::setPageScaleFactor):
1766
1767 2012-11-21  Ryosuke Niwa  <rniwa@webkit.org>
1768
1769         Yet another EFL & GTK+ build fix after r135429.
1770
1771         * html/HTMLPropertiesCollection.cpp:
1772         (WebCore::HTMLPropertiesCollection::create):
1773
1774 2012-11-21  Elliott Sprehn  <esprehn@chromium.org>
1775
1776         Node::createRenderer should never return null
1777         https://bugs.webkit.org/show_bug.cgi?id=102975
1778
1779         Reviewed by Ojan Vafai.
1780
1781         Node::createRenderer should never return null, instead Node::rendererIsNeeded
1782         should return false if a node doesn't wish to have a renderer. This method
1783         never actually returns null right now, but the code makes it look like it
1784         could.
1785
1786         No new tests, just refactoring.
1787
1788         * dom/NodeRenderingContext.cpp:
1789         (WebCore::NodeRenderingContext::createRendererIfNeeded):
1790         * rendering/RenderObject.cpp:
1791         (WebCore::RenderObject::createObject):
1792
1793 2012-11-21  Fady Samuel  <fsamuel@chromium.org>
1794
1795         Clear MousePressed state on context menu to avoid initiating a drag
1796         https://bugs.webkit.org/show_bug.cgi?id=101786
1797
1798         Reviewed by Ojan Vafai.
1799
1800         If a user initiates a drag via left mouse down, brings up the context menu,
1801         and then cancels the context menu while keeping the left mouse button down,
1802         then the drag operation will continue. This does not match the platform
1803         conventions on Windows, Linux or Mac .
1804
1805         This change cancels the drag if the context menu is about to be displayed.
1806
1807         Test: fast/events/context-nodrag.html
1808
1809         * page/EventHandler.cpp:
1810         (WebCore::EventHandler::sendContextMenuEvent):
1811
1812 2012-11-21  Patrick Gansterer  <paroga@webkit.org>
1813
1814         Use MIMETypeRegistryWin for WinCE port too
1815         https://bugs.webkit.org/show_bug.cgi?id=102977
1816
1817         Reviewed by Laszlo Gombos.
1818
1819         r135217 made MIMETypeRegistryWin compile on WinCE too,
1820         which allows us to get rid of MIMETypeRegistryWinCE.
1821
1822         * PlatformWinCE.cmake:
1823         * WebCore.gypi:
1824         * platform/wince/MIMETypeRegistryWinCE.cpp: Removed.
1825
1826 2012-11-21  Dan Carney  <dcarney@google.com>
1827
1828         [V8] Add context checks to WorldContextHandle and V8DOMWindowShell
1829         https://bugs.webkit.org/show_bug.cgi?id=101573
1830
1831         Reviewed by Adam Barth.
1832
1833         Added a bunch of assertions to ensure the problems with IndexedDB
1834         contexts cannot reemerge.
1835
1836         No new tests. No change in functionality.
1837
1838         * bindings/v8/V8DOMWindowShell.cpp:
1839         (WebCore):
1840         (WebCore::V8DOMWindowShell::assertContextHasCorrectPrototype):
1841         * bindings/v8/V8DOMWindowShell.h:
1842         (V8DOMWindowShell):
1843         (WebCore::V8DOMWindowShell::isolated):
1844         * bindings/v8/WorldContextHandle.cpp:
1845         (WebCore::WorldContextHandle::WorldContextHandle):
1846
1847 2012-11-21  Elliott Sprehn  <esprehn@chromium.org>
1848
1849         Remove unnecessary ternaries in createRendererIfNeeded
1850         https://bugs.webkit.org/show_bug.cgi?id=102974
1851
1852         Reviewed by Ojan Vafai.
1853
1854         parentRenderer, nextRenderer and previousRenderer all handle flow
1855         threads automatically so there's no reason to duplicate the check in 
1856         createRendererIfNeeded.
1857
1858         Note that while these methods first check the node for a renderer and
1859         then delegate to the flow thread the node never has a renderer when
1860         calling createRendererIfNeeded per the assertion at the top so this
1861         change is equivalent.
1862
1863         No new tests, just refactoring.
1864
1865         * dom/NodeRenderingContext.cpp:
1866         (WebCore::NodeRenderingContext::createRendererIfNeeded):
1867
1868 2012-11-21  Ryosuke Niwa  <rniwa@webkit.org>
1869
1870         EFL and GTK+ build fix after r135429.
1871
1872         * dom/Element.cpp:
1873         (WebCore::ElementRareData::ensureCachedHTMLCollection):
1874
1875 2012-11-20  Ryosuke Niwa  <rniwa@webkit.org>
1876
1877         HTMLCollection should use the same storage as DynamicNodeList
1878         https://bugs.webkit.org/show_bug.cgi?id=102886
1879
1880         Reviewed by Antti Koivisto.
1881
1882         This patch removes ElementRareData::m_collection. HTMLCollections are now held by
1883         NodeListNodeData in NodeRareData like DynamicNodeLists. This simplifies several
1884         Element and Node functions where we used to call into both ElementRareData and
1885         NodeRareData to invalidate caches.
1886
1887         This is a refactoring and there should be no behavioral change.
1888
1889         * dom/DynamicNodeList.h:
1890         * dom/Element.cpp:
1891         (WebCore::ElementRareData::ensureCachedHTMLCollection):
1892         * dom/ElementRareData.cpp:
1893         (WebCore::ElementRareData::reportMemoryUsage):
1894         * dom/ElementRareData.h:
1895         (ElementRareData):
1896         (WebCore::ElementRareData::cachedHTMLCollection):
1897         (WebCore::ElementRareData::removeCachedHTMLCollection):
1898         * dom/Node.cpp:
1899         (WebCore::Node::invalidateNodeListCachesInAncestors):
1900         * dom/NodeRareData.h:
1901         (NodeListsNodeData):
1902         (WebCore::NodeListsNodeData::addCacheWithAtomicName):
1903         (WebCore::NodeListsNodeData::cacheWithAtomicName):
1904         (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
1905         (WebCore::NodeListsNodeData::adoptTreeScope):
1906         (WebCore::NodeListsNodeData::namedNodeListKey):
1907         * dom/TreeScopeAdopter.cpp:
1908         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
1909         * html/HTMLFormControlsCollection.cpp:
1910         (WebCore::HTMLFormControlsCollection::create):
1911         * html/HTMLFormControlsCollection.h:
1912         (HTMLFormControlsCollection):
1913         * html/HTMLOptionsCollection.cpp:
1914         (WebCore::HTMLOptionsCollection::create):
1915         * html/HTMLOptionsCollection.h:
1916         (HTMLOptionsCollection::create):
1917         * html/HTMLPropertiesCollection.h:
1918         (HTMLPropertiesCollection::create):
1919         * html/HTMLTableRowsCollection.cpp:
1920         (WebCore::HTMLTableRowsCollection::create):
1921         * html/HTMLTableRowsCollection.h:
1922         (HTMLTableRowsCollection):
1923
1924 2012-11-21  Andreas Kling  <akling@apple.com>
1925
1926         Update incorrect assertion in ImmutableElementAttributeData(MutableElementAttributeData).
1927         <http://webkit.org/b/102972>
1928
1929         Reviewed by Antti Koivisto.
1930
1931         Manipulation by editing code may cause an element to have mutable inline style, and this is fine.
1932
1933         Change the assertion to confirm that the inline style doesn't have a CSSOM wrapper attached,
1934         which is where real problems would happen. 
1935
1936         Fixes an assertion on editing/undo/replace-by-span-then-remove.html
1937
1938         * dom/ElementAttributeData.cpp:
1939         (WebCore::ImmutableElementAttributeData::ImmutableElementAttributeData):
1940
1941 2012-11-21  Kentaro Hara  <haraken@chromium.org>
1942
1943         Remove $outputDir and $outputHeadersDir from global variables of code generators
1944         https://bugs.webkit.org/show_bug.cgi?id=102492
1945
1946         Reviewed by Adam Barth.
1947
1948         $outputDir and $outputHeadersDir are used in WriteData() only.
1949         We don't need to use global variables for them.
1950
1951         No tests. No change in behavior.
1952
1953         * bindings/scripts/CodeGenerator.pm:
1954         (ProcessDocument):
1955         (FileNamePrefix):
1956         * bindings/scripts/CodeGeneratorCPP.pm:
1957         (new):
1958         (GenerateInterface):
1959         (WriteData):
1960         * bindings/scripts/CodeGeneratorGObject.pm:
1961         (new):
1962         (WriteData):
1963         (GenerateInterface):
1964         * bindings/scripts/CodeGeneratorJS.pm:
1965         (new):
1966         (GenerateInterface):
1967         (WriteData):
1968         * bindings/scripts/CodeGeneratorObjC.pm:
1969         (new):
1970         (GenerateInterface):
1971         (WriteData):
1972         * bindings/scripts/CodeGeneratorV8.pm:
1973         (new):
1974         (GenerateInterface):
1975         (WriteData):
1976
1977 2012-11-21  Joshua Bell  <jsbell@chromium.org>
1978
1979         Remove IDBDatabaseException
1980         https://bugs.webkit.org/show_bug.cgi?id=102514
1981
1982         Reviewed by Adam Barth.
1983
1984         After the WebKit implementation landed, the IndexedDB spec changed from defining new
1985         exception codes with constants hanging off an interface to using DOM4-styled named
1986         DOMExceptions. Remove the IDBDatabaseException interface and set codes for IDB-specific
1987         exceptions to 0. (The .idl file is retained pending general ExceptionCode cleanup.)
1988
1989         Also remove IDBRequest.errorCode which was used for reporting asynchronous errors;
1990         IDBRequest.error - a DOMError - should be used instead.
1991
1992         No new tests - covered by plenty of existing tests which have been updated.
1993
1994         * Modules/indexeddb/DOMWindowIndexedDatabase.idl: Don't expose the interface.
1995         * Modules/indexeddb/IDBCursor.idl: Remove reference to IDBDatabaseException.
1996         * Modules/indexeddb/IDBDatabase.idl: Ditto.
1997         * Modules/indexeddb/IDBDatabaseException.cpp:
1998         (IDBDatabaseExceptionNameDescription): Use either a DOMException code or 0.
1999         (WebCore::IDBDatabaseException::initializeDescription):
2000         (WebCore::IDBDatabaseException::getLegacyErrorCode):
2001         * Modules/indexeddb/IDBFactory.idl: Remove reference to IDBDatabaseException.
2002         * Modules/indexeddb/IDBIndex.idl: Ditto.
2003         * Modules/indexeddb/IDBKeyRange.idl: Ditto.
2004         * Modules/indexeddb/IDBObjectStore.idl: Ditto.
2005         * Modules/indexeddb/IDBRequest.idl: Ditto.
2006         * Modules/indexeddb/IDBTransaction.idl: Ditto.
2007         * Modules/indexeddb/WorkerContextIndexedDatabase.idl: Don't expose the interface.
2008         * bindings/v8/IDBBindingUtilities.cpp: Remove unneeded #include.
2009
2010 2012-11-21  W. James MacLean  <wjmaclean@chromium.org>
2011
2012         [chromium] Fix indenting in RenderThemeChromiumSkia.h.
2013         https://bugs.webkit.org/show_bug.cgi?id=102965
2014
2015         Reviewed by Adam Barth.
2016
2017         Much of RenderThemeChromiumSkia.h was indented too far, making the
2018         file confusing to read. This CL removes the extra indents.
2019
2020         * rendering/RenderThemeChromiumSkia.h:
2021         (RenderThemeChromiumSkia):
2022
2023 2012-11-21  Andreas Kling  <akling@apple.com>
2024
2025         Make it possible for elements with different tag names to share attribute data.
2026         <http://webkit.org/b/102845>
2027
2028         Reviewed by Antti Koivisto.
2029
2030         Allow all elements to share ElementAttributeData with one another. This means that the elements
2031         in this hypothetical markup will all point to the same attribute data:
2032
2033             <div class="foo">
2034                 <span class="foo">
2035                     <hr class="foo"/>
2036                 </span>
2037             </div>
2038
2039         This optimization happens at the expense of an old one. We no longer share attribute data
2040         between elements that have presentation attributes, since they map to different CSS properties
2041         depending on what tag they're attached to. These are mostly used in ye olde web 1.0 content
2042         though, and we should prefer optimizing in favor of modern markup. The global cache for
2043         presentation attribute style in StyledElement.cpp still prevents redundant parsing.
2044
2045         On the upside, excluding elements with presentation attributes from the data cache means that
2046         we can move one pointer (m_presentationAttributeStyle) from ImmutableElementAttributeData
2047         to MutableElementAttributeData.
2048
2049         800kB progression on Membuster3.
2050
2051         * dom/Document.h:
2052         * dom/Document.cpp:
2053         (WebCore::ImmutableAttributeDataCacheKey::ImmutableAttributeDataCacheKey):
2054         (WebCore::ImmutableAttributeDataCacheKey::operator!=):
2055         (WebCore::ImmutableAttributeDataCacheKey::hash):
2056         (ImmutableAttributeDataCacheKey):
2057         (WebCore::Document::cachedImmutableAttributeData):
2058         * dom/Element.cpp:
2059         (WebCore::Element::parserSetAttributes):
2060
2061             Don't use the element's tag name in the key for the immutable attribute data cache.
2062
2063         (WebCore::Element::cloneAttributesFromElement):
2064
2065             Prevent cloneNode() from converting mutable attribute data to immutable if it has
2066             presentation attributes.
2067
2068         * dom/ElementAttributeData.cpp:
2069         (WebCore::ImmutableElementAttributeData::ImmutableElementAttributeData):
2070
2071             Add an assertion that mutable-to-immutable conversion never happens with presentation
2072             attribute style present.
2073
2074         (WebCore::ElementAttributeData::ElementAttributeData):
2075         (WebCore::MutableElementAttributeData::MutableElementAttributeData):
2076         (WebCore::ElementAttributeData::reportMemoryUsage):
2077         * dom/ElementAttributeData.h:
2078         (ElementAttributeData):
2079         (MutableElementAttributeData):
2080         (WebCore::ElementAttributeData::presentationAttributeStyle):
2081         (WebCore):
2082         (WebCore::ElementAttributeData::setPresentationAttributeStyle):
2083
2084             Move the RefPtr<StylePropertySet> that holds presentation attribute-derived style
2085             from the common ElementAttributeData base class to MutableElementAttributeData.
2086
2087         * dom/StyledElement.cpp:
2088         (WebCore::StyledElement::attributeChanged):
2089
2090             Always dirty the presentation attribute style when a presentation attribute changes.
2091
2092         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2093
2094             Force promotion to mutable attribute data when it turns out that we need to hang a
2095             StylePropertySet with the presentation attribute style off of it.
2096
2097 2012-11-21  Antti Koivisto  <antti@apple.com>
2098
2099         Replace NodeRendererFactory class with a function
2100         https://bugs.webkit.org/show_bug.cgi?id=102950
2101
2102         Reviewed by Andreas Kling.
2103
2104         Simplify the code by turning NodeRendererFactory single-use class into function of NodeRenderingContext.
2105
2106         * dom/Node.cpp:
2107         (WebCore::Node::createRendererIfNeeded):
2108         * dom/NodeRenderingContext.cpp:
2109         (WebCore::NodeRenderingContext::NodeRenderingContext):
2110         (WebCore):
2111         (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
2112         (WebCore::NodeRenderingContext::createRendererIfNeeded):
2113         * dom/NodeRenderingContext.h:
2114         (NodeRenderingContext):
2115         (WebCore::NodeRenderingContext::style):
2116         (WebCore):
2117
2118 2012-11-21  W. James MacLean  <wjmaclean@chromium.org>
2119
2120         [chromium] Change default tap highlight color for Chromium Windows & Linux.
2121         https://bugs.webkit.org/show_bug.cgi?id=102939
2122
2123         Reviewed by Adam Barth.
2124
2125         Change default tap highlight colour on Chromium Win/Linux to be 18% black.
2126
2127         * rendering/RenderThemeChromiumSkia.h:
2128         (RenderThemeChromiumSkia): Override platformTapHighlightColor() to change default highlight colour.
2129
2130 2012-11-21  Tony Chang  <tony@chromium.org>
2131
2132         Relayout the slider track when a data list is set
2133         https://bugs.webkit.org/show_bug.cgi?id=102851
2134
2135         Reviewed by Ojan Vafai.
2136
2137         Previously, we would relayout the <input>.  Once we fix bug 102352, this
2138         causes the slider track to not relayout.  It should relayout because it
2139         draws the data list tick marks and needs to provide space for them.
2140
2141         No new tests, not testable until bug 102352 is fixed. Specifically,
2142         fast/forms/datalist/update-range-with-datalist.html reveals the bug.
2143
2144         * html/RangeInputType.cpp:
2145         (WebCore::RangeInputType::listAttributeTargetChanged):
2146
2147 2012-11-21  Kevin Ellis  <kevers@chromium.org>
2148
2149         [chromium] Add flag to enable/disable touch adjustment at runtime.
2150         https://bugs.webkit.org/show_bug.cgi?id=102534
2151
2152         Reviewed by Antonio Gomes.
2153
2154         Add setting for enabling or disabling touch adjustment.  Note that for
2155         touch adjustment to apply, the compile flag must also be enabled.  A
2156         compile only option is insufficient as it does not allow developers to
2157         quickly test the impact of touch adjustemnt without recompiling.  Nor
2158         does it allow end users to disable touch adjustemnt if they find that
2159         touch adjustment is not working well for a particular site.
2160
2161         No new tests required.
2162
2163         * page/EventHandler.cpp:
2164         (WebCore::EventHandler::handleGestureEvent): Move enable check to adjustGesturePosition.
2165         (WebCore::EventHandler::handleGestureTap): Move enable check to adjustGesturePosition.
2166         (WebCore::EventHandler::shouldApplyTouchAdjustment): Checks if touch adjustment is enabled.
2167         (WebCore):
2168         (WebCore::EventHandler::adjustGesturePosition): Add check for enabling of touch adjustment.
2169         (WebCore::EventHandler::sendContextMenuEventForGesture): Move enable check to adjustGesturePosition.
2170         * page/EventHandler.h:
2171         (EventHandler):
2172         * page/Settings.in:
2173
2174 2012-11-21  Philippe Normand  <pnormand@igalia.com>
2175
2176         Unreviewed, build fix after r135410.
2177
2178         * html/track/InbandTextTrack.cpp:
2179         (WebCore::InbandTextTrack::addCue): Prevent unused parameter error.
2180
2181 2012-11-21  Andrey Lushnikov  <lushnikov@chromium.com>
2182
2183         Web Inspector: Ctrl+A closes breakpoint condition editor
2184         https://bugs.webkit.org/show_bug.cgi?id=102906
2185
2186         Reviewed by Pavel Feldman.
2187
2188         Check if e.target has no ancestors with className
2189         "webkit-line-decorations" in DefaultTextEditor._handleKeyDown
2190
2191         * inspector/front-end/DefaultTextEditor.js:
2192         (WebInspector.DefaultTextEditor.prototype._handleKeyDown): Add check
2193
2194 2012-11-21  Tom Hudson  <tomhudson@chromium.org>
2195
2196         Avoid creating degenerate cubics at corners of rounded rects.
2197         https://bugs.webkit.org/show_bug.cgi?id=102945
2198
2199         Reviewed by Stephen White.
2200
2201         Covered by existing layout tests.
2202
2203         * platform/graphics/Path.cpp:
2204         (Path::addBeziersForRoundedRect):
2205
2206 2012-11-21  Eric Carlson  <eric.carlson@apple.com>
2207
2208         In-band text tracks infrastructure
2209         https://bugs.webkit.org/show_bug.cgi?id=102830
2210
2211         Reviewed by Philippe Normand.
2212
2213         Add the infrastructure necessary to allow a port-specific media engine to expose in-band text
2214         tracks.
2215
2216         No new tests, this patch only adds plumbing. Existing tests verify that these changes don't
2217         break existing functionality.
2218
2219         * CMakeLists.txt: Add new project files.
2220         * GNUmakefile.list.am: Ditto.
2221         * Target.pri: Ditto.
2222         * WebCore.gypi: Ditto.
2223         * WebCore.xcodeproj/project.pbxproj: Ditto.
2224
2225         * html/HTMLMediaElement.cpp:
2226         (WebCore::HTMLMediaElement::setReadyState): Call processInbandTextTracks when readyState reaches
2227             HAVE_METADATA
2228         (WebCore::HTMLMediaElement::processInbandTextTracks): Fetch the in-band text tracks from the 
2229             media player and processes them.
2230         * html/HTMLMediaElement.h:
2231
2232         * html/track/InbandTextTrack.cpp: Added.
2233         * html/track/InbandTextTrack.h: Added.
2234         * html/track/InbandTextTrackPrivate.h: Added.
2235
2236         * html/track/TextTrack.h:
2237         (TextTrack):
2238         (WebCore::TextTrack::clearClient): Remove virtual, it is unnecessary
2239         (WebCore::TextTrack::mode): Make virtual so derived classes can override.
2240         (WebCore::TextTrack::setMode): Ditto.
2241
2242         * html/track/TextTrackList.cpp:
2243         (TextTrackList::length): Update to deal with in-band tracks.
2244         (TextTrackList::getTrackIndex): Ditto.
2245         (TextTrackList::getTrackIndexRelativeToRenderedTracks): Ditto.
2246         (TextTrackList::item): Ditto.
2247         (TextTrackList::invalidateTrackIndexesAfterTrack): New, invalidate the cached track indexes of
2248             all tracks after another.
2249         (TextTrackList::append): Update to deal with in-band tracks.
2250         (TextTrackList::remove): Update to deal with in-band tracks.
2251         (TextTrackList::scheduleAddTrackEvent): Remove typo.
2252         * html/track/TextTrackList.h:
2253
2254         * platform/graphics/MediaPlayer.cpp:
2255         (WebCore::MediaPlayer::getTextTracks): New, pass through to the media engine.
2256         (WebCore::MediaPlayer::setTextTrackClient):
2257         * platform/graphics/MediaPlayer.h:
2258
2259         * platform/graphics/MediaPlayerPrivate.h:
2260         (WebCore::MediaPlayerPrivateInterface::setPreload): Cleanup.
2261         (WebCore::MediaPlayerPrivateInterface::sourceEndOfStream): Ditto.
2262         (WebCore::MediaPlayerPrivateInterface::getTextTracks): New client method.
2263         (WebCore::MediaPlayerPrivateInterface::setTextTrackClient): Ditto.
2264
2265 2012-11-21  Kai Koehne  <kai.koehne@digia.com>
2266
2267         [Qt] MinGW: Explicitly add OpenGL library dependencies
2268         https://bugs.webkit.org/show_bug.cgi?id=102924
2269
2270         Reviewed by Simon Hausmann.
2271
2272         Adding the dependencies to WebKit1 is too late, because linking will have already failed. Also make sure that 
2273         the we link against OpenGLES1 e.g. for Angle.
2274
2275         * WebCore.pri:
2276
2277 2012-11-21  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2278
2279         Disambiguate innerNodeFramePoint and mainFramePoint
2280         https://bugs.webkit.org/show_bug.cgi?id=98139
2281
2282         Reviewed by Julien Chaffraix.
2283
2284         Splits the point() method in HitTestResult into two, innerNodeFramePoint and mainFramePoint().
2285         To do this HitTestResult no longer inherits publically from HitTestLocation, which should also
2286         help to later separate the two classes completely.
2287
2288         Many of the call-sites of hitTestResultAtPoint confuses which coordinates the point is in.
2289         These have not have been fixed in this patch, and they should be audited by the individual ports.
2290
2291         * WebCore.exp.in:
2292         * dom/Document.cpp:
2293         (WebCore::Document::nodesFromRect):
2294         * page/EventHandler.cpp:
2295         (WebCore::EventHandler::eventMayStartDrag):
2296         (WebCore::EventHandler::hitTestResultAtPoint):
2297             Set and maintain pointInMainFrame on the HitTestResult.
2298         * rendering/HitTestResult.cpp:
2299         (WebCore::HitTestResult::HitTestResult):
2300             Construct pointInMainFrame as a copy of pointInInnerNodeFrame. This is correct
2301             for all hit-tests outside of the recursion in EventHandler::hitTestResultAtPoint.
2302         (WebCore::HitTestResult::operator=):
2303         (WebCore::HitTestResult::innerNodeFrame):
2304         (WebCore::HitTestResult::append):
2305         * rendering/HitTestResult.h:
2306         (WebCore::HitTestLocation::point):
2307         (HitTestResult):
2308             Inherits protected now from HitTestLocation to avoid exposing the ambiguous
2309             point() and roundedPoint() methods. 
2310             HitTestResult will be split completely from HitTestLocation in a later patch.
2311         (WebCore::HitTestResult::isRectBasedTest):
2312         (WebCore::HitTestResult::pointInMainFrame):
2313         (WebCore::HitTestResult::roundedPointInMainFrame):
2314         (WebCore::HitTestResult::setPointInMainFrame):
2315         (WebCore::HitTestResult::pointInInnerNodeFrame):
2316         (WebCore::HitTestResult::roundedPointInInnerNodeFrame):
2317         (WebCore::HitTestResult::localPoint):
2318         (WebCore::HitTestResult::setLocalPoint):
2319         * rendering/RenderLayer.cpp:
2320         (WebCore::RenderLayer::hitTest):
2321
2322 2012-11-21  Sheriff Bot  <webkit.review.bot@gmail.com>
2323
2324         Unreviewed, rolling out r135383.
2325         http://trac.webkit.org/changeset/135383
2326         https://bugs.webkit.org/show_bug.cgi?id=102935
2327
2328         IDBRequestTest.* unit tests are failing (Requested by yurys on
2329         #webkit).
2330
2331         * bindings/v8/V8DOMWindowShell.cpp:
2332         (WebCore::V8DOMWindowShell::installDOMWindow):
2333         * bindings/v8/V8DOMWindowShell.h:
2334         (V8DOMWindowShell):
2335         (WebCore::V8DOMWindowShell::isolated):
2336         * bindings/v8/WorldContextHandle.cpp:
2337         (WebCore::WorldContextHandle::WorldContextHandle):
2338
2339 2012-11-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2340
2341         [EFL][WK2] Support Context Menu
2342         https://bugs.webkit.org/show_bug.cgi?id=96200
2343
2344         Reviewed by Laszlo Gombos.
2345
2346         * page/ContextMenuController.cpp:
2347         (WebCore::ContextMenuController::populate):
2348         EFL port also doesn't hide unavailable menus as gtk port.
2349
2350 2012-11-21  Florin Malita  <fmalita@chromium.org>
2351
2352         [Chromium] Unreviewed Mac build fix after http://trac.webkit.org/changeset/135390.
2353
2354         * platform/graphics/skia/GraphicsContextSkia.cpp:
2355         (WebCore::drawInnerPath):
2356
2357 2012-11-21  Florin Malita  <fmalita@chromium.org>
2358
2359         [Skia] Encapsulate access to PlatformContextSkia's SkCanvas
2360         https://bugs.webkit.org/show_bug.cgi?id=102694
2361
2362         Reviewed by Stephen White.
2363
2364         Add SkCanvas-equivalent methods to PlatformContextSkia, and refactor direct canvas call
2365         sites to use these wrappers instead. This reduces the number of canvas() users from 90+
2366         to 22 (mostly theme/ui code).
2367
2368         No new tests: refactoring only.
2369
2370         * platform/chromium/PlatformThemeChromiumLinux.cpp:
2371         (WebCore::PlatformThemeChromiumLinux::paintArrowButton):
2372         * platform/graphics/chromium/FontChromiumWin.cpp:
2373         * platform/graphics/chromium/TransparencyWin.cpp:
2374         (WebCore::TransparencyWin::computeLayerSize):
2375         (WebCore::TransparencyWin::compositeOpaqueComposite):
2376         (WebCore::TransparencyWin::compositeTextComposite):
2377         (WebCore::TransparencyWin::makeLayerOpaque):
2378         * platform/graphics/filters/skia/FEBlendSkia.cpp:
2379         (WebCore::FEBlend::platformApplySkia):
2380         * platform/graphics/filters/skia/FEColorMatrixSkia.cpp:
2381         (WebCore::FEColorMatrix::platformApplySkia):
2382         * platform/graphics/filters/skia/FEComponentTransferSkia.cpp:
2383         (WebCore::FEComponentTransfer::platformApplySkia):
2384         * platform/graphics/filters/skia/FELightingSkia.cpp:
2385         (WebCore::FELighting::platformApplySkia):
2386         * platform/graphics/harfbuzz/FontHarfBuzz.cpp:
2387         (WebCore::Font::drawGlyphs):
2388         (WebCore::Font::drawComplexText):
2389         * platform/graphics/skia/FontSkia.cpp:
2390         (WebCore::Font::drawGlyphs):
2391         * platform/graphics/skia/GraphicsContextSkia.cpp:
2392         (WebCore::GraphicsContext::addInnerRoundedRectClip):
2393         (WebCore::GraphicsContext::clearRect):
2394         (WebCore::GraphicsContext::clip):
2395         (WebCore::GraphicsContext::clipOut):
2396         (WebCore::GraphicsContext::clipPath):
2397         (WebCore::GraphicsContext::concatCTM):
2398         (WebCore::GraphicsContext::setCTM):
2399         (WebCore::GraphicsContext::drawConvexPolygon):
2400         (WebCore::GraphicsContext::clipConvexPolygon):
2401         (WebCore::GraphicsContext::drawEllipse):
2402         (WebCore::drawOuterPath):
2403         (WebCore::GraphicsContext::drawLine):
2404         (WebCore::GraphicsContext::drawLineForDocumentMarker):
2405         (WebCore::GraphicsContext::drawLineForText):
2406         (WebCore::GraphicsContext::fillPath):
2407         (WebCore::GraphicsContext::fillRect):
2408         (WebCore::GraphicsContext::fillRoundedRect):
2409         (WebCore::GraphicsContext::getCTM):
2410         (WebCore::GraphicsContext::scale):
2411         (WebCore::GraphicsContext::strokeArc):
2412         (WebCore::GraphicsContext::strokePath):
2413         (WebCore::GraphicsContext::strokeRect):
2414         (WebCore::GraphicsContext::rotate):
2415         (WebCore::GraphicsContext::translate):
2416         (WebCore::GraphicsContext::platformFillEllipse):
2417         (WebCore::GraphicsContext::platformStrokeEllipse):
2418         * platform/graphics/skia/ImageBufferSkia.cpp:
2419         (WebCore::getImageData):
2420         (WebCore::ImageBuffer::getUnmultipliedImageData):
2421         (WebCore::ImageBuffer::getPremultipliedImageData):
2422         (WebCore::ImageBuffer::putByteArray):
2423         (WebCore::ImageBuffer::toDataURL):
2424         * platform/graphics/skia/ImageSkia.cpp:
2425         (WebCore::drawResampledBitmap):
2426         (WebCore::hasNon90rotation):
2427         (WebCore::paintSkBitmap):
2428         (WebCore::Image::drawPattern):
2429         * platform/graphics/skia/PlatformContextSkia.cpp:
2430         (WebCore::PlatformContextSkia::save):
2431         (WebCore::PlatformContextSkia::beginLayerClippedToImage):
2432         (WebCore::PlatformContextSkia::restore):
2433         (WebCore::PlatformContextSkia::drawRect):
2434         (WebCore::PlatformContextSkia::couldUseLCDRenderedText):
2435         * platform/graphics/skia/PlatformContextSkia.h:
2436         (PlatformContextSkia):
2437         (WebCore::PlatformContextSkia::layerBitmap):
2438         (WebCore):
2439         (WebCore::PlatformContextSkia::readPixels):
2440         (WebCore::PlatformContextSkia::writePixels):
2441         (WebCore::PlatformContextSkia::isDrawingToLayer):
2442         (WebCore::PlatformContextSkia::isVector):
2443         (WebCore::PlatformContextSkia::clipPath):
2444         (WebCore::PlatformContextSkia::clipRect):
2445         (WebCore::PlatformContextSkia::getClipBounds):
2446         (WebCore::PlatformContextSkia::setMatrix):
2447         (WebCore::PlatformContextSkia::getTotalMatrix):
2448         (WebCore::PlatformContextSkia::concat):
2449         (WebCore::PlatformContextSkia::rotate):
2450         (WebCore::PlatformContextSkia::scale):
2451         (WebCore::PlatformContextSkia::translate):
2452         (WebCore::PlatformContextSkia::drawBitmap):
2453         (WebCore::PlatformContextSkia::drawBitmapRect):
2454         (WebCore::PlatformContextSkia::drawOval):
2455         (WebCore::PlatformContextSkia::drawPath):
2456         (WebCore::PlatformContextSkia::drawPoints):
2457         (WebCore::PlatformContextSkia::drawRect):
2458         (WebCore::PlatformContextSkia::drawIRect):
2459         (WebCore::PlatformContextSkia::drawPosText):
2460         (WebCore::PlatformContextSkia::drawPosTextH):
2461         (WebCore::PlatformContextSkia::drawTextOnPath):
2462         * platform/graphics/skia/SkiaFontWin.cpp:
2463         (WebCore::skiaDrawText):
2464         (WebCore::paintSkiaText):
2465         * platform/graphics/skia/SkiaUtils.cpp:
2466         (WebCore::ClipRectToCanvas):
2467         * platform/graphics/skia/SkiaUtils.h:
2468         (WebCore):
2469
2470 2012-11-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2471
2472         Reset the slider thumb location before every layout of the slider container
2473         https://bugs.webkit.org/show_bug.cgi?id=102817
2474
2475         Reviewed by Tony Chang.
2476
2477         The location of the slider thumb is set by the slider container
2478         assuming the slider thumb has been laid out. When this happens,
2479         the location of the slider thumb is reset during the layout
2480         ignoring any previous location set. If the slider thumb is not
2481         laid out, the previous value is added to the new one by the slider
2482         container.
2483
2484         * html/shadow/SliderThumbElement.cpp:
2485         (WebCore::RenderSliderContainer::layout): Reset the location of
2486         the slider thumb before calling RenderFlexibleBox::layout().
2487
2488 2012-11-21  Kentaro Hara  <haraken@chromium.org>
2489
2490         Unreviewed, rolling out r135340.
2491         http://trac.webkit.org/changeset/135340
2492         https://bugs.webkit.org/show_bug.cgi?id=102492
2493
2494         It broke Safari's internal build
2495
2496         * bindings/scripts/CodeGenerator.pm:
2497         (ProcessDocument):
2498         (FileNamePrefix):
2499         * bindings/scripts/CodeGeneratorCPP.pm:
2500         (new):
2501         (GenerateInterface):
2502         (WriteData):
2503         * bindings/scripts/CodeGeneratorGObject.pm:
2504         (new):
2505         (WriteData):
2506         (GenerateInterface):
2507         * bindings/scripts/CodeGeneratorJS.pm:
2508         (new):
2509         (GenerateInterface):
2510         (WriteData):
2511         * bindings/scripts/CodeGeneratorObjC.pm:
2512         (new):
2513         (GenerateInterface):
2514         (WriteData):
2515         * bindings/scripts/CodeGeneratorV8.pm:
2516         (new):
2517         (GenerateInterface):
2518         (WriteData):
2519
2520 2012-11-21  Pavel Feldman  <pfeldman@chromium.org>
2521
2522         Web Inspector: reparenting view does not detach from the previous parent.
2523         https://bugs.webkit.org/show_bug.cgi?id=102902
2524
2525         Reviewed by Vsevolod Vlasov.
2526
2527         * inspector/front-end/View.js:
2528         (WebInspector.View.prototype.show):
2529
2530 2012-11-21  Ilya Tikhonovsky  <loislo@chromium.org>
2531
2532         Web Inspector: NMI add instrumentation to widely used ActiveDOMObjects. XMLHttpRequest, Prerenderer, HTMLMediaElement and DOMTimer.
2533         https://bugs.webkit.org/show_bug.cgi?id=102818
2534
2535         Reviewed by Vsevolod Vlasov.
2536
2537         Our test bot counts pointers which don't match with objects allocated by tcmalloc.
2538         This counter becomes nonzero after instrumenting ActiveDOMObject class.
2539         It happens because it is the base class for many other classes (~30).
2540         And almost all these classes use multiple inheritance.
2541
2542         * dom/Document.cpp:
2543         (WebCore::Document::reportMemoryUsage):
2544         * dom/DocumentEventQueue.cpp:
2545         * html/HTMLMediaElement.cpp:
2546         (WebCore::HTMLMediaElement::reportMemoryUsage):
2547         (WebCore):
2548         * html/HTMLMediaElement.h:
2549         * loader/Prerenderer.cpp:
2550         (WebCore::Prerenderer::reportMemoryUsage):
2551         (WebCore):
2552         * loader/Prerenderer.h:
2553         (Prerenderer):
2554         * page/DOMTimer.cpp:
2555         (WebCore::DOMTimer::reportMemoryUsage):
2556         (WebCore):
2557         * page/DOMTimer.h:
2558         (DOMTimer):
2559         * xml/XMLHttpRequest.cpp:
2560         (WebCore::XMLHttpRequest::reportMemoryUsage):
2561         (WebCore):
2562         * xml/XMLHttpRequest.h:
2563         (XMLHttpRequest):
2564
2565 2012-11-21  Dan Carney  <dcarney@google.com>
2566
2567         [V8] Add context checks to WorldContextHandle and V8DOMWindowShell
2568         https://bugs.webkit.org/show_bug.cgi?id=101573
2569
2570         Reviewed by Adam Barth.
2571
2572         Added a bunch of assertions to ensure the problems with IndexedDB
2573         contexts cannot reemerge.
2574
2575         No new tests. No change in functionality.
2576
2577         * bindings/v8/V8DOMWindowShell.cpp:
2578         (WebCore):
2579         (WebCore::V8DOMWindowShell::assertContextHasCorrectPrototype):
2580         * bindings/v8/V8DOMWindowShell.h:
2581         (V8DOMWindowShell):
2582         (WebCore::V8DOMWindowShell::isolated):
2583         * bindings/v8/WorldContextHandle.cpp:
2584         (WebCore::WorldContextHandle::WorldContextHandle):
2585
2586 2012-11-21  Harald Alvestrand  <hta@google.com>
2587
2588         WebMediaStreamComponent: Add assignment and copy operators
2589         https://bugs.webkit.org/show_bug.cgi?id=102915
2590
2591         Reviewed by Adam Barth.
2592
2593         Tests that use this functionality are being submitted to Chrome.
2594
2595         * platform/chromium/support/WebMediaStreamComponent.cpp:
2596         (WebKit::WebMediaStreamComponent::assign):
2597         (WebKit):
2598         * platform/chromium/support/WebMediaStreamDescriptor.cpp:
2599
2600 2012-11-21  Kentaro Hara  <haraken@chromium.org>
2601
2602         [V8] Remove STRING_TO_V8PARAMETER_EXCEPTION_BLOCK()
2603         https://bugs.webkit.org/show_bug.cgi?id=102917
2604
2605         Reviewed by Adam Barth.
2606
2607         Now EXCEPTION_BLOCK() and STRING_TO_V8PARAMETER_EXCEPTION_BLOCK()
2608         are equivalent. We can remove STRING_TO_V8PARAMETER_EXCEPTION_BLOCK().
2609         To make a code generate change smaller, this patch also renames
2610         STRING_TO_V8PARAMETER_EXCEPTION_BLOCK_VOID() to EXCEPTION_BLOCK_VOID().
2611         I will rename these macros in a follow-up patch.
2612
2613         No tests. No change in behavior.
2614
2615         * bindings/scripts/CodeGeneratorV8.pm:
2616         (GenerateEventConstructorCallback):
2617         (ConvertToV8Parameter):
2618         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
2619         (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):
2620         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
2621         (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):
2622         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2623         (WebCore::V8TestEventConstructor::constructorCallback):
2624         * bindings/scripts/test/V8/V8TestInterface.cpp:
2625         (WebCore::TestInterfaceV8Internal::supplementalStaticAttrAttrSetter):
2626         (WebCore::TestInterfaceV8Internal::supplementalStr2AttrSetter):
2627         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
2628         (WebCore::V8TestInterface::constructorCallback):
2629         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2630         (WebCore::V8TestNamedConstructorConstructorCallback):
2631         * bindings/scripts/test/V8/V8TestObj.cpp:
2632         (WebCore::TestObjV8Internal::staticStringAttrAttrSetter):
2633         (WebCore::TestObjV8Internal::stringAttrAttrSetter):
2634         (WebCore::TestObjV8Internal::reflectedStringAttrAttrSetter):
2635         (WebCore::TestObjV8Internal::reflectedURLAttrAttrSetter):
2636         (WebCore::TestObjV8Internal::reflectedCustomURLAttrAttrSetter):
2637         (WebCore::TestObjV8Internal::stringAttrWithGetterExceptionAttrSetter):
2638         (WebCore::TestObjV8Internal::stringAttrWithSetterExceptionAttrSetter):
2639         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
2640         (WebCore::TestObjV8Internal::longMethodWithArgsCallback):
2641         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
2642         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
2643         (WebCore::TestObjV8Internal::methodWithOptionalStringCallback):
2644         (WebCore::TestObjV8Internal::methodWithOptionalStringIsUndefinedCallback):
2645         (WebCore::TestObjV8Internal::methodWithOptionalStringIsNullStringCallback):
2646         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
2647         (WebCore::TestObjV8Internal::overloadedMethod3Callback):
2648         (WebCore::TestObjV8Internal::overloadedMethod11Callback):
2649         (WebCore::TestObjV8Internal::overloadedMethod12Callback):
2650         (WebCore::TestObjV8Internal::strictFunctionCallback):
2651         (WebCore::TestObjV8Internal::variadicStringMethodCallback):
2652         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
2653         (WebCore::V8TestOverloadedConstructors::constructor4Callback):
2654         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2655         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
2656         * bindings/v8/V8BindingMacros.h:
2657         * bindings/v8/V8StringResource.h:
2658         (V8Parameter):
2659         * bindings/v8/custom/V8ConsoleCustom.cpp:
2660         (WebCore::V8Console::profileCallback):
2661         (WebCore::V8Console::profileEndCallback):
2662         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2663         (WebCore::handlePostMessageCallback):
2664         * bindings/v8/custom/V8DeviceMotionEventCustom.cpp:
2665         (WebCore::V8DeviceMotionEvent::initDeviceMotionEventCallback):
2666         * bindings/v8/custom/V8DeviceOrientationEventCustom.cpp:
2667         (WebCore::V8DeviceOrientationEvent::initDeviceOrientationEventCallback):
2668         * bindings/v8/custom/V8HistoryCustom.cpp:
2669         (WebCore::V8History::pushStateCallback):
2670         (WebCore::V8History::replaceStateCallback):
2671         * bindings/v8/custom/V8IntentCustom.cpp:
2672         (WebCore::V8Intent::constructorCallbackCustom):
2673         * bindings/v8/custom/V8SQLTransactionCustom.cpp:
2674         (WebCore::V8SQLTransaction::executeSqlCallback):
2675         * bindings/v8/custom/V8SQLTransactionSyncCustom.cpp:
2676         (WebCore::V8SQLTransactionSync::executeSqlCallback):
2677         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2678         (WebCore::V8WebGLRenderingContext::getExtensionCallback):
2679
2680 2012-11-21  Kentaro Hara  <haraken@chromium.org>
2681
2682         [V8] Move V8DOMWindowShell::initializeV8IfNeeded() to V8Initializer
2683         https://bugs.webkit.org/show_bug.cgi?id=102899
2684
2685         Reviewed by Adam Barth.
2686
2687         This is an incremental step to kill WorkerContextExecutionProxy.
2688         As commented by abarth in bug 97066, we move
2689         V8DOMWindowShell::initializeV8IfNeeded() to V8Initializer.
2690         This patch renames initializeV8IfNeeded() to initializeMainThreadIfNeeded()
2691         because we will add initializeWorkerIfNeeded() in a follow-up patch.
2692
2693         No tests. No change in behavior.
2694
2695         * UseV8.cmake:
2696         * WebCore.gypi:
2697         * bindings/v8/V8DOMWindowShell.cpp:
2698         (WebCore::V8DOMWindowShell::initializeIfNeeded):
2699         * bindings/v8/V8Initializer.cpp: Added.
2700         (WebCore):
2701         (WebCore::findFrame):
2702         (WebCore::reportFatalError):
2703         (WebCore::reportUncaughtException):
2704         (WebCore::reportUnsafeJavaScriptAccess):
2705         (WebCore::V8Initializer::initializeMainThreadIfNeeded):
2706         * bindings/v8/V8Initializer.h: Added.
2707         (WebCore):
2708         (V8Initializer):
2709
2710 2012-11-21  Alexander Pavlov  <apavlov@chromium.org>
2711
2712         Turn -webkit-text-emphasis into a shorthand property
2713         https://bugs.webkit.org/show_bug.cgi?id=102879
2714
2715         Reviewed by Antti Koivisto.
2716
2717         -webkit-text-emphasis value is no longer empty.
2718
2719         * css/StylePropertySet.cpp:
2720         (WebCore::StylePropertySet::getPropertyValue): Reconstruct the -webkit-text-emphasis value based on the longhands.
2721
2722 2012-11-21  Kentaro Hara  <haraken@chromium.org>
2723
2724         Unreviewed. Build fix.
2725
2726         * bindings/v8/custom/V8BlobCustom.cpp:
2727         (WebCore::V8Blob::constructorCallbackCustom):
2728
2729 2012-11-21  Kentaro Hara  <haraken@chromium.org>
2730
2731         [V8] Rename v8/custom/*Constructor.cpp to v8/custom/*Custom.cpp
2732         https://bugs.webkit.org/show_bug.cgi?id=102881
2733
2734         Reviewed by Adam Barth.
2735
2736         Writing constructorCallback()s in *Custom.cpp is a convention of
2737         custom bindings of JSC and V8. We can rename v8/custom/*Constructor.cpp
2738         to v8/custom/*Custom.cpp.
2739
2740         No tests. No change in behavior.
2741
2742         * UseV8.cmake: This file is already out of sync.
2743         * WebCore.gypi:
2744         * bindings/v8/custom/V8IntentCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8IntentConstructor.cpp.
2745         (WebCore):
2746         (WebCore::V8Intent::constructorCallbackCustom):
2747         * bindings/v8/custom/V8MessageChannelCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp.
2748         (WebCore):
2749         (WebCore::V8MessageChannel::constructorCallbackCustom):
2750         * bindings/v8/custom/V8WebKitPointCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp.
2751         (WebCore):
2752         (WebCore::V8WebKitPoint::constructorCallbackCustom):
2753
2754 2012-11-21  Dan Carney  <dcarney@google.com>
2755
2756         [V8] Inspector does not callback IDB methods in context
2757         https://bugs.webkit.org/show_bug.cgi?id=101725
2758
2759         Reviewed by Adam Barth.
2760
2761         Inserted v8 context before calling out to IDB.
2762
2763         No new tests.
2764
2765         * inspector/InspectorIndexedDBAgent.cpp:
2766         (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
2767         (WebCore::InspectorIndexedDBAgent::requestDatabase):
2768         (WebCore::InspectorIndexedDBAgent::requestData):
2769
2770 2012-11-21  Huang Dongsung  <luxtella@company100.net>
2771
2772         REGRESSION(134048): TiledBackingStore must create tiles when the contents rect is changed.
2773         https://bugs.webkit.org/show_bug.cgi?id=102035
2774
2775         Reviewed by Kenneth Rohde Christiansen.
2776
2777         Before r134048, the visibleRect contained information of both the viewport and
2778         the contents rect. Now the visible rect is related to only the viewport. So
2779         TiledBackingStore::coverWithTilesIfNeeded() early returns even if the contents
2780         rect is changed, because changing the contents rect is independent on changing
2781         both a trajectory vector and the visible rect.
2782
2783         * platform/graphics/TiledBackingStore.cpp:
2784         (WebCore::TiledBackingStore::coverWithTilesIfNeeded):
2785
2786 2012-11-21  Vsevolod Vlasov  <vsevik@chromium.org>
2787
2788         Web Inspector: Request preview tuning: enable json preview for text/html XHRs
2789         https://bugs.webkit.org/show_bug.cgi?id=102892
2790
2791         Reviewed by Alexander Pavlov.
2792
2793         * inspector/front-end/RequestPreviewView.js:
2794         (WebInspector.RequestPreviewView.prototype._jsonView):
2795         (WebInspector.RequestPreviewView.prototype._htmlView):
2796         (WebInspector.RequestPreviewView.prototype._createPreviewView):
2797
2798 2012-11-21  Kentaro Hara  <haraken@chromium.org>
2799
2800         [V8] Remove manually written v8::TryCatches in custom bindings
2801         https://bugs.webkit.org/show_bug.cgi?id=102883
2802
2803         Reviewed by Adam Barth.
2804
2805         We can replace them with the EXCEPTION_BLOCK() macro or its friends.
2806
2807         No new tests. This patch shouldn't change any behavior.
2808
2809         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2810         (WebCore::handlePostMessageCallback):
2811         * bindings/v8/custom/V8DocumentCustom.cpp:
2812         (WebCore::V8Document::evaluateCallback):
2813         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2814         (WebCore::V8HTMLOptionsCollection::addCallback):
2815         * bindings/v8/custom/V8HistoryCustom.cpp:
2816         (WebCore::V8History::pushStateCallback):
2817         (WebCore::V8History::replaceStateCallback):
2818
2819 2012-11-21  Kentaro Hara  <haraken@chromium.org>
2820
2821         Unreviewed, rolling out r135358.
2822         http://trac.webkit.org/changeset/135358
2823         https://bugs.webkit.org/show_bug.cgi?id=102881
2824
2825         It broke Chromium/Linux build
2826
2827         * UseV8.cmake:
2828         * WebCore.gypi:
2829         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8HTMLImageElementCustom.cpp.
2830         (WebCore):
2831         (WebCore::v8HTMLImageElementConstructorCallback):
2832         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
2833         * bindings/v8/custom/V8HTMLImageElementConstructor.h: Renamed from Source/WebCore/bindings/v8/custom/V8HTMLImageElementCustom.h.
2834         (WebCore):
2835         (V8HTMLImageElementConstructor):
2836         * bindings/v8/custom/V8IntentConstructor.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8IntentCustom.cpp.
2837         (WebCore):
2838         (WebCore::V8Intent::constructorCallbackCustom):
2839         * bindings/v8/custom/V8MessageChannelConstructor.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8MessageChannelCustom.cpp.
2840         (WebCore):
2841         (WebCore::V8MessageChannel::constructorCallbackCustom):
2842         * bindings/v8/custom/V8WebKitPointConstructor.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8WebKitPointCustom.cpp.
2843         (WebCore):
2844         (WebCore::V8WebKitPoint::constructorCallbackCustom):
2845
2846 2012-11-21  KyungTae Kim  <ktf.kim@samsung.com>
2847
2848         Unused parameters on ScrollingCoordinator.cpp
2849         https://bugs.webkit.org/show_bug.cgi?id=102884
2850
2851         Reviewed by Kentaro Hara.
2852
2853         Because the 'scrollingLayerPositionAction' parameter is not used when !USE(ACCELERATED_COMPOSITING),
2854         use UNUSED_PARAM macro to fix build warning -Wunused-parameter
2855
2856         * page/scrolling/ScrollingCoordinator.cpp:
2857         (WebCore::ScrollingCoordinator::updateMainFrameScrollPosition):
2858
2859 2012-11-21  Kentaro Hara  <haraken@chromium.org>
2860
2861         [V8] Replace V8Parameter::prepare() with V8Parameter::operator=()
2862         https://bugs.webkit.org/show_bug.cgi?id=102870
2863
2864         Reviewed by Adam Barth.
2865
2866         This is an incremental step for V8Parameter refactoring.
2867         By replacing V8Parameter::prepare() with V8Parameter::operator=(),
2868         we can make EXCEPTION_BLOCK() and STRING_TO_V8PARAMETER_EXCEPTION_BLOCK()
2869         equivalent (except for a return value).
2870
2871         Tests: fast/workers/worker-constructor.html
2872                storage/websql/sql-error-codes.html
2873                inspector/console/alert-toString-exception.html
2874                http/tests/websocket/tests/hybi/send-throw.html
2875
2876         * bindings/v8/V8BindingMacros.h:
2877         * bindings/v8/V8StringResource.h:
2878         (WebCore::V8Parameter::V8Parameter):
2879         (V8Parameter):
2880         (WebCore::=):
2881
2882 2012-11-21  Kentaro Hara  <haraken@chromium.org>
2883
2884         [V8] Rename v8/custom/*Constructor.cpp to v8/custom/*Custom.cpp
2885         https://bugs.webkit.org/show_bug.cgi?id=102881
2886
2887         Reviewed by Adam Barth.
2888
2889         Writing constructorCallback()s in *Custom.cpp is a convention of
2890         custom bindings of JSC and V8. We can rename v8/custom/*Constructor.cpp
2891         to v8/custom/*Custom.cpp.
2892
2893         No tests. No change in behavior.
2894
2895         * UseV8.cmake: This file is already out of sync.
2896         * WebCore.gypi:
2897         * bindings/v8/custom/V8HTMLImageElementCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.cpp.
2898         (WebCore):
2899         (WebCore::v8HTMLImageElementConstructorCallback):
2900         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
2901         * bindings/v8/custom/V8HTMLImageElementCustom.h: Renamed from Source/WebCore/bindings/v8/custom/V8HTMLImageElementConstructor.h.
2902         (WebCore):
2903         (V8HTMLImageElementConstructor):
2904         * bindings/v8/custom/V8IntentCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8IntentConstructor.cpp.
2905         (WebCore):
2906         (WebCore::V8Intent::constructorCallbackCustom):
2907         * bindings/v8/custom/V8MessageChannelCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8MessageChannelConstructor.cpp.
2908         (WebCore):
2909         (WebCore::V8MessageChannel::constructorCallbackCustom):
2910         * bindings/v8/custom/V8WebKitPointCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8WebKitPointConstructor.cpp.
2911         (WebCore):
2912         (WebCore::V8WebKitPoint::constructorCallbackCustom):
2913
2914 2012-11-21  Andrey Adaikin  <aandrey@chromium.org>
2915
2916         Web Inspector: [Canvas] throttle wait icon in the ui
2917         https://bugs.webkit.org/show_bug.cgi?id=102685
2918
2919         Reviewed by Vsevolod Vlasov.
2920
2921         Do not show the wait icon for small operations during the replay to reduce flickering.
2922
2923         * inspector/front-end/CanvasProfileView.js:
2924         (WebInspector.CanvasProfileView.prototype._enableWaitIcon):
2925
2926 2012-11-21  Kunihiko Sakamoto  <ksakamoto@chromium.org>
2927
2928         Enable datalist UI for input types datetime and datetime-local
2929         https://bugs.webkit.org/show_bug.cgi?id=102882
2930
2931         Reviewed by Kent Tamura.
2932
2933         Enabling datalist UI for input types datetime and datetime-local.
2934
2935         No new tests yet. Tests will be added later in Bug 102888.
2936
2937         * platform/text/PlatformLocale.cpp:
2938         (WebCore::Locale::formatDateTime): Support datetime and datetime-local types.
2939         * rendering/RenderThemeChromiumCommon.cpp:
2940         (WebCore::RenderThemeChromiumCommon::supportsDataListUI): Add datetime and datetimelocal to the list.
2941
2942 2012-11-20  Kentaro Hara  <haraken@chromium.org>
2943
2944         [V8] Remove v8/custom/V8XMLHttpRequestConstructor.cpp
2945         https://bugs.webkit.org/show_bug.cgi?id=102876
2946
2947         Reviewed by Sam Weinig.
2948
2949         It doesn't make sense to have one custom cpp file for
2950         XXX::constructorCallback() only. We can move XXX::constructorCallback()
2951         in v8/custom/V8XXXConstructor.cpp to v8/custom/V8XXXCustom.cpp
2952         and thus remove v8/custom/V8XXXConstructor.cpp.
2953
2954         Note: Some XXX::constructorCallback()s are already written in
2955         v8/custom/V8XXXCustom.cpp. JSC already has almost all
2956         XXX::constructorCallback()s in js/JSXXXCustom.cpp.
2957
2958         No tests. No change in behavior.
2959
2960         * UseV8.cmake:
2961         * WebCore.gypi:
2962         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp: Removed.
2963         * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
2964         (WebCore::V8XMLHttpRequest::constructorCallbackCustom):
2965         (WebCore):
2966
2967 2012-11-20  Kentaro Hara  <haraken@chromium.org>
2968
2969         Unreviewed. Rebaselined run-bindings-tests.
2970
2971         * bindings/scripts/test/CPP/WebDOMFloat64Array.cpp:
2972         * bindings/scripts/test/CPP/WebDOMTestActiveDOMObject.cpp:
2973         * bindings/scripts/test/CPP/WebDOMTestCallback.cpp:
2974         * bindings/scripts/test/CPP/WebDOMTestCustomNamedGetter.cpp:
2975         * bindings/scripts/test/CPP/WebDOMTestEventConstructor.cpp:
2976         * bindings/scripts/test/CPP/WebDOMTestEventTarget.cpp:
2977         * bindings/scripts/test/CPP/WebDOMTestException.cpp:
2978         * bindings/scripts/test/CPP/WebDOMTestInterface.cpp:
2979         * bindings/scripts/test/CPP/WebDOMTestMediaQueryListListener.cpp:
2980         * bindings/scripts/test/CPP/WebDOMTestNamedConstructor.cpp:
2981         * bindings/scripts/test/CPP/WebDOMTestNode.cpp:
2982         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
2983         * bindings/scripts/test/CPP/WebDOMTestOverloadedConstructors.cpp:
2984         * bindings/scripts/test/CPP/WebDOMTestSerializedScriptValueInterface.cpp:
2985         * bindings/scripts/test/V8/V8TestObj.cpp:
2986         (WebCore::TestObjV8Internal::withScriptStateAttributeAttrGetter):
2987         (WebCore::TestObjV8Internal::withScriptStateAttributeAttrSetter):
2988         (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrGetter):
2989         (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrSetter):
2990         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetter):
2991         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetter):
2992         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter):
2993         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter):
2994         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter):
2995         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter):
2996         (WebCore::TestObjV8Internal::withScriptStateVoidCallback):
2997         (WebCore::TestObjV8Internal::withScriptStateObjCallback):
2998         (WebCore::TestObjV8Internal::withScriptStateVoidExceptionCallback):
2999         (WebCore::TestObjV8Internal::withScriptStateObjExceptionCallback):
3000         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateCallback):
3001         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionCallback):
3002         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesCallback):
3003
3004 2012-11-20  Kentaro Hara  <haraken@chromium.org>
3005
3006         [V8] Introduce constructorCallbackCustom()
3007         https://bugs.webkit.org/show_bug.cgi?id=102763
3008
3009         Reviewed by Adam Barth.
3010
3011         Currently custom constructors have the following code:
3012
3013           v8::Handle<v8::Value> V8XXX::constructorCallback(const v8::Arguments& args) {
3014             INC_STATS("DOM.XXX.Constructor");
3015             if (!args.IsConstructCall())
3016               return throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
3017             if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
3018               return args.Holder();
3019
3020             /* body of the constructor */;
3021           }
3022
3023         To avoid duplicating the same logic in all custom constructors,
3024         this patch changes the generated code as follows:
3025
3026           // Generated automatically
3027           v8::Handle<v8::Value> V8XXX::constructorCallback(const v8::Arguments& args) {
3028             INC_STATS("DOM.XXX.Constructor");
3029             ${maybeObserveFeature}  // Newly supported for custom constructors.
3030             if (!args.IsConstructCall())
3031               return throwTypeError("DOM object constructor cannot be called as a function.", args.GetIsolate());
3032             if (ConstructorMode::current() == ConstructorMode::WrapExistingObject)
3033               return args.Holder();
3034
3035             V8XXX::constructorCallbackCustom(args);
3036           }
3037
3038           // Written manually
3039           v8::Handle<v8::Value> V8XXX::constructorCallback(const v8::Arguments& args) {
3040             /* body of the constructor */;
3041           }
3042
3043         No tests. No change in behavior.
3044
3045         * bindings/scripts/CodeGeneratorV8.pm:
3046         (GenerateHeader):
3047         (HasCustomConstructor):
3048         (GenerateCustomConstructorCallback):
3049         (GenerateImplementation):
3050         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3051         (WebCore::V8TestEventConstructor::constructorCallback):
3052         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3053         (WebCore::V8TestNamedConstructorConstructorCallback):
3054         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
3055         (WebCore::V8TestOverloadedConstructors::constructorCallback):
3056         * bindings/v8/custom/V8ArrayBufferCustom.cpp:
3057         (WebCore::V8ArrayBuffer::constructorCallbackCustom):
3058         * bindings/v8/custom/V8AudioContextCustom.cpp:
3059         (WebCore::V8AudioContext::constructorCallbackCustom):
3060         * bindings/v8/custom/V8BlobCustom.cpp:
3061         (WebCore::V8Blob::constructorCallbackCustom):
3062         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
3063         (WebCore::V8DOMFormData::constructorCallbackCustom):
3064         * bindings/v8/custom/V8DataViewCustom.cpp:
3065         (WebCore::V8DataView::constructorCallbackCustom):
3066         * bindings/v8/custom/V8IntentConstructor.cpp:
3067         (WebCore::V8Intent::constructorCallbackCustom):
3068         * bindings/v8/custom/V8MessageChannelConstructor.cpp:
3069         (WebCore::V8MessageChannel::constructorCallbackCustom):
3070         * bindings/v8/custom/V8MutationObserverCustom.cpp:
3071         (WebCore::V8MutationObserver::constructorCallbackCustom):
3072         * bindings/v8/custom/V8WebKitPointConstructor.cpp:
3073         (WebCore::V8WebKitPoint::constructorCallbackCustom):
3074         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
3075         (WebCore::V8XMLHttpRequest::constructorCallbackCustom):
3076
3077 2012-11-20  Kunihiko Sakamoto  <ksakamoto@chromium.org>
3078
3079         REGRESSION(r135263): Fix a wrong argument for udat_close
3080         https://bugs.webkit.org/show_bug.cgi?id=102856
3081
3082         Reviewed by Kent Tamura.
3083
3084         Fixed a bug that passed wrong pointer to udat_close.
3085
3086         No new tests. No changes in behavior.
3087
3088         * platform/text/LocaleICU.cpp:
3089         (WebCore::LocaleICU::initializeDateTimeFormat): Close correct object.
3090
3091 2012-11-20  Kentaro Hara  <haraken@chromium.org>
3092
3093         Remove $outputDir and $outputHeadersDir from global variables of code generators
3094         https://bugs.webkit.org/show_bug.cgi?id=102492
3095
3096         Reviewed by Adam Barth.
3097
3098         $outputDir and $outputHeadersDir are used in WriteData() only.
3099         We don't need to use global variables for them.
3100
3101         No tests. No change in behavior.
3102
3103         * bindings/scripts/CodeGenerator.pm:
3104         (ProcessDocument):
3105         (FileNamePrefix):
3106         * bindings/scripts/CodeGeneratorCPP.pm:
3107         (new):
3108         (GenerateInterface):
3109         (WriteData):
3110         * bindings/scripts/CodeGeneratorGObject.pm:
3111         (new):
3112         (WriteData):
3113         (GenerateInterface):
3114         * bindings/scripts/CodeGeneratorJS.pm:
3115         (new):
3116         (GenerateInterface):
3117         (WriteData):
3118         * bindings/scripts/CodeGeneratorObjC.pm:
3119         (new):
3120         (GenerateInterface):
3121         (WriteData):
3122         * bindings/scripts/CodeGeneratorV8.pm:
3123         (new):
3124         (GenerateInterface):
3125         (WriteData):
3126
3127 2012-11-20  Adam Barth  <abarth@webkit.org>
3128
3129         7% regression in dromaeo_domcorequery/dom_query_getElementsByTagName__not_in_document
3130         https://bugs.webkit.org/show_bug.cgi?id=102852
3131
3132         Reviewed by Kentaro Hara.
3133
3134         In http://trac.webkit.org/changeset/135208/, we lost the early-exit
3135         check for whether isolatedWorldsExist() in this code path. This
3136         regression points to benchmarks that we can further improve by
3137         continuing to merge the general ScriptWrappable code path with the Node
3138         code path.
3139
3140         * bindings/v8/DOMDataStore.cpp:
3141         (WebCore::DOMDataStore::current):
3142
3143 2012-11-20  Kentaro Hara  <haraken@chromium.org>
3144
3145         [V8] Change a return type of V8Parameter::prepare() from bool to void
3146         https://bugs.webkit.org/show_bug.cgi?id=102805
3147
3148         Reviewed by Adam Barth.
3149
3150         This is an incremental step for V8Parameter refactoring.
3151
3152         V8Parameter::prepare() is always called just after V8Parameter's
3153         constructor. So I want to move the logic of V8Parameter::prepare()
3154         to V8Parameter's constructor. In preparation for that (i.e. because
3155         a constructor cannot return any value), this patch changes the return
3156         type of V8Parameter::prepare() from bool to void.
3157
3158         Tests: fast/workers/worker-constructor.html
3159                storage/websql/sql-error-codes.html
3160                inspector/console/alert-toString-exception.html
3161                http/tests/websocket/tests/hybi/send-throw.html
3162                etc
3163
3164         * bindings/v8/V8BindingMacros.h:
3165         * bindings/v8/V8StringResource.h:
3166         (V8Parameter):
3167         (WebCore::V8Parameter::prepareBase): This patch removes a TryCatch block.
3168         This change is safe because (1) all V8Parameter::prepareBase() in the code base
3169         is called inside STRING_TO_V8PARAMETER_EXCEPTION_BLOCK(), and because
3170         (2) STRING_TO_V8PARAMETER_EXCEPTION_BLOCK() has a TryCatch block.
3171         (Note: In a follow-up patch I'm planning to refactor the macros.)
3172         (WebCore::::prepare): I will remove this method shortly.
3173
3174 2012-11-20  Adam Klein  <adamk@chromium.org>
3175
3176         [JSC] MutationObserver wrapper should not be collected while still observing
3177         https://bugs.webkit.org/show_bug.cgi?id=102744
3178
3179         Reviewed by Adam Barth.
3180
3181         This is the JSC side of the change landed for V8 in r135228.
3182         It ensures MutationObserver wrapper objects are kept alive as long as
3183         any observed nodes.
3184
3185         * bindings/js/JSMutationObserverCustom.cpp:
3186         (WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots): Keep MutationObserver wrappers alive
3187         if any of their observed nodes' roots is an opaque root.
3188         * dom/MutationObserver.idl: Add JSCustomIsReachable
3189
3190 2012-11-20  Joshua Bell  <jsbell@chromium.org>
3191
3192         IndexedDB: Move control of transaction completion to front end
3193         https://bugs.webkit.org/show_bug.cgi?id=100903
3194
3195         Reviewed by Tony Chang.
3196
3197         "When a transaction can no longer become active, the implementation must attempt to
3198         commit it" - that is, all requests have dispatched success/error events and no further
3199         requests have been made. Previously, this was done by the back end waiting for events
3200         from the front end, but the front end can more efficiently make the decision.
3201
3202         There should be no detectable behavior change.
3203
3204         Tests: storage/indexeddb/transaction-*.html
3205
3206         * Modules/indexeddb/IDBTransaction.cpp:
3207         (WebCore::IDBTransaction::IDBTransaction):
3208         (WebCore::IDBTransaction::setActive):
3209         (WebCore::IDBTransaction::registerRequest):
3210         * Modules/indexeddb/IDBTransaction.h:
3211         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
3212         (WebCore::IDBTransactionBackendImpl::hasPendingTasks): Added.
3213         (WebCore::IDBTransactionBackendImpl::didCompleteTaskEvents):
3214         (WebCore::IDBTransactionBackendImpl::run):
3215         (WebCore::IDBTransactionBackendImpl::taskEventTimerFired):
3216
3217 2012-11-20  Kentaro Hara  <haraken@chromium.org>
3218
3219         Unreviewed. Rebaselined run-bindings-tests results.
3220
3221         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3222         (WebCore::V8TestEventConstructor::constructorCallback):
3223         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3224         (WebCore::V8TestNamedConstructorConstructorCallback):
3225         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
3226         (WebCore::V8TestOverloadedConstructors::constructorCallback):
3227
3228 2012-11-20  Alpha Lam  <hclam@chromium.org>
3229
3230         Unreviewed. Chromium build fix.
3231
3232         Removed unnecessary mutex unlock that triggered crash on Linux debug build.
3233
3234         Chromium Linux Debug layout tests should be green:
3235         platform/chromium/virtual/deferred/fast/images/image-in-map.html
3236
3237         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
3238         (WebCore::LazyDecodingPixelRef::onLockPixels):
3239
3240 2012-11-20  Ryosuke Niwa  <rniwa@webkit.org>
3241
3242         Fix another typo. I need to checking that type() != NodeListCollectionType,
3243         not that type() >= FirstNodeCollectionType.
3244
3245         * dom/DynamicNodeList.cpp:
3246         (WebCore::DynamicNodeListCacheBase::invalidateIdNameCacheMaps):
3247         * dom/DynamicNodeList.h:
3248         (WebCore::DynamicNodeListCacheBase::invalidateCache):
3249
3250 2012-11-20  Michael Pruett  <michael@68k.org>
3251
3252         [V8] Pass ScriptState::current() to functions marked with CallWith=ScriptState
3253         https://bugs.webkit.org/show_bug.cgi?id=102739
3254
3255         Reviewed by Kentaro Hara.
3256
3257         Previously EmptyScriptState rather than ScriptState::current()
3258         was passed to functions marked with [CallWith=ScriptState].
3259         Since the EmptyScriptState has a null v8::Context, any functions
3260         which depended upon a valid v8::Context would fail.
3261
3262         No new tests. Covered by existing tests.
3263
3264         * bindings/scripts/CodeGeneratorV8.pm:
3265         (GenerateNormalAttrGetter):
3266         (GenerateNormalAttrSetter):
3267         (GenerateCallWith):
3268         (GenerateFunctionCallString):
3269         * bindings/v8/ScriptState.h:
3270         (WebCore::ScriptState::clearException): Added.
3271
3272 2012-11-20  Brent Fulgham  <bfulgham@webkit.org>
3273
3274         [Qt] Build fix after r135217.
3275         https://bugs.webkit.org/show_bug.cgi?id=102787
3276
3277         * platform/win/WindowsExtras.h: Switch to direct include of
3278           <ObjBase.h>, as is done in other <shlwapi.h> includes.
3279
3280 2012-11-20  Ryosuke Niwa  <rniwa@webkit.org>
3281
3282         Fix typos. Apparently XCode failed to text-replace earlier when it was busy making a snapshot :(
3283
3284         * dom/DynamicNodeList.cpp:
3285         (WebCore::DynamicNodeListCacheBase::invalidateIdNameCacheMaps):
3286         * dom/DynamicNodeList.h:
3287         (WebCore::DynamicNodeListCacheBase::invalidateCache):
3288         (DynamicNodeListCacheBase):
3289
3290 2012-11-20  Kentaro Hara  <haraken@chromium.org>
3291
3292         [V8] Introduce GenerateConstructorHeader() to CodeGeneratorV8.pm
3293         https://bugs.webkit.org/show_bug.cgi?id=102806
3294
3295         Reviewed by Adam Barth.
3296
3297         This is an incremental step for introducing constructorCallbackCustom().
3298         (See bug 102763.) This patch adds GenerateConstructorHeader()
3299         that generates a common code for constructors.
3300
3301         No tests. No change in behavior.
3302
3303         * bindings/scripts/CodeGeneratorV8.pm:
3304         (GenerateOverloadedConstructorCallback):
3305         (GenerateSingleConstructorCallback):
3306         (GenerateEventConstructorCallback):
3307         (GenerateNamedConstructorCallback):
3308         (GenerateConstructorHeader):
3309
3310 2012-11-20  Ryosuke Niwa  <rniwa@webkit.org>
3311
3312         HTMLCollection's cache should not be invalidated when id or name attributes are changed
3313         https://bugs.webkit.org/show_bug.cgi?id=102843
3314
3315         Reviewed by Eric Seidel.
3316
3317         When an id or name attribute changes, only invaliate id and name cache maps when the collection
3318         doesn't depend on id and name attributes (e.g. document.images).
3319
3320         Unfortunately, I could not create a reliable test for this performance problem.
3321
3322         * dom/DynamicNodeList.cpp:
3323         (WebCore::DynamicNodeListCacheBase::invalidateIdNameCacheMaps):
3324         * dom/DynamicNodeList.h:
3325         (WebCore::DynamicNodeListCacheBase::invalidateCache):
3326         (DynamicNodeListCacheBase):
3327         * dom/ElementRareData.h:
3328         (WebCore::ElementRareData::clearHTMLCollectionCaches):
3329         * html/HTMLCollection.cpp:
3330         (WebCore::invalidationTypeExcludingIdAndNameAttributes):
3331
3332 2012-11-20  Adam Klein  <adamk@chromium.org>
3333
3334         [v8] Avoid unnecessary call to ToObject() in Callback constructors
3335         https://bugs.webkit.org/show_bug.cgi?id=102831
3336
3337         Reviewed by Adam Barth.
3338
3339         The code already asserted that the argument was an object, so calling
3340         ToObject() is unnecessary: a simple Cast() suffices.
3341
3342         * bindings/scripts/CodeGeneratorV8.pm:
3343         (GenerateCallbackHeader):
3344         * bindings/scripts/test/V8/V8TestCallback.h:
3345         (WebCore::V8TestCallback::create):
3346
3347 2012-11-20  Brent Fulgham  <bfulgham@webkit.org>
3348
3349         [WinCairo] Build fix after r135316
3350
3351         * platform/network/curl/AuthenticationChallenge.h: Update stub
3352           implementations to match Apple Windows port.
3353         (WebCore::AuthenticationChallenge::AuthenticationChallenge): Add
3354           missing identifier argument.
3355         (WebCore::AuthenticationChallenge::setAuthenticationClient): Supply
3356           missing set method.
3357
3358 2012-11-20  Tony Chang  <tony@chromium.org>
3359
3360         When calling DocumentStyleSheetCollection::addUserSheet, pass in a user sheet
3361         https://bugs.webkit.org/show_bug.cgi?id=102835
3362
3363         Reviewed by Ojan Vafai.
3364
3365         After r135082, Chromium browser_tests were triggering the ASSERT in
3366         StyleResolver::collectRulesFromUserStyleSheets. Add an ASSERT that will
3367         trigger earlier and make it clear in the Chromium code that we're always
3368         inserting user level styles.
3369
3370         No new tests, no behavior change except no longer triggering the StyleResolver ASSERT
3371         in Chromium browser_tests.
3372
3373         * dom/DocumentStyleSheetCollection.cpp:
3374         (WebCore::DocumentStyleSheetCollection::addUserSheet):
3375
3376 2012-11-20  Bear Travis  <betravis@adobe.com>
3377
3378         [CSS Exclusions] Support outside-shape value on shape-inside
3379         https://bugs.webkit.org/show_bug.cgi?id=101108
3380
3381         Reviewed by Dirk Schulze.
3382
3383         Shape-inside can potentially be: 'auto' | 'outside-shape' | <shape> | <url>.
3384         Webkit currently supports the value 'auto' (null) and <shape> (a BasicShape*).
3385         This patch adds support for the value 'outside-shape.' It adds the ExclusionShapeValue
3386         class, which may be any of the three values: 'auto', 'outside-shape', or <shape>.
3387         Bug 102738 tracks adding <url> support.
3388
3389         Modifying existing tests:
3390         LayoutTests/fast/exclusions/parsing-wrap-shape-inside.html
3391         LayoutTests/fast/exclusions/parsing-wrap-shape-outside.html
3392
3393         * GNUmakefile.list.am: Adding ExclusionShapeValue.h to the build files.
3394         * Target.pri: Ditto.
3395         * WebCore.gypi: Ditto.
3396         * WebCore.vcproj/WebCore.vcproj: Ditto.
3397         * WebCore.xcodeproj/project.pbxproj: Ditto.
3398         (WebCore):
3399         * css/CSSComputedStyleDeclaration.cpp:
3400         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Modifying code to use
3401         ExclusionShapeValue* rather than the previous BasicShape* values.
3402         * css/CSSParser.cpp:
3403         (WebCore::CSSParser::parseValue): Handle the outside-shape value.
3404         * css/CSSValueKeywords.in: Adding outside-shape value.
3405         * css/StyleBuilder.cpp:
3406         (WebCore):
3407         (WebCore::ApplyPropertyExclusionShape::setValue): Modify code to use
3408         ExclusionShapeValue* rather than BasicShape*.
3409         (WebCore::ApplyPropertyExclusionShape::applyValue): Ditto.
3410         (WebCore::ApplyPropertyExclusionShape::createHandler): Ditto.
3411         * page/animation/CSSPropertyAnimation.cpp: Ditto.
3412         (WebCore::blendFunc): Ditto.
3413         (WebCore::PropertyWrapperExclusionShape::PropertyWrapperExclusionShape): Ditto.
3414         (WebCore::CSSPropertyAnimation::ensurePropertyMap): Ditto.
3415         * rendering/ExclusionShapeInsideInfo.cpp:
3416         (WebCore::ExclusionShapeInsideInfo::isExclusionShapeInsideInfoEnabledForRenderBlock):
3417         Ditto.
3418         (WebCore::ExclusionShapeInsideInfo::computeShapeSize): Ditto.
3419         * rendering/RenderBlock.cpp:
3420         (WebCore::RenderBlock::updateExclusionShapeInsideInfoAfterStyleChange): Ditto.
3421         * rendering/RenderBlock.h:
3422         (RenderBlock):
3423         * rendering/style/ExclusionShapeValue.h: Added.
3424         (WebCore):
3425         (ExclusionShapeValue): New type to represent the possible values of shape-inside
3426         and shape-outside. Only shape-inside can have a value of 'outside-shape.'
3427         (WebCore::ExclusionShapeValue::~ExclusionShapeValue):
3428         (WebCore::ExclusionShapeValue::type): Returns the value type.
3429         (WebCore::ExclusionShapeValue::shape): Returns <shape> value's BasicShape*.
3430         (WebCore::ExclusionShapeValue::operator==):
3431         (WebCore::ExclusionShapeInfo::createShapeValue):
3432         (WebCore::ExclusionShapeInfo::createOutsideValue):
3433         (WebCore::ExclusionShapeValue::ExclusionShapeValue):
3434         * rendering/style/RenderStyle.h:
3435         * rendering/style/StyleRareNonInheritedData.h:
3436         (StyleRareNonInheritedData):
3437
3438 2012-11-20  Alpha Lam  <hclam@chromium.org>
3439
3440         [chromium] Make lazy image decoding thread-safe
3441         https://bugs.webkit.org/show_bug.cgi?id=102721
3442
3443         Reviewed by Stephen White.
3444
3445         Added mutex to LazyDecodingPixelRef such that there is no parallel
3446         onLockPixels() running on multiple threads.
3447
3448         Added mutex to ImageFrameGenerator to protect the use of raw image
3449         data.
3450
3451         The result is that we can decode on threads other than the main
3452         thread while data is being supplied on the main thread.
3453
3454         New unit test:
3455         DeferredImageDecoderTest.decodeOnOtherThread
3456
3457         * platform/graphics/chromium/ImageFrameGenerator.cpp:
3458         (WebCore::ImageFrameGenerator::setData):
3459         (WebCore::ImageFrameGenerator::decodeAndScale):
3460         * platform/graphics/chromium/ImageFrameGenerator.h:
3461         (ImageFrameGenerator):
3462         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
3463         (WebCore::LazyDecodingPixelRef::onLockPixels):
3464         (WebCore::LazyDecodingPixelRef::onUnlockPixels):
3465         * platform/graphics/chromium/LazyDecodingPixelRef.h:
3466         (LazyDecodingPixelRef):
3467
3468 2012-11-20  Brent Fulgham  <bfulgham@webkit.org>
3469
3470         [Qt] Build fix after r135217.
3471         https://bugs.webkit.org/show_bug.cgi?id=102787
3472
3473         * platform/win/WindowsExtras.h: Add #undef of NOSHLWAPI to
3474         allow include of <ObjBase.h> needed by Qt build.
3475
3476 2012-11-20  Sheriff Bot  <webkit.review.bot@gmail.com>
3477
3478         Unreviewed, rolling out r135295.
3479         http://trac.webkit.org/changeset/135295
3480         https://bugs.webkit.org/show_bug.cgi?id=102834
3481
3482         This patch causes assertion to some layout tests on chromium
3483         (Requested by jianli on #webkit).
3484
3485         * CMakeLists.txt:
3486         * GNUmakefile.list.am:
3487         * Target.pri:
3488         * WebCore.exp.in:
3489         * WebCore.gypi:
3490         * WebCore.vcproj/WebCore.vcproj:
3491         * WebCore.xcodeproj/project.pbxproj:
3492         * loader/FrameLoadRequest.cpp: Removed.
3493         * loader/FrameLoadRequest.h:
3494         (WebCore::FrameLoadRequest::FrameLoadRequest):
3495         (FrameLoadRequest):