fde610f180e168ac56e6ac793e389518cb14d287
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-11-15  Erik Arvidsson  <arv@chromium.org>
2
3         Update DOMException name: ValidationError
4         https://bugs.webkit.org/show_bug.cgi?id=102416
5
6         Reviewed by Kentaro Hara.
7
8         Patch 16 of 25 to update DOMException name to match the spec and Firefox.
9
10         VALIDATION_ERR is historical and not used in any spec or our code.
11
12         * dom/DOMCoreException.cpp:
13         * dom/ExceptionCode.h:
14
15 2012-11-15  Kentaro Hara  <haraken@chromium.org>
16
17         [V8] Remove IsSubType() from CodeGeneratorV8.pm
18         https://bugs.webkit.org/show_bug.cgi?id=102348
19
20         Reviewed by Adam Barth.
21
22         CodeGenerator.pm has IsStrictSubType(). CodeGeneratorV8.pm should use it.
23
24         No tests. No change in behavior.
25
26         * bindings/scripts/CodeGenerator.pm:
27         (IsSubType):
28         * bindings/scripts/CodeGeneratorJS.pm:
29         (GenerateImplementation):
30         * bindings/scripts/CodeGeneratorV8.pm:
31         (GenerateHeader):
32         (GetInternalFields):
33         (GenerateNormalAttrGetter):
34         (GenerateNormalAttrSetter):
35         (GenerateFunctionCallback):
36         (GenerateImplementationIndexer):
37         (GenerateToV8Converters):
38
39 2012-11-15  Erik Arvidsson  <arv@chromium.org>
40
41         Update DOMException name: NamespaceError
42         https://bugs.webkit.org/show_bug.cgi?id=102395
43
44         Reviewed by Kentaro Hara.
45
46         Patch 14 of 25 to update DOMException name to match the spec and Firefox.
47
48         Updated existing tests.
49
50         * dom/DOMCoreException.cpp:
51
52 2012-11-15  Tien-Ren Chen  <trchen@chromium.org>
53
54         Add Settings to disable custom scrollbars on main frame
55         https://bugs.webkit.org/show_bug.cgi?id=102323
56
57         Reviewed by Adam Barth.
58
59         Custom scrollbars on main frame don't really work well on touch devices.
60         Add a setting to inhibit their creation.
61
62         No new tests. No change in default layout behavior.
63
64         * page/FrameView.cpp:
65         (WebCore::FrameView::createScrollbar):
66         * page/Settings.in:
67
68 2012-11-15  Rick Byers  <rbyers@chromium.org>
69
70         custom CSS cursors ignore hotspot values embedded in CUR files
71         https://bugs.webkit.org/show_bug.cgi?id=100059
72
73         Reviewed by Kenneth Russell.
74
75         Add reading the hotspot values to the ICOImageDecoder (for CUR files only),
76         and plumb it through so that the existing calls to ImageSource::getHotSpot
77         actually return the hot spot value when there is one.
78
79         Tests: fast/events/mouse-cursor.html, fast/events/mouse-cursor-multiframecur.html
80
81         * platform/graphics/ImageSource.cpp:
82         (WebCore::ImageSource::getHotSpot):
83         * platform/graphics/chromium/DeferredImageDecoder.cpp:
84         (WebCore::DeferredImageDecoder::hotSpot):
85         (WebCore::DeferredImageDecoder::hotSpotAtIndex):
86         * platform/graphics/chromium/DeferredImageDecoder.h:
87         (DeferredImageDecoder):
88         * platform/image-decoders/ImageDecoder.h:
89         (WebCore::ImageDecoder::hotSpot):
90         (WebCore::ImageDecoder::hotSpotAtIndex):
91         (ImageDecoder):
92         * platform/image-decoders/ico/ICOImageDecoder.cpp:
93         (WebCore::ICOImageDecoder::hotSpot):
94         (WebCore::ICOImageDecoder::hotSpotAtIndex):
95         (WebCore::ICOImageDecoder::processDirectory):
96         (WebCore::ICOImageDecoder::readDirectoryEntry):
97         * platform/image-decoders/ico/ICOImageDecoder.h:
98         (ICOImageDecoder):
99         (IconDirectoryEntry):
100
101 2012-11-15  Kenichi Ishibashi  <bashi@chromium.org>
102
103         Make OpenTypeVerticalData be ref-counted
104         https://bugs.webkit.org/show_bug.cgi?id=101971
105
106         Reviewed by Tony Chang.
107
108         FontCache::purgeInactiveFontData() uses mark & sweep algorithm to remove unused
109         OpenTypeVerticalData objects. It marks only OpenTypeVerticalData which can be reached
110         via SimpleFontData in gFontDataCache. However, OpenTypeVerticalData can be referred by
111         SimpleFontData which resides in CSSFontFaceSource::m_fontDataTable so the algorithm can
112         delete active OpenTypeVerticalData. To avoid deleting active OpenTypeVerticalData, make
113         it be ref-counted.
114
115         No new tests. No changes in behavior. Checked manually that the use-after-free was fixed.
116
117         * platform/graphics/FontCache.cpp:
118         (WebCore): Use RefPtr instead of OwnPtr for FontVerticalDataCache.
119         (WebCore::FontCache::getVerticalData): Return PassRefPtr<OpenTypeVerticalData>.
120         (WebCore::FontCache::purgeInactiveFontData): Follow the change of OwnPtr -> RefPtr.
121         * platform/graphics/FontCache.h:
122         * platform/graphics/SimpleFontData.cpp:
123         (WebCore::SimpleFontData::SimpleFontData):
124         * platform/graphics/SimpleFontData.h:
125         Use RefPtr instead of raw const pointer for OpenTypeVerticalData.
126         (WebCore::SimpleFontData::verticalData):
127         * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
128         (WebCore::FontPlatformData::verticalData): Return PassRefPtr<OpenTypeVerticalData>.
129         * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
130         (FontPlatformData):
131         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
132         (WebCore::FontPlatformData::verticalData): Ditto.
133         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
134         (WebCore):
135         (FontPlatformData):
136         * platform/graphics/opentype/OpenTypeVerticalData.h:
137         (WebCore::OpenTypeVerticalData::create): Added.
138         (OpenTypeVerticalData):
139
140 2012-11-15  Xingnan Wang  <xingnan.wang@intel.com>
141
142         Optimize the multiply-add in Biquad.cpp::process
143         https://bugs.webkit.org/show_bug.cgi?id=75528
144
145         Reviewed by Brent Fulgham.
146
147         Pipeline the multiply-add with SSE2 intrinsics.
148         Get ~45% performance improvement for the function.
149
150         * platform/audio/Biquad.cpp:
151         (WebCore::Biquad::process):
152
153 2012-11-15  Alec Flett  <alecflett@chromium.org>
154
155         Add tests for explicit serialization values
156         https://bugs.webkit.org/show_bug.cgi?id=96818
157
158         Reviewed by Adam Barth.
159
160         Expose direct access to the serialization/deserialization mechanisms
161         of SerializedScriptValue to DumpRenderTree.
162
163         * testing/Internals.cpp:
164         (WebCore::Internals::serializeObject):
165         (WebCore):
166         (WebCore::Internals::deserializeBuffer):
167         * testing/Internals.h:
168         (WebCore):
169         * testing/Internals.idl:
170
171 2012-11-15  Gustavo Noronha Silva  <gns@gnome.org>
172
173         [GTK] Split WebCore/platform into a separate library
174         https://bugs.webkit.org/show_bug.cgi?id=94435
175
176         Reviewed by Martin Robinson.
177
178         More people have been reporting problems when linking WebCore because
179         the command line limit is being exceeded. Splitting WebCore a bit more
180         is in order.
181
182         * GNUmakefile.am: add new libWebCorePlatform convenience library.
183         * GNUmakefile.list.am: move list of platform/* files to its own variable.
184
185 2012-11-15  Luke Macpherson   <macpherson@chromium.org>
186
187         Remove unused macro HANDLE_INHERIT_AND_INITIAL_WITH_VALUE in StyleResolver.cpp
188         https://bugs.webkit.org/show_bug.cgi?id=102036
189
190         Reviewed by Darin Adler.
191
192         Remove HANDLE_INHERIT_AND_INITIAL_WITH_VALUE macro, as it is not used anywhere.
193
194         No tests added because code is unused, and compile is enough to verify that conculsively.
195
196         * css/StyleResolver.cpp:
197
198 2012-11-15  Erik Arvidsson  <arv@chromium.org>
199
200         Update DOMException name: SyntaxError
201         https://bugs.webkit.org/show_bug.cgi?id=102279
202
203         Reviewed by Kentaro Hara.
204
205         Patch 12 of 25 to update DOMException name to match the spec and Firefox.
206
207         Updated existing tests.
208
209         * dom/DOMCoreException.cpp:
210
211 2012-11-15  Takashi Sakamoto  <tasak@google.com>
212
213         [Win] key event's location does not work on Windows platform.
214         https://bugs.webkit.org/show_bug.cgi?id=89742
215
216         Reviewed by Brent Fulgham.
217
218         As WM_KEYDOWN, WM_KEYUP, WM_SYSKEYDOWN, and WM_SYSKEYUP doesn't
219         directly provide a virtual keycode which distinguish between left-hand
220         and right-hand keys. To obtain a virtual keycode, we have to look at
221         lparam, i.e. scancode and extended key bit. So if the given virtual
222         keycode is control, shift, or menu, use MapVirtualKey with scancode and
223         extended key bit and recreate a virtual keycode which distinguishes
224         between left-hand and right-hand.
225
226         No new tests, because left-hand keys, right-hand keys layout tests
227         have been already added.
228
229         * platform/win/KeyEventWin.cpp:
230         (WebCore::windowsKeycodeWithLocation):
231         Use wparam and lparam to recreate a virtual keycode which distinguishes
232         between left-hand and right-hand if the given wparam (=virtual keycode)
233         is control, shift, or menu.
234         (WebCore):
235         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
236         Use the newly added function to obtain windows virtual keycode.
237
238 2012-11-15  Joe Mason  <jmason@rim.com>
239
240         [BlackBerry] Don't assert when notifyAuthReceived is called with a different auth type
241         https://bugs.webkit.org/show_bug.cgi?id=102436
242
243         Reviewed by Rob Buis.
244
245         The server type could change if we contact a site taking HTTP auth, through an HTTP proxy
246         taking auth of its own. First we get a 407 from the proxy, and then when get past the
247         proxy, we get a 401 from the end site - so notifyAuthReceived gets called again with auth
248         type Proxy instead of HTTP.
249
250         The correct thing to do when that happens is skip the "update the auth type in the
251         credentials" step, since these are actually new credentials and not just credentials being
252         reused for a different auth type on the same server.
253
254         PR 241637
255
256         * platform/network/blackberry/NetworkJob.cpp:
257         (WebCore::NetworkJob::notifyAuthReceived):
258
259 2012-11-15  Stephen Chenney  <schenney@chromium.org>
260
261         mpath elements do not clear resource lists before destruction
262         https://bugs.webkit.org/show_bug.cgi?id=101505
263
264         Reviewed by Abhishek Arya.
265
266         The destructor for SVGMPathElement should clear its resources before
267         deletion, so as not to leave hanging pointers in resource lists.
268
269         Test: svg/animations/mpath-remove-from-dependents-on-delete-crash.html
270
271         * svg/SVGMPathElement.cpp:
272         (WebCore::SVGMPathElement::~SVGMPathElement): Add destructor that calls clearResourceReferences.
273         (WebCore):
274         * svg/SVGMPathElement.h:
275         (SVGMPathElement): Add destructor.
276
277 2012-11-15  Kentaro Hara  <haraken@chromium.org>
278
279         Remove CodeGenerator::StripModule
280         https://bugs.webkit.org/show_bug.cgi?id=102338
281
282         Reviewed by Adam Barth.
283
284         Now WebKit IDL files have no modules. (The Web IDL spec has no modules.)
285         We can remove CodeGenerator::StripModule.
286         This might break some internal builds if the internal builds are still
287         using modules. Ping haraken@ you observe it.
288
289         No tests. No change in behavior.
290
291         * bindings/scripts/CodeGenerator.pm:
292         (ForAllParents):
293         (AttributeNameForGetterAndSetter):
294         (IsStrictSubtype):
295         * bindings/scripts/CodeGeneratorCPP.pm:
296         (GetClassName):
297         (GetImplClassName):
298         (GetParentImplClassName):
299         (GetParent):
300         (ConversionNeeded):
301         (GetCPPTypeGetter):
302         (AddForwardDeclarationsForType):
303         (AddIncludesForType):
304         (GenerateImplementation):
305         * bindings/scripts/CodeGeneratorGObject.pm:
306         (GetParentClassName):
307         (GetParentGObjType):
308         (GetClassName):
309         * bindings/scripts/CodeGeneratorJS.pm:
310         (GetParentClassName):
311         (AddIncludesForTypeInImpl):
312         (AddIncludesForTypeInHeader):
313         (GenerateParametersCheckExpression):
314         (GenerateImplementation):
315         (GenerateParametersCheck):
316         (GetNativeTypeFromSignature):
317         (JSValueToNative):
318         (NativeToJSValue):
319         * bindings/scripts/CodeGeneratorObjC.pm:
320         (GetClassName):
321         (GetImplClassName):
322         (GetParentImplClassName):
323         (GetParentAndProtocols):
324         (GetPropertyAttributes):
325         (ConversionNeeded):
326         (GetObjCTypeGetter):
327         (AddForwardDeclarationsForType):
328         (AddIncludesForType):
329         (GenerateImplementation):
330         * bindings/scripts/CodeGeneratorV8.pm:
331         (AddIncludesForType):
332         (GenerateHeader):
333         (IsSubType):
334         (GenerateSingleBatchedAttribute):
335         (GenerateImplementation):
336         (BaseInterfaceName):
337         (GetTypeFromSignature):
338         (IsWrapperType):
339
340 2012-11-15  Luke Macpherson   <macpherson@chromium.org>
341
342         Make assumptions about m_parentStyle consistent within StyleResolver::applyProperty()
343         https://bugs.webkit.org/show_bug.cgi?id=101696
344
345         Reviewed by Tony Chang.
346
347         Most of the code in StyleResolver::applyProperty assumes that isInherit implies that m_parentStyle is available.
348         This patch ASSERTs that this assumption is correct, and removes the few existing checks to maintain consistency.
349
350         No new tests / covered by all existing CSS tests.
351
352         * css/StyleResolver.cpp:
353         (WebCore::StyleResolver::applyProperty):
354
355 2012-11-15  Kentaro Hara  <haraken@chromium.org>
356
357         [V8] Remove redundant $interfaceName from function parameters
358         https://bugs.webkit.org/show_bug.cgi?id=102334
359
360         Reviewed by Adam Barth.
361
362         'sub func { my $dataNode = shift; my $interfaceName = shift; }'
363         is redundant. We can get $interfaceName by $dataNode->name.
364
365         No tests. No change in behavior.
366
367         * bindings/scripts/CodeGeneratorV8.pm:
368         (GenerateOpaqueRootForGC):
369         (GenerateHeader):
370         (GenerateConstructorGetter):
371         (GenerateNormalAttrGetter):
372         (GenerateReplaceableAttrSetter):
373         (GenerateNormalAttrSetter):
374         (GenerateOverloadedFunctionCallback):
375         (GenerateFunctionCallback):
376         (GenerateOverloadedConstructorCallback):
377         (GenerateSingleConstructorCallback):
378         (GenerateConstructorCallback):
379         (GenerateEventConstructorCallback):
380         (GenerateTypedArrayConstructorCallback):
381         (GenerateNamedConstructorCallback):
382         (GenerateBatchedAttributeData):
383         (GenerateImplementation):
384         (GenerateToV8Converters):
385         (GetNativeTypeForConversions):
386
387 2012-11-15  Simon Fraser  <simon.fraser@apple.com>
388
389         Ensure that scrollbar layers show debug borders
390         https://bugs.webkit.org/show_bug.cgi?id=102429
391
392         Reviewed by Anders Carlsson.
393
394         After r133517, scrollbar layers no longer showed debug borders, which
395         was very confusing. Fix this by explicitly calling setShowDebugBorder()
396         on the scrollbar-related layers owned by RenderLayerCompositor
397         and RenderLayerBacking.
398         
399         * rendering/RenderLayerBacking.cpp:
400         (WebCore::RenderLayerBacking::updateDebugIndicators):
401         * rendering/RenderLayerCompositor.cpp:
402         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
403         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
404
405 2012-11-15  Andreas Kling  <akling@apple.com>
406
407         ASSERTION FAILED: fastAttributeLookupAllowed(name) for 7 layout tests
408         <http://webkit.org/b/102423>
409
410         Reviewed by Anders Carlsson.
411
412         Use Element::getAttributeItem() to find out if the element has a given attribute
413         instead of fastHasAttribute() since that causes assertions for the "style" attribute.
414
415         * html/parser/HTMLConstructionSite.cpp:
416         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
417
418 2012-11-15  Erik Arvidsson  <arv@chromium.org>
419
420         Update DOMException name: DOMStringSizeError
421         https://bugs.webkit.org/show_bug.cgi?id=102089
422
423         Reviewed by Ojan Vafai.
424
425         Patch 2 of 25 to update DOMException name to match the spec and Firefox.
426
427         DOMSTRING_SIZE_ERR is historical and not used in any spec or in our code.
428
429         * dom/DOMCoreException.cpp:
430         * dom/ExceptionCode.h:
431
432 2012-11-15  Joshua Bell  <jsbell@chromium.org>
433
434         IndexedDB: Indexing tests are flaky-crashing
435         https://bugs.webkit.org/show_bug.cgi?id=102283
436
437         Reviewed by Tony Chang.
438
439         Processing the final task can cause IDBTransactionBackendImpl references to be released
440         by all holders. Prior to looping over the tasks (or, in an even earlier implementation,
441         swapping queues) control would fall off the end of the function. The loop termination
442         check introduced in http://wkrev.com/134529 requires that |this| be kept alive until
443         the method completes.
444
445         Test: storage/indexeddb/transaction-crash-in-tasks.html
446
447         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
448         (WebCore::IDBTransactionBackendImpl::abort): Rename self => protect.
449         (WebCore::IDBTransactionBackendImpl::commit): Rename self => protect.
450         (WebCore::IDBTransactionBackendImpl::taskTimerFired): New self-ref.
451
452 2012-11-15  Elliott Sprehn  <esprehn@chromium.org>
453
454         MutationObserver wrapper should not be collected while still observing
455         https://bugs.webkit.org/show_bug.cgi?id=102328
456
457         Reviewed by Adam Barth.
458
459         Make MutationObserver an ActiveDOMObject so that the wrapper is not
460         collected while it is still observing the DOM. This is needed because
461         the wrapper is passed into the callback and expandos on the wrapper
462         should be preserved.
463
464         Test: fast/mutation/observer-wrapper-dropoff.html
465
466         * bindings/js/JSMutationObserverCustom.cpp:
467         (WebCore::JSMutationObserverConstructor::constructJSMutationObserver):
468         * bindings/v8/custom/V8MutationObserverCustom.cpp:
469         (WebCore::V8MutationObserver::constructorCallback):
470         * dom/MutationObserver.cpp:
471         (WebCore::MutationObserver::create):
472         (WebCore::MutationObserver::MutationObserver):
473         (WebCore::MutationObserver::observationStarted):
474         (WebCore::MutationObserver::observationEnded):
475         * dom/MutationObserver.h:
476         (WebCore):
477         * dom/MutationObserver.idl:
478
479 2012-11-15  Tony Chang  <tony@chromium.org>
480
481         Generate Settings from a .in file
482         https://bugs.webkit.org/show_bug.cgi?id=100393
483
484         Reviewed by Adam Barth.
485
486         Generate most settings from an .in file to reduce human mistakes and
487         to make it easier to add/remove new settings.
488
489         I only moved settings that are easy to move at this point.  There are many more that
490         have some minor naming inconsistencies that we can also move to Settings.in, but I'll
491         do that in a follow up patch.
492
493         This doesn't generate SettingInternals.* yet-- we can do that in a follow up patch.
494
495         No new tests, this is a refactor.
496
497         * CMakeLists.txt:
498         * DerivedSources.make: Run make_settings.pl.
499         * DerivedSources.pri: Run make_settings.pl.
500         * GNUmakefile.am: Run make_settings.pl.
501         * GNUmakefile.list.am:
502         * WebCore.exp.in: Remove functions that are now inline in the header.
503         * WebCore.gyp/WebCore.gyp: Run action_makenames.py, which will run make_settings.pl.
504         * WebCore.gyp/scripts/action_makenames.py:
505         (main): Allow make_settings.pl.
506         * WebCore.order: Remove functions that are now inline in the header.
507         * html/ValidationMessage.cpp:
508         (WebCore::ValidationMessage::setMessageDOMAndStartTimer): Fix a typo in "magnification".
509         * page/Settings.cpp:
510         (WebCore::Settings::Settings): Replace generated settings with SETTINGS_INITIALIZER_LIST.
511         * page/Settings.h:
512         (Settings): Replace generated settings with SETTINGS_GETTERS_AND_SETTERS and SETTINGS_MEMBER_VARIABLES.
513         * page/Settings.in: Added.
514         * page/make_settings.pl: Added.
515         (defaultItemFactory):
516         (generateCode):
517         (generateHeader): Use a similar model as make_names.pl.
518         (printConditionalMacros):
519         (printGettersAndSetters):
520         (printMemberVariables):
521         (printGetterAndSetter):
522         (printInitializerList):
523         (printInitializer):
524
525 2012-11-15  Alpha Lam  <hclam@chromium.org>
526
527         [chromium] Refactoring to move logic of creating lazy decoded SkBitmap into DeferredImageDecoder
528         https://bugs.webkit.org/show_bug.cgi?id=102019
529
530         Reviewed by Stephen White.
531
532         Goal of this change is to keep ImageDecodingStore clean and only do
533         image caching. Logic of creating lazily decoded SkBitmaps is moved into
534         DeferredImageDecoder.
535
536         In particular these two methods are moved:
537         - ImageDecodingStore::createLazyDecodedSkBitmap
538         - ImageDecodingStore::resizeLazyDecodedSkBitmap
539
540         No new tests. There is no new code (really). It is just moved from
541         ImageDecodingStore to DeferredImageDecoder.
542
543         No change in behavior. Code is tested with:
544         Unit tests: webkit_unit_tests
545         Layout test: platform/chromium/virtual/deferred
546
547         * platform/graphics/chromium/DeferredImageDecoder.cpp:
548         (WebCore::DeferredImageDecoder::isLazyDecoded):
549         (WebCore):
550         (WebCore::DeferredImageDecoder::resizeLazyDecodedSkBitmap):
551         (WebCore::DeferredImageDecoder::frameBufferAtIndex):
552         (WebCore::DeferredImageDecoder::setData):
553         (WebCore::DeferredImageDecoder::createLazyDecodedSkBitmap):
554         * platform/graphics/chromium/DeferredImageDecoder.h:
555         (WebCore):
556         (DeferredImageDecoder):
557         * platform/graphics/chromium/ImageDecodingStore.cpp:
558         * platform/graphics/chromium/ImageDecodingStore.h:
559         (ImageDecodingStore):
560         * platform/graphics/chromium/ImageFrameGenerator.cpp:
561         (WebCore::ImageFrameGenerator::ImageFrameGenerator):
562         * platform/graphics/chromium/ImageFrameGenerator.h:
563         (WebCore::ImageFrameGenerator::create):
564         (ImageFrameGenerator):
565         * platform/graphics/skia/NativeImageSkia.cpp:
566         (WebCore::NativeImageSkia::resizedBitmap):
567
568 2012-11-15  Roger Fong  <roger_fong@apple.com>
569
570         Unreviewed. Build fix for Windows after r134767.
571
572         Update vsprops and vcproj files to reflect changes to file locations in r134767.
573
574         * WebCore.vcproj/WebCore.vcproj:
575         * WebCore.vcproj/WebCoreCommon.vsprops:
576
577 2012-11-15  Elliott Sprehn  <esprehn@chromium.org>
578
579         Track subframe count to avoid traversing the tree when there's no subframes
580         https://bugs.webkit.org/show_bug.cgi?id=101821
581
582         Reviewed by Ojan Vafai.
583
584         Bug 101619 showed a 9-14% improvement from not walking the children during
585         removeChild looking for frames when there's known to be no frames. The fix
586         in that bug only avoids this walk when the whole document has no frames, this
587         patch extends it to skip traversing subtrees that have no iframes by hooking
588         the frame assignment to walk up the tree and keep track of the count of frames
589         in the subtree on contentFrame assignment and then decrement it on disconnect.
590
591         No new tests, this is just a perf refactor.
592
593         * dom/ContainerNode.cpp:
594         (WebCore::willRemoveChildren):
595         * dom/ContainerNodeAlgorithms.cpp:
596         (WebCore::ChildFrameDisconnector::collectFrameOwners):
597         * dom/ContainerNodeAlgorithms.h:
598         (WebCore::ChildFrameDisconnector::ChildFrameDisconnector):
599         (ChildFrameDisconnector):
600         (WebCore::ChildFrameDisconnector::collectFrameOwners):
601           Renamed from collectDescendant() to better reflect what it really does.
602         (WebCore::ChildFrameDisconnector::disconnectCollectedFrameOwners):
603           Renamed from disconnect() to better reflect what it really does.
604         (WebCore::ChildFrameDisconnector::disconnect):
605           New method that does the collection of frame owners on either the root
606           or only it's descendants.
607         * dom/Node.cpp:
608         (WebCore::Node::connectedSubframeCount):
609         (WebCore::Node::incrementConnectedSubframeCount):
610         (WebCore::Node::decrementConnectedSubframeCount):
611         * dom/Node.h:
612         * dom/NodeRareData.h:
613         (WebCore::NodeRareData::NodeRareData):
614         (WebCore::NodeRareData::connectedSubframeCount):
615         (WebCore::NodeRareData::incrementConnectedSubframeCount):
616         (WebCore::NodeRareData::decrementConnectedSubframeCount):
617         * html/HTMLFrameOwnerElement.cpp:
618         (WebCore::HTMLFrameOwnerElement::setContentFrame):
619         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
620
621 2012-11-15  Alpha Lam  <hclam@chromium.org>
622
623         [chromium] WebGL texImage2D fails with deferred image decoding
624         https://bugs.webkit.org/show_bug.cgi?id=102310
625
626         Reviewed by Kenneth Russell.
627
628         Skia's implementation of GraphicsContext3D::getImageData() uses ImageSource
629         to decode an image. When deferred image decoding is enabled this class
630         generates an ImageFrame marked as incomplete, which WebGL rejects. This results
631         in failing of texImage2D.
632
633         This change uses ImageDecoder directly instead of ImageSource. This skips
634         the code path of deferred image decoding. This behavior is correct because
635         GraphicsContext3D wants to decode the image differently with alpha not
636         premultiplied and color profile applied optionally.
637
638         Added a test to prove this change fixed the bug.
639
640         Test: fast/images/webgl-teximage2d.html
641
642         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
643         (WebCore::GraphicsContext3D::getImageData):
644
645 2012-11-15  Jer Noble  <jer.noble@apple.com>
646
647         Further unreviewed build fix. Add explicit static_casts to avoid implicit precision warnings.
648
649         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
650         (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource):
651
652 2012-11-15  Jer Noble  <jer.noble@apple.com>
653
654         Unreviewed build fix. Avoid implicit precision and unused parameter warnings.
655
656         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
657         (WebCore::WebCoreAVFResourceLoader::responseReceived):
658         (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource):
659
660 2012-11-15  Adam Barth  <abarth@webkit.org>
661
662         [V8] We shouldn't call deprecated V8 APIs
663         https://bugs.webkit.org/show_bug.cgi?id=102407
664
665         Reviewed by Eric Seidel.
666
667         This patch was written by Sven Panne on the V8 team. He would prefer
668         that we not call deprecated V8 APIs. This patch updates these call
669         sites to more modern idioms.
670
671         * bindings/scripts/CodeGeneratorV8.pm:
672         (GenerateConstructorGetter):
673         (GenerateImplementation):
674         * bindings/scripts/test/V8/V8TestObj.cpp:
675         (WebCore::TestObjV8Internal::TestObjConstructorGetter):
676         * bindings/v8/PageScriptDebugServer.cpp:
677         (WebCore::PageScriptDebugServer::addListener):
678         * bindings/v8/ScriptController.cpp:
679         (WebCore::ScriptController::setContextDebugId):
680         (WebCore::ScriptController::contextDebugId):
681         * bindings/v8/ScriptProfiler.cpp:
682         (WebCore::ScriptProfiler::objectByHeapObjectId):
683             - This code doesn't seem to do anything anymore.
684         * bindings/v8/V8DOMConfiguration.h:
685         (WebCore::V8DOMConfiguration::configureAttribute):
686         * bindings/v8/V8DOMWindowShell.cpp:
687         (WebCore::setInjectedScriptContextDebugId):
688         * bindings/v8/V8DOMWrapper.cpp:
689         (WebCore::V8DOMWrapper::maybeDOMWrapper):
690         (WebCore::V8DOMWrapper::isWrapperOfType):
691         * bindings/v8/V8EventListenerList.h:
692         (WebCore::V8EventListenerList::doFindWrapper):
693         (WebCore::V8EventListenerList::findOrCreateWrapper):
694         * bindings/v8/WorkerContextExecutionProxy.cpp:
695         (WebCore::WorkerContextExecutionProxy::initializeIfNeeded):
696         * bindings/v8/WrapperTypeInfo.h:
697         (WebCore::WrapperTypeInfo::unwrap):
698
699 2012-11-15  Sheriff Bot  <webkit.review.bot@gmail.com>
700
701         Unreviewed, rolling out r134800 and r134805.
702         http://trac.webkit.org/changeset/134800
703         http://trac.webkit.org/changeset/134805
704         https://bugs.webkit.org/show_bug.cgi?id=102417
705
706         This patch broke chromium port (Requested by jianli on
707         #webkit).
708
709         * Modules/mediastream/RTCPeerConnection.cpp:
710         (WebCore::RTCPeerConnection::RTCPeerConnection):
711         (WebCore::RTCPeerConnection::createOffer):
712         (WebCore::RTCPeerConnection::createAnswer):
713         (WebCore::RTCPeerConnection::setLocalDescription):
714         (WebCore::RTCPeerConnection::localDescription):
715         (WebCore::RTCPeerConnection::setRemoteDescription):
716         (WebCore::RTCPeerConnection::remoteDescription):
717         (WebCore::RTCPeerConnection::updateIce):
718         (WebCore::RTCPeerConnection::addIceCandidate):
719         (WebCore::RTCPeerConnection::readyState):
720         (WebCore::RTCPeerConnection::iceState):
721         (WebCore::RTCPeerConnection::addStream):
722         (WebCore::RTCPeerConnection::close):
723         (WebCore::RTCPeerConnection::stop):
724         (WebCore::RTCPeerConnection::changeReadyState):
725         (WebCore::RTCPeerConnection::scheduledEventTimerFired):
726         * Modules/mediastream/RTCPeerConnection.h:
727         (RTCPeerConnection):
728         * Modules/mediastream/RTCPeerConnection.idl:
729         * dom/EventNames.h:
730         (WebCore):
731         * platform/mediastream/RTCDataChannelDescriptor.cpp:
732         (WebCore::RTCDataChannelDescriptor::RTCDataChannelDescriptor):
733         (WebCore::RTCDataChannelDescriptor::readyStateChanged):
734         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
735         (RTCPeerConnectionHandlerClient):
736         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
737         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
738         (RTCPeerConnectionHandlerChromium):
739
740 2012-11-15  Elliott Sprehn  <esprehn@chromium.org>
741
742         Remove Node::aboutToUnload and be more explicit about what it was for
743         https://bugs.webkit.org/show_bug.cgi?id=102357
744
745         Reviewed by Ryosuke Niwa.
746
747         Node::aboutToUnload was confusingly named because it was only called on
748         the focused node, and it really only existed to support notifying the
749         embedder that inputs should stop being editable on unload. Instead add
750         a new method to HTMLInputElement that ends editing and call that
751         explicitly in the FrameLoader so it's clear what this is about.
752
753         No new tests, this is just a refactoring.
754
755         * dom/Node.h:
756         * html/HTMLInputElement.cpp:
757         (WebCore::HTMLInputElement::endEditing):
758             New method that handles finishing editing.
759         * html/HTMLInputElement.h:
760         (HTMLInputElement):
761         * html/TextFieldInputType.cpp:
762         (WebCore::TextFieldInputType::handleBlurEvent):
763             Use the new method to reduce code duplication.
764         * loader/FrameLoader.cpp:
765         (WebCore::FrameLoader::stopLoading):
766             Be explicit about what this check was for.
767
768 2012-11-15  Tommy Widenflycht  <tommyw@google.com>
769
770         [chromium] MediaStream API: Add missing WebRTCPeerConnectionHandlerClient::didAddRemoteDataChannel
771         https://bugs.webkit.org/show_bug.cgi?id=102386
772
773         Reviewed by Adam Barth.
774
775         Existing tests expanded to cover patch.
776
777         * platform/mediastream/RTCDataChannelDescriptor.cpp:
778         (WebCore::RTCDataChannelDescriptor::RTCDataChannelDescriptor):
779         (WebCore::RTCDataChannelDescriptor::readyStateChanged):
780         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
781         (WebCore::RTCPeerConnectionHandlerChromium::didAddRemoteDataChannel):
782         (WebCore):
783         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
784         (WebKit):
785         (RTCPeerConnectionHandlerChromium):
786
787 2012-11-15  Rick Byers  <rbyers@chromium.org>
788
789         No tests for changing mouse cursors
790         https://bugs.webkit.org/show_bug.cgi?id=100550
791
792         Reviewed by Brent Fulgham.
793
794         Add infrastructure to keep track of the last set mouse cursor,
795         and then to query it from DumpRenderTree.  Also adds ASSERTs to help ensure
796         we can reliably detect when an uninitialized Cursor object is used (such as
797         the one that can be returned from OptionalCursor in the NoCursorChange scenario).
798
799         Test: fast/events/mouse-cursor.html
800
801         * WebCore.exp.in: Add Cursor copy ctor export
802         * page/EventHandler.cpp:
803         (WebCore::OptionalCursor::cursor):
804         (WebCore::EventHandler::handleMouseMoveEvent): Keep track of last set mouse cursor
805         * page/EventHandler.h:
806         (WebCore::EventHandler::currentMouseCursor): New getter for last set mouse cursor
807         * platform/Cursor.h:
808         (WebCore::Cursor::Cursor): Mark uninitialized cursor types as invalid.
809         (WebCore::Cursor::type): Assert cursor type is valid.
810         * testing/Internals.cpp:
811         (WebCore::cursorTypeToString): Helper to convert cursor type to enum
812         (WebCore):
813         (WebCore::Internals::getCurrentCursorInfo): New function to return a string describing the last set mouse cursor
814         * testing/Internals.h: Declare getCurrentCursorInfo
815         * testing/Internals.idl: Declare getCurrentCursorInfo
816
817 2012-11-13  Jer Noble  <jer.noble@apple.com>
818
819         Support loading of blob URLs in AVFoundation.
820         https://bugs.webkit.org/show_bug.cgi?id=102182
821
822         Reviewed by Eric Carlson.
823
824         Add support for BLOB (and other non-natively supported schemed) URLs through the AVAssetResourceLoader API.
825
826         Test: media/video-src-blob.html
827
828         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
829         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
830         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource): Only go down the encrypted
831             media path if the key scheme is skp://.
832         (WebCore::MediaPlayerPrivateAVFoundationObjC::didCancelLoadingRequest): Added.  Cancel resource loading if
833             the media engine requests it.
834         (WebCore::MediaPlayerPrivateAVFoundationObjC::addKey): Use the new, non-deprecated API.
835         
836         Use the dispatch_main_queue() as the AVAssetResourceLoadDelegate queue now that <rdar://problem/12362461> is fixed.
837         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
838         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
839         (-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
840         (-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]):
841
842         Add a new helper class to manage loading the CachedRawResource and feed the incoming
843         data to the AVAssetResourceLoader.
844         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h: Added.
845         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: Added.
846         (WebCore::WebCoreAVFResourceLoader::create): Simple factory.
847         (WebCore::WebCoreAVFResourceLoader::WebCoreAVFResourceLoader): Simple constructor.
848         (WebCore::WebCoreAVFResourceLoader::~WebCoreAVFResourceLoader): Simple destructor.
849         (WebCore::WebCoreAVFResourceLoader::startLoading): Tell the cachedResourceLoader to schedule loading.
850         (WebCore::WebCoreAVFResourceLoader::stopLoading): Remove this as a client of the resource.
851         (WebCore::WebCoreAVFResourceLoader::responseReceived): Fill in the contentInformation field of the 
852             AVAssetResourceLoadingRequest.
853         (WebCore::WebCoreAVFResourceLoader::dataReceived): Call fulfillRequestWithResource.
854         (WebCore::WebCoreAVFResourceLoader::notifyFinished): Tell the AVAssetResourceLoadingRequest that loading
855             has completed.
856         (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource): Fill in (if possible) the dataRequest
857             field of the AVAssetResourceLoadingRequest.
858
859         Add a MediaPlayerClient method allowing MediaPlayerPrivate subclasses to access the HTMLMediaElement's
860         document's cachedResourceLoader.
861         * html/HTMLMediaElement.cpp:
862         (WebCore::HTMLMediaElement::mediaPlayerCachedResourceLoader):
863         * html/HTMLMediaElement.h:
864         * platform/graphics/MediaPlayer.cpp:
865         (WebCore::MediaPlayer::cachedResourceLoader):
866         * platform/graphics/MediaPlayer.h:
867         (WebCore::MediaPlayerClient::mediaPlayerCachedResourceLoader):
868
869         Add a convenience method to convert from MIME type -> UTI.
870         * platform/network/mac/UTIUtilities.h:
871         * platform/network/mac/UTIUtilities.mm:
872         (WebCore::UTIFromMIMEType):
873
874         Add new files to project.
875         * WebCore.xcodeproj/project.pbxproj:
876
877 2012-11-15  Kenneth Rohde Christiansen  <kenneth@webkit.org>
878
879         Remove initiallyFitToViewport attribute
880         https://bugs.webkit.org/show_bug.cgi?id=102392
881
882         Reviewed by Noam Rosenthal.
883
884         Remove the initiallyFitToViewport which shouldn't have been
885         added in the first place. We now reset userScalable to auto (-1)
886         in case it was not explicitly set by the web author.
887
888         Same behavior, covered by existing tests.
889
890         * dom/ViewportArguments.cpp:
891         (WebCore::ViewportArguments::resolve):
892         * dom/ViewportArguments.h:
893         (ViewportAttributes):
894
895 2012-11-15  Tommy Widenflycht  <tommyw@google.com>
896
897         MediaStream API: Update RTCPeerConnection states to match the latest editors draft
898         https://bugs.webkit.org/show_bug.cgi?id=102382
899
900         Reviewed by Adam Barth.
901
902         Updating readyState & iceState, and adding iceGatheringState.
903         Also safeguarding the event timer callback.
904
905         Patch covered by existing tests.
906
907         * Modules/mediastream/RTCPeerConnection.cpp:
908         (WebCore::RTCPeerConnection::RTCPeerConnection):
909         (WebCore::RTCPeerConnection::createOffer):
910         (WebCore::RTCPeerConnection::createAnswer):
911         (WebCore::RTCPeerConnection::setLocalDescription):
912         (WebCore::RTCPeerConnection::localDescription):
913         (WebCore::RTCPeerConnection::setRemoteDescription):
914         (WebCore::RTCPeerConnection::remoteDescription):
915         (WebCore::RTCPeerConnection::updateIce):
916         (WebCore::RTCPeerConnection::addIceCandidate):
917         (WebCore::RTCPeerConnection::readyState):
918         (WebCore::RTCPeerConnection::iceGatheringState):
919         (WebCore):
920         (WebCore::RTCPeerConnection::iceState):
921         (WebCore::RTCPeerConnection::addStream):
922         (WebCore::RTCPeerConnection::close):
923         (WebCore::RTCPeerConnection::didChangeIceGatheringState):
924         (WebCore::RTCPeerConnection::stop):
925         (WebCore::RTCPeerConnection::changeReadyState):
926         (WebCore::RTCPeerConnection::scheduledEventTimerFired):
927         * Modules/mediastream/RTCPeerConnection.h:
928         (RTCPeerConnection):
929         * Modules/mediastream/RTCPeerConnection.idl:
930         * dom/EventNames.h:
931         (WebCore):
932         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
933         (RTCPeerConnectionHandlerClient):
934         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
935         (WebCore::RTCPeerConnectionHandlerChromium::didChangeICEGatheringState):
936         (WebCore):
937         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
938         (RTCPeerConnectionHandlerChromium):
939
940 2012-11-15  Sheriff Bot  <webkit.review.bot@gmail.com>
941
942         Unreviewed, rolling out r134649 and r134665.
943         http://trac.webkit.org/changeset/134649
944         http://trac.webkit.org/changeset/134665
945         https://bugs.webkit.org/show_bug.cgi?id=102413
946
947         Broke a ton of downstream chromium tests (Requested by japhet
948         on #webkit).
949
950         * loader/DocumentLoader.cpp:
951         (WebCore::DocumentLoader::DocumentLoader):
952         (WebCore::DocumentLoader::~DocumentLoader):
953         (WebCore::DocumentLoader::finishedLoading):
954         (WebCore::DocumentLoader::clearMainResourceLoader):
955         (WebCore::DocumentLoader::isLoadingInAPISense):
956         (WebCore::DocumentLoader::documentURL):
957         (WebCore::DocumentLoader::isLoadingMainResource):
958         (WebCore::DocumentLoader::startLoadingMainResource):
959         * loader/DocumentLoader.h:
960         (DocumentLoader):
961         * loader/FrameLoader.cpp:
962         (WebCore::FrameLoader::FrameLoader):
963         (WebCore::FrameLoader::init):
964         * loader/FrameLoaderStateMachine.cpp:
965         (WebCore::FrameLoaderStateMachine::FrameLoaderStateMachine):
966         * loader/FrameLoaderStateMachine.h:
967         * loader/MainResourceLoader.cpp:
968         (WebCore::shouldLoadAsEmptyDocument):
969         (WebCore):
970         (WebCore::MainResourceLoader::continueAfterContentPolicy):
971         (WebCore::MainResourceLoader::didReceiveResponse):
972         (WebCore::MainResourceLoader::didFinishLoading):
973         (WebCore::MainResourceLoader::handleEmptyLoad):
974         (WebCore::MainResourceLoader::loadNow):
975         (WebCore::MainResourceLoader::load):
976         * loader/MainResourceLoader.h:
977         (MainResourceLoader):
978
979 2012-11-15  Kentaro Hara  <haraken@chromium.org>
980
981         Correct syntax of old-style IDL files
982         https://bugs.webkit.org/show_bug.cgi?id=102335
983
984         Reviewed by Adam Barth.
985
986         Recently tasak@ corrected an IDL syntax of almost all IDL files.
987         We should correct the rest of them.
988
989         No tests. No change in behavior.
990
991         * html/canvas/OESElementIndexUint.idl:
992         * page/PerformanceMark.idl:
993         * page/PerformanceMeasure.idl:
994
995 2012-11-15  Elliott Sprehn  <esprehn@chromium.org>
996
997         Remove isHTMLInputElement since it's unused and toInputElement exists 
998         https://bugs.webkit.org/show_bug.cgi?id=102358
999
1000         Reviewed by Ojan Vafai.
1001
1002         Remove isHTMLInputElement as no one uses it. Everyone just uses
1003         Node::toInputElement and checks for a 0 return value instead.
1004
1005         toInputElement is also more reliable as there's no requirement that
1006         subclasses of HTMLInputElement have the tag name of inputTag so using
1007         this method in a check could potentially miss future subclasses with
1008         different tag names, though none exist right now.
1009
1010         No new tests, this just deletes dead code.
1011
1012         * html/HTMLInputElement.h:
1013
1014 2012-11-15  Erik Arvidsson  <arv@chromium.org>
1015
1016         Update DOMException name: NotSupportedError
1017         https://bugs.webkit.org/show_bug.cgi?id=102139
1018
1019         Reviewed by Ojan Vafai.
1020
1021         Patch 9 of 25 to update DOMException name to match the spec and Firefox.
1022
1023         Updated existing tests.
1024
1025         * dom/DOMCoreException.cpp:
1026
1027 2012-11-15  Elliott Sprehn  <esprehn@chromium.org>
1028
1029         Remove isHTMLInputElement since it's unused and toInputElement exists 
1030         https://bugs.webkit.org/show_bug.cgi?id=102358
1031
1032         Reviewed by Ojan Vafai.
1033
1034         Remove isHTMLInputElement as no one uses it. Everyone just uses
1035         Node::toInputElement and checks for a 0 return value instead.
1036
1037         toInputElement is also more reliable as there's no requirement that
1038         subclasses of HTMLInputElement have the tag name of inputTag so using
1039         this method in a check could potentially miss future subclasses with
1040         different tag names, though none exist right now.
1041
1042         No new tests, this just deletes dead code.
1043
1044         * html/HTMLInputElement.h:
1045
1046 2012-11-15  Erik Arvidsson  <arv@chromium.org>
1047
1048         Update DOMException name: NoModificationAllowedError
1049         https://bugs.webkit.org/show_bug.cgi?id=102134
1050
1051         Reviewed by Ojan Vafai.
1052
1053         Patch 7 of 25 to update DOMException name to match the spec and Firefox.
1054
1055         Updated existing tests.
1056
1057         * dom/DOMCoreException.cpp:
1058
1059 2012-11-15  Miguel Garcia  <miguelg@chromium.org>
1060
1061         Remove unnecesary dependencies INPUT_TYPE_COLOR
1062         https://bugs.webkit.org/show_bug.cgi?id=102379
1063
1064         Reviewed by Darin Adler.
1065
1066         Platforms should be able to enable INPUT_TYPE_COLOR without enabling
1067         CALENDAR_PICKER and DATALIST_ELEMENT. Before this patch however there would be
1068         compile errors in such configuration.
1069
1070         No new tests since this is not adding any extra functionality.
1071
1072         * WebCore.gyp/WebCore.gyp:
1073         * html/ColorInputType.cpp:
1074         (WebCore::ColorInputType::shouldShowSuggestions):
1075         * make-file-arrays.py:
1076         (main):
1077
1078 2012-11-15  Eric Carlson  <eric.carlson@apple.com>
1079
1080         Update computed line position algorithm
1081         https://bugs.webkit.org/show_bug.cgi?id=93779
1082
1083         Reviewed by Philippe Normand.
1084
1085         Compute the position of a text track relative to rendered tracks. This is needed to position
1086         cues correctly when there is more than one text track.
1087
1088         Test: media/track/track-cue-container-rendering-position.html
1089
1090         * html/track/TextTrack.cpp:
1091         (WebCore::TextTrack::invalidateTrackIndex): Invalidate both cached track indices.
1092         (WebCore::TextTrack::trackIndexRelativeToRenderedTracks): Return the index of the track relative
1093             to other rendered tracks.
1094         * html/track/TextTrack.h:
1095
1096         * html/track/TextTrackCue.cpp:
1097         (WebCore::TextTrackCue::calculateComputedLinePosition): Use trackIndexRelativeToRenderedTracks()
1098             instead of trackIndex() so cues are positioned correctly.
1099
1100         * html/track/TextTrackList.cpp:
1101         (TextTrackList::getTrackIndex): Change return type from unsigned to int.
1102         (TextTrackList::getTrackIndexRelativeToRenderedTracks): New.
1103         * html/track/TextTrackList.h:
1104
1105 2012-11-15  Dominik R√∂ttsches  <dominik.rottsches@intel.com>
1106
1107         [EFL] Bump Harfbuzz to allow fixing bug 101009 on EFL
1108         https://bugs.webkit.org/show_bug.cgi?id=101323
1109
1110         Reviewed by Martin Robinson.
1111
1112         Removing ifdef since we bumped Harfbuzz dependency. This is the
1113         real fix replacing the previous workaround of having a Chromium
1114         specific ifdef here, since Chromium uses a newer HarfBuzz version
1115         already.
1116
1117         No new tests, covered by css3/flexbox/inline-flex-crash.html
1118         which will not crash anymore even with the ifdef removed.
1119
1120         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
1121         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns):
1122
1123 2012-11-15  Andreas Kling  <kling@webkit.org>
1124
1125         REGRESSION(r134408): Heap-use-after-free in WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement().
1126         <http://webkit.org/b/102304>
1127
1128         Reviewed by Anders Carlsson.
1129
1130         Test: fast/dom/cloneNode-below-body-attribute-merging.html
1131
1132         * html/parser/HTMLConstructionSite.cpp:
1133         (WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
1134
1135             Use Element::fastHasAttribute() to determine if a given attribute is already present on the element
1136             we're merging attributes into.
1137
1138         * dom/ElementAttributeData.h:
1139         (ElementAttributeData):
1140
1141             Remove a now-unnecessary friend declaration.
1142
1143 2012-11-15  Elliott Sprehn  <esprehn@chromium.org>
1144
1145         Prevent creation of detached frames in ShadowRoot
1146         https://bugs.webkit.org/show_bug.cgi?id=102333
1147
1148         Reviewed by Dimitri Glazkov.
1149
1150         Similar to Bug 94717 you can create a loaded iframe in a detached
1151         subtree using ShadowRoot. To fix this we just need to make
1152         SubframeLoadingDisabler traverse through shadow boundaries.
1153
1154         Test: fast/frames/detached-shadow-frame.html
1155
1156         * html/HTMLFrameOwnerElement.h:
1157         (WebCore::SubframeLoadingDisabler::canLoadFrame):
1158
1159 2012-11-15  Shinya Kawanaka  <shinyak@chromium.org>
1160
1161         Changing pseudoClass (:visited) should cause distribution.
1162         https://bugs.webkit.org/show_bug.cgi?id=101700
1163
1164         Reviewed by Dimitri Glazkov.
1165
1166         When href attribute of an anchor or area element is changed, we have to invalidate distribution.
1167
1168         Since we would like to check a few pseudoClasses at once, we make the argument of
1169         SelectRuleFeatureSet::hasSelectorFor int.
1170
1171         Tests: fast/dom/shadow/pseudoclass-update-visited-anchor.html
1172                fast/dom/shadow/pseudoclass-update-visited-area.html
1173
1174         * dom/ElementShadow.cpp:
1175         (WebCore::invalidateParentDistributionIfNecessary):
1176         * dom/ElementShadow.h:
1177         (WebCore):
1178         * html/HTMLAnchorElement.cpp:
1179         (WebCore::HTMLAnchorElement::parseAttribute):
1180         * html/shadow/SelectRuleFeatureSet.h:
1181         (WebCore::SelectRuleFeatureSet::hasSelectorFor):
1182
1183 2012-11-15  Balazs Kelemen  <kbalazs@webkit.org>
1184
1185         Coordinated Graphics: support the "freeze animations" API
1186         https://bugs.webkit.org/show_bug.cgi?id=100703
1187
1188         Reviewed by Noam Rosenthal.
1189
1190         Make animations resumable in Coordinated Graphics.
1191         Pausing was already implemented.
1192
1193         Tested with animations and transitions tests. No tests to be
1194         unskipped because these tests has been working without this API
1195         as well (although this is the preferred way).
1196
1197         * platform/graphics/GraphicsLayerAnimation.cpp:
1198         (WebCore::GraphicsLayerAnimation::apply):
1199         (WebCore::GraphicsLayerAnimation::computeTotalRunningTime):
1200         Do not consider the time while we was suspended as part of
1201         the total running time.
1202         (WebCore):
1203         (WebCore::GraphicsLayerAnimation::resume):
1204         (WebCore::GraphicsLayerAnimations::suspend):
1205         (WebCore::GraphicsLayerAnimations::resume):
1206         * platform/graphics/GraphicsLayerAnimation.h:
1207         (GraphicsLayerAnimation):
1208         (GraphicsLayerAnimations):
1209
1210 2012-11-15  Gabor Rapcsanyi  <rgabor@webkit.org>
1211
1212         Relocate the ARM NEON SVG filter optimizations
1213         https://bugs.webkit.org/show_bug.cgi?id=102214
1214
1215         Reviewed by Zoltan Herczeg.
1216
1217         Relocate the ARM filter optimizations into platform/graphics/cpu/arm
1218         to keep them together with the others.
1219         From now all graphics optimization for ARM NEON should go here.
1220
1221         * CMakeLists.txt:
1222         * GNUmakefile.am:
1223         * GNUmakefile.list.am:
1224         * Target.pri:
1225         * WebCore.gyp/WebCore.gyp:
1226         * WebCore.gypi:
1227         * WebCore.pri:
1228         * WebCore.xcodeproj/project.pbxproj:
1229         * platform/graphics/cpu/arm/filters/FEBlendNEON.h: Renamed from Source/WebCore/platform/graphics/filters/arm/FEBlendNEON.h.
1230         (WebCore):
1231         (FEBlendUtilitiesNEON):
1232         (WebCore::FEBlendUtilitiesNEON::div255):
1233         (WebCore::FEBlendUtilitiesNEON::normal):
1234         (WebCore::FEBlendUtilitiesNEON::multiply):
1235         (WebCore::FEBlendUtilitiesNEON::screen):
1236         (WebCore::FEBlendUtilitiesNEON::darken):
1237         (WebCore::FEBlendUtilitiesNEON::lighten):
1238         (WebCore::FEBlend::platformApplyNEON):
1239         * platform/graphics/cpu/arm/filters/FECompositeArithmeticNEON.h: Renamed from Source/WebCore/platform/graphics/filters/arm/FECompositeArithmeticNEON.h.
1240         (WebCore):
1241         (WebCore::FEComposite::computeArithmeticPixelsNeon):
1242         (WebCore::FEComposite::platformArithmeticNeon):
1243         * platform/graphics/cpu/arm/filters/FEGaussianBlurNEON.h: Renamed from Source/WebCore/platform/graphics/filters/arm/FEGaussianBlurNEON.h.
1244         (WebCore):
1245         (WebCore::boxBlurNEON):
1246         * platform/graphics/cpu/arm/filters/FELightingNEON.cpp: Renamed from Source/WebCore/platform/graphics/filters/arm/FELightingNEON.cpp.
1247         (WebCore):
1248         (WebCore::feLightingConstantsForNeon):
1249         (WebCore::FELighting::platformApplyNeonWorker):
1250         (WebCore::FELighting::getPowerCoefficients):
1251         * platform/graphics/cpu/arm/filters/FELightingNEON.h: Renamed from Source/WebCore/platform/graphics/filters/arm/FELightingNEON.h.
1252         (WebCore):
1253         (FELightingFloatArgumentsForNeon):
1254         (FELightingPaintingDataForNeon):
1255         (WebCore::FELighting::platformApplyNeon):
1256         * platform/graphics/cpu/arm/filters/NEONHelpers.h: Renamed from Source/WebCore/platform/graphics/filters/arm/NEONHelpers.h.
1257         (WebCore):
1258         (WebCore::loadRGBA8AsFloat):
1259         (WebCore::storeFloatAsRGBA8):
1260
1261 2012-11-15  Mike West  <mkwst@chromium.org>
1262
1263         We should trigger a console warning when we encounter invalid sandbox flags.
1264         https://bugs.webkit.org/show_bug.cgi?id=101956
1265
1266         Reviewed by Adam Barth.
1267
1268         A developer who writes '<iframe sandbox="allowScripts">' probably has
1269         something in mind other than what the browser interprets. In these
1270         situations, we should log a console warning that notes 'allowScripts'
1271         is an invalid sandbox flag ('allow-scripts' is probably what she
1272         meant).
1273
1274         This patch does the simplest thing possible: it throws a warning that
1275         lists the invalid flags encountered for sandbox attributes on iframes,
1276         and for sandbox Content Security Policy directives.
1277
1278         Tests: http/tests/security/contentSecurityPolicy/sandbox-invalid-header.html
1279                http/tests/security/sandboxed-iframe-invalid.html
1280
1281         * dom/SecurityContext.cpp:
1282         (WebCore::SecurityContext::parseSandboxPolicy):
1283         * dom/SecurityContext.h:
1284         (SecurityContext):
1285             Accept a new out parameter, invalidTokensErrorMessage. If invalid
1286             tokens are encountered, build an error message string, and pass it
1287             back to the caller through this parameter.
1288         * html/HTMLIFrameElement.cpp:
1289         (WebCore::HTMLIFrameElement::parseAttribute):
1290         * page/ContentSecurityPolicy.cpp:
1291         (WebCore::CSPDirectiveList::applySandboxPolicy):
1292             When applying a sandbox policy, pass a string into
1293             SecurityContext::parseSandboxPolicy to grab any errors that might
1294             be encountered, and log a warning in that event.
1295         (WebCore::ContentSecurityPolicy::reportInvalidSandboxFlags):
1296         (WebCore):
1297         * page/ContentSecurityPolicy.h:
1298             Adding a new method to report invalid sandbox flags.
1299
1300 2012-11-15  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1301
1302         Rename member vars in ViewportArgument to match css-device-adapt
1303         https://bugs.webkit.org/show_bug.cgi?id=102355
1304
1305         Reviewed by Gyuyoung Kim.
1306
1307         No behavior change, thus no new tests.
1308
1309         * dom/ViewportArguments.cpp:
1310         (WebCore::ViewportArguments::resolve):
1311         (WebCore::setViewportFeature):
1312         * dom/ViewportArguments.h:
1313         (WebCore::ViewportArguments::ViewportArguments):
1314         (ViewportArguments):
1315         (WebCore::ViewportArguments::operator==):
1316
1317 2012-11-15  Andrey Adaikin  <aandrey@chromium.org>
1318
1319         Web Inspector: [WebGL] cloneNode for images with revoked Blob URIs fails
1320         https://bugs.webkit.org/show_bug.cgi?id=102366
1321
1322         Reviewed by Vsevolod Vlasov.
1323
1324         * inspector/InjectedScriptCanvasModuleSource.js:
1325         (.):
1326
1327 2012-11-15  Mark Rowe  <mrowe@apple.com>
1328
1329         Build fix.
1330
1331         Disable deprecation warnings in a few places that need it.
1332
1333         * platform/graphics/ca/mac/TileCache.mm:
1334         (WebCore::TileCache::drawRepaintCounter):
1335         * platform/graphics/mac/FontMac.mm:
1336         (WebCore::showGlyphsWithAdvances):
1337         * platform/graphics/mac/WebLayer.mm:
1338         (drawLayerContents):
1339
1340 2012-11-15  Kent Tamura  <tkent@chromium.org>
1341
1342         Support stand-alone month names in calendar picker
1343         https://bugs.webkit.org/show_bug.cgi?id=102196
1344
1345         Reviewed by Kentaro Hara.
1346
1347         We have showed non stand-alone month names in any locales. However
1348         we should show stand-alone month names in some locales such as
1349         Russian.
1350
1351         This patch introduce PagePopupController::formatMonth. It is
1352         exposed to page-popups, and format year-month pairs in the same
1353         way as input[type=month].
1354
1355         No new tests. Affects platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ru.html.
1356
1357         * Resources/pagepopups/calendarPicker.js:
1358         (Month.prototype.toLocaleString):
1359         Calls pagePopupController.formatMonth except Japanese locale.
1360         (handleArgumentsTimeout):
1361         Remove unnecessary default monthLabels.
1362         * page/PagePopupController.cpp:
1363         (WebCore::PagePopupController::formatMonth): Added.
1364         * page/PagePopupController.h:
1365         (PagePopupController): Declare formatMonth.
1366         * page/PagePopupController.idl: Add formatMonth.
1367
1368 2012-11-15  Eugene Klyuchnikov  <eustas.bug@gmail.com>
1369
1370         Web Inspector: Fix new JS compiler warnings.
1371         https://bugs.webkit.org/show_bug.cgi?id=102341
1372
1373         Reviewed by Yury Semikhatsky.
1374
1375         New version of compiler finds new inconsistencies.
1376
1377         * inspector/front-end/DOMAgent.js: Replaced 2 simiar cases with loop.
1378         * inspector/front-end/DOMBreakpointsSidebarPane.js:
1379         Declared instance property on WebInspector.
1380         * inspector/front-end/Script.js: Normalized parameter notation.
1381
1382 2012-11-15  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1383
1384         Unreviewed build fix.
1385
1386         * dom/ViewportArguments.cpp:
1387         (WebCore::convertToUserSpace): Add static
1388
1389 2012-11-14  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1390
1391         Refactor ViewportArguments to only use CSS units
1392         https://bugs.webkit.org/show_bug.cgi?id=102287
1393
1394         Reviewed by Noam Rosenthal.
1395
1396         Refactor the ViewportArgument code to use a member method for
1397         resolving the viewport. This new method only uses arguments in
1398         CSS units.
1399
1400         This is preparation for adding the CSS Device Adaptation support.
1401
1402         Tested by existing tests fast/viewport.
1403
1404         * dom/ViewportArguments.cpp:
1405         (WebCore::clampLengthValue):
1406         (WebCore::clampScaleValue): New utility functions.
1407         (WebCore::ViewportArguments::resolve):
1408         (WebCore::convertToUserSpace): Added until everyone provides arguments
1409         only in CSS units and not device ones.
1410         (WebCore::computeViewportAttributes):
1411         (WebCore::computeMinimumScaleFactorForContentContained):
1412         (WebCore):
1413         (WebCore::restrictMinimumScaleFactorToViewportSize):
1414         * dom/ViewportArguments.h:
1415         (ViewportArguments):
1416
1417 2012-11-14  Shinya Kawanaka  <shinyak@chromium.org> 
1418
1419         Changing pseudoClass (:disabled) should cause distribution.
1420         https://bugs.webkit.org/show_bug.cgi?id=101901
1421
1422         Reviewed by Hajime Morita.
1423
1424         We have to invalidate distribution when pseudo-class (:disabled) is changed.
1425
1426         According to the HTML5 spec, :disabled will match button, input, select, textarea, optgroup,
1427         option, command, li, and fieldset. However, command is not implemented yet, we skip li and command. li might
1428         have 'disabled' state, but we need a command element to make it 'disabled' state.
1429
1430         Tests: fast/dom/shadow/pseudoclass-update-disabled-button.html
1431                fast/dom/shadow/pseudoclass-update-disabled-fieldset.html
1432                fast/dom/shadow/pseudoclass-update-disabled-input.html
1433                fast/dom/shadow/pseudoclass-update-disabled-optgroup.html
1434                fast/dom/shadow/pseudoclass-update-disabled-option.html
1435                fast/dom/shadow/pseudoclass-update-disabled-select.html
1436                fast/dom/shadow/pseudoclass-update-disabled-textarea.html
1437
1438         * html/HTMLFormControlElement.cpp:
1439         (WebCore::HTMLFormControlElement::disabledAttributeChanged):
1440         * html/HTMLOptGroupElement.cpp:
1441         (WebCore::HTMLOptGroupElement::parseAttribute):
1442         * html/HTMLOptionElement.cpp:
1443         (WebCore::HTMLOptionElement::parseAttribute):
1444
1445 2012-11-14  Sheriff Bot  <webkit.review.bot@gmail.com>
1446
1447         Unreviewed, rolling out r134691, r134703, r134715, r134716,
1448         and r134733.
1449         http://trac.webkit.org/changeset/134691
1450         http://trac.webkit.org/changeset/134703
1451         http://trac.webkit.org/changeset/134715
1452         http://trac.webkit.org/changeset/134716
1453         http://trac.webkit.org/changeset/134733
1454         https://bugs.webkit.org/show_bug.cgi?id=102342
1455
1456         "Broke the Apple Windows Debug and GTK builds." (Requested by
1457         dydx on #webkit).
1458
1459         * WebCore.exp.in:
1460         * bindings/js/SerializedScriptValue.h:
1461         * testing/Internals.cpp:
1462         * testing/Internals.h:
1463         (WebCore):
1464         * testing/Internals.idl:
1465
1466 2012-11-14  Pavel Feldman  <pfeldman@chromium.org>
1467
1468         Not reviewed: fixing inspector tests under Qt.
1469
1470         * inspector/front-end/TestController.js:
1471         * inspector/front-end/utilities.js:
1472         (.):
1473
1474 2012-11-14  Kentaro Hara  <haraken@chromium.org>
1475
1476         Unreviewed. Rebaselined run-bindings-tests.
1477
1478         * bindings/scripts/test/V8/V8TestNode.h:
1479         (WebCore::toV8Fast):
1480
1481 2012-11-14  Simon Fraser  <simon.fraser@apple.com>
1482
1483         Don't use temporary clip rects when hit testing
1484         https://bugs.webkit.org/show_bug.cgi?id=102329
1485
1486         Reviewed by Beth Dakin.
1487
1488         We now cache clip rects separately for painting, hit testing etc. Hit testing
1489         clip rects are always shrunk to exclude scrollbars (so that hit testing on
1490         the scrollbars works), so we no longer every need to use temporary clip rects
1491         during hit testing.
1492
1493         Added an assertion that the scrollbar relevancy when we computed the clip rects
1494         is the same as that when using them.
1495         
1496         * rendering/RenderLayer.cpp:
1497         (WebCore::RenderLayer::hitTestLayer):
1498         (WebCore::RenderLayer::updateClipRects):
1499         * rendering/RenderLayer.h:
1500         (WebCore::ClipRectsCache::ClipRectsCache):
1501         (ClipRectsCache):
1502
1503 2012-11-14  Dirk Schulze  <krit@webkit.org>
1504
1505         Support animation of basic shape 'polygon'
1506         https://bugs.webkit.org/show_bug.cgi?id=102080
1507
1508         Reviewed by Daniel Bates.
1509
1510         The basic shapes 'circle', 'rectangle' and 'ellipse' are animatable with the committed
1511         patch http://trac.webkit.org/changeset/134352.
1512         This is a follow-up patch to make 'polygon' animatable as well, as long as the number
1513         of vertices between start and end polygon is the same.
1514
1515         Added polygon animation test to existing test:
1516             fast/exclusions/shape-inside/shape-inside-animation.html
1517             css3/masking/clip-path-animation.html
1518
1519         * page/animation/CSSPropertyAnimation.cpp: Forgot to add copyright with last commits.
1520         * rendering/style/BasicShapes.cpp:
1521         (WebCore::BasicShape::canBlend): Polygons are allowed now.
1522         (WebCore::BasicShapePolygon::blend): Interpolate polygon shapes.
1523
1524 2012-11-14  Kentaro Hara  <haraken@chromium.org>
1525
1526         Unreviewed. Fix code generator warnings.
1527
1528         * bindings/scripts/CodeGeneratorV8.pm:
1529         (GenerateFunctionCallback):
1530         (GenerateImplementation):
1531
1532 2012-11-14  Shinya Kawanaka  <shinyak@chromium.org>
1533
1534         Changing pseudoClass (:checked) should cause distribution.
1535         https://bugs.webkit.org/show_bug.cgi?id=101902
1536
1537         Reviewed by Dimitri Glazkov.
1538
1539         When the 'checked' state is changed, we have to invalidate distribution.
1540
1541         According to the HTML5 spec, :checked should match a checked input[type="checkbox"],
1542         a checked input[type="radio"], a selected option, and commands. However, we don't have a command element yet.
1543
1544         Tests: fast/dom/shadow/pseudoclass-update-checked-input.html
1545                fast/dom/shadow/pseudoclass-update-checked-option.html
1546
1547         * html/HTMLInputElement.cpp:
1548         (WebCore::HTMLInputElement::setChecked):
1549         * html/HTMLOptionElement.cpp:
1550         (WebCore::HTMLOptionElement::setSelectedState):
1551
1552 2012-11-14  Kentaro Hara  <haraken@chromium.org>
1553
1554         [V8] Kill $implClassName from CodeGeneratorV8.pm
1555         https://bugs.webkit.org/show_bug.cgi?id=102312
1556
1557         Reviewed by Adam Barth.
1558
1559         $implClassName and $interfaceName are the same.
1560         Sometimes we are passing both $implClassName and $interfaceName to
1561         subroutines. We can kill $implClassName.
1562
1563         No tests. No change in behavior.
1564
1565         * bindings/scripts/CodeGeneratorV8.pm:
1566         (GenerateOpaqueRootForGC):
1567         (GenerateHeader):
1568         (GenerateDomainSafeFunctionGetter):
1569         (GenerateDomainSafeFunctionSetter):
1570         (GenerateConstructorGetter):
1571         (GenerateNormalAttrGetter):
1572         (GenerateReplaceableAttrSetter):
1573         (GenerateNormalAttrSetter):
1574         (GenerateEventListenerCallback):
1575         (GenerateOverloadedFunctionCallback):
1576         (GenerateFunctionCallback):
1577         (GenerateParametersCheck):
1578         (GenerateOverloadedConstructorCallback):
1579         (GenerateSingleConstructorCallback):
1580         (GenerateConstructorCallback):
1581         (GenerateEventConstructorCallback):
1582         (GenerateTypedArrayConstructorCallback):
1583         (GenerateNamedConstructorCallback):
1584         (GenerateImplementation):
1585         (GenerateFunctionCallString):
1586
1587 2012-11-14  Adam Barth  <abarth@webkit.org>
1588
1589         [V8] We can shave one instruction off toV8Fast
1590         https://bugs.webkit.org/show_bug.cgi?id=102297
1591
1592         Reviewed by Kentaro Hara.
1593
1594         There's no reason to store info.Holder in a local variable. Calling
1595         Holder() is essentially free because it's inlined to an offset read.
1596
1597         I doubt this patch moves the performance needle in any measurable way,
1598         but it makes the code slightly prettier.
1599
1600         * bindings/scripts/CodeGeneratorV8.pm:
1601         (GenerateHeader):
1602         * bindings/scripts/test/V8/V8TestNode.h:
1603         (WebCore::toV8Fast):
1604
1605 2012-11-14  Kentaro Hara  <haraken@chromium.org>
1606
1607         [V8] Get rid of a redundant branch in JSValueToNative()
1608         https://bugs.webkit.org/show_bug.cgi?id=102311
1609
1610         Reviewed by Adam Barth.
1611
1612         No tests. No change in behavior.
1613
1614         * bindings/scripts/CodeGeneratorV8.pm:
1615         (JSValueToNative):
1616         (NativeToJSValue):
1617
1618 2012-11-14  Shinya Kawanaka  <shinyak@chromium.org>
1619
1620         Changing pseudoClass (:link) should cause distribution
1621         https://bugs.webkit.org/show_bug.cgi?id=101698
1622
1623         Reviewed by Hajime Morita.
1624
1625         CSSSelector :link matches anchor element with href attribute. When href attribute of an anchor element is changed,
1626         we have to invalidate distribution.
1627
1628         According to the HTML spec, :link matches a link element having href attribute, currently we have not implemented it yet.
1629
1630         Tests: fast/dom/shadow/pseudoclass-update-link-anchor.html
1631                fast/dom/shadow/pseudoclass-update-link-area.html
1632
1633         * html/HTMLAnchorElement.cpp:
1634         (WebCore::HTMLAnchorElement::parseAttribute):
1635
1636 2012-11-14  Kentaro Hara  <haraken@chromium.org>
1637
1638         Remove unused functions from CodeGenerator.pm
1639         https://bugs.webkit.org/show_bug.cgi?id=102316
1640
1641         Reviewed by Adam Barth.
1642
1643         No tests. No change in behavior.
1644
1645         * bindings/scripts/CodeGenerator.pm:
1646         (GenerateCompileTimeCheckForEnumsIfNeeded):
1647
1648 2012-11-14  Tiancheng Jiang  <tijiang@rim.com>
1649
1650         [BlackBerry] Update BB10 form theme.
1651         https://bugs.webkit.org/show_bug.cgi?id=100760
1652
1653         Reviewed by Rob Buis.
1654
1655         RIM PR 225755
1656         Internally Reviewed by Eli Fidler.
1657         Update checkbox, radio and menulist button style. Adjust border width
1658         and line height.
1659
1660         * platform/blackberry/RenderThemeBlackBerry.cpp:
1661         (WebCore::RenderThemeBlackBerry::adjustMenuListButtonStyle):
1662         * platform/blackberry/RenderThemeBlackBerry.h:
1663         (RenderThemeBlackBerry):
1664
1665 2012-11-14  Erik Arvidsson  <arv@chromium.org>
1666
1667         Update DOMException name: InvalidModificationError
1668         https://bugs.webkit.org/show_bug.cgi?id=102281
1669
1670         Reviewed by Kentaro Hara.
1671
1672         Patch 13 of 25 to update DOMException name to match the spec and Firefox.
1673
1674         DOMExcecption INVALID_MODIFICATION_ERR is not used in our code.
1675
1676         * dom/DOMCoreException.cpp:
1677
1678 2012-11-14  Adam Barth  <abarth@webkit.org>
1679
1680         document variable in Document::axObjectCache is actually the topDocument
1681         https://bugs.webkit.org/show_bug.cgi?id=101966
1682
1683         Reviewed by Chris Fleizach.
1684
1685         Name change requested by Darin Adler.
1686
1687         * dom/Document.cpp:
1688         (WebCore::Document::axObjectCache):
1689
1690 2012-11-14  Joseph Pecoraro  <pecoraro@apple.com>
1691
1692         [CF]: XMLHttpRequest "timeout" events firing as "error" events
1693         https://bugs.webkit.org/show_bug.cgi?id=102271
1694
1695         Reviewed by David Kilzer.
1696
1697         Initialize the tiemout flag if the error results from a timeout
1698         in the USE(CFNETWORK) cases.
1699
1700         No new tests. This is covered by http/tests/xmlhttprequest/timeout
1701         tests on ports that USE(CFNETWORK).
1702
1703         * platform/network/cf/ResourceErrorCF.cpp:
1704         (WebCore::ResourceError::ResourceError):
1705         * platform/network/mac/ResourceErrorMac.mm:
1706         (WebCore::ResourceError::ResourceError):
1707
1708 2012-11-14  Nico Weber  <thakis@chromium.org>
1709
1710         [chromium/mac] Fix drawing of buttons, checkboxes, radio boxes, and steppers when the page is scaled
1711         https://bugs.webkit.org/show_bug.cgi?id=102282
1712
1713         Reviewed by James Robinson.
1714
1715         Chromium uses skia, and skia state is synced with CG context state at
1716         LocalCurrentGraphicsContext construction time. So delay that
1717         construction after context transforms have happened.
1718         (This regressed in http://trac.webkit.org/changeset/125830)
1719
1720         Covered by the new pixel test fast/forms/zoomed-controls.html. I
1721         couldn't find an existing test for this.
1722
1723         * platform/mac/ThemeMac.mm:
1724         (WebCore::paintCheckbox):
1725         (WebCore::paintRadio):
1726         (WebCore::paintButton):
1727
1728 2012-11-14  Mark Lam  <mark.lam@apple.com>
1729
1730         Change JSEventListener::m_jsFunction to be a weak ref.
1731         https://bugs.webkit.org/show_bug.cgi?id=101989.
1732
1733         Reviewed by Geoffrey Garen.
1734
1735         No new tests.
1736
1737         * ForwardingHeaders/heap/SlotVisitor.h: Added.
1738         * bindings/js/JSDOMBinding.h: Added #include <heap/SlotVisitor.h>
1739         * bindings/js/JSEventListener.cpp:
1740         (WebCore::JSEventListener::JSEventListener):
1741         (WebCore::JSEventListener::visitJSFunction):
1742         (WebCore::JSEventListener::operator==):
1743          - Removed the m_wrapper checks in operator==() because they are not
1744            needed. There is no longer any threat of m_jsFunction pointing to
1745            recycled memory. The use of weak refs will ensure that m_jsFunction
1746            is either still holding on to its old memory exclusively, or is 0'ed
1747            out when the GC collects it.
1748         * bindings/js/JSEventListener.h:
1749         (JSEventListener):
1750         (WebCore::JSEventListener::jsFunction):
1751
1752 2012-11-14  Dan Carney  <dcarney@google.com>
1753
1754         [V8] Rename dispatchWrap
1755         https://bugs.webkit.org/show_bug.cgi?id=102240
1756
1757         Reviewed by Adam Barth.
1758
1759         Mostly a rename:
1760         dispatchWrap->wrap
1761         wrapSlow->createWrapper
1762         dispatchWrapCustom->wrap
1763
1764         No new tests. No change in functionality.
1765
1766         * bindings/scripts/CodeGeneratorV8.pm:
1767         (GenerateHeader):
1768         (GenerateNormalAttrGetter):
1769         (GenerateImplementation):
1770         (GenerateToV8Converters):
1771         * bindings/scripts/IDLAttributes.txt:
1772         * bindings/scripts/test/V8/V8Float64Array.cpp:
1773         (WebCore::wrap):
1774         (WebCore::V8Float64Array::createWrapper):
1775         * bindings/scripts/test/V8/V8Float64Array.h:
1776         (V8Float64Array):
1777         (WebCore):
1778         (WebCore::toV8Object):
1779         (WebCore::toV8):
1780         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1781         (WebCore::V8TestActiveDOMObject::createWrapper):
1782         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
1783         (V8TestActiveDOMObject):
1784         (WebCore::wrap):
1785         (WebCore::toV8Object):
1786         (WebCore::toV8):
1787         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1788         (WebCore::V8TestCustomNamedGetter::createWrapper):
1789         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1790         (V8TestCustomNamedGetter):
1791         (WebCore::wrap):
1792         (WebCore::toV8Object):
1793         (WebCore::toV8):
1794         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1795         (WebCore::V8TestEventConstructor::createWrapper):
1796         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1797         (V8TestEventConstructor):
1798         (WebCore::wrap):
1799         (WebCore::toV8Object):
1800         (WebCore::toV8):
1801         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1802         (WebCore::V8TestEventTarget::createWrapper):
1803         * bindings/scripts/test/V8/V8TestEventTarget.h:
1804         (V8TestEventTarget):
1805         (WebCore::wrap):
1806         (WebCore::toV8Object):
1807         (WebCore::toV8):
1808         * bindings/scripts/test/V8/V8TestException.cpp:
1809         (WebCore::V8TestException::createWrapper):
1810         * bindings/scripts/test/V8/V8TestException.h:
1811         (V8TestException):
1812         (WebCore::wrap):
1813         (WebCore::toV8Object):
1814         (WebCore::toV8):
1815         * bindings/scripts/test/V8/V8TestInterface.cpp:
1816         (WebCore::V8TestInterface::createWrapper):
1817         * bindings/scripts/test/V8/V8TestInterface.h:
1818         (V8TestInterface):
1819         (WebCore::wrap):
1820         (WebCore::toV8Object):
1821         (WebCore::toV8):
1822         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1823         (WebCore::V8TestMediaQueryListListener::createWrapper):
1824         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1825         (V8TestMediaQueryListListener):
1826         (WebCore::wrap):
1827         (WebCore::toV8Object):
1828         (WebCore::toV8):
1829         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1830         (WebCore::V8TestNamedConstructor::createWrapper):
1831         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1832         (V8TestNamedConstructor):
1833         (WebCore::wrap):
1834         (WebCore::toV8Object):
1835         (WebCore::toV8):
1836         * bindings/scripts/test/V8/V8TestNode.cpp:
1837         (WebCore::V8TestNode::createWrapper):
1838         * bindings/scripts/test/V8/V8TestNode.h:
1839         (V8TestNode):
1840         (WebCore::wrap):
1841         (WebCore::toV8Object):
1842         (WebCore::toV8):
1843         (WebCore::toV8Fast):
1844         * bindings/scripts/test/V8/V8TestObj.cpp:
1845         (WebCore::V8TestObj::createWrapper):
1846         * bindings/scripts/test/V8/V8TestObj.h:
1847         (V8TestObj):
1848         (WebCore::wrap):
1849         (WebCore::toV8Object):
1850         (WebCore::toV8):
1851         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
1852         (WebCore::V8TestOverloadedConstructors::createWrapper):
1853         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
1854         (V8TestOverloadedConstructors):
1855         (WebCore::wrap):
1856         (WebCore::toV8Object):
1857         (WebCore::toV8):
1858         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1859         (WebCore::V8TestSerializedScriptValueInterface::createWrapper):
1860         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1861         (V8TestSerializedScriptValueInterface):
1862         (WebCore::wrap):
1863         (WebCore::toV8Object):
1864         (WebCore::toV8):
1865         * bindings/v8/custom/V8BlobCustom.cpp:
1866         (WebCore::wrap):
1867         * bindings/v8/custom/V8CSSRuleCustom.cpp:
1868         (WebCore::wrap):
1869         * bindings/v8/custom/V8CSSValueCustom.cpp:
1870         (WebCore::wrap):
1871         * bindings/v8/custom/V8CanvasRenderingContextCustom.cpp:
1872         (WebCore::wrap):
1873         * bindings/v8/custom/V8DataViewCustom.cpp:
1874         (WebCore::wrap):
1875         * bindings/v8/custom/V8DocumentCustom.cpp:
1876         (WebCore::wrap):
1877         * bindings/v8/custom/V8ElementCustom.cpp:
1878         (WebCore):
1879         (WebCore::wrap):
1880         * bindings/v8/custom/V8EntryCustom.cpp:
1881         (WebCore::wrap):
1882         * bindings/v8/custom/V8EntrySyncCustom.cpp:
1883         (WebCore::wrap):
1884         * bindings/v8/custom/V8EventCustom.cpp:
1885         (WebCore):
1886         (WebCore::wrap):
1887         * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
1888         (WebCore::wrap):
1889         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1890         (WebCore::wrap):
1891         * bindings/v8/custom/V8HTMLElementCustom.cpp:
1892         (WebCore::wrap):
1893         * bindings/v8/custom/V8ImageDataCustom.cpp:
1894         (WebCore::wrap):
1895         * bindings/v8/custom/V8NodeCustom.cpp:
1896         (WebCore::wrap):
1897         * bindings/v8/custom/V8PerformanceEntryCustom.cpp:
1898         (WebCore::wrap):
1899         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
1900         (WebCore::wrap):
1901         * bindings/v8/custom/V8SVGElementCustom.cpp:
1902         (WebCore::wrap):
1903         * bindings/v8/custom/V8SVGPathSegCustom.cpp:
1904         (WebCore::wrap):
1905         * bindings/v8/custom/V8StyleSheetCustom.cpp:
1906         (WebCore::wrap):
1907         * dom/make_names.pl:
1908         (printWrapperFunctions):
1909         (printWrapperFactoryCppFile):
1910
1911 2012-11-14  Ryuan Choi  <ryuan.choi@gmail.com>
1912
1913         [EFL] Refactor theme to choose whether to support foreground color of selection
1914         https://bugs.webkit.org/show_bug.cgi?id=102037
1915
1916         Reviewed by Gyuyoung Kim.
1917
1918         RenderThemeEfl can change foreground color of selection using theme file.
1919         But it can not disable supports of foreground color to keep the text color
1920         which is selected.
1921
1922         This patch refactors color classes of theme file from active/inactive classes
1923         to foreground/background classes so that RenderThemeEfl checks whether
1924         theme file supports foreground color class.
1925
1926         * platform/efl/RenderThemeEfl.cpp:
1927         (WebCore::fillColorsFromEdjeClass):
1928         (WebCore::RenderThemeEfl::setColorFromThemeClass):
1929         (WebCore::RenderThemeEfl::loadTheme):
1930         (WebCore::RenderThemeEfl::RenderThemeEfl):
1931         (WebCore::RenderThemeEfl::supportsSelectionForegroundColors):
1932         (WebCore):
1933         * platform/efl/RenderThemeEfl.h:
1934         (RenderThemeEfl):
1935
1936 2012-11-14  Tony Chang  <tony@chromium.org>
1937
1938         Convert m_selectorVector back to a stack allocated m_reusableSelectorVector
1939         https://bugs.webkit.org/show_bug.cgi?id=102295
1940
1941         Reviewed by Andreas Kling.
1942
1943         Revert r125252 because we're not going to go forward with implementing CSS hierarchies at this time.
1944
1945         No new tests because there should be no change in behavior.
1946
1947         * css/CSSGrammar.y.in:
1948         * css/CSSParser.cpp:
1949         (WebCore::CSSParser::CSSParser):
1950         (WebCore::CSSParser::parseValue):
1951         (WebCore::CSSParser::parseColor):
1952         (WebCore::CSSParser::parseDeclaration):
1953         (WebCore):
1954         (WebCore::filterProperties):
1955         (WebCore::CSSParser::createStylePropertySet):
1956         (WebCore::CSSParser::addProperty):
1957         (WebCore::CSSParser::rollbackLastProperties):
1958         (WebCore::CSSParser::clearProperties):
1959         (WebCore::CSSParser::parse4Values):
1960         (WebCore::CSSParser::parseFlowThread):
1961         (WebCore::CSSParser::addTextDecorationProperty):
1962         (WebCore::CSSParser::createFloatingSelectorVector):
1963         (WebCore::CSSParser::sinkFloatingSelectorVector):
1964         (WebCore::CSSParser::createStyleRule):
1965         (WebCore::CSSParser::createFontFaceRule):
1966         (WebCore::CSSParser::createPageRule):
1967         (WebCore::CSSParser::setReusableRegionSelectorVector):
1968         (WebCore::CSSParser::startDeclarationsForMarginBox):
1969         (WebCore::CSSParser::endDeclarationsForMarginBox):
1970         (WebCore::CSSParser::deleteFontFaceOnlyValues):
1971         * css/CSSParser.h:
1972         (WebCore::CSSParser::hasProperties):
1973         (WebCore::CSSParser::reusableSelectorVector):
1974         (CSSParser):
1975         (WebCore::CSSParser::reusableRegionSelectorVector):
1976         * css/CSSParserValues.cpp:
1977         (WebCore::CSSParserSelector::adoptSelectorVector):
1978         * css/CSSParserValues.h:
1979         (CSSParserSelector):
1980         * css/CSSSelectorList.cpp:
1981         (WebCore::CSSSelectorList::adoptSelectorVector):
1982         * css/CSSSelectorList.h:
1983         (CSSSelectorList):
1984         * css/SVGCSSParser.cpp:
1985         (WebCore::CSSParser::parseSVGValue):
1986         * css/StyleRule.cpp:
1987         (WebCore::StyleRuleRegion::StyleRuleRegion):
1988         * css/StyleRule.h:
1989         (WebCore::StyleRule::parserAdoptSelectorVector):
1990         (WebCore::StyleRulePage::parserAdoptSelectorVector):
1991         (WebCore::StyleRuleRegion::create):
1992         (StyleRuleRegion):
1993
1994 2012-11-14  Alec Flett  <alecflett@chromium.org>
1995
1996         Add tests for explicit serialization values
1997         https://bugs.webkit.org/show_bug.cgi?id=96818
1998
1999         Reviewed by Adam Barth.
2000
2001         Expose direct access to the serialization/deserialization mechanisms
2002         of SerializedScriptValue to DumpRenderTree.
2003
2004         * testing/Internals.cpp:
2005         (WebCore::Internals::serializeObject):
2006         (WebCore):
2007         (WebCore::Internals::deserializeBuffer):
2008         * testing/Internals.h:
2009         (WebCore):
2010         * testing/Internals.idl:
2011
2012 2012-11-14  Michael Pruett  <michael@68k.org>
2013
2014         IndexedDB: Add clear() method to JSC ScriptValue
2015         https://bugs.webkit.org/show_bug.cgi?id=102288
2016
2017         Reviewed by Kentaro Hara.
2018
2019         IndexedDB uses the ScriptValue::clear() method, which existed
2020         previously only in the V8 implementation of ScriptValue. This
2021         change is necessary to implement IndexedDB for JSC.
2022
2023         Tests: storage/indexeddb/*
2024
2025         * bindings/js/ScriptValue.h:
2026         (WebCore::ScriptValue::clear):
2027         (ScriptValue):
2028
2029 2012-11-14  Joshua Bell  <jsbell@chromium.org>
2030
2031         IndexedDB: Indexing tests are flaky-crashing
2032         https://bugs.webkit.org/show_bug.cgi?id=102283
2033
2034         Reviewed by Tony Chang.
2035
2036         Don't commit the transaction if there are outstanding pre-emptive events
2037         from indexing operations.
2038
2039         Speculative fix for the flakiness.
2040
2041         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2042         (WebCore::IDBTransactionBackendImpl::taskEventTimerFired):
2043
2044 2012-11-14  Tony Chang  <tony@chromium.org>
2045
2046         Crash in flexbox when removing absolutely positioned children
2047         https://bugs.webkit.org/show_bug.cgi?id=100465
2048
2049         Reviewed by Ojan Vafai.
2050
2051         We use m_numberOfChildrenOnFirstLine when computing baseline alignment.
2052         This value gets set during flexbox layout. When we remove an absolutely
2053         positioned child, we don't relayout and this value would get stale.
2054
2055         Change m_numberOfChildrenOnFirstLine to m_numberOfInFlowChildrenOnFirstLine
2056         so the value doesn't get stale when we remove absolutely positioned children.
2057         Also change the loop in firstLineBoxBaseline to bail if we run off the end of
2058         the iterator.
2059
2060         Test: css3/flexbox/crash-removing-out-of-flow-child.html
2061
2062         * rendering/RenderFlexibleBox.cpp:
2063         (WebCore::RenderFlexibleBox::RenderFlexibleBox):
2064         (WebCore::RenderFlexibleBox::firstLineBoxBaseline):
2065         (WebCore::RenderFlexibleBox::layoutBlock):
2066         (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems):
2067         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2068         * rendering/RenderFlexibleBox.h:
2069
2070 2012-11-14  Joshua Bell  <jsbell@chromium.org>
2071
2072         IndexedDB: Remove magic numbers in record comparator, handle missing case
2073         https://bugs.webkit.org/show_bug.cgi?id=102255
2074
2075         Reviewed by Tony Chang.
2076
2077         For some ranges of metadata entries, a simple type byte comparison is sufficient
2078         for the backing store comparator. In two places those ranges used magic numbers,
2079         one of which was incorrect - which could lead to failed reads/writes.
2080
2081         Test: webkit_unit_tests --gtest_filter='IDBLevelDBCodingTest.ComparisonTest'
2082
2083         * Modules/indexeddb/IDBLevelDBCoding.cpp:
2084         (IDBLevelDBCoding):
2085         (WebCore::IDBLevelDBCoding::compare):
2086         * Modules/indexeddb/IDBLevelDBCoding.h:
2087
2088 2012-11-14  Dirk Schulze  <krit@webkit.org>
2089
2090         Cleanup BasicShape blending check
2091         https://bugs.webkit.org/show_bug.cgi?id=102289
2092
2093         Reviewed by Daniel Bates.
2094
2095         CSSPropertyAnimation had the same code for varifying that two BasicShape objects can be blended 
2096         twice. Refactor the code and add a canBlend method in BasicShape that combines both checks. This
2097         is a preparation for follow-up patches.
2098
2099         Pure refactoring without behavior change, no new tests.
2100
2101         * page/animation/CSSPropertyAnimation.cpp:
2102         (WebCore::blendFunc): Call new canBlend method for blending verification.
2103         * rendering/style/BasicShapes.cpp:
2104         (WebCore::BasicShape::canBlend): Check if two BasicShape objects can be blended.
2105         (WebCore):
2106         * rendering/style/BasicShapes.h:
2107
2108 2012-11-14  Dirk Schulze  <krit@webkit.org>
2109
2110         [CSS Exclusions] Basic shapes on 'shape-inside' should be animatable
2111         https://bugs.webkit.org/show_bug.cgi?id=102123
2112
2113         Reviewed by Antti Koivisto.
2114
2115         The '-webkit-shape-inside' propery takes a BasicShape as input like
2116         '-webkit-clip-path'. Follow up on http://trac.webkit.org/changeset/134352 and
2117         make '-webkit-shape-inside' animatable as well.
2118
2119         Test: fast/exclusions/shape-inside/shape-inside-animation.html
2120
2121         * page/animation/CSSPropertyAnimation.cpp:
2122         (WebCore::blendFunc): Blend fuction for exclusion shapes. The property takes another
2123             input then '-webkit-clip-path'.
2124         (WebCore):
2125         (PropertyWrapperBasicShape): Add wrapper for BasicShape object. Can be reused by
2126             '-webkit-shape-ourside' as well.
2127         (WebCore::PropertyWrapperBasicShape::PropertyWrapperBasicShape):
2128         (WebCore::CSSPropertyAnimation::ensurePropertyMap):
2129
2130 2012-11-14  Helder Correia  <helder.correia@nokia.com>
2131
2132         [TexMap][Cairo] Accelerated compositing debug visuals
2133         https://bugs.webkit.org/show_bug.cgi?id=101883
2134
2135         Reviewed by Kenneth Rohde Christiansen.
2136
2137         No new tests, just introducing a debug feature.
2138
2139         Add a Cairo implementation to complement the patch from bug 90116
2140         (http://trac.webkit.org/changeset/122275).
2141
2142         For this feature to be enabled, the environment variable
2143         WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS must be set to 1. Once enabled,
2144         both repaint counters and tile borders will be painted.
2145
2146         A Cairo-specific drawRepaintCounter() implementation was added to
2147         TextureMapperGL. A cairo_surface_t is used as scratch buffer to paint
2148         the counters. It is then uploaded to a BitmapTexture acquired
2149         from the pool and finally draw by TextureMapper. The actual compositing
2150         happens inside LayerBackingStore::paintToTextureMapper(). Each
2151         LayerBackingStoreTile has a repaint counter which gets incremented in
2152         LayerBackingStore::updateTile().
2153
2154         * platform/graphics/texmap/TextureMapperGL.cpp:
2155         (WebCore::TextureMapperGL::drawRepaintCounter):
2156
2157 2012-11-14  Michael Pruett  <michael@68k.org>
2158
2159         IndexedDB: Add JSNoStaticTables to IndexedDB interfaces
2160         https://bugs.webkit.org/show_bug.cgi?id=102268
2161
2162         Reviewed by Geoffrey Garen.
2163
2164         Add JSNoStaticTables attribute to IndexedDB interface
2165         definitions. This attribute must be specified in interfaces
2166         which can be accessed from workers.
2167
2168         Tests: storage/indexeddb/*
2169
2170         * Modules/indexeddb/IDBAny.idl:
2171         * Modules/indexeddb/IDBCursor.idl:
2172         * Modules/indexeddb/IDBCursorWithValue.idl:
2173         * Modules/indexeddb/IDBDatabase.idl:
2174         * Modules/indexeddb/IDBDatabaseException.idl:
2175         * Modules/indexeddb/IDBFactory.idl:
2176         * Modules/indexeddb/IDBIndex.idl:
2177         * Modules/indexeddb/IDBKey.idl:
2178         * Modules/indexeddb/IDBKeyRange.idl:
2179         * Modules/indexeddb/IDBObjectStore.idl:
2180         * Modules/indexeddb/IDBOpenDBRequest.idl:
2181         * Modules/indexeddb/IDBRequest.idl:
2182         * Modules/indexeddb/IDBTransaction.idl:
2183         * Modules/indexeddb/IDBUpgradeNeededEvent.idl:
2184         * Modules/indexeddb/IDBVersionChangeEvent.idl:
2185         * Modules/indexeddb/IDBVersionChangeRequest.idl:
2186         * dom/DOMStringList.idl:
2187
2188 2012-11-14  Michael Pruett  <michael@68k.org>
2189
2190         IndexedDB: Replace int64 with int64_t
2191         https://bugs.webkit.org/show_bug.cgi?id=102270
2192
2193         Reviewed by Tony Chang.
2194
2195         Cleaning up coding inconsistencies, no change in behavior.
2196
2197         Tests: storage/indexeddb/*
2198
2199         * Modules/indexeddb/IDBDatabase.cpp:
2200         (WebCore::IDBDatabase::deleteObjectStore):
2201         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
2202         (WebCore::IDBObjectStoreBackendImpl::putInternal):
2203
2204 2012-11-14  Viatcheslav Ostapenko  <v.ostapenko@samsung.com>
2205
2206         [EFL][WK2] White flicker when scrolling big pages with dark background on slower hardware.
2207         https://bugs.webkit.org/show_bug.cgi?id=102000
2208
2209         Reviewed by Noam Rosenthal.
2210
2211         Add helper functions to clear viewport before painting. Those functions
2212         used by EFL Webkit2 port to set view background to match page background
2213         in order to reduce visibility of flicker during scrolling/scaling/repainting
2214         where page tiles are not ready.
2215
2216         * platform/graphics/texmap/TextureMapper.h:
2217         * platform/graphics/texmap/TextureMapperGL.cpp:
2218         (WebCore::TextureMapperGL::drawSolidColor):
2219         (WebCore):
2220         * platform/graphics/texmap/TextureMapperGL.h:
2221         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2222         (WebCore::TextureMapperImageBuffer::drawSolidColor):
2223         (WebCore):
2224         * platform/graphics/texmap/TextureMapperImageBuffer.h:
2225
2226 2012-11-14  Mark Lam  <mark.lam@apple.com>
2227
2228         Fixed regressions due to adding JSEventListener::m_wrapper null checks.
2229         https://bugs.webkit.org/show_bug.cgi?id=102183.
2230
2231         Reviewed by Geoffrey Garen.
2232
2233         Fixed JSEventListener::operator==() to work within the contract that
2234         when m_wrapper is 0, m_jsFunction is also expected to be 0. Also fixed
2235         some typos in comments.
2236
2237         No new tests.
2238
2239         * bindings/js/JSEventListener.cpp:
2240         (WebCore::JSEventListener::visitJSFunction):
2241         (WebCore::JSEventListener::operator==):
2242         * bindings/js/JSEventListener.h:
2243         (WebCore::JSEventListener::jsFunction):
2244
2245 2012-11-14  Nate Chapin  <japhet@chromium.org>
2246
2247         Fix chromium asserts from r134649.
2248
2249         Rubber-stamped by Adam Barth.
2250
2251         MainResourceLoader was calling releaseResources() twice when cancelled
2252         within MainResourceLoader::load(), so check reachedTerminalState() before
2253         calling releaseResources() there.
2254
2255         * loader/MainResourceLoader.cpp:
2256         (WebCore::MainResourceLoader::load):
2257
2258 2012-11-14  Andreas Kling  <kling@webkit.org>
2259
2260         Only resolve presentation attribute style once per shared ElementAttributeData.
2261         <http://webkit.org/b/100990>
2262
2263         Reviewed by Antti Koivisto.
2264
2265         Track the "presentation attribute style dirty" state on ElementAttributeData instead of in a Node flag.
2266         This allows us to avoid duplicate work for ElementAttributeData that are shared between multiple elements,
2267         since the state is no longer per-Element.
2268
2269         I've left the presentation attribute cache in there for now, since it still covers the case where
2270         two elements have the same presentation attributes but different non-presentation attributes.
2271         It's likely that we're not gaining much from it anymore, but that's a topic for another patch.
2272
2273         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2274         * dom/StyledElement.h:
2275         (WebCore::StyledElement::presentationAttributeStyle):
2276         (WebCore::ElementAttributeData::ElementAttributeData):
2277         * dom/ElementAttributeData.h:
2278         (WebCore::ElementAttributeData::ElementAttributeData):
2279         (ElementAttributeData):
2280         * dom/Node.h:
2281
2282             Move presentation attribute style dirty flag from Node to ElementAttributeData.
2283
2284         * dom/ElementAttributeData.cpp:
2285         (SameSizeAsElementAttributeData):
2286
2287             Add a compile-time object size assertion for ElementAttributeData.
2288
2289         * dom/StyledElement.cpp:
2290         (WebCore::StyledElement::attributeChanged):
2291
2292             Don't mark the presentation attribute style dirty if the element is using an immutable (implies
2293             shared) ElementAttributeData and another element has already generated the StylePropertySet.
2294             The element itself is still marked for style recalc like before, this just avoids the process
2295             of converting the attributes to CSS properties.
2296
2297 2012-11-14  Scott Violet  <sky@chromium.org>
2298
2299         [Chromium] Refactor theme font lookup into a factory
2300         https://bugs.webkit.org/show_bug.cgi?id=101949
2301
2302         Reviewed by Tony Chang.
2303
2304         This will ultimately allow us to use what is currently in RenderThemeChromiumLinux on windows.
2305
2306         No new tests. Refactoring only.
2307
2308         * WebCore.gyp/WebCore.gyp:
2309         * WebCore.gypi:
2310         * rendering/RenderThemeChromiumFontProvider.cpp: Added.
2311         (WebCore):
2312         (WebCore::RenderThemeChromiumFontProvider::defaultGUIFont): Moved into RenderThemeFontProvider.
2313         * rendering/RenderThemeChromiumFontProvider.h: Added.
2314         (WTF):
2315         (WebCore):
2316         (RenderThemeChromiumFontProvider): This is the font related methods.
2317         * rendering/RenderThemeChromiumFontProviderLinux.cpp: Added.
2318         (WebCore):
2319         (WebCore::RenderThemeChromiumFontProvider::setDefaultFontSize): What was in RenderThemeChromiumSkia::setDefaultFontSize.
2320         (WebCore::RenderThemeChromiumFontProvider::systemFont): What was in RenderThemeChromiumSkia::systemFont.
2321         * rendering/RenderThemeChromiumFontProviderWin.cpp: Added.
2322         (WebCore):
2323         (WebCore::pointsToPixels): Moved from RenderThemeChromiumWin.
2324         (WebCore::getNonClientMetrics): Moved from RenderThemeChromiumWin.
2325         (WebCore::systemFontSize): Moved from RenderThemeChromiumWin.
2326         (WebCore::RenderThemeChromiumFontProvider::systemFont): Moved from RenderThemeChromiumWin.
2327         (WebCore::RenderThemeChromiumFontProvider::setDefaultFontSize): Moved from RenderThemeChromiumWin.
2328         * rendering/RenderThemeChromiumSkia.cpp:
2329         (WebCore::RenderThemeChromiumSkia::RenderThemeChromiumSkia): Moved into RenderThemeFontProvider.
2330         (WebCore::RenderThemeChromiumSkia::systemFont): Calls to RenderThemeChromiumFontProvider.
2331         (WebCore::RenderThemeChromiumSkia::setDefaultFontSize): Calls to RenderThemeChromiumFontProvider.
2332         * rendering/RenderThemeChromiumSkia.h:
2333         (RenderThemeChromiumSkia): Moves defaultFontSize into RenderThemeChromiumFontProvider.
2334         * rendering/RenderThemeChromiumWin.cpp: Moves font code into RenderThemeFontProviderWin.
2335         (WebCore):
2336         * rendering/RenderThemeChromiumWin.h: Removed overriden methods now handled by RenderThemeChromiumSkia.
2337         (RenderThemeChromiumWin):
2338
2339 2012-11-14  Erik Arvidsson  <arv@chromium.org>
2340
2341         Update DOMException name: InUseAttributeError
2342         https://bugs.webkit.org/show_bug.cgi?id=102141
2343
2344         Reviewed by Ojan Vafai.
2345
2346         Patch 10 of 25 to update DOMException name to match the spec and Firefox.
2347
2348         The name for this is not in the spec but the case was selected to match
2349         Firefox. http://mxr.mozilla.org/mozilla-central/source/dom/base/domerr.msg#18
2350
2351         INUSE_ATTRIBUTE_ERR is historical and not used in any spec or any of our tests.
2352
2353         * dom/DOMCoreException.cpp:
2354         * dom/ExceptionCode.h:
2355
2356 2012-11-14  Lynn Neir  <lynn.neir@skype.net>
2357
2358         [WinCairo] Incorrect line-height for styled menulist (select tag)
2359         in windows theme.
2360         https://bugs.webkit.org/show_bug.cgi?id=79435
2361
2362         Reviewed by Brent Fulgham
2363
2364         Applied same fix as in RenderThemeSafari::adjustMenuListButtonStyle
2365         to Windows theme to fix issue.
2366
2367         Tests: fast/forms/menulist-restrict-line-height.html
2368                fast/forms/control-restrict-line-height.html
2369                fast/forms/basic-selects.html
2370
2371         * rendering/RenderThemeWin.cpp:
2372         (WebCore::RenderThemeWin::adjustMenuListButtonStyle): Set line
2373         height to the correct initial height.
2374
2375 2012-11-14  Erik Arvidsson  <arv@chromium.org>
2376
2377         Update DOMException name: WrongDocumentError
2378         https://bugs.webkit.org/show_bug.cgi?id=102096
2379
2380         Reviewed by Ojan Vafai.
2381
2382         Patch 4 of 25 to update DOMException name to match the spec and Firefox.
2383
2384         Updated existing tests.
2385
2386         * dom/DOMCoreException.cpp:
2387
2388 2012-11-14  Nate Chapin  <japhet@chromium.org>
2389
2390         Move empty loading to DocumentLoader, simplify FrameLoader::init()
2391         https://bugs.webkit.org/show_bug.cgi?id=101512
2392
2393         Reviewed by Adam Barth.
2394
2395         No new tests, though several outputs changed because we no longer send resource
2396             load callbacks for empty loads.
2397
2398         * loader/DocumentLoader.cpp:
2399         (WebCore::DocumentLoader::startLoadingMainResource): Handle empty main resource
2400             loads directly here.
2401         * loader/DocumentLoader.h:
2402         * loader/FrameLoader.cpp:
2403         (WebCore::FrameLoader::FrameLoader): Initialize some variables whose values
2404             were previously being reset in init(). Given that the FrameLoader is in
2405             an inconsistent state before init() is called anyway, there doesn't seem
2406             to be a disadvantage to just initializing them to their post-init() values.
2407         (WebCore::FrameLoader::init): Just call startLoadingMainResource(), instead of
2408             doing a bunch of direct calls to functions FrameLoader shouldn't know about.
2409         * loader/FrameLoaderStateMachine.cpp:
2410         * loader/FrameLoaderStateMachine.h:
2411         * loader/MainResourceLoader.cpp: Throughout, remove the concept of an empty load.
2412         (WebCore::MainResourceLoader::loadNow): This only returned true when an empty
2413             load got deferred, which won't happen now. Return void and always treat
2414             as returning false.
2415         * loader/MainResourceLoader.h:
2416
2417 2012-11-14  Erik Arvidsson  <arv@chromium.org>
2418
2419         Update DOMException name: InvalidStateError
2420         https://bugs.webkit.org/show_bug.cgi?id=102241
2421
2422         Reviewed by Ojan Vafai.
2423
2424         Patch 11 of 25 to update DOMException name to match the spec and Firefox.
2425
2426         Updated existing tests.
2427
2428         * dom/DOMCoreException.cpp:
2429
2430 2012-11-14  Joshua Bell  <jsbell@chromium.org>
2431
2432         Rename NATIVE_TYPE_ERR to TypeError
2433         https://bugs.webkit.org/show_bug.cgi?id=102114
2434
2435         Reviewed by Kentaro Hara.
2436
2437         Defines names (mostly) matching WebIDL exception types for use by dom (etc) code.
2438         V8 binding code had colliding enum members, which required prefixing.
2439
2440         No new tests - just internal renames.
2441
2442         * Modules/indexeddb/IDBCursor.cpp: s/NATIVE_TYPE_ERR/TypeError/g
2443         (WebCore::IDBCursor::advance):
2444         (WebCore::IDBCursor::stringToDirection):
2445         (WebCore::IDBCursor::directionToString):
2446         * Modules/indexeddb/IDBDatabase.cpp: Ditto.
2447         (WebCore::IDBDatabase::setVersion):
2448         * Modules/indexeddb/IDBFactory.cpp: Ditto.
2449         (WebCore::IDBFactory::open):
2450         (WebCore::IDBFactory::openInternal):
2451         (WebCore::IDBFactory::deleteDatabase):
2452         * Modules/indexeddb/IDBObjectStore.cpp: Ditto.
2453         (WebCore::IDBObjectStore::createIndex):
2454         * Modules/indexeddb/IDBTransaction.cpp: Ditto.
2455         (WebCore::IDBTransaction::stringToMode):
2456         (WebCore::IDBTransaction::modeToString):
2457         * bindings/js/JSDOMBinding.cpp: Ditto.
2458         (WebCore::setDOMException):
2459         * bindings/v8/DateExtension.cpp: Prefix ErrorType enum/members w/ V8/v8.
2460         (WebCore::DateExtension::OnSleepDetected):
2461         * bindings/v8/NPV8Object.cpp: Ditto.
2462         (_NPN_SetException):
2463         * bindings/v8/V8Binding.cpp: Ditto.
2464         (WebCore::throwError):
2465         (WebCore::handleMaxRecursionDepthExceeded):
2466         * bindings/v8/V8Binding.h: Ditto.
2467         (WebCore):
2468         * bindings/v8/V8NPObject.cpp: Ditto.
2469         (WebCore::npObjectInvokeImpl):
2470         (WebCore::npObjectGetProperty):
2471         (WebCore::npObjectSetProperty):
2472         (WebCore::npObjectPropertyEnumerator):
2473         * bindings/v8/V8ThrowException.cpp: Rename ALL the errors!
2474         (WebCore::V8ThrowException::setDOMException):
2475         (WebCore::V8ThrowException::throwError):
2476         (WebCore::V8ThrowException::throwTypeError):
2477         (WebCore::V8ThrowException::throwNotEnoughArgumentsError):
2478         * bindings/v8/V8ThrowException.h:
2479         (V8ThrowException):
2480         * bindings/v8/WorkerContextExecutionProxy.cpp: Prefixing (continued)
2481         (WebCore::WorkerContextExecutionProxy::evaluate):
2482         * bindings/v8/custom/V8ArrayBufferCustom.cpp: Ditto.
2483         (WebCore::V8ArrayBuffer::constructorCallback):
2484         * bindings/v8/custom/V8ArrayBufferViewCustom.h: Ditto.
2485         (WebCore::constructWebGLArrayWithArrayBufferArgument):
2486         (WebCore::constructWebGLArray):
2487         (WebCore::setWebGLArrayHelper):
2488         * bindings/v8/custom/V8AudioContextCustom.cpp: Ditto.
2489         (WebCore::V8AudioContext::constructorCallback):
2490         * bindings/v8/custom/V8BlobCustom.cpp: Ditto.
2491         (WebCore::V8Blob::constructorCallback):
2492         * bindings/v8/custom/V8ClipboardCustom.cpp: Ditto.
2493         (WebCore::V8Clipboard::clearDataCallback):
2494         (WebCore::V8Clipboard::setDragImageCallback):
2495         * bindings/v8/custom/V8DOMFormDataCustom.cpp: Ditto.
2496         (WebCore::V8DOMFormData::appendCallback):
2497         * bindings/v8/custom/V8SQLResultSetRowListCustom.cpp: Ditto.
2498         (WebCore::V8SQLResultSetRowList::itemCallback):
2499         * dom/ExceptionCode.h: Add WebIDL exception types.
2500
2501 2012-11-14  Tiancheng Jiang  <tijiang@rim.com>
2502
2503         [BlackBerry] Style BB10 time input field font.
2504         https://bugs.webkit.org/show_bug.cgi?id=102260.
2505
2506         Reviewed by Rob Buis.
2507
2508         RIM PR 243355
2509         Adjust time input field font using BB10 system default font.
2510
2511         * css/themeBlackBerry.css:
2512         (input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="time"], input[type="month"]):
2513
2514 2012-11-14  Li Yin  <li.yin@intel.com>
2515
2516         createDelay should raise exception when the maxDelayTime parameter is incorrect.
2517         https://bugs.webkit.org/show_bug.cgi?id=102173
2518
2519         Reviewed by Chris Rogers.
2520
2521         Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html
2522         The specified value must be greater than zero and less than three minutes or a
2523         NOT_SUPPORTED_ERR exception will be thrown.
2524
2525         Tests: webaudio/delaynode-maxdelaylimit.html
2526
2527         * Modules/webaudio/AudioContext.cpp:
2528         (WebCore::AudioContext::createDelay):
2529         * Modules/webaudio/AudioContext.h:
2530         (AudioContext):
2531         * Modules/webaudio/AudioContext.idl: Add raising exception for createDelay.
2532         * Modules/webaudio/DelayNode.cpp:
2533         (WebCore):
2534         (WebCore::DelayNode::DelayNode):
2535         * Modules/webaudio/DelayNode.h:
2536         (WebCore::DelayNode::create):
2537         (DelayNode):
2538
2539 2012-11-14  Simon Fraser  <simon.fraser@apple.com>
2540
2541         Don't pass a paintingRoot when painting from RenderLayerBacking
2542         https://bugs.webkit.org/show_bug.cgi?id=102256
2543
2544         Reviewed by David Hyatt.
2545
2546         The 'paintingRoot' parameter to the RenderLayer paint functions
2547         is used when painting just a subtree (e.g. when painting dragged
2548         selections). There is no need to pass it when a RenderLayerBacking
2549         paints its contents or overlay scrollbars.
2550         
2551         Passing it requires an expensive isDescendant() check, so passing
2552         null is more efficient.
2553         
2554         * rendering/RenderLayer.h:
2555         (WebCore::RenderLayer::LayerPaintingInfo::LayerPaintingInfo):
2556         * rendering/RenderLayerBacking.cpp:
2557         (WebCore::RenderLayerBacking::paintIntoLayer):
2558         (WebCore::RenderLayerBacking::paintContents):
2559         * rendering/RenderLayerBacking.h:
2560         (RenderLayerBacking):
2561
2562 2012-11-14  Alec Flett  <alecflett@chromium.org>
2563
2564         Add DOMRequestState to maintain world/ScriptExecutionContext state
2565         https://bugs.webkit.org/show_bug.cgi?id=102102
2566
2567         Reviewed by Adam Barth.
2568
2569         Introduce DOMRequestState, and convert IndexedDB over.
2570
2571         No new tests, this is an abstraction layer for existing code.
2572
2573         * Modules/indexeddb/IDBRequest.cpp:
2574         (WebCore::IDBRequest::IDBRequest):
2575         (WebCore::IDBRequest::onSuccess):
2576         (WebCore::IDBRequest::dispatchEvent):
2577         * Modules/indexeddb/IDBRequest.h:
2578         (IDBRequest):
2579         * WebCore.gypi:
2580         * bindings/v8/DOMRequestState.h: Added.
2581         (WebCore):
2582         (DOMRequestState):
2583         (WebCore::DOMRequestState::DOMRequestState):
2584         (Scope):
2585         (WebCore::DOMRequestState::Scope::Scope):
2586         (WebCore::DOMRequestState::scope):
2587
2588 2012-11-14  Justin Novosad  <junov@google.com>
2589
2590         Boxes with rounded corners and thin borders are too slow to draw
2591         https://bugs.webkit.org/show_bug.cgi?id=101974
2592
2593         Reviewed by Simon Fraser.
2594
2595         With the current implementation RenderBox::
2596         determineBackgroundBleedAvoidance() uses the slow path
2597         BackgroundBleedUseTransparencyLayer for some very common use cases,
2598         notably for drawing rectangles with rounded corners that have thin
2599         borders. This is because the BackgroundBleedShrinkBackground
2600         strategy requires a border at least two pixels wide on all sides. This
2601         patch introduce drawing strategy BackgroundBleedBackgroundOverBorder.
2602         This approach consists in drawing the border first, with an inset inner
2603         edge (for anti-aliased compositing to work well).  This approach only
2604         works with opaque solid edges and opaque single-layer backgrounds.
2605         By using this approach rather than BackgroundBleedUseTransparencyLayer,
2606         we save two clipPath, one save and one saveLayer on the
2607         GraphicsContext. This patch gets good coverage from existing layout
2608         tests. One additional test was added to exercise mitring, thick edges
2609         and anti-aliasing edge cases under the new painting algorithm.
2610
2611         Test: fast/borders/border-radius-wide-border-05.html
2612
2613         * rendering/RenderBox.cpp:
2614         (WebCore::RenderBox::determineBackgroundBleedAvoidance):
2615         Added selection criteria for BackgroundOverBorder
2616         (WebCore::RenderBox::paintBoxDecorations):
2617         Added a preliminary paintBorder pass for BackgroundOverBorder
2618         (WebCore::RenderBox::paintBackground):
2619         Insetting the background to to innerBorder when bleedAvoidance is
2620         BackgroundOverBorder.  This why BackgroundOverBorder only works for
2621         Opaque solid edges.
2622         (WebCore):
2623         (WebCore::RenderBox::backgroundIsSingleOpaqueLayer):
2624         Utility method use by determineBackgroundBleedAvoidance to test the
2625         background's eligibility for BackgroundOverBorder bleed avoidance
2626         strategy.  The reason the background must be a single layer is to avoid
2627         color bleeding from layer compositing along anti-aliased edges
2628         * rendering/RenderBox.h:
2629         (RenderBox):
2630         * rendering/RenderBoxModelObject.cpp:
2631         (WebCore::RenderBoxModelObject::getBackgroundRoundedRect):
2632         (WebCore::RenderBoxModelObject::borderInnerRectAdjustedForBleedAvoidance):
2633         Added support for BackgroundOverBorder by applying a one pixel inset.
2634         (WebCore::RenderBoxModelObject::backgroundRoundedRectAdjustedForBleedAvoidance):
2635         Set the background rect to the inner border for BackgroundOverBorder
2636         (WebCore):
2637         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2638         Added support for BackgroundOverBorder by using 
2639         backgroundRoundedRectAdjustedForBleedAvoidance
2640         (WebCore::RenderBoxModelObject::paintBorderSides):
2641         Added support for BackgroundOverBorder by applying per-side inset
2642         adjustments.
2643         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
2644         (WebCore::RenderBoxModelObject::paintBorder):
2645         Added support for BackgroundOverBorder by using an adjusted inner
2646         border, but not if sides are painted individually.
2647         * rendering/RenderBoxModelObject.h:
2648         (RenderBoxModelObject):
2649
2650 2012-11-14  Hideki Yoshida  <yoshida-hxa@necst.nec.co.jp>
2651
2652         [WinCairo] Fix cairo_t* memory leak in GraphicsContext::platformInit
2653         https://bugs.webkit.org/show_bug.cgi?id=76219
2654
2655         Reviewed by Brent Fulgham.
2656
2657         This patch is to fix a memory leak problem which occurs
2658         in every rendering process on Wincairo port.
2659         By applying this patch, the memory allocated in cairo 
2660         library will be released by calling cairo_destroy.
2661
2662         * platform/graphics/win/GraphicsContextCairoWin.cpp:
2663         (WebCore::GraphicsContext::platformInit):
2664
2665 2012-11-14  Sami Kyostila  <skyostil@chromium.org>
2666
2667         Optimize painting of composited scrolling layers
2668         https://bugs.webkit.org/show_bug.cgi?id=96087
2669
2670         Reviewed by Simon Fraser.
2671
2672         Don't completely repaint accelerated scrolling layers when the scroll offset
2673         changes.
2674
2675         Test: compositing/overflow/scrolling-without-painting.html
2676
2677         * platform/graphics/GraphicsLayer.cpp:
2678         (WebCore::GraphicsLayer::setOffsetFromRenderer):
2679         * platform/graphics/GraphicsLayer.h:
2680         (GraphicsLayer):
2681         * rendering/RenderLayerBacking.cpp:
2682         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
2683
2684 2012-11-14  Pavel Feldman  <pfeldman@chromium.org>
2685
2686         Web Inspector: keep track of mutation observers and disconnect them upon upload
2687         https://bugs.webkit.org/show_bug.cgi?id=102239
2688
2689         Reviewed by Vsevolod Vlasov.
2690
2691         Otherwise we hit memory leaks.
2692
2693         * inspector/front-end/DefaultTextEditor.js:
2694         (WebInspector.DefaultTextEditor.prototype.wasShown):
2695         (WebInspector.DefaultTextEditor.prototype.willHide):
2696         (WebInspector.TextEditorMainPanel.prototype._wasShown):
2697         (WebInspector.TextEditorMainPanel.prototype._willHide):
2698         (WebInspector.TextEditorMainPanel.prototype._attachMutationObserver):
2699         (WebInspector.TextEditorMainPanel.prototype._detachMutationObserver):
2700         * inspector/front-end/utilities.js:
2701
2702 2012-11-14  Sergio Villar Senin  <svillar@igalia.com>
2703
2704         [Qt] Use a node image if there is no drag image set for Drag&Drop
2705         https://bugs.webkit.org/show_bug.cgi?id=102124
2706
2707         Reviewed by Simon Hausmann.
2708
2709         Use the nodeImage provided by the frame if there is no dragImage in
2710         the clipboard for the current drag&drop operation.
2711
2712         * platform/qt/ClipboardQt.cpp:
2713         (WebCore::ClipboardQt::createDragImage):
2714
2715 2012-11-14  Max Vujovic  <mvujovic@adobe.com>
2716
2717         Call to enclosingFilterLayer() in RenderObject::containerForRepaint() is expensive
2718         https://bugs.webkit.org/show_bug.cgi?id=101846
2719
2720         Reviewed by Simon Fraser.
2721
2722         If software-rendered CSS Filters have not been used in the document, avoid doing the second
2723         tree walk in RenderObject::containerForRepaint, which determines the RenderObject's
2724         enclosing filter layer.
2725
2726         No new tests. We now avoid a filters related code path for a performance improvement when
2727         we're not using filters.
2728
2729         * page/FrameView.cpp:
2730         (WebCore::FrameView::FrameView):
2731         * page/FrameView.h:
2732         (FrameView):
2733         (WebCore::FrameView::setHasSoftwareFilters):
2734         (WebCore::FrameView::hasSoftwareFilters):
2735         * rendering/RenderLayer.cpp:
2736         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer):
2737         * rendering/RenderObject.cpp:
2738         (WebCore::RenderObject::containerForRepaint):
2739
2740 2012-11-14  Erik Arvidsson  <arv@chromium.org>
2741
2742         Update DOMException name: NotFoundError
2743         https://bugs.webkit.org/show_bug.cgi?id=102137
2744
2745         Reviewed by Ojan Vafai.
2746
2747         Patch 8 of 25 to update DOMException name to match the spec and Firefox.
2748
2749         Updated existing tests.
2750
2751         * dom/DOMCoreException.cpp:
2752
2753 2012-11-14  Otto Derek Cheung  <otcheung@rim.com>
2754
2755         [BlackBerry] Updating BB Cookie database to use WAL
2756         https://bugs.webkit.org/show_bug.cgi?id=102237
2757
2758         Reviewed by Rob Buis.
2759
2760         The cookie database is accessed by one process only and should be updated to
2761         use the WAL journal mode for better I/O performance.
2762
2763         PR 236553
2764
2765         cookieCollection.db-wal is created after the conversion to WAL.
2766         Tested cookie persistence by logging on to random sites and restarting the browser and
2767         check if it automatically logs in.
2768         Also tested using Opera's cookie persistence test.
2769
2770         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
2771         (WebCore::CookieDatabaseBackingStore::invokeOpen):
2772
2773 2012-11-14  Erik Arvidsson  <arv@chromium.org>
2774
2775         Update DOMException name: IndexSizeError
2776         https://bugs.webkit.org/show_bug.cgi?id=102087
2777
2778         Reviewed by Ojan Vafai.
2779
2780         This is the first in a series of updates to DOMException name to match
2781         the spec and Firefox.
2782
2783         Patch 1 of 25
2784
2785         Updated existing tests.
2786
2787         * dom/DOMCoreException.cpp:
2788         (WebCore):
2789
2790 2012-11-14  Gabor Rapcsanyi  <rgabor@webkit.org>
2791
2792         Fix [-Wmissing-braces] warnings in graphics/cpu/arm/GraphicsContext3DNEON.h
2793         https://bugs.webkit.org/show_bug.cgi?id=102205
2794
2795         Reviewed by Csaba Osztrogon√°c.
2796
2797         Fixing some warnings in GraphicsContext3DNEON.h which have been caused by missing braces.
2798
2799         * platform/graphics/cpu/arm/GraphicsContext3DNEON.h:
2800         (WebCore::ARM::unpackOneRowOfRGBA4444ToRGBA8NEON):
2801         (WebCore::ARM::unpackOneRowOfRGBA5551ToRGBA8NEON):
2802         (WebCore::ARM::unpackOneRowOfRGB565ToRGBA8NEON):
2803
2804 2012-11-14  Erik Arvidsson  <arv@chromium.org>
2805
2806         Update DOMException name: NoDataAllowedError
2807         https://bugs.webkit.org/show_bug.cgi?id=102132
2808
2809         Reviewed by Darin Adler.
2810
2811         Patch 6 of 25 to update DOMException name to match the spec and Firefox.
2812
2813         NO_DATA_ALLOWED_ERR is historical and not used in any spec or in our code.
2814
2815         * dom/DOMCoreException.cpp:
2816         (WebCore):
2817         * dom/ExceptionCode.h:
2818
2819 2012-11-14  Pavel Feldman  <pfeldman@chromium.org>
2820
2821         Web Inspector: "Reveal in Element Panel" doesn't work if Elements panel hasn't been opened
2822         https://bugs.webkit.org/show_bug.cgi?id=102219
2823
2824         Reviewed by Alexander Pavlov.
2825
2826         Force elements module load upon context menu invocation.
2827
2828         * inspector/front-end/ElementsTreeOutline.js:
2829         (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired.focusElement):
2830         (WebInspector.ElementsTreeOutline.prototype._contextMenuEventFired):
2831
2832 2012-11-14  Sheriff Bot  <webkit.review.bot@gmail.com>
2833
2834         Unreviewed, rolling out r134523.
2835         http://trac.webkit.org/changeset/134523
2836         https://bugs.webkit.org/show_bug.cgi?id=102218
2837
2838         brake chrome windows build, as it references a non existing
2839         header js/DOMRequestState.h (Requested by jochen__ on
2840         #webkit).
2841
2842         * Modules/indexeddb/IDBCursor.cpp:
2843         (WebCore::IDBCursor::setValueReady):
2844         * Modules/indexeddb/IDBCursor.h:
2845         (IDBCursor):
2846         * Modules/indexeddb/IDBRequest.cpp:
2847         (WebCore::IDBRequest::IDBRequest):
2848         (WebCore::IDBRequest::onSuccess):
2849         (WebCore::IDBRequest::stop):
2850         (WebCore::IDBRequest::dispatchEvent):
2851         * Modules/indexeddb/IDBRequest.h:
2852         (IDBRequest):
2853         * WebCore.gypi:
2854         * bindings/v8/DOMRequestState.h: Removed.
2855         * bindings/v8/IDBBindingUtilities.cpp:
2856         (WebCore::deserializeIDBValue):
2857         (WebCore::idbKeyToScriptValue):
2858         * bindings/v8/IDBBindingUtilities.h:
2859         (WebCore):
2860
2861 2012-11-14  Anton Obzhirov  <a.obzhirov@samsung.com>
2862
2863         Add platform implementation of remote web inspector server for GTK port.
2864         https://bugs.webkit.org/show_bug.cgi?id=88094 
2865
2866         Reviewed by Gustavo Noronha Silva.
2867
2868         Extra SocketStreamHandle constructor is added to accept existing GSocketConnection.
2869         Needed to pass remote inspector server socket connection. The change is tested with 
2870         inspector server API tests.
2871
2872         * platform/network/soup/SocketStreamHandle.h:
2873         (WebCore::SocketStreamHandle::create):
2874         (SocketStreamHandle):
2875         * platform/network/soup/SocketStreamHandleSoup.cpp:
2876         (WebCore::SocketStreamHandle::SocketStreamHandle):
2877         (WebCore):
2878         (WebCore::SocketStreamHandle::connected):
2879         (WebCore::SocketStreamHandle::platformSend):
2880         (WebCore::SocketStreamHandle::platformClose):
2881
2882 2012-11-14  Pavel Feldman  <pfeldman@chromium.org>
2883
2884         Web Inspector: context menu on ObjectPropertyTreeElement's values is masked by the section.
2885         https://bugs.webkit.org/show_bug.cgi?id=102212
2886
2887         Reviewed by Vsevolod Vlasov.
2888
2889         * inspector/front-end/ObjectPropertiesSection.js:
2890         (WebInspector.ObjectPropertiesSection.prototype.enableContextMenu):
2891
2892 2012-11-09  Ilya Tikhonovsky  <loislo@chromium.org>
2893
2894         Web Inspector: NMI add instrumentation for WebAudo related stuff.
2895         They use about 16Mb for shared data on pages with webaudio.
2896         As example Angry Birds app.
2897         https://bugs.webkit.org/show_bug.cgi?id=101729
2898
2899         Reviewed by Yury Semikhatsky.
2900
2901         Plain vanilla instrumentation for audio and webaudio classes.
2902         AudioContext is a kind of ActiveDOMObject. I found that these objects
2903         are accessible through ScriptExecutuionContext and ScriptExecutionContext
2904         is an ancestor of Document. Document class was instrumented earler.
2905         I instrumented ActiveDOMObject, ScriptExecutionContext and other ancestors
2906         and now AudioContext and other ActiveDOMObjects are reacheable from Document.
2907
2908         Test: inspector-protocol/nmi-webaudio.html
2909
2910         * Modules/webaudio/AudioContext.cpp:
2911         (WebCore::AudioContext::reportMemoryUsage):
2912         (WebCore):
2913         * Modules/webaudio/AudioContext.h:
2914         (AudioContext):
2915         * Modules/webaudio/AudioNode.cpp:
2916         (WebCore::AudioNode::reportMemoryUsage):
2917         (WebCore):
2918         * Modules/webaudio/AudioNode.h:
2919         (AudioNode):
2920         * dom/ActiveDOMObject.cpp:
2921         (WebCore::ActiveDOMObject::reportMemoryUsage):
2922         (WebCore):
2923         * dom/ActiveDOMObject.h:
2924         (ActiveDOMObject):
2925         * dom/Document.cpp:
2926         (WebCore::Document::reportMemoryUsage):
2927         * dom/ScriptExecutionContext.cpp:
2928         (WebCore::ScriptExecutionContext::reportMemoryUsage):
2929         (WebCore):
2930         * dom/ScriptExecutionContext.h:
2931         (ScriptExecutionContext):
2932         * dom/SecurityContext.cpp:
2933         (WebCore::SecurityContext::reportMemoryUsage):
2934         (WebCore):
2935         * dom/SecurityContext.h:
2936         (SecurityContext):
2937         * dom/WebCoreMemoryInstrumentation.cpp:
2938         (WebCore):
2939         * dom/WebCoreMemoryInstrumentation.h:
2940         (WebCoreMemoryTypes):
2941         * platform/audio/AudioArray.h:
2942         (AudioArray):
2943         (WebCore::AudioArray::reportMemoryUsage):
2944         * platform/audio/FFTFrame.cpp:
2945         (WebCore::FFTFrame::reportMemoryUsage):
2946         (WebCore):
2947         * platform/audio/FFTFrame.h:
2948         (FFTFrame):
2949         * platform/audio/HRTFDatabase.cpp:
2950         (WebCore::HRTFDatabase::reportMemoryUsage):
2951         (WebCore):
2952         * platform/audio/HRTFDatabase.h:
2953         (HRTFDatabase):
2954         * platform/audio/HRTFDatabaseLoader.cpp:
2955         (WebCore::HRTFDatabaseLoader::reportMemoryUsage):
2956         (WebCore):
2957         * platform/audio/HRTFDatabaseLoader.h:
2958         (HRTFDatabaseLoader):
2959         * platform/audio/HRTFElevation.cpp:
2960         (WebCore::HRTFElevation::reportMemoryUsage):
2961         (WebCore):
2962         * platform/audio/HRTFElevation.h:
2963         (HRTFElevation):
2964         * platform/audio/HRTFKernel.cpp:
2965         (WebCore::HRTFKernel::reportMemoryUsage):
2966         (WebCore):
2967         * platform/audio/HRTFKernel.h:
2968         (HRTFKernel):
2969
2970 2012-11-14  Eugene Klyuchnikov  <eustas.bug@gmail.com>
2971
2972         Web Inspector: Settings screen: close button overlays view title on mac.
2973         https://bugs.webkit.org/show_bug.cgi?id=102198
2974
2975         Reviewed by Pavel Feldman.
2976
2977         Added margin-left for mac. Adjusted title height and vertical positioning.
2978
2979         * inspector/front-end/helpScreen.css:
2980         (.help-window-caption): Adjusted title height.
2981         (.help-window-title): Adjusted title vertical positioning. 
2982         (body.platform-mac .help-window-main .help-window-title): Fixed margin.
2983
2984 2012-11-13  Pavel Feldman  <pfeldman@chromium.org>
2985
2986         Web Inspector: use last selection as complementary signal when applying DOM changes to the text model.
2987         https://bugs.webkit.org/show_bug.cgi?id=101905
2988
2989         Reviewed by Vsevolod Vlasov.
2990
2991         Currently we use heuristics for detecting damaged model range upon DOM mutation.
2992         This change adds signals from the last selection and keyboard events in order to
2993         further improve the heuristics quality.
2994
2995         * inspector/front-end/DefaultTextEditor.js:
2996         (WebInspector.DefaultTextEditor):
2997         (WebInspector.DefaultTextEditor.EditInfo):
2998         (WebInspector.DefaultTextEditor.prototype._handleTextInput):
2999         (WebInspector.DefaultTextEditor.prototype._handleKeyDown):
3000         (WebInspector.DefaultTextEditor.prototype.lastSelection):
3001         (WebInspector.DefaultTextEditor.prototype.wasShown):
3002         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
3003         (WebInspector.TextEditorMainPanel.prototype._guessEditRangeBasedOnSelection):
3004         (WebInspector.TextEditorMainPanel.prototype._guessEditRangeBasedOnDiff):
3005         (WebInspector.TextEditorMainPanel.prototype._closingBlockOffset):
3006         (WebInspector.TextEditorMainPanel.prototype._handleSelectionChange):
3007         * inspector/front-end/TextEditorModel.js:
3008         (WebInspector.TextRange.prototype.compareTo):
3009         (WebInspector.TextRange.prototype.shift):
3010         (WebInspector.TextEditorModel.endsWithBracketRegex.):
3011
3012 2012-11-14  Dan Carney  <dcarney@google.com>
3013
3014         [V8] use toV8Fast in all relevant Node getters
3015         https://bugs.webkit.org/show_bug.cgi?id=100851
3016
3017         Reviewed by Kentaro Hara.
3018
3019         The toV8Fast function for Node objects is now called in all getters
3020         instead of toV8.
3021
3022         No new tests. Test coverage extensive.
3023
3024         * bindings/scripts/CodeGeneratorV8.pm:
3025         (GenerateHeader):
3026         (GenerateNormalAttrGetter):
3027         (IsDOMNodeType):
3028         * bindings/scripts/test/V8/V8TestNode.h:
3029         (WebCore::toV8Fast):
3030
3031 2012-11-14  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3032
3033         Clean up use of adjustWindowRect
3034         https://bugs.webkit.org/show_bug.cgi?id=102072
3035
3036         Reviewed by Gyuyoung Kim.
3037
3038         Tested by fast/dom/Window/open-window-min-size.html
3039
3040         * loader/FrameLoader.cpp:
3041         (WebCore::createWindow):
3042
3043             Validate the window size here so that it is not just done for
3044             .open, but also for .showModalDialog. This is compatible with
3045             other browsers such as IE and Firefox (though IE > 6, enforces
3046             a minimum width of 250 instead of 100 as Firefox and us.)
3047
3048         * page/DOMWindow.cpp:
3049         (WebCore):
3050         (WebCore::DOMWindow::adjustWindowRect):
3051
3052             Make it a static method which only takes page. It was never
3053             called from anywhere without a valid page, so the page check
3054             has been turned into an assert, and two of the arguments have
3055             been removed as they can be accessed via the page.
3056
3057         (WebCore::DOMWindow::moveBy):
3058         (WebCore::DOMWindow::moveTo):
3059         (WebCore::DOMWindow::resizeBy):
3060         (WebCore::DOMWindow::resizeTo):
3061
3062             Update use of adjustWindowRect.
3063
3064         (WebCore::DOMWindow::open):
3065
3066             Avoid modifying the WindowFeatures as the WebCore::createWindow
3067             validates and adjusts the arguments.
3068
3069         * page/DOMWindow.h:
3070         (DOMWindow):
3071
3072 2012-11-14  Takashi Sakamoto  <tasak@google.com>
3073
3074         Crash when replacing parts of text inputs with content: url(...)
3075         https://bugs.webkit.org/show_bug.cgi?id=101133
3076
3077         Reviewed by Kent Tamura.
3078
3079         Disable directly setting content of elements in an input element's
3080         shadow dom tree, because the setting breaks input element's behavior.
3081
3082         Tests: fast/forms/number/number-content-url-crash.html
3083                fast/forms/search/search-content-url-crash.html
3084
3085         * css/html.css:
3086         (input::-webkit-textfield-decoration-container):
3087         Use important to disable overriding an input element's content
3088         property.
3089         * html/TextFieldInputType.cpp:
3090         (WebCore::TextFieldInputType::attach):
3091         Added ASSERTION. No content should be applied to
3092         input::-webkit-textfield-decoration-container.
3093
3094 2012-11-14  Kentaro Hara  <haraken@chromium.org>
3095
3096         Unreviewed. Rebaselined run-bindings-tests results.
3097
3098         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
3099         (WebCore::V8TestOverloadedConstructors::constructor1Callback):
3100         (WebCore::V8TestOverloadedConstructors::constructor2Callback):
3101         (WebCore::V8TestOverloadedConstructors::constructor3Callback):
3102         (WebCore::V8TestOverloadedConstructors::constructor4Callback):
3103         (WebCore::V8TestOverloadedConstructors::wrapSlow):
3104
3105 2012-11-14  Anton Muhin  <antonm@chromium.org>
3106
3107         Provide return types for custom WebGLRenderingContext methods
3108         https://bugs.webkit.org/show_bug.cgi?id=100777
3109
3110         Reviewed by Kenneth Russell.
3111
3112         No new tests as doesn't change generated code.
3113
3114         * html/canvas/WebGLRenderingContext.idl:
3115
3116 2012-11-14  Kent Tamura  <tkent@chromium.org>
3117
3118         Support for localization tests of calendar picker
3119         https://bugs.webkit.org/show_bug.cgi?id=102181
3120
3121         Reviewed by Kentaro Hara.
3122
3123         Introduce DateTimeChooserParameters::locale to inform locale to
3124         DateTimeChooser implementations. However we pass defaultLanguage
3125         unless tests calls internals.settings.
3126         setLangAttributeAwareFormControlUIEnabled(true) explicitly.
3127
3128         Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ru.html
3129
3130         * html/HTMLInputElement.cpp:
3131         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
3132         Set DateTimeChooserParameters::locale up.
3133         * platform/DateTimeChooser.h:
3134         (DateTimeChooserParameters): Add 'locale' member.
3135
3136 2012-11-14  Pavel Feldman  <pfeldman@chromium.org>
3137
3138         Web Inspector: highlight is not updating as one edits CSS properties
3139         https://bugs.webkit.org/show_bug.cgi?id=102191
3140
3141         Reviewed by Alexander Pavlov.
3142
3143         We should update highlight upon layout / style recalculation.
3144
3145         * inspector/InspectorInstrumentation.cpp:
3146         (WebCore):
3147         (WebCore::InspectorInstrumentation::didRecalculateStyleImpl):
3148         * inspector/InspectorPageAgent.cpp:
3149         (WebCore::InspectorPageAgent::InspectorPageAgent):
3150         (WebCore::InspectorPageAgent::enable):
3151         (WebCore::InspectorPageAgent::disable):
3152         (WebCore::InspectorPageAgent::domContentEventFired):
3153         (WebCore::InspectorPageAgent::didPaint):
3154         (WebCore::InspectorPageAgent::didLayout):
3155         (WebCore::InspectorPageAgent::didScroll):
3156         (WebCore):
3157         (WebCore::InspectorPageAgent::didRecalculateStyle):
3158         * inspector/InspectorPageAgent.h:
3159
3160 2012-11-14  Sheriff Bot  <webkit.review.bot@gmail.com>
3161
3162         Unreviewed, rolling out r134566.
3163         http://trac.webkit.org/changeset/134566
3164         https://bugs.webkit.org/show_bug.cgi?id=102197
3165
3166         "it broke Chromium Android Release build" (Requested by
3167         haraken on #webkit).
3168
3169         * html/HTMLInputElement.cpp:
3170         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
3171         * platform/DateTimeChooser.h:
3172         (DateTimeChooserParameters):
3173
3174 2012-11-08  Vsevolod Vlasov  <vsevik@chromium.org>
3175
3176         Web Inspector: No content available for requests made from flash
3177         https://bugs.webkit.org/show_bug.cgi?id=101560
3178
3179         Reviewed by Pavel Feldman.
3180
3181         Network request data is now saved to inspector cache in following cases:
3182          - Error status code;
3183          - No cached resource available;
3184          - Cached resource has ShouldNotBufferData option set.
3185         Drive-by: refactored didReceiveResponse logic to be clearer.
3186
3187         * inspector/InspectorResourceAgent.cpp:
3188         (WebCore::InspectorResourceAgent::didReceiveResponse):
3189         (WebCore::InspectorResourceAgent::didReceiveData):
3190         * loader/cache/CachedResource.h:
3191         (WebCore::CachedResource::shouldBufferData):
3192
3193 2012-11-14  Shinya Kawanaka  <shinyak@chromium.org>
3194
3195         Changing pseudoClass (:target) should cause distribution
3196         https://bugs.webkit.org/show_bug.cgi?id=101699
3197
3198         Reviewed by Hajime Morita.
3199
3200         When cssTarget element is changed, we might have to invalidate distribution. We check its necessity
3201         by consulting with SelectRuleFeatureSet.
3202
3203         We also implement invalidateParentDistributionIfNecessary for all collected features in this patch.
3204
3205         Test: fast/dom/shadow/pseudoclass-update-target.html
3206
3207         * dom/Document.cpp:
3208         (WebCore::Document::setCSSTarget):
3209         * dom/ElementShadow.cpp:
3210         (WebCore::invalidateParentDistributionIfNecessary):
3211         (WebCore):
3212         * dom/ElementShadow.h:
3213         (WebCore):
3214         * html/shadow/SelectRuleFeatureSet.h:
3215         (WebCore::SelectRuleFeatureSet::hasSelectorFor):
3216         (SelectRuleFeatureSet):
3217
3218 2012-11-14  Kentaro Hara  <haraken@chromium.org>
3219
3220         [V8] DOM wrapper objects should be collected in minor GC cycles
3221         https://bugs.webkit.org/show_bug.cgi?id=98725
3222
3223         Reviewed by Adam Barth.
3224
3225         Previously minor GC cycles cannot collect DOM Nodes. All DOM Nodes
3226         have to survive two minor GC cycles, be promoted to the old space
3227         and wait for a heavy major GC cycle.
3228
3229         This patch enables V8 to collect DOM Nodes in minor GC cycles.
3230         For real world applications, I confirmed that minor GC cycles
3231         reclaims a substantial amount of memory (24 MB for Facebook,
3232         235 MB for Google Calendar) with acceptable overhead (~10 ms
3233         per minor GC cycle). No performance regression in Dromaeo
3234         DOM tests.
3235
3236         A design document: https://docs.google.com/a/google.com/document/d/16DeHrzkm3cO9XCPT1aK3Y5qgUxXB3RFmueqQWYmN2rI/edit
3237         Performance results: https://docs.google.com/a/google.com/document/d/1h0-EsHu7T0sSMuZm5eE0r1e8sCAzY3weLvsDUpOSngE/edit
3238         A slide: https://docs.google.com/a/google.com/presentation/d/1uifwVYGNYTZDoGLyCb7sXa7g49mWNMW2gaWvMN5NLk8/edit#slide=id.p
3239
3240         * bindings/v8/IntrusiveDOMWrapperMap.h:
3241         (WebCore::IntrusiveDOMWrapperMap::set):
3242         * bindings/v8/V8DOMWindowShell.cpp:
3243         (WebCore::initializeV8IfNeeded):
3244         * bindings/v8/V8GCController.cpp:
3245         (WebCore):
3246         (WebCore::gcTree):
3247         (WebCore::V8GCController::newWrapperBorn):
3248         (WebCore::V8GCController::gcPrologue):
3249         (WebCore::V8GCController::minorGCPrologue):
3250         (WebCore::V8GCController::majorGCPrologue):
3251         (WebCore::V8GCController::gcEpilogue):
3252         (WebCore::V8GCController::minorGCEpilogue):
3253         (WebCore::V8GCController::majorGCEpilogue):
3254         * bindings/v8/V8GCController.h:
3255         (WebCore):
3256         (V8GCController):
3257         * bindings/v8/WorkerContextExecutionProxy.cpp:
3258         (WebCore::WorkerContextExecutionProxy::initIsolate):
3259         * dom/Element.cpp:
3260         (WebCore::Element::focus):
3261         * dom/Node.h:
3262         (WebCore::Node::inEden):
3263         (WebCore::Node::setEden):
3264         (Node):
3265
3266 2012-11-14  Kentaro Hara  <haraken@chromium.org>
3267
3268         [V8] Replace setDOMWrapper() + setJSWrapperForDOMObject() with createDOMWrapper()
3269         https://bugs.webkit.org/show_bug.cgi?id=101917
3270
3271         Reviewed by Adam Barth.
3272
3273         setJSWrapperForDOMObject() is always coupled with setDOMWrapper().
3274         We can replace setDOMWrapper() + setJSWrapperForDOMObject() with
3275         createDOMWrapper(). (c.f. CREATE_DOM_WRAPPER() in JSC)
3276
3277         No tests. No change in behavior.
3278
3279         * bindings/scripts/CodeGeneratorV8.pm:
3280         (GenerateConstructorCallback):
3281         (GenerateEventConstructorCallback):
3282         (GenerateNamedConstructorCallback):
3283         (GenerateToV8Converters):
3284         * bindings/v8/V8DOMWindowShell.cpp:
3285         (WebCore::V8DOMWindowShell::installDOMWindow):
3286         * bindings/v8/V8DOMWrapper.cpp:
3287         (WebCore::V8DOMWrapper::instantiateV8Object):
3288         * bindings/v8/V8DOMWrapper.h:
3289         (V8DOMWrapper):
3290         (WebCore::V8DOMWrapper::createDOMWrapper):
3291         * bindings/v8/WorkerContextExecutionProxy.cpp:
3292         (WebCore::WorkerContextExecutionProxy::initializeIfNeeded):
3293         * bindings/v8/custom/V8ArrayBufferCustom.cpp:
3294         (WebCore::V8ArrayBuffer::constructorCallback):
3295         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
3296         (WebCore::wrapArrayBufferView):
3297         (WebCore::constructWebGLArray):
3298         * bindings/v8/custom/V8DOMFormDataCustom.cpp:
3299         (WebCore::V8DOMFormData::constructorCallback):
3300         * bindings/v8/custom/V8DataViewCustom.cpp:
3301         (WebCore::V8DataView::constructorCallback):
3302         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
3303         (WebCore::v8HTMLImageElementConstructorCallback):
3304         * bindings/v8/custom/V8IntentConstructor.cpp:
3305         (WebCore::V8Intent::constructorCallback):
3306         * bindings/v8/custom/V8MessageChannelConstructor.cpp:
3307         (WebCore::V8MessageChannel::constructorCallback):
3308         * bindings/v8/custom/V8MutationObserverCustom.cpp:
3309         (WebCore::V8MutationObserver::constructorCallback):
3310         * bindings/v8/custom/V8WebKitPointConstructor.cpp:
3311         (WebCore::V8WebKitPoint::constructorCallback):
3312         * bindings/v8/custom/V8WebSocketCustom.cpp:
3313         (WebCore::V8WebSocket::constructorCallback):
3314         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
3315         (WebCore::V8XMLHttpRequest::constructorCallback):
3316
3317 2012-11-14  Kent Tamura  <tkent@chromium.org>
3318
3319         Support for localization tests of calendar picker
3320         https://bugs.webkit.org/show_bug.cgi?id=102181
3321
3322         Reviewed by Kentaro Hara.
3323
3324         Introduce DateTimeChooserParameters::locale to inform locale to
3325         DateTimeChooser implementations. However we pass defaultLanguage
3326         unless tests calls internals.settings.
3327         setLangAttributeAwareFormControlUIEnabled(true) explicitly.
3328
3329         Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-ru.html
3330
3331         * html/HTMLInputElement.cpp:
3332         (WebCore::HTMLInputElement::setupDateTimeChooserParameters):
3333         Set DateTimeChooserParameters::locale up.
3334         * platform/DateTimeChooser.h:
3335         (DateTimeChooserParameters): Add 'locale' member.
3336
3337 2012-11-14  Alexei Filippov  <alph@chromium.org>
3338
3339         Web Inspector: Show total memory in the NMI snapshot header
3340         https://bugs.webkit.org/show_bug.cgi?id=101922
3341
3342         Reviewed by Pavel Feldman.
3343
3344         * inspector/front-end/NativeMemorySnapshotView.js:
3345         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
3346         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked):
3347
3348 2012-11-14  Jan Keromnes  <janx@linux.com>
3349
3350         Web Inspector: CodeMirrorTextEditor fails to scroll breakpoint into view after the first time
3351         https://bugs.webkit.org/show_bug.cgi?id=102142
3352
3353         Reviewed by Pavel Feldman.
3354
3355         Calling revealLine in highlightLine like in DefaultTextEditor does the trick.
3356
3357         * inspector/front-end/CodeMirrorTextEditor.js:
3358         (WebInspector.CodeMirrorTextEditor.prototype.highlightLine):
3359
3360 2012-11-13  Kent Tamura  <tkent@chromium.org>
3361
3362         Use menulist-button instead of menulist for date/time input types
3363         https://bugs.webkit.org/show_bug.cgi?id=101886
3364
3365         Reviewed by Hajime Morita.
3366
3367         Both of Chromium-Android and iOS use -webkit-appearance:menulist-button,
3368         not menulist. We had better apply common one by default.
3369
3370         No new tests. Covered by fast/forms/*/*-appearance-*.html.
3371
3372         * css/html.css:
3373         (input[type="date"]): Switch menulist-button from menulist.
3374         (input[type="datetime"]): Ditto.
3375         (input[type="datetime-local"]): Ditto.
3376         (input[type="month"]): Ditto.
3377         (input[type="time"]): Ditto.
3378         (input[type="week"]): Ditto.
3379         (input::-webkit-date-and-time-value):
3380         Add top, right, bottom margins. The right margin is important when
3381         dir=rtl is specified.
3382         whitespace:pre is needed to align baseline in a case of empty values.
3383         * css/themeChromiumAndroid.css:
3384         Remove redundant style declaration.
3385         * css/themeWin.css:
3386         Remove padding adjustment for date/time input types. It is for
3387         textfields.
3388
3389 2012-11-13  Vincent Scheib  <scheib@chromium.org>
3390
3391         Remove RuntimeEnabledFeatures::isPointerLockEnabled.
3392         https://bugs.webkit.org/show_bug.cgi?id=102107
3393
3394         Reviewed by Adam Barth.
3395
3396         The runtime flag is always true now that the feature is enabled by default in Chromium.
3397
3398         * bindings/generic/RuntimeEnabledFeatures.cpp:
3399         (WebCore):
3400         * bindings/generic/RuntimeEnabledFeatures.h:
3401         (RuntimeEnabledFeatures):
3402         * dom/Document.idl:
3403         * dom/Element.idl:
3404         * dom/MouseEvent.idl:
3405
3406 2012-11-13  Eugene Klyuchnikov  <eustas.bug@gmail.com>
3407
3408         Web Inspector: JsDoc-annotate KeyboardShortcuts
3409         https://bugs.webkit.org/show_bug.cgi?id=101301
3410
3411         Reviewed by Pavel Feldman.
3412
3413         JsDoc-annotate KeyboardShortcuts to improve readability.
3414
3415         * inspector/front-end/AdvancedSearchController.js: Fix parameter type.
3416         * inspector/front-end/KeyboardShortcut.js: Add annotations.
3417         * inspector/front-end/Panel.js: Make event parameter typed.
3418         * inspector/front-end/inspector.js: Ditto.
3419
3420 2012-11-13  Eugene Klyuchnikov  <eustas.bug@gmail.com>
3421
3422         Web Inspector: Extract common interface for StatusBarButton and StatusBarCombo
3423         https://bugs.webkit.org/show_bug.cgi?id=101907
3424
3425         Reviewed by Pavel Feldman.
3426
3427         Status bar control element should have common interface for
3428         easier management.
3429         In this patch getter/setter for StatusBarButton "disabled" are replaced
3430         with regular functions "enabled"/"setEnabled"; added "setEnabled"
3431         to StatusBarCombo; added new base class StatusBarItem with
3432         method "setEnabled" and member "element".
3433
3434         * inspector/front-end/CPUProfileView.js: Adopted refactoring.
3435         * inspector/front-end/DockController.js: Ditto.
3436         * inspector/front-end/ScriptsPanel.js: Ditto.
3437         * inspector/front-end/TimelinePanel.js: Ditto.
3438         * inspector/front-end/inspector.js: Ditto.
3439         * inspector/front-end/StatusBarButton.js:
3440         (WebInspector.StatusBarItem): Added.
3441         (WebInspector.StatusBarButton): Replaced getter/setter with
3442         regular functions.
3443         (WebInspector.StatusBarComboBox.prototype.setEnabled): Added.
3444
3445 2012-11-13  Eugene Klyuchnikov  <eustas.bug@gmail.com>
3446
3447         Web Inspector: Console: update tab/shift-tab shortcut description.
3448         https://bugs.webkit.org/show_bug.cgi?id=102175
3449
3450         Reviewed by Pavel Feldman.
3451
3452         For "Tab / Shift-Tab" it said "Next/previous suggestion".
3453         Actually, shift-tab to do nothing, and tab auto-completes common prefix.
3454
3455         * English.lproj/localizedStrings.js: Replaced string.
3456         * inspector/front-end/ConsoleView.js: Updated shortcut registration.
3457
3458 2012-11-13  Dana Jansens  <danakj@chromium.org>
3459
3460         [chromium] Pass showDebugBorders directly to WebLayerTreeSettings, don't use the GraphicsLayer border width setting.
3461         https://bugs.webkit.org/show_bug.cgi?id=102130
3462
3463         Reviewed by James Robinson.
3464
3465         The current method of setting debug borders on GraphicsLayers requires
3466         every GraphicsLayerClient to set the value on the layer(s) it
3467         represents. This skips the NonCompositedContentHost as well as any
3468         other clients other than RenderLayerBacking - including layers from the
3469         inspector.
3470
3471         Instead, pass the debug border setting directly to the
3472         WebLayerTreeSettings where the compositor can use the flag to enable
3473         borders on all layers globally.
3474
3475         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
3476         (WebCore::GraphicsLayerChromium::GraphicsLayerChromium):
3477         (WebCore::GraphicsLayerChromium::updateMasksToBounds):
3478         (WebCore::GraphicsLayerChromium::updateLayerIsDrawable):
3479         (WebCore::GraphicsLayerChromium::setupContentsLayer):
3480         * platform/graphics/chromium/GraphicsLayerChromium.h:
3481         (GraphicsLayerChromium):
3482
3483 2012-11-13  Kunihiko Sakamoto  <ksakamoto@chromium.org>
3484
3485         Enable calendar picker for input types datetime/datetime-local
3486         https://bugs.webkit.org/show_bug.cgi?id=101889
3487
3488         Reviewed by Kent Tamura.
3489
3490         This adds calendar picker to <input type=datetime> and <input type=datetime-local>.
3491         When a user choose a date from calendar picker, year/month/day fields of the input
3492         element are updated and hour/minute/second fields are unchanged.
3493
3494         Tests: platform/chromium/fast/forms/calendar-picker/calendar-picker-datetime-local.html
3495                platform/chromium/fast/forms/calendar-picker/calendar-picker-datetime.html
3496
3497         * Resources/pagepopups/calendarPicker.js: Day.parse accepts datetime string (just drops time part).
3498         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
3499         (WebCore::BaseMultipleFieldsDateAndTimeInputType::pickerIndicatorChooseValue):
3500         If the given value is not valid for the element, try to parse it as a date string.
3501         * html/DateTimeInputType.cpp:
3502         (WebCore::DateTimeInputType::formatDateTimeFieldsState): DateTimeFieldsState::month() returns 1-12, not 0-11.
3503         * html/DateTimeLocalInputType.cpp:
3504         (WebCore::DateTimeLocalInputType::formatDateTimeFieldsState): Ditto.
3505         * html/shadow/DateTimeEditElement.cpp:
3506         (WebCore::DateTimeEditElement::setOnlyYearMonthDay): Added.
3507         (WebCore):
3508         * html/shadow/DateTimeEditElement.h:
3509         (DateTimeEditElement):
3510         * rendering/RenderThemeChromiumCommon.cpp:
3511         (WebCore::RenderThemeChromiumCommon::supportsCalendarPicker): Return true for datetime and datetimelocal too.
3512
3513 2012-11-13  Sheriff Bot  <webkit.review.bot@gmail.com>
3514
3515         Unreviewed, rolling out r134524.
3516         http://trac.webkit.org/changeset/134524
3517         https://bugs.webkit.org/show_bug.cgi?id=102177
3518
3519         "Chromiium build broken" (Requested by haraken on #webkit).
3520
3521         * WebCore.gyp/WebCore.gyp:
3522         * WebCore.gypi:
3523         * rendering/RenderThemeChromiumFontProvider.cpp: Removed.
3524         * rendering/RenderThemeChromiumFontProvider.h: Removed.
3525         * rendering/RenderThemeChromiumFontProviderLinux.cpp: Removed.
3526         * rendering/RenderThemeChromiumFontProviderWin.cpp: Removed.
3527         * rendering/RenderThemeChromiumSkia.cpp:
3528         (WebCore::RenderThemeChromiumSkia::defaultGUIFont):
3529         (WebCore::RenderThemeChromiumSkia::systemFont):
3530         (WebCore::RenderThemeChromiumSkia::setDefaultFontSize):
3531         * rendering/RenderThemeChromiumSkia.h:
3532         (RenderThemeChromiumSkia):
3533         * rendering/RenderThemeChromiumWin.cpp:
3534         (WebCore):
3535         (WebCore::getNonClientMetrics):
3536         (WebCore::systemFontSize):
3537         (WebCore::pointsToPixels):
3538         (WebCore::RenderThemeChromiumWin::systemFont):
3539         (WebCore::RenderThemeChromiumWin::setDefaultFontSize):
3540         * rendering/RenderThemeChromiumWin.h:
3541         (RenderThemeChromiumWin):
3542
3543 2012-11-13  KyungTae Kim  <ktf.kim@samsung.com>
3544
3545         Fix compile warning [-Wsign-compare]
3546         https://bugs.webkit.org/show_bug.cgi?id=101458
3547
3548         Reviewed by Alexey Proskuryakov.
3549
3550         Currently, lossy check has been done by comparing file size(posix signed integral value) with conversioned(standard c++ unsigned integral value).
3551         However, it leads -Wsign-compare compile warning.
3552         Therefore, this patch assigns the file size to the biggest possible unsigned variable, then does the lossy check.
3553
3554         * platform/posix/SharedBufferPOSIX.cpp:
3555         (WebCore::SharedBuffer::createWithContentsOfFile):
3556
3557 2012-11-13  Keishi Hattori  <keishi@webkit.org>
3558
3559         Enable datalist UI for input types week and month
3560         https://bugs.webkit.org/show_bug.cgi?id=102041
3561
3562         Reviewed by Kent Tamura.
3563
3564         Enabling datalist UI for input types week and month.
3565
3566         No new tests. Tests will be added later in Bug 102039 and Bug 102040.
3567
3568         * rendering/RenderThemeChromiumCommon.cpp:
3569         (WebCore::RenderThemeChromiumCommon::supportsDataListUI): Add month and week to the list.
3570
3571 2012-11-13  Eberhard Graether  <egraether@google.com>
3572
3573         checkbox to toggle FPS counter in the inspector's settings
3574         https://bugs.webkit.org/show_bug.cgi?id=99660
3575
3576         Reviewed by Pavel Feldman.
3577
3578         Added a checkbox to the inspector's settings to toggle a FPS counter. The checkbox appears when InspectorClient::canShowFPSCounter() returns true.
3579
3580         No new tests.
3581
3582         * English.lproj/localizedStrings.js:
3583         * inspector/Inspector.json:
3584         * inspector/InspectorClient.h:
3585         (WebCore::InspectorClient::canShowFPSCounter):
3586         (WebCore::InspectorClient::setShowFPSCounter):
3587         (InspectorClient):
3588         * inspector/InspectorPageAgent.cpp:
3589         (PageAgentState):
3590         (WebCore::InspectorPageAgent::enable):
3591         (WebCore::InspectorPageAgent::disable):
3592         (WebCore::InspectorPageAgent::canShowFPSCounter):
3593         (WebCore):
3594         (WebCore::InspectorPageAgent::setShowFPSCounter):
3595         * inspector/InspectorPageAgent.h:
3596         * inspector/front-end/Settings.js:
3597         * inspector/front-end/SettingsScreen.js:
3598         (WebInspector.GenericSettingsTab):
3599         (WebInspector.GenericSettingsTab.prototype.get _showFPSCounterChanged):
3600         * inspector/front-end/inspector.js:
3601         (WebInspector.doLoadedDone):
3602
3603 2012-11-13  Shinya Kawanaka  <shinyak@chromium.org>
3604
3605         Collect necessary features for SelectRuleFeatureSet
3606         https://bugs.webkit.org/show_bug.cgi?id=102160
3607
3608         Reviewed by Dimitri Glazkov.
3609
3610         When pseudo class is changed, we might have to invalidate distribution. To determine whether we should invalidate
3611         distribution, we would like to collect RuleFeature from select attributes.
3612
3613         According to ShadowDOM spec, we have to collect the following pseudo classes: checked, enabled, disabled,
3614         indeterminate, link, target, and visited. We collect them in this patch.
3615
3616         Test: fast/dom/shadow/shadow-select-attribute-featureset.html
3617
3618         * html/shadow/SelectRuleFeatureSet.cpp:
3619         (WebCore::SelectRuleFeatureSet::SelectRuleFeatureSet): Uses int as bitset so that we can use bit operator.
3620         (WebCore::SelectRuleFeatureSet::add):
3621         (WebCore::SelectRuleFeatureSet::clear):
3622         (WebCore::SelectRuleFeatureSet::collectFeaturesFromSelector): Collects necessary features from CSSSelector.
3623         * html/shadow/SelectRuleFeatureSet.h:
3624         (WebCore::SelectRuleFeatureSet::hasSelectorForChecked):
3625         (WebCore::SelectRuleFeatureSet::hasSelectorForEnabled):
3626         (WebCore::SelectRuleFeatureSet::hasSelectorForDisabled):
3627         (WebCore::SelectRuleFeatureSet::hasSelectorForIndeterminate):
3628         (WebCore::SelectRuleFeatureSet::hasSelectorForLink):
3629         (WebCore::SelectRuleFeatureSet::hasSelectorForTarget):
3630         (WebCore::SelectRuleFeatureSet::hasSelectorForVisited):
3631         (SelectRuleFeatureSet):
3632         (WebCore::SelectRuleFeatureSet::setSelectRuleFeature):
3633         (WebCore::SelectRuleFeatureSet::hasSelectorFor):
3634         * testing/Internals.cpp:
3635         (WebCore::Internals::hasSelectorForPseudoClassInShadow):
3636         (WebCore):
3637         * testing/Internals.h:
3638         (Internals):
3639         * testing/Internals.idl:
3640
3641 2012-11-13  Andreas Kling  <kling@webkit.org>
3642
3643         Move inline style logic from ElementAttributeData to StyledElement.
3644         <http://webkit.org/b/102120>
3645
3646         Reviewed by Antti Koivisto.
3647
3648         Move all the logic dealing with element inline style from ElementAttributeData to StyledElement.
3649         No difference in behavior, just making ElementAttributeData dumber.
3650
3651         * css/StylePropertySet.cpp:
3652         * css/StylePropertySet.h:
3653         (WebCore::StylePropertySet::hasCSSOMWrapper):
3654         (WebCore::StylePropertySet::cssStyleDeclaration):
3655
3656             Added as complements to ensureCSSStyleDeclaration() for the case where we don't want
3657             to instantiate a CSSOM wrapper unnecessarily.
3658
3659         * dom/StyledElement.h:
3660         (WebCore::StyledElement::inlineStyle):
3661         * dom/ElementAttributeData.cpp:
3662         (WebCore::ImmutableElementAttributeData::ImmutableElementAttributeData):
3663         (WebCore::MutableElementAttributeData::MutableElementAttributeData):
3664         (WebCore::ElementAttributeData::reportMemoryUsage):
3665         * dom/ElementAttributeData.h:
3666         (WebCore::ElementAttributeData::inlineStyle):
3667         (ElementAttributeData):
3668
3669             Renamed m_inlineStyleDecl to m_inlineStyle. Finally.
3670
3671         * dom/StyledElement.cpp:
3672         (WebCore::StyledElement::~StyledElement):
3673
3674             Detach the CSSOM wrapper from the inline style if there is one.
3675
3676         (WebCore::StyledElement::ensureMutableInlineStyle):
3677         (WebCore::StyledElement::style):
3678
3679             Renamed ensureInlineStyle() to ensureMutableInlineStyle() since that's what it
3680             actually does. Update call sites accordingly.
3681
3682         (WebCore::StyledElement::inlineStyleCSSOMWrapper):
3683
3684             Added helper to get the CSSOM wrapper for the element's inline style if there is one.
3685
3686         (WebCore::StyledElement::styleAttributeChanged):
3687
3688             Do the work to parse/update/replace the inline style attribute here instead of
3689             in an ElementAttributeData method.
3690
3691         (WebCore::StyledElement::setInlineStyleProperty):
3692         (WebCore::StyledElement::removeInlineStyleProperty):
3693         (WebCore::StyledElement::removeAllInlineStyleProperties):
3694         * editing/ApplyStyleCommand.cpp:
3695         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
3696         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
3697         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
3698         * editing/ReplaceSelectionCommand.cpp:
3699         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
3700         * html/canvas/CanvasStyle.cpp:
3701         (WebCore::currentColor):
3702
3703             s/ensureInlineStyle/ensureMutableInlineStyle/
3704
3705 2012-11-13  Li Yin  <li.yin@intel.com>
3706
3707         fast/forms/file/input-file-write-files.html should cover correct setting value
3708         https://bugs.webkit.org/show_bug.cgi?id=100085
3709
3710         Reviewed by Kentaro Hara.
3711
3712         Fix the GObject and Objective C bindings comparibility issue. Preserving existing
3713         behavior for those may be important in idl.
3714
3715         No new tests, because fast/forms/file/input-file-value.html has covered it.
3716
3717         * html/HTMLInputElement.idl:
3718
3719 2012-11-13  KyungTae Kim  <ktf.kim@samsung.com>
3720
3721         [EFL] Fix build warning in NetworkStateNotifierEfl.cpp
3722         https://bugs.webkit.org/show_bug.cgi?id=102061
3723
3724         Reviewed by Gyuyoung Kim.
3725
3726         The second argument for NLMSG_OK needs to be unsigned to avoid the -Wsign-compare warning.
3727
3728         * platform/network/efl/NetworkStateNotifierEfl.cpp:
3729         (WebCore::readSocketCallback):
3730
3731 2012-11-13  Sami Kyostila  <skyostil@chromium.org>
3732
3733         Don't mark scrolling contents as dirty if RenderLayerBacking is going away
3734         https://bugs.webkit.org/show_bug.cgi?id=101947
3735
3736         Reviewed by Simon Fraser.
3737
3738         When a scrolling contents graphics layer is created or destroyed, the
3739         associated graphics layer is marked as needing display because some of
3740         the painted content may have migrated between the primary graphics layer
3741         and the scrolling layer.
3742
3743         This causes a problem when the RenderLayerBacking is being destroyed,
3744         because setNeedsDisplay() needs to check from the compositor whether to
3745         track repaints or not. If the RenderLayerBacking is being destroyed, the
3746         value returned by compositor() is garbage and this causes a crash.
3747
3748         This patch fixes the problem by making RenderLayer::compositor() return a null
3749         pointer when the renderer no longer has a view.
3750
3751         Covered by existing layout tests in compositing/overflow/.
3752
3753         * rendering/RenderLayer.cpp:
3754         (WebCore::RenderLayer::compositor):
3755
3756 2012-11-13  Erik Arvidsson  <arv@chromium.org>
3757
3758         Update DOMException name: InvalidCharacterError
3759         https://bugs.webkit.org/show_bug.cgi?id=102128
3760
3761         Reviewed by Darin Adler.
3762
3763         Patch 5 of 25 to update DOMException name to match the spec and Firefox.
3764
3765         Updated existing tests.
3766
3767         * dom/DOMCoreException.cpp:
3768
3769 2012-11-13  Joshua Bell  <jsbell@chromium.org>
3770
3771         IndexedDB: Run multiple tasks per transaction tick
3772         https://bugs.webkit.org/show_bug.cgi?id=97738
3773
3774         Reviewed by Tony Chang.
3775
3776         Process multiple tasks from the pending queue(s) when the timer fires. The
3777         task may initiate new tasks that change which queue is active (e.g. indexing
3778         operations) so the loop must re-check each tick which queue to use.
3779
3780         In DumpRenderTree, time to make 20k puts/20k gets dropped from 3.2s to 2.0s (-37%);
3781         in Chromium's content_shell, the time dropped from 8.1s to 4.6s (-42%).
3782
3783         No new tests - just perf improvements, covered by (nearly) all existing IDB tests.
3784
3785         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
3786         (WebCore::IDBTransactionBackendImpl::abort): Use takeFirst() to clean up code.
3787         (WebCore::IDBTransactionBackendImpl::taskTimerFired): Process as many tasks as are available.
3788
3789 2012-11-13  Elliott Sprehn  <esprehn@chromium.org>
3790
3791         Disable frame loading instead of throwing exceptions on subtree modifications in ChildFrameDisconnector
3792         https://bugs.webkit.org/show_bug.cgi?id=102012
3793
3794         Reviewed by Ojan Vafai.
3795
3796         Previously if you modified the subtree that was being removed from a
3797         removeChild from inside an unload handler on an <iframe> inside the
3798         subtree you'd get an exception which is wrong. Instead we just need to
3799         disable all frame loading there.
3800
3801         This works because either the subtree will be removed and the frame never
3802         loading doesn't matter, or some section of the subtree that contains the
3803         frame will be moved to another part of the document which will cause the
3804         frame to load when it's inserted there.
3805
3806         I also added a check for <object> elements. It doesn't seem this is actually
3807         reachable in the existing code, but I'm not entirely sure since the frame
3808         loading and object/plugin handling is very confusing.
3809
3810         A better fix could be to repeatedly walk the subtree until all frames
3811         were disconnected or some iteration limit was hit and then force all leftover
3812         subframes to disconnect without firing unload handlers but this is such an
3813         edge case I don't think the complexity is necessary.
3814
3815         Test: fast/frames/modifications-in-subtree-unload.html
3816
3817         * dom/ContainerNodeAlgorithms.h:
3818         (WebCore::ChildFrameDisconnector::ChildFrameDisconnector):
3819         (WebCore::ChildFrameDisconnector::~ChildFrameDisconnector):
3820         (ChildFrameDisconnector):
3821         (WebCore::ChildFrameDisconnector::disconnect):
3822         * dom/Node.cpp:
3823         (WebCore::checkAcceptChild): Removed exception.
3824         * html/HTMLFrameElementBase.cpp:
3825         (WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions): Check canLoadFrame().
3826         * html/HTMLFrameOwnerElement.h:
3827         (SubframeLoadingDisabler):
3828         (WebCore::SubframeLoadingDisabler::SubframeLoadingDisabler):
3829         (WebCore::SubframeLoadingDisabler::~SubframeLoadingDisabler):
3830         (WebCore::SubframeLoadingDisabler::canLoadFrame):
3831           Returns true if frames can be loaded in the subtree.
3832         (WebCore::SubframeLoadingDisabler::disabledSubtreeRoots):
3833         * html/HTMLObjectElement.cpp:
3834         (WebCore::HTMLObjectElement::updateWidget):
3835           Check canLoadFrame(). I think this case is impossible, but it's better
3836           to be safe than sorry later.
3837
3838 2012-11-13  Joshua Bell  <jsbell@chromium.org>
3839
3840         [V8] Add missing ENABLE(SVG) test in header
3841         https://bugs.webkit.org/show_bug.cgi?id=102143
3842
3843         Reviewed by Kentaro Hara.
3844
3845         Need to wrap the #include of a header that's only conditionally generated.
3846
3847         Fixes build error if compiling e.g. w/ GYP_DEFINES="enable_svg=0"
3848
3849         * bindings/v8/custom/V8ElementCustom.cpp:
3850
3851 2012-11-13  Jon Lee  <jonlee@apple.com>
3852
3853         Automatically run small plugins
3854         https://bugs.webkit.org/show_bug.cgi?id=102148
3855         <rdar://problem/12695560>
3856
3857         Reviewed by Darin Adler.
3858
3859         * rendering/RenderEmbeddedObject.h: Promote layout() to protected.
3860         * rendering/RenderSnapshottedPlugIn.cpp: Add constants for threshold size for plugins that will auto-start.
3861         (WebCore::RenderSnapshottedPlugIn::layout): After layout, obtain the width and height of the element.
3862         If either dimension is 0, or the overall size of the plugin is smaller that the threshold size, move the
3863         display state to Playing. Assuming we will always layout before first paint, changing the state here
3864         should be safe.
3865         * rendering/RenderSnapshottedPlugIn.h:
3866
3867 2012-11-13  Kenneth Russell  <kbr@google.com>
3868
3869         Notify embedder of lost contexts and allow overriding of WebGL support
3870         https://bugs.webkit.org/show_bug.cgi?id=101826
3871
3872         Reviewed by Adam Barth.
3873
3874         Add hooks notifying the embedder when OpenGL contexts are lost and
3875         allowing overriding of WebGL support on a per-frame basis.
3876
3877         No tests yet; don't know how to test this solely within WebKit.
3878         Currently developing tests in the Chromium port exercising the
3879         notifications end-to-end. Once those are in place, I'm prepared to
3880         investigate adding tests for all ports.
3881
3882         * html/canvas/WebGLRenderingContext.cpp:
3883         (WebCore):
3884         (WebCore::WebGLRenderingContext::create):
3885           Check whether embedder vetoes creation of new WebGL contexts.
3886         (WebCore::WebGLRenderingContext::loseContextImpl):
3887           Notify embedder that context was lost.
3888         (WebCore::WebGLRenderingContext::maybeRestoreContext):
3889           Check whether embedder vetoes restoration of existing WebGL contexts.
3890         * loader/FrameLoaderClient.h:
3891         (FrameLoaderClient):
3892         (WebCore::FrameLoaderClient::allowWebGL):
3893         (WebCore::FrameLoaderClient::didLoseWebGLContext):
3894           Hooks notifying embedder of lost contexts and asking permission to run WebGL.
3895
3896 2012-11-13  Scott Violet  <sky@chromium.org>
3897
3898         [Chromium] Refactor theme font lookup into a factory
3899         https://bugs.webkit.org/show_bug.cgi?id=101949
3900
3901         Reviewed by Tony Chang.
3902
3903         This will ultimately allow us to use what is currently in RenderThemeChromiumLinux on windows.
3904
3905         No new tests. Refactoring only.
3906
3907         * WebCore.gyp/WebCore.gyp:
3908         * WebCore.gypi:
3909         * rendering/RenderThemeChromiumFontProvider.cpp: Added.
3910         (WebCore):
3911         (WebCore::RenderThemeChromiumFontProvider::defaultGUIFont): Moved into RenderThemeFontProvider.
3912         * rendering/RenderThemeChromiumFontProvider.h: Added.
3913         (WTF):
3914         (WebCore):
3915         (RenderThemeChromiumFontProvider): This is the font related methods.
3916         * rendering/RenderThemeChromiumFontProviderLinux.cpp: Added.
3917         (WebCore):
3918         (WebCore::RenderThemeChromiumFontProvider::setDefaultFontSize): What was in RenderThemeChromiumSkia::setDefaultFontSize.
3919         (WebCore::RenderThemeChromiumFontProvider::systemFont): What was in RenderThemeChromiumSkia::systemFont.
3920         * rendering/RenderThemeChromiumFontProviderWin.cpp: Added.
3921         (WebCore):
3922         (WebCore::pointsToPixels): Moved from RenderThemeChromiumWin.
3923         (WebCore::getNonClientMetrics): Moved from RenderThemeChromiumWin.
3924         (WebCore::systemFontSize): Moved from RenderThemeChromiumWin.
3925         (WebCore::RenderThemeChromiumFontProvider::systemFont): Moved from RenderThemeChromiumWin.
3926         (WebCore::RenderThemeChromiumFontProvider::setDefaultFontSize): Moved from RenderThemeChromiumWin.
3927         * rendering/RenderThemeChromiumSkia.cpp:
3928         (WebCore::RenderThemeChromiumSkia::RenderThemeChromiumSkia): Moved into RenderThemeFontProvider.
3929         (WebCore::RenderThemeChromiumSkia::systemFont): Calls to RenderThemeChromiumFontProvider.
3930         (WebCore::RenderThemeChromiumSkia::setDefaultFontSize): Calls to RenderThemeChromiumFontProvider.
3931         * rendering/RenderThemeChromiumSkia.h:
3932         (RenderThemeChromiumSkia): Moves defaultFontSize into RenderThemeChromiumFontProvider.
3933         * rendering/RenderThemeChromiumWin.cpp: Moves font code into RenderThemeFontProviderWin.
3934         (WebCore):
3935         * rendering/RenderThemeChromiumWin.h: Removed overriden methods now handled by RenderThemeChromiumSkia.
3936         (RenderThemeChromiumWin):
3937
3938 2012-11-13  Alec Flett  <alecflett@chromium.org>
3939
3940         Add DOMRequestState to maintain world/ScriptExecutionContext state
3941         https://bugs.webkit.org/show_bug.cgi?id=102102
3942
3943         Reviewed by Adam Barth.
3944
3945         Introduce DOMRequestState, and convert IndexedDB over.
3946
3947         No new tests, this is an abstraction layer for existing code.
3948
3949         * Modules/indexeddb/IDBRequest.cpp:
3950         (WebCore::IDBRequest::IDBRequest):
3951         (WebCore::IDBRequest::onSuccess):
3952         (WebCore::IDBRequest::dispatchEvent):
3953         * Modules/indexeddb/IDBRequest.h:
3954         (IDBRequest):
3955         * WebCore.gypi:
3956         * bindings/v8/DOMRequestState.h: Added.
3957         (WebCore):
3958         (DOMRequestState):
3959         (WebCore::DOMRequestState::DOMRequestState):
3960         (Scope):
3961         (WebCore::DOMRequestState::Scope::Scope):
3962         (WebCore::DOMRequestState::scope):
3963
3964 2012-11-13  Robert Sesek  <rsesek@chromium.org>
3965
3966         Sever Chromium's dependence on WebKitSystemInterface media control drawing functions in RenderThemeMac
3967         https://bugs.webkit.org/show_bug.cgi?id=101634
3968
3969         Reviewed by Adam Barth.
3970
3971         This splits out the common methods between RenderThemeMac and RenderThemeChromiumMac
3972         into RenderThemeMacShared.
3973
3974         No new tests, just refactoring.
3975
3976         * WebCore.gyp/WebCore.gyp: Remove RenderThemeMac.mm from platform/ sources list, since it's part of rendering/
3977         * WebCore.gypi: Add RenderThemeMacShared.{h,mm}
3978         * WebCore.xcodeproj/project.pbxproj: Add RenderThemeMacShared.{h,mm}
3979         * rendering/RenderThemeChromiumMac.h:
3980         * rendering/RenderThemeChromiumMac.mm:
3981         (WebCore::RenderThemeChromiumMac::popupInternalPaddingLeft):
3982         (WebCore::RenderThemeChromiumMac::popupInternalPaddingRight):
3983         (WebCore::RenderThemeChromiumMac::extraDefaultStyleSheet):
3984         * rendering/RenderThemeMac.h:
3985         (RenderThemeMac):
3986         * rendering/RenderThemeMac.mm:
3987         (WebCore):
3988         (WebCore::RenderTheme::themeForPage):
3989         (WebCore::RenderThemeMac::create):
3990         (WebCore::RenderThemeMac::RenderThemeMac):
3991         (WebCore::RenderThemeMac::~RenderThemeMac):
3992         (WebCore::RenderThemeMac::documentViewFor):
3993         (WebCore::mediaControllerTheme):
3994         (WebCore::RenderThemeMac::paintMediaSliderTrack):
3995         (WebCore::RenderThemeMac::paintMediaRewindButton):
3996         (WebCore::RenderThemeMac::paintMediaReturnToRealtimeButton):
3997         (WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderTrack):
3998         (WebCore::RenderThemeMac::paintMediaFullScreenVolumeSliderThumb):
3999         (WebCore::RenderThemeMac::extraMediaControlsStyleSheet):
4000         (WebCore::RenderThemeMac::extraFullScreenStyleSheet):
4001         * rendering/RenderThemeMacShared.h: Copied from Source/WebCore/rendering/RenderThemeMac.h.
4002         (WebCore):
4003         (RenderThemeMacShared):
4004         (WebCore::RenderThemeMacShared::supportsControlTints):
4005         (WebCore::RenderThemeMacShared::scrollbarControlSizeForPart):
4006         (WebCore::RenderThemeMacShared::supportsSelectionForegroundColors):
4007         (WebCore::RenderThemeMacShared::supportsClosedCaptioning):
4008         (WebCore::RenderThemeMacShared::updateActiveState):
4009         * rendering/RenderThemeMacShared.mm: Copied from Source/WebCore/rendering/RenderThemeMac.mm.
4010         (-[WebCoreRenderThemeNotificationObserver initWithTheme:WebCore::]):
4011         (-[WebCoreRenderThemeNotificationObserver systemColorsDidChange:]):
4012         (-[WebCoreTextFieldCell _coreUIDrawOptionsWithFrame:inView:includeFocus:]):
4013         (WebCore):
4014         (WebCore::RenderThemeMacShared::RenderThemeMacShared):
4015         (WebCore::RenderThemeMacShared::~RenderThemeMacShared):
4016         (WebCore::RenderThemeMacShared::platformActiveSelectionBackgroundColor):
4017         (WebCore::RenderThemeMacShared::platformInactiveSelectionBackgroundColor):
4018         (WebCore::RenderThemeMacShared::platformActiveListBoxSelectionBackgroundColor):
4019         (WebCore::RenderThemeMacShared::platformActiveListBoxSelectionForegroundColor):
4020         (WebCore::RenderThemeMacShared::platformInactiveListBoxSelectionForegroundColor):
4021         (WebCore::RenderThemeMacShared::platformFocusRingColor):
4022         (WebCore::RenderThemeMacShared::platformInactiveListBoxSelectionBackgroundColor):
4023         (WebCore::toFontWeight):
4024         (WebCore::RenderThemeMacShared::systemFont):
4025         (WebCore::convertNSColorToColor):
4026         (WebCore::menuBackgroundColor):
4027         (WebCore::RenderThemeMacShared::platformColorsDidChange):
4028         (WebCore::RenderThemeMacShared::systemColor):
4029         (WebCore::RenderThemeMacShared::usesTestModeFocusRingColor):
4030         (WebCore::RenderThemeMacShared::isControlStyled):
4031         (WebCore::RenderThemeMacShared::adjustRepaintRect):
4032         (WebCore::RenderThemeMacShared::inflateRect):
4033         (WebCore::RenderThemeMacShared::convertToPaintingRect):
4034         (WebCore::RenderThemeMacShared::updateCheckedState):
4035         (WebCore::RenderThemeMacShared::updateEnabledState):
4036         (WebCore::RenderThemeMacShared::updateFocusedState):
4037         (WebCore::RenderThemeMacShared::updatePressedState):
4038         (WebCore::RenderThemeMacShared::controlSupportsTints):
4039         (WebCore::RenderThemeMacShared::controlSizeForFont):
4040         (WebCore::RenderThemeMacShared::setControlSize):
4041         (WebCore::RenderThemeMacShared::sizeForFont):
4042         (WebCore::RenderThemeMacShared::sizeForSystemFont):
4043         (WebCore::RenderThemeMacShared::setSizeFromFont):
4044         (WebCore::RenderThemeMacShared::setFontFromControlSize):
4045         (WebCore::RenderThemeMacShared::controlSizeForSystemFont):
4046         (WebCore::RenderThemeMacShared::paintTextField):
4047         (WebCore::RenderThemeMacShared::adjustTextFieldStyle):
4048         (WebCore::RenderThemeMacShared::paintCapsLockIndicator):
4049         (WebCore::RenderThemeMacShared::paintTextArea):
4050         (WebCore::RenderThemeMacShared::adjustTextAreaStyle):
4051         (WebCore::RenderThemeMacShared::popupButtonMargins):
4052         (WebCore::RenderThemeMacShared::popupButtonSizes):
4053         (WebCore::RenderThemeMacShared::popupButtonPadding):
4054         (WebCore::RenderThemeMacShared::paintMenuList):
4055         (WebCore::RenderThemeMacShared::meterSizeForBounds):
4056         (WebCore::RenderThemeMacShared::paintMeter):
4057         (WebCore::RenderThemeMacShared::supportsMeter):
4058         (WebCore::RenderThemeMacShared::levelIndicatorStyleFor):
4059         (WebCore::RenderThemeMacShared::levelIndicatorFor):
4060         (WebCore::RenderThemeMacShared::progressBarSizes):
4061         (WebCore::RenderThemeMacShared::progressBarMargins):
4062         (WebCore::RenderThemeMacShared::minimumProgressBarHeight):
4063         (WebCore::RenderThemeMacShared::animationRepeatIntervalForProgressBar):
4064         (WebCore::RenderThemeMacShared::animationDurationForProgressBar):
4065         (WebCore::RenderThemeMacShared::adjustProgressBarStyle):
4066         (WebCore::RenderThemeMacShared::paintProgressBar):
4067         (WebCore::TopGradientInterpolate):
4068         (WebCore::BottomGradientInterpolate):
4069         (WebCore::MainGradientInterpolate):
4070         (WebCore::TrackGradientInterpolate):
4071         (WebCore::RenderThemeMacShared::paintMenuListButtonGradients):
4072         (WebCore::RenderThemeMacShared::paintMenuListButton):
4073         (WebCore::menuListButtonSizes):
4074         (WebCore::RenderThemeMacShared::adjustMenuListStyle):
4075         (WebCore::RenderThemeMacShared::popupInternalPaddingLeft):
4076         (WebCore::RenderThemeMacShared::popupInternalPaddingRight):
4077         (WebCore::RenderThemeMacShared::popupInternalPaddingTop):
4078         (WebCore::RenderThemeMacShared::popupInternalPaddingBottom):
4079         (WebCore::RenderThemeMacShared::adjustMenuListButtonStyle):
4080         (WebCore::RenderThemeMacShared::setPopupButtonCellState):
4081         (WebCore::RenderThemeMacShared::menuListSizes):
4082         (WebCore::RenderThemeMacShared::minimumMenuListSize):
4083         (WebCore::RenderThemeMacShared::adjustSliderTrackStyle):
4084         (WebCore::RenderThemeMacShared::paintSliderTrack):
4085         (WebCore::RenderThemeMacShared::adjustSliderThumbStyle):
4086         (WebCore::RenderThemeMacShared::paintSliderThumb):
4087         (WebCore::RenderThemeMacShared::paintSearchField):
4088         (WebCore::RenderThemeMacShared::setSearchCellState):
4089         (WebCore::RenderThemeMacShared::searchFieldSizes):
4090         (WebCore::RenderThemeMacShared::setSearchFieldSize):
4091         (WebCore::RenderThemeMacShared::adjustSearchFieldStyle):
4092         (WebCore::RenderThemeMacShared::paintSearchFieldCancelButton):
4093         (WebCore::RenderThemeMacShared::cancelButtonSizes):
4094         (WebCore::RenderThemeMacShared::adjustSearchFieldCancelButtonStyle):
4095         (WebCore::RenderThemeMacShared::resultsButtonSizes):
4096         (WebCore::RenderThemeMacShared::adjustSearchFieldDecorationStyle):
4097         (WebCore::RenderThemeMacShared::paintSearchFieldDecoration):
4098         (WebCore::RenderThemeMacShared::adjustSearchFieldResultsDecorationStyle):
4099         (WebCore::RenderThemeMacShared::paintSearchFieldResultsDecoration):
4100         (WebCore::RenderThemeMacShared::adjustSearchFieldResultsButtonStyle):
4101         (WebCore::RenderThemeMacShared::paintSearchFieldResultsButton):
4102         (WebCore::RenderThemeMacShared::sliderTickSize):
4103         (WebCore::RenderThemeMacShared::sliderTickOffsetFromTrackCenter):
4104         (WebCore::RenderThemeMacShared::adjustSliderThumbSize):
4105         (WebCore::RenderThemeMacShared::shouldShowPlaceholderWhenFocused):
4106         (WebCore::RenderThemeMacShared::popupButton):
4107         (WebCore::RenderThemeMacShared::search):
4108         (WebCore::RenderThemeMacShared::searchMenuTemplate):
4109         (WebCore::RenderThemeMacShared::sliderThumbHorizontal):
4110         (WebCore::RenderThemeMacShared::sliderThumbVertical):
4111         (WebCore::RenderThemeMacShared::textField):
4112         (WebCore::RenderThemeMacShared::fileListNameForWidth):
4113         (WebCore::RenderThemeMacShared::paintPlugInSnapshotOverlay):
4114
4115 2012-11-13  Tab Atkins  <jackalmage@gmail.com>
4116