44fe3a0079f968e8e7167fa49e5996fd172e88b2
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-12-12  Sheriff Bot  <webkit.review.bot@gmail.com>
2
3         Unreviewed, rolling out r137491.
4         http://trac.webkit.org/changeset/137491
5         https://bugs.webkit.org/show_bug.cgi?id=104828
6
7         broke the builtd (Requested by rfong on #webkit).
8
9         * DerivedSources.cpp:
10         * WebCore.vcproj/WebCore.vcproj:
11         * WebCore.vcproj/WebCoreCommon.vsprops:
12         * WebCore.vcproj/copyForwardingHeaders.cmd:
13         * bindings/generic/RuntimeEnabledFeatures.cpp:
14         (WebCore):
15         * html/HTMLElementsAllInOne.cpp:
16         * platform/NotImplemented.cpp:
17         (WebCore):
18         (WebCore::notImplementedLoggingChannel):
19         * rendering/RenderingAllInOne.cpp:
20
21 2012-12-12  John J. Barton  <johnjbarton@chromium.org>
22
23         Web Inspector: remove protocol-externs.js temp file after compile-front-end.py
24         https://bugs.webkit.org/show_bug.cgi?id=98799
25
26         Reviewed by Vsevolod Vlasov.
27
28         Add os.system rm for protocol-externs.js to the end of the compile script
29
30         * inspector/compile-front-end.py:
31
32 2012-12-12  Robert Hogan  <robert@webkit.org>
33
34         White space between inline blocks should be affected by word-spacing property
35         https://bugs.webkit.org/show_bug.cgi?id=69072
36
37         Reviewed by Levi Weintraub.
38
39         Allow word-spacing to get added to the spaces between inline blocks in placeBoxesInInlineDirection by setting
40         needsWordSpacing to true each time an inline block is encountered. This ensures that the next space encountered
41         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
42         in the style.
43
44         Tests: fast/css/word-spacing-between-blocks.html
45                fast/css/word-spacing-between-inlines.html
46
47         * rendering/InlineFlowBox.cpp:
48         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
49
50 2012-12-12  Xianzhu Wang  <wangxianzhu@chromium.org>
51
52         Pre-painting should not paint out-of-view fixed position elements
53         https://bugs.webkit.org/show_bug.cgi?id=104724
54
55         Reviewed by James Robinson.
56
57         Test: ManualTests/compositing/fixed-position-out-of-view-scroll-prepaint.html
58
59         * rendering/RenderLayer.cpp:
60         (WebCore::RenderLayer::paintLayer): Don't paint out-of-view fixed position elements.
61
62 2012-12-11  Roger Fong  <roger_fong@apple.com>
63
64         Enable VIDEO_TRACK on Windows.
65         https://bugs.webkit.org/show_bug.cgi?id=104706.
66
67         Reviewed by Timothy Horton.
68
69         Enable VIDEO_TRACK on Windows and update project property files.
70
71         * DerivedSources.cpp:
72         * WebCore.vcproj/WebCore.vcproj:
73         * WebCore.vcproj/WebCoreCommon.vsprops:
74         * WebCore.vcproj/copyForwardingHeaders.cmd:
75         * bindings/generic/RuntimeEnabledFeatures.cpp:
76         (WebCore):
77         * html/HTMLElementsAllInOne.cpp:
78         * rendering/RenderingAllInOne.cpp:
79
80 2012-12-12  James Simonsen  <simonjam@chromium.org>
81
82         [Resource Timing] Failed resources shouldn't be recorded in the buffer
83         https://bugs.webkit.org/show_bug.cgi?id=104762
84
85         Reviewed by Tony Gentilcore.
86
87         Test: http/tests/w3c/webperf/submission/resource-timing/html/test_resource_ignore_failures.html
88
89         * loader/cache/CachedResourceLoader.cpp:
90         (WebCore::CachedResourceLoader::loadDone):
91
92 2012-12-12  Martin Robinson  <mrobinson@igalia.com>
93
94         [GTK] Add authentication support to DRT and fix exposed issues in the libsoup backend
95         https://bugs.webkit.org/show_bug.cgi?id=104285
96
97         Reviewed by Gustavo Noronha Silva.
98
99         Fix issues in the libsoup networking backend that were causing test
100         failures.
101
102         No new tests. This patch unskips authentication tests.
103
104         * platform/network/soup/ResourceHandleSoup.cpp:
105         (WebCore::isAuthenticationFailureStatusCode): Added this helper to catch authentication status codes
106         and use it everywhere.
107         (WebCore::applyAuthenticationToRequest): Use an early return instead of an if-statement
108         and instead of always using manually specified credentials, apply those found in the session
109         storage as well. Instead of applying the credentials to firstRequest always, accept the request
110         as a parameter, so this method can be properly used with redirects.
111         (WebCore::restartedCallback): Instead of creating the KURL directly from soup_uri_to_string
112         use soupURIToKURL, which preserves the password from the SoupURI. soup_uri_to_string doesn't
113         include the password. When calling applyAuthenticationToRequest update the new request. Before
114         applyAuthenticationToRequest always updated the firstRequest. Do not call willSendRequest for
115         instances when this method is called for authentication handling. willSendRequest should only
116         be called for server-side redirects.
117         (WebCore::createSoupRequestAndMessageForHandle): Use soup_requester_request_uri instead of
118         soup_requester_request. Request::soupURI properly creates a SoupURI with non-null empty strings
119         when either the username and password are empty.  A null username or password does not trigger
120         the URI-embedded credential override in SoupAuthenticationManager within libsoup. This is important
121         because sometimes either the username or password might empty for a request, but the other
122         part of the credential should still override the per-session credential storage.
123         (WebCore::ResourceHandle::start): We don't need to clear the username and password from the
124         internal data structure any longer. These need to be cleared in the CFNetwork backend because
125         it prevents the same failed per-request credentials from being used over and over again. In our
126         case we don't use these members during didReceiveAuthenticationChallenge, so this isn't an issue.
127         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Don't look at the per-request
128         m_user/m_pass pair here any longer. We use these when initially creating a request, so we don't
129         want to re-use them if they fail.
130         * platform/network/soup/ResourceRequest.h:
131         (ResourceRequest): Rename urlStringForSoup to soupURI.
132         * platform/network/soup/ResourceRequestSoup.cpp:
133         (WebCore::ResourceRequest::soupURI): Instead of returning a string for the soup-bound URL
134         return a SoupURI that properly embeds empty usernames and passwords.
135
136 2012-12-12  Alexey Proskuryakov  <ap@apple.com>
137
138         Make LOG() work in WebProcess and NetworkProcess
139         https://bugs.webkit.org/show_bug.cgi?id=104718
140
141         Reviewed by Tim Horton.
142
143         Split initialization function into a new InitializeLogging.h file, because it's
144         needed in WebKit, but cannot be included along with WebKit version of this file.
145         We'd have a confilct between LOG_CHANNEL_PREFIX definitions if we tried.
146
147         * WebCore.xcodeproj/project.pbxproj: Make Logging.h a project header, and
148         InitializeLogging.h a private one.
149
150         * GNUmakefile.list.am:
151         * Target.pri:
152         * platform/InitializeLogging.h: Added.
153         * platform/Logging.h:
154
155         * platform/blackberry/LoggingBlackBerry.cpp:
156         * platform/efl/LoggingEfl.cpp:
157         * platform/gtk/LoggingGtk.cpp:
158         * platform/mac/LoggingMac.mm:
159         * platform/qt/LoggingQt.cpp:
160         * platform/win/LoggingWin.cpp:
161         * platform/wx/LoggingWx.cpp:
162         Include InitializeLogging.h where this function is implemented.
163
164         * platform/NotImplemented.h:
165         * platform/NotImplemented.cpp: Added.
166         Changed to not include WebCore's Logging.h in the header, because NotImplemented.h
167         is used in WebKits, which have incompatibe logging headers.
168
169 2012-12-12  Chris Fleizach  <cfleizach@apple.com>
170
171         AX: aria-busy should be exposed everywhere, not just on live regions
172         https://bugs.webkit.org/show_bug.cgi?id=104814
173
174         Reviewed by Anders Carlsson.
175
176         The aria-busy attribute should be exposed on all elements. 
177         This isn't entirely clear in the ARIA spec, but that will be fixed with
178         ARIA1.1 (ISSUE-538).
179
180         Existing tests that dump attributes cover this new behavior.
181
182         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
183         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
184
185 2012-12-12  Gavin Peters  <gavinp@chromium.org>
186
187         [chromium] Add destructor to WebPrerender
188         https://bugs.webkit.org/show_bug.cgi?id=104820
189
190         Reviewed by James Robinson.
191
192         When making WebPrerender default constructible and assignable, the destructor should have been moved out of WEBKIT_IMPLEMENTATION.
193
194         Existing WebKit unit tests should test this, as do chromium browser tests.
195
196         * platform/chromium/support/WebPrerender.cpp:
197         (WebKit::WebPrerender::toPrerender):
198         (WebKit::WebPrerender::reset):
199
200 2012-12-12  Allan Sandfeld Jensen  <allan.jensen@digia.com>
201
202         [Qt] Animation fails on large layers
203         https://bugs.webkit.org/show_bug.cgi?id=104538
204
205         Reviewed by Noam Rosenthal.
206
207         The backing tiles had no upper limit defined for the non-GL backend, which could cause them
208         to allocate pixmaps widier or higher than what the underlying graphics systems can handle.
209
210         On top of that GraphicsLayerTextureMapper::prepareBackingStore() would allocate an intermediate
211         pixmap the size of the dirty rect, which would at least on the first paint be the size of the
212         entire layer, again causing allocation of pixmaps with dimensions outside of platform bounds.
213
214         This patch introduces a limit to the size of image buffer tiles, and adds an alternative path
215         for painting where the GraphicsLayer paints directly to the tile instead of over an intermediate
216         pixmap. This alternative path can also be useful later to minimize the amount of pixel copying
217         happening in full repaints.
218
219         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
220         (WebCore::GraphicsLayerTextureMapper::prepareBackingStore):
221         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
222         (GraphicsLayerTextureMapper):
223         * platform/graphics/texmap/TextureMapper.cpp:
224         (WebCore::BitmapTexture::updateContents):
225         * platform/graphics/texmap/TextureMapper.h:
226         (BitmapTexture):
227         (TextureMapper):
228         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
229         (WebCore::TextureMapperTile::updateContents):
230         (WebCore::TextureMapperTiledBackingStore::updateContents):
231         * platform/graphics/texmap/TextureMapperBackingStore.h:
232         (TextureMapperTile):
233         (TextureMapperTiledBackingStore):
234         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
235         (WebCore::BitmapTextureImageBuffer::updateContents):
236         (WebCore::TextureMapperImageBuffer::maxTextureSize):
237         * platform/graphics/texmap/TextureMapperImageBuffer.h:
238         (BitmapTextureImageBuffer):
239
240 2012-12-12  Aaron Colwell  <acolwell@chromium.org>
241
242         Remove MediaSource 'ended' to 'open' transition when seeking.
243         https://bugs.webkit.org/show_bug.cgi?id=104583
244
245         Reviewed by Eric Carlson.
246
247         Remove the 'ended' to 'open' transition on a seek.
248
249         No new tests. The following tests were updated to reflect the new behavior.
250           http/tests/media/media-source/video-media-source-seek.html
251           http/tests/media/media-source/video-media-source-state-changes.html
252
253         * html/HTMLMediaElement.cpp:
254         (WebCore::HTMLMediaElement::seek):
255
256 2012-12-12  Julien Chaffraix  <jchaffraix@webkit.org>
257
258         [CSS Grid Layout] Implement CSS parsing and handling for min-content and max-content
259         https://bugs.webkit.org/show_bug.cgi?id=104747
260
261         Reviewed by Alexis Menard.
262
263         This change adds -webkit-min-content and -webkit-max-content to our <track-breadth> parsing.
264         The rendering is not plugged in and will probably depend on bug 103311.
265
266         Tests: fast/css-grid-layout/grid-columns-rows-get-set-multiple.html:
267                fast/css-grid-layout/grid-columns-rows-get-set.html:
268
269         * css/CSSParser.cpp:
270         (WebCore::CSSParser::parseGridBreadth):
271         * css/StyleResolver.cpp:
272         (WebCore::createGridTrackBreadth):
273         Straight-forward extension of the new code. We were already serializing back properly
274         so no need to touch CSSComputedStyleDeclaration.
275
276 2012-12-12  Ryosuke Niwa  <rniwa@webkit.org>
277
278         Copying text with ruby inserts new lines around rt elements
279         https://bugs.webkit.org/show_bug.cgi?id=104765
280
281         Reviewed by Dan Bernstein.
282
283         Don't emit new lines before and after rt.
284
285         Test: editing/pasteboard/copy-paste-ruby-text.html
286
287         * editing/TextIterator.cpp:
288         (WebCore::shouldEmitNewlinesBeforeAndAfterNode):
289
290 2012-12-12  Krzysztof Czech  <k.czech@samsung.com>
291
292         [EFL] Possibility to turn off accessibility feature for WebKit-EFL.
293         https://bugs.webkit.org/show_bug.cgi?id=103036
294
295         Reviewed by Laszlo Gombos.
296
297         Guard dependencies for accessibility (ATK), so that they can be turned off.
298
299         No new tests as there is no new functionality.
300
301         * PlatformEfl.cmake:
302         * accessibility/AccessibilityObject.cpp:
303         (WebCore::AccessibilityObject::AccessibilityObject):
304         * accessibility/AccessibilityObject.h:
305         (AccessibilityObject):
306
307 2012-12-12  Justin Novosad  <junov@google.com>
308
309         Use render box background over border draw strategy in cases with background-image
310         https://bugs.webkit.org/show_bug.cgi?id=103409
311
312         Reviewed by Simon Fraser.
313
314         The BackgroundOverBorderBleedAvoidance mode was not being used in
315         cases where the background is an opaque image. It was also not
316         being used in cases with multiple layers. The multiple layer
317         case is now safe with respect to color bleeding if the top layer
318         is opaque, thank to the recent addition of layer occlusion culling
319         in r135629.
320
321         No new tests. Testing already covered by the following tests:
322         fast/backgrounds/background-opaque-images-over-color.html
323         fast/backgrounds/gradient-background-leakage-2.html
324
325         * rendering/RenderBox.cpp:
326         (WebCore::RenderBox::determineBackgroundBleedAvoidance):
327         (WebCore::RenderBox::backgroundHasOpaqueTopLayer):
328         * rendering/RenderBox.h:
329         (RenderBox):
330
331 2012-12-12  Ilya Tikhonovsky  <loislo@chromium.org>
332
333         Web Inspector: instrument static parts of RenderBlock and RenderBox
334         https://bugs.webkit.org/show_bug.cgi?id=104660
335
336         Reviewed by Yury Semikhatsky.
337
338         Plain vanilla instrumentation.
339
340         * dom/WebCoreMemoryInstrumentation.cpp:
341         (WebCore):
342         (WebCore::WebCoreMemoryInstrumentation::reportMemoryUsage):
343         * dom/WebCoreMemoryInstrumentation.h:
344         (WebCoreMemoryTypes):
345         (WebCoreMemoryInstrumentation):
346         (WebCore):
347         * inspector/InspectorMemoryAgent.cpp:
348         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
349         * rendering/RenderBlock.cpp:
350         (WebCore::RenderBlock::reportStaticMembersMemoryUsage):
351         (WebCore):
352         * rendering/RenderBlock.h:
353         (RenderBlock):
354         * rendering/RenderBox.cpp:
355         (WebCore::RenderBox::reportStaticMembersMemoryUsage):
356         (WebCore):
357         * rendering/RenderBox.h:
358         (RenderBox):
359
360 2012-12-12  Ilya Tikhonovsky  <loislo@chromium.org>
361
362         Web Inspector: Native Memory Instrumentation: remove fake root MemoryObjectInfo.
363         https://bugs.webkit.org/show_bug.cgi?id=104796
364
365         Reviewed by Yury Semikhatsky.
366
367         It was not a good idea to introduce a fake root MemoryObjectInfo.
368         It makes a problem when we visit an object without its own MemoryObjectType.
369
370         Example: RenderBox has a global pointer to a hash map.
371         HashMap doesn't have its own object type because it is a generic container.
372         It will inherit object type from the fake root memory object info.
373         The same could happen for another container in another class with other MemoryObjectType.
374
375         This fact forces me to create custom process method for root objects
376         because they need to have their own MemoryObjectInfo with customisable memory object type.
377
378         Drive by fix: InstrumentedPointer* was replaced with Wrapper* because actually it is using
379         for instrumented and not instrumented object classes.
380
381         * inspector/MemoryInstrumentationImpl.cpp:
382         (WebCore::MemoryInstrumentationImpl::processDeferredObjects):
383         (WebCore::MemoryInstrumentationImpl::deferObject):
384         (WebCore::MemoryInstrumentationImpl::reportMemoryUsage):
385         * inspector/MemoryInstrumentationImpl.h:
386         (MemoryInstrumentationImpl):
387
388 2012-12-12  Kondapally Kalyan  <kalyan.kondapally@intel.com>
389
390         [EFL [WebGL] [Wk2] Resizing the canvas breaks WebGL.
391         https://bugs.webkit.org/show_bug.cgi?id=104535.
392
393         Reviewed by Kenneth Rohde Christiansen.
394
395         GraphicsContext3DEfl does not re-create the surface on canvas resize, this
396         conflicted with the logic in coordinated graphics Layer.
397         CoordinatedGraphicsLayer checks for GraphicsSurfaceToken to decide if the surface
398         in UI-Process should be recreated or not. With this
399         patch we also check for size of the platform Layer.
400
401         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
402         (WebCore::GraphicsContext3D::createGraphicsSurfaces):
403         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
404         (GraphicsContext3DPrivate::didResizeCanvas):
405         (GraphicsContext3DPrivate::platformLayerSize):
406         * platform/graphics/efl/GraphicsContext3DPrivate.h:
407         (GraphicsContext3DPrivate):
408
409 2012-12-12  Antoine Quint  <graouts@apple.com>
410
411         Web Inspector: Crash in InspectorDOMAgent::pushNodePathToFrontend when inspecting document with CSS generated content
412         https://bugs.webkit.org/show_bug.cgi?id=104780
413
414         Reviewed by Pavel Feldman.
415
416         The pushNodePathForRenderLayerToFrontend() method added to InspectorDOMAgent naively assumed
417         that all RenderLayers have a Node associated to them. However, in the case of CSS generated
418         content, that will not be the case and we would call into pushNodePathToFrontend() with a 0
419         parameter that would hit the first ASSERT in this method. We're now checking that we indeed
420         have an associated node for the provided RenderLayer and return 0 in case we don't, without
421         calling into pushNodePathToFrontend().
422
423         Test: inspector-protocol/layer-tree-generated-content.html
424
425         * inspector/InspectorDOMAgent.cpp:
426         (WebCore::InspectorDOMAgent::pushNodePathForRenderLayerToFrontend):
427
428 2012-12-12  Alexander Pavlov  <apavlov@chromium.org>
429
430         Web Inspector: [Crash] Clear cached stylesheet rules in InspectorStyleSheet::deleteRule()
431         https://bugs.webkit.org/show_bug.cgi?id=104806
432
433         Reviewed by Vsevolod Vlasov.
434
435         Cached rules (m_flatRules) should get cleared whenever a rule is deleted.
436
437         Test: inspector/styles/undo-add-rule-crash.html
438
439         * inspector/InspectorStyleSheet.cpp:
440         (WebCore::InspectorStyleSheet::deleteRule):
441
442 2012-12-12  Stephen White  <senorblanco@chromium.org>
443
444         Unreviewed, rolling out r136975.
445         http://trac.webkit.org/changeset/136975
446         https://bugs.webkit.org/show_bug.cgi?id=90405
447
448         Correctness issues.
449
450         * dom/Element.cpp:
451         * dom/Element.h:
452         (Element):
453         * dom/ElementRareData.h:
454         (ElementRareData):
455         (WebCore::ElementRareData::ElementRareData):
456         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
457         (WebCore::BitmapTextureImageBuffer::applyFilters):
458         * rendering/FilterEffectRenderer.cpp:
459         (WebCore::createCustomFilterEffect):
460         (WebCore::FilterEffectRenderer::buildReferenceFilter):
461         (WebCore::FilterEffectRenderer::build):
462         * rendering/FilterEffectRenderer.h:
463         (FilterEffectRenderer):
464         * rendering/RenderLayer.cpp:
465         (WebCore::RenderLayer::updateOrRemoveFilterEffectRenderer):
466         * rendering/RenderObject.cpp:
467         (WebCore::RenderObject::willBeDestroyed):
468         * rendering/svg/RenderSVGResourceContainer.cpp:
469         (WebCore::RenderSVGResourceContainer::registerResource):
470         * rendering/svg/SVGResources.cpp:
471         (WebCore::SVGResources::buildCachedResources):
472         * rendering/svg/SVGResourcesCache.cpp:
473         (WebCore::SVGResourcesCache::addResourcesFromRenderObject):
474         (WebCore::SVGResourcesCache::clientStyleChanged):
475         (WebCore::SVGResourcesCache::resourceDestroyed):
476         * svg/SVGDocumentExtensions.cpp:
477         (WebCore::SVGDocumentExtensions::addPendingResource):
478         (WebCore::SVGDocumentExtensions::isElementPendingResources):
479         (WebCore::SVGDocumentExtensions::isElementPendingResource):
480         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
481         (WebCore::SVGDocumentExtensions::removeElementFromPendingResourcesForRemoval):
482         * svg/SVGDocumentExtensions.h:
483         (WebCore):
484         (SVGDocumentExtensions):
485         * svg/SVGElement.cpp:
486         (WebCore::SVGElement::hasPendingResources):
487         (WebCore):
488         (WebCore::SVGElement::setHasPendingResources):
489         (WebCore::SVGElement::clearHasPendingResourcesIfPossible):
490         * svg/SVGElement.h:
491         (SVGElement):
492         (WebCore::SVGElement::buildPendingResource):
493         * svg/SVGElementRareData.h:
494         (WebCore::SVGElementRareData::SVGElementRareData):
495         (WebCore::SVGElementRareData::hasPendingResources):
496         (WebCore::SVGElementRareData::setHasPendingResources):
497         (SVGElementRareData):
498         * svg/SVGStyledElement.cpp:
499         (WebCore::SVGStyledElement::buildPendingResourcesIfNeeded):
500
501 2012-12-12  Stephen White  <senorblanco@chromium.org>
502
503         Unreviewed, rolling out r137022.
504         http://trac.webkit.org/changeset/137022
505
506         Precursor to rollout of 136975.
507
508         * rendering/svg/SVGResources.cpp:
509         (WebCore::SVGResources::buildCachedResources):
510
511 2012-12-12  Stephen White  <senorblanco@chromium.org>
512
513         Unreviewed, rolling out r137027.
514         http://trac.webkit.org/changeset/137027
515
516         Precursor to rollout of 136975.
517
518         * dom/ElementRareData.h:
519         (ElementRareData):
520
521 2012-12-12  Alexei Filippov  <alph@chromium.org>
522
523         Web Inspector: add memory used by memory allocator itself to NMI
524         https://bugs.webkit.org/show_bug.cgi?id=93372
525
526         Make native memory instrumentation report memory retained
527         for the memory allocator internal purposes.
528
529         Reviewed by Yury Semikhatsky.
530
531         * inspector/front-end/NativeMemorySnapshotView.js:
532         (WebInspector.MemoryBlockViewProperties._initialize):
533         * platform/chromium/MemoryUsageSupportChromium.cpp:
534         (WebCore::MemoryUsageSupport::memoryUsageByComponents):
535
536 2012-12-12  Sheriff Bot  <webkit.review.bot@gmail.com>
537
538         Unreviewed, rolling out r137438.
539         http://trac.webkit.org/changeset/137438
540         https://bugs.webkit.org/show_bug.cgi?id=104798
541
542         assertion reached when removing tile (Requested by tmpsantos
543         on #webkit).
544
545         * page/Frame.cpp:
546         (WebCore::Frame::setTiledBackingStoreEnabled):
547         * platform/graphics/TiledBackingStore.cpp:
548         (WebCore::TiledBackingStore::TiledBackingStore):
549         (WebCore::TiledBackingStore::setTileCreationDelay):
550         (WebCore::TiledBackingStore::coverWithTilesIfNeeded):
551         (WebCore::TiledBackingStore::updateTileBuffers):
552         (WebCore::TiledBackingStore::createTiles):
553         (WebCore::TiledBackingStore::isTileBufferUpdatesSuspended):
554         (WebCore::TiledBackingStore::startTileBufferUpdateTimer):
555         (WebCore::TiledBackingStore::tileBufferUpdateTimerFired):
556         (WebCore::TiledBackingStore::startBackingStoreUpdateTimer):
557         (WebCore::TiledBackingStore::backingStoreUpdateTimerFired):
558         * platform/graphics/TiledBackingStore.h:
559         (TiledBackingStore):
560         (WebCore::TiledBackingStore::tileCreationDelay):
561         * platform/graphics/TiledBackingStoreClient.h:
562         (WebCore::TiledBackingStoreClient::tiledBackingStoreUpdatesAllowed):
563
564 2012-12-12  Csaba Osztrogonác  <ossy@webkit.org>
565
566         [Qt] Unreviewed typo fix after r137446.
567
568         * WebCore.pri:
569
570 2012-12-12  Zan Dobersek  <zandobersek@gmail.com>
571
572         [GTK] Remove the last of unnecessary configuration options in configure.ac
573         https://bugs.webkit.org/show_bug.cgi?id=104793
574
575         Reviewed by Martin Robinson.
576
577         Remove the feature define overriding that's based on the automake variables which are
578         not set anymore due to the corresponding configuration options being removed.
579
580         No new tests - no new functionality.
581
582         * GNUmakefile.am:
583
584 2012-12-12  Simon Hausmann  <simon.hausmann@digia.com>
585
586         [Qt] Fix build on Mac
587
588         Reviewed by Csaba Osztrogonác.
589
590         On Mac OS X we have sqlite as a system library available.
591
592         * WebCore.pri:
593
594 2012-12-12  Simon Hausmann  <simon.hausmann@digia.com>
595
596         [Qt] Fix linkage against SQLite
597         https://bugs.webkit.org/show_bug.cgi?id=104781
598
599         Reviewed by Csaba Osztrogonác.
600
601         Detect SQLite either through pkg-config, from the SQLITE3SRCDIR
602         environment variable or from qtbase via a qt5.git build. Bail out early
603         with an error message if neither option applies.
604
605         This removes the usage of $$QT.core.sources and the dependency on Qt's
606         system-sqlite configure setting. We should always favour a system
607         library over a copy in Qt.
608
609         * Target.pri:
610         * WebCore.pri:
611
612 2012-12-12  Allan Sandfeld Jensen  <allan.jensen@digia.com>
613
614         [TexMap] Uninitialized m_context pointer in TextureMapper
615         https://bugs.webkit.org/show_bug.cgi?id=104785
616
617         Reviewed by Kenneth Rohde Christiansen.
618
619         * platform/graphics/texmap/TextureMapper.cpp:
620         (WebCore::TextureMapper::TextureMapper):
621         * platform/graphics/texmap/TextureMapperGL.cpp:
622         (WebCore::TextureMapperGL::TextureMapperGL):
623
624 2012-12-12  Tommy Widenflycht  <tommyw@google.com>
625
626         MediaStream API: Change the data channel descriptor pattern to a handler pattern
627         https://bugs.webkit.org/show_bug.cgi?id=104543
628
629         Reviewed by Kent Tamura.
630
631         In short the code is refactured to use the Handler/Client pattern (see RTCPeerConnectionHandler)
632         instead of the Descriptor pattern.
633         This will fix lifetime/memory/code structure issues in the chromium port.
634
635         Existing tests cover this patch.
636
637         * CMakeLists.txt:
638         * GNUmakefile.list.am:
639         * Modules/mediastream/RTCDataChannel.cpp:
640         (WebCore::RTCDataChannel::create):
641         (WebCore::RTCDataChannel::RTCDataChannel):
642         (WebCore::RTCDataChannel::~RTCDataChannel):
643         (WebCore::RTCDataChannel::label):
644         (WebCore::RTCDataChannel::reliable):
645         (WebCore::RTCDataChannel::readyState):
646         (WebCore::RTCDataChannel::bufferedAmount):
647         (WebCore::RTCDataChannel::send):
648         (WebCore::RTCDataChannel::close):
649         (WebCore::RTCDataChannel::didChangeReadyState):
650         (WebCore::RTCDataChannel::didReceiveStringData):
651         (WebCore::RTCDataChannel::didReceiveRawData):
652         (WebCore::RTCDataChannel::didDetectError):
653         (WebCore::RTCDataChannel::stop):
654         * Modules/mediastream/RTCDataChannel.h:
655         (WebCore):
656         (RTCDataChannel):
657         * Modules/mediastream/RTCPeerConnection.cpp:
658         (WebCore::RTCPeerConnection::didAddRemoteDataChannel):
659         * Modules/mediastream/RTCPeerConnection.h:
660         (RTCPeerConnection):
661         * WebCore.gypi:
662         * platform/chromium/support/WebRTCDataChannel.cpp: Removed.
663         * platform/mediastream/RTCDataChannelDescriptor.h: Removed.
664         * platform/mediastream/RTCDataChannelHandler.h: Copied from Source/WebCore/platform/mediastream/RTCDataChannelDescriptor.cpp.
665         (WebCore):
666         (RTCDataChannelHandler):
667         (WebCore::RTCDataChannelHandler::~RTCDataChannelHandler):
668         * platform/mediastream/RTCDataChannelHandlerClient.h: Renamed from Source/WebCore/platform/mediastream/RTCDataChannelDescriptor.cpp.
669         (WebCore):
670         (RTCDataChannelHandlerClient):
671         (WebCore::RTCDataChannelHandlerClient::~RTCDataChannelHandlerClient):
672         * platform/mediastream/RTCPeerConnectionHandler.cpp:
673         (WebCore):
674         (WebCore::RTCPeerConnectionHandler::create):
675         * platform/mediastream/RTCPeerConnectionHandler.h:
676         (WebCore):
677         (RTCPeerConnectionHandler):
678         * platform/mediastream/RTCPeerConnectionHandlerClient.h:
679         (WebCore):
680         (RTCPeerConnectionHandlerClient):
681         * platform/mediastream/chromium/RTCDataChannelHandlerChromium.cpp: Added.
682         (WebCore):
683         (WebCore::RTCDataChannelHandlerChromium::create):
684         (WebCore::RTCDataChannelHandlerChromium::RTCDataChannelHandlerChromium):
685         (WebCore::RTCDataChannelHandlerChromium::~RTCDataChannelHandlerChromium):
686         (WebCore::RTCDataChannelHandlerChromium::setClient):
687         (WebCore::RTCDataChannelHandlerChromium::label):
688         (WebCore::RTCDataChannelHandlerChromium::isReliable):
689         (WebCore::RTCDataChannelHandlerChromium::bufferedAmount):
690         (WebCore::RTCDataChannelHandlerChromium::sendStringData):
691         (WebCore::RTCDataChannelHandlerChromium::sendRawData):
692         (WebCore::RTCDataChannelHandlerChromium::close):
693         (WebCore::RTCDataChannelHandlerChromium::didChangeReadyState):
694         (WebCore::RTCDataChannelHandlerChromium::didReceiveStringData):
695         (WebCore::RTCDataChannelHandlerChromium::didReceiveRawData):
696         (WebCore::RTCDataChannelHandlerChromium::didDetectError):
697         * platform/mediastream/chromium/RTCDataChannelHandlerChromium.h: Added.
698         (WebCore):
699         (RTCDataChannelHandlerChromium):
700         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
701         (WebCore::RTCPeerConnectionHandlerChromium::createDataChannel):
702         (WebCore::RTCPeerConnectionHandlerChromium::didAddRemoteDataChannel):
703         * platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
704         (WebCore):
705         (RTCPeerConnectionHandlerChromium):
706
707 2012-12-12  Huang Dongsung  <luxtella@company100.net>
708
709         Coordinated Graphics: Refactor TiledBackingStore code in CoordinatedGraphicsLayer.
710         https://bugs.webkit.org/show_bug.cgi?id=103959
711
712         Reviewed by Kenneth Rohde Christiansen.
713
714         TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop() is used when class
715         methods cannot be called asynchronously by client. Updates of tiles are
716         committed as soon as all the events in event queue have been processed.
717         After this patch Frame sets m_commitTileUpdatesOnIdleEventLoop to true.
718
719         In addition, remove TiledBackingStoreClient::tiledBackingStoreUpdatesAllowed()
720         which was introduced for Coordinated Graphics.
721
722         Refactoring covered by existing tests.
723
724         * page/Frame.cpp:
725         (WebCore::Frame::setTiledBackingStoreEnabled):
726         * platform/graphics/TiledBackingStore.cpp:
727         (WebCore::TiledBackingStore::TiledBackingStore):
728         (WebCore::TiledBackingStore::setTrajectoryVector):
729           Separate setting a trajectory vector from coverWithTilesIfNeeded().
730         (WebCore::TiledBackingStore::coverWithTilesIfNeeded):
731         (WebCore::TiledBackingStore::updateTileBuffers):
732         (WebCore::TiledBackingStore::createTiles):
733         (WebCore::TiledBackingStore::isTileBufferUpdatesSuspended):
734         (WebCore::TiledBackingStore::startTileBufferUpdateTimer):
735         (WebCore::TiledBackingStore::tileBufferUpdateTimerFired):
736         (WebCore::TiledBackingStore::startBackingStoreUpdateTimer):
737         (WebCore::TiledBackingStore::backingStoreUpdateTimerFired):
738         * platform/graphics/TiledBackingStore.h:
739         (TiledBackingStore):
740         (WebCore::TiledBackingStore::setCommitTileUpdatesOnIdleEventLoop):
741         * platform/graphics/TiledBackingStoreClient.h:
742         (WebCore::TiledBackingStoreClient::tiledBackingStoreHasPendingTileCreation):
743             If TiledBackingStore does not create all tiles, TiledBackingStore
744             notifies a client of needing to create tiles more, when
745             m_commitTileUpdatesOnIdleEventLoop is false.
746
747 2012-12-11  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
748
749         [Qt] Fix the inspector not showing up on Windows
750         https://bugs.webkit.org/show_bug.cgi?id=104677
751
752         Reviewed by Simon Hausmann.
753
754         * Target.pri:
755
756 2012-11-29  Yury Semikhatsky  <yurys@chromium.org>
757
758         Web Inspector: Heap snapshot crashes on any page in MacOS Canary
759         https://bugs.webkit.org/show_bug.cgi?id=103076
760
761         Reviewed by Adam Barth.
762
763         Provide global object name resolver to the heap profiler. The callback allows
764         to safely retrieve document URL to be used as a label for corresponding global
765         object in the heap snapshot.
766
767         Test: inspector-protocol/take-heap-snapshot.html
768
769         * bindings/v8/ScriptProfiler.cpp:
770         (WebCore):
771         (WebCore::ScriptProfiler::takeHeapSnapshot):
772
773 2012-12-12  Sheriff Bot  <webkit.review.bot@gmail.com>
774
775         Unreviewed, rolling out r137428.
776         http://trac.webkit.org/changeset/137428
777         https://bugs.webkit.org/show_bug.cgi?id=104776
778
779         It broke the build everywhere (Requested by Ossy on #webkit).
780
781         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
782         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
783         * platform/graphics/texmap/TextureMapperGL.cpp:
784         (WebCore::TextureMapperGL::drawQuad):
785         (WebCore::TextureMapperGL::drawBorder):
786         (WebCore::TextureMapperGL::drawTexture):
787         (WebCore):
788         (WebCore::TextureMapperGL::drawTextureRectangleARB):
789         (WebCore::TextureMapperGL::drawSolidColor):
790         (WebCore::TextureMapperGL::drawTextureWithAntialiasing):
791         (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
792         * platform/graphics/texmap/TextureMapperGL.h:
793         (TextureMapperGL):
794         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
795         (WebCore::getShaderSpec):
796         * platform/graphics/texmap/TextureMapperShaderManager.h:
797         (TextureMapperShaderProgram):
798
799 2012-12-12  Martin Robinson  <mrobinson@igalia.com>
800
801         Web inspector prints a warning about "Debug" not being localized
802         https://bugs.webkit.org/show_bug.cgi?id=104679
803
804         Reviewed by Vsevolod Vlasov.
805
806         Add a missing localization entry for the "Debug" string which is used in the web
807         inspector front-end. This prevents warnings about a missing localized version
808         of the word "Debug" and allows it to be properly localized.
809
810         * English.lproj/localizedStrings.js: Add "Debug"
811
812 2012-12-12  Shinya Kawanaka  <shinyak@chromium.org>
813
814         [Shadow DOM] Implement HTMLShadowElement::olderShadowRoot
815         https://bugs.webkit.org/show_bug.cgi?id=104218
816
817         Reviewed by Hajime Morita.
818
819         Implements HTMLShadowElement::olderShadowRoot, which returns the ShadowRoot the HTMLShadowElement is assigned to.
820         When such ShadowRoot does not exist, 0 is returned.
821
822         Test: fast/dom/shadow/olderShadowRoot-in-shadowelement.html
823
824         * dom/ElementShadow.cpp:
825         (WebCore::ElementShadow::ensureDistributionFromDocument): Ensures distribution of this ElementShadow and
826         all of the parent TreeScope distribution. This function will be shared for Bug 104345.
827         (WebCore):
828         * dom/ElementShadow.h:
829         (ElementShadow):
830         * html/shadow/HTMLShadowElement.cpp:
831         (WebCore::HTMLShadowElement::olderShadowRoot):
832         (WebCore):
833         * html/shadow/HTMLShadowElement.h:
834         * html/shadow/HTMLShadowElement.idl:
835
836 2012-12-12  No'am Rosenthal  <noam@webkit.org>
837
838         [Texmap] Consolidate redundant code for ARB_RECT texture
839         https://bugs.webkit.org/show_bug.cgi?id=104705
840
841         Reviewed by Kenneth Rohde Christiansen.
842
843         Instead of having a whole different function for RECT textures,
844         keep the existing functions and pass a flag that tells
845         TextureMapperGL to use the non-normalized coordinates and the
846         RECT shaders.
847
848         No new tests, refactor only. Tested to not break WebGL on
849         Qt-Mac.
850
851         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
852         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
853         * platform/graphics/texmap/TextureMapperGL.cpp:
854         (WebCore::TextureMapperGL::drawQuad):
855             Compensate for rect textures in drawQuad.
856
857         (WebCore::TextureMapperGL::drawBorder):
858         (WebCore::TextureMapperGL::drawTexture):
859         (WebCore::TextureMapperGL::drawSolidColor):
860         (WebCore::TextureMapperGL::drawTextureWithAntialiasing):
861         (WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
862             Pass flags to TextureMapperGL::drawQuad instead of a bool.
863
864         * platform/graphics/texmap/TextureMapperGL.h:
865         (TextureMapperGL):
866         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
867         (WebCore::getShaderSpec):
868         * platform/graphics/texmap/TextureMapperShaderManager.h:
869         (TextureMapperShaderProgram):
870             Compensate for the texture-size in the vertex
871             shader instead of in the fragment shader.
872
873 2012-12-11  Hayato Ito  <hayato@chromium.org>
874
875         REGRESSION(r137408): breaks chromium's browser tests which use WebKitShadowRoot (Requested by hayato on #webkit).
876         https://bugs.webkit.org/show_bug.cgi?id=104770
877
878         Unreviewed, build fix.
879
880         * dom/ShadowRoot.idl:
881         * page/DOMWindow.idl:
882
883 2012-12-11  Sheriff Bot  <webkit.review.bot@gmail.com>
884
885         Unreviewed, rolling out r137333, r137344, r137364, and
886         r137377.
887         http://trac.webkit.org/changeset/137333
888         http://trac.webkit.org/changeset/137344
889         http://trac.webkit.org/changeset/137364
890         http://trac.webkit.org/changeset/137377
891         https://bugs.webkit.org/show_bug.cgi?id=104771
892
893         Caused a raft of browser_test failures in Chromium (Requested
894         by aklein on #webkit).
895
896         * loader/DocumentLoader.cpp:
897         (WebCore::DocumentLoader::setRequest):
898         (WebCore::DocumentLoader::subresource):
899         (WebCore::DocumentLoader::addSubresourceLoader):
900         (WebCore::DocumentLoader::removeSubresourceLoader):
901         (WebCore::DocumentLoader::startLoadingMainResource):
902         * loader/MainResourceLoader.cpp:
903         (WebCore::MainResourceLoader::MainResourceLoader):
904         (WebCore::MainResourceLoader::~MainResourceLoader):
905         (WebCore::MainResourceLoader::receivedError):
906         (WebCore::MainResourceLoader::willCancel):
907         (WebCore::MainResourceLoader::didCancel):
908         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
909         (WebCore::MainResourceLoader::addData):
910         (WebCore::MainResourceLoader::willSendRequest):
911         (WebCore::MainResourceLoader::continueAfterContentPolicy):
912         (WebCore::MainResourceLoader::didReceiveResponse):
913         (WebCore::MainResourceLoader::didReceiveData):
914         (WebCore::MainResourceLoader::didFinishLoading):
915         (WebCore::MainResourceLoader::didFail):
916         (WebCore::MainResourceLoader::reportMemoryUsage):
917         (WebCore::MainResourceLoader::handleSubstituteDataLoadNow):
918         (WebCore::MainResourceLoader::loadNow):
919         (WebCore):
920         (WebCore::MainResourceLoader::load):
921         (WebCore::MainResourceLoader::setDefersLoading):
922         * loader/MainResourceLoader.h:
923         (MainResourceLoader):
924         * loader/ResourceLoader.cpp:
925         (WebCore::ResourceLoader::willSendRequest):
926         * loader/ResourceLoader.h:
927         (ResourceLoader):
928         (WebCore::ResourceLoader::defersLoading):
929         * loader/SubresourceLoader.cpp:
930         (WebCore::SubresourceLoader::willSendRequest):
931         * loader/appcache/ApplicationCacheHost.cpp:
932         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse):
933         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError):
934         * loader/cache/CachedRawResource.cpp:
935         (WebCore::CachedRawResource::willSendRequest):
936         * loader/cache/CachedResourceLoader.cpp:
937         (WebCore::CachedResourceLoader::loadDone):
938         * loader/mac/DocumentLoaderMac.cpp:
939         (WebCore::DocumentLoader::schedule):
940         (WebCore::DocumentLoader::unschedule):
941
942 2012-12-11  Kentaro Hara  <haraken@chromium.org>
943
944         Unreviewed, rolling out r137398.
945         http://trac.webkit.org/changeset/137398
946         https://bugs.webkit.org/show_bug.cgi?id=104188
947
948         A bunch of webaudio tests hit ASSERTs
949
950         * CMakeLists.txt:
951         * DerivedSources.make:
952         * DerivedSources.pri:
953         * GNUmakefile.list.am:
954         * Modules/webaudio/AudioContext.cpp:
955         (WebCore::AudioContext::createOfflineContext):
956         (WebCore):
957         * Modules/webaudio/AudioContext.h:
958         (AudioContext):
959         * Modules/webaudio/DOMWindowWebAudio.idl:
960         * Modules/webaudio/OfflineAudioContext.cpp: Removed.
961         * Modules/webaudio/OfflineAudioContext.h: Removed.
962         * Modules/webaudio/OfflineAudioContext.idl: Removed.
963         * WebCore.gypi:
964         * WebCore.xcodeproj/project.pbxproj:
965         * bindings/generic/RuntimeEnabledFeatures.h:
966         * bindings/js/JSAudioContextCustom.cpp:
967         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
968         * bindings/v8/custom/V8AudioContextCustom.cpp:
969         (WebCore::V8AudioContext::constructorCallbackCustom):
970
971 2012-12-11  Shinya Kawanaka  <shinyak@chromium.org>
972
973         [Shadow DOM] registering InsertionPoints to ShadowRoot should work out of a document.
974         https://bugs.webkit.org/show_bug.cgi?id=104346
975
976         Reviewed by Hajime Morita.
977
978         We need to register InsertionPoints even if ShadowRoot is out of Document, since distribution should work
979         out of Document, too.
980
981         Instead of checking isInDocument(), we have to make sure InsertionPoint and an element which InsertionPoint
982         inserted into have the same treescope.
983
984         Tests: fast/dom/shadow/has-content-elements.html
985                fast/dom/shadow/has-shadow-insertion-point.html
986
987         * html/shadow/InsertionPoint.cpp:
988         (WebCore::InsertionPoint::insertedInto):
989         (WebCore::InsertionPoint::removedFrom):
990
991 2012-12-11  Takashi Sakamoto  <tasak@google.com>
992
993         Text nodes in shadow roots don't inherit style properly
994         https://bugs.webkit.org/show_bug.cgi?id=101116
995
996         Reviewed by Hajime Morita.
997
998         Use NodeRenderingContext to resolve styles of text nodes.
999         If text nodes are direct children of shadow roots, the text nodes
1000         should be inherited styles from their shadow hosts.
1001         But if reset-style-inheritance flag is true, the text nodes should
1002         not be inherited. And if text nodes are distributed nodes,
1003         we have to check whether their insertion point's
1004         reset-style-inheritance.
1005         c.f. shadow dom spec is:
1006         http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#styles
1007
1008         Test: fast/dom/shadow/text-node-in-shadow.html
1009
1010         * css/StyleResolver.cpp:
1011         (WebCore::StyleResolver::styleForElement):
1012         Modified to use defaultStyleForElement if the given element has
1013         no parent style.
1014         (WebCore::StyleResolver::initForStyleResolve):
1015         Removed shouldResetStyleInheritance, because now NodeRenderingContext
1016         resetStyleInheritance() takes care of reset-style-inheritance of
1017         both shadow roots and insertion points.
1018         (WebCore::StyleResolver::defaultStyleForElement):
1019         Added to create a default style for elements.
1020         (WebCore):
1021         (WebCore::StyleResolver::styleForText):
1022         Use NodeRenderingContext to find the parent node for style from the
1023         given text node. If no parent node is found or reset-style-inheritance
1024         is true, returns a default style (i.e. empty render style).
1025         Otherwise, just returns the found node's style.
1026         * css/StyleResolver.h:
1027         (StyleResolver):
1028         * dom/ComposedShadowTreeWalker.cpp:
1029         (WebCore::ComposedShadowTreeWalker::ParentTraversalDetails::didTraverseInsertionPoint):
1030         Modify to consider insertion point's resetStyleInheritance.
1031         * dom/NodeRenderingContext.cpp:
1032         (WebCore::NodeRenderingContext::createRendererForTextIfNeeded):
1033         Since NodeRenderingContext has already found a parent node for
1034         rendering and style and a parentRenderer is just the found node's
1035         renderer, we have to only check reset-style-inheritance.
1036         If reset, use default style. Otherwise, the parentRenderer's style.
1037         * dom/Text.cpp:
1038         (WebCore::Text::recalcTextStyle):
1039         Use styleForText instead of parentRenderer's styles if the given text
1040         node is a direct child of a shadow root or a direct child of a shadow
1041         host.
1042
1043 2012-12-11  Takashi Sakamoto  <tasak@google.com>
1044
1045         Hide HOST_RULE behind SHADOW_DOM flag.
1046         https://bugs.webkit.org/show_bug.cgi?id=102321
1047
1048         Reviewed by Dimitri Glazkov.
1049
1050         @host @-rules are only available when the rules are declared in styles
1051         in shadow dom trees. So if SHADOW_DOM is disabled, we don't need
1052         @host @-rules.
1053
1054         No new tests. Just hide HOST_RULE behind SHADOW_DOM flag.
1055
1056         * css/StyleResolver.h:
1057         Hide "class ShadowRuleHost".
1058         * css/StyleRule.cpp:
1059         (WebCore::StyleRuleBase::reportMemoryUsage):
1060         (WebCore::StyleRuleBase::destroy):
1061         (WebCore::StyleRuleBase::copy):
1062         (WebCore::StyleRuleBase::createCSSOMWrapper):
1063         * css/StyleRule.h:
1064         (StyleRuleBase):
1065         Hide "Host" type and isHostRule.
1066         (StyleRuleHost):
1067         Hide "class StyleRuleHost".
1068         * css/StyleSheetContents.cpp:
1069         (WebCore::childRulesHaveFailedOrCanceledSubresources):
1070
1071 2012-12-11  Dominic Mazzoni  <dmazzoni@google.com>
1072
1073         AX: accessibilityIsIgnored should avoid computing textUnderElement
1074         https://bugs.webkit.org/show_bug.cgi?id=104688
1075
1076         Reviewed by Chris Fleizach.
1077
1078         Simplify the logic in accessibilityIsIgnored without affecting
1079         the results of any tests. In particular, avoid expensive calls to
1080         textUnderElement.
1081
1082         Covered by existing tests.
1083
1084         * accessibility/AccessibilityNodeObject.cpp:
1085         (WebCore::AccessibilityNodeObject::isGenericFocusableElement):
1086         * accessibility/AccessibilityRenderObject.cpp:
1087         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1088
1089 2012-12-11  Kentaro Hara  <haraken@chromium.org>
1090
1091         [V8] Reachable event listeners on image elements can be collected in a minor DOM GC
1092         https://bugs.webkit.org/show_bug.cgi?id=104734
1093
1094         Reviewed by Kenneth Russell.
1095
1096         A major DOM GC treats image elements specially. In
1097         V8GCController::opaqueRootForGC(), a major DOM GC puts image elements
1098         that have pending activities into the same object group of their document.
1099         This guarantees that image elements that have pending activities
1100         are not garbage collected in the major DOM GC.
1101
1102         This patch adds the same special handling to a minor DOM GC to guarantee
1103         the same thing in the minor DOM GC too.
1104
1105         In long-term, we might want to remove the special handling by making
1106         image elements active DOM nodes.
1107
1108         Test: Manually confirmed that all characters in
1109         http://alteredqualia.com/three/examples/webgl_animation_skinning_tf2.html
1110         are rendered correctly.
1111
1112         * bindings/v8/V8GCController.cpp:
1113         (WebCore::V8GCController::opaqueRootForGC):
1114         (WebCore::gcTree):
1115
1116 2012-12-11  Dominic Mazzoni  <dmazzoni@google.com>
1117
1118         AX: Make isActionSupported cross-platform.
1119         https://bugs.webkit.org/show_bug.cgi?id=104681
1120
1121         Reviewed by Chris Fleizach.
1122
1123         Add UserGestureIndicator to increment() and decrement()
1124         so that all accessibility actions are treated as
1125         user actions, not scripted actions.
1126
1127         * accessibility/AccessibilityNodeObject.cpp:
1128         (WebCore::AccessibilityNodeObject::increment):
1129         (WebCore::AccessibilityNodeObject::decrement):
1130
1131 2012-12-11  Viatcheslav Ostapenko  <v.ostapenko@samsung.com>
1132
1133         Remove conversion to/from float and float division from ImageFrame::setRGBA
1134         https://bugs.webkit.org/show_bug.cgi?id=103693
1135
1136         Reviewed by Brent Fulgham.
1137
1138         Replace floating point operations used for alpha premultiply with fixed point arithmetic
1139         which is basically integer operations. Allows to shave extra couple percent from decoding
1140         images with transparency.
1141
1142         Covered by existing tests.
1143
1144         * platform/image-decoders/ImageDecoder.h:
1145         (ImageFrame):
1146         (WebCore::ImageFrame::fixPointUnsignedMultiply):
1147         (WebCore::ImageFrame::setRGBA):
1148
1149 2012-12-11  Kihong Kwon  <kihong.kwon@samsung.com>
1150
1151         Vibration API: IDL type doesn't match implementation type
1152         https://bugs.webkit.org/show_bug.cgi?id=103899
1153
1154         Reviewed by Kentaro Hara.
1155
1156         According to WebIDL, "unsigned long" corresponds to "unsigned" in the platform.
1157         Therefore unsigned long need to be changed to unsigned for the Vibration API.
1158         - Change a parameter type of vibrate function from unsigned long to unsigned.
1159
1160         No new tests, it is covered by exist test.
1161
1162         * Modules/vibration/NavigatorVibration.cpp:
1163         (WebCore::NavigatorVibration::vibrate):
1164         * Modules/vibration/NavigatorVibration.h:
1165         (NavigatorVibration):
1166         * Modules/vibration/Vibration.cpp:
1167         (WebCore::Vibration::vibrate):
1168         * Modules/vibration/Vibration.h:
1169         (Vibration):
1170         * Modules/vibration/VibrationClient.h:
1171         (VibrationClient):
1172         * bindings/js/JSDOMBinding.h:
1173         * bindings/scripts/CodeGeneratorJS.pm:
1174         Remove workaround codes for the Vibration API which is mapped from unsigned long to unsigned long.
1175         It should be mapped from unsigned long to unsigned by WebIDL spec.
1176         (GetNativeVectorInnerType):
1177         * bindings/scripts/test/JS/JSTestObj.cpp:
1178         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
1179         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
1180
1181 2012-12-11  Xinazhu Wang  <wangxianzhu@chromium.org>
1182
1183         ScrollingCoordinator::hasVisibleSlowRepaintFixedObject() should exclude out-of-view fixed position elements
1184         https://bugs.webkit.org/show_bug.cgi?id=102543
1185
1186         Let RenderLayerCompositor manage the reasons that fixed position elements are not composited.
1187         Check the reason in ScrollingCoordinator::hasVisibleSlowRepaintFixedObjects(), don't let fixed position layer not composited with explicit reasons cause slow scrolling.
1188
1189         Reviewed by James Robinson.
1190
1191         Test: compositing/layer-creation/fixed-position-out-of-view-scroll-reason.html
1192
1193         * page/scrolling/ScrollingCoordinator.cpp:
1194         (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintFixedObjects): Exclude fixed position elements that are not composited for explicit reasons.
1195         * rendering/RenderLayerCompositor.cpp:
1196         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Manages m_fixedPositionLayerNotCompositedReasonMap.
1197         (WebCore::RenderLayerCompositor::needsToBeComposited):
1198         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
1199         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1200         * rendering/RenderLayerCompositor.h:
1201         (WebCore::RenderLayerCompositor::fixedPositionLayerNotCompositedReason): Now outputs fixedPositionLayerNotCompositedreason.
1202         (RenderLayerCompositor):
1203
1204 2012-12-11  Hayato Ito  <hayato@chromium.org>
1205
1206         [Shadow DOM] Kill ShadowRoot constructor
1207         https://bugs.webkit.org/show_bug.cgi?id=102913
1208
1209         Reviewed by Dimitri Glazkov.
1210
1211         Remove ShadowRoot constructor in favor of Element.webkitCreateShadowRoot().
1212
1213         No new tests. Update existing tests.
1214
1215         * dom/ShadowRoot.idl:
1216         * page/DOMWindow.idl:
1217         * testing/Internals.cpp:
1218         (WebCore::Internals::createShadowRoot):
1219         (WebCore):
1220         * testing/Internals.h:
1221         (Internals):
1222         * testing/Internals.idl:
1223
1224 2012-12-11  Antti Koivisto  <antti@apple.com>
1225
1226         Add Element-specific traversal functions
1227         https://bugs.webkit.org/show_bug.cgi?id=104685
1228
1229         Reviewed by Ryosuke Niwa.
1230
1231         In many cases where we use NodeTraversal we really only want Elements. By having
1232         Element specific iteration functions we can tighten the code and make it faster too.
1233
1234         This patch adds ElementTraversal namespace, similar to NodeTraversal. It also switches
1235         bunch of NodeTraversal call sites that obviously only care about elements to using
1236         the new interface.
1237         
1238         This should be a speedup too as we avoid number of branches by not having to look
1239         for children of non-ContainerNodes and by allowing use of ContainerNode specific
1240         accessors.
1241
1242         * accessibility/AccessibilityRenderObject.cpp:
1243         (WebCore::AccessibilityRenderObject::addImageMapChildren):
1244         * css/SelectorChecker.cpp:
1245         (WebCore::linkAttribute):
1246         (WebCore::SelectorChecker::allVisitedStateChanged):
1247         (WebCore::SelectorChecker::visitedStateChanged):
1248         * css/StyleInvalidationAnalysis.cpp:
1249         (WebCore::elementMatchesSelectorScopes):
1250         (WebCore::StyleInvalidationAnalysis::invalidateStyle):
1251         * dom/ContainerNodeAlgorithms.h:
1252         (WebCore::ChildFrameDisconnector::collectDescendant):
1253         * dom/Document.cpp:
1254         (WebCore::Document::buildAccessKeyMap):
1255         (WebCore::Document::updateBaseURL):
1256         (WebCore::Document::processBaseElement):
1257         * dom/DocumentOrderedMap.cpp:
1258         (WebCore::DocumentOrderedMap::get):
1259         * dom/Element.cpp:
1260         (WebCore::Element::firstElementChild):
1261         * dom/Element.h:
1262         (WebCore):
1263         * dom/ElementShadow.cpp:
1264         (WebCore::ElementShadow::collectSelectFeatureSetFrom):
1265         * dom/NodeTraversal.h:
1266         (ElementTraversal):
1267         (WebCore):
1268         (WebCore::ElementTraversal::traverseNextElementTemplate):
1269         (WebCore::ElementTraversal::next):
1270         (WebCore::ElementTraversal::firstWithin):
1271         (WebCore::ElementTraversal::traverseNextElementSkippingChildrenTemplate):
1272         (WebCore::ElementTraversal::nextSkippingChildren):
1273         (NodeTraversal):
1274         * dom/TreeScope.cpp:
1275         (WebCore::TreeScope::labelElementForId):
1276         (WebCore::TreeScope::findAnchor):
1277         * editing/CompositeEditCommand.cpp:
1278         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
1279         * editing/DeleteSelectionCommand.cpp:
1280         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1281         * editing/FrameSelection.cpp:
1282         (WebCore::scanForForm):
1283         * editing/markup.cpp:
1284         (WebCore::completeURLs):
1285         * html/HTMLFieldSetElement.cpp:
1286         (WebCore::HTMLFieldSetElement::invalidateDisabledStateUnder):
1287         (WebCore::HTMLFieldSetElement::childrenChanged):
1288         (WebCore::HTMLFieldSetElement::legend):
1289         (WebCore::HTMLFieldSetElement::refreshElementsIfNeeded):
1290         * html/HTMLFormElement.cpp:
1291         (WebCore::HTMLFormElement::formElementIndex):
1292         * html/HTMLLabelElement.cpp:
1293         (WebCore::HTMLLabelElement::control):
1294         * html/HTMLLegendElement.cpp:
1295         (WebCore::HTMLLegendElement::associatedControl):
1296         * html/HTMLMapElement.cpp:
1297         (WebCore::HTMLMapElement::mapMouseEvent):
1298         * html/HTMLNameCollection.cpp:
1299         (WebCore::HTMLNameCollection::virtualItemAfter):
1300         * html/HTMLObjectElement.cpp:
1301         (WebCore::HTMLObjectElement::containsJavaApplet):
1302         * html/HTMLSelectElement.cpp:
1303         (WebCore::HTMLSelectElement::recalcListItems):
1304         * html/shadow/ContentDistributor.cpp:
1305         (WebCore::ShadowRootContentDistributionData::ensureInsertionPointList):
1306         * page/FocusController.cpp:
1307         (WebCore::FocusController::findFocusCandidateInContainer):
1308         * rendering/RenderCounter.cpp:
1309         (WebCore::nextInPreOrder):
1310         * svg/SVGSVGElement.cpp:
1311         (WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
1312         * svg/SVGStyledElement.cpp:
1313         (WebCore::SVGStyledElement::title):
1314         * svg/SVGUseElement.cpp:
1315         (WebCore::removeDisallowedElementsFromSubtree):
1316         * svg/animation/SMILTimeContainer.cpp:
1317         (WebCore::SMILTimeContainer::updateDocumentOrderIndexes):
1318
1319 2012-12-11  KyungTae Kim  <ktf.kim@samsung.com>
1320
1321         [soup] Unused parameter in ResourceHandleSoup.cpp
1322         https://bugs.webkit.org/show_bug.cgi?id=104728
1323
1324         Reviewed by Kentaro Hara.
1325
1326         The soupLogPrinter has unused parameter 'logger', 
1327         remove the parameter name to fix 'unused parameter' build warning.
1328
1329         * platform/network/soup/ResourceHandleSoup.cpp:
1330         (WebCore::soupLogPrinter):
1331
1332 2012-12-11  Xianzhu Wang  <wangxianzhu@chromium.org>
1333
1334         Fixed position out-of-view check is incorrect when page is scaled
1335         https://bugs.webkit.org/show_bug.cgi?id=104303
1336
1337         Reviewed by Kenneth Rohde Christiansen.
1338
1339         Test: compositing/layer-creation/fixed-position-out-of-view-scaled.html
1340               compositing/layer-creation/fixed-position-out-of-view-scaled-scroll.html
1341
1342         * rendering/RenderLayerCompositor.cpp:
1343         (WebCore::RenderLayerCompositor::requiresCompositingForPosition): Scale the content rect of the fixed position layer before checking out-of-view.
1344
1345 2012-12-11  Chris Rogers  <crogers@google.com>
1346
1347         Implement OfflineAudioContext constructor
1348         https://bugs.webkit.org/show_bug.cgi?id=104188
1349
1350         Reviewed by Kentaro Hara.
1351
1352         The Web Audio layout tests have relied on an undocumented way (in the specification) to render
1353         audio faster than realtime using an OfflineAudioContext.  We want to expose a proper OfflineAudioContext
1354         object and constructor instead of piggybacking off of the normal AudioContext.
1355             
1356         * CMakeLists.txt:
1357         * DerivedSources.make:
1358         * DerivedSources.pri:
1359         * GNUmakefile.list.am:
1360         * Modules/webaudio/AudioContext.cpp:
1361         (WebCore::AudioContext::isSampleRateRangeGood):
1362         * Modules/webaudio/AudioContext.h:
1363         (AudioContext):
1364         * Modules/webaudio/DOMWindowWebAudio.idl:
1365         * Modules/webaudio/OfflineAudioContext.cpp: Added.
1366         (WebCore):
1367         (WebCore::OfflineAudioContext::create):
1368         (WebCore::OfflineAudioContext::OfflineAudioContext):
1369         (WebCore::OfflineAudioContext::~OfflineAudioContext):
1370         * Modules/webaudio/OfflineAudioContext.h: Added.
1371         (WebCore):
1372         (OfflineAudioContext):
1373         * Modules/webaudio/OfflineAudioContext.idl: Added.
1374         * WebCore.gypi:
1375         * WebCore.xcodeproj/project.pbxproj:
1376         * bindings/generic/RuntimeEnabledFeatures.h:
1377         (WebCore::RuntimeEnabledFeatures::webkitOfflineAudioContextEnabled):
1378         * bindings/js/JSAudioContextCustom.cpp:
1379         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
1380         * bindings/v8/custom/V8AudioContextCustom.cpp:
1381         (WebCore::V8AudioContext::constructorCallbackCustom):
1382
1383 2012-12-11  Jun Jiang  <jun.a.jiang@intel.com>
1384
1385         WebGL: Avoid unnecessary memory copy or conversion in texImage2D and texSubImage2D for HTMLVideoElement
1386         https://bugs.webkit.org/show_bug.cgi?id=102161
1387
1388         Reviewed by Kenneth Russell.
1389
1390         There are several memory copy or conversions in the texImage2D and texSubImage2D for HTMLVideoElement which may be avoided. This patch removes the redundant BackingStore copy if the corresponding Graphics port supports the DontCopyBackingStore behavior. Moreover, it optimizes the AlphaOp if the Image source is from HTMLVideoElement to avoid unnecessary Unmultiply or Premultiply operation in unpack/pack. 
1391
1392         Already covered by current tests. 
1393
1394         * html/canvas/WebGLRenderingContext.cpp:
1395         (WebCore):
1396         (WebCore::WebGLRenderingContext::texImage2DImpl):
1397         (WebCore::WebGLRenderingContext::texImage2D):
1398         (WebCore::WebGLRenderingContext::videoFrameToImage): add a parameter to choose BackingStore copy behavior.
1399         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
1400         (WebCore::WebGLRenderingContext::texSubImage2D):
1401         * html/canvas/WebGLRenderingContext.h:
1402         (WebGLRenderingContext):
1403         * platform/graphics/GraphicsContext3D.cpp:
1404         (WebCore::GraphicsContext3D::ImageExtractor::ImageExtractor):
1405         * platform/graphics/GraphicsContext3D.h:
1406         (ImageExtractor):
1407         (WebCore::GraphicsContext3D::ImageExtractor::imageSourceUnpackAlignment):
1408         (WebCore::GraphicsContext3D::ImageExtractor::imageHtmlDomSource):
1409         * platform/graphics/ImageBuffer.h:
1410         (ImageBuffer):
1411         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
1412         (WebCore::GraphicsContext3D::ImageExtractor::extractImage): optimize the AlphaOp for HTMLVideoElement input.
1413         * platform/graphics/cairo/ImageBufferCairo.cpp:
1414         (WebCore::ImageBuffer::fastCopyImageMode):
1415         (WebCore):
1416         * platform/graphics/cg/ImageBufferCG.cpp:
1417         (WebCore::ImageBuffer::fastCopyImageMode):
1418         (WebCore):
1419         * platform/graphics/qt/ImageBufferQt.cpp:
1420         (WebCore::ImageBuffer::fastCopyImageMode):
1421         (WebCore):
1422         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
1423         (WebCore::GraphicsContext3D::ImageExtractor::extractImage): optimize the AlphaOp for HTMLVideoElement input.
1424         * platform/graphics/skia/ImageBufferSkia.cpp:
1425         (WebCore::ImageBuffer::fastCopyImageMode):
1426         (WebCore):
1427         * platform/graphics/wince/ImageBufferWinCE.cpp:
1428         (WebCore::ImageBuffer::fastCopyImageMode):
1429         (WebCore):
1430         * platform/graphics/wx/ImageBufferWx.cpp:
1431         (WebCore::ImageBuffer::fastCopyImageMode):
1432         (WebCore):
1433
1434 2012-12-11  Viatcheslav Ostapenko  <v.ostapenko@samsung.com>
1435
1436         [EFL] Missing implementation of GraphicsContext3DPrivate::platformLayerSize()
1437         https://bugs.webkit.org/show_bug.cgi?id=104726
1438
1439         Reviewed by Kenneth Rohde Christiansen.
1440
1441         Add common implementation of GraphicsContext3DPrivate::platformLayerSize() similar
1442         to Qt version. There is nothing platform specific in Qt version. 
1443
1444         Covered by existing tests.
1445
1446         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
1447         (GraphicsContext3DPrivate::platformLayerSize):
1448         * platform/graphics/efl/GraphicsContext3DPrivate.h:
1449         (GraphicsContext3DPrivate):
1450
1451 2012-12-11  No'am Rosenthal  <noam@webkit.org>
1452
1453         [Texmap] Slightly improve readability of the antialias shader
1454         https://bugs.webkit.org/show_bug.cgi?id=104708
1455
1456         Reviewed by Martin Robinson.
1457
1458         Modify the antialiasing shader to include separate function that perform
1459         discrete operations, rather than one big function that repeats the same
1460         operations.
1461
1462         No new tests, readability fix.
1463
1464         * platform/graphics/texmap/TextureMapperShaderManager.cpp:
1465         (WebCore::getShaderSpec):
1466
1467 2012-12-11  Tim Horton  <timothy_horton@apple.com>
1468
1469         -webkit-svg-shadow radius changes don't cause children's boundaries to be recomputed
1470         https://bugs.webkit.org/show_bug.cgi?id=104722
1471         <rdar://problem/12821080>
1472
1473         Reviewed by Simon Fraser.
1474
1475         Changes to -webkit-svg-shadow currently cause a relayout of the directly affected renderer
1476         and its parents, but not its children. However, children have the shadow radius
1477         baked into their cached boundaries, so these need to be invalidated.
1478
1479         Test: svg/repaint/repaint-webkit-svg-shadow-container.html
1480
1481         * rendering/RenderObject.h: Expose needsBoundariesUpdate().
1482         * rendering/svg/RenderSVGContainer.h: Expose needsBoundariesUpdate().
1483         * rendering/svg/RenderSVGImage.h: Expose needsBoundariesUpdate().
1484         * rendering/svg/RenderSVGRoot.h: Expose needsBoundariesUpdate().
1485         * rendering/svg/RenderSVGShape.h: Expose needsBoundariesUpdate().
1486         * rendering/svg/SVGRenderSupport.cpp:
1487         (WebCore::SVGRenderSupport::layoutChildren): If the renderer has a shadow and
1488         is in needs of a boundaries update, mark children as needing boundaries updates too.
1489
1490 2012-12-11  Xianzhu Wang  <wangxianzhu@chromium.org>
1491
1492         Add window.internals.mainThreadScrollReasonsAsText for testing slow scrolling
1493         https://bugs.webkit.org/show_bug.cgi?id=104714
1494
1495         Reviewed by Eric Seidel.
1496
1497         No new tests. Adds test api for bug 102543 and other bugs.
1498
1499         * WebCore.exp.in:
1500         * page/Page.cpp:
1501         (WebCore::ScrollingCoordinator::mainThreadScrollingReasonsAsText): Extracted from ScrollingStateScrollingNode::dumpProperties for layout tests.
1502         (WebCore):
1503         * page/Page.h:
1504         (Page):
1505         * page/scrolling/ScrollingCoordinator.cpp:
1506         (WebCore::ScrollingCoordinator::mainThreadScrollingReasonsAsText):
1507         (WebCore):
1508         * page/scrolling/ScrollingCoordinator.h:
1509         (ScrollingCoordinator):
1510         * page/scrolling/ScrollingStateScrollingNode.cpp:
1511         (WebCore::ScrollingStateScrollingNode::dumpProperties): Moved code for mainThreadScrollingReasons to ScrollingCoordinator.cpp.
1512         * testing/Internals.cpp:
1513         (WebCore::Internals::mainThreadScrollingReasons):
1514         (WebCore):
1515         * testing/Internals.h:
1516         * testing/Internals.idl:
1517
1518 2012-12-11  Simon Fraser  <simon.fraser@apple.com>
1519
1520         Enhance the TileCache to cache more tiles
1521         https://bugs.webkit.org/show_bug.cgi?id=104612
1522
1523         Reviewed by Tim Horton.
1524
1525         Add smarts to the TileCache so that it keeps some tiles around
1526         for longer and can prepopulate tiles in to-be-scrolled-to regions.
1527
1528         The new tile management is as follows:
1529         * As before, we expand the visible rect to create a "tile coverage rect"
1530         which is twice the width, and three times the height of the visible rect.
1531         * At the edges, this coverage rect is constrained by them, rather than being
1532         truncated as before (leading to larger initial tile coverage).
1533         * When tiles leave the coverage rect, we keep them around but track
1534         them in cohorts (where a cohort is a set of tiles that left the coverage rect
1535         at the same time).
1536         * If a repaint comes in for a "secondary" tile, we don't paint it, but mark
1537         the tile as being stale. It will get repainted (in full) if it moves back inside
1538         the coverage rect.
1539         * Cohorts are kept around for 2 seconds after they were created. A repeating
1540         1-second timer clears tiles in old cohorts.
1541         * Secondary tiles are pruned if the visible rect changes, or if zooming happens.
1542         * TiledBacking exposes a way to prepopulate a rect with tiles; this is called
1543         when scrolling (e.g. via Home/End keys). Tiles created this way (if outside
1544         the coverage rect) go into a cohort.
1545
1546         * page/FrameView.cpp:
1547         (WebCore::FrameView::requestScrollPositionUpdate): Tell the TiledBacking
1548         to prepopulate some tiles.
1549         * platform/graphics/TiledBacking.h:
1550         (TiledBacking): Add prepopulateRect().
1551         * platform/graphics/ca/mac/TileCache.h:
1552         (TileInfo): The TileMap contains TileInfos, which contain a pointer
1553         to the layer, their cohort, and a 'stale content' flag.
1554         (WebCore::TileCache::TileInfo::TileInfo):
1555         (TileCache):
1556         (TileCohortInfo):
1557         (WebCore::TileCache::TileCohortInfo::TileCohortInfo):
1558         * platform/graphics/ca/mac/TileCache.mm:
1559         (WebCore::TileCache::TileCache):
1560         (WebCore::TileCache::~TileCache):
1561         (WebCore::TileCache::setNeedsDisplay):
1562         (WebCore::TileCache::setNeedsDisplayInRect):
1563         (WebCore::TileCache::setTileNeedsDisplayInRect):
1564         (WebCore::TileCache::setScale):
1565         (WebCore::TileCache::setAcceleratesDrawing):
1566         (WebCore::TileCache::setTilesOpaque):
1567         (WebCore::TileCache::prepopulateRect):
1568         (WebCore::TileCache::setTileDebugBorderWidth):
1569         (WebCore::TileCache::setTileDebugBorderColor):
1570         (WebCore::TileCache::computeTileCoverageRect):
1571         (WebCore::TileCache::tileSizeForCoverageRect):
1572         (WebCore::TileCache::tileRevalidationTimerFired):
1573         (WebCore::TileCache::blankPixelCount):
1574         (WebCore::queueTileForRemoval):
1575         (WebCore::TileCache::removeAllTiles):
1576         (WebCore::TileCache::removeAllSecondaryTiles):
1577         (WebCore::TileCache::removeTilesInCohort):
1578         (WebCore::TileCache::revalidateTiles):
1579         (WebCore::TileCache::nextTileCohort):
1580         (WebCore::TileCache::startedNewCohort):
1581         (WebCore::TileCache::newestTileCohort):
1582         (WebCore::TileCache::oldestTileCohort):
1583         (WebCore::TileCache::scheduleCohortRemoval):
1584         (WebCore::TileCache::cohortRemovalTimerFired):
1585         (WebCore::TileCache::ensureTilesForRect):
1586         (WebCore::TileCache::tileGridExtent):
1587         (WebCore::TileCache::tileCoverageRect):
1588         (WebCore::TileCache::tileLayerAtIndex):
1589         (WebCore::TileCache::drawTileMapContents):
1590
1591 2012-12-11  Simon Fraser  <simon.fraser@apple.com>
1592
1593         Remove redundant AffineTransform in RenderSVGShape::fillAndStrokeShape()
1594         https://bugs.webkit.org/show_bug.cgi?id=104736
1595
1596         Reviewed by Dean Jackson.
1597
1598         RenderSVGShape::fillAndStrokeShape() allocated a AffineTransform on
1599         the stack which was shadowed by another one in narrower scope. It
1600         can be removed.
1601
1602         * rendering/svg/RenderSVGShape.cpp:
1603         (WebCore::RenderSVGShape::fillAndStrokeShape):
1604
1605 2012-12-11  Seokju Kwon  <seokju.kwon@gmail.com>
1606
1607         [EFL] Remove unused headers
1608         https://bugs.webkit.org/show_bug.cgi?id=104661
1609
1610         Reviewed by Ryosuke Niwa.
1611
1612         Header inclusion cleanup.
1613         Remove "NotImplemented.h".
1614
1615         No new tests, no behavior change.
1616
1617         * platform/efl/CursorEfl.cpp:
1618         * platform/efl/FileSystemEfl.cpp:
1619         * platform/efl/ScrollViewEfl.cpp:
1620         * platform/efl/ScrollbarThemeEfl.cpp:
1621         * platform/efl/SoundEfl.cpp:
1622
1623 2012-12-11  Alec Flett  <alecflett@chromium.org>
1624
1625         IndexedDB: Stub out data operations on IDBDatabaseBackendInterface
1626         https://bugs.webkit.org/show_bug.cgi?id=104592
1627
1628         Reviewed by Dimitri Glazkov.
1629
1630         In preparation for removing objectStore/index backend
1631         interfaces, stub out the basic data operations around
1632         get, put, cursors, etc. on IDBDatabaseBackendInterface.
1633
1634         No new tests, this is just preparation for refactoring.
1635
1636         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1637         (WebCore::IDBDatabaseBackendImpl::get):
1638         (WebCore):
1639         (WebCore::IDBDatabaseBackendImpl::put):
1640         (WebCore::IDBDatabaseBackendImpl::setIndexKeys):
1641         (WebCore::IDBDatabaseBackendImpl::setIndexesReady):
1642         (WebCore::IDBDatabaseBackendImpl::openCursor):
1643         (WebCore::IDBDatabaseBackendImpl::count):
1644         (WebCore::IDBDatabaseBackendImpl::deleteRange):
1645         (WebCore::IDBDatabaseBackendImpl::clear):
1646         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1647         (IDBDatabaseBackendImpl):
1648         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
1649         (WebCore):
1650         (IDBDatabaseBackendInterface):
1651
1652 2012-12-11  Roger Fong  <roger_fong@apple.com>
1653
1654         Make Video Track compile on Windows in debug mode.
1655         https://bugs.webkit.org/show_bug.cgi?id=104720.
1656
1657         Reviewed by Alexey Proskuryakov.
1658
1659         urlForLogging method was defined in both HTMLMediaElement.cpp and HTMLTrackElement.cpp. 
1660         On Windows all the HTMLElements sources are included in an AllInOne source file, 
1661         so the definitions conflicted. Fixed by renaming the definition in each source file.
1662
1663         * html/HTMLMediaElement.cpp:
1664         (WebCore::urlForLoggingMedia):
1665         (WebCore::HTMLMediaElement::loadResource):
1666         (WebCore::HTMLMediaElement::isSafeToLoadURL):
1667         (WebCore::HTMLMediaElement::didRemoveTrack):
1668         (WebCore::HTMLMediaElement::selectNextSourceChild):
1669         (WebCore::HTMLMediaElement::sourceWasAdded):
1670         (WebCore::HTMLMediaElement::sourceWasRemoved):
1671         * html/HTMLTrackElement.cpp:
1672         (WebCore::urlForLoggingTrack):
1673         (WebCore::HTMLTrackElement::canLoadUrl):
1674
1675 2012-12-11  Ryosuke Niwa  <rniwa@webkit.org>
1676
1677         Mail hangs when resizing the font size of a large RTL text
1678         https://bugs.webkit.org/show_bug.cgi?id=104643
1679
1680         Reviewed by Enrica Casucci.
1681
1682         The bug was caused by ApplyStyleCommand::applyInlineStyleToNodeRange obtaining computed styles while
1683         removing and adding nodes. Fixed the slowness by breaking it into three phases:
1684         1. Split the range into contiguous inline runs, and determine whether styles need to be removed or applied.
1685         2. Remove any conflicting styles, and insert dummy elements at positions where inline styles ought to be
1686         computed as needed.
1687         3. Remove the dummy elements and apply ilnine styles as needed.
1688
1689         No new tests are added since there is no behavior change. This is just a performance improvement. 
1690
1691         * editing/ApplyStyleCommand.cpp:
1692         (WebCore::InlineRunToApplyStyle::InlineRunToApplyStyle):
1693         (WebCore::InlineRunToApplyStyle::startAndEndAreStillInDocument):
1694         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
1695         (WebCore::ApplyStyleCommand::shouldApplyInlineStyleToRun):
1696         (WebCore::ApplyStyleCommand::removeConflictingInlineStyleFromRun):
1697         (WebCore::ApplyStyleCommand::addInlineStyleIfNeeded):
1698         (WebCore::ApplyStyleCommand::positionToComputeInlineStyleChange):
1699         (WebCore::ApplyStyleCommand::applyInlineStyleChange):
1700         * editing/ApplyStyleCommand.h:
1701         * editing/EditingStyle.h:
1702         (WebCore::StyleChange::StyleChange):
1703
1704 2012-12-11  Xianzhu Wang  <wangxianzhu@chromium.org>
1705
1706         Incorrect position of layers for fixed position elements when page is scaled smaller than viewport
1707         https://bugs.webkit.org/show_bug.cgi?id=104294
1708
1709         Reviewed by James Robinson.
1710
1711         Fixed issue in scrollOffsetForFixedPosition when contentRect is smaller than visibleContentRect.
1712         This happens when a page originally bigger than viewport is scaled down to smaller than the viewport.
1713
1714         Test: compositing/geometry/fixed-position-composited-page-scale-smaller-than-viewport.html
1715
1716         * page/scrolling/ScrollingCoordinator.cpp:
1717         (WebCore::fixedPositionScrollOffset): Moved common code in scrollOffsetForFixedPosition here. Fixed issue when contentsSize < visibleContentSize.
1718         (WebCore::scrollOffsetForFixedPosition):
1719
1720 2012-12-11  Beth Dakin  <bdakin@apple.com>
1721
1722         https://bugs.webkit.org/show_bug.cgi?id=104725
1723         Crash in EventHandler::selectCursor() on Mac bots running 
1724         fast/events/mouse-cursor-image-set.html
1725
1726         Reviewed by Tim Horton.
1727
1728         https://bugs.webkit.org/show_bug.cgi?id=99493 enabled image-set for 
1729         the CSS cursor property. Most of the change is guarded behind #if 
1730         ENABLE(MOUSE_CURSOR_SCALE). However, image-set was still allowed to 
1731         parse for the cursor property as long as image-set is enabled 
1732         (which is the current state on the Mac). This would lead to an 
1733         inconsistent state where style information would reflect a world 
1734         where mouse cursor scaling is enabled even though nothing else on 
1735         the Mac would. 
1736
1737         The parsing should also be guarded by the cursor scaling flag.
1738         * css/CSSParser.cpp:
1739         (WebCore::CSSParser::parseValue):
1740
1741 2012-12-11  Emil A Eklund  <eae@chromium.org>
1742
1743         Clamp out-of-range numbers in CSS
1744         https://bugs.webkit.org/show_bug.cgi?id=102735
1745
1746         Reviewed by Simon Fraser.
1747
1748         Currently when a large number (outside of the supported range)
1749         is applied from a style rule or set from javascript using
1750         Element.style we check if it is within the supported range and
1751         set it to zero if it is not. This is incorrect and confusing.
1752         
1753         Change it to clamp values to the supported range. This matches
1754         the behavior in Gecko.
1755
1756         Test: fast/css/large-numbers.html
1757
1758         * css/CSSPrimitiveValue.cpp:
1759         (WebCore::CSSPrimitiveValue::computeLength):
1760         Change to clamp out-of-range values instead of interpreting them
1761         as zero.
1762
1763 2012-12-11  Nate Chapin  <japhet@chromium.org>
1764
1765         Ensure ResourceRequests for main resources include fragment indentifiers when necessary,
1766         regressed by r137333.
1767         https://bugs.webkit.org/show_bug.cgi?id=104721
1768
1769         Rubber-stamped by Dimitri Glazkov.
1770
1771         No new tests.
1772
1773         * loader/SubresourceLoader.cpp:
1774         (WebCore::SubresourceLoader::willSendRequest):
1775
1776 2012-12-11  Huang Dongsung  <luxtella@company100.net>
1777
1778         [GTK] REGRESSION(r135620): Accelerated Compositing does not draw some pages.
1779         https://bugs.webkit.org/show_bug.cgi?id=104640
1780
1781         Reviewed by Noam Rosenthal.
1782
1783         After r135620, Accelerated Compositing does not draw some pages, because
1784         r135620 changes the tree-traversal behavior.  Before r135620, we
1785         returned early if TextureMapperLayer can not get TextureMapper from the
1786         root layer. However, after r135620, we run the tree-traversal even if
1787         TextureMapperLayer can not get TextureMapper.  This patch makes
1788         TextureMapperLayer return early like code before r135620.
1789
1790         Covered by existing tests.
1791
1792         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1793         (WebCore::GraphicsLayerTextureMapper::flushCompositingState):
1794
1795 2012-12-11  Dan Bernstein  <mitz@apple.com>
1796
1797         <rdar://problem/12771885> Support ruby-position: {before, after}
1798         https://bugs.webkit.org/show_bug.cgi?id=103569
1799
1800         Reviewed by Anders Carlsson.
1801
1802         Specified in <http://www.w3.org/TR/2011/WD-css3-ruby-20110630/#rubypos>, the ruby-position
1803         property takes four values: before, after, inter-character, and inline. This change adds
1804         support for the values before and after.
1805
1806         Test: fast/ruby/position-after.html
1807
1808         * css/CSSComputedStyleDeclaration.cpp:
1809         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Handle ruby-position.
1810         * css/CSSParser.cpp:
1811         (WebCore::isValidKeywordPropertyAndValue): Accept before and after as valid values for
1812         ruby-position.
1813         (WebCore::isKeywordPropertyID): Added ruby-position to the list of properties with keyword
1814         values.
1815         (WebCore::CSSParser::parseValue): Added ruby-position to the switch statement.
1816         * css/CSSPrimitiveValueMappings.h:
1817         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added mapping from RubyPosition.
1818         (WebCore::CSSPrimitiveValue::operator RubyPosition): Added mapping from CSSPrimitiveValue.
1819         * css/CSSProperty.cpp:
1820         (WebCore::CSSProperty::isInheritedProperty): Added ruby-position as an inherited property.
1821         * css/CSSPropertyNames.in: Added -webkit-ruby-position.
1822         * css/CSSValueKeywords.in: Added after and before.
1823         * css/StyleBuilder.cpp:
1824         (WebCore::StyleBuilder::StyleBuilder): Added a handler for ruby-position.
1825         * css/StyleResolver.cpp:
1826         (WebCore::StyleResolver::applyProperty): Added ruby-position.
1827         * rendering/InlineFlowBox.cpp:
1828         (WebCore::InlineFlowBox::placeBoxesInBlockDirection): Changed to choose which of
1829         hasAnnotationsBefore and hasAnnotationsAfter to set based on ruby position.
1830         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment): Changed to adjust only for
1831         ruby positioned before the base.
1832         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment): Added adjustment for ruby
1833         positioned after the base.
1834         * rendering/RenderRubyRun.cpp:
1835         (WebCore::RenderRubyRun::layout): Account for ruby-position when positioning the ruby text
1836         relative to the base.
1837         * rendering/style/RenderStyle.cpp:
1838         (WebCore::RenderStyle::diff): Made a ruby-position difference a layout difference.
1839         * rendering/style/RenderStyle.h: Added rubyPosition(), setRubyPosition(), and 
1840         initialRubyPosition().
1841         * rendering/style/RenderStyleConstants.h: Added the RubyPosition enum.
1842         * rendering/style/StyleRareInheritedData.cpp:
1843         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Added initialized for
1844         m_rubyPosition. Added copying the value of this member to the copy constructor.
1845         (WebCore::StyleRareInheritedData::operator==): Added comparison of m_rubyPosition.
1846         * rendering/style/StyleRareInheritedData.h:
1847         (StyleRareInheritedData): Added m_rubyPosition member variable.
1848
1849 2012-12-11  Michael Pruett  <michael@68k.org>
1850
1851         [JSC] Add tests for explicit serialization values
1852         https://bugs.webkit.org/show_bug.cgi?id=104423
1853
1854         Reviewed by Oliver Hunt.
1855
1856         Add tests for serialization and deserialization mechanisms of
1857         the JSC implementation of SerializedScriptValue. Similar tests
1858         already exist for the V8 implementation.
1859
1860         Test: platform/jsc/fast/storage/serialized-script-value.html
1861
1862         * WebCore.exp.in:
1863         * testing/Internals.cpp:
1864         (WebCore::Internals::serializeObject):
1865         (WebCore::Internals::deserializeBuffer):
1866
1867 2012-12-11  Alexis Menard  <alexis@webkit.org>
1868
1869         Cleanup: Use consistent naming in CSSParser when dealing with the forward slash operator.
1870         https://bugs.webkit.org/show_bug.cgi?id=104699
1871
1872         Reviewed by Daniel Bates.
1873
1874         http://trac.webkit.org/changeset/136525 added an helper function to
1875         check if a CSSParserValue is a forward slash operator.
1876         BorderImageParseContext is also dealing with the forward slash operator
1877         but its naming is inconsistent with isForwardSlashOperator(). This is
1878         fixed with this patch where BorderImageParseContext::{allowSlash,
1879         commitSlash}() is now replaced by BorderImageParseContext::{allowForwardSlashOperator,
1880         commitForwardSlashOperator}().
1881
1882         No new tests : just a renaming, covered by existing tests..
1883
1884         * css/CSSParser.cpp:
1885         (WebCore::CSSParser::parseFillPosition): A little fixup on the way, use
1886         isForwardSlashOperator() instead of the current code here.
1887         (WebCore::BorderImageParseContext::BorderImageParseContext):
1888         (WebCore::BorderImageParseContext::allowForwardSlashOperator):
1889         (WebCore::BorderImageParseContext::commitImage):
1890         (WebCore::BorderImageParseContext::commitImageSlice):
1891         (WebCore::BorderImageParseContext::commitForwardSlashOperator):
1892         (WebCore::BorderImageParseContext::commitBorderWidth):
1893         (WebCore::BorderImageParseContext::commitBorderOutset):
1894         (WebCore::BorderImageParseContext::commitRepeat):
1895         (BorderImageParseContext):
1896         (WebCore::CSSParser::parseBorderImage):
1897
1898 2012-12-11  Nate Chapin  <japhet@chromium.org>
1899
1900         cr-linux valgrind is showing leaks due to r137333.
1901
1902         Rubber-stamped by Antti Koivisto.
1903
1904         MainResourceLoader's destructor should call m_resource->removeClient(this) is m_resource is still non-null.
1905         The missing removeClient() call will leak the CachedResource.
1906
1907         No new tests, should shut valgrind up.
1908
1909         * loader/MainResourceLoader.cpp:
1910         (WebCore::MainResourceLoader::~MainResourceLoader):
1911
1912 2012-12-11  Andreas Kling  <akling@apple.com>
1913
1914         REGRESSION(r133492): Heap-use-after-free in WebCore::Element::normalizeAttributes
1915         <http://webkit.org/b/104488>
1916
1917         Reviewed by Antti Koivisto.
1918
1919         Don't cache the AttrNodeList* in a local when iterating over an Element's Attr nodes since
1920         that pointer may go stale if JS runs in response to a DOMSubtreeModified event below Node::normalize().
1921
1922         Test: fast/dom/normalize-attributes-mutation-event-crash.html
1923
1924         * dom/Element.cpp:
1925         (WebCore::Element::normalizeAttributes):
1926
1927 2012-12-11  Jonathon Jongsma  <jonathon.jongsma@collabora.co.uk>
1928
1929         [GTK] Soup network logs are frequently interrupted by other logging messages
1930         https://bugs.webkit.org/show_bug.cgi?id=104668
1931
1932         Reviewed by Martin Robinson.
1933
1934         Set an external soup log printer that uses the WebKit logging
1935         infrastructure so that log messages are properly synchronized.
1936
1937         * platform/network/soup/ResourceHandleSoup.cpp:
1938         (WebCore::soupLogPrinter):
1939         (WebCore):
1940         (WebCore::ensureSessionIsInitialized):
1941
1942 2012-12-11  Elliott Sprehn  <esprehn@chromium.org>
1943
1944         Switch to new PseudoElement based :before and :after
1945         https://bugs.webkit.org/show_bug.cgi?id=104462
1946
1947         Reviewed by Antti Koivisto.
1948
1949         Switch to the new PseudoElement based generated content implementation
1950         that moves :before and :after into the DOM. This also switches to using
1951         the ComposedShadowTreeWalker for determining the siblings of PseudoElement's
1952         making the new generated content implementation support adding :before
1953         and :after into <input> elements.
1954
1955         Tests: fast/css-generated-content/block-inside-inline.html
1956                fast/css-generated-content/box-orient.html
1957
1958         * dom/ComposedShadowTreeWalker.cpp:
1959         (WebCore::ComposedShadowTreeWalker::pseudoAwareNextSibling):
1960         (WebCore):
1961         (WebCore::ComposedShadowTreeWalker::pseudoAwarePreviousSibling):
1962         (WebCore::ComposedShadowTreeWalker::traverseParent):
1963         * dom/ComposedShadowTreeWalker.h:
1964         (ComposedShadowTreeWalker):
1965         * dom/Element.cpp:
1966         (WebCore::Element::attach):
1967         (WebCore::Element::recalcStyle):
1968         * dom/Node.cpp:
1969         * dom/Node.h:
1970         (Node):
1971         * dom/NodeRenderingContext.cpp:
1972         (WebCore::NodeRenderingContext::nextRenderer):
1973         (WebCore::NodeRenderingContext::previousRenderer):
1974         (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
1975         * dom/Position.cpp:
1976         (WebCore::Position::Position):
1977         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
1978         * editing/visible_units.cpp:
1979         (WebCore::logicallyPreviousBox):
1980         (WebCore::logicallyNextBox):
1981         (WebCore::startPositionForLine):
1982         (WebCore::endPositionForLine):
1983         * html/HTMLTextFormControlElement.cpp:
1984         (WebCore::HTMLTextFormControlElement::childShouldCreateRenderer):
1985         * page/DragController.cpp:
1986         (WebCore::DragController::draggableNode):
1987         * rendering/RenderBlock.cpp:
1988         (WebCore::RenderBlock::styleDidChange):
1989         (WebCore::RenderBlock::splitBlocks):
1990         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
1991         (WebCore::RenderBlock::createReplacementRunIn):
1992         (WebCore::RenderBlock::isSelectionRoot):
1993         * rendering/RenderBlock.h:
1994         (RenderBlock):
1995         * rendering/RenderButton.cpp:
1996         * rendering/RenderButton.h:
1997         (RenderButton):
1998         * rendering/RenderInline.cpp:
1999         (WebCore::RenderInline::styleDidChange):
2000         (WebCore::RenderInline::addChildIgnoringContinuation):
2001         (WebCore::RenderInline::splitInlines):
2002         * rendering/RenderListItem.cpp:
2003         (WebCore::RenderListItem::updateMarkerLocation):
2004         * rendering/RenderObject.cpp:
2005         (WebCore::RenderObject::createVisiblePosition):
2006         * rendering/RenderObject.h:
2007         (WebCore::RenderObject::nonPseudoNode):
2008         (RenderObject):
2009         (WebCore::RenderObject::clearNode):
2010         (WebCore::RenderObject::generatingNode):
2011         * rendering/RenderObjectChildList.cpp:
2012         * rendering/RenderObjectChildList.h:
2013         (RenderObjectChildList):
2014         * rendering/RenderRubyText.cpp:
2015         * rendering/RenderRubyText.h:
2016         (RenderRubyText):
2017         * rendering/RenderTableRow.cpp:
2018         (WebCore::RenderTableRow::styleDidChange):
2019         * rendering/RenderTableRow.h:
2020         * rendering/RenderTableSection.cpp:
2021         (WebCore::RenderTableSection::addChild):
2022         * rendering/RenderWidget.cpp:
2023         (WebCore::RenderWidget::destroy):
2024
2025 2012-12-11  Jacky Jiang  <zhajiang@rim.com>
2026
2027         [BlackBerry] Clean up unused defaultViewportArguments in RenderThemeBlackBerry.cpp
2028         https://bugs.webkit.org/show_bug.cgi?id=104683
2029
2030         Reviewed by Rob Buis.
2031
2032         * platform/blackberry/RenderThemeBlackBerry.cpp:
2033         (WebCore::determineFullScreenMultiplier):
2034
2035 2012-12-11  Nate Chapin  <japhet@chromium.org>
2036
2037         Route main resource loads through the memory cache.
2038         https://bugs.webkit.org/show_bug.cgi?id=49246
2039
2040         Reviewed by Antti Koivisto.
2041
2042         Note that this patch doesn't actually enable caching of main resources. That will be done in a later patch.
2043         The MainResourceLoader actually has an underlying SubresourceLoader (with the cache layer between them).
2044         In several places, the MainResourceLoader's SubresourceLoader is treated as special.
2045
2046         No new tests, as this is primarily a refactor. A couple of expected results changed slightly.
2047
2048         * loader/DocumentLoader.cpp:
2049         (WebCore::DocumentLoader::setRequest):
2050         (WebCore::DocumentLoader::subresource):
2051         (WebCore::DocumentLoader::addSubresourceLoader): Because the SubresourceLoader underlying the main resource
2052             needs special handling in certain cases, track it separately from the real SubresourceLoaders.
2053         (WebCore::DocumentLoader::removeSubresourceLoader):
2054         (WebCore::DocumentLoader::startLoadingMainResource):
2055         * loader/MainResourceLoader.cpp:
2056         (WebCore::MainResourceLoader::MainResourceLoader):
2057         (WebCore::MainResourceLoader::receivedError):
2058         (WebCore::MainResourceLoader::cancel):
2059         (WebCore::MainResourceLoader::clearResource):
2060         (WebCore):
2061         (WebCore::MainResourceLoader::frameLoader):
2062         (WebCore::MainResourceLoader::request):
2063         (WebCore::MainResourceLoader::continueAfterNavigationPolicy):
2064         (WebCore::MainResourceLoader::resourceData):
2065         (WebCore::MainResourceLoader::redirectReceived):
2066         (WebCore::MainResourceLoader::willSendRequest):
2067         (WebCore::MainResourceLoader::continueAfterContentPolicy):
2068         (WebCore::MainResourceLoader::responseReceived):
2069         (WebCore::MainResourceLoader::dataReceived):
2070         (WebCore::MainResourceLoader::didFinishLoading):
2071         (WebCore::MainResourceLoader::notifyFinished):
2072         (WebCore::MainResourceLoader::reportMemoryUsage):
2073         (WebCore::MainResourceLoader::handleSubstituteDataLoadNow):
2074         (WebCore::MainResourceLoader::load):
2075         (WebCore::MainResourceLoader::setDefersLoading):
2076         (WebCore::MainResourceLoader::defersLoading):
2077         (WebCore::MainResourceLoader::setShouldBufferData):
2078         (WebCore::MainResourceLoader::loader):
2079         (WebCore::MainResourceLoader::identifier):
2080         * loader/MainResourceLoader.h:
2081         (MainResourceLoader):
2082         (WebCore::MainResourceLoader::documentLoader):
2083         * loader/ResourceLoader.cpp:
2084         (WebCore::ResourceLoader::willSendRequest):
2085         * loader/ResourceLoader.h:
2086         (WebCore::ResourceLoader::defersLoading):
2087         (WebCore::ResourceLoader::cancelled):
2088         * loader/appcache/ApplicationCacheHost.cpp:
2089         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainResponse):
2090         (WebCore::ApplicationCacheHost::maybeLoadFallbackForMainError):
2091         * loader/mac/DocumentLoaderMac.cpp:
2092         (WebCore::DocumentLoader::schedule):
2093         (WebCore::DocumentLoader::unschedule):
2094
2095 2012-12-11  Aaron Colwell  <acolwell@chromium.org>
2096
2097         Update MediaSource to allow append() calls in "ended" state.
2098         https://bugs.webkit.org/show_bug.cgi?id=104581
2099
2100         Reviewed by Eric Carlson.
2101
2102         Updated append and setTimestampOffset to allow appending in the "ended" readyState. An append() call
2103         in the "ended" state now triggers a transition to the "open" state and allows the append to succeed.
2104
2105         Tests: http/tests/media/media-source/video-media-source-append-in-ended-state.html
2106                http/tests/media/media-source/video-media-source-append-with-offset-in-ended-state.html
2107                http/tests/media/media-source/video-media-source-zero-byte-append-in-ended-state.html
2108
2109         * Modules/mediasource/MediaSource.cpp:
2110         (WebCore::MediaSource::append):
2111         (WebCore::MediaSource::setTimestampOffset):
2112
2113 2012-12-11  Robert Hogan  <robert@webkit.org>
2114
2115         REGRESSION(r121789): Text not wrapping in presence of floating objects
2116         https://bugs.webkit.org/show_bug.cgi?id=101803
2117
2118         Reviewed by David Hyatt.
2119
2120         When determining if a line needs to offset to avoid any floats use RenderBlock::lineHeight() 
2121         to estimate the height of the line. If the container has floats stacked up with different widths
2122         that straddle the line, using a height of zero will make the first line think it has
2123         more width available than it actually does and it will end up extruding from its container.
2124         
2125         The logic for finding the offset of inline blocks and images needs to use a similar heuristic.
2126         So nextLineBreak() now updates the available width if it encounters a replaced element (e.g. inline block,
2127         image) at the start of a line, using the height of the element to decide which floats to avoid. 
2128         RenderBlock::computeInlineDirectionPositionsForLine() does the same thing when laying out the line.
2129
2130         Tests: fast/block/float/floats-offset-image-quirk-lineheight.html
2131                fast/block/float/floats-offset-image-quirk.html
2132                fast/block/float/floats-offset-image-strict-lineheight.html
2133                fast/block/float/floats-offset-image-strict.html
2134                fast/block/float/floats-offset-inline-block-quirk-lineheight.html
2135                fast/block/float/floats-offset-inline-block-strict-lineheight.html
2136                fast/block/float/floats-offset-linebox-contain-block.html
2137                fast/block/float/floats-offset-linebox-contain-inline.html
2138                fast/block/float/floats-wrap-inside-inline-006.html
2139                fast/block/float/floats-wrap-inside-inline-007.html
2140
2141         * rendering/RenderBlockLineLayout.cpp:
2142         (LineWidth):
2143         (WebCore::logicalHeightForLine):
2144             This method needs to cope with the quirk where an image alone on a line will get its descent stripped away so
2145             ignore the height of the line and use the height of the image in that case.
2146         (WebCore::LineWidth::updateAvailableWidth):
2147         (WebCore::updateLogicalInlinePositions):
2148         (WebCore):
2149         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine):
2150         (WebCore::RenderBlock::computeInlineDirectionPositionsForSegment):
2151         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2152
2153 2012-12-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2154
2155         [GTK] Install GObject DOM bindings headers in its own directory
2156         https://bugs.webkit.org/show_bug.cgi?id=104663
2157
2158         Reviewed by Gustavo Noronha Silva.
2159
2160         Move the headers from webkit to webkitdom directory.
2161
2162         * bindings/gobject/GNUmakefile.am:
2163         * bindings/gobject/WebKitDOMBinding.h:
2164         * bindings/gobject/WebKitDOMCustom.h:
2165         * bindings/gobject/WebKitDOMEventTarget.h:
2166         * bindings/gobject/WebKitDOMEventTargetPrivate.h:
2167         * bindings/gobject/WebKitDOMObject.h:
2168         * bindings/scripts/CodeGeneratorGObject.pm:
2169         (Generate):
2170         (WriteData):
2171         * bindings/scripts/gobject-generate-headers.pl:
2172         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.h:
2173         * bindings/scripts/test/GObject/WebKitDOMFloat64ArrayPrivate.h:
2174         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.h:
2175         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObjectPrivate.h:
2176         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
2177         * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
2178         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.h:
2179         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetterPrivate.h:
2180         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.h:
2181         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructorPrivate.h:
2182         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.h:
2183         * bindings/scripts/test/GObject/WebKitDOMTestEventTargetPrivate.h:
2184         * bindings/scripts/test/GObject/WebKitDOMTestException.h:
2185         * bindings/scripts/test/GObject/WebKitDOMTestExceptionPrivate.h:
2186         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
2187         * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h:
2188         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.h:
2189         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h:
2190         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.h:
2191         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h:
2192         * bindings/scripts/test/GObject/WebKitDOMTestNode.h:
2193         * bindings/scripts/test/GObject/WebKitDOMTestNodePrivate.h:
2194         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2195         * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h:
2196         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.h:
2197         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructorsPrivate.h:
2198         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
2199         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h:
2200
2201 2012-12-11  Mark Pilgrim  <pilgrim@chromium.org>
2202
2203         [Chromium] Clean up unused interfaces in PlatformSupport
2204         https://bugs.webkit.org/show_bug.cgi?id=104674
2205
2206         Reviewed by Darin Fisher.
2207
2208         Part of a refactoring series. See tracking bug 82948. Also, there
2209         were some function declarations that were supposed to be removed
2210         as part of bug 102699 but got left out of the final patch.
2211
2212         * platform/chromium/PlatformSupport.h:
2213         (WebCore):
2214         (PlatformSupport):
2215
2216 2012-12-11  Joone Hur  <joone.hur@intel.com>, Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
2217
2218         [GTK] Update GraphicsLayerClutter
2219         https://bugs.webkit.org/show_bug.cgi?id=92045
2220
2221         Reviewed by Gustavo Noronha Silva.
2222
2223         Add more methods to GraphicsLayerClutter in order to run CSS 3D transforms 
2224         by using GraphicsLayerActor.
2225
2226         No new tests. This will be covered by pixel tests for Qt and GTK+ accelerated
2227         compositing and 3D transforms.
2228
2229         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2230         (WebCore):
2231         (WebCore::GraphicsLayerClutter::GraphicsLayerClutter):
2232         (WebCore::idleDestroy):
2233         (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter):
2234         (WebCore::GraphicsLayerClutter::setName):
2235         (WebCore::GraphicsLayerClutter::platformLayer): Returns the platform layer(ClutterAcotr).
2236         (WebCore::GraphicsLayerClutter::setNeedsDisplay): Update the display.
2237         (WebCore::GraphicsLayerClutter::setNeedsDisplayInRect): Update part of the Display.
2238         (WebCore::GraphicsLayerClutter::setAnchorPoint):
2239         (WebCore::GraphicsLayerClutter::setPosition):
2240         (WebCore::GraphicsLayerClutter::setSize):
2241         (WebCore::GraphicsLayerClutter::setTransform):
2242         (WebCore::GraphicsLayerClutter::setDrawsContent):
2243         (WebCore::GraphicsLayerClutter::setParent):
2244         (WebCore::GraphicsLayerClutter::setChildren):
2245         (WebCore::GraphicsLayerClutter::addChild):
2246         (WebCore::GraphicsLayerClutter::addChildAtIndex):
2247         (WebCore::GraphicsLayerClutter::addChildBelow):
2248         (WebCore::GraphicsLayerClutter::addChildAbove):
2249         (WebCore::GraphicsLayerClutter::replaceChild):
2250         (WebCore::GraphicsLayerClutter::removeFromParent):
2251         (WebCore::GraphicsLayerClutter::platformClutterLayerPaintContents):
2252         (WebCore::GraphicsLayerClutter::platformClutterLayerAnimationStarted):
2253         (WebCore::GraphicsLayerClutter::repaintLayerDirtyRects):
2254         (WebCore::GraphicsLayerClutter::computePositionRelativeToBase):
2255         (WebCore::GraphicsLayerClutter::flushCompositingState): Synchronize the corresponding Actors with the current 
2256         compositing states of this GraphicsLayer and its child layers. 
2257         (WebCore::GraphicsLayerClutter::recursiveCommitChanges):
2258         (WebCore::GraphicsLayerClutter::flushCompositingStateForThisLayerOnly): Commit batched changes non-recursively. 
2259         (WebCore::GraphicsLayerClutter::commitLayerChangesAfterSublayers): Reset layer changes after we recurse on children.
2260         (WebCore::GraphicsLayerClutter::noteSublayersChanged):
2261         (WebCore::GraphicsLayerClutter::noteLayerPropertyChanged):
2262         (WebCore::GraphicsLayerClutter::commitLayerChangesBeforeSublayers): Commit layer changes before we recurse on children.
2263         (WebCore::GraphicsLayerClutter::updateGeometry): Updated the position and size of the Actor.
2264         (WebCore::GraphicsLayerClutter::updateSublayerList): Updated the list of child Actors. 
2265         (WebCore::GraphicsLayerClutter::updateLayerNames):
2266         (WebCore::GraphicsLayerClutter::updateTransform):
2267         (WebCore::GraphicsLayerClutter::updateLayerDrawsContent):
2268         (WebCore::GraphicsLayerClutter::layerForSuperlayer):
2269         * platform/graphics/clutter/GraphicsLayerClutter.h:
2270         (WebCore):
2271         (WebCore::GraphicsLayerClutter::primaryLayer):
2272         (GraphicsLayerClutter):
2273
2274 2012-12-11  Jessie Berlin  <jberlin@apple.com>
2275
2276         Revert incorrect build fix.
2277
2278         * WebCore.exp.in:
2279
2280 2012-12-11  Jessie Berlin  <jberlin@apple.com>
2281
2282         Fix the Mac build after r137261
2283
2284         * WebCore.exp.in:
2285
2286 2012-12-11  Joone Hur  <joone.hur@intel.com>, Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
2287
2288         [GTK] Add GraphicsLayerActor
2289         https://bugs.webkit.org/show_bug.cgi?id=91940
2290
2291         Reviewed by Gustavo Noronha Silva.
2292
2293         GraphicsLayerActor, which is a new ClutterActor, represents a node in the GPU-renderable layer tree
2294         when accelerated compositing is enabled with Clutter as acceleration backend.
2295         This patch allows to support basic features of CSS 3D Transforms.
2296
2297         No new tests. This will be covered by pixel tests for Qt and GTK+ accelerated
2298         compositing and 3D transforms.
2299
2300         * GNUmakefile.list.am:
2301         * platform/graphics/clutter/GraphicsLayerActor.cpp: Added.
2302         (_GraphicsLayerActorPrivate):
2303         (graphics_layer_actor_class_init): GObject configuration of a new Clutter Actor.
2304         (graphics_layer_actor_init): Initialization of the private data of this actor.
2305         (graphicsLayerActorSetProperty): GObject property setter.
2306         (graphicsLayerActorGetProperty): GObject property getter.
2307         (graphicsLayerActorDispose): Called to drop all references to other objects.
2308         (graphicsLayerActorAllocate):  Called to set the coordinates of an actor.
2309         (graphicsLayerActorApplyTransform): Applying the transformation to an actor before painting it.
2310         (graphicsLayerActorPaint): Called to paint the actor.
2311         (graphicsLayerActorDraw): Called each time a ClutterCairoTexture has been invalidated.
2312         (graphicsLayerActorAdded): Called each time an actor has been added to container.
2313         (graphicsLayerActorRemoved): Called each time an actor is removed from container.
2314         (graphicsLayerActorNew): Create a specific layer type of GraphicsLayerActor object.
2315         (graphicsLayerActorNewWithClient): Create a specific layer type of GraphicsLayerActor object with 
2316         its PlatformClutterClientLayer.
2317         (graphicsLayerActorSetClient): Added setter to set the PlatformClutterClientLayer.
2318         (graphicsLayerActorGetClient): Added getter to get the PlatformClutterClientLayer.
2319         (graphicsLayerActorRemoveAll): Remove all child actors.
2320         (graphicsLayerUpdateTexture): Create a ClutterCairoTexture.
2321         (graphicsLayerActorGetSurface): Added setter to set a cairo_surface_t.
2322         (graphicsLayerActorSetSurface): Added getter to get the cairo_surface_t.
2323         (graphicsLayerActorInvalidateRectangle):
2324         (graphicsLayerActorSetTransform): Set a CoglMatrix to apply matrix transform.
2325         (graphicsLayerActorSetAnchorPoint):
2326         (graphicsLayerActorGetAnchorPoint):
2327         (graphicsLayerActorSetScrollPosition):
2328         (graphicsLayerActorGetnChildren):
2329         (graphicsLayerActorReplaceSublayer):
2330         (graphicsLayerActorInsertSublayer):
2331         (graphicsLayerActorSetSublayers):
2332         (graphicsLayerActorGetLayerType):
2333         (graphicsLayerActorSetLayerType):
2334         (graphicsLayerActorSetTranslateX):
2335         (graphicsLayerActorGetTranslateX):
2336         (graphicsLayerActorSetTranslateY):
2337         (graphicsLayerActorGetTranslateY):
2338         (graphicsLayerActorSetDrawsContent): Added setter to paint content inside a layer.
2339         (graphicsLayerActorGetDrawsContent): Added getter to get the value of the drawsContent. 
2340         * platform/graphics/clutter/GraphicsLayerActor.h: Added.
2341         (_GraphicsLayerActor):
2342         (_GraphicsLayerActorClass):
2343         * platform/graphics/clutter/GraphicsLayerClutter.h:
2344         (WebCore):
2345
2346 2012-12-11  Mike West  <mkwst@chromium.org>
2347
2348         Web Inspector: ConsoleTypes should not expose MessageType - it should be private to inspector.
2349         https://bugs.webkit.org/show_bug.cgi?id=66371
2350
2351         Reviewed by Pavel Feldman.
2352
2353         We can simplify console message generation a bit, as nothing outside the
2354         Console object itself will generate messages of any type other than
2355         LogMessageType. This patch refactors the externally-facing API endpoints
2356         on ScriptExecutionContext and Console to drop the MessageType parameter,
2357         moves the MessageType enum into a new InspectorConsoleTypes.h header,
2358         and updates all the call sites (and ChromeClients) to drop the parameter
2359         from their interfaces.
2360
2361         As a temporary bandage for ports using this interface, this patch
2362         includes aliases for the new methods that retain the old interface.
2363         I'll remove them in a future patch.
2364
2365         Here, we only refactor an internal interface. No tests should break.
2366
2367         * GNUmakefile.list.am:
2368         * Target.pri:
2369         * WebCore.gypi:
2370         * WebCore.vcproj/WebCore.vcproj:
2371         * WebCore.xcodeproj/project.pbxproj:
2372             We added a new file! OMG!
2373         * Modules/webaudio/AudioBufferSourceNode.cpp:
2374         (WebCore::AudioBufferSourceNode::looping):
2375         (WebCore::AudioBufferSourceNode::setLooping):
2376         * Modules/webdatabase/AbstractDatabase.cpp:
2377         (WebCore::AbstractDatabase::logErrorMessage):
2378         * Modules/websockets/WebSocket.cpp:
2379         (WebCore::WebSocket::connect):
2380         (WebCore::WebSocket::send):
2381         (WebCore::WebSocket::close):
2382         (WebCore::WebSocket::setBinaryType):
2383         * Modules/websockets/WebSocketChannel.cpp:
2384         (WebCore::WebSocketChannel::fail):
2385         (WebCore::WebSocketChannel::didFailSocketStream):
2386         * bindings/js/JSCustomXPathNSResolver.cpp:
2387         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2388         * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
2389         (WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
2390         * css/MediaList.cpp:
2391         (WebCore::addResolutionWarningMessageToConsole):
2392         * dom/Document.cpp:
2393         (WebCore::Document::logExceptionToConsole):
2394         (WebCore::Document::processHttpEquiv):
2395         (WebCore::Document::addMessage):
2396         * dom/Document.h:
2397         (Document):
2398         * dom/ScriptElement.cpp:
2399         (WebCore::ScriptElement::notifyFinished):
2400         * dom/ScriptExecutionContext.cpp:
2401         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::performTask):
2402         (WebCore::ScriptExecutionContext::addConsoleMessage):
2403         * dom/ScriptExecutionContext.h:
2404         (ScriptExecutionContext):
2405         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::create):
2406         (WebCore::ScriptExecutionContext::AddConsoleMessageTask::AddConsoleMessageTask):
2407         * dom/ViewportArguments.cpp:
2408         (WebCore::reportViewportWarning):
2409         * fileapi/WebKitBlobBuilder.cpp:
2410         (WebCore::BlobBuilder::append):
2411         * html/HTMLFormControlElement.cpp:
2412         (WebCore::shouldAutofocus):
2413         * html/HTMLFormElement.cpp:
2414         (WebCore::HTMLFormElement::validateInteractively):
2415         * html/HTMLIFrameElement.cpp:
2416         (WebCore::HTMLIFrameElement::parseAttribute):
2417         * html/HTMLTrackElement.cpp:
2418         (WebCore::HTMLTrackElement::canLoadUrl):
2419         * html/canvas/CanvasRenderingContext2D.cpp:
2420         (WebCore::CanvasRenderingContext2D::getImageData):
2421         * html/canvas/WebGLRenderingContext.cpp:
2422         (WebCore):
2423         (WebCore::WebGLRenderingContext::printWarningToConsole):
2424         * html/parser/XSSAuditor.cpp:
2425         (WebCore::XSSAuditor::init):
2426         (WebCore::XSSAuditor::filterToken):
2427         * inspector/ConsoleAPITypes.h: Added.
2428         (WebCore):
2429         * inspector/ConsoleMessage.h:
2430         * inspector/InspectorConsoleAgent.h:
2431         * inspector/InspectorDebuggerAgent.h:
2432         * inspector/InspectorInstrumentation.cpp:
2433         (WebCore):
2434         * inspector/InspectorInstrumentation.h:
2435         * inspector/InspectorProfilerAgent.cpp:
2436         * loader/EmptyClients.h:
2437         (WebCore::EmptyChromeClient::addMessageToConsole):
2438         * loader/FrameLoader.cpp:
2439         (WebCore::FrameLoader::reportLocalLoadFailed):
2440         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
2441         * loader/ImageLoader.cpp:
2442         (WebCore::ImageLoader::notifyFinished):
2443         * loader/MainResourceLoader.cpp:
2444         (WebCore::MainResourceLoader::didReceiveResponse):
2445         * loader/MixedContentChecker.cpp:
2446         (WebCore::MixedContentChecker::logWarning):
2447         * loader/TextTrackLoader.cpp:
2448         (WebCore::TextTrackLoader::corsPolicyPreventedLoad):
2449         * loader/appcache/ApplicationCacheGroup.cpp:
2450         (WebCore::ApplicationCacheGroup::abort):
2451         (WebCore::ApplicationCacheGroup::didReceiveResponse):
2452         (WebCore::ApplicationCacheGroup::didFinishLoading):
2453         (WebCore::ApplicationCacheGroup::didFail):
2454         (WebCore::ApplicationCacheGroup::didReceiveManifestResponse):
2455         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
2456         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
2457         * loader/cache/CachedResourceLoader.cpp:
2458         (WebCore::CachedResourceLoader::printAccessDeniedMessage):
2459         * page/ChromeClient.h:
2460         (ChromeClient):
2461             Drop LogMessageType from everywhere.
2462         * page/Console.cpp:
2463         (WebCore::Console::addMessage):
2464         (WebCore::internalAddMessage):
2465         (WebCore::Console::error):
2466         (WebCore::Console::log):
2467         (WebCore::Console::warn):
2468         (WebCore::Console::dir):
2469         (WebCore::Console::dirxml):
2470         (WebCore::Console::clear):
2471         (WebCore::Console::trace):
2472         (WebCore::Console::assertCondition):
2473         * page/Console.h:
2474         (Console):
2475             Create a new internalAddMessage that's used for the various
2476             Console message types. Everything else routes through
2477             ::addMessage.
2478         * page/ConsoleTypes.h:
2479             Drop MessageTypes from this file, add it to ConsoleAPIType.h
2480         * page/ContentSecurityPolicy.cpp:
2481         (WebCore::ContentSecurityPolicy::logToConsole):
2482         * page/DOMWindow.cpp:
2483         (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
2484         (WebCore::DOMWindow::printErrorMessage):
2485         * page/EventSource.cpp:
2486         (WebCore::EventSource::didReceiveResponse):
2487         * svg/SVGDocumentExtensions.cpp:
2488         (WebCore::reportMessage):
2489         * workers/DefaultSharedWorkerRepository.cpp:
2490         (SharedWorkerProxy):
2491         (WebCore::postConsoleMessageTask):
2492         (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject):
2493         * workers/SharedWorkerContext.cpp:
2494         (WebCore::SharedWorkerContext::logExceptionToConsole):
2495         * workers/WorkerContext.cpp:
2496         (WebCore::WorkerContext::addMessage):
2497         (WebCore::WorkerContext::addMessageToWorkerConsole):
2498         * workers/WorkerContext.h:
2499         (WorkerContext):
2500         * workers/WorkerMessagingProxy.cpp:
2501         (WebCore::postConsoleMessageTask):
2502         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
2503         * workers/WorkerMessagingProxy.h:
2504         (WorkerMessagingProxy):
2505         * workers/WorkerReportingProxy.h:
2506         (WorkerReportingProxy):
2507         * xml/XMLHttpRequest.cpp:
2508         (WebCore::logConsoleError):
2509         (WebCore::XMLHttpRequest::send):
2510         * xml/XSLTProcessorLibxslt.cpp:
2511         (WebCore::XSLTProcessor::parseErrorFunc):
2512         * xml/XSLTProcessorQt.cpp:
2513         (WebCore::XSLTMessageHandler::handleMessage):
2514             Drop LogMessageType from everywhere.
2515
2516 2012-12-11  Simon Hausmann  <simon.hausmann@digia.com>
2517
2518         [Qt] Unreviewed, rolling out r137313 and r137316 because they broke the system-sqlite build.
2519
2520         * WebCore.pri:
2521
2522 2012-12-11  Simon Hausmann  <simon.hausmann@digia.com>
2523
2524         Unreviewed Qt build fix: Don't error out if SQLITE3SRCDIR isn't set but
2525         we have a system sqlite to use.
2526
2527         * WebCore.pri:
2528
2529 2012-12-11  Oswald Buddenhagen  <oswald.buddenhagen@digia.com>
2530
2531         [Qt] make qtbase source requirement explicit
2532
2533         Reviewed by Simon Hausmann.
2534
2535         getting rid of QT.<module>.sources references, as they don't go well
2536         with real modularization.
2537
2538         * WebCore.pri:
2539
2540 2012-12-11  Oswald Buddenhagen  <oswald.buddenhagen@digia.com>
2541
2542         [Qt] move SQLITE3SRCDIR assignment to only use site
2543
2544         Reviewed by Simon Hausmann.
2545
2546         Target.pri includes WebCore.pri the almost first thing, so that is
2547         covered as well.
2548
2549         * WebCore.pri:
2550
2551 2012-12-11  Eugene Klyuchnikov  <eustas@chromium.org>
2552
2553         Web Inspector: Timeline: rename "Parse" to "Parse HTML".
2554         https://bugs.webkit.org/show_bug.cgi?id=104639
2555
2556         Reviewed by Yury Semikhatsky.
2557
2558         "Parse" sounds ambiguous, it could mean JSON.parse() or Date.parse().
2559         "Parse HTML" is a much more clear record description.
2560
2561         * inspector/front-end/TimelinePresentationModel.js: Fix text.
2562
2563 2012-12-11  Oswald Buddenhagen  <oswald.buddenhagen@digia.com>
2564
2565         [Qt] change setup of QMAKE_MOC
2566
2567         Reviewed by Simon Hausmann.
2568
2569         don't load(moc) explicitly - turns out that this breaks
2570         debug_and_release builds (the feature does not like being loaded before
2571         default_post has been loaded).
2572         so instead just do a minimal call to find the moc executable.
2573
2574         as it's in fact only two files which need it, so de-centralize this call
2575         for the sake of saving some cpu cycles spent in qmake.
2576
2577         * DerivedSources.pri:
2578
2579 2012-12-11  Alexander Pavlov  <apavlov@chromium.org>
2580
2581         REGRESSION(r136948): inspector/styles/import-pseudoclass-crash.html hits an assertion
2582         https://bugs.webkit.org/show_bug.cgi?id=104473
2583
2584         Reviewed by Vsevolod Vlasov.
2585
2586         Avoid building full CSSOM wrappers up front during rule matching.
2587         Instead, move this code down to the point where these wrappers are actually needed.
2588
2589         * inspector/InspectorCSSAgent.cpp:
2590         (WebCore::InspectorCSSAgent::willMatchRule):
2591         (WebCore::InspectorCSSAgent::willProcessRule):
2592         * inspector/InspectorCSSAgent.h:
2593         (WebCore):
2594         (InspectorCSSAgent):
2595         * inspector/InspectorInstrumentation.cpp:
2596         (WebCore):
2597         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
2598         (WebCore::InspectorInstrumentation::willProcessRuleImpl):
2599
2600 2012-12-11  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
2601
2602         [GStreamer] Avoid linking to GStreamer video libraries if only using ENABLE_AUDIO
2603         https://bugs.webkit.org/show_bug.cgi?id=104590
2604
2605         Reviewed by Philippe Normand.
2606
2607         Make getVideoSizeAndFormatFromCaps() only available when ENABLE_VIDEO is set.
2608
2609         No new tests, no change in behavior.
2610
2611         * platform/graphics/gstreamer/GStreamerVersioning.cpp:
2612         * platform/graphics/gstreamer/GStreamerVersioning.h:
2613
2614 2012-12-11  Zeno Albisser  <zeno@webkit.org>
2615
2616         [Qt][Mac] Fix transparency for WebGL content.
2617         https://bugs.webkit.org/show_bug.cgi?id=104659
2618
2619         When drawing a texture to the TextureMapper the flag SupportsBlending
2620         must be passed in order to allow for transparent webgl content.
2621         We are doing this for GLX already, but the flag was still missing
2622         in GraphicsSurfaceMac.
2623
2624         Reviewed by Kenneth Rohde Christiansen.
2625
2626         * platform/graphics/surfaces/mac/GraphicsSurfaceMac.cpp:
2627         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
2628
2629 2012-12-11  Alexander Pavlov  <apavlov@chromium.org>
2630
2631         Web Inspector: Duplicate emulated touch events in iframe
2632         https://bugs.webkit.org/show_bug.cgi?id=104653
2633
2634         Reviewed by Vsevolod Vlasov.
2635
2636         Synthetic touch events should be dispatched only on the frame containing its target, not on its ancestor frames,
2637         up to the top frame.
2638
2639         * page/EventHandler.cpp:
2640         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
2641           Do not dispatch a synthetic touch event on the current frame if its target is in a subframe.
2642
2643 2012-12-11  Kondapally Kalyan  <kalyan.kondapally@intel.com>
2644
2645         [EFL][WebGL] Regression(r137211) WebGL is broken with NVIDIA Drivers.
2646         https://bugs.webkit.org/show_bug.cgi?id=104652.
2647
2648         Reviewed by Kenneth Rohde Christiansen.
2649
2650         Reverting some of the changes from r137211, as it causes regressions
2651         on NVIDIA drivers.
2652
2653         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
2654         (WebCore::GraphicsContext3D::GraphicsContext3D):
2655         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2656         (GraphicsContext3DPrivate::copyToGraphicsSurface):
2657         * platform/graphics/opengl/GLPlatformSurface.cpp:
2658         (WebCore::GLPlatformSurface::updateContents):
2659         * platform/graphics/opengl/GLPlatformSurface.h:
2660         (GLPlatformSurface):
2661
2662 2012-12-11  Pavel Feldman  <pfeldman@chromium.org>
2663
2664         Web Inspector: follow up to r136974: do not process shortcuts while editing
2665         https://bugs.webkit.org/show_bug.cgi?id=104440
2666
2667         Reviewed by Alexander Pavlov.
2668
2669         Currently, typing H while editing node results in corresponding shortcut processing.
2670
2671         * inspector/front-end/ElementsTreeOutline.js:
2672         (WebInspector.ElementsTreeOutline):
2673         (WebInspector.ElementsTreeOutline.prototype.handleShortcut):
2674         (WebInspector.ElementsTreeElement.prototype.onenter):
2675         (WebInspector.ElementsTreeElement.prototype._startEditingAttribute):
2676         (WebInspector.ElementsTreeElement.prototype.dispose):
2677         (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML):
2678         (WebInspector.ElementsTreeElement.prototype._editingCancelled):
2679
2680 2012-12-11  Ken Kania  <kkania@chromium.org>
2681
2682         [Inspector] Add command for dispatching mouse events.
2683         https://bugs.webkit.org/show_bug.cgi?id=104074
2684
2685         Reviewed by Yury Semikhatsky.
2686
2687         Platform mouse event coordinates are relative to the containing window,
2688         but the inspector command assumes they follow standard web coordinates,
2689         where the origin is at the top left of the page and y increases as you
2690         go down. We convert the coordinates to the window before constructing
2691         the event. This also fixes the fact that some platforms have flipped
2692         coordinate systems.
2693         Also, update dispatchKeyEvent test to follow simpler dispatchMouseEvent
2694         test.
2695
2696         Test: inspector-protocol/input/dispatchMouseEvent.html
2697
2698         * inspector/Inspector.json:
2699         * inspector/InspectorInputAgent.cpp:
2700         (WebCore::InspectorInputAgent::dispatchMouseEvent):
2701         (WebCore):
2702         * inspector/InspectorInputAgent.h:
2703         (InspectorInputAgent):
2704
2705 2012-12-11  Pavel Feldman  <pfeldman@chromium.org>
2706
2707         Not reviewed: follow up to r137283: reduce inspector toolbar spacing 1px.
2708
2709         * inspector/front-end/inspector.css:
2710         (body.dock-to-bottom:not(.show-toolbar-icons) .toolbar-item.toggleable):
2711         (body.dock-to-bottom:not(.show-toolbar-icons) .toolbar-item.toggleable.toggled-on):
2712
2713 2012-12-11  Kent Tamura  <tkent@chromium.org>
2714
2715         Refactoring: Rename Element::shouldMatchReadOnlySelector and shouldMatchReadWriteSelector
2716         https://bugs.webkit.org/show_bug.cgi?id=104651
2717
2718         Reviewed by Kentaro Hara.
2719
2720         ':read-only' and ':read-write' are pseudo classes. They are not
2721         selectors in the context of these functions.  This patch rename them so
2722         that they contain 'pseudo class,' and make them match to an existing
2723         function, matchesFocusPseudoClass.
2724
2725         No new tests. This shouldn't make behavior changes.
2726
2727         * css/SelectorChecker.cpp:
2728         (WebCore::SelectorChecker::checkOneSelector):
2729         * dom/Element.cpp:
2730         (WebCore::Element::recalcStyle):
2731         (WebCore::Element::matchesReadOnlyPseudoClass):
2732         (WebCore::Element::matchesReadWritePseudoClass):
2733         * dom/Element.h:
2734         (Element):
2735         * html/HTMLInputElement.cpp:
2736         (WebCore::HTMLInputElement::matchesReadOnlyPseudoClass):
2737         (WebCore::HTMLInputElement::matchesReadWritePseudoClass):
2738         * html/HTMLInputElement.h:
2739         (HTMLInputElement):
2740         * html/HTMLTextAreaElement.cpp:
2741         (WebCore::HTMLTextAreaElement::matchesReadOnlyPseudoClass):
2742         (WebCore::HTMLTextAreaElement::matchesReadWritePseudoClass):
2743         * html/HTMLTextAreaElement.h:
2744         (HTMLTextAreaElement):
2745         * html/shadow/SliderThumbElement.cpp:
2746         (WebCore::SliderThumbElement::matchesReadOnlyPseudoClass):
2747         (WebCore::SliderThumbElement::matchesReadWritePseudoClass):
2748         * html/shadow/SliderThumbElement.h:
2749         (SliderThumbElement):
2750         * html/shadow/SpinButtonElement.cpp:
2751         (WebCore::SpinButtonElement::matchesReadOnlyPseudoClass):
2752         (WebCore::SpinButtonElement::matchesReadWritePseudoClass):
2753         * html/shadow/SpinButtonElement.h:
2754         (SpinButtonElement):
2755         * rendering/RenderTheme.cpp:
2756         (WebCore::RenderTheme::isReadOnlyControl):
2757
2758 2012-12-11  Pavel Feldman  <pfeldman@chromium.org>
2759
2760         Web Inspector: add more horizontal spacing for toolbar items in docked to bottom mode
2761         https://bugs.webkit.org/show_bug.cgi?id=104655
2762
2763         Reviewed by Alexander Pavlov.
2764
2765         Drive-by increase height to 26px.
2766
2767         * inspector/front-end/inspector.css:
2768         (#toolbar):
2769         (body:not(.show-toolbar-icons) .toolbar-item):
2770         (body.dock-to-bottom:not(.show-toolbar-icons) .toolbar-item.toggleable):
2771         (body.dock-to-bottom:not(.show-toolbar-icons) .toolbar-item.toggleable.toggled-on):
2772         (body.show-toolbar-icons.dock-to-bottom .toolbar-item.toggleable):
2773         (#toolbar-dropdown-arrow):
2774         (#main):
2775
2776 2012-12-11  Keishi Hattori  <keishi@webkit.org>
2777
2778         Use histogram enumeration in Calendar Picker so we can get stats on UI usage
2779         https://bugs.webkit.org/show_bug.cgi?id=104646
2780
2781         Reviewed by Kent Tamura.
2782
2783         Use histogram support to get stats on the calendar picker so we can improve the UI.
2784
2785         No new tests.
2786
2787         * Resources/pagepopups/calendarPicker.js:
2788         (CalendarPicker):
2789         (CalendarPicker.prototype.recordAction): Records action to histogram.
2790         (CalendarPicker.prototype.handleToday): Record action.
2791         (CalendarPicker.prototype.handleClear): Ditto.
2792         (YearMonthController.prototype._showPopup): Ditto.
2793         (YearMonthController.prototype._handleYearMonthChange): Ditto.
2794         (YearMonthController.prototype._handleButtonClick): Ditto.
2795         (DaysTable.prototype._handleDayClick): Ditto.
2796         * page/PagePopupController.cpp:
2797         (WebCore::PagePopupController::histogramEnumeration):
2798         (WebCore):
2799         * page/PagePopupController.h:
2800         (PagePopupController):
2801         * page/PagePopupController.idl: Added histogramEnumeration.
2802
2803 2012-12-11  Hajime Morrita  <morrita@google.com>
2804
2805         IsActiveFlag, IsHoverFlag, InActiveChainFlag can be unified.
2806         https://bugs.webkit.org/show_bug.cgi?id=103697
2807
2808         Reviewed by Ryosuke Niwa.
2809
2810         To save two more NodeFlags bits, this patch inroduces
2811         UserActionElementSet to get IsLinkFlag, IsHoverFlag,
2812         InActiveChainFlag together. These three old flags are replaced by
2813         UserActionElementSet::ElementFlags and UserActionElementSet
2814         collection which tracks elements which are flagged with one of
2815         a ElementFlags.
2816
2817         When marking an element as active for example, WebKit sets
2818         UserActionElementSet::IsActiveFlag to the element and store it
2819         into corresponding element set of the document. This set maintains
2820         marked elements and corresponding flags for each elements.
2821
2822         UserActionElementSet can be seen as a yet another rare data for
2823         these flags. However, the following characteristics of these flags
2824         make adding a new data structure on Document an attractive
2825         alternative:
2826
2827         - UserActionElementSet is maintained for each Document instead of a
2828           global collecton. This fits element lifetime better.
2829
2830         - The number of elements which have these flags is generally
2831           small, and a group of elements for each flag is largely overlapped
2832           due to its nature. This property keeps the set small, and lets
2833           flag retrieval efficient. On majority of the elements, all these
2834           flags are false thus the check is done by just checking
2835           IsInUserActionFlag.
2836
2837         As a bonus, isFocused flag, which was on NodeRareData, is also moved to this model.
2838
2839         No new tests, covered by existing test.
2840
2841         * CMakeLists.txt:
2842         * GNUmakefile.list.am:
2843         * Target.pri:
2844         * WebCore.gypi:
2845         * WebCore.xcodeproj/project.pbxproj:
2846         * dom/DOMAllInOne.cpp:
2847         * dom/Document.cpp:
2848         (WebCore::Document::removedLastRef):
2849         (WebCore::Document::updateHoverActiveState):
2850         * dom/Document.h:
2851         (WebCore::Document::userActionElements): Added.
2852         (Document):
2853         * dom/Node.cpp:
2854         (WebCore::Node::detach):
2855         * dom/Node.h:
2856         (WebCore):
2857         (WebCore::Node::isUserActionElement): Added.
2858         (WebCore::Node::setUserActionElement): Added.
2859         (Node):
2860         (WebCore::Node::active): Switched to UserActionElementSet.
2861         (WebCore::Node::inActiveChain): Switched to UserActionElementSet.
2862         (WebCore::Node::hovered): Switched to UserActionElementSet.
2863         (WebCore::Node::focused): Switched to UserActionElementSet.
2864         (WebCore::Node::setFocus): Switched to UserActionElementSet.
2865         (WebCore::Node::setActive): Switched to UserActionElementSet.
2866         (WebCore::Node::setHovered): Switched to UserActionElementSet.
2867         * dom/NodeRareData.h:
2868         (WebCore::NodeRareData::NodeRareData):
2869         (NodeRareData):
2870         * dom/UserActionElementSet.cpp: Added.
2871         (WebCore):
2872         (WebCore::UserActionElementSet::instanceFor):
2873         (WebCore::UserActionElementSet::UserActionElementSet):
2874         (WebCore::UserActionElementSet::~UserActionElementSet):
2875         (WebCore::UserActionElementSet::didDetach):
2876         (WebCore::UserActionElementSet::documentDidRemoveLastRef):
2877         (WebCore::UserActionElementSet::hasFlags):
2878         (WebCore::UserActionElementSet::setFlags):
2879         (WebCore::UserActionElementSet::clearFlags):
2880         * dom/UserActionElementSet.h: Added.
2881         (WebCore):
2882         (UserActionElementSet):
2883         (WebCore::UserActionElementSet::create):
2884         (WebCore::UserActionElementSet::isFocused):
2885         (WebCore::UserActionElementSet::setFocused):
2886         (WebCore::UserActionElementSet::isActive):
2887         (WebCore::UserActionElementSet::setActive):
2888         (WebCore::UserActionElementSet::isInActiveChain):
2889         (WebCore::UserActionElementSet::setInActiveChain):
2890         (WebCore::UserActionElementSet::isHovered):
2891         (WebCore::UserActionElementSet::setHovered):
2892         (WebCore::UserActionElementSet::setFlags):
2893
2894 2012-12-11  Kent Tamura  <tkent@chromium.org>
2895
2896         INPUT_MULTIPLE_FIELDS_UI: Disable focus navigation by right/left keys in RTL locales
2897         https://bugs.webkit.org/show_bug.cgi?id=104644
2898
2899         Reviewed by Hajime Morita.
2900
2901         Pressing the left key should focus on the field at the left of the
2902         current focused field, and pressing the right key should focus on the
2903         field at the right of the current focused field. This works well in LTR
2904         locales.
2905         In RTL locale, the current code doesn't work. We disable this behavior
2906         for RTL locales for now. This issue will be handled in Bug 104650.
2907
2908         No new tests. Update some *-multiple-fields tests for new behavior.
2909
2910         * html/shadow/DateTimeFieldElement.cpp:
2911         (WebCore::DateTimeFieldElement::defaultKeyboardEventHandler):
2912         If this sub-field is in an RTL locale, we don't change focus.
2913         (WebCore::DateTimeFieldElement::localeForOwner):
2914         Moved from DateTimeNumericFieldElement.
2915         * html/shadow/DateTimeFieldElement.h:
2916         (DateTimeFieldElement): Remove isRTL, add localeForOwner.
2917         * html/shadow/DateTimeNumericFieldElement.cpp: Remove localeForOwner.
2918         * html/shadow/DateTimeNumericFieldElement.h:
2919         (DateTimeNumericFieldElement): Ditto.
2920
2921 2012-12-11  Pavel Podivilov  <podivilov@google.com>
2922
2923         Remove pango files deleted at r137263 form WebCore.gypi.
2924
2925         Unreviewed, gardening.
2926
2927         * WebCore.gypi:
2928
2929 2012-12-11  Zan Dobersek  <zandobersek@gmail.com>
2930
2931         [GTK] Feature enabling/disabling should be possible through build-webkit
2932         https://bugs.webkit.org/show_bug.cgi?id=99271
2933
2934         Reviewed by Gustavo Noronha Silva.
2935
2936         Move the contents of GNUmakefile.features.am into GNUmakefile.features.am.in.
2937         The former is then copied from the latter but then appropriately modified if
2938         the build-webkit script overrides any of the default feature defines.
2939
2940         No new tests - no new testable functionality.
2941
2942         * GNUmakefile.features.am.in: Renamed from Source/WebCore/GNUmakefile.features.am.
2943
2944 2012-12-11  Jinwoo Song  <jinwoo7.song@samsung.com>
2945
2946         [QT][EFL][WK2] Move the GraphicsSurfaceGLX.cpp to common place
2947         https://bugs.webkit.org/show_bug.cgi?id=104433
2948
2949         Reviewed by Kenneth Rohde Christiansen.
2950
2951         QT and EFL are commonly using the GraphicsSurfaceGLX.cpp and
2952         it looks better to move this file to /glx directory.
2953
2954         * PlatformEfl.cmake:
2955         * Target.pri:
2956         * platform/graphics/surfaces/glx/GraphicsSurfaceGLX.cpp: Renamed from Source/WebCore/platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp.
2957         (WebCore):
2958         (OffScreenRootWindow):
2959         (WebCore::OffScreenRootWindow::OffScreenRootWindow):
2960         (WebCore::OffScreenRootWindow::getXWindow):
2961         (WebCore::OffScreenRootWindow::display):
2962         (WebCore::OffScreenRootWindow::~OffScreenRootWindow):
2963         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
2964         (GraphicsSurfacePrivate):
2965         (WebCore::GraphicsSurfacePrivate::~GraphicsSurfacePrivate):
2966         (WebCore::GraphicsSurfacePrivate::createSurface):
2967         (WebCore::GraphicsSurfacePrivate::createPixmap):
2968         (WebCore::GraphicsSurfacePrivate::textureIsYInverted):
2969         (WebCore::GraphicsSurfacePrivate::makeCurrent):
2970         (WebCore::GraphicsSurfacePrivate::doneCurrent):
2971         (WebCore::GraphicsSurfacePrivate::swapBuffers):
2972         (WebCore::GraphicsSurfacePrivate::copyFromTexture):
2973         (WebCore::GraphicsSurfacePrivate::display):
2974         (WebCore::GraphicsSurfacePrivate::glxPixmap):
2975         (WebCore::GraphicsSurfacePrivate::size):
2976         (WebCore::resolveGLMethods):
2977         (WebCore::GraphicsSurface::platformExport):
2978         (WebCore::GraphicsSurface::platformGetTextureID):
2979         (WebCore::GraphicsSurface::platformCopyToGLTexture):
2980         (WebCore::GraphicsSurface::platformCopyFromTexture):
2981         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
2982         (WebCore::GraphicsSurface::platformFrontBuffer):
2983         (WebCore::GraphicsSurface::platformSwapBuffers):
2984         (WebCore::GraphicsSurface::platformSize):
2985         (WebCore::GraphicsSurface::platformCreate):
2986         (WebCore::GraphicsSurface::platformImport):
2987         (WebCore::GraphicsSurface::platformLock):
2988         (WebCore::GraphicsSurface::platformUnlock):
2989         (WebCore::GraphicsSurface::platformDestroy):
2990         (WebCore::GraphicsSurface::platformBeginPaint):
2991         (WebCore::GraphicsSurface::createReadOnlyImage):
2992
2993 2012-12-11  Mike West  <mkwst@chromium.org>
2994
2995         Web Inspector: Evaluate private browsing mode's effect on console messages.
2996         https://bugs.webkit.org/show_bug.cgi?id=104383
2997
2998         Reviewed by Pavel Feldman.
2999
3000         Two sets of console messages are currently gated on private browsing
3001         mode being inactive. This patch centralizes the private browsing checks
3002         in order to apply them equally to all console messages, and changes the
3003         granularity at which they act.
3004
3005         The current checks block the console messages entirely. This patch
3006         blocks only notifications to ChromeClient and ensures that messages
3007         won't be passed to printf where they might end up in system logs.
3008         Notifications to InspectorInstrumentation seem safe; so far as I can
3009         tell, there's no compelling reason to prevent console-based debugging
3010         in private browsing mode. This patch excludes those calls from the
3011         private browsing check.
3012
3013         Test: inspector/console/clients-ignored-in-privatebrowsing.html
3014
3015         * loader/cache/CachedResourceLoader.cpp:
3016         (WebCore::CachedResourceLoader::printAccessDeniedMessage):
3017             Drop the private browsing check.
3018         * page/Console.cpp:
3019         (WebCore::Console::addMessage):
3020             Add private browsing checks to the two ::addMessage variants that
3021             do real work. Ensure that calls to printf and notifications to
3022             ChromeClients are gated on these checks, but always allow
3023             notifications to InspectorInstrumentation.
3024         * page/DOMWindow.cpp:
3025         (WebCore::DOMWindow::printErrorMessage):
3026             Drop the private browsing check.
3027
3028 2012-12-10  Dan Winship  <danw@gnome.org>
3029
3030         [Soup] Fix spelling of "initiating" in API.
3031
3032         Reviewed by Martin Robinson.
3033
3034         No new tests (just internal renaming).
3035
3036         * platform/network/ResourceHandle.h:
3037         (ResourceHandle):
3038         * platform/network/soup/ResourceHandleSoup.cpp:
3039         (WebCore):
3040         (WebCore::setSoupRequestInitiatingPageIDFromNetworkingContext):
3041         (WebCore::ResourceHandle::start):
3042         (WebCore::ResourceHandle::getSoupRequestInitiatingPageID):
3043
3044 2012-12-10  Martin Robinson  <mrobinson@igalia.com>
3045
3046         [GTK] Remove the Pango backend
3047         https://bugs.webkit.org/show_bug.cgi?id=104569
3048
3049         Reviewed by Daniel Bates.
3050
3051         Remove the Pango backend entirely. The EFL build has no support for it and it's
3052         not really maintained enough for the GTK+ port, now that HarfbuzzNG shapes complex
3053         text when Freetype is the active text rendering backend.
3054
3055         No new tests. This does not change behavior.
3056
3057         * GNUmakefile.am: Remove Pango backend options and move Freetype options to the common list.
3058         * GNUmakefile.list.am: Ditto.
3059         * platform/graphics/FontPlatformData.h:
3060         * platform/graphics/pango/FontCachePango.cpp: Removed.
3061         * platform/graphics/pango/FontCustomPlatformDataPango.cpp: Removed.
3062         * platform/graphics/pango/FontPango.cpp: Removed.
3063         * platform/graphics/pango/FontPlatformData.h: Removed.
3064         * platform/graphics/pango/FontPlatformDataPango.cpp: Removed.
3065         * platform/graphics/pango/GlyphPageTreeNodePango.cpp: Removed.
3066         * platform/graphics/pango/PangoUtilities.cpp: Removed.
3067         * platform/graphics/pango/PangoUtilities.h: Removed.
3068         * platform/graphics/pango/SimpleFontDataPango.cpp: Removed.
3069
3070 2012-12-11  Andrey Adaikin  <aandrey@chromium.org>
3071
3072         Web Inspector: [WebGL] prevent GC from collecting WebGLObject instances currently bound to the context state
3073         https://bugs.webkit.org/show_bug.cgi?id=104119
3074
3075         Reviewed by Pavel Feldman.
3076
3077         This is to prevent GC from collecting resources bound to a context (WebGL or 2D).
3078         Otherwise, for example in WebGL, subsequent calls to gl.getParameter() may return a recently created
3079         instance that is no longer bound to a Resource object (thus, no history to replay it later).
3080
3081         * inspector/InjectedScriptCanvasModuleSource.js:
3082         (.):
3083
3084 2012-12-11  Zan Dobersek  <zandobersek@gmail.com>
3085
3086         Unreviewed build fix after r137243.
3087
3088         * bindings/gobject/GNUmakefile.am:
3089
3090 2012-12-10  No'am Rosenthal  <noam@webkit.org>
3091
3092         REGRESSION (r137006): CSS clip on solid color composited div broken
3093         https://bugs.webkit.org/show_bug.cgi?id=104604
3094
3095         Reviewed by Simon Fraser.
3096
3097         Disable direct compositing of background color for clipping layers.
3098
3099         Test: compositing/geometry/clip-inside.html
3100
3101         * rendering/RenderLayerBacking.cpp:
3102         (WebCore::supportsDirectBoxDecorationsComposition):
3103             Never allow direct background composition if there is a clip.
3104
3105 2012-12-10  Simon Fraser  <simon.fraser@apple.com>
3106
3107         REGRESSION (r137215): WebKit stretches and shrinks a part of screen on scroll
3108         https://bugs.webkit.org/show_bug.cgi?id=104626
3109
3110         Reviewed by Beth Dakin.
3111
3112         r137215 removed a compositing layer repaint on size changes. However, there
3113         are cases where the compositing code constrains layer size by clipping
3114         with the viewport and a clipping ancestor. When that happens, we must
3115         invalidate the layer on a size change to avoid showing stretched or
3116         shrunken content.
3117
3118         Test: compositing/repaint/clipped-layer-size-change.html
3119
3120         * rendering/RenderLayerBacking.cpp:
3121         (WebCore::RenderLayerBacking::RenderLayerBacking):
3122         (WebCore::RenderLayerBacking::updateCompositedBounds):
3123         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3124         * rendering/RenderLayerBacking.h:
3125         (RenderLayerBacking):
3126
3127 2012-12-10  Dean Jackson  <dino@apple.com>
3128
3129         Remove old WebKit Animation API code
3130         https://bugs.webkit.org/show_bug.cgi?id=104611
3131
3132         Reviewed by Simon Fraser.
3133
3134         Remove the existing, unused animation API code. We'll look into
3135         implementing the W3C Animation API if/when it is stable.
3136
3137         * CMakeLists.txt: Remove WebKitAnimation and WebKitAnimationList classes.
3138         * DerivedSources.cpp:
3139         * DerivedSources.make:
3140         * DerivedSources.pri:
3141         * GNUmakefile.list.am:
3142         * Target.pri:
3143         * UseJSC.cmake:
3144         * UseV8.cmake:
3145         * WebCore.gypi:
3146         * WebCore.vcproj/WebCore.vcproj:
3147         * WebCore.xcodeproj/project.pbxproj:
3148         * bindings/js/JSBindingsAllInOne.cpp: Remove includes.
3149         * bindings/js/JSWebKitAnimationCustom.cpp: Removed.
3150         * bindings/js/JSWebKitAnimationListCustom.cpp: Removed.
3151         * dom/Element.cpp: Remove API.
3152         * dom/Element.h: Ditto.
3153         * dom/Element.idl: Ditto.
3154         * page/DOMWindow.idl: Ditto.
3155         * page/WebKitAnimation.cpp: Removed.
3156         * page/WebKitAnimation.h: Removed.
3157         * page/WebKitAnimation.idl: Removed.
3158         * page/WebKitAnimationList.cpp: Removed.
3159         * page/WebKitAnimationList.h: Removed.
3160         * page/WebKitAnimationList.idl: Removed.
3161         * page/animation/AnimationController.cpp: Remove API.
3162         * page/animation/AnimationController.h: Ditto.
3163         * page/animation/AnimationControllerPrivate.h: Ditto.
3164         * page/animation/CompositeAnimation.cpp: Ditto.
3165         * page/animation/CompositeAnimation.h: Ditto.
3166
3167 2012-12-10  Jessie Berlin  <jberlin@apple.com>
3168
3169         Fix the Mac build after r137233
3170
3171         * html/shadow/HTMLShadowElement.h:
3172         Remove a declaration of a member variable that was moved to the InsertionPoint superclass.
3173
3174 2012-12-10  KyungTae Kim  <ktf.kim@samsung.com>
3175
3176         Build fix after r137221
3177         https://bugs.webkit.org/show_bug.cgi?id=104617
3178
3179         Unreviewed build fix
3180
3181         * html/HTMLPropertiesCollection.cpp:
3182         (WebCore::nextNodeWithProperty):
3183
3184 2012-12-10  Hajime Morrita  <morrita@google.com>
3185
3186         [Shadow DOM][Refactoring] HTMLContentElement,HTMLShadowElement::m_registeredWithShadowRoot should be moved to InsertionPoint
3187         https://bugs.webkit.org/show_bug.cgi?id=104516
3188
3189         Reviewed by Dimitri Glazkov.
3190
3191         This change pulls duplicated code in removedFrom() and
3192         insertedInto() of both both HTMLShadowElement and
3193         HTMLContentElement to their super class InsertionPoint.
3194
3195         This is a part of effor that encapsulate node distribution algorithm to
3196         ContentDistributor and its family.
3197
3198         No new tests, no behavior change.
3199
3200         * dom/ShadowRoot.cpp:
3201         (WebCore::ShadowRoot::registerInsertionPoint): Added.
3202         (WebCore::ShadowRoot::unregisterInsertionPoint): Added.
3203         * dom/ShadowRoot.h:
3204         (ShadowRoot):
3205         * html/shadow/ContentDistributor.cpp:
3206         (WebCore::ShadowRootContentDistributionData::regiterInsertionPoint): Generalized two methods for <content> and <shadow>.
3207         (WebCore):
3208         (WebCore::ShadowRootContentDistributionData::unregisterInsertionPoint): Ditto.
3209         * html/shadow/ContentDistributor.h:
3210         (ShadowRootContentDistributionData):
3211         * html/shadow/HTMLContentElement.cpp:
3212         (WebCore::HTMLContentElement::HTMLContentElement):
3213         * html/shadow/HTMLContentElement.h:
3214         * html/shadow/HTMLShadowElement.cpp:
3215         (WebCore::HTMLShadowElement::HTMLShadowElement):
3216         * html/shadow/HTMLShadowElement.h:
3217         * html/shadow/InsertionPoint.cpp:
3218         (WebCore::InsertionPoint::InsertionPoint):
3219         (WebCore::InsertionPoint::insertedInto): Pulled up from subclasses
3220         (WebCore::InsertionPoint::removedFrom): Pulled up from subclasses
3221         * html/shadow/InsertionPoint.h:
3222         (InsertionPoint):
3223
3224 2012-12-10  Jon Lee  <jonlee@apple.com>
3225
3226         Keep track of plug-in snapshots clicked by user
3227         https://bugs.webkit.org/show_bug.cgi?id=103206
3228         <rdar://problem/12746483>
3229
3230         Reviewed by Anders Carlsson.
3231
3232         * html/HTMLPlugInImageElement.cpp:
3233         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Initially the hash is
3234         unknown. Set to 0. Move the check for whether to snapshot the plugin into the
3235         new function subframeLoaderWillLoadPlugIn.
3236         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Rename
3237         setPendingClickEvent to userDidClickSnapshot. In addition to holding onto the
3238         click event used to activate the plug-in, the function now also tells the plug-in
3239         client to add the origin hash as an auto-start origin.
3240         (WebCore::HTMLPlugInImageElement::subframeLoaderWillLoadPlugIn): Calculate the
3241         hash based on the provided URL, which is the URL the plug-in will load. Extend
3242         the check that used to be in the constructor to see if the plug-in should not
3243         automatically load, including checking the plug-in size and whether the hash
3244         is an auto-start origin.
3245         * html/HTMLPlugInImageElement.h: Rename setPendingClickEvent to userDidClickSnapshot
3246         and add a variable for the origin hash.
3247
3248         * loader/SubframeLoader.cpp:
3249         (WebCore::SubframeLoader::requestPlugin): When the loader is about to load the
3250         plug-in, pass the URL to the element, so that it can calculate the hash.
3251
3252         * page/Page.cpp:
3253         (WebCore::Page::Page): Take the plugInClient from the page clients.
3254         (WebCore::Page::~Page): If the client exists, tell it that the page is being
3255         destroyed.
3256         (WebCore::Page::PageClients::PageClients): Initialize this optional client to
3257         null.
3258         * page/Page.h: Add PlugInClient to page clients.
3259         (PageClients): Add PlugInClient variable.
3260         (WebCore::Page::plugInClient):
3261         * page/PlugInClient.h: Added.
3262
3263         * rendering/RenderSnapshottedPlugIn.cpp:
3264         (WebCore::RenderSnapshottedPlugIn::handleEvent): Call the renamed function
3265         userDidClickSnapshot().
3266         (WebCore::RenderSnapshottedPlugIn::layout): Move the check of the plug-in size
3267         to subframeLoaderWillLoadPlugIn.
3268
3269         Add PlugInClient.h.
3270         * GNUmakefile.list.am:
3271         * Target.pri:
3272         * WebCore.vcproj/WebCore.vcproj:
3273         * WebCore.xcodeproj/project.pbxproj:
3274
3275 2012-12-10  Antti Koivisto  <antti@apple.com>
3276
3277         Not reviewed.
3278         
3279         Build fix.
3280
3281         * html/HTMLPropertiesCollection.cpp:
3282         (WebCore::nextNodeWithProperty):
3283         * page/TouchDisambiguation.cpp:
3284         (WebCore::boundingBoxForEventNodes):
3285
3286 2012-12-10  Beth Dakin  <bdakin@apple.com>
3287
3288         https://bugs.webkit.org/show_bug.cgi?id=104602
3289         DidHitRelevantRepaintedObjectsAreaThreshold LayoutMilestone fires too 
3290         early on some pages with iframes
3291
3292         Reviewed by Simon Fraser.
3293
3294         This change makes it so that any RenderObjects inside iframes are not 
3295         considered relevant.
3296         * page/Page.cpp:
3297         (WebCore::Page::addRelevantRepaintedObject):
3298
3299 2012-12-10  David Grogan  <dgrogan@chromium.org>
3300
3301         IndexedDB: Propagate more leveldb errors to script
3302         https://bugs.webkit.org/show_bug.cgi?id=104422
3303
3304         Reviewed by Tony Chang.
3305
3306         These are the last places that ignore leveldb errors that can get the
3307         usual ok/found treatment.
3308
3309         Nothing called getBool, so it is deleted.
3310
3311         * Modules/indexeddb/IDBBackingStore.cpp:
3312         (WebCore):
3313         (WebCore::getInt):
3314         (WebCore::isSchemaKnown):
3315         (WebCore::setUpMetadata):
3316         (WebCore::getMaxObjectStoreId):
3317         (WebCore::IDBBackingStore::open):
3318         (WebCore::IDBBackingStore::getIDBDatabaseMetaData):
3319         (WebCore::getNewDatabaseId):
3320         (WebCore::IDBBackingStore::createIDBDatabaseMetaData):
3321         (WebCore::setMaxObjectStoreId):
3322         (WebCore::getNewVersionNumber):
3323         (WebCore::IDBBackingStore::putRecord):
3324         (WebCore::setMaxIndexId):
3325         * Modules/indexeddb/IDBBackingStore.h:
3326         (IDBBackingStore):
3327         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
3328         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
3329         (WebCore::IDBObjectStoreBackendImpl::ObjectStoreStorageOperation::perform):
3330
3331 2012-12-09  Antti Koivisto  <antti@apple.com>
3332
3333         Factor node traversal into standalone functions
3334         https://bugs.webkit.org/show_bug.cgi?id=104507
3335
3336         Reviewed by Eric Seidel.
3337
3338         Node traversal functions are currently Node and ContainerNode members. Their implementations
3339         are confusingly scattered over multiple header and source files. These functions have no particular
3340         reason to be members as they don't require non-public access. They should be made freestanding
3341         function instead and gathered together.
3342         
3343         This patch adds NodeTraversal namespace, defined in NodeTraversal.h. It contains freestanding
3344         functions for traversing Nodes. Most popular functions are inlined (as before) and
3345         there are ContainerNode specific specializations (as before).
3346         
3347         In client code
3348         
3349             node = node->traverseNextNode();
3350             node = node->traverseNextSibling();
3351         
3352         becomes
3353         
3354             node = NodeTraversal::next(node);
3355             node = NodeTraversal::nextSkippingChildren(node);
3356             
3357         etc.
3358
3359         * WebCore.exp.in:
3360         * WebCore.xcodeproj/project.pbxproj:
3361         * accessibility/AccessibilityNodeObject.cpp:
3362         (WebCore::AccessibilityNodeObject::accessibilityDescriptionForElements):
3363         * accessibility/AccessibilityObject.cpp:
3364         (WebCore::AccessibilityObject::firstAccessibleObjectFromNode):
3365         * accessibility/AccessibilityRenderObject.cpp:
3366         (WebCore::AccessibilityRenderObject::addImageMapChildren):
3367         * bindings/js/JSDocumentCustom.cpp:
3368         (WebCore::toJS):
3369         * css/SelectorChecker.cpp:
3370         (WebCore::SelectorChecker::allVisitedStateChanged):
3371         (WebCore::SelectorChecker::visitedStateChanged):
3372         * css/StyleInvalidationAnalysis.cpp:
3373         (WebCore::StyleInvalidationAnalysis::invalidateStyle):
3374         * dom/ContainerNode.cpp:
3375         (WebCore::dispatchChildInsertionEvents):
3376         (WebCore::dispatchChildRemovalEvents):
3377         * dom/ContainerNode.h:
3378         (ContainerNode):
3379         (WebCore):
3380         * dom/ContainerNodeAlgorithms.h:
3381         (WebCore::ChildFrameDisconnector::collectDescendant):
3382         * dom/Document.cpp:
3383         (WebCore::Document::buildAccessKeyMap):
3384         (WebCore::Document::removeAllEventListeners):
3385         (WebCore::Document::updateBaseURL):
3386         (WebCore::Document::processBaseElement):
3387         (WebCore::Document::nodeAbsIndex):
3388         (WebCore::Document::nodeWithAbsIndex):
3389         (WebCore::Document::getFocusableNodes):
3390         * dom/DocumentMarkerController.cpp:
3391         (WebCore::DocumentMarkerController::markersInRange):
3392         (WebCore::DocumentMarkerController::setMarkersActive):
3393         (WebCore::DocumentMarkerController::hasMarkers):
3394         (WebCore::DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
3395         * dom/DocumentOrderedMap.cpp:
3396         (WebCore::DocumentOrderedMap::get):
3397         * dom/ElementShadow.cpp:
3398         (WebCore::ElementShadow::collectSelectFeatureSetFrom):
3399         * dom/Node.cpp:
3400         (WebCore::Node::normalize):
3401         (WebCore::Node::lazyAttach):
3402         (WebCore):
3403         (WebCore::Node::detach):
3404         (WebCore::traverseTreeAndMark):
3405         * dom/Node.h:
3406         (Node):
3407         * dom/NodeIterator.cpp:
3408         (WebCore::NodeIterator::NodePointer::moveToNext):
3409         (WebCore::NodeIterator::NodePointer::moveToPrevious):
3410         (WebCore::NodeIterator::updateForNodeRemoval):
3411         * dom/NodeTraversal.h: Added.
3412         (WebCore):
3413         (NodeTraversal):
3414         (WebCore::NodeTraversal::traverseNextNodeTemplate):
3415         (WebCore::NodeTraversal::next):
3416         (WebCore::NodeTraversal::traverseNextSiblingTemplate):
3417         (WebCore::NodeTraversal::nextSibling):
3418         * dom/Range.cpp:
3419         (WebCore::Range::toString):
3420         (WebCore::Range::checkDeleteExtract):
3421         (WebCore::Range::firstNode):
3422         (WebCore::Range::pastLastNode):
3423         (WebCore::Range::textRects):
3424         (WebCore::Range::textQuads):
3425         (WebCore::Range::getBorderAndTextQuads):
3426         * dom/TreeScope.cpp:
3427         (WebCore::TreeScope::labelElementForId):
3428         (WebCore::TreeScope::findAnchor):
3429         * dom/TreeScopeAdopter.cpp:
3430         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
3431         (WebCore::TreeScopeAdopter::moveTreeToNewDocument):
3432         * dom/TreeWalker.cpp:
3433         (WebCore::TreeWalker::nextNode):
3434         * editing/ApplyStyleCommand.cpp:
3435         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
3436         (WebCore::ApplyStyleCommand::fixRangeAndApplyInlineStyle):
3437         (WebCore::containsNonEditableRegion):
3438         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
3439         (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle):
3440         (WebCore::ApplyStyleCommand::removeInlineStyle):
3441         * editing/BreakBlockquoteCommand.cpp:
3442         (WebCore::BreakBlockquoteCommand::doApply):
3443         * editing/CompositeEditCommand.cpp:
3444         (WebCore::CompositeEditCommand::deleteInsignificantText):
3445         (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
3446         * editing/DeleteSelectionCommand.cpp:
3447         (WebCore::firstEditablePositionInNode):
3448         (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss):
3449         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
3450         * editing/EditCommand.cpp:
3451         (WebCore::SimpleEditCommand::addNodeAndDescendants):
3452         * editing/EditingStyle.cpp:
3453         (WebCore::EditingStyle::triStateOfStyle):
3454         (WebCore::EditingStyle::textDirectionForSelection):
3455         * editing/Editor.cpp:
3456         (WebCore::Editor::simplifyMarkup):
3457         * editing/FrameSelection.cpp: