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