Rename TextBreakIteratorWinCE to TextBreakIteratorWchar
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-01-29  Patrick Gansterer  <paroga@webkit.org>
2
3         Rename TextBreakIteratorWinCE to TextBreakIteratorWchar
4         https://bugs.webkit.org/show_bug.cgi?id=108094
5
6         Reviewed by Ryosuke Niwa.
7
8         TextBreakIteratorWinCE does not contain any Windows CE specific code.
9         Rename it to TextBreakIteratorWchar to match the name in wtf/unicode.
10
11         * platform/text/wchar/TextBreakIteratorWchar.cpp: Renamed from Source/WebCore/platform/text/wince/TextBreakIteratorWinCE.cpp.
12
13 2013-01-29  Tommy Widenflycht  <tommyw@google.com>
14
15         MediaStream API: A MediaStreamComponent should be able to return the MediaStreamDescriptor it belongs to
16         https://bugs.webkit.org/show_bug.cgi?id=108173
17
18         Reviewed by Adam Barth.
19
20         To be able to return the MediaStreamDescriptor a MediaStreamComponent belongs to the "ownership"
21         of the MediaStreamDescriptor needed to move from a MediaStreamTrack to the MediaStreamComponent.
22         This is also better from an architectonic view as well.
23
24         Patch covered by existing tests.
25
26         * Modules/mediastream/MediaStream.cpp:
27         (WebCore::MediaStream::MediaStream):
28         (WebCore::MediaStream::addTrack):
29         (WebCore::MediaStream::addRemoteTrack):
30         * Modules/mediastream/MediaStreamTrack.cpp:
31         (WebCore::MediaStreamTrack::create):
32         (WebCore::MediaStreamTrack::MediaStreamTrack):
33         (WebCore::MediaStreamTrack::setEnabled):
34         * Modules/mediastream/MediaStreamTrack.h:
35         (MediaStreamTrack):
36         * Modules/mediastream/RTCStatsRequestImpl.cpp:
37         (WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
38         * platform/chromium/support/WebMediaStreamComponent.cpp:
39         (WebKit::WebMediaStreamComponent::stream):
40         (WebKit):
41         * platform/mediastream/MediaStreamComponent.h:
42         (WebCore):
43         (WebCore::MediaStreamComponent::create):
44         (MediaStreamComponent):
45         (WebCore::MediaStreamComponent::stream):
46         (WebCore::MediaStreamComponent::setStream):
47         (WebCore::MediaStreamComponent::MediaStreamComponent):
48         * platform/mediastream/MediaStreamDescriptor.h:
49         (WebCore::MediaStreamDescriptor::MediaStreamDescriptor):
50
51 2013-01-29  Alec Flett  <alecflett@chromium.org>
52
53         IndexedDB: Pass metadata in to IDBOpenDBRequest.onUpgradeNeeded/onSuccess
54         https://bugs.webkit.org/show_bug.cgi?id=103920
55
56         Reviewed by Dimitri Glazkov.
57
58         Update IDBCallbacks::onSuccess and IDBCallbacks::onUpgradeNeeded to
59         pass through a metadata parameter. While there, remove the unused
60         IDBTransactionBackendInterface parameter to onUpgradeNeeded.
61
62         As this is another step in the IDB refactor, I've simplified future cleanup
63         work by making the WebKit API code still use the old API. This
64         will make it possible to outright remove code on the chromium side rather
65         than another three-step checkin.
66
67         No new tests, as this is more refactoring.
68
69         * Modules/indexeddb/IDBCallbacks.h:
70         (WebCore::IDBCallbacks::onUpgradeNeeded): new method signature.
71         (WebCore::IDBCallbacks::onSuccess): new method signature.
72         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
73         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
74         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
75         (WebCore::IDBDatabaseBackendImpl::openConnection):
76         * Modules/indexeddb/IDBOpenDBRequest.cpp:
77         (WebCore::IDBOpenDBRequest::onUpgradeNeeded): use passed-in metadata.
78         (WebCore::IDBOpenDBRequest::onSuccess): use passed-in metadata.
79         * Modules/indexeddb/IDBOpenDBRequest.h:
80         (IDBOpenDBRequest):
81
82 2013-01-29  Dirk Schulze  <dschulze@adobe.com>
83
84         Canvas support for isPointInStroke
85         https://bugs.webkit.org/show_bug.cgi?id=108185
86
87         Reviewed by Dean Jackson.
88
89         isPointInStroke(x,y) returns true if a point hits the stroke
90         with applied stroke styles like dashArray, lineCap, lineJoin, lineWidth.
91         The syntax is similar to isPointInPath, which returns true if a point hits
92         the fill area of a path.
93         Firefox implemented isPointInStroke originally and unprefixed it recently:
94
95         https://bugzilla.mozilla.org/show_bug.cgi?id=803124
96
97         Test: fast/canvas/canvas-isPointInStroke.html
98
99         * html/canvas/CanvasRenderingContext2D.cpp:
100         (WebCore::CanvasStrokeStyleApplier::strokeStyle): Take dashArray and lineDashOffset into account.
101         (WebCore):
102         (WebCore::CanvasRenderingContext2D::isPointInStroke): The implementation of the function.
103         * html/canvas/CanvasRenderingContext2D.h:
104         (CanvasRenderingContext2D):
105         * html/canvas/CanvasRenderingContext2D.idl: Added operation to interface.
106
107 2013-01-29  Nate Chapin  <japhet@chromium.org>
108
109         Enable reuse of cached main resources
110         https://bugs.webkit.org/show_bug.cgi?id=105667
111
112         Reviewed by Adam Barth.
113
114         Test: http/tests/cache/cached-main-resource.html
115
116         * WebCore.exp.in:
117         * dom/Document.cpp:
118         (WebCore::Document::hasManifest): Returns true if the <html> element has a non-empty manifest attribute.
119         (WebCore):
120         * dom/Document.h:
121         (Document):
122         * loader/FrameLoader.cpp:
123         (WebCore::FrameLoader::loadedResourceFromMemoryCache): Don't send delegate callbacks for cache hit here, since
124             MainResourceLoader will take care of it.
125         * loader/MainResourceLoader.cpp:
126         (WebCore::MainResourceLoader::MainResourceLoader):
127         (WebCore::MainResourceLoader::receivedError):
128         (WebCore::MainResourceLoader::willSendRequest):
129         (WebCore::MainResourceLoader::responseReceived): Don't try to cache loads from the application cache.
130         (WebCore::MainResourceLoader::didFinishLoading): Don't try to cache loads from the application cache.
131         (WebCore::MainResourceLoader::load): Ensure we create a resource load identifier for cache hits. Also,
132             ensure we correctly popualate fragment identifiers in the ResourceRequest reported to DocumentLoader.
133         (WebCore::MainResourceLoader::identifier):
134         * loader/MainResourceLoader.h: Rename m_substituteDataLoadIdentifier to m_identifierForLoadWithoutResourceLoader
135             to better describe when it is used.
136         * loader/cache/CachedRawResource.cpp:
137         (WebCore::CachedRawResource::didAddClient): Synthesize redirect notifications for cache hits if necessary.
138         (WebCore::CachedRawResource::willSendRequest): Note the redirects we received.
139         (WebCore::CachedRawResource::canReuse): Don't reuse a resource if the redirect chain included a "Cache-control: no-store".
140         * loader/cache/CachedRawResource.h:
141         (CachedRawResource):
142         (RedirectPair):
143         (WebCore::CachedRawResource::RedirectPair::RedirectPair):
144         * loader/cache/CachedResource.cpp:
145         (WebCore::CachedResource::addClientToSet): Don't return cached data for a main resource synchronously
146         * loader/cache/CachedResource.h:
147         (WebCore::CachedResource::canReuse):
148         (CachedResource):
149         * loader/cache/CachedResourceLoader.cpp:
150         (WebCore::CachedResourceLoader::requestResource): Leave cahce reuse of main resources off for chromium for now.
151         (WebCore::CachedResourceLoader::determineRevalidationPolicy): Permit cache reuse for main resources.
152         * testing/Internals.cpp:
153         (WebCore::Internals::isPreloaded):
154         (WebCore):
155         (WebCore::Internals::isLoadingFromMemoryCache):
156         * testing/Internals.h:
157         (Internals):
158         * testing/Internals.idl:
159
160 2013-01-29  Min Qin  <qinmin@chromium.org>
161
162         Fix a problem that deferred image decoding is enabled for multiframe images
163         https://bugs.webkit.org/show_bug.cgi?id=108152
164
165         Reviewed by Stephen White.
166
167         Deferred image decoding should only work for single frame images now.
168         However, using ImageDecoder::repetitionCount() does not capture all the cases.
169         Enforce the rule using ImageDecoder::frameCount()==1.
170         Fixing a failing layout test: platform/chromium/virtual/deferred/fast/images/icon-0colors.html
171
172         * platform/graphics/chromium/DeferredImageDecoder.cpp:
173         (WebCore::DeferredImageDecoder::frameBufferAtIndex):
174
175 2013-01-29  Elliott Sprehn  <esprehn@chromium.org>
176
177         Move ElementShadow creation to ElementRareData
178         https://bugs.webkit.org/show_bug.cgi?id=108195
179
180         Reviewed by Dimitri Glazkov.
181
182         Move the creation of ElementShadow to ElementRareData
183         for better encapsulation, and get rid of ElementRareData::setShadow.
184
185         No new tests, just refactoring.
186
187         * dom/Element.cpp:
188         (WebCore::Element::~Element): Use clearShadow() instead of setShadow which is removed.
189         (WebCore::Element::shadow):
190         (WebCore::Element::ensureShadow): Use ElementRareData::ensureShadow().
191         * dom/ElementRareData.h:
192         (WebCore::ElementRareData::clearShadow): Added.
193         (WebCore::ElementRareData::ensureShadow): Added.
194
195 2013-01-29  Alpha Lam  <hclam@chromium.org>
196
197         [chromium] Unreviewed build fix.
198
199         Revert my revert at 141033 which can cause deadlock.
200
201         * platform/graphics/chromium/DiscardablePixelRef.cpp:
202         (WebCore::DiscardablePixelRefAllocator::allocPixelRef):
203         (WebCore::DiscardablePixelRef::DiscardablePixelRef):
204         * platform/graphics/chromium/DiscardablePixelRef.h:
205         (DiscardablePixelRef):
206
207 2013-01-29  Joshua Bell  <jsbell@chromium.org>
208
209         [Chromium] IndexedDB: Let callers specify reason (error) for aborting transaction
210         https://bugs.webkit.org/show_bug.cgi?id=107851
211
212         Reviewed by Tony Chang.
213
214         Internal to the back-end, callers are able to abort transactions and specify a reason
215         as an IDBDatabaseError, e.g. ConstraintError. Expose this to the WebKit/chromium/public
216         API so that intermediate layers can specify reasons as well, e.g. QuotaExceededError.
217
218         Test will land in Chromium as fix for crbug.com/113118
219
220         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
221         (WebCore::IDBDatabaseBackendImpl::abort): Added overload that takes error.
222         * Modules/indexeddb/IDBDatabaseBackendImpl.h: Ditto.
223         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Ditto.
224
225 2013-01-29  Victor Carbune  <vcarbune@chromium.org>
226
227         Heap-use-after-free in WebCore::RenderTextTrackCue::layout
228         https://bugs.webkit.org/show_bug.cgi?id=108197
229
230         Reviewed by Eric Carlson.
231
232         Test: media/track/track-cue-rendering-tree-is-removed-properly.html
233
234         * html/HTMLMediaElement.cpp:
235         (WebCore::HTMLMediaElement::textTrackRemoveCue): Ensure the display tree
236         is removed when the cue is removed from the list of cues.
237         * html/track/TextTrackCue.cpp:
238         (WebCore::TextTrackCue::~TextTrackCue): Enfore display tree removal.
239
240 2013-01-29  Eli Fidler  <efidler@rim.com>
241
242         On HarfbuzzNG ports, Arabic TATWEEL is not joined.
243         https://bugs.webkit.org/show_bug.cgi?id=108037
244
245         Reviewed by Tony Chang.
246
247         The tatweel (U+0640) is being split into a separate run, because its script is USCRIPT_COMMON.
248         It has script extensions for USCRIPT_ARABIC, so I think it shouldn't trigger a new run.
249
250         Test: fast/text/international/arabic-tatweel-join.html
251
252         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
253         (WebCore::HarfBuzzShaper::collectHarfBuzzRuns):
254
255 2013-01-29  Martin Robinson  <mrobinson@igalia.com>
256
257         [Freetype] Cannot use characters outside the BMP
258         https://bugs.webkit.org/show_bug.cgi?id=108102
259
260         Reviewed by Carlos Garcia Campos.
261
262         Test: platform/gtk/fonts/non-bmp-characters.html
263
264         Instead of never handling surrogate pairs when dealing with UChar arrays,
265         abstract way the logic for this into UTF16UChar32Iterator and use it
266         everywhere in Freetype. This allows the Freetype backend to render
267         non-BMP characters which are always represented as surrogate pairs in
268         UTF-16.
269
270         * GNUmakefile.list.am: Added UTF16UChar32Iterator to the source list.
271         * platform/graphics/freetype/FontCacheFreeType.cpp:
272         (WebCore::createFontConfigPatternForCharacters): Use the new iterator.
273         (WebCore::FontCache::getFontDataForCharacters): Ditto.
274         * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
275         (WebCore::GlyphPage::fill): Ditto. Remove the early return when dealing
276         with non-BMP data.
277         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
278         (WebCore::SimpleFontData::containsCharacters): Use the new iterator.
279         * platform/graphics/freetype/UTF16UChar32Iterator.h: Added. An iterator that
280         extracts UChar32 from UTF-16 UChar arrays.
281
282         * GNUmakefile.list.am:
283         * platform/graphics/freetype/FontCacheFreeType.cpp:
284         (WebCore::createFontConfigPatternForCharacters):
285         (WebCore::FontCache::getFontDataForCharacters):
286         * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
287         (WebCore::GlyphPage::fill):
288         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
289         (WebCore::SimpleFontData::containsCharacters):
290         * platform/graphics/freetype/UTF16UChar32Iterator.h: Added.
291         (WebCore):
292         (UTF16UChar32Iterator):
293         (WebCore::UTF16UChar32Iterator::UTF16UChar32Iterator):
294         (WebCore::UTF16UChar32Iterator::end):
295         (WebCore::UTF16UChar32Iterator::next):
296
297         * GNUmakefile.list.am:
298         * platform/graphics/freetype/FontCacheFreeType.cpp:
299         (WebCore::createFontConfigPatternForCharacters):
300         * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
301         (WebCore::GlyphPage::fill):
302         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
303         (WebCore::SimpleFontData::containsCharacters):
304         * platform/graphics/freetype/UTF16UChar32Iterator.h: Added.
305         (WebCore):
306         (UTF16UChar32Iterator):
307         (WebCore::UTF16UChar32Iterator::UTF16UChar32Iterator):
308         (WebCore::UTF16UChar32Iterator::end):
309         (WebCore::UTF16UChar32Iterator::next):
310
311 2013-01-29  Glenn Hartmann  <hartmanng@chromium.org>
312
313         Don't overlap test for composited scroll DIVs after scroll
314         https://bugs.webkit.org/show_bug.cgi?id=107471
315
316         Reviewed by Simon Fraser.
317
318         We don't need to test for overlap after scroll when both
319         usesCompositedScrolling and !hasOutOfFlowPositionedDescendant
320         because:
321
322         a) Since we're using composited-scrolling, the composited region
323         presented by the composited-scrolling element to other non-descendant
324         layers doesn't change during composited scrolling (it's always the
325         entire scroll layer), and
326
327         b) Since we have no out of flow positioned descendants, the scrolling
328         descendants all move together, so their overlap with respect to each
329         other cannot change.
330
331         So no descendants nor any non-descendants can have their overlap
332         affected, so it's safe to skip testing.
333
334         No new tests (no change in behaviour).
335
336         * rendering/RenderLayer.cpp:
337         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
338         * rendering/RenderLayerCompositor.cpp:
339         (WebCore::RenderLayerCompositor::updateCompositingLayers):
340         * rendering/RenderLayerCompositor.h:
341
342 2013-01-29  Alexis Menard  <alexis@webkit.org>
343
344         Implement pseudoElement attribute on transition DOM events.
345         https://bugs.webkit.org/show_bug.cgi?id=107986
346
347         Reviewed by Julien Chaffraix.
348
349         Implement the pseudoElement attribute documented here :
350         http://dev.w3.org/csswg/css3-transitions/#transition-events.
351         This add a new attribute to the transition DOM event useful when
352         animating pseudo elements. As they are not accessible in JS, it's
353         very useful to get on which pseudo element the transition just ended.
354         This patch adds the new attribute on the IDLs of DOM transition events as well
355         as adding it to the C++ classes representing them. The event
356         dispatching code have been patched to change the target of the event
357         (we can't send the current target as it is the actual DOM
358         representation of the pseudo element).
359
360         Test: fast/css-generated-content/pseudo-transition-event.html
361
362         * dom/EventDispatcher.cpp:
363         (WebCore::eventTargetRespectingTargetRules): Change the target of the
364         event in the case of a pseudo element. We can't expose them through the
365         public interface so the target is the node they belong to.
366         (WebCore::EventDispatcher::ensureEventAncestors):
367         (WebCore::EventDispatcher::dispatchScopedEvent):
368         (WebCore::EventDispatcher::dispatchEvent):
369         (WebCore::EventDispatcher::dispatchEventPostProcess):
370         * dom/EventTarget.cpp:
371         (WebCore::createMatchingPrefixedEvent):
372         * dom/PseudoElement.cpp:
373         (WebCore::PseudoElement::pseudoElementNameForEvents):
374         (WebCore):
375         * dom/PseudoElement.h:
376         * dom/TransitionEvent.cpp:
377         (WebCore::TransitionEventInit::TransitionEventInit):
378         (WebCore::TransitionEvent::TransitionEvent):
379         (WebCore::TransitionEvent::pseudoElement):
380         (WebCore):
381         * dom/TransitionEvent.h:
382         (TransitionEventInit):
383         (WebCore::TransitionEvent::create):
384         (TransitionEvent):
385         * dom/TransitionEvent.idl:
386         * dom/WebKitTransitionEvent.cpp:
387         (WebCore::WebKitTransitionEventInit::WebKitTransitionEventInit):
388         (WebCore::WebKitTransitionEvent::WebKitTransitionEvent):
389         (WebCore::WebKitTransitionEvent::pseudoElement):
390         (WebCore):
391         * dom/WebKitTransitionEvent.h:
392         (WebKitTransitionEventInit):
393         (WebCore::WebKitTransitionEvent::create):
394         (WebKitTransitionEvent):
395         * dom/WebKitTransitionEvent.idl:
396         * page/animation/AnimationController.cpp:
397         (WebCore::AnimationControllerPrivate::fireEventsAndUpdateStyle): Pass
398         the pseudo element name when creating the Event objects. If the element
399         is not a pseudo element then the name will be empty which is what the
400         spec is telling to do. If the element is a pseudo element then the name
401         will be the pseudo element's name with "::" as a prefix.
402
403 2013-01-29  Allan Sandfeld Jensen  <allan.jensen@digia.com>
404
405         [Qt] Implement GCActivityCallback
406         https://bugs.webkit.org/show_bug.cgi?id=103998
407
408         Reviewed by Simon Hausmann.
409
410         Implements the activity triggered garbage collector,
411         and disables the timer based fallback.
412
413         * bindings/js/GCController.cpp:
414         (WebCore::GCController::GCController):
415         (WebCore::GCController::garbageCollectSoon):
416         * bindings/js/GCController.h:
417         (GCController):
418
419 2013-01-29  Andrey Lushnikov  <lushnikov@chromium.org>
420
421         Web Inspector: fix bottom span in token highlight in DTE
422         https://bugs.webkit.org/show_bug.cgi?id=108194
423
424         Reviewed by Pavel Feldman.
425
426         Change css style for token highlight from "border" to "outline" to
427         avoid border included in box dimensions.
428
429         No new tests: no change in behaviour.
430
431         * inspector/front-end/textEditor.css:
432         (.text-editor-token-highlight):
433
434 2013-01-29  Andrey Lushnikov  <lushnikov@chromium.org>
435
436         Web Inspector: introduce HighlightDescriptor interface in DTE.
437         https://bugs.webkit.org/show_bug.cgi?id=108161
438
439         Reviewed by Pavel Feldman.
440
441         Introduce new HighlightDescriptor interface and its
442         RegexHighlightDescriptor implementation and use it in DTE to
443         support overlay highlight.
444
445         No new tests: no change in behaviour.
446
447         * inspector/front-end/DefaultTextEditor.js:
448         (WebInspector.DefaultTextEditor.prototype.highlightRegex):
449         (WebInspector.DefaultTextEditor.prototype.removeRegexHighlight):
450         (WebInspector.TextEditorMainPanel):
451         (WebInspector.TextEditorMainPanel.prototype.highlightRegex):
452         (WebInspector.TextEditorMainPanel.prototype.removeRegexHighlight):
453         (WebInspector.TextEditorMainPanel.prototype._paintLines):
454         (WebInspector.TextEditorMainPanel.prototype._measureHighlightDescriptor):
455         (WebInspector.TextEditorMainPanel.HighlightDescriptor): Added.
456         (WebInspector.TextEditorMainPanel.HighlightDescriptor.prototype.affectsLine):
457         (WebInspector.TextEditorMainPanel.HighlightDescriptor.prototype.rangesForLine):
458         (WebInspector.TextEditorMainPanel.HighlightDescriptor.prototype.cssClass):
459         (WebInspector.TextEditorMainPanel.RegexHighlightDescriptor): Added.
460         (WebInspector.TextEditorMainPanel.RegexHighlightDescriptor.prototype.affectsLine):
461         (WebInspector.TextEditorMainPanel.RegexHighlightDescriptor.prototype.rangesForLine):
462         (WebInspector.TextEditorMainPanel.RegexHighlightDescriptor.prototype.cssClass):
463         (WebInspector.TextEditorMainPanel.TokenHighlighter.prototype._highlight):
464         (WebInspector.TextEditorMainPanel.TokenHighlighter.prototype._removeHighlight):
465         * inspector/front-end/TextEditor.js:
466         (WebInspector.TextEditor.prototype.removeRegexHighlight):
467
468 2013-01-29  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
469
470         [EFL] Unified text checker implementation.
471         https://bugs.webkit.org/show_bug.cgi?id=107682
472
473         Reviewed by Anders Carlsson.
474
475         No new tests, covered by editing/spelling tests.
476
477         * platform/text/TextChecking.h:
478         (WebCore):
479         Enabling unified text checker feature for WebKit-EFL.
480
481 2013-01-29  Vladislav Kaznacheev  <kaznacheev@chromium.org>
482
483         Web Inspector: Wrong indent in Styles sidebar pane
484         https://bugs.webkit.org/show_bug.cgi?id=108186
485
486         Reviewed by Alexander Pavlov.
487
488         Added an extra selector to prevent a conflict with a rule in elementsPanel.css.
489
490         No new tests.
491
492         * inspector/front-end/inspector.css:
493         (.pane.expanded .section .properties, .event-bar .event-properties):
494
495 2013-01-29  Florin Malita  <fmalita@chromium.org>
496
497         [Chromium] Unreviewed gardening.
498
499         Update bindings-tests results after http://trac.webkit.org/changeset/141034.
500
501         * bindings/scripts/test/V8/V8Float64Array.cpp:
502         (WebCore):
503         (WebCore::checkTypeOrDieTrying):
504         (WebCore::V8Float64Array::createWrapper):
505         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
506         (WebCore):
507         (WebCore::checkTypeOrDieTrying):
508         (WebCore::V8TestActiveDOMObject::createWrapper):
509         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
510         (WebCore):
511         (WebCore::checkTypeOrDieTrying):
512         (WebCore::V8TestCustomNamedGetter::createWrapper):
513         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
514         (WebCore):
515         (WebCore::checkTypeOrDieTrying):
516         (WebCore::V8TestEventConstructor::createWrapper):
517         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
518         (WebCore):
519         (WebCore::checkTypeOrDieTrying):
520         (WebCore::V8TestEventTarget::createWrapper):
521         * bindings/scripts/test/V8/V8TestException.cpp:
522         (WebCore):
523         (WebCore::checkTypeOrDieTrying):
524         (WebCore::V8TestException::createWrapper):
525         * bindings/scripts/test/V8/V8TestInterface.cpp:
526         (WebCore):
527         (WebCore::checkTypeOrDieTrying):
528         (WebCore::V8TestInterface::createWrapper):
529         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
530         (WebCore):
531         (WebCore::checkTypeOrDieTrying):
532         (WebCore::V8TestMediaQueryListListener::createWrapper):
533         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
534         (WebCore):
535         (WebCore::checkTypeOrDieTrying):
536         (WebCore::V8TestNamedConstructor::createWrapper):
537         * bindings/scripts/test/V8/V8TestNode.cpp:
538         (WebCore):
539         (WebCore::checkTypeOrDieTrying):
540         (WebCore::V8TestNode::createWrapper):
541         * bindings/scripts/test/V8/V8TestObj.cpp:
542         (WebCore):
543         (WebCore::checkTypeOrDieTrying):
544         (WebCore::V8TestObj::createWrapper):
545         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
546         (WebCore):
547         (WebCore::checkTypeOrDieTrying):
548         (WebCore::V8TestOverloadedConstructors::createWrapper):
549         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
550         (WebCore):
551         (WebCore::checkTypeOrDieTrying):
552         (WebCore::V8TestSerializedScriptValueInterface::createWrapper):
553
554 2013-01-29  Andrey Adaikin  <aandrey@chromium.org>
555
556         Web Inspector: [Canvas] support instrumenting canvases in iframes (backend side)
557         https://bugs.webkit.org/show_bug.cgi?id=107951
558
559         Reviewed by Pavel Feldman.
560
561         Accept optional FrameId argument for captureFrame and startCapturing commands.
562         Add event to the protocol to inform about instrumented canvas context creation.
563
564         * inspector/Inspector.json:
565         * inspector/InspectorCanvasAgent.cpp:
566         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
567         (WebCore::InspectorCanvasAgent::hasUninstrumentedCanvases):
568         (WebCore::InspectorCanvasAgent::captureFrame):
569         (WebCore::InspectorCanvasAgent::startCapturing):
570         (WebCore::InspectorCanvasAgent::getTraceLog):
571         (WebCore::InspectorCanvasAgent::replayTraceLog):
572         (WebCore::InspectorCanvasAgent::getResourceInfo):
573         (WebCore::InspectorCanvasAgent::getResourceState):
574         (WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation):
575         (WebCore::InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation):
576         (WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
577         (WebCore):
578         (WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
579         (WebCore::InspectorCanvasAgent::frameNavigated):
580         (WebCore::InspectorCanvasAgent::frameDetached):
581         * inspector/InspectorCanvasAgent.h:
582         (WebCore):
583         (WebCore::InspectorCanvasAgent::create):
584         (InspectorCanvasAgent):
585         * inspector/InspectorController.cpp:
586         (WebCore::InspectorController::InspectorController):
587         * inspector/InspectorInstrumentation.cpp:
588         (WebCore):
589         (WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
590         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
591
592 2013-01-29  Eugene Klyuchnikov  <eustas@chromium.org>
593
594         Web Inspector: [CPU Profile] Taking profile crashes renderer.
595         https://bugs.webkit.org/show_bug.cgi?id=108072
596
597         Reviewed by Yury Semikhatsky.
598
599         Test: inspector/profiler/cpu-profiler-agent-crash-on-start.html
600
601         Fixed null-pointer access.
602
603         * bindings/v8/ScriptProfiler.cpp:
604         (WebCore::ScriptProfiler::start): Fixed null-pointer access.
605         (WebCore::ScriptProfiler::stop): Ditto.
606
607 2013-01-29  Allan Sandfeld Jensen  <allan.jensen@digia.com>
608
609         REGRESSION: ChildrenAffectedBy flags lost between siblings which have child elements sharing style
610         https://bugs.webkit.org/show_bug.cgi?id=105672
611
612         Reviewed by Andreas Kling.
613
614         Change in how childrenAffectedBy bits were stored made it easier to trigger an issue where childrenAffectedBy bits
615         were not set due to sharing of styles between cousin elements.
616
617         This patch fixes the issue by not sharing styles from children with parents who prevent sharing.
618
619         Tests: fast/selectors/cousin-stylesharing-adjacent-selector.html
620                fast/selectors/cousin-stylesharing-last-child-selector.html
621
622         * css/StyleResolver.cpp:
623         (WebCore::parentElementPreventsSharing):
624         (WebCore::StyleResolver::locateCousinList):
625         * dom/Element.cpp:
626         (WebCore::Element::hasFlagsSetDuringStylingOfChildren):
627         * dom/Element.h:
628         (Element):
629
630 2013-01-29  Vsevolod Vlasov  <vsevik@chromium.org>
631
632         Web Inspector: [Regression] Search across all sources is broken.
633         https://bugs.webkit.org/show_bug.cgi?id=108157
634
635         Reviewed by Pavel Feldman.
636
637         Test: http/tests/inspector/search/scripts-search-scope.html
638
639         * inspector/front-end/ScriptsSearchScope.js:
640         (WebInspector.ScriptsSearchScope.prototype._sortedUISourceCodes):
641
642 2013-01-29  Mike West  <mkwst@chromium.org>
643
644         IDBFactory::webkitGetDatabaseNames should raise DOMExceptions.
645         https://bugs.webkit.org/show_bug.cgi?id=108154
646
647         Reviewed by Jochen Eisinger.
648
649         In order to properly support blocking third-party IndexedDB usage,
650         open(), getDatabaseNames(), and deleteDatabase() should all throw
651         SECURITY_ERR when used in a blocked third-party context. That's possible
652         now for open() and deleteDatabase(), but getDatabaseNames() can't
653         currently raise exceptions.
654
655         This patch adjusts the IDL file and implementation. No exceptions are
656         currently thrown, but that will change as soon as wkbug.com/94171 lands.
657
658         * Modules/indexeddb/IDBFactory.cpp:
659         (WebCore::IDBFactory::getDatabaseNames):
660         * Modules/indexeddb/IDBFactory.h:
661         (IDBFactory):
662         * Modules/indexeddb/IDBFactory.idl:
663             Add "raises (DOMException)" to getDatabaseNames, and adjust the
664             implementation to match.
665         * inspector/InspectorIndexedDBAgent.cpp:
666         (WebCore::InspectorIndexedDBAgent::requestDatabaseNamesForFrame):
667             Pass in an ExceptionCode when calling getDatabaseNames, and handle
668             possible exceptions.
669
670 2013-01-29  Hayato Ito  <hayato@chromium.org>
671
672         Revert an accidentally changed line of EventHander::handleMousePressEvent(PlatformMouseEvent&) in r135650.
673         https://bugs.webkit.org/show_bug.cgi?id=108165
674
675         Reviewed by Hajime Morita.
676
677         No new tests.
678
679         * page/EventHandler.cpp:
680         (WebCore::EventHandler::handleMousePressEvent):
681
682 2013-01-29  Kent Tamura  <tkent@chromium.org>
683
684         FeatureObserver: Input types are counted unexpectedly in a page with Modernizr
685         https://bugs.webkit.org/show_bug.cgi?id=108141
686
687         Reviewed by Kentaro Hara.
688
689         We don't want to record input type instantiation by Modernizr. Modernizr
690         creates input elements with these types, append it to document.body, and
691         render it with visibility:hidden. So, we record input types only when
692         they are attached without visibility:hidden.
693
694         No new tests. FeatureObserver is not testable by layout test.
695
696         * html/InputType.cpp:
697         (WebCore::InputType::create): Remove FeatureObserver::observe
698         callsites. They are moved to TextInputType::attach.
699         (WebCore::InputType::observeFeatureIfVisible):
700         Added. A helper for attach().
701         * html/InputType.h:
702         (InputType): Add observeFeatureIfVisible.
703
704         * html/ColorInputType.cpp:
705         (WebCore::ColorInputType::create):
706         Remove a FeatureObserver::observe callsite.
707         (WebCore::ColorInputType::attach):
708         Calls FetureObserver through InputType::observeFeatureIfVisible.
709         * html/ColorInputType.h:
710         (ColorInputType): Declare attach.
711         * html/DateInputType.cpp: Ditto.
712         * html/DateInputType.h: Ditto.
713         * html/DateTimeInputType.cpp: Ditto.
714         * html/DateTimeInputType.h: Ditto.
715         * html/DateTimeLocalInputType.cpp: Ditto.
716         * html/DateTimeLocalInputType.h: Ditto.
717         * html/MonthInputType.cpp: Ditto.
718         * html/MonthInputType.h: Ditto.
719         * html/RangeInputType.cpp: Ditt
720         * html/RangeInputType.h: Ditto.
721         * html/TimeInputType.cpp: Ditto.
722         * html/TimeInputType.h: Ditto.
723         * html/WeekInputType.cpp: Ditto.
724         * html/WeekInputType.h: Ditto.
725
726         * html/TextFieldInputType.h:
727         (TextFieldInputType):
728         Make attach protected in order that sub classes can call it.
729         * html/EmailInputType.cpp:
730         (WebCore::EmailInputType::create):
731         Remove a FeatureObserver::observe callsite.
732         (WebCore::EmailInputType::attach): Calls FetureObserver through
733         InputType::observeFeatureIfVisible after TextFieldInptuType::attach.
734         * html/EmailInputType.h:
735         (EmailInputType):Declare attach.
736         * html/NumberInputType.cpp: Ditto.
737         * html/NumberInputType.h: Ditto.
738         * html/SearchInputType.cpp: Ditto.
739         * html/SearchInputType.h: Ditto.
740         * html/TelephoneInputType.cpp: Ditto.
741         * html/TelephoneInputType.h: Ditto.
742         * html/URLInputType.cpp: Ditto.
743         * html/URLInputType.h: Ditto.
744
745         * html/TextInputType.cpp:
746         (WebCore::TextInputType::attach):
747         Move the code for type fallback from InputType::create.
748         * html/TextInputType.h:
749         (TextInputType): Declare attach.
750
751 2013-01-29  Michael BrĂ¼ning  <michael.bruning@digia.com>
752
753         [Qt][WK1] Reflect recursion limit and loop checks also for list conversions.
754         https://bugs.webkit.org/show_bug.cgi?id=107950
755
756         Reviewed by Allan Sandfeld Jensen.
757
758         No new tests, bugfix, no behavioral change.
759
760         Make conversions from Javascript values to QLists take the maximum
761         recursion depth into consideration and check for objects that were
762         already visited. Otherwise, the conversion may recurse until the
763         stack is full and then cause a segmentation fault.
764
765         * bridge/qt/qt_runtime.cpp:
766         (JSC::Bindings::convertToList):
767         (JSC::Bindings::convertValueToQVariant):
768
769 2013-01-29  Elliott Sprehn  <esprehn@chromium.org>
770
771         Clean up interface to ElementShadow
772         https://bugs.webkit.org/show_bug.cgi?id=108158
773
774         Reviewed by Hajime Morita.
775
776         Lots of general clean up to ElementShadow removing unused headers,
777         adding a create() method that returns a PassOwnPtr, adding missing const,
778         and moving short inline methods into the class definition so it's easier
779         to understand what methods do what.
780
781         No new tests, just refactoring.
782
783         * dom/Element.cpp:
784         (WebCore::Element::ensureShadow):
785         * dom/ElementShadow.cpp:
786         (WebCore::ElementShadow::childNeedsStyleRecalc):
787         (WebCore::ElementShadow::needsStyleRecalc):
788         * dom/ElementShadow.h:
789         (WebCore::ElementShadow::create):
790         (ElementShadow):
791         (WebCore::ElementShadow::~ElementShadow):
792         (WebCore::ElementShadow::youngestShadowRoot):
793         (WebCore::ElementShadow::oldestShadowRoot):
794         (WebCore::ElementShadow::distributor):
795         (WebCore::ElementShadow::ElementShadow):
796         (WebCore::ElementShadow::containingShadow):
797
798 2013-01-29  Elliott Sprehn  <esprehn@chromium.org>
799
800         Store ShadowRootType inside the bitfield
801         https://bugs.webkit.org/show_bug.cgi?id=108147
802
803         Reviewed by Dimitri Glazkov.
804
805         We can simplify the interface to ShadowRoot by storing the enum value of
806         ShadowRootType inside the bitfield like we do in the rest of WebCore.
807
808         No new tests, just refactoring.
809
810         * dom/ShadowRoot.cpp:
811         (WebCore::ShadowRoot::ShadowRoot):
812         (WebCore::ShadowRoot::create):
813         * dom/ShadowRoot.h:
814         (WebCore::ShadowRoot::type):
815         (ShadowRoot):
816
817 2013-01-29  Jochen Eisinger  <jochen@chromium.org>
818
819         REGRESSION(r141070): Broke debug build
820         https://bugs.webkit.org/show_bug.cgi?id=108159
821
822         Unreviewed build fix.
823
824         * html/parser/HTMLDocumentParser.cpp:
825         (WebCore::HTMLDocumentParser::pumpTokenizer):
826
827 2013-01-28  Adam Barth  <abarth@webkit.org>
828
829         HTMLDocumentParser should hold the HTMLToken using an OwnPtr
830         https://bugs.webkit.org/show_bug.cgi?id=107762
831
832         Reviewed by Eric Seidel.
833
834         Using an OwnPtr will let us detach the HTMLToken from the
835         HTMLDocumentParser and send it to the BackgroundHTMLParser for further
836         processing.
837
838         * html/parser/BackgroundHTMLParser.cpp:
839         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
840         (WebCore::BackgroundHTMLParser::pumpTokenizer):
841         * html/parser/BackgroundHTMLParser.h:
842         (BackgroundHTMLParser):
843         * html/parser/CompactHTMLToken.cpp:
844         (WebCore::CompactHTMLToken::CompactHTMLToken):
845         * html/parser/CompactHTMLToken.h:
846         (CompactHTMLToken):
847         * html/parser/HTMLDocumentParser.cpp:
848         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
849         (WebCore::HTMLDocumentParser::pumpTokenizer):
850         * html/parser/HTMLDocumentParser.h:
851         (HTMLDocumentParser):
852
853 2013-01-28  Huang Dongsung  <luxtella@company100.net>
854
855         [Texmap] Refactor code related to debug border and repaint count.
856         https://bugs.webkit.org/show_bug.cgi?id=105787
857
858         Reviewed by Noam Rosenthal.
859
860         It is a follow-up patch not to change layout test results.
861
862         The previous patch sets GraphicsLayer::m_usingTiledLayer to true when using a
863         backing store. When the variable is true, dumpLayer() adds (usingTiledLayer 1),
864         but most of ports don't set m_usingTiledLayer to true. So we don't use
865         m_usingTiledLayer to match the test results of other ports.
866
867         After this patch, Texture Mapper draws debug visuals for a tiled backing
868         with different color from safari.
869
870         No new tests. Debug feature, not covered in tests.
871
872         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
873         (WebCore::GraphicsLayerTextureMapper::updateDebugBorderAndRepaintCountIfNeeded):
874
875 2013-01-28  Elliott Sprehn  <esprehn@chromium.org>
876
877         Handle createShadowSubtree inside of ensureUserAgentShadowRoot
878         https://bugs.webkit.org/show_bug.cgi?id=108116
879
880         Reviewed by Dimitri Glazkov.
881
882         Instead of making everyone create the UserAgentShadowRoot manually all
883         over, centralize it in ensureUserAgentShadowRoot() and add a notification
884         Element::didAddUserAgentShadowRoot that lets elements fill in the subtree.
885         This lets us get rid of lots of code duplication.
886
887         No new tests, just refactoring.
888
889         * dom/Element.cpp:
890         (WebCore::Element::ensureUserAgentShadowRoot):
891         * dom/Element.h:
892         (WebCore::Element::didAddUserAgentShadowRoot):
893         (Element):
894         * html/HTMLDetailsElement.cpp:
895         (WebCore::DetailsSummaryElement::create):
896         (WebCore::HTMLDetailsElement::create):
897         (WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot):
898         * html/HTMLDetailsElement.h:
899         (HTMLDetailsElement):
900         * html/HTMLInputElement.cpp:
901         (WebCore::HTMLInputElement::create):
902         (WebCore::HTMLInputElement::didAddUserAgentShadowRoot):
903         * html/HTMLInputElement.h:
904         (HTMLInputElement):
905         * html/HTMLMediaElement.cpp:
906         (WebCore::HTMLMediaElement::willAddAuthorShadowRoot):
907         (WebCore::HTMLMediaElement::createMediaControls):
908         * html/HTMLMediaElement.h:
909         * html/HTMLMeterElement.cpp:
910         (WebCore::HTMLMeterElement::create):
911         (WebCore::HTMLMeterElement::didAddUserAgentShadowRoot):
912         * html/HTMLMeterElement.h:
913         (HTMLMeterElement):
914         * html/HTMLProgressElement.cpp:
915         (WebCore::HTMLProgressElement::create):
916         (WebCore::HTMLProgressElement::didAddUserAgentShadowRoot):
917         * html/HTMLProgressElement.h:
918         * html/HTMLSummaryElement.cpp:
919         (WebCore::HTMLSummaryElement::create):
920         (WebCore::HTMLSummaryElement::didAddUserAgentShadowRoot):
921         * html/HTMLSummaryElement.h:
922         (HTMLSummaryElement):
923         * html/HTMLTextAreaElement.cpp:
924         (WebCore::HTMLTextAreaElement::create):
925         (WebCore::HTMLTextAreaElement::didAddUserAgentShadowRoot):
926         * html/HTMLTextAreaElement.h:
927         * html/shadow/MediaControlElements.cpp:
928         (WebCore::MediaControlPanelMuteButtonElement::create):
929         (WebCore::MediaControlVolumeSliderMuteButtonElement::create):
930         (WebCore::MediaControlPlayButtonElement::create):
931         (WebCore::MediaControlOverlayPlayButtonElement::create):
932         (WebCore::MediaControlSeekForwardButtonElement::create):
933         (WebCore::MediaControlSeekBackButtonElement::create):
934         (WebCore::MediaControlRewindButtonElement::create):
935         (WebCore::MediaControlReturnToRealtimeButtonElement::create):
936         (WebCore::MediaControlToggleClosedCaptionsButtonElement::create):
937         (WebCore::MediaControlTimelineElement::create):
938         (WebCore::MediaControlPanelVolumeSliderElement::create):
939         (WebCore::MediaControlFullscreenVolumeSliderElement::create):
940         (WebCore::MediaControlFullscreenButtonElement::create):
941         (WebCore::MediaControlFullscreenVolumeMinButtonElement::create):
942         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::create):
943         * html/shadow/MediaControlsBlackBerry.cpp:
944         (WebCore::MediaControlFullscreenPlayButtonElement::create):
945         (WebCore::MediaControlFullscreenFullscreenButtonElement::create):
946         (WebCore::MediaControlFullscreenTimelineElement::create):
947         (WebCore::MediaControlAudioMuteButtonElement::create):
948         * svg/SVGTRefElement.cpp:
949         (WebCore::SVGTRefElement::create):
950         * svg/SVGTRefElement.h:
951         (SVGTRefElement):
952         * svg/SVGUseElement.cpp:
953         (WebCore::SVGUseElement::create):
954         * svg/SVGUseElement.h:
955         (SVGUseElement):
956
957 2013-01-28   Vineet Chaudhary  <rgf748@motorola.com>
958
959         HTMLOutputElement::htmlFor should be readonly
960         https://bugs.webkit.org/show_bug.cgi?id=101898
961
962         Reviewed by Kentaro Hara.
963
964         The spec says htmlFor should be readonly, but WebKit implements it as no-readonly.
965         Spec: http://dev.w3.org/html5/spec-preview/the-output-element.html
966
967         No new tests. Modified existing test fast/dom/HTMLOutputElement/dom-settable-token-list.html
968         to work as expected.
969
970         * GNUmakefile.list.am: Removed JSHTMLOutputElementCustom.cpp
971         * Target.pri: Ditto
972         * UseJSC.cmake: Ditto
973         * UseV8.cmake: Removed V8HTMLOutputElementCustom.cpp
974         * WebCore.gypi: Removed V8HTMLOutputElementCustom.cpp
975         * WebCore.vcproj/WebCore.vcproj: Removed JSHTMLOutputElementCustom.cpp
976         * WebCore.vcxproj/WebCore.vcxproj: Ditto
977         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto
978         * WebCore.xcodeproj/project.pbxproj: Ditto
979         * bindings/js/JSBindingsAllInOne.cpp: Ditto
980         * bindings/js/JSHTMLOutputElementCustom.cpp: Removed.
981         * bindings/v8/custom/V8HTMLOutputElementCustom.cpp: Removed.
982         * html/HTMLOutputElement.idl: Made htmlFor attribute readonly.
983
984 2013-01-28  Tien-Ren Chen  <trchen@chromium.org>
985
986         Fix disambiguation popup for new-style page scale
987         https://bugs.webkit.org/show_bug.cgi?id=107391
988
989         Reviewed by Adam Barth.
990
991         This patch corrects various coordinate conversion for disambiguation
992         popup for the new-style page scale mode.
993
994         New unit test: WebFrameTest.DisambiguationPopupPageScale
995
996         * page/TouchDisambiguation.cpp:
997         (WebCore::findGoodTouchTargets):
998         * page/TouchDisambiguation.h:
999         (WebCore):
1000
1001 2013-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1002
1003         Unreviewed, rolling out r141049.
1004         http://trac.webkit.org/changeset/141049
1005         https://bugs.webkit.org/show_bug.cgi?id=108151
1006
1007         Caused some indexed tests to crash. (Requested by keishi on
1008         #webkit).
1009
1010         * Modules/indexeddb/IDBCallbacks.h:
1011         (WebCore::IDBCallbacks::onUpgradeNeeded):
1012         (WebCore::IDBCallbacks::onSuccess):
1013         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1014         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
1015         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
1016         (WebCore::IDBDatabaseBackendImpl::openConnection):
1017         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1018         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
1019         (WebCore::IDBOpenDBRequest::onSuccess):
1020         * Modules/indexeddb/IDBOpenDBRequest.h:
1021         (IDBOpenDBRequest):
1022
1023 2013-01-28  Adam Barth  <abarth@webkit.org>
1024
1025         Layout Test http/tests/workers/terminate-during-sync-operation.html is flaky
1026         https://bugs.webkit.org/show_bug.cgi?id=79013
1027
1028         Reviewed by David Levin.
1029
1030         We need to use an isolated copy because we're going to use it on a
1031         different thread.
1032
1033         * Modules/webdatabase/AbstractDatabase.cpp:
1034         (WebCore::AbstractDatabase::AbstractDatabase):
1035
1036 2013-01-28  Shinya Kawanaka  <shinyak@chromium.org>
1037
1038         [Shadow] Gesture event is not fired in ShadowDOM
1039         https://bugs.webkit.org/show_bug.cgi?id=107797
1040
1041         Reviewed by Dimitri Glazkov.
1042
1043         Gesture event (e.g. touchstart) is not fired in ShadowDOM.
1044
1045         We have to run event retargetting algorithm to retarget touchTarget, however it is not implemented yet (Bug 107800).
1046         Until it's implemented, we use the shadow ancestor node of touchTarget in Document treescope as touchTarget
1047         for backward compatibility. If a touch event is fired in nested ShadowDOM, touchTarget will be always element in
1048         document tree, so an event listener in ShadowDOM will get a wrong touchTarget. However we prioritized
1049         the correctness of document tree.
1050
1051         Test: fast/dom/shadow/touch-event.html
1052
1053         * page/EventHandler.cpp:
1054         (WebCore::EventHandler::handleTouchEvent): Allows us to take elements in ShadowDOM.
1055
1056 2013-01-28  Alexandre Elias  <aelias@chromium.org>
1057
1058         Make page scale shrink FrameView in applyPageScaleInCompositor mode
1059         https://bugs.webkit.org/show_bug.cgi?id=107424
1060
1061         Reviewed by Levi Weintraub.
1062
1063         If applyPageScaleFactorInCompositor is enabled (Chromium-only setting),
1064         instead of the entire document expanding as the user pinch zooms, the
1065         viewport shrinks instead. This patch applies the pageScaleFactor to
1066         visibleContentRect to get this behavior, and simplifies Chromium's
1067         resize logic to stop hiding the true viewport size from WebCore.
1068
1069         I verified that the scaling makes sense for all the callers of
1070         visibleContentRect. The exceptions are clip-layer size,
1071         layout size in non-fixed-layout mode, and text autosizing, which need
1072         the original unscaled size. Therefore I added a new method
1073         unscaledVisibleContentSize() to ScrollView/FrameView.
1074
1075         This patch also modifies Page::setPageScaleFactor to perform no
1076         invalidates or layout when applyPageScaleFactorInCompositor is true,
1077         and also writes pageScaleFactor into HistoryItems instead of using
1078         frameScaleFactor.
1079
1080         Since all behavior changes are tied to applyPageScaleFactorInCompositor,
1081         this patch should be a no-op for non-Chromium ports.
1082
1083         New unit tests in WebFrameTest.cpp.
1084
1085         * loader/HistoryController.cpp:
1086         (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
1087         Use pageScaleFactor here because frameScaleFactor always returns 1
1088         with our setting.
1089         * page/FrameView.cpp:
1090         (WebCore::FrameView::visibleContentScaleFactor):
1091         (WebCore):
1092         * page/FrameView.h:
1093         (FrameView):
1094         * page/Page.cpp:
1095         (WebCore::Page::setPageScaleFactor): Make setPageScaleFactor stop
1096         invalidating/layouting as this is handled by our compositor.
1097         * platform/ScrollView.cpp:
1098         (WebCore::ScrollView::unscaledVisibleContentSize): This new method
1099         just returns the original visible rect without pageScaleFactor being
1100         applied.
1101         (WebCore):
1102         (WebCore::ScrollView::visibleContentRect): This now is divided by
1103         pageScaleFactor if our setting is active.
1104         (WebCore::ScrollView::layoutSize):
1105         * platform/ScrollView.h:
1106         (WebCore::ScrollView::visibleContentScaleFactor): Returns
1107         pageScaleFactor if the visible rect is scaled, 1 normally.
1108         (ScrollView):
1109         (WebCore::ScrollView::layoutWidth):
1110         (WebCore::ScrollView::layoutHeight):
1111         * rendering/RenderLayerCompositor.cpp:
1112         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
1113         (WebCore::RenderLayerCompositor::updateRootLayerPosition): Clip layer
1114         should use unscaled size, because it's above the root scroll layer
1115         on the layer tree (i.e. page scale isn't applied on it).
1116         * rendering/TextAutosizer.cpp:
1117         (WebCore::TextAutosizer::processSubtree): Text autosizer should use
1118         unscaled size, because it cares about physical screen size.
1119
1120 2013-01-28  Geoffrey Garen  <ggaren@apple.com>
1121
1122         Static size inference for JavaScript objects
1123         https://bugs.webkit.org/show_bug.cgi?id=108093
1124
1125         Reviewed by Phil Pizlo.
1126
1127         * ForwardingHeaders/runtime/ObjectConstructor.h: Added.
1128
1129         * bindings/js/JSInjectedScriptHostCustom.cpp:
1130         * bindings/js/JSSQLResultSetRowListCustom.cpp: Include ObjectConstructor.h because
1131         that's where createEmptyObject() is located now.
1132
1133         * bindings/js/SerializedScriptValue.cpp:
1134         (WebCore::CloneDeserializer::deserialize): Updated for interface change.
1135
1136 2013-01-28  Alec Flett  <alecflett@chromium.org>
1137
1138         IndexedDB: Pass metadata in to IDBOpenDBRequest.onUpgradeNeeded/onSuccess
1139         https://bugs.webkit.org/show_bug.cgi?id=103920
1140
1141         Reviewed by Dimitri Glazkov.
1142
1143         Update IDBCallbacks::onSuccess and IDBCallbacks::onUpgradeNeeded to
1144         pass through a metadata parameter. While there, remove the unused
1145         IDBTransactionBackendInterface parameter to onUpgradeNeeded.
1146
1147         As this is another step in the IDB refactor, I've simplified future cleanup
1148         work by making the WebKit API code still use the old API. This
1149         will make it possible to outright remove code on the chromium side rather
1150         than another three-step checkin.
1151
1152         No new tests, as this is more refactoring.
1153
1154         * Modules/indexeddb/IDBCallbacks.h:
1155         (WebCore::IDBCallbacks::onUpgradeNeeded): new method signature.
1156         (WebCore::IDBCallbacks::onSuccess): new method signature.
1157         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1158         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
1159         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
1160         (WebCore::IDBDatabaseBackendImpl::openConnection):
1161         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1162         (WebCore::IDBOpenDBRequest::onUpgradeNeeded): use passed-in metadata.
1163         (WebCore::IDBOpenDBRequest::onSuccess): use passed-in metadata.
1164         * Modules/indexeddb/IDBOpenDBRequest.h:
1165         (IDBOpenDBRequest):
1166
1167 2013-01-28  Simon Fraser  <simon.fraser@apple.com>
1168
1169         position:fixed that doesn't render any content should not force compositing
1170         https://bugs.webkit.org/show_bug.cgi?id=108112
1171
1172         Reviewed by Beth Dakin.
1173         
1174         It's not uncommon for pages to have position:fixed elements with no content.
1175         When these are behind other elements, they can cause those other elements
1176         to become composited, using lots of backing store memory.
1177         
1178         Optimize for the case where the position:fixed element has no rendered
1179         content and no children by not making it composited in that case.
1180
1181         Test: compositing/layer-creation/fixed-position-no-content.html
1182
1183         * rendering/RenderLayer.cpp:
1184         (WebCore::RenderLayer::hasNonEmptyChildRenderers): Moved from RenderLayerBacking.cpp.
1185         (WebCore::hasBoxDecorations): Ditto.
1186         (WebCore::RenderLayer::hasBoxDecorationsOrBackground): Ditto.
1187         (WebCore::RenderLayer::hasVisibleBoxDecorations): Check for visibility:visible, box decorations and
1188         overflow controls.
1189         (WebCore::RenderLayer::isVisuallyNonEmpty): Returns true if this layer has some visible
1190         representation.
1191         * rendering/RenderLayer.h:
1192         * rendering/RenderLayerBacking.cpp:
1193         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): Need to call updateDescendantDependentFlags()
1194         to ensure that the visibility flags are up to date.
1195         (WebCore::RenderLayerBacking::updateDrawsContent): Call RenderLayer::hasBoxDecorationsOrBackground() now.
1196         (WebCore::RenderLayerBacking::paintsBoxDecorations): Call RenderLayer::hasVisibleBoxDecorations() now.
1197         (WebCore::RenderLayerBacking::paintsChildren): Call RenderLayer::hasNonEmptyChildRenderers().
1198         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): Whitespace.
1199         (WebCore::RenderLayerBacking::containsPaintedContent): Call RenderLayer::hasBoxDecorationsOrBackground().
1200         (WebCore::RenderLayerBacking::isDirectlyCompositedImage): Ditto.
1201         * rendering/RenderLayerBacking.h:
1202         (RenderLayerBacking):
1203         * rendering/RenderLayerCompositor.cpp:
1204         (WebCore::RenderLayerCompositor::requiresCompositingForPosition): If the layer has no content to paint,
1205         or visible descendant layers, then don't make it composited.
1206
1207 2013-01-28  Simon Fraser  <simon.fraser@apple.com>
1208
1209         Avoid doing work at 60fps for tiled layers when not necessary
1210         https://bugs.webkit.org/show_bug.cgi?id=108135
1211
1212         Reviewed by Dean Jackson.
1213
1214         When there were any tiled layers on the page, we would run a CVDisplayLink
1215         to cause GraphicsLayerCA to flush, in order to update tiled layer visible rects.
1216         This is overkill; we should only do this if the tiled layer is affected by
1217         an accelerated animation.
1218         
1219         Fix by tracking whether an ancestor has a running animation when committing
1220         GraphicsLayerCAs.
1221
1222         * platform/graphics/ca/GraphicsLayerCA.cpp:
1223         (WebCore::GraphicsLayerCA::flushCompositingState): Start with an empty CommitState.
1224         (WebCore::GraphicsLayerCA::recursiveCommitChanges): Push CommitState for
1225         each layer, which tracks whether an ancestor has a running transform animation.
1226         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): updateLayerAnimations() renamed.
1227         (WebCore::GraphicsLayerCA::updateAnimations): Renamed from updateLayerAnimations().
1228         (WebCore::GraphicsLayerCA::isRunningTransformAnimation): Look in the map of running
1229         animations for one affecting transform. This list is normally small (one item).
1230         * platform/graphics/ca/GraphicsLayerCA.h:
1231         (WebCore::GraphicsLayerCA::CommitState::CommitState):
1232
1233 2013-01-28  Simon Fraser  <simon.fraser@apple.com>
1234
1235         compositing/reflections/become-simple-composited-reflection.html pixel result shows bug
1236         https://bugs.webkit.org/show_bug.cgi?id=107174
1237
1238         Reviewed by Dean Jackson.
1239         
1240         When we have a content layer for solid color, we need to update reflection
1241         clones when that color changes.
1242
1243         Tested by the pixel test for compositing/reflections/become-simple-composited-reflection.html.
1244
1245         * platform/graphics/ca/GraphicsLayerCA.cpp:
1246         (WebCore::GraphicsLayerCA::updateContentsColorLayer):
1247
1248 2013-01-28  Tom Sepez  <tsepez@chromium.org>
1249
1250         [v8] Security feature: JavaScript Bindings hardening
1251         https://bugs.webkit.org/show_bug.cgi?id=106608
1252
1253         The patch adds a check at wrapper creation time to enuse that the
1254         object being wrapped is not already free, to the extent that we know
1255         the information about the type of the object as provided in the IDL.
1256
1257         Reviewed by Adam Barth.
1258
1259         Patch is correct if existing tests pass without new crashes.
1260
1261         * bindings/scripts/CodeGeneratorV8.pm:
1262         (GenerateImplementation):
1263         (GenerateToV8Converters):
1264         (GetNativeTypeForConversions):
1265         (GetGnuVTableRefForInterface):
1266         (GetGnuVTableNameForInterface):
1267         (GetGnuMangledNameForInterface):
1268         (GetGnuVTableOffsetForType):
1269         (GetWinVTableRefForInterface):
1270         (GetWinVTableNameForInterface):
1271         (GetWinMangledNameForInterface):
1272         (GetNamespaceForInterface):
1273         (GetImplementationLacksVTableForInterface):
1274         (GetV8SkipVTableValidationForInterface):
1275         Update code generation to add object validity tests under the control
1276         of the ENABLE_BINDING_INTEGRITY option.
1277         
1278         * Modules/filesystem/DirectoryReader.idl:
1279         * Modules/filesystem/DirectoryReaderSync.idl:
1280         * Modules/filesystem/EntryArray.idl:
1281         * Modules/filesystem/EntryArraySync.idl:
1282         * Modules/filesystem/Metadata.idl:
1283         * Modules/gamepad/Gamepad.idl:
1284         * Modules/gamepad/GamepadList.idl:
1285         * Modules/geolocation/Geoposition.idl:
1286         * Modules/geolocation/PositionError.idl:
1287         * Modules/indexeddb/IDBFactory.idl:
1288         * Modules/indexeddb/IDBIndex.idl:
1289         * Modules/indexeddb/IDBKeyRange.idl:
1290         * Modules/indexeddb/IDBObjectStore.idl:
1291         * Modules/mediastream/RTCStatsElement.idl:
1292         * Modules/mediastream/RTCStatsReport.idl:
1293         * Modules/quota/StorageInfo.idl:
1294         * Modules/speech/SpeechGrammar.idl:
1295         * Modules/speech/SpeechGrammarList.idl:
1296         * Modules/speech/SpeechRecognitionAlternative.idl:
1297         * Modules/speech/SpeechRecognitionResult.idl:
1298         * Modules/speech/SpeechRecognitionResultList.idl:
1299         * Modules/webaudio/AudioBuffer.idl:
1300         * Modules/webaudio/AudioDestinationNode.idl:
1301         * Modules/webaudio/AudioListener.idl:
1302         * Modules/webaudio/AudioSourceNode.idl:
1303         * Modules/webaudio/WaveTable.idl:
1304         * Modules/webdatabase/SQLError.idl:
1305         * Modules/webdatabase/SQLException.idl:
1306         * Modules/webdatabase/SQLResultSet.idl:
1307         * Modules/webdatabase/SQLResultSetRowList.idl:
1308         * Modules/webdatabase/SQLTransaction.idl:
1309         * Modules/webdatabase/SQLTransactionSync.idl:
1310         * bindings/scripts/IDLAttributes.txt:
1311         * css/CSSPrimitiveValue.idl:
1312         * css/CSSRule.idl:
1313         * css/CSSRuleList.idl:
1314         * css/CSSStyleDeclaration.idl:
1315         * css/CSSValue.idl:
1316         * css/CSSValueList.idl:
1317         * css/Counter.idl:
1318         * css/MediaList.idl:
1319         * css/MediaQueryList.idl:
1320         * css/RGBColor.idl:
1321         * css/Rect.idl:
1322         * css/StyleSheetList.idl:
1323         * css/WebKitCSSFilterValue.idl:
1324         * css/WebKitCSSMixFunctionValue.idl:
1325         * css/WebKitCSSTransformValue.idl:
1326         * dom/ClientRect.idl:
1327         * dom/ClientRectList.idl:
1328         * dom/Clipboard.idl:
1329         * dom/DOMCoreException.idl:
1330         * dom/DOMError.idl:
1331         * dom/DOMImplementation.idl:
1332         * dom/DOMNamedFlowCollection.idl:
1333         * dom/DOMStringList.idl:
1334         * dom/DOMStringMap.idl:
1335         * dom/DataTransferItem.idl:
1336         * dom/DataTransferItemList.idl:
1337         * dom/DocumentFragment.idl:
1338         * dom/Element.idl:
1339         * dom/Entity.idl:
1340         * dom/Event.idl:
1341         * dom/EventException.idl:
1342         * dom/MessageChannel.idl:
1343         * dom/MouseEvent.idl:
1344         * dom/MutationObserver.idl:
1345         * dom/MutationRecord.idl:
1346         * dom/NamedNodeMap.idl:
1347         * dom/NodeFilter.idl:
1348         * dom/NodeIterator.idl:
1349         * dom/NodeList.idl:
1350         * dom/Range.idl:
1351         * dom/RangeException.idl:
1352         * dom/Touch.idl:
1353         * dom/TouchList.idl:
1354         * dom/TreeWalker.idl:
1355         * fileapi/FileError.idl:
1356         * fileapi/FileException.idl:
1357         * fileapi/FileList.idl:
1358         * html/DOMFormData.idl:
1359         * html/DOMTokenList.idl:
1360         * html/DOMURL.idl:
1361         * html/HTMLAllCollection.idl:
1362         * html/HTMLCollection.idl:
1363         * html/HTMLDialogElement.idl:
1364         * html/HTMLDivElement.idl:
1365         * html/HTMLDocument.idl:
1366         * html/HTMLElement.idl:
1367         * html/HTMLImageElement.idl:
1368         * html/HTMLInputElement.idl:
1369         * html/HTMLSelectElement.idl:
1370         * html/HTMLSpanElement.idl:
1371         * html/HTMLUnknownElement.idl:
1372         * html/ImageData.idl:
1373         * html/MediaError.idl:
1374         * html/MediaKeyError.idl:
1375         * html/TimeRanges.idl:
1376         * html/ValidityState.idl:
1377         * html/canvas/ArrayBuffer.idl:
1378         * html/canvas/ArrayBufferView.idl:
1379         * html/canvas/CanvasGradient.idl:
1380         * html/canvas/CanvasPattern.idl:
1381         * html/canvas/Float32Array.idl:
1382         * html/canvas/Float64Array.idl:
1383         * html/canvas/Int16Array.idl:
1384         * html/canvas/Int32Array.idl:
1385         * html/canvas/Int8Array.idl:
1386         * html/canvas/Uint16Array.idl:
1387         * html/canvas/Uint32Array.idl:
1388         * html/canvas/Uint8Array.idl:
1389         * html/canvas/Uint8ClampedArray.idl:
1390         * html/canvas/WebGLActiveInfo.idl:
1391         * html/canvas/WebGLShaderPrecisionFormat.idl:
1392         * html/track/TextTrack.idl:
1393         * html/track/TextTrackCue.idl:
1394         * html/track/TextTrackCueList.idl:
1395         * inspector/InjectedScriptHost.idl:
1396         * inspector/InspectorFrontendHost.idl:
1397         * inspector/JavaScriptCallFrame.idl:
1398         * page/Coordinates.idl:
1399         * page/Crypto.idl:
1400         * page/MemoryInfo.idl:
1401         * page/PagePopupController.idl:
1402         * page/PerformanceEntryList.idl:
1403         * page/SpeechInputResult.idl:
1404         * page/SpeechInputResultList.idl:
1405         * page/WebKitPoint.idl:
1406         * svg/SVGAnimatedAngle.idl:
1407         * svg/SVGAnimatedBoolean.idl:
1408         * svg/SVGAnimatedEnumeration.idl:
1409         * svg/SVGAnimatedInteger.idl:
1410         * svg/SVGAnimatedLength.idl:
1411         * svg/SVGAnimatedLengthList.idl:
1412         * svg/SVGAnimatedNumber.idl:
1413         * svg/SVGAnimatedNumberList.idl:
1414         * svg/SVGAnimatedPreserveAspectRatio.idl:
1415         * svg/SVGAnimatedRect.idl:
1416         * svg/SVGAnimatedString.idl:
1417         * svg/SVGAnimatedTransformList.idl:
1418         * svg/SVGColor.idl:
1419         * svg/SVGException.idl:
1420         * svg/SVGPaint.idl:
1421         * svg/SVGPathSeg.idl:
1422         * svg/SVGRenderingIntent.idl:
1423         * svg/SVGUnitTypes.idl:
1424         * svg/SVGZoomAndPan.idl:
1425         * testing/MallocStatistics.idl:
1426         * testing/TypeConversions.idl:
1427         * workers/WorkerLocation.idl:
1428         * xml/DOMParser.idl:
1429         * xml/XMLHttpRequestException.idl:
1430         * xml/XMLSerializer.idl:
1431         * xml/XPathEvaluator.idl:
1432         * xml/XPathException.idl:
1433         * xml/XPathExpression.idl:
1434         * xml/XPathNSResolver.idl:
1435         * xml/XPathResult.idl:
1436         * xml/XSLTProcessor.idl:
1437         Add exceptions to binding integrity checks to IDL.
1438         
1439 2013-01-28  Benjamin Poulain  <benjamin@webkit.org>
1440
1441         String constructed from Literals should be non-empty
1442         https://bugs.webkit.org/show_bug.cgi?id=108103
1443
1444         Reviewed by Eric Carlson.
1445
1446         Strings from literal should not be constructed from empty strings. Use emptyString()
1447         instead.
1448
1449         * html/HTMLMediaElement.cpp:
1450         (WebCore::HTMLMediaElement::canPlayType):
1451
1452 2013-01-27  Kentaro Hara  <haraken@chromium.org>
1453
1454         Implement CompositionEvent constructor
1455         https://bugs.webkit.org/show_bug.cgi?id=107919
1456
1457         Reviewed by Sam Weinig.
1458
1459         This patch implements a CompositionEvent constructor under
1460         a DOM4_EVENTS_CONSTRUCTOR flag.
1461
1462         Spec: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
1463
1464         Test: fast/events/constructors/composition-event-constructor.html
1465
1466         * dom/CompositionEvent.cpp:
1467         (WebCore::CompositionEventInit::CompositionEventInit):
1468         (WebCore):
1469         (WebCore::CompositionEvent::CompositionEvent):
1470         * dom/CompositionEvent.h:
1471         (CompositionEventInit):
1472         (WebCore):
1473         (CompositionEvent):
1474         (WebCore::CompositionEvent::create):
1475         (WebCore::CompositionEvent::data):
1476         * dom/CompositionEvent.idl:
1477
1478 2013-01-28  Pratik Solanki  <psolanki@apple.com>
1479
1480         PLATFORM(IOS) should come before __MAC_OS_X_VERSION_MIN_REQUIRED
1481         https://bugs.webkit.org/show_bug.cgi?id=108101
1482
1483         Reviewed by Benjamin Poulain.
1484
1485         Since iOS does not define __MAC_OS_X_VERSION_MIN_REQUIRED, any usage of
1486         __MAC_OS_X_VERSION_MIN_REQUIRED should be after a PLATFORM(IOS) check.
1487
1488         * platform/mac/WebCoreSystemInterface.h:
1489         * platform/mac/WebCoreSystemInterface.mm:
1490
1491 2013-01-28  Kalev Lember  <kalevlember@gmail.com>
1492
1493         [GTK] Pass ICU cppflags to libWebCoreSVG.la build
1494         https://bugs.webkit.org/show_bug.cgi?id=108032
1495
1496         Reviewed by Martin Robinson.
1497
1498         Fixes a linking error with new libicu 50 on Fedora rawhide.
1499
1500         * GNUmakefile.am:
1501
1502 2013-01-28  Min Qin  <qinmin@chromium.org>
1503
1504         adding support for DiscardablePixelRef for caching lazily decoded images
1505         https://bugs.webkit.org/show_bug.cgi?id=106842
1506
1507         Reviewed by Stephen White.
1508
1509         This change allows using discardable memory in the deferred image decoding path.
1510         Fully decoded images are unpinned and stored in ImageDecodingStore.
1511         Partially decoded images are pinned and stored in ImageDecodingStore.
1512         Discardable memory allocation could fail. Fall back to heap allocation in that case.
1513         There is a separate size limit for heap entries and no limit on discardable entries.
1514         New tests are added to ImageDecodingStoreTests
1515
1516         * WebCore.gypi:
1517         * platform/graphics/chromium/DiscardablePixelRef.cpp: Added.
1518           Added implementation of the DiscardablePixelRef object that is backed by discardable memory.
1519           Memory allocated to the DiscardablePixelRef can be purged when it is unlocked.
1520         (WebCore::DiscardablePixelRefAllocator::allocPixelRef):
1521         (WebCore):
1522         (WebCore::DiscardablePixelRef::DiscardablePixelRef):
1523         (WebCore::DiscardablePixelRef::~DiscardablePixelRef):
1524         (WebCore::DiscardablePixelRef::allocAndLockDiscardableMemory):
1525         (WebCore::DiscardablePixelRef::onLockPixels):
1526         (WebCore::DiscardablePixelRef::onUnlockPixels):
1527         (WebCore::DiscardablePixelRef::isDiscardable):
1528         * platform/graphics/chromium/DiscardablePixelRef.h: Added.
1529           Added class definition of the DiscardablePixelRef.
1530         (WebCore):
1531         (DiscardablePixelRefAllocator):
1532         (DiscardablePixelRef):
1533         * platform/graphics/chromium/ImageDecodingStore.cpp:
1534           Added new cache replacement strategy for DiscardablePixelRef.
1535         (WebCore::ImageDecodingStore::lockCache):
1536         (WebCore::ImageDecodingStore::overwriteAndLockCache):
1537         (WebCore::ImageDecodingStore::prune):
1538         (WebCore::ImageDecodingStore::insertCacheInternal):
1539         (WebCore::ImageDecodingStore::removeFromCacheInternal):
1540         * platform/graphics/chromium/ImageDecodingStore.h:
1541           Added isDiscardable() calls to check if a cache entry is discardable.
1542         (WebCore::ImageDecodingStore::CacheEntry::CacheEntry):
1543         (WebCore::ImageDecodingStore::CacheEntry::overwriteCachedImage):
1544         (WebCore::ImageDecodingStore::CacheEntry::isDiscardable):
1545         (CacheEntry):
1546         * platform/graphics/chromium/ImageFrameGenerator.cpp:
1547           Added some code to pass DiscardableMemoryAllocator to the image decoder.
1548         (WebCore::ImageFrameGenerator::tryToScale):
1549         (WebCore::ImageFrameGenerator::decode):
1550         * platform/graphics/chromium/ImageFrameGenerator.h:
1551           Added a new member variable of type DiscardableMemoryAllocator.
1552         (ImageFrameGenerator):
1553         * platform/image-decoders/ImageDecoder.h:
1554           Added methods to pass Allocator to ImageFrame.
1555         (ImageFrame):
1556         (WebCore::ImageFrame::setMemoryAllocator):
1557         (WebCore::ImageFrame::allocator):
1558         (ImageDecoder):
1559         (WebCore::ImageDecoder::setMemoryAllocator):
1560         * platform/image-decoders/skia/ImageDecoderSkia.cpp:
1561           Added code to allocate pixel memory using the allocator passed from the caller.
1562         (WebCore::ImageFrame::ImageFrame):
1563         (WebCore::ImageFrame::operator=):
1564         (WebCore::ImageFrame::setSize):
1565
1566 2013-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1567
1568         Unreviewed, rolling out r140869.
1569         http://trac.webkit.org/changeset/140869
1570         https://bugs.webkit.org/show_bug.cgi?id=108120
1571
1572         "Crashes on http://en.wikipedia.org/wiki/Wikipedia" (Requested
1573         by tonyg-cr on #webkit).
1574
1575         * page/FrameView.cpp:
1576         (WebCore::FrameView::visibleContentsResized):
1577         * platform/ScrollView.cpp:
1578         (WebCore::ScrollView::setFixedLayoutSize):
1579         (WebCore::ScrollView::setUseFixedLayout):
1580
1581 2013-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
1582
1583         Unreviewed, rolling out r140934, r140935, and r140937.
1584         http://trac.webkit.org/changeset/140934
1585         http://trac.webkit.org/changeset/140935
1586         http://trac.webkit.org/changeset/140937
1587         https://bugs.webkit.org/show_bug.cgi?id=108117
1588
1589         Re-land some speculative rollouts - see wkbug.com/108048 for
1590         context (Requested by jsbell on #webkit).
1591
1592         * CMakeLists.txt:
1593         * DerivedSources.make:
1594         * GNUmakefile.list.am:
1595         * Modules/indexeddb/IDBCallbacks.h:
1596         (IDBCallbacks):
1597         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
1598         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
1599         * Modules/indexeddb/IDBCursorBackendImpl.h:
1600         (WebCore::IDBCursorBackendImpl::create):
1601         (IDBCursorBackendImpl):
1602         * Modules/indexeddb/IDBDatabase.cpp:
1603         (WebCore::IDBDatabase::onVersionChange):
1604         * Modules/indexeddb/IDBDatabase.h:
1605         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1606         (WebCore::IDBDatabaseBackendImpl::setIndexesReady):
1607         (WebCore::OpenCursorOperation::perform):
1608         (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
1609         * Modules/indexeddb/IDBFactory.cpp:
1610         (WebCore::IDBFactory::openInternal):
1611         (WebCore::IDBFactory::deleteDatabase):
1612         * Modules/indexeddb/IDBFactory.h:
1613         (WebCore):
1614         (IDBFactory):
1615         * Modules/indexeddb/IDBFactory.idl:
1616         * Modules/indexeddb/IDBObjectStore.cpp:
1617         (WebCore::IDBObjectStore::createIndex):
1618         (WebCore::IDBObjectStore::openCursor):
1619         * Modules/indexeddb/IDBObjectStore.h:
1620         (WebCore::IDBObjectStore::openCursor):
1621         (IDBObjectStore):
1622         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1623         (WebCore::IDBOpenDBRequest::create):
1624         (WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
1625         (WebCore::IDBOpenDBRequest::onBlocked):
1626         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
1627         (WebCore::IDBOpenDBRequest::dispatchEvent):
1628         * Modules/indexeddb/IDBOpenDBRequest.h:
1629         (IDBOpenDBRequest):
1630         * Modules/indexeddb/IDBRequest.cpp:
1631         (WebCore::IDBRequest::create):
1632         (WebCore::IDBRequest::IDBRequest):
1633         * Modules/indexeddb/IDBRequest.h:
1634         (IDBRequest):
1635         (WebCore::IDBRequest::taskType):
1636         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
1637         (WebCore::IDBTransactionBackendImpl::scheduleTask):
1638         * Modules/indexeddb/IDBTransactionBackendImpl.h:
1639         (WebCore::IDBTransactionBackendImpl::scheduleTask):
1640         (IDBTransactionBackendImpl):
1641         * Modules/indexeddb/IDBTransactionBackendInterface.h:
1642         * Modules/indexeddb/IDBUpgradeNeededEvent.cpp: Removed.
1643         * Modules/indexeddb/IDBUpgradeNeededEvent.h: Removed.
1644         * Modules/indexeddb/IDBUpgradeNeededEvent.idl: Removed.
1645         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
1646         (WebCore::IDBVersionChangeEvent::create):
1647         (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
1648         * Modules/indexeddb/IDBVersionChangeEvent.h:
1649         (IDBVersionChangeEvent):
1650         (WebCore::IDBVersionChangeEvent::oldVersion):
1651         (WebCore::IDBVersionChangeEvent::newVersion):
1652         * Modules/indexeddb/IDBVersionChangeEvent.idl:
1653         * Modules/indexeddb/IDBVersionChangeRequest.cpp: Removed.
1654         * Modules/indexeddb/IDBVersionChangeRequest.h: Removed.
1655         * Modules/indexeddb/IDBVersionChangeRequest.idl: Removed.
1656         * WebCore.gypi:
1657         * WebCore.xcodeproj/project.pbxproj:
1658         * dom/EventNames.in:
1659         * dom/EventTarget.h:
1660         (WebCore):
1661         * dom/EventTargetFactory.in:
1662
1663 2013-01-28  Joseph Pecoraro  <pecoraro@apple.com>
1664
1665         Unreviewed Mac build fix. Add an export for a function that may be
1666         accessed outside of WebCore (RenderLayer::needsCompositedScrolling).
1667
1668         * WebCore.exp.in:
1669
1670 2013-01-28  Julien Chaffraix  <jchaffraix@webkit.org>
1671
1672         Crash inside RenderBlock::layoutRunsAndFloatsInRange in the widow code
1673         https://bugs.webkit.org/show_bug.cgi?id=108084
1674
1675         Reviewed by Dean Jackson.
1676
1677         This is a blind fix based on the code and Chromium's stack-traces.
1678
1679         Unfortunately no new test as I couldn't get a local reproduction.
1680
1681         * rendering/RenderBlockLineLayout.cpp:
1682         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
1683         Added a missing NULL-check: the previous 'while' finish if |lineBox|
1684         is NULL and we don't want to crash in this case.
1685
1686 2013-01-28  Tony Chang  <tony@chromium.org>
1687
1688         "clang: warning: not using the clang compiler for C++ inputs" due to hard-coding of /usr/bin/clang in WebCore.gyp
1689         https://bugs.webkit.org/show_bug.cgi?id=108089
1690
1691         Reviewed by Ojan Vafai.
1692
1693         Use gcc since older versions of clang (with Xcode 3.2) warn that they are going to use gcc anyway.
1694         These warnings are showing up on the main Chromium waterfall too:
1695         http://build.chromium.org/p/chromium/builders/Mac/builds/19113/steps/compile/logs/stdio
1696
1697         No new tests, this is a build change.
1698
1699         * WebCore.gyp/WebCore.gyp:
1700
1701 2013-01-28  Elliott Sprehn  <esprehn@chromium.org>
1702
1703         Move hasAuthorShadowRoot to Element
1704         https://bugs.webkit.org/show_bug.cgi?id=108071
1705
1706         Reviewed by Dimitri Glazkov.
1707
1708         Move hasAuthorShadowRoot to Element and get rid of unneccesary booleans
1709         in HTMLProgressElement and HTMLMeterElement. Also get rid of
1710         ShadowRoot::isAccessible since it obfuscates what's actually happening
1711         inside of Element::shadowRoot().
1712
1713         No new tests, just refactoring.
1714
1715         * dom/Element.cpp:
1716         (WebCore::Element::shadowRoot):
1717         (WebCore::Element::hasAuthorShadowRoot):
1718         * dom/Element.h:
1719         (Element):
1720         * dom/ShadowRoot.h:
1721         * html/HTMLMeterElement.cpp:
1722         (WebCore::HTMLMeterElement::HTMLMeterElement):
1723         * html/HTMLMeterElement.h:
1724         (HTMLMeterElement):
1725         * html/HTMLProgressElement.cpp:
1726         (WebCore::HTMLProgressElement::HTMLProgressElement):
1727         * html/HTMLProgressElement.h:
1728         (HTMLProgressElement):
1729
1730 2013-01-28  Elliott Sprehn  <esprehn@chromium.org>
1731
1732         Move ensureUserAgentShadowRoot to Element
1733         https://bugs.webkit.org/show_bug.cgi?id=108070
1734
1735         Reviewed by Dimitri Glazkov.
1736
1737         Move ensureUserAgentShadowRoot to Element where the other
1738         methods related to shadow roots are and get rid of the
1739         unnecessarily specific cast to HTMLElement.
1740
1741         No new tests, just refactoring.
1742
1743         * dom/Element.cpp:
1744         (WebCore::Element::ensureUserAgentShadowRoot): Moved from FormAssociatedElement.
1745         * dom/Element.h:
1746         (Element):
1747         * html/FormAssociatedElement.cpp:
1748         * html/FormAssociatedElement.h:
1749         (FormAssociatedElement):
1750
1751 2013-01-28  Ian Vollick  <vollick@chromium.org>
1752
1753         Promote composited-scrolling layers to stacking containers.
1754         https://bugs.webkit.org/show_bug.cgi?id=106142
1755
1756         Reviewed by Simon Fraser.
1757
1758         With this patch, RenderLayers that use composited scrolling are
1759         treated as stacking contexts. Since isStackingContainer now depends on
1760         the value of m_needsCompositedScrolling, special care needed to be
1761         taken to ensure that the value of isStackingContainer is not used when
1762         updating m_needsCompositedScrolling. In particular, the code for
1763         rebuilding the layer lists needed to be generalized so that we could
1764         build the layer lists using the value of isStackingContext rather than
1765         isStackingContainer when building the layer lists used to determine if
1766         the descendants are contiguous in stacking order. Also, updating
1767         m_needsCompositedScrolling can now affect stacking container status
1768         and can therefore dirty layer lists.
1769
1770         Test: compositing/overflow/composited-scrolling-creates-a-stacking-container.html
1771
1772         * rendering/RenderLayer.cpp:
1773         (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder):
1774           Modified to use layer lists built based on isStackingContext rather
1775           than isStackingContainer.
1776         (WebCore::RenderLayer::updateNeedsCompositedScrolling):
1777           This function can now affect stacking container status and layer
1778           lists.
1779         (WebCore::RenderLayer::rebuildZOrderLists):
1780           Refactored to generalize layer list building.
1781         (WebCore::RenderLayer::collectLayers):
1782           This function can now stop at either stacking containers or
1783           contexts.
1784         (WebCore::RenderLayer::updateLayerListsIfNeeded):
1785           Layer lists may need to be built a 2nd time if we opt into
1786           composited scrolling.
1787         * rendering/RenderLayer.h:
1788         (RenderLayer):
1789         (WebCore::RenderLayer::isStackingContainer):
1790           Returns true if we use composited scrolling.
1791
1792 2013-01-28  Max Vujovic  <mvujovic@adobe.com>
1793
1794         [CSS Shaders] Parse @-webkit-filter
1795         https://bugs.webkit.org/show_bug.cgi?id=106837
1796
1797         Reviewed by Dean Jackson.
1798
1799         The new CSS Custom Filters syntax includes an @filter rule:
1800         @filter IDENT { <custom-filter-description> }
1801
1802         IDENT is the filter name. For example:
1803         @filter my-filter { ... }
1804
1805         <custom-filter-description> is a set of CSS properties, which are still under discussion in
1806         the CSSWG.
1807
1808         This patch adds parsing and JS bindings for the prefixed at-rule. It does not add parsing
1809         for any of the at-rule's internal properties.
1810
1811         Spec: https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#the-atfilter-rule
1812
1813         Tests: css3/filters/custom/custom-filter-parsing-at-rule-invalid.html
1814                css3/filters/custom/custom-filter-parsing-at-rule-valid.html
1815
1816         * CMakeLists.txt:
1817         * DerivedSources.cpp:
1818         * DerivedSources.make:
1819         * DerivedSources.pri:
1820         * GNUmakefile.list.am:
1821         * Target.pri:
1822         * WebCore.gypi:
1823         * WebCore.xcodeproj/project.pbxproj:
1824         * bindings/js/JSCSSRuleCustom.cpp:
1825         (WebCore::toJS):
1826         * bindings/objc/DOMCSS.mm:
1827         (kitClass):
1828         * bindings/v8/custom/V8CSSRuleCustom.cpp:
1829         (WebCore::wrap):
1830         * css/CSSGrammar.y.in:
1831         * css/CSSParser.cpp:
1832         (WebCore::CSSParser::createFilterRule):
1833         (WebCore::CSSParser::detectAtToken):
1834         * css/CSSParser.h:
1835         * css/CSSPropertySourceData.h:
1836         * css/CSSRule.h:
1837         * css/CSSRule.idl:
1838             Only contains a CSSStyleDeclaration "style" property, like the other at-rules that are
1839             supposed to contain properties (e.g. CSSStyleRule, CSSFontFaceRule, CSSPageRule).
1840             Eventually, when it's specified, we should expose the filter name as well.
1841             Other at-rules IDL Spec: http://www.w3.org/TR/DOM-Level-2-Style/idl-definitions.html
1842         * css/StyleRule.cpp:
1843         (WebCore::StyleRuleBase::reportMemoryUsage):
1844         (WebCore::StyleRuleBase::destroy):
1845         (WebCore::StyleRuleBase::copy):
1846         (WebCore::StyleRuleBase::createCSSOMWrapper):
1847         (WebCore::StyleRuleFilter::StyleRuleFilter):
1848         (WebCore::StyleRuleFilter::~StyleRuleFilter):
1849         (WebCore::StyleRuleFilter::mutableProperties):
1850         (WebCore::StyleRuleFilter::setProperties):
1851         (WebCore::StyleRuleFilter::reportDescendantMemoryUsage):
1852         * css/StyleRule.h:
1853         (StyleRuleBase):
1854         (WebCore::StyleRuleBase::isFilterRule):
1855         (StyleRuleFilter):
1856         (WebCore::StyleRuleFilter::create):
1857         (WebCore::StyleRuleFilter::filterName):
1858         (WebCore::StyleRuleFilter::properties):
1859         (WebCore::StyleRuleFilter::copy):
1860         * css/StyleSheetContents.cpp:
1861         (WebCore::childRulesHaveFailedOrCanceledSubresources):
1862         * css/WebKitCSSFilterRule.cpp: Added.
1863             WebKitCSSFilterRule is implemented similar to CSSFontFaceRule.
1864         (WebCore::WebKitCSSFilterRule::WebKitCSSFilterRule):
1865         (WebCore::WebKitCSSFilterRule::~WebKitCSSFilterRule):
1866         (WebCore::WebKitCSSFilterRule::style):
1867         (WebCore::WebKitCSSFilterRule::cssText):
1868             The CSS text implementation for WebKitCSSFilterRule is almost the same as
1869             CSSFontFaceRule. WebKitCSSFilterRule additionally needs to output the filter name in its
1870             syntax (e.g. @-webkit-filter my-filter { }).
1871         (WebCore::WebKitCSSFilterRule::reattach):
1872         (WebCore::WebKitCSSFilterRule::reportMemoryUsage):
1873         * css/WebKitCSSFilterRule.h: Added.
1874         (WebKitCSSFilterRule):
1875         (WebCore::WebKitCSSFilterRule::create):
1876         * css/WebKitCSSFilterRule.idl: Added.
1877
1878 2013-01-28  Anders Carlsson  <andersca@apple.com>
1879
1880         Add StorageStrategy member functions to WebKit2
1881         https://bugs.webkit.org/show_bug.cgi?id=108105
1882
1883         Reviewed by Tim Horton.
1884
1885         StorageStrategy::sessionStorageNamespace should be virtual, not static...
1886
1887         * WebCore.exp.in:
1888         * storage/StorageStrategy.h:
1889         (StorageStrategy):
1890
1891 2013-01-28  Uday Kiran  <udaykiran@motorola.com>
1892
1893         getComputedStyle returns "left" instead of "none" for "float" on abspos elements
1894         https://bugs.webkit.org/show_bug.cgi?id=105836
1895
1896         Reviewed by Tony Chang.
1897
1898         If 'position' has the value absolute, page or fixed, and the value of float is
1899         left or right, the box is absolutely positioned and the computed value of float is none.
1900         http://www.w3.org/TR/css3-positioning/#dis-pos-flo
1901         This matches behavior of Firefox 18, Opera 12 and IE9.
1902
1903         Test: fast/css/position-absolute-float.html
1904
1905         * css/CSSComputedStyleDeclaration.cpp:
1906         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1907
1908 2013-01-28  Tony Gentilcore  <tonyg@chromium.org>
1909
1910         Don't use threaded HTML parser for data: URLs
1911         https://bugs.webkit.org/show_bug.cgi?id=108096
1912
1913         Reviewed by Eric Seidel.
1914
1915         data: URLs are currently loaded synchronously. Using the main thread parser for them preserves this behavior.
1916         This fixes fast/dom/HTMLDocument/document-open-return-value.html and probably others.
1917
1918         No new tests because covered by existing tests.
1919
1920         * html/parser/HTMLParserOptions.cpp:
1921         (WebCore::HTMLParserOptions::HTMLParserOptions):
1922
1923 2013-01-28  Tony Gentilcore  <tonyg@chromium.org>
1924
1925         Don't use the threaded HTML parser for javascript: URLs
1926         https://bugs.webkit.org/show_bug.cgi?id=107975
1927
1928         Reviewed by Adam Barth.
1929
1930         Several layout tests depend on javascript: URL iframes loading synchronously including fast/loader/javascript-url-encoding.html.
1931         This patch avoids using the threaded parser for those URLs so they will continue to be synchronous.
1932
1933         No new tests because covered by existing tests.
1934
1935         * html/parser/HTMLParserOptions.cpp:
1936         (WebCore::HTMLParserOptions::HTMLParserOptions):
1937
1938 2013-01-27  Sam Weinig  <sam@webkit.org>
1939
1940         SVGPathStringSource should not up-convert 8-bit strings to UTF-16
1941         https://bugs.webkit.org/show_bug.cgi?id=108050
1942
1943         Reviewed by Anders Carlsson.
1944
1945         Should save around ~400k on Membuster3.
1946
1947         * svg/SVGParserUtilities.cpp:
1948         (WebCore::parseNumber):
1949         (WebCore::genericParseArcFlag):
1950         (WebCore::parseArcFlag):
1951         * svg/SVGParserUtilities.h:
1952         Add LChar variants of parseNumber and parseArcFlag.
1953
1954         * svg/SVGPathSource.h:
1955         (WebCore):
1956         Move forward declaration of FloatPoint here, where it belongs.
1957
1958         * svg/SVGPathStringSource.cpp:
1959         (WebCore::parseFloatPoint):
1960         (WebCore::parseFloatPoint2):
1961         (WebCore::parseFloatPoint3):
1962         Add helpers for parsing float points.
1963
1964         (WebCore::SVGPathStringSource::SVGPathStringSource):
1965         (WebCore::SVGPathStringSource::hasMoreData):
1966         (WebCore::SVGPathStringSource::moveToNextToken):
1967         (WebCore::parseSVGSegmentTypeHelper):
1968         (WebCore::SVGPathStringSource::parseSVGSegmentType):
1969         (WebCore::nextCommandHelper):
1970         (WebCore::SVGPathStringSource::nextCommand):
1971         (WebCore::SVGPathStringSource::parseMoveToSegment):
1972         (WebCore::SVGPathStringSource::parseLineToSegment):
1973         (WebCore::SVGPathStringSource::parseLineToHorizontalSegment):
1974         (WebCore::SVGPathStringSource::parseLineToVerticalSegment):
1975         (WebCore::SVGPathStringSource::parseCurveToCubicSegment):
1976         (WebCore::SVGPathStringSource::parseCurveToCubicSmoothSegment):
1977         (WebCore::SVGPathStringSource::parseCurveToQuadraticSegment):
1978         (WebCore::SVGPathStringSource::parseCurveToQuadraticSmoothSegment):
1979         (WebCore::parseArcToSegmentHelper):
1980         (WebCore::SVGPathStringSource::parseArcToSegment):
1981         * svg/SVGPathStringSource.h:
1982         (SVGPathStringSource):
1983         Make 8-bit aware.
1984
1985 2013-01-28  Simon Fraser  <simon.fraser@apple.com>
1986
1987         Repaint issues in background tabs after r138858
1988         https://bugs.webkit.org/show_bug.cgi?id=108092
1989         <rdar://problem/13076430>
1990
1991         Reviewed by Tim Horton.
1992
1993         In r138858, we unparented all tiles in the tile caches of background tabs.
1994         That broke repaints in background tabs; when bringing that tab back to the
1995         foreground, we would call -setNeedsDisplayInRect:, and then reparent the tiles
1996         on a zero-delay timer. Those repaints would then be flipped (possibly because
1997         CA can't look up the layer tree to check for flipped geometry).
1998         
1999         Fix by revalidating tiles (which reparents the tiles) at the time we're told
2000         we're moving into the window, which happens before repaints are flushed.
2001
2002         * platform/graphics/ca/mac/TileCache.mm:
2003         (WebCore::TileCache::setIsInWindow):
2004
2005 2013-01-28  Adam Barth  <abarth@webkit.org>
2006
2007         Remove webkitNotifications.createHTMLNotification
2008         https://bugs.webkit.org/show_bug.cgi?id=107598
2009
2010         Reviewed by Benjamin Poulain.
2011
2012         As discussed in http://lists.webkit.org/pipermail/webkit-dev/2012-February/019354.html,
2013         we've been slowly deprecating HTML notificiations for about a year.
2014         FeatureObserver says that HTML notifications are used by 0.0008% of web
2015         pages, which means we should be able to remove them without causing too
2016         much trouble.
2017
2018         * Configurations/FeatureDefines.xcconfig:
2019         * Modules/notifications/Notification.cpp:
2020         (WebCore):
2021         (WebCore::Notification::Notification):
2022         * Modules/notifications/Notification.h:
2023         (Notification):
2024         * Modules/notifications/NotificationCenter.h:
2025         (NotificationCenter):
2026         * Modules/notifications/NotificationCenter.idl:
2027
2028 2013-01-28  Bear Travis  <betravis@adobe.com>
2029
2030         [CSS Exclusions] Refactor ExclusionShapeInsideInfo to more general ExclusionShapeInfo
2031         https://bugs.webkit.org/show_bug.cgi?id=100766
2032
2033         Reviewed by Dirk Schulze.
2034
2035         Refactoring, covered by existing tests.
2036
2037         Factoring out code common to ExclusionShapeInsideInfo and ExclusionShapeOutsideInfo
2038         into common classes in ExclusionShapeInfo.h. Since the ExclusionShapeInsideInfo and
2039         ExclusionShapeOutsideInfo share almost all of their code, save the RenderObject type
2040         they work with and the specific shapeInside/Outside methods they call on RenderStyle
2041         and ExclusionShape, the code has been templated. The code responsible for maintaining
2042         global maps has also been factored out into a MappedInfo class.
2043
2044         * CMakeLists.txt: Adding ExclusionShapeInfo files.
2045         * GNUmakefile.list.am: Ditto.
2046         * Target.pri: Ditto.
2047         * WebCore.gypi: Ditto.
2048         * WebCore.vcproj/WebCore.vcproj: Ditto.
2049         * WebCore.xcodeproj/project.pbxproj: Ditto.
2050         * rendering/ExclusionShapeInfo.cpp: Added.
2051         (WebCore::::computedShape): Determine the shape based on the current logical
2052         dimensions. Call this method rather than accessing m_shape directly.
2053         * rendering/ExclusionShapeInfo.h: Added.
2054         (MappedInfo): Helper class that maintains a global info map.
2055         (WebCore::MappedInfo::ensureInfo): Look up the info for a key and add it if not present.
2056         (WebCore::MappedInfo::removeInfo): Remove the info associated with a key.
2057         (WebCore::MappedInfo::info): Look up the info associated with a key.
2058         (WebCore::MappedInfo::infoMap): The map used to store key/info pairs.
2059         (ExclusionShapeInfo): A common parent class for ExclusionShapeInside/OutsideInfos.
2060         The methods were factored out of the code common to ExclusionShapeInside/OutsideInfo.
2061         (WebCore::ExclusionShapeInfo::~ExclusionShapeInfo): Destructor.
2062         (WebCore::ExclusionShapeInfo::setShapeSize): Sets the shape's logical size.
2063         (WebCore::ExclusionShapeInfo::shapeLogicalTop/Bottom/Left/Right/Width/Height):
2064         Returns the shape's logical dimensions.
2065         (WebCore::ExclusionShapeInfo::dirtyShapeSize): Mark the shape for recomputation.
2066         (WebCore::ExclusionShapeInfo::owner): The renderer to which this info belongs.
2067         (WebCore::ExclusionShapeInfo::ExclusionShapeInfo): Constructor.
2068         (WebCore::ExclusionShapeInfo::floatLogicalTopToLayoutUnit/floatLogicalBottomToLayoutUnit):
2069         Helper methods that round float units from ExclusionShapes to LayoutUnits for layout.
2070         * rendering/ExclusionShapeInsideInfo.cpp:
2071         (WebCore::ExclusionShapeInsideInfo::computeSegmentsForLine): Modified to use
2072         computedShape() rather than m_shape.
2073         (WebCore::ExclusionShapeInsideInfo::adjustLogicalLineTop): Ditto.
2074         * rendering/ExclusionShapeInsideInfo.h:
2075         (WebCore::ExclusionShapeInsideInfo::createInfo): Renamed to match MappedInfo.
2076         (WebCore::ExclusionShapeInsideInfo::isEnabledFor): Renamed to match shorter naming.
2077         (WebCore::ExclusionShapeInsideInfo::lineOverlapsShapeBounds): Modified to use
2078         computedShape().
2079         * rendering/ExclusionShapeOutsideInfo.cpp:
2080         (WebCore::ExclusionShapeOutsideInfo::isEnabledFor): Renamed to match shorter naming.
2081         * rendering/ExclusionShapeOutsideInfo.h:
2082         (WebCore::ExclusionShapeOutsideInfo::createInfo): Renamed to match MappedInfo.
2083         (WebCore::ExclusionShapeOutsideInfo::ExclusionShapeOutsideInfo): Constructor.
2084         * rendering/RenderBlock.cpp:
2085         (WebCore::RenderBlock::willBeDestroyed): Use shortened MappedInfo names for looking
2086         up infos.
2087         (WebCore::RenderBlock::exclusionShapeInsideInfo): Ditto.
2088         (WebCore::RenderBlock::updateExclusionShapeInsideInfoAfterStyleChange): Ditto.
2089         (WebCore::RenderBlock::computeExclusionShapeSize): Ditto.
2090         * rendering/RenderBox.cpp:
2091         (WebCore::RenderBox::willBeDestroyed): Ditto.
2092         (WebCore::RenderBox::updateExclusionShapeOutsideInfoAfterStyleChange): Ditto.
2093         * rendering/RenderBox.h:
2094         (WebCore):
2095         (WebCore::RenderBox::exclusionShapeOutsideInfo): Ditto.
2096
2097 2013-01-28  Stephen Chenney  <schenney@chromium.org>
2098
2099         SVGViewSpec fails when corresponding element has been removed
2100         https://bugs.webkit.org/show_bug.cgi?id=106957
2101
2102         Reviewed by Dirk Schulze.
2103
2104         When JS holds an SVGViewSpec object while deleting the object that
2105         defines the spec (an SVGSVGElement, or one of a few others) the
2106         pointer to the target is cleared in the SVGViewSpec but the methods
2107         that serve JS queries do not check and try to access the now null
2108         target. This patch fixes the prooblem, returning null when the
2109         corresponding object has been deleted.
2110
2111         Also removing SVGViewSpec::setPreserveAspectRatioString, which is no
2112         longer used by any callers.
2113
2114         Test: svg/dom/SVGViewSpec-invalid-ref-crash.html
2115
2116         * svg/SVGViewSpec.cpp:
2117         (WebCore):
2118         (WebCore::SVGViewSpec::viewTarget): Check for null target and return null.
2119         (WebCore::SVGViewSpec::transform): Check for null target and return null..
2120         (WebCore::SVGViewSpec::viewBoxAnimated): Check for null target and return null.
2121         (WebCore::SVGViewSpec::preserveAspectRatioAnimated): Check for null target and return null.
2122         (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper): ASSERT non-null target.
2123         (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper): ASSERT non-null target.
2124         (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper): ASSERT non-null target.
2125         * svg/SVGViewSpec.h:
2126         (SVGViewSpec): Move some methods out of the header and into the implementation file.
2127
2128         * svg/SVGViewSpec.cpp:
2129         (WebCore):
2130         (WebCore::SVGViewSpec::transform):
2131         (WebCore::SVGViewSpec::viewBoxAnimated):
2132         (WebCore::SVGViewSpec::preserveAspectRatioAnimated):
2133         (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper):
2134         (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper):
2135         (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
2136         * svg/SVGViewSpec.h:
2137         (SVGViewSpec):
2138
2139 2013-01-28  James Craig  <james@cookiecrook.com>
2140
2141         HTML5 promotes DL from specific 'definition list' to superset 'description list'; accessibility strings and accessors should be updated to match.
2142         https://bugs.webkit.org/show_bug.cgi?id=107650
2143
2144         Reviewed by Chris Fleizach.
2145
2146         Updating accessibility strings and accessors for DL/DT/DD; new one for [role="definition"] (previously it reused the role/desc for DD).
2147
2148         Test: platform/mac/accessibility/definition-list-term.html:
2149         Test: accessibility/lists.html
2150
2151         * English.lproj/Localizable.strings:
2152         * accessibility/AccessibilityList.cpp:
2153         (WebCore::AccessibilityList::isDescriptionList):
2154         * accessibility/AccessibilityList.h:
2155         (AccessibilityList):
2156         * accessibility/AccessibilityObject.cpp:
2157         (WebCore::createARIARoleMap):
2158         * accessibility/AccessibilityObject.h:
2159         * accessibility/AccessibilityRenderObject.cpp:
2160         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2161         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
2162         (createAccessibilityRoleMap):
2163         (-[WebAccessibilityObjectWrapper subrole]):
2164         (-[WebAccessibilityObjectWrapper roleDescription]):
2165         * platform/LocalizedStrings.cpp:
2166         (WebCore::AXDefinitionText):
2167         (WebCore::AXDescriptionListTermText):
2168         (WebCore):
2169         (WebCore::AXDescriptionListDetailText):
2170         * platform/LocalizedStrings.h:
2171         (WebCore):
2172         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
2173         (WebCore::AXDefinitionText):
2174         (WebCore::AXDescriptionListDetailText):
2175         (WebCore):
2176         (WebCore::AXDescriptionListTermText):
2177         * platform/efl/LocalizedStringsEfl.cpp:
2178         (WebCore::AXDefinitionText):
2179         (WebCore):
2180         (WebCore::AXDescriptionListTermText):
2181         (WebCore::AXDescriptionListDetailText):
2182         * platform/gtk/LocalizedStringsGtk.cpp:
2183         (WebCore::AXDefinitionText):
2184         (WebCore):
2185         (WebCore::AXDescriptionListTermText):
2186         (WebCore::AXDescriptionListDetailText):
2187         * platform/qt/LocalizedStringsQt.cpp:
2188         (WebCore::AXDefinitionText):
2189         (WebCore::AXDescriptionListTermText):
2190         (WebCore):
2191         (WebCore::AXDescriptionListDetailText):
2192
2193 2013-01-28  Vladislav Kaznacheev  <kaznacheev@chromium.org>
2194
2195         Web Inspector: Inherit SidebarPane from View.
2196         https://bugs.webkit.org/show_bug.cgi?id=108075
2197
2198         Reviewed by Pavel Feldman.
2199
2200         Inherited WebInspector.SidebarPane from WebInspector.View to streamlines the code and
2201         simplify further enhancements to sidebar panes. Got rid of obsolete onattach calls.
2202
2203         No new tests.
2204
2205         * inspector/front-end/AuditResultView.js:
2206         (WebInspector.AuditResultView):
2207         * inspector/front-end/ElementsPanel.js:
2208         (WebInspector.ElementsPanel):
2209         (WebInspector.ElementsPanel.prototype.wasShown):
2210         (WebInspector.ElementsPanel.prototype.willHide):
2211         * inspector/front-end/ExtensionServer.js:
2212         (WebInspector.ExtensionServer.prototype._onCreateSidebarPane):
2213         * inspector/front-end/ScriptsPanel.js:
2214         (WebInspector.ScriptsPanel):
2215         (WebInspector.ScriptsPanel.prototype.wasShown):
2216         * inspector/front-end/SidebarPane.js:
2217         (WebInspector.SidebarPane):
2218         * inspector/front-end/WatchExpressionsSidebarPane.js:
2219         (WebInspector.WatchExpressionsSidebarPane.prototype._refreshExpressionsIfNeeded):
2220
2221 2013-01-28  Martin Robinson  <mrobinson@igalia.com>
2222
2223         [Freetype] Synthetic bold not applied to fallback fonts properly
2224         https://bugs.webkit.org/show_bug.cgi?id=107733
2225
2226         Reviewed by Gustavo Noronha Silva.
2227
2228         No new tests. This is covered by existing pixel tests.
2229
2230         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
2231         (WebCore::FontPlatformData::FontPlatformData): When we detect a situation in which
2232         we are a bold font, but the Fontconfig pattern does not describe the font as
2233         bold, we should activate synthetic bolding.
2234
2235 2013-01-28  Vsevolod Vlasov  <vsevik@chromium.org>
2236
2237         Web Inspector: [Regression] Search all sources should not search across service projects.
2238         https://bugs.webkit.org/show_bug.cgi?id=108068
2239
2240         Reviewed by Pavel Feldman.
2241
2242         * inspector/front-end/ScriptsSearchScope.js:
2243         (WebInspector.ScriptsSearchScope):
2244         (WebInspector.ScriptsSearchScope.prototype._sortedUISourceCodes):
2245
2246 2013-01-28  Pavel Feldman  <pfeldman@chromium.org>
2247
2248         Web Inspector: SourceURL and SourceMappingURL together in evalled code
2249         https://bugs.webkit.org/show_bug.cgi?id=107939
2250
2251         Reviewed by Vsevolod Vlasov.
2252
2253         Resolve map's sources URLs wrt script URL in case sourceMap is defined as data:.
2254
2255         * inspector/front-end/CompilerScriptMapping.js:
2256         (WebInspector.CompilerScriptMapping.prototype.loadSourceMapForScript):
2257         * inspector/front-end/ParsedURL.js:
2258         (WebInspector.ParsedURL.completeURL):
2259         * inspector/front-end/SourceMap.js:
2260         (WebInspector.SourceMap.prototype._parseMap):
2261
2262 2013-01-28  Andrey Adaikin  <aandrey@chromium.org>
2263
2264         Web Inspector: [Canvas] refactoring in CanvasAgent to reduce code dups
2265         https://bugs.webkit.org/show_bug.cgi?id=108064
2266
2267         Reviewed by Pavel Feldman.
2268
2269         Introduce private methods injectedScriptCanvasModule() in InspectorCanvasAgent to reduce much of code duplication.
2270         Drive-by: in InspectorPageAgent.assertFrame convert "String" argument to "const String&".
2271
2272         * inspector/InspectorCanvasAgent.cpp:
2273         (WebCore::InspectorCanvasAgent::dropTraceLog):
2274         (WebCore::InspectorCanvasAgent::captureFrame):
2275         (WebCore::InspectorCanvasAgent::startCapturing):
2276         (WebCore::InspectorCanvasAgent::stopCapturing):
2277         (WebCore::InspectorCanvasAgent::getTraceLog):
2278         (WebCore::InspectorCanvasAgent::replayTraceLog):
2279         (WebCore::InspectorCanvasAgent::getResourceInfo):
2280         (WebCore::InspectorCanvasAgent::getResourceState):
2281         (WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation):
2282         (WebCore::InspectorCanvasAgent::wrapWebGLRenderingContextForInstrumentation):
2283         (WebCore::InspectorCanvasAgent::injectedScriptCanvasModule):
2284         (WebCore):
2285         (WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
2286         * inspector/InspectorCanvasAgent.h:
2287         (InspectorCanvasAgent):
2288         * inspector/InspectorPageAgent.cpp:
2289         (WebCore::InspectorPageAgent::assertFrame):
2290         (WebCore::InspectorPageAgent::assertDocumentLoader):
2291         * inspector/InspectorPageAgent.h:
2292         (InspectorPageAgent):
2293
2294 2013-01-28  Kihong Kwon  <kihong.kwon@samsung.com>
2295
2296         Replace the type of Proximity's supplementName for char*
2297         https://bugs.webkit.org/show_bug.cgi?id=108049
2298
2299         Reviewed by Benjamin Poulain.
2300
2301         There are some changes for supplementName by Bug 107535.
2302         It makes build break when PROXIMITY_EVENT feature is enabled.
2303         Therefore ProximityController need to change the type of supplementName for char* also.
2304
2305         No new tests. Functionality is not changed.
2306
2307         * Modules/proximity/DeviceProximityController.cpp:
2308         (WebCore::DeviceProximityController::supplementName):
2309         * Modules/proximity/DeviceProximityController.h:
2310         (DeviceProximityController):
2311
2312 2013-01-28  Keishi Hattori  <keishi@webkit.org>
2313
2314         [REGRESSION] Calendar Picker focus ring is gone
2315         https://bugs.webkit.org/show_bug.cgi?id=108055
2316
2317         Reviewed by Kent Tamura.
2318
2319         The focus ring wasn't visible because -webkit-focus-ring-color value
2320         only works for outline property in strict mode. Using fixed color
2321         instead.
2322
2323         No new tests. Can't reproduce in layout test because mock popup writes a
2324         script tag in front of the doctype.
2325
2326         * Resources/pagepopups/chromium/calendarPickerChromium.css:
2327         (.days-area-container:focus):
2328         * Resources/pagepopups/chromium/pickerCommonChromium.css:
2329         (:enabled:focus:-webkit-any(button, input[type='button'])):
2330
2331 2013-01-25  Yury Semikhatsky  <yurys@chromium.org>
2332
2333         Web Inspector: remove unused isElement and similar methods from HeapProfiler
2334         https://bugs.webkit.org/show_bug.cgi?id=107940
2335
2336         Reviewed by Vsevolod Vlasov.
2337
2338         - Removed some unused methods.
2339         - Moved JS specific edge filters to JSHeapSnapshot.
2340
2341         * inspector/front-end/HeapSnapshot.js:
2342         (WebInspector.HeapSnapshot.prototype.createEdgesProvider):
2343         (WebInspector.HeapSnapshot.prototype.createEdgesProviderForTest):
2344         (WebInspector.HeapSnapshot.prototype.retainingEdgesFilter):
2345         (WebInspector.HeapSnapshot.prototype.containmentEdgesFilter):
2346         (WebInspector.HeapSnapshot.prototype.createRetainingEdgesProvider):
2347         (WebInspector.HeapSnapshot.prototype.classNodesFilter):
2348         (WebInspector.HeapSnapshot.prototype.createNodesProviderForClass):
2349         * inspector/front-end/HeapSnapshotGridNodes.js:
2350         (WebInspector.HeapSnapshotGenericObjectNode):
2351         * inspector/front-end/HeapSnapshotProxy.js:
2352         (WebInspector.HeapSnapshotProxy.prototype.createEdgesProvider):
2353         (WebInspector.HeapSnapshotProxy.prototype.createRetainingEdgesProvider):
2354         * inspector/front-end/JSHeapSnapshot.js:
2355         (WebInspector.JSHeapSnapshot.prototype.classNodesFilter):
2356         (WebInspector.JSHeapSnapshot.prototype._markDetachedDOMTreeNodes):
2357         * inspector/front-end/NativeHeapSnapshot.js:
2358
2359 2013-01-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2360
2361         Unreviewed, rolling out r140554.
2362         http://trac.webkit.org/changeset/140554
2363         https://bugs.webkit.org/show_bug.cgi?id=108057
2364
2365         Caused tables/table-section-overflow-clip-crash.html and
2366         bug2479-5.html to crash. (Requested by keishi on #webkit).
2367
2368         * rendering/RenderBox.cpp:
2369         (WebCore::RenderBox::minPreferredLogicalWidth):
2370         (WebCore::RenderBox::maxPreferredLogicalWidth):
2371         * rendering/mathml/RenderMathMLOperator.cpp:
2372         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
2373         * rendering/mathml/RenderMathMLRoot.cpp:
2374         (WebCore::RenderMathMLRoot::computePreferredLogicalWidths):
2375         * rendering/mathml/RenderMathMLRow.cpp:
2376         (WebCore::RenderMathMLRow::computePreferredLogicalWidths):
2377
2378 2013-01-24  Yury Semikhatsky  <yurys@chromium.org>
2379
2380         Web Inspector: each node in a detached DOM tree is shown in its own "detached DOM tree" entry in heap profiler
2381         https://bugs.webkit.org/show_bug.cgi?id=107819
2382
2383         Reviewed by Adam Barth.
2384
2385         Provide single RetainedDOMInfo for each group of DOM Node wrappers reported to GC.
2386         Otherwise we have unequal RetainedDOMInfo groups for each wrapped node.
2387
2388         * bindings/v8/V8GCController.cpp:
2389         (WebCore::ImplicitConnection::ImplicitConnection):
2390         (WebCore::ImplicitConnection::retainedObjectInfo):
2391         (ImplicitConnection):
2392         (WebCore::WrapperGrouper::addObjectToGroup):
2393         (WrapperGrouper):
2394         (WebCore::WrapperGrouper::addNodeToGroup):
2395         (WebCore::WrapperGrouper::apply):
2396         (WebCore::V8GCController::opaqueRootForGC):
2397         * bindings/v8/V8GCController.h:
2398         (V8GCController):
2399
2400 2013-01-27  Mihnea Ovidenie  <mihnea@adobe.com>
2401
2402         [CSSRegions] RenderFlowThread should keep a count of auto height regions
2403         https://bugs.webkit.org/show_bug.cgi?id=105185
2404
2405         Reviewed by Julien Chaffraix.
2406
2407         Keep the count of auto height regions on the flow thread instead of flow thread controller.
2408         This way, we can streamline the operations associated with the two-pass layout only to those
2409         flow threads that have auto height regions associated.
2410         The flow thread controller will keep a count of flow thread with auto height regions instead.
2411         This is a performance refactoring without an expected change in behavior, therefore no new tests were added.
2412
2413         * rendering/FlowThreadController.cpp: Keep a count of flow threads with auto logical height regions.
2414         (WebCore::FlowThreadController::FlowThreadController):
2415         (WebCore::FlowThreadController::layoutRenderNamedFlowThreads): Check the count of auto height regions for all the flow threads.
2416         (WebCore::FlowThreadController::isAutoLogicalHeightRegionsCountConsistent):
2417         Make sure that we call these methods only when we have auto logical height regions.
2418         (WebCore::FlowThreadController::resetRegionsOverrideLogicalContentHeight):
2419         (WebCore::FlowThreadController::markAutoLogicalHeightRegionsForLayout):
2420         * rendering/FlowThreadController.h:
2421         (WebCore::FlowThreadController::hasFlowThreadsWithAutoLogicalHeightRegions):
2422         (WebCore::FlowThreadController::incrementFlowThreadsWithAutoLogicalHeightRegions):
2423         (WebCore::FlowThreadController::decrementFlowThreadsWithAutoLogicalHeightRegions):
2424         * rendering/RenderFlowThread.cpp: Keep a count of auto logical height regions.
2425         (WebCore::RenderFlowThread::RenderFlowThread):
2426         (WebCore::RenderFlowThread::isAutoLogicalHeightRegionsCountConsistent):
2427         (WebCore::RenderFlowThread::resetRegionsOverrideLogicalContentHeight): Iterate the region chain only if the region chain has auto height regions.
2428         (WebCore::RenderFlowThread::initializeRegionsOverrideLogicalContentHeight): Ditto.
2429         (WebCore::RenderFlowThread::markAutoLogicalHeightRegionsForLayout): Ditto.
2430         (WebCore::RenderFlowThread::incrementAutoLogicalHeightRegions):
2431         (WebCore::RenderFlowThread::decrementAutoLogicalHeightRegions):
2432         * rendering/RenderFlowThread.h:
2433         * rendering/RenderRegion.cpp: Add increment/decrementAutoLogicalHeightCount to increase/decrease
2434         the counter inside the flow thread and use them throughout the code as needed.
2435         (WebCore::RenderRegion::incrementAutoLogicalHeightCount):
2436         (WebCore::RenderRegion::decrementAutoLogicalHeightCount):
2437         (WebCore::RenderRegion::updateRegionHasAutoLogicalHeightFlag):
2438         (WebCore::RenderRegion::attachRegion):
2439         (WebCore::RenderRegion::detachRegion):
2440         * rendering/RenderRegion.h:
2441         * rendering/RenderView.cpp:
2442         (WebCore::RenderView::checkTwoPassLayoutForAutoHeightRegions): Use the count of flow threads with auto height regions
2443         instead of the count of auto height regions when deciding whether we should attempt the 2 pass layout for auto height regions.
2444
2445 2013-01-27  Shinya Kawanaka  <shinyak@chromium.org>
2446
2447         [Shadow DOM] Selecting a node to another node in ShadowDOM fires 'click' event unexpectedly
2448         https://bugs.webkit.org/show_bug.cgi?id=107233
2449
2450         Reviewed by Dimitri Glazkov.
2451
2452         When selecting from a node to another node in ShadowDOM, 'click' event is unexpectedly fired.
2453
2454         The root cause of the bug is using shadow ancestor nodes for checking the node mouse is pressed on
2455         and the node mouse is released on is the same. This was introduced to fire a click event for a slider
2456         in <input> or etc.
2457
2458         However, we don't need to check shadow ancestor if we're in Author ShadowDOM.
2459
2460         Test: fast/dom/shadow/selecting-anchor.html
2461
2462         * page/EventHandler.cpp:
2463         (WebCore::mouseIsReleasedOnPressedElement):
2464         (WebCore):
2465         (WebCore::EventHandler::handleMouseReleaseEvent):
2466
2467 2013-01-27  Kentaro Hara  <haraken@chromium.org>
2468
2469         An [ActiveDOMObject] IDL attribute should be inherited
2470         https://bugs.webkit.org/show_bug.cgi?id=107877
2471
2472         Reviewed by Adam Barth.
2473
2474         Now we support IDL attribute inheritance. We can remove
2475         [ActiveDOMObject] from subclasses.
2476
2477         No tests. No change in behavior.
2478
2479         * Modules/indexeddb/IDBOpenDBRequest.idl:
2480         * Modules/webaudio/OfflineAudioContext.idl:
2481         * bindings/scripts/CodeGeneratorJS.pm:
2482         (GenerateHeader):
2483         (GenerateImplementation):
2484         * bindings/scripts/CodeGeneratorV8.pm:
2485         (GenerateHeader):
2486         (GenerateNamedConstructorCallback):
2487         (GenerateImplementation):
2488         * workers/SharedWorker.idl:
2489         * workers/Worker.idl:
2490
2491 2013-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2492
2493         Unreviewed, rolling out r140602.
2494         http://trac.webkit.org/changeset/140602
2495         https://bugs.webkit.org/show_bug.cgi?id=108045
2496
2497         Caused 8 indexed tests to crash. (Requested by keishi on
2498         #webkit).
2499
2500         * CMakeLists.txt:
2501         * DerivedSources.make:
2502         * GNUmakefile.list.am:
2503         * Modules/indexeddb/IDBCallbacks.h:
2504         (WebCore::IDBCallbacks::onBlocked):
2505         * Modules/indexeddb/IDBDatabase.cpp:
2506         * Modules/indexeddb/IDBDatabase.h:
2507         (WebCore):
2508         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2509         (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
2510         * Modules/indexeddb/IDBFactory.cpp:
2511         (WebCore::IDBFactory::openInternal):
2512         (WebCore::IDBFactory::deleteDatabase):
2513         * Modules/indexeddb/IDBFactory.h:
2514         (WebCore):
2515         (IDBFactory):
2516         * Modules/indexeddb/IDBFactory.idl:
2517         * Modules/indexeddb/IDBOpenDBRequest.cpp:
2518         (WebCore::IDBOpenDBRequest::create):
2519         (WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
2520         (WebCore::IDBOpenDBRequest::dispatchEvent):
2521         * Modules/indexeddb/IDBOpenDBRequest.h:
2522         (IDBOpenDBRequest):
2523         * Modules/indexeddb/IDBVersionChangeRequest.cpp: Copied from Source/WebKit/chromium/src/WebIDBCallbacksImpl.h.
2524         (WebCore):
2525         (WebCore::IDBVersionChangeRequest::create):
2526         (WebCore::IDBVersionChangeRequest::IDBVersionChangeRequest):
2527         (WebCore::IDBVersionChangeRequest::~IDBVersionChangeRequest):
2528         (WebCore::IDBVersionChangeRequest::interfaceName):
2529         (WebCore::IDBVersionChangeRequest::onBlocked):
2530         * Modules/indexeddb/IDBVersionChangeRequest.h: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.idl.
2531         (WebCore):
2532         (IDBVersionChangeRequest):
2533         * Modules/indexeddb/IDBVersionChangeRequest.idl: Copied from Source/WebCore/Modules/indexeddb/IDBFactory.idl.
2534         * WebCore.gypi:
2535         * WebCore.xcodeproj/project.pbxproj:
2536         * dom/EventTarget.h:
2537         (WebCore):
2538         * dom/EventTargetFactory.in:
2539
2540 2013-01-27  Shinya Kawanaka  <shinyak@chromium.org>
2541
2542         Disabled input/textarea doesn't trigger selection change
2543         https://bugs.webkit.org/show_bug.cgi?id=85244
2544
2545         Reviewed by Ryosuke Niwa.
2546
2547         Only rootEditableNode is there in <input> or <textarea>, 'select' event is fired.
2548         Since readonly or disabled input/textarea element does not have editable element,
2549         'select' event was not fired.
2550
2551         We don't need the check.
2552
2553         Test: fast/forms/input-readonly-select.html
2554
2555         * editing/FrameSelection.cpp:
2556         (WebCore::FrameSelection::notifyRendererOfSelectionChange):
2557
2558 2013-01-27  Keishi Hattori  <keishi@webkit.org>
2559
2560         Unreviewed, rolling out r140850.
2561         http://trac.webkit.org/changeset/140850
2562         https://bugs.webkit.org/show_bug.cgi?id=107960
2563
2564         r14602 caused 8 indexed tests to crash.
2565
2566         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
2567         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
2568         * Modules/indexeddb/IDBCursorBackendImpl.h:
2569         (WebCore::IDBCursorBackendImpl::create):
2570         (IDBCursorBackendImpl):
2571         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2572         (WebCore::IDBDatabaseBackendImpl::setIndexesReady):
2573         (WebCore::OpenCursorOperation::perform):
2574         * Modules/indexeddb/IDBObjectStore.cpp:
2575         (WebCore::IDBObjectStore::createIndex):
2576         (WebCore::IDBObjectStore::openCursor):
2577         * Modules/indexeddb/IDBObjectStore.h:
2578         (WebCore::IDBObjectStore::openCursor):
2579         (IDBObjectStore):
2580         * Modules/indexeddb/IDBOpenDBRequest.cpp:
2581         (WebCore::IDBOpenDBRequest::IDBOpenDBRequest):
2582         * Modules/indexeddb/IDBRequest.cpp:
2583         (WebCore::IDBRequest::create):
2584         (WebCore::IDBRequest::IDBRequest):
2585         * Modules/indexeddb/IDBRequest.h:
2586         (IDBRequest):
2587         (WebCore::IDBRequest::taskType):
2588         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
2589         (WebCore::IDBTransactionBackendImpl::scheduleTask):
2590         * Modules/indexeddb/IDBTransactionBackendImpl.h:
2591         (WebCore::IDBTransactionBackendImpl::scheduleTask):
2592         (IDBTransactionBackendImpl):
2593         * Modules/indexeddb/IDBTransactionBackendInterface.h:
2594         (IDBTransactionBackendInterface):
2595
2596 2013-01-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2597
2598         Unreviewed, rolling out r140741.
2599         http://trac.webkit.org/changeset/140741
2600         https://bugs.webkit.org/show_bug.cgi?id=108044
2601
2602         Caused 8 indexed tests to fail on Mac and Win. (Requested by
2603         keishi on #webkit).
2604
2605         * CMakeLists.txt:
2606         * GNUmakefile.list.am:
2607         * Modules/indexeddb/IDBDatabase.cpp:
2608         (WebCore::IDBDatabase::onVersionChange):
2609         * Modules/indexeddb/IDBFactory.cpp:
2610         (WebCore::IDBFactory::deleteDatabase):
2611         * Modules/indexeddb/IDBOpenDBRequest.cpp:
2612         (WebCore::IDBOpenDBRequest::onBlocked):
2613         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
2614         * Modules/indexeddb/IDBUpgradeNeededEvent.cpp: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.cpp.
2615         (WebCore):
2616         (WebCore::IDBUpgradeNeededEvent::create):
2617         (WebCore::IDBUpgradeNeededEvent::IDBUpgradeNeededEvent):
2618         (WebCore::IDBUpgradeNeededEvent::~IDBUpgradeNeededEvent):
2619         (WebCore::IDBUpgradeNeededEvent::oldVersion):
2620         (WebCore::IDBUpgradeNeededEvent::newVersion):
2621         (WebCore::IDBUpgradeNeededEvent::interfaceName):
2622         * Modules/indexeddb/IDBUpgradeNeededEvent.h: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.h.
2623         (WebCore):
2624         (IDBUpgradeNeededEvent):
2625         * Modules/indexeddb/IDBUpgradeNeededEvent.idl: Copied from Source/WebCore/Modules/indexeddb/IDBVersionChangeEvent.idl.
2626         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
2627         (WebCore::IDBVersionChangeEvent::create):
2628         (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
2629         (WebCore::IDBVersionChangeEvent::version):
2630         (WebCore):
2631         * Modules/indexeddb/IDBVersionChangeEvent.h:
2632         (WebCore):
2633         (IDBVersionChangeEvent):
2634         * Modules/indexeddb/IDBVersionChangeEvent.idl:
2635         * WebCore.gypi:
2636         * dom/EventNames.in:
2637
2638 2013-01-27  Matt Falkenhagen  <falken@chromium.org>
2639
2640         Elements must be reattached when inserted/removed from top layer
2641         https://bugs.webkit.org/show_bug.cgi?id=105489
2642
2643         Relanding r139402 as the apparent perf regression has been explained as not real (bug 106726).
2644
2645         Reviewed by Julien Chaffraix.
2646
2647         Ensure a reattach occurs when an element is inserted/removed from top layer, so its renderer can be inserted correctly:
2648         as a child of RenderView in top layer sibling order if it's in the top layer, and in the usual place otherwise.
2649
2650         We previously relied on style recalc to catch when an element is inserted/removed from the top layer, because it
2651         only happens on dialog.show/close which toggle display: none. But that is incorrect because, for example, close()
2652         followed immediately by show() results in no style change.
2653
2654         Tests: fast/dom/HTMLDialogElement/removed-element-is-removed-from-top-layer.html
2655                fast/dom/HTMLDialogElement/top-layer-stacking-correct-order-remove-readd.html
2656
2657         * dom/Element.cpp:
2658         (WebCore::Element::removedFrom): Call Document::removeFromTopLayer to let the element be removed from the top layer vector.
2659         removeFromTopLayer calls Element::setIsInTopLayer(false) itself if needed.
2660         (WebCore::Element::setIsInTopLayer): Ensure a reattach occurs if the element is already attached.
2661
2662 2013-01-27  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2663
2664         Fixing atomicIncrement implementation for Windows by dropping support before XP SP2.
2665         https://bugs.webkit.org/show_bug.cgi?id=106740
2666
2667         Reviewed by Benjamin Poulain.
2668
2669         * WebCorePrefix.h:
2670         * config.h:
2671
2672 2013-01-27  Jochen Eisinger  <jochen@chromium.org>
2673
2674         Check notification permissions in the show() method
2675         https://bugs.webkit.org/show_bug.cgi?id=108009
2676
2677         Reviewed by Adam Barth.
2678
2679         Tests: fast/notifications/notifications-constructor-with-permission.html
2680                fast/notifications/notifications-constructor-without-permission.html
2681
2682         * Modules/notifications/Notification.cpp:
2683         (WebCore::Notification::show):
2684         (WebCore::Notification::taskTimerFired):
2685
2686 2013-01-26  Tony Chang  <tony@chromium.org>
2687
2688         [chromium] Don't use goma to preprocess bindings idl files
2689         https://bugs.webkit.org/show_bug.cgi?id=107984
2690
2691         Reviewed by Adam Barth.
2692
2693         On Linux and Mac, use a local gcc or clang to preprocess the bindings idl files.
2694         On my machine, this drops the bindings generation from 137s to 24s when
2695         using goma and -j400.
2696
2697         No new tests, this is a build change.
2698
2699         * WebCore.gyp/WebCore.gyp: Force the use of the local gcc or clang for preprocessing.
2700
2701 2013-01-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2702
2703         Unreviewed, rolling out r140880.
2704         http://trac.webkit.org/changeset/140880
2705         https://bugs.webkit.org/show_bug.cgi?id=108023
2706
2707         Caused mathml/presentation and tests to crash and fail
2708         (Requested by keishi on #webkit).
2709
2710         * mathml/MathMLTextElement.cpp:
2711         * mathml/MathMLTextElement.h:
2712         (MathMLTextElement):
2713         * rendering/mathml/RenderMathMLBlock.cpp:
2714         (WebCore::RenderMathMLBlock::RenderMathMLBlock):
2715         (WebCore::RenderMathMLBlock::computePreferredLogicalWidths):
2716         (WebCore):
2717         (WebCore::RenderMathMLBlock::computeChildrenPreferredLogicalHeights):
2718         (WebCore::RenderMathMLBlock::preferredLogicalHeightAfterSizing):
2719         * rendering/mathml/RenderMathMLBlock.h:
2720         (RenderMathMLBlock):
2721         (WebCore::RenderMathMLBlock::isPreferredLogicalHeightDirty):
2722         (WebCore::RenderMathMLBlock::preferredLogicalHeight):
2723         (WebCore::RenderMathMLBlock::setPreferredLogicalHeight):
2724         * rendering/mathml/RenderMathMLFenced.cpp:
2725         (WebCore::RenderMathMLFenced::makeFences):
2726         (WebCore::RenderMathMLFenced::styleDidChange):
2727         * rendering/mathml/RenderMathMLOperator.cpp:
2728         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
2729         (WebCore):
2730         (WebCore::RenderMathMLOperator::glyphHeightForCharacter):
2731         (WebCore::RenderMathMLOperator::updateFromElement):
2732         (WebCore::RenderMathMLOperator::createGlyph):
2733         (WebCore::RenderMathMLOperator::firstLineBoxBaseline):
2734         * rendering/mathml/RenderMathMLOperator.h:
2735         (RenderMathMLOperator):
2736         * rendering/mathml/RenderMathMLRoot.cpp:
2737         (WebCore::RenderMathMLRoot::index):
2738         (WebCore::RenderMathMLRoot::computePreferredLogicalWidths):
2739         (WebCore):
2740         (WebCore::RenderMathMLRoot::layout):
2741         * rendering/mathml/RenderMathMLRoot.h:
2742         (RenderMathMLRoot):
2743         * rendering/mathml/RenderMathMLRow.cpp:
2744         (WebCore::RenderMathMLRow::computePreferredLogicalWidths):
2745         (WebCore::RenderMathMLRow::layout):
2746         * rendering/mathml/RenderMathMLRow.h:
2747         (RenderMathMLRow):
2748
2749 2013-01-26  Alexey Proskuryakov  <ap@apple.com>
2750
2751         Remove code for handling NetworkProcess authentication challenges in WebProcess
2752         https://bugs.webkit.org/show_bug.cgi?id=108003
2753
2754         Reviewed by Sam Weinig.
2755
2756         * loader/ResourceLoader.cpp:
2757         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
2758         Once again, there can be no authentication without an in-process network request.
2759
2760         * WebCore.exp.in:
2761         * platform/network/AuthenticationChallengeBase.cpp:
2762         (WebCore::AuthenticationChallengeBase::AuthenticationChallengeBase):
2763         * platform/network/AuthenticationChallengeBase.h:
2764         (AuthenticationChallengeBase):
2765         * platform/network/cf/AuthenticationCF.cpp:
2766         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2767         * platform/network/cf/AuthenticationChallenge.h:
2768         (AuthenticationChallenge):
2769         * platform/network/curl/AuthenticationChallenge.h:
2770         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2771         * platform/network/mac/AuthenticationMac.mm:
2772         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2773         * platform/network/qt/AuthenticationChallenge.h:
2774         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2775         * platform/network/soup/AuthenticationChallenge.h:
2776         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2777         * platform/network/win/AuthenticationChallenge.h:
2778         (WebCore::AuthenticationChallenge::AuthenticationChallenge):
2779         Removed everything related to AuthenticationChallengeBase::m_identifier.
2780         The identifier is now tracked for IPC only, which is the right thing, because
2781         nothing can guarantee identifier uniqueness across processes.
2782
2783 2013-01-26  Laszlo Gombos  <l.gombos@samsung.com>
2784
2785         Fix the test for CHANNEL_MESSAGING in idl files
2786         https://bugs.webkit.org/show_bug.cgi?id=108006
2787
2788         Reviewed by Alexey Proskuryakov.
2789
2790         No new tests, this is a build fix.
2791
2792         * workers/WorkerContext.idl: Make sure ENABLE_CHANNEL_MESSAGING is
2793         defined before using it to be consitent with other guards inside idl
2794         files.
2795
2796 2013-01-26  Tim Volodine  <timvolodine@chromium.org>
2797
2798         Text Autosizing: simplify and clean-up preOrderTraversal skipping containers
2799         https://bugs.webkit.org/show_bug.cgi?id=107446
2800
2801         Reviewed by Julien Chaffraix.
2802
2803         Simplify nextInPreOrderSkippingDescendantsOfContainers implementation
2804         using RenderObject tree traversal methods.
2805
2806         No new tests because functionality is unchanged.
2807
2808         * rendering/TextAutosizer.cpp:
2809         (WebCore::TextAutosizer::nextInPreOrderSkippingDescendantsOfContainers):
2810
2811 2013-01-26  Dan Carney  <dcarney@google.com>
2812
2813         [v8] prepare SerializedScriptValue for transition to Latin-1
2814         https://bugs.webkit.org/show_bug.cgi?id=107655
2815
2816         Reviewed by Kentaro Hara.
2817
2818         No new tests. Covered by existing tests.
2819
2820         * bindings/v8/SerializedScriptValue.cpp:
2821
2822 2013-01-26  Justin Schuh  <jschuh@chromium.org>
2823
2824         [CHROMIUM] Suppress more c4267 build warnings for Win64 targets
2825         https://bugs.webkit.org/show_bug.cgi?id=107993
2826
2827         No new tests. No behavior change.
2828
2829         Reviewed by Abhishek Arya.
2830
2831         * WebCore.gyp/WebCore.gyp:
2832
2833 2013-01-24  Patrick Gansterer  <paroga@webkit.org>
2834
2835         Build fix for USE(JSC) && !ENABLE(WORKERS) after r136686.
2836
2837         * bindings/js/DOMRequestState.h:
2838         (WebCore::DOMRequestState::DOMRequestState):
2839
2840 2013-01-26  Robert Hogan  <robert@webkit.org>
2841
2842         REGRESSION(r120616): Cell's logical height wrongly computed with vertical-align: baseline and rowspan
2843         https://bugs.webkit.org/show_bug.cgi?id=106571
2844
2845         Reviewed by Julien Chaffraix.
2846
2847         When a cell spans multiple rows, its baseline is set on the first row it spans. r120616 contained a
2848         couple of errors in its attempt to ensure the row height calculated in such cases was correct. When it
2849         calculated the baseline on the first row in the span, it didn't ensure that the row height was increased
2850         if necessary. It also suffered from allowing the baseline descent calculated on a rowspan to affect the
2851         height of the other cells in the first row of the span.
2852
2853         Fix both of these errors in calcRowLogicalHeight() and refactor the calculation of the baseline and baseline
2854         descent so that it is freestanding (rather than depending on the height of the section so far). 
2855
2856         Tests: fast/css/vertical-align-baseline-rowspan-010.html
2857                fast/css/vertical-align-baseline-rowspan-011.html
2858
2859         * rendering/RenderTableSection.cpp:
2860         (WebCore::RenderTableSection::calcRowLogicalHeight):
2861
2862 2013-01-26  James Simonsen  <simonjam@chromium.org>
2863
2864         [chromium] Export ResourceRequest's priority through WebURLRequest
2865         https://bugs.webkit.org/show_bug.cgi?id=107985
2866
2867         Reviewed by Adam Barth.
2868
2869         No new tests.
2870
2871         * platform/chromium/support/WebURLRequest.cpp:
2872         (WebKit::WebURLRequest::priority):
2873         (WebKit):
2874
2875 2013-01-25  Roger Fong  <roger_fong@apple.com>
2876
2877         Unreviewed Windows build fix. All it wanted was one more line.
2878
2879         * css/plugIns.css:
2880
2881 2013-01-25  Joone Hur  <joone.hur@intel.com>
2882
2883         [GTK][AC] Use new Clutter APIs instead of deprecated APIs
2884         https://bugs.webkit.org/show_bug.cgi?id=105736
2885
2886         Reviewed by Gustavo Noronha Silva.
2887
2888         ClutterCairoTexture class and several APIs have been deprecated since version 1.10, 
2889         so ClutterCanvas and ClutterContent should be used instead of ClutterCairoTexture.
2890         clutter_actor_add_child should be used instead of clutter_actor_set_parent and clutter_container_add_clutter.
2891
2892         * platform/graphics/clutter/GraphicsLayerActor.cpp:
2893         (_GraphicsLayerActorPrivate):
2894         (graphics_layer_actor_init):
2895         (graphicsLayerActorDispose):
2896         (graphicsLayerActorAllocate):
2897         (graphicsLayerActorPaint):
2898         (graphicsLayerActorDraw):
2899         (graphicsLayerActorUpdateTexture):
2900         (graphicsLayerActorNew):
2901         (graphicsLayerActorRemoveAll):
2902         (graphicsLayerActorInvalidateRectangle):
2903         (graphicsLayerActorInsertSublayer):
2904         (graphicsLayerActorSetSublayers):
2905
2906 2013-01-25  Roger Fong  <roger_fong@apple.com>
2907
2908         Unreviewed build fix for Windows.
2909
2910         * css/plugIns.css:
2911         (p):
2912
2913 2013-01-25  Julien Chaffraix  <jchaffraix@webkit.org>
2914
2915         Share code between the different min-content / max-content code paths
2916         https://bugs.webkit.org/show_bug.cgi?id=107740
2917
2918         Reviewed by Tony Chang.
2919
2920         This change enables sharing between the different content based computations
2921         by using function pointers to specialize the behavior as needed.
2922
2923         Refactoring, covered by existing tests.
2924
2925         * rendering/RenderGrid.cpp:
2926         (WebCore::GridTrack::growUsedBreadth):
2927         (WebCore::GridTrack::usedBreadth):
2928         (WebCore::GridTrack::growMaxBreadth):
2929         Added the previous getters / setters that will be passed to resolveContentBasedTrackSizingFunctionsForItems.
2930
2931         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2932         Updated to reuse resolveContentBasedTrackSizingFunctionsForItems instead of duplicating code.
2933         One change is that now, we properly apply the min on all branches, which was an oversight of
2934         the previous patches.
2935
2936         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2937         Added this function as the core content-sized resolution function. For now, we pass the
2938         current track by direction & index to be able to filter grid items.
2939
2940         * rendering/RenderGrid.h:
2941         Added resolveContentBasedTrackSizingFunctionsForItems and the function pointers typedef's.
2942
2943 2013-01-25  Kentaro Hara  <haraken@chromium.org>
2944
2945         Remove InjectedScript::wrapSerializedObject()
2946         https://bugs.webkit.org/show_bug.cgi?id=107906
2947
2948         Reviewed by Abhishek Arya.
2949
2950         InjectedScript::wrapSerializedObject() is unused.
2951         (This is one of steps to remove raw pointers of SerializedScriptValue*,
2952         which can be a security concern.)
2953
2954         * inspector/InjectedScript.cpp:
2955         * inspector/InjectedScript.h:
2956         (InjectedScript):
2957
2958 2013-01-25  Kentaro Hara  <haraken@chromium.org>
2959
2960         Keep a RefPtr<SerializedScriptValue*> when we call serialize()/deserialize() in code generators
2961         https://bugs.webkit.org/show_bug.cgi?id=107902
2962
2963         Reviewed by Abhishek Arya.
2964
2965         If you use a raw SerializedScriptValue* for serialize()/deserialize(),
2966         it can potentially cause a use-after-free. This is because serialize()/
2967         deserialize() can destruct a RefPtr of the SerializedScriptValue*,
2968         depending on data that is serialized/deserialized. So we should keep a
2969         RefPtr<SerializedScriptValue*> when we call serialize()/deserialize().
2970         (See https://bugs.webkit.org/show_bug.cgi?id=107792 for more details.)
2971
2972         No tests. This is just a just-in-case fix.
2973
2974         * Modules/intents/Intent.h:
2975         (WebCore::Intent::data):
2976         * Modules/intents/IntentRequest.cpp:
2977         (WebCore::IntentRequest::postResult):
2978         (WebCore::IntentRequest::postFailure):
2979         * Modules/intents/IntentRequest.h:
2980         (IntentRequest):
2981         * Modules/intents/IntentResultCallback.h:
2982         (IntentResultCallback):
2983         * bindings/scripts/CodeGeneratorJS.pm:
2984         (GetNativeTypeForCallbacks):
2985         * bindings/scripts/CodeGeneratorV8.pm:
2986         (GenerateNormalAttrGetter):
2987         (GetNativeTypeForCallbacks):
2988         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2989         (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrGetter):
2990         (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedReadonlyValueAttrGetter):
2991         * dom/MessagePortChannel.h:
2992         (WebCore::MessagePortChannel::EventData::message):
2993
2994 2013-01-25  Kentaro Hara  <haraken@chromium.org>
2995
2996         Keep a RefPtr<SerializedScriptValue*> when we call serialize()/deserialize() for MessageEvent
2997         https://bugs.webkit.org/show_bug.cgi?id=107900
2998
2999         Reviewed by Abhishek Arya.
3000
3001         If you use a raw SerializedScriptValue* for serialize()/deserialize(),
3002         it can potentially cause a use-after-free. This is because serialize()/
3003         deserialize() can destruct a RefPtr of the SerializedScriptValue*,
3004         depending on data that is serialized/deserialized. So we should keep a
3005         RefPtr<SerializedScriptValue*> when we call serialize()/deserialize().
3006         (See https://bugs.webkit.org/show_bug.cgi?id=107792 for more details.)
3007
3008         No tests. This is just a just-in-case fix. I couldn't find any bug
3009         even in an ASAN build.
3010
3011         * bindings/js/JSMessageEventCustom.cpp:
3012         (WebCore::JSMessageEvent::data):
3013         * bindings/v8/custom/V8MessageEventCustom.cpp:
3014         (WebCore::V8MessageEvent::dataAccessorGetter):
3015         * dom/MessageEvent.h:
3016         (WebCore::MessageEvent::dataAsSerializedScriptValue):
3017
3018 2013-01-25  Kentaro Hara  <haraken@chromium.org>
3019
3020         [V8] Keep a RefPtr<SerializedScriptValue*> when we call serialize()/deserialize() (part 1)
3021         https://bugs.webkit.org/show_bug.cgi?id=107891
3022
3023         Reviewed by Abhishek Arya.
3024
3025         If you use a raw SerializedScriptValue* for serialize()/deserialize(),
3026         it can potentially cause a use-after-free. This is because serialize()/
3027         deserialize() can destruct a RefPtr of the SerializedScriptValue*,
3028         depending on data that is serialized/deserialized. So we should keep a
3029         RefPtr<SerializedScriptValue*> when we call serialize()/deserialize().
3030         (See https://bugs.webkit.org/show_bug.cgi?id=107792 for more details.)
3031
3032         No tests. This is just a just-in-case fix. I couldn't find any bug
3033         even in an ASAN build.
3034
3035         * bindings/v8/custom/V8CustomEventCustom.cpp:
3036         (WebCore::V8CustomEvent::detailAccessorGetter):
3037
3038 2013-01-25  Kentaro Hara  <haraken@chromium.org>
3039
3040         Keep a RefPtr<SerializedScriptValue*> when we call serialize()/deserialize() in PopStateEvent
3041         https://bugs.webkit.org/show_bug.cgi?id=107904
3042
3043         Reviewed by Abhishek Arya.
3044
3045         If you use a raw SerializedScriptValue* for serialize()/deserialize(),
3046         it can potentially cause a use-after-free. This is because serialize()/
3047         deserialize() can destruct a RefPtr of the SerializedScriptValue*,
3048         depending on data that is serialized/deserialized. So we should keep a
3049         RefPtr<SerializedScriptValue*> when we call serialize()/deserialize().
3050         (See https://bugs.webkit.org/show_bug.cgi?id=107792 for more details.)
3051
3052         No tests. This is just a just-in-case fix.
3053
3054         * dom/PopStateEvent.h:
3055         (WebCore::PopStateEvent::serializedState):
3056         * page/History.cpp:
3057         (WebCore::History::isSameAsCurrentState):
3058         * page/History.h:
3059         (History):
3060
3061 2013-01-25  Kentaro Hara  <haraken@chromium.org>
3062
3063         Rename CodeGenerator::IsSubType() to CodeGenerator::InheritsInterface()
3064         https://bugs.webkit.org/show_bug.cgi?id=107874
3065
3066         Reviewed by Adam Barth.
3067
3068         No tests. No change in behavior.
3069
3070         * bindings/scripts/CodeGenerator.pm:
3071         (InheritsInterface):
3072         * bindings/scripts/CodeGeneratorJS.pm:
3073         (GenerateHeader):
3074         (GenerateImplementation):
3075         * bindings/scripts/CodeGeneratorV8.pm:
3076         (GenerateHeader):
3077         (GetInternalFields):
3078         (GenerateNormalAttrGetter):
3079         (GenerateNormalAttrSetter):
3080         (GenerateFunctionCallback):
3081         (GenerateImplementationIndexer):
3082         (GenerateToV8Converters):
3083
3084 2013-01-25  Kentaro Hara  <haraken@chromium.org>
3085
3086         [V8] Pass an Isolate to GetRawTemplate()
3087         https://bugs.webkit.org/show_bug.cgi?id=107927
3088
3089         Reviewed by Adam Barth.
3090
3091         This is one of steps to kill an optional Isolate parameter of GetRawTemplate().
3092
3093         No tests. No change in behavior.
3094
3095         * bindings/scripts/CodeGeneratorV8.pm:
3096         (GenerateHeader):
3097         (GenerateDomainSafeFunctionGetter):
3098         (GenerateImplementation):
3099         (CreateCustomSignature):
3100         * bindings/scripts/test/V8/V8Float64Array.cpp:
3101         (WebCore::ConfigureV8Float64ArrayTemplate):
3102         (WebCore::V8Float64Array::GetTemplate):
3103         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
3104         (WebCore::TestActiveDOMObjectV8Internal::postMessageAttrGetter):
3105         (WebCore::ConfigureV8TestActiveDOMObjectTemplate):
3106         (WebCore::V8TestActiveDOMObject::GetTemplate):
3107         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
3108         (WebCore::ConfigureV8TestCustomNamedGetterTemplate):
3109         (WebCore::V8TestCustomNamedGetter::GetTemplate):
3110         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
3111         (WebCore::ConfigureV8TestEventConstructorTemplate):
3112         (WebCore::V8TestEventConstructor::GetTemplate):
3113         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3114         (WebCore::ConfigureV8TestEventTargetTemplate):
3115         (WebCore::V8TestEventTarget::GetTemplate):
3116         * bindings/scripts/test/V8/V8TestException.cpp:
3117         (WebCore::ConfigureV8TestExceptionTemplate):
3118         (WebCore::V8TestException::GetTemplate):
3119         * bindings/scripts/test/V8/V8TestInterface.cpp:
3120         (WebCore::ConfigureV8TestInterfaceTemplate):
3121         (WebCore::V8TestInterface::GetTemplate):
3122         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3123         (WebCore::ConfigureV8TestMediaQueryListListenerTemplate):
3124         (WebCore::V8TestMediaQueryListListener::GetTemplate):
3125         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3126         (WebCore::ConfigureV8TestNamedConstructorTemplate):
3127         (WebCore::V8TestNamedConstructor::GetTemplate):
3128         * bindings/scripts/test/V8/V8TestNode.cpp:
3129         (WebCore::ConfigureV8TestNodeTemplate):
3130         (WebCore::V8TestNode::GetTemplate):
3131         * bindings/scripts/test/V8/V8TestObj.cpp:
3132         (WebCore::ConfigureV8TestObjTemplate):
3133         (WebCore::V8TestObj::GetTemplate):
3134         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
3135         (WebCore::ConfigureV8TestOverloadedConstructorsTemplate):
3136         (WebCore::V8TestOverloadedConstructors::GetTemplate):
3137         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3138         (WebCore::ConfigureV8TestSerializedScriptValueInterfaceTemplate):
3139         (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
3140         * bindings/v8/V8DOMWindowShell.cpp:
3141         (WebCore::V8DOMWindowShell::createContext):
3142         * bindings/v8/custom/V8LocationCustom.cpp:
3143         (WebCore::V8Location::reloadAccessorGetter):
3144         (WebCore::V8Location::replaceAccessorGetter):
3145         (WebCore::V8Location::assignAccessorGetter):
3146
3147 2013-01-25  Pan Deng  <pan.deng@intel.com>
3148
3149         [User Timing]Change class name that presented in Javascript for user timing entry.
3150         https://bugs.webkit.org/show_bug.cgi?id=107925.
3151
3152         Reviewed by Tony Gentilcore.
3153
3154         In current implementation, class type of user timing entries are PerformanceEntry, according
3155         to W3C spec, they should be PerformanceMark and PerformanceMeasure.
3156
3157         Test: http/tests/w3c/webperf/submission/Intel/user-timing/test_user_timing_entry_type.html
3158
3159         * bindings/v8/custom/V8PerformanceEntryCustom.cpp:
3160         (WebCore::wrap):
3161         * page/PerformanceEntry.h:
3162         (WebCore::PerformanceEntry::isMark):
3163         (WebCore::PerformanceEntry::isMeasure):
3164         * page/PerformanceMark.h:
3165         (WebCore::PerformanceMark::isMark):
3166         (PerformanceMark):
3167         * page/PerformanceMeasure.h:
3168         (WebCore::PerformanceMeasure::isMeasure):
3169         (PerformanceMeasure):
3170
3171 2013-01-24  Roger Fong  <roger_fong@apple.com>
3172
3173         Updated WebCore property sheets and added a WebCore solution file.
3174         https://bugs.webkit.org/show_bug.cgi?id=106988.
3175
3176         Rubberstamped by Brent Fulgham.
3177
3178         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj:
3179         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj.filters:
3180         * WebCore.vcxproj/QTMovieWin/QTMovieWinCommon.props:
3181         * WebCore.vcxproj/WebCore.sln: Added.
3182         * WebCore.vcxproj/WebCore.vcxproj:
3183         * WebCore.vcxproj/WebCore.vcxproj.filters:
3184         * WebCore.vcxproj/WebCoreDebug.props:
3185
3186 2013-01-24  Ojan Vafai  <ojan@chromium.org>
3187
3188         MathML preferred widths should not depend on layout information
3189         https://bugs.webkit.org/show_bug.cgi?id=107353
3190
3191         Reviewed by Levi Weintraub.
3192
3193         * mathml/MathMLTextElement.cpp:
3194         (WebCore::MathMLTextElement::attach):
3195         (WebCore::MathMLTextElement::childrenChanged):
3196         * mathml/MathMLTextElement.h:
3197         Need to update the render tree when the text of a <mo> changes.
3198
3199         * rendering/mathml/RenderMathMLBlock.cpp:
3200         (WebCore::RenderMathMLBlock::RenderMathMLBlock):
3201         * rendering/mathml/RenderMathMLBlock.h:
3202         * rendering/mathml/RenderMathMLFenced.cpp:
3203         (WebCore::RenderMathMLFenced::makeFences):
3204         (WebCore::RenderMathMLFenced::styleDidChange):
3205         Need to update the rendertree to apply operator stretching.
3206
3207         * rendering/mathml/RenderMathMLOperator.cpp:
3208         (WebCore::RenderMathMLOperator::glyphHeightForCharacter):
3209         (WebCore::RenderMathMLOperator::widthForCharacter):
3210         (WebCore::RenderMathMLOperator::computeIntrinsicLogicalWidths):
3211         (WebCore::RenderMathMLOperator::stretchDisabledByMarkup):
3212         (WebCore::RenderMathMLOperator::firstTextCharacter):
3213         (WebCore::RenderMathMLOperator::stretchyCharacterIndex):
3214         (WebCore::RenderMathMLOperator::updateFromElement):
3215         (WebCore::RenderMathMLOperator::firstLineBoxBaseline):
3216         -Make the preferred widths of operators the max of all possible
3217         characters to be used in the operator and center the operator in that width.
3218         -For stretching where we don't use multiple glyphs, use transforms
3219         instead of font-size. This both looks better and avoids affecting the width.
3220         -Now that preferred widths don't depends on height, we don't need to
3221         override computePreferredLogicalWidths at all in MathML code.
3222
3223         * rendering/mathml/RenderMathMLOperator.h:
3224         * rendering/mathml/RenderMathMLRoot.cpp:
3225         (WebCore::RenderMathMLRoot::index):
3226         Tighten up the type.
3227
3228         (WebCore::RenderMathMLRoot::layout):
3229         Move the laying out of children to the layout method.
3230
3231         * rendering/mathml/RenderMathMLRoot.h:
3232         * rendering/mathml/RenderMathMLRow.cpp:
3233         (WebCore::RenderMathMLRow::logicalHeightExcludingOperators):
3234         (WebCore::RenderMathMLRow::stretchOperatorsAndLayout):
3235         (WebCore::RenderMathMLRow::layout):
3236         Move the laying out of children and the subsequent setting of stretchHeight
3237         to the layout method.
3238
3239         * rendering/mathml/RenderMathMLRow.h:
3240
3241 2013-01-25  Raymond Toy  <rtoy@google.com>
3242
3243         Don't subtract too much from nonSilentFramesToProcess
3244         https://bugs.webkit.org/show_bug.cgi?id=107966
3245
3246         Reviewed by Kenneth Russell.
3247
3248         No new tests.
3249
3250         * Modules/webaudio/AudioScheduledSourceNode.cpp:
3251         (WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
3252
3253 2013-01-25  Roger Fong  <roger_fong@apple.com>
3254
3255         Unreviewed. Windows build fix by Dean.
3256
3257         * css/plugIns.css:
3258         (object):
3259
3260 2013-01-25  Dima Gorbik  <dgorbik@apple.com>
3261
3262         Support language WebVTT Nodes
3263         https://bugs.webkit.org/show_bug.cgi?id=107907
3264
3265         Reviewed by Eric Carlson.
3266
3267         Language stack and WebVTT language nodes are added as 
3268         required by specs.
3269
3270         Test: media/track/track-css-matching-lang.html
3271
3272         * html/track/TextTrackCue.cpp:
3273         (WebCore::TextTrackCue::copyWebVTTNodeToDOMTree): WebVTT language nodes should be
3274         spans in DOM and the lang attribute should be set for all nodes if applicable.
3275         * html/track/TextTrackCue.h:
3276         (WebCore::TextTrackCue::langElementTagName):
3277         (TextTrackCue):
3278         (WebCore::TextTrackCue::langAttributeName):
3279         * html/track/WebVTTParser.cpp:
3280         (WebCore::WebVTTParser::createDocumentFragmentFromCueText): clear the language stack in case
3281         we use the same parser object for multiple cues that have incorrect syntax.
3282         (WebCore::isLangToken):
3283         (WebCore):
3284         (WebCore::WebVTTParser::constructTreeFromToken): parse lang WebVTT objects.
3285         * html/track/WebVTTParser.h:
3286         (WebVTTParser):
3287
3288 2013-01-25  Andy Estes  <aestes@apple.com>
3289
3290         Wrap content filtering code in an object
3291         https://bugs.webkit.org/show_bug.cgi?id=107914
3292
3293         Reviewed by Alexey Proskuryakov.
3294
3295         Content filtering code currently requires explicit and somewhat complex
3296         lifetime management of the WebFilterEvaluator object for correct
3297         behavior. Simplify this by wrapping WebFilterEvaluator in an object and
3298         have MainResourceLoader implicitly manage its lifetime by holding it in
3299         an OwnPtr.
3300
3301         This change has benefits other than the simplified lifetime management.
3302         It removes direct calls into WebKitSystemInterface from the loader, and
3303         it allows us to keep a strong reference to the replacement data
3304         returned from wkFilterAddData() and wkFilterDataComplete() rather than
3305         relying on it being autoreleased.
3306
3307         * WebCore.exp.in: Updated to match changes in WebCoreSystemInterface.
3308         * WebCore.xcodeproj/project.pbxproj: Added new files.
3309         * loader/MainResourceLoader.cpp:
3310         (WebCore::MainResourceLoader::MainResourceLoader): Removed unneeded initialization.
3311         (WebCore::MainResourceLoader::~MainResourceLoader): Removed an unneeded ASSERT().
3312         (WebCore::MainResourceLoader::cancel): Removed unneeded wkFilterRelease().
3313         (WebCore::MainResourceLoader::responseReceived): Created a
3314         ContentFilter object rather than calling wkFilterCreateInstance().
3315         (WebCore::MainResourceLoader::dataReceived): Rewrote content filtering
3316         logic in terms of the wrapper object. Removed any explicit lifetime
3317         management.
3318         (WebCore::MainResourceLoader::didFinishLoading): Ditto.
3319         (WebCore::MainResourceLoader::notifyFinished): Removed unneeded wkFilterRelease().
3320         * loader/MainResourceLoader.h:
3321         * platform/ContentFilter.h: Added.
3322         * platform/mac/ContentFilterMac.mm: Added.
3323         (WebCore::ContentFilter::create):
3324         (WebCore::ContentFilter::ContentFilter):
3325         (WebCore::ContentFilter::isEnabled): Returned the result of wkFilterIsManagedSession().
3326         (WebCore::ContentFilter::addData): Called wkFilterAddData() and stored
3327         the resulting NSData in m_replacementData.
3328         (WebCore::ContentFilter::finishedAddingData): Called wkFilterDataComplete()
3329         and stored the resulting NSData in m_replacementData.
3330         (WebCore::ContentFilter::needsMoreData): Returned the result of wkFilterIsBuffering().
3331         (WebCore::ContentFilter::didBlockData): Returned the result of wkFilterWasBlocked().
3332         (WebCore::ContentFilter::getReplacementData): Returned the data stored in m_replacementData.
3333         * platform/mac/WebCoreSystemInterface.h: Updated to reflect changes in WKSI.
3334         * platform/mac/WebCoreSystemInterface.mm: Ditto.
3335
3336         * WebCore.exp.in:
3337         * WebCore.xcodeproj/project.pbxproj:
3338         * loader/MainResourceLoader.cpp:
3339         (WebCore::MainResourceLoader::MainResourceLoader):
3340         (WebCore::MainResourceLoader::~MainResourceLoader):
3341         (WebCore::MainResourceLoader::cancel):
3342         (WebCore::MainResourceLoader::responseReceived):
3343         (WebCore::MainResourceLoader::dataReceived):
3344         (WebCore::MainResourceLoader::didFinishLoading):
3345         (WebCore::MainResourceLoader::notifyFinished):
3346         * loader/MainResourceLoader.h:
3347         (MainResourceLoader):
3348         * platform/ContentFilter.h: Added.
3349         (WebCore):
3350         (ContentFilter):
3351         * platform/mac/ContentFilterMac.mm: Added.
3352         (WebCore):
3353         (WebCore::ContentFilter::create):
3354         (WebCore::ContentFilter::ContentFilter):
3355         (WebCore::ContentFilter::isEnabled):
3356         (WebCore::ContentFilter::addData):
3357         (WebCore::ContentFilter::finishedAddingData):
3358         (WebCore::ContentFilter::needsMoreData):
3359         (WebCore::ContentFilter::didBlockData):
3360         (WebCore::ContentFilter::getReplacementData):
3361         * platform/mac/WebCoreSystemInterface.h:
3362         * platform/mac/WebCoreSystemInterface.mm:
3363
3364 2013-01-25  Simon Fraser  <simon.fraser@apple.com>
3365
3366         When the FrameView has a non-opaque background color, make sure the TileCache tiles are not opaque
3367         https://bugs.webkit.org/show_bug.cgi?id=107989
3368
3369         Reviewed by Dean Jackson.
3370
3371         If a WKView was told to draw a transparent background, make sure that we
3372         set the TileCache tiles to be non-opaque.
3373
3374         * rendering/RenderLayerBacking.cpp:
3375         (WebCore::RenderLayerBacking::updateRootLayerConfiguration):
3376
3377 2013-01-25  Alexandre Elias  <aelias@chromium.org>
3378
3379         Call FrameView::contentsResized() when setting fixed layout size
3380         https://bugs.webkit.org/show_bug.cgi?id=107922
3381
3382         Reviewed by James Robinson.
3383
3384         In fixed layout mode, we should be calling contentsResized() when the
3385         fixed layout size is changed; on the other hand, we don't need to layout
3386         when the visible contents size changes.
3387
3388         This fixes test WebFrameTest::FixedLayoutInitializeAtMinimumPageScale.
3389
3390         * page/FrameView.cpp:
3391         (WebCore::FrameView::visibleContentsResized):
3392         * platform/ScrollView.cpp:
3393         (WebCore::ScrollView::setFixedLayoutSize):
3394         (WebCore::ScrollView::setUseFixedLayout):
3395
3396 2013-01-25  Tony Gentilcore  <tonyg@chromium.org>
3397
3398         Fix an ASSERT in BackgroundHTMLParser::appendPartial
3399         https://bugs.webkit.org/show_bug.cgi?id=107983
3400
3401         Reviewed by Eric Seidel.
3402
3403         The complier may create a temporary for the isolatedCopy of the source string. This could cause the refCount of the
3404         StringImpl to be greater than one when appendPartial is invoked on the background thread.
3405         This patch ensures the temporary is gone by that time which fixes the ASSERT in numerous layout tests.
3406
3407         No new tests because covered by existing tests.
3408
3409         * html/parser/HTMLDocumentParser.cpp:
3410         (WebCore::HTMLDocumentParser::append):
3411
3412 2013-01-25  Dean Jackson  <dino@apple.com>
3413
3414         Add a user agent stylesheet for plugins
3415         https://bugs.webkit.org/show_bug.cgi?id=107890
3416
3417         Reviewed by Alexey Proskuryakov.
3418
3419         As a step along the way to providing a Shadow DOM for plug-in elements, add a
3420         User Agent stylesheet that is loaded when an embed or object element is
3421         in the document. At the moment the stylesheet is empty.
3422
3423         The stylesheet can be overridden by the RenderTheme or the ChromeClient, allowing
3424         ports to provide a custom appearance. This involved hooking up some virtual methods
3425         on ChromeClient, the stubs of which are already implemented in WK2.
3426         As a drive-by, since snapshotted plugins will need some localization I've also
3427         exposed the ChromeClient methods to get text labels.
3428
3429         * CMakeLists.txt: Add plugIns.css.
3430         * DerivedSources.make: Ditto.
3431         * DerivedSources.pri: Ditto.
3432         * GNUmakefile.am: Ditto.
3433         * WebCore.gyp/WebCore.gyp: Ditto.
3434         * WebCore.vcproj/WebCore.vcproj: Ditto.
3435         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
3436         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3437         * WebCore.xcodeproj/project.pbxproj: Ditoo.
3438         * css/StyleResolver.cpp:
3439         (WebCore::ensureDefaultStyleSheetsForElement): Load and inject new plugInsStyleSheet if there is an object or embed element.
3440         * css/plugIns.css: Added. Empty for now.
3441         * page/ChromeClient.h: New methods for querying the client.
3442         (WebCore::ChromeClient::plugInStartLabelTitle):
3443         (WebCore::ChromeClient::plugInStartLabelSubtitle):
3444         (WebCore::ChromeClient::plugInExtraStyleSheet):
3445         * rendering/RenderTheme.h:
3446         (WebCore::RenderTheme::extraPlugInsStyleSheet): Allow the theme to provide an extra stylesheet.
3447
3448 2013-01-25  Eric Carlson  <eric.carlson@apple.com>
3449
3450         Adding a text track should not make controls visible
3451         https://bugs.webkit.org/show_bug.cgi?id=107956
3452
3453         Reviewed by Dean Jackson.
3454
3455         Test: media/media-captions-no-controls.html
3456
3457         * html/HTMLMediaElement.cpp:
3458         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Call updateTextTrackDisplay.
3459         (WebCore::HTMLMediaElement::updateTextTrackDisplay): New, call mediaControls->updateTextTrackDisplay()
3460             if we have controls.
3461         (WebCore::HTMLMediaElement::setClosedCaptionsVisible):  Call updateTextTrackDisplay.
3462         (WebCore::HTMLMediaElement::createMediaControls): Hide controls if they should not be 
3463             visible. Minor drive by cleanup.
3464         (WebCore::HTMLMediaElemen