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