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