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