d90e693451487dbb33b6dec44502e61c20222ae7
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-06-07  Takashi Sakamoto  <tasak@google.com>
2
3         Improve the performance of pushScope in StyleResolver
4         https://bugs.webkit.org/show_bug.cgi?id=88222
5
6         Reviewed by Hajime Morita.
7
8         As setupScopeStack always sets m_scopeStackParent to be NULL,
9         m_scopeStack is never reused. m_scopeStackParent should be the last
10         element of m_scopeStack.
11
12         No new tests, because fast/css/style-scoped/ uses pushScope,
13         popScope and setupScopeStack and checks whether there exists
14         any crash bug or not. And this patch doesn't change any behavior
15         of scoped author syltes.
16
17         * css/StyleResolver.cpp:
18         (WebCore::StyleResolver::setupScopeStack):
19         Modified to set m_scopeSackParent to be the last element of
20         m_scopeStack.
21         (WebCore::StyleResolver::popScope):
22         Modified to remove the last element if m_scopeStack is not empty and
23         the last element of m_scopeStack has the same scope as the scoping
24         element given by the argument.
25
26 2012-06-07  Mark Pilgrim  <pilgrim@chromium.org>
27
28         [Chromium] Move didStartWorkerRunLoop to Platform.h
29         https://bugs.webkit.org/show_bug.cgi?id=88562
30
31         Reviewed by Adam Barth.
32
33         Part of a refactoring series. See tracking bug 82948.
34
35         * WebCore.gyp/WebCore.gyp:
36         * bindings/v8/WorkerScriptController.cpp:
37         (WebCore::WorkerScriptController::~WorkerScriptController):
38         * platform/chromium/PlatformSupport.h:
39         (WebCore):
40         * workers/WorkerThread.cpp:
41         (WebCore::WorkerThread::workerThread):
42
43 2012-06-07  Mike West  <mkwst@chromium.org>
44
45         Dropping m_startingLineNumber property from StyledElement.
46         https://bugs.webkit.org/show_bug.cgi?id=86848
47
48         Reviewed by Adam Barth.
49
50         We can have the same effect by moving the line-number calculation
51         directly into StyledElement::styleAttributeChanged. This means that
52         subsequent changes to the style attribute (via script) won't generate
53         error messages with line numbers, but that's an acceptable tradeoff.
54
55         Behavior is covered by existing CSP tests.
56
57         * dom/StyledElement.cpp:
58         (WebCore::StyledElement::StyledElement):
59         (WebCore::StyledElement::styleAttributeChanged):
60         * dom/StyledElement.h:
61         (WebCore::StyledElement::destroyInlineStyle):
62
63 2012-06-07  Peter Beverloo  <peter@chromium.org>
64
65         Initialize m_document in AXObjectCache's constructor for !HAVE(ACCESSIBILITY) builds
66         https://bugs.webkit.org/show_bug.cgi?id=88527
67
68         Reviewed by Adam Barth.
69
70         Initialize the m_document member with the passed on document in the stubbed
71         AXObjectCache constructor. No behavioral changes.
72
73         * accessibility/AXObjectCache.h:
74         (WebCore::AXObjectCache::AXObjectCache):
75
76 2012-06-05  James Robinson  <jamesr@chromium.org>
77
78         [chromium] Move deferral-related logic out of Canvas2DLayerChromium
79         https://bugs.webkit.org/show_bug.cgi?id=86050
80
81         Reviewed by Stephen White.
82
83         This removes Canvas2DLayerChromium and puts the deferral and double-buffering related logic in a new class,
84         Canvas2DLayerBridge, that uses TextureLayerChromium for compositing.  The bridge is responsible for managing the
85         front texture when double buffering is active, inserting the correct makeContextCurrent() and flush() calls on
86         the GraphicsContext3D and SkCanvas when appropriate, and owning the lifetime of the layer.
87
88         * WebCore.gypi:
89         * platform/graphics/chromium/Canvas2DLayerBridge.cpp: Added.
90         (WebCore):
91         (AcceleratedDeviceContext):
92         (WebCore::AcceleratedDeviceContext::AcceleratedDeviceContext):
93         (WebCore::AcceleratedDeviceContext::prepareForDraw):
94         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
95         (WebCore::Canvas2DLayerBridge::~Canvas2DLayerBridge):
96         (WebCore::Canvas2DLayerBridge::skCanvas):
97         (WebCore::Canvas2DLayerBridge::prepareTexture):
98         (WebCore::Canvas2DLayerBridge::context):
99         (WebCore::Canvas2DLayerBridge::layer):
100         (WebCore::Canvas2DLayerBridge::contextAcquired):
101         * platform/graphics/chromium/Canvas2DLayerBridge.h: Added.
102         (WebCore):
103         (Canvas2DLayerBridge):
104         (WebCore::Canvas2DLayerBridge::create):
105         * platform/graphics/chromium/Canvas2DLayerChromium.cpp: Removed.
106         * platform/graphics/chromium/Canvas2DLayerChromium.h: Removed.
107         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
108         * platform/graphics/chromium/ImageBufferDataSkia.h:
109         (WebCore):
110         (ImageBufferData):
111         * platform/graphics/chromium/TextureLayerChromium.cpp:
112         (WebCore::TextureLayerChromium::willModifyTexture):
113             willModifyTexture() is called whenever the texture currently owned by the TextureLayerChromium will be
114             modified by a system out of the compositor's control. It makes sure that the compositor does not attempt to
115             draw with the potentially-modified texture until the next commit. For canvas, this is used when threading is
116             enabled and a non-deferrable drawing command is invoked from JS.
117         (WebCore):
118         * platform/graphics/chromium/TextureLayerChromium.h:
119         (TextureLayerChromium):
120         * platform/graphics/chromium/cc/CCTextureUpdater.cpp:
121         (WebCore::CCTextureUpdater::hasMoreUpdates):
122         (WebCore::CCTextureUpdater::update):
123         (WebCore::CCTextureUpdater::clear):
124         * platform/graphics/chromium/cc/CCTextureUpdater.h:
125         (CCTextureUpdater):
126         * platform/graphics/skia/ImageBufferSkia.cpp:
127         (WebCore::createAcceleratedCanvas):
128         (WebCore::ImageBuffer::~ImageBuffer):
129         (WebCore::ImageBuffer::context):
130         (WebCore::ImageBuffer::platformLayer):
131
132 2012-06-07  Patrick Gansterer  <paroga@webkit.org>
133
134         Remove HAVE(PATH_BASED_BORDER_RADIUS_DRAWING)
135         https://bugs.webkit.org/show_bug.cgi?id=87931
136
137         Reviewed by Beth Dakin.
138
139         r62035 added HAVE(PATH_BASED_BORDER_RADIUS_DRAWING) until all ports implement
140         GraphicsContext::clipConvexPolygon(). All major ports define HAVE_PATH_BASED_BORDER_RADIUS_DRAWING in the
141         meantime and the alternative path has unnecessary maintainace costs and even don't compile at the moment.
142
143         * rendering/RenderBoxModelObject.cpp:
144         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
145         * rendering/RenderObject.cpp:
146         (WebCore::RenderObject::paintFocusRing):
147         * rendering/RenderObject.h:
148         (RenderObject):
149
150 2012-06-06  Vincent Scheib  <scheib@chromium.org>
151
152         Add new Pointer Lock spec events webkitpointerlockchange and webkitpointerlockerror
153         https://bugs.webkit.org/show_bug.cgi?id=88377
154
155         Reviewed by Dimitri Glazkov.
156
157         Part of a series of refactoring changes to update pointer lock API to
158         the fullscreen locking style. https://bugs.webkit.org/show_bug.cgi?id=84402
159
160         New change and error events added. Follow up patches will remove
161         the previous callbacks and pointerlocklost event. Tests updated
162         to include the new events, and a new test added specifically for
163         the new events, pointerlockchange-pointerlockerror-events.html.
164
165         Test: pointer-lock/pointerlockchange-pointerlockerror-events.html
166
167         * dom/Document.h:
168         (Document):
169         * dom/Document.idl:
170         * dom/EventNames.h:
171         (WebCore):
172         * page/PointerLockController.cpp:
173         (WebCore::PointerLockController::requestPointerLock):
174         (WebCore::PointerLockController::didAcquirePointerLock):
175         (WebCore::PointerLockController::didNotAcquirePointerLock):
176         (WebCore::PointerLockController::didLosePointerLock):
177         (WebCore::PointerLockController::enqueueEvent):
178         (WebCore):
179         * page/PointerLockController.h:
180         (PointerLockController):
181
182 2012-06-07  Sheriff Bot  <webkit.review.bot@gmail.com>
183
184         Unreviewed, rolling out r119744.
185         http://trac.webkit.org/changeset/119744
186         https://bugs.webkit.org/show_bug.cgi?id=88584
187
188         Fails assertions in debug builds (Requested by jamesr_ on
189         #webkit).
190
191         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
192         (WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl):
193         (WebCore::CCIOSurfaceLayerImpl::willDraw):
194
195 2012-06-07  Julien Chaffraix  <jchaffraix@webkit.org>
196
197         Cache RenderLayer::isRootLayer for better performance
198         https://bugs.webkit.org/show_bug.cgi?id=88570
199
200         Reviewed by Ojan Vafai.
201
202         Caching covered by existing tests.
203
204         RenderLayer::isRootLayer()'s answer will be the same during the RenderLayer's
205         lifetime as a RenderLayer is tied to a RenderBoxModelObject. This change caches
206         isRootLayer value in the constructor.
207
208         On http://dglazkov.github.com/performance-tests/biggrid.html with a 100,000 rows
209         by 100 columns table, it saves about 10% on the paint time during scrolling on
210         my machine (going from 50ms to 45ms). It would expect all code paths to see some
211         improvement as checking renderer()->isRenderView() was pretty common.
212
213         * rendering/RenderLayer.cpp:
214         (WebCore::RenderLayer::RenderLayer):
215         Added code to cache the result of renderer()->isRenderView() here.
216
217         (WebCore::RenderLayer::stackingContext):
218         (WebCore::isPositionedContainer):
219         (WebCore::isFixedPositionedContainer):
220         (WebCore::RenderLayer::enclosingTransformedAncestor):
221         (WebCore::RenderLayer::clippingRootForPainting):
222         (WebCore::shouldSuppressPaintingLayer):
223         (WebCore::RenderLayer::hitTest):
224         (WebCore::RenderLayer::intersectsDamageRect):
225         * rendering/RenderLayer.h:
226         (WebCore::RenderLayer::isStackingContext):
227         Updated all the call sites to use isRootLayer() instead of renderer()->isRenderView()
228         as it is faster.
229
230         (WebCore::RenderLayer::isRootLayer):
231         Added our caching here. Also made m_canSkipRepaintRectsUpdateOnScroll to follow
232         m_isRootLayer example.
233
234 2012-06-07  Takashi Sakamoto  <tasak@google.com>
235
236         Incorrect border rendering when border radius is above 2px.
237         https://bugs.webkit.org/show_bug.cgi?id=88046
238
239         Fixing findInnerVertex's logic to decide which is the better line
240         to find an inner vertex, x=center point's x of a rendering box or
241         y=center point's y of a rendering box.
242
243         Reviewed by Simon Fraser.
244
245         Test: fast/borders/border-radius-valid-border-clipping.html
246
247         * rendering/RenderBoxModelObject.cpp:
248         (WebCore::findInnerVertex):
249
250 2012-06-07  Edaena Salinas Jasso  <edaena@apple.com>
251
252         Should fire error event for empty 404 script
253         https://bugs.webkit.org/show_bug.cgi?id=50589
254         
255         Reviewed by Brady Eidson.
256
257         Tests: 
258         http/tests/loading/fire-error-event-empty-404-script.html
259         http/tests/loading/fire-error-script-no-content-type.html
260
261         * loader/SubresourceLoader.cpp:
262         (WebCore::SubresourceLoader::didReceiveResponse): We should check for http status 
263         codes here to stop depending on the response being non-empty.
264         (WebCore::SubresourceLoader::didReceiveData): Moved the http status check but
265         avoid messing with multipart responses.
266         (WebCore::SubresourceLoader::checkForHTTPStatusCodeError): Renamed from 
267         errorLoadingResource for clarity.
268
269         * loader/SubresourceLoader.h:
270         * loader/cf/SubresourceLoaderCF.cpp:
271         (WebCore::SubresourceLoader::didReceiveDataArray):
272         Updated for errorLoadingResource renaming.
273
274 2012-06-07  Konrad Piascik  <kpiascik@rim.com>
275
276         [BlackBerry] Update PlayBook's User Agent String for Web Inspector
277         https://bugs.webkit.org/show_bug.cgi?id=88543
278
279         Reviewed by Antonio Gomes.
280
281         We expect users to upgrade their devices so developers only need the latest UA String.
282
283         No tests needed.
284
285         * inspector/front-end/SettingsScreen.js:
286         (WebInspector.SettingsScreen.prototype._createUserAgentSelectRowElement.get const):
287
288 2012-06-07  Shawn Singh  <shawnsingh@chromium.org>
289
290         [chromium] Remove obsolete FIXME comment about a layer sorting bug.
291         https://bugs.webkit.org/show_bug.cgi?id=88546
292
293         Reviewed by James Robinson.
294
295         No tests needed, only comment changed. The comment referred to a
296         potential bug that actually will not occur. The W3C spec on CSS 3d
297         transforms indicates that layers that do not share the same "3d
298         rendering context" do not sort together, and our existing code
299         sorts this way already.
300
301         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
302         (WebCore::subtreeShouldRenderToSeparateSurface):
303
304 2012-06-07  Adam Barth  <abarth@webkit.org>
305
306         Settings::defaultDeviceScaleFactor is redundant with Page::deviceScaleFactor
307         https://bugs.webkit.org/show_bug.cgi?id=88375
308
309         Reviewed by James Robinson.
310
311         This patch removes Settings::defaultDeviceScaleFactor because it is
312         redundant with Page::deviceScaleFactor now that we no longer support
313         target-densitydpi.  Page::deviceScaleFactor is the canonical place to
314         store the device scale factor.
315
316         * WebCore.exp.in:
317         * page/Settings.cpp:
318         (WebCore::Settings::Settings):
319         (WebCore):
320         * page/Settings.h:
321         (Settings):
322         * testing/InternalSettings.cpp:
323         (WebCore::InternalSettings::setDeviceScaleFactor):
324
325 2012-06-07  Alec Flett  <alecflett@chromium.org>
326
327         IndexedDB: Error codes, phase one
328         https://bugs.webkit.org/show_bug.cgi?id=88459
329
330         Reviewed by Tony Chang.
331
332         This phase gets rid of the now-deprecated NOT_ALLOWED_ERR and
333         NON_TRANSIENT_ERR from earlier versions of the spec, and
334         normalizes the place where TypeError should be thrown so that it's
335         easier to update when the bindings change.
336
337         No new tests: existing tests cover these changes and have been updated.
338
339         * Modules/indexeddb/IDBCursor.cpp:
340         (WebCore::IDBCursor::advance):
341         (WebCore::IDBCursor::continueFunction):
342         (WebCore::IDBCursor::stringToDirection):
343         (WebCore::IDBCursor::directionToString):
344         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
345         (WebCore::IDBCursorBackendImpl::update):
346         (WebCore::IDBCursorBackendImpl::deleteFunction):
347         * Modules/indexeddb/IDBDatabase.cpp:
348         (WebCore::IDBDatabase::createObjectStore):
349         (WebCore::IDBDatabase::deleteObjectStore):
350         (WebCore::IDBDatabase::setVersion):
351         (WebCore::IDBDatabase::transaction):
352         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
353         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
354         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
355         (WebCore::IDBDatabaseBackendImpl::setVersion):
356         * Modules/indexeddb/IDBDatabaseException.cpp:
357         (WebCore):
358         * Modules/indexeddb/IDBDatabaseException.h:
359         * Modules/indexeddb/IDBDatabaseException.idl:
360         * Modules/indexeddb/IDBFactory.cpp:
361         (WebCore::IDBFactory::open):
362         (WebCore::IDBFactory::deleteDatabase):
363         * Modules/indexeddb/IDBObjectStore.cpp:
364         (WebCore::IDBObjectStore::index):
365         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
366         (WebCore::IDBObjectStoreBackendImpl::createIndex):
367         (WebCore::IDBObjectStoreBackendImpl::deleteIndex):
368         * Modules/indexeddb/IDBRequest.cpp:
369         (WebCore::IDBRequest::result):
370         (WebCore::IDBRequest::errorCode):
371         (WebCore::IDBRequest::webkitErrorMessage):
372         * Modules/indexeddb/IDBTransaction.cpp:
373         (WebCore::IDBTransaction::objectStore):
374         (WebCore::IDBTransaction::stringToMode):
375         (WebCore::IDBTransaction::modeToString):
376         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
377         (WebCore::IDBTransactionBackendImpl::objectStore):
378
379 2012-06-07  Dana Jansens  <danakj@chromium.org>
380
381         [chromium] Free texture from CCIOSurfaceLayerImpl when it is destroyed
382         https://bugs.webkit.org/show_bug.cgi?id=88371
383
384         Reviewed by James Robinson.
385
386         Unit test: CCLayerTreeHostImplTest.layersFreeTextures
387
388         * platform/graphics/chromium/cc/CCIOSurfaceLayerImpl.cpp:
389         (WebCore::CCIOSurfaceLayerImpl::~CCIOSurfaceLayerImpl):
390         (WebCore::CCIOSurfaceLayerImpl::willDraw):
391
392 2012-06-07  Peter Beverloo  <peter@chromium.org>
393
394         Buildfix for ENABLE_OVERFLOW_SCROLLING=0 (though defined)
395         https://bugs.webkit.org/show_bug.cgi?id=88564
396
397         Reviewed by Adam Barth.
398
399         Where ENABLE(X) mandates that X both has to be defined and evaluates to
400         true as a lone preprocessor statement, there were two places in the CSS
401         property and value input files where only was checked whether is has
402         been defined. This also goes against other #ifdefs in those files.
403
404         * css/CSSPropertyNames.in:
405         * css/CSSValueKeywords.in:
406
407 2012-06-07  Ami Fischman  <fischman@chromium.org>
408
409         Plumb CORS attribute information from HTMLMediaElement to media players so it can be used
410         https://bugs.webkit.org/show_bug.cgi?id=88349
411
412         Reviewed by Adam Barth.
413
414         Test: http/tests/security/video-cross-origin-readback.html
415
416         * html/HTMLMediaElement.cpp:
417         (WebCore::HTMLMediaElement::mediaPlayerCORSMode):
418         (WebCore):
419         * html/HTMLMediaElement.h:
420         (HTMLMediaElement):
421         * html/canvas/CanvasRenderingContext.cpp:
422         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
423         * platform/graphics/MediaPlayer.cpp:
424         (WebCore::MediaPlayer::didPassCORSAccessCheck):
425         (WebCore):
426         * platform/graphics/MediaPlayer.h:
427         (WebCore::MediaPlayerClient::mediaPlayerCORSMode):
428         (MediaPlayer):
429         * platform/graphics/MediaPlayerPrivate.h:
430         (WebCore::MediaPlayerPrivateInterface::didPassCORSAccessCheck):
431         (MediaPlayerPrivateInterface):
432
433 2012-06-07  Mark Hahnenberg  <mhahnenberg@apple.com>
434
435         Worker tear-down can re-enter JSC during GC finalization
436         https://bugs.webkit.org/show_bug.cgi?id=88449
437
438         Reviewed by Geoffrey Garen.
439
440         No new tests. 
441
442         This is the first of two patches to fix this issue with Workers.
443
444         * workers/AbstractWorker.cpp:
445         (WebCore::AbstractWorker::~AbstractWorker): We don't need to call onDestroyWorker() here, it 
446         will be called elsewhere in contextDestroyed().
447
448 2012-06-07  Jer Noble  <jer.noble@apple.com>
449
450         sometimes all slaved videos don't start playing
451         https://bugs.webkit.org/show_bug.cgi?id=88553
452
453         Reviewed by Darin Adler.
454
455         Test: media/media-controller-time-clamp.html
456
457         Some PlatformClock classes will occasionally return times < 0 and will
458         always return times slightly > duration() when playback has ended.  Clamp
459         the value of currentTime() to the specified [0..duration] range.
460
461         * html/MediaController.cpp:
462         (MediaController::currentTime):
463
464 2012-06-07  Simon Fraser  <simon.fraser@apple.com>
465
466         Optimize FrameView::scrollXForFixedPosition() / scrollYForFixedPosition()
467         https://bugs.webkit.org/show_bug.cgi?id=88475
468
469         Reviewed by Sam Weinig.
470         
471         FrameView's scrollXForFixedPosition() and scrollYForFixedPosition()
472         methods were often called together, but they do duplicate work,
473         including calling into platform widget code which might be slow.
474         
475         Fix by converting scrollOffsetForFixedPosition() from being a wrapper
476         that just calls scrollXForFixedPosition() and scrollYForFixedPosition()
477         to the method that does all the work, calling just once into platform
478         widget code.
479         
480         Changed callers to use scrollOffsetForFixedPosition() rather than make
481         two separate method calls.
482         
483         Added ScrollView::layoutSize() and visibleSize() methods for
484         convenience.
485         
486         Removed FrameView::scrollXForFixedPosition and FrameView::scrollYForFixedPosition
487         to avoid inefficient callers in future.
488
489         No new tests; refactoring only.
490
491         * page/FrameView.cpp:
492         (WebCore::fixedPositionScrollOffset):
493         (WebCore::FrameView::scrollOffsetForFixedPosition):
494         * page/FrameView.h: Removed scrollXForFixedPosition and scrollYForFixedPosition.
495         * platform/ScrollView.cpp:
496         (WebCore::ScrollView::layoutSize):
497         * platform/ScrollView.h:
498         (WebCore::ScrollView::visibleSize):
499         * rendering/RenderLayer.cpp:
500         (WebCore::RenderLayer::backgroundClipRect):
501         * rendering/RenderLayer.h:
502         (WebCore::ClipRect::move):
503         * rendering/RenderLayerCompositor.cpp:
504         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
505         * rendering/RenderView.cpp:
506         (WebCore::RenderView::computeRectForRepaint):
507
508 2012-06-07  Raymes Khoury  <raymes@chromium.org>
509
510         Incorrect rect-based hit-test result for culled-inline elements
511         https://bugs.webkit.org/show_bug.cgi?id=85849
512
513         Reviewed by Levi Weintraub.
514
515         Modified code which blindly adds culled inlines to rect-based hit-test
516         results so that it only does so if the child node does not fully cover
517         the hit-test region.
518
519         Test: fast/dom/nodesFromRect-culled-inline.html
520
521         * rendering/HitTestResult.cpp:
522         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
523
524 2012-06-07  Daniel Erat  <derat@chromium.org>
525
526         Make Skia backend honor requests for subpixel-positioned text.
527         https://bugs.webkit.org/show_bug.cgi?id=88263
528
529         Reviewed by Tony Chang.
530
531         Add subpixel positioning field to FontRenderStyle and rename
532         subpixel rendering field.
533
534         Pass setting to SkPaint in FontPlatformDataHarfBuzz and remove
535         round() call when computing glyph widths in SimpleFontDataSkia.
536
537         Test: platform/chromium-linux/fast/text/chromium-linux-text-subpixel-positioning.html
538
539         * platform/graphics/blackberry/skia/PlatformSupport.cpp:
540         (WebCore::setFontRenderStyleDefaults):
541         (WebCore::PlatformSupport::getRenderStyleForStrike):
542         * platform/graphics/chromium/FontRenderStyle.h:
543         (WebCore::FontRenderStyle::FontRenderStyle):
544         (WebCore::FontRenderStyle::operator==):
545         (FontRenderStyle):
546         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
547         (WebCore):
548         (WebCore::FontPlatformData::setSubpixelRendering):
549         (WebCore::FontPlatformData::setSubpixelPositioning):
550         (WebCore::FontPlatformData::setupPaint):
551         (WebCore::FontPlatformData::querySystemForRenderStyle):
552         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
553         (FontPlatformData):
554         * platform/graphics/skia/SimpleFontDataSkia.cpp:
555         (WebCore::SimpleFontData::platformWidthForGlyph):
556
557 2012-06-06  Dana Jansens  <danakj@chromium.org>
558
559         [chromium] In each composited frame, didDraw() should only be called on layers for which willDraw() was called
560         https://bugs.webkit.org/show_bug.cgi?id=88469
561
562         Reviewed by James Robinson.
563
564         Unit test: CCLayerTreeHostImplTest.didDrawNotCalledOnScissoredLayer
565
566         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
567         (WebCore::shouldDrawLayer):
568         (WebCore):
569         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
570         (WebCore::CCLayerTreeHostImpl::didDrawAllLayers):
571
572 2012-06-07  Alexei Filippov  <alexeif@chromium.org>
573
574         Web Inspector: sorting of object fields is broken in heap profiler
575         https://bugs.webkit.org/show_bug.cgi?id=88532
576
577         A recent change to heap profiler has replaced getters with functions.
578         Function calls were missing in couple places after that change.
579
580         Reviewed by Vsevolod Vlasov.
581
582         Tests: inspector/profiler/heap-snapshot-summary-sorting-fields.html
583                inspector/profiler/heap-snapshot-summary-sorting-instances.html
584
585         * inspector/front-end/HeapSnapshot.js:
586         (WebInspector.HeapSnapshotEdgesProvider.prototype.sort.compareNodeField):
587
588 2012-06-07  Alexander Pavlov  <apavlov@chromium.org>
589
590         Web Inspector: Consider Ctrl+Shift+key as valid zoom change combinations
591         https://bugs.webkit.org/show_bug.cgi?id=88520
592
593         Reviewed by Vsevolod Vlasov.
594
595         * inspector/front-end/inspector.js:
596         (WebInspector.documentKeyDown):
597
598 2012-06-07  Arvid Nilsson  <anilsson@rim.com>
599
600         [BlackBerry] Allow WebPageCompositor to blend a transparent web page
601         https://bugs.webkit.org/show_bug.cgi?id=88233
602
603         Reviewed by Rob Buis.
604
605         RIM PR #159998
606
607         Add a parameter to LayerRenderer::compositeBuffer() indicating whether
608         the buffer contents are opaque, and set the GL blend mode accordingly.
609
610         This is not currently testable using BlackBerry testing infrastructure.
611
612         Reviewed internally by Jakob Petsovits.
613
614         * platform/graphics/blackberry/LayerRenderer.cpp:
615         (WebCore::LayerRenderer::compositeBuffer):
616         * platform/graphics/blackberry/LayerRenderer.h:
617         (LayerRenderer):
618
619 2012-06-07  Alexei Filippov  <alexeif@chromium.org>
620
621         Web Inspector: reuse edge_count field of heap snapshot to store retained size
622         https://bugs.webkit.org/show_bug.cgi?id=88416
623
624         The edge_count field is unused after node first edge indexes have been built.
625         Store node retained size in there instead of allocating an extra array for it.
626
627         Reviewed by Vsevolod Vlasov.
628
629         * inspector/front-end/HeapSnapshot.js:
630         (WebInspector.HeapSnapshotNode.prototype.retainedSize):
631         (WebInspector.HeapSnapshot.prototype._calculateRetainedSizes):
632
633 2012-06-07  Sheriff Bot  <webkit.review.bot@gmail.com>
634
635         Unreviewed, rolling out r119694.
636         http://trac.webkit.org/changeset/119694
637         https://bugs.webkit.org/show_bug.cgi?id=88529
638
639         it broke PrerenderBrowserTest.PrerenderHTML5VideoNetwork
640         (Requested by loislo on #webkit).
641
642         * html/HTMLMediaElement.cpp:
643         * html/HTMLMediaElement.h:
644         (HTMLMediaElement):
645         * html/canvas/CanvasRenderingContext.cpp:
646         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
647         * platform/graphics/MediaPlayer.cpp:
648         * platform/graphics/MediaPlayer.h:
649         (MediaPlayer):
650         * platform/graphics/MediaPlayerPrivate.h:
651
652 2012-06-07  Shinya Kawanaka  <shinyak@chromium.org>
653
654         Delete a contenteditable element having a Shadow DOM causes a crash.
655         https://bugs.webkit.org/show_bug.cgi?id=86345
656
657         Reviewed by Ryosuke Niwa.
658
659         In VisibleSelection::validate(), m_start.downstream() or m_end.upstream() might cross
660         editing boundaries. So we adjust selection after calling them again.
661
662         Test: editing/shadow/select-contenteditable-shadowhost.html
663
664         * editing/VisibleSelection.cpp:
665         (WebCore::VisibleSelection::validate):
666
667 2012-06-07  Vivek Galatage  <vivekgalatage@gmail.com>
668
669         No new line at the end for SVGCSSPropertyNames.in causes compilation warning
670         https://bugs.webkit.org/show_bug.cgi?id=88503
671
672         Reviewed by Ryosuke Niwa.
673
674         Added new line at the end of the file.
675
676         No new tests required.
677
678         * css/SVGCSSPropertyNames.in:
679
680 2012-06-07  Csaba Osztrogonác  <ossy@webkit.org>
681
682         [Qt][Win] Use OS(WINDOWS) instead of Q_WS_WIN in WebCore/platform/graphics/GraphicsContext.h
683         https://bugs.webkit.org/show_bug.cgi?id=88305
684
685         Reviewed by Simon Hausmann.
686
687         * platform/graphics/GraphicsContext.h: Buildfix.
688         (GraphicsContext):
689
690 2012-06-07  Shinya Kawanaka  <shinyak@chromium.org>
691
692         Incorrect data retrieved in calls to get selection data in client->textWillBeReplaced from CharacterData::setDataAndUpdate
693         https://bugs.webkit.org/show_bug.cgi?id=66120
694
695         Reviewed by Ryosuke Niwa.
696
697         Since FrameSelection::textWillBeReplaced was called before replacing text, updated Selection became
698         temporarily invalid. The invalid selection was set to updateSelection(), so client will have
699         invalid selection.
700
701         This patch makes calling updateSelection() after updating selection.
702
703         No new tests, it's too hard to create a correct test cases in DRT.
704
705         * dom/CharacterData.cpp:
706         (WebCore::CharacterData::setDataAndUpdate):
707         * editing/FrameSelection.cpp:
708         (WebCore::updatePositionAfterAdoptingTextReplacement):
709         (WebCore::FrameSelection::textWasReplaced):
710         * editing/FrameSelection.h:
711         (FrameSelection):
712
713 2012-06-07  Li Yin  <li.yin@intel.com>
714
715         FileAPI: If type consists of non-ASCII characters in Blob constructor, it should throw a SyntaxError.
716         https://bugs.webkit.org/show_bug.cgi?id=88411
717
718         Reviewed by Kentaro Hara.
719
720         From spec: http://dev.w3.org/2006/webapi/FileAPI/#constructorBlob
721         If type consists of any non-ASCII characters, throw a SyntaxError and
722         return from this algorithm.
723         This patch checks the String is ASCii or not, if not, throw SyntaxError.
724
725         Test: fast/files/blob-constructor.html
726
727         * bindings/js/JSBlobCustom.cpp:
728         (WebCore::JSBlobConstructor::constructJSBlob):
729         * bindings/v8/custom/V8BlobCustom.cpp:
730         (WebCore::V8Blob::constructorCallback):
731
732 2012-06-07  Arpita Bahuguna  <arpitabahuguna@gmail.com>
733
734         InsertUnorderedList and InsertOrderedList (execCommand) do not remove bullets
735         https://bugs.webkit.org/show_bug.cgi?id=84597
736
737         Reviewed by Ryosuke Niwa.
738
739         Comparison between start and end VisiblePositions will fail when a position inside
740         a paragraph is compared with one at the start of the paragraph.
741         
742         This fix thus converts the end VisiblePosition (which could be inside the paragraph)
743         to the start of the paragraph thereby enabling a proper comparison of start and end
744         positions.
745
746         Test: editing/execCommand/remove-list-from-multi-list-items.html
747
748         * editing/InsertListCommand.cpp:
749         (WebCore::InsertListCommand::selectionHasListOfType):
750
751 2012-06-07  Li Yin  <li.yin@intel.com>
752
753         [FileAPI] FileReader should throw an InvalidStateError exception when readyState is LOADING
754         https://bugs.webkit.org/show_bug.cgi?id=88212
755
756         Reviewed by Jian Li.
757
758         From Spec: http://www.w3.org/TR/FileAPI/#readAsBinaryString
759         FileReader should throw an InvalidStateError exception instead of NOT_ALLOWED_ERR
760         when the readyState is LOADING.
761         Also delete OperationNotAllowedException related code, because it is not longer needed.
762
763         Tests: fast/files/read-file-async.html
764                fast/files/workers/worker-read-file-async.html
765
766         * CMakeLists.txt:
767         * DerivedSources.cpp:
768         * DerivedSources.make:
769         * DerivedSources.pri:
770         * GNUmakefile.list.am:
771         * Target.pri:
772         * WebCore.gypi:
773         * WebCore.vcproj/WebCore.vcproj:
774         * WebCore.xcodeproj/project.pbxproj:
775         * dom/DOMExceptions.in:
776         * fileapi/FileReader.cpp:
777         (WebCore::FileReader::readInternal): Changed it to throw INVALID_STATE_ERR.
778         * fileapi/FileReader.idl: Changed it to raise DOMException for all read methods.
779         * fileapi/OperationNotAllowedException.cpp: Removed.
780         * fileapi/OperationNotAllowedException.h: Removed.
781         * fileapi/OperationNotAllowedException.idl: Removed.
782
783 2012-06-07  Sheriff Bot  <webkit.review.bot@gmail.com>
784
785         Unreviewed, rolling out r119689.
786         http://trac.webkit.org/changeset/119689
787         https://bugs.webkit.org/show_bug.cgi?id=88516
788
789         it broke didDrawNotCalledOnScissoredLayer webkit_unit_test
790         (Requested by loislo on #webkit).
791
792         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
793         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
794         (WebCore::CCLayerTreeHostImpl::didDrawAllLayers):
795
796 2012-06-07  Ami Fischman  <fischman@chromium.org>
797
798         Plumb CORS attribute information from HTMLMediaElement to media players so it can be used
799         https://bugs.webkit.org/show_bug.cgi?id=88349
800
801         Reviewed by Adam Barth.
802
803         Test: http/tests/security/video-cross-origin-readback.html
804
805         * html/HTMLMediaElement.cpp:
806         (WebCore::HTMLMediaElement::mediaPlayerCORSMode):
807         (WebCore):
808         * html/HTMLMediaElement.h:
809         (HTMLMediaElement):
810         * platform/graphics/MediaPlayer.h:
811         (WebCore::MediaPlayerClient::mediaPlayerCORSMode):
812
813 2012-06-07  Hironori Bono  <hbono@chromium.org>
814
815         Use light gray for grammar markers on Windows and Linux
816         https://bugs.webkit.org/show_bug.cgi?id=88398
817
818         Reviewed by Ryosuke Niwa.
819
820         This change changes the color of grammar markers from dark gray to light gray
821         and rebaselines a couple of pixel tests affected by this change.
822
823         No new tests because it changes the marker color of an existing test 'grammar-markers.html'.
824
825         * platform/graphics/skia/GraphicsContextSkia.cpp: Change dark gray to light gray.
826
827 2012-06-07  Yoshifumi Inoue  <yosin@chromium.org>
828
829         [Platform] Introduce conversion from/to Deciaml to/from double
830         https://bugs.webkit.org/show_bug.cgi?id=88480
831
832         Reviewed by Kent Tamura.
833
834         This patch added functions for Decimal/Double conversion and isInfinity
835         for reducing patch size of introducing Decimal arithmetic, bug 88383.
836
837         Tests: WebKit/chromium/tests/DecimalTest.cpp
838
839         * platform/Decimal.cpp:
840         (WebCore::Decimal::fromDouble): Added.
841         (WebCore::Decimal::toDouble): Added.
842         * platform/Decimal.h:
843         (WebCore::Decimal::EncodedData::isInfinity): Added for isinf()
844         (WebCore::Decimal::isInfinity): Added.
845
846 2012-06-06  Xianzhu Wang  <wangxianzhu@chromium.org>
847
848         Element.getBoundingClientRect() and Element.getClientRects() return incorrect values in frames in a scaled page
849         https://bugs.webkit.org/show_bug.cgi?id=88430
850
851         Element.getBoudingClientRect() and Element.getClientRects() should not scale back the rects
852         if the element is in a frame because page scale only apply to elements in the main frame.
853
854         Reviewed by James Robinson.
855
856         Tests: fast/dom/Element/scale-page-bounding-client-rect-in-frame.html
857                fast/dom/Element/scale-page-client-rects-in-frame.html
858
859         * dom/Document.cpp:
860         (WebCore):
861         (WebCore::Document::adjustFloatQuadsForScrollAndAbsoluteZoomAndFrameScale): Extracted from Element.cpp and Range.cpp and fixed issue of pageScale in frames.
862         (WebCore::Document::adjustFloatRectForScrollAndAbsoluteZoomAndFrameScale): Extracted from Element.cpp and fixed issue of pageScale in frames.
863         * dom/Document.h:
864         (WebCore):
865         (Document):
866         * dom/Element.cpp:
867         (WebCore::Element::getClientRects):
868         (WebCore::Element::getBoundingClientRect):
869         * dom/Range.cpp:
870         (WebCore):
871         (WebCore::adjustFloatQuadsForScrollAndAbsoluteZoomAndPageScale): Moved into Document and fixed issue of pageScale in frames.
872         (WebCore::Range::getBorderAndTextQuads):
873         * rendering/RenderObject.h: Removed adjustFloatQuadForPageScale and adjustFloatRectForPageScale because they seem unrelated to RenderObject.
874         (WebCore):
875
876 2012-06-06  Dana Jansens  <danakj@chromium.org>
877
878         [chromium] In each composited frame, didDraw() should only be called on layers for which willDraw() was called
879         https://bugs.webkit.org/show_bug.cgi?id=88469
880
881         Reviewed by James Robinson.
882
883         Unit test: CCLayerTreeHostImplTest.didDrawNotCalledOnScissoredLayer
884
885         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
886         (WebCore::shouldDrawLayer):
887         (WebCore):
888         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
889         (WebCore::CCLayerTreeHostImpl::didDrawAllLayers):
890
891 2012-06-06  Andy Estes  <aestes@apple.com>
892
893         Wrap uppercaseWord, lowercaseWord, and capitalizeWord with USE(APPKIT)
894         https://bugs.webkit.org/show_bug.cgi?id=88504
895
896         Reviewed by Dan Bernstein.
897
898         uppercaseWord, lowercaseWord, and capitalizeWord are methods declared
899         by NSResponder that subclasses are expected to implement. WebKit should
900         only support these implementations on platforms that use AppKit.
901
902         * WebCore.exp.in:
903         * editing/Editor.cpp:
904         * editing/Editor.h:
905         * loader/EmptyClients.h:
906         * page/ContextMenuController.cpp:
907         * page/EditorClient.h:
908
909 2012-06-06  Sheriff Bot  <webkit.review.bot@gmail.com>
910
911         Unreviewed, rolling out r119683.
912         http://trac.webkit.org/changeset/119683
913         https://bugs.webkit.org/show_bug.cgi?id=88505
914
915         it broke webkit-unit-test
916         WebLayerTreeViewThreadedTest.InstrumentationCallbacks on mac
917         (Requested by loislo on #webkit).
918
919         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
920         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
921         (WebCore::CCLayerTreeHost::setVisible):
922
923 2012-06-06  Robert Kroeger  <rjkroege@chromium.org>
924
925         [Chromium] Re-enable handling of smooth scrolling on Chromium Linux/Windows
926         https://bugs.webkit.org/show_bug.cgi?id=87535 by adding support for
927         m_hasPreciseScrollingDelta on all Chromium platforms and adjusting ScrollAnimator
928         and ScrollAnimatorNone accordingly to let m_hasPreciseScrollingDelta == true
929         force exact (non-animated) scrolling.
930
931         Reviewed by James Robinson.
932
933         Updated WebKit unit tests to validate change.
934
935         * platform/PlatformWheelEvent.h:
936         (WebCore::PlatformWheelEvent::PlatformWheelEvent): Adjusted #ifdefs to
937         make m_hasPreciseScrollingDelta available on all Chromium platforms.
938         (PlatformWheelEvent):
939         * platform/ScrollAnimator.cpp:
940         (WebCore::ScrollAnimator::handleWheelEvent): Default scroll type is set based on 
941         m_hasPreciseScrollingDelta value.
942         * platform/ScrollAnimatorNone.cpp:
943         (WebCore::ScrollAnimatorNone::scroll): Scroll precisely when necessary.
944         * platform/ScrollTypes.h: Added additional pixel scrolling subtype.
945         * platform/ScrollableArea.cpp:
946         (WebCore::ScrollableArea::scroll): Updated for additional pixel scroll subtype.
947
948 2012-06-06  Michal Mocny  <mmocny@google.com>
949
950         [chromium] Stop dropping texture limits when the layer tree host becomes invisible, and initialize with 0 allocation.
951         https://bugs.webkit.org/show_bug.cgi?id=87747
952
953         Reviewed by Adrienne Walker.
954
955         GpuMemoryManager manages texture memory allocation limits. It will send a 0 allocation when a renderer becomes
956         invisible, and an appropriate allocation after a renderer is initialized.  These numbers will change
957         depending on the state of memory across devices and other renderers, so we would like to remove all explicit
958         management by the renderers themselves.
959
960         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
961         (WebCore::CCLayerTreeHost::initializeLayerRenderer):
962         (WebCore::CCLayerTreeHost::setVisible):
963
964 2012-06-06  Sheriff Bot  <webkit.review.bot@gmail.com>
965
966         Unreviewed, rolling out r119680.
967         http://trac.webkit.org/changeset/119680
968         https://bugs.webkit.org/show_bug.cgi?id=88498
969
970         It broke mac build (Requested by kinuko on #webkit).
971
972         * fileapi/File.cpp:
973         (WebCore::File::File):
974         (WebCore::File::lastModifiedDate):
975         (WebCore::File::lastModifiedDateForBinding):
976         (WebCore):
977         (WebCore::File::captureSnapshot):
978         * fileapi/File.h:
979         (File):
980         * fileapi/File.idl:
981         * platform/FileMetadata.h:
982         (WebCore::FileMetadata::FileMetadata):
983         * platform/FileSystem.h:
984         * platform/chromium/support/WebHTTPBody.cpp:
985         (WebKit::WebHTTPBody::elementAt):
986         * platform/network/BlobData.cpp:
987         (WebCore):
988
989 2012-06-06  Kinuko Yasuda  <kinuko@chromium.org>
990
991         File::lastModifiedDate should use NaN or separate boolean flag for null Date value
992         https://bugs.webkit.org/show_bug.cgi?id=87826
993
994         Reviewed by Kent Tamura.
995
996         Test: http/tests/local/fileapi/file-last-modified-after-delete.html
997
998         * fileapi/File.cpp:
999         (WebCore::File::File):
1000         (WebCore::File::captureSnapshot):
1001         (WebCore::File::lastModifiedDate):
1002         (WebCore::File::lastModifiedDateForBinding): Removed.
1003         * fileapi/File.h:
1004         (File):
1005         * fileapi/File.idl:
1006         * platform/FileMetadata.h:
1007         (WebCore::FileMetadata::FileMetadata):
1008         * platform/FileSystem.h:
1009         * platform/chromium/support/WebHTTPBody.cpp:
1010         (WebKit::WebHTTPBody::elementAt):
1011         * platform/network/BlobData.cpp:
1012         (WebCore):
1013
1014 2012-06-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1015
1016         Unreviewed, rolling out r119668.
1017         http://trac.webkit.org/changeset/119668
1018         https://bugs.webkit.org/show_bug.cgi?id=88493
1019
1020         Hitting assertions in debug builds (Requested by rniwa on
1021         #webkit).
1022
1023         * rendering/RenderBlock.cpp:
1024         (WebCore::RenderBlock::localCaretRect):
1025         * rendering/RenderBoxModelObject.cpp:
1026         * rendering/RenderBoxModelObject.h:
1027         (RenderBoxModelObject):
1028         * rendering/RenderInline.cpp:
1029         * rendering/RenderInline.h:
1030         (RenderInline):
1031
1032 2012-06-06  Julien Chaffraix  <jchaffraix@webkit.org>
1033
1034         Cache isSelfPaintingLayer() for better performance
1035         https://bugs.webkit.org/show_bug.cgi?id=88464
1036
1037         Reviewed by Simon Fraser.
1038
1039         Covered by existing tests (repaint tests among them).
1040
1041         isSelfPaintingLayer() has shown up several times on some scrolling benchmarks due
1042         to the function being called several time per paint phase. This change caches the
1043         boolean at style change time.
1044         
1045         On http://dglazkov.github.com/performance-tests/biggrid.html, this nearly speed-up
1046         painting by 2 (lowering the time taken to paint the newly exposed area when scrolling
1047         on a 10,000 * 100 table from 95ms to 50ms).
1048
1049         * rendering/RenderLayer.cpp:
1050         (WebCore::RenderLayer::RenderLayer):
1051         Initialized m_isSelfPaintingLayer here.
1052
1053         (WebCore::RenderLayer::paintLayer):
1054         Changed the order of the checks to get the more likely check first.
1055
1056         (WebCore::RenderLayer::shouldBeSelfPaintingLayer):
1057         Renamed from isSelfPaintingLayer to make m_isNormalFlowOnly.
1058
1059         (WebCore::RenderLayer::styleChanged):
1060         Added code to update our cached m_isSelfPaintingLayer.
1061
1062         * rendering/RenderLayer.h:
1063         (WebCore::RenderLayer::isSelfPaintingLayer):
1064         Changed to return m_isSelfPaintingLayer.
1065
1066 2012-06-06  Yoshifumi Inoue  <yosin@chromium.org>
1067
1068         REGRESSION(r109729) [Form] Rendering of select/optgroup/option combination is too slow.
1069         https://bugs.webkit.org/show_bug.cgi?id=88059
1070
1071         Reviewed by Kent Tamura.
1072
1073         This patch changes not to share RenderStyle object for option and
1074         optgroup element regardless attributes.
1075
1076         When we tried to shared RenderStyle object, rendering performance was
1077         good but we had issue in selected option and text transform, see
1078         https://bugs.webkit.org/show_bug.cgi?id=88405 for details.
1079
1080         No new tests. This patch doesn't change behavior but rendering performance.
1081
1082         * css/StyleResolver.cpp:
1083         (WebCore::StyleResolver::canShareStyleWithElement): Changed to always
1084         return false for option and optgroup.
1085
1086 2012-06-06  Alec Flett  <alecflett@chromium.org>
1087
1088         IndexedDB: Optimize single-key get()
1089         https://bugs.webkit.org/show_bug.cgi?id=85288
1090
1091         Reviewed by Tony Chang.
1092
1093         No new tests, this is just an optimization.
1094
1095         After a recent refactoring, we started creating
1096         an internal cursor with every call to get(). The
1097         most common use of get() is with a single key,
1098         so provide a fast-path to avoid creating the cursor.
1099
1100         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
1101         (WebCore::IDBIndexBackendImpl::getByRangeInternal):
1102         * Modules/indexeddb/IDBKeyRange.h:
1103         (WebCore::IDBKeyRange::isOnlyKey):
1104         (IDBKeyRange):
1105         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1106         (WebCore::IDBObjectStoreBackendImpl::getByRangeInternal):
1107
1108 2012-06-06  Shezan Baig  <shezbaig.wk@gmail.com>
1109
1110         Caret is not rendered in empty inline contenteditable elements
1111         https://bugs.webkit.org/show_bug.cgi?id=85793
1112
1113         Reviewed by Ryosuke Niwa.
1114
1115         Override localCaretRect in RenderInline. The implementation was almost
1116         identical to localCaretRect in RenderBlock for empty block elements, so
1117         I refactored RenderBlock::localCaretRect and moved the logic to a new
1118         method 'localCaretRectForEmptyElement' in RenderBoxModelObject. The
1119         implementation of 'localCaretRect' in RenderBlock and RenderInline both
1120         use this helper method in RenderBoxModelObject.
1121
1122         Tests: editing/selection/caret-in-empty-inline-1.html
1123                editing/selection/caret-in-empty-inline-2.html
1124
1125         * rendering/RenderBlock.cpp:
1126         (WebCore::RenderBlock::localCaretRect):
1127         Modified to use RenderBoxModelObject::localCaretRectForEmptyElement.
1128         * rendering/RenderBoxModelObject.cpp:
1129         (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
1130         (WebCore):
1131         * rendering/RenderBoxModelObject.h:
1132         (RenderBoxModelObject):
1133         Add localCaretRectForEmptyElement helper method.
1134         * rendering/RenderInline.cpp:
1135         (WebCore::RenderInline::localCaretRect):
1136         (WebCore):
1137         * rendering/RenderInline.h:
1138         (RenderInline):
1139         Override localCaretRect using localCaretRectForEmptyElement.
1140
1141 2012-06-06  Alexis Menard  <alexis.menard@openbossa.org>
1142
1143         Fix border-image-slice failures on http://css3test.com.
1144         https://bugs.webkit.org/show_bug.cgi?id=88328
1145
1146         Reviewed by Tony Chang.
1147
1148         The old parsing code was assuming that the fill keyword comes after the
1149         numbers or the percentage values. http://www.w3.org/TR/css3-background/#the-border-image-slice
1150         defines the property like this : [<number> | <percentage>]{1,4} && fill? where the fill
1151         keyword is not mandatory. But according to http://www.w3.org/TR/CSS2/about.html "&&" 
1152         separates two or more components, all of which must occur, in any order. So the previous
1153         code was wrong the fill can come first following by the percentages or the numbers. http://css3test.com
1154         was covering this particular case. I took the opportunity to extend our coverage 
1155         by adding tests on many different values the boder-image-slice property could take. I
1156         also did a small cleanup by removing unused functions in BorderImageSliceParseContext.
1157
1158         Test: fast/css/getComputedStyle/getComputedStyle-border-image-slice.html
1159
1160         * css/CSSParser.cpp:
1161         (WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext):
1162         (WebCore::BorderImageSliceParseContext::commitNumber):
1163         (WebCore::BorderImageSliceParseContext::commitFill):
1164
1165 2012-06-06  Levi Weintraub  <leviw@chromium.org>
1166
1167         Use enclosingIntRect instead of pixelSnappedIntRect in RenderFileUploadControl
1168         https://bugs.webkit.org/show_bug.cgi?id=88454
1169
1170         Reviewed by Kent Tamura.
1171
1172         Properly clipping the file upload control to avoid clipping out the top of the file upload button
1173         when the control is positioned at a sub-pixel offset that rounds up.
1174
1175         Test: fast/sub-pixel/file-upload-control-at-fractional-offset.html
1176
1177         * rendering/RenderFileUploadControl.cpp:
1178         (WebCore::RenderFileUploadControl::paintObject):
1179
1180 2012-06-06  Filip Pizlo  <fpizlo@apple.com>
1181
1182         Global object variable accesses should not require an extra load
1183         https://bugs.webkit.org/show_bug.cgi?id=88385
1184
1185         Reviewed by Gavin Barraclough and Geoffrey Garen.
1186
1187         Updated JSDOMWindowBase.cpp to use the new symbol table API. this->symbolTableFoo(...)
1188         becomes symbolTableFoo(this, ...).
1189                 
1190         No new tests because no change in behavior.
1191
1192         * bindings/js/JSDOMWindowBase.cpp:
1193         (WebCore::JSDOMWindowBase::updateDocument):
1194
1195 2012-06-06  James Robinson  <jamesr@chromium.org>
1196
1197         [chromium] Move implementation of WebCore::GraphicsContext3D and related from WebKit/chromium/src to WebCore/platform/chromium/support
1198         https://bugs.webkit.org/show_bug.cgi?id=86257
1199
1200         Reviewed by Kenneth Russell.
1201
1202         The WebCore platform interfaces GraphicsContext3D and Extensions3DChromium are implemented in chromium
1203         on top of the Platform interface WebGraphicsContext3D. This moves the implementation support code from
1204         WebKit/chromium/src to WebCore/platform/chromium/support, which avoids having code in WebKit/ implementing WebCore
1205         interfaces and allows code in WebCore/platform to use this support code directly where appropriate.
1206
1207         Refactor only, no new functionality or tests.
1208
1209         * WebCore.gypi:
1210         * platform/chromium/support/Extensions3DChromium.cpp: Renamed from Source/WebKit/chromium/src/Extensions3DChromium.cpp.
1211         (WebCore):
1212         (WebCore::Extensions3DChromium::Extensions3DChromium):
1213         (WebCore::Extensions3DChromium::~Extensions3DChromium):
1214         (WebCore::Extensions3DChromium::supports):
1215         (WebCore::Extensions3DChromium::ensureEnabled):
1216         (WebCore::Extensions3DChromium::isEnabled):
1217         (WebCore::Extensions3DChromium::getGraphicsResetStatusARB):
1218         (WebCore::Extensions3DChromium::blitFramebuffer):
1219         (WebCore::Extensions3DChromium::renderbufferStorageMultisample):
1220         (WebCore::Extensions3DChromium::postSubBufferCHROMIUM):
1221         (WebCore::Extensions3DChromium::mapBufferSubDataCHROMIUM):
1222         (WebCore::Extensions3DChromium::unmapBufferSubDataCHROMIUM):
1223         (WebCore::Extensions3DChromium::mapTexSubImage2DCHROMIUM):
1224         (WebCore::Extensions3DChromium::unmapTexSubImage2DCHROMIUM):
1225         (WebCore::Extensions3DChromium::setVisibilityCHROMIUM):
1226         (WebCore::Extensions3DChromium::discardFramebufferEXT):
1227         (WebCore::Extensions3DChromium::ensureFramebufferCHROMIUM):
1228         (WebCore::Extensions3DChromium::setGpuMemoryAllocationChangedCallbackCHROMIUM):
1229         (WebCore::Extensions3DChromium::createVertexArrayOES):
1230         (WebCore::Extensions3DChromium::deleteVertexArrayOES):
1231         (WebCore::Extensions3DChromium::isVertexArrayOES):
1232         (WebCore::Extensions3DChromium::bindVertexArrayOES):
1233         (WebCore::Extensions3DChromium::getTranslatedShaderSourceANGLE):
1234         (WebCore::Extensions3DChromium::setSwapBuffersCompleteCallbackCHROMIUM):
1235         (WebCore::Extensions3DChromium::rateLimitOffscreenContextCHROMIUM):
1236         (WebCore::Extensions3DChromium::paintFramebufferToCanvas):
1237         (WebCore::Extensions3DChromium::texImageIOSurface2DCHROMIUM):
1238         (WebCore::Extensions3DChromium::texStorage2DEXT):
1239         (WebCore::Extensions3DChromium::createQueryEXT):
1240         (WebCore::Extensions3DChromium::deleteQueryEXT):
1241         (WebCore::Extensions3DChromium::isQueryEXT):
1242         (WebCore::Extensions3DChromium::beginQueryEXT):
1243         (WebCore::Extensions3DChromium::endQueryEXT):
1244         (WebCore::Extensions3DChromium::getQueryivEXT):
1245         (WebCore::Extensions3DChromium::getQueryObjectuivEXT):
1246         * platform/chromium/support/GraphicsContext3DChromium.cpp: Renamed from Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp.
1247         (WebCore):
1248         (WebCore::GraphicsContext3D::GraphicsContext3D):
1249         (WebCore::GraphicsContext3D::~GraphicsContext3D):
1250         (WebCore::GraphicsContext3D::setContextLostCallback):
1251         (WebCore::GraphicsContext3D::setErrorMessageCallback):
1252         (WebCore::GraphicsContext3D::create):
1253         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
1254         (WebCore::GraphicsContext3D::platformTexture):
1255         (WebCore::GraphicsContext3D::grContext):
1256         (WebCore::GraphicsContext3D::platformLayer):
1257         (WebCore::GraphicsContext3D::isGLES2Compliant):
1258         (WebCore::GraphicsContext3D::isResourceSafe):
1259         (WebCore::GraphicsContext3D::bindAttribLocation):
1260         (WebCore::GraphicsContext3D::bufferData):
1261         (WebCore::GraphicsContext3D::getActiveAttrib):
1262         (WebCore::GraphicsContext3D::getActiveUniform):
1263         (WebCore::GraphicsContext3D::getAttribLocation):
1264         (WebCore::GraphicsContext3D::getContextAttributes):
1265         (WebCore::GraphicsContext3D::getProgramInfoLog):
1266         (WebCore::GraphicsContext3D::getShaderInfoLog):
1267         (WebCore::GraphicsContext3D::getShaderSource):
1268         (WebCore::GraphicsContext3D::getString):
1269         (WebCore::GraphicsContext3D::getUniformLocation):
1270         (WebCore::GraphicsContext3D::shaderSource):
1271         (WebCore::GraphicsContext3D::texImage2D):
1272         (WebCore::GraphicsContext3D::texSubImage2D):
1273         (WebCore::GraphicsContext3D::reshape):
1274         (WebCore::GraphicsContext3D::markContextChanged):
1275         (WebCore::GraphicsContext3D::layerComposited):
1276         (WebCore::GraphicsContext3D::markLayerComposited):
1277         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
1278         (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
1279         (WebCore::GraphicsContext3D::paintCompositedResultsToCanvas):
1280         (WebCore::GraphicsContext3D::getExtensions):
1281         (WebCore::GraphicsContext3D::getInternalFramebufferSize):
1282         * platform/chromium/support/GraphicsContext3DPrivate.cpp: Renamed from Source/WebKit/chromium/src/GraphicsContext3DPrivate.cpp.
1283         (WebCore):
1284         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1285         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
1286         (WebCore::GraphicsContext3DPrivate::createGraphicsContextFromWebContext):
1287         (WebCore::GraphicsContext3DPrivate::extractWebGraphicsContext3D):
1288         (GrMemoryAllocationChangedCallback):
1289         (WebCore::GrMemoryAllocationChangedCallback::GrMemoryAllocationChangedCallback):
1290         (WebCore::GrMemoryAllocationChangedCallback::onGpuMemoryAllocationChanged):
1291         (WebCore::GraphicsContext3DPrivate::grContext):
1292         (WebCore::GraphicsContext3DPrivate::markContextChanged):
1293         (WebCore::GraphicsContext3DPrivate::layerComposited):
1294         (WebCore::GraphicsContext3DPrivate::markLayerComposited):
1295         (WebCore::GraphicsContext3DPrivate::paintFramebufferToCanvas):
1296         (GraphicsContext3DContextLostCallbackAdapter):
1297         (WebCore::GraphicsContext3DContextLostCallbackAdapter::GraphicsContext3DContextLostCallbackAdapter):
1298         (WebCore::GraphicsContext3DContextLostCallbackAdapter::~GraphicsContext3DContextLostCallbackAdapter):
1299         (WebCore::GraphicsContext3DContextLostCallbackAdapter::onContextLost):
1300         (WebCore::GraphicsContext3DPrivate::setContextLostCallback):
1301         (GraphicsContext3DErrorMessageCallbackAdapter):
1302         (WebCore::GraphicsContext3DErrorMessageCallbackAdapter::GraphicsContext3DErrorMessageCallbackAdapter):
1303         (WebCore::GraphicsContext3DErrorMessageCallbackAdapter::~GraphicsContext3DErrorMessageCallbackAdapter):
1304         (WebCore::GraphicsContext3DErrorMessageCallbackAdapter::onErrorMessage):
1305         (WebCore::GraphicsContext3DPrivate::setErrorMessageCallback):
1306         (WebCore::GraphicsContext3DPrivate::getExtensions):
1307         (WebCore::GraphicsContext3DPrivate::initializeExtensions):
1308         (WebCore::GraphicsContext3DPrivate::supportsExtension):
1309         (WebCore::GraphicsContext3DPrivate::ensureExtensionEnabled):
1310         (WebCore::GraphicsContext3DPrivate::isExtensionEnabled):
1311         (WebCore::GraphicsContext3DPrivate::isResourceSafe):
1312         (GraphicsContext3DMemoryAllocationChangedCallbackAdapter):
1313         (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::GraphicsContext3DMemoryAllocationChangedCallbackAdapter):
1314         (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::~GraphicsContext3DMemoryAllocationChangedCallbackAdapter):
1315         (WebCore::GraphicsContext3DMemoryAllocationChangedCallbackAdapter::onMemoryAllocationChanged):
1316         (WebCore::GraphicsContext3DPrivate::setGpuMemoryAllocationChangedCallbackCHROMIUM):
1317         (GraphicsContext3DSwapBuffersCompleteCallbackAdapter):
1318         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::GraphicsContext3DSwapBuffersCompleteCallbackAdapter):
1319         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::~GraphicsContext3DSwapBuffersCompleteCallbackAdapter):
1320         (WebCore::GraphicsContext3DSwapBuffersCompleteCallbackAdapter::onSwapBuffersComplete):
1321         (WebCore::GraphicsContext3DPrivate::setSwapBuffersCompleteCallbackCHROMIUM):
1322         * platform/chromium/support/GraphicsContext3DPrivate.h: Renamed from Source/WebKit/chromium/src/GraphicsContext3DPrivate.h.
1323         (WebKit):
1324         (WebCore):
1325         (GraphicsContext3DPrivate):
1326         (WebCore::GraphicsContext3DPrivate::webContext):
1327         (WebCore::GraphicsContext3DPrivate::preserveDrawingBuffer):
1328
1329 2012-06-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1330
1331         Unreviewed, rolling out r119624.
1332         http://trac.webkit.org/changeset/119624
1333         https://bugs.webkit.org/show_bug.cgi?id=88472
1334
1335         Caused worker tests to become flaky (Requested by mhahnenberg
1336         on #webkit).
1337
1338         * workers/AbstractWorker.cpp:
1339         (WebCore::AbstractWorker::~AbstractWorker):
1340         * workers/WorkerMessagingProxy.cpp:
1341         (WebCore::WorkerMessagingProxy::workerObjectDestroyed):
1342
1343 2012-06-06  Brady Eidson  <beidson@apple.com>
1344
1345         <rdar://problem/11575112> and https://bugs.webkit.org/show_bug.cgi?id=88428
1346         REGRESSION (r115654): Opening many non-English WebArchives shows obvious encoding issues
1347
1348         Reviewed by Nate Chapin.
1349
1350         Test: fast/loader/webarchive-encoding-respected.html
1351
1352         * loader/DocumentLoader.cpp:
1353         (WebCore::DocumentLoader::commitData): Properly set the main resource encoding from the webarchive.
1354
1355 2012-06-06  Mark Hahnenberg  <mhahnenberg@apple.com>
1356
1357         Worker tear-down can re-enter JSC during GC finalization
1358         https://bugs.webkit.org/show_bug.cgi?id=88449
1359
1360         Reviewed by Geoffrey Garen.
1361
1362         No new tests. Current regression tests cover these changes.
1363
1364         * workers/AbstractWorker.cpp: 
1365         (WebCore::AbstractWorker::~AbstractWorker): We don't need to call onDestroyWorker() here, it 
1366         will be called elsewhere in contextDestroyed().
1367         * workers/WorkerMessagingProxy.cpp:
1368         (WebCore::WorkerMessagingProxy::workerObjectDestroyed): We make the call to terminateWorkerContext()
1369         and workerContextDestroyed() asynchronous to avoid entering JSC during GC finalization.
1370
1371 2012-06-06  Tony Chang  <tony@chromium.org>
1372
1373         webkit crashes on debug builds when running IETC flexbox-ordinal-group-001.htm
1374         https://bugs.webkit.org/show_bug.cgi?id=85832
1375
1376         Reviewed by Ojan Vafai.
1377
1378         We were using a HashSet<unsigned>, which can't hold the value of 0.
1379         According to the spec, 0 isn't a valid value, so at CSS parse time,
1380         reject the value 0. This lets us pass the test, although that's kind
1381         of by accident.
1382
1383         We could allow 0 for box-ordinal-group, but there are some perf implications
1384         to having allowing a value below the initial value (1 in this case).
1385
1386         We still allow 0 for box-flex-group, because that's what the existing code
1387         does and there are tests expecting this behavior.
1388
1389         No new tests, covered by ietestcenter/css3/flexbox/flexbox-ordinal-group-001.htm
1390         which was crashing.
1391
1392         * css/CSSParser.cpp:
1393         (WebCore::CSSParser::parseValue): Reject 0 for -webkit-box-ordinal-group.
1394
1395 2012-06-06  Ojan Vafai  <ojan@chromium.org>
1396
1397         Remove some magic from the -webkit-flex shorthand parsing to match the changes in the spec
1398         https://bugs.webkit.org/show_bug.cgi?id=88444
1399
1400         Reviewed by Tony Chang.
1401
1402         -Unset positive flex defaults to 0.
1403         -Unset negative flex defaults to 1. No magic of doing something different if positive flex was set.
1404
1405         * css/CSSParser.cpp:
1406         (WebCore::CSSParser::parseFlex):
1407
1408 2012-06-06  Ryosuke Niwa  <rniwa@webkit.org>
1409
1410         Revert r119440 now that I have a time to rebaseline them all!
1411
1412         * platform/ScrollbarThemeComposite.cpp:
1413         (WebCore::ScrollbarThemeComposite::thumbLength):
1414
1415 2012-06-06  Joshua Bell  <jsbell@chromium.org>
1416
1417         IndexedDB: Infinite recursion in IDBObjectStore.openCursor(key, legacy_constant)
1418         https://bugs.webkit.org/show_bug.cgi?id=88431
1419
1420         Reviewed by Tony Chang.
1421
1422         Function was calling itself, rather than delegating to the correct (IDBKeyRange) overload.
1423
1424         Test: storage/indexeddb/legacy-constants.html
1425
1426         * Modules/indexeddb/IDBObjectStore.cpp:
1427         (WebCore::IDBObjectStore::openCursor):
1428
1429 2012-06-06  Joshua Bell  <jsbell@chromium.org>
1430
1431         IndexedDB: Rename IDBFactory.getDatabaseNames() to webkitGetDatabaseNames()
1432         https://bugs.webkit.org/show_bug.cgi?id=86874
1433
1434         Reviewed by Ojan Vafai.
1435
1436         The function is non-standard, and should be prefixed.
1437
1438         Test: storage/indexeddb/factory-basics.html
1439
1440         * Modules/indexeddb/IDBFactory.idl:
1441
1442 2012-06-06  Julien Chaffraix  <jchaffraix@webkit.org>
1443
1444         Add support for direction on table row group with collapsing borders
1445         https://bugs.webkit.org/show_bug.cgi?id=87900
1446
1447         Reviewed by Ojan Vafai.
1448
1449         Tests: fast/table/border-collapsing/first-cell-left-border-hidden-table-ltr-section-rtl.html
1450                fast/table/border-collapsing/last-cell-left-border-hidden-table-ltr-section-rtl.html
1451                fast/table/border-collapsing/left-border-table-ltr-section-rtl.html
1452                fast/table/border-collapsing/left-border-table-rtl-section-ltr.html
1453                fast/table/border-collapsing/left-border-table-rtl-section-rtl.html
1454                fast/table/border-collapsing/left-border-vertical-lr-table-ltr-section-rtl.html
1455                fast/table/border-collapsing/left-border-vertical-lr-table-rtl-section-ltr.html
1456                fast/table/border-collapsing/left-border-vertical-lr-table-rtl-section-rtl.html
1457                fast/table/border-collapsing/rtl-table-left-border-hidden.html
1458                fast/table/border-collapsing/top-border-vertical-rl-table-ltr-section-rtl.html
1459                fast/table/border-collapsing/top-border-vertical-rl-table-rtl-section-ltr.html
1460                fast/table/border-collapsing/top-border-vertical-rl-table-rtl-section-rtl.html
1461                fast/table/table-ltr-section-rtl.html
1462                fast/table/table-rtl-section-ltr.html
1463                fast/table/table-rtl-section-rtl.html
1464
1465         This change enables proper support for direction on table row group.
1466         The current code would allow people to set direction on the row group but would still
1467         use the table's code for directionality checks (with surprising consequences).
1468
1469         The main change involve swapping end / start borders in case of mixed directionality
1470         as those 2 are not in sync.
1471         
1472         Example: <table dir="ltr"><tbody dir="rtl"><td id="cell0"></td><td id="cell1"></td></tbody></table>
1473
1474         Visually:
1475         Table: Start ---------------------> End
1476         Tbody: End <---------------------- Start
1477         Cell:  | #cell0        |           #cell1 |
1478
1479         In this example, the end table border should be compared with the tbody's start border
1480         and the last cell's (in DOM order) start border.
1481
1482         * rendering/RenderTable.cpp:
1483         (WebCore::RenderTable::tableStartBorderAdjoiningCell):
1484         (WebCore::RenderTable::tableEndBorderAdjoiningCell):
1485         Same as the other adjoining functions.
1486
1487         * rendering/RenderTable.h:
1488         (WebCore::RenderTable::lastColumnIndex):
1489         Helper function to get the last column index.
1490
1491         * rendering/RenderTableCell.cpp:
1492         (WebCore::RenderTableCell::computeCollapsedStartBorder):
1493         (WebCore::RenderTableCell::computeCollapsedEndBorder):
1494         Updated to call the table's adjoining border helpers.
1495
1496         * rendering/RenderTableCell.h:
1497         (WebCore::RenderTableCell::styleForCellFlow):
1498         Updated to use the table row group's style now that we properly support it.
1499
1500         (WebCore::RenderTableCell::isFirstOrLastCellInRow):
1501         Debug only helper to make sure we don't call the border adjoining function
1502         on non-terminal cells.
1503
1504         (WebCore::RenderTableCell::borderAdjoiningTableStart):
1505         (WebCore::RenderTableCell::borderAdjoiningTableEnd):
1506         * rendering/RenderTableRow.h:
1507         (WebCore::RenderTableRow::borderAdjoiningTableStart):
1508         (WebCore::RenderTableRow::borderAdjoiningTableEnd):
1509         * rendering/RenderTableSection.cpp:
1510         (WebCore::RenderTableSection::firstRowCellAdjoiningTableStart):
1511         (WebCore::RenderTableSection::firstRowCellAdjoiningTableEnd):
1512         Updated the previous function to account for mixed directionality.
1513
1514         (WebCore::RenderTableSection::layoutRows):
1515         Move some of the code to setLogicalPositionForCell to match RenderBlock.
1516
1517         (WebCore::RenderTableSection::setLogicalPositionForCell):
1518         Switched direction checks to styleForCellFlow (this doesn't change anything as we
1519         were already properly flipping already but ensure better).
1520
1521         * rendering/RenderTableSection.h:
1522         (WebCore::RenderTableSection::hasSameDirectionAsTable):
1523         Added this helper to know if we have a mixed direction.
1524
1525         (WebCore::RenderTableSection::borderAdjoiningTableStart):
1526         (WebCore::RenderTableSection::borderAdjoiningTableEnd):
1527         Updated to account for mixed directionality.
1528
1529 2012-06-06  Keyar Hood  <keyar@chromium.org>
1530
1531         [Chromium] imageSmoothingEnabled should apply to patterns
1532         https://bugs.webkit.org/show_bug.cgi?id=88103
1533
1534         Reviewed by Stephen White.
1535
1536         Test: fast/canvas/canvas-imageSmoothingEnabled-patterns.html
1537
1538         When drawing patterns on a Canvas, the imageSmoothingEnabled flag is
1539         respected.
1540         * platform/graphics/skia/PlatformContextSkia.cpp:
1541         (WebCore::PlatformContextSkia::setupShader):
1542
1543 2012-06-06  Andrey Adaikin  <aandrey@chromium.org>
1544
1545         Web Inspector: [JSC] Add WebGL instrumentation support
1546         https://bugs.webkit.org/show_bug.cgi?id=87975
1547
1548         Reviewed by Vsevolod Vlasov.
1549
1550         * bindings/js/JSInjectedScriptManager.cpp:
1551         (WebCore::injectAndExecuteFunction):
1552         (WebCore::InjectedScriptManager::createInjectedScript):
1553         (WebCore):
1554         (WebCore::InjectedScriptManager::injectWebGLScript):
1555         * bindings/v8/custom/V8InjectedScriptManager.cpp:
1556         (WebCore::InjectedScriptManager::injectWebGLScript):
1557         * inspector/InjectedScriptManager.cpp:
1558         (WebCore::InjectedScriptManager::wrapWebGLRenderingContextForInstrumentation):
1559         * inspector/InjectedScriptManager.h:
1560         (InjectedScriptManager):
1561         * inspector/InspectorInstrumentation.h:
1562         (InspectorInstrumentation):
1563         * inspector/InspectorWebGLAgent.cpp:
1564         (WebCore::InspectorWebGLAgent::wrapWebGLRenderingContextForInstrumentation):
1565         * inspector/InspectorWebGLAgent.h:
1566         (InspectorWebGLAgent):
1567         * inspector/InspectorWebGLInstrumentation.h:
1568         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
1569
1570 2012-06-06  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
1571
1572         Fix a few spelling mistakes in IconDatabase logging
1573
1574         Makes debugging harder if the logging is confusing.
1575
1576         Reviewed by Jocelyn Turcotte.
1577
1578         * loader/icon/IconDatabase.cpp:
1579         (WebCore::IconDatabase::notifyPendingLoadDecisions):
1580         (WebCore::IconDatabase::readFromDatabase):
1581
1582 2012-05-25  Vsevolod Vlasov  <vsevik@chromium.org>
1583
1584         Web Inspector: [Compiler] Remove compile-front-end.sh and fix InjectedScriptSource errors.
1585         https://bugs.webkit.org/show_bug.cgi?id=87512
1586
1587         Reviewed by Yury Semikhatsky.
1588
1589         Removed compile-front-end.sh, compile-front-end.py should be used instead now.
1590         Made generate_protocol_externs a python module to call it from compile-front-end.py.
1591         Temporary copy of InjectedScriptSource.js is created and modified to
1592         avoid "This code lacks side effects" warning.
1593
1594         * inspector/compile-front-end.py:
1595         * inspector/compile-front-end.sh: Removed.
1596         * inspector/generate-protocol-externs: Removed.
1597         * inspector/generate_protocol_externs.py: Added.
1598         (full_qualified_type_id):
1599         (param_type):
1600         (generate_protocol_externs):
1601
1602 2012-06-06  Zoltan Herczeg  <zherczeg@webkit.org>
1603
1604         [Qt] REGRESSION(r118616): It made all tests crash in debug mode
1605         https://bugs.webkit.org/show_bug.cgi?id=87701
1606
1607         Reviewed by Csaba Osztrogonác.
1608
1609         Replace WriteBarrier<JSObject> to Weak<JSObject> by introducing a new
1610         QtWeakObjectReference sub class. Rewrite all affected type definitions.
1611
1612         All existing test in debug mode cover this issue.
1613
1614         * bridge/qt/qt_class.cpp:
1615         (JSC::Bindings::QtClass::fallbackObject):
1616         * bridge/qt/qt_instance.cpp:
1617         (QtRuntimeObject):
1618         (JSC::Bindings::QtInstance::removeUnusedMethods):
1619         * bridge/qt/qt_instance.h:
1620         (QtInstance):
1621         (QtWeakObjectReference):
1622         (JSC::Bindings::QtInstance::QtWeakObjectReference::QtWeakObjectReference):
1623         (JSC::Bindings::QtInstance::QtWeakObjectReference::operator=):
1624         (JSC::Bindings::QtInstance::QtWeakObjectReference::get):
1625         * bridge/qt/qt_runtime.cpp:
1626         (JSC::Bindings::QtRuntimeMethodData::finalize):
1627         * bridge/qt/qt_runtime_qt4.cpp:
1628         (JSC::Bindings::QtRuntimeMethodData::finalize):
1629
1630 2012-06-06  Eugene Klyuchnikov  <eustas.bug@gmail.com>
1631
1632         Web Inspector: help/settings screen does not overlay console in split screen mode
1633         https://bugs.webkit.org/show_bug.cgi?id=88352
1634
1635         Reviewed by Pavel Feldman.
1636
1637         * inspector/front-end/HelpScreen.js:
1638         (WebInspector.HelpScreen): Mark view as root.
1639         (WebInspector.HelpScreen.prototype.showModal): Change view parent.
1640         * inspector/front-end/helpScreen.css:
1641         (.help-window-outer): Add panel and status bar indent.
1642         (body.compact .help-window-outer): Ditto.
1643
1644 2012-06-06  Yoshifumi Inoue  <yosin@chromium.org>
1645
1646         [Form] Changes for InputNumber type
1647         https://bugs.webkit.org/show_bug.cgi?id=88394
1648
1649         Reviewed by Kent Tamura.
1650
1651         This patch changes codes for consitency of InputNumber usage for
1652         reducing size of patch when we change InputNumber type alias from
1653         double to Decimal.
1654
1655         No new tests. This patch doesn't change behavior.
1656
1657         * html/BaseDateAndTimeInputType.cpp:
1658         (WebCore::BaseDateAndTimeInputType::serializeWithComponents): Fixed parameter type for getAllowedValueStep.
1659         * html/InputType.cpp:
1660         (WebCore::InputType::minimum): Fixed return value type to InputNumber.
1661         (WebCore::InputType::maximum): ditto.
1662         * html/MonthInputType.cpp:
1663         (WebCore::MonthInputType::defaultValueForStepUp): Fix return value type to InputNumber.
1664         (WebCore::MonthInputType::parseToNumber): ditto.
1665         * html/NumberInputType.cpp:
1666         (WebCore::NumberInputType::setValueAsDouble): Removed extra convertDoubleToInputNumber.
1667         * html/StepRange.cpp:
1668         (WebCore::StepRange::alignValueForStep): Use roundByStep for code sharing.
1669         (WebCore::StepRange::clampValue): ditto.
1670         (WebCore::StepRange::roundByStep): Added.
1671         * html/StepRange.h:
1672         (StepRange): Added a declaration of roundByStep.
1673
1674 2012-06-06  Michael Brüning  <michael.bruning@nokia.com>
1675
1676         [Qt] Fix harmattan builds broken by r119247.
1677         https://bugs.webkit.org/show_bug.cgi?id=88330
1678
1679         Reviewed by Jocelyn Turcotte.
1680
1681         Fix Harmattan build break caused by undefined constant
1682         GL_TEXTURE_RECTANGLE_ARB by adding defined(GL_ARB_texture_rectangle)
1683         guards around TextureMapperGL::drawTextureRectangleARB.
1684
1685         * platform/graphics/texmap/TextureMapperGL.cpp: Added defined(GL_ARB_texture_rectangle) guards around drawTextureRectangleARB.
1686         (WebCore):
1687         * platform/graphics/texmap/TextureMapperGL.h: Added definded(GL_ARB_texture_rectangle) guards around drawTextureRectangleARB.
1688
1689 2012-06-06  Shinya Kawanaka  <shinyak@chromium.org>
1690
1691         PositionIterator:;setOffsetInLeafNode() is not used anywhere.
1692         https://bugs.webkit.org/show_bug.cgi?id=88397
1693
1694         Reviewed by Ryosuke Niwa.
1695
1696         It's not used anywhere. We can remove it safely.
1697
1698         No new tests, no change in behavior.
1699
1700         * WebCore.order:
1701         * dom/PositionIterator.cpp:
1702         * dom/PositionIterator.h:
1703
1704 2012-06-06  Andrey Adaikin  <aandrey@chromium.org>
1705
1706         Web Inspector: [WebGL] Add WebGL instrumentation support on the backend
1707         https://bugs.webkit.org/show_bug.cgi?id=87960
1708
1709         Adds a WebGLAgent, injects a WebGL script upon calling the getContext
1710         method of a HTMLCanvasElement that will wrap the WebGL rendering context
1711         for instrumentation purposes.
1712
1713         Reviewed by Yury Semikhatsky.
1714
1715         * CMakeLists.txt:
1716         * DerivedSources.make:
1717         * DerivedSources.pri:
1718         * GNUmakefile.am:
1719         * GNUmakefile.list.am:
1720         * Target.pri:
1721         * WebCore.gyp/WebCore.gyp:
1722         * WebCore.gypi:
1723         * WebCore.vcproj/WebCore.vcproj:
1724         * WebCore.xcodeproj/project.pbxproj:
1725         * bindings/js/JSHTMLCanvasElementCustom.cpp:
1726         (WebCore::JSHTMLCanvasElement::getContext):
1727         (WebCore::JSHTMLCanvasElement::toDataURL):
1728         * bindings/js/JSInjectedScriptManager.cpp:
1729         (WebCore):
1730         (WebCore::InjectedScriptManager::injectWebGLScript):
1731         * bindings/v8/ScriptState.cpp:
1732         (WebCore::ScriptState::forContext):
1733         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
1734         (WebCore::V8HTMLCanvasElement::getContextCallback):
1735         * bindings/v8/custom/V8InjectedScriptManager.cpp:
1736         (WebCore::InjectedScriptManager::createInjectedScript):
1737         (WebCore):
1738         (WebCore::InjectedScriptManager::injectWebGLScript):
1739         (WebCore::InjectedScriptManager::discardInjectedScript):
1740         (WebCore::InjectedScriptManager::injectedScriptFor):
1741         * inspector/CodeGeneratorInspector.py:
1742         * inspector/InjectedScriptManager.cpp:
1743         (WebCore):
1744         (WebCore::InjectedScriptManager::wrapWebGLRenderingContextForInstrumentation):
1745         (WebCore::InjectedScriptManager::injectedWebGLScriptSource):
1746         * inspector/InjectedScriptManager.h:
1747         (InjectedScriptManager):
1748         * inspector/InjectedWebGLScriptSource.js: Added.
1749         * inspector/Inspector.json:
1750         * inspector/InspectorAllInOne.cpp:
1751         * inspector/InspectorController.cpp:
1752         (WebCore::InspectorController::InspectorController):
1753         * inspector/InspectorInstrumentation.h:
1754         (WebCore):
1755         (InspectorInstrumentation):
1756         (WebCore::InspectorInstrumentation::markResourceAsCached):
1757         * inspector/InspectorWebGLAgent.cpp: Added.
1758         (WebCore):
1759         (WebGLAgentState):
1760         (WebCore::InspectorWebGLAgent::InspectorWebGLAgent):
1761         (WebCore::InspectorWebGLAgent::~InspectorWebGLAgent):
1762         (WebCore::InspectorWebGLAgent::setFrontend):
1763         (WebCore::InspectorWebGLAgent::clearFrontend):
1764         (WebCore::InspectorWebGLAgent::restore):
1765         (WebCore::InspectorWebGLAgent::enable):
1766         (WebCore::InspectorWebGLAgent::disable):
1767         (WebCore::InspectorWebGLAgent::wrapWebGLRenderingContextForInstrumentation):
1768         * inspector/InspectorWebGLAgent.h: Added.
1769         (WebCore):
1770         (InspectorWebGLAgent):
1771         (WebCore::InspectorWebGLAgent::create):
1772         (WebCore::InspectorWebGLAgent::enabled):
1773         * inspector/InspectorWebGLInstrumentation.h: Added.
1774         (WebCore):
1775         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
1776         * inspector/InstrumentingAgents.h:
1777         (WebCore):
1778         (WebCore::InstrumentingAgents::InstrumentingAgents):
1779         (InstrumentingAgents):
1780         (WebCore::InstrumentingAgents::inspectorWebGLAgent):
1781         (WebCore::InstrumentingAgents::setInspectorWebGLAgent):
1782
1783 2012-06-06  Joone Hur  <joone.hur@intel.com>
1784
1785         [GTK] Build fix for Accelerated Compositing with OpenGL
1786         https://bugs.webkit.org/show_bug.cgi?id=88292
1787
1788         Reviewed by Martin Robinson.
1789
1790         Build fix after r119247.
1791         Do not include GraphicsSurface.h when not building
1792         with GRAPHICS_SURFACE.
1793
1794         No new tests. This is only a build fix.
1795
1796         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
1797         * platform/graphics/texmap/TextureMapperBackingStore.h:
1798         * platform/graphics/texmap/TextureMapperGL.cpp:
1799
1800 2012-06-05  Joe Thomas  <joethomas@motorola.com>
1801
1802         ASSERTION FAILED: ASSERT(!isPercentageIntrinsicSize) in RenderReplaced::computeIntrinsicRatioInformationForRenderBox
1803         https://bugs.webkit.org/show_bug.cgi?id=88197
1804
1805         Reviewed by Daniel Bates.
1806
1807         RenderSVGRoot extends RenderReplaced and it overrides the computeIntrinsicRatioInformation() 
1808         method of RenderReplaced. RenderSVGRoot::computeIntrinsicRatioInformation
1809         sets isPercentageIntrinsicSize to true while it handles width and height of percentage types.
1810         So this assertion should be fired only if intrinsicRatio is non-zero.
1811
1812         Test: svg/in-html/svg-assert-failure-percentage.html
1813
1814         * rendering/RenderReplaced.cpp:
1815         (WebCore::RenderReplaced::computeIntrinsicRatioInformationForRenderBox):
1816
1817 2012-06-05  Tony Chang  <tony@chromium.org>
1818
1819         Changing flexbox justify/alignment doesn't update their positioning
1820         https://bugs.webkit.org/show_bug.cgi?id=88366
1821
1822         Reviewed by Ojan Vafai.
1823
1824         Test: css3/flexbox/style-change.html
1825
1826         * rendering/style/RenderStyle.cpp:
1827         (WebCore::RenderStyle::diff): Since these member variables were moved
1828         out of StyleFlexibleBoxData, we have to compare them in RenderStyle::diff.
1829
1830 2012-06-05  Charles Wei  <charles.wei@torchmobile.com.cn>
1831
1832         JSC implementation of SerializedScriptValue for IndexedDB
1833         https://bugs.webkit.org/show_bug.cgi?id=88048
1834
1835         Reviewed by George Staikos.
1836
1837         No new tests. All the current indexeddb test cases apply when indexeddb works for JSC.
1838
1839         * bindings/js/SerializedScriptValue.cpp:
1840         (WebCore::CloneSerializer::serializeNumber):
1841         (CloneSerializer):
1842         (WebCore::CloneDeserializer::toWireString):
1843         (CloneDeserializer):
1844         (WebCore::SerializedScriptValue::create):
1845         (WebCore::SerializedScriptValue::toWireString):
1846         (WebCore):
1847         (WebCore::SerializedScriptValue::createFromWire):
1848         (WebCore::SerializedScriptValue::numberValue):
1849         (WebCore::SerializedScriptValue::deserialize):
1850
1851 2012-06-05  Ojan Vafai  <ojan@chromium.org>
1852
1853         Nested CSS flexbox renders incorrectly
1854         https://bugs.webkit.org/show_bug.cgi?id=87679
1855
1856         Reviewed by Julien Chaffraix.
1857
1858         If the containing block with a perpendicular writing mode has an overrideHeight,
1859         then its logical height should be based off that instead of its RenderStyle.
1860
1861         Test: css3/flexbox/perpendicular-writing-modes-inside-flex-item.html
1862
1863         * rendering/RenderBox.cpp:
1864         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
1865
1866 2012-06-05  Charles Wei  <charles.wei@torchmobile.com.cn>
1867
1868         Need special-case toJS(IDBAny) for IDBCursorWithValue
1869         https://bugs.webkit.org/show_bug.cgi?id=87963
1870
1871         Reviewed by George Staikos.
1872
1873         No new tests, this is for indexedDB, which is not working for JSC binding.
1874         When indexedDB working for JSC, all the indexdb test cases should apply.
1875
1876         * bindings/js/JSIDBAnyCustom.cpp:
1877         (WebCore::toJS):
1878
1879 2012-06-05  Michal Mocny  <mmocny@google.com>
1880
1881         [chromium] Set default memory allocation limit bytes when GL_CHROMIUM_gpu_memory_manager is not supported by graphics context.
1882         https://bugs.webkit.org/show_bug.cgi?id=87996
1883
1884         Reviewed by James Robinson.
1885
1886         Soon we hope to have renderers not manage there own memory allocation limits, and rely exclusively on the
1887         allocation given by GpuMemoryManager.  However, when the graphics context does not support the
1888         GL_CHROMIUM_gpu_memory_manager extension, such as the one used by DumpRenderTree, we must default the
1889         memory allocation limit to some non-0 value.
1890
1891         * platform/graphics/chromium/LayerRendererChromium.cpp:
1892         (WebCore::LayerRendererChromium::initialize):
1893         * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
1894         (WebCore::CCSingleThreadProxy::postSetContentsMemoryAllocationLimitBytesToMainThreadOnImplThread):
1895         * platform/graphics/chromium/cc/CCSingleThreadProxy.h:
1896         (WebCore):
1897         (DebugScopedSetMainThreadFromEither):
1898         (WebCore::DebugScopedSetMainThreadFromEither::DebugScopedSetMainThreadFromEither):
1899         (WebCore::DebugScopedSetMainThreadFromEither::~DebugScopedSetMainThreadFromEither):
1900
1901 2012-06-05  Roland Takacs  <takacs.roland@stud.u-szeged.hu>
1902
1903         [Qt] Use GraphicsContext3DOpenGLES.cpp when using OpenGL ES
1904         https://bugs.webkit.org/show_bug.cgi?id=78720
1905
1906         Reviewed by Noam Rosenthal.
1907
1908         Functions are removed from GraphicsContext3DQt that already implemented
1909         in GraphicsContext3DCommon. Macros that not supported at GLES have been
1910         changed to their appropriate pair that found in GraphicsContext3D
1911         (e.g. GL_FRAMEBUFFER_EXT to GraphicsContext3D::FRAMEBUFFER).
1912         It was needed because OpenGLES does not support these macros.
1913         Extensions3DQt is removed beceause it has never been used.
1914         Some functions have been moved fron GraphicsContext3DCommon to *OpenGL
1915         and *OpenGLES to provide specialization.
1916         The "m_depthStencilBuffer" member is added to Qt port because it uses
1917         "m_depthStencilBuffer" like the other platforms.
1918
1919         * Target.pri:
1920         * platform/graphics/GraphicsContext3D.h:
1921         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1922         (WebCore::GraphicsContext3D::depthRange):
1923         (WebCore):
1924         (WebCore::GraphicsContext3D::clearDepth):
1925         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1926         (WebCore::GraphicsContext3D::prepareTexture):
1927         (WebCore::GraphicsContext3D::readRenderingResults):
1928         (WebCore::GraphicsContext3D::reshape):
1929         (WebCore::GraphicsContext3D::copyTexImage2D):
1930         (WebCore::GraphicsContext3D::copyTexSubImage2D):
1931         (WebCore::GraphicsContext3D::readPixels):
1932         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1933         (WebCore::GraphicsContext3D::reshapeFBOs):
1934         (WebCore::GraphicsContext3D::depthRange):
1935         (WebCore):
1936         (WebCore::GraphicsContext3D::clearDepth):
1937         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1938         (WebCore::GraphicsContext3D::isGLES2Compliant):
1939         (WebCore::GraphicsContext3DPrivate::blitMultisampleFramebuffer):
1940         (WebCore::GraphicsContext3D::GraphicsContext3D):
1941         (WebCore::GraphicsContext3D::~GraphicsContext3D):
1942         (WebCore):
1943
1944 2012-06-05  Vitaly Buka  <vitalybuka@chromium.org>
1945
1946         Special layout handler should be done on top frame being printed.
1947         https://bugs.webkit.org/show_bug.cgi?id=88201
1948
1949         Reviewed by Brady Eidson.
1950
1951         No new tests. Root case is already covered by tests.
1952         Case described in the issue can be reproduced only by direct call
1953         to Frame::setPrinting of subframe. Probably it's not possible with
1954         layout tests.
1955
1956         * page/Frame.cpp:
1957         (WebCore::Frame::setPrinting):
1958         Use shouldUsePrintingLayout to choose proper version of forceLayout().
1959         (WebCore::Frame::shouldUsePrintingLayout):
1960         Checks if current frame is the top frame being printed.
1961         * rendering/RenderView.cpp:
1962         (WebCore::RenderView::shouldUsePrintingLayout): Forward to Frame.
1963
1964 2012-06-05  Max Feil  <mfeil@rim.com>
1965
1966         [BlackBerry] Conditionally enlarge HTML5 video controls in fullscreen mode
1967         https://bugs.webkit.org/show_bug.cgi?id=87551
1968
1969         Reviewed by Antonio Gomes.
1970
1971         Changes to make media controls larger in fullscreen mode. The
1972         BlackBerry media controls used to be sized by a combination
1973         of CSS styles specified in mediaControlsBlackBerry.css and
1974         hard coded constants in RenderThemeBlackBerry.cpp. This patch
1975         moves all the dimensional sizes to a common location, i.e.
1976         RenderThemeBlackBerry.cpp. Having all the logic in C++ code allows
1977         more complex decision making for when and how much to enlarge the
1978         media controls. Currently the controls are enlarged by a factor
1979         of 2 if the document is in fullscreen mode, the video element
1980         is the current fullscreen element, and the deviceScaleFactor of
1981         the page is less than 2.0. This avoids overly large controls
1982         on pages which are already at least doubling the size of the
1983         controls via viewport meta tag device-width settings. In other
1984         words, if the CSS pixels are already enlarged compared to device
1985         pixels by a factor of at least 2 in length and width.
1986
1987         In order to accomplish this, I had to add a new Element* parameter
1988         to RenderTheme::adjustSliderThumbSize(). This is needed so
1989         that fullscreen mode can be checked and the deviceScaleFactor
1990         retrieved. I feel that this does not have a big impact on the
1991         code and the other ports, for which I will simply be adding the
1992         additional parameter in their platform code.
1993
1994         Tests:
1995         video-controls-enlarged-fullscreen-meta.html
1996         video-controls-enlarged-fullscreen-nometa.html
1997
1998         * css/mediaControlsBlackBerry.css:
1999         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
2000         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
2001         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
2002         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
2003         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
2004         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
2005         (audio::-webkit-media-controls-fullscreen-button, video::-webkit-media-controls-fullscreen-button):
2006         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
2007         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
2008         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
2009         * html/shadow/SliderThumbElement.cpp:
2010         (WebCore::RenderSliderThumb::updateAppearance):
2011         * platform/blackberry/RenderThemeBlackBerry.cpp:
2012         (WebCore):
2013         (WebCore::determineRenderSlider):
2014         (WebCore::determineFullScreenMultiplier):
2015         (WebCore::RenderThemeBlackBerry::adjustSliderThumbSize):
2016         (WebCore::RenderThemeBlackBerry::adjustMediaControlStyle):
2017         (WebCore::RenderThemeBlackBerry::adjustSliderTrackStyle):
2018         (WebCore::RenderThemeBlackBerry::paintMediaSliderTrack):
2019         (WebCore::RenderThemeBlackBerry::paintMediaSliderThumb):
2020         * platform/blackberry/RenderThemeBlackBerry.h:
2021         (RenderThemeBlackBerry):
2022         * platform/efl/RenderThemeEfl.cpp:
2023         (WebCore::RenderThemeEfl::adjustSliderThumbSize):
2024         * platform/efl/RenderThemeEfl.h:
2025         (RenderThemeEfl):
2026         * platform/gtk/RenderThemeGtk.h:
2027         * platform/gtk/RenderThemeGtk2.cpp:
2028         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
2029         * platform/gtk/RenderThemeGtk3.cpp:
2030         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
2031         * platform/qt/RenderThemeQt.cpp:
2032         (WebCore::RenderThemeQt::adjustSliderThumbSize):
2033         * platform/qt/RenderThemeQt.h:
2034         (RenderThemeQt):
2035         * platform/qt/RenderThemeQtMobile.cpp:
2036         (WebCore::RenderThemeQtMobile::adjustSliderThumbSize):
2037         * platform/qt/RenderThemeQtMobile.h:
2038         (RenderThemeQtMobile):
2039         * rendering/RenderThemeChromiumLinux.cpp:
2040         (WebCore::RenderThemeChromiumLinux::adjustSliderThumbSize):
2041         * rendering/RenderThemeChromiumLinux.h:
2042         (RenderThemeChromiumLinux):
2043         * rendering/RenderThemeChromiumSkia.cpp:
2044         (WebCore::RenderThemeChromiumSkia::adjustSliderThumbSize):
2045         * rendering/RenderThemeChromiumSkia.h:
2046         (RenderThemeChromiumSkia):
2047         * rendering/RenderThemeChromiumWin.cpp:
2048         (WebCore):
2049         (WebCore::RenderThemeChromiumWin::adjustSliderThumbSize):
2050         * rendering/RenderThemeChromiumWin.h:
2051         (RenderThemeChromiumWin):
2052         * rendering/RenderThemeMac.h:
2053         (RenderThemeMac):
2054         * rendering/RenderThemeSafari.cpp:
2055         (WebCore::RenderThemeSafari::adjustSliderThumbSize):
2056         * rendering/RenderThemeSafari.h:
2057         (RenderThemeSafari):
2058         * rendering/RenderThemeWin.cpp:
2059         (WebCore::RenderThemeWin::adjustSliderThumbSize):
2060         * rendering/RenderThemeWin.h:
2061         (RenderThemeWin):
2062         * rendering/RenderThemeWinCE.cpp:
2063         (WebCore::RenderThemeWinCE::adjustSliderThumbSize):
2064         * rendering/RenderThemeWinCE.h:
2065         (RenderThemeWinCE):
2066         * rendering/RenderTheme.cpp:
2067         (WebCore::RenderTheme::adjustStyle):
2068         (WebCore::RenderTheme::adjustMediaControlStyle):
2069         (WebCore):
2070         (WebCore::RenderTheme::adjustSliderThumbStyle):
2071         (WebCore::RenderTheme::adjustSliderThumbSize):
2072         * rendering/RenderTheme.h:
2073         (RenderTheme):
2074
2075 2012-06-05  Stephanie Lewis  <slewis@apple.com>
2076
2077         https://bugs.webkit.org/show_bug.cgi?id=88370
2078         Memory sampler should trigger low memory signal
2079
2080         Reviewed by Geoff Garen.
2081
2082         No new tests. Verify by running stress test which crashes 
2083         in a few minutes without the fix.
2084
2085         Fix assumption in block code.  We could get in a state where timer_event_source
2086         had already been released before the block ran.
2087
2088         * platform/mac/MemoryPressureHandlerMac.mm:
2089         (WebCore::MemoryPressureHandler::holdOff):
2090
2091 2012-06-05  Yoshifumi Inoue  <yosin@chromium.org>
2092
2093         [Forms] Introduce InputNumber type as an alias of double for replacing it to Decimal
2094         https://bugs.webkit.org/show_bug.cgi?id=88275
2095
2096         Reviewed by Kent Tamura.
2097
2098         This patch introduced InputNumber type as alias of double to be
2099         replaced to Decimal and convertDoubleToInputNumber and 
2100         convertToInputNumberToDouble for reducing size of patch when we
2101         introduce Decimal type.
2102
2103         This patch added new vairables to use const variable to reduce
2104         copy operation when introducing Decimal type.
2105
2106         In the implementation, we use InputNumber, will be Decimal, however some methods in IDL
2107         use double. To clarify internal usage of value and external usage, thit patch renamed
2108         following functions:
2109
2110         - parseToDouble => parseNumber
2111         - setValueAsNumber => setValueAsDouble and setValueAsInputNumber
2112         - valueAsNumber => valueAsDouble
2113
2114         This patch is a part of introducing Decimal, https://bugs.webkit.org/show_bug.cgi?id=80009
2115
2116         No new tests. This patch doesn't change behavior.
2117
2118         * html/BaseDateAndTimeInputType.cpp:
2119         (WebCore::BaseDateAndTimeInputType::valueAsDate): Replaced parseToNumber() to valueAsDouble()
2120         (WebCore::BaseDateAndTimeInputType::setValueAsDate): Inserted convertDoubleToInputNumber.
2121         (WebCore::BaseDateAndTimeInputType::valueAsDouble): Use new function parseToDouble().
2122         (WebCore::BaseDateAndTimeInputType::setValueAsInputNumber): Added.
2123         (WebCore::BaseDateAndTimeInputType::defaultValueForStepUp): Changed return type to InputNumber.
2124         (WebCore::BaseDateAndTimeInputType::parseToNumber): This is replacement of parseToDouble().
2125         (WebCore::BaseDateAndTimeInputType::parseToDouble): Added for valueAsDate and valueAsDouble.
2126         (WebCore::BaseDateAndTimeInputType::serialize): Changed parameter type to InputNumber.
2127         (WebCore::BaseDateAndTimeInputType::serializeWithComponents): Replace double to InputNumber for getAllowdStep.
2128         * html/BaseDateAndTimeInputType.h:
2129         (BaseDateAndTimeInputType):
2130         * html/DateInputType.cpp:
2131         (WebCore::DateInputType::createStepRange): Replaced double to InputNumber.
2132         * html/DateInputType.h:
2133         (DateInputType):
2134         * html/DateTimeInputType.cpp:
2135         (WebCore::DateTimeInputType::defaultValueForStepUp): Changed return type to InputNumber.
2136         (WebCore::DateTimeInputType::createStepRange): Replaced double to InputNumber.
2137         * html/DateTimeInputType.h:
2138         (DateTimeInputType):
2139         * html/DateTimeLocalInputType.cpp:
2140         (WebCore::DateTimeLocalInputType::createStepRange): Replaced double to InputNumber.
2141         * html/DateTimeLocalInputType.h:
2142         (DateTimeLocalInputType):
2143         * html/HTMLInputElement.cpp:
2144         (WebCore::HTMLInputElement::getAllowedValueStep): Changed parameter type to InputNumber.
2145         (WebCore::HTMLInputElement::valueAsNumber): Use InputType::valueAsDouble.
2146         (WebCore::HTMLInputElement::setValueAsNumber): Use InputType::valueAsDouble.
2147         * html/HTMLInputElement.h:
2148         (HTMLInputElement):
2149         * html/InputType.cpp:
2150         (WebCore::InputType::valueAsDouble): Replacement of valueAsNumber.
2151         (WebCore::InputType::setValueAsDouble): Replacement of valueAsNumber.
2152         (WebCore::InputType::setValueAsInputNumber): Replacement of valueAsNumber.
2153         (WebCore::InputType::rangeUnderflow): Replaced double to InputNumber.
2154         (WebCore::InputType::rangeOverflow): Replaced double to InputNumber.
2155         (WebCore::InputType::defaultValueForStepUp): Changed return type to InputNumber.
2156         (WebCore::InputType::isInRange): Replaced double to InputNumber.
2157         (WebCore::InputType::isOutOfRange): Replaced double to InputNumber.
2158         (WebCore::InputType::stepMismatch): Replaced double to InputNumber.
2159         (WebCore::InputType::validationMessage): Replaced double to InputNumber.
2160         (WebCore::InputType::parseToNumber): Replacement of parseToDouble.
2161         (WebCore::InputType::parseToNumberOrNaN): Added for reducing number of std::numeric_limits<double>::quiet_NaN().
2162         (WebCore::InputType::parseToNumberWithDecimalPlaces): Replaced double to InputNumber.
2163         (WebCore::InputType::serialize): Changed parameter type to InputNumber.
2164         (WebCore::InputType::applyStep): Replaced double to InputNumber.
2165         (WebCore::InputType::getAllowedValueStep): Changed parameter type to InputNumber.
2166         (WebCore::InputType::stepUpFromRenderer): Replaced double to InputNumber.
2167         * html/InputType.h:
2168         (InputType):
2169         * html/MonthInputType.cpp:
2170         (WebCore::MonthInputType::defaultValueForStepUp): Changed return type to InputNumber.
2171         (WebCore::MonthInputType::createStepRange): Replaced double to InputNumber.
2172         (WebCore::MonthInputType::parseToNumber): Replacement of parseToDouble.
2173         * html/MonthInputType.h:
2174         (MonthInputType):
2175         * html/NumberInputType.cpp:
2176         (WebCore::NumberInputType::valueAsDouble): Replacement of valueAsNumber. Changed to use parseToDoubleForNumberType.
2177         (WebCore::NumberInputType::setValueAsDouble):  Replacement of setValueAsNumber.  Changed to use serializeForNumberType.
2178         (WebCore::NumberInputType::setValueAsInputNumber): Replacement of setValueAsNumber.
2179         (WebCore::NumberInputType::createStepRange): Replaced double to InputNumber.
2180         (WebCore::NumberInputType::parseToNumber): Replacement of parseToDouble.
2181         (WebCore::NumberInputType::parseToNumberWithDecimalPlaces): Replaced double to InputNumber.
2182         (WebCore::NumberInputType::serialize):
2183         * html/NumberInputType.h:
2184         (NumberInputType):
2185         * html/RangeInputType.cpp:
2186         (WebCore::ensureMaximum): Replaced double to InputNumber.
2187         (WebCore::RangeInputType::valueAsDouble): Replacement of valueAsNumber.
2188         (WebCore::RangeInputType::setValueAsInputNumber):  Replacement of setValueAsNumber.
2189         (WebCore::RangeInputType::createStepRange): Replaced double to InputNumber.
2190         (WebCore::RangeInputType::handleKeydownEvent): Replaced double to InputNumber.
2191         (WebCore::RangeInputType::parseToNumber): Replacement of parseToDouble.
2192         (WebCore::RangeInputType::serialize): Changed parameter type to InputNumber.
2193         (WebCore::RangeInputType::sanitizeValue): Replaced double to InputNumber.
2194         * html/RangeInputType.h:
2195         (RangeInputType):
2196         * html/StepRange.cpp:
2197         (WebCore::StepRange::StepRange): Replaced double to InputNumber.
2198         (WebCore::StepRange::acceptableError): Replaced double to InputNumber.
2199         (WebCore::StepRange::alignValueForStep): Replaced double to InputNumber.
2200         (WebCore):
2201         (WebCore::StepRange::clampValue): Replaced double to InputNumber.
2202         (WebCore::StepRange::stepMismatch): Replaced double to InputNumber.
2203         * html/StepRange.h:
2204         (WebCore::convertDoubleToInputNumber): Added.
2205         (WebCore::convertInputNumberToDouble): Added.
2206         (WebCore::StepRange::NumberWithDecimalPlaces::NumberWithDecimalPlaces): Replaced double to InputNumber.
2207         (WebCore::StepRange::StepDescription::defaultValue): Replaced double to InputNumber.
2208         (StepRange):
2209         (WebCore::StepRange::maximum): Replaced double to InputNumber.
2210         (WebCore::StepRange::minimum): Replaced double to InputNumber.
2211         (WebCore::StepRange::step): Replaced double to InputNumber.
2212         (WebCore::StepRange::stepBase): Replaced double to InputNumber.
2213         (WebCore::StepRange::defaultValue): Replaced double to InputNumber.
2214         (WebCore::StepRange::proportionFromValue): Replaced double to InputNumber.
2215         (WebCore::StepRange::valueFromProportion): Replaced double to InputNumber.
2216         * html/TimeInputType.cpp:
2217         (WebCore::TimeInputType::defaultValueForStepUp): Replaced double to InputNumber.
2218         (WebCore::TimeInputType::createStepRange): Replaced double to InputNumber.
2219         * html/TimeInputType.h:
2220         (TimeInputType):
2221         * html/WeekInputType.cpp:
2222         (WebCore::WeekInputType::createStepRange): Replaced double to InputNumber.
2223         * html/WeekInputType.h:
2224         (WeekInputType):
2225         * html/shadow/CalendarPickerElement.cpp:
2226         (WebCore::CalendarPickerElement::writeDocument): Replaced double to InputNumber.
2227         * html/shadow/SliderThumbElement.cpp:
2228         (WebCore::sliderPosition): Replaced double to InputNumber.
2229         (WebCore::RenderSliderThumb::layout): Replaced double to InputNumber.
2230         (WebCore::SliderThumbElement::setPositionFromPoint): Replaced double to InputNumber.
2231
2232 2012-06-05  Ryosuke Niwa  <rniwa@webkit.org>
2233
2234         Build fix after r119527.
2235
2236         * dom/ViewportArguments.cpp:
2237         (WebCore::computeViewportAttributes):
2238
2239 2012-06-05  Martin Robinson  <mrobinson@igalia.com>
2240
2241         [Cairo] [OpenGL] Enable GL_OES_standard_derivatives
2242         https://bugs.webkit.org/show_bug.cgi?id=87583
2243
2244         Reviewed by Alejandro G. Castro.
2245
2246         No new tests. This is covered by oes-standard-derivatives.html
2247         in the Khronos WebGL conformance tests, which may one day be part
2248         of the WebKit test suite.
2249
2250         Activate the GL_OES_standard_derivatives on Cairo along with
2251         Qt and Mac.
2252
2253         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2254         (WebCore::Extensions3DOpenGL::ensureEnabled):
2255         (WebCore::Extensions3DOpenGL::isEnabled):
2256
2257 2012-06-05  Simon Fraser  <simon.fraser@apple.com>
2258
2259         Avoid creating compositing layers for preserve-3d without transformed descendants
2260         https://bugs.webkit.org/show_bug.cgi?id=88115
2261
2262         Reviewed by Antti Koivisto.
2263         
2264         Avoid creating compositing layers, and therefore using excess backing store,
2265         for elements that have -webkit-transform-style: preserve-3d, but no 3D-transformed
2266         descendants that would be affected by that preserve-3d.
2267         
2268         Test: compositing/layer-creation/no-compositing-for-preserve-3d.html
2269
2270         * rendering/RenderLayer.h: Replace the "mustOverlap" flag with a enum
2271         that describes the different reasons for indirect compositing, so that
2272         we can use that information to decide whether to allocate backing store.
2273         (WebCore::RenderLayer::setIndirectCompositingReason):
2274         (WebCore::RenderLayer::indirectCompositingReason):
2275         (WebCore::RenderLayer::mustCompositeForIndirectReasons):
2276         * rendering/RenderLayer.cpp:
2277         (WebCore::RenderLayer::RenderLayer): Initialize m_indirectCompositingReason
2278
2279         * rendering/RenderLayerCompositor.h: New out param for computeCompositingRequirements()
2280         that is uses to indicate that a 3d-transformed descendant has been encountered.
2281         Rename requiresCompositingWhenDescendantsAreCompositing() to requiresCompositingForIndirectReason(),
2282         and return the reason as an out param.
2283         
2284         * rendering/RenderLayerCompositor.cpp:
2285         (WebCore::RenderLayerCompositor::updateCompositingLayers): Pass in the saw3DTransform
2286         param to computeCompositingRequirements().
2287         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Return a flag
2288         from computeCompositingRequirements() that is set to true if we've seen descendants
2289         that have 3d transforms. This is later used to decide whether to composite for
2290         perspective or preserve-3d.
2291         Change the "mustOverlapCompositedLayers" code to use the new "indirect compositing"
2292         enum flags.
2293         After enumerating children, call requiresCompositingForIndirectReason() and 
2294         record the reason in the layer.
2295         (WebCore::RenderLayerCompositor::needsToBeComposited): Use mustCompositeForIndirectReasons() now.
2296         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Consult the indirect compositing
2297         reason rather than just looking for the overlap flag.
2298         (WebCore::RenderLayerCompositor::reasonForCompositing): Now that we have more information
2299         about indirect compositing reasons, the logging can be more detailed.
2300         (WebCore::RenderLayerCompositor::requiresCompositingForTransform): This now only looks
2301         for 3d transforms. We now treat perspective and perserve-3d as "indirect" reasons, because
2302         whether they composite depends on descendants having non-affine transforms.
2303         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason): Includes the logic
2304         previously in requiresCompositingWhenDescendantsAreCompositing(), and now determines
2305         whether to composite for preserve-3d and perspective, based on whether we have transformed descendants.
2306
2307 2012-06-05  Levi Weintraub  <leviw@chromium.org>
2308
2309         Block selection gaps painted not properly pixel snapped
2310         https://bugs.webkit.org/show_bug.cgi?id=88000
2311
2312         Reviewed by Ryosuke Niwa.
2313
2314         Fixes for selection painting in both inline line heights and block gaps. We were unintentionally
2315         flooring inline and block offsets in RenderBlock, but actually need to intentionally floor the
2316         logical left and right values in logical(Left|Right)SelectionGap to properly align our block
2317         selection gaps. This is to properly mirror the behavior in pixelSnappedLogicalRightOffsetForLine.
2318
2319         We were also unintentionally upcasting LayoutUnits to floats in InlineTextBox's selection painting
2320         routine. Now we're properly rounding.
2321
2322         Test: fast/sub-pixel/selection/selection-gaps-at-fractional-offsets.html
2323
2324         * rendering/InlineTextBox.cpp:
2325         (WebCore::InlineTextBox::paintSelection): Move paint values to integers and do proper rounding.
2326         * rendering/RenderBlock.cpp:
2327         (WebCore::blockDirectionOffset): Fix incorrect flooring in return value.
2328         (WebCore::inlineDirectionOffset): Ditto.
2329         (WebCore): Removing previous attempt to properly mirror inline box selection pixel alignment. This
2330         implementation rounded the final x value instead of properly rounding our block offset then flooring
2331         the offset that corresponds to the behavior in InlineTextBox. It also didn't properly pixel snap
2332         the y offset and height.
2333         (WebCore::RenderBlock::blockSelectionGap): Properly pixel snapping the gap rect before painting.
2334         (WebCore::RenderBlock::logicalLeftSelectionGap): Correctly match InlineTextBox's selection pixel
2335         alignment by flooring the logicalLeft and pixel snapping the subsequent rect. We do this in order
2336         to maintain proper render tree pixel snapping while simultaneously mirroring the flooring in the
2337         inline direction that occurs in InlineTextBox.cpp's alignSelectionRectToDevicePixels method.
2338         (WebCore::RenderBlock::logicalRightSelectionGap): Ditto with the right.
2339
2340 2012-06-05  Adam Barth  <abarth@webkit.org>
2341
2342         Remove support for target-densitydpi in the viewport meta tag
2343         https://bugs.webkit.org/show_bug.cgi?id=88047
2344
2345         Reviewed by Kenneth Rohde Christiansen.
2346
2347         The target-densitydpi parameter was originally implemented on Android,
2348         but it does not appear to be widely used and introduces significant
2349         implementation complexity because it forces us to track three scale
2350         factors (defaultDeviceScaleFactor, deviceScaleFactor, and
2351         pageScaleFactor) rather than just two (deviceScaleFactor and
2352         pageScaleFactor).
2353
2354         There don't appear to be many web sites that use target-densitydpi
2355         because it is not supported on iOS.  There are also concerns from the
2356         standards community about the design of the feature.  It seems our best
2357         course of action is to remove target-densitydpi and address these use
2358         cases via other mechanisms, such as responsive images and device units
2359         in CSS because those approaches are likely to be implemented broadly.
2360
2361         * dom/ViewportArguments.cpp:
2362         (WebCore::computeViewportAttributes):
2363         (WebCore):
2364         (WebCore::setViewportFeature):
2365         (WebCore::viewportErrorMessageTemplate):
2366         (WebCore::viewportErrorMessageLevel):
2367         * dom/ViewportArguments.h:
2368         (WebCore::ViewportArguments::ViewportArguments):
2369         (ViewportArguments):
2370         (WebCore::ViewportArguments::operator==):
2371
2372 2012-06-05  Erik Arvidsson  <arv@chromium.org>
2373
2374         [V8] Improve variable resolution order on window
2375         https://bugs.webkit.org/show_bug.cgi?id=84247
2376
2377         Reviewed by Ojan Vafai.
2378
2379         This changes the V8 flag to turn on es52_globals and updates the layout tests to reflect the fixed behavior.
2380
2381         Test: fast/dom/Window/window-property-shadowing-onclick.html
2382
2383         * bindings/v8/V8DOMWindowShell.cpp:
2384         (WebCore::V8DOMWindowShell::initContextIfNeeded): Set the flag as we initialize V8.
2385         * bindings/v8/WorkerContextExecutionProxy.cpp:
2386         (WebCore::WorkerContextExecutionProxy::initIsolate): Ditto.
2387
2388 2012-06-05  Ojan Vafai  <ojan@chromium.org>
2389
2390         Delete dead code from RenderBox::computeLogicalWidthInRegion
2391         https://bugs.webkit.org/show_bug.cgi?id=88353
2392
2393         Reviewed by Tony Chang.
2394
2395         No new tests obviously since this is dead code.
2396
2397         * rendering/RenderBox.cpp:
2398         (WebCore::RenderBox::computeLogicalWidthInRegion):
2399
2400 2012-06-05  Greg Billock  <gbillock@google.com>
2401
2402         New constructor for WebIntent to be used for delivery
2403         https://bugs.webkit.org/show_bug.cgi?id=87143
2404
2405         Reviewed by Darin Fisher.
2406
2407         * Modules/intents/Intent.cpp:
2408         (WebCore::Intent::setExtras):
2409         (WebCore):
2410         * Modules/intents/Intent.h:
2411         (Intent):
2412
2413 2012-06-01  Ojan Vafai  <ojan@chromium.org>
2414
2415         Change overrideSizes to be content-box instead of border-box
2416         https://bugs.webkit.org/show_bug.cgi?id=88116
2417
2418         Reviewed by Tony Chang.
2419
2420         Previously, the code used border-box everywhere except for one place
2421         where it used content-box when setting the override size. Conversely,
2422         it subtracted the borderAndPaddingSize everywhere it grabbed the override
2423         size except for one.
2424
2425         Instead, make the override size override the content-box size.
2426         Converging on using the border-box size would be tricky given RenderTableCell's
2427         tricky management of intrinsic padding.
2428
2429         There is no behavior change except in RenderBox::availableLogicalHeightUsing,
2430         which fixes a table test.
2431
2432         * rendering/RenderBox.cpp:
2433         (WebCore::RenderBox::setOverrideLogicalContentHeight):
2434         (WebCore::RenderBox::setOverrideLogicalContentWidth):
2435         (WebCore::RenderBox::overrideLogicalContentWidth):
2436         (WebCore::RenderBox::overrideLogicalContentHeight):
2437         (WebCore::RenderBox::computeLogicalWidthInRegion):
2438         (WebCore::RenderBox::computeLogicalHeight):
2439         (WebCore::RenderBox::computePercentageLogicalHeight):
2440         (WebCore::RenderBox::availableLogicalHeightUsing):
2441         We were incorrectly subtracting the borderAndPaddingLogicalWidth instead
2442         of the borderAndPaddingLogicalHeight.
2443
2444         * rendering/RenderBox.h:
2445         (RenderBox):
2446         * rendering/RenderDeprecatedFlexibleBox.cpp:
2447         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2448         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2449         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
2450         (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
2451         * rendering/RenderFlexibleBox.cpp:
2452         (WebCore::RenderFlexibleBox::computeAvailableFreeSpace):
2453         (WebCore::RenderFlexibleBox::setLogicalOverrideSize):
2454         (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
2455         * rendering/RenderTableCell.cpp:
2456         (WebCore::RenderTableCell::setOverrideHeightFromRowHeight):
2457
2458 2012-06-05  Andy Estes  <aestes@apple.com>
2459
2460         REGRESSION (r118197): PluginStrategy should be used even if ENABLE(NETSCAPE_PLUGIN_API) is false
2461         https://bugs.webkit.org/show_bug.cgi?id=88296
2462
2463         Reviewed by Dan Bernstein.
2464
2465         refresh() and initPlugins() should call into PluginStrategy even if
2466         ENABLE(NETSCAPE_PLUGIN_API) is false. Some ports support non-Netscape
2467         plug-ins, so PluginStrategy should be consulted even if Netscape
2468         plug-ins specifically are disabled.
2469
2470         Ports that support platform strategies but not Netscape plug-ins should
2471         handle this inside their PluginStrategy rather than modifying generic
2472         plug-in code.
2473
2474         * plugins/PluginData.cpp:
2475         (WebCore::PluginData::refresh):
2476         (WebCore::PluginData::initPlugins):
2477
2478 2012-06-05  Douglas Stockwell  <dstockwell@chromium.org>
2479
2480         Crash when modifying fixed-position elements in a detached frame
2481         https://bugs.webkit.org/show_bug.cgi?id=88288
2482
2483         Reviewed by James Robinson.
2484
2485         Test: fast/block/positioning/fixed-position-detached-frame.html
2486
2487         * css/StyleResolver.cpp:
2488         (WebCore::StyleResolver::collectMatchingRulesForList):
2489
2490 2012-06-05  Andrey Kosyakov  <caseq@chromium.org>
2491
2492         Web Inspector: render timeline paint category dark green
2493         https://bugs.webkit.org/show_bug.cgi?id=88333
2494
2495         Reviewed by Pavel Feldman.
2496
2497         - Added a new, dark-green color for timeline events.
2498
2499         * WebCore.gypi: Added timelineBarDarkGreen.png
2500         * inspector/front-end/Images/timelineBarDarkGreen.png: Added.
2501         * inspector/front-end/Images/timelineCheckmarks.png: Added a dark-green checkbox.
2502         * inspector/front-end/Images/timelineDots.png: Added a dark-green dot.
2503         * inspector/front-end/TimelinePresentationModel.js:
2504         (WebInspector.TimelinePresentationModel.categories):
2505         * inspector/front-end/WebKit.qrc: Added timelineBarDarkGreen.png.
2506         * inspector/front-end/timelinePanel.css:
2507         (.timeline-category-statusbar-item.timeline-category-painting .timeline-category-checkbox):
2508         (.timeline-category-painting .timeline-graph-bar):
2509         (.popover .timeline-painting):
2510         (.timeline-category-painting .timeline-tree-icon):
2511
2512 2012-06-05  Alexei Filippov  <alexeif@chromium.org>
2513
2514         Web Inspector: serialize edge counts instead of indexes in heap snapshot
2515         https://bugs.webkit.org/show_bug.cgi?id=88324
2516
2517         The serialized node structure currently holds an index
2518         of its first containment edge in the edges array.
2519         The index can be quite big (up to 7 digits for large snapshots).
2520         The patch changes the serialization format to pass
2521         node containment edge count instead. For most nodes the count
2522         is just a single digit number.
2523         This reduces serialized snapshot size and therefore its transfer time.
2524
2525         Reviewed by Yury Semikhatsky.
2526
2527         * inspector/front-end/HeapSnapshot.js:
2528         (WebInspector.HeapSnapshotNode.prototype._edgeIndexesStart):
2529         (WebInspector.HeapSnapshotNode.prototype._edgeIndexesEnd):
2530         (WebInspector.HeapSnapshotNode.prototype._ordinal):
2531         (WebInspector.HeapSnapshotNodeIterator):
2532         (WebInspector.HeapSnapshot.prototype._init):
2533         (WebInspector.HeapSnapshot.prototype._buildEdgeIndexes):
2534         (WebInspector.HeapSnapshot.prototype._buildRetainers):
2535         (WebInspector.HeapSnapshot.prototype._bfs):
2536         (WebInspector.HeapSnapshot.prototype._buildAggregates):
2537         (WebInspector.HeapSnapshot.prototype._buildPostOrderIndex):
2538         (WebInspector.HeapSnapshot.prototype._buildDominatorTree):
2539         (WebInspector.HeapSnapshot.prototype._markPageOwnedNodes):
2540         (WebInspector.HeapSnapshot.prototype._markQueriableHeapObjects):
2541
2542 2012-06-05  Arpita Bahuguna  <arpitabahuguna@gmail.com>
2543
2544         CSS 2.1 failure: border-conflict-element-021a
2545         https://bugs.webkit.org/show_bug.cgi?id=86885
2546
2547         Reviewed by Julien Chaffraix.
2548
2549         When two adjacent table row groups (thead, tbody, tfoot) have the same border-width
2550         and the same border-style in a 'border-collapse: collapse' table the color of the border
2551         from the top-most table row wins.
2552
2553         Tests: fast/table/border-collapsing/adjacent-row-groups-multi.html
2554                fast/table/border-collapsing/adjacent-row-groups.html
2555
2556         * rendering/RenderTable.cpp:
2557         (WebCore::RenderTable::paintObject):
2558         Currently each row group is sent for paint from top (firstChild) to bottom thereby causing
2559         the borders of the bottom-most row group (which is painted last) to overlap over the
2560         previous row-group. This breaks the precedence for collapsed borders between adjacent cells.
2561
2562         This fix thus reverses the order in which the row-groups/sections are passed for painting.
2563         Additional change has been done to iterate over the RenderTableSections directly.
2564
2565         (WebCore):
2566         (WebCore::RenderTable::bottomSection):
2567         * rendering/RenderTable.h:
2568         New function has been added to obtain the last section of the table.
2569
2570         (RenderTable):
2571         * rendering/RenderTableSection.h:
2572         (RenderTableSection):
2573         RenderTableSection's paint() method has now been made public so as to make it accessible
2574         from RenderTable.
2575
2576 2012-06-05  Csaba Osztrogonác  <ossy@webkit.org>
2577
2578         [Qt][Win] Fix IDL dependency generation
2579         https://bugs.webkit.org/show_bug.cgi?id=88304
2580
2581         Reviewed by Tor Arne Vestbø.
2582
2583         * DerivedSources.pri:
2584
2585 2012-06-05  Sheriff Bot  <webkit.review.bot@gmail.com>
2586
2587         Unreviewed, rolling out r119467, r119471, and r119476.
2588         http://trac.webkit.org/changeset/119467
2589         http://trac.webkit.org/changeset/119471
2590         http://trac.webkit.org/changeset/119476
2591         https://bugs.webkit.org/show_bug.cgi?id=88332
2592
2593         it broke chromium-mac static initializers test.\ (Requested by
2594         loislo on #webkit).
2595
2596         * WebCore.gyp/WebCore.gyp:
2597         * WebCore.gypi:
2598         * platform/graphics/FontPlatformData.h:
2599         (FontPlatformData):
2600         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2601         (WebCore::FontPlatformData::platformDataInit):
2602         (WebCore::FontPlatformData::platformDataAssign):
2603         * platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp: Removed.
2604         * platform/graphics/harfbuzz/ng/HarfBuzzFace.h: Removed.
2605         * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp: Removed.
2606         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: Removed.
2607         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h: Removed.
2608         * platform/graphics/mac/FontComplexTextMac.cpp:
2609         (WebCore::Font::selectionRectForComplexText):
2610         (WebCore::Font::drawComplexText):
2611         (WebCore::Font::floatWidthForComplexText):
2612         (WebCore::Font::offsetForPositionForComplexText):
2613
2614 2012-06-05  Alexander Pavlov  <apavlov@chromium.org>
2615
2616         Web Inspector: SHIFT key as helper to color adjustment in color picker
2617         https://bugs.webkit.org/show_bug.cgi?id=88319
2618
2619         Reviewed by Pavel Feldman.
2620
2621         With Shift depressed, the dragger in the color picker will snap to the horizontal
2622         or vertical axis while dragging, depending on which axis offset is greater.
2623
2624         * inspector/front-end/Spectrum.js:
2625         (WebInspector.Spectrum.colorDragStart):
2626         (WebInspector.Spectrum.colorDrag):
2627         (WebInspector.Spectrum.draggable.move):
2628         (WebInspector.Spectrum.draggable.start):
2629
2630 2012-06-05  Andrey Kosyakov  <caseq@chromium.org>
2631
2632         Web Inspector: aggregate all events before first frame into a fake frame
2633         https://bugs.webkit.org/show_bug.cgi?id=88229
2634
2635         - in Timeline's frame mode, start aggregating events by frame even before we get first frame marker.
2636
2637         * inspector/front-end/TimelineFrameController.js:
2638         (WebInspector.TimelineFrameController.prototype._addRecord):
2639         (WebInspector.TimelineFrameController.prototype._flushFrame):
2640         (WebInspector.TimelineFrameController.prototype._createFrame):
2641
2642 2012-06-05  Charles Wei  <charles.wei@torchmobile.com.cn>
2643
2644         JSC:need to implement Dictionary::getWithUndefinedOrNullCheck for IDB
2645         https://bugs.webkit.org/show_bug.cgi?id=88283
2646
2647         Reviewed by Kentaro Hara.
2648
2649         No new tests, idb not working for JSC yet.
2650
2651         * bindings/js/Dictionary.cpp:
2652         (WebCore::Dictionary::getWithUndefinedOrNullCheck):
2653         * bindings/js/Dictionary.h:
2654         (Dictionary):
2655         * bindings/js/JSDictionary.cpp:
2656         (WebCore::JSDictionary::getWithUndefinedOrNullCheck):
2657         (WebCore):
2658         * bindings/js/JSDictionary.h:
2659         (JSDictionary):
2660
2661 2012-06-05  Dongwoo Im  <dw.im@samsung.com>
2662
2663         Add 'isProtocolHandlerRegistered' and 'unregisterProtocolHandler'.
2664         https://bugs.webkit.org/show_bug.cgi?id=73176
2665
2666         Reviewed by Adam Barth.
2667
2668         Two more APIs are added in Custom Scheme Handler specification.
2669         http://dev.w3.org/html5/spec/Overview.html#custom-handlers
2670         One is 'isProtocolHandlerRegistered' to query whether the specific URL
2671         is registered or not.
2672         The other is 'unregisterProtocolHandler' to remove the registered URL.
2673
2674         Test: fast/dom/unregister-protocol-handler.html
2675
2676         * Configurations/FeatureDefines.xcconfig: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'.
2677         * loader/EmptyClients.h: Add prototypes.
2678         (EmptyChromeClient):
2679         (WebCore::EmptyChromeClient::isProtocolHandlerRegistered):
2680         (WebCore::EmptyChromeClient::unregisterProtocolHandler):
2681         * page/ChromeClient.h:
2682         (ChromeClient):
2683         * page/NavigatorRegisterProtocolHandler.cpp:
2684         (WebCore):
2685         (WebCore::customHandlersStateString):
2686         (WebCore::NavigatorRegisterProtocolHandler::isProtocolHandlerRegistered): Query if the handler is registered.
2687         (WebCore::NavigatorRegisterProtocolHandler::unregisterProtocolHandler): Unregister the registered handler.
2688         * page/NavigatorRegisterProtocolHandler.h:
2689         (NavigatorRegisterProtocolHandler):
2690         * page/NavigatorRegisterProtocolHandler.idl:
2691
2692 2012-06-04  Kinuko Yasuda  <kinuko@chromium.org>
2693
2694         Chromium tests: "Add support for the Blob constructor" [r115582] regressed blob layout tests
2695         https://bugs.webkit.org/show_bug.cgi?id=85174
2696
2697         Reviewed by Kentaro Hara.
2698
2699         This fixes a crash problem which could happen when the constructor is
2700         given an array which contains String-type item(s).
2701
2702         There're still some Text mismatches between v8 results and
2703         JSC results, most of them are v8 not throwing exception
2704         when it is given an object whose toString() method throws
2705         exception.  (The issue will be addresse in a separate patch.)
2706
2707         Test: fast/files/blob-constructor.html
2708
2709         * bindings/v8/custom/V8BlobCustom.cpp:
2710         (WebCore::V8Blob::constructorCallback):
2711
2712 2012-06-05  Kentaro Hara  <haraken@chromium.org>
2713
2714         Remove unnecessary constructor of SelectorQueryCache
2715         https://bugs.webkit.org/show_bug.cgi?id=87942
2716
2717         Reviewed by Ryosuke Niwa.
2718
2719         Per the comment from darin@ (https://bugs.webkit.org/show_bug.cgi?id=87942#c27),
2720         this patch removes an inline constructor that has no arguments.
2721         To have the compiler generate the constructor,
2722         this patch also removes WTF_MAKE_NONCOPYABLE().
2723
2724         No tests. No change in behavior.
2725
2726         * dom/SelectorQuery.h:
2727         (SelectorQueryCache):
2728
2729 2012-06-05  Kentaro Hara  <haraken@chromium.org>
2730
2731         Remove unused methods from SelectorQuery.h
2732         https://bugs.webkit.org/show_bug.cgi?id=88289
2733
2734         Reviewed by Antti Koivisto.
2735
2736         This patch removes SelectorDataList::size() and
2737         SelectorDataList::SelectorDataList().
2738         SelectorDataList::size() is not used by anybody.
2739         SelectorDataList::SelectorDataList() can be auto-generated
2740         by a compiler.
2741
2742         No tests. No change in behavior.
2743
2744         * dom/SelectorQuery.cpp:
2745         * dom/SelectorQuery.h:
2746         (SelectorDataList):
2747
2748 2012-06-05  Kent Tamura  <tkent@chromium.org>
2749
2750         Build fix for r119470.
2751
2752         * loader/EmptyClients.cpp: Add #include "IntentRequest.h".
2753
2754 2012-06-05  Kent Tamura  <tkent@chromium.org>
2755
2756         Remove unused function: Document::formElements
2757         https://bugs.webkit.org/show_bug.cgi?id=88272
2758
2759         Reviewed by Kentaro Hara.
2760
2761         No new tests. No behavior change.
2762
2763         * dom/Document.h:
2764         (Document): remove formElements(). It was used for radio group
2765         validation, but the current code doesn't use it any more.
2766
2767 2012-06-05  Kenichi Ishibashi  <bashi@chromium.org>
2768
2769         Unreviewed build fix on Chromium mac
2770
2771         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2772         (WebCore::isAATFont):
2773
2774 2012-06-05  Kent Tamura  <tkent@chromium.org>
2775
2776         Move some function definitions in EmptyClients.h to EmptyClients.cpp
2777         https://bugs.webkit.org/show_bug.cgi?id=88285
2778
2779         Reviewed by Ryosuke Niwa.
2780
2781         If we have definitions of functions with RefPtr<> in EmptyClients.h like
2782
2783             virtual void runOpenPanel(Frame*, PassRefPtr<FileChooser>) { }
2784
2785         and a source file includes EmptyClient.h, the source file needs to
2786         include FileChooser.h though the source file doesn't use FileChooser
2787         class explicitly because the definition of runOpenPanel() needs to call
2788         FileChooser::deref().
2789         To avoid this, we had better move such functions to EmptyClients.cpp.
2790
2791         No new tests. No behavior changes.
2792
2793         * loader/EmptyClients.cpp: Move such functions from EmptyClients.h to
2794         here, and move EmptyPopupMenu and EmptySearchPopupMenu too because
2795         they're used only by EmptyChromeClient.
2796         (WebCore):
2797         (EmptyPopupMenu):
2798         (WebCore::EmptyPopupMenu::show):
2799         (WebCore::EmptyPopupMenu::hide):
2800         (WebCore::EmptyPopupMenu::updateFromElement):
2801         (WebCore::EmptyPopupMenu::disconnectClient):
2802         (EmptySearchPopupMenu):
2803         (WebCore::EmptySearchPopupMenu::popupMenu):
2804         (WebCore::EmptySearchPopupMenu::saveRecentSearches):
2805         (WebCore::EmptySearchPopupMenu::loadRecentSearches):
2806         (WebCore::EmptySearchPopupMenu::enabled):
2807         (WebCore::EmptyChromeClient::createPopupMenu):
2808         (WebCore::EmptyChromeClient::createSearchPopupMenu):
2809         (WebCore::EmptyChromeClient::createColorChooser):
2810         (WebCore::EmptyChromeClient::runOpenPanel):
2811         (WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2812         (WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2813         (WebCore::EmptyFrameLoaderClient::dispatchWillSendSubmitEvent):
2814         (WebCore::EmptyFrameLoaderClient::dispatchWillSubmitForm):
2815         (WebCore::EmptyFrameLoaderClient::createDocumentLoader):
2816         (WebCore::EmptyFrameLoaderClient::createFrame):
2817         (WebCore::EmptyFrameLoaderClient::createPlugin):
2818         (WebCore::EmptyFrameLoaderClient::createJavaAppletWidget):
2819         (WebCore::EmptyFrameLoaderClient::createMediaPlayerProxyPlugin):
2820         (WebCore::EmptyFrameLoaderClient::createNetworkingContext):
2821         (WebCore::EmptyFrameLoaderClient::dispatchIntent):
2822         (WebCore::EmptyTextCheckerClient::requestCheckingOfString):
2823         (WebCore::EmptyEditorClient::registerUndoStep):
2824         (WebCore::EmptyEditorClient::registerRedoStep):
2825         (WebCore::EmptyContextMenuClient::customizeMenu):
2826         * loader/EmptyClients.h: Move such function definitions to
2827         EmptyClient.cpp, and append OVERRIDE.
2828         (EmptyChromeClient):
2829         (EmptyFrameLoaderClient):
2830         (EmptyTextCheckerClient):
2831         (EmptyEditorClient):
2832         (EmptyContextMenuClient):
2833         * svg/graphics/SVGImage.cpp: Remove unnecessary #includes.
2834
2835 2012-06-05  Alexander Pavlov  <apavlov@chromium.org>
2836
2837         Web Inspector: "-webkit"-prefixed properties are considered inherited in the Computed Style pane
2838         https://bugs.webkit.org/show_bug.cgi?id=88257
2839
2840         Reviewed by Pavel Feldman.
2841
2842         Canonical names for properties should be used when checking if they are inherited (since only canonical names
2843         are put into the usedProperties set).
2844
2845         * inspector/front-end/StylesSidebarPane.js:
2846         (WebInspector.ComputedStylePropertiesSection.prototype._isPropertyInherited):
2847
2848 2012-06-05  Kenichi Ishibashi  <bashi@chromium.org>
2849
2850         [Chromium] Implement font shaping with font-feature-settings on Mac
2851         https://bugs.webkit.org/show_bug.cgi?id=69826
2852
2853         Reviewed by Tony Chang.
2854
2855         Add HarfBuzz-ng text shaper.
2856         Chromium mac port uses it as secondary text shaper to support OpenType features.
2857         HarfBuzz-ng is only used when -webkit-font-feature-settings is specified and
2858         corresponding font is not an AAT font.
2859
2860         No new tests. css3/font-feature-settings-rendering.html should pass on Chromium mac port.
2861
2862         * WebCore.gyp/WebCore.gyp: Added harfbuzz-ng dependencies.
2863         * WebCore.gypi: Added harfbuzz-ng files.
2864         * platform/graphics/FontPlatformData.h:
2865         (FontPlatformData): Added m_harfbuzzFace.
2866         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2867         (WebCore::FontPlatformData::platformDataInit): Copy m_harfbuzzFace.
2868         (WebCore::FontPlatformData::platformDataAssign): Ditto.
2869         (WebCore):
2870         (WebCore::isAATFont):
2871         (WebCore::FontPlatformData::harfbuzzFace):
2872         * platform/graphics/harfbuzz/ng/HarfBuzzFace.cpp: Added.
2873         (WebCore):
2874         (WebCore::harfbuzzFaceCache):
2875         (WebCore::HarfBuzzFace::HarfBuzzFace):
2876         (WebCore::HarfBuzzFace::~HarfBuzzFace):
2877         * platform/graphics/harfbuzz/ng/HarfBuzzFace.h: Added.
2878         (WebCore):
2879         (HarfBuzzFace):
2880         (WebCore::HarfBuzzFace::create):
2881         * platform/graphics/harfbuzz/ng/HarfBuzzFaceCoreText.cpp: Added.
2882         (WebCore):
2883         (WebCore::floatToHarfBuzzPosition):
2884         (WebCore::getGlyph):
2885         (WebCore::getGlyphHorizontalAdvance):
2886         (WebCore::getGlyphHorizontalOrigin):
2887         (WebCore::getGlyphExtents):
2888         (WebCore::harfbuzzCoreTextGetFontFuncs):
2889         (WebCore::releaseTableData):
2890         (WebCore::harfbuzzCoreTextGetTable):
2891         (WebCore::HarfBuzzFace::createFace):
2892         (WebCore::HarfBuzzFace::createFont):
2893         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
2894         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp: Added.
2895         (WebCore):
2896         (WebCore::harfbuzzPositionToFloat):
2897         (WebCore::HarfBuzzShaper::HarfBuzzRun::HarfBuzzRun):
2898         (WebCore::HarfBuzzShaper::HarfBuzzRun::setGlyphAndPositions):
2899         (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition):
2900         (WebCore::HarfBuzzShaper::HarfBuzzRun::xPositionForOffset):
2901         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
2902         (WebCore::HarfBuzzShaper::~HarfBuzzShaper):
2903         (WebCore::HarfBuzzShaper::setFontFeatures):
2904         (WebCore::HarfBuzzShaper::shape):
2905         (WebCore::HarfBuzzShaper::setupHarfBuzzRun):
2906         (WebCore::HarfBuzzShaper::shapeHarfBuzzRun):
2907         (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun):
2908         (WebCore::HarfBuzzShaper::offsetForPosition):
2909         (WebCore::HarfBuzzShaper::selectionRect):
2910         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h: Added.
2911         (WebCore):
2912         (HarfBuzzShaper):
2913         (WebCore::HarfBuzzShaper::totalWidth):
2914         (HarfBuzzRun):
2915         (WebCore::HarfBuzzShaper::HarfBuzzRun::create):
2916         (WebCore::HarfBuzzShaper::HarfBuzzRun::setWidth):
2917         (WebCore::HarfBuzzShaper::HarfBuzzRun::numCharacters):
2918         (WebCore::HarfBuzzShaper::HarfBuzzRun::numGlyphs):
2919         (WebCore::HarfBuzzShaper::HarfBuzzRun::width):
2920         (WebCore::HarfBuzzShaper::HarfBuzzRun::rtl):
2921         * platform/graphics/mac/FontComplexTextMac.cpp:
2922         (WebCore):
2923         (WebCore::preferHarfBuzz): Added.
2924         (WebCore::Font::selectionRectForComplexText): Use HarfBuzzShaper if font-feature-settings exists.
2925         (WebCore::Font::drawComplexText): Ditto.
2926         (WebCore::Font::floatWidthForComplexText): Ditto.
2927         (WebCore::Font::offsetForPositionForComplexText): Ditto.
2928
2929 2012-06-05  Li Yin  <li.yin@intel.com>
2930
2931         IETC: FileList.item(-1) should return null instead of raising
2932         https://bugs.webkit.org/show_bug.cgi?id=77899
2933
2934         Reviewed by Kentaro Hara.
2935
2936         IETC: http://samples.msdn.microsoft.com/ietestcenter/fileapi/filelist.htm
2937         Accroding to http://es5.github.com/#x9.6
2938         When the index is negative, it should not raise exception.
2939         Firefox and IE returns null when there is not indexth File object.
2940
2941         Test: fast/files/file-list-test.html
2942
2943         * fileapi/FileList.idl:
2944
2945 2012-06-05  Adam Barth  <abarth@webkit.org>
2946
2947         EventHandler shouldn't dispatch fake mousemove events when scrolling on devices that don't have a mouse
2948         https://bugs.webkit.org/show_bug.cgi?id=88270
2949
2950         Reviewed by James Robinson.
2951
2952         This patch adds a setting analogous to deviceSupportsTouch to determine
2953         whether the device supports mouse. We then don't dispatch fake mouse
2954         events on devices that don't have a mouse in the first place.
2955
2956         Test: fast/events/touch/scroll-without-mouse-lacks-mousemove-events.html
2957
2958         * page/EventHandler.cpp:
2959         (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
2960         * page/Settings.cpp:
2961         (WebCore::Settings::Settings):
2962         * page/Settings.h:
2963         (WebCore::Settings::setDeviceSupportsMouse):
2964         (WebCore::Settings::deviceSupportsMouse):
2965         (Settings):
2966         * testing/InternalSettings.cpp:
2967         (WebCore::InternalSettings::InternalSettings):
2968         (WebCore::InternalSettings::restoreTo):
2969         (WebCore::InternalSettings::setDeviceSupportsMouse):
2970         (WebCore):
2971         * testing/InternalSettings.h:
2972         (InternalSettings):
2973         * testing/InternalSettings.idl:
2974
2975 2012-06-04  Simon Fraser  <simon.fraser@apple.com>
2976
2977         Leaking ClipRects
2978         https://bugs.webkit.org/show_bug.cgi?id=88282
2979
2980         Reviewed by Dan Bernstein.
2981
2982         In r118562 I made the ClipRectsCache use RefPtr<ClipRects>. However, ClipRects
2983         was initialized with m_refCnt=0, not 1 as adoptRef() and friends expect. Also,
2984         there was a manual ref() in RenderLayer::updateClipRects() which this patch removes.
2985
2986         * rendering/RenderLayer.cpp:
2987         (WebCore::RenderLayer::updateClipRects):
2988         * rendering/RenderLayer.h:
2989         (WebCore::ClipRects::ClipRects):
2990
2991 2012-06-04  Emil A Eklund  <eae@chromium.org> and Levi Weintraub  <leviw@chromium.org>
2992
2993         Add missing FractionalLayoutUnit += operator and move LineWidth to use all floats
2994         https://bugs.webkit.org/show_bug.cgi?id=88259
2995
2996         Reviewed by Ryosuke Niwa.
2997
2998         Fix two rounding bugs in LineLayout and RenderBlock that caused inlines
2999         and floats to wrap incorrectly.
3000
3001         Tests: fast/sub-pixel/float-containing-block-with-margin.html
3002                fast/sub-pixel/float-with-right-margin-zoom.html
3003                fast/sub-pixel/inline-block-with-padding.html
3004
3005         * platform/FractionalLayoutUnit.h:
3006         (WebCore::operator+=):
3007         Add missing float version of += operator thus avoiding a silent cast to
3008         int loosing precision.
3009         
3010         * rendering/RenderBlockLineLayout.cpp:
3011         (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
3012         (WebCore::LineWidth::updateAvailableWidth):
3013         Change LineWidth left/right to floating point and instead of rounding the
3014         left and right edge separately.
3015         
3016         * rendering/RenderFlexibleBox.cpp:
3017         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
3018         Use explicit cast to avoid compiler ambiguity warning.
3019
3020 2012-06-04  Tony Chang  <tony@chromium.org>
3021
3022         CSS property 'order' should be a number rather than an int
3023         https://bugs.webkit.org/show_bug.cgi?id=88111
3024
3025         Reviewed by Ojan Vafai.
3026
3027         This changed in the spec:
3028         http://dev.w3.org/csswg/css3-flexbox/#order
3029
3030         I also fixed the compile with CSS3_FLEXBOX disabled.
3031
3032         No new tests, covered by existing tests.
3033
3034         * css/CSSComputedStyleDeclaration.cpp:
3035         (WebCore):
3036         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3037         * css/CSSParser.cpp:
3038         (WebCore::CSSParser::parseValue):
3039         * css/CSSProperty.cpp: Parse as float, remove clamping for HashMap<int>.
3040         (WebCore::CSSProperty::isInheritedProperty):
3041         * css/StyleBuilder.cpp:
3042         (WebCore::StyleBuilder::StyleBuilder):
3043         * css/StyleResolver.cpp:
3044         (WebCore::StyleResolver::collectMatchingRulesForList):
3045         * rendering/RenderFlexibleBox.cpp: Remove traits for HashMap<int>.
3046         (RenderFlexibleBox::OrderIterator):
3047         * rendering/RenderFlexibleBox.h:
3048         * rendering/style/RenderStyle.h:
3049         * rendering/style/StyleRareNonInheritedData.h:
3050         (StyleRareNonInheritedData):
3051
3052 2012-06-04  Hugo Parente Lima  <hugo.lima@openbossa.org>
3053
3054         Turn LEGACY_VIEWPORT_ADAPTION USE flag into an ENABLE flag.
3055         https://bugs.webkit.org/show_bug.cgi?id=88243
3056
3057         Reviewed by Adam Barth.
3058
3059         No new tests needed, this just rename a compiler flag.
3060
3061         * dom/Document.cpp:
3062         (WebCore::Document::setDocType):
3063         * dom/ViewportArguments.h:
3064         * html/HTMLMetaElement.cpp:
3065         (WebCore::HTMLMetaElement::process):
3066
3067 2012-06-04  Dana Jansens  <danakj@chromium.org>
3068
3069         [chromium] Remove redundant setNeedsCommit when prepareToDraw fails
3070         https://bugs.webkit.org/show_bug.cgi?id=88246
3071
3072         Reviewed by James Robinson.
3073
3074         When prepareToDraw fails it explicitly calls setNeedsCommit, but the
3075         scheduler already takes care of this for it. When a frame is not
3076         successfully drawn, the scheduler state machine sets the needsCommit
3077         bit itself.
3078
3079         This behaviour is covered by CCSchedulerStateMachineTest.TestFailedDrawSetsNeedsCommitAndDoesNotDrawAgain
3080
3081         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3082         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
3083
3084 2012-06-04  Takashi Toyoshima  <toyoshim@chromium.org>
3085
3086         [WebSocket] Send requires super linear time against data size
3087         https://bugs.webkit.org/show_bug.cgi?id=87383
3088
3089         Reviewed by Kent Tamura.
3090
3091         WebSocket send operation requires super linear time to send data
3092         against data size. This is because removing sent data in Vector<char>
3093         always requires data copy.
3094         Introduced wtf/StreamBuffer realizes O(n) buffer operations.
3095         This patch is only for optimization. No new tests are needed.
3096
3097         * platform/network/SocketStreamHandleBase.cpp:
3098         (WebCore::SocketStreamHandleBase::sendPendingData):
3099         * platform/network/SocketStreamHandleBase.h:
3100         (SocketStreamHandleBase):
3101
3102 2012-06-04  Tim Horton  <timothy_horton@apple.com>
3103
3104         Mock scrollbars differ by 1px in DRT vs. WKTR
3105         https://bugs.webkit.org/show_bug.cgi?id=80879
3106
3107         Rubber-stamped by Ryosuke Niwa.
3108
3109         Disable r119431 except for Apple Mac port.
3110
3111         * platform/ScrollbarThemeComposite.cpp:
3112         (WebCore::ScrollbarThemeComposite::thumbLength):
3113
3114 2012-06-04  Jeffrey Pfau  <jpfau@apple.com>
3115
3116         Document cleanup can get confused if parser still exists
3117         https://bugs.webkit.org/show_bug.cgi?id=88250
3118
3119         Reviewed by Geoffrey Garen.
3120
3121         No new tests; no behavior changes.
3122
3123         * dom/Document.cpp:
3124         (WebCore::Document::removedLastRef): Detach parser earlier
3125
3126 2012-06-04  Andrew Lo  <anlo@rim.com>
3127
3128         [BlackBerry] Split AnimationFrameRateController into its own file
3129         https://bugs.webkit.org/show_bug.cgi?id=88242
3130
3131         Reviewed by Antonio Gomes.
3132
3133         Include new header file to reflect re-organization of platform animation
3134         header files.
3135
3136         * platform/graphics/DisplayRefreshMonitor.h:
3137
3138 2012-06-04  Dana Jansens  <danakj@chromium.org>
3139
3140         [chromium] Allow CCLayerImpl to find its layer tree host, and use this for CCVideoLayerImpl instead of always-null pointer.
3141         https://bugs.webkit.org/show_bug.cgi?id=88252
3142
3143         Reviewed by James Robinson.
3144
3145         CCVideoLayerImpl has a pointer to its CCLayerTreeHostImpl which is never
3146         set to be non-null currently. Instead of making this a special case, we
3147         move the CCLayerTreeHostImpl* up to the CCLayerImpl base class, and set
3148         the pointer on every layer during commit via the TreeSynchronizer's walk
3149         through the layer tree.
3150
3151         Unit tests: Tested by TreeSynchronizer tests.
3152
3153         * platform/graphics/chromium/TreeSynchronizer.cpp:
3154         (WebCore::TreeSynchronizer::synchronizeTrees):
3155         (WebCore::TreeSynchronizer::synchronizeTreeRecursive):
3156         * platform/graphics/chromium/TreeSynchronizer.h:
3157         (WebCore):
3158         (TreeSynchronizer):
3159         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3160         (WebCore::CCLayerImpl::CCLayerImpl):
3161         * platform/graphics/chromium/cc/CCLayerImpl.h:
3162         (WebCore):
3163         (WebCore::CCLayerImpl::layerTreeHostImpl):
3164         (WebCore::CCLayerImpl::setLayerTreeHostImpl):
3165         (CCLayerImpl):
3166         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3167         (WebCore::CCLayerTreeHost::finishCommitOnImplThread):
3168         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
3169         (WebCore::CCVideoLayerImpl::CCVideoLayerImpl):
3170         (WebCore::CCVideoLayerImpl::setNeedsRedraw):
3171         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
3172
3173 2012-06-04  Tim Horton  <timothy_horton@apple.com>
3174
3175         Mock scrollbars differ by 1px in DRT vs. WKTR
3176         https://bugs.webkit.org/show_bug.cgi?id=80879
3177
3178         Reviewed by Simon Fraser.
3179
3180         Round the length of the scrollbar thumb instead of truncating it.
3181
3182         No new tests, fixes a mismatch between pixel results from DRT and WKTR.
3183         Change is covered by all existing tests with scrollbars run with low tolerance.
3184
3185         * platform/ScrollbarThemeComposite.cpp:
3186         (WebCore::ScrollbarThemeComposite::thumbLength):
3187
3188 2012-06-04  Anders Carlsson  <andersca@apple.com>
3189
3190         Fix an unused result warning when building with clang.
3191
3192         * platform/cf/BinaryPropertyList.cpp:
3193         (WebCore::BinaryPropertyListWriter::writePropertyList):
3194
3195 2012-06-04  Ami Fischman  <fischman@chromium.org>
3196
3197         Don't crash when re-parenting a removed HTMLMediaElement
3198         https://bugs.webkit.org/show_bug.cgi?id=88058
3199
3200         Reviewed by Eric Carlson.
3201
3202         Test: media/media-reparent.html
3203
3204         * html/HTMLMediaElement.cpp:
3205         (WebCore::HTMLMediaElement::userCancelledLoad): Clear the pending load flags because any pending load has been cancelled.
3206
3207 2012-06-04  Sheriff Bot  <webkit.review.bot@gmail.com>
3208
3209         Unreviewed, rolling out r119421 and r119425.
3210         http://trac.webkit.org/changeset/119421
3211         http://trac.webkit.org/changeset/119425
3212         https://bugs.webkit.org/show_bug.cgi?id=88256
3213
3214         not reliable, let's have a do-over (Requested by kling on
3215         #webkit).
3216
3217         * dom/Element.cpp:
3218         (WebCore::Element::detachAttribute):
3219         (WebCore::Element::removeAttribute):
3220         (WebCore::Element::attributes):
3221         (WebCore::Element::setAttributeInternal):
3222         (WebCore::Element::parserSetAttributes):
3223         (WebCore::Element::hasEquivalentAttributes):
3224         (WebCore::Element::createAttributeData):
3225         (WebCore):
3226         (WebCore::Element::setAttributeNode):
3227         (WebCore::Element::removeAttributeNode):
3228         (WebCore::Element::getAttributeNode):
3229         (WebCore::Element::getAttributeNodeNS):
3230         (WebCore::Element::hasAttribute):
3231         (WebCore::Element::hasAttributeNS):
3232         (WebCore::Element::normalizeAttributes):
3233         (WebCore::Element::cloneAttributesFromElement):
3234         * dom/Element.h:
3235         (WebCore::Element::attributeData):
3236         (Element):
3237         (WebCore::Element::ensureAttributeData):
3238         (WebCore::Element::updatedAttributeData):
3239         (WebCore::Element::ensureUpdatedAttributeData):
3240         * dom/ElementAttributeData.cpp:
3241         (WebCore::ElementAttributeData::attrIfExists):
3242         (WebCore::ElementAttributeData::ensureAttr):
3243         (WebCore::ElementAttributeData::setAttr):
3244         (WebCore::ElementAttributeData::removeAttr):
3245         (WebCore::ElementAttributeData::setClass):
3246         (WebCore):
3247         (WebCore::ElementAttributeData::ensureInlineStyle):
3248         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
3249         (WebCore::ElementAttributeData::destroyInlineStyle):
3250         (WebCore::ElementAttributeData::addAttribute):
3251         (WebCore::ElementAttributeData::removeAttribute):
3252         (WebCore::ElementAttributeData::isEquivalent):
3253         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
3254         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
3255         (WebCore::ElementAttributeData::cloneDataFrom):
3256         (WebCore::ElementAttributeData::clearAttributes):
3257         (WebCore::ElementAttributeData::replaceAttribute):
3258         (WebCore::ElementAttributeData::getAttributeNode):
3259         * dom/ElementAttributeData.h:
3260         (WebCore::ElementAttributeData::create):
3261         (ElementAttributeData):
3262         (WebCore::ElementAttributeData::setIdForStyleResolution):
3263         (WebCore::ElementAttributeData::setAttributeStyle):
3264         (WebCore::ElementAttributeData::length):
3265         (WebCore::ElementAttributeData::isEmpty):
3266         (WebCore::ElementAttributeData::attributeItem):
3267         (WebCore::ElementAttributeData::getAttributeItem):
3268         (WebCore::ElementAttributeData::ElementAttributeData):
3269         (WebCore::ElementAttributeData::attributeVector):
3270         (WebCore::ElementAttributeData::clonedAttributeVector):
3271         (WebCore::ElementAttributeData::getAttributeItemIndex):
3272         * dom/StyledElement.cpp:
3273         (WebCore::StyledElement::style):
3274         (WebCore::StyledElement::classAttributeChanged):
3275         (WebCore::StyledElement::removeInlineStyleProperty):
3276         (WebCore::StyledElement::addSubresourceAttributeURLs):
3277         * html/parser/HTMLConstructionSite.cpp:
3278         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
3279         * xml/parser/XMLDocumentParserQt.cpp:
3280         (WebCore::XMLDocumentParser::XMLDocumentParser):
3281
3282 2012-06-04  Andreas Kling  <kling@webkit.org>
3283
3284         Unreviewed build fixes for cr-android and Qt.
3285
3286         * dom/ElementAttributeData.h:
3287         (WebCore::ElementAttributeData::setClass):
3288         Change ElementAttributeData::setClass() to take an AtomicString instead of a String.
3289         The only call site has an AtomicString anyway.
3290         * xml/parser/XMLDocumentParserQt.cpp:
3291         (WebCore::XMLDocumentParser::XMLDocumentParser): Add missing const.
3292
3293 2012-06-04  Sadrul Habib Chowdhury  <sadrul@chromium.org>
3294
3295         [chromium] Fix software rendering for device-scale-factor > 1
3296         https://bugs.webkit.org/show_bug.cgi?id=88136
3297
3298         Reviewed by Darin Fisher.
3299
3300         Test: fast/hidpi/device-scale-factor-paint.html
3301
3302         * WebCore.exp.in:
3303         * testing/InternalSettings.cpp:
3304         (WebCore::InternalSettings::setDeviceScaleFactor):
3305         (WebCore):
3306         * testing/InternalSettings.h:
3307         (InternalSettings):
3308         * testing/InternalSettings.idl:
3309
3310 2012-06-04  Andreas Kling  <kling@webkit.org>
3311
3312         Make ElementAttributeData a variable-sized object to reduce memory use.
3313         <http://webkit.org/b/88240>
3314
3315         Reviewed by Antti Koivisto.
3316
3317         Take advantage of the fact that we know at ElementAttributeData construction time how many attributes
3318         it needs to accomodate and allocate exactly as much space as needed instead of using a Vector.
3319         For elements that never have their attribute list mutated (the vast majority), this saves a lot of
3320         memory and removes the indirection to Vector<Attribute>'s heap-allocated storage.
3321
3322         Introduced a mutability flag to ElementAttributeData and sprinkled assertions all over to make sure
3323         that nothing tries to mutate an element with a raw attribute array.
3324
3325         When an Element's attribute(s) are mutated, we reconstruct the ElementAttributeData, this time using
3326         a Vector as backing instead. This is triggered when calling Element::mutableAttributeData().
3327
3328         This reduces memory consumption by 3.2MB when viewing the full HTML5 spec at <http://whatwg.org/c/>.
3329         This is a 35% reduction in DOM attribute memory use.
3330
3331         Furthermore, that page ends up promoting 27% of the elements to mutable attribute storage due to dynamic
3332         adding of "class" attributes. For more static pages, savings are even greater.
3333
3334         * dom/Element.cpp:
3335         (WebCore::Element::detachAttribute):
3336         (WebCore::Element::removeAttribute):
3337         (WebCore::Element::attributes):
3338         (WebCore::Element::setAttributeInternal):
3339         (WebCore::Element::parserSetAttributes):
3340         (WebCore::Element::hasEquivalentAttributes):
3341         (WebCore::Element::setAttributeNode):
3342         (WebCore::Element::removeAttributeNode):
3343         (WebCore::Element::getAttributeNode):
3344         (WebCore::Element::getAttributeNodeNS):
3345         (WebCore::Element::hasAttribute):
3346         (WebCore::Element::hasAttributeNS):
3347         (WebCore::Element::normalizeAttributes):
3348         (WebCore::Element::cloneAttributesFromElement):
3349         (WebCore::Element::createMutableAttributeData):
3350         * dom/Element.h:
3351         (WebCore::Element::attributeData):
3352         (Element):
3353         (WebCore::Element::updatedAttributeData):
3354         (WebCore::Element::ensureAttributeData):
3355         (WebCore::Element::ensureUpdatedAttributeData):
3356         (WebCore::Element::mutableAttributeData):
3357         * dom/ElementAttributeData.cpp:
3358         (WebCore::ElementAttributeData::createImmutable):
3359         (WebCore::ElementAttributeData::ElementAttributeData):
3360         (WebCore::ElementAttributeData::~ElementAttributeData):
3361         (WebCore::ElementAttributeData::attrIfExists):
3362         (WebCore::ElementAttributeData::ensureAttr):
3363         (WebCore::ElementAttributeData::setAttr):
3364         (WebCore::ElementAttributeData::removeAttr):
3365         (WebCore::ElementAttributeData::ensureInlineStyle):
3366         (WebCore::ElementAttributeData::ensureMutableInlineStyle):
3367         (WebCore::ElementAttributeData::destroyInlineStyle):
3368         (WebCore::ElementAttributeData::addAttribute):
3369         (WebCore::ElementAttributeData::removeAttribute):
3370         (WebCore::ElementAttributeData::isEquivalent):
3371         (WebCore::ElementAttributeData::detachAttrObjectsFromElement):
3372         (WebCore::ElementAttributeData::getAttributeItemIndexSlowCase):
3373         (WebCore::ElementAttributeData::cloneDataFrom):
3374         (WebCore::ElementAttributeData::clearAttributes):
3375         (WebCore::ElementAttributeData::replaceAttribute):
3376         (WebCore::ElementAttributeData::getAttributeNode):
3377         * dom/ElementAttributeData.h:
3378         (ElementAttributeData):
3379         (WebCore::ElementAttributeData::setClass):
3380         (WebCore::ElementAttributeData::setIdForStyleResolution):
3381         (WebCore::ElementAttributeData::inlineStyle):
3382         (WebCore::ElementAttributeData::setAttributeStyle):
3383         (WebCore::ElementAttributeData::isMutable):
3384         (WebCore::ElementAttributeData::makeMutable):
3385         (WebCore::ElementAttributeData::length):
3386         (WebCore::ElementAttributeData::isEmpty):
3387         (WebCore::ElementAttributeData::array):
3388         (WebCore::ElementAttributeData::attributeItem):
3389         (WebCore::ElementAttributeData::getAttributeItem):
3390         (WebCore::ElementAttributeData::getAttributeItemIndex):
3391         * dom/StyledElement.cpp:
3392         (WebCore::StyledElement::style):
3393         (WebCore::StyledElement::classAttributeChanged):
3394         (WebCore::StyledElement::removeInlineStyleProperty):
3395         (WebCore::StyledElement::addSubresourceAttributeURLs):
3396         * html/parser/HTMLConstructionSite.cpp:
3397         (WebCore::HTMLConstructionSite::createHTMLElementFromSavedElement):
3398         * xml/parser/XMLDocumentParserQt.cpp:
3399         (WebCore::XMLDocumentParser::XMLDocumentParser):
3400
3401 2012-06-04  Sadrul Habib Chowdhury  <sadrul@chromium.org>
3402
3403         [chromium] Combobox options and autofill options should not be scaled for device-scale factor
3404         https://bugs.webkit.org/show_bug.cgi?id=87921
3405
3406         Reviewed by Darin Fisher.
3407
3408         Chrome takes care of scaling the combobox/autofill lists in the browser side. So it is not
3409         necessary to scale here. This change reverts parts of changes in r111539.
3410
3411         Manually tested with different scale factors.
3412
3413         * platform/chromium/PopupListBox.cpp:
3414         (WebCore::PopupListBox::paint):
3415         (WebCore::PopupListBox::paintRow):
3416         (WebCore::PopupListBox::getRowHeight):
3417         * platform/chromium/PopupListBox.h:
3418         (PopupContainerSettings):
3419         * platform/chromium/PopupMenuChromium.cpp:
3420         (WebCore::PopupMenuChromium::show):
3421         * rendering/RenderMenuList.cpp:
3422         (WebCore::RenderMenuList::showPopup):
3423
3424 2012-06-04  Dana Jansens  <danakj@chromium.org>
3425
3426         [chromium] Make LayerRendererChromium use RenderPasses instead of RenderSurfaces
3427         https://bugs.webkit.org/show_bug.cgi?id=88132
3428
3429         Reviewed by Adrienne Walker.
3430
3431         This patch is partly renaming, partly moving data into CCRenderPass
3432         and CCRenderPassDrawQuad. LayerRendererChromium should accept as input
3433         a set of RenderPasses and this should be sufficient for drawing. It
3434         should have no notion of RenderSurfaces at all.
3435
3436         First, what isn't done: RenderSurfaces still hold the textures
3437         where RenderPasses are drawn to/from, so that these textures can
3438         persist across frames. This will be addressed separately.
3439
3440         Otherwise, this completely removes the concept of RenderSurface from
3441         LayerRenderChromium and the CCDrawQuad, replacing it with RenderPass.
3442         The "renderSurfaceTextureManager" is renamed to the "implTextureManager"
3443         and like-wise for the TextureAllocator, as these are not used
3444         exclusively for render surfaces (passes), and a texture manager for
3445         render passes that does not require a RenderSurface* will be the focus
3446         of future changes.
3447
3448         Covered by existing tests.
3449
3450         * WebCore.gypi:
3451         * platform/graphics/chromium/LayerRendererChromium.cpp:
3452         (WebCore::LayerRendererChromium::LayerRendererChromium):
3453         (WebCore::LayerRendererChromium::setVisible):
3454         (WebCore::LayerRendererChromium::releaseRenderPassTextures):
3455         (WebCore::LayerRendererChromium::viewportChanged):
3456         (WebCore::LayerRendererChromium::clearRenderPass):
3457         (WebCore::LayerRendererChromium::beginDrawingFrame):
3458         (WebCore::LayerRendererChromium::drawRenderPass):
3459         (WebCore::LayerRendererChromium::drawQuad):
3460         (WebCore::LayerRendererChromium::drawBackgroundFilters):
3461         (WebCore::LayerRendererChromium::drawRenderPassQuad):
3462         (WebCore::LayerRendererChromium::copyPlaneToTexture):
3463         (WebCore::LayerRendererChromium::drawHeadsUpDisplay):
3464         (WebCore::LayerRendererChromium::finishDrawingFrame):
3465         (WebCore::LayerRendererChromium::copyTextureToFramebuffer):
3466         (WebCore::LayerRendererChromium::getFramebufferTexture):
3467         (WebCore::LayerRendererChromium::isCurrentRenderPass):
3468         (WebCore::LayerRendererChromium::useRenderPass):
3469         (WebCore::LayerRendererChromium::useManagedTexture):
3470         (WebCore::LayerRendererChromium::bindFramebufferToTexture):
3471         (WebCore::LayerRendererChromium::setScissorToRect):
3472         (WebCore::LayerRendererChromium::setDrawFramebufferRect):
3473         (WebCore::LayerRendererChromium::initializeSharedObjects):
3474         (WebCore::LayerRendererChromium::renderPassProgram):
3475         (WebCore::LayerRendererChromium::renderPassProgramAA):
3476         (WebCore::LayerRendererChromium::renderPassMaskProgram):
3477         (WebCore::LayerRendererChromium::renderPassMaskProgramAA):
3478         (WebCore::LayerRendererChromium::cleanupSharedObjects):
3479         * platform/graphics/chromium/LayerRendererChromium.h:
3480         (WebCore):
3481         (LayerRendererChromium):
3482         * platform/graphics/chromium/cc/CCDrawQuad.cpp:
3483         (WebCore::CCDrawQuad::toRenderPassDrawQuad):
3484         * platform/graphics/chromium/cc/CCDrawQuad.h:
3485         (WebCore):
3486         (CCDrawQuad):
3487         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
3488         (WebCore::CCHeadsUpDisplay::draw):
3489         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3490         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
3491         (WebCore::CCLayerTreeHostImpl::drawLayers):
3492         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
3493         * platform/graphics/chromium/cc/CCRenderPass.cpp:
3494         (WebCore::CCRenderPass::CCRenderPass):
3495         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
3496         * platform/graphics/chromium/cc/CCRenderPass.h:
3497         (CCRenderPass):
3498         (WebCore::CCRenderPass::framebufferOutputRect):
3499         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp.
3500         (WebCore):
3501         (WebCore::CCRenderPassDrawQuad::create):
3502         (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad):
3503         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: Renamed from Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h.
3504         (WebCore):
3505         (CCRenderPassDrawQuad):
3506         (WebCore::CCRenderPassDrawQuad::renderPass):
3507         (WebCore::CCRenderPassDrawQuad::isReplica):
3508         (WebCore::CCRenderPassDrawQuad::maskTextureId):
3509         (WebCore::CCRenderPassDrawQuad::filters):
3510         (WebCore::CCRenderPassDrawQuad::backgroundFilters):
3511         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
3512         (WebCore::CCRenderSurface::prepareContentsTexture):
3513         (WebCore::CCRenderSurface::prepareBackgroundTexture):
3514         (WebCore::CCRenderSurface::appendQuads):
3515         * platform/graphics/chromium/cc/CCRenderSurface.h:
3516         (WebCore):
3517         (CCRenderSurface):
3518         * platform/graphics/chromium/cc/CCRenderer.h:
3519         (CCRenderer):
3520         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
3521         (WebCore::CCScrollbarLayerImpl::willDraw):
3522         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
3523         (WebCore::CCVideoLayerImpl::reserveTextures):
3524
3525 2012-06-04  Abhishek Arya  <inferno@chromium.org>
3526
3527         Crash in multi-column layout.
3528         https://bugs.webkit.org/show_bug.cgi?id=88022
3529
3530         Reviewed by Ojan Vafai.
3531
3532         The patch addresses two problems::
3533         1. |this| in RenderBlock::splitBlocks can get destroyed when we
3534         move its children to the clone and later call updateBeforeAfterContent
3535         on the parent. So, we stop accessing its member variables and cache
3536         it in a local.
3537         2. Positioned objects were not getting cleared from our grand parents.
3538         This will happen if our immediate children got moved to a clone tree,
3539         however at our parent nothing was moved. So, we make sure to remove
3540         the positioned objects at every level while we are doing the cloning.
3541
3542         Tests: fast/multicol/span/empty-anonymous-block-split-crash.html
3543                fast/multicol/span/positioned-objects-not-removed-crash.html
3544
3545         * rendering/RenderBlock.cpp:
3546         (WebCore::RenderBlock::splitBlocks):
3547
3548 2012-06-04  Tim Horton  <timothy_horton@apple.com>
3549
3550         Mac build fails with SVG disabled
3551         https://bugs.webkit.org/show_bug.cgi?id=88165
3552
3553         Reviewed by Dirk Schulze.
3554
3555         Wrap all of SVGCSSPropertyNames in #if ENABLE(SVG),
3556         and mark an unused argument in collectMatchingRulesForList.
3557
3558         * css/SVGCSSPropertyNames.in:
3559         * css/StyleResolver.cpp:
3560         (WebCore::StyleResolver::collectMatchingRulesForList):
3561
3562 2012-06-04  David Kilzer  <ddkilzer@apple.com>
3563
3564         BUILD FIX: Unused variable with ENABLE(CONTEXT_MENUS) off
3565
3566         This broke in r118374.
3567
3568         * bindings/js/JSInspectorFrontendHostCustom.cpp:
3569         (WebCore::JSInspectorFrontendHost::showContextMenu): Add
3570         UNUSED_PARAM(exec) when ENABLE(CONTEXT_MENUS) is off.
3571
3572 2012-06-04  Sheriff Bot  <webkit.review.bot@gmail.com>
3573
3574         Unreviewed, rolling out r119393.
3575         http://trac.webkit.org/changeset/119393
3576         https://bugs.webkit.org/show_bug.cgi?id=88236
3577
3578         Test is incorrect (duplicate content) and is causing Chromium
3579         failures (Requested by schenney on #webkit).
3580
3581         * html/canvas/CanvasRenderingContext2D.cpp:
3582         (WebCore::CanvasRenderingContext2D::drawImage):
3583
3584 2012-06-04  Zeev Lieber  <zlieber@chromium.org>
3585
3586         [chromium] Cleanup scissor rect computation/use with damage
3587         https://bugs.webkit.org/show_bug.cgi?id=87167
3588
3589         Reviewed by Adrienne Walker.
3590
3591         Performing scissorRect computation during
3592         calculateRenderPasses. Storing scissorRect in shared quad state
3593         instead of computing it during drawQuad. Added scissorRect fields
3594         into layers and render surfaces.
3595
3596         Covered by existing layout tests. Introduced more unit tests to
3597         test end-to-end drawing using mock graphic context, and added more
3598         test cases to CCLayerTreeHostCommon to verify scissorRect computation.
3599
3600         * platform/graphics/chromium/LayerChromium.h:
3601         (WebCore::LayerChromium::scissorRect):
3602         (WebCore::LayerChromium::setScissorRect):
3603         (LayerChromium):
3604         * platform/graphics/chromium/LayerRendererChromium.cpp:
3605         (WebCore::LayerRendererChromium::clearRenderSurface):
3606         (WebCore::LayerRendererChromium::drawRenderPass):
3607         (WebCore::LayerRendererChromium::drawQuad):
3608         (WebCore::LayerRendererChromium::drawRenderSurfaceQuad):
3609         * platform/graphics/chromium/LayerRendererChromium.h:
3610         (LayerRendererChromium):
3611         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
3612         (WebCore::RenderSurfaceChromium::computeRootScissorRectInCurrentSurface):
3613         (WebCore):
3614         * platform/graphics/chromium/RenderSurfaceChromium.h:
3615         (WebCore::RenderSurfaceChromium::scissorRect):
3616         (WebCore::RenderSurfaceChromium::setScissorRect):
3617         (RenderSurfaceChromium):
3618         * platform/graphics/chromium/cc/CCDrawQuad.h:
3619         (WebCore::CCDrawQuad::scissorRect):
3620         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
3621         (WebCore::CCLayerImpl::createSharedQuadState):
3622         * platform/graphics/chromium/cc/CCLayerImpl.h:
3623         (CCLayerImpl):
3624         (WebCore::CCLayerImpl::scissorRect):
3625         (WebCore::CCLayerImpl::setScissorRect):
3626         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3627         (WebCore::CCLayerTreeHost::updateLayers):
3628         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
3629         (WebCore):
3630         (WebCore::calculateLayerScissorRect):
3631         (WebCore::calculateSurfaceScissorRect):
3632         (WebCore::calculateDrawTransformsInternal):
3633         (WebCore::calculateVisibleAndScissorRectsInternal):
3634         (WebCore::CCLayerTreeHostCommon::calculateDrawTransforms):
3635         (WebCore::CCLayerTreeHostCommon::calculateVisibleAndScissorRects):
3636         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
3637         (CCLayerTreeHostCommon):
3638         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3639         (WebCore::CCLayerTreeHostImpl::calculateRenderSurfaceLayerList):
3640         (WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
3641         (WebCore::CCLayerTreeHostImpl::drawLayers):
3642         (WebCore::CCLayerTreeHostImpl::swapBuffers):
3643         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3644         (CCLayerTreeHostImpl):
3645         * platform/graphics/chromium/cc/CCRenderPass.cpp:
3646         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
3647         * platform/graphics/chromium/cc/CCRenderPass.h:
3648         (CCRenderPass):
3649         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
3650         (WebCore::CCRenderSurface::createSharedQuadState):
3651         (WebCore::CCRenderSurface::createReplicaSharedQuadState):
3652         (WebCore):
3653         (WebCore::CCRenderSurface::computeRootScissorRectInCurrentSurface):
3654         (WebCore::CCRenderSurface::appendQuads):
3655         * platform/graphics/chromium/cc/CCRenderSurface.h:
3656         (CCRenderSurface):
3657         (WebCore::CCRenderSurface::setScissorRect):
3658         (WebCore::CCRenderSurface::scissorRect):
3659         * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp:
3660         (WebCore::CCRenderSurfaceDrawQuad::create):
3661         (WebCore::CCRenderSurfaceDrawQuad::CCRenderSurfaceDrawQuad):
3662         * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h:
3663         (CCRenderSurfaceDrawQuad):
3664         * platform/graphics/chromium/cc/CCRenderer.h:
3665         (CCRenderer):
3666         * platform/graphics/chromium/cc/CCSharedQuadState.cpp:
3667         (WebCore::CCSharedQuadState::create):
3668         (WebCore::CCSharedQuadState::CCSharedQuadState):
3669         * platform/graphics/chromium/cc/CCSharedQuadState.h:
3670         (CCSharedQuadState):
3671         (WebCore::CCSharedQuadState::scissorRect):
3672
3673 2012-06-04  Kentaro Hara  <haraken@chromium.org>
3674
3675         Remove SelectorQueryCacheEntry from SelectorQuery.h
3676         https://bugs.webkit.org/show_bug.cgi?id=88204
3677
3678         Reviewed by Hajime Morita.
3679
3680         As anttik@ pointed out in https://bugs.webkit.org/show_bug.cgi?id=87942#c15,
3681         we can remove SelectorQueryCacheEntry by having SelectorQuery hold CSSSelectorList.
3682
3683         Tests: fast/dom/SelectorAPI/* No change in test results.
3684
3685         * dom/SelectorQuery.cpp:
3686         (WebCore::SelectorQuery::SelectorQuery):
3687         (WebCore::SelectorQueryCache::add):
3688         * dom/SelectorQuery.h:
3689         (SelectorQuery):
3690         (SelectorQueryCache):
3691
3692 2012-06-04  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
3693
3694         [GTK] Memory leak in PasteboardHelper
3695         https://bugs.webkit.org/show_bug.cgi?id=88216
3696
3697         Reviewed by Martin Robinson.
3698
3699         Fixed a memory leak in PasteboardHelper by using adoptRef instead
3700         of just getting a new reference of TargetList.
3701
3702         No new tests because of no behavior changes.
3703
3704         * platform/gtk/PasteboardHelper.cpp:
3705         (WebCore::PasteboardHelper::dropAtomsForContext):
3706
3707 2012-06-04  Rob Buis  <rbuis@rim.com>
3708
3709         Hit ASSERT when editing attribute value in Element in SVG Document
3710         https://bugs.webkit.org/show_bug.cgi?id=88179
3711
3712         Reviewed by Pavel Feldman.
3713
3714         Make sure the <span> is created as a HTML Element regardless of document in use.
3715
3716         * inspector/InspectorDOMAgent.cpp:
3717         (WebCore):
3718         (WebCore::InspectorDOMAgent::setAttributesAsText):
3719
3720 2012-06-04  Yoshifumi Inoue  <yosin@chromium.org>
3721
3722         [Forms] Change function and variable names independent from "double" type
3723         https://bugs.webkit.org/show_bug.cgi?id=88220
3724
3725         Reviewed by Kent Tamura.
3726
3727         This patch is a part of introducing decimal arithmetic to input type.
3728
3729         This patch renames function and variable names which contain term "double"
3730         to "number" to separate concept and implementation.
3731
3732         No new tests. This patch doesn't change behavior.
3733
3734         * html/BaseDateAndTimeInputType.cpp:
3735         (WebCore::BaseDateAndTimeInputType::valueAsDate): Replace parseToDouble to parseToNumber.
3736         (WebCore::BaseDateAndTimeInputType::valueAsNumber): ditto.
3737         (WebCore::BaseDateAndTimeInputType::parseToNumber): ditto.
3738         * html/BaseDateAndTimeInputType.h:
3739         (BaseDateAndTimeInputType):
3740         * html/DateInputType.cpp:
3741         (WebCore::DateInputType::createStepRange): Replace parseToDouble to parseToNumber.
3742         * html/DateTimeInputType.cpp:
3743         (WebCore::DateTimeInputType::createStepRange): Replace parseToDouble to parseToNumber.
3744         * html/DateTimeLocalInputType.cpp:
3745         (WebCore::DateTimeLocalInputType::createStepRange): Replace parseToDouble to parseToNumber.
3746         * html/InputType.cpp:
3747         (WebCore::InputType::rangeUnderflow): Replace parseToDouble to parseToNumber and doubleValue to numericValue.
3748         (WebCore::InputType::rangeOverflow): ditto.
3749         (WebCore::InputType::isInRange): ditto.
3750         (WebCore::InputType::isOutOfRange): ditto.
3751         (WebCore::InputType::stepMismatch): ditto.
3752         (WebCore::InputType::validationMessage): ditto.
3753         (WebCore::InputType::parseToNumber): ditto.
3754         (WebCore::InputType::parseToDoubleWithDecimalPlaces): ditto.
3755         (WebCore::InputType::stepUpFromRenderer): dttio.
3756         * html/InputType.h:
3757         (InputType):
3758         * html/MonthInputType.cpp:
3759         (WebCore::MonthInputType::createStepRange): Replace parseToDouble to parseToNumber.
3760         (WebCore::MonthInputType::parseToNumber): ditto.
3761         * html/MonthInputType.h:
3762         (MonthInputType):
3763         * html/NumberInputType.cpp:
3764         (WebCore::NumberInputType::valueAsNumber): Replace parseToDouble to parseToNumber.
3765         (WebCore::NumberInputType::createStepRange): ditto.
3766         (WebCore::NumberInputType::parseToNumber): ditto.
3767         * html/NumberInputType.h:
3768         * html/RangeInputType.cpp:
3769         (WebCore::ensureMaximum): Added helper function for createStepRange for avoiding cast in max() and using "const".
3770         (WebCore::RangeInputType::valueAsNumber): Replace parseToDouble to parseToNumber.
3771         (WebCore::RangeInputType::createStepRange): ditto.
3772         (WebCore::RangeInputType::handleKeydownEvent): ditto.
3773         (WebCore::RangeInputType::parseToNumber): ditto.
3774         (WebCore::RangeInputType::sanitizeValue): ditto.
3775         * html/RangeInputType.h:
3776         (RangeInputType):
3777         * html/StepRange.cpp:
3778         (WebCore::StepRange::parseStep): Replace DoubleWithDecimalPlaces to NumberWithDecimalPlaces.
3779         (WebCore::StepRange::stepMismatch): Replace parseToDouble to parseToNumber.
3780         * html/StepRange.h:
3781         (WebCore::StepRange::NumberWithDecimalPlaces): Renamed from DoubleWithDecimalPlaces.
3782         (WebCore::StepRange::NumberWithDecimalPlacesOrMissing): Renamed from DoubleWithDecimalPlacesOrMissing.
3783         * html/TimeInputType.cpp:
3784         (WebCore::TimeInputType::createStepRange): Replace parseToDouble to parseToNumber.
3785         * html/WeekInputType.cpp:
3786         (WebCore::WeekInputType::createStepRange): Replace parseToDouble to parseToNumber.
3787
3788 2012-06-04  David Kilzer  <ddkilzer@apple.com>
3789
3790         BUILD FIX: FeatureDefines.xcconfig should match across projects
3791
3792         * Configurations/FeatureDefines.xcconfig:
3793         - Add missing ENABLE_CSS_IMAGE_RESOLUTION.
3794
3795 2012-06-04  Justin Novosad  <junov@chromium.org>
3796
3797         Canvas 2D - Source rectangles that overlap the source image boundary, not supported by drawImage
3798         https://bugs.webkit.org/show_bug.cgi?id=66574
3799
3800         Reviewed by Stephen White.
3801
3802         Test: fast/canvas/drawImage-clipped-source.html
3803
3804         When the source rectangle argument to drawImage is not entirely
3805         contatained by the domain of the source image, the source rectangle
3806         is clipped, and the destination rectangle is clipped proportionately
3807         Old behavior was to silently fail, which did not comply with the spec.
3808
3809         * html/canvas/CanvasRenderingContext2D.cpp:
3810         (WebCore::normalizeAndClipRects):
3811         (WebCore):
3812         (WebCore::CanvasRenderingContext2D::drawImage):
3813
3814 2012-06-04  Dominik Röttsches  <dominik.rottsches@intel.com>
3815
3816         [Cairo] Implementation of GraphicsContext does not save/restore ImageInterpolation correctly
3817         https://bugs.webkit.org/show_bug.cgi?id=87985
3818
3819         Reviewed by Gustavo Noronha Silva.
3820
3821         Moving image interpolation quality setting into state so that it's saved and restored.
3822
3823         Covered by existing test fast/canvas/canvas-imageSmoothingEnabled.html which is now passing.
3824
3825         * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
3826         (GraphicsContextPlatformPrivate): Removing stale member that was never used.
3827         * platform/graphics/cairo/PlatformContextCairo.cpp:
3828         (WebCore::PlatformContextCairo::State::State):
3829         (PlatformContextCairo::State):
3830         (WebCore::PlatformContextCairo::PlatformContextCairo):
3831         (WebCore::PlatformContextCairo::drawSurfaceToContext):
3832         (WebCore::PlatformContextCairo::setImageInterpolationQuality):
3833         (WebCore):
3834         (WebCore::PlatformContextCairo::imageInterpolationQuality):
3835         * platform/graphics/cairo/PlatformContextCairo.h:
3836         (PlatformContextCairo): Moving implementations for image interpolation quality setter into implementation file.
3837
3838 2012-06-04  Philip Rogers  <pdr@google.com>
3839
3840         Fix assert in non-scaling strokes in patterns
3841         https://bugs.webkit.org/show_bug.cgi?id=88198
3842
3843         When calculating the CTM for a rect or path in a pattern we need to use
3844         an SVGPatternElement's local transform. Pattern did not expose the transform
3845         because it does not extend from from SVGStyledLocatable or SVGStyledTransformable.
3846         This patch exposes the pattern's transform in localCoordinateSpaceTransform.
3847
3848         SVGGradientElement does not need this special handling because the children
3849         of a gradient element are restricted to not include shape and structural elements
3850         that would need to calculate a CTM.
3851
3852         Before this patch the added test would assert.
3853         This patch is a prerequisite to a major refactoring of RenderSVGShape &
3854         friends, and the test will be unskipped in a followup patch.
3855
3856         Reviewed by Dirk Schulze.
3857
3858         Tests: svg/stroke/non-scaling-stroke-pattern-expected.svg
3859                svg/stroke/non-scaling-stroke-pattern.svg
3860
3861         * svg/SVGPatternElement.cpp:
3862         (WebCore::SVGPatternElement::localCoordinateSpaceTransform):
3863         (WebCore):
3864         * svg/SVGPatternElement.h:
3865         (SVGPatternElement):
3866         * svg/SVGStyledElement.cpp:
3867         (WebCore::SVGStyledElement::localCoordinateSpaceTransform):
3868
3869 2012-06-04  Alexei Filippov  <alexeif@chromium.org>
3870
3871         Web Inspector: speed up _calculateRetainedSizes function
3872         https://bugs.webkit.org/show_bug.cgi?id=87863
3873
3874         Reviewed by Yury Semikhatsky.
3875
3876         * inspector/front-end/HeapSnapshot.js:
3877         (WebInspector.HeapSnapshot.prototype._calculateRetainedSizes):
3878
3879 2012-06-04  Yury Semikhatsky  <yurys@chromium.org>
3880
3881         Web Inspector: add unknown size to the memory pie-chart legend
3882         https://bugs.webkit.org/show_bug.cgi?id=88081
3883
3884         Reviewed by Pavel Feldman.
3885
3886         Added "Unknown" part size to the memory pie-chart legend.
3887
3888         * inspector/front-end/NativeMemorySnapshotView.js:
3889         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
3890         (WebInspector.NativeMemoryProfileType.prototype.buttonClicked):
3891         (WebInspector.MemoryBlockViewProperties._initialize):
3892         (WebInspector.NativeMemoryPieChart.prototype._paint):
3893
3894 2012-06-04  Mike West  <mkwst@chromium.org>
3895
3896         Adding explicit console error for duplicated CSP directives.
3897         https://bugs.webkit.org/show_bug.cgi?id=88193
3898
3899         This patch adds an explicit error message for duplicated CSP
3900         directives instead of reusing the "unrecognized directive" error.
3901
3902         Reviewed by Adam Barth.
3903
3904         Test: http/tests/security/contentSecurityPolicy/duplicate-directive.html
3905
3906         * page/ContentSecurityPolicy.cpp:
3907         (CSPDirectiveList):
3908         (WebCore::CSPDirectiveList::logDuplicateDirective):
3909         (WebCore):
3910         (WebCore::CSPDirectiveList::parseReportURI):
3911         (WebCore::CSPDirectiveList::setCSPDirective):
3912         (WebCore::CSPDirectiveList::applySandboxPolicy):
3913         (WebCore::CSPDirectiveList::addDirective):
3914
3915 2012-06-04  Yoshifumi Inoue  <yosin@chromium.org>
3916
3917         REGRESSION(r117929) [Forms] input type=number thinks 0 is not a number
3918         https://bugs.webkit.org/show_bug.cgi?id=88208
3919
3920         Reviewed by Kent Tamura.
3921
3922         This patch fixes invalid handling of return value of parseToDoubleForNumberType
3923         in NumberInputType::isAcceptableValue to use isfinite() function for checking
3924         whether specified string is valid number or not. Before r117929, return value
3925         of parseToDoubleForNumberType was bool, but after r117929, it is double.
3926
3927         Test: fast/forms/number/input-number-from-renderer.html
3928
3929         * html/NumberInputType.cpp:
3930         (WebCore::NumberInputType::isAcceptableValue): Use isfinite()
3931
3932 2012-06-04  Antti Koivisto  <antti@apple.com>
3933
3934         Crash in WebCore::RenderView::getRetainedWidgets
3935         https://bugs.webkit.org/show_bug.cgi?id=88217
3936
3937         Reviewed by Kenneth Rohde Christiansen.
3938         
3939         There is no known repro, the crash has been seen on the field. It is likely that it happens with frame
3940         flattening enabled only.
3941
3942         Null check root renderer in performPostLayoutTasks. The root can legitimely be null for several reasons and
3943         is mostly null checked everywhere else.
3944
3945         * page/FrameView.cpp:
3946         (WebCore::FrameView::performPostLayoutTasks):
3947
3948 2012-06-04  Kentaro Hara  <haraken@chromium.org>
3949
3950         Use SelectorQuery in Element::webkitMatchesSelector()
3951         https://bugs.webkit.org/show_bug.cgi?id=88209
3952
3953         Reviewed by Antti Koivisto.
3954
3955         By using SelectorQuery in Element::webkitMatchesSelector(),
3956         we can not only simplify the code but also improve the performance
3957         thanks to the cache mechanism of SelectorQuery which was implemented
3958         in bug 87942.
3959
3960         Tests: fast/dom/SelectorAPI/*. No change in test results.
3961
3962         * dom/Element.cpp:
3963         (WebCore::Element::webkitMatchesSelector):
3964         * dom/SelectorQuery.cpp:
3965         (WebCore::SelectorQuery::matches):
3966         (WebCore):
3967         * dom/SelectorQuery.h:
3968         (SelectorQuery):
3969
3970 2012-05-31  Kinuko Yasuda  <kinuko@chromium.org>
3971
3972         [chromium] DataTransferItem.webkitGetAsEntry() should synchronously return entry
3973         https://bugs.webkit.org/show_bug.cgi?id=87969
3974
3975         Reviewed by Tony Chang.
3976
3977         Per discussion on whatwg we should make webkitGetAsEntry synchronous.
3978         http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Apr/0079.html
3979
3980         Tests: editing/pasteboard/data-transfer-items-drag-drop-entry.html
3981                fast/filesystem/cross-filesystem-op.html
3982
3983         * Modules/filesystem/DataTransferItemFileSystem.h:
3984         (DataTransferItemFileSystem):
3985         * Modules/filesystem/DataTransferItemFileSystem.idl:
3986         * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp:
3987         (WebCore::DataTransferItemFileSystem::webkitGetAsEntry): Changed it to synchronously return entry.
3988
3989 2012-06-03  Dominic Cooney  <dominicc@chromium.org>
3990
3991         EventTarget.idl should generate JS bindings
3992         https://bugs.webkit.org/show_bug.cgi?id=88120
3993
3994         This is one step in a larger change to expose a constructor for
3995         EventTarget and put EventTarget on the prototype chain of DOM
3996         objects that are event targets, in line with DOM Core. See
3997         <https://bugs.webkit.org/show_bug.cgi?id=67312>
3998
3999         Reviewed by Adam Barth.
4000
4001         No new tests. This change does not change any functionality.
4002
4003         * CMakeLists.txt: Generate JSEventTarget.
4004         * DerivedSources.cpp:
4005         * DerivedSources.make:
4006         * DerivedSources.pri:
4007         * GNUmakefile.list.am:
4008         * Target.pri:
4009         * UseJSC.cmake:
4010         * WebCore.gyp/WebCore.gyp:
4011         * WebCore.gypi:
4012         * WebCore.vcproj/WebCore.vcproj:
4013         * WebCore.xcodeproj/project.pbxproj:
4014         * bindings/js/JSBindingsAllInOne.cpp: JSEventTarget.cpp was renamed.
4015         * bindings/js/JSEventTarget.h: Removed. Generated now.
4016         * bindings/js/JSEventTargetCustom.cpp: Renamed from Source/WebCore/bindings/js/JSEventTarget.cpp.
4017         * bindings/scripts/CodeGeneratorV8.pm:
4018         (GetInternalFields): EventTarget is an EventTarget.
4019         * dom/EventTarget.idl: Defer to toJS, toEventTarget in JSEventTargetCustom.cpp.
4020
4021 2012-06-03  Hayato Ito  <hayato@chromium.org>
4022
4023         Supports traversing nodes in an orphaned shadow subtree in ComposedShadowTreeParentWalker.
4024         https://bugs.webkit.org/show_bug.cgi?id=87924
4025
4026         Reviewed by Dimitri Glazkov.
4027
4028         Some events, such as a 'click' event, can be dispatched on nodes in an orphaned shadow subtree.
4029         When resolving a parent node of a shadow root which is not assigned to any shadow insertion point,
4030         we have to return its shadow host as a parent node.
4031
4032         The related shadow DOM spec section is:
4033         https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html#events
4034
4035         Test: fast/dom/shadow/shadow-dom-event-dispatching.html
4036
4037         * dom/ComposedShadowTreeWalker.cpp:
4038         (WebCore::ComposedShadowTreeParentWalker::traverseParentIncludingInsertionPointAndShadowRoot):
4039
4040 2012-06-03  Sheriff Bot  <webkit.review.bot@gmail.com>
4041
4042         Unreviewed, rolling out r119359.
4043         http://trac.webkit.org/changeset/119359
4044         https://bugs.webkit.org/show_bug.cgi?id=88189
4045
4046         This broke platform/mac/fast/dom/wrapper-classes-objc.html.
4047         (Requested by dominicc on #webkit).
4048
4049         * bindings/objc/PublicDOMInterfaces.h:
4050         * bindings/scripts/CodeGeneratorObjC.pm:
4051         (GetBaseClass):
4052         * dom/MouseEvent.h:
4053         (MouseEvent):
4054         * dom/WheelEvent.cpp:
4055         (WebCore::WheelEvent::WheelEvent):
4056         * dom/WheelEvent.h:
4057         (WheelEvent):
4058         * dom/WheelEvent.idl:
4059
4060 2012-06-03  Dominic Cooney  <dominicc@chromium.org>
4061
4062         WheelEvent should inherit from MouseEvent
4063         https://bugs.webkit.org/show_bug.cgi?id=76104
4064