<http://webkit.org/b/91024> Build against the latest SDK when targeting older OS...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-07-11  Mark Rowe  <mrowe@apple.com>
2
3         <http://webkit.org/b/91024> Build against the latest SDK when targeting older OS X versions.
4
5         Reviewed by Dan Bernstein.
6
7         The deployment target is already set to the version that we're targeting, and it's that setting
8         which determines which functionality from the SDK is available to us.
9
10         * Configurations/Base.xcconfig:
11
12 2012-07-11  Mark Rowe  <mrowe@apple.com>
13
14         Switch a few cases that care about the SDK over to checking __MAC_OS_X_VERSION_MAX_ALLOWED so that things build.
15
16         Part of <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
17
18         Reviewed by Filip Pizlo.
19
20         * platform/graphics/cg/GraphicsContextCG.cpp: The SDK we're building against determines whether the constant is available.
21         * platform/mac/EmptyProtocolDefinitions.h:  The SDK we're building against determines whether the protocols are declared.
22         * platform/mac/NSScrollerImpDetails.h: The SDK we're building against determines whether the constants and method are
23         available.
24         * platform/mac/SharedTimerMac.mm: The SDK we're building against determines whether the function has already been declared.
25
26 2012-07-11  Mark Rowe  <mrowe@apple.com>
27
28         <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
29
30         This removal was handled by a script that translates the relevant macros in to the equivalent checks
31         using the system availability macros.
32
33         Reviewed by Filip Pizlo.
34
35         * WebCore.exp.in:
36         * accessibility/AccessibilityList.h:
37         * accessibility/AccessibilityTable.h:
38         * accessibility/mac/AXObjectCacheMac.mm:
39         * editing/mac/EditorMac.mm:
40         * loader/MainResourceLoader.cpp:
41         * loader/MainResourceLoader.h:
42         * page/AlternativeTextClient.h:
43         * page/ContextMenuController.cpp:
44         * page/mac/SettingsMac.mm:
45         * platform/LocalizedStrings.cpp:
46         * platform/MemoryPressureHandler.cpp:
47         * platform/audio/mac/AudioBusMac.mm:
48         * platform/graphics/Gradient.h:
49         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
50         * platform/graphics/ca/GraphicsLayerCA.cpp:
51         * platform/graphics/ca/PlatformCALayer.h:
52         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
53         * platform/graphics/ca/mac/TileCache.mm:
54         * platform/graphics/cg/GraphicsContextCG.cpp:
55         * platform/graphics/cg/ImageBufferCG.cpp:
56         * platform/graphics/cg/ImageBufferDataCG.cpp:
57         * platform/graphics/cg/ImageBufferDataCG.h:
58         * platform/graphics/cg/ImageCG.cpp:
59         * platform/graphics/cg/ImageSourceCG.cpp:
60         * platform/graphics/cg/PathCG.cpp:
61         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
62         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
63         * platform/graphics/mac/ComplexTextController.cpp:
64         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
65         * platform/graphics/mac/FontCacheMac.mm:
66         * platform/graphics/mac/FontCustomPlatformData.cpp:
67         * platform/graphics/mac/FontMac.mm:
68         * platform/graphics/mac/GraphicsContextMac.mm:
69         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
70         * platform/graphics/mac/SimpleFontDataMac.mm:
71         * platform/graphics/mac/WebLayer.h:
72         * platform/graphics/mac/WebLayer.mm:
73         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
74         * platform/mac/CursorMac.mm:
75         * platform/mac/DisplaySleepDisabler.cpp:
76         * platform/mac/DisplaySleepDisabler.h:
77         * platform/mac/EmptyProtocolDefinitions.h:
78         * platform/mac/HTMLConverter.h:
79         * platform/mac/HTMLConverter.mm:
80         * platform/mac/MemoryPressureHandlerMac.mm:
81         * platform/mac/NSScrollerImpDetails.h:
82         * platform/mac/PlatformEventFactoryMac.mm:
83         * platform/mac/PopupMenuMac.mm:
84         * platform/mac/ScrollAnimatorMac.mm:
85         * platform/mac/ScrollElasticityController.mm:
86         * platform/mac/SharedTimerMac.mm:
87         * platform/mac/SuddenTermination.mm:
88         * platform/mac/WebCoreFullScreenWindow.mm:
89         * platform/mac/WebCoreNSCellExtras.h:
90         * platform/mac/WebCoreSystemInterface.h:
91         * platform/mac/WebCoreSystemInterface.mm:
92         * platform/mac/WebFontCache.mm:
93         * platform/mac/WebVideoFullscreenController.mm:
94         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
95         * platform/network/Credential.h:
96         * platform/network/ResourceHandle.h:
97         * platform/network/cf/DNSCFNet.cpp:
98         * platform/network/cf/ProxyServerCFNet.cpp:
99         * platform/network/cf/ResourceRequest.h:
100         * platform/network/cf/ResourceRequestCFNet.cpp:
101         * platform/network/cf/SocketStreamHandleCFNet.cpp:
102         * platform/network/mac/AuthenticationMac.mm:
103         * platform/network/mac/CookieStorageMac.mm:
104         * platform/network/mac/ResourceHandleMac.mm:
105         * platform/network/mac/ResourceRequestMac.mm:
106         * platform/network/mac/WebCoreURLResponse.mm:
107         * platform/text/TextChecking.h:
108         * platform/text/cf/HyphenationCF.cpp:
109         * platform/text/mac/HyphenationMac.mm:
110         * rendering/RenderLayerBacking.cpp:
111         * rendering/RenderLayerCompositor.cpp:
112         * rendering/RenderThemeMac.mm:
113
114 2012-07-11  Robert Kroeger  <rjkroege@chromium.org>
115
116         Suppress horizontal conversion of PlatformWheelEvents when hasPreciseScrollingDeltas is true
117         https://bugs.webkit.org/show_bug.cgi?id=89580
118
119         WebKit GTK and Chromium Linux force vertical wheel events to
120         scroll horizontally when over horizontal scroll bars.  This is
121         undesirable for touchpad scrolling with
122         hasPreciseScrollingDeltas() == true. Modified shouldTurnVerticalTicksIntoHorizontal
123         to not perform this conversion for PlatformWheelEvents with preciseScrollingDeltas.
124
125         Reviewed by Adam Barth.
126
127         Tests: fast/events/touch/gesture/touch-gesture-scroll-sideways.html
128
129         * page/EventHandler.cpp:
130         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal): 
131         (WebCore::EventHandler::handleWheelEvent):
132         * page/EventHandler.h:
133         (EventHandler):
134         * page/chromium/EventHandlerChromium.cpp:
135         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
136         * page/gtk/EventHandlerGtk.cpp:
137         (WebCore::EventHandler::shouldTurnVerticalTicksIntoHorizontal):
138
139 2012-07-11  Hayato Ito  <hayato@chromium.org>
140
141         Unreviewed gardening.
142         Build fix for r122373.
143
144         * platform/chromium/support/WebCompositorSharedQuadState.cpp:
145         (WebKit::WebCompositorSharedQuadState::WebCompositorSharedQuadState):
146
147 2012-07-11  Shinya Kawanaka  <shinyak@chromium.org> 
148
149         SVGUseElement should not use Element::ensureShadowRoot().
150         https://bugs.webkit.org/show_bug.cgi?id=90938
151
152         Reviewed by Hajime Morita.
153
154         We would like to remove Element::ensureShadowRoot() because we would like to stabilize the lifecycle of Shadow DOM.
155         This patch rewrites SVGUseElement::create() not to use Element::ensureShadowRoot(). Since our convention to create
156         a shadow subtree is to create a method createShadowSubtree(), I obeyed it.
157
158         No new tests. Simple refactoring.
159
160         * svg/SVGUseElement.cpp:
161         (WebCore::SVGUseElement::create):
162         (WebCore::SVGUseElement::createShadowSubtree):
163         (WebCore):
164         * svg/SVGUseElement.h:
165         (SVGUseElement):
166
167 2012-07-11  Alexandre Elias  <aelias@google.com>
168
169         [chromium] Move compositor quads to Platform/chromium/public
170         https://bugs.webkit.org/show_bug.cgi?id=90582
171
172         Reviewed by Adrienne Walker.
173
174         This moves CCSharedQuadState, CCDrawQuad, and all but two CC*DrawQuad
175         classes to the WebKit namespace, as a first step to pushing them
176         across the process boundary for the ubercompositor.
177
178         - The intent is to serialize the class hierarchy using the same
179         mechanism as WebInputEvent.  In order to do this, there are three
180         requirements: pure POD data, a method returning size, and a packing
181         pragma.
182
183         - Private data members are fine with this kind of serializer, and a
184         default constructor is not needed.  Because of that, we can maintain
185         the same encapsulation and convenient APIs (behind
186         WEBKIT_IMPLEMENTATION) as the original classes.  To ease the
187         transition, the original WebCore headers still exist and typedef to
188         the new classes.
189
190         - However, SharedQuadState will be serialized using the normal
191         IPC_STRUCT_TRAITS macro, so I made its members public.  A custom
192         serializer (on quad lists) will maintain the pointers from quads to
193         SharedQuadStates.
194
195         - I converted the Material casting mechanism to materialCast() methods
196         living in the derived classes.  That way, the WebCompositorQuad header
197         doesn't need to know about all its derived classes.
198
199         - Quad classes not yet transitioned can still be used in
200         non-ubercompositor mode.  CCRenderPassDrawQuad and CCYUVVideoDrawQuad
201         are currently non-POD and I left them in their original files.
202
203         This approach is the best I've found so far, since it preserves all
204         WebCore-facing APIs and avoids unnecessary code duplication (new quad
205         types or members can be added by modifying only one place).  There
206         also should not be an unreasonable amount of custom serializer code
207         required.
208
209         No new tests. (No-op refactoring.)
210
211         * WebCore.gypi:
212         * platform/chromium/support/WebCompositorQuad.cpp: Added.
213         (WebKit):
214         (WebKit::WebCompositorQuad::WebCompositorQuad):
215         (WebKit::WebCompositorQuad::opaqueRect):
216         (WebKit::WebCompositorQuad::setQuadVisibleRect):
217         (WebKit::WebCompositorQuad::size):
218         * platform/chromium/support/WebCompositorSharedQuadState.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCSharedQuadState.cpp.
219         (WebKit):
220         (WebKit::WebCompositorSharedQuadState::WebCompositorSharedQuadState):
221         (WebKit::WebCompositorSharedQuadState::create):
222         (WebKit::WebCompositorSharedQuadState::isLayerAxisAlignedIntRect):
223         * platform/chromium/support/WebCompositorSolidColorQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp.
224         (WebKit):
225         (WebKit::WebCompositorSolidColorQuad::create):
226         (WebKit::WebCompositorSolidColorQuad::WebCompositorSolidColorQuad):
227         (WebKit::WebCompositorSolidColorQuad::materialCast):
228         * platform/chromium/support/WebCompositorTextureQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCTextureDrawQuad.cpp.
229         (WebKit):
230         (WebKit::WebCompositorTextureQuad::create):
231         (WebKit::WebCompositorTextureQuad::WebCompositorTextureQuad):
232         (WebKit::WebCompositorTextureQuad::setNeedsBlending):
233         (WebKit::WebCompositorTextureQuad::materialCast):
234         * platform/graphics/chromium/LayerRendererChromium.cpp:
235         (WebCore::LayerRendererChromium::drawQuad):
236         * platform/graphics/chromium/LayerRendererChromium.h:
237         * platform/graphics/chromium/cc/CCCheckerboardDrawQuad.cpp:
238         (WebCore::CCCheckerboardDrawQuad::create):
239         (WebCore::CCCheckerboardDrawQuad::CCCheckerboardDrawQuad):
240         (WebCore::CCCheckerboardDrawQuad::materialCast):
241         (WebCore):
242         * platform/graphics/chromium/cc/CCCheckerboardDrawQuad.h:
243         (CCCheckerboardDrawQuad):
244         * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp:
245         (WebCore::CCDebugBorderDrawQuad::create):
246         (WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad):
247         (WebCore::CCDebugBorderDrawQuad::materialCast):
248         (WebCore):
249         * platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h:
250         (CCDebugBorderDrawQuad):
251         * platform/graphics/chromium/cc/CCDrawQuad.cpp: Removed.
252         * platform/graphics/chromium/cc/CCDrawQuad.h:
253         (WebCore):
254         * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.cpp:
255         (WebCore::CCIOSurfaceDrawQuad::create):
256         (WebCore::CCIOSurfaceDrawQuad::CCIOSurfaceDrawQuad):
257         (WebCore::CCIOSurfaceDrawQuad::materialCast):
258         (WebCore):
259         * platform/graphics/chromium/cc/CCIOSurfaceDrawQuad.h:
260         (CCIOSurfaceDrawQuad):
261         * platform/graphics/chromium/cc/CCLayerImpl.h:
262         (WebCore):
263         * platform/graphics/chromium/cc/CCRenderPass.h:
264         (WebCore):
265         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
266         (WebCore::CCRenderPassDrawQuad::create):
267         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
268         (WebCore::CCRenderPassDrawQuad::materialCast):
269         (WebCore):
270         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
271         (CCRenderPassDrawQuad):
272         * platform/graphics/chromium/cc/CCRenderSurface.h:
273         (WebCore):
274         * platform/graphics/chromium/cc/CCSharedQuadState.h:
275         (WebCore):
276         * platform/graphics/chromium/cc/CCSolidColorDrawQuad.h:
277         (WebCore):
278         * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.cpp:
279         (WebCore::CCStreamVideoDrawQuad::create):
280         (WebCore::CCStreamVideoDrawQuad::CCStreamVideoDrawQuad):
281         (WebCore::CCStreamVideoDrawQuad::materialCast):
282         (WebCore):
283         * platform/graphics/chromium/cc/CCStreamVideoDrawQuad.h:
284         (CCStreamVideoDrawQuad):
285         * platform/graphics/chromium/cc/CCTextureDrawQuad.h:
286         (WebCore):
287         * platform/graphics/chromium/cc/CCTileDrawQuad.cpp:
288         (WebCore::CCTileDrawQuad::create):
289         (WebCore::CCTileDrawQuad::CCTileDrawQuad):
290         (WebCore::CCTileDrawQuad::materialCast):
291         (WebCore):
292         * platform/graphics/chromium/cc/CCTileDrawQuad.h:
293         (CCTileDrawQuad):
294         * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.cpp:
295         (WebCore::CCYUVVideoDrawQuad::create):
296         (WebCore::CCYUVVideoDrawQuad::CCYUVVideoDrawQuad):
297         (WebCore::CCYUVVideoDrawQuad::materialCast):
298         (WebCore):
299         * platform/graphics/chromium/cc/CCYUVVideoDrawQuad.h:
300         (CCYUVVideoDrawQuad):
301
302 2012-07-11  Robert Kroeger  <rjkroege@chromium.org>
303
304         [chromium] [regression] Don't use ScrollByPrecisePixels on Chromium Mac.
305         https://bugs.webkit.org/show_bug.cgi?id=91020
306
307         Reviewed by Adam Barth.
308
309         A change in https://bugs.webkit.org/show_bug.cgi?id=87535 to
310         improve the operation of smooth scrolling incorrectly caused
311         Chromium Mac to use the wrong scroll granularity on
312         hasPreciseScrollingDeltas() == true wheelevent scrolls.
313         Exclude the change on the Chromium Mac platform.
314
315         * platform/ScrollAnimator.cpp:
316         (WebCore::ScrollAnimator::handleWheelEvent): Adjusted #ifdef to exclude Chromium
317         Mac from ScrollByPrecisePixels change.
318
319 2012-07-11  Jia Pu  <jpu@apple.com>
320
321         On Mac, autocorrection sometimes fails to take place in Safari.
322         https://bugs.webkit.org/show_bug.cgi?id=89982
323
324         Reviewed by Ryosuke Niwa.
325
326         We should check the value of shouldCheckForCorrection, not shouldShowCorrectionPanel, to determine if we should
327         early return in markAndReplaceFor(). Also, since we don't want autocorrection to happen when we only change selection,
328         not the content, so we shouldn't set TextCheckingTypeCorrection flag in markMisspellingsAndBadGrammar() as this function
329         is triggered only by selection change.
330
331         * editing/Editor.cpp:
332         (WebCore::Editor::markAndReplaceFor):
333         (WebCore::Editor::markMisspellingsAndBadGrammar):
334
335 2012-07-11  Sheriff Bot  <webkit.review.bot@gmail.com>
336
337         Unreviewed, rolling out r122361.
338         http://trac.webkit.org/changeset/122361
339         https://bugs.webkit.org/show_bug.cgi?id=91027
340
341         Broke Windows build and fast/forms/state-restore-broken-
342         state.html (Requested by rniwa on #webkit).
343
344         * testing/Internals.idl:
345
346 2012-07-10  Simon Fraser  <simon.fraser@apple.com>
347
348         Assertion ASSERTION FAILED: enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()) when compositing in paginated mode
349         https://bugs.webkit.org/show_bug.cgi?id=90919
350
351         Reviewed by Antti Koivisto.
352
353         r121124 added a fast path for geometry mapping that goes via layers
354         when possible. However, this broke paginated pages, which put
355         the root (RenderView) layer into column mode, because it failed
356         to check for columns on the ancestor layer.
357         
358         Rather than make a risky change to convertToLayerCoords(), add a local
359         function canMapViaLayer(), which is like RenderLayer::canUseConvertToLayerCoords(),
360         but doesn't check for compositing (compositing itself is not a reason
361         to avoid convertToLayerCoords). Call canMapViaLayer() with the ancestorLayer
362         to check whether the ancestor has columns, which fixes the bug.
363
364         Test: compositing/columns/geometry-map-paginated-assert.html
365
366         * rendering/RenderGeometryMap.cpp:
367         (WebCore::canMapViaLayer):
368         (WebCore::RenderGeometryMap::pushMappingsToAncestor):
369
370 2012-07-11  Dana Jansens  <danakj@chromium.org>
371
372         [chromium] Rename layerRect to contentRect for rects that live in content space
373         https://bugs.webkit.org/show_bug.cgi?id=90843
374
375         Reviewed by Adrienne Walker.
376
377         Dropped the layerTransform() from CCSharedQuadState, as nothing should be
378         using it to draw with. RenderPasses need a weird drawTransform right now
379         which was stored in layerTransform, so moved this to the RenderPass quad.
380
381         No new tests. No change in behaviour.
382
383         * platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
384         (WebCore::CanvasLayerTextureUpdater::paintContents):
385         * platform/graphics/chromium/ContentLayerChromium.cpp:
386         (WebCore::ContentLayerChromium::update):
387         (WebCore::ContentLayerChromium::needMoreUpdates):
388         * platform/graphics/chromium/ImageLayerChromium.cpp:
389         (WebCore::ImageLayerChromium::update):
390         * platform/graphics/chromium/LayerChromium.cpp:
391         (WebCore::LayerChromium::visibleContentOpaqueRegion):
392         * platform/graphics/chromium/LayerChromium.h:
393         (WebCore::LayerChromium::visibleContentRect):
394         (WebCore::LayerChromium::setVisibleContentRect):
395         (LayerChromium):
396         * platform/graphics/chromium/LayerRendererChromium.cpp:
397         (WebCore::LayerRendererChromium::drawRenderPassQuad):
398         (WebCore::LayerRendererChromium::drawTileQuad):
399         (WebCore::LayerRendererChromium::drawYUVVideoQuad):
400         (WebCore::LayerRendererChromium::drawStreamVideoQuad):
401         (WebCore::LayerRendererChromium::drawIOSurfaceQuad):
402         * platform/graphics/chromium/TiledLayerChromium.cpp:
403         (WebCore::TiledLayerChromium::updateBounds):
404         (WebCore::TiledLayerChromium::setNeedsDisplayRect):
405         (WebCore::TiledLayerChromium::invalidateContentRect):
406         (WebCore::TiledLayerChromium::updateTiles):
407         (WebCore::TiledLayerChromium::setTexturePriorities):
408         (WebCore::TiledLayerChromium::setTexturePrioritiesInRect):
409         (WebCore::TiledLayerChromium::visibleContentOpaqueRegion):
410         (WebCore::TiledLayerChromium::updateContentRect):
411         (WebCore::TiledLayerChromium::needsIdlePaint):
412         (WebCore::TiledLayerChromium::idlePaintRect):
413         * platform/graphics/chromium/TiledLayerChromium.h:
414         (TiledLayerChromium):
415         * platform/graphics/chromium/cc/CCDrawQuad.h:
416         (WebCore::CCDrawQuad::visibleContentRect):
417         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
418         (WebCore::CCLayerImpl::createSharedQuadState):
419         (WebCore::CCLayerImpl::appendDebugBorderQuad):
420         (WebCore::CCLayerImpl::visibleContentOpaqueRegion):
421         * platform/graphics/chromium/cc/CCLayerImpl.h:
422         (WebCore::CCLayerImpl::visibleContentRect):
423         (WebCore::CCLayerImpl::setVisibleContentRect):
424         (CCLayerImpl):
425         * platform/graphics/chromium/cc/CCLayerTilingData.cpp:
426         (WebCore::CCLayerTilingData::contentRectToTileIndices):
427         (WebCore::CCLayerTilingData::opaqueRegionInContentRect):
428         (WebCore::CCLayerTilingData::setBounds):
429         * platform/graphics/chromium/cc/CCLayerTilingData.h:
430         (CCLayerTilingData):
431         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
432         (WebCore::calculateVisibleContentRect):
433         (WebCore::layerShouldBeSkipped):
434         (WebCore):
435         (WebCore::calculateVisibleAndScissorRectsInternal):
436         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
437         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
438         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
439         (WebCore::addOcclusionBehindLayer):
440         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
441         (WebCore::CCRenderPassDrawQuad::create):
442         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
443         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
444         (CCRenderPassDrawQuad):
445         (WebCore::CCRenderPassDrawQuad::drawTransform):
446         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
447         (WebCore::CCRenderSurface::createSharedQuadState):
448         (WebCore::CCRenderSurface::createReplicaSharedQuadState):
449         (WebCore::CCRenderSurface::appendQuads):
450         * platform/graphics/chromium/cc/CCSharedQuadState.cpp:
451         (WebCore::CCSharedQuadState::create):
452         (WebCore::CCSharedQuadState::CCSharedQuadState):
453         (WebCore::CCSharedQuadState::isLayerAxisAlignedIntRect):
454         * platform/graphics/chromium/cc/CCSharedQuadState.h:
455         (CCSharedQuadState):
456         (WebCore::CCSharedQuadState::visibleContentRect):
457         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
458         (WebCore::CCTiledLayerImpl::appendQuads):
459         (WebCore::CCTiledLayerImpl::visibleContentOpaqueRegion):
460
461 2012-07-11  Chris Fleizach  <cfleizach@apple.com>
462
463         ARIA spinbutton role incorrectly mapped to ProgressIndicatorRole
464         https://bugs.webkit.org/show_bug.cgi?id=77298
465
466         Reviewed by Anders Carlsson.
467
468         * accessibility/AccessibilityObject.cpp:
469         (WebCore::createARIARoleMap):
470
471 2012-07-11  Huang Dongsung  <luxtella@company100.net>
472
473         BitmapImage::frameIsCompleteAtIndex() must return false if ImageDecoder is not initialized.
474         https://bugs.webkit.org/show_bug.cgi?id=90757
475
476         Reviewed by Simon Fraser.
477
478         The current code fortunately has worked so far because only
479         BitmapImage::startAnimation calls frameIsCompleteAtIndex, and startAnimation
480         cannot call frameIsCompleteAtIndex if ImageDecoder is not yet initialized.
481         startAnimation returns at the first line becase shouldAnimate() always return
482         false in this case.
483
484             if (m_frameTimer || !shouldAnimate() || frameCount() <= 1)
485                 return;
486
487         This change is needed because parallel image decoders call
488         BitmapImage::frameIsCompleteAtIndex in other places too.
489
490         No new tests, manually tested whether the caller exists or not that
491         calls BitmapImage::frameIsCompleteAtIndex() before ImageDecoder is
492         initialized.
493
494         * platform/graphics/BitmapImage.cpp:
495         (WebCore::BitmapImage::frameIsCompleteAtIndex):
496
497 2012-07-11  Kevin Ollivier  <kevino@theolliviers.com>
498
499         [wx] Unreviewed build fix. Update code to use the new constant name.
500         
501         * platform/wx/PasteboardWx.cpp:
502         (WebCore::Pasteboard::documentFragment):
503
504 2012-07-11  Kevin Ollivier  <kevino@theolliviers.com>
505
506         [wx] Unreviewed build fix. Ignore array and sequence types for attributes as well
507         as functions since the CPP bindings do not yet support them.
508
509         * bindings/scripts/CodeGeneratorCPP.pm:
510         (SkipAttribute):
511
512 2012-07-11  Kevin Ollivier  <kevino@theolliviers.com>
513
514         [wx] Unreviewed build fix. Use DOMStringList instead of DOMString[] for in / out type.
515
516         * testing/Internals.idl:
517
518 2012-07-11  Dana Jansens  <danakj@chromium.org>
519
520         [chromium] Minimum size used for occlusion tracking should be a setting on CCLayerTreeHost
521         https://bugs.webkit.org/show_bug.cgi?id=90993
522
523         Reviewed by Adrienne Walker.
524
525         Move the default minimum size used for occlusion tracking from the
526         CCOcclusionTracker class into CCLayerTreeSettings. This value is then
527         used on both threads as the lower limit for any occlusion to be
528         remembered.
529
530         This allows us to use (0, 0) as the minimum size for tests, allowing all
531         occlusion to be tracked.
532
533         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
534         (WebCore::CCLayerTreeHost::paintLayerContents):
535         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
536         (WebCore::CCLayerTreeSettings::CCLayerTreeSettings):
537         (CCLayerTreeSettings):
538         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
539         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
540         * platform/graphics/chromium/cc/CCOcclusionTracker.h:
541
542 2012-07-11  Anders Carlsson  <andersca@apple.com>
543
544         Add -Wtautological-compare and -Wsign-compare warning flags
545         https://bugs.webkit.org/show_bug.cgi?id=90994
546
547         Reviewed by Mark Rowe.
548
549         * Configurations/Base.xcconfig:
550
551 2012-07-11  Dean Jackson  <dino@apple.com>
552
553         TileCache layers have wrong border debug color
554         https://bugs.webkit.org/show_bug.cgi?id=90922
555
556         Reviewed by Simon Fraser.
557
558         Commit r122152 updated the layer hierarchy when a tile
559         cache is being used by the view. As part of that, GraphicsLayerClient::shouldUseTileCache()
560         was changed to return false in some situations (the idea was that it
561         should only be called from the createGraphicsLayer method). However
562         there were two other call points: one that sets the debug colors on
563         borders, the other was a call that keeps the document background in sync.
564
565         Add a new method usingTileCache() that returns the current state. Also fix
566         a FIXME where the debug code always called into the client rather than
567         caching the value on the GraphicsLayer.
568
569         Test: compositing/document-background-color.html
570
571         * platform/graphics/GraphicsLayer.cpp:
572         (WebCore::GraphicsLayer::GraphicsLayer):
573         (WebCore::GraphicsLayer::updateDebugIndicators): check the local variable when
574         setting the debug colors.
575         * platform/graphics/GraphicsLayer.h:
576         (GraphicsLayer): new bool member variable m_usingTileCache.
577         * platform/graphics/GraphicsLayerClient.h:
578         (WebCore::GraphicsLayerClient::usingTileCache): new virtual method to query if
579         this client is actually using the tile cache.
580         * platform/graphics/ca/GraphicsLayerCA.cpp:
581         (WebCore::GraphicsLayerCA::GraphicsLayerCA): set the member variable m_usingTileCache
582         if the GraphicsLayerClient says we are.
583         * rendering/RenderLayerBacking.h:
584         (WebCore::RenderLayerBacking::usingTileCache):
585         * rendering/RenderLayerCompositor.cpp:
586         (WebCore::RenderLayerCompositor::documentBackgroundColorDidChange): call usingTileCache()
587         rather than shouldUseTileCache(), because the latter's value might not always reflect
588         the existence of a cache.
589
590 2012-07-11  Ryosuke Niwa  <rniwa@webkit.org>
591
592         Clang build fix after r122345.
593         Also let XCode do its own thing.
594
595         * WebCore.xcodeproj/project.pbxproj:
596         * html/HTMLCollection.cpp:
597         (WebCore::HTMLCollectionWithArrayStorage::item):
598         * html/HTMLCollection.h:
599         (HTMLCollectionWithArrayStorage):
600         * html/HTMLFormCollection.cpp:
601         (WebCore::HTMLFormCollection::itemInArrayAfter):
602         * html/HTMLFormCollection.h:
603         (HTMLFormCollection):
604         * html/HTMLPropertiesCollection.cpp:
605         (WebCore::HTMLPropertiesCollection::itemInArrayAfter):
606         * html/HTMLPropertiesCollection.h:
607         (HTMLPropertiesCollection):
608
609 2012-07-11  Arnaud Renevier  <a.renevier@sisa.samsung.com>
610
611         [Gtk] allow building with css-filters
612         https://bugs.webkit.org/show_bug.cgi?id=90908
613
614         Reviewed by Eric Seidel.
615
616         Add support for css-filters in Source/WebCore/GNUmakefile.am
617         configure.ac
618
619         No functional change, so no new tests.
620
621         * GNUmakefile.am:
622
623 2012-07-10  Ryosuke Niwa  <rniwa@webkit.org>
624
625         HTMLFormCollection::item and HTMLPropertiesCollection::item should share code
626         https://bugs.webkit.org/show_bug.cgi?id=90932
627
628         Reviewed by Anders Carlsson.
629
630         Merged HTMLFormCollection::item and HTMLPropertiesCollection::item as HTMLCollectionWithArrayStorage::item,
631         which can be merged into HTMLCollection::item in a follow up patch.
632
633         Also moved the call to invalidateCacheIfNeeded into HTMLCollection::updateNameCache() as done in
634         HTMLPropertiesCollection.
635
636         In addition, moved the early bail out for when the base element doesn't have itemscope attribute from individual
637         functions to updateRefElements so that HTMLCollectionWithArrayStorage::item doesn't need to have this check.
638
639         * html/HTMLCollection.cpp:
640         (WebCore::HTMLCollectionWithArrayStorage::item): Added. It's based on HTMLPropertiesCollection::item but it only
641         has the single loop (as supposed to nested loops) as HTMLFormCollection doesn't have multiple items per element
642         in the array unlike HTMLPropertiesCollection. In addition, offsetInArray (was i in HTMLPropertiesCollection::item) is
643         incremented in each itemAfter due to this semantic difference in each itemAfter.
644         (WebCore::HTMLCollection::updateNameCache):
645         (WebCore::HTMLCollection::hasNamedItem):
646         (WebCore::HTMLCollection::namedItems):
647         * html/HTMLCollection.h:
648         (HTMLCollectionWithArrayStorage):
649         (WebCore::HTMLCollectionWithArrayStorage::HTMLCollectionWithArrayStorage):
650         * html/HTMLFormCollection.cpp:
651         (WebCore::HTMLFormCollection::HTMLFormCollection):
652         (WebCore::HTMLFormCollection::calcLength): Merged numberOfFormControlElements since it was only called here.
653         (WebCore::HTMLFormCollection::itemAfter): Added. HTMLFormCollection has exactly one item per element in the array
654         so we increment the offset in each iteration. Note that when we're continuing a search, we need to increment
655         the offset in order to avoid returning the same item.
656         (WebCore::HTMLFormCollection::updateNameCache):
657         * html/HTMLFormCollection.h:
658         (HTMLFormCollection):
659         * html/HTMLPropertiesCollection.cpp:
660         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
661         (WebCore::HTMLPropertiesCollection::updateRefElements): Set m_hasItemRefElements true upfront since we never fail to
662         update ref elements. Bail out as soon as we cleared the m_itemRefElements when the base element doesn't have itemscope
663         content attribute.
664         (WebCore::HTMLPropertiesCollection::itemAfter): Added. We reset previousItem to null because the existing itemAfter
665         requires previousItem be null when we're moving to a new entry in m_itemRefElements.
666         (WebCore::HTMLPropertiesCollection::calcLength):
667         (WebCore::HTMLPropertiesCollection::cacheFirstItem):
668         (WebCore::HTMLPropertiesCollection::updateNameCache): Merged findProperties since this was the only caller.
669         (WebCore::HTMLPropertiesCollection::names):
670         (WebCore::HTMLPropertiesCollection::namedItem):
671         (WebCore::HTMLPropertiesCollection::hasNamedItem):
672         * html/HTMLPropertiesCollection.h:
673         (HTMLPropertiesCollection): Made updateRefElements public as it's called in HTMLCollectionWithArrayStorage::item.
674
675 2012-07-11  Sami Kyostila  <skyostil@chromium.org>
676
677         RenderView layer is marked as fixed position container in the scrolling tree if page scale != 1
678         https://bugs.webkit.org/show_bug.cgi?id=89216
679
680         Reviewed by Simon Fraser.
681
682         Render layers with CSS transforms should become containers for any fixed
683         positioned descendants. However, because this check is done with
684         RenderLayer::hasTransform(), we also end up marking the RenderLayer for the
685         RenderView as fixed position container if a non-identity page scale factor is
686         used. This is because page scale is applied as a transform for that layer.
687
688         This breaks fixed position layers, because they become fixed relative to the
689         RenderView layer instead of outer scroll clip layer.
690
691         The fix is to avoid marking any root layers as fixed position containers.
692
693         No new test because the scrolling tree isn't currently testable.
694
695         * rendering/RenderLayerBacking.cpp:
696         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
697
698 2012-07-11  Julien Chaffraix  <jchaffraix@webkit.org>
699
700         REGRESSION (r116203): overflow sections don't have scrollbars
701         https://bugs.webkit.org/show_bug.cgi?id=90052
702
703         Reviewed by Simon Fraser.
704
705         This issue stems from RenderLayers with overlay scrollbars not being considered
706         self-painting.
707
708         After r120395 (follow-up of r116203), we ignore subtrees that have no self-painting layer for
709         painting. Normal scrollbars are painted by their renderer so they were properly painted. However
710         overlay scrollbars need to be painted by their RenderLayer as a separate phase (see bug 57057) so
711         they were not painted anymore. The fix is simple: make RenderLayer with overlay scrollbars
712         self-painting as they should have been in the first place.
713
714         Unfortunately no tests as I don't think we have a good way of testing overlay
715         scrollbars. Tested manually though on the super simple test case from the bug.
716
717         * rendering/RenderLayer.cpp:
718         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
719         Overlay scrollbars make the layer self-painting.
720
721         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
722         Added a call to updateSelfPaintingLayer.
723
724         (WebCore::RenderLayer::styleChanged):
725         Moved the call to updateSelfPaintingLayer after recomputing the scrollbars to ensure proper behavior.
726         Added a comment underlining the reason.
727
728         (WebCore::RenderLayer::updateSelfPaintingLayer):
729         Renamed as it is now called during layout too.
730
731         * rendering/RenderLayer.h:
732         (RenderLayer): Updated after updateSelfPaintingLayer rename.
733
734 2012-07-11  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
735
736         NodesFromRect doesn't work on SVG root elements.
737         https://bugs.webkit.org/show_bug.cgi?id=89990
738
739         Reviewed by Antonio Gomes.
740
741         Adds support for rect-based hit-testing on the SVG root element.
742         This means that while rect-based hit-testing is still not supported
743         within SVG elements, that at least it works on SVG root elements as
744         it would on any other replaced element.
745
746         Test: fast/dom/nodesFromRect-svg.html
747
748         * rendering/svg/RenderSVGRoot.cpp:
749         (WebCore::RenderSVGRoot::nodeAtPoint):
750
751 2012-07-11  Joshua Netterfield  <jnetterfield@rim.com>
752
753         [Qt] REGRESSION(r122250): It broke USE(3D_GRAPHICS)=1 and ENABLE(WEBGL)=0 builds
754         https://bugs.webkit.org/show_bug.cgi?id=90943
755
756         Reviewed by Csaba Osztrogon√°c.
757
758         Uses proper guarding in Extensions3DOpenGLCommon and Extensions3DOpenGLES as per https://bugs.webkit.org/show_bug.cgi?id=90506.
759
760         No new tests, becasue there is no new functionality.
761
762         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: Use proper guarding.
763         * platform/graphics/opengl/Extensions3DOpenGLES.cpp: Use proper guarding.
764
765 2012-07-10  Pavel Feldman  <pfeldman@chromium.org>
766
767         Web Inspector: migrate from background images to CSS for statusbar rendering.
768         https://bugs.webkit.org/show_bug.cgi?id=90902
769
770         Reviewed by Vsevolod Vlasov.
771
772         This change removes statusbar* images and uses gradients and borders to re-create original inspector look.
773
774         * WebCore.gypi:
775         * inspector/front-end/Images/statusbarBackground.png: Removed.
776         * inspector/front-end/Images/statusbarBottomBackground.png: Removed.
777         * inspector/front-end/Images/statusbarButtons.png: Removed.
778         * inspector/front-end/Images/statusbarMenuButton.png: Removed.
779         * inspector/front-end/Images/statusbarMenuButtonSelected.png: Removed.
780         * inspector/front-end/StatusBarButton.js:
781         * inspector/front-end/WebKit.qrc:
782         * inspector/front-end/inspector.css:
783         (body.drawer-visible #main-status-bar):
784         (body.drawer-visible #main-status-bar::after):
785         (.status-bar-background):
786         (.status-bar > div):
787         (.glyph):
788         (button.status-bar-item):
789         (.status-bar button.status-bar-item:active):
790         (select.status-bar-item):
791         (select.status-bar-item, select.status-bar-item:hover):
792         (body.detached .alternate-status-bar-buttons-bar):
793         (.alternate-status-bar-buttons-bar):
794         (.alternate-status-bar-buttons-bar .status-bar-item):
795         (.alternate-status-bar-buttons-bar .status-bar-item.emulate-active):
796         (#drawer):
797         (body.drawer-visible #drawer-contents):
798         (#drawer-status-bar):
799         * inspector/front-end/inspector.html:
800         * inspector/front-end/scriptsPanel.css:
801         (button.status-bar-item.scripts-navigator-show-hide-button):
802         (button.status-bar-item.scripts-navigator-show-hide-button:active):
803         (button.status-bar-item.scripts-debugger-show-hide-button):
804         (button.status-bar-item.scripts-debugger-show-hide-button:active):
805
806 2012-07-11  Jason Liu  <jason.liu@torchmobile.com.cn>
807
808         [BlackBerry] crash in CookieDatabaseBackingStore.
809         https://bugs.webkit.org/show_bug.cgi?id=90270
810
811         Reviewed by George Staikos.
812
813         There is one case for this crash.
814         1. A browser crashes and locks cookies' database for a while.
815         2. Open a new browser when the old one doesn't finish crashing.
816         3. The new one writes the cookies' database and receives a SQLITE_BUSY error
817            in CookieDatabaseBackingStore's invokeOpen. So this database isn't opened.
818         4. invokeGetCookiesWithLimit returns 0.
819         5. Crash happens when using a null pointer.
820
821         Add function setBusyTimeout(1000) and a guard for cookies' pointer.
822         setBusyTimeout will call sqlite3_busy_timeout.
823
824         When the SQLite database is accessed for reading it is locked for writing
825         until the reading access is finished. Another process cannot access the database
826         while it is locked. The timeout time sets a limit while this process tries to access
827         the locked database. If the database is unlocked within the timeout time it can be
828         accessed, otherwise an access fails.
829
830         No new tests. This crash is hard to reproduce, and it happens only on our platform.
831
832         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
833         (WebCore::CookieDatabaseBackingStore::getCookiesFromDatabase):
834
835 2012-07-11  Vsevolod Vlasov  <vsevik@chromium.org>
836
837         Web Inspector: Move revisions support to UISourceCode.
838         https://bugs.webkit.org/show_bug.cgi?id=90888
839
840         Reviewed by Pavel Feldman.
841
842         Moved revisions support to UISourceCode.
843         Revision management code is moved unchanged where possible and should be refactored later.
844
845         * inspector/front-end/CSSStyleModel.js:
846         (WebInspector.CSSStyleModelResourceBinding.prototype._innerStyleSheetChanged): revision is now added to uiSourceCode, not resource.
847         * inspector/front-end/ExtensionServer.js:
848         (WebInspector.ExtensionServer.prototype._notifyUISourceCodeContentCommitted):
849         Extension server is now listening for Workspace.UISourceCodeContentCommitted event instead of ResourceTreeModel.ResourceContentCommitted.
850         * inspector/front-end/Resource.js:
851         * inspector/front-end/ResourceTreeModel.js: ResourceTreeModel.ResourceContentCommitted renamed to Workspace.UISourceCodeContentCommitted.
852         * inspector/front-end/ResourceView.js:
853         (WebInspector.ResourceSourceFrame): ResourceSourceFrame is not update when revisions are added anymore as resource conenten is considered immutable now
854         * inspector/front-end/RevisionHistoryView.js:
855         (WebInspector.RevisionHistoryView.populateRevisions):
856         (WebInspector.RevisionHistoryView):
857         (WebInspector.RevisionHistoryView.showHistory):
858         (WebInspector.RevisionHistoryView.prototype._createUISourceCodeItem):
859         (WebInspector.RevisionHistoryView.prototype._revisionAdded.get if):
860         (WebInspector.RevisionHistoryView.prototype._revisionAdded):
861         (WebInspector.RevisionHistoryView.prototype._revealUISourceCode.get if):
862         (WebInspector.RevisionHistoryView.prototype._revealUISourceCode):
863         (WebInspector.RevisionHistoryView.prototype._reset):
864         * inspector/front-end/ScriptSnippetModel.js: Snippets are not loaded before ResourceTreeModel.mainFrame is available anymore.
865         (WebInspector.ScriptSnippetModel):
866         (WebInspector.ScriptSnippetModel.prototype._setScriptSnippetContent):
867         * inspector/front-end/UISourceCode.js:
868         (WebInspector.UISourceCode):
869         (WebInspector.UISourceCode.prototype.requestOriginalContent):
870         (WebInspector.UISourceCode.prototype._setContent):
871         (WebInspector.UISourceCode.prototype.addRevision):
872         (WebInspector.UISourceCode.prototype._restoreRevisionHistory):
873         (WebInspector.UISourceCode.prototype._clearRevisionHistory):
874         (WebInspector.UISourceCode.prototype.revertToOriginal):
875         (WebInspector.UISourceCode.prototype.revertAndClearHistory):
876         (WebInspector.UISourceCode.prototype.revertAndClearHistory.clearHistory):
877         (WebInspector.UISourceCode.prototype.commitWorkingCopy):
878         (WebInspector.UISourceCode.prototype.canonicalMimeType):
879         (WebInspector.Revision):
880         (WebInspector.Revision._revisionHistoryRegistry):
881         (WebInspector.Revision._ensureStaleRevisionsFileteredOut.persist):
882         (WebInspector.Revision._ensureStaleRevisionsFileteredOut):
883         (WebInspector.Revision.prototype.get uiSourceCode):
884         (WebInspector.Revision.prototype.get timestamp):
885         (WebInspector.Revision.prototype.get content):
886         (WebInspector.Revision.prototype.revertToThis):
887         (WebInspector.Revision.prototype.contentURL):
888         (WebInspector.Revision.prototype.contentType):
889         (WebInspector.Revision.prototype.requestContent):
890         (WebInspector.Revision.prototype.searchInContent):
891         (WebInspector.Revision.prototype._persist):
892         * inspector/front-end/UserAgentSupport.js: Drive-by closure compilation fix.
893         * inspector/front-end/Workspace.js:
894         * inspector/front-end/inspector.js: ScriptSnippetModel is now created after ResourceTreeModel.
895
896 2012-07-11  MORITA Hajime  <morrita@google.com>
897
898         WebCoreSupport needs objects each of which follows major WebCore objects
899         https://bugs.webkit.org/show_bug.cgi?id=88499
900
901         Reviewed by Alexey Proskuryakov.
902
903         This change
904
905         - Makes Internals rough lifetime to follow Document.
906           Note that Internals can survive longer than Document in same case.
907           Internals::m_document is cleared when the document destruction is notified.
908         - Makes InternalSettings rough lifetime to follow the Page.
909           This is done by making InternalSettings a supplement of the page.
910           Now InternalSettings object is created per Page instead of per Frame.
911
912         Per-test setting clearance is done by newly introduced InternalSettings::Backup,
913         which recovers the modified settings and refreshes it for each time a test starts.
914
915         * WebCore.exp.in:
916         * testing/InternalSettings.cpp:
917         (WebCore::InternalSettings::Backup::Backup):
918         (WebCore):
919         (WebCore::InternalSettings::Backup::restoreTo):
920         (WebCore::InternalSettings::from):
921         (WebCore::InternalSettings::~InternalSettings):
922         (WebCore::InternalSettings::InternalSettings):
923         (WebCore::InternalSettings::reset):
924         (WebCore::InternalSettings::settings):
925         (WebCore::InternalSettings::setFixedElementsLayoutRelativeToFrame):
926         (WebCore::InternalSettings::setFixedPositionCreatesStackingContext):
927         (WebCore::InternalSettings::allowRoundingHacks):
928         (WebCore::InternalSettings::userPreferredLanguages):
929         (WebCore::InternalSettings::setUserPreferredLanguages):
930         (WebCore::InternalSettings::setShouldDisplayTrackKind):
931         (WebCore::InternalSettings::shouldDisplayTrackKind):
932         (WebCore::InternalSettings::setPagination):
933         * testing/InternalSettings.h:
934         (Backup):
935         (InternalSettings):
936         (WebCore::InternalSettings::page):
937         * testing/InternalSettings.idl:
938         * testing/Internals.cpp:
939         (WebCore::Internals::Internals):
940         (WebCore):
941         (WebCore::Internals::contextDocument):
942         (WebCore::Internals::frame):
943         (WebCore::Internals::settings):
944         (WebCore::Internals::setPagination): Replaced as an alias.
945         (WebCore::Internals::userPreferredLanguages): Replaced as an alias.
946         (WebCore::Internals::setUserPreferredLanguages): Replaced as an alias.
947         (WebCore::Internals::setShouldDisplayTrackKind): Replaced as an alias.
948         (WebCore::Internals::shouldDisplayTrackKind): Replaced as an alias.
949         (WebCore::Internals::emitInspectorDidBeginFrame):
950         (WebCore::Internals::emitInspectorDidCancelFrame):
951         (WebCore::Internals::allowRoundingHacks): Replaced as an alias.
952         * testing/Internals.h:
953         (WebCore):
954         (Internals):
955         * testing/js/WebCoreTestSupport.cpp:
956         (WebCoreTestSupport::injectInternalsObject):
957         (WebCoreTestSupport::resetInternalsObject):
958         * testing/v8/WebCoreTestSupport.cpp:
959         (WebCoreTestSupport::injectInternalsObject):
960         (WebCoreTestSupport::resetInternalsObject):
961
962 2012-07-11  Yoshifumi Inoue  <yosin@chromium.org>
963
964         [Mac] Expose time format related functions
965         https://bugs.webkit.org/show_bug.cgi?id=90956
966
967         Reviewed by Kent Tamura.
968
969         This patch introduces localizedTimeFormatText, localizedShortTimeFormatText
970         and timeAMPMLabels for Mac within feature flag ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
971
972         See also:
973           ICU version: https://bugs.webkit.org/show_bug.cgi?id=89965
974           Win version: https://bugs.webkit.org/show_bug.cgi?id=90236
975
976         No new tests. This patch doesn't change behavior.
977
978         * platform/text/mac/LocalizedDateMac.cpp:
979         (WebCore::localizedTimeFormatText): Added.
980         (WebCore::localizedShortTimeFormatText): Added.
981         (WebCore::timeAMPMLabels): Added.
982
983 2012-07-11  Kenichi Ishibashi  <bashi@chromium.org>
984
985         [Chromium] Adding HarfBuzz-ng for Linux
986         https://bugs.webkit.org/show_bug.cgi?id=90362
987
988         Reviewed by Tony Chang.
989
990         This patch adds harfbuzz-ng support for Chromium Linux port as a part of
991         transition from old harfbuzz. HarfBuzzFaceSkia.cpp implements harfbuzz-ng
992         callbacks by using Skia APIs. For now, the feature is enabled only when
993         WTF_USE_HARFBUZZ_NG is defined.
994
995         No new tests. No change in behavior now.
996
997         * WebCore.gyp/WebCore.gyp: Added use_harfbuzz_ng variable and related files.
998         * WebCore.gypi: Added HarfBuzzFaceSkia.cpp
999         * platform/graphics/harfbuzz/FontHarfBuzz.cpp: Added USE(HARFBUZZ_NG).
1000         (WebCore::Font::drawComplexText):
1001         (WebCore::Font::floatWidthForComplexText):
1002         (WebCore::Font::offsetForPositionForComplexText):
1003         (WebCore::Font::selectionRectForComplexText):
1004         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Ditto.
1005         (WebCore):
1006         (WebCore::FontPlatformData::harfbuzzFace):
1007         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Ditto.
1008         (FontPlatformData):
1009         * platform/graphics/harfbuzz/ng/HarfBuzzFaceSkia.cpp: Added.
1010         (WebCore):
1011         (WebCore::SkiaScalarToHarfbuzzPosition):
1012         (WebCore::SkiaGetGlyphWidthAndExtents):
1013         (WebCore::harfbuzzGetGlyph):
1014         (WebCore::harfbuzzGetGlyphHorizontalAdvance):
1015         (WebCore::harfbuzzGetGlyphHorizontalOrigin):
1016         (WebCore::harfbuzzGetGlyphExtents):
1017         (WebCore::harfbuzzSkiaGetFontFuncs):
1018         (WebCore::harfbuzzSkiaGetTable):
1019         (WebCore::destroyPaint):
1020         (WebCore::HarfBuzzFace::createFace):
1021         (WebCore::HarfBuzzFace::createFont):
1022         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
1023         * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: Added USE(HARFBUZZ_NG).
1024         (WebCore::substituteWithVerticalGlyphs):
1025
1026 2012-07-11  Taiju Tsuiki  <tzik@chromium.org>
1027
1028         Web Inspector: Clean up FileSystem related code
1029         https://bugs.webkit.org/show_bug.cgi?id=90592
1030
1031         Reviewed by Vsevolod Vlasov.
1032
1033         Clean up FileSystem related code in Inspector as follows:
1034         - Clean up layout tests and add test case for error case,
1035         - Fix error handling on request,
1036         - s/GetFileSystemRootTask/FileSystemRootRequest/g
1037         - s/ReadDirectoryTask/DirectoryContentRequest/g
1038         - s/ReadFileTask/FileContentRequest/g
1039
1040         Tests: http/tests/inspector/filesystem/request-directory-content.html
1041                http/tests/inspector/filesystem/request-file-content.html
1042                http/tests/inspector/filesystem/request-filesystem-root.html
1043                http/tests/inspector/filesystem/request-metadata.html
1044
1045         * inspector/InspectorFileSystemAgent.cpp:
1046         (WebCore):
1047         (WebCore::InspectorFileSystemAgent::requestFileSystemRoot): Add early error handling.
1048         (WebCore::InspectorFileSystemAgent::requestDirectoryContent): Add early error handling.
1049         (WebCore::InspectorFileSystemAgent::requestMetadata): Add early error handling.
1050         (WebCore::InspectorFileSystemAgent::requestFileContent): Add early error handling.
1051         * inspector/InspectorFileSystemAgent.h: Remove unused forward declaration and unused header.
1052         (WebCore):
1053         (InspectorFileSystemAgent):
1054         * inspector/front-end/FileSystemModel.js:
1055         (WebInspector.FileSystemRequestManager.prototype.requestFileSystemRoot.requestAccepted):
1056         (WebInspector.FileSystemRequestManager.prototype.requestFileSystemRoot): Add early error handling.
1057         (WebInspector.FileSystemRequestManager.prototype.requestDirectoryContent.requestAccepted):
1058         (WebInspector.FileSystemRequestManager.prototype.requestDirectoryContent): Add early error handling.
1059         (WebInspector.FileSystemRequestManager.prototype.requestMetadata.requestAccepted):
1060         (WebInspector.FileSystemRequestManager.prototype.requestMetadata): Add early error handling.
1061         (WebInspector.FileSystemRequestManager.prototype.requestFileContent.requestAccepted):
1062         (WebInspector.FileSystemRequestManager.prototype.requestFileContent): Add early error handling.
1063
1064 2012-07-09  Eugene Klyuchnikov  <eustas.bug@gmail.com>
1065
1066         Web Inspector: Forward message loop instrumentation data to frontend.
1067         https://bugs.webkit.org/show_bug.cgi?id=89584
1068
1069         Reviewed by Yury Semikhatsky.
1070
1071         Transmit collected message loop tasks to inspector frontend.
1072         Now "Program" should be a top-level event on browsers that
1073         support message loop instrumentation.
1074         Frontend was changed so that user will not see any changes.
1075
1076         * inspector/InspectorTimelineAgent.cpp:
1077         (TimelineRecordType):
1078         Added new event type - "Program"
1079         (WebCore::InspectorTimelineAgent::willProcessTask):
1080         Begin "Program" event.
1081         (WebCore::InspectorTimelineAgent::didProcessTask):
1082         Finish "Program" event.
1083         (WebCore::InspectorTimelineAgent::setHeapSizeStatistic):
1084         Do not add counters to "Program" events.
1085         (WebCore):
1086         (WebCore::InspectorTimelineAgent::innerSetHeapSizeStatistic):
1087         Renamed from "setHeapSizeStatistic"
1088         * inspector/InspectorTimelineAgent.h:
1089         (InspectorTimelineAgent):
1090         * inspector/front-end/MemoryStatistics.js:
1091         (WebInspector.MemoryStatistics.prototype._onRecordAdded):
1092         Unwraps "Program" events.
1093         (WebInspector.MemoryStatistics.prototype._innerRecordAdded):
1094         Renamed from "_onRecordAdded"
1095         * inspector/front-end/TimelineFrameController.js:
1096         (WebInspector.TimelineFrameController.prototype._addRecord):
1097         Unwraps "Program" events.
1098         (WebInspector.TimelineFrameController.prototype._innerAddRecord):
1099         Renamed from "_addRecord"
1100         * inspector/front-end/TimelineModel.js:
1101         * inspector/front-end/TimelineOverviewPane.js:
1102         (WebInspector.TimelineCategoryStrips.prototype.update.appendRecord):
1103         Filter out "Program" category.
1104         (WebInspector.TimelineCategoryStrips.prototype.update):
1105         * inspector/front-end/TimelinePanel.js:
1106         (WebInspector.TimelinePanel.prototype._createStatusbarButtons):
1107         Filter out "Program" category.
1108         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
1109         Unwraps "Program" events.
1110         * inspector/front-end/TimelinePresentationModel.js:
1111         (WebInspector.TimelinePresentationModel.categories):
1112         Added "Program" category.
1113         (WebInspector.TimelinePresentationModel.recordStyle):
1114         Ditto.
1115         (WebInspector.TimelinePresentationModel.prototype.addRecord):
1116         Unwraps "Program" events.
1117         (WebInspector.TimelinePresentationModel.prototype._addRecord):
1118         Renamed from "addRecord"
1119
1120 2012-07-11  Kenichi Ishibashi  <bashi@chromium.org>
1121
1122         [Chromium] Adding HarfBuzz-ng for Linux
1123         https://bugs.webkit.org/show_bug.cgi?id=90362
1124
1125         Reviewed by Tony Chang.
1126
1127         This patch adds harfbuzz-ng support for Chromium Linux port as a part of
1128         transition from old harfbuzz. HarfBuzzFaceSkia.cpp implements harfbuzz-ng
1129         callbacks by using Skia APIs. For now, the feature is enabled only when
1130         WTF_USE_HARFBUZZ_NG is defined.
1131
1132         No new tests. No change in behavior now.
1133
1134         * WebCore.gyp/WebCore.gyp: Added use_harfbuzz_ng variable and related files.
1135         * WebCore.gypi: Added HarfBuzzFaceSkia.cpp
1136         * platform/graphics/harfbuzz/FontHarfBuzz.cpp: Added USE(HARFBUZZ_NG).
1137         (WebCore::Font::drawComplexText):
1138         (WebCore::Font::floatWidthForComplexText):
1139         (WebCore::Font::offsetForPositionForComplexText):
1140         (WebCore::Font::selectionRectForComplexText):
1141         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp: Ditto.
1142         (WebCore):
1143         (WebCore::FontPlatformData::harfbuzzFace):
1144         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h: Ditto.
1145         (FontPlatformData):
1146         * platform/graphics/harfbuzz/ng/HarfBuzzFaceSkia.cpp: Added.
1147         (WebCore):
1148         (WebCore::SkiaScalarToHarfbuzzPosition):
1149         (WebCore::SkiaGetGlyphWidthAndExtents):
1150         (WebCore::harfbuzzGetGlyph):
1151         (WebCore::harfbuzzGetGlyphHorizontalAdvance):
1152         (WebCore::harfbuzzGetGlyphHorizontalOrigin):
1153         (WebCore::harfbuzzGetGlyphExtents):
1154         (WebCore::harfbuzzSkiaGetFontFuncs):
1155         (WebCore::harfbuzzSkiaGetTable):
1156         (WebCore::destroyPaint):
1157         (WebCore::HarfBuzzFace::createFace):
1158         (WebCore::HarfBuzzFace::createFont):
1159         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
1160         * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: Added USE(HARFBUZZ_NG).
1161         (WebCore::substituteWithVerticalGlyphs):
1162
1163 2012-07-11  Kenneth Russell  <kbr@google.com>
1164
1165         compositing/webgl/webgl-nonpremultiplied-blend.html is flaky on Lion
1166         https://bugs.webkit.org/show_bug.cgi?id=82412
1167
1168         Reviewed by Adrienne Walker.
1169
1170         When compositing premultipliedAlpha=false WebGL canvases, use a separate
1171         blend function for the alpha channel to avoid writing alpha < 1. This
1172         makes the behavior more consistent with all other compositing results
1173         and avoids situations where the alpha channel is preserved on some
1174         platforms and discarded on others.
1175
1176         Covered by existing tests.
1177
1178         * platform/graphics/chromium/LayerRendererChromium.cpp:
1179         (WebCore::LayerRendererChromium::drawTextureQuad):
1180             Use separate alpha blend function when compositing premultipliedAlpha=false WebGL canvases.
1181
1182 2012-07-10  Yoshifumi Inoue  <yosin@chromium.org>
1183
1184         [Chromium-Windows] Implement functions for localized time format information
1185         https://bugs.webkit.org/show_bug.cgi?id=90236
1186
1187         Reviewed by Kent Tamura.
1188
1189         This patch introduces following localized time format related
1190         functions:
1191             - localizedTimeFormatText
1192             - localizeShortTimeFormatText()
1193             - timeAMPMLabels
1194         for Windows in feature flag: ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
1195
1196         See also:
1197           ICU version: https://bugs.webkit.org/show_bug.cgi?id=89965
1198           Mac version: https://bugs.webkit.org/show_bug.cgi?id=90237
1199
1200         Tests: WebKit/chromium/tests/LocalWinTest.cpp
1201
1202         * platform/text/LocaleWin.cpp:
1203         (WebCore::mapCharacterToDateTimeFieldType): Added.
1204         (WebCore::convertWindowsTimeFormatToLDML): Added.
1205         (WebCore::LocaleWin::timeFormatText): Added.
1206         (WebCore::LocaleWin::shortTimeFormatText): Added.
1207         (WebCore::LocaleWin::timeAMPMLabels): Added.
1208         * platform/text/LocaleWin.h:
1209         (LocaleWin): Added time format related functions and variables.
1210         * platform/text/LocalizedDateWin.cpp:
1211         (WebCore::localizedTimeFormatText): Added.
1212         (WebCore::localizedShortTimeFormatText):  Added.
1213         (WebCore::timeAMPMLabels):  Added.
1214
1215 2012-07-10  Douglas Stockwell  <dstockwell@chromium.org>
1216
1217         Style not updated for element with display:none becoming first/last-child
1218         https://bugs.webkit.org/show_bug.cgi?id=90356
1219
1220         Reviewed by Kent Tamura.
1221
1222         Always trigger style recalc when an element without a renderer becomes the first/last-child.
1223
1224         Tests: fast/css/first-child-display-change.html
1225                fast/css/last-child-display-change.html
1226
1227         * dom/Element.cpp:
1228         (WebCore::checkForSiblingStyleChanges):
1229
1230 2012-07-10  Shinya Kawanaka  <shinyak@chromium.org>
1231
1232         ShadowRoot should know its type in debug build.
1233         https://bugs.webkit.org/show_bug.cgi?id=90933
1234
1235         Reviewed by Hajime Morita.
1236
1237         For assertion, ShadowRoot should know its type is UserAgentShadowRoot or AuthorShadowRoot.
1238
1239         This patch also renames ShadowRootCreationPurpose to ShadowRootType, since it is suitable
1240         name for ShadowRoot to have.
1241
1242         No new tests, since it is used only for assertion.
1243
1244         * dom/Element.cpp:
1245         (WebCore::Element::ensureShadowRoot):
1246         * dom/ShadowRoot.cpp:
1247         (WebCore::ShadowRoot::create):
1248         * dom/ShadowRoot.h:
1249         (ShadowRoot):
1250         (WebCore::ShadowRoot::type):
1251         * html/HTMLDetailsElement.cpp:
1252         (WebCore::HTMLDetailsElement::createShadowSubtree):
1253         * html/HTMLInputElement.cpp:
1254         (WebCore::HTMLInputElement::createShadowSubtree):
1255         * html/HTMLKeygenElement.cpp:
1256         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
1257         * html/HTMLMeterElement.cpp:
1258         (WebCore::HTMLMeterElement::createShadowSubtree):
1259         * html/HTMLProgressElement.cpp:
1260         (WebCore::HTMLProgressElement::createShadowSubtree):
1261         * html/HTMLSummaryElement.cpp:
1262         (WebCore::HTMLSummaryElement::createShadowSubtree):
1263         * html/HTMLTextAreaElement.cpp:
1264         (WebCore::HTMLTextAreaElement::createShadowSubtree):
1265         * html/InputType.cpp:
1266         (WebCore::InputType::destroyShadowSubtree): Asserts that ShadowRoot type is UserAgentShadowRoot.
1267         * html/shadow/TextFieldDecorationElement.cpp:
1268         (WebCore::getDecorationRootAndDecoratedRoot):
1269         * svg/SVGTRefElement.cpp:
1270         (WebCore::SVGTRefElement::createShadowSubtree):
1271
1272 2012-07-10  George Staikos  <staikos@webkit.org>
1273
1274         Add missing binding type String for IndexedDB.
1275         https://bugs.webkit.org/show_bug.cgi?id=90351
1276
1277         Reviewed by Nikolas Zimmermann.
1278
1279         No new tests because it's already covered by IDB tests.
1280
1281         * bindings/js/JSIDBAnyCustom.cpp:
1282         (WebCore::toJS):
1283
1284 2012-07-10  Brian Anderson  <brianderson@chromium.org>
1285
1286         [chromium] Make full texture updates explicit
1287         https://bugs.webkit.org/show_bug.cgi?id=90507
1288
1289         Reviewed by Adrienne Walker.
1290
1291         Covered by existing tests.
1292
1293         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
1294         (WebCore::ScrollbarLayerChromium::updatePart):
1295         * platform/graphics/chromium/TiledLayerChromium.cpp:
1296         (WebCore::TiledLayerChromium::updateTiles):
1297         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
1298         (WebCore::CCTextureUpdater::appendFullUpdate):
1299         (WebCore::CCTextureUpdater::hasMoreUpdates):
1300         (WebCore::CCTextureUpdater::update):
1301         (WebCore::CCTextureUpdater::clear):
1302         * platform/graphics/chromium/cc/CCTextureUpdater.h:
1303         (CCTextureUpdater):
1304
1305 2012-07-10  Shinya Kawanaka  <shinyak@chromium.org>
1306
1307         Crash in nextLinePosition() due to accessing a removed root line box.
1308         https://bugs.webkit.org/show_bug.cgi?id=90484
1309
1310         Reviewed by Abhishek Arya.
1311
1312         When <object> element is reattached, the 'content' style is compared to the old style.
1313         If it is not the same, a flag to recalc style is enabled. Because of this, the recalc style flag
1314         is not cleared in updateLayoutIgnorePendingStyleSheets() in nextLinePosition(), and it causes
1315         the second layout in isEditablePosition(p). Then 'RootInlineBox root' is invalidated, but
1316         it's used after that.
1317
1318         When the content of the same <object> elements are compared, they should be the same.
1319         However, operator== for ContentData is not implemented correctly (it compares a pointer instead of
1320         content). So operator== does not hold for the content of the same <object> elements.
1321
1322         Test: editing/execCommand/crash-extend-selection-forward.html
1323
1324         * rendering/style/ContentData.cpp:
1325         (WebCore::operator==): Compares the instance of data instead of pointer.
1326
1327 2012-07-10  Joshua Bell  <jsbell@chromium.org>
1328
1329         IndexedDB: Ensure transaction abort events are deterministic in multiprocess ports
1330         https://bugs.webkit.org/show_bug.cgi?id=90412
1331
1332         Reviewed by Tony Chang.
1333
1334         In multi-process ports (e.g. Chromium), transaction aborts triggered on the front-end could 
1335         be initiated while a "success" event was in-flight from the back end. This would lead to 
1336         apparently flaky behavior when requests would sometimes report success and sometimes report
1337         an error. Address this by having front-end triggered aborts do the abort steps immediately,
1338         then send the async abort request to the back end.
1339
1340         No new tests - behavior in single process ports (and DRT) covered by existing
1341         tests. Will enable currently disabled Chromium tests to be enabled (crbug.com/83226).
1342
1343         * Modules/indexeddb/IDBRequest.cpp:
1344         (WebCore::IDBRequest::IDBRequest): Initialize a new m_requestAborted flag, used to prevent
1345         dispatching if an in-flight request comes in after the abort.
1346         (WebCore::IDBRequest::abort): Set flag to prevent double dispatching.
1347         (WebCore::IDBRequest::onError): Handle aborted-then-received-event case.
1348         (WebCore::IDBRequest::onSuccess): Ditto.
1349         (WebCore::IDBRequest::onSuccessWithContinuation): Ditto.
1350         (WebCore::IDBRequest::dispatchEvent): On uncaught error, trigger abort on transaction front-end.
1351         * Modules/indexeddb/IDBRequest.h:
1352         (IDBRequest):
1353         * Modules/indexeddb/IDBTransaction.cpp:
1354         (WebCore::IDBTransaction::abort): Do abort steps locally first, then notify back-end.
1355         (WebCore::IDBTransaction::onAbort): If abort wasn't triggered locally, clean up is still necessary.
1356
1357 2012-07-10  Julien Chaffraix  <jchaffraix@webkit.org>
1358
1359         REGRESSION(r112113): absolutely positioned INPUT boxes with a table cell containing block have a 0px height
1360         https://bugs.webkit.org/show_bug.cgi?id=89209
1361
1362         Reviewed by Ojan Vafai.
1363
1364         Test: fast/forms/input-in-table-cell-no-value.html
1365
1366         The issue comes from the layout code not properly resetting the overriden heigth between layouts.
1367
1368         The test case relies on a table cell as it requires a 2 pass layout. Between the 2 passes, different
1369         code paths would be taken, leading to previous values being used to over-constrain the inner content.
1370
1371         * rendering/RenderTextControlSingleLine.cpp:
1372         (WebCore::RenderTextControlSingleLine::layout):
1373         Ensure consistent layout by resetting any overriden conditional height.
1374
1375 2012-07-10  Kevin Ellis  <kevers@chromium.org>
1376
1377         Input elements with type=range do not have default touch handlers.
1378         https://bugs.webkit.org/show_bug.cgi?id=88807
1379
1380         Reviewed by Antonio Gomes.
1381
1382         This patch adds support for touch event handling on input elements
1383         and dragging a slider with touch start and move events.  Previously,
1384         manipulating a slider on a touch screen required generation of
1385         synthetic mouse events.
1386
1387         Tests: fast/events/touch/touch-slider-no-js-touch-listener.html
1388                fast/events/touch/touch-slider.html
1389
1390         * dom/Event.cpp:
1391         (WebCore::Event::isTouchEvent):
1392         (WebCore):
1393         * dom/Event.h:
1394         (Event):
1395         * dom/Touch.cpp:
1396         (WebCore::Touch::Touch):
1397         * dom/Touch.h:
1398         (WebCore::Touch::absoluteLocation):
1399         (Touch):
1400         * dom/TouchEvent.cpp:
1401         (WebCore::TouchEvent::isTouchEvent):
1402         (WebCore):
1403         * dom/TouchEvent.h:
1404         (TouchEvent):
1405         * html/HTMLInputElement.cpp:
1406         (WebCore::HTMLInputElement::HTMLInputElement):
1407         (WebCore::HTMLInputElement::~HTMLInputElement):
1408         (WebCore::HTMLInputElement::updateType):
1409         (WebCore::HTMLInputElement::defaultEventHandler):
1410         * html/HTMLInputElement.h:
1411         (HTMLInputElement):
1412         * html/InputType.cpp:
1413         (WebCore):
1414         (WebCore::InputType::handleTouchEvent):
1415         (WebCore::InputType::hasTouchEventHandler):
1416         * html/InputType.h:
1417         (WebCore):
1418         (ClickHandlingState):
1419         (InputType):
1420         * html/RangeInputType.cpp:
1421         (WebCore):
1422         (WebCore::RangeInputType::handleTouchEvent):
1423         (WebCore::RangeInputType::hasTouchEventHandler):
1424         * html/RangeInputType.h:
1425         (RangeInputType):
1426         * html/shadow/SliderThumbElement.h:
1427         (SliderThumbElement):
1428
1429 2012-07-10  Pravin D  <pravind.2k4@gmail.com>
1430
1431         Re-factoring recalcColumn in AutoTableLayout.cpp for readability
1432         https://bugs.webkit.org/show_bug.cgi?id=89636
1433
1434         Reviewed by Julien Chaffraix.
1435
1436         No test case required. Code re-factoring.
1437
1438         * rendering/AutoTableLayout.cpp:
1439         Added a const integer place holder for 32760.
1440
1441         (WebCore::AutoTableLayout::recalcColumn):
1442          Changes :
1443          1) Moved the continue statement above the bool cellHasContent for an early return.
1444          2) Replaced the constant 32760 by a placeholder.
1445          3) Initialization of columnLayout max and min logical widths is made common for both cells having col span == 1 and span > 1.
1446          4) Removed redundant check for cell logical width type. 
1447
1448 2012-07-10  Adam Barth  <abarth@webkit.org>
1449
1450         WebCore::Settings for Hixie76 WebSocket protocol doesn't do anything and should be removed
1451         https://bugs.webkit.org/show_bug.cgi?id=90910
1452
1453         Reviewed by Eric Seidel.
1454
1455         We've already removed the code that implements Hixie76 WebSockets. This
1456         patch just removes the WebCore::Setting that used to control which
1457         WebSocket protocol version we'd use.
1458
1459         I've left the WebKit-layer APIs in place, but they now don't do
1460         anything.  I'll remove all the Chromium callers shortly.
1461
1462         * page/Settings.cpp:
1463         (WebCore::Settings::Settings):
1464         * page/Settings.h:
1465         (Settings):
1466
1467 2012-07-10  Philip Rogers  <pdr@google.com>
1468
1469         Crash due to SVG animation element not removed from target (before reset)
1470         https://bugs.webkit.org/show_bug.cgi?id=90750
1471
1472         Reviewed by Abhishek Arya.
1473
1474         Previously we were not removing an animation element from
1475         SVGDocumentExtensions::m_animatedElements which led to a crash.
1476         This change properly removes animation elements in resetTargetElement
1477         which both fixes this bug and will prevent others from hitting it in
1478         the future.
1479
1480         Test: svg/animations/dynamic-modify-attributename-crash2.svg
1481
1482         * svg/SVGDocumentExtensions.cpp:
1483         (WebCore::SVGDocumentExtensions::removeAllAnimationElementsFromTarget):
1484
1485         removeAllAnimationElementsFromTarget now adds all the animation elements
1486         to a vector and iterates over it because the changes to resetTargetElement
1487         would have caused us to modify the underlying hashset as we iterated. Note that
1488         before we deleted animationElementsForTarget in removeAllAnimationElementsFromTarget
1489         but that logic is now handled in removeAnimationElementFromTarget which is called
1490         during resetTargetElement.
1491
1492         * svg/animation/SVGSMILElement.cpp:
1493         (WebCore::SVGSMILElement::removedFrom):
1494
1495         Because of the changes in resetTargetElement, removedFrom was able to be
1496         refactored. This patch changes removedFrom to call resetTargetElement rather
1497         than have duplicated logic. There is a very small change in logic here:
1498         animationAttributeChanged() is now called in removedFrom().
1499
1500         (WebCore::SVGSMILElement::resetTargetElement):
1501
1502         resetTargetElement now fully resets the target, including removing it from
1503         m_animatedElements. This will prevent future instances of this bug.
1504
1505 2012-07-10  Helder Correia  <helder.correia@nokia.com>
1506
1507         [Qt] Repaint counter for accelerated compositing
1508         https://bugs.webkit.org/show_bug.cgi?id=90116
1509
1510         Reviewed by Noam Rosenthal.
1511
1512         No new tests, just introducing a debug feature.
1513
1514         For this feature to be enabled, the environment variable
1515         QT_WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS must be set to 1. Once enabled,
1516         both repaint counters and tile borders will be painted.
1517
1518         Important notes:
1519         - Only WebKit2 is targetted for now.
1520         - There is no integration with Preferences. That aproach was
1521         taken initially but revealed complex and overkill for such a
1522         debugging-only functionality. Thus, to disable it simply restart with
1523         the environment variable unset or set to some other value.
1524
1525         A Qt-specific drawRepaintCounter() function was added to
1526         TextureMapperGL. A QImage is used as scratch buffer to paint borders and
1527         counters. It is then uploaded to a BitmapTexture acquired from the pool
1528         and finally draw by TextureMapper. The actual compositing happens inside
1529         LayerBackingStore::paintToTextureMapper(). Each LayerBackingStoreTile
1530         now has a repaint counter which gets incremented in
1531         LayerBackingStore::updateTile().
1532
1533         * platform/graphics/texmap/TextureMapper.h:
1534         * platform/graphics/texmap/TextureMapperGL.cpp:
1535         (WebCore):
1536         (WebCore::TextureMapperGL::drawRepaintCounter):
1537         * platform/graphics/texmap/TextureMapperGL.h:
1538         * platform/graphics/texmap/TextureMapperImageBuffer.h:
1539
1540 2012-07-09  Dana Jansens  <danakj@chromium.org>
1541
1542         [chromium] Replace use of ManagedTexture with CCScopedTexture for impl thread and remove implTextureManager from LayerRendererChromium
1543         https://bugs.webkit.org/show_bug.cgi?id=90841
1544
1545         Reviewed by Adrienne Walker.
1546
1547         Remove the TextureManager from LayerRendererChromium, which was the last
1548         instance of the class in the compositor. Instead of using ManagedTexture
1549         objects for RenderPass textures, use instances of CCScopedTexture, which
1550         manage the lifetime of the allocated texture ids. TextureManager will be
1551         removed entirely once all callers of memoryUseBytes() have been removed.
1552
1553         No new tests. No change in behaviour.
1554
1555         * platform/graphics/chromium/LayerRendererChromium.cpp:
1556         (WebCore::LayerRendererChromium::LayerRendererChromium):
1557         (WebCore::LayerRendererChromium::releaseRenderPassTextures):
1558         (WebCore):
1559         (WebCore::LayerRendererChromium::renderPassTextureSize):
1560         (WebCore::LayerRendererChromium::renderPassTextureFormat):
1561         (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
1562         (WebCore::LayerRendererChromium::haveCachedResourcesForRenderPassId):
1563         (WebCore::LayerRendererChromium::drawQuad):
1564         (WebCore::applyFilters):
1565         (WebCore::LayerRendererChromium::drawBackgroundFilters):
1566         (WebCore::LayerRendererChromium::drawRenderPassQuad):
1567         (WebCore::LayerRendererChromium::drawHeadsUpDisplay):
1568         (WebCore::LayerRendererChromium::getFramebufferTexture):
1569         (WebCore::LayerRendererChromium::isCurrentRenderPass):
1570         (WebCore::LayerRendererChromium::useRenderPass):
1571         (WebCore::LayerRendererChromium::useScopedTexture):
1572         (WebCore::LayerRendererChromium::bindFramebufferToTexture):
1573         (WebCore::LayerRendererChromium::initializeSharedObjects):
1574         * platform/graphics/chromium/LayerRendererChromium.h:
1575         (WebCore):
1576         (LayerRendererChromium):
1577         * platform/graphics/chromium/TrackingTextureAllocator.cpp:
1578         (WebCore::TrackingTextureAllocator::TrackingTextureAllocator):
1579         (WebCore::TrackingTextureAllocator::createTexture):
1580         * platform/graphics/chromium/TrackingTextureAllocator.h:
1581         (WebCore::TrackingTextureAllocator::create):
1582         (TrackingTextureAllocator):
1583         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1584         (WebCore::CCHeadsUpDisplay::draw):
1585         * platform/graphics/chromium/cc/CCHeadsUpDisplay.h:
1586         (WebCore):
1587         (CCHeadsUpDisplay):
1588         * platform/graphics/chromium/cc/CCRenderer.h:
1589         (WebCore):
1590         (CCRenderer):
1591
1592 2012-07-10  Dean Jackson  <dino@apple.com>
1593
1594         REGRESSION (r109610): Order of values in shorthand animation makes a difference
1595         https://bugs.webkit.org/show_bug.cgi?id=84533
1596         <rdar://problem/11831924>
1597         <rdar://problem/11815787>
1598
1599         Reviewed by Simon Fraser.
1600
1601         A previous revision (r109610) updated the parsing of the animation shorthand
1602         to make sure that animation-name wouldn't clobber other styles. The side effect
1603         of this was that we'd no longer find animation-name if it wasn't first in the
1604         list. This commit reverts the change and fixes it in a different way, by always
1605         parsing animation-name as the last property in the shorthand. This means that
1606         keywords for timing functions, fill modes and iteration will match before
1607         animation name. In other words, if you want an animation called "forwards"
1608         you should use the longhand property, because the shorthand will first match
1609         that against animation-fill-mode.
1610
1611         Test: animations/animation-shorthand-name-order.html
1612
1613         * css/CSSParser.cpp:
1614         (WebCore::CSSParser::parseAnimationShorthand): make a new array of longhand
1615         properties to check for, with name as the last entry rather than the first.
1616         Use this array to test the properties in the shorthand.
1617
1618 2012-07-10  Huang Dongsung  <luxtella@company100.net>
1619
1620         Fix a potential bug of BitmapImage::frameCount().
1621         https://bugs.webkit.org/show_bug.cgi?id=90756
1622
1623         Reviewed by Simon Fraser.
1624
1625         If an ImageDecoder is not yet initialized, m_source.frameCount() returns 0. This
1626         does not mean that the frame count is actually 0. So we must set
1627         m_haveFrameCount to true only when m_frameCount is not 0.
1628
1629         The current code is okay because BitmapImage::frameCount() is never called
1630         before the decoder is initialized. However, this no longer holds true once we
1631         introduce parallel image decoders.
1632
1633         No new tests, no behavior change.
1634
1635         * platform/graphics/BitmapImage.cpp:
1636         (WebCore::BitmapImage::frameCount):
1637
1638 2012-07-10  Ojan Vafai  <ojan@chromium.org>
1639
1640         Build fix. Removing unused variable from http://trac.webkit.org/changeset/122264.
1641         * rendering/RenderBox.cpp:
1642         (WebCore::RenderBox::computeContentLogicalHeightUsing):
1643
1644 2012-07-10  Ryosuke Niwa  <rniwa@webkit.org>
1645
1646         HTMLPropertiesCollection should share more code with HTMLCollection
1647         https://bugs.webkit.org/show_bug.cgi?id=90842
1648
1649         Reviewed by Anders Carlsson.
1650
1651         Got rid of HTMLPropertiesCollection::m_cache, and added m_itemRefElements, m_propertyNames, m_propertyCache,
1652         m_hasPropertyNameCache, and m_hasItemRefElements to HTMLPropertiesCollection itself. These are caches specific
1653         to HTMLPropertiesCollection. Note that hasNameCache has been renamed to m_hasPropertyNameCache and itemRefElementPosition
1654         has been replaced by cachedElementsArrayOffset() in HTMLCollectionCacheBase (also used in HTMLFormCollection).
1655
1656         Also deleted all methods on m_cache except updatePropertyCache since caches can be accessed directly from
1657         HTMLPropertiesCollection.
1658
1659         * html/HTMLCollection.cpp:
1660         (WebCore::HTMLCollection::invalidateCacheIfNeeded):
1661         (WebCore::HTMLCollection::invalidateCache):
1662         * html/HTMLCollection.h:
1663         (HTMLCollection):
1664         * html/HTMLPropertiesCollection.cpp:
1665         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
1666         (WebCore):
1667         (WebCore::HTMLPropertiesCollection::updateRefElements):
1668         (WebCore::HTMLPropertiesCollection::itemAfter):
1669         (WebCore::HTMLPropertiesCollection::calcLength):
1670         (WebCore::HTMLPropertiesCollection::cacheFirstItem):
1671         (WebCore::HTMLPropertiesCollection::item):
1672         (WebCore::HTMLPropertiesCollection::findProperties):
1673         (WebCore::HTMLPropertiesCollection::updateNameCache):
1674         (WebCore::HTMLPropertiesCollection::names):
1675         (WebCore::HTMLPropertiesCollection::namedItem):
1676         (WebCore::HTMLPropertiesCollection::hasNamedItem):
1677         * html/HTMLPropertiesCollection.h:
1678         (HTMLPropertiesCollection):
1679         (WebCore::HTMLPropertiesCollection::clearCache):
1680         (WebCore::HTMLPropertiesCollection::updatePropertyCache):
1681
1682 2012-07-10  Ojan Vafai  <ojan@chromium.org>
1683
1684         Add support for min-height:auto and min-width:auto
1685         https://bugs.webkit.org/show_bug.cgi?id=88437
1686
1687         Reviewed by Tony Chang.
1688
1689         Right now auto does the same thing as min-height/min-width:0.
1690         For flex-items it should be the same as min-content (followup patch).
1691         http://dev.w3.org/csswg/css3-flexbox/#min-size-auto
1692
1693         Tests: fast/css/auto-min-size.html
1694                fast/css/deprecated-flexbox-auto-min-size.html
1695
1696         * WebCore.order:
1697         * css/CSSComputedStyleDeclaration.cpp:
1698         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1699         Return 0px for the computed value of auto.
1700
1701         * css/CSSParser.cpp:
1702         (WebCore::CSSParser::validWidth):
1703         (WebCore):
1704         (WebCore::CSSParser::validHeight):
1705         (WebCore::CSSParser::parseValue):
1706         * css/CSSParser.h:
1707         (CSSParser):
1708         Restructure width/height parsing to reduce code duplication and make it easier
1709         to add auto as a valid min value.
1710
1711         * platform/efl/RenderThemeEfl.cpp:
1712         (WebCore::RenderThemeEfl::adjustSizeConstraints):
1713         This code was unnecessarily checking intrinsicOrAuto since auto was previously
1714         not an allowed value for minWidth/minHeight.
1715
1716         * rendering/RenderBox.cpp:
1717         (WebCore::RenderBox::computeLogicalWidthInRegion):
1718         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1719         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
1720         (WebCore::RenderBox::computeLogicalHeight):
1721         (WebCore::RenderBox::computeLogicalHeightUsing):
1722         (WebCore::RenderBox::computeContentLogicalHeightUsing):
1723         (WebCore::RenderBox::computeReplacedLogicalWidth):
1724         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
1725         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1726         (WebCore::RenderBox::computeReplacedLogicalHeight):
1727         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
1728         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1729         (WebCore::RenderBox::computePositionedLogicalWidth):
1730         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1731         (WebCore::RenderBox::computePositionedLogicalHeight):
1732         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1733         Need to pass a SizeType to all these methods so that we know if the Length
1734         we're working with is a min length since auto has a different meaning now
1735         for min lengths.
1736
1737         * rendering/RenderBox.h:
1738         (RenderBox):
1739         * rendering/RenderDeprecatedFlexibleBox.cpp:
1740         (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
1741         * rendering/RenderFlexibleBox.cpp:
1742         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
1743         (WebCore::RenderFlexibleBox::computeAvailableFreeSpace):
1744         (WebCore::RenderFlexibleBox::lineBreakLength):
1745         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
1746         * rendering/RenderReplaced.cpp:
1747         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
1748         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
1749         * rendering/RenderScrollbarPart.cpp:
1750         (WebCore::calcScrollbarThicknessUsing):
1751         (WebCore::RenderScrollbarPart::computeScrollbarWidth):
1752         (WebCore::RenderScrollbarPart::computeScrollbarHeight):
1753         * rendering/style/RenderStyle.h:
1754         Default minHeight/minWidth to auto instead of 0px.
1755
1756 2012-07-10  Xianzhu Wang  <wangxianzhu@chromium.org>
1757
1758         [Chromium-Android] Use default font rendering styles in FontPlatformData::querySystemForRenderStyle()
1759         https://bugs.webkit.org/show_bug.cgi?id=90826
1760
1761         Reviewed by Adam Barth.
1762
1763         No new tests. The change to this file is refactoring only.
1764
1765         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
1766         (WebCore::FontPlatformData::querySystemForRenderStyle): Moved the "NoPreference" initialization into PlatformSupport::PlatformSupport::getRenderStyleForStrike().
1767
1768 2012-07-10  Raymond Toy  <rtoy@google.com>
1769
1770         AudioFIFO not correctly wrapping the write index on push
1771         https://bugs.webkit.org/show_bug.cgi?id=90901
1772
1773         Reviewed by Chris Rogers.
1774
1775         No new tests
1776
1777         * platform/audio/AudioFIFO.cpp:
1778         (WebCore::AudioFIFO::push): Wrap the write index, not read index!
1779
1780 2012-07-10  Dana Jansens  <danakj@chromium.org>
1781
1782         [chromium] Avoid allocating render pass textures that have no content
1783         https://bugs.webkit.org/show_bug.cgi?id=90702
1784
1785         Reviewed by Adrienne Walker.
1786
1787         When OOM conditions are hit, textures are not allocated for some layers
1788         which can prevent any quads from being present for a render surface.
1789         This is used as a signal to prevent the RenderPass from allocating a
1790         texture.
1791
1792         Replace the CCLayerTreeHostImpl::removePassesWithCachedTextures() method
1793         with a general removeRenderPasses() which takes a culling control object
1794         and will remove passes based on the inputs from the control object.
1795
1796         This new method is used for the old purpose of removing passes with cached
1797         textures, as well as to remove passes that do not have any quad inputs.
1798
1799         Test: CCLayerTreeHostTestSurfaceNotAllocatedForLayersOutsideMemoryLimit
1800
1801         * platform/graphics/chromium/LayerRendererChromium.cpp:
1802         (WebCore::LayerRendererChromium::drawRenderPassQuad):
1803         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1804         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
1805         (WebCore):
1806         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::shouldRemoveRenderPass):
1807         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::shouldRemoveRenderPass):
1808         (WebCore::CCLayerTreeHostImpl::removeRenderPasses):
1809         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1810         (WebCore):
1811         (CullRenderPassesWithCachedTextures):
1812         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::renderPassListBegin):
1813         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::renderPassListEnd):
1814         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::renderPassListNext):
1815         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithCachedTextures::CullRenderPassesWithCachedTextures):
1816         (CCLayerTreeHostImpl):
1817         (CullRenderPassesWithNoQuads):
1818         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::renderPassListBegin):
1819         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::renderPassListEnd):
1820         (WebCore::CCLayerTreeHostImpl::CullRenderPassesWithNoQuads::renderPassListNext):
1821
1822 2012-07-10  Joshua Netterfield  <jnetterfield@rim.com>
1823         Make GC3D and E3D more maintainable for GLES platforms
1824         https://bugs.webkit.org/show_bug.cgi?id=90567
1825
1826         Reviewed by Rob Buis.
1827
1828         This patch cleans up code for WebGL on OpenGLES platforms which use 
1829         GraphicsContext3DOpenGL* and Extensions3DOpenGL*. Although
1830         GraphicsContext3DOpenGL was already split into GraphicsContext3DOpenGL,
1831         GraphicsContext3DOpenGLCommon, and  GraphicsContext3DOpenGLES, this patch
1832         is an attempt to refactor this code in a way that will help BlackBerry and
1833         other teams support WebGL on mobile platforms with as little use of
1834         "#IF USE(OPENGL_ES_2)" in common code as possible. Also included is the
1835         separation of Extensions3DOpenGL into Extensions3DOpenGLCommon,
1836         Extensions3DOpenGL, and Extensions3DOpenGLES as well as the introduction
1837         of OpenGLESShims.
1838
1839         This patch is created in large part by Jonathan Feldstein.
1840
1841         No new tests: no new behaviour.
1842
1843         * PlatformBlackBerry.cmake: Recognize BlackBerry as OPENGL ES, add new files to build
1844         * Target.pri: Add new Extensions3DOpenGL* to WebGL builds
1845         * platform/graphics/GraphicsContext3D.h: Add validateDepthStencil, make systemAllowsMultisamplingOnATICards a a member function.
1846         (WebCore):
1847         * platform/graphics/OpenGLESShims.h: Added.
1848         * platform/graphics/opengl/Extensions3DOpenGL.cpp: Move code to Extensions3DOpenGLCommon where possible
1849         (WebCore::Extensions3DOpenGL::Extensions3DOpenGL): Reflect that it is now inherits Extensions3DCommon
1850         (WebCore::Extensions3DOpenGL::supportsExtension): Contains OpenGL specific code from supports
1851         (WebCore):
1852         (WebCore::Extensions3DOpenGL::getExtensions): Returns a list of extensions
1853         * platform/graphics/opengl/Extensions3DOpenGL.h: Remove functions now in Extensions3DOpenGLCommon
1854         (WebCore):
1855         (Extensions3DOpenGL):
1856         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp: Added.
1857         (WebCore):
1858         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
1859         (WebCore::Extensions3DOpenGLCommon::~Extensions3DOpenGLCommon):
1860         (WebCore::Extensions3DOpenGLCommon::supports):
1861         (WebCore::Extensions3DOpenGLCommon::ensureEnabled):
1862         (WebCore::Extensions3DOpenGLCommon::isEnabled):
1863         (WebCore::Extensions3DOpenGLCommon::getGraphicsResetStatusARB):
1864         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE): Existed before, but did nothing. Now does what is says it does.
1865         (WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions): Moved from Extensions3DOpenGL::supports
1866         * platform/graphics/opengl/Extensions3DOpenGLCommon.h: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h.
1867         (WebCore):
1868         (Extensions3DOpenGLCommon):
1869         * platform/graphics/opengl/Extensions3DOpenGLES.cpp: Added.
1870         (WebCore):
1871         (WebCore::Extensions3DOpenGLES::Extensions3DOpenGLES):
1872         (WebCore::Extensions3DOpenGLES::~Extensions3DOpenGLES):
1873         (WebCore::Extensions3DOpenGLES::framebufferTexture2DMultisampleIMG):
1874         (WebCore::Extensions3DOpenGLES::renderbufferStorageMultisampleIMG):
1875         (WebCore::Extensions3DOpenGLES::createVertexArrayOES):
1876         (WebCore::Extensions3DOpenGLES::deleteVertexArrayOES):
1877         (WebCore::Extensions3DOpenGLES::isVertexArrayOES):
1878         (WebCore::Extensions3DOpenGLES::bindVertexArrayOES):
1879         (WebCore::Extensions3DOpenGLES::supportsExtension): Contains OpenGLES specific code from supports
1880         (WebCore::Extensions3DOpenGLES::getExtensions):
1881         * platform/graphics/opengl/Extensions3DOpenGLES.h: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.h.
1882         (WebCore):
1883         (Extensions3DOpenGLES):
1884         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1885         (WebCore::GraphicsContext3D::validateAttributes):
1886         (WebCore):
1887         (WebCore::GraphicsContext3D::renderbufferStorage):
1888         (WebCore::GraphicsContext3D::texImage2D):
1889         (WebCore::GraphicsContext3D::systemAllowsMultisamplingOnATICards): Now a member function.
1890         (WebCore::GraphicsContext3D::getExtensions):
1891         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1892         (WebCore::GraphicsContext3D::validateDepthStencil):
1893         (WebCore::GraphicsContext3D::clear):
1894         (WebCore::GraphicsContext3D::isTexture):
1895         (WebCore):
1896         (WebCore::GraphicsContext3D::lineWidth):
1897         (WebCore::GraphicsContext3D::linkProgram):
1898         (WebCore::GraphicsContext3D::pixelStorei):
1899         (WebCore::GraphicsContext3D::polygonOffset):
1900         (WebCore::GraphicsContext3D::readPixels):
1901         (WebCore::GraphicsContext3D::deleteBuffer):
1902         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1903         (WebCore::GraphicsContext3D::releaseShaderCompiler):
1904         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
1905         (WebCore::GraphicsContext3D::validateAttributes):
1906         (WebCore):
1907         (WebCore::GraphicsContext3D::getExtensions):
1908         (WebCore::GraphicsContext3D::systemAllowsMultisamplingOnATICards): Now a member function.
1909         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1910         (WebCore):
1911         (WebCore::GraphicsContext3D::releaseShaderCompiler):
1912
1913 2012-07-06  David Hyatt  <hyatt@apple.com>
1914
1915         https://bugs.webkit.org/show_bug.cgi?id=90646
1916         <rdar://problem/11648478> 3-pass pagination slows down pagination
1917
1918         Improve the logical top estimate function for margin collapsing to be more accurate. In particular
1919         make the basic case of <body><p> or <body><h1> no longer be wrong. This estimate being incorrect
1920         is not a big deal most of the time, but when paginating it is a very big deal, since you have to
1921         relayout everything whenever your vertical placement is wrong.
1922
1923         Improving the estimation exposed a bug in an existing layout test. I had to clean up the buggy
1924         code written for negative margin-related float detection and fix an invalid layout test to
1925         actually be correct.
1926
1927         Reviewed by Simon Fraser.
1928
1929         * rendering/RenderBlock.cpp:
1930         (WebCore::RenderBlock::collapseMargins):
1931         (WebCore::RenderBlock::marginBeforeEstimateForChild):
1932         (WebCore):
1933         (WebCore::RenderBlock::estimateLogicalTopPosition):
1934         (WebCore::RenderBlock::marginValuesForChild):
1935         * rendering/RenderBlock.h:
1936         (RenderBlock):
1937         * rendering/RenderBox.cpp:
1938         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
1939         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1940
1941 2012-07-10  Alexei Filippov  <alexeif@chromium.org>
1942
1943         Web Inspector: Count inspector memory used to traverse DOM in native memory snapshots.
1944         https://bugs.webkit.org/show_bug.cgi?id=90456
1945
1946         Inspector may take significant amount of memory when traversing DOM structure.
1947         Take it into account and report under inspector memory.
1948
1949         Reviewed by Pavel Feldman.
1950
1951         * dom/MemoryInstrumentation.h:
1952         (MemoryInstrumentation):
1953         (WebCore::MemoryInstrumentation::calculateContainerSize):
1954         (WebCore::MemoryInstrumentation::reportHashMap):
1955         (WebCore::MemoryInstrumentation::reportHashSet):
1956         (WebCore::MemoryInstrumentation::reportVector):
1957         * inspector/InspectorMemoryAgent.cpp:
1958         (MemoryBlockName):
1959         (WebCore):
1960         (WebCore::domTreeInfo):
1961         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
1962
1963 2012-07-10  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
1964
1965         [GTK] Fix memory leaks by adopting allocation of GdkPixbuf
1966         https://bugs.webkit.org/show_bug.cgi?id=90790
1967
1968         Reviewed by Carlos Garcia Campos.
1969
1970         Fixed a memory leak in paintGdkPixbuf by adopting an allocation
1971         of GdkPixbuf.
1972
1973         No new tests. No change in behavior.
1974
1975         * platform/gtk/RenderThemeGtk.cpp:
1976         (WebCore::paintGdkPixbuf):
1977
1978 2012-07-10  Konrad Piascik  <kpiascik@rim.com>
1979
1980         Web Inspector: Geolocation override
1981         https://bugs.webkit.org/show_bug.cgi?id=89365
1982
1983         Reviewed by Yong Li.
1984
1985         Added a way to override the geoloation of a client using Web
1986         Inspector.
1987
1988         New tests added.
1989         * LayoutTests/inspector/geolocation-success.html:
1990         * LayoutTests/inspector/getlocation-error.html:
1991
1992         * Modules/geolocation/GeolocationController.cpp:
1993         (WebCore::GeolocationController::GeolocationController): Now store and
1994         save the Page in m_page.
1995         (WebCore::GeolocationController::positionChanged): Check if position
1996         is overriden in Web Inspector.
1997         * Modules/geolocation/GeolocationController.h:
1998         (GeolocationController): Add member variable m_page for Page*.
1999         * inspector/Inspector.json: Add new methods for setting and clearing
2000         the GeoloationPosition and GeolocationError objects in InspectorPageAgent.
2001         * inspector/InspectorInstrumentation.cpp:
2002         (WebCore):
2003         (WebCore::InspectorInstrumentation::checkGeolocationPositionOrErrorImpl):
2004         Add methods to check whether GeolocationPosition or GeolocationError
2005         are set in InspectorPageAgent.
2006         * inspector/InspectorInstrumentation.h:
2007         (WebCore):
2008         (InspectorInstrumentation):
2009         (WebCore::InspectorInstrumentation::checkGeolocationPositionOrError):
2010         * inspector/InspectorPageAgent.cpp:
2011         (WebCore::InspectorPageAgent::InspectorPageAgent): Initialize new
2012         member variables of GeolocationPosition and GeolocationError.
2013         (WebCore::InspectorPageAgent::setGeolocationData): Set Position and
2014         Error data and call appropriate GeolocaitonController methods.
2015         (WebCore):
2016         (WebCore::InspectorPageAgent::clearGeolocationData):
2017         (WebCore::InspectorPageAgent::sendGeolocationError):
2018         * inspector/InspectorPageAgent.h:
2019         (WebCore::InspectorPageAgent::geolocationPosition): Getter for
2020         GeolocationPosition.
2021         (InspectorPageAgent):
2022         * inspector/front-end/Settings.js: Added new settings for
2023         GeolocationPosition and GeolocationError
2024         * inspector/front-end/SettingsScreen.js: Added new control for
2025         Geolocaiton.
2026         (WebInspector.UserAgentSettingsTab):
2027         (WebInspector.UserAgentSettingsTab.prototype._createDeviceMetricsElement):
2028         (WebInspector.UserAgentSettingsTab.prototype._onGeolocationOverrideCheckboxClicked):
2029         (WebInspector.UserAgentSettingsTab.prototype._applyGeolocationUserInput):
2030         (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition.set if):
2031         (WebInspector.UserAgentSettingsTab.prototype._setGeolocationPosition):
2032         (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement.createInput):
2033         (WebInspector.UserAgentSettingsTab.prototype._createGeolocationOverrideElement):
2034         * inspector/front-end/UserAgentSupport.js: New GeolocationPosition
2035         Object added along with setting helper methods.  Added new setting
2036         changed handlers for Position and Error.
2037         (WebInspector.UserAgentSupport.GeolocationPosition):
2038         (WebInspector.UserAgentSupport.GeolocationPosition.prototype.toSetting):
2039         (WebInspector.UserAgentSupport.GeolocationPosition.parseSetting):
2040         (WebInspector.UserAgentSupport.GeolocationPosition.parseUserInput):
2041         (WebInspector.UserAgentSupport.prototype.get _onGeolocationErrorChanged):
2042
2043 2012-07-10  Vsevolod Vlasov  <vsevik@chromium.org>
2044
2045         Web Inspector: Refactor resource revisions before moving to UISourceCode.
2046         https://bugs.webkit.org/show_bug.cgi?id=90855
2047
2048         Reviewed by Pavel Feldman.
2049
2050         Revisions are now persisted based on mainFrame.loaderId, not resource.loaderId which makes filtering out stale persisted revisions easier.
2051         Restoring revisions from local storage is separated from filtering out stale persisted revisions.
2052         Resource._clearRevisionHistory and Resource._restoreRevisions are not static anymore.
2053         Renamed localStorage field for persisting revisions: "resource-history" -> "revision-history"
2054
2055         * inspector/front-end/Resource.js:
2056         (WebInspector.Resource):
2057         (WebInspector.Resource.prototype.addRevision):
2058         (WebInspector.Resource.prototype._restoreRevisionHistory):
2059         (WebInspector.Resource.prototype._clearRevisionHistory):
2060         (WebInspector.Resource.prototype.revertAndClearHistory.clearHistory):
2061         (WebInspector.Resource.prototype.revertAndClearHistory):
2062         (WebInspector.Revision):
2063         (WebInspector.Revision._revisionHistoryRegistry):
2064         (WebInspector.Revision._ensureStaleRevisionsFileteredOut.persist):
2065         (WebInspector.Revision._ensureStaleRevisionsFileteredOut):
2066         (WebInspector.Revision.prototype._persist):
2067         * inspector/front-end/ResourceTreeModel.js:
2068         (WebInspector.ResourceTreeModel.prototype._processCachedResources):
2069         (WebInspector.ResourceTreeModel.prototype._addFramesRecursively):
2070         * inspector/front-end/RevisionHistoryView.js:
2071         * inspector/front-end/UISourceCode.js:
2072         (WebInspector.UISourceCode.prototype._revisionAdded):
2073
2074 2012-07-10  Alice Cheng  <alice_cheng@apple.com>
2075
2076         Editing: Reproducible crasher when pasting a 0x0 image into Mail
2077         https://bugs.webkit.org/show_bug.cgi?id=90640
2078         <rdar://problem/11141920>
2079
2080         Reviewed by Brady Eidson.
2081
2082         0x0 images don't get a resource representation in the WebArchive, so we need a null check
2083
2084         Test: TestWebKitAPI/Tests/mac/0.png
2085               TestWebKitAPI/Tests/mac/WebViewCanPasteZeroPng.mm
2086
2087         * platform/mac/PasteboardMac.mm:
2088         (WebCore::documentFragmentWithImageResource):
2089
2090 2012-07-10  Nikita Vasilyev  <me@elv1s.ru>
2091
2092         Web Inspector: Make the Tab character 4 spaces width
2093         https://bugs.webkit.org/show_bug.cgi?id=90172
2094
2095         Reviewed by Pavel Feldman.
2096
2097         Do it to match most code editors' behavior.
2098
2099         * inspector/front-end/inspectorCommon.css:
2100         (body):
2101
2102 2012-07-10  Eric Seidel  <eric@webkit.org>
2103
2104         REGRESSION (r122168): Layout Test http/tests/misc/script-defer.html is failing
2105         https://bugs.webkit.org/show_bug.cgi?id=90845
2106
2107         Reviewed by Alexey Proskuryakov.
2108
2109         I was a bit overzealous in removing bool returns. This one still makes sense.
2110         This just reverts the wrong part of my previous change.
2111
2112         * html/parser/HTMLDocumentParser.cpp:
2113         (WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd):
2114         * html/parser/HTMLScriptRunner.cpp:
2115         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
2116         * html/parser/HTMLScriptRunner.h:
2117         (HTMLScriptRunner):
2118
2119 2012-07-10  Kevin Ellis  <kevers@chromium.org>
2120
2121         Input type=range issue with events not being raised when value set in js
2122         https://bugs.webkit.org/show_bug.cgi?id=84674
2123
2124         Fix dispatching of change and click events for the input slider.
2125         Prior to the fix, change events were not fired if the new value
2126         matched the value at last change notification based on expected
2127         behavior for text fields.  Clicks were not fired if the thumb
2128         element was repositioned under the cursor on mouse down.
2129
2130         Reviewed by Kent Tamura.
2131
2132         Tests: fast/events/click-range-slider.html
2133                fast/events/onchange-range-slider.html
2134
2135         * html/shadow/SliderThumbElement.cpp:
2136         (WebCore::SliderThumbElement::setPositionFromPoint):
2137         * page/EventHandler.cpp:
2138         (WebCore::EventHandler::handleMouseReleaseEvent):
2139
2140 2012-07-10  Huang Dongsung  <luxtella@company100.net>
2141
2142         Don't destroy the decoded data of an image if WebKit is about to render the image.
2143         https://bugs.webkit.org/show_bug.cgi?id=90721
2144
2145         Reviewed by Antti Koivisto.
2146
2147         When the cache capacity of the MemoryCache is exceeded, the decoded data of all
2148         the CachedImages are destroyed. Even the images inside the viewport are
2149         destroyed.  However, if the images need to be rendered again due to scoll events
2150         or animation, they must be decoded again. As an extreme case, if there is an
2151         animation with an image when MemoryCache is almost full, the image must be
2152         decoded every frame. This slows down animation and needlessly consumes CPU
2153         cycles.
2154
2155         Therefore, it is better to not destory the decoded data of an image if the image
2156         is inside the viewport because there is high chance that the image needs to be
2157         rendered again soon. This patch reduces the unnecessary repetition of image decoding
2158         on low memory, and also relieves the memory fragmentation because it avoids reallocation
2159         of image frames.
2160
2161         In addition, there is another positive side effect. Currently,
2162         CachedImageClient::willRenderImage() is used only to determine if GIF animation needs
2163         to be paused or not in CachedImage::shouldPauseAnimation(). This patch makes
2164         GIF animation outside the viewort be paused.
2165
2166         This is also a prerequisite for parallel image decoders. Because parallel image
2167         decoders decode an image asynchronously, clients cannot render the image at the time
2168         when the request is made. Clients can draw the image later after receiving image
2169         decoding complete notification. However, there is a problem because MemoryCache can
2170         destroy the decoded data before clients actually render the image. So parallel image decoders
2171         must prevent the decoded data from being destroyed if the image will be rendered
2172         soon.
2173
2174         This patch may consume a little more memory, but furtunately the peak memory usage
2175         is almost the same.
2176
2177         No new tests - no new testable functionality.
2178
2179         * loader/cache/CachedImage.cpp:
2180         (WebCore::CachedImage::likelyToBeUsedSoon):
2181         (WebCore):
2182         (WebCore::CachedImage::shouldPauseAnimation):
2183         * loader/cache/CachedImage.h:
2184         (CachedImage):
2185         * loader/cache/CachedResource.h:
2186         (CachedResource):
2187         (WebCore::CachedResource::likelyToBeUsedSoon):
2188         * loader/cache/MemoryCache.cpp:
2189         (WebCore::MemoryCache::pruneLiveResourcesToSize):
2190         * rendering/RenderObject.cpp:
2191         (WebCore::RenderObject::willRenderImage):
2192
2193 2012-07-10  Kent Tamura  <tkent@chromium.org>
2194
2195         RTL calendar picker for <input type=date> is too narrow and clipped
2196         https://bugs.webkit.org/show_bug.cgi?id=90864
2197
2198         Reviewed by Kentaro Hara.
2199
2200         Tests: ManualTests/forms/calendar-picker.html
2201
2202         * Resources/calendarPicker.js:
2203         (fixWindowSize):
2204         Checks the left edge of elemenets in RTL.
2205         (layout): Add dir=ltr for the manual test, which re-uses the document.
2206
2207 2012-07-10  Sheriff Bot  <webkit.review.bot@gmail.com>
2208
2209         Unreviewed, rolling out r122178.
2210         http://trac.webkit.org/changeset/122178
2211         https://bugs.webkit.org/show_bug.cgi?id=90857
2212
2213         browser tests, PrerenderBrowserTest.PrerenderFavicon and other
2214         tests, started to fail (Requested by hayato on #webkit).
2215
2216         * WebCore.exp.in:
2217         * dom/Document.cpp:
2218         (WebCore::Document::iconURLs):
2219         (WebCore::Document::addIconURL):
2220         (WebCore::Document::setUseSecureKeyboardEntryWhenActive):
2221         * dom/Document.h:
2222         (Document):
2223         * html/HTMLLinkElement.cpp:
2224         * html/HTMLLinkElement.h:
2225         (HTMLLinkElement):
2226         * testing/Internals.cpp:
2227         * testing/Internals.h:
2228         (Internals):
2229         * testing/Internals.idl:
2230
2231 2012-07-10  Adam Barth  <abarth@webkit.org>
2232
2233         LayoutTestController.dumpConfigurationForViewport should move to Internals
2234         https://bugs.webkit.org/show_bug.cgi?id=45652
2235
2236         Reviewed by Eric Seidel.
2237
2238         This patch replaces LayoutTestController.dumpConfigurationForViewport
2239         with Internals.configurationForViewport. The old
2240         dumpConfigurationForViewport function just ended up calling WebCore
2241         functions anyway, so there's no benefit in implementing the API in the
2242         LayoutTestController.
2243
2244         As a result, these tests can now run on every port.
2245
2246         * testing/Internals.cpp:
2247         (WebCore::Internals::configurationForViewport):
2248         (WebCore):
2249         * testing/Internals.h:
2250         (Internals):
2251         * testing/Internals.idl:
2252
2253 2012-07-10  Carlos Garcia Campos  <cgarcia@igalia.com>
2254
2255         Unreviewed. Fix GTK+ build after r122175.
2256
2257         * platform/graphics/texmap/TextureMapperLayer.cpp: Include
2258         CString.h when using cairo.
2259
2260 2012-07-10  Yoshifumi Inoue  <yosin@chromium.org>
2261
2262         [Chromium-Mac] Form related layout tests cause timeout
2263         https://bugs.webkit.org/show_bug.cgi?id=90851
2264
2265         Reviewed by Kent Tamura.
2266
2267         This patch changed to pass a valid argument to LocaleMac
2268         constructor.
2269
2270         No new tests. No more timeout in tests listed in the bug.
2271
2272         * platform/text/mac/LocaleMac.mm:
2273         (WebCore::LocaleMac::currentLocale): Changed to pass local identifier string
2274         instead of NSLocale object.
2275
2276 2012-07-10  Yuta Kitamura  <yutak@chromium.org>
2277
2278         WebSocket: Remove hixie76 protocol implementation
2279         https://bugs.webkit.org/show_bug.cgi?id=88620
2280
2281         Reviewed by Adam Barth.
2282
2283         This change removes code that implements the old hixie-76 WebSocket protocol which
2284         isn't used anymore.
2285
2286         No new tests are added, because the code using the current protocol should not be
2287         affected. Tests for hixie-76 protocol are skipped (these tests will be removed
2288         eventually).
2289
2290         * Modules/websockets/ThreadableWebSocketChannel.h:
2291         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
2292         (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
2293         (WebCore::ThreadableWebSocketChannelClientWrapper::didCreateWebSocketChannel):
2294         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
2295         (ThreadableWebSocketChannelClientWrapper):
2296         * Modules/websockets/WebSocket.cpp:
2297         (WebCore::WebSocket::WebSocket):
2298         (WebCore::WebSocket::connect):
2299         (WebCore::WebSocket::send):
2300         (WebCore::WebSocket::protocol):
2301         (WebCore::WebSocket::extensions):
2302         (WebCore::WebSocket::binaryType):
2303         (WebCore::WebSocket::setBinaryType):
2304         (WebCore::WebSocket::didReceiveMessageError):
2305         (WebCore::WebSocket::didClose):
2306         (WebCore::WebSocket::getFramingOverhead):
2307         * Modules/websockets/WebSocket.h:
2308         * Modules/websockets/WebSocketChannel.cpp:
2309         (WebCore::WebSocketChannel::WebSocketChannel):
2310         (WebCore::WebSocketChannel::connect):
2311         (WebCore::WebSocketChannel::send):
2312         (WebCore::WebSocketChannel::fail):
2313         (WebCore::WebSocketChannel::didCloseSocketStream):
2314         (WebCore::WebSocketChannel::processBuffer):
2315         (WebCore::WebSocketChannel::startClosingHandshake):
2316         (WebCore::WebSocketChannel::enqueueTextFrame):
2317         (WebCore::WebSocketChannel::enqueueRawFrame):
2318         (WebCore::WebSocketChannel::enqueueBlobFrame):
2319         (WebCore::WebSocketChannel::processOutgoingFrameQueue):
2320         (WebCore::WebSocketChannel::abortOutgoingFrameQueue):
2321         * Modules/websockets/WebSocketChannel.h:
2322         (WebSocketChannel):
2323         * Modules/websockets/WebSocketHandshake.cpp:
2324         (WebCore::WebSocketHandshake::WebSocketHandshake):
2325         (WebCore::WebSocketHandshake::clientHandshakeMessage):
2326         (WebCore::WebSocketHandshake::clientHandshakeRequest):
2327         (WebCore::WebSocketHandshake::readServerHandshake):
2328         (WebCore::WebSocketHandshake::checkResponseHeaders):
2329         * Modules/websockets/WebSocketHandshake.h:
2330         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2331         (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::create):
2332         (WebCore::WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask::WorkerContextDidInitializeTask):
2333         (WorkerThreadableWebSocketChannel::WorkerContextDidInitializeTask):
2334         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
2335         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
2336         (WorkerThreadableWebSocketChannel):
2337         (Peer):
2338         (Bridge):
2339
2340 2012-07-09  Gavin Barraclough  <barraclough@apple.com>
2341
2342         Threadsafety issues in WebScriptObject
2343         https://bugs.webkit.org/show_bug.cgi?id=90849
2344
2345         Reviewed by Filip Pizlo.
2346
2347         WebScriptObject maintains a NSMap of wrapper objects. A race condition exists
2348         between a wrapper being retrieved from the map, and being released - if the
2349         final release on an object is called between a call to getJSWrapper and the
2350         subsequent retain, we may end up with a stale object reference.
2351
2352         We can make this safe by hoisting the removal from the map from delloc up into
2353         release (if the retainCount is 1), and locking release against retrieval from
2354         the map. Since release may be called from another thread, and NSMap is not
2355         threadsafe, we'd better lock around all access to the map (this fix already
2356         necessitates get & remove to be locked, so this just adds 'add', too).
2357
2358         * bindings/objc/WebScriptObject.mm:
2359         (WebCore::createJSWrapper):
2360             - lock around getJSWrapper, retain.
2361         (-[WebScriptObject _setImp:originRootObject:rootObject:]):
2362             - lock around addJSWrapper.
2363         (-[WebScriptObject release]):
2364             - Added; removeJSWrapper for last release, lock & synchronized vs. getJSWrapper.
2365         (-[WebScriptObject dealloc]):
2366             - removeJSWrapper call hoisted into release.
2367
2368 2012-07-09  Christophe Dumez  <christophe.dumez@intel.com>
2369
2370         [EFL] Battery status code needs refactoring to be reused in WebKit2
2371         https://bugs.webkit.org/show_bug.cgi?id=90760
2372
2373         Reviewed by Hajime Morita.
2374
2375         Rename BatteryClientEfl to BatteryProviderEfl and remove dependency
2376         on BatteryController by introducing the BatteryProviderEflClient
2377         interface. This will allow reusing the BatteryProviderEfl class
2378         in WebKit2.
2379
2380         No new tests. Already tested by batterystatus/*.
2381
2382         * PlatformEfl.cmake:
2383         * platform/efl/BatteryProviderEfl.cpp: Renamed from Source/WebCore/platform/efl/BatteryClientEfl.cpp.
2384         (WebCore):
2385         (WebCore::BatteryProviderEfl::BatteryProviderEfl):
2386         (WebCore::BatteryProviderEfl::batteryStatus):
2387         (WebCore::BatteryProviderEfl::startUpdating):
2388         (WebCore::BatteryProviderEfl::stopUpdating):
2389         (WebCore::BatteryProviderEfl::setBatteryStatus):
2390         (WebCore::BatteryProviderEfl::timerFired):
2391         (WebCore::BatteryProviderEfl::getBatteryStatus):
2392         (WebCore::BatteryProviderEfl::setBatteryClient):
2393         * platform/efl/BatteryProviderEfl.h: Copied from Source/WebCore/platform/efl/BatteryClientEfl.h.
2394         (WebCore):
2395         (BatteryProviderEfl):
2396         (WebCore::BatteryProviderEfl::~BatteryProviderEfl):
2397         * platform/efl/BatteryProviderEflClient.h: Added.
2398         (WebCore):
2399         (BatteryProviderEflClient):
2400
2401 2012-07-09  Hayato Ito  <hayato@chromium.org>
2402
2403         Unreviewed gardening.
2404         Fix a wrong fix of r122194.
2405
2406         * platform/graphics/chromium/LayerRendererChromium.cpp:
2407         (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
2408
2409 2012-07-09  Matt Falkenhagen  <falken@chromium.org>
2410
2411         Add ENABLE_DIALOG_ELEMENT and skeleton files
2412         https://bugs.webkit.org/show_bug.cgi?id=90521
2413
2414         Reviewed by Kent Tamura.
2415
2416         This adds the ENABLE_DIALOG_ELEMENT feature flag and dummy implementation files for <dialog>. In addition, a runtime feature flag is added.
2417         The feature is diabled by default.
2418
2419         No new tests, as there is no behavior change.
2420
2421         * CMakeLists.txt:
2422         * Configurations/FeatureDefines.xcconfig:
2423         * DerivedSources.cpp:
2424         * DerivedSources.make:
2425         * DerivedSources.pri:
2426         * Target.pri:
2427         * WebCore.gypi:
2428         * WebCore.xcodeproj/project.pbxproj:
2429         * bindings/generic/RuntimeEnabledFeatures.cpp:
2430         (WebCore):
2431         * bindings/generic/RuntimeEnabledFeatures.h: Added a runtime feature flag for dialog.
2432         (RuntimeEnabledFeatures):
2433         (WebCore::RuntimeEnabledFeatures::dialogElementEnabled):
2434         (WebCore::RuntimeEnabledFeatures::setDialogElementEnabled):
2435         * dom/ContextFeatures.cpp:
2436         (WebCore::ContextFeatures::dialogElementEnabled):
2437         (WebCore):
2438         * dom/ContextFeatures.h: Added a per-context flag for dialog so that dialog can be disabled in HTMLTagNames.in and DOMWindow.idl when the dialog runtime feature flag is off.
2439         * html/HTMLDialogElement.cpp: Added.
2440         (WebCore):
2441         (WebCore::HTMLDialogElement::HTMLDialogElement):
2442         (WebCore::HTMLDialogElement::create):
2443         (WebCore::HTMLDialogElement::close):
2444         (WebCore::HTMLDialogElement::show):
2445         * html/HTMLDialogElement.h: Added.
2446         (WebCore):
2447         (HTMLDialogElement):
2448         * html/HTMLDialogElement.idl: Added.
2449         * html/HTMLElementsAllInOne.cpp:
2450         * html/HTMLTagNames.in:
2451         * page/DOMWindow.idl:
2452
2453 2012-07-09  Hayato Ito  <hayato@chromium.org>
2454
2455         Unreviewed gardening.
2456         Remove an assertion starting to fail on interactive_ui_tests on Chromium OS.
2457
2458         * platform/graphics/chromium/LayerRendererChromium.cpp:
2459         (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
2460
2461 2012-07-09  Hayato Ito  <hayato@chromium.org>
2462
2463         Unreviewed gardening.
2464         Build fix after r122175
2465
2466         * WebCore.gypi: Remove Source/WebCore/platform/graphics/qt/Extensions3DQt.{cpp,h}
2467
2468 2012-07-09  Kiran Muppala  <cmuppala@apple.com>
2469
2470         Improve performance of RenderInline::absoluteQuads for deeply nested inlines.
2471         https://bugs.webkit.org/show_bug.cgi?id=90715
2472
2473         Reviewed by Maciej Stachowiak.
2474
2475         No new tests: functionality unchanged.
2476
2477         * rendering/RenderInline.cpp: Cache transformation from local to absolute coordinates using a
2478         RenderGeometryMap and use it for subsequent mappings.
2479         (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::AbsoluteQuadsGeneratorContext):
2480         (WebCore::(anonymous namespace)::AbsoluteQuadsGeneratorContext::operator()):
2481
2482 2012-07-09  Yoshifumi Inoue  <yosin@chromium.org>
2483
2484         [Chromium-Mac] Implement functions for localized time format information
2485         https://bugs.webkit.org/show_bug.cgi?id=90237
2486
2487         Reviewed by Kent Tamura.
2488
2489         This patch introduces following localized time format related
2490         functions:
2491           - localizeTimeFormatText()
2492           - localizeShortTimeFormatText()
2493           - timeAMPMLabels
2494         for Mac OSX in feature flag: ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
2495
2496         These function will be used by input type "time" with multiple input
2497         fields UI.
2498
2499         Note: ICU version of localized time format functions are implemented
2500         in https://bugs.webkit.org/show_bug.cgi?id=89965
2501
2502         Tests: WebKit/chromium/tests/LocaleMacTest.cpp
2503
2504         * platform/text/mac/LocaleMac.h:
2505         (LocaleMac): Added time format related functions and variables.
2506         * platform/text/mac/LocaleMac.mm:
2507         (WebCore::createDateTimeFormatter): Added. A helper function for creating date time formatter.
2508         (WebCore::LocaleMac::createShortDateFormatter): Changed to use createDateTimeFormatter.
2509         (WebCore::LocaleMac::createTimeFormatter): Added.
2510         (WebCore::LocaleMac::createShortTimeFormatter): Added.
2511         (WebCore::LocaleMac::timeFormatText): Added.
2512         (WebCore::LocaleMac::shortTimeFormatText): Added.
2513         (WebCore::LocaleMac::timeAMPMLabels): Added.
2514
2515 2012-07-09  Alexandru Chiculita  <achicu@adobe.com>
2516
2517         [CSS Shaders] The FECustomFilter is not making the GL context active
2518         https://bugs.webkit.org/show_bug.cgi?id=90840
2519
2520         Reviewed by Dean Jackson.
2521
2522         I've added a couple of makeContextCurrent() in the FECustomFilter related classes.
2523         Also, removed the assumption that GraphicsContext3D::create() never returns 0.
2524
2525         No new tests, this was crashing on existing tests.
2526
2527         * platform/graphics/filters/CustomFilterCompiledProgram.cpp:
2528         (WebCore::CustomFilterCompiledProgram::CustomFilterCompiledProgram):
2529         (WebCore::CustomFilterCompiledProgram::~CustomFilterCompiledProgram):
2530         * platform/graphics/filters/CustomFilterGlobalContext.cpp:
2531         (WebCore::CustomFilterGlobalContext::prepareContextIfNeeded):
2532         * platform/graphics/filters/CustomFilterMesh.cpp:
2533         (WebCore::CustomFilterMesh::CustomFilterMesh):
2534         (WebCore::CustomFilterMesh::~CustomFilterMesh):
2535         * platform/graphics/filters/FECustomFilter.cpp:
2536         (WebCore::FECustomFilter::deleteRenderBuffers):
2537         (WebCore::FECustomFilter::platformApplySoftware):
2538         (WebCore::FECustomFilter::initializeContext):
2539         * platform/graphics/filters/FECustomFilter.h:
2540         (FECustomFilter):
2541
2542 2012-07-09  Kent Tamura  <tkent@chromium.org>
2543
2544         REGRESSION(r114862-r114886): Fix a crash by switching the input type to hidden.
2545         https://bugs.webkit.org/show_bug.cgi?id=90774
2546
2547         Reviewed by Andreas Kling.
2548
2549         Test: fast/forms/hidden/change-type-to-hidden-after-updating-value.html
2550
2551         * dom/Element.cpp:
2552         (WebCore::Element::setAttributeInternal):
2553         Pass a copy of the existing Attribute object.
2554
2555 2012-07-07  Philippe Normand  <pnormand@igalia.com>
2556
2557         [GStreamer] cache video dimensions
2558         https://bugs.webkit.org/show_bug.cgi?id=90733
2559
2560         Reviewed by Martin Robinson.
2561
2562         Invalidate the cached video dimensions whenever the video-sink sink pad caps
2563         change and let ::naturalSize() lazily recalculate them.
2564
2565         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2566         (WebCore::MediaPlayerPrivateGStreamer::naturalSize):
2567         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
2568         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2569         (MediaPlayerPrivateGStreamer):
2570
2571 2012-07-09  Eric Penner  <epenner@google.com>
2572
2573         [chromium] Merge updates and idle updates into one pass
2574         https://bugs.webkit.org/show_bug.cgi?id=90324
2575
2576         Reviewed by Adrienne Walker.
2577
2578         We no longer need to do painting is passes in order
2579         to allocate memory in the right order. So this merges
2580         updates and idle updates into one pass.
2581
2582         Covered by existing unit tests (some of which are
2583         updated with this patch).
2584
2585         * platform/graphics/chromium/ContentLayerChromium.cpp:
2586         (WebCore::ContentLayerChromium::needMoreUpdates):
2587         * platform/graphics/chromium/ContentLayerChromium.h:
2588         (ContentLayerChromium):
2589         * platform/graphics/chromium/LayerChromium.h:
2590         (WebCore::LayerChromium::needMoreUpdates):
2591         * platform/graphics/chromium/TiledLayerChromium.cpp:
2592         (WebCore::TiledLayerChromium::updateTiles):
2593         (WebCore::TiledLayerChromium::updateLayerRect):
2594         * platform/graphics/chromium/TiledLayerChromium.h:
2595         (TiledLayerChromium):
2596         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2597         (WebCore::CCLayerTreeHost::CCLayerTreeHost):
2598         (WebCore::CCLayerTreeHost::compositeAndReadback):
2599         (WebCore::CCLayerTreeHost::updateLayers):
2600         (WebCore::CCLayerTreeHost::paintMasksForRenderSurface):
2601         (WebCore::CCLayerTreeHost::paintLayerContents):
2602         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
2603         (CCLayerTreeHost):
2604
2605 2012-07-09  Yoshifumi Inoue  <yosin@chromium.org>
2606
2607         [Platform] Introduce LocaleMac class
2608         https://bugs.webkit.org/show_bug.cgi?id=90248
2609
2610         Reviewed by Kent Tamura.
2611
2612         This patch moves implementation of localized date format related
2613         functions into LocaleMac class as of LocaleWin class for ease of
2614         maintain and using specific locale in testing rather than system
2615         default locale.
2616
2617         Tests: WebKit/chromium/tests/LocaleMacTest.cpp
2618
2619         * WebCore.gyp/WebCore.gyp: Include LocaleMac.mm
2620         * WebCore.gypi:
2621         * platform/text/mac/LocaleMac.h: Replace LocaleWin to LocaleMac.
2622         * platform/text/mac/LocaleMac.mm:
2623         (WebCore::LocaleMac::LocaleMac):
2624         (WebCore::LocaleMac::~LocaleMac):
2625         (WebCore::LocaleMac::create):
2626         (WebCore::LocaleMac::currentLocale):
2627         (WebCore::LocaleMac::createShortDateFormatter):
2628         (WebCore::LocaleMac::parseDate):
2629         (WebCore::LocaleMac::formatDate):
2630         (WebCore::LocaleMac::dateFormatText):
2631         (WebCore::LocaleMac::monthLabels):
2632         (WebCore::LocaleMac::weekDayShortLabels):
2633         (WebCore::LocaleMac::firstDayOfWeek):
2634         * platform/text/mac/LocalizedDateMac.cpp:
2635         (WebCore::parseLocalizedDate):
2636         (WebCore::formatLocalizedDate):
2637         (WebCore::localizedDateFormatText):
2638         (WebCore::monthLabels):
2639         (WebCore::weekDayShortLabels):
2640         (WebCore::firstDayOfWeek):
2641         * platform/text/mac/LocalizedDateMac.mm: Removed.
2642
2643 2012-07-09  Dana Jansens  <danakj@chromium.org>
2644
2645         [chromium] Create CCScopedTexture class for creating/freeing textures
2646         https://bugs.webkit.org/show_bug.cgi?id=89485
2647
2648         Reviewed by Adrienne Walker.
2649
2650         This class provides a standard way to create texture ids in a way that
2651         ensures they will be freed later.
2652
2653         Also includes a CCTexture base class that holds textureId, size, and
2654         format together in a struct that can be used in place of storing an
2655         unsigned textureId in other classes.
2656
2657         Unit tests: CCScopedTexureTest.NewScopedTexture
2658                     CCScopedTexureTest.CreateScopedTexture
2659                     CCScopedTexureTest.ScopedTextureIsDeleted
2660                     CCScopedTexureTest.LoseScopedTexture
2661
2662         * WebCore.gypi:
2663         * platform/graphics/chromium/cc/CCScopedTexture.cpp: Added.
2664         (WebCore):
2665         (WebCore::CCScopedTexture::CCScopedTexture):
2666         (WebCore::CCScopedTexture::~CCScopedTexture):
2667         (WebCore::CCScopedTexture::allocate):
2668         (WebCore::CCScopedTexture::free):
2669         (WebCore::CCScopedTexture::leak):
2670         * platform/graphics/chromium/cc/CCScopedTexture.h: Added.
2671         (WebCore):
2672         (CCScopedTexture):
2673         (WebCore::CCScopedTexture::create):
2674         * platform/graphics/chromium/cc/CCTexture.cpp: Added.
2675         (WebCore):
2676         (WebCore::CCTexture::setDimensions):
2677         (WebCore::CCTexture::bytes):
2678         (WebCore::CCTexture::memorySizeBytes):
2679         * platform/graphics/chromium/cc/CCTexture.h: Added.
2680         (WebCore):
2681         (CCTexture):
2682         (WebCore::CCTexture::CCTexture):
2683         (WebCore::CCTexture::id):
2684         (WebCore::CCTexture::size):
2685         (WebCore::CCTexture::format):
2686         (WebCore::CCTexture::setId):
2687
2688 2012-07-09  Joshua Bell  <jsbell@chromium.org>
2689
2690         IndexedDB: deleteDatabase fails if transaction running in other database
2691         https://bugs.webkit.org/show_bug.cgi?id=90822
2692
2693         Reviewed by Tony Chang.
2694
2695         The IDBLevelDBBackingStore was preventing a deleteDatabase() from running
2696         if any other database was running a transaction. Fix by just creating a scratch
2697         LevelDBTransaction for the delete steps.
2698
2699         Test: storage/indexeddb/deletedatabase-transaction.html
2700
2701         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
2702         (WebCore::IDBLevelDBBackingStore::deleteDatabase): Use a LevelDBTransaction
2703         directly.
2704
2705 2012-07-09  Pete Williamson  <petewil@google.com>
2706
2707         Changed the behavior of iconURLs to always recalculate the list.
2708         https://bugs.webkit.org/show_bug.cgi?id=88665
2709
2710         Reviewed by Kent Tamura..
2711
2712         As it turns out, it can contain stale URLs in the case that some script
2713         manipulates the DOM, which breaks scripts trying to reset the favicon
2714         URL. Also added a method in Internals to allow tests to get the list of
2715         icon
2716
2717         Tests: fast/dom/icon-url-change.html
2718                fast/dom/icon-url-list.html
2719
2720         * WebCore.exp.in: export Document::iconURLs on the mac for the Internals class
2721         * dom/Document.cpp:
2722         (WebCore::Document::iconURLs): Changed the method to recalculate the iconURL list every time
2723         (WebCore::Document::addIconURL): we no longer need to add to the internal list since we recalculate it
2724         (WebCore::Document::setUseSecureKeyboardEntryWhenActive): removed extra whitespace
2725         * dom/Document.h:
2726         (Document): removed the addIconURL method which is no longer used
2727         * html/HTMLLinkElement.cpp:
2728         (WebCore::HTMLLinkElement::iconType): exposed the icon type with an accessor
2729         (WebCore):
2730         (WebCore::HTMLLinkElement::iconSizes): exposed the icon sizes with an accessor
2731         * html/HTMLLinkElement.h:
2732         (HTMLLinkElement): declared the icon type and size accessors
2733         * testing/Internals.cpp:
2734         (WebCore::Internals::iconURLs): made a method to be used by unit tests for inspecting the icon URL list
2735         (WebCore):
2736         * testing/Internals.h:
2737         (Internals): declared the method for unit testing the icon URL list
2738         * testing/Internals.idl: exported the Document::iconURLs function
2739
2740 2012-07-09  Ryosuke Niwa  <rniwa@webkit.org>
2741
2742         Gcc build fix after r122174.
2743
2744         * storage/StorageAreaImpl.cpp:
2745         (WebCore::StorageAreaImpl::decrementAccessCount):
2746
2747 2012-07-09  Alice Cheng  <alice_cheng@apple.com>
2748
2749         Editing: Autocorrection in blockquotes causes text to break out of quote
2750         https://bugs.webkit.org/show_bug.cgi?id=90487
2751         <rdar://problem/11769020> 
2752
2753         Reviewed by Enrica Casucci.
2754
2755         Test: platform/mac/editing/spelling/autocorrection-blockquote-crash.html
2756
2757         SpellingCorrectionCommand uses ReplaceSelectionCommand to replace the misspelled word with the auto-corrected word. Specifically, ReplaceSelectionCommand does a smart copy, where it breaks out of blockquotes. Thus, the fix is to substitute ReplaceSelectionCommand with InserTextCommand.
2758
2759         * editing/SpellingCorrectionCommand.cpp:
2760         (WebCore::SpellingCorrectionCommand::doApply):
2761
2762 2012-07-09  No'am Rosenthal  <noam.rosenthal@nokia.com>
2763
2764         Shared code that is guarded with ENABLE(WEBGL) should be guarded with USE()
2765         https://bugs.webkit.org/show_bug.cgi?id=90506
2766
2767         Reviewed by Martin Robinson.
2768
2769         GraphicsContext3D, ANGLEWebKitBridge and Extensions3D are now guarded with USE(3D_GRAPHICS)
2770         instead of ENABLE(WEBGL).
2771
2772         No new tests, build changes only.
2773
2774         * Target.pri:
2775             Removed references to unused files.
2776
2777         * WebCore.pri:
2778             Updated the Qt build so that the basic 3D-graphics sources can be compiled even when
2779             WebGL is disabled.
2780
2781         * platform/graphics/ANGLEWebKitBridge.cpp:
2782         * platform/graphics/GraphicsContext3D.cpp:
2783         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2784         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2785         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2786         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2787         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2788         * platform/qt/QWebPageClient.h:
2789         * platform/graphics/OpenGLShims.cpp:
2790         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
2791         * platform/graphics/cairo/DrawingBufferCairo.cpp:
2792         * platform/graphics/cairo/GLContext.h:
2793         (GLContext):
2794         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2795         * platform/graphics/cairo/GraphicsContext3DPrivate.cpp:
2796         * platform/graphics/cg/GraphicsContext3DCG.cpp:
2797         * platform/graphics/clutter/DrawingBufferClutter.cpp:
2798         * platform/graphics/clutter/GraphicsContext3DClutter.cpp:
2799         * platform/graphics/clutter/GraphicsContext3DPrivate.cpp:
2800         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
2801         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2802         * platform/graphics/filters/CustomFilterCompiledProgram.cpp:
2803         * platform/graphics/filters/CustomFilterCompiledProgram.h:
2804         * platform/graphics/filters/CustomFilterGlobalContext.cpp:
2805         * platform/graphics/filters/CustomFilterGlobalContext.h:
2806         * platform/graphics/filters/CustomFilterMesh.cpp:
2807         * platform/graphics/filters/CustomFilterMesh.h:
2808         * platform/graphics/filters/CustomFilterProgram.cpp:
2809         (WebCore):
2810         * platform/graphics/filters/CustomFilterProgram.h:
2811         * platform/graphics/filters/FECustomFilter.cpp:
2812         * platform/graphics/filters/FECustomFilter.h:
2813         * platform/graphics/glx/GLContextGLX.cpp:
2814         (WebCore):
2815         * platform/graphics/glx/GLContextGLX.h:
2816         (GLContextGLX):
2817         * platform/graphics/gpu/DrawingBuffer.cpp:
2818         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
2819         * platform/graphics/gpu/qt/DrawingBufferQt.cpp:
2820         * platform/graphics/mac/GraphicsContext3DMac.mm:
2821         * platform/graphics/qt/Extensions3DQt.cpp: Removed.
2822         * platform/graphics/qt/Extensions3DQt.h: Removed.
2823         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
2824         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2825             Chaned ENABLE(WEBGL) to USE(3D_GRAPHICS)
2826
2827 2012-07-09  Yongjun Zhang  <yongjun_zhang@apple.com>
2828
2829         Consider closing unused localStorage database after a timeout.
2830         https://bugs.webkit.org/show_bug.cgi?id=90713
2831
2832         For a localStorage, if there is no active document referencing to it for certain amount of time (300 seconds),
2833         we can close the underlying sqlite database.
2834
2835         Reviewed by Brady Eidson.
2836
2837         Test: storage/domstorage/storage-close-database-on-idle.html
2838
2839         * storage/Storage.cpp:
2840         (WebCore::Storage::Storage): increment storageArea access count when a DOMWindow is referencing it.
2841         (WebCore::Storage::~Storage): decrement storageArea access count when DOMWindow is done with it.
2842         * storage/StorageArea.h:
2843         (StorageArea):
2844         * storage/StorageAreaImpl.cpp:
2845         (WebCore::StorageAreaImpl::StorageAreaImpl):
2846         (WebCore::StorageAreaImpl::incrementAccessCount):
2847         (WebCore):
2848         (WebCore::StorageAreaImpl::decrementAccessCount): schedule closeDatabaseTimer if there is no active document
2849             referencing to this storageArea.
2850         (WebCore::StorageAreaImpl::closeDatabaseTimerFired): close the underlying sqlite database.
2851         * storage/StorageAreaImpl.h:
2852         (StorageAreaImpl):
2853         * storage/StorageAreaSync.cpp:
2854         (WebCore::StorageAreaSync::sync): if m_syncCloseDatabase flag is set and the database is not opened, bail out.
2855         * storage/StorageTracker.cpp:
2856         (WebCore):
2857         (WebCore::StorageTracker::StorageTracker):
2858         * storage/StorageTracker.h:
2859         (WebCore::StorageTracker::storageDatabaseIdleInterval):
2860         (WebCore::StorageTracker::setStorageDatabaseIdleInterval):  set the timeout value that we will wait before closing the
2861             database.  This is currently used by DumpRenderTree only.
2862         (StorageTracker):
2863
2864 2012-07-09  Joshua Bell  <jsbell@chromium.org>
2865
2866         IndexedDB: A null or undefined storeNames argument to IDBDatabase::transaction() should be coerced to string
2867         https://bugs.webkit.org/show_bug.cgi?id=90474
2868
2869         Reviewed by Tony Chang.
2870
2871         Test: storage/indexeddb/transaction-basics.html
2872
2873         * Modules/indexeddb/IDBDatabase.cpp:
2874         (WebCore::IDBDatabase::transaction):
2875         * Modules/indexeddb/IDBDatabase.idl:
2876
2877 2012-07-09  Joshua Bell  <jsbell@chromium.org>
2878
2879         IndexedDB: Remove obsolete accessor plumbing
2880         https://bugs.webkit.org/show_bug.cgi?id=90812
2881
2882         Reviewed by Tony Chang.
2883
2884         No new tests - just deleting code.
2885
2886         * Modules/indexeddb/IDBTransaction.cpp:
2887         (WebCore::IDBTransaction::IDBTransaction): Since backend mode() is disconnected, can no
2888         longer assert that front-end/back-end modes match; not worth it to keeping the plumbing.
2889
2890 2012-07-09  Dana Jansens  <danakj@chromium.org>
2891
2892         [chromium] Remove HashMap workaround for layers with id=0 in CCDamageTracker
2893         https://bugs.webkit.org/show_bug.cgi?id=90825
2894
2895         Reviewed by Adrienne Walker.
2896
2897         Layer ids are no longer allowed to be 0, and the behaviour is guarded
2898         with asserts, so this workaround is not needed any longer.
2899
2900         * platform/graphics/chromium/cc/CCDamageTracker.h:
2901         (CCDamageTracker):
2902
2903 2012-07-09  Vincent Scheib  <scheib@chromium.org>
2904
2905         Pointer Lock requestPointerLock rejects locking an element not in a document.
2906         https://bugs.webkit.org/show_bug.cgi?id=90821
2907
2908         Reviewed by Adrienne Walker.
2909
2910         Test: pointer-lock/lock-element-not-in-dom.html
2911
2912         * page/PointerLockController.cpp:
2913         (WebCore::PointerLockController::requestPointerLock):
2914
2915 2012-07-09  Eric Seidel  <eric@webkit.org>
2916
2917         document.write of scripts that also document.write sometimes writes async
2918         https://bugs.webkit.org/show_bug.cgi?id=89102
2919
2920         Reviewed by Adam Barth.
2921
2922         When a script tag is first encountered, the TreeBuilder holds the element and returns
2923         out to the outer HTMLDocumentParser parse loop.  The HTMLDocumentParser then takes
2924         the script element and passes it to the HTMLScriptRunner for execution. However, if the
2925         script is an "external script" the HTMLScriptRunner may have to wait for that parser
2926         blocking script to load, and may store the script in its own m_parserBlockingScript member.
2927
2928         While the HTMLScriptRunner has this not-yet-loaded-script the parser is also blocked.
2929         Because the "paused" state of the parser was held as a separate bool on the TreeBuilder
2930         we'd have to be careful to update it to reflect the current state of this pending script
2931         on the HTMLScriptRunner.
2932
2933         This patch removes this separate "paused" bool and makes the HTMLDocumentParser responsible
2934         for the "paused" state of the parser through the isWaitingForScripts() function which
2935         knows how to check both the TreeBuilder and the ScriptRunner for possible parser-blocking scripts.
2936
2937         I suspect this change may actually fix a bunch of edge cases where we were not
2938         checking for the HTMLScriptRunner's parser blocking script and thus incorrectly ending
2939         the parser, or not starting the pre-load scanner, etc.
2940
2941         As part of this change I also renamed m_haveParsingBlockingScript in HTMLScriptRunner to match
2942         the naming style used elsewhere in the parser, as well as removed all the "bool" return values
2943         for these parse/execute functions as they are no longer useful (or correct). The correct way
2944         is always to check HTMLDocumentParser::isWaitingForScripts().
2945
2946         Test: fast/parser/cached-script-document-write.html
2947
2948         * html/parser/HTMLDocumentParser.cpp:
2949         (WebCore::HTMLDocumentParser::pumpTokenizerIfPossible):
2950         (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder):
2951         (WebCore::HTMLDocumentParser::canTakeNextToken):
2952         (WebCore::HTMLDocumentParser::isWaitingForScripts):
2953         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
2954         (WebCore::HTMLDocumentParser::notifyFinished):
2955         (WebCore::HTMLDocumentParser::executeScriptsWaitingForStylesheets):
2956         * html/parser/HTMLScriptRunner.cpp:
2957         (WebCore::HTMLScriptRunner::~HTMLScriptRunner):
2958         (WebCore::HTMLScriptRunner::executeParsingBlockingScript):
2959         (WebCore::HTMLScriptRunner::execute):
2960         (WebCore::HTMLScriptRunner::hasParserBlockingScript):
2961         (WebCore::HTMLScriptRunner::executeParsingBlockingScripts):
2962         (WebCore::HTMLScriptRunner::executeScriptsWaitingForLoad):
2963         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
2964         (WebCore::HTMLScriptRunner::requestParsingBlockingScript):
2965         (WebCore::HTMLScriptRunner::runScript):
2966         * html/parser/HTMLScriptRunner.h:
2967         (HTMLScriptRunner):
2968         * html/parser/HTMLTreeBuilder.cpp:
2969         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
2970         (WebCore::HTMLTreeBuilder::takeScriptToProcess):
2971         (WebCore::HTMLTreeBuilder::processEndTag):
2972         (WebCore::HTMLTreeBuilder::processTokenInForeignContent):
2973         * html/parser/HTMLTreeBuilder.h:
2974         (HTMLTreeBuilder):
2975         (WebCore::HTMLTreeBuilder::hasParserBlockingScript):
2976
2977 2012-07-09  Ryosuke Niwa  <rniwa@webkit.org>
2978
2979         Microdata tests are flaky
2980         https://bugs.webkit.org/show_bug.cgi?id=90830
2981
2982         Reviewed by Antti Koivisto.
2983
2984         The bug was caused by SpaceSplitString's not copying on write properly.
2985         Even if there was exactly one owner of the SpaceSplitString, we should still not modify
2986         m_data since m_data is associated with a particular m_keyString in sharedDataMap().
2987
2988         The only situation in which we can safely modify m_data is when m_data's m_keyString is null
2989         meaning that it had been unique'ed. Furthermore, this optimization had not been used for
2990         class lists because class list's refCount is always zero as its ref and deref are forwarded
2991         to the associated Element's ref and deref. This fix re-enables the optimization for class lists.
2992
2993         This behavior change is tested by existing microdata API tests. Without this patch,
2994         some tests such as properties-collection-add-remove-property.html fail on the first run
2995         when several tests were ran in the same WebKit instance.
2996
2997         * dom/SpaceSplitString.h:
2998         (WebCore::SpaceSplitStringData::isUnique):
2999         (WebCore::SpaceSplitString::ensureUnique):
3000
3001 2012-07-09  Dana Jansens  <danakj@chromium.org>
3002
3003         [chromium] Decouple RenderPass drawing from CCRenderSurface
3004         https://bugs.webkit.org/show_bug.cgi?id=90573
3005
3006         Reviewed by Adrienne Walker.
3007
3008         Removes the managed textures from CCRenderSurface and stores them in a
3009         HashMap in LayerRendererChromium.
3010
3011         At the start of a frame, all textures for the frame are reserved, and
3012         unneeded textures are deleted. After each quad is drawn, evicted textures
3013         (ie temporary textures used for background filters) are deleted to keep
3014         within memory limits. At the end of the frame, all surface contents
3015         textures are kept reserved and thus not deleted.
3016
3017         We add a numeric identifier to CCRenderPass which can be used to
3018         identify the pass across serialization in the future, and is used
3019         in the interface to LayerRendererChromium. Also we add to the
3020         CCRenderPass a contentsChangedSinceLastFrame() flag so that the
3021         value does not need to be retrieved from the CCRenderSurface.
3022
3023         The pointer from CCRenderPass to CCRenderSurface remains for some
3024         code in the CCLayerTreeHostImpl, and will be addressed in the future, but
3025         the pointer is no longer used at all while drawing a frame inside
3026         LayerRendererChromium.
3027
3028         Covered by existing tests, no intended change in behaviour.
3029
3030         * platform/graphics/chromium/LayerRendererChromium.cpp:
3031         (WebCore::LayerRendererChromium::releaseRenderPassTextures):
3032         (WebCore::LayerRendererChromium::decideRenderPassAllocationsForFrame):
3033         (WebCore):
3034         (WebCore::LayerRendererChromium::haveCachedResourcesForRenderPassId):
3035         (WebCore::LayerRendererChromium::drawQuad):
3036         (WebCore::LayerRendererChromium::drawBackgroundFilters):
3037         (WebCore::LayerRendererChromium::drawRenderPassQuad):
3038         (WebCore::LayerRendererChromium::finishDrawingFrame):
3039         (WebCore::LayerRendererChromium::useRenderPass):
3040         (WebCore::LayerRendererChromium::initializeSharedObjects):
3041         * platform/graphics/chromium/LayerRendererChromium.h:
3042         (LayerRendererChromium):
3043         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3044         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
3045         (WebCore::CCLayerTreeHostImpl::removePassesWithCachedTextures):
3046         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3047         (CCLayerTreeHostImpl):
3048         * platform/graphics/chromium/cc/CCRenderPass.cpp:
3049         (WebCore::CCRenderPass::create):
3050         (WebCore::CCRenderPass::CCRenderPass):
3051         * platform/graphics/chromium/cc/CCRenderPass.h:
3052         (CCRenderPass):
3053         (WebCore::CCRenderPass::id):
3054         (WebCore::CCRenderPass::setFramebufferOutputRect):
3055         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp:
3056         (WebCore::CCRenderPassDrawQuad::create):
3057         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
3058         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
3059         (CCRenderPassDrawQuad):
3060         (WebCore::CCRenderPassDrawQuad::renderPassId):
3061         (WebCore::CCRenderPassDrawQuad::contentsChangedSinceLastFrame):
3062         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
3063         (WebCore::CCRenderSurface::appendQuads):
3064         * platform/graphics/chromium/cc/CCRenderSurface.h:
3065         (WebCore):
3066         (CCRenderSurface):
3067         * platform/graphics/chromium/cc/CCRenderer.h:
3068         (CCRenderer):
3069         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
3070         (WebCore::CCTiledLayerImpl::pushTileProperties):
3071         * platform/graphics/chromium/cc/CCTiledLayerImpl.h:
3072         (CCTiledLayerImpl):
3073
3074 2012-07-09  Adam Klein  <adamk@chromium.org>
3075
3076         Rename WebCore::WebKitMutationObserver to WebCore::MutationObserver
3077         https://bugs.webkit.org/show_bug.cgi?id=90810
3078
3079         Reviewed by Ojan Vafai.
3080
3081         This is in preparation for removing the vendor prefix from the
3082         MutationObserver constructor on Window (currently it's called
3083         WebKitMutationObserver). Doing the WebCore-internal rename first
3084         makes that change a much smaller one, which is especially useful
3085         because there's ongoing discussion of when the prefix should be
3086         removed from the web-facing API.
3087
3088         * CMakeLists.txt:
3089         * DerivedSources.cpp:
3090         * DerivedSources.make:
3091         * GNUmakefile.list.am:
3092         * Target.pri:
3093         * UseJSC.cmake:
3094         * UseV8.cmake:
3095         * WebCore.gypi:
3096         * WebCore.vcproj/WebCore.vcproj:
3097         * WebCore.xcodeproj/project.pbxproj:
3098         * bindings/js/JSBindingsAllInOne.cpp:
3099         * bindings/js/JSMainThreadExecState.cpp:
3100         (WebCore::JSMainThreadExecState::didLeaveScriptContext):
3101         * bindings/js/JSMutationCallbackCustom.cpp:
3102         (WebCore::JSMutationCallback::handleEvent):
3103         * bindings/js/JSMutationObserverCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWebKitMutationObserverCustom.cpp.
3104         (WebCore):
3105         (WebCore::JSMutationObserverConstructor::constructJSMutationObserver):
3106         * bindings/v8/V8RecursionScope.cpp:
3107         (WebCore::V8RecursionScope::didLeaveScriptContext):
3108         * bindings/v8/custom/V8MutationCallbackCustom.cpp:
3109         (WebCore::V8MutationCallback::handleEvent):
3110         * bindings/v8/custom/V8MutationObserverCustom.cpp: Renamed from Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp.
3111         (WebCore):
3112         (WebCore::V8MutationObserver::constructorCallback):
3113         * dom/CharacterData.cpp:
3114         * dom/ChildListMutationScope.h:
3115         (WebCore::ChildListMutationScope::ChildListMutationScope):
3116         * dom/DOMAllInOne.cpp:
3117         * dom/Document.h:
3118         (WebCore::Document::hasMutationObserversOfType):
3119         * dom/Element.cpp:
3120         * dom/MutationCallback.h:
3121         (WebCore):
3122         (MutationCallback):
3123         * dom/MutationCallback.idl:
3124         * dom/MutationObserver.cpp: Renamed from Source/WebCore/dom/WebKitMutationObserver.cpp.
3125         (WebCore):
3126         (WebCore::MutationObserver::ObserverLessThan::operator()):
3127         (WebCore::MutationObserver::create):
3128         (WebCore::MutationObserver::MutationObserver):
3129         (WebCore::MutationObserver::~MutationObserver):
3130         (WebCore::MutationObserver::validateOptions):
3131         (WebCore::MutationObserver::observe):
3132         (WebCore::MutationObserver::takeRecords):
3133         (WebCore::MutationObserver::disconnect):
3134         (WebCore::MutationObserver::observationStarted):
3135         (WebCore::MutationObserver::observationEnded):
3136         (WebCore::activeMutationObservers):
3137         (WebCore::MutationObserver::enqueueMutationRecord):
3138         (WebCore::MutationObserver::setHasTransientRegistration):
3139         (WebCore::MutationObserver::deliver):
3140         (WebCore::MutationObserver::deliverAllMutations):
3141         * dom/MutationObserver.h: Renamed from Source/WebCore/dom/WebKitMutationObserver.h.
3142         (WebCore):
3143         (MutationObserver):
3144         * dom/MutationObserver.idl: Renamed from Source/WebCore/dom/WebKitMutationObserver.idl.
3145         * dom/MutationObserverInterestGroup.cpp:
3146         (WebCore::MutationObserverInterestGroup::createIfNeeded):
3147         (WebCore::MutationObserverInterestGroup::MutationObserverInterestGroup):
3148         (WebCore::MutationObserverInterestGroup::isOldValueRequested):
3149         (WebCore::MutationObserverInterestGroup::enqueueMutationRecord):
3150         * dom/MutationObserverInterestGroup.h:
3151         (WebCore::MutationObserverInterestGroup::createForChildListMutation):
3152         (WebCore::MutationObserverInterestGroup::createForCharacterDataMutation):
3153         (WebCore::MutationObserverInterestGroup::createForAttributesMutation):
3154         (MutationObserverInterestGroup):
3155         * dom/MutationObserverRegistration.cpp:
3156         (WebCore::MutationObserverRegistration::create):
3157         (WebCore::MutationObserverRegistration::MutationObserverRegistration):
3158         (WebCore::MutationObserverRegistration::shouldReceiveMutationFrom):
3159         * dom/MutationObserverRegistration.h:
3160         (MutationObserverRegistration):
3161         (WebCore::MutationObserverRegistration::isSubtree):
3162         (WebCore::MutationObserverRegistration::observer):
3163         (WebCore::MutationObserverRegistration::deliveryOptions):
3164         (WebCore::MutationObserverRegistration::mutationTypes):
3165         * dom/Node.cpp:
3166         (WebCore::Node::collectMatchingObserversForMutation):
3167         (WebCore::Node::getRegisteredMutationObserversOfType):
3168         (WebCore::Node::registerMutationObserver):
3169         * dom/Node.h:
3170         (Node):
3171         * dom/NodeRareData.h:
3172         * page/DOMWindow.idl:
3173
3174 2012-07-09  Filip Pizlo  <fpizlo@apple.com>
3175
3176         Unreviewed, rolling out http://trac.webkit.org/changeset/122116 and http://trac.webkit.org/changeset/122119
3177
3178         * GNUmakefile.list.am:
3179         * PlatformBlackBerry.cmake:
3180         * Target.pri:
3181         * WebCore.gypi:
3182         * WebCore.xcodeproj/project.pbxproj:
3183         * platform/graphics/GraphicsContext3D.h:
3184         (WebCore):
3185         * platform/graphics/OpenGLESShims.h:
3186         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
3187         (WebCore):
3188         * platform/graphics/clutter/GraphicsContext3DClutter.cpp:
3189         (WebCore):
3190         * platform/graphics/mac/GraphicsContext3DMac.mm:
3191         (WebCore):
3192         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3193         (WebCore::Extensions3DOpenGL::Extensions3DOpenGL):
3194         (WebCore::Extensions3DOpenGL::supports):
3195         (WebCore):
3196         (WebCore::Extensions3DOpenGL::ensureEnabled):
3197         (WebCore::Extensions3DOpenGL::isEnabled):
3198         (WebCore::Extensions3DOpenGL::getGraphicsResetStatusARB):
3199         (WebCore::Extensions3DOpenGL::getTranslatedShaderSourceANGLE):
3200         (WebCore::Extensions3DOpenGL::copyTextureCHROMIUM):
3201         * platform/graphics/opengl/Extensions3DOpenGL.h:
3202         (Extensions3DOpenGL):
3203         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
3204         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
3205         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
3206         * platform/graphics/opengl/Extensions3DOpenGLES.h:
3207         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
3208         (WebCore):
3209         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3210         (WebCore::systemAllowsMultisamplingOnATICards):
3211         (WebCore):
3212         (WebCore::GraphicsContext3D::validateAttributes):
3213         (WebCore::GraphicsContext3D::compileShader):
3214         (WebCore::GraphicsContext3D::readPixels):
3215         (WebCore::GraphicsContext3D::releaseShaderCompiler):
3216         (WebCore::GraphicsContext3D::getExtensions):
3217         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
3218         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
3219         (WebCore::GraphicsContext3D::reshapeFBOs):
3220         (WebCore):
3221         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3222         (WebCore):
3223
3224 2012-07-09  Ryosuke Niwa  <rniwa@webkit.org>
3225
3226         Build fix after r122115 and some cleanups.
3227
3228         * html/HTMLCollection.h:
3229         (HTMLCollection):
3230         * html/HTMLElement.cpp:
3231         (WebCore::HTMLElement::properties):
3232         * html/HTMLElement.h:
3233         (HTMLElement):
3234         * html/HTMLPropertiesCollection.cpp:
3235         (WebCore::HTMLPropertiesCollection::HTMLPropertiesCollection):
3236         * html/HTMLPropertiesCollection.h:
3237         (HTMLPropertiesCollection):
3238
3239 2012-07-09  Dean Jackson  <dino@apple.com>
3240
3241         Tiled drawing means some elements can disappear behind the page
3242         https://bugs.webkit.org/show_bug.cgi?id=88906
3243
3244         Reviewed by Simon Fraser.
3245
3246         The compositing layers in the tile cache could become siblings
3247         of the compositing layers for page elements. This meant that in
3248         some 3d transforms, the elements could disappear behind the
3249         page background (which is rendered into the tile cache) or intersect
3250         with the tile cache tiles.
3251
3252         Fix this by inserting a flattening layer between the tile cache
3253         and the page, ensuring that the cache will always be rendered
3254         first. I was able to reuse the clipping layer for this, because
3255         the tile cache is attached to the RenderView, so there should never
3256         be a case where we have both a clipping layer and tiles.
3257
3258         The unfortunate part of this code is the temporary state variable
3259         that wraps the call to GraphicsLayer::create. Because that method
3260         calls back into the object, we need to make sure we don't create
3261         another tile cache.
3262
3263         Also added some obvious names to the tile cache layers to
3264         help with debugging.
3265
3266         Test: compositing/tile-cache-must-flatten.html
3267
3268         * platform/graphics/ca/mac/TileCache.mm:
3269         (WebCore::TileCache::TileCache): give the tile host layer a name.
3270         (WebCore::TileCache::createTileLayer):
3271         * platform/graphics/ca/mac/WebTileCacheLayer.mm:
3272         (WebCore): give each tile layer a name.
3273         * rendering/RenderLayerBacking.cpp:
3274         (WebCore):
3275         (WebCore::RenderLayerBacking::shouldUseTileCache): check if we're in the middle
3276         of creating the primary graphics layer before answering.
3277         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): wrap our call to
3278         createGraphicsLayer with a message to indicate we are making the layer that should
3279         get a tile cache.
3280         (WebCore::RenderLayerBacking::destroyGraphicsLayers):
3281         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration): needs to make
3282         sure the flattening layer is in the tree.
3283         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3284         (WebCore::RenderLayerBacking::updateInternalHierarchy):
3285         (WebCore::RenderLayerBacking::updateClippingLayers):
3286         (WebCore::RenderLayerBacking::backingStoreMemoryEstimate):
3287         * rendering/RenderLayerBacking.h: rename m_clippingLayer to m_containmentLayer
3288         because it can now either be the clip or the tile cache flattener. Also
3289         a new state property used when creating the main graphics layer.
3290         (WebCore::RenderLayerBacking::hasClippingLayer):
3291         (WebCore::RenderLayerBacking::clippingLayer):
3292         (WebCore::RenderLayerBacking::parentForSublayers):
3293         (WebCore::RenderLayerBacking::hasTileCacheFlatteningLayer):
3294         (WebCore::RenderLayerBacking::tileCacheFlatteningLayer):
3295         (RenderLayerBacking):
3296
3297 2012-07-09  Christophe Dumez  <christophe.dumez@intel.com>
3298
3299         [EFL] Log significant Gamepad API-related events
3300         https://bugs.webkit.org/show_bug.cgi?id=90595
3301
3302         Reviewed by Antonio Gomes.
3303
3304         Log significant Gamepad API-related events in
3305         GamepadsEfl.
3306
3307         No new tests, no behavior change.
3308
3309         * platform/efl/GamepadsEfl.cpp:
3310         (WebCore::GamepadDeviceEfl::deviceFile):
3311         (GamepadDeviceEfl):
3312         (WebCore::GamepadDeviceEfl::GamepadDeviceEfl):
3313         (WebCore::GamepadDeviceEfl::readCallback):
3314         (WebCore::GamepadsEfl::registerDevice):
3315         (WebCore::GamepadsEfl::unregisterDevice):
3316
3317 2012-07-09  Simon Fraser  <simon.fraser@apple.com>
3318
3319         Reduce the amount of flashing when falling into tiled layers
3320         https://bugs.webkit.org/show_bug.cgi?id=90808
3321
3322         Reviewed by Dean Jackson.
3323
3324         Implement +prefetchedTiles so that CATiledLayer renders more
3325         tiles at a time, reducing the appearance of flashing.
3326
3327         * platform/graphics/mac/WebTiledLayer.mm:
3328         (+[WebTiledLayer prefetchedTiles]):
3329
3330 2012-07-09  Leandro Gracia Gil  <leandrogracia@chromium.org>
3331
3332         SurroundingText should not advance character iterators if they are at end.
3333         https://bugs.webkit.org/show_bug.cgi?id=90560
3334
3335         Reviewed by Ryosuke Niwa.
3336
3337         CharacterIterator and BackwardsCharacterIterator try to advance their
3338         internal TextIterator without checking if they already are at end.
3339         This can cause crashes in TextIterator::advance.
3340
3341         Test: platform/chromium/editing/surrounding-text/surrounding-text.html
3342
3343         * editing/SurroundingText.cpp:
3344         (WebCore::SurroundingText::SurroundingText):
3345         (WebCore::SurroundingText::rangeFromContentOffsets):
3346
3347 2012-07-09  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
3348
3349         [EFL] [WK2] Ecore errors from ecore_evas_screen_geometry_get()
3350         https://bugs.webkit.org/show_bug.cgi?id=90609
3351
3352         Reviewed by Daniel Bates.
3353
3354         Do not call ecore_evas_screen_geometry_get() if ecoreEvas is null.
3355
3356         No new tests. This patch doesn't change behavior.
3357
3358         * platform/efl/PlatformScreenEfl.cpp:
3359         (WebCore::screenRect): Early return if Evas is null.
3360
3361 2012-07-09  Alexandru Chiculita  <achicu@adobe.com>
3362
3363         [CSS Filters] Blur filter is not repainted correctly when applied on a parent of a fixed element
3364         https://bugs.webkit.org/show_bug.cgi?id=90087
3365
3366         Reviewed by Simon Fraser.
3367
3368         Added a new method, RenderLayer::hasAncestorWithFilterOutsets, to check that there's no filter with outsets (ie. blur) 
3369         applied on top level fixed positioned elements, nor any of its parent layers. In the event of a blur filter we need to
3370         disable the fast scrolling optimization, otherwise the outsets of the filter will be carried around the page and 
3371         repainting will not work correctly.
3372
3373         Tests: css3/filters/blur-filter-page-scroll-parents.html
3374                css3/filters/blur-filter-page-scroll-self.html
3375
3376         * page/FrameView.cpp:
3377         (WebCore::FrameView::scrollContentsFastPath):
3378         * rendering/RenderLayer.cpp:
3379         (WebCore):
3380         (WebCore::RenderLayer::hasAncestorWithFilterOutsets):
3381         * rendering/RenderLayer.h:
3382         (RenderLayer):
3383
3384 2012-07-09  Joshua Bell  <jsbell@chromium.org>
3385
3386         IndexedDB: Empty arrays shouldn't be valid key paths
3387         https://bugs.webkit.org/show_bug.cgi?id=90798
3388
3389         Reviewed by Tony Chang.
3390
3391         Other IDB implementations already enforce this although it is not yet in 
3392         the spec (see https://www.w3.org/Bugs/Public/show_bug.cgi?id=17657). If an
3393         empty array is passed as the key path arg to IDBDatabase.createObjectStore()
3394         or IDBObjectStore.createIndex(), a SYNTAX_ERR DOMException is now thrown.
3395
3396         Test: storage/indexeddb/keypath-arrays.html
3397               storage/indexeddb/keypath-basics.html
3398
3399         * Modules/indexeddb/IDBKeyPath.cpp:
3400         (WebCore::IDBKeyPath::isValid): Test for empty array.
3401
3402 2012-07-09  Dana Jansens  <danakj@chromium.org>
3403
3404         [chromium] Create render surfaces on main thread only for the current frame
3405         https://bugs.webkit.org/show_bug.cgi?id=89793
3406
3407         Reviewed by Adrienne Walker.
3408
3409         Previously we would create render surfaces for animating layers
3410         in the main thread since these layers might have a surface on impl,
3411         in order to assist culling. This makes it very difficult to estimate
3412         how much texture memory is needed for RenderSurfaces on the main
3413         thread, in order to keep contents+surface memory below our limit.
3414