[GStreamer] create playbin in ::load(), not in player constructor
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-12-16  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
2
3         [GStreamer] create playbin in ::load(), not in player constructor
4         https://bugs.webkit.org/show_bug.cgi?id=103898
5
6         Reviewed by Philippe Normand.
7
8         This patch moves the instantiation of the playbin pipeline into the
9         WebCore::MediaPlayerPrivateGStreamer::load() method, so the pipeline
10         layout can reflect other predefined settings such as audio pitch
11         preservation in variable playback rate scenarios
12
13         No new tests. Covered by existing tests.
14
15         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
16         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
17         (WebCore::MediaPlayerPrivateGStreamer::load):
18         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
19         (MediaPlayerPrivateGStreamer):
20
21 2012-12-16  Mihnea Ovidenie  <mihnea@adobe.com>
22
23         [CSSRegions] Pseudo-elements should not be directly collected into a named flow
24         https://bugs.webkit.org/show_bug.cgi?id=105046
25
26         Reviewed by Abhishek Arya.
27
28         Prevent pseudo-elements to be collected into a named-flow by bailing out early in the collecting stage.
29         Following the CSSRegions spec, http://dev.w3.org/csswg/css3-regions/#flow-into, the pseudo-elements
30         like ::before/::after/::first-letter/::first-line are not allowed to become content nodes, being directly
31         collected into a flow thread.
32
33         Tests: fast/regions/pseudo-after-content-node.html
34                fast/regions/pseudo-before-content-node.html
35                fast/regions/pseudo-first-letter-content-node.html
36                fast/regions/pseudo-first-line-content-node.html
37
38         * dom/NodeRenderingContext.cpp:
39         (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
40
41 2012-12-16  Mihai Maerean  <mmaerean@adobe.com>
42
43         [CSS Regions] broken feature detection: body.webkitRegionOverset and body.webkitGetRegionFlowRanges shouldn't succeed when disabled at runtime
44         https://bugs.webkit.org/show_bug.cgi?id=99707
45
46         Reviewed by Hajime Morita.
47
48         The bug is that the CSS Regions feature leaks information at run-time. There are JS properties that exist even
49         if the feature is disabled at run-time (document.webkitGetNamedFlows, document.body.webkitRegionOverset,
50         document.body.webkitGetRegionFlowRanges and window.WebKitCSSRegionRule).
51
52         The fix is to add V8EnabledAtRuntime=cssRegions in the IDL files to the properties that leak information and to
53         the interfaces that are the type of those properties.
54
55         Test: fast/regions/region-leak-js-information-when-disabled-at-runtime.html
56
57         * css/WebKitCSSRegionRule.idl:
58             added V8EnabledAtRuntime=cssRegions for the WebKitCSSRegionRule interface.
59         * dom/DOMNamedFlowCollection.idl:
60             added V8EnabledAtRuntime=cssRegions for the DOMNamedFlowCollection interface.
61         * dom/Document.idl:
62             added V8EnabledAtRuntime=cssRegions for the webkitGetNamedFlows method.
63         * dom/Element.idl:
64             added V8EnabledAtRuntime=cssRegions for the webkitRegionOverset attribute.
65             added V8EnabledAtRuntime=cssRegions for the webkitGetRegionFlowRanges method.
66         * page/DOMWindow.idl:
67             added V8EnabledAtRuntime=cssRegions for the WebKitCSSRegionRule attribute.
68
69 2012-12-15  Ian Vollick  <vollick@chromium.org>
70
71         [chromium] Automatically use composited scrolling
72         https://bugs.webkit.org/show_bug.cgi?id=94743
73
74         Reviewed by Adrienne Walker.
75
76         We currently use the composited scrolling facilities provided by
77         wkb.ug/91117 if the overflow scroll block element is styled with
78         -webkit-overflow-scrolling: touch. Ideally, we could automatically
79         opt into composited scrolling if it is safe to do so. This can affect
80         antialiasing, so it is important that automatically opting in is only
81         enabled via a setting.
82
83         The way I determine if it is safe is by checking that z-ordering will
84         not be affected if the overflow scrollable element were promoted to a
85         stacking context (details below), and that clipping our scrolling
86         descendants will not affect rendering.
87
88         To check the first condition (that z-ordering will not be affected).
89         I ensure that the candidate element and all its descendants appear as a 
90         contiguous block in the candidate's stacking context. That is, if no 
91         other elements are 'between' any of the candidates descendants when we
92         sort in paint order, then we're safe. This is overly conservative,
93         however. We could, in future, only consider stacking problems between
94         elements that actually overlap.
95
96         To ensure that clipping will not cause a rendering change, I ensure
97         that the layer has no out of flow positioned descendant whose
98         containing block is not also a descendant of ours.
99
100         Test: compositing/overflow/automatically-opt-into-compositing-scrolling.html
101
102         (WebCore):
103         * rendering/RenderLayer.cpp:
104         (WebCore::RenderLayer::RenderLayer):
105         (WebCore::RenderLayer::acceleratedCompositingForOverflowScrollEnabled):
106         (WebCore):
107         (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder):
108         (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrderRecursive):
109         (WebCore::RenderLayer::positionNewlyCreatedOverflowControls):
110         (WebCore::RenderLayer::canSafelyEstablishAStackingContext):
111           Returns true if the RenderLayer could become a stacking context without
112           affecting the stacking order.
113         (WebCore::RenderLayer::updateDescendantDependentFlags):
114           We now need to keep track of out of flow positioned descendants.
115         (WebCore::RenderLayer::addChild):
116         (WebCore::RenderLayer::removeChild):
117         (WebCore::RenderLayer::usesCompositedScrolling):
118           Returns true if the layer actually is using composited scrolling.
119           This function may return false, even when needsCompositedScrolling
120           returns true.
121         (WebCore::RenderLayer::needsCompositedScrolling):
122           This function returns true if we would like to use composited
123           scrolling and it is safe to turn it on.
124         (WebCore::RenderLayer::updateNeedsCompositedScrolling):
125         (WebCore::RenderLayer::scrollTo):
126         (WebCore::RenderLayer::dirtyZOrderLists):
127         (WebCore::RenderLayer::dirtyNormalFlowList):
128           Since these could affect opting into composited scrolling, we must
129           request that the RenderLayerCompositor reevaluate compositing.
130         (WebCore::RenderLayer::updateLayerListsIfNeeded):
131           We call updateCanSafelyEstablishStackingContext here, if necessary.
132         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
133         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
134           usesCompositedScrolling -> needsCompositedScrolling
135         (WebCore::RenderLayer::setAncestorChainHasOutOfFlowPositionedDescendant):
136         (WebCore::RenderLayer::dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus):
137         (WebCore::RenderLayer::updateOutOfFlowPositioned):
138           Dirties and sets the out of flow positioned descendant state.
139         (WebCore::RenderLayer::styleChanged):
140         * rendering/RenderLayer.h:
141         (RenderLayer):
142         (WebCore::RenderLayer::hasOutOfFlowPositionedDescendant):
143         * rendering/RenderLayerBacking.cpp:
144         (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
145         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
146         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
147         (WebCore::RenderLayerBacking::hasUnpositionedOverflowControlsLayers):
148         (WebCore):
149         * rendering/RenderLayerBacking.h:
150         (RenderLayerBacking):
151         * rendering/RenderLayerCompositor.cpp:
152         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
153         (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling):
154         * rendering/RenderLayerCompositor.h:
155         (WebCore::RenderLayerCompositor::setShouldReevaluateCompositingAfterLayout):
156         * testing/InternalSettings.cpp:
157         (WebCore::InternalSettings::setEnableCompositingForOverflowScroll):
158           Allows enabling the setting in layout tests.
159         (WebCore):
160         * testing/InternalSettings.h:
161         (InternalSettings):
162         * testing/InternalSettings.idl:
163
164 2012-12-15  Carlos Garcia Campos  <cgarcia@igalia.com>
165
166         Unreviewed. Fix make distcheck.
167
168         * bindings/gobject/GNUmakefile.am: Do not dist generated DOM
169         bindings headers.
170         * platform/ScrollAnimatorNone.cpp: Include PlatformGestureEvent.h
171         only if gesture events are enabled.
172
173 2012-12-15  Alexey Proskuryakov  <ap@apple.com>
174
175         Build fix.
176
177         * platform/network/FormData.cpp:
178         (WebCore::encodeElement):
179         (WebCore::decodeElement):
180         (WebCore::FormData::encode):
181         (WebCore::FormData::decode):
182         Disambiguated encode/decode functions. I'm not quite sure why the compiler was
183         confused, but distinct names should make the code more readable anyway.
184
185 2012-12-15  Alexey Proskuryakov  <ap@apple.com>
186
187         <rdar://problem/12886312> Cannot upload patches to Bugzilla (<input type=file> doesn't work)
188         https://bugs.webkit.org/show_bug.cgi?id=105120
189
190         Reviewed by Sam Weinig.
191
192         * WebCore.exp.in:
193         * history/HistoryItem.cpp:
194         * platform/network/FormData.h:
195         Renamed encodeForBackForward and decodeForBackForward to encode and decode, respectively.
196         I couldn't find anything in these that would limit them to this use, and data encoded
197         for b/f has to be good enough to re-create a request anyway.
198
199         * platform/network/FormData.cpp: (WebCore::decode): Fixed file data decoder to not
200         bail out in the general case of posting a complete file.
201
202 2012-12-15  Nima Ghanavatian  <nghanavatian@rim.com>
203
204         [BlackBerry] Pass key modifiers with touch and mouse events
205         https://bugs.webkit.org/show_bug.cgi?id=105108
206
207         Reviewed by Rob Buis.
208
209         Call Screen to retrieve current key modifiers.
210
211         Internally reviewed by Gen Mak.
212
213         * platform/PlatformMouseEvent.h:
214         (PlatformMouseEvent):
215         * platform/blackberry/PlatformKeyboardEventBlackBerry.cpp:
216         (WebCore::PlatformKeyboardEvent::getCurrentModifierState):
217         * platform/blackberry/PlatformMouseEventBlackBerry.cpp:
218         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
219         * platform/blackberry/PlatformTouchEventBlackBerry.cpp:
220         (WebCore::PlatformTouchEvent::PlatformTouchEvent):
221
222 2012-12-15  Otto Derek Cheung  <otcheung@rim.com>
223
224         [BlackBerry] Prevent CookieManager from blocking the WKT thread
225         https://bugs.webkit.org/show_bug.cgi?id=105111
226
227         PR 265603
228
229         Reviewed by Rob Buis.
230         Internally reviewed by Konrad Piascik.
231
232         The getBackingStoreCookies in WKT is blocking the thread because it has to wait for
233         the db to be opened before it can call on it.
234
235         The fix is to make CookieDatabaseBackingStore in the cookie_db thread dispatch
236         a getBackingStoreCookies call on WKT after invokeOpen is finished.
237
238         Tested loading the browser. Cookies are being loaded into memory on start up.
239
240         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
241         (WebCore::CookieDatabaseBackingStore::invokeOpen):
242         * platform/blackberry/CookieManager.cpp:
243         (WebCore::cookieManager):
244         * platform/blackberry/CookieManager.h:
245
246 2012-12-15  Simon Fraser  <simon.fraser@apple.com>
247
248         Fix repaint issues when resizing a window with centered content, for platforms with a tile cache
249         https://bugs.webkit.org/show_bug.cgi?id=105073
250
251         Reviewed by Dan Bernstein.
252
253         There were several issues with the "do full repaint" code path in
254         FrameView::layout(). These caused repaint issues when resizing the web view,
255         especially for platforms that use a tile cache.
256         
257         First, the m_doFullRepaint flag wold get clobbered on resize-layouts, because
258         the call to adjustViewSize() re-enters layout(), and resets the m_doFullRepaint member
259         variable to false, even if the outer call had previously set it to true. This would
260         cause us to lose track of whether we needed to do a full repaint. The patch fixes
261         this by restoring m_doFullRepaint to the value it had before the call to adjustViewSize().
262         
263         The second problem was that full repaints would not propagate to compositing
264         layers. They only repainted the RenderView, and on platforms that use a tile cache,
265         this only repaints the top portion of that tile cache. This was fixed by sending
266         a NeedsFullRepaintInBacking flag down into RenderLayer::updateLayerPositions(),
267         and using that to do a full repaint on all compositing layers.
268         
269         Sending this new flag down into updateAfterLayout() prompted some boolean/flags
270         cleanup with propagated into several files. This also allowed me to no longer
271         include RenderLayerBacking.h in RenderLayerCompositor.h, but that required
272         header cleanup in several files.
273
274         Automated testing is not possible because WebKitTestRunner resizes the window
275         asynchronously (bug 105101). Added manual test.
276
277         * page/FrameView.cpp:
278         (WebCore::updateLayerPositionFlags):
279         (WebCore::FrameView::layout):
280         * page/scrolling/ScrollingCoordinator.cpp:
281         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
282         * rendering/RenderLayer.cpp:
283         (WebCore::RenderLayer::updateLayerPositions):
284         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
285         * rendering/RenderLayer.h:
286         * rendering/RenderLayerBacking.cpp:
287         (WebCore::RenderLayerBacking::updateAfterLayout):
288         (WebCore::RenderLayerBacking::contentChanged):
289         * rendering/RenderLayerBacking.h:
290         * rendering/RenderLayerCompositor.cpp:
291         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
292         * rendering/RenderLayerCompositor.h:
293         * rendering/RenderObject.cpp:
294         * rendering/RenderView.cpp:
295
296 2012-12-15  Anders Carlsson  <andersca@apple.com>
297
298         Fix build.
299
300         * platform/graphics/ca/GraphicsLayerCA.h:
301         Remove an unused member variable.
302
303 2012-12-15  Simon Fraser  <simon.fraser@apple.com>
304
305         REGRESSION (r137006): TileCache flashes to linen, rather than the background color, when scrolling fast
306         https://bugs.webkit.org/show_bug.cgi?id=104746
307
308         Reviewed by Darin Adler.
309
310         Make RenderLayerBacking::updateBackgroundColor() responsible for setting the background
311         color of the main frame's root layer to the document background color (rather than doing
312         it in code related to overlay scrollbars, which was crazy). This is only done for platforms
313         that use a TiledBacking (currently, just Mac).
314         
315         Also fix updateBackgroundColor() to not call m_graphicsLayer->setContentsToBackgroundColor()
316         and then call clearBackgroundColor() right away if the color was transparent.
317         
318         * page/FrameView.cpp:
319         (WebCore::FrameView::recalculateScrollbarOverlayStyle): Remove code that calls documentBackgroundColorDidChange().
320         * rendering/RenderLayerBacking.cpp:
321         (WebCore::clipBox): Remove blank linke.
322         (WebCore::RenderLayerBacking::updateBackgroundColor):
323         * rendering/RenderLayerCompositor.cpp:
324         * rendering/RenderLayerCompositor.h:
325         (RenderLayerCompositor):
326
327 2012-12-15  No'am Rosenthal  <noam.rosenthal@nokia.com>
328
329         Disambiguate "background color" and "contents as solid color" on GraphicsLayer
330         https://bugs.webkit.org/show_bug.cgi?id=104842
331
332         Reviewed by Simon Fraser.
333
334         Rename overloads in GraphicsLayerTextureMapper and GraphicsLayerChromium to account for the rename in GraphicsLayer.
335
336         Covered by existing tests.
337
338         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
339         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
340         (WebCore::GraphicsLayerTextureMapper::setContentsToSolidColor):
341         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
342         (GraphicsLayerTextureMapper):
343         (WebCore::GraphicsLayerTextureMapper::solidColor):
344         * platform/graphics/texmap/TextureMapperLayer.cpp:
345         (WebCore::TextureMapperLayer::paintSelf):
346         (WebCore::TextureMapperLayer::flushCompositingStateSelf):
347         * platform/graphics/texmap/TextureMapperLayer.h:
348         (State):
349
350 2012-12-13  Simon Fraser  <simon.fraser@apple.com>
351
352         Disambiguate "background color" and "contents as solid color" on GraphicsLayer
353         https://bugs.webkit.org/show_bug.cgi?id=104842
354
355         Reviewed by Dean Jackson.
356
357         GraphicsLayer failed to be clear about the distinction between
358         the layer background color, and setting the layer contents
359         to a color. This caused some recently added tests to fail,
360         and required some special-casing for the TileCache in
361         GraphicsLayerCA.
362         
363         Separate these two concepts on GraphicsLayer. setBackgroundColor()
364         now sets the background color on the entire layer, which will only
365         be used in special cases like the TileCache.
366         
367         The existing setContentsToBackgroundColor() is renamed to
368         setContentsToSolidColor(), and is an explicit request to create
369         a contents layer for the purpose of displaying a simple color.
370         
371         In both cases, 'clear' methods are not necessary; calling
372         the setter with an invalid color clears the color.
373
374         Covered by existing tests.
375
376         * WebCore.exp.in: Remove GraphicsLayer::clearBackgroundColor().
377         * platform/graphics/GraphicsLayer.cpp:
378         (WebCore::GraphicsLayer::GraphicsLayer):
379         (WebCore::GraphicsLayer::setBackgroundColor):
380         (WebCore::GraphicsLayer::dumpProperties):
381         * platform/graphics/GraphicsLayer.h:
382         (GraphicsLayer): Remove m_backgroundColorSet; we just check whether
383         the color is a valid color now.
384         (WebCore::GraphicsLayer::setContentsToSolidColor):
385         * platform/graphics/ca/GraphicsLayerCA.cpp:
386         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
387         (WebCore::GraphicsLayerCA::setBackgroundColor):
388         (WebCore::GraphicsLayerCA::setContentsToSolidColor):
389         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
390         (WebCore::GraphicsLayerCA::updateBackgroundColor):
391         (WebCore::GraphicsLayerCA::updateContentsColorLayer):
392         (WebCore):
393         * platform/graphics/ca/GraphicsLayerCA.h:
394         (GraphicsLayerCA):
395         * rendering/RenderLayerBacking.cpp:
396         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): We have
397         to call updateBackgroundColor(), because the 'is simple compositing layer'
398         state may change in this code path.
399         (WebCore::RenderLayerBacking::updateBackgroundColor): Don't initialize
400         the Color to transparent (it will be invalid initially), and always
401         call setContentsToSolidColor() which will either set or remove the color.
402
403 2012-12-15  Mark Lam  <mark.lam@apple.com>
404
405         Re-landing patch for "Introducing the DatabaseStrategy and database servers".
406         https://bugs.webkit.org/show_bug.cgi?id=104934.
407
408         Not reviewed.
409
410         Merged from r137767. Previously reviewed by Sam Weinig.
411         Also added __ZTVN7WebCore16DatabaseStrategyE to WebCore.exp.in.
412
413         No new tests.
414
415         * CMakeLists.txt:
416         * GNUmakefile.list.am:
417         * Modules/webdatabase/AbstractDatabaseServer.h: Copied from Source/WebCore/Modules/webdatabase/AbstractDatabaseServer.h.
418         * Modules/webdatabase/DBBackendServer.h: Copied from Source/WebCore/Modules/webdatabase/DBBackendServer.h.
419         * Modules/webdatabase/DatabaseManager.cpp:
420         (WebCore::DatabaseManager::DatabaseManager):
421         * Modules/webdatabase/DatabaseManager.h:
422         (DatabaseManager):
423         * Target.pri:
424         * WebCore.exp.in:
425         * WebCore.gypi:
426         * WebCore.vcproj/WebCore.vcproj:
427         * WebCore.xcodeproj/project.pbxproj:
428         * platform/DatabaseStrategy.cpp: Copied from Source/WebCore/platform/DatabaseStrategy.cpp.
429         * platform/DatabaseStrategy.h: Copied from Source/WebCore/platform/DatabaseStrategy.h.
430         * platform/PlatformStrategies.h:
431         (WebCore::PlatformStrategies::databaseStrategy):
432         (PlatformStrategies):
433         (WebCore::PlatformStrategies::PlatformStrategies):
434
435 2012-12-14  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
436
437         Emphasis mark is printed after inline-block with justify
438         https://bugs.webkit.org/show_bug.cgi?id=104631
439
440         Reviewed by Dean Jackson.
441
442         Do not print an emphasis mark after an inline-block when justified.
443
444         If an inline-block is expanded, it has a space appended to it.
445         This space should not have any emphasis marks drawn.
446
447         Test: fast/inline/justify-emphasis-inline-box.html
448
449         * platform/graphics/SimpleFontData.h:
450         (WebCore::SimpleFontData::zeroWidthSpaceGlyph): Add getter method to get zero width space glyph.
451         * platform/graphics/WidthIterator.cpp:
452         (WebCore::WidthIterator::advanceInternal): We use zero width space for the extra space not to draw emphasis marks.
453
454 2012-12-14  Jer Noble  <jer.noble@apple.com>
455
456         Unreviewed bug fix after r137782.
457
458         Add new source file TextTrackRepresentation.cpp to CMakeLists.txt.
459
460         * CMakeLists.txt:
461
462 2012-12-14  Sheriff Bot  <webkit.review.bot@gmail.com>
463
464         Unreviewed, rolling out r137767.
465         http://trac.webkit.org/changeset/137767
466         https://bugs.webkit.org/show_bug.cgi?id=105062
467
468         Broke Mac builds. (Requested by mlam on #webkit).
469
470         * CMakeLists.txt:
471         * GNUmakefile.list.am:
472         * Modules/webdatabase/AbstractDatabaseServer.h: Removed.
473         * Modules/webdatabase/DBBackendServer.h: Removed.
474         * Modules/webdatabase/DatabaseManager.cpp:
475         (WebCore::DatabaseManager::DatabaseManager):
476         * Modules/webdatabase/DatabaseManager.h:
477         * Target.pri:
478         * WebCore.exp.in:
479         * WebCore.gypi:
480         * WebCore.vcproj/WebCore.vcproj:
481         * WebCore.xcodeproj/project.pbxproj:
482         * platform/DatabaseStrategy.cpp: Removed.
483         * platform/DatabaseStrategy.h: Removed.
484         * platform/PlatformStrategies.h:
485         (WebCore):
486         (WebCore::PlatformStrategies::PlatformStrategies):
487         (PlatformStrategies):
488
489 2012-12-14  Jer Noble  <jer.noble@apple.com>
490
491         Allow the text track contents to be displayed externally to WebCore.
492         https://bugs.webkit.org/show_bug.cgi?id=105052
493
494         Reviewed by Eric Carlson.
495
496         Support scenarios where the text track contents must be rendered outside of WebCore, such as to an external
497         display or window.  Add an abstract base class which encapsulates the external representation to which the
498         text tracks will be rendered.
499
500         Add a new abstract base class and client to wrap the external rendering of a TextTrack.
501         * platform/graphics/TextTrackRepresentation.h: Added.
502         (WebCore::TextTrackRepresentationClient::~TextTrackRepresentationClient):
503         (WebCore::TextTrackRepresentation::~TextTrackRepresentation):
504
505         Add an empty concrete implementation for those ports who do not yet support external display of subtitles.
506         * platform/graphics/TextTrackRepresentation.cpp: Added.
507         (NullTextTrackRepresentation):
508         (WebCore::NullTextTrackRepresentation::~NullTextTrackRepresentation):
509         (WebCore::NullTextTrackRepresentation::update):
510         (WebCore::NullTextTrackRepresentation::platformLayer):
511         (WebCore::NullTextTrackRepresentation::setContentScale):
512         (WebCore::NullTextTrackRepresentation::bounds):
513         (WebCore::TextTrackRepresentation::create):
514
515         Add methods to MediaPlayerPrivateIOS to handle the TextTrackRepresentation.
516         * platform/graphics/ios/MediaPlayerPrivateIOS.h:
517         * platform/graphics/ios/MediaPlayerPrivateIOS.mm:
518         (WebCore::MediaPlayerPrivateIOS::deliverNotification): Remove the representation when exiting full screen.
519         (WebCore::MediaPlayerPrivateIOS::requiresTextTrackRepresentation): Return YES if in full screen mode.
520         (WebCore::MediaPlayerPrivateIOS::setTextTrackRepresentation): Pass the representation's layer to the player plug-in.
521
522         Expose those methods via HTMLMediaElement:
523         * html/HTMLMediaElement.cpp:
524         (WebCore::HTMLMediaElement::requiresTextTrackRepresentation):
525         (WebCore::HTMLMediaElement::setTextTrackRepresentation):
526         * html/HTMLMediaElement.h:
527         * platform/graphics/MediaPlayer.cpp:
528         (WebCore::MediaPlayer::requiresTextTrackRepresentation):
529         (WebCore::MediaPlayer::setTextTrackRepresentation):
530         * platform/graphics/MediaPlayer.h:
531         (WebCore::MediaPlayerClient::textTrackRepresentationBoundsChanged):
532         (WebCore::MediaPlayerClient::paintTextTrackRepresentation):
533         * platform/graphics/MediaPlayerPrivate.h:
534         (WebCore::MediaPlayerPrivateInterface::requiresTextTrackRepresentation):
535         (WebCore::MediaPlayerPrivateInterface::setTextTrackRepresentation):
536
537         * html/shadow/MediaControlElements.cpp:
538         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Create the representation, if necessary.
539         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Use the representation to determine the font size.
540         (WebCore::MediaControlTextTrackContainerElement::paintTextTrackRepresentation): Added. Paint the TextTrack into the provided graphics context.
541         (WebCore::MediaControlTextTrackContainerElement::textTrackRepresentationBoundsChanged): Added. Call updateSizes().
542         * html/shadow/MediaControlElements.h:
543
544         Add the new files to the project.
545         * WebCore.xcodeproj/project.pbxproj:
546         * GNUmakefile.list.am:
547         * Target.pri:
548         * WebCore.gypi:
549         * WebCore.vcproj/WebCore.vcproj:
550
551 2012-12-14  Fady Samuel  <fsamuel@chromium.org>
552
553         Allow embedder to observe changes to frame names
554         https://bugs.webkit.org/show_bug.cgi?id=104404
555
556         Reviewed by Darin Fisher.
557
558         * loader/FrameLoaderClient.h:
559         (WebCore::FrameLoaderClient::didChangeName):
560         (FrameLoaderClient):
561         * page/DOMWindow.cpp:
562         (WebCore::DOMWindow::setName):
563
564 2012-12-14  James Simonsen  <simonjam@chromium.org>
565
566         [Resource Timing] Properly report reused connections
567         https://bugs.webkit.org/show_bug.cgi?id=104986
568
569         Reviewed by Tony Gentilcore.
570
571         Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_connection_reuse.html
572
573         * page/PerformanceResourceTiming.cpp:
574         (WebCore::PerformanceResourceTiming::PerformanceResourceTiming):
575         (WebCore::PerformanceResourceTiming::connectStart):
576         (WebCore::PerformanceResourceTiming::connectEnd):
577         * page/PerformanceResourceTiming.h:
578         (PerformanceResourceTiming):
579
580 2012-12-14  Roger Fong  <roger_fong@apple.com>
581
582         Enable video caption controls on Windows.
583         https://bugs.webkit.org/show_bug.cgi?id=105045.
584
585         Reviewed by Eric Carlson.
586
587         Now that video tracks have been enabled on Windows, enable controls as well.
588
589         * html/shadow/MediaControlElements.cpp:
590         (WebCore::MediaControlToggleClosedCaptionsButtonElement::MediaControlToggleClosedCaptionsButtonElement):
591         (WebCore::MediaControlToggleClosedCaptionsButtonElement::defaultEventHandler):
592         * html/shadow/MediaControlElements.h:
593         * rendering/RenderThemeWin.h:
594
595 2012-12-14  Mark Lam  <mark.lam@apple.com>
596
597         Introducing the DatabaseStrategy and database servers.
598         https://bugs.webkit.org/show_bug.cgi?id=104934.
599
600         Reviewed by Sam Weinig.
601
602         The database server is currently a placeholder that does nothing.
603
604         No new tests.
605
606         * CMakeLists.txt:
607         * GNUmakefile.list.am:
608         * Modules/webdatabase/AbstractDatabaseServer.h: Added.
609         (WebCore):
610         (AbstractDatabaseServer):
611         (WebCore::AbstractDatabaseServer::AbstractDatabaseServer):
612         (WebCore::AbstractDatabaseServer::~AbstractDatabaseServer):
613         * Modules/webdatabase/DBBackendServer.h: Added.
614         (DBBackend):
615         * Modules/webdatabase/DatabaseManager.cpp:
616         (WebCore::DatabaseManager::DatabaseManager):
617         * Modules/webdatabase/DatabaseManager.h:
618         (WebCore):
619         (DatabaseManager):
620         * Target.pri:
621         * WebCore.exp.in:
622         * WebCore.gypi:
623         * WebCore.vcproj/WebCore.vcproj:
624         * WebCore.xcodeproj/project.pbxproj:
625         * platform/DatabaseStrategy.cpp: Added.
626         (WebCore):
627         (WebCore::DatabaseStrategy::getDatabaseServer):
628         * platform/DatabaseStrategy.h: Added.
629         (WebCore):
630         (DatabaseStrategy):
631         (WebCore::DatabaseStrategy::~DatabaseStrategy):
632         * platform/PlatformStrategies.h:
633         (WebCore):
634         (WebCore::PlatformStrategies::databaseStrategy):
635         (PlatformStrategies):
636         (WebCore::PlatformStrategies::PlatformStrategies):
637
638 2012-12-14  Anton Vayvod  <avayvod@chromium.org>
639
640         Text Autosizing: Consider inline-block and inline-table elements to be autosizing clusters.
641         https://bugs.webkit.org/show_bug.cgi?id=104702
642
643         Reviewed by Julien Chaffraix.
644
645         A common pattern for creating adjacent columns in CSS is to set each of the columns to
646         display:inline-block, display:inline-table or alike WebKit-specific styles. Whenever columns
647         are used, Text Autosizing needs to assign each of the columns to different clusters (since
648         the user can zoom in such that a column fills the width of the screen, so text within a column
649         should have a smaller multiplier than it's wider enclosing cluster would have needed).
650
651         This patch causes display:inline-block, display:inline-table and alike styles to trigger new clusters.
652
653         Test: fast/text-autosizing/cluster-inline-block-or-table.html
654         Test: fast/text-autosizing/cluster-inline-grid-flex-box.html
655
656         * rendering/TextAutosizer.cpp:
657         (WebCore::TextAutosizer::isAutosizingContainer):
658         (WebCore::TextAutosizer::isAutosizingCluster):
659             Consider display:inline-block, inline-table and alike elements to be autosizing containers and clusters.
660
661 2012-12-14  Anders Carlsson  <andersca@apple.com>
662
663         REGRESSION (r137607): Cannot download files, stuck in "Preparing to download"
664         https://bugs.webkit.org/show_bug.cgi?id=105044
665         <rdar://problem/12879657>
666
667         Reviewed by Alexey Proskuryakov.
668
669         Make ResourceHandle::cancel return early if the handle has been converted to a download.
670
671         * platform/network/mac/ResourceHandleMac.mm:
672         (WebCore::ResourceHandle::cancel):
673
674 2012-12-14  Sheriff Bot  <webkit.review.bot@gmail.com>
675
676         Unreviewed, rolling out r137570.
677         http://trac.webkit.org/changeset/137570
678         https://bugs.webkit.org/show_bug.cgi?id=105048
679
680         Stale nodes in the touchEventTarget HashCountedSet are
681         triggering crashes. Rolling out while I find the root cause.
682         (Requested by leviw on #webkit).
683
684         * dom/Document.cpp:
685         (WebCore::Document::Document):
686         (WebCore::Document::didAddTouchEventHandler):
687         (WebCore::Document::didRemoveTouchEventHandler):
688         * dom/Document.h:
689         (WebCore::Document::touchEventHandlerCount):
690         (Document):
691         * dom/Node.cpp:
692         (WebCore::Node::didMoveToNewDocument):
693         (WebCore::tryAddEventListener):
694         (WebCore::tryRemoveEventListener):
695         * history/CachedFrame.cpp:
696         (WebCore::CachedFrameBase::restore):
697         * html/HTMLInputElement.cpp:
698         (WebCore::HTMLInputElement::~HTMLInputElement):
699         (WebCore::HTMLInputElement::updateType):
700         * page/DOMWindow.cpp:
701         (WebCore::DOMWindow::addEventListener):
702         (WebCore::DOMWindow::removeEventListener):
703         * page/EventHandler.cpp:
704         (WebCore::EventHandler::handleTouchEvent):
705         * page/Frame.cpp:
706         (WebCore::Frame::setDocument):
707         * page/scrolling/ScrollingCoordinator.cpp:
708         * page/scrolling/ScrollingCoordinator.h:
709         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
710         (WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated):
711         * page/scrolling/chromium/ScrollingCoordinatorChromium.h:
712         (ScrollingCoordinatorChromium):
713         * testing/Internals.cpp:
714         (WebCore::Internals::touchEventHandlerCount):
715         * testing/Internals.h:
716         (Internals):
717         * testing/Internals.idl:
718
719 2012-12-14  Michelangelo De Simone  <michelangelo@webkit.org>
720
721         [CSS Shaders] Remove code for the other mesh box types (border-box | padding-box | content-box)
722         https://bugs.webkit.org/show_bug.cgi?id=103776
723
724         Reviewed by Dean Jackson.
725
726         The MeshBoxType has been removed and the code has been refactored. The specs will be updated shortly
727         and therefore this feature - even though it was not fully implemented yet - shall not be used anymore.
728
729         In this patch we remove everything but the parsing code, which shall be addressed in a different patch
730         (see: https://bugs.webkit.org/show_bug.cgi?id=103778).
731
732         Specification to be updated: http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#ltboxgt
733
734         Existing tests have been updated and new parsing legacy cases have been added.
735
736         * css/CSSComputedStyleDeclaration.cpp:
737         (WebCore::CSSComputedStyleDeclaration::valueForFilter):
738         * css/CSSParser.cpp:
739         (WebCore::CSSParser::parseCustomFilter):
740         * css/CSSPrimitiveValueMappings.h:
741         * css/StyleResolver.cpp:
742         (WebCore::StyleResolver::createCustomFilterOperation):
743         * platform/graphics/filters/CustomFilterConstants.h:
744         * platform/graphics/filters/CustomFilterOperation.cpp:
745         (WebCore::CustomFilterOperation::CustomFilterOperation):
746         (WebCore::CustomFilterOperation::blend):
747         * platform/graphics/filters/CustomFilterOperation.h:
748         (WebCore::CustomFilterOperation::create):
749         (CustomFilterOperation):
750         (WebCore::CustomFilterOperation::operator==):
751         * platform/graphics/filters/CustomFilterRenderer.cpp:
752         (WebCore::CustomFilterRenderer::create):
753         (WebCore::CustomFilterRenderer::CustomFilterRenderer):
754         * platform/graphics/filters/CustomFilterRenderer.h:
755         (CustomFilterRenderer):
756         * platform/graphics/filters/FECustomFilter.cpp:
757         (WebCore::FECustomFilter::FECustomFilter):
758         (WebCore::FECustomFilter::create):
759         * platform/graphics/filters/FECustomFilter.h:
760         (FECustomFilter):
761         * platform/graphics/filters/ValidatedCustomFilterOperation.cpp:
762         (WebCore::ValidatedCustomFilterOperation::ValidatedCustomFilterOperation):
763         * platform/graphics/filters/ValidatedCustomFilterOperation.h:
764         (WebCore::ValidatedCustomFilterOperation::create):
765         (WebCore::ValidatedCustomFilterOperation::operator==):
766         (ValidatedCustomFilterOperation):
767         * rendering/FilterEffectRenderer.cpp:
768         (WebCore::createCustomFilterEffect):
769         * rendering/RenderLayer.cpp:
770         (WebCore::RenderLayer::computeFilterOperations):
771         * platform/graphics/texmap/TextureMapperGL.cpp:
772         (WebCore::TextureMapperGL::drawUsingCustomFilter):
773
774 2012-12-14  Yury Semikhatsky  <yurys@chromium.org>
775
776         Web Inspector: optional parameters of protocol commands should go after required ones
777         https://bugs.webkit.org/show_bug.cgi?id=105019
778
779         Reviewed by Pavel Feldman.
780
781         * inspector/Inspector.json: Moved required x and y parameters declaration before
782         optional ones.
783         * inspector/InspectorInputAgent.cpp:
784         (WebCore::InspectorInputAgent::dispatchMouseEvent):
785         * inspector/InspectorInputAgent.h:
786         (InspectorInputAgent):
787
788 2012-12-14  Jessie Berlin  <jberlin@apple.com>
789
790         Mac build fix after r137724.
791
792         * platform/graphics/MediaPlayer.h:
793         (WebCore::MediaPlayerClient::mediaPlayerKeyAdded):
794         Comment out the names of the unused parameters so they don't trigger unused parameter
795         warnings.
796         (WebCore::MediaPlayerClient::mediaPlayerKeyError):
797         Ditto.
798         (WebCore::MediaPlayerClient::mediaPlayerKeyMessage):
799         Ditto.
800         (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
801         Ditto.
802
803         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
804         (WebCore::MediaPlayerPrivateAVFoundationObjC::generateKeyRequest):
805         Pass an empty URL for the new defaultURL parameter in the keyMessage call.
806
807 2012-12-14  Alberto Garcia  <agarcia@igalia.com>
808
809         [GTK] When in private mode WebKitGTK+ should not save HTTP authentication credentials to the persistent storage
810         https://bugs.webkit.org/show_bug.cgi?id=104910
811
812         Reviewed by Martin Robinson.
813
814         Add new parameter to GtkAuthenticationDialog to select whether we
815         allow persistent storage of credential information or not. In the
816         latter case, the "Remember password" check button is not shown and
817         the credentials are always stored in the session.
818
819         * platform/gtk/GtkAuthenticationDialog.cpp:
820         (WebCore::GtkAuthenticationDialog::GtkAuthenticationDialog):
821         (WebCore::GtkAuthenticationDialog::createContentsInContainer):
822         (WebCore::GtkAuthenticationDialog::buttonClickedCallback):
823         * platform/gtk/GtkAuthenticationDialog.h:
824         (GtkAuthenticationDialog):
825
826 2012-12-14  Andrey Kosyakov  <caseq@chromium.org>
827
828         Unreviewed, rolling out r129633 and r129757.
829         http://trac.webkit.org/changeset/129633
830         http://trac.webkit.org/changeset/129757
831         https://bugs.webkit.org/show_bug.cgi?id=97659
832
833         Causes performance regression whn inspector overlay is
834         displayed
835
836         * inspector/InspectorOverlay.cpp:
837         (WebCore::InspectorOverlay::paint):
838
839 2012-12-14  Yury Semikhatsky  <yurys@chromium.org>
840
841         Web Inspector: add data grid for exploring native heap graph
842         https://bugs.webkit.org/show_bug.cgi?id=105012
843
844         Reviewed by Pavel Feldman.
845
846         Added a view for displaying native heap graph nodes.
847
848         * inspector/HeapGraphSerializer.cpp:
849         (WebCore::HeapGraphSerializer::reportEdge):
850         * inspector/front-end/NativeMemorySnapshotView.js:
851         (WebInspector.NativeMemorySnapshotView):
852         (WebInspector.NativeMemorySnapshotView.prototype._onSelectedViewChanged):
853         (WebInspector.NativeMemorySnapshotView.prototype.get statusBarItems):
854         (WebInspector.NativeHeapGraphNode):
855         (WebInspector.NativeHeapGraphNode.prototype.id):
856         (WebInspector.NativeHeapGraphNode.prototype.type):
857         (WebInspector.NativeHeapGraphNode.prototype.size):
858         (WebInspector.NativeHeapGraphNode.prototype.className):
859         (WebInspector.NativeHeapGraphNode.prototype.name):
860         (WebInspector.NativeHeapGraphNode.prototype.hasReferencedNodes):
861         (WebInspector.NativeHeapGraphNode.prototype.referencedNodes):
862         (WebInspector.NativeHeapGraphNode.prototype._firstEdgePoistion):
863         (WebInspector.NativeHeapGraphNode.prototype._afterLastEdgePosition):
864         (WebInspector.NativeHeapGraphNode.prototype._getStringField):
865         (WebInspector.NativeHeapGraph):
866         (WebInspector.NativeHeapGraph.prototype.rootNodes):
867         (WebInspector.NativeHeapGraph.prototype._calculateNodeEdgeIndexes):
868         (WebInspector.NativeHeapGraphDataGrid):
869         (WebInspector.NativeHeapGraphDataGridRoot):
870         (WebInspector.NativeHeapGraphDataGridRoot.prototype._populate):
871         (WebInspector.NativeHeapGraphDataGridNode):
872         (WebInspector.NativeHeapGraphDataGridNode.prototype._populate):
873         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
874         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked):
875
876 2012-12-14  Ilya Tikhonovsky  <loislo@chromium.org>
877
878         Web Inspector: Native Memory Instrumentation: do not validate InlineFlowBox objects against tcmalloc data.
879         https://bugs.webkit.org/show_bug.cgi?id=105001
880
881         Reviewed by Yury Semikhatsky.
882
883         This is a follow-up change for r137589.
884
885         * rendering/InlineFlowBox.cpp:
886         (WebCore::InlineFlowBox::reportMemoryUsage):
887         (WebCore):
888         * rendering/InlineFlowBox.h:
889         (InlineFlowBox):
890
891 2012-12-14  Kentaro Hara  <haraken@chromium.org>
892
893         ChildNodesLazySnapshot::nextNode() can crash in Debug builds
894         https://bugs.webkit.org/show_bug.cgi?id=104982
895
896         Reviewed by Ryosuke Niwa.
897
898         The original fix in r137702 was not enough. r137702 fixed a crash
899         in Release builds but didn't fix a crash in Debug builds.
900         We have to also change a return type of ChildNodesLazySnapshot::nextNode()
901         from a raw pointer to a RefPtr.
902
903         Test: fast/dom/insertedIntoDocument-no-crash.html
904         (Confirm that this test does not crash in Debug builds.)
905
906         * dom/ContainerNode.h:
907         (WebCore::ChildNodesLazySnapshot::nextNode):
908         * dom/ContainerNodeAlgorithms.cpp:
909         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
910         (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
911
912 2012-12-14  John Mellor  <johnme@chromium.org>
913
914         Text Autosizing: Don't autosize unwrappable blocks
915         https://bugs.webkit.org/show_bug.cgi?id=104925
916
917         Reviewed by Julien Chaffraix.
918
919         If we autosize an unwrappable block (white-space:nowrap/pre), it'll
920         expand sideways. This doesn't actually improve its legibility, and it
921         can often severely break web page layouts. This patch prevents us from
922         autosizing unwrappable blocks. A follow-up patch will address the more
923         complex issue of unwrappable inline elements.
924
925         Tests: fast/text-autosizing/unwrappable-blocks.html
926                fast/text-autosizing/unwrappable-inlines.html
927
928         * rendering/TextAutosizer.cpp:
929         (WebCore::TextAutosizer::processContainer):
930             Use containerShouldbeAutosized instead of contentHeightIsConstrained.
931         (WebCore::contentHeightIsConstrained):
932             Unchanged, just moved lower down the file.
933         (WebCore::TextAutosizer::containerShouldbeAutosized):
934             Checks that the block is wrappable, and also that contentHeightIsConstrained is false.
935         (WebCore::TextAutosizer::measureDescendantTextWidth):
936             Use containerShouldbeAutosized instead of contentHeightIsConstrained.
937         * rendering/TextAutosizer.h:
938             Declared containerShouldbeAutosized.
939
940 2012-12-14  Vsevolod Vlasov  <vsevik@chromium.org>
941
942         Web Inspector: Duplicate scripts appear in workspace when script was referenced by url with a fragment part.
943         https://bugs.webkit.org/show_bug.cgi?id=105004
944
945         Reviewed by Alexander Pavlov.
946
947         * inspector/front-end/NetworkUISourceCodeProvider.js:
948         (WebInspector.NetworkUISourceCodeProvider.prototype._parsedScriptSource):
949
950 2012-12-14  Kunihiko Sakamoto  <ksakamoto@chromium.org>
951
952         Hours field of date/time input UI should respect step attribute
953         https://bugs.webkit.org/show_bug.cgi?id=104993
954
955         Reviewed by Kent Tamura.
956
957         This patch makes step-up/-down UI of the hours field respect step attribute when possible.
958
959         Test: fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html
960
961         * html/shadow/DateTimeEditElement.cpp:
962         (WebCore::DateTimeEditBuilder::visitField): Pass step parameters to the hour field constructor.
963         * html/shadow/DateTimeFieldElements.cpp:
964         (WebCore::DateTimeHourFieldElement::DateTimeHourFieldElement): Add Parameters argument.
965         (WebCore::DateTimeHourFieldElement::create): Ditto.
966         * html/shadow/DateTimeFieldElements.h:
967         (DateTimeHourFieldElement): Ditto.
968
969 2012-12-14  Yury Semikhatsky  <yurys@chromium.org>
970
971         Unreviewed. Windows compilation fix after r137728.
972
973         * inspector/InspectorAllInOne.cpp:
974
975 2012-12-14  Shinya Kawanaka  <shinyak@chromium.org>
976
977         [Shadow DOM] ShadowRoot.getElementById() should work outside document.
978         https://bugs.webkit.org/show_bug.cgi?id=87815
979
980         Reviewed by Hajime Morita.
981
982         ShadowRoot.getElementById() didn't work if ShadowRoot is outside document. We need to update id when an element
983         is in ShadowTree event if it is not in document.
984
985         For performance reason, we introduce IsInShadowTree flag, which enables us to check isInTreeScope() fast.
986         This is maintained in Element::insertedInto and removedFrom. Here, we're anxious about performance regression,
987         however our benchmark result shows this doesn't regress the performance.
988
989         I've measured Dromaeo/dom-modify.html and Parser/html5-full-render.html 2 times.
990
991         Dromaeo/dom-modify.html
992              35.21,   35.27 [runs/s] --->   35.76,   35.56 [runs/s]
993         Parser/html5-full-render.html
994            4328.51, 4254.94 [ms]     ---> 4277.14, 4222.43 [ms]
995
996         Test: fast/dom/shadow/getelementbyid-in-orphan.html
997
998         * dom/Element.cpp:
999         (WebCore::Element::insertedInto):
1000         * dom/Element.h:
1001         (WebCore::Element::updateId):
1002         * dom/Node.cpp:
1003         (WebCore::Node::insertedInto): If the parent node is in shadow tree, this node should be also in the same shadow tree.
1004         Since this node is inserted, parentOrHostNode() will not be null.
1005         (WebCore::Node::removedFrom): When node is removed from ShadowTree, its treeScope() should not be ShadowRoot.
1006         * dom/Node.h:
1007         (Node):
1008         (WebCore::Node::isInShadowTree):
1009         (WebCore::Node::isInTreeScope):
1010
1011 2012-12-14  Antoine Quint  <graouts@apple.com>
1012
1013         LayerTreeAgent should only be enabled upon restore if it was previously in the enabled state
1014         https://bugs.webkit.org/show_bug.cgi?id=104887
1015
1016         Reviewed by Pavel Feldman.
1017
1018         Check that we were previously in the enabled state before re-enabling the agent upon restore,
1019         as suggested by Pavel Feldman in follow-up discussion to https://bugs.webkit.org/show_bug.cgi?id=103513.
1020
1021         * inspector/InspectorLayerTreeAgent.cpp:
1022         (WebCore::InspectorLayerTreeAgent::restore):
1023
1024 2012-12-14  Eugene Klyuchnikov  <eustas@chromium.org>
1025
1026         Web Inspector: CPU Profile: Search in "heavy" mode is very slow.
1027         https://bugs.webkit.org/show_bug.cgi?id=103682
1028
1029         Reviewed by Pavel Feldman.
1030
1031         In "heavy" mode the searchable tree is much larger than original tree.
1032         That is why search can cause watchdog timer fired.
1033
1034         Simple optimization makes search much faster.
1035
1036         * inspector/front-end/CPUProfileView.js:
1037         (WebInspector.CPUProfileView.prototype.searchCanceled):
1038         Fix cleanup.
1039         (WebInspector.CPUProfileView.prototype.matchesQuery):
1040         Precompute regexp.
1041         (WebInspector.CPUProfileView.prototype.performSearch):
1042         Use precomputed regexp instead of generating one on each iteration.
1043
1044 2012-12-13  Yury Semikhatsky  <yurys@chromium.org>
1045
1046         Web Inspector: collect native heap graph and report it to the front-end
1047         https://bugs.webkit.org/show_bug.cgi?id=104888
1048
1049         Reviewed by Pavel Feldman.
1050
1051         Added an option to serialize native heap graph in a format similar to that
1052         of JS heap profiler and send it in reply to getProcessMemoryDistribution
1053         command. This is a first attempt and we likely change the report mechanism to
1054         use a stream instread of sending whole graph at once.
1055
1056         * CMakeLists.txt:
1057         * GNUmakefile.list.am:
1058         * Target.pri:
1059         * WebCore.gypi:
1060         * WebCore.vcproj/WebCore.vcproj:
1061         * WebCore.xcodeproj/project.pbxproj:
1062         * inspector/HeapGraphSerializer.cpp: Added.
1063         (WebCore):
1064         (HeapGraphNode):
1065         (WebCore::HeapGraphNode::HeapGraphNode):
1066         (HeapGraphEdge):
1067         (WebCore::HeapGraphEdge::HeapGraphEdge):
1068         (WebCore::HeapGraphSerializer::HeapGraphSerializer):
1069         (WebCore::HeapGraphSerializer::~HeapGraphSerializer):
1070         (WebCore::HeapGraphSerializer::serialize):
1071         (WebCore::HeapGraphSerializer::reportNode):
1072         (WebCore::HeapGraphSerializer::reportEdge):
1073         (WebCore::HeapGraphSerializer::reportLeaf):
1074         (WebCore::HeapGraphSerializer::reportBaseAddress):
1075         (WebCore::HeapGraphSerializer::adjutEdgeTargets):
1076         (WebCore::HeapGraphSerializer::addString):
1077         * inspector/HeapGraphSerializer.h: Copied from Source/WebCore/inspector/InspectorMemoryAgent.h.
1078         (WebCore):
1079         (HeapGraphSerializer):
1080         * inspector/Inspector.json:
1081         * inspector/InspectorMemoryAgent.cpp:
1082         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
1083         * inspector/InspectorMemoryAgent.h:
1084         (InspectorMemoryAgent):
1085         * inspector/MemoryInstrumentationImpl.cpp:
1086         (WebCore::MemoryInstrumentationClientImpl::reportNode):
1087         (WebCore):
1088         (WebCore::MemoryInstrumentationClientImpl::reportEdge):
1089         (WebCore::MemoryInstrumentationClientImpl::reportLeaf):
1090         (WebCore::MemoryInstrumentationClientImpl::reportBaseAddress):
1091         * inspector/MemoryInstrumentationImpl.h:
1092         (WebCore):
1093         (WebCore::MemoryInstrumentationClientImpl::MemoryInstrumentationClientImpl):
1094         (MemoryInstrumentationClientImpl):
1095
1096 2012-12-14  Yoshifumi Inoue  <yosin@chromium.org>
1097
1098         Handling autoscroll in EventHandler should be re-factor
1099         https://bugs.webkit.org/show_bug.cgi?id=104764
1100
1101         Reviewed by Hajime Morita.
1102
1103         This patch introduces new class AutoscrollController for moving autoscroll
1104         and panscroll from EventHandler class for ease of maintenance of
1105         EventHandler and ease of adding autoscroll related features, e.g. autoscroll
1106         during drag-and-drop, autoscoll by gesture.
1107
1108         No new tests. This patch doesn't change behavior.
1109
1110         * CMakeLists.txt: Changed to add page/AutoscrollController.cpp
1111         * GNUmakefile.list.am:  Changed to add page/AutoscrollController.{cpp,h}
1112         * Target.pri:  Changed to add page/AutoscrollController.cpp
1113         * WebCore.gypi: Changed to add page/AutoscrollController.{cpp,h}
1114         * WebCore.vcproj/WebCore.vcproj: Changed to add page/AutoscrollController.{cpp,h}
1115         * WebCore.xcodeproj/project.pbxproj: Changed to add page/AutoscrollController.{cpp,h}
1116         * page/AutoscrollController.cpp: Added.
1117         (WebCore::getMainFrame): Helper function.
1118         (WebCore::AutoscrollController::AutoscrollController): Moved from EventHandler.
1119         (WebCore::AutoscrollController::autoscrollRenderer): Moved from EventHandler.
1120         (WebCore::AutoscrollController::autoscrollInProgress): Moved from EventHandler.
1121         (WebCore::AutoscrollController::startAutoscrollForSelection): Replacement of EventHandler::handleAutoscroll().
1122         (WebCore::AutoscrollController::stopAutoscrollTimer): Moveed from EventHandler.
1123         (WebCore::AutoscrollController::updateAutoscrollRenderer): ditto
1124         (WebCore::AutoscrollController::didPanScrollStart): Added for updating pan scrolling status of main frame.
1125         (WebCore::AutoscrollController::didPanScrollStop): ditto
1126         (WebCore::AutoscrollController::handleMouseReleaseEvent): Extracted from EventHandler.
1127         (WebCore::AutoscrollController::panScrollInProgress): Replacement of EventHandler::m_panScrollInProgress.
1128         (WebCore::AutoscrollController::startPanScrolling): Moved from EventHandler::startPanScrolling()
1129         (WebCore::AutoscrollController::autoscrollTimerFired): Moved from EventHandler::autoscrollTimerFired().
1130         (WebCore::AutoscrollController::startAutoscrollTimer): Moved from EventHandler::startAutoscrollTimer().
1131         (WebCore::AutoscrollController::updatePanScrollState): Moved from EventHandler::updatePanScrollState().
1132         * page/AutoscrollController.h: Added.
1133         (AutoscrollController):
1134         * page/EventHandler.cpp:
1135         (WebCore::EventHandler::EventHandler): Changed autoscroll and panscroll related member variable initializations to m_autoscrollController initialization.
1136         (WebCore::EventHandler::handleMouseDraggedEvent): Changed to call AutoscrollController::startAutoscrollForSelection().
1137         (WebCore::EventHandler::handleMouseReleaseEvent): Changed to remove m_autoscrollInProgress reference.
1138         (WebCore::EventHandler::didPanScrollStart): Added for updating pan scrolling status of main frame.
1139         (WebCore::EventHandler::didPanScrollStop): ditto
1140         (WebCore::EventHandler::startPanScrolling): Changed to call AutoscrollController::startPanScrolling().
1141         (WebCore::EventHandler::autoscrollRenderer): Changed to use AutoscrollController.
1142         (WebCore::EventHandler::updateAutoscrollRenderer): ditto
1143         (WebCore::EventHandler::autoscrollInProgress): ditto
1144         (WebCore::EventHandler::panScrollInProgress): Added to replace m_panScrollInProgress.
1145         (WebCore::EventHandler::stopAutoscrollTimer): Changed to use AutoscrollController.
1146         (WebCore::EventHandler::selectCursor): Changed to use panScrollInProgress().
1147         (WebCore::EventHandler::handleMousePressEvent): Chagned to call AutoscrollController::handleMousePressEvent().
1148         (WebCore::EventHandler::keyEvent): Changed to use panScrollInProgress().
1149         * page/EventHandler.h:
1150         (WebCore::EventHandler::autoscrollController): Added for using main frame's panScrollInProgress().
1151         (WebCore::EventHandler::mouseDownWasInSubframe): Added for AutoscrollController.
1152         * rendering/RenderBox.cpp:
1153         (WebCore::RenderBox::canAutoscroll): Moved from EventHandler.cpp.
1154         (WebCore::RenderBox::findAutoscrollable): Moved from EventHandler.cpp.
1155         * rendering/RenderBox.h:
1156         (RenderBox): Added new functions canAutoscroll() and findAutoscrollable().
1157
1158 2012-12-14  David Dorwin  <ddorwin@chromium.org>
1159
1160         EME v0.1: Report defaultURL in KeyMessage.
1161         https://bugs.webkit.org/show_bug.cgi?id=104284
1162
1163         Reviewed by Darin Fisher.
1164
1165         Passes defaultURL down from the media engine to HTMLMediaElement.
1166         Only Valid URLs will be passed.
1167
1168         No test because Clear Key does not provide a defaultURL (in v0.1).
1169
1170         * html/HTMLMediaElement.cpp:
1171         (WebCore::HTMLMediaElement::mediaPlayerKeyMessage):
1172         * html/HTMLMediaElement.h:
1173         (HTMLMediaElement):
1174         * platform/graphics/MediaPlayer.cpp:
1175         (WebCore::MediaPlayer::keyMessage):
1176         * platform/graphics/MediaPlayer.h:
1177         (WebCore::MediaPlayerClient::mediaPlayerKeyAdded):
1178         (WebCore::MediaPlayerClient::mediaPlayerKeyError):
1179         (WebCore::MediaPlayerClient::mediaPlayerKeyMessage):
1180         (WebCore::MediaPlayerClient::mediaPlayerKeyNeeded):
1181         (MediaPlayer):
1182
1183 2012-12-13  Hajime Morrita  <morrita@google.com>
1184
1185         ContentDistributor and ShadowRootContentDistributionData should use RefPtr to hold elements.
1186         https://bugs.webkit.org/show_bug.cgi?id=104918
1187
1188         Reviewed by Kentaro Hara.
1189
1190         This change turns some raw pointers to RefPtrs.
1191
1192         No new tests. Hard to write reliable fast tests since the error
1193         reproduction needs GC to run in certain timing. Although original
1194         report has a repdocution, it takes a few seconds before crash and
1195         isn't suited for a layout test.
1196
1197         * dom/ShadowRoot.cpp:
1198         (WebCore::ShadowRoot::insertionPointList):
1199         * dom/ShadowRoot.h:
1200         (ShadowRoot):
1201         * html/shadow/ContentDistributor.cpp:
1202         (WebCore::ShadowRootContentDistributionData::ensureInsertionPointList):
1203         (WebCore::ContentDistributor::findInsertionPointFor):
1204         (WebCore::ContentDistributor::distribute):
1205         (WebCore::ContentDistributor::invalidate):
1206         * html/shadow/ContentDistributor.h:
1207         (ShadowRootContentDistributionData):
1208         (ContentDistributor):
1209
1210 2012-12-13  Hajime Morrita  <morrita@google.com>
1211
1212         NodeRenderingContext is slow due to ComposedShadowTreeWalker
1213         https://bugs.webkit.org/show_bug.cgi?id=104332
1214
1215         Reviewed by Dimitri Glazkov.
1216
1217         NodeRenderingContext has some slowness due to the complexity of
1218         ComposedShadowTreeWalker that NRC relies on. This change
1219         creates some fast paths to address such slowness.
1220
1221         = NodeRenderingTraversal module:
1222
1223         This change introduces NodeRenderingTraversal namespace, a sister
1224         of NodeTraversal. NRT consists of a set of tree traversal
1225         functions that is responsible for traversal in NRC.  Before this
1226         change, NRC directly used CSTW. This NRT module hides and narrows
1227         the usage of CSTW.
1228
1229         - Traversals provided by NRT have fast paths. In many case, such traversals
1230           don't need to use CSTW and just goes to neighboring nodes in a plain DOM way.
1231         - It also handles NRC specific traversal concerns like pseudo elements.
1232           CSTW::pseudoAwareNextSibling() and CSTW::pseudoAwarePreviousSibling() are
1233           merged into this module.
1234         - CSTW::ParentTraversalDetails is moved and renamed to
1235           NRT::ParentDetails with small modification. This is a pure
1236           refactoring: As the name implies, This class is used only by NRC
1237           and used during a traversal there.
1238
1239         NodeRenderingTraversal is an isolation layer between generic DOM and CSTW. This hides CSTW
1240         behind the wall and will help further reduction of its usage.
1241
1242         = Node::NeedsShadowTreeWalkerFlag flag:
1243
1244         NRT fast path is enabled by newly introduced NeedsShadowTreeWalker
1245         node flag. Each DOM node is now markd as NeedsShadowTreeWalker if
1246         it requires non-trivial traversal in NRT which uses CSTW. This
1247         means that each node can go fast path unless it is marked with this flag.
1248
1249         A node is marked as it NeedsShadowTreeWalker if:
1250
1251         - The node is a shadow boundary like InsertionPoint or ShadowRoot,
1252         - The node has pseudo elements like generated content or
1253         - The node is a pseudo element.
1254
1255         This criteria is defined in Node::needsShadowTreeWalkerSlow(). The node actually needs
1256         the walker if the node or its parent is marked with this flag.
1257
1258         The original idea of this change was demonstrated by Antti Koivisto on bug 103208 and bug 104507.
1259         This chagne has 2-3% speedup on Dromaeo/dom-modify/innerHTML on Apple Mac.
1260
1261         No new tests. Covered by existing tests.
1262
1263         * CMakeLists.txt:
1264         * GNUmakefile.list.am:
1265         * Target.pri:
1266         * WebCore.gypi:
1267         * WebCore.xcodeproj/project.pbxproj:
1268         * dom/ComposedShadowTreeWalker.cpp:
1269         * dom/ComposedShadowTreeWalker.h:
1270         (ComposedShadowTreeWalker): Move some part to NodeRenderingTraversal
1271         * dom/ContainerNode.h:
1272         (WebCore::Node::needsShadowTreeWalker): Added. This is located here since it refers ContainerNode definition.
1273         (WebCore):
1274         * dom/DOMAllInOne.cpp:
1275         * dom/Element.cpp:
1276         (WebCore::Element::updatePseudoElement): Refactored.
1277         (WebCore::Element::hasPseudoElements): Ditto.
1278         (WebCore::Element::pseudoElement): Ditto.
1279         (WebCore::Element::setPseudoElement): Refactored and added a flag update logic.
1280         (WebCore):
1281         * dom/Element.h:
1282         (Element):
1283         (WebCore::Element::beforePseudoElement): Refactored.
1284         (WebCore::Element::afterPseudoElement): Refactored.
1285         * dom/ElementRareData.h:
1286         (WebCore::ElementRareData::hasPseudoElements): Factored out.
1287         * dom/ElementShadow.cpp:
1288         (WebCore::ElementShadow::addShadowRoot): Added a flag update logic.
1289         * dom/Node.cpp:
1290         (WebCore::Node::needsShadowTreeWalkerSlow): Added.
1291         * dom/Node.h:
1292         (WebCore::Node::isInsertionPointNode): Added.
1293         (Node):
1294         (WebCore::Node::isInsertionPoint): Changed to use NeedsShadowTreeWalkerFlag.
1295         (WebCore::Node::setNeedsShadowTreeWalker):
1296         (WebCore::Node::resetNeedsShadowTreeWalker):
1297         * dom/NodeRenderingContext.cpp: Adopted NodeRenderingTraversal.
1298         (WebCore::NodeRenderingContext::NodeRenderingContext):
1299         (WebCore::NodeRenderingContext::nextRenderer):
1300         (WebCore::NodeRenderingContext::previousRenderer):
1301         (WebCore::NodeRenderingContext::parentRenderer):
1302         (WebCore::NodeRenderingContext::shouldCreateRenderer):
1303         * dom/NodeRenderingContext.h: Ditto.
1304         (NodeRenderingContext):
1305         (WebCore::NodeRenderingContext::parentNodeForRenderingAndStyle):
1306         * dom/NodeRenderingTraversal.cpp: Added.
1307         (WebCore):
1308         (NodeRenderingTraversal):
1309         (WebCore::NodeRenderingTraversal::ParentDetails::didTraverseInsertionPoint): Moved from ComposedShadowTreeWalker
1310         (WebCore::NodeRenderingTraversal::ParentDetails::didTraverseShadowRoot): Ditto.
1311         (WebCore::NodeRenderingTraversal::parentSlow): Ditto.
1312         (WebCore::NodeRenderingTraversal::nextSiblingSlow): Ditto. The original was pseudoAwareNextSibling.
1313         (WebCore::NodeRenderingTraversal::previousSiblingSlow): Ditto. The original was pseudoAwarePreviousSibling.
1314         * dom/NodeRenderingTraversal.h: Added.
1315         (WebCore):
1316         (NodeRenderingTraversal):
1317         (ParentDetails): Moved from ComposedShadowTreeWalker.
1318         (WebCore::NodeRenderingTraversal::ParentDetails::ParentDetails):
1319         (WebCore::NodeRenderingTraversal::ParentDetails::insertionPoint):
1320         (WebCore::NodeRenderingTraversal::ParentDetails::resetStyleInheritance):
1321         (WebCore::NodeRenderingTraversal::ParentDetails::outOfComposition):
1322         (WebCore::NodeRenderingTraversal::ParentDetails::childWasOutOfComposition):
1323         (WebCore::NodeRenderingTraversal::ParentDetails::operator==):
1324         (WebCore::NodeRenderingTraversal::parent):
1325         (WebCore::NodeRenderingTraversal::nextSibling):
1326         (WebCore::NodeRenderingTraversal::previousSibling):
1327         * dom/PseudoElement.cpp:
1328         (WebCore::PseudoElement::PseudoElement): Added an assertion.
1329         * dom/Text.cpp:
1330         * html/HTMLOptGroupElement.cpp: Added a #include which revealed by a chagne on NodeRenderingContext.h
1331         * html/HTMLOptionElement.cpp: Ditto.
1332         * html/HTMLProgressElement.cpp: Dito.
1333         * html/shadow/InsertionPoint.h: Added an override of isInsertionPointNode().
1334
1335 2012-12-13  Kent Tamura  <tkent@chromium.org>
1336
1337         Refactoring: Fix indentation of ChromeClient.h
1338         https://bugs.webkit.org/show_bug.cgi?id=104989
1339
1340         Reviewed by Kentaro Hara.
1341
1342         The contents of an outermost namespace block should not be indented.
1343         http://www.webkit.org/coding/coding-style.html#indentation-namespace
1344
1345         No behavior change.
1346
1347         * page/ChromeClient.h:
1348
1349 2012-12-13  Kunihiko Sakamoto  <ksakamoto@chromium.org>
1350
1351         Seconds/Minutes field of date/time input UI should respect step attribute
1352         https://bugs.webkit.org/show_bug.cgi?id=104985
1353
1354         Reviewed by Kent Tamura.
1355
1356         This patch makes step-up/-down UI of the seconds and minutes fields respect
1357         step attribute when possible.
1358
1359         Test: fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html
1360
1361         * html/shadow/DateTimeEditElement.cpp:
1362         (DateTimeEditBuilder):
1363         (WebCore::DateTimeEditBuilder::visitField): Compute step parameters for seconds and minutes fields, and pass it to the field element constructors.
1364         (WebCore::DateTimeEditBuilder::createNumericFieldParameters): Added.
1365         * html/shadow/DateTimeFieldElements.cpp:
1366         (WebCore::DateTimeMillisecondFieldElement::DateTimeMillisecondFieldElement): Use Parameters instead of step and stepBase.
1367         (WebCore::DateTimeMillisecondFieldElement::create): Ditto.
1368         (WebCore::DateTimeMinuteFieldElement::DateTimeMinuteFieldElement): Add Parameters argument.
1369         (WebCore::DateTimeMinuteFieldElement::create): Ditto.
1370         (WebCore::DateTimeSecondFieldElement::DateTimeSecondFieldElement): Ditto.
1371         (WebCore::DateTimeSecondFieldElement::create): Ditto.
1372         * html/shadow/DateTimeFieldElements.h:
1373         (DateTimeMillisecondFieldElement): Use Parameters instead of step and stepBase.
1374         (DateTimeMinuteFieldElement): Add Parameters argument.
1375         (DateTimeSecondFieldElement): Ditto.
1376         * html/shadow/DateTimeNumericFieldElement.cpp:
1377         (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement): Use Parameters instead of step and stepBase.
1378         * html/shadow/DateTimeNumericFieldElement.h:
1379         (DateTimeNumericFieldElement):
1380         (WebCore::DateTimeNumericFieldElement::Parameters::Parameters):
1381         (Parameters): Added.
1382
1383 2012-12-13  Filip Pizlo  <fpizlo@apple.com>
1384
1385         Attempt to rationalize and simplify WTF::binarySearch
1386         https://bugs.webkit.org/show_bug.cgi?id=104890
1387
1388         Reviewed by Maciej Stachowiak.
1389
1390         Switch to using the new binarySearch() API. No change in behavior, so no new tests.
1391
1392         * svg/animation/SVGSMILElement.cpp:
1393         (WebCore::SVGSMILElement::findInstanceTime):
1394
1395 2012-12-13  Takashi Sakamoto  <tasak@google.com>
1396
1397         [Shadow DOM]: scoped styles are not applied in the cascade order.
1398         https://bugs.webkit.org/show_bug.cgi?id=103239
1399
1400         Reviewed by Dimitri Glazkov.
1401
1402         If the scoping elements of two declarations have an ancestor/
1403         descendant relationship, the declaration whose scoping element is
1404         the descendant should win.
1405         c.f. http://dev.w3.org/csswg/css3-cascade/#cascade
1406
1407         Test: fast/css/style-scoped/style-scoped-nested.html
1408               fast/css/style-scoped/style-scoped-with-important-rule.html
1409
1410         * css/RuleSet.cpp:
1411         (WebCore::RuleSet::addRule):
1412         Removed specificity for @host @-rules. Now @host @-rules use the
1413         cascading order instead.
1414         * css/RuleSet.h:
1415         Removed increaseSpecificity. The method is used by only @host @-rules.
1416         * css/StyleResolver.cpp:
1417         (WebCore::StyleResolver::matchScopedAuthorRules):
1418         (WebCore::StyleResolver::matchHostRules):
1419         (WebCore::StyleResolver::matchAuthorRules):
1420         Modified to invoke sortAndTransferMatchedRules per scoping element.
1421         The order of "matchXXXRules" must be the same as the cascading order.
1422         So matchHostRules was invoked after collecting all scoped author rules.
1423         * css/StyleScopeResolver.cpp:
1424         (WebCore::StyleScopeResolver::addHostRule):
1425         Removed RuleIsHostRule. We don't need the flag.
1426         * html/HTMLStyleElement.cpp:
1427         (WebCore::HTMLStyleElement::registerWithScopingNode):
1428         Needs to pass the last test case of style-scoped-nested.html.
1429         When appending some style element to a shadow root, we should recalc
1430         styles of all elements in the shadow dom tree. And if the style
1431         element has @host @-rules, we have to update the host's style.
1432
1433 2012-12-13  Filip Pizlo  <fpizlo@apple.com>
1434
1435         MediaPlayerPrivateAVFoundation::m_inbandTrackConfigurationPending is unused except when HAVE(AVFOUNDATION_TEXT_TRACK_SUPPORT)
1436         https://bugs.webkit.org/show_bug.cgi?id=104987
1437
1438         Rubber stamped by Michael Saboff.
1439
1440         No change in behavior so no new tests.
1441
1442         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1443         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
1444         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1445         (MediaPlayerPrivateAVFoundation):
1446
1447 2012-12-13  Kentaro Hara  <haraken@chromium.org>
1448
1449         Unreviewed. Rebaselined run-bindings-tests results.
1450
1451         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
1452         (JSTestCustomNamedGetter):
1453         * bindings/scripts/test/JS/JSTestEventTarget.h:
1454         (JSTestEventTarget):
1455
1456 2012-12-13  Yoshifumi Inoue  <yosin@chromium.org>
1457
1458         Unreviewed, rolling out r137691.
1459         http://trac.webkit.org/changeset/137691
1460         https://bugs.webkit.org/show_bug.cgi?id=104764
1461
1462         panscroll test on AppleWin failed
1463
1464         * CMakeLists.txt:
1465         * GNUmakefile.list.am:
1466         * Target.pri:
1467         * WebCore.gypi:
1468         * WebCore.vcproj/WebCore.vcproj:
1469         * WebCore.xcodeproj/project.pbxproj:
1470         * page/AutoscrollController.cpp: Removed.
1471         * page/AutoscrollController.h: Removed.
1472         * page/EventHandler.cpp:
1473         (WebCore):
1474         (WebCore::EventHandler::EventHandler):
1475         (WebCore::canAutoscroll):
1476         (WebCore::EventHandler::handleMouseDraggedEvent):
1477         (WebCore::EventHandler::handleMouseReleaseEvent):
1478         (WebCore::EventHandler::handleAutoscroll):
1479         (WebCore::EventHandler::autoscrollTimerFired):
1480         (WebCore::EventHandler::startPanScrolling):
1481         (WebCore::EventHandler::updatePanScrollState):
1482         (WebCore::EventHandler::autoscrollRenderer):
1483         (WebCore::EventHandler::updateAutoscrollRenderer):
1484         (WebCore::EventHandler::setAutoscrollRenderer):
1485         (WebCore::EventHandler::startAutoscrollTimer):
1486         (WebCore::EventHandler::stopAutoscrollTimer):
1487         (WebCore::EventHandler::selectCursor):
1488         (WebCore::EventHandler::handleMousePressEvent):
1489         (WebCore::EventHandler::keyEvent):
1490         * page/EventHandler.h:
1491         (EventHandler):
1492         (WebCore::EventHandler::autoscrollInProgress):
1493         * rendering/RenderBox.cpp:
1494         * rendering/RenderBox.h:
1495         (RenderBox):
1496
1497 2012-12-13  Kentaro Hara  <haraken@chromium.org>
1498
1499         ChildNodesLazySnapshot::nextNode() can crash
1500         https://bugs.webkit.org/show_bug.cgi?id=104982
1501
1502         Reviewed by Hajime Morita.
1503
1504         ChildNodesLazySnapshot::nextNode() can crash for
1505         fast/dom/insertedIntoDocument-no-crash.html.
1506         The root cause is that ChildNodesLazySnapshot::m_currentNode
1507         was not a RefPtr. This patch changes it to a RefPtr.
1508
1509         Test: fast/dom/insertedIntoDocument-no-crash.html
1510
1511         * dom/ContainerNode.h:
1512         (WebCore::ChildNodesLazySnapshot::nextNode):
1513         (WebCore::ChildNodesLazySnapshot::takeSnapshot):
1514         (ChildNodesLazySnapshot):
1515
1516 2012-12-13  Philip Rogers  <pdr@google.com>
1517
1518         Clear m_timeContainer on SVGSMILElement removal.
1519         https://bugs.webkit.org/show_bug.cgi?id=104972
1520
1521         Reviewed by Abhishek Arya.
1522
1523         This patch fixes a regression introduced by r137509 where we did not clear
1524         m_timeContainer in SVGSMILElement::removedFrom.
1525
1526         Test: svg/custom/removed-from-animation-crash.html
1527
1528         * svg/animation/SVGSMILElement.cpp:
1529         (WebCore::SVGSMILElement::removedFrom):
1530
1531 2012-12-13  Filip Pizlo  <fpizlo@apple.com>
1532
1533         Named lookups on HTML documents produce inconsistent results in JavaScriptCore bindings
1534         https://bugs.webkit.org/show_bug.cgi?id=104623
1535
1536         Reviewed by Geoffrey Garen.
1537
1538         All DOM objects that have named getters or directly override getOwnPropertySlot are now marked as
1539         HasImpureGetOwnPropertySlot.
1540
1541         Tests: fast/js/prototype-chain-caching-with-impure-get-own-property-slot-traps
1542                fast/js/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps
1543
1544         * bindings/scripts/CodeGeneratorJS.pm:
1545         (GenerateHeader):
1546
1547 2012-12-13  Xianzhu Wang  <wangxianzhu@chromium.org>
1548
1549         Out-of-view check of fixed position element in frame is incorrect when page is scaled
1550         https://bugs.webkit.org/show_bug.cgi?id=104943
1551
1552         Reviewed by Simon Fraser.
1553
1554         Use frameScaleFactor instead of pageScaleFactor to scale the layer bounds.
1555
1556         Tests: compositing/layer-creation/fixed-position-out-of-view-scaled-iframe-scroll.html
1557                compositing/layer-creation/fixed-position-out-of-view-scaled-iframe.html
1558
1559         * rendering/RenderLayerCompositor.cpp:
1560         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1561
1562 2012-12-13  Bear Travis  <betravis@adobe.com>
1563
1564         Positioned replaced elements should resolve vertical margins against their containing
1565         block's logical width
1566         https://bugs.webkit.org/show_bug.cgi?id=103579
1567
1568         Reviewed by Emil A Eklund.
1569
1570         According to the CSS box model & writing modes specifications, percentage margin
1571         & padding values, including top & bottom, should be resolved based on the
1572         containing block's logical width (logical with respect to the containing block's
1573         writing mode).
1574         http://www.w3.org/TR/CSS2/box.html#margin-properties
1575         http://dev.w3.org/csswg/css3-writing-modes/#dimension-mapping
1576
1577         Previously, a positioned replaced element resolved margin before/after relative to
1578         its inline direction (containerLogicalHeight), and margin start/end relative to
1579         its block direction (containerLogicalWidth). This patch measures the container's
1580         logical width in its own inline direction (containerRelativeLogicalWidth) to
1581         resolve all margin percentage values.
1582
1583         Test: fast/writing-mode/percentage-margins-absolute-replaced.html
1584
1585         * rendering/RenderBox.cpp:
1586         (WebCore::RenderBox::computePositionedLogicalWidthReplaced): Calculate the logical
1587         width of the container, and use it to calculate margins.
1588         (WebCore::RenderBox::computePositionedLogicalHeightReplaced): Ditto.
1589
1590 2012-12-13  Yoshifumi Inoue  <yosin@chromium.org>
1591
1592         Handling autoscroll in EventHandler should be re-factor
1593         https://bugs.webkit.org/show_bug.cgi?id=104764
1594
1595         Reviewed by Hajime Morita.
1596
1597         This patch introduces new class AutoscrollController for moving autoscroll
1598         and panscroll from EventHandler class for ease of maintenance of
1599         EventHandler and ease of adding autoscroll related features, e.g. autoscroll
1600         during drag-and-drop, autoscoll by gesture.
1601
1602         No new tests. This patch doesn't change behavior.
1603
1604         * CMakeLists.txt: Changed to add page/AutoscrollController.cpp
1605         * GNUmakefile.list.am:  Changed to add page/AutoscrollController.{cpp,h}
1606         * Target.pri:  Changed to add page/AutoscrollController.cpp
1607         * WebCore.gypi: Changed to add page/AutoscrollController.{cpp,h}
1608         * WebCore.vcproj/WebCore.vcproj: Changed to add page/AutoscrollController.{cpp,h}
1609         * WebCore.xcodeproj/project.pbxproj: Changed to add page/AutoscrollController.{cpp,h}
1610         * page/AutoscrollController.cpp: Added.
1611         (WebCore::getMainFrame): Helper function.
1612         (WebCore::AutoscrollController::AutoscrollController): Moved from EventHandler.
1613         (WebCore::AutoscrollController::autoscrollRenderer): Moved from EventHandler.
1614         (WebCore::AutoscrollController::autoscrollInProgress): Moved from EventHandler.
1615         (WebCore::AutoscrollController::startAutoscrollForSelection): Replacement of EventHandler::handleAutoscroll().
1616         (WebCore::AutoscrollController::stopAutoscrollTimer): Moveed from EventHandler.
1617         (WebCore::AutoscrollController::updateAutoscrollRenderer): ditto
1618         (WebCore::AutoscrollController::didPanScrollStart): Added for updating pan scrolling status of main frame.
1619         (WebCore::AutoscrollController::didPanScrollStop): ditto
1620         (WebCore::AutoscrollController::handleMouseReleaseEvent): Extracted from EventHandler.
1621         (WebCore::AutoscrollController::panScrollInProgress): Replacement of EventHandler::m_panScrollInProgress.
1622         (WebCore::AutoscrollController::startPanScrolling): Moved from EventHandler::startPanScrolling()
1623         (WebCore::AutoscrollController::autoscrollTimerFired): Moved from EventHandler::autoscrollTimerFired().
1624         (WebCore::AutoscrollController::startAutoscrollTimer): Moved from EventHandler::startAutoscrollTimer().
1625         (WebCore::AutoscrollController::updatePanScrollState): Moved from EventHandler::updatePanScrollState().
1626         * page/AutoscrollController.h: Added.
1627         (AutoscrollController):
1628         * page/EventHandler.cpp:
1629         (WebCore::EventHandler::EventHandler): Changed autoscroll and panscroll related member variable initializations to m_autoscrollController initialization.
1630         (WebCore::EventHandler::handleMouseDraggedEvent): Changed to call AutoscrollController::startAutoscrollForSelection().
1631         (WebCore::EventHandler::handleMouseReleaseEvent): Changed to remove m_autoscrollInProgress reference.
1632         (WebCore::EventHandler::didPanScrollStart): Added for updating pan scrolling status of main frame.
1633         (WebCore::EventHandler::didPanScrollStop): ditto
1634         (WebCore::EventHandler::startPanScrolling): Changed to call AutoscrollController::startPanScrolling().
1635         (WebCore::EventHandler::autoscrollRenderer): Changed to use AutoscrollController.
1636         (WebCore::EventHandler::updateAutoscrollRenderer): ditto
1637         (WebCore::EventHandler::autoscrollInProgress): ditto
1638         (WebCore::EventHandler::panScrollInProgress): Added to replace m_panScrollInProgress.
1639         (WebCore::EventHandler::stopAutoscrollTimer): Changed to use AutoscrollController.
1640         (WebCore::EventHandler::selectCursor): Changed to use panScrollInProgress().
1641         (WebCore::EventHandler::handleMousePressEvent): Chagned to call AutoscrollController::handleMousePressEvent().
1642         (WebCore::EventHandler::keyEvent): Changed to use panScrollInProgress().
1643         * page/EventHandler.h:
1644         (WebCore::EventHandler::autoscrollController): Added for using main frame's panScrollInProgress().
1645         (WebCore::EventHandler::mouseDownWasInSubframe): Added for AutoscrollController.
1646         * rendering/RenderBox.cpp:
1647         (WebCore::RenderBox::canAutoscroll): Moved from EventHandler.cpp.
1648         (WebCore::RenderBox::findAutoscrollable): Moved from EventHandler.cpp.
1649         * rendering/RenderBox.h:
1650         (RenderBox): Added new functions canAutoscroll() and findAutoscrollable().
1651
1652 2012-12-13  Beth Dakin  <bdakin@apple.com>
1653
1654         https://bugs.webkit.org/show_bug.cgi?id=102599
1655         ASSERT loading Acid3 test in run-safari --debug (r135050)
1656
1657         Reviewed by Simon Fraser.
1658
1659         New flag IncludeCompositedDescendants will always calculate the layer bounds for 
1660         descendants, even when the are composited. 
1661         * rendering/RenderLayer.cpp:
1662         (WebCore::RenderLayer::calculateLayerBounds):
1663         * rendering/RenderLayer.h:
1664
1665         calculateCompositedBounds() should not include this new flag, so instead of 
1666         calling that, call calculateLayerBounds() directly with the 
1667         IncludeCompositedDescendants flag. This will get us the information we need 
1668         upfront and avoid the toggling later on. 
1669         * rendering/RenderLayerCompositor.cpp:
1670         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1671
1672 2012-12-13  Tien-Ren Chen  <trchen@chromium.org>
1673
1674         Don't consider container nodes of other disambiguated nodes
1675         https://bugs.webkit.org/show_bug.cgi?id=104619
1676
1677         Reviewed by Eric Seidel.
1678
1679         It is not uncommon to have a clickable <div> that contains other clickable objects.
1680         This heuristic avoids excessive disambiguation in that case.
1681
1682         New unit test: WebFrameTest.DisambiguationPopupNoContainer
1683
1684         * page/TouchDisambiguation.cpp:
1685         (WebCore::findGoodTouchTargets):
1686
1687 2012-12-13  Adrienne Walker  <enne@chromium.org>
1688
1689         Unreviewed, rolling out r137645, r137646, and r137667.
1690         http://trac.webkit.org/changeset/137645
1691         http://trac.webkit.org/changeset/137646
1692         http://trac.webkit.org/changeset/137667
1693         https://bugs.webkit.org/show_bug.cgi?id=104911
1694
1695         Breaks some overflow layout tests
1696
1697         * rendering/RenderLayer.cpp:
1698         (WebCore::RenderLayer::RenderLayer):
1699         (WebCore::RenderLayer::updateDescendantDependentFlags):
1700         (WebCore::RenderLayer::addChild):
1701         (WebCore::RenderLayer::removeChild):
1702         (WebCore::RenderLayer::usesCompositedScrolling):
1703         (WebCore::RenderLayer::scrollTo):
1704         (WebCore::RenderLayer::dirtyZOrderLists):
1705         (WebCore::RenderLayer::dirtyNormalFlowList):
1706         (WebCore::RenderLayer::updateLayerListsIfNeeded):
1707         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
1708         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
1709         (WebCore::RenderLayer::styleChanged):
1710         * rendering/RenderLayer.h:
1711         (RenderLayer):
1712         * rendering/RenderLayerBacking.cpp:
1713         (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
1714         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
1715         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1716         * rendering/RenderLayerBacking.h:
1717         (RenderLayerBacking):
1718         * rendering/RenderLayerCompositor.cpp:
1719         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1720         (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling):
1721         * rendering/RenderLayerCompositor.h:
1722         (RenderLayerCompositor):
1723         * testing/InternalSettings.cpp:
1724         * testing/InternalSettings.h:
1725         (InternalSettings):
1726         * testing/InternalSettings.idl:
1727
1728 2012-12-13  Andreas Kling  <akling@apple.com>
1729
1730         Event dispatch: Avoid heap allocations in ensureEventAncestors() typical case.
1731         <http://webkit.org/b/104938>
1732
1733         Reviewed by Anders Carlsson.
1734
1735         Give the EventTarget and EventContext vectors an inline capacity of 32 (no science here, just a
1736         non-zero number.) As these vectors are created on the stack already, this is merely using a bit
1737         more stack space to avoid malloc()ing all the gosh-darn time.
1738
1739         Looks like ~6% improvement on Dromaeo/jslib-event-prototype.
1740
1741         * dom/EventDispatcher.cpp:
1742         (WebCore::EventRelatedTargetAdjuster::adjust):
1743         (WebCore::EventRelatedTargetAdjuster::findRelatedTarget):
1744         (WebCore::EventDispatcher::ensureEventAncestors):
1745         * dom/EventDispatcher.h:
1746         (EventRelatedTargetAdjuster):
1747         (EventDispatcher):
1748
1749 2012-12-13  James Simonsen  <simonjam@chromium.org>
1750
1751         [Resource Timing] Don't report resources with data: urls
1752         https://bugs.webkit.org/show_bug.cgi?id=104868
1753
1754         Reviewed by Tony Gentilcore.
1755
1756         Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_data_url.html
1757
1758         * loader/cache/CachedResourceLoader.cpp:
1759         (WebCore::CachedResourceLoader::loadDone):
1760
1761 2012-12-13  Ian Vollick  <vollick@chromium.org>
1762
1763         Add a missing nullity check in RenderObject::containingBlock
1764         https://bugs.webkit.org/show_bug.cgi?id=104961
1765
1766         Reviewed by Adrienne Walker.
1767
1768         Adds a missing nullity check in an assert.
1769
1770         No new tests, no change in functionality.
1771
1772         * rendering/RenderObject.cpp:
1773         (WebCore::RenderObject::containingBlock):
1774
1775 2012-12-13  Tab Atkins  <tabatkins@google.com>
1776
1777         Switch the gradient drawing code to use bearing angles
1778         https://bugs.webkit.org/show_bug.cgi?id=104616
1779
1780         Reviewed by Dean Jackson.
1781
1782         Switch the gradient math from polar-coordinate angles to bearing angles.
1783         To make this possible without behavior changes, 
1784         switch the m_deprecatedType boolean to an m_gradientType enum,
1785         and fix all usages accordingly.
1786
1787         No new tests, as this is a refactoring and should have no behavior changes. Existing tests suffice.
1788
1789         * css/CSSGradientValue.cpp:
1790         (WebCore::endPointsFromAngle):
1791         This is the only mechanical change. The rest are just fixing the plumbing around the boolean->enum change.
1792
1793         * css/CSSGradientValue.cpp:
1794         (WebCore::CSSGradientValue::sortStopsIfNeeded):
1795         (WebCore::CSSGradientValue::addStops):
1796         (WebCore::CSSLinearGradientValue::customCssText):
1797         (WebCore::CSSLinearGradientValue::createGradient):
1798         (WebCore::CSSRadialGradientValue::customCssText):
1799         * css/CSSGradientValue.h:
1800         (WebCore::CSSGradientValue::gradientType):
1801         (WebCore::CSSGradientValue::CSSGradientValue):
1802         (WebCore::CSSLinearGradientValue::create):
1803         (WebCore::CSSLinearGradientValue::CSSLinearGradientValue):
1804         (WebCore::CSSRadialGradientValue::create):
1805         (WebCore::CSSRadialGradientValue::CSSRadialGradientValue):
1806         * css/CSSParser.cpp:
1807         (WebCore::CSSParser::parseDeprecatedGradient):
1808         (WebCore::CSSParser::parseDeprecatedLinearGradient):
1809         (WebCore::CSSParser::parseDeprecatedRadialGradient):
1810
1811 2012-12-13  Ian Vollick  <vollick@chromium.org>
1812
1813         [chromium] Automatically use composited scrolling
1814         https://bugs.webkit.org/show_bug.cgi?id=94743
1815
1816         Reviewed by Adrienne Walker.
1817
1818         We currently use the composited scrolling facilities provided by
1819         wkb.ug/91117 if the overflow scroll block element is styled with
1820         -webkit-overflow-scrolling: touch. Ideally, we could automatically
1821         opt into composited scrolling if it is safe to do so. This can affect
1822         antialiasing, so it is important that automatically opting in is only
1823         enabled via a setting.
1824
1825         The way I determine if it is safe is by checking that z-ordering will
1826         not be affected if the overflow scrollable element were promoted to a
1827         stacking context (details below), and that clipping our scrolling
1828         descendants will not affect rendering.
1829
1830         To check the first condition (that z-ordering will not be affected).
1831         I ensure that the candidate element and all its descendants appear as a 
1832         continuous block in the candidate's stacking context. That is, if no 
1833         other elements are 'between' any of the candidates descendants when we
1834         sort in paint order, then we're safe. This is overly conservative,
1835         however. We could, in future, only consider stacking problems between
1836         elements that actually overlap.
1837
1838         To ensure that clipping will not cause a rendering change, I ensure
1839         that the layer has no out of flow positioned descendant whose
1840         containing block is not also a descendant of ours.
1841
1842         Test: compositing/overflow/automatically-opt-into-compositing-scrolling.html
1843
1844         (WebCore):
1845         * rendering/RenderLayer.cpp:
1846         (WebCore::RenderLayer::RenderLayer):
1847         (WebCore::RenderLayer::acceleratedCompositingForOverflowScrollEnabled):
1848         (WebCore):
1849         (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder):
1850         (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrderRecursive):
1851         (WebCore::RenderLayer::positionOverflowControlsAfterPromotionToCompositedScrolling):
1852         (WebCore::RenderLayer::canSafelyEstablishAStackingContext):
1853           Returns true if the RenderLayer could become a stacking context without
1854           affecting the stacking order.
1855         (WebCore::RenderLayer::updateDescendantDependentFlags):
1856           We now need to keep track of out of flow positioned descendants.
1857         (WebCore::RenderLayer::addChild):
1858         (WebCore::RenderLayer::removeChild):
1859         (WebCore::RenderLayer::usesCompositedScrolling):
1860           Has been updated to return true if it can safely establish a stacking
1861           context, and the setting is turned on.
1862         (WebCore::RenderLayer::needsCompositedScrolling):
1863           This function returns true if we would like to use composited
1864           scrolling.
1865         (WebCore::RenderLayer::updateNeedsCompositedScrolling):
1866         (WebCore::RenderLayer::scrollTo):
1867         (WebCore::RenderLayer::dirtyZOrderLists):
1868         (WebCore::RenderLayer::dirtyNormalFlowList):
1869           Since these could affect opting into composited scrolling, we must
1870           request that the RenderLayerCompositor reevaluate compositing.
1871         (WebCore::RenderLayer::updateLayerListsIfNeeded):
1872           We call updateCanSafelyEstablishStackingContext here, if necessary.
1873         (WebCore::RenderLayer::shouldBeNormalFlowOnly):
1874         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
1875           usesCompositedScrolling -> needsCompositedScrolling
1876         (WebCore::RenderLayer::setAncestorChainHasOutOfFlowPositionedDescendant):
1877         (WebCore::RenderLayer::dirtyAncestorChainHasOutOfFlowPositionedDescendantStatus):
1878         (WebCore::RenderLayer::updateOutOfFlowPositioned):
1879           Dirties and sets the out of flow positioned descendant state.
1880         (WebCore::RenderLayer::styleChanged):
1881         * rendering/RenderLayer.h:
1882         (RenderLayer):
1883         (WebCore::RenderLayer::hasOutOfFlowPositionedDescendant):
1884         * rendering/RenderLayerBacking.cpp:
1885         (WebCore::layerOrAncestorIsTransformedOrUsingCompositedScrolling):
1886         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
1887         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1888         (WebCore::RenderLayerBacking::hasUnpositionedOverflowControlsLayers):
1889         (WebCore):
1890         * rendering/RenderLayerBacking.h:
1891         (RenderLayerBacking):
1892         * rendering/RenderLayerCompositor.cpp:
1893         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1894           We now ensure that newly created overflow scroll controls get
1895           positioned.
1896         (WebCore::RenderLayerCompositor::requiresCompositingForOverflowScrolling):
1897         * rendering/RenderLayerCompositor.h:
1898         (WebCore::RenderLayerCompositor::setShouldReevaluateCompositingAfterLayout):
1899         * testing/InternalSettings.cpp:
1900         (WebCore::InternalSettings::setEnableCompositingForOverflowScroll):
1901           Allows enabling the setting in layout tests.
1902         (WebCore):
1903         * testing/InternalSettings.h:
1904         (InternalSettings):
1905         * testing/InternalSettings.idl:
1906
1907 2012-12-13  Ryosuke Niwa  <rniwa@webkit.org>
1908
1909         REGRESSION(r137406): NodeTraversal changes causing large renderer crash
1910         https://bugs.webkit.org/show_bug.cgi?id=104937
1911
1912         Reviewed by Antti Koivisto.
1913
1914         Add a null pointer check to exit early since ElementTraversal::next assumes a non-null pointer.
1915
1916         No new tests since I don't think this function is ever exposed to any ES5 bindings.
1917
1918         * editing/FrameSelection.cpp:
1919         (WebCore::scanForForm):
1920
1921 2012-12-13  David Grogan  <dgrogan@chromium.org>
1922
1923         IndexedDB: Improve error messages
1924         https://bugs.webkit.org/show_bug.cgi?id=104624
1925
1926         Reviewed by Tony Chang.
1927
1928         Add detail to error messages so that they are more helpful and can be
1929         traced back to a specific line of code.
1930
1931         Updated test: transaction-error.html
1932
1933         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1934         (WebCore::IDBDatabaseBackendImpl::CreateObjectStoreOperation::perform):
1935         (WebCore::IDBDatabaseBackendImpl::DeleteObjectStoreOperation::perform):
1936         (WebCore::IDBDatabaseBackendImpl::VersionChangeOperation::perform):
1937         (WebCore::IDBDatabaseBackendImpl::openConnection):
1938         (WebCore::IDBDatabaseBackendImpl::openConnectionWithVersion):
1939         (WebCore::IDBDatabaseBackendImpl::deleteDatabase):
1940         (WebCore::IDBDatabaseBackendImpl::close):
1941         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
1942         (WebCore::IDBFactoryBackendImpl::getDatabaseNames):
1943         (WebCore::IDBFactoryBackendImpl::deleteDatabase):
1944         (WebCore::IDBFactoryBackendImpl::open):
1945         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1946         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
1947         (WebCore::IDBObjectStoreBackendImpl::createIndex):
1948         (WebCore::IDBObjectStoreBackendImpl::CreateIndexOperation::perform):
1949         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
1950         (WebCore::IDBTransactionBackendImpl::abort):
1951         (WebCore::IDBTransactionBackendImpl::commit):
1952
1953 2012-12-13  Claudio Saavedra  <csaavedra@igalia.com>
1954
1955         [GTK] Safeguard against possible NULL-dereference
1956         https://bugs.webkit.org/show_bug.cgi?id=104931
1957
1958         Reviewed by Chris Fleizach.
1959
1960         This was spotted by Coverity. See bug 104114.
1961
1962         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1963         (webkitAccessibleGetIndexInParent): If parent is NULL
1964         bail out early.
1965
1966 2012-12-13  David Barton  <dbarton@mathscribe.com>
1967
1968         Heap-use-after-free in WebCore::RenderBlock::finishDelayUpdateScrollInfo
1969         https://bugs.webkit.org/show_bug.cgi?id=103750
1970
1971         Reviewed by Tony Chang.
1972
1973         MathML sometimes creates and destroys renderers for descendants during layout (or even to calculate
1974         preferred logical widths), e.g. for operator stretching. RenderBlock::finishDelayUpdateScrollInfo
1975         must therefore leave gDelayedUpdateScrollInfoSet intact as it iterates over it, so
1976         RenderBlock::willBeDestroyed can call gDelayedUpdateScrollInfoSet->remove(this) effectively if needed.
1977         This also prevents duplicate entries from being added to gDelayedUpdateScrollInfoSet.
1978
1979         Test: mathml/mo-stretch-crash.html
1980
1981         * rendering/RenderBlock.cpp:
1982         (WebCore::RenderBlock::startDelayUpdateScrollInfo):
1983             - Allow gDelayedUpdateScrollInfoSet to be non-null when gDelayUpdateScrollInfo is 0 during
1984               RenderBlock::finishDelayUpdateScrollInfo.
1985         (WebCore::RenderBlock::finishDelayUpdateScrollInfo):
1986             - Remove blocks from gDelayedUpdateScrollInfoSet one at a time, waiting for each block until it is
1987               about to be updated.
1988
1989 2012-12-13  Alexey Proskuryakov  <ap@apple.com>
1990
1991         <rdar://problem/12838354> Per-Tab WebProcess: DOM cookie access functions should respect private browsing
1992         https://bugs.webkit.org/show_bug.cgi?id=104691
1993
1994         Reviewed by Sam Weinig.
1995
1996         * platform/network/NetworkingContext.h: Added a function that returns current
1997         context type. Ideally, we would track contexts across processes in a generic manner,
1998         but we only have two now, and don't need such complications.
1999
2000 2012-12-13  Alexey Proskuryakov  <ap@apple.com>
2001
2002         ResourceLoader::didReceiveAuthenticationChallenge uses a wrong client
2003         https://bugs.webkit.org/show_bug.cgi?id=104935
2004         <rdar://problem/12870361>
2005
2006         Reviewed by Anders Carlsson.
2007
2008         * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
2009         The handle is null when NetworkProcess is used. In any case, it should be correct
2010         to use the client carried within AuthenticationChallenge.
2011
2012 2012-12-13  Stephen White  <senorblanco@chromium.org>
2013
2014         CanvasRenderingContext2D::setFont() is slow.
2015         https://bugs.webkit.org/show_bug.cgi?id=104923
2016
2017         Reviewed by James Robinson.
2018
2019         This spends most of its time in the CSS parser.  As a first step,
2020         early-out if the new value is the same as unparsed string for the current font.
2021         See also http://code.google.com/p/chromium/issues/detail?id=164016.
2022
2023         Covered by existing tests in canvas/ and fast/canvas, and ManualTests/canvas-font-speed.html.
2024
2025         * html/canvas/CanvasRenderingContext2D.cpp:
2026         (WebCore::CanvasRenderingContext2D::setFont):
2027
2028 2012-12-13  Parth Patel  <parpatel@rim.com>, Max Feil <mfeil@rim.com>
2029
2030         Allow plugins to be disabled by shared library filename
2031         https://bugs.webkit.org/show_bug.cgi?id=101274
2032
2033         Reviewed by Antonio Gomes.
2034
2035         This fix makes PluginDatabase changes general so that other ports
2036         can use this mechanism if they wish.
2037
2038         Layout test not included with this patch because there
2039         is currently no framework within LayoutTests to allow calls
2040         from an external application via platform API code (such as the
2041         WebView API).
2042
2043         * plugins/PluginDatabase.cpp:
2044         (WebCore::PluginDatabase::fileExistsAndIsNotDisabled):
2045         (WebCore):
2046         (WebCore::PluginDatabase::getDeletedPlugins):
2047         (WebCore::PluginDatabase::removeDisabledPluginFile):
2048         (WebCore::PluginDatabase::addDisabledPluginFile):
2049         (WebCore::PluginDatabase::getPluginPathsInDirectories):
2050         * plugins/PluginDatabase.h:
2051         (PluginDatabase):
2052
2053 2012-12-13  Yongjun Zhang  <yongjun_zhang@apple.com>
2054
2055         Document will never be released when an Image is created inside unload event listener
2056         https://bugs.webkit.org/show_bug.cgi?id=104830
2057
2058         Reviewed by Darin Adler.
2059
2060         When setting src attribute to an Image object inside unload event listener, ImageLoader will
2061         mark it as load failure (by setting m_hasPendingErrorEvent to true) and the following call
2062         to updatedHasPendingEvent will ref the element but won't be deref-ed since the Document is
2063         being dismissed.  This was introduced in r131670.  To match pre r131670 behavior, we shouldn't
2064         trigger error event for image loading when the page is being dismissed.
2065
2066         No new tests, there is no visual change.  Manually tested to verify documents are released by
2067         using heap in Mac OS X.
2068
2069         * loader/ImageLoader.cpp:
2070         (WebCore::pageIsBeingDismissed): add a helper function to test whether the page is being dismissed.
2071         (WebCore::ImageLoader::updateFromElement): don't trigger error event if the page is being dismissed.
2072
2073 2012-12-13  Claudio Saavedra  <csaavedra@igalia.com>
2074
2075         [GTK] Add missing breaks in switch-case statements
2076         https://bugs.webkit.org/show_bug.cgi?id=104929
2077
2078         Reviewed by Martin Robinson.
2079
2080         * platform/gtk/ClipboardGtk.cpp:
2081         (WebCore::ClipboardGtk::clearData): Add missing breaks.
2082
2083 2012-12-13  Nate Chapin  <japhet@chromium.org>
2084
2085         Route main resource loads through the memory cache.
2086         https://bugs.webkit.org/show_bug.cgi?id=49246
2087
2088         Reviewed by Alexey Proskuryakov.
2089
2090         Note that this patch doesn't actually enable caching of main resources. That will be done in a later patch.
2091         The MainResourceLoader actually has an underlying SubresourceLoader (with the cache layer between them).
2092         In several places, the MainResourceLoader's SubresourceLoader is treated as special.
2093
2094         No new tests, as this is primarily a refactor. A couple of expected results changed slightly.
2095
2096         * loader/DocumentLoader.cpp:
2097         (WebCore::DocumentLoader::setRequest):
2098         (WebCore::DocumentLoader::subresource):
2099         (WebCore::DocumentLoader::addSubresourceLoader): Because the SubresourceLoader underlying the main resource
2100             needs special handling in certain cases, track it separately from the real SubresourceLoaders.
2101         (WebCore::DocumentLoader::removeSubresourceLoader):
2102         (WebCore::DocumentLoader::startLoadingMainResource):
2103         * loader/MainResourceLoader.cpp:
2104         (WebCore::MainResourceLoader::MainResourceLoader):
2105         (WebCore::MainResourceLoader::receivedError):
2106         (WebCore::MainResourceLoader::cancel):
2107         (WebCore::MainResourceLoader::clearResource):
2108         (WebCore):
2109         (WebCore::MainResourceLoader::frameLoader):
2110         (WebCore::MainResourceLoader::request):
2111         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
2112         (WebCore::MainResourceLoader::resourceData):
2113         (WebCore::MainResourceLoader::redirectReceived):
2114         (WebCore::MainResourceLoader::willSendRequest):
2115         (WebCore::MainResourceLoader::continueAfterContentPolicy):
2116         (WebCore::MainResourceLoader::responseReceived):
2117         (WebCore::MainResourceLoader::dataReceived):
2118         (WebCore::MainResourceLoader::didFinishLoading):
2119         (WebCore::MainResourceLoader::notifyFinished):
2120         (WebCore::MainResourceLoader::reportMemoryUsage):
2121         (WebCore::MainResourceLoader::handleSubstituteDataLoadNow):
2122         (WebCore::MainResourceLoader::load):
2123         (WebCore::MainResourceLoader::setDefersLoading):
2124         (WebCore::MainResourceLoader::defersLoading):
2125         (WebCore::MainResourceLoader::setShouldBufferData):
2126         (WebCore::MainResourceLoader::loader):
2127         (WebCore::MainResourceLoader::identifier):
2128         * loader/MainResourceLoader.h:
2129         (MainResourceLoader):
2130         (WebCore::MainResourceLoader::documentLoader):
2131         * loader/ResourceLoader.cpp:
2132         (WebCore::ResourceLoader::willSendRequest):
2133         * loader/ResourceLoader.h:
2134         (WebCore::ResourceLoader::defersLoading):
2135         (WebCore::ResourceLoader::cancelled):
2136         * loader/appcache/ApplicationCacheHost.cpp:
2137         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse):
2138         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError):
2139         * loader/mac/DocumentLoaderMac.cpp:
2140         (WebCore::DocumentLoader::schedule):
2141         (WebCore::DocumentLoader::unschedule):
2142
2143 2012-12-13  Pratik Solanki  <psolanki@apple.com>
2144
2145         Duplicate code in GraphicsContext3D::validateAttributes() and GraphicsContext3D::validateDepthStencil()
2146         https://bugs.webkit.org/show_bug.cgi?id=97275
2147
2148         Reviewed by Dean Jackson.
2149
2150         Remove duplicate code in validateAttributes(). validateAttributes() calls
2151         validateDepthStencil() which has the exact same code.
2152
2153         No new tests because no change in functionality.
2154
2155         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2156         (WebCore::GraphicsContext3D::validateAttributes):
2157
2158 2012-12-13  Nate Chapin  <japhet@chromium.org>
2159
2160         CachedResources should hang on to stripped fragment identifiers
2161         https://bugs.webkit.org/show_bug.cgi?id=104721
2162
2163         Reviewed by Maciej Stachowiak.
2164
2165         No new tests, this will be unused until bug
2166         https://bugs.webkit.org/show_bug.cgi?id=49246 re-lands. Then, it will
2167         allow http/tests/inspector/resource-parameters.html to continue passing.
2168
2169         * loader/cache/CachedResource.cpp:
2170         (WebCore::CachedResource::CachedResource):
2171         (WebCore::CachedResource::load):
2172         * loader/cache/CachedResource.h:
2173         (CachedResource):
2174         * loader/cache/CachedResourceLoader.cpp:
2175         (WebCore::CachedResourceLoader::requestResource): We override the request's url with the
2176             local variable "url" here. The only difference between url and request.url() is that url
2177             has had any fragment identifier removed. Do this work later (in the CachedResource constructor)
2178             so that the CachedResource can save the fragment for later.
2179
2180 2012-12-13  Claudio Saavedra  <csaavedra@igalia.com>
2181
2182         [GTK] Remove deprecated API usage
2183         https://bugs.webkit.org/show_bug.cgi?id=104894
2184
2185         Reviewed by Martin Robinson.
2186
2187         Remove deprecated GTK+ API usage.
2188
2189         * platform/gtk/RenderThemeGtk3.cpp:
2190         (WebCore::spinButtonArrowSize): Do not use deprecated
2191         gtk_style_context_get_font().
2192
2193 2012-12-13  Zeno Albisser  <zeno@webkit.org>
2194
2195         [Qt] Remove temporary workaround from GraphicsSurfaceGLX constructor.
2196         https://bugs.webkit.org/show_bug.cgi?id=104904
2197
2198         QXcbNativeInterface::nativeResourceForContext() is now
2199         available in Qt5. Therefore the temporary workaround
2200         in GraphicsSurfaceGLX can be removed.
2201
2202         Reviewed by Kenneth Rohde Christiansen.
2203
2204         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp:
2205         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
2206
2207 2012-12-13  Joanmarie Diggs  <jdiggs@igalia.com>
2208
2209         [GTK] Expose ARIA roles for tab, tabpanel and tablist
2210         https://bugs.webkit.org/show_bug.cgi?id=84043
2211
2212         Reviewed by Martin Robinson.
2213
2214         Mapped the ARIA roles to their corresponding ATK roles.
2215
2216         No new tests; instead unskipped the associated test.
2217
2218         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2219         (atkRole): Mapped the ARIA roles to their corresponding ATK roles
2220
2221 2012-12-13  Vivek Galatage  <vivek.vg@samsung.com>
2222
2223         Web Inspector: "Add Attribute" context menu on closing tag should apply on the opening tag on Elements Panel
2224         https://bugs.webkit.org/show_bug.cgi?id=104902
2225
2226         Reviewed by Alexander Pavlov.
2227
2228         The context menu action on the closing tag scrolls to the opening tag for adding the attribute.
2229
2230         No new tests as this is a UI change.
2231
2232         * inspector/front-end/ElementsTreeOutline.js:
2233         (WebInspector.ElementsTreeElement.prototype._populateTagContextMenu):
2234         (WebInspector.ElementsTreeElement.prototype._addNewAttribute):
2235
2236 2012-12-13  Sheriff Bot  <webkit.review.bot@gmail.com>
2237
2238         Unreviewed, rolling out r137512.
2239         http://trac.webkit.org/changeset/137512
2240         https://bugs.webkit.org/show_bug.cgi?id=104912
2241
2242         The entire GTK+ layout test step has been failing for hours
2243         (Requested by mrobinson on #webkit).
2244
2245         * accessibility/AccessibilityNodeObject.cpp:
2246         (WebCore::AccessibilityNodeObject::textUnderElement):
2247         * accessibility/AccessibilityRenderObject.cpp:
2248         (WebCore::AccessibilityRenderObject::textUnderElement):
2249
2250 2012-12-13  Tamas Czene  <tczene@inf.u-szeged.hu>
2251
2252         OpenCL version of FEColorMatrix.
2253         https://bugs.webkit.org/show_bug.cgi?id=103398
2254
2255         Reviewed by Zoltan Herczeg.
2256
2257         ~3x speed-up (depending on hardware configuration)
2258
2259         * Target.pri: Added a new file to the build system.
2260         * platform/graphics/filters/FEColorMatrix.cpp: calculateSaturateComponents and calculateHueRotateComponents methodes are moved to the header, since they are used by OpenCL as well
2261         (WebCore::effectType):
2262         * platform/graphics/filters/FEColorMatrix.h:
2263         (FEColorMatrix):
2264         (WebCore::FEColorMatrix::calculateSaturateComponents):
2265         (WebCore):
2266         (WebCore::FEColorMatrix::calculateHueRotateComponents):
2267         * platform/graphics/gpu/opencl/FilterContextOpenCL.h: Required fields for the ColorMatrix kernels were added
2268         (WebCore::FilterContextOpenCL::FilterContextOpenCL):
2269         (FilterContextOpenCL):
2270         * platform/graphics/gpu/opencl/OpenCLFEColorMatrix.cpp: the core implementation goes here
2271         (WebCore):
2272         (WebCore::FilterContextOpenCL::compileFEColorMatrix):
2273         (WebCore::FilterContextOpenCL::applyFEColorMatrix):
2274         (WebCore::FEColorMatrix::platformApplyOpenCL):
2275
2276 2012-12-13  Ilya Tikhonovsky  <loislo@chromium.org>
2277
2278         Web Inspector: Native Memory Instrumentation: do not validate pointers to objects in RenderArena agains tcmalloc data.
2279         https://bugs.webkit.org/show_bug.cgi?id=104903
2280
2281         Reviewed by Yury Semikhatsky.
2282
2283         This is a simplest approach to do that with zero performance overhead.
2284
2285         * inspector/InspectorResourceAgent.cpp:
2286         (WebCore::InspectorResourceAgent::reportMemoryUsage):
2287         * rendering/InlineBox.cpp:
2288         (WebCore::InlineBox::reportMemoryUsage):
2289         (WebCore):
2290         * rendering/InlineBox.h:
2291         (InlineBox):
2292         * rendering/InlineTextBox.cpp:
2293         (WebCore::InlineTextBox::reportMemoryUsage):
2294         (WebCore):
2295         * rendering/InlineTextBox.h:
2296         (InlineTextBox):
2297         * rendering/RenderLayer.cpp:
2298         (WebCore::RenderLayer::reportMemoryUsage):
2299         * rendering/RenderObject.cpp:
2300         (WebCore::RenderObject::reportMemoryUsage):
2301
2302 2012-12-13  Alberto Garcia  <agarcia@igalia.com>
2303
2304         [GTK] Don't leak GStaticRecMutex
2305         https://bugs.webkit.org/show_bug.cgi?id=104901
2306
2307         Reviewed by Martin Robinson.
2308
2309         The mutex in WebKitWebAudioSourceGStreamer is allocated using
2310         g_new(), but that memory is not freed when the object is
2311         destroyed.
2312
2313         This patch replaces that pointer with the structure itself, which
2314         is faster and doesn't need to be explicitly freed.
2315
2316         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
2317         (_WebKitWebAudioSourcePrivate):
2318         (webkit_web_audio_src_init):
2319         (webKitWebAudioSrcFinalize):
2320
2321 2012-12-13  Eugene Klyuchnikov  <eustas@chromium.org>
2322
2323         Web Inspector: Network: Sorting cookies by size is broken.
2324         https://bugs.webkit.org/show_bug.cgi?id=104893
2325
2326         Reviewed by Alexander Pavlov.
2327
2328         Problem: cookie "size" is not a field now; its value is accessible
2329         through getter method.
2330
2331         Solution: make cookie fields uniformly accessible (add getters for name,
2332         type and value).
2333
2334         * inspector/front-end/CookieItemsView.js: Adopt changes.
2335         * inspector/front-end/CookieParser.js:
2336         (WebInspector.Cookie): Refine JsDoc.
2337         (WebInspector.Cookie.prototype.name): Added getter.
2338         (WebInspector.Cookie.prototype.value): Ditto.
2339         (WebInspector.Cookie.prototype.type): Ditto.
2340         (WebInspector.Cookies.buildCookiesFromString): Adopt changes.
2341         (WebInspector.Cookies.buildCookieProtocolObject): Ditto.
2342         * inspector/front-end/CookiesTable.js:
2343         (WebInspector.CookiesTable): Remove unused parameter.
2344         (WebInspector.CookiesTable.prototype._sortCookies):
2345         Use getters instead of field names.
2346         (WebInspector.CookiesTable.prototype._createGridNode): Adopt changes.
2347         * inspector/front-end/HAREntry.js: Ditto.
2348         * inspector/front-end/RequestCookiesView.js: Ditto.
2349
2350 2012-12-13  Kentaro Hara  <haraken@chromium.org>
2351
2352         Unreviewed, rolling out r137569.
2353         http://trac.webkit.org/changeset/137569
2354         https://bugs.webkit.org/show_bug.cgi?id=104876
2355
2356         A bunch of CSS tests hit ASSERTs
2357
2358         * css/CSSProperty.h:
2359         (WebCore::CSSProperty::CSSProperty):
2360
2361 2012-12-13  Byungwoo Lee  <bw80.lee@samsung.com>
2362
2363         [EFL] Remove redundant pipe write to prevent pipe buffer full.
2364         https://bugs.webkit.org/show_bug.cgi?id=101135
2365
2366         Reviewed by Gyuyoung Kim.
2367
2368         To prevent a source of a deadlock, remove the redundant pipe write
2369         in wakeUp() function.
2370
2371         EFL uses ecore_pipe_write() to wake up main run loop, and the function
2372         uses POSIX pipe write with O_NONBLOCK disabled.
2373         With O_NONBLOCK disabled, when written data is more than PIPE_BUF,
2374         pipe write will be blocked until it can be written.
2375
2376         Currently, every wakeUp() function calls ecore_pipe_write() to invoke
2377         wakeUpEvent() callback. And this can make pipe buffer full status
2378         which is the one reason of the lockup problem described in Bug 99494.
2379
2380         * platform/RunLoop.h:
2381         (RunLoop):
2382         * platform/efl/RunLoopEfl.cpp:
2383         (WebCore::RunLoop::RunLoop):
2384         (WebCore::RunLoop::wakeUpEvent):
2385         (WebCore::RunLoop::wakeUp):
2386
2387 2012-12-13  Antti Harju  <antti.harju@ixonos.com>
2388
2389         [Qt] Fix deleteAllCookies() invalid SQL statement
2390         https://bugs.webkit.org/show_bug.cgi?id=101580
2391
2392         Reviewed by Jocelyn Turcotte.
2393
2394         * platform/network/qt/CookieJarQt.cpp:
2395         (WebCore::SharedCookieJarQt::deleteAllCookies):
2396
2397 2012-12-13  Ryosuke Niwa  <rniwa@webkit.org>
2398
2399         Safari spends a lot of time in WebCore::findSimpleWordBoundary while selecting text on large scrabutility.com page
2400         https://bugs.webkit.org/show_bug.cgi?id=104884
2401
2402         Reviewed by Hajime Morita.
2403
2404         We don't need to do anything in AlternativeTextController if selection is already outside of the editable region.
2405
2406         No new tests are added since this is only a performance improvement, and doesn't change any asymptotic behavior.
2407
2408         * editing/AlternativeTextController.cpp:
2409         (WebCore::AlternativeTextController::respondToChangedSelection):
2410
2411 2012-12-12  Jon Lee  <jonlee@apple.com>
2412
2413         Crash in PlugInOriginHash with empty MIME type (104882)
2414         https://bugs.webkit.org/show_bug.cgi?id=104882
2415         <rdar://problem/12872298>
2416
2417         Reviewed by Filip Pizlo.
2418
2419         The crash occurs because the strings might be null. Add a check for it, but also try to infer a MIME type
2420         in case the markup does not include a type attribute, but we can find it from the extension in the URL.
2421
2422         * platform/KURL.cpp: Add a new function mimeTypeFromURL() which tries to return the implied MIME type
2423         based on the URL provided. If nothing was found, return a null string.
2424         (WebCore::mimeTypeFromURL): Factored out from FrameLoader::defaultObjectContentType().
2425         * platform/KURL.h:
2426
2427         * loader/FrameLoader.cpp:
2428         (WebCore::FrameLoader::defaultObjectContentType): Refactor to use mimeTypeFromURL().
2429         * plugins/PlugInOriginHash.cpp:
2430         (WebCore::addCaseFoldedCharacters): Add a check for an empty string.
2431         (WebCore::PlugInOriginHash::hash): If the service type is empty, try to infer the MIME type.
2432
2433 2012-12-13  Christophe Dumez  <christophe.dumez@intel.com>
2434
2435         Regression(r137486): Broke EFL build
2436         https://bugs.webkit.org/show_bug.cgi?id=104883
2437
2438         Unreviewed EFL build fix.
2439
2440         Fix EFL build break after r137486 due to missing WebCore::
2441         namespace.
2442
2443         No new tests, no behavior change for layout tests.
2444
2445         * platform/NotImplemented.h:
2446
2447 2012-12-07  Levi Weintraub  <leviw@chromium.org>
2448
2449         Add support for tracking hit test rectangles to enable fast event rejection in the compositor
2450         https://bugs.webkit.org/show_bug.cgi?id=103914
2451
2452         Reviewed by Simon Fraser.
2453
2454         Adding support for tracking hit test target regions for the purpose of performing initial hit testing
2455         in the compositor to avoid blocking scrolling on the main thread while waiting to hit test events that
2456         aren't occuring in regions with handlers. This is initially being done to avoid having to go to the main
2457         thread when scrolling by flicking on touch devices when the flick occurs outside a tracked touch event
2458         region. This patch includes the implementation to turn this on in Chromium.
2459
2460         To accomplish this goal, Document will now keep a counted hash set of nodes with touch event handlers
2461         instead of only an unsigned integer of the total count. ScrollingCoordinator then updates the compositor
2462         when new touch event handlers are registered or removed, or after layout much like how
2463         nonFastScrollableRegions are currently tracked.
2464
2465         This implementation will not properly update the hit test rects when the renderers are inside a sub-
2466         tree that scrolls.
2467
2468         Test: platform/chromium/fast/events/touch/compositor-touch-hit-rects.html
2469
2470         * dom/Document.cpp:
2471         (WebCore::Document::Document): Added a HashCountedSet of touch target nodes. Note: DOMWindow targets
2472         are stored as the Document they point to.
2473         (WebCore::Document::didAddTouchEventHandler): Changed to keep track of the handler instead of a count, and
2474         to update the ScrollingCoordinator with the change.
2475         (WebCore::Document::didRemoveTouchEventHandler): Ditto.
2476         * dom/Document.h:
2477         (WebCore::Document::hasTouchEventHandlers): It's no longer O(1) to get the count of touch handlers, so
2478         expose whether there are any or not.
2479         (WebCore::Document::touchEventTargets):
2480         * dom/Node.cpp:
2481         (WebCore::Node::didMoveToNewDocument):
2482         (WebCore::tryAddEventListener):
2483         (WebCore::tryRemoveEventListener):
2484         * history/CachedFrame.cpp:
2485         (WebCore::CachedFrameBase::restore):
2486         * html/HTMLInputElement.cpp:
2487         (WebCore::HTMLInputElement::~HTMLInputElement):
2488         (WebCore::HTMLInputElement::updateType):
2489         * page/DOMWindow.cpp:
2490         (WebCore::DOMWindow::addEventListener): Add the Document to the touch target set instead of DOMWindow.
2491         (WebCore::DOMWindow::removeEventListener):
2492         * page/EventHandler.cpp:
2493         (WebCore::EventHandler::handleTouchEvent):
2494         * page/Frame.cpp:
2495         (WebCore::Frame::setDocument):
2496         * page/scrolling/ScrollingCoordinator.cpp:
2497         (WebCore::ScrollingCoordinator::computeAbsoluteTouchEventTargetRects): Walk the renderers for event handler
2498         nodes and generate the absolute hit testing rects.
2499         * page/scrolling/ScrollingCoordinator.h:
2500         (WebCore::ScrollingCoordinator::setTouchEventTargetRectsChanged): Hook to pass along the hit test rects to
2501         the scrolling tree/compositor.
2502         (ScrollingCoordinator):
2503         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
2504         (WebCore::ScrollingCoordinatorChromium::frameViewLayoutUpdated):
2505         (WebCore::ScrollingCoordinatorChromium::setTouchEventTargetRectsChanged):
2506         (WebCore::ScrollingCoordinatorChromium::setNonFastScrollableRegion):
2507         (WebCore::ScrollingCoordinatorChromium::setTouchEventTargetRects):
2508         * page/scrolling/chromium/ScrollingCoordinatorChromium.h:
2509         (ScrollingCoordinatorChromium):
2510         * testing/Internals.cpp:
2511         (WebCore::Internals::touchEventHandlerCount): Changed to do the work to calculate the actual count since
2512         it's no longer stored as an int in Document.
2513         (WebCore::Internals::touchEventTargetClientRects):
2514         * testing/Internals.h:
2515         (Internals):
2516         * testing/Internals.idl:
2517
2518 2012-12-12  Luke Macpherson   <macpherson@chromium.org>
2519
2520         Add ASSERTions to ensure that CSSPropertys that are variables only ever refer to CSSValues that are variables.
2521         https://bugs.webkit.org/show_bug.cgi?id=104876
2522
2523         Reviewed by Steve Block.
2524
2525         Add assertions to CSSProperty constructors to make that if it is initialized with CSSPropertyVariable that
2526         the value type associated with it is also a variable. This is already asserted at read time, but ASSERTing
2527         here will produce a more useful backtrace.
2528
2529         No new tests as functionality unchanged.
2530
2531         * css/CSSProperty.h:
2532         (WebCore::CSSProperty::CSSProperty):
2533
2534 2012-12-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2535
2536         NetworkInfoController needs to support destructor
2537         https://bugs.webkit.org/show_bug.cgi?id=104642
2538
2539         Reviewed by Kentaro Hara.
2540
2541         Though NetworkInfoController can be referenced by each port in order to update network status change,
2542         there is no virtual interface to destroy it. Beside each port client also needs to be destroyed when
2543         controller is destroyed.
2544
2545         * Modules/networkinfo/NetworkInfoClient.h:
2546         (NetworkInfoClient):
2547         * Modules/networkinfo/NetworkInfoConnection.h:
2548         (WebCore::NetworkInfoConnection::networkInfoControllerDestroyed):
2549         * Modules/networkinfo/NetworkInfoController.cpp:
2550         (WebCore::NetworkInfoController::~NetworkInfoController):
2551
2552 2012-12-12  Kent Tamura  <tkent@chromium.org>
2553
2554         Validity of a radio button is not updated correctly when it is detached from an invalid radio group
2555         https://bugs.webkit.org/show_bug.cgi?id=104873
2556
2557         Reviewed by Kentaro Hara.
2558
2559         When a radio button is detached from an invalid radio group,
2560         A) we should update button's validity, and
2561         B) it should be valid.
2562
2563         A is handled by the following code in RadioButtonGroup::remove.
2564             if (!wasValid) {
2565                 // A radio button not in a group is always valid. We need to make it
2566                 // valid only if the group was invalid.
2567                 button->setNeedsValidityCheck();
2568
2569         B was incomplete.
2570             bool RadioInputType::valueMissing(const String&) const
2571             {
2572                 return element()->isInRequiredRadioButtonGroup() && !element()->checkedRadioButtonForGroup();
2573         isInRequiredRadioButtonGroup checked required state of a group with the
2574         name attribute value even if the radio button was already detached from
2575         the group. isInRequiredRadioButtonGroup should check membership of the
2576         radio button precisely.
2577
2578         Tests: Update fast/forms/radio/radio-live-validation-style.html
2579
2580         * dom/CheckedRadioButtons.cpp:
2581         (RadioButtonGroup): Declare contains.
2582         (WebCore::RadioButtonGroup::contains): Added.
2583         (WebCore::CheckedRadioButtons::isInRequiredGroup): Renamed from
2584         isRequiredGroup. This function takes HTMLInputElement* argument.
2585         * dom/CheckedRadioButtons.h:
2586         (CheckedRadioButtons): Rename isRequiredGroup to isInRequiredGroup.
2587         * html/HTMLInputElement.cpp:
2588         (WebCore::HTMLInputElement::isInRequiredRadioButtonGroup):
2589         Make this non-const becaues RadioButtonGroup::m_members needs non-const
2590         pointers. Use CheckedRadioButtons::isInRequiredGroup.
2591         * html/HTMLInputElement.h:
2592         (HTMLInputElement): Make isInRequiredRadioButtonGroup non-const.
2593
2594 2012-12-12  Shinya Kawanaka  <shinyak@chromium.org>
2595
2596         ContainerNodeAlgorithm::notifyInsertedIntoDocument is not used
2597         https://bugs.webkit.org/show_bug.cgi?id=104874
2598
2599         Reviewed by Hajime Morita.
2600
2601         ContainerNodeAlgorithm::notifyInsertedIntoDocument() is not used by anyone. We can remove it safely.
2602
2603         No new tests, no change in behavior.
2604
2605         * dom/ContainerNodeAlgorithms.h:
2606
2607 2012-12-12  Kunihiko Sakamoto  <ksakamoto@chromium.org>
2608
2609         Milliseconds field of date/time input UI should respect step attribute
2610         https://bugs.webkit.org/show_bug.cgi?id=104628
2611
2612         Reviewed by Kent Tamura.
2613
2614         This patch makes step-up/-down UI of the milliseconds fields respect step attribute
2615         in a special case when the step is divisible by 1000 milliseconds.
2616
2617         Test: fast/forms/time-multiple-fields/time-multiple-fields-stepup-stepdown-from-renderer.html
2618
2619         * html/shadow/DateTimeEditElement.cpp:
2620         (WebCore::DateTimeEditBuilder::visitField):
2621         If step of the element (in milliseconds) is divisible by 1000, use it as the step of the milliseconds field. Otherwise, the millisecond field has step 1.
2622         * html/shadow/DateTimeFieldElements.cpp:
2623         (WebCore::DateTimeMillisecondFieldElement::DateTimeMillisecondFieldElement): Add step and stepBase arguments.
2624         (WebCore::DateTimeMillisecondFieldElement::create): Ditto.
2625         * html/shadow/DateTimeFieldElements.h:
2626         (DateTimeMillisecondFieldElement): Ditto.
2627         * html/shadow/DateTimeNumericFieldElement.cpp:
2628         (WebCore::DateTimeNumericFieldElement::DateTimeNumericFieldElement): Ditto.
2629         (WebCore::DateTimeNumericFieldElement::stepDown): Changed to compute next allowed value using roundDown().
2630         (WebCore::DateTimeNumericFieldElement::stepUp): Changed to compute next allowed value using roundUp().
2631         (WebCore::DateTimeNumericFieldElement::roundDown): Added.
2632         (WebCore::DateTimeNumericFieldElement::roundUp): Added.
2633         * html/shadow/DateTimeNumericFieldElement.h:
2634         (DateTimeNumericFieldElement): Add m_step and m_stepBase fields.
2635
2636 2012-12-12  Julien Chaffraix  <jchaffraix@webkit.org>
2637
2638         [CSS Grid Layout] Include paddings and borders into the grid element's logical height / width
2639         https://bugs.webkit.org/show_bug.cgi?id=104818
2640
2641         Reviewed by Tony Chang.
2642
2643         This change makes RenderGrid add the borders and paddings in the right direction during layout
2644         so that the grid element's size accounts them like any other renderer.
2645
2646         Test: fast/css-grid-layout/grid-element-padding-margin.html
2647
2648         * rendering/RenderGrid.cpp:
2649         (WebCore::RenderGrid::computePreferredLogicalWidths):
2650         (WebCore::RenderGrid::layoutGridItems):
2651
2652 2012-12-12  Roger Fong  <roger_fong@apple.com>
2653
2654         Include Apple Windows in GraphicsLayer::supportsBackgroundColorContent().
2655         https://bugs.webkit.org/show_bug.cgi?id=104852.
2656
2657         Reviewed by Simon Fraser.
2658
2659         * platform/graphics/GraphicsLayer.h:
2660         (WebCore::GraphicsLayer::supportsBackgroundColorContent):
2661
2662 2012-12-12  KyungTae Kim  <ktf.kim@samsung.com>
2663
2664         Unused parameters on TextureMapperImageBuffer.cpp
2665         https://bugs.webkit.org/show_bug.cgi?id=104857
2666
2667         Reviewed by Kentaro Hara.
2668
2669         The updateContents has unused parameter 'textureMapper',
2670         remove the parameter name to fix 'unused parameter' build warning. 
2671
2672         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2673         (WebCore::BitmapTextureImageBuffer::updateContents):
2674
2675 2012-12-12  Shinya Kawanaka  <shinyak@chromium.org>
2676
2677         [Shadow] HTMLContentElement::getDistributedNodes() doesn't work correctly if not in document tree.
2678         https://bugs.webkit.org/show_bug.cgi?id=104345
2679
2680         Reviewed by Hajime Morita.
2681
2682         Since document->updateLayout() does affect nodes in Document, distribution will not occur in
2683         InsertionPoints out of Document. We have to find the element in document tree scope, and start distribution from it.
2684
2685         Test: fast/dom/shadow/get-distributed-nodes-orphan.html
2686
2687         * html/shadow/InsertionPoint.cpp:
2688         (WebCore::InsertionPoint::getDistributedNodes):
2689
2690 2012-12-12  Patrick Gansterer  <paroga@webkit.org>
2691
2692         [WIN] Implement WebCore::fileSystemRepresentation() for !USE(CF)
2693         https://bugs.webkit.org/show_bug.cgi?id=104456
2694
2695         Reviewed by Brent Fulgham.
2696
2697         Convert the UTF-16 path to the system default Windows ANSI code page (usually Windows Latin1).
2698
2699         * platform/win/FileSystemWin.cpp:
2700         (WebCore::fileSystemRepresentation):
2701
2702 2012-12-12  No'am Rosenthal  <noam@webkit.org>
2703
2704         [Texmap] Remove lowp/highp indicators as they're not needed with ANGLE.
2705         https://bugs.webkit.org/show_bug.cgi?id=104707
2706
2707         Reviewed by Kenneth Rohde Christiansen.
2708
2709         lowp/highp indicator were needed for GLES2, but ANGLE does not require them.
2710
2711         Covered by existing tests.
2712
2713         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
2714         (WebCore::getShaderSpec):
2715
2716 2012-12-12  Andy Estes  <aestes@apple.com>
2717
2718         Don't dispatch fake mousemove events when we don't know where the cursor is
2719         https://bugs.webkit.org/show_bug.cgi?id=104861
2720
2721         Reviewed by Sam Weinig.
2722
2723         When EventHandler is instantiated or cleared, it sets the current mouse
2724         position to (0, 0), even though this is probably not where the mouse
2725         cursor really is (and we won't know until the mouse moves into the WebView).
2726         If a fake mousemove event fires and the page has an element at (0, 0)
2727         that responds to mousemove, we might end up changing the cursor or
2728         displaying a tooltip at the current mouse position, even if it is
2729         outside the WebView.
2730
2731         Fake mousemove events are dispatched in order to update a cursor that
2732         is already over the WebView. Don't dispatch the event if we don't know
2733         this to be true.
2734
2735         * page/EventHandler.cpp:
2736         (WebCore::EventHandler::EventHandler): Instantiate m_mousePositionIsUnknown to true.
2737         (WebCore::EventHandler::clear): Reset m_mousePositionIsUnknown to true.
2738         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoon): Return early if the mouse position is unknown.
2739         (WebCore::EventHandler::setLastKnownMousePosition): Set the mouse position from the PlatformMouseEvent and set m_mousePositionIsUnknown to false.
2740         (WebCore::EventHandler::handleMousePressEvent): Call setLastKnownMousePosition() instead of setting the position directly.
2741         (WebCore::EventHandler::handleMouseDoubleClickEvent): Ditto.
2742         (WebCore::EventHandler::handleMouseMoveEvent): Ditto.
2743         (WebCore::EventHandler::handleMouseReleaseEvent): Ditto.
2744         (WebCore::EventHandler::updateSelectionForMouseDrag): Rename currentMouse(Global)Position to lastKnownMouse(Global)Position.
2745         (WebCore::EventHandler::handleAutoscroll): Ditto.
2746         (WebCore::EventHandler::updatePanScrollState): Ditto.
2747         (WebCore::EventHandler::lastKnownMousePosition): Ditto.
2748         (WebCore::EventHandler::dispatchFakeMouseMoveEventSoonInQuad): Ditto.
2749         (WebCore::EventHandler::fakeMouseMoveEventTimerFired): Ditto.
2750         (WebCore::EventHandler::hoverTimerFired): Ditto.
2751         * page/FrameView.cpp:
2752         (WebCore::FrameView::lastKnownMousePosition): Ditto.
2753         * platform/ScrollableArea.h:
2754         (WebCore::ScrollableArea::lastKnownMousePosition): Ditto.
2755         * platform/mac/ScrollAnimatorMac.mm:
2756         (-[WebScrollbarPainterControllerDelegate mouseLocationInContentAreaForScrollerImpPair:]): Ditto.
2757         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]): Ditto.
2758         * rendering/RenderLayer.cpp:
2759         (WebCore::RenderLayer::panScrollFromPoint): Ditto.
2760         (WebCore::RenderLayer::autoscroll): Ditto.
2761         (WebCore::RenderLayer::lastKnownMousePosition): Ditto.
2762         * rendering/RenderListBox.cpp:
2763         (WebCore::RenderListBox::panScroll): Ditto.
2764         (WebCore::RenderListBox::autoscroll): Ditto.
2765         (WebCore::RenderListBox::lastKnownMousePosition): Ditto.
2766
2767 2012-12-12  Martin Robinson  <mrobinson@igalia.com>
2768
2769         Try to fix the GTK+ debug bulid
2770
2771         Logging.h is no longer included in headers, so we need to include it manually in
2772         files that require logging macros.
2773
2774         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: Include Logging.h.
2775
2776 2012-12-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2777
2778         Unreviewed, rolling out r137524.
2779         http://trac.webkit.org/changeset/137524
2780         https://bugs.webkit.org/show_bug.cgi?id=104859
2781
2782         Causes m_deletionHasBegun assertion failures in
2783         MutationObserver tests (Requested by aklein on #webkit).
2784
2785         * dom/Document.cpp:
2786         (WebCore::Document::Document):
2787         (WebCore::Document::~Document):
2788         (WebCore::Document::suggestedMIMEType):
2789         * dom/Document.h:
2790         (WebCore::Node::isDocumentNode):
2791         (WebCore):
2792         (WebCore::Node::treeScope):
2793         (WebCore::Node::Node):
2794         * dom/Element.cpp:
2795         (WebCore::Element::createRareData):
2796         * dom/ElementRareData.h:
2797         (ElementRareData):
2798         (WebCore::ElementRareData::ElementRareData):
2799         * dom/Node.cpp:
2800         (WebCore::Node::~Node):
2801         (WebCore::Node::setDocument):
2802         (WebCore):
2803         (WebCore::Node::setTreeScope):
2804         (WebCore::Node::createRareData):
2805         (WebCore::Node::attach):
2806         (WebCore::Node::reportMemoryUsage):
2807         * dom/Node.h:
2808         (WebCore):
2809         (WebCore::NodeRareDataBase::treeScope):
2810         (WebCore::NodeRareDataBase::setTreeScope):
2811         (NodeRareDataBase):
2812         (WebCore::NodeRareDataBase::NodeRareDataBase):
2813         (Node):
2814         (WebCore::Node::inDocument):
2815         (WebCore::Node::documentInternal):
2816         * dom/NodeRareData.cpp:
2817         (SameSizeAsNodeRareData):
2818         (WebCore::NodeRareData::reportMemoryUsage):
2819         * dom/NodeRareData.h:
2820         (WebCore::NodeRareData::NodeRareData):
2821         * dom/ShadowRoot.cpp:
2822         (WebCore::ShadowRoot::ShadowRoot):
2823         * dom/TreeScope.cpp:
2824         (SameSizeAsTreeScope):
2825         (WebCore::TreeScope::TreeScope):
2826         (WebCore::TreeScope::setParentTreeScope):
2827         * dom/TreeScope.h:
2828         (WebCore):
2829         (TreeScope):
2830         * dom/TreeScopeAdopter.cpp:
2831         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2832         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
2833
2834 2012-12-12  Seokju Kwon  <seokju.kwon@gmail.com>
2835
2836         Fix build warning when ENABLE_INSPECTOR is disabled
2837         https://bugs.webkit.org/show_bug.cgi?id=104757
2838
2839         Reviewed by Kentaro Hara.
2840
2841         Use UNUSED_PARAM macro to fix build warning -Wunused-parameter.
2842
2843         No new tests, no behavior change.
2844
2845         * inspector/InspectorCanvasInstrumentation.h:
2846         (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
2847         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
2848         * inspector/InspectorConsoleInstrumentation.h:
2849         (WebCore::InspectorInstrumentation::addMessageToConsole):
2850         (WebCore::InspectorInstrumentation::consoleCount):
2851         (WebCore::InspectorInstrumentation::startConsoleTiming):
2852         (WebCore::InspectorInstrumentation::stopConsoleTiming):
2853         (WebCore::InspectorInstrumentation::consoleTimeStamp):
2854         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
2855         (WebCore::InspectorInstrumentation::addProfile):
2856         (WebCore::InspectorInstrumentation::profilerEnabled):
2857         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileName):
2858         * inspector/InspectorCounters.h:
2859         (WebCore::InspectorCounters::incrementCounter):
2860         (WebCore::InspectorCounters::decrementCounter):
2861         * inspector/InspectorDatabaseInstrumentation.h:
2862         (WebCore::InspectorInstrumentation::didOpenDatabase):
2863         * inspector/InspectorInstrumentation.h:
2864         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
2865         (WebCore::InspectorInstrumentation::isDebuggerPaused):
2866         (WebCore::InspectorInstrumentation::willInsertDOMNode):
2867         (WebCore::InspectorInstrumentation::didInsertDOMNode):
2868         (WebCore::InspectorInstrumentation::willRemoveDOMNode):
2869         (WebCore::InspectorInstrumentation::willModifyDOMAttr):
2870         (WebCore::InspectorInstrumentation::didModifyDOMAttr):
2871         (WebCore::InspectorInstrumentation::didRemoveDOMAttr):
2872         (WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
2873         (WebCore::InspectorInstrumentation::frameWindowDiscarded):
2874         (WebCore::InspectorInstrumentation::mediaQueryResultChanged):
2875         (WebCore::InspectorInstrumentation::didPushShadowRoot):
2876         (WebCore::InspectorInstrumentation::willPopShadowRoot):
2877         (WebCore::InspectorInstrumentation::didCreateNamedFlow):
2878         (WebCore::InspectorInstrumentation::willRemoveNamedFlow):
2879         (WebCore::InspectorInstrumentation::didUpdateRegionLayout):
2880         (WebCore::InspectorInstrumentation::mouseDidMoveOverElement):
2881         (WebCore::InspectorInstrumentation::handleTouchEvent):
2882         (WebCore::InspectorInstrumentation::handleMousePress):
2883         (WebCore::InspectorInstrumentation::forcePseudoState):
2884         (WebCore::InspectorInstrumentation::characterDataModified):
2885         (WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
2886         (WebCore::InspectorInstrumentation::didScheduleResourceRequest):
2887         (WebCore::InspectorInstrumentation::didInstallTimer):
2888         (WebCore::InspectorInstrumentation::didRemoveTimer):
2889         (WebCore::InspectorInstrumentation::willCallFunction):
2890         (WebCore::InspectorInstrumentation::didCallFunction):
2891         (WebCore::InspectorInstrumentation::willDispatchXHRReadyStateChangeEvent):
2892         (WebCore::InspectorInstrumentation::didDispatchXHRReadyStateChangeEvent):
2893         (WebCore::InspectorInstrumentation::willDispatchEvent):
2894         (WebCore::InspectorInstrumentation::didDispatchEvent):
2895         (WebCore::InspectorInstrumentation::willHandleEvent):
2896         (WebCore::InspectorInstrumentation::didHandleEvent):
2897         (WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
2898         (WebCore::InspectorInstrumentation::didDispatchEventOnWindow):
2899         (WebCore::InspectorInstrumentation::willEvaluateScript):
2900         (WebCore::InspectorInstrumentation::didEvaluateScript):
2901         (WebCore::InspectorInstrumentation::didCreateIsolatedContext):
2902         (WebCore::InspectorInstrumentation::willFireTimer):
2903         (WebCore::InspectorInstrumentation::didFireTimer):
2904         (WebCore::InspectorInstrumentation::didBeginFrame):
2905         (WebCore::InspectorInstrumentation::didCancelFrame):
2906         (WebCore::InspectorInstrumentation::didInvalidateLayout):
2907         (WebCore::InspectorInstrumentation::willLayout):
2908         (WebCore::InspectorInstrumentation::didLayout):
2909         (WebCore::InspectorInstrumentation::didScroll):
2910         (WebCore::InspectorInstrumentation::willDispatchXHRLoadEvent):
2911         (WebCore::InspectorInstrumentation::didDispatchXHRLoadEvent):
2912         (WebCore::InspectorInstrumentation::willPaint):
2913         (WebCore::InspectorInstrumentation::didPaint):
2914         (WebCore::InspectorInstrumentation::willScrollLayer):
2915         (WebCore::InspectorInstrumentation::didScrollLayer):
2916         (WebCore::InspectorInstrumentation::willComposite):
2917         (WebCore::InspectorInstrumentation::didComposite):
2918         (WebCore::InspectorInstrumentation::willRecalculateStyle):
2919         (WebCore::InspectorInstrumentation::didRecalculateStyle):
2920         (WebCore::InspectorInstrumentation::didScheduleStyleRecalculation):
2921         (WebCore::InspectorInstrumentation::willMatchRule):
2922         (WebCore::InspectorInstrumentation::didMatchRule):
2923         (WebCore::InspectorInstrumentation::willProcessRule):
2924         (WebCore::InspectorInstrumentation::didProcessRule):
2925         (WebCore::InspectorInstrumentation::applyUserAgentOverride):
2926         (WebCore::InspectorInstrumentation::applyScreenWidthOverride):
2927         (WebCore::InspectorInstrumentation::applyScreenHeightOverride):
2928         (WebCore::InspectorInstrumentation::shouldApplyScreenWidthOverride):
2929         (WebCore::InspectorInstrumentation::applyEmulatedMedia):
2930         (WebCore::InspectorInstrumentation::shouldApplyScreenHeightOverride):
2931         (WebCore::InspectorInstrumentation::willSendRequest):
2932         (WebCore::InspectorInstrumentation::continueAfterPingLoader):
2933         (WebCore::InspectorInstrumentation::markResourceAsCached):
2934         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
2935         (WebCore::InspectorInstrumentation::willReceiveResourceData):
2936         (WebCore::InspectorInstrumentation::didReceiveResourceData):
2937         (WebCore::InspectorInstrumentation::willReceiveResourceResponse):
2938         (WebCore::InspectorInstrumentation::didReceiveResourceResponse):
2939         (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
2940         (WebCore::InspectorInstrumentation::continueWithPolicyDownload):
2941         (WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
2942         (WebCore::InspectorInstrumentation::didReceiveData):
2943         (WebCore::InspectorInstrumentation::didFinishLoading):
2944         (WebCore::InspectorInstrumentation::didFailLoading):
2945         (WebCore::InspectorInstrumentation::documentThreadableLoaderStartedLoadingForClient):
2946         (WebCore::InspectorInstrumentation::willLoadXHR):
2947         (WebCore::InspectorInstrumentation::didFailXHRLoading):
2948         (WebCore::InspectorInstrumentation::didFinishXHRLoading):
2949         (WebCore::InspectorInstrumentation::didReceiveXHRResponse):
2950         (WebCore::InspectorInstrumentation::willLoadXHRSynchronously):
2951         (WebCore::InspectorInstrumentation::didLoadXHRSynchronously):
2952         (WebCore::InspectorInstrumentation::scriptImported):
2953         (WebCore::InspectorInstrumentation::scriptExecutionBlockedByCSP):
2954         (WebCore::InspectorInstrumentation::didReceiveScriptResponse):
2955         (WebCore::InspectorInstrumentation::domContentLoadedEventFired):
2956         (WebCore::InspectorInstrumentation::loadEventFired):
2957         (WebCore::InspectorInstrumentation::frameDetachedFromParent):
2958         (WebCore::InspectorInstrumentation::didCommitLoad):
2959         (WebCore::InspectorInstrumentation::loaderDetachedFromFrame):
2960         (WebCore::InspectorInstrumentation::willDestroyCachedResource):
2961         (WebCore::InspectorInstrumentation::willWriteHTML):
2962         (WebCore::InspectorInstrumentation::didWriteHTML):
2963         (WebCore::InspectorInstrumentation::didUseDOMStorage):
2964         (WebCore::InspectorInstrumentation::didDispatchDOMStorageEvent):
2965         (WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart):
2966         (WebCore::InspectorInstrumentation::didStartWorkerContext):
2967         (WebCore::InspectorInstrumentation::workerContextTerminated):
2968         (WebCore::InspectorInstrumentation::didCreateWebSocket):
2969         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
2970         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
2971         (WebCore::InspectorInstrumentation::didCloseWebSocket):
2972         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrame):
2973         (WebCore::InspectorInstrumentation::didReceiveWebSocketFrameError):
2974         (WebCore::InspectorInstrumentation::didSendWebSocketFrame):
2975         (WebCore::InspectorInstrumentation::networkStateChanged):
2976         (WebCore::InspectorInstrumentation::updateApplicationCacheStatus):
2977         (WebCore::InspectorInstrumentation::didRequestAnimationFrame):
2978         (WebCore::InspectorInstrumentation::didCancelAnimationFrame):
2979         (WebCore::InspectorInstrumentation::willFireAnimationFrame):
2980         (WebCore::InspectorInstrumentation::didFireAnimationFrame):
2981         (WebCore::InspectorInstrumentation::overrideGeolocationPosition):
2982         (WebCore::InspectorInstrumentation::overrideDeviceOrientation):
2983         * loader/appcache/ApplicationCacheGroup.cpp:
2984         (WebCore::ApplicationCacheGroup::didFinishLoading):
2985         (WebCore::ApplicationCacheGroup::didFail):
2986
2987 2012-12-12  Dean Jackson  <dino@apple.com>
2988
2989         Reinstate CIFilter code for Lion
2990         https://bugs.webkit.org/show_bug.cgi?id=104847
2991
2992         Reviewed by Simon Fraser.
2993
2994         This basically reverts r137500 for Lion, because some
2995         CAFilter types are not available there.
2996
2997         Covered by existing tests, with the warning that Lion
2998         baselines will need updating.
2999
3000         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3001         (PlatformCALayer::setFilters): Put an ugly #if in to
3002         detect OS X 10.7, and rename caFilter variable to
3003         filter.
3004
3005 2012-12-12  Seokju Kwon  <seokju.kwon@gmail.com>
3006
3007         [EFL] Refactor duplicate code into EflInspectorUtilities
3008         https://bugs.webkit.org/show_bug.cgi?id=104329
3009
3010         Reviewed by Kenneth Rohde Christiansen.
3011
3012         Move duplicate work into EflInspectorUtilities.
3013
3014         No new tests, refactoring.
3015
3016         * PlatformEfl.cmake:
3017         * platform/efl/EflInspectorUtilities.cpp: Added.
3018         (WebCore):
3019         (WebCore::inspectorResourcePath):
3020         * platform/efl/EflInspectorUtilities.h: Added.
3021         (WebCore):
3022
3023 2012-12-12  Mark Lam  <mark.lam@apple.com>
3024
3025         Fixing a chromium build breakage due to r137520.
3026         https://bugs.webkit.org/show_bug.cgi?id=104741.
3027
3028         Not reviewed.
3029
3030         Added #ifdef !PLATFORM(CHROMIUM) for one function chromium doesn't use.
3031
3032         No new tests.
3033
3034         * Modules/webdatabase/DatabaseManager.cpp:
3035         (WebCore::DatabaseManager::initialize):
3036         * Modules/webdatabase/DatabaseTracker.h:
3037         (DatabaseTracker):
3038
3039 2012-12-11  Emil A Eklund  <eae@chromium.org>
3040
3041         REGRESSION (Subpixel layout): Gray vertical lines appear when moving insertion point to right on Mac
3042         https://bugs.webkit.org/show_bug.cgi?id=102402
3043
3044         Reviewed by Simon Fraser.
3045
3046         Round paintOffset in CaretBase::paintCaret to ensure that caret is painted at an integer pixel boundary.
3047
3048         Test: fast/sub-pixel/input-caret-on-subpixel-bound.html
3049
3050         * editing/FrameSelection.cpp:
3051         (WebCore::CaretBase::paintCaret): Round paintOffset to ensure it is on a pixel boundary.
3052
3053 2012-12-12  Elliott Sprehn  <esprehn@gmail.com>
3054
3055         REGRESSION(137336): Generated run-ins are not placed correctly
3056         https://bugs.webkit.org/show_bug.cgi?id=104840
3057
3058         Reviewed by Abhishek Arya.
3059
3060         Now that :before and :after are not anonymous we no longer need special
3061         handling for run-ins. Currently placeRunInIfNeeded will only place
3062         a generated content run-in if a special flag is passed, but I removed
3063         the call with the flag as it wasn't needed in r137336. This patch just
3064         removes all special handling for generated content run-ins.
3065
3066         Test: fast/css-generated-content/generated-runin.html
3067
3068         * rendering/RenderBlock.cpp:
3069         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
3070         (WebCore::RenderBlock::placeRunInIfNeeded):
3071         (WebCore::RenderBlock::createReplacementRunIn):
3072             Lots of simplfication since there's no more anonymous run-ins.
3073         * rendering/RenderBlock.h:
3074         (RenderBlock):
3075         * rendering/RenderObject.h:
3076
3077 2012-12-12  Simon Fraser  <simon.fraser@apple.com>
3078
3079         Don't unconditionally repaint compositing layers when their size changes
3080         https://bugs.webkit.org/show_bug.cgi?id=104461
3081
3082         Reviewed by James Robinson.
3083
3084         In r137215 I attempted to avoid excessive repainting when compositing layers
3085         change size. This caused stretched layers when layer size changed as a result
3086         of bounds constraining in updateCompositedBounds(), so was conditionalized
3087         based on whether constraining happend, in r137248.
3088         
3089         However, the TileCache layer was affected by constraining, erroneously:
3090         shouldClipCompositedBounds() returned true of the tile cache layer. This
3091         is pointless, because we only constrain to the document bounds (or enclosing
3092         overflow), and the tile cache is already the size of the document bounds.
3093
3094         So, disable size constraining for the tile cache layer, and fix
3095         a confusing comment in updateCompositedBounds() that refers to the
3096         view's bounds, rather than the document's bounds.
3097
3098         * rendering/RenderLayerBacking.cpp:
3099         (WebCore::RenderLayerBacking::shouldClipCompositedBounds):
3100         (WebCore::RenderLayerBacking::updateCompositedBounds):
3101
3102 2012-12-12  Elliott Sprehn  <esprehn@gmail.com>
3103
3104         [Refactoring] Replace Node's Document pointer with a TreeScope pointer
3105         https://bugs.webkit.org/show_bug.cgi?id=59816
3106
3107         Reviewed by Ryosuke Niwa.
3108
3109         Instead of giving every node in a shadow a rare data, which can be quite
3110         large, we replace the Document pointer in Node with a TreeScope pointer
3111         and we give TreeScope a pointer to it's document scope.
3112
3113         This introduces no branches in document() because in the common
3114         case document() becomes equivalent to m_treeScope->m_documentScope where
3115         the documentScope is actually m_treeScope so this shouldn't introduce a
3116         perf regression.
3117
3118         Note also that TreeScope can never be null after r136328, and the document
3119         pointer is only null for DocumentType nodes so we can use a special
3120         no-document TreeScope for this case that always returns null from
3121         documentScope().
3122
3123         No new tests, no change in behavior.
3124
3125         * dom/Document.cpp:
3126         (WebCore::Document::Document):
3127         (WebCore::Document::~Document):
3128         (WebCore::Document::suggestedMIMEType):
3129         * dom/Document.h:
3130         (WebCore::Node::isDocumentNode):
3131         (WebCore::Node::Node):
3132         * dom/Element.cpp:
3133         (WebCore::Element::createRareData):
3134         * dom/ElementRareData.h:
3135         (ElementRareData):
3136         (WebCore::ElementRareData::ElementRareData):
3137         * dom/Node.cpp:
3138         (WebCore::Node::~Node):
3139         (WebCore::Node::createRareData):
3140         (WebCore::Node::attach):
3141         (WebCore::Node::reportMemoryUsage):
3142         * dom/Node.h:
3143         (WebCore):
3144         (WebCore::NodeRareDataBase::NodeRareDataBase):
3145         (NodeRareDataBase):
3146         (WebCore::Node::treeScope):
3147         (WebCore::Node::inDocument):
3148         (WebCore::Node::documentInternal):
3149         (WebCore::Node::setTreeScope):
3150         (Node):
3151         * dom/NodeRareData.cpp:
3152         (WebCore::NodeRareData::reportMemoryUsage):
3153         * dom/NodeRareData.h:
3154         (WebCore::NodeRareData::NodeRareData):
3155         * dom/ShadowRoot.cpp:
3156         (WebCore::ShadowRoot::ShadowRoot):
3157         * dom/TreeScope.cpp:
3158         (SameSizeAsTreeScope):
3159         (WebCore::TreeScope::TreeScope):
3160         (WebCore::TreeScope::setParentTreeScope):
3161         * dom/TreeScope.h:
3162         (WebCore):
3163         (TreeScope):
3164         (WebCore::TreeScope::documentScope):
3165         (WebCore::TreeScope::noDocumentInstance):
3166             Returns a special tree scope that has no document for use with
3167             DocumentType nodes.
3168         (WebCore::TreeScope::setDocumentScope):
3169         * dom/TreeScopeAdopter.cpp:
3170         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
3171         (WebCore::TreeScopeAdopter::moveTreeToNewDocument):
3172         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
3173
3174 2012-12-12  Mark Lam  <mark.lam@apple.com>
3175
3176         Encapsulate externally used webdatabase APIs in DatabaseManager.
3177         https://bugs.webkit.org/show_bug.cgi?id=104741.
3178
3179         Reviewed by Sam Weinig.
3180
3181         Use DatabaseManager instead of accessing DatabaseTracker, AbstractDatabase,
3182         and DatabaseContext directly. This is to prepare for upcoming webkit2
3183         refactoring.
3184
3185         No new tests.
3186
3187         * CMakeLists.txt:
3188         * Modules/webdatabase/DatabaseManager.cpp: Added.
3189         (WebCore::DatabaseManager::manager):
3190         (WebCore::DatabaseManager::DatabaseManager):
3191         (WebCore::DatabaseManager::initialize):
3192         (WebCore::DatabaseManager::setClient):
3193         (WebCore::DatabaseManager::isAvailable):
3194         (WebCore::DatabaseManager::setIsAvailable):
3195         (WebCore::DatabaseManager::hasOpenDatabases):
3196         (WebCore::DatabaseManager::stopDatabases):
3197         (WebCore::DatabaseManager::fullPathForDatabase):
3198         (WebCore::DatabaseManager::databaseDirectoryPath):
3199         (WebCore::DatabaseManager::setDatabaseDirectoryPath):
3200         (WebCore::DatabaseManager::hasEntryForOrigin):
3201         (WebCore::DatabaseManager::origins):
3202         (WebCore::DatabaseManager::databaseNamesForOrigin):
3203         (WebCore::DatabaseManager::detailsForNameAndOrigin):
3204         (WebCore::DatabaseManager::usageForOrigin):
3205         (WebCore::DatabaseManager::quotaForOrigin):
3206         (WebCore::DatabaseManager::setQuota):
3207         (WebCore::DatabaseManager::deleteAllDatabases):
3208         (WebCore::DatabaseManager::deleteOrigin):
3209         (WebCore::DatabaseManager::deleteDatabase):
3210         (WebCore::DatabaseManager::closeDatabasesImmediately):
3211         (WebCore::DatabaseManager::interruptAllDatabasesForContext):
3212         * Modules/webdatabase/DatabaseManager.h: Added.
3213         (DatabaseManager):
3214         (WebCore::DatabaseManager::~DatabaseManager):
3215         * Modules/webdatabase/DatabaseManagerClient.h: Copied from Source/WebCore/Modules/webdatabase/DatabaseTrackerClient.h.
3216         (WebCore::DatabaseManagerClient::~DatabaseManagerClient):
3217         * Modules/webdatabase/DatabaseTracker.cpp:
3218         (WebCore::DatabaseTracker::setClient):
3219         * Modules/webdatabase/DatabaseTracker.h:
3220         (DatabaseTracker):
3221         * Modules/webdatabase/DatabaseTrackerClient.h: Removed.
3222         * Target.pri:
3223         * WebCore.exp.in:
3224         * WebCore.gyp/WebCore.gyp:
3225         * WebCore.gypi:
3226         * WebCore.order:
3227         * WebCore.vcproj/WebCore.vcproj:
3228         * WebCore.xcodeproj/project.pbxproj:
3229         * bindings/generic/RuntimeEnabledFeatures.cpp:
3230         (WebCore::RuntimeEnabledFeatures::openDatabaseEnabled):
3231         (WebCore::RuntimeEnabledFeatures::openDatabaseSyncEnabled):
3232         * history/PageCache.cpp:
3233         (WebCore::logCanCacheFrameDecision):
3234         (WebCore::PageCache::canCachePageContainingThisFrame):
3235         * loader/FrameLoader.cpp:
3236         (WebCore::FrameLoader::stopLoading):
3237         * page/DOMWindow.cpp:
3238         * workers/WorkerThread.cpp:
3239         (WebCore::WorkerThreadShutdownStartTask::performTask):
3240         (WebCore::WorkerThread::stop):
3241
3242 2012-12-12  Tony Chang  <tony@chromium.org>
3243
3244         [chromium] don't write additional idl files to a gyp temp file
3245         https://bugs.webkit.org/show_bug.cgi?id=104831
3246
3247         Reviewed by Kentaro Hara.
3248
3249         The <|( command doesn't work for files like <(PRODUCT_DIR) or <(SHARED_INTERMEDIATE_DIR).
3250         For additional_idl_files, pass it as a parameter instead of a file listing the filenames.
3251         There are currently only 3 files in this variable. This shouldn't overflow the command
3252         line since the limit on Windows is 8k and with this change, we're still only around 4.5k.
3253         Also, the longest part of the command line is the list of defines. If needed, we could put
3254         that in a file instead.
3255
3256         No new tests, this is a refactoring of the build files.
3257
3258         * WebCore.gyp/WebCore.gyp: Don't use <|( for additional_idl_files.
3259         * bindings/scripts/generate-bindings.pl: Change --additionalIdlFilesList to
3260         --additionalIdlFiles, which is a shell argument containing the filenames.
3261
3262 2012-12-12  Chris Rogers  <crogers@google.com>
3263
3264         Implement OfflineAudioContext constructor
3265         https://bugs.webkit.org/show_bug.cgi?id=104188
3266
3267         Reviewed by Kentaro Hara.
3268
3269         The Web Audio layout tests have relied on an undocumented way (in the specification) to render
3270         audio faster than realtime using an OfflineAudioContext.  We want to expose a proper OfflineAudioContext
3271         object and constructor instead of piggybacking off of the normal AudioContext.
3272              
3273         * CMakeLists.txt:
3274         * DerivedSources.make:
3275         * DerivedSources.pri:
3276         * GNUmakefile.list.am:
3277         * Modules/webaudio/AudioContext.cpp:
3278         (WebCore::AudioContext::isSampleRateRangeGood):
3279         * Modules/webaudio/AudioContext.h:
3280         (AudioContext):
3281         * Modules/webaudio/DOMWindowWebAudio.idl:
3282         * Modules/webaudio/OfflineAudioContext.cpp: Added.
3283         (WebCore):
3284         (WebCore::OfflineAudioContext::create):
3285         (WebCore::OfflineAudioContext::OfflineAudioContext):
3286         (WebCore::OfflineAudioContext::~OfflineAudioContext):
3287         * Modules/webaudio/OfflineAudioContext.h: Added.
3288         (WebCore):
3289         (OfflineAudioContext):
3290         * Modules/webaudio/OfflineAudioContext.idl: Added.
3291         * WebCore.gypi:
3292         * WebCore.xcodeproj/project.pbxproj:
3293         * bindings/generic/RuntimeEnabledFeatures.h:
3294         (WebCore::RuntimeEnabledFeatures::webkitOfflineAudioContextEnabled):
3295         * bindings/js/JSAudioContextCustom.cpp:
3296         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
3297         * bindings/v8/custom/V8AudioContextCustom.cpp:
3298         (WebCore::V8AudioContext::constructorCallbackCustom):
3299
3300 2012-12-12  John Griggs  <jgriggs@rim.com>
3301
3302         2012-12-12  John Griggs  <jgriggs@rim.com>
3303
3304         [BlackBerry] Update Media Controls for BlackBerry Platform
3305         https://bugs.webkit.org/show_bug.cgi?id=104443
3306         https://przilla.ott.qnx.com/bugzilla/show_bug.cgi?id=204748
3307
3308         Reviewed by Rob Buis.
3309
3310         Update Media Controls for BlackBerry platform to allow audio, embedded video and fullscreen video controls to be positioned and styled differently.
3311
3312         BlackBerry-specific update to Media Controls - No new tests required.
3313
3314         * PlatformBlackBerry.cmake:
3315         * css/mediaControlsBlackBerry.css:
3316         (audio):
3317         (audio::-webkit-media-controls-embedded-panel, video::-webkit-media-controls-embedded-panel):
3318         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
3319         (video::-webkit-media-controls-button-group-container, audio::-webkit-media-controls-button-group-container):
3320         (video::-webkit-media-controls-fullscreen-time-display-container, audio::-webkit-media-controls-fullscreen-time-display-container):
3321         (video::-webkit-media-controls-time-display-container, audio::-webkit-media-controls-time-display-container):
3322         (video::-webkit-media-controls-fullscreen-play-button, audio::-webkit-media-controls-fullscreen-play-button):
3323         (video::-webkit-media-controls-play-button, audio::-webkit-media-controls-play-button):
3324         (audio::-webkit-media-controls-fullscreen-timeline-container, video::-webkit-media-controls-fullscreen-timeline-container):
3325         (video::-webkit-media-controls-timeline-container, audio::-webkit-media-controls-timeline-container):
3326         (audio::-webkit-media-controls-fullscreen-current-time-display, video::-webkit-media-controls-fullscreen-current-time-display):
3327         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
3328         (video::-webkit-media-controls-fullscreen-time-remaining-display, audio::-webkit-media-controls-fullscreen-time-remaining-display):
3329         (video::-webkit-media-controls-time-remaining-display, audio::-webkit-media-controls-time-remaining-display):
3330         (audio::-webkit-media-controls-fullscreen-timeline, video::-webkit-media-controls-fullscreen-timeline):
3331         (video::-webkit-media-controls-fullscreen-fullscreen-button, audio::-webkit-media-controls-fullscreen-fullscreen-button):
3332         (video::-webkit-media-controls-fullscreen-button):
3333         (audio::-webkit-media-controls-fullscreen-button):
3334         (audio::-webkit-media-controls-audio-mute-button):
3335         (video::-webkit-media-controls-audio-mute-button):
3336         (audio::-webkit-media-controls-volume-slider-container):
3337         (video::-webkit-media-controls-volume-slider-container):
3338         (audio::-webkit-media-controls-volume-slider):
3339         (video::-webkit-media-controls-volume-slider):
3340         (video::-webkit-media-controls-fullscreen-button-divider, audio::-webkit-media-controls-fullscreen-button-divider):
3341         (video::-webkit-media-controls-fullscreen-button-container, video::-webkit-media-controls-play-button-container, audio::-webkit-media-controls-fullscreen-button-container, audio::-webkit-media-controls-play-button-container):
3342         * css/mediaControlsBlackBerryFullscreen.css: Added.
3343         (body:-webkit-full-page-media):
3344         (video:-webkit-full-screen::-webkit-media-controls-embedded-panel):
3345         (video:-webkit-full-screen::-webkit-media-controls-panel):
3346         (video:-webkit-full-screen::-webkit-media-controls-button-group-container):
3347         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-time-display-container):
3348         (video:-webkit-full-screen::-webkit-media-controls-time-display-container):
3349         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-play-button):
3350         (video:-webkit-full-screen::-webkit-media-controls-play-button):
3351         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-timeline-container):
3352         (video:-webkit-full-screen::-webkit-media-controls-timeline-container):
3353         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-current-time-display):
3354         (video:-webkit-full-screen::-webkit-media-controls-current-time-display):
3355         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-time-remaining-display):
3356         (video:-webkit-full-screen::-webkit-media-controls-time-remaining-display):
3357         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-timeline):
3358         (video:-webkit-full-screen::-webkit-media-controls-timeline):
3359         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-fullscreen-button):
3360         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button):
3361         (video:-webkit-full-screen::-webkit-media-controls-audio-mute-button):
3362         (video:-webkit-full-screen::-webkit-media-controls-volume-slider-container):
3363         (video:-webkit-full-screen::-webkit-media-controls-volume-slider):
3364         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button-divider):
3365         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button-container, video:-webkit-full-screen::-webkit-media-controls-play-button-container):
3366         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button-container):
3367         (video:-webkit-full-screen::-webkit-media-controls-play-button-container):
3368         (video:-webkit-full-screen::-webkit-media-controls-placeholder):
3369         * html/shadow/MediaControlsBlackBerry.cpp: Added.
3370         (WebCore):
3371         (WebCore::MediaControlButtonGroupContainerElement::MediaControlButtonGroupContainerElement):
3372         (WebCore::MediaControlButtonGroupContainerElement::create):
3373         (WebCore::MediaControlButtonGroupContainerElement::shadowPseudoId):
3374         (WebCore::MediaControlTimeDisplayContainerElement::MediaControlTimeDisplayContainerElement):
3375         (WebCore::MediaControlTimeDisplayContainerElement::create):
3376         (WebCore::MediaControlTimeDisplayContainerElement::shadowPseudoId):
3377         (WebCore::MediaControlEmbeddedPanelElement::MediaControlEmbeddedPanelElement):
3378         (WebCore::MediaControlEmbeddedPanelElement::create):
3379         (WebCore::MediaControlEmbeddedPanelElement::shadowPseudoId):
3380         (WebCore::MediaControlEmbeddedPanelElement::startDrag):
3381         (WebCore::MediaControlEmbeddedPanelElement::continueDrag):
3382         (WebCore::MediaControlEmbeddedPanelElement::endDrag):
3383         (WebCore::MediaControlEmbeddedPanelElement::startTimer):
3384         (WebCore::MediaControlEmbeddedPanelElement::stopTimer):
3385         (WebCore::MediaControlEmbeddedPanelElement::transitionTimerFired):
3386         (WebCore::MediaControlEmbeddedPanelElement::setPosition):
3387         (WebCore::MediaControlEmbeddedPanelElement::resetPosition):
3388         (WebCore::MediaControlEmbeddedPanelElement::makeOpaque):
3389         (WebCore::MediaControlEmbeddedPanelElement::makeTransparent):
3390         (WebCore::MediaControlEmbeddedPanelElement::defaultEventHandler):
3391         (WebCore::MediaControlEmbeddedPanelElement::setCanBeDragged):
3392         (WebCore::MediaControlEmbeddedPanelElement::setIsDisplayed):
3393         (WebCore::MediaControlFullscreenTimeDisplayContainerElement::MediaControlFullscreenTimeDisplayContainerElement):
3394         (WebCore::MediaControlFullscreenTimeDisplayContainerElement::create):
3395         (WebCore::MediaControlFullscreenTimeDisplayContainerElement::shadowPseudoId):
3396         (WebCore::MediaControlFullscreenButtonContainerElement::MediaControlFullscreenButtonContainerElement):
3397         (WebCore::MediaControlFullscreenButtonContainerElement::create):
3398         (WebCore::MediaControlFullscreenButtonContainerElement::shadowPseudoId):
3399         (WebCore::MediaControlFullscreenButtonDividerElement::MediaControlFullscreenButtonDividerElement):
3400         (WebCore::MediaControlFullscreenButtonDividerElement::create):
3401         (WebCore::MediaControlFullscreenButtonDividerElement::shadowPseudoId):
3402         (WebCore::MediaControlPlayButtonContainerElement::MediaControlPlayButtonContainerElement):
3403         (WebCore::MediaControlPlayButtonContainerElement::create):
3404         (WebCore::MediaControlPlayButtonContainerElement::shadowPseudoId):
3405         (WebCore::MediaControlPlaceholderElement::MediaControlPlaceholderElement):
3406         (WebCore::MediaControlPlaceholderElement::create):
3407         (WebCore::MediaControlPlaceholderElement::shadowPseudoId):
3408         (WebCore::MediaControlFullscreenPlayButtonElement::MediaControlFullscreenPlayButtonElement):
3409