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