f7aa4819aeb0bfccce3a5b0b1c6beeb662f38666
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-04-06  James Simonsen  <simonjam@chromium.org>
2
3         Roll out change to HTMLParserIdioms.cpp from 82857
4         https://bugs.webkit.org/show_bug.cgi?id=83402
5
6         Change 82857 causes a DCHECK on fast/forms/number/ValidityState-typeMismatch-number.html
7
8         Darin suggested we roll out this file here: https://bugs.webkit.org/show_bug.cgi?id=82857#c20
9
10         Unreviewed, rolling out change that broke tests.
11
12         * html/parser/HTMLParserIdioms.cpp:
13         (WebCore::parseToDoubleForNumberType):
14
15 2012-04-06  Ilya Sherman  <isherman@chromium.org>
16
17         Allow site authors to override autofilled fields' colors.
18         https://bugs.webkit.org/show_bug.cgi?id=66032
19         http://code.google.com/p/chromium/issues/detail?id=46543
20
21         Reviewed by Simon Fraser.
22
23         * css/html.css:
24         (input:-webkit-autofill): Remove !important declarations.
25
26 2012-04-05  Enrica Casucci  <enrica@apple.com>
27
28         Provide Obj-C private API to simplify markup.
29         https://bugs.webkit.org/show_bug.cgi?id=83334
30         <rdar://problem/11033861>
31
32         Reviewed by Sam Weinig.
33
34         Added test in TestWebKitAPI
35
36         * WebCore.exp.in:
37         * editing/Editor.cpp:
38         (WebCore::Editor::simplifyMarkup): Exposing the new command through the editor.
39         * editing/Editor.h:
40
41 2012-04-06  Benjamin Poulain  <bpoulain@apple.com>
42
43         Get rid of the useless flag PREEMPT_GEOLOCATION_PERMISSION
44         https://bugs.webkit.org/show_bug.cgi?id=83325
45
46         Reviewed by Ryosuke Niwa.
47
48         The flag WTF_USE_PREEMPT_GEOLOCATION_PERMISSION was added in r63742 but
49         was never disabled by anyone. Supporting this feature added complexity by
50         introducing two authorization scheme.
51
52         This patch removes WTF_USE_PREEMPT_GEOLOCATION_PERMISSION and the code supporting
53         granting the authorization after startUpdating().
54
55         * Modules/geolocation/Geolocation.cpp:
56         (WebCore::Geolocation::GeoNotifier::runSuccessCallback): With the simplified
57         authorization code, we ensure stronger constraint on GeoNotifier::runSuccessCallback().
58         (WebCore::Geolocation::stop):
59         (WebCore::Geolocation::startRequest):
60         (WebCore::Geolocation::clearWatch):
61         (WebCore::Geolocation::setIsAllowed):
62         (WebCore::Geolocation::positionChanged): The case (!isAllowed()) was there
63         to support granting the authorization for WTF_USE_PREEMPT_GEOLOCATION_PERMISSION.
64         (WebCore::Geolocation::handlePendingPermissionNotifiers):
65         * Modules/geolocation/Geolocation.h:
66         (Geolocation):
67
68 2012-04-06  Tom Sepez  <tsepez@chromium.org>
69
70         Block cross-origin iframe scroll to fragment.
71         https://bugs.webkit.org/show_bug.cgi?id=73083
72
73         Reviewed by Adam Barth.
74
75         Add a restriction similar to what FF has done for all iframes for over a
76         year now. Our change is less disruptive in that it only does this in the
77         cross-orgin case, which is where the fragment scrolling is problematic.
78
79         Test: http/tests/navigation/anchor-frames-cross-origin.html
80
81         * dom/Document.cpp:
82         (WebCore::Document::canBeAccessedByEveryAncestorFrame):
83         (WebCore):
84         * dom/Document.h:
85         (Document):
86         * loader/FrameLoader.cpp:
87         (WebCore::FrameLoader::finishedParsing):
88         (WebCore::FrameLoader::loadInSameDocument):
89         (WebCore::FrameLoader::loadURL):
90         (WebCore::FrameLoader::loadWithDocumentLoader):
91         (WebCore::FrameLoader::shouldPerformFragmentNavigation):
92         (WebCore::FrameLoader::scrollToFragmentIfAllowed):
93         (WebCore):
94         * loader/FrameLoader.h:
95         (FrameLoader):
96
97 2012-04-03  Jer Noble  <jer.noble@apple.com>
98
99         Foreground of apple.com/iphone video page visible during full screen animation.
100         https://bugs.webkit.org/show_bug.cgi?id=83080
101
102         Reviewed by Simon Fraser.
103
104         No new tests; updated fullscreen/full-screen-stacking-context.html
105
106         The apple.com/iphone video page uses a -webkit-mask: CSS style, which creates a stacking
107         context and causes the page to pop in front of the full screen renderer.  Add all the
108         styles suggested by the W3C full screen spec to the -webkit-full-screen-ancestor rule
109         to keep these stacking contexts from being created.
110
111         * css/fullscreen.css:
112         (:-webkit-full-screen-ancestor:not(iframe)):
113
114 2012-04-06  Abhishek Arya  <inferno@chromium.org>
115
116         Virtualize createAnonymousBoxWithSameTypeAs.
117         https://bugs.webkit.org/show_bug.cgi?id=83229
118
119         Reviewed by Julien Chaffraix.
120
121         This helps to use the same function to create anonymous
122         table parts and in the future extend to more classes
123         derived from RenderBox.
124
125         The current switch case situation was going to be messy as
126         we will need to mix cases that were very dependent on the
127         class, so it made sense to add a virtual function.
128
129         * rendering/RenderBlock.cpp:
130         (WebCore::RenderBlock::splitAnonymousBlocksAroundChild):
131         (WebCore::RenderBlock::createAnonymousBoxWithSameTypeAs):
132         * rendering/RenderBlock.h:
133         (RenderBlock):
134         * rendering/RenderBox.h:
135         (WebCore::RenderBox::createAnonymousBoxWithSameTypeAs):
136         (RenderBox):
137         * rendering/RenderInline.cpp:
138         (WebCore::RenderInline::splitFlow):
139         * rendering/RenderTable.h:
140         (WebCore::RenderTable::createAnonymousBoxWithSameTypeAs):
141         * rendering/RenderTableCell.h:
142         (WebCore::RenderTableCell::createAnonymousBoxWithSameTypeAs):
143         * rendering/RenderTableRow.h:
144         (WebCore::RenderTableRow::createAnonymousBoxWithSameTypeAs):
145         * rendering/RenderTableSection.h:
146         (WebCore::RenderTableSection::createAnonymousBoxWithSameTypeAs):
147
148 2012-04-06  Tim Horton  <timothy_horton@apple.com>
149
150         [cg] REGRESSION (r101517): Animating the transform of a <rect> with shape-rendering: crispEdges leaves behind garbage
151         https://bugs.webkit.org/show_bug.cgi?id=82963
152         <rdar://problem/11170476>
153
154         Reviewed by Simon Fraser.
155
156         CoreGraphics can inflate the stroke by 1px when drawing a rectangle
157         with antialiasing disabled at non-integer coordinates, we need to
158         compensate by inflating the RenderSVGRect repaint bounds by 1px.
159
160         No new tests, as this is not reproducible in DRT or WKTR.
161
162         * rendering/svg/RenderSVGRect.cpp:
163         (WebCore::RenderSVGRect::createShape):
164         (WebCore::RenderSVGRect::strokeBoundingBox):
165         * rendering/svg/RenderSVGRect.h:
166         (RenderSVGRect):
167
168 2012-04-05  Simon Fraser  <simon.fraser@apple.com>
169
170         Avoid trying to set filters on transform layers
171         https://bugs.webkit.org/show_bug.cgi?id=83344
172
173         Reviewed by Dean Jackson.
174
175         Return early from GraphicsLayerCA::setFilters() when the filters
176         haven't changed. This avoids trying to clear filters on CALayers
177         which never had them, which should both help performance, and avoids
178         console spew related to setting shadow properties on transform layers.
179         
180         * platform/graphics/ca/GraphicsLayerCA.cpp:
181         (WebCore::GraphicsLayerCA::setFilters):
182
183 2012-04-06  James Robinson  <jamesr@chromium.org>
184
185         WebGL content swapped at wrong time in threaded compositing mode
186         https://bugs.webkit.org/show_bug.cgi?id=82275
187
188         Reviewed by Kenneth Russell.
189
190         When using threaded compositing, we need to defer touching the texture ID being used by the compositor until the
191         appropriate point in the synchronization routine and not before. Specifically, there is no time at which it is
192         safe to manipulate the texture the compositor may be using from the main thread. This breaks up the presentation
193         path into a few pieces (depending on the context attributes) in order to maintain these invariants.
194
195         Depending on the context attributes and if we're in threaded mode, there are a few different possible back/front
196         buffer combinations:
197
198         - When the context is antialiased, we have a multisampled renderbuffer and associated framebuffer.
199         - In all cases, we have a color texture back buffer.
200         - When preserveDrawingBuffer is set or threaded compositing is enabled, we have a separate color texture as a
201         front buffer.
202
203         The resource update is in two phases. First, on the main thread, we prepare the back buffer. This resolves from
204         the multisampled FBO into the back color buffer if multisampled and swaps the front / back color buffer textures
205         if preserveDrawingBuffer is false and we're using separate front / back color buffers. Second, on the compositor
206         thread, we do a texture copy from the back to the front color buffer if preserveDrawingBuffer is true. After
207         these steps are complete the main thread is free to manipulate the back buffer color texture without affecting
208         any resources the compositor is using.
209
210         One incidental cleanup this patch also does is remove all state queries from DrawingBuffer::clearFramebuffer().
211
212         Tests: fast/canvas/webgl/webgl-composite-modes-repaint.html
213                fast/canvas/webgl/webgl-composite-modes.html
214
215         * html/canvas/WebGLRenderingContext.cpp:
216         (WebCore):
217         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
218         (WebCore::WebGLRenderingContext::clearIfComposited):
219         (WebCore::WebGLRenderingContext::restoreStateAfterClear):
220         (WebCore::WebGLRenderingContext::reshape):
221         (WebCore::WebGLRenderingContext::maybeRestoreContext):
222         * html/canvas/WebGLRenderingContext.h:
223         (WebGLRenderingContext):
224         * platform/graphics/blackberry/DrawingBufferBlackBerry.cpp:
225         (WebCore::DrawingBuffer::DrawingBuffer):
226         (WebCore):
227         (WebCore::DrawingBuffer::prepareBackBuffer):
228         (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer):
229         (WebCore::DrawingBuffer::frontColorBuffer):
230         * platform/graphics/cairo/DrawingBufferCairo.cpp:
231         (WebCore::DrawingBuffer::DrawingBuffer):
232         (WebCore):
233         (WebCore::DrawingBuffer::prepareBackBuffer):
234         (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer):
235         (WebCore::DrawingBuffer::frontColorBuffer):
236         * platform/graphics/chromium/DrawingBufferChromium.cpp:
237         (WebCore::generateColorTexture):
238         (WebCore::DrawingBuffer::DrawingBuffer):
239         (WebCore::DrawingBuffer::initialize):
240         (WebCore::DrawingBuffer::prepareBackBuffer):
241         (WebCore):
242         (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer):
243         (WebCore::DrawingBuffer::frontColorBuffer):
244         (WebCore::DrawingBuffer::platformLayer):
245         * platform/graphics/chromium/WebGLLayerChromium.cpp:
246         (WebCore::WebGLLayerChromium::WebGLLayerChromium):
247         (WebCore::WebGLLayerChromium::paintContentsIfDirty):
248         (WebCore::WebGLLayerChromium::updateCompositorResources):
249         (WebCore::WebGLLayerChromium::paintRenderedResultsToCanvas):
250         (WebCore::WebGLLayerChromium::setNeedsDisplayRect):
251         (WebCore::WebGLLayerChromium::setDrawingBuffer):
252         * platform/graphics/chromium/WebGLLayerChromium.h:
253         (WebGLLayerChromium):
254         * platform/graphics/clutter/DrawingBufferClutter.cpp:
255         (WebCore::DrawingBuffer::DrawingBuffer):
256         (WebCore):
257         (WebCore::DrawingBuffer::prepareBackBuffer):
258         (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer):
259         (WebCore::DrawingBuffer::frontColorBuffer):
260         * platform/graphics/filters/FECustomFilter.cpp:
261         (WebCore::FECustomFilter::initializeContext):
262         * platform/graphics/gpu/DrawingBuffer.cpp:
263         (WebCore::DrawingBuffer::create):
264         (WebCore::DrawingBuffer::clear):
265         (WebCore::DrawingBuffer::clearFramebuffer):
266         (WebCore::DrawingBuffer::reset):
267         (WebCore::DrawingBuffer::discardResources):
268         * platform/graphics/gpu/DrawingBuffer.h:
269         (DrawingBuffer):
270         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
271         (WebCore::DrawingBuffer::DrawingBuffer):
272         (WebCore):
273         (WebCore::DrawingBuffer::prepareBackBuffer):
274         (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer):
275         (WebCore::DrawingBuffer::frontColorBuffer):
276         * platform/graphics/gpu/qt/DrawingBufferQt.cpp:
277         (WebCore::DrawingBuffer::DrawingBuffer):
278         (WebCore::DrawingBuffer::platformLayer):
279         (WebCore::DrawingBuffer::prepareBackBuffer):
280         (WebCore::DrawingBuffer::requiresCopyFromBackToFrontBuffer):
281         (WebCore):
282         (WebCore::DrawingBuffer::frontColorBuffer):
283
284 2012-04-06  Julien Chaffraix  <jchaffraix@webkit.org>
285
286         Unreviewed build fix after r113486 and r113487.
287
288         * rendering/RenderObject.cpp:
289         Added missing #include.
290
291         * rendering/RenderView.h:
292         Removed bad OVERRIDE.
293
294 2012-04-06  Beth Dakin  <bdakin@apple.com>
295
296         https://bugs.webkit.org/show_bug.cgi?id=81939
297         -webkit-image-set should update dynamically when the device scale factor 
298         changes
299         -and corresponding-
300         <rdar://problem/11101108> 
301
302         Reviewed by Darin Adler.
303
304         New member variable to keep track of the scale factor.
305         * css/CSSImageSetValue.cpp:
306         (WebCore::CSSImageSetValue::CSSImageSetValue):
307         (WebCore::CSSImageSetValue::bestImageForScaleFactor):
308
309          Merge the two cachedImageSet functions. There was no need for two functions here.
310         (WebCore::CSSImageSetValue::cachedImageSet):
311
312         cachedOrPendingImageSet() now takes a Document as a parameter so that it can 
313         access the deviceScaleFactor. If there is a cached image already and the 
314         Document's deviceScaleFactor doesn't match m_scaleFactor, then m_imageSet is set 
315         to a pending image so that the best fit image will be reassessed and then 
316         loaded.
317         (WebCore::CSSImageSetValue::cachedOrPendingImageSet):
318         * css/CSSImageSetValue.h:
319         (WebCore):
320         (CSSImageSetValue):
321
322         cachedOrPendingImageSet() now takes a Document.
323         * css/CSSStyleSelector.cpp:
324         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
325
326         StyleCachedImageSet should inherit from CachedImageClient just like 
327         StyleCachedImage. It should add and remove itself as a client upon creation 
328         and destruction, respectively.
329         * rendering/style/StyleCachedImageSet.cpp:
330         (WebCore::StyleCachedImageSet::StyleCachedImageSet):
331         (WebCore):
332         (WebCore::StyleCachedImageSet::~StyleCachedImageSet):
333         * rendering/style/StyleCachedImageSet.h:
334         (StyleCachedImageSet):
335
336 2012-04-06  Levi Weintraub  <leviw@chromium.org>
337
338         Update LayoutUnit usage in RenderView
339         https://bugs.webkit.org/show_bug.cgi?id=83147
340
341         Reviewed by Julien Chaffraix.
342
343         Updating the usage of LayoutUnits in RenderView in preparation for sub-pixel layout. This mostly
344         affects paint and repaint functions, which take LayoutRects up to the RenderView level. This is
345         necessary as we continue to accumulate sub-pixel offsets up to this level.
346
347         No new tests. No change in behavior.
348
349         * rendering/RenderView.cpp:
350         (WebCore::RenderView::paint): Adding an assert that we're being called to paint on pixel
351         boundaries. We don't currently ever position RenderViews at sub-pixel offsets.
352         (WebCore::RenderView::shouldRepaint):
353         (WebCore::RenderView::repaintViewRectangle): Switching to a LayoutRect and cleaning up a fixme
354         that used decomposed offsets. Pixel snapping is applied before handing the rect up to the
355         FrameView.
356         (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers): Pixel snapping before handing
357         the rect up to the Compositor.
358         (WebCore::RenderView::computeRectForRepaint):
359         (WebCore::RenderView::selectionBounds):
360         (WebCore::RenderView::viewRect):
361         (WebCore::RenderView::unscaledDocumentRect):
362         * rendering/RenderView.h:
363         (RenderView):
364
365 2012-04-06  Tim Horton  <timothy_horton@apple.com>
366
367         Add autodetection of image orientation from EXIF information
368         https://bugs.webkit.org/show_bug.cgi?id=19688
369         <rdar://problem/4126979> and <rdar://problem/11091578>
370
371         Original patch by David Carson and Eric Seidel.
372
373         Reviewed by Simon Fraser.
374
375         Add support for respecting EXIF image orientation, enabled by default for ImageDocuments.
376         The setting shouldRespectImageOrientation causes orientation to take effect for any image included via <img>.
377
378         Test: fast/images/exif-orientation.html, fast/images/exif-orientation-css.html
379
380         * WebCore.xcodeproj/project.pbxproj: Add ImageOrientation.{cpp, h}
381         * loader/cache/CachedImage.cpp:
382         (WebCore::CachedImage::imageForRenderer): Plumb setting down from RenderObject into Image.
383         (WebCore::CachedImage::imageSizeForRenderer):
384         * page/Settings.h:
385         (WebCore::Settings::setShouldRespectImageOrientation):
386         (WebCore::Settings::shouldRespectImageOrientation):
387         (Settings):
388         * platform/graphics/BitmapImage.cpp:
389         (WebCore::BitmapImage::cacheFrame):
390         (WebCore::BitmapImage::size):
391         (WebCore::BitmapImage::sizeRespectingOrientation):
392         (WebCore):
393         (WebCore::BitmapImage::ensureFrameIsCached):
394         (WebCore::BitmapImage::frameAtIndex):
395         (WebCore::BitmapImage::frameIsCompleteAtIndex):
396         (WebCore::BitmapImage::frameDurationAtIndex):
397         (WebCore::BitmapImage::frameHasAlphaAtIndex):
398         (WebCore::BitmapImage::frameOrientationAtIndex):
399         * platform/graphics/BitmapImage.h:
400         (WebCore::FrameData::FrameData):
401         (FrameData):
402         (BitmapImage):
403         * platform/graphics/GraphicsContext.h:
404         (GraphicsContext):
405         * platform/graphics/ImageOrientation.cpp: Added.
406         (WebCore):
407         (WebCore::ImageOrientation::transformFromDefault):
408         * platform/graphics/ImageOrientation.h: Added.
409         (WebCore):
410         (ImageOrientation):
411         (WebCore::ImageOrientation::ImageOrientation):
412         (WebCore::ImageOrientation::usesWidthAsHeight):
413         (WebCore::ImageOrientation::fromEXIFValue):
414         (WebCore::ImageOrientation::operator==):
415         (WebCore::ImageOrientation::operator!=):
416         * platform/graphics/ImageSource.cpp:
417         (WebCore::ImageSource::orientationAtIndex):
418         (WebCore):
419         * platform/graphics/ImageSource.h:
420         (WebCore):
421         * platform/graphics/cg/GraphicsContextCG.cpp:
422         (WebCore::GraphicsContext::drawNativeImage): Transform the image while drawing if its orientation requires it.
423         * platform/graphics/cg/ImageBufferCG.cpp:
424         (WebCore::ImageBuffer::draw):
425         * platform/graphics/cg/ImageCG.cpp:
426         (WebCore::FrameData::clear):
427         (WebCore::BitmapImage::BitmapImage):
428         (WebCore::BitmapImage::draw):
429         * platform/graphics/cg/ImageSourceCG.cpp:
430         (WebCore::imageSourceOptions): Don't use SkipMetaData on Lion/Snow Leopard, as it prevents us from retrieving orientation data.
431         (WebCore::ImageSource::frameSizeAtIndex): Adjust the image's size based on its orientation.
432         (WebCore):
433         (WebCore::ImageSource::orientationAtIndex):
434         (WebCore::ImageSource::size):
435         * platform/graphics/mac/DragImageMac.mm:
436         (createDragImageFromImage): Create scaled copy of image for drag image if we're respecting orientation and it is non-default.
437         * rendering/RenderObject.h:
438         (RenderObject):
439         (WebCore::RenderObject::shouldRespectImageOrientation):
440
441 2012-04-06  Levi Weintraub  <leviw@chromium.org>
442
443         Correct LayoutUnit usgae in RenderThemeQt and RenderThemeQStyle
444         https://bugs.webkit.org/show_bug.cgi?id=83376
445
446         Reviewed by Eric Seidel.
447
448         Correcting LayoutUnit usage in QT RenderTheme code.
449
450         No new tests. No change in behavior.
451
452         * platform/qt/RenderThemeQt.cpp:
453         (WebCore::RenderThemeQt::convertToPaintingRect): Rounding the ancestor offset before
454         applying it to the pixel snapped partRect.
455         (WebCore::RenderThemeQt::paintSearchFieldCancelButton): Also rounding the ancestor
456         offset, and also pixel snapping the content rect before painting.
457
458 2012-04-06  Kenneth Russell  <kbr@google.com>
459
460         context-lost.html is failing
461         https://bugs.webkit.org/show_bug.cgi?id=81325
462
463         Reviewed by James Robinson.
464
465         Ensure that the DrawingBuffer does not attempt to restore the
466         TEXTURE_2D binding to an already-deleted texture.
467
468         Tested with layout test fast/canvas/webgl/context-lost.html as
469         well as WebGL conformance tests.
470
471         * html/canvas/WebGLRenderingContext.cpp:
472         (WebCore):
473         (WebCore::WebGLRenderingContext::loseContextImpl):
474
475 2012-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
476
477         Unreviewed, rolling out r113267.
478         http://trac.webkit.org/changeset/113267
479         https://bugs.webkit.org/show_bug.cgi?id=83384
480
481         causes dhtml perf regression (Requested by simonjam on
482         #webkit).
483
484         * dom/ChildListMutationScope.cpp:
485         (ChildListMutationScope::MutationAccumulator):
486         (WebCore::ChildListMutationScope::MutationAccumulator::isAddedNodeInOrder):
487         (WebCore::ChildListMutationScope::MutationAccumulator::childAdded):
488         (WebCore::ChildListMutationScope::MutationAccumulationRouter::childAdded):
489         * dom/ChildListMutationScope.h:
490         (WebCore::ChildListMutationScope::childAdded):
491         (MutationAccumulationRouter):
492         * dom/ContainerNode.cpp:
493         (WebCore):
494         (WebCore::ContainerNode::insertBefore):
495         (WebCore::ContainerNode::replaceChild):
496         (WebCore::ContainerNode::appendChild):
497         (WebCore::dispatchChildInsertionEvents):
498         (WebCore::updateTreeAfterInsertion):
499
500 2012-04-06  Joshua Bell  <jsbell@chromium.org>
501
502         IndexedDB: ObjectStore/Index shouldn't hold reference to backing store
503         https://bugs.webkit.org/show_bug.cgi?id=83074
504
505         We should be able to collect and close the leveldb backing store as soon as the database
506         connection is closed, but the IDBObjectStoreBackendImpl and IDBIndexBackendImpl were
507         holding RefPtrs, and those objects are kept alive by script references.
508
509         Replaced RefPtrs to the IDBBackingStore with pointers to the IDBDatabase. On the back end,
510         IDBDatabaseBackendImpl maintains a RefPtr to the IDBObjectStoreBackendImpl object, so 
511         a raw pointer back is safe. On the front end, the IDBObjectStore maintains a RefPtr to
512         the IDBDatabase so script can navigate upwards. Ditto on both ends for the ObjectStore/Index
513         relationship. The frontend objects maintain RefPtrs to the backend objects, so the backend
514         objects and their owners are maintained as long as there's a script reference.
515
516         Also made IDBDatabaseBackendImpl handle a null IDBFactoryBackendImpl pointer, for testing.
517
518         Reviewed by Tony Chang.
519
520         Tests: webkit_unit_tests --gtest_filter="IDBDatabaseBackendTest.*"
521
522         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
523         (WebCore::IDBDatabaseBackendImpl::~IDBDatabaseBackendImpl):
524         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
525         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
526         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
527         (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
528         (WebCore::IDBIndexBackendImpl::openCursorInternal):
529         (WebCore::IDBIndexBackendImpl::countInternal):
530         (WebCore::IDBIndexBackendImpl::getInternal):
531         (WebCore::IDBIndexBackendImpl::addingKeyAllowed):
532         * Modules/indexeddb/IDBIndexBackendImpl.h:
533         (WebCore::IDBIndexBackendImpl::create):
534         (IDBIndexBackendImpl):
535         (WebCore::IDBIndexBackendImpl::backingStore):
536         (WebCore::IDBIndexBackendImpl::databaseId):
537         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
538         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
539         (WebCore::IDBObjectStoreBackendImpl::getInternal):
540         (WebCore::IDBObjectStoreBackendImpl::putInternal):
541         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
542         (WebCore::IDBObjectStoreBackendImpl::clearInternal):
543         (WebCore):
544         (WebCore::IDBObjectStoreBackendImpl::createIndex):
545         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
546         (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal):
547         (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
548         (WebCore::IDBObjectStoreBackendImpl::countInternal):
549         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
550         (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey):
551         * Modules/indexeddb/IDBObjectStoreBackendImpl.h:
552         (WebCore::IDBObjectStoreBackendImpl::create):
553         (IDBObjectStoreBackendImpl):
554         (WebCore::IDBObjectStoreBackendImpl::backingStore):
555         (WebCore::IDBObjectStoreBackendImpl::databaseId):
556
557 2012-04-06  Jon Lee  <jonlee@apple.com>
558
559         Fix build warning on const long long to int implicit conversion.
560
561         * inspector/InspectorApplicationCacheAgent.cpp:
562         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
563
564 2012-04-06  Emil A Eklund  <eae@chromium.org>
565
566         Fix LayoutUnit usage and rounding in RenderBlock and RenderEmbeddedObject
567         https://bugs.webkit.org/show_bug.cgi?id=83343
568
569         Reviewed by Eric Seidel.
570
571         Fix usage of LayoutUnits and rounding/pixel snapping in RenderBlock and
572         RenderEmbeddedObject in preparation for turing on subpixel support.
573
574         No new tests, no change in functionality.
575
576         * rendering/RenderBlock.cpp:
577         (WebCore::RenderBlock::baselinePosition):
578         * rendering/RenderEmbeddedObject.cpp:
579         (WebCore::RenderEmbeddedObject::nodeAtPoint):
580
581 2012-04-06  Dan Bernstein  <mitz@apple.com>
582
583         <rdar://problem/10912476> HiDPI: Have canvas use a hidpi backing store, but downsample upon access
584
585         Reviewed by Sam Weinig.
586
587         * Configurations/FeatureDefines.xcconfig: Added ENABLE_HIGH_DPI_CANVAS.
588
589 2012-04-06  Levi Weintraub  <leviw@chromium.org>
590
591         Update LayoutUnit usage in Editor and Frame
592         https://bugs.webkit.org/show_bug.cgi?id=83278
593
594         Reviewed by Eric Seidel.
595
596         Frame and Editor both take input from the embedder, which passes along coordinates in screen
597         coordinates, which aren't fractional. Updating a few remaining functions to show this, and correcting
598         some inconsistencies in LayoutUnit usage.
599
600         No new tests. No change in behavior.
601
602         * editing/Editor.cpp:
603         (WebCore::Editor::rangeForPoint): windowToContents returns an IntPoint.
604         (WebCore::Editor::countMatchesForText): Using enclosingIntRect since we're (fake) repainting the entire
605         view rect.
606         * editing/Editor.h:
607         (Editor): Correcting mismatched function signature.
608         * page/Frame.cpp:
609         (WebCore::Frame::visiblePositionForPoint): Frame takes points in screen coordinates, usually from the
610         embedder. Changing these functions to be in IntPoints.
611         (WebCore::Frame::documentAtPoint): Ditto.
612         (WebCore::Frame::rangeForPoint): Ditto.
613         * page/Frame.h:
614         (Frame):
615         * platform/graphics/IntRect.h:
616         (enclosingIntRect): Adding an inline no-op copy of the FractionalLayoutRect method enclosingIntRect.
617
618 2012-04-06  Tommy Widenflycht  <tommyw@google.com>
619
620         MediaStream API: Deleting the chromium bridge class MediaStreamCenterInternal
621         https://bugs.webkit.org/show_bug.cgi?id=83167
622
623         Reviewed by Adam Barth.
624
625         The situation before this patch is that we had a MediaStreamCenter.h with #ifdefs for the chromium specific
626         private class MediaStreamCenterInternal. This bridge class only shuffled calls between MediaStreamCenter and
627         WebMediaStreamCenter and was needed before the introduction of Platform.
628         To get rid of this now unnecessary class I had two alternatives:
629         1) Sprinkle platform/MediaStreamCenter.h with more #ifdefs, including around the class declaration.
630         2) Create an abstract base class that the chromium and gstreamer implementations overrides.
631         My personal preference is 2) since I strongly dislike #ifdefs. The drawback is that MediaStreamCenter now
632         has a vtable. However since all methods in this class are extremely low-usage it doesn't affect anything
633         in practice.
634
635         No code behaviour changes.
636
637         * GNUmakefile.am:
638         * GNUmakefile.list.am:
639         * Modules/mediastream/MediaStreamTrack.cpp:
640         (WebCore::MediaStreamTrack::setEnabled):
641         * Modules/mediastream/UserMediaRequest.cpp:
642         * Modules/mediastream/UserMediaRequest.h:
643         * WebCore.gyp/WebCore.gyp:
644         * WebCore.gypi:
645         * platform/chromium/support/WebMediaStreamSourcesRequest.cpp:
646         * platform/mediastream/MediaStreamCenter.cpp:
647         (WebCore::MediaStreamCenter::MediaStreamCenter):
648         (WebCore):
649         (WebCore::MediaStreamCenter::~MediaStreamCenter):
650         * platform/mediastream/MediaStreamCenter.h:
651         (WebCore):
652         (MediaStreamCenter):
653         * platform/mediastream/MediaStreamSourcesQueryClient.h: Copied from Source/WebCore/platform/mediastream/MediaStreamCenter.h.
654         (WebCore):
655         (MediaStreamSourcesQueryClient):
656         (WebCore::MediaStreamSourcesQueryClient::~MediaStreamSourcesQueryClient):
657         * platform/mediastream/chromium/MediaStreamCenterChromium.cpp:
658         (WebCore::MediaStreamCenter::instance):
659         (WebCore::MediaStreamCenterChromium::MediaStreamCenterChromium):
660         (WebCore::MediaStreamCenterChromium::~MediaStreamCenterChromium):
661         (WebCore::MediaStreamCenterChromium::queryMediaStreamSources):
662         (WebCore::MediaStreamCenterChromium::didSetMediaStreamTrackEnabled):
663         (WebCore::MediaStreamCenterChromium::didStopLocalMediaStream):
664         (WebCore::MediaStreamCenterChromium::didConstructMediaStream):
665         (WebCore::MediaStreamCenterChromium::constructSDP):
666         (WebCore):
667         (WebCore::MediaStreamCenterChromium::stopLocalMediaStream):
668         * platform/mediastream/chromium/MediaStreamCenterChromium.h: Renamed from Source/WebCore/platform/mediastream/chromium/MediaStreamCenterInternal.h.
669         (WebKit):
670         (WebCore):
671         (MediaStreamCenterChromium):
672         * platform/mediastream/chromium/MediaStreamCenterInternal.cpp: Removed.
673         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Copied from Source/WebCore/platform/mediastream/MediaStreamCenter.cpp.
674         (WebCore):
675         (WebCore::MediaStreamCenter::instance):
676         (WebCore::MediaStreamCenterGStreamer::MediaStreamCenterGStreamer):
677         (WebCore::MediaStreamCenterGStreamer::~MediaStreamCenterGStreamer):
678         (WebCore::MediaStreamCenterGStreamer::queryMediaStreamSources):
679         (WebCore::MediaStreamCenterGStreamer::didSetMediaStreamTrackEnabled):
680         (WebCore::MediaStreamCenterGStreamer::didStopLocalMediaStream):
681         (WebCore::MediaStreamCenterGStreamer::didConstructMediaStream):
682         (WebCore::MediaStreamCenterGStreamer::constructSDP):
683         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h: Copied from Source/WebCore/platform/mediastream/MediaStreamCenter.h.
684         (WebCore):
685         (MediaStreamCenterGStreamer):
686
687 2012-04-05  Simon Fraser  <simon.fraser@apple.com>
688
689         Should disable preserves3D() for things that enforce flattening, like overflow and filters
690         https://bugs.webkit.org/show_bug.cgi?id=83337
691
692         Reviewed by Dean Jackson.
693         
694         The CSS3 Transforms spec says that some properties should cause flattening
695         of things with transform-style: preserve-3d. We currently do this as a side
696         effect of the GraphicsLayer structure, but we should really do it at the
697         RenderStyle level, as we do for other things like stacking context creation.
698
699         Test: compositing/overflow-trumps-transform-style.html
700
701         * css/CSSStyleSelector.cpp:
702         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
703
704 2012-04-06  Tommy Widenflycht  <tommyw@google.com>
705
706         MediaStream API: MediaStreams stops proper cleanup to take place during a page reload.
707         https://bugs.webkit.org/show_bug.cgi?id=83143
708
709         Reviewed by Adam Barth.
710
711         To fix this I have converted MediaStream and LocalMediaStream to be ActiveDOMObjects.
712
713         Have no idea how to write a test that succesfully verifies this. I have done manual testing
714         to verify that proper tear-down now takes place.
715
716         * Modules/mediastream/LocalMediaStream.cpp:
717         (WebCore::LocalMediaStream::create):
718         (WebCore::LocalMediaStream::stopFunction):
719         (WebCore):
720         * Modules/mediastream/LocalMediaStream.h:
721         (LocalMediaStream):
722         * Modules/mediastream/LocalMediaStream.idl:
723         * Modules/mediastream/MediaStream.cpp:
724         (WebCore::MediaStream::create):
725         (WebCore::MediaStream::MediaStream):
726         (WebCore::MediaStream::scriptExecutionContext):
727         * Modules/mediastream/MediaStream.h:
728         (MediaStream):
729
730 2012-04-06  Dan Bernstein  <mitz@apple.com>
731
732         <rdar://problem/10912476> Pixel access canvas APIs do not work transparently with high-DPI backing store
733         https://bugs.webkit.org/show_bug.cgi?id=83072
734
735         Reviewed by Simon Fraser.
736
737         Made getImageData, putImageData, and toDataURL downsample/upsample when pixels in the canvas
738         backing store are not in a 1:1 ratio to CSS pixels. This makes clients of these APIs
739         indifferent to the backing store resolution, up to sampling artifacts.
740
741         In order for this to work, ImageBuffer has to know and respect the resolutionScale
742         parameter. This change makes the Core Graphics-based implementation of ImageBuffer do this,
743         but on other platforms, resolutionScale values other than 1 will not work. Such platforms
744         should not enable the HIGH_DPI_CANVAS feature.
745
746         * html/HTMLCanvasElement.cpp:
747         (WebCore::HTMLCanvasElement::HTMLCanvasElement): Updated a comment.
748         (WebCore::HTMLCanvasElement::createImageBuffer): Changed to create an ImageBuffer with
749         the desired resolution instead of 1.
750         * html/canvas/CanvasRenderingContext2D.cpp:
751         (WebCore::CanvasRenderingContext2D::drawImage): Removed code that scaled the source rect,
752         since this is now handled at the ImageBuffer level.
753         (WebCore::CanvasRenderingContext2D::createImageData): Now returns ImageData of the requested
754         size regardless of the backing store resolution.
755         (WebCore::CanvasRenderingContext2D::getImageData): Ditto.
756         * platform/graphics/ImageBuffer.h:
757         (WebCore::ImageBuffer::create): Removed some code that tried to apply the resolution scale
758         to the buffer after creating it, and changed to pass the resolution scale down to the
759         (platform-specific) constructor, which can apply it correctly.
760         * platform/graphics/cairo/ImageBufferCairo.cpp:
761         (WebCore::ImageBuffer::ImageBuffer):
762         * platform/graphics/cg/ImageBufferCG.cpp:
763         (WebCore::ImageBuffer::ImageBuffer): Added a resolutionScale parameter, which is used to
764         compute the backing buffer size, and to apply a device scale factor to the context.
765         (WebCore::ImageBuffer::copyImage): Changed to return an image scaled down to the logical
766         size of the buffer.
767         (WebCore::ImageBuffer::getUnmultipliedImageData): Changed to pass the resolution scale to
768         ImageData::getData().
769         (WebCore::ImageBuffer::getPremultipliedImageData): Ditto.
770         (WebCore::ImageBuffer::putByteArray): Changed to pass the resolution scale to
771         ImageData::putData(). When drawing the byte array as an image, changed to preserve the base
772         CTM in the destination context (thus mapping from image data pixels to backing store pixels).
773         (WebCore::ImageBuffer::toDataURL): Fixed a CGColorSpace leak. Made the returned image have
774         the buffer’s logical size instead of the backing buffer’s size.
775         (WebCore::ImageDataToDataURL): Fixed a CGColorSpace leak.
776         * platform/graphics/cg/ImageBufferDataCG.cpp:
777         (WebCore::ImageBufferData::getData): Added a resolutionScale parameter. The source
778         coordinates are scaled by the value of that parameter, and a reverse scaling transform
779         is applied when copying from the backing store into the destination (either explicitly
780         using Accelerate or implicitly by drawing as an image). Since after scaling,
781         unpremultiplication and component permutation are done in-place, made the
782         non-Accelerate code that does these things safe in this case.
783         (WebCore::ImageBufferData::putData): Added a resolutionScale parameter. The destination
784         coordinates are scaled by the value of that parameter, and a scaling transform is applied
785         when copying from the source into the backing store (either explicitly using Accelerate or
786         implicitly by drawing as an image). Since after scaling, premultiplication and component
787         permutation are done in-place, made the non-Accelerate code that does these things safe in
788         this case.
789         * platform/graphics/cg/ImageBufferDataCG.h:
790         * platform/graphics/qt/ImageBufferQt.cpp:
791         (WebCore::ImageBuffer::ImageBuffer):
792         * platform/graphics/skia/ImageBufferSkia.cpp:
793         (WebCore::ImageBuffer::ImageBuffer):
794         * platform/graphics/wince/ImageBufferWinCE.cpp:
795         (WebCore::ImageBuffer::ImageBuffer):
796         * platform/graphics/wx/ImageBufferWx.cpp:
797         (WebCore::ImageBuffer::ImageBuffer):
798
799 2012-04-06  Dana Jansens  <danakj@chromium.org>
800
801         [chromium] Draw debug borders for tiles on layers with skipsDraw
802         https://bugs.webkit.org/show_bug.cgi?id=83352
803
804         Reviewed by Adrienne Walker.
805
806         The tiles are given the same color as other missing tiles.
807
808         * platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
809         (WebCore::CCTiledLayerImpl::appendQuads):
810
811 2012-04-06  Rob Buis  <rbuis@rim.com>
812
813         Fix cast-align warnings in JSC
814         https://bugs.webkit.org/show_bug.cgi?id=80790
815
816         Reviewed by George Staikos.
817
818         * platform/graphics/WOFFFileFormat.cpp:
819         (WebCore::readUInt32):
820         (WebCore::readUInt16):
821         * platform/image-encoders/skia/JPEGImageEncoder.cpp:
822         (WebCore::preMultipliedBGRAtoRGB):
823         * platform/network/MIMESniffing.cpp:
824
825 2012-04-06  Darin Adler  <darin@apple.com>
826
827         Streamline strtod and fix some related problems
828         https://bugs.webkit.org/show_bug.cgi?id=82857
829
830         Reviewed by Geoffrey Garen.
831
832         Refactoring of code covered by existing tests.
833
834         * dom/ViewportArguments.cpp:
835         (WebCore::numericPrefix): Removed a confusing comment that just said
836         "we tolerate extra characters" in a roundabout way. Made the "ok"
837         argument optional. Changed to call the new version of charactersToFloat
838         that returns the number of characters parsed rather than using the
839         charactersToFloatIgnoringJunk/didReadNumber solution from before.
840         (WebCore::findSizeValue): Since numericPrefix is guaranteed to return 0
841         when it can't parse, removed the "ok" code. Also changed the unusual
842         syntax "float(1.0)" to just "1", which works just as well.
843         (WebCore::findScaleValue): Ditto.
844         (WebCore::findUserScalableValue): Ditto.
845
846         * html/parser/HTMLParserIdioms.cpp:
847         (WebCore::parseToDoubleForNumberType): Removed an unneeded code path
848         and replaced it with an assertion; toDouble no longer will return infinity
849         or not-a-number values.
850
851 2012-04-06  Dana Jansens  <danakj@chromium.org>
852
853         [chromium] Surface replica should have a separate quad in the render pass
854         https://bugs.webkit.org/show_bug.cgi?id=83287
855
856         Reviewed by Adrienne Walker.
857
858         Generate separate quads for a RenderSurface and its replica. The replica
859         quad is drawn independently of the surface itself. This allows us to
860         cull each one independently.
861
862         Covered by existing tests.
863
864         * platform/graphics/chromium/LayerRendererChromium.cpp:
865         (WebCore::LayerRendererChromium::drawRenderSurfaceQuad):
866         (WebCore::LayerRendererChromium::copyOffscreenTextureToDisplay):
867         * platform/graphics/chromium/cc/CCRenderPass.cpp:
868         (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer):
869         * platform/graphics/chromium/cc/CCRenderSurface.cpp:
870         (WebCore::CCRenderSurface::setScissorRect):
871         (WebCore):
872         (WebCore::CCRenderSurface::drawContents):
873         (WebCore::CCRenderSurface::drawReplica):
874         (WebCore::CCRenderSurface::hasReplica):
875         * platform/graphics/chromium/cc/CCRenderSurface.h:
876         (CCRenderSurface):
877         * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.cpp:
878         (WebCore::CCRenderSurfaceDrawQuad::create):
879         (WebCore::CCRenderSurfaceDrawQuad::CCRenderSurfaceDrawQuad):
880         * platform/graphics/chromium/cc/CCRenderSurfaceDrawQuad.h:
881         (CCRenderSurfaceDrawQuad):
882         (WebCore::CCRenderSurfaceDrawQuad::isReplica):
883
884 2012-04-05  Martin Robinson  <mrobinson@igalia.com>
885
886         [GObject bindings] Fix the coding style issues in the generated bindings
887         https://bugs.webkit.org/show_bug.cgi?id=82080
888
889         Reviewed by Kentaro Hara.
890
891         No new tests. This is covered by the binding tests.
892
893         * bindings/scripts/CodeGeneratorGObject.pm: Fix most style errors in the generated
894           GObject code.
895         * bindings/scripts/test/GObject: Updated the expected results.
896
897
898 2012-04-06  Adam Klein  <adamk@chromium.org>
899
900         Remove bogus assert from ChildListMutationScope
901         https://bugs.webkit.org/show_bug.cgi?id=83336
902
903         Reviewed by Ryosuke Niwa.
904
905         This assert can trivially be triggered from script, but luckily the
906         code already behaves correctly without it.
907
908         * dom/ChildListMutationScope.cpp:
909         (WebCore::ChildListMutationScope::MutationAccumulator::enqueueMutationRecord):
910
911 2012-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
912
913         Unreviewed, rolling out r113442.
914         http://trac.webkit.org/changeset/113442
915         https://bugs.webkit.org/show_bug.cgi?id=83373
916
917         for breaking JSC bindings compilation (Requested by pfeldman
918         on #webkit).
919
920         * GNUmakefile.list.am:
921         * Target.pri:
922         * UseJSC.cmake:
923         * UseV8.cmake:
924         * WebCore.gypi:
925         * WebCore.vcproj/WebCore.vcproj:
926         * WebCore.xcodeproj/project.pbxproj:
927         * bindings/js/JSMutationCallbackCustom.cpp: Added.
928         (WebCore):
929         (WebCore::JSMutationCallback::handleEvent):
930         * bindings/scripts/CodeGenerator.pm:
931         * bindings/scripts/CodeGeneratorJS.pm:
932         (AddIncludesForTypeInImpl):
933         (GenerateCallbackHeader):
934         (GenerateCallbackImplementation):
935         * bindings/scripts/CodeGeneratorV8.pm:
936         (GenerateCallbackHeader):
937         (GenerateCallbackImplementation):
938         * bindings/scripts/test/JS/JSTestCallback.cpp:
939         (WebCore::JSTestCallback::callbackWithBoolean):
940         * bindings/scripts/test/JS/JSTestCallback.h:
941         (JSTestCallback):
942         * bindings/scripts/test/TestCallback.idl:
943         * bindings/scripts/test/V8/V8TestCallback.cpp:
944         (WebCore::V8TestCallback::callbackWithBoolean):
945         * bindings/scripts/test/V8/V8TestCallback.h:
946         (V8TestCallback):
947         * bindings/v8/custom/V8MutationCallbackCustom.cpp: Added.
948         (WebCore):
949         (WebCore::V8MutationCallback::handleEvent):
950         * dom/MutationCallback.idl:
951
952 2012-04-06  Zan Dobersek  <zandobersek@gmail.com>
953
954         [Gtk] Unskip the video track tests
955         https://bugs.webkit.org/show_bug.cgi?id=82590
956
957         Reviewed by Martin Robinson.
958
959         Enable the video track runtime feature for the Gtk port as well.
960
961         No new tests - existing ones will be unskipped.
962
963         * bindings/generic/RuntimeEnabledFeatures.cpp:
964         (WebCore):
965
966 2012-04-06  Michael Saboff  <msaboff@apple.com>
967
968         Call Heap::discardAllCompiledCode() in low memory situations
969         https://bugs.webkit.org/show_bug.cgi?id=83335
970
971         Reviewed by Geoffrey Garen.
972
973         Added call to discardAllCompiledCode() when under memory pressure.
974         We can re-JIT as needed.  This is similar to what we used to do when we did
975         a full GC which also cleaned up JIT code.  Doing a full GC typically didn't
976         help our memory situation, in fact it made things worse in the really low
977         memory situation as it caused more paging.
978
979         Added pass through discardAllCompiledCode() method to GCController.
980
981         * bindings/js/GCController.cpp:
982         (WebCore::GCController::discardAllCompiledCode):
983         (WebCore):
984         * bindings/js/GCController.h:
985         (GCController):
986         * platform/mac/MemoryPressureHandlerMac.mm:
987         (WebCore::MemoryPressureHandler::releaseMemory):
988
989 2012-04-06  Andrey Kosyakov  <caseq@chromium.org>
990
991         Web Inspector: on a single click in Timeline overview, make a minimal selection centered around cursor
992         https://bugs.webkit.org/show_bug.cgi?id=82616
993
994         Reviewed by Pavel Feldman.
995
996         - center minimal selection on mouse cursor if the mouse hasn't moved (i.e. we had a click, not drag)
997
998         * inspector/front-end/TimelineOverviewPane.js:
999         (WebInspector.TimelineOverviewWindow.prototype._endWindowSelectorDragging):
1000
1001 2012-04-06  Vineet Chaudhary  <rgf748@motorola.com>
1002
1003         Add CodeGenerator support for sequence<> in callbacks.
1004         https://bugs.webkit.org/show_bug.cgi?id=83233
1005
1006         Reviewed by Kentaro Hara.
1007
1008         Tests: TestCallback.idl and fast/mutation/callback-arguments.html should pass even after
1009         the changes.
1010
1011         * GNUmakefile.list.am: Removed unsued custom files V8MutationCallbackCustom.cpp 
1012           and JSMutationCallbackCustom.cpp from builds.
1013         * Target.pri: Ditto.
1014         * UseJSC.cmake: Ditto.
1015         * UseV8.cmake: Ditto.
1016         * WebCore.gypi: Ditto.
1017         * WebCore.vcproj/WebCore.vcproj: Ditto.
1018         * WebCore.xcodeproj/project.pbxproj: Ditto.
1019         * bindings/js/JSMutationCallbackCustom.cpp: Removed.
1020         * bindings/scripts/CodeGeneratorJS.pm:
1021         (AddIncludesForTypeInImpl): Add proper header type.
1022         (GenerateCallbackHeader): Generate declaration for the callback with sequence<T> argument.
1023         (GenerateCallbackImplementation): Generate implementation for the callback with sequence<T> argument.
1024         * bindings/scripts/CodeGeneratorV8.pm:
1025         (GenerateCallbackHeader): Generate declaration for the callback with sequence<T> argument.
1026         (GenerateCallbackImplementation): Generate implementation for the callback with sequence<T> argument.
1027         * bindings/scripts/test/JS/JSTestCallback.cpp: Modified test results of run-bindings-tests.
1028         (WebCore):
1029         (WebCore::JSTestCallback::handleEvent):
1030         * bindings/scripts/test/JS/JSTestCallback.h: Modified test results of run-bindings-tests.
1031         (JSTestCallback):
1032         * bindings/scripts/test/TestCallback.idl: Added test callback with sequence<> argument.
1033         * bindings/scripts/test/V8/V8TestCallback.cpp: Modified test results of run-bindings-tests.
1034         (WebCore):
1035         (WebCore::V8TestCallback::handleEvent):
1036         * bindings/scripts/test/V8/V8TestCallback.h: Modified test results of run-bindings-tests.
1037         (V8TestCallback):
1038         * bindings/v8/custom/V8MutationCallbackCustom.cpp: Removed.
1039         * dom/MutationCallback.idl: Removed custom bindings using sequence<T>.
1040
1041 2012-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
1042
1043         Unreviewed, rolling out r113431.
1044         http://trac.webkit.org/changeset/113431
1045         https://bugs.webkit.org/show_bug.cgi?id=83372
1046
1047         for breaking at least Chromium compilation (Requested by
1048         pfeldman on #webkit).
1049
1050         * rendering/RenderView.cpp:
1051         (WebCore::RenderView::paint):
1052         (WebCore::RenderView::shouldRepaint):
1053         (WebCore::RenderView::repaintViewRectangle):
1054         (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers):
1055         (WebCore::RenderView::computeRectForRepaint):
1056         (WebCore::RenderView::selectionBounds):
1057         (WebCore::RenderView::viewRect):
1058         (WebCore::RenderView::unscaledDocumentRect):
1059         * rendering/RenderView.h:
1060         (RenderView):
1061
1062 2012-04-06  Peter Rybin  <peter.rybin@gmail.com>
1063
1064         Web Inspector: CodeGeneratorInspector.py: completely switch all domains to 'strict' mode
1065         https://bugs.webkit.org/show_bug.cgi?id=83332
1066
1067         Reviewed by Pavel Feldman.
1068
1069         Hardcoded list of domains is removed from generator. Partial domain sorting is dropped as unneeded.
1070         Types with open propery list are introduced: validator allows undocumented properties for them.
1071
1072         Timeline domain code is patched to do runtimeCast in the last moment because true switching to
1073         type-safe interfaces should take significant time and should be done separately.
1074
1075         * inspector/CodeGeneratorInspector.py:
1076         (Generator.go):
1077         (Generator.process_event):
1078         (Generator.process_command):
1079         * inspector/InspectorTimelineAgent.cpp:
1080         (WebCore::InspectorTimelineAgent::willSendResourceRequest):
1081         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
1082
1083 2012-04-06  Peter Rybin  <peter.rybin@gmail.com>
1084
1085         Web Inspector: CodeGeneratorInspector.py: stop accepting raw InspectorObject in generated setters
1086         https://bugs.webkit.org/show_bug.cgi?id=83327
1087
1088         Reviewed by Pavel Feldman.
1089
1090         Generator fixed to have strict types in generated setter methods.
1091
1092         Client code is switched from InspectorObject's and String's to generated types where
1093         needed.
1094
1095         * inspector/CodeGeneratorInspector.py:
1096         (AdHocTypeContext):
1097         (format_setter_value_expression):
1098         * inspector/ConsoleMessage.cpp:
1099         (WebCore::messageSourceValue):
1100         (WebCore::messageTypeValue):
1101         (WebCore::messageLevelValue):
1102         (WebCore::ConsoleMessage::addToFrontend):
1103         * inspector/InspectorApplicationCacheAgent.cpp:
1104         (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
1105         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
1106         * inspector/InspectorApplicationCacheAgent.h:
1107         (InspectorApplicationCacheAgent):
1108         * inspector/InspectorCSSAgent.cpp:
1109         (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
1110         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
1111         (WebCore::InspectorCSSAgent::detectOrigin):
1112         * inspector/InspectorCSSAgent.h:
1113         (InspectorCSSAgent):
1114         * inspector/InspectorDOMAgent.cpp:
1115         (WebCore::InspectorDOMAgent::buildObjectForNode):
1116         * inspector/InspectorIndexedDBAgent.cpp:
1117         (WebCore):
1118         * inspector/InspectorMemoryAgent.cpp:
1119         * inspector/InspectorPageAgent.cpp:
1120         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
1121         * inspector/InspectorResourceAgent.cpp:
1122         (WebCore::buildObjectForTiming):
1123         (WebCore::buildObjectForCachedResource):
1124         * inspector/InspectorStyleSheet.cpp:
1125         (WebCore::InspectorStyle::buildObjectForStyle):
1126         (WebCore::InspectorStyleSheet::create):
1127         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
1128         (WebCore::InspectorStyleSheet::buildObjectForRule):
1129         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
1130         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
1131         (WebCore::InspectorStyleSheetForInlineStyle::create):
1132         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
1133         * inspector/InspectorStyleSheet.h:
1134         (InspectorCSSId):
1135         (WebCore::InspectorCSSId::asProtocolValue): method is made template as now it returns 2 formally different types.
1136         (InspectorStyleSheet):
1137         (WebCore::InspectorStyleSheet::canBind):
1138         (InspectorStyleSheetForInlineStyle):
1139
1140 2012-04-06  Pavel Feldman  <pfeldman@chromium.org>
1141
1142         Web Inspector: highlight diff in the gutter, not in the line content.
1143         https://bugs.webkit.org/show_bug.cgi?id=83371
1144
1145         Reviewed by Yury Semikhatsky.
1146
1147         Now that the editing mode is enabled by default, diff highlighting gets annoying.
1148         I am moving it to the gutter (same decoration as before, but now coloring gutter only).
1149
1150         * inspector/front-end/TextViewer.js:
1151         (WebInspector.TextEditorGutterPanel.prototype.textChanged):
1152         * inspector/front-end/textViewer.css:
1153         (.diff-container .webkit-added-line.webkit-line-number):
1154         (.diff-container .webkit-removed-line.webkit-line-number):
1155         (.diff-container .webkit-changed-line.webkit-line-number):
1156
1157 2012-04-06  Peter Rybin  <peter.rybin@gmail.com>
1158
1159         Web Inspector: CodeGeneratorInspector.py: stop accepting raw InspectorObject in generated setters
1160         https://bugs.webkit.org/show_bug.cgi?id=83327
1161
1162         Reviewed by Pavel Feldman.
1163
1164         Generator fixed to have strict types in generated setter methods.
1165
1166         Client code is switched from InspectorObject's and String's to generated types where
1167         needed.
1168
1169         * inspector/CodeGeneratorInspector.py:
1170         (AdHocTypeContext):
1171         (format_setter_value_expression):
1172         * inspector/ConsoleMessage.cpp:
1173         (WebCore::messageSourceValue):
1174         (WebCore::messageTypeValue):
1175         (WebCore::messageLevelValue):
1176         (WebCore::ConsoleMessage::addToFrontend):
1177         * inspector/InspectorApplicationCacheAgent.cpp:
1178         (WebCore::InspectorApplicationCacheAgent::buildArrayForApplicationCacheResources):
1179         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
1180         * inspector/InspectorApplicationCacheAgent.h:
1181         (InspectorApplicationCacheAgent):
1182         * inspector/InspectorCSSAgent.cpp:
1183         (WebCore::InspectorCSSAgent::asInspectorStyleSheet):
1184         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
1185         (WebCore::InspectorCSSAgent::detectOrigin):
1186         * inspector/InspectorCSSAgent.h:
1187         (InspectorCSSAgent):
1188         * inspector/InspectorDOMAgent.cpp:
1189         (WebCore::InspectorDOMAgent::buildObjectForNode):
1190         * inspector/InspectorIndexedDBAgent.cpp:
1191         (WebCore):
1192         * inspector/InspectorMemoryAgent.cpp:
1193         * inspector/InspectorPageAgent.cpp:
1194         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
1195         * inspector/InspectorResourceAgent.cpp:
1196         (WebCore::buildObjectForTiming):
1197         (WebCore::buildObjectForCachedResource):
1198         * inspector/InspectorStyleSheet.cpp:
1199         (WebCore::InspectorStyle::buildObjectForStyle):
1200         (WebCore::InspectorStyleSheet::create):
1201         (WebCore::InspectorStyleSheet::InspectorStyleSheet):
1202         (WebCore::InspectorStyleSheet::buildObjectForRule):
1203         (WebCore::InspectorStyleSheet::resourceStyleSheetText):
1204         (WebCore::InspectorStyleSheet::buildArrayForRuleList):
1205         (WebCore::InspectorStyleSheetForInlineStyle::create):
1206         (WebCore::InspectorStyleSheetForInlineStyle::InspectorStyleSheetForInlineStyle):
1207         * inspector/InspectorStyleSheet.h:
1208         (InspectorCSSId):
1209         (WebCore::InspectorCSSId::asProtocolValue): method is made template as now it returns 2 formally different types.
1210         (InspectorStyleSheet):
1211         (WebCore::InspectorStyleSheet::canBind):
1212         (InspectorStyleSheetForInlineStyle):
1213
1214 2012-04-06  Pavel Feldman  <pfeldman@chromium.org>
1215
1216         Web Inspector: highlight diff in the gutter, not in the line content.
1217         https://bugs.webkit.org/show_bug.cgi?id=83371
1218
1219         Reviewed by Yury Semikhatsky.
1220
1221         Now that the editing mode is enabled by default, diff highlighting gets annoying.
1222         I am moving it to the gutter (same decoration as before, but now coloring gutter only).
1223
1224         * inspector/front-end/TextViewer.js:
1225         (WebInspector.TextEditorGutterPanel.prototype.textChanged):
1226         * inspector/front-end/textViewer.css:
1227         (.diff-container .webkit-added-line.webkit-line-number):
1228         (.diff-container .webkit-removed-line.webkit-line-number):
1229         (.diff-container .webkit-changed-line.webkit-line-number):
1230
1231 2012-04-06  Pavel Feldman  <pfeldman@chromium.org>
1232
1233         Web Inspector: highlight diff in the gutter, not in the line content.
1234         https://bugs.webkit.org/show_bug.cgi?id=83371
1235
1236         Reviewed by Yury Semikhatsky.
1237
1238         Now that the editing mode is enabled by default, diff highlighting gets annoying.
1239         I am moving it to the gutter (same decoration as before, but now coloring gutter only).
1240
1241         * inspector/front-end/TextViewer.js:
1242         (WebInspector.TextEditorGutterPanel.prototype.textChanged):
1243         * inspector/front-end/textViewer.css:
1244         (.diff-container .webkit-added-line.webkit-line-number):
1245         (.diff-container .webkit-removed-line.webkit-line-number):
1246         (.diff-container .webkit-changed-line.webkit-line-number):
1247
1248 2012-04-06  Pavel Feldman  <pfeldman@chromium.org>
1249
1250         Web Inspector: remove url from the saved urls map before the save action.
1251         https://bugs.webkit.org/show_bug.cgi?id=83364
1252
1253         Reviewed by Yury Semikhatsky.
1254
1255         URL gets added back upon successful save anyways, but if user chooses cancel saving,
1256         we stop bugging him with the save-as dialog.
1257
1258         * inspector/front-end/NetworkPanel.js:
1259         (WebInspector.NetworkLogView.prototype._exportAll):
1260         (WebInspector.NetworkLogView.prototype._exportResource):
1261         * inspector/front-end/ResourcesPanel.js:
1262         (WebInspector.FrameResourceTreeElement.prototype._appendSaveAsAction.doSave):
1263         (WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent.doSave):
1264         * inspector/front-end/TextViewer.js:
1265         (WebInspector.TextViewer.prototype._contextMenu):
1266         (WebInspector.TextViewer.prototype._commitEditing):
1267         * inspector/front-end/TimelineModel.js:
1268         (WebInspector.TimelineModel.prototype.saveToFile):
1269         * inspector/front-end/inspector.js:
1270
1271 2012-04-06  Andrey Kosyakov  <caseq@chromium.org>
1272
1273         Web Inspector: display frame details in popover on frame strip in Timeline panel
1274         https://bugs.webkit.org/show_bug.cgi?id=83365
1275
1276         Reviewed by Pavel Feldman.
1277
1278         - added popovers for frame strips;
1279         - factored out generateAggregatedInfo for reuse in the above;
1280         - made frame event dividers thinner, darker and greyer.
1281
1282         * English.lproj/localizedStrings.js: Added "FPS" and "Frame"
1283         * inspector/front-end/TimelineFrameController.js:
1284         (WebInspector.TimelineFrameController.prototype._flushFrame): added startTimeOffset.
1285         (WebInspector.TimelineFrameController.prototype._createSyntheticFrame): ditto.
1286         * inspector/front-end/TimelineModel.js:
1287         (WebInspector.TimelineModel.prototype._updateBoundaries):
1288         (WebInspector.TimelineModel.prototype.recordOffsetInSeconds):
1289         * inspector/front-end/TimelinePanel.js:
1290         (WebInspector.TimelinePanel.prototype._updateFrames): added link to frame to strip div.
1291         (WebInspector.TimelinePanel.prototype._refresh):
1292         (WebInspector.TimelinePanel.prototype._getPopoverAnchor): handle frame anchors separately.
1293         (WebInspector.TimelinePanel.prototype._mouseMove): ditto.
1294         (WebInspector.TimelinePanel.prototype._showPopover):
1295         * inspector/front-end/TimelinePresentationModel.js:
1296         (WebInspector.TimelinePresentationModel.Record.prototype.generatePopupContent):
1297         (WebInspector.TimelinePresentationModel._generateAggregatedInfo): factored out for reuse.
1298         (WebInspector.TimelinePresentationModel.generatePopupContentForFrame):
1299         * inspector/front-end/inspectorCommon.css:
1300         (.resources-dividers-label-bar):
1301         * inspector/front-end/timelinePanel.css:
1302         (.timeline .resources-event-divider.timeline-frame-divider): made divider thin and grey.
1303         (.timeline-frame-strip): bumped z-index, added pointer-events: auto.
1304
1305 2012-04-06  Pavel Feldman  <pfeldman@chromium.org>
1306
1307         Web Inspector: show "dirty" flag for CSS files edited in the resources panel.
1308         https://bugs.webkit.org/show_bug.cgi?id=83363
1309
1310         Reviewed by Yury Semikhatsky.
1311
1312         Added TextEdited notification into the editable source frame, listening to it
1313         in the resources panel.
1314
1315         * inspector/front-end/ResourceView.js:
1316         (WebInspector.EditableResourceSourceFrame.prototype._contentChanged):
1317         (WebInspector.EditableResourceSourceFrame.prototype.isDirty):
1318         * inspector/front-end/ResourcesPanel.js:
1319         (WebInspector.FrameResourceTreeElement.prototype._appendRevision):
1320         (WebInspector.FrameResourceTreeElement.prototype.sourceView):
1321         (WebInspector.FrameResourceTreeElement.prototype._sourceViewTextEdited):
1322
1323 2012-04-06  Levi Weintraub  <leviw@chromium.org>
1324
1325         Update LayoutUnit usage in RenderView
1326         https://bugs.webkit.org/show_bug.cgi?id=83147
1327
1328         Reviewed by Julien Chaffraix.
1329
1330         Updating the usage of LayoutUnits in RenderView in preparation for sub-pixel layout. This mostly
1331         affects paint and repaint functions, which take LayoutRects up to the RenderView level. This is
1332         necessary as we continue to accumulate sub-pixel offsets up to this level.
1333
1334         No new tests. No change in behavior.
1335
1336         * rendering/RenderView.cpp:
1337         (WebCore::RenderView::paint): Adding an assert that we're being called to paint on pixel
1338         boundaries. We don't currently ever position RenderViews at sub-pixel offsets.
1339         (WebCore::RenderView::shouldRepaint):
1340         (WebCore::RenderView::repaintViewRectangle): Switching to a LayoutRect and cleaning up a fixme
1341         that used decomposed offsets. Pixel snapping is applied before handing the rect up to the
1342         FrameView.
1343         (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers): Pixel snapping before handing
1344         the rect up to the Compositor.
1345         (WebCore::RenderView::computeRectForRepaint):
1346         (WebCore::RenderView::selectionBounds):
1347         (WebCore::RenderView::viewRect):
1348         (WebCore::RenderView::unscaledDocumentRect):
1349         * rendering/RenderView.h:
1350         (RenderView):
1351
1352 2012-04-06  Andrey Kosyakov  <caseq@chromium.org>
1353
1354         Web Inspector: hide popover on mouseout from anchor
1355         https://bugs.webkit.org/show_bug.cgi?id=83362
1356
1357         Reviewed by Pavel Feldman.
1358
1359         - start hide popover timer when mouse moves out of popover anchor, as we won't receive mousemove events any more;
1360         - factored out starting of popover kill timer to a method.
1361
1362         * inspector/front-end/Popover.js:
1363         (WebInspector.PopoverHelper):
1364         (WebInspector.PopoverHelper.prototype._mouseMove): Factored out StartHidePopoverTimer()
1365         (WebInspector.PopoverHelper.prototype._mouseOut): Just call StartHidePopoverTimer() when mouse moves out of anchor.
1366         (WebInspector.PopoverHelper.prototype._startHidePopoverTimer.doHide): 
1367         (WebInspector.PopoverHelper.prototype._startHidePopoverTimer):
1368         (WebInspector.PopoverHelper.prototype._hidePopover): Reset hoverElement (aka anchor) when hiding popover.
1369
1370 2012-04-06  Andrey Kosyakov  <caseq@chromium.org>
1371
1372         [Chromium] Web Inspector: getEventListeners(window) crashes on NTP
1373         https://bugs.webkit.org/show_bug.cgi?id=83353
1374
1375         Reviewed by Pavel Feldman.
1376
1377         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1378         (WebCore::V8InjectedScriptHost::getEventListenersCallback):
1379
1380 2012-04-06  Kent Tamura  <tkent@chromium.org>
1381
1382         Touch ChromeClient.h to fix Chromium build.
1383         https://bugs.webkit.org/show_bug.cgi?id=83258
1384
1385         * page/ChromeClient.h:
1386
1387 2012-04-06  Kent Tamura  <tkent@chromium.org>
1388
1389         Initial LocalizedDateICU.cpp implementation
1390         https://bugs.webkit.org/show_bug.cgi?id=60868
1391
1392         Reviewed by Hajime Morita.
1393
1394         Add LocalizedDateICU.cpp, which supports only Date type.  It uses a
1395         short format because a date field is keyboard-editable.
1396         e.g. 5/15/11 in US locale.
1397
1398         * WebCore.gyp/WebCore.gyp: Exclude LocalizedDateNone.cpp.
1399         * WebCore.gypi: Add LocalizedDateICU.cpp.
1400         * platform/text/LocalizedDateICU.cpp: Added.
1401         (WebCore::parseLocalizedDate):
1402         (WebCore::formatLocalizedDate):
1403
1404 2012-04-05  Alexander Pavlov  <apavlov@chromium.org>
1405
1406         [REGRESSION] Refreshed autofill popup renders garbage
1407         https://bugs.webkit.org/show_bug.cgi?id=83255
1408         http://code.google.com/p/chromium/issues/detail?id=118374
1409
1410         The code used to update only the PopupContainer coordinates as if they were the coordinates relative
1411         to the root view. Instead, a WebWidget positioned relative to the screen origin holds the PopupContainer,
1412         so it is the WebWidget that should be positioned in PopupContainer::refresh(), and the PopupContainer's
1413         location should be (0, 0) (and their sizes should always be equal).
1414
1415         Reviewed by Kent Tamura.
1416
1417         No new tests, as the popup appearance is not testable in WebKit.
1418
1419         * platform/chromium/PopupContainer.cpp:
1420         (WebCore::PopupContainer::layoutAndCalculateWidgetRect): Variable renamed.
1421         (WebCore::PopupContainer::showPopup): Use m_originalFrameRect rather than frameRect()
1422         for passing into chromeClient.
1423         (WebCore::PopupContainer::showInRect): Set up the correct frameRect() for the container.
1424         (WebCore::PopupContainer::refresh): Resize the container and position the WebWidget correctly.
1425         * platform/chromium/PopupContainer.h:
1426         (PopupContainer):
1427
1428 2012-04-06  Kent Tamura  <tkent@chromium.org>
1429
1430         Calendar Picker: Add code to open/close the calendar picker
1431         https://bugs.webkit.org/show_bug.cgi?id=83258
1432
1433         Reviewed by Hajime Morita.
1434
1435         No new tests. This code is not used because of no ENABLE_INPUT_TYPE_DATE.
1436
1437         * WebCore.gypi: Add existing header files.
1438
1439         * html/DateInputType.cpp:
1440         (WebCore::DateInputType::DateInputType):
1441         Moved from DateInputType.h because the constructor depends on
1442         CalendarPickerElement.
1443         (WebCore::DateInputType::createShadowSubtree):
1444         Store a CalendarPickerElement object.
1445         (WebCore::DateInputType::destroyShadowSubtree):
1446         Release the CalendarPickerElement object.
1447         (WebCore::DateInputType::handleBlurEvent):
1448         Close the calendar picker when the input loses focus.
1449         * html/DateInputType.h:
1450         (DateInputType):
1451         - Move the constructor definition to DateInputType.cpp
1452         - Add function declarations
1453         - Add m_pickerElement data member.
1454
1455         * html/shadow/CalendarPickerElement.cpp:
1456         (WebCore::CalendarPickerElement::hostInput): A helper to get the host <input>.
1457         (WebCore::CalendarPickerElement::defaultEventHandler):
1458         If the element is clicked, open a calendar picker.
1459         (WebCore::CalendarPickerElement::openPopup):
1460         Opens a calendar picker by ChromeClient::openPagePopup().
1461         (WebCore::CalendarPickerElement::closePopup):
1462         Closes a calendar picker by ChromeClient::closePagePopup().
1463         (WebCore::CalendarPickerElement::detach):
1464         Closes a calendar picker when the element loses a renderer.
1465
1466         (WebCore::CalendarPickerElement::contentSize):
1467         Provides the initial size of a popup.
1468         (WebCore::addString): A helper for writeDocument().
1469         (WebCore::addJavaScriptString): ditto.
1470         (WebCore::addProperty): ditto.
1471         (WebCore::CalendarPickerElement::writeDocument):
1472         Provides the source of a popup. The function creates a complete HTML with:
1473         - WebCore/Resources/calendarPicker.css
1474         - WebCore/Resources/calendarPicker.js
1475         - An object to pass localization strings and <input> state
1476         (WebCore::CalendarPickerElement::setValueAndClosePopup):
1477         Sets the value from a calendar picker to the <input>.
1478         (WebCore::CalendarPickerElement::didClosePopup):
1479         Clear the popup object.
1480         * html/shadow/CalendarPickerElement.h:
1481         (CalendarPickerElement): Add declarations.
1482
1483         * platform/text/LocalizedCalendarICU.cpp:
1484         (WebCore::getFirstDayOfWeek): Make sure this is 0-base. UCAL_SUNDAY is 1.
1485
1486 2012-04-05  Adele Peterson  <adele@apple.com>
1487
1488         <rdar://problem/11133179> and https://bugs.webkit.org/show_bug.cgi?id=74129
1489         REGRESSION (SnowLeopard, 5.1.4): All WK2 horizontal scrollbars look broken
1490
1491         Patch by Dan Bernstein, Reviewed by Beth Dakin.
1492
1493         This code assumed that the current CTM wouldn't have extraneous operations built into it, 
1494         but this bug is evidence that that assumption was wrong. We should just get the base CTM instead 
1495         and apply the device scale factor to it.
1496
1497         No tests added since the SnowLeopard-style scrollbars aren't testable in our regression tests right now.
1498
1499         * platform/graphics/GraphicsContext.cpp:
1500         (WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
1501         (WebCore::GraphicsContext::applyDeviceScaleFactor):
1502         * platform/graphics/GraphicsContext.h: (GraphicsContext):
1503         * platform/graphics/cg/GraphicsContextCG.cpp: (WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
1504
1505 2012-04-05  Yuta Kitamura  <yutak@chromium.org>
1506
1507         Leak in WebSocketChannel with workers/worker-reload.html
1508         https://bugs.webkit.org/show_bug.cgi?id=83345
1509
1510         Reviewed by David Levin.
1511
1512         A speculative fix of memory leaks caused by worker-reload.html.
1513
1514         No new tests, as this change imposes no functional change.
1515
1516         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
1517         (WebCore::WorkerThreadableWebSocketChannel::mainThreadDestroy):
1518         Receive the peer as PassOwnPtr<> so the destructor of the task object can
1519         delete the peer even if the task didn't run before main thread's cleanup period.
1520         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
1521         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
1522         (WorkerThreadableWebSocketChannel):
1523
1524 2012-04-05  Lu Guanqun  <guanqun.lu@intel.com>
1525
1526         combine two arrays (coreExceptionNames and coreExceptionDescriptions) into one array
1527         https://bugs.webkit.org/show_bug.cgi?id=83141
1528
1529         Reviewed by Adam Barth.
1530
1531         No new tests required.
1532
1533         * dom/DOMCoreException.cpp:
1534         (CoreException):
1535         (WebCore):
1536         (WebCore::DOMCoreException::initializeDescription):
1537
1538 2012-04-05  David Barton  <dbarton@mathscribe.com>
1539
1540         Remove intrinsic padding from contentBoxRect(), etc.
1541         https://bugs.webkit.org/show_bug.cgi?id=83092
1542
1543         Reviewed by Julien Chaffraix.
1544
1545         "Intrinsic padding" does not count as CSS padding, but is treated as padding by basic
1546         layout and rendering code, e.g. RenderBlock::layout(). A lot of code relies on the
1547         equation border-box = content-box + padding + border (+ scrollbars). To keep this valid,
1548         change 5 functions in RenderBox.h to not include intrinsic padding in the content box,
1549         thus reverting to their behavior before the patch for bug 33593. Instead, have
1550         sizingBox(renderer) in CSSComputedStyleDeclaration.cpp explicitly put the intrinsic
1551         padding in computed CSS content-box values [for javascript getComputedStyle()], so the
1552         above equation still also holds for CSS computed values. This seems more consistent with
1553         how the padding...() functions behave since the patch for bug 23487, and will work
1554         better for MathML. For instance, a block's contentLogicalWidth() will be the
1555         availableLogicalWidth() for use by child elements.
1556
1557         No new tests. The only real observable changes are illustrated in the bug 83092 attached
1558         test case and discussion. These are minor and hard to automate.
1559
1560         * css/CSSComputedStyleDeclaration.cpp:
1561         (WebCore::sizingBox):
1562         * editing/DeleteSelectionCommand.cpp:
1563         (WebCore::DeleteSelectionCommand::removeNode):
1564         * rendering/RenderBox.h:
1565         (WebCore::RenderBox::contentBoxRect):
1566         (WebCore::RenderBox::contentWidth):
1567         (WebCore::RenderBox::contentHeight):
1568         (WebCore::RenderBox::contentLogicalWidth):
1569         (WebCore::RenderBox::contentLogicalHeight):
1570             - Change these 5 functions to omit intrinsic padding from the content box.
1571         * rendering/RenderTableCell.cpp:
1572         (WebCore::RenderTableCell::cellBaselinePosition):
1573         * rendering/RenderTableSection.cpp:
1574         (WebCore::RenderTableSection::firstLineBoxBaseline):
1575
1576 2012-04-05  Hironori Bono  <hbono@chromium.org>
1577
1578         [Chromium] moving a cursor on a misspelled word should not remove a misspelled underline
1579         https://bugs.webkit.org/show_bug.cgi?id=83214
1580
1581         Reviewed by Ryosuke Niwa.
1582
1583         When Chrome enables asynchronous spellchecking, it adds Spelling markers in the
1584         background. For this case, moving a cursor should not remove these markers
1585         because it requires Chrome to spellcheck text again. This change prevents
1586         removing Spelling markers added by spellcheckers asynchronously.
1587
1588         Test: platform/chromium/editing/spelling/move-cursor-to-misspelled-word.html
1589
1590         * editing/Editor.cpp:
1591         (WebCore::Editor::respondToChangedSelection):
1592
1593 2012-04-05  Hans Muller  <hmuller@adobe.com>
1594
1595         CSS Exclusions polygon shape arguments should be comma separated
1596         https://bugs.webkit.org/show_bug.cgi?id=82368
1597
1598         Reviewed by Ryosuke Niwa.
1599
1600         Changed the CSS Parser to accept a conventional comma separated argument list for the
1601         polygon exclusion shape. The syntax had used spaces to separate x,y coordinates, like:
1602         polygon(10px,20px 30px,40px).  Now commas separate points: polygon(10px 20px, 30px 40px).
1603         This change is per the draft exclusions spec, http://dev.w3.org/csswg/css3-exclusions.
1604         Additional relevant information about CSS argument list syntax can be found
1605         here: http://dev.w3.org/csswg/css3-values/#component-whitespace.
1606
1607         Factored comma recognition idiom in CSSParser.cpp into isComma() utility function.
1608
1609         The existing tests have been updated.
1610
1611         * css/CSSParser.cpp:
1612         (WebCore::isComma)
1613         (WebCore::CSSParser::parseFillPosition)
1614         (WebCore::CSSParser::parseFillRepeat)
1615         (WebCore::CSSParser::parseFillProperty)
1616         (WebCore::CSSParser::parseCubicBezierTimingFunctionValue)
1617         (WebCore::CSSParser::parseAnimationTimingFunction)
1618         (WebCore::CSSParser::parseAnimationProperty)
1619         (WebCore::CSSParser::parseExclusionShapePolygon)
1620         (WebCore::CSSParser::parseDeprecatedGradient)
1621         (WebCore::CSSParser::parseRadialGradient)
1622         (WebCore::CSSParser::parseGradientColorStops)
1623         (WebCore::CSSParser::parseImageSet)
1624         (WebCore::filterInfoForName)
1625         (WebCore::CSSParser::parseCustomFilter)
1626         (WebCore::CSSParser::parseFontFeatureSettings)
1627
1628         * css/CSSWrapShapes.cpp:
1629         (WebCore::CSSWrapShapePolygon::cssText):
1630
1631 2012-04-05  Joshua Bell  <jsbell@chromium.org>
1632
1633         IndexedDB: Support string.length in keyPaths
1634         https://bugs.webkit.org/show_bug.cgi?id=83221
1635
1636         Special case in the IDB spec - keyPaths can reference the |length| property
1637         of string values. Other instrinsic properties (|length| of Array, etc) are
1638         handled automagically. Relevant section of the updated spec is:
1639         http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#key-path-construct
1640
1641         Reviewed by Kentaro Hara.
1642
1643         Test: storage/indexeddb/keypath-intrinsic-properties.html
1644
1645         * bindings/v8/IDBBindingUtilities.cpp:
1646         (WebCore):
1647
1648 2012-04-05  Arvid Nilsson  <anilsson@rim.com>
1649
1650         [BlackBerry] Update the InstrumentedPlatformCanvas after rebasing Skia
1651         https://bugs.webkit.org/show_bug.cgi?id=83314
1652
1653         Reviewed by George Staikos.
1654
1655         RIM PR: 143771
1656         One new virtual method was added to the SkCanvas, to draw a nine piece
1657         image. Override it and mark output as not being a solid color anymore.
1658
1659         * platform/graphics/blackberry/InstrumentedPlatformCanvas.h:
1660         (WebCore::InstrumentedPlatformCanvas::drawBitmapNine):
1661         (InstrumentedPlatformCanvas):
1662
1663 2012-04-05  Oliver Hunt  <oliver@apple.com>
1664
1665         Make WebCore use jsCast rather than static_cast for casting JSC objects
1666         https://bugs.webkit.org/show_bug.cgi?id=83320
1667
1668         Reviewed by Stephanie Lewis.
1669
1670         Mechanically replace static_cast with jsCast where ever we can.
1671
1672         * WebCore.exp.in:
1673         * bindings/js/DOMWrapperWorld.cpp:
1674         (WebCore::JSStringOwner::finalize):
1675         * bindings/js/DOMWrapperWorld.h:
1676         (WebCore::currentWorld):
1677         * bindings/js/JSArrayBufferCustom.cpp:
1678         (WebCore::JSArrayBufferConstructor::constructJSArrayBuffer):
1679         * bindings/js/JSAudioContextCustom.cpp:
1680         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
1681         * bindings/js/JSCSSRuleListCustom.cpp:
1682         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
1683         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1684         (WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
1685         (WebCore::cssPropertyGetterCallback):
1686         * bindings/js/JSCSSValueCustom.cpp:
1687         (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
1688         (WebCore::JSCSSValueOwner::finalize):
1689         * bindings/js/JSDOMBinding.cpp:
1690         (WebCore::reportException):
1691         * bindings/js/JSDOMBinding.h:
1692         (WebCore::deprecatedGlobalObjectForPrototype):
1693         (WebCore::getDOMPrototype):
1694         * bindings/js/JSDOMFormDataCustom.cpp:
1695         (WebCore::toHTMLFormElement):
1696         (WebCore::JSDOMFormDataConstructor::constructJSDOMFormData):
1697         * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
1698         (WebCore::JSDOMMimeTypeArray::nameGetter):
1699         * bindings/js/JSDOMPluginArrayCustom.cpp:
1700         (WebCore::JSDOMPluginArray::nameGetter):
1701         * bindings/js/JSDOMPluginCustom.cpp:
1702         (WebCore::JSDOMPlugin::nameGetter):
1703         * bindings/js/JSDOMStringMapCustom.cpp:
1704         (WebCore::JSDOMStringMap::nameGetter):
1705         * bindings/js/JSDOMWindowBase.cpp:
1706         (WebCore::toJSDOMWindow):
1707         * bindings/js/JSDOMWindowCustom.cpp:
1708         (WebCore::childFrameGetter):
1709         (WebCore::indexGetter):
1710         (WebCore::namedItemGetter):
1711         (WebCore::toDOMWindow):
1712         * bindings/js/JSDOMWindowCustom.h:
1713         (WebCore::asJSDOMWindow):
1714         * bindings/js/JSDOMWindowShell.h:
1715         (WebCore::JSDOMWindowShell::window):
1716         * bindings/js/JSDOMWrapper.h:
1717         (WebCore::JSDOMWrapper::globalObject):
1718         * bindings/js/JSDataViewCustom.cpp:
1719         (WebCore::JSDataViewConstructor::constructJSDataView):
1720         * bindings/js/JSEventListener.cpp:
1721         (WebCore::JSEventListener::handleEvent):
1722         * bindings/js/JSEventTarget.cpp:
1723         (WebCore):
1724         (WebCore::toEventTarget):
1725         * bindings/js/JSFloat32ArrayCustom.cpp:
1726         (WebCore::JSFloat32ArrayConstructor::constructJSFloat32Array):
1727         * bindings/js/JSFloat64ArrayCustom.cpp:
1728         (WebCore::JSFloat64ArrayConstructor::constructJSFloat64Array):
1729         * bindings/js/JSGeolocationCustom.cpp:
1730         (WebCore::JSGeolocation::getCurrentPosition):
1731         (WebCore::JSGeolocation::watchPosition):
1732         * bindings/js/JSHTMLAllCollectionCustom.cpp:
1733         (WebCore::callHTMLAllCollection):
1734         (WebCore::JSHTMLAllCollection::nameGetter):
1735         * bindings/js/JSHTMLCollectionCustom.cpp:
1736         (WebCore::JSHTMLCollection::nameGetter):
1737         * bindings/js/JSHTMLDocumentCustom.cpp:
1738         (WebCore::JSHTMLDocument::nameGetter):
1739         * bindings/js/JSHTMLFormElementCustom.cpp:
1740         (WebCore::JSHTMLFormElement::nameGetter):
1741         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
1742         (WebCore::JSHTMLFrameSetElement::nameGetter):
1743         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
1744         (WebCore::JSHTMLOptionsCollection::remove):
1745         * bindings/js/JSImageConstructor.cpp:
1746         (WebCore::constructImage):
1747         * bindings/js/JSInjectedScriptManager.cpp:
1748         (WebCore::InjectedScriptManager::createInjectedScript):
1749         (WebCore::InjectedScriptManager::discardInjectedScript):
1750         (WebCore::InjectedScriptManager::injectedScriptFor):
1751         * bindings/js/JSInt16ArrayCustom.cpp:
1752         (WebCore::JSInt16ArrayConstructor::constructJSInt16Array):
1753         * bindings/js/JSInt32ArrayCustom.cpp:
1754         (WebCore::JSInt32ArrayConstructor::constructJSInt32Array):
1755         * bindings/js/JSInt8ArrayCustom.cpp:
1756         (WebCore::JSInt8ArrayConstructor::constructJSInt8Array):
1757         * bindings/js/JSLazyEventListener.cpp:
1758         (WebCore::JSLazyEventListener::initializeJSFunction):
1759         * bindings/js/JSNamedNodeMapCustom.cpp:
1760         (WebCore::JSNamedNodeMap::nameGetter):
1761         * bindings/js/JSNodeCustom.cpp:
1762         (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
1763         (WebCore::JSNodeOwner::finalize):
1764         * bindings/js/JSNodeCustom.h:
1765         (WebCore::toJS):
1766         * bindings/js/JSNodeFilterCustom.cpp:
1767         (WebCore::toNodeFilter):
1768         * bindings/js/JSNodeListCustom.cpp:
1769         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
1770         (WebCore::JSNodeList::nameGetter):
1771         * bindings/js/JSPluginElementFunctions.cpp:
1772         (WebCore::runtimeObjectPropertyGetter):
1773         (WebCore::callPlugin):
1774         * bindings/js/JSPopStateEventCustom.cpp:
1775         (WebCore::JSPopStateEvent::state):
1776         * bindings/js/JSSQLTransactionCustom.cpp:
1777         (WebCore::JSSQLTransaction::executeSql):
1778         * bindings/js/JSSharedWorkerCustom.cpp:
1779         (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker):
1780         * bindings/js/JSStorageCustom.cpp:
1781         (WebCore::JSStorage::nameGetter):
1782         * bindings/js/JSStyleSheetListCustom.cpp:
1783         (WebCore::JSStyleSheetList::nameGetter):
1784         * bindings/js/JSTextTrackCueCustom.cpp:
1785         (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots):
1786         * bindings/js/JSTextTrackCustom.cpp:
1787         (WebCore::JSTextTrackOwner::isReachableFromOpaqueRoots):
1788         * bindings/js/JSTextTrackListCustom.cpp:
1789         (WebCore::JSTextTrackListOwner::isReachableFromOpaqueRoots):
1790         * bindings/js/JSTrackCustom.cpp:
1791         (WebCore::toTrack):
1792         * bindings/js/JSUint16ArrayCustom.cpp:
1793         (WebCore::JSUint16ArrayConstructor::constructJSUint16Array):
1794         * bindings/js/JSUint32ArrayCustom.cpp:
1795         (WebCore::JSUint32ArrayConstructor::constructJSUint32Array):
1796         * bindings/js/JSUint8ArrayCustom.cpp:
1797         (WebCore::JSUint8ArrayConstructor::constructJSUint8Array):
1798         * bindings/js/JSUint8ClampedArrayCustom.cpp:
1799         (WebCore::JSUint8ClampedArrayConstructor::constructJSUint8ClampedArray):
1800         * bindings/js/JSWebKitMutationObserverCustom.cpp:
1801         (WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver):
1802         * bindings/js/JSWebKitPointCustom.cpp:
1803         (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint):
1804         * bindings/js/JSWebSocketCustom.cpp:
1805         (WebCore::JSWebSocketConstructor::constructJSWebSocket):
1806         * bindings/js/JSWorkerContextBase.cpp:
1807         (WebCore::toJSDedicatedWorkerContext):
1808         (WebCore::toJSSharedWorkerContext):
1809         * bindings/js/JSWorkerCustom.cpp:
1810         (WebCore::JSWorkerConstructor::constructJSWorker):
1811         * bindings/js/JSXSLTProcessorCustom.cpp:
1812         (WebCore::JSXSLTProcessor::importStylesheet):
1813         (WebCore::JSXSLTProcessor::transformToFragment):
1814         (WebCore::JSXSLTProcessor::transformToDocument):
1815         * bindings/js/ScriptCallStackFactory.cpp:
1816         (WebCore::createScriptCallStackForInspector):
1817         * bindings/js/ScriptControllerMac.mm:
1818         (WebCore::updateStyleIfNeededForBindings):
1819         * bindings/js/ScriptDebugServer.cpp:
1820         (WebCore::ScriptDebugServer::dispatchDidPause):
1821         * bindings/js/ScriptObject.cpp:
1822         (WebCore::ScriptGlobalObject::set):
1823         * bindings/js/ScriptState.cpp:
1824         (WebCore::domWindowFromScriptState):
1825         (WebCore::scriptExecutionContextFromScriptState):
1826         * bindings/js/SerializedScriptValue.cpp:
1827         (WebCore::CloneSerializer::fillTransferMap):
1828         (WebCore::CloneSerializer::dumpArrayBufferView):
1829         (WebCore::CloneDeserializer::getJSValue):
1830         (WebCore::CloneDeserializer::readTerminal):
1831         * bindings/objc/WebScriptObject.mm:
1832         (-[WebScriptObject _isSafeScript]):
1833         (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
1834         * bindings/scripts/CodeGeneratorJS.pm:
1835         (GenerateGetOwnPropertySlotBody):
1836         (GenerateGetOwnPropertyDescriptorBody):
1837         (GenerateImplementation):
1838         (GenerateCallWith):
1839         (NativeToJSValue):
1840         (GenerateConstructorDefinition):
1841         * bridge/jni/jni_jsobject.h:
1842         * bridge/jni/jni_jsobject.mm:
1843         (JavaJSObject::convertJObjectToValue):
1844         * bridge/jni/jsc/JavaInstanceJSC.cpp:
1845         (JavaInstance::invokeMethod):
1846         * bridge/objc/objc_utility.mm:
1847         (JSC::Bindings::convertValueToObjcValue):
1848         * bridge/runtime_method.cpp:
1849         (JSC::callRuntimeMethod):
1850         * bridge/runtime_object.cpp:
1851         (JSC::Bindings::callRuntimeConstructor):
1852         * testing/js/WebCoreTestSupport.cpp:
1853         (WebCoreTestSupport::injectInternalsObject):
1854         (WebCoreTestSupport::resetInternalsObject):
1855
1856 2012-04-05  Martin Robinson  <mrobinson@igalia.com>
1857
1858         [GTK] Scrolling some iframes that are partially out of the viewport leads to repaint errors
1859         https://bugs.webkit.org/show_bug.cgi?id=83309
1860
1861         Reviewed by Gustavo Noronha Silva.
1862
1863         Test: platform/gtk/fast/frames/scrolling-iframe-out-of-viewport.html
1864
1865         The X11 backing store was not properly trimming the scroll region when it
1866         was only a portion of the screen. This was hidden by subsequent repaints.
1867
1868         * platform/gtk/GtkWidgetBackingStoreX11.cpp:
1869         (WebCore::WidgetBackingStore::scroll): Fix the calculation of the scrolling region.
1870
1871 2012-04-05  Sheriff Bot  <webkit.review.bot@gmail.com>
1872
1873         Unreviewed, rolling out r113299.
1874         http://trac.webkit.org/changeset/113299
1875         https://bugs.webkit.org/show_bug.cgi?id=83297
1876
1877         The patch broke 11 tests on Lion. (Requested by jonlee on
1878         #webkit).
1879
1880         * xml/parser/XMLDocumentParser.h:
1881         (XMLDocumentParser):
1882         * xml/parser/XMLDocumentParserLibxml2.cpp:
1883         (WebCore::XMLDocumentParser::XMLDocumentParser):
1884         (WebCore::XMLDocumentParser::startElementNs):
1885         (WebCore::XMLDocumentParser::endElementNs):
1886         (WebCore::getEntityHandler):
1887         (WebCore::XMLDocumentParser::initializeParserContext):
1888
1889 2012-04-05  Justin Novosad  <junov@chromium.org>
1890
1891         [Chromium] Correct misleading trace event names in Canvas2DLayerChromium
1892         https://bugs.webkit.org/show_bug.cgi?id=83310
1893
1894         Reviewed by Adrienne Walker.
1895
1896         * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
1897         (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
1898
1899 2012-04-05  Dean Jackson  <dino@apple.com>
1900
1901         [mac] requestAnimationFrame sometimes stuck when page loads in a background tab
1902         https://bugs.webkit.org/show_bug.cgi?id=76105
1903
1904         Reviewed by Simon Fraser.
1905
1906         Fix three issues with requestAnimationFrame:
1907         - It's possible for the call to rAF to come to the document before there
1908           is a page associated. Added a guard for this.
1909         - A page may try to suspend the scripted animations before the
1910           ScriptedAnimationController exists, in which case we need to
1911           suspend it immediately after it is created. Do this by keeping
1912           track of the state in Page. Otherwise rAF would be busy looping
1913           on hidden pages until they are brought to the front and hidden again.
1914         - A page created in the background (from WebKit1) does not get
1915           informed it is not visible. This can mean that resume() is called
1916           more times than suspend() and we get into a state where the number
1917           of suspensions becomes -1, and thus fails truthiness tests. Clamp it
1918           to values >= 0.
1919
1920         No new tests, since this is not automatically testable. The most reliable test
1921         is to open a page with rAF in a background tab within Safari.
1922
1923         * dom/Document.cpp:
1924         (WebCore::Document::webkitRequestAnimationFrame):
1925         * dom/ScriptedAnimationController.cpp:
1926         (WebCore::ScriptedAnimationController::resume):
1927         * page/Page.cpp:
1928         (WebCore::Page::Page):
1929         (WebCore::Page::suspendScriptedAnimations):
1930         (WebCore::Page::resumeScriptedAnimations):
1931         * page/Page.h:
1932         (WebCore::Page::scriptedAnimationsSuspended):
1933         (Page):
1934
1935 2012-04-05  Brady Eidson  <beidson@apple.com>
1936
1937         <rdar://problem/9359029> and https://bugs.webkit.org/show_bug.cgi?id=83311
1938         Crashes in WebProcess at WebCore::HistoryController::recursiveSetProvisionalItem when restoring previous session
1939
1940         Reviewed by Sam Weinig.
1941
1942         It's possible to hit a race condition between the UIProcess and the WebProcess where the UIProcess records for a 
1943         page have been cleared out but the WebProcess is still trying to perform a history navigation within that page.
1944         
1945         In this situation HistoryController code that expects there to always be a current history item in the back/forward
1946         controller is wrong.
1947
1948         No new tests. (The race conditions involved have proven making a test impractical)
1949
1950         * loader/HistoryController.cpp:
1951         (WebCore::HistoryController::recursiveSetProvisionalItem): Don't ASSERT the fromItem. We now know there might not be one.
1952         (WebCore::HistoryController::recursiveGoToItem): Ditto
1953         (WebCore::HistoryController::itemsAreClones): Always return false if either item is null, as a null item and a non-null
1954           item cannot possible be clones of each other.
1955
1956 2012-04-05  Adam Klein  <adamk@chromium.org>
1957
1958         Crash in MutationObservers due to an invalid HashSet iterator
1959         https://bugs.webkit.org/show_bug.cgi?id=83304
1960
1961         Reviewed by Ojan Vafai.
1962
1963         If the observed node has been GCed when we clear transient observers
1964         from it, the HashSet iterator in WebKitMutationObserver::deliver would
1965         be invalidated. This patch fixes that behavior by copying the relevant
1966         registrations into a seperate vector first and operating on the copy.
1967
1968         This patch also fixes a bug: transient observers should be cleared
1969         after every microtask, not just when delivering.
1970
1971         Tests: fast/mutation/clear-transient-without-delivery.html
1972                fast/mutation/transient-gc-crash.html
1973
1974         * dom/MutationObserverRegistration.cpp:
1975         (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
1976         Notify the observer that it has a transient registration so it can be properly cleared.
1977         * dom/MutationObserverRegistration.h:
1978         (WebCore::MutationObserverRegistration::hasTransientRegistrations):
1979         Add an accessor for use when deliver() creates its vector of registrations.
1980         * dom/WebKitMutationObserver.cpp:
1981         (WebCore::WebKitMutationObserver::setHasTransientRegistration): Add this to the active observer set
1982         to allow transient registrations to be cleared appropriately.
1983         (WebCore::WebKitMutationObserver::deliver): Avoid modifying m_registrations while iterating over it.
1984         Clear registrations before checking for a lack of records to deliver.
1985         * dom/WebKitMutationObserver.h:
1986
1987 2012-04-05  Adam Klein  <adamk@chromium.org>
1988
1989         Rebaseline binding tests after r113272.
1990
1991         * bindings/scripts/test/V8/V8TestInterface.cpp:
1992         (WebCore::V8TestInterface::constructorCallback):
1993         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1994         (WebCore::V8TestNamedConstructorConstructorCallback):
1995         * bindings/scripts/test/V8/V8TestObj.cpp:
1996         (WebCore::V8TestObj::constructorCallback):
1997         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1998         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
1999
2000 2012-04-05  Stephen White  <senorblanco@chromium.org>
2001
2002         [chromium] Drawing an accelerated canvas onto itself is slow.
2003         https://bugs.webkit.org/show_bug.cgi?id=83295
2004
2005         Fixed by using a GPU-side deepCopy() in skia, so we don't trigger a
2006         readback and re-upload.
2007
2008         Reviewed by James Robinson.
2009
2010         Correctness is covered by existing tests. Performance is covered
2011         by the test case attached to the bug.
2012
2013         * platform/graphics/skia/ImageSkia.cpp:
2014         (WebCore::BitmapImageSingleFrameSkia::create):
2015
2016 2012-04-05  Dana Jansens  <danakj@chromium.org>
2017
2018         [chromium] Record the number of tiles paint-culled instead of the incorrect number of pixels
2019         https://bugs.webkit.org/show_bug.cgi?id=82423
2020
2021         Reviewed by Adrienne Walker.
2022
2023         We currently attempt to record the number of pixels we save from uploading,
2024         however the number is wrong in two ways.
2025         1) An early-out if everything is culled results in nothing being reported.
2026         2) With threaded-compositor, the number of pixels uploaded in one tile can be
2027         changed by culling in another tile, making the number far too difficult to
2028         compute to be worthwhile. If a tile was going to be partial-updated, but is
2029         culled, now a new tile gets to be partial-updated instead, which affects the
2030         numbers.
2031
2032         This patch breaks up CCOverdrawMetrics to make the methods/variables less
2033         overloaded and more clear. This way they don't have to mirror each other
2034         so closely on paint/draw sides.
2035
2036         Then we record the number of tiles for which we prevented upload via paint
2037         culling. This will still over-report (a dirty culled tile stays dirty and
2038         will be culled again each commit), but it seems more reasonable as it
2039         clearly does not try to mimic a performance metric in the way that a pixel
2040         count does, but still gives a rough estimation of the amount of paint
2041         culling going on in a page.
2042
2043         Covered by existing tests, modified where needed.
2044
2045         * platform/graphics/chromium/TiledLayerChromium.cpp:
2046         (WebCore::TiledLayerChromium::prepareToUpdateTiles):
2047         * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
2048         (WebCore::CCOverdrawMetrics::CCOverdrawMetrics):
2049         (WebCore::CCOverdrawMetrics::didCullTileForUpload):
2050         (WebCore):
2051         (WebCore::CCOverdrawMetrics::didUpload):
2052         (WebCore::CCOverdrawMetrics::didCullForDrawing):
2053         (WebCore::CCOverdrawMetrics::recordMetrics):
2054         (WebCore::CCOverdrawMetrics::recordMetricsInternal):
2055         * platform/graphics/chromium/cc/CCOverdrawMetrics.h:
2056         (CCOverdrawMetrics):
2057         (WebCore::CCOverdrawMetrics::pixelsCulledForDrawing):
2058         (WebCore::CCOverdrawMetrics::pixelsUploadedOpaque):
2059         (WebCore::CCOverdrawMetrics::pixelsUploadedTranslucent):
2060         (WebCore::CCOverdrawMetrics::tilesCulledForUpload):
2061         * platform/graphics/chromium/cc/CCQuadCuller.cpp:
2062         (WebCore::CCQuadCuller::append):
2063
2064 2012-04-05  Enrica Casucci  <enrica@apple.com>
2065
2066         Provide a separate editing command to cleanup of redundant markup.
2067         https://bugs.webkit.org/show_bug.cgi?id=83240
2068
2069         Reviewed by Ryosuke Niwa.
2070
2071         This patch moves the logic originally performed by the private
2072         method removeRedundantMarkup inside ReplaceSelectionCommand into
2073         a separate command. This way the markup cleanup can be exposed as
2074         a separate command, independent from ReplaceSelectionCommand.
2075         
2076         No new tests. No change in functionality.
2077
2078         * CMakeLists.txt:
2079         * GNUmakefile.list.am:
2080         * Target.pri:
2081         * WebCore.gypi:
2082         * WebCore.vcproj/WebCore.vcproj:
2083         * WebCore.xcodeproj/project.pbxproj:
2084         Added new file to project files.
2085         * editing/EditorAllInOne.cpp: Added SimplifyMarkupCommand.
2086         * editing/ReplaceSelectionCommand.cpp:
2087         (WebCore::ReplaceSelectionCommand::doApply): Now uses SimplifyMarkupCommand.
2088         * editing/ReplaceSelectionCommand.h:
2089         (ReplaceSelectionCommand): Removed removeRedundantMarkup.
2090         * editing/SimplifyMarkupCommand.cpp: Added.
2091         (WebCore::SimplifyMarkupCommand::SimplifyMarkupCommand):
2092         (WebCore::SimplifyMarkupCommand::doApply):
2093         * editing/SimplifyMarkupCommand.h: Added.
2094         (WebCore::SimplifyMarkupCommand::create):
2095
2096 2012-04-05  Shawn Singh  <shawnsingh@chromium.org>
2097
2098         [chromium] Need to clip to homogeneous w=0 plane when applying transforms.
2099         https://bugs.webkit.org/show_bug.cgi?id=80806
2100
2101         Reviewed by Adrienne Walker.
2102
2103         Unit tests added to CCLayerTreeHostCommon. This change is also
2104         covered by other existing unit tests and layout tests.
2105
2106         WebCore TransformationMatrix mapRect / mapQuad / projectQuad do
2107         not properly handle the case where a surface is oriented partially
2108         behind the camera, with a perspective projection. In this case,
2109         projected points may appear to be valid in cartesian coordinates,
2110         but they are indeed not valid, and this problem can only be
2111         detected in homogeneous coordinates after applying the transform,
2112         before the divide-by-w step.
2113
2114         The correct solution is to clip geometry where w < 0. This patch
2115         makes this change local to chromium only, to fix rendering bugs
2116         that arise from this problem. The primary fix is to correct
2117         calculateVisibleLayerRect(), but other ancillary locations are
2118         also fixed, in particular, the antialiasing code path is simply
2119         skipped when this case arises.
2120
2121         Eventually this math needs to be merged into TransformationMatrix,
2122         to fix hit-testing bugs that occur in both Chromium and Safari.
2123
2124         * WebCore.gypi:
2125         * platform/graphics/chromium/LayerRendererChromium.cpp:
2126         (WebCore::findTileProgramUniforms):
2127         (WebCore::LayerRendererChromium::drawTileQuad):
2128         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2129         (WebCore::CCLayerTreeHostCommon::calculateVisibleRect):
2130         (WebCore::isScaleOrTranslation):
2131         (WebCore::calculateDrawTransformsAndVisibilityInternal):
2132         * platform/graphics/chromium/cc/CCMathUtil.cpp: Added.
2133         (WebCore):
2134         (WebCore::HomogeneousCoordinate::HomogeneousCoordinate):
2135         (HomogeneousCoordinate):
2136         (WebCore::HomogeneousCoordinate::shouldBeClipped):
2137         (WebCore::HomogeneousCoordinate::cartesianPoint2d):
2138         (WebCore::projectPoint):
2139         (WebCore::mapPoint):
2140         (WebCore::computeClippedPointForEdge):
2141         (WebCore::expandBoundsToIncludePoint):
2142         (WebCore::computeEnclosingRectOfClippedQuad):
2143         (WebCore::computeEnclosingRect):
2144         (WebCore::CCMathUtil::mapClippedRect):
2145         (WebCore::CCMathUtil::projectClippedRect):
2146         (WebCore::CCMathUtil::mapQuad):
2147         (WebCore::CCMathUtil::projectQuad):
2148         * platform/graphics/chromium/cc/CCMathUtil.h: Added.
2149         (WebCore):
2150         (CCMathUtil):
2151         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2152         (WebCore::computeUnoccludedContentRect):
2153
2154 2012-04-05  Patrick Gansterer  <paroga@webkit.org>
2155
2156         [Qt] Correct <wtf/*.h> include paths.
2157         https://bugs.webkit.org/show_bug.cgi?id=83270
2158
2159         Reviewed by Eric Seidel.
2160
2161         Modify the #include declerations so that the
2162         wtf types are included using the full path.
2163
2164         * platform/graphics/TiledBackingStoreBackend.h:
2165
2166 2012-04-05  Antonio Gomes  <agomes@rim.com>
2167
2168         Unreviewed bit left over from rebasing the origin patch before landing it.
2169
2170         Complementary to r113329.
2171
2172         * rendering/HitTestResult.cpp:
2173         (WebCore::HitTestResult::operator=):
2174
2175 2012-04-05  Sheriff Bot  <webkit.review.bot@gmail.com>
2176
2177         Unreviewed, rolling out r113241.
2178         http://trac.webkit.org/changeset/113241
2179         https://bugs.webkit.org/show_bug.cgi?id=83293
2180
2181         Requested by sievers@chromium.org (Requested by zhenyao on
2182         #webkit).
2183
2184         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2185         (WebCore::CCLayerTreeHostImpl::canDraw):
2186         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
2187         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
2188         (CCLayerTreeHostImpl):
2189         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2190         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
2191
2192 2012-04-05  Sheriff Bot  <webkit.review.bot@gmail.com>
2193
2194         Unreviewed, rolling out r113341.
2195         http://trac.webkit.org/changeset/113341
2196         https://bugs.webkit.org/show_bug.cgi?id=83299
2197
2198         bots caught some build errors (Requested by shawnsingh on
2199         #webkit).
2200
2201         * WebCore.gypi:
2202         * platform/graphics/chromium/LayerRendererChromium.cpp:
2203         (WebCore::findTileProgramUniforms):
2204         (WebCore::LayerRendererChromium::drawTileQuad):
2205         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2206         (WebCore::CCLayerTreeHostCommon::calculateVisibleRect):
2207         (WebCore::isScaleOrTranslation):
2208         (WebCore::calculateDrawTransformsAndVisibilityInternal):
2209         * platform/graphics/chromium/cc/CCMathUtil.cpp: Removed.
2210         * platform/graphics/chromium/cc/CCMathUtil.h: Removed.
2211         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2212         (WebCore::projectQuad):
2213         (WebCore):
2214         (WebCore::computeUnoccludedContentRect):
2215
2216 2012-04-05  Justin Novosad  <junov@chromium.org>
2217
2218         [Chromium] With the skia port, setting LCD text filtering is causing
2219         texture cache invalidations of gpu canvas backing store
2220         https://bugs.webkit.org/show_bug.cgi?id=74183
2221
2222         Reviewed by Stephen White.
2223
2224         Replacing unnecessary usage of SkCanvas::LayerIter with calls to
2225         SkCanvas::isDrawingToLayer(). Same results, lower overhead, and no
2226         GPU texture invalidation.
2227
2228         * platform/graphics/chromium/FontChromiumWin.cpp:
2229         (WebCore):
2230         (WebCore::TransparencyAwareFontPainter::initializeForGDI):
2231         * platform/graphics/harfbuzz/FontHarfBuzz.cpp:
2232         (WebCore):
2233         (WebCore::adjustTextRenderMode):
2234         * platform/graphics/skia/FontSkia.cpp:
2235         (WebCore):
2236         (WebCore::adjustTextRenderMode):
2237         * platform/graphics/skia/SkiaFontWin.cpp:
2238         (WebCore):
2239         (WebCore::disableTextLCD):
2240         * rendering/RenderThemeChromiumWin.cpp:
2241         (WebCore):
2242
2243 2012-04-05  Zan Dobersek  <zandobersek@gmail.com>
2244
2245         media/track/track-webvtt-tc004-magic-header.html flakily times out
2246         https://bugs.webkit.org/show_bug.cgi?id=72279
2247
2248         Reviewed by Eric Carlson.
2249
2250         Move all the checking for the WebVTT file identifier from TextTrackLoader
2251         to WebVTTParser, notifying the parser clients of parsing failures through
2252         a new method. Remove the WebVTTParser::fileIdentifierMaximumLength method
2253         and make WebVTTParser::hasRequiredFileIdentifier private. The latter now
2254         operates on a vector holding the identifier data to which data is added
2255         until there's enough of it to possibly hold the optional BOM character
2256         and the required WEBVTT character sequence.
2257
2258         No new tests. Fixes an existing test.
2259
2260         * html/track/WebVTTParser.cpp: Fix a typo throughout the file:
2261         fileIdentiferLength -> fileIdentifierLength
2262         (WebCore):
2263         (WebCore::WebVTTParser::parseBytes): Only continue with searcing for
2264         the WEBVTT identifier if there's enough data to possibly contain the
2265         identifier. Report that the file failed to parse if the identifier
2266         was then not found.
2267         (WebCore::WebVTTParser::hasRequiredFileIdentifier): Refactor to operate
2268         on the vector containing identifier data and merge with the
2269         hasLongWebVTTIdentifier function.
2270         * html/track/WebVTTParser.h:
2271         (WebVTTParserClient): Add a new method.
2272         (WebVTTParser):
2273         * loader/TextTrackLoader.cpp:
2274         (WebCore::TextTrackLoader::processNewCueData): Parser is now created
2275         immediately regardless of the mime type the response holds.
2276         (WebCore::TextTrackLoader::fileFailedToParse): Log the error, set the
2277         state to failed, start the cue load timer and cancel the load if the file
2278         was not parsed successfully.
2279         (WebCore):
2280         * loader/TextTrackLoader.h:
2281         (TextTrackLoader):
2282
2283 2012-04-05  Shawn Singh  <shawnsingh@chromium.org>
2284
2285         [chromium] Need to clip to homogeneous w=0 plane when applying transforms.
2286         https://bugs.webkit.org/show_bug.cgi?id=80806
2287
2288         Reviewed by Adrienne Walker.
2289
2290         Unit tests added to CCLayerTreeHostCommon. This change is also
2291         covered by other existing unit tests and layout tests.
2292
2293         WebCore TransformationMatrix mapRect / mapQuad / projectQuad do
2294         not properly handle the case where a surface is oriented partially
2295         behind the camera, with a perspective projection. In this case,
2296         projected points may appear to be valid in cartesian coordinates,
2297         but they are indeed not valid, and this problem can only be
2298         detected in homogeneous coordinates after applying the transform,
2299         before the divide-by-w step.
2300
2301         The correct solution is to clip geometry where w < 0. This patch
2302         makes this change local to chromium only, to fix rendering bugs
2303         that arise from this problem. The primary fix is to correct
2304         calculateVisibleLayerRect(), but other ancillary locations are
2305         also fixed, in particular, the antialiasing code path is simply
2306         skipped when this case arises.
2307
2308         Eventually this math needs to be merged into TransformationMatrix,
2309         to fix hit-testing bugs that occur in both Chromium and Safari.
2310
2311         * WebCore.gypi:
2312         * platform/graphics/chromium/LayerRendererChromium.cpp:
2313         (WebCore::findTileProgramUniforms):
2314         (WebCore::LayerRendererChromium::drawTileQuad):
2315         * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
2316         (WebCore::CCLayerTreeHostCommon::calculateVisibleRect):
2317         (WebCore::isScaleOrTranslation):
2318         (WebCore::calculateDrawTransformsAndVisibilityInternal):
2319         * platform/graphics/chromium/cc/CCMathUtil.cpp: Added.
2320         (WebCore):
2321         (WebCore::HomogeneousCoordinate::HomogeneousCoordinate):
2322         (HomogeneousCoordinate):
2323         (WebCore::HomogeneousCoordinate::shouldBeClipped):
2324         (WebCore::HomogeneousCoordinate::cartesianPoint2d):
2325         (WebCore::projectPoint):
2326         (WebCore::mapPoint):
2327         (WebCore::computeClippedPointForEdge):
2328         (WebCore::expandBoundsToIncludePoint):
2329         (WebCore::computeEnclosingRectOfClippedQuad):
2330         (WebCore::computeEnclosingRect):
2331         (WebCore::CCMathUtil::mapClippedRect):
2332         (WebCore::CCMathUtil::projectClippedRect):
2333         (WebCore::CCMathUtil::mapQuad):
2334         (WebCore::CCMathUtil::projectQuad):
2335         * platform/graphics/chromium/cc/CCMathUtil.h: Added.
2336         (WebCore):
2337         (CCMathUtil):
2338         * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
2339         (WebCore::computeUnoccludedContentRect):
2340
2341 2012-04-05  Jia Pu  <jpu@apple.com>
2342
2343         Move correction panel related functions from EditorClient into separated AlternativeTextClient class.
2344         https://bugs.webkit.org/show_bug.cgi?id=82970
2345
2346         Reviewed by Enrica Casucci.
2347
2348         No new tests, since there's no change of functionality.
2349
2350         The existing correction panel related functions in EditorClient are currently used only by OS X.
2351         We'd like to move them into separate AlternativeTextClient class to avoid using #ifdef's. This
2352         new client class will also hold dictation alternative related interface that we will add soon for
2353         bug 82503.
2354
2355         * WebCore.vcproj/WebCore.vcproj:
2356         * WebCore.xcodeproj/project.pbxproj:
2357         * editing/AlternativeTextController.cpp: Changes in this file are all for calling functions in
2358           AlternativeTextClient instead of those in EditoClient.
2359         (WebCore::AlternativeTextController::show):
2360         (WebCore::AlternativeTextController::dismiss):
2361         (WebCore::AlternativeTextController::dismissSoon):
2362         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
2363         (WebCore::AlternativeTextController::timerFired):
2364         (WebCore::AlternativeTextController::isAutomaticSpellingCorrectionEnabled):
2365         (WebCore::AlternativeTextController::alternativeTextClient):
2366         (WebCore):
2367         (WebCore::AlternativeTextController::editorClient):
2368         (WebCore::AlternativeTextController::textChecker):
2369         (WebCore::AlternativeTextController::recordAutocorrectionResponseReversed):
2370         (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
2371         * editing/AlternativeTextController.h:
2372         (WebCore):
2373         (AlternativeTextController):
2374         * editing/TextCheckingHelper.h:
2375         (WebCore):
2376         * loader/EmptyClients.h:
2377         (EmptyEditorClient):
2378         * page/AlternativeTextClient.h: Added.
2379         (WebCore):
2380         (AlternativeTextClient):
2381         (WebCore::AlternativeTextClient::~AlternativeTextClient):
2382         * page/EditorClient.h:
2383         (EditorClient):
2384         * page/Page.cpp:
2385         (WebCore::Page::Page):
2386         (WebCore::Page::PageClients::PageClients):
2387         * page/Page.h:
2388         (WebCore):
2389         (PageClients):
2390         (Page):
2391         (WebCore::Page::alternativeTextClient):
2392
2393 2012-04-05  Min Qin  <qinmin@google.com>
2394
2395         Fix fullscreen video button for android
2396         https://bugs.webkit.org/show_bug.cgi?id=83087
2397
2398         Reviewed by Dimitri Glazkov.
2399
2400         https://bugs.webkit.org/show_bug.cgi?id=70437 changed css keyword for fullscreen video button.
2401         It is changed from media-fullscreen-button to media-enter-fullscreen-button.
2402         However, it does not change the value in mediaControlChromiumAndroid.css.
2403         No behavior change.
2404
2405         * css/mediaControlsChromiumAndroid.css:
2406         (video::-webkit-media-controls-fullscreen-button):
2407
2408 2012-04-05  Pavel Feldman  <pfeldman@chromium.org>
2409
2410         Web Inspector: CSS file revisions are not restored upon front-end reopen.
2411         https://bugs.webkit.org/show_bug.cgi?id=83292
2412
2413         Reviewed by Yury Semikhatsky.
2414
2415         Populating suggestions before the panel creation now.
2416
2417         * inspector/front-end/inspector.js:
2418         (WebInspector._doLoadedDoneWithCapabilities.get if):
2419
2420 2012-04-04  Simon Fraser  <simon.fraser@apple.com>
2421
2422         Add assertions to check for mutation of RenderLayer z-order lists during enumeration
2423         https://bugs.webkit.org/show_bug.cgi?id=83242
2424
2425         Reviewed by James Robinson.
2426
2427         Add debug-only code that detects whether RenderLayer's z-order and
2428         normal flow lists are being cleared or otherwise mutated while we're
2429         enumerating over them.
2430
2431         * rendering/RenderLayer.cpp:
2432         (WebCore::RenderLayer::RenderLayer):
2433         (WebCore::RenderLayer::paintList):
2434         (WebCore::RenderLayer::calculateLayerBounds):
2435         (WebCore::RenderLayer::dirtyZOrderLists):
2436         (WebCore::RenderLayer::dirtyNormalFlowList):
2437         (WebCore::RenderLayer::updateZOrderListsSlowCase):
2438         (WebCore::RenderLayer::updateNormalFlowList):
2439         * rendering/RenderLayer.h:
2440         (RenderLayer):
2441         (WebCore::RenderLayer::layerListMutationAllowed):
2442         (WebCore::RenderLayer::setLayerListMutationAllowed):
2443         (WebCore):
2444         (LayerListMutationDetector):
2445         (WebCore::LayerListMutationDetector::LayerListMutationDetector):
2446         (WebCore::LayerListMutationDetector::~LayerListMutationDetector):
2447         * rendering/RenderLayerBacking.cpp:
2448         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
2449         * rendering/RenderLayerCompositor.cpp:
2450         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
2451         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
2452         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
2453         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
2454         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
2455         (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect):
2456         (WebCore::RenderLayerCompositor::layerHas3DContent):
2457
2458 2012-04-05  Sheriff Bot  <webkit.review.bot@gmail.com>
2459
2460         Unreviewed, rolling out r113254.
2461         http://trac.webkit.org/changeset/113254
2462         https://bugs.webkit.org/show_bug.cgi?id=83291
2463
2464         Requested by sievers@chromium.org (Requested by zhenyao on
2465         #webkit).
2466
2467         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2468         (WebCore::CCLayerTreeHostImpl::canDraw):
2469
2470 2012-04-05  Sheriff Bot  <webkit.review.bot@gmail.com>
2471
2472         Unreviewed, rolling out r113307.
2473         http://trac.webkit.org/changeset/113307
2474         https://bugs.webkit.org/show_bug.cgi?id=83288
2475
2476         Requested by sievers@chromium.org (Requested by zhenyao on
2477         #webkit).
2478
2479         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2480         (WebCore::CCLayerTreeHostImpl::canDraw):
2481
2482 2012-03-14  Antonio Gomes  <agomes@rim.com>
2483
2484         Extend HitTestResult to support not "discarding" shadow content in favor of its DOM ancestor
2485         https://bugs.webkit.org/show_bug.cgi?id=80847
2486
2487         Reviewed by David Hyatt.
2488
2489         In order to improve touch precision on shadow tree content, patch
2490         extends the rect-hittest'ing system to allow shadow content
2491         to be stored as the rect-hittest result node list.
2492
2493         Primary use cases are for this extension is making it easier to
2494         improve the clickability of default controls of <video> and <audio>
2495         elements.
2496
2497         For the callee site, the use is simple: if shadow content in the rect-hittest
2498         result is desired, just add an extra 'AllowShadowContent' parameter at the creation
2499         of the HitTestResult object.
2500
2501         Test: fast/dom/nodesFromRect-shadowContent.html
2502
2503         * dom/Document.cpp:
2504         (WebCore::Document::nodesFromRect):
2505         * dom/Document.h:
2506         (Document):
2507         * page/EventHandler.cpp:
2508         (WebCore::EventHandler::hitTestResultAtPoint):
2509         * rendering/HitTestResult.cpp:
2510         (WebCore::HitTestResult::HitTestResult):
2511         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
2512         * rendering/HitTestResult.h:
2513         (HitTestResult):
2514         (WebCore::HitTestResult::shadowContentFilterPolicy):
2515         * rendering/RenderImage.cpp:
2516         (WebCore::RenderImage::nodeAtPoint):
2517         * rendering/RenderLayer.cpp:
2518         (WebCore::RenderLayer::hitTestLayer):
2519         (WebCore::RenderLayer::hitTestList):
2520         * testing/Internals.cpp:
2521         (WebCore::Internals::nodesFromRect):
2522         * testing/Internals.h:
2523         (Internals):
2524         * testing/Internals.idl:
2525
2526 2012-04-05  Hans Muller  <hmuller@adobe.com>
2527
2528         Rename CSS Exclusions "rect" value to "rectangle"
2529         https://bugs.webkit.org/show_bug.cgi?id=82367
2530
2531         Reviewed by Ryosuke Niwa.
2532
2533         Changed the CSS exclusion shape called "rect" to "rectangle" to match
2534         the current draft spec - http://dev.w3.org/csswg/css3-exclusions.
2535
2536         The meeting minutes where the decision to rename the exclusion "rect" function
2537         to "rectangle" are: http://lists.w3.org/Archives/Public/www-style/2012Feb/0325.html
2538
2539         No new tests were created; just updated the existing ones.
2540
2541         * css/CSSParser.cpp:
2542         (WebCore::CSSParser::parseWrapShapeRectangle):
2543         (WebCore::CSSParser::parseWrapShape):
2544         * css/CSSParser.h:
2545         * css/CSSWrapShapes.cpp:
2546         (WebCore::CSSWrapShapeRectangle::cssText):
2547         * css/CSSWrapShapes.h:
2548         (WebCore::CSSWrapShapeRectangle::create):
2549         (WebCore::CSSWrapShapeRectangle::type):
2550         (WebCore::CSSWrapShapeRectangle::CSSWrapShapeRectangle):
2551
2552 2012-04-05  Arvid Nilsson  <anilsson@rim.com>
2553
2554         [BlackBerry] Disable paintingGoesToWindow() for the root layer when forced compositing mode is active
2555         https://bugs.webkit.org/show_bug.cgi?id=83127
2556
2557         Reviewed by Rob Buis.
2558
2559         RIM PR: 136381
2560         The BlackBerry port will use accelerated compositing code path to
2561         render the root layer in some situations.
2562
2563         The plan is to do this by activating the "force compositing mode"
2564         setting, but that in itself doesn't get us all the way, since painting
2565         will still go to window for the root layer.
2566
2567         Fixed by adding a special clause in
2568         RenderLayerBacking::paintingGoesToWindow() for PLATFORM(BLACKBERRY).
2569
2570         No new tests, this is currently not testable with the BlackBerry WebKit
2571         testing infrastructure.
2572
2573         * rendering/RenderLayerBacking.cpp:
2574         (WebCore::RenderLayerBacking::paintingGoesToWindow):
2575         * rendering/RenderLayerCompositor.h:
2576         (RenderLayerCompositor):
2577         (WebCore::RenderLayerCompositor::inForcedCompositingMode): Added.
2578
2579 2012-04-05  Stephen Chenney  <schenney@chromium.org>
2580
2581         REGRESSION(99539): Infinite repaint loop with SVGImage and deferred repaint timers
2582         https://bugs.webkit.org/show_bug.cgi?id=78315
2583
2584         Reviewed by Dimitri Glazkov.
2585
2586         The existing fix for this issue was failing to check if the frameView object
2587         was currently _in_ layout, in addition to whether it needs layout. Calling the
2588         redraw method while in layout leads to a debug assertion and potential infinite
2589         layout loops. Now we check whether we need layout or are in layout. We also add
2590         a check when the repaint timer fires to ensure we do not call redraw during layout
2591         at that point.
2592
2593         This patch was tested with tens of thousands of runs on layout test cases that
2594         previously crashed at a rate of about 1 in 25. Now we see no crashes and no test
2595         failures.
2596
2597         No new tests, as this exists to fix flaky existing tests.
2598
2599         * svg/graphics/SVGImageCache.cpp:
2600         (WebCore::SVGImageCache::imageContentChanged):
2601         (WebCore::SVGImageCache::redrawTimerFired):
2602
2603 2012-04-05  Keishi Hattori  <keishi@webkit.org>
2604
2605         Hide datalist element
2606         https://bugs.webkit.org/show_bug.cgi?id=82874
2607
2608         The datalist element should be hidden when ENABLE_DATALIST is on.
2609
2610         Reviewed by Kent Tamura.
2611
2612         Tests: fast/forms/datalist/datalist-fallback-content-expected.html
2613                fast/forms/datalist/datalist-fallback-content.html
2614
2615         * css/html.css:
2616         (datalist): Added display:none.
2617
2618 2012-04-05  W. James MacLean  <wjmaclean@chromium.org>
2619
2620         Adjust max bisection search iterations for TouchpadFlingGestureCurve.
2621         https://bugs.webkit.org/show_bug.cgi?id=83166
2622
2623         Reviewed by James Robinson.
2624
2625         Covered by existing tests.
2626
2627         * platform/TouchpadFlingPlatformGestureCurve.cpp:
2628         (WebCore):
2629
2630 2012-04-05  Peter Rybin  <peter.rybin@gmail.com>
2631
2632         Web Inspector: CodeGeneratorInspector.py: switch FileSystem, Profiler and Worker domains to typed API
2633         https://bugs.webkit.org/show_bug.cgi?id=83069
2634
2635         Reviewed by Yury Semikhatsky.
2636
2637         Domains are switched to 'strict' mode. However, hardly any changes were needed in C++ code because
2638         only basic types are currently used in Inspector.json.
2639
2640         * inspector/CodeGeneratorInspector.py:
2641         * inspector/InspectorProfilerAgent.cpp:
2642         (WebCore::InspectorProfilerAgent::getProfileHeaders):
2643         (WebCore):
2644         (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
2645         * inspector/InspectorProfilerAgent.h:
2646         (InspectorProfilerAgent):
2647
2648 2012-04-05  Levi Weintraub  <leviw@chromium.org>
2649
2650         DOM measurement APIs should operate on pixel snapped values.
2651         https://bugs.webkit.org/show_bug.cgi?id=83138
2652
2653         Reviewed by Julien Chaffraix.
2654
2655         DOM measurement APIs return unscaled integers. In an effort to return the best possible values (and
2656         most consistent with current behavior) when we use sub-pixel values for Layout, we want to adjust
2657         the actual on-screen position and size values for scaling, not the sub-pixel values.
2658
2659         No new tests. No change in behavior.
2660
2661         * dom/Element.cpp:
2662         (WebCore::adjustForLocalZoom): Needs to return an integer, since this is what the DOM API calls for.
2663         (WebCore::Element::offsetWidth): Using pixel snapped values for all the following functions.
2664         (WebCore::Element::offsetHeight):
2665         (WebCore::Element::clientLeft):
2666         (WebCore::Element::clientTop):
2667         (WebCore::Element::clientWidth):
2668         (WebCore::Element::clientHeight):
2669         * html/HTMLImageElement.cpp:
2670         (WebCore::HTMLImageElement::width):
2671         (WebCore::HTMLImageElement::height):
2672
2673 2012-04-05  Pavel Feldman  <pfeldman@chromium.org>
2674
2675         Web Inspector: add ability to copy resource URL from web inspector's resources page.
2676         https://bugs.webkit.org/show_bug.cgi?id=83175
2677
2678         Reviewed by Yury Semikhatsky.
2679
2680         Added requested context menu item.
2681
2682         * inspector/front-end/ResourcesPanel.js:
2683         (WebInspector.FrameResourceTreeElement.prototype._handleContextMenuEvent):
2684
2685 2012-04-04  Andrey Kosyakov  <caseq@chromium.org>
2686
2687         Web Inspector: display frame duration instead of time ruler in Timeline panel's frame mode
2688         https://bugs.webkit.org/show_bug.cgi?id=83184
2689
2690         Reviewed by Pavel Feldman.
2691
2692         * inspector/front-end/TimelineFrameController.js:
2693         (WebInspector.TimelineFrameController): Maintain reference to TimelinePresentationModel
2694         (WebInspector.TimelineFrameController.prototype._flushFrame): Report frames to TimelinePresentationModel (only real ones)
2695         * inspector/front-end/TimelineGrid.js:
2696         (WebInspector.TimelineGrid.prototype.removeDividers): remove time marks/labels from upper time ruler
2697         * inspector/front-end/TimelineOverviewPane.js:
2698         (WebInspector.TimelineOverviewPane.prototype._updateEventDividers): Updated call site of createEventDivider
2699         * inspector/front-end/TimelinePanel.js:
2700         (WebInspector.TimelinePanel.prototype._updateEventDividers):
2701         (WebInspector.TimelinePanel.prototype._shouldShowFrames):
2702         (WebInspector.TimelinePanel.prototype._updateFrames): Frame bars rendering logic.
2703         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline.addTimestampRecords): Do not keep frames in the panel any more.
2704         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
2705         (WebInspector.TimelinePanel.prototype._refresh): Moved updateDividers() call here...
2706         (WebInspector.TimelinePanel.prototype._refreshRecords):  ... from here.
2707         * inspector/front-end/TimelinePresentationModel.js:
2708         (WebInspector.TimelinePresentationModel.createEventDivider): Use type & title, not entire record.
2709         (WebInspector.TimelinePresentationModel.prototype.frames): Maintain frames in the TimelinePresentationModel.
2710         (WebInspector.TimelinePresentationModel.prototype.reset): ditto.
2711         (WebInspector.TimelinePresentationModel.prototype.addFrame): ditto.
2712         (WebInspector.TimelinePresentationModel.Record): Fix title for timestamp events (drive by).
2713         * inspector/front-end/timelinePanel.css:
2714         (.timeline-frame-strip):
2715
2716 2012-04-05  MORITA Hajime  <morrita@google.com>
2717
2718         IsCommentNode flags is a waste.
2719         https://bugs.webkit.org/show_bug.cgi?id=83251
2720
2721         Reviewed by Ryosuke Niwa.
2722
2723         Effectively nobody uses it. To save a precious NodeFlags bit, this
2724         change removes NodeFlags::IsCommentFlag and its companion mehtod
2725         Node::isCommentNode().
2726
2727         No new tests. No behaviour change.
2728
2729         * dom/CharacterData.h:
2730         (WebCore::CharacterData::CharacterData):
2731         * dom/Comment.cpp:
2732         (WebCore::Comment::Comment):
2733         * dom/Node.h:
2734         * rendering/RenderTreeAsText.cpp:
2735         (WebCore::getTagName):
2736         This was the only client of Node::isCommentNode(). Replaced it with nodeType() call.
2737
2738 2012-04-05  Hans Wennborg  <hans@chromium.org>
2739
2740         webkit_unit_tests build fix.
2741         https://bugs.webkit.org/show_bug.cgi?id=83261
2742
2743         Unreviewed, webkit_unit_tests buildfix.
2744
2745         The CCLayerTreeHostTestEmptyContentsShouldNotDraw.runMultiThread test
2746         stopped working after r113254.
2747
2748         Disable it for now.
2749
2750         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2751         (WebCore::CCLayerTreeHostImpl::canDraw):
2752
2753 2012-04-05  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
2754
2755         [EFL] keycode translation is wrong for function keys
2756         https://bugs.webkit.org/show_bug.cgi?id=82738
2757
2758         This patch fixes keycode translation for function keys.
2759
2760         Reviewed by Philippe Normand.
2761
2762         Test: fast/events/keydown-function-keys.html
2763
2764         * platform/efl/EflKeyboardUtilities.cpp:
2765         (WebCore::createWindowsKeyMap):
2766
2767 2012-04-01  Nikolas Zimmermann  <nzimmermann@rim.com>
2768
2769         Work around an entity parsing bug in libxml2 2.7.3 (supplied with Lion) and unskip tests
2770         https://bugs.webkit.org/show_bug.cgi?id=82577
2771
2772         Reviewed by Filip Pizlo.
2773
2774         Work-around entity expansion bug that affects several SVG tests on Lion.
2775
2776         Sample test document which is currently broken:
2777         <?xml version="1.0" encoding="UTF-8"?>
2778         <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd" [
2779         <!ENTITY Smile "<rect x='.5' y='.5' width='29' height='39' fill='black' stroke='red'/>">
2780         ]>
2781
2782         <svg xmlns="http://www.w3.org/2000/svg">&Smile;</svg>
2783
2784         The expanded rect carries no namespace, thus an Element will be created for it, instead of a SVGRectElement.
2785         libxml2 2.7.4 fixed this bug (https://bugzilla.gnome.org/show_bug.cgi?id=502960) in 2009 already, but Lion
2786         still ships with 2.7.3, so we need to find a work-around for the problem. It works like this:
2787         - When an entity is requested (getEntityHandler) determine whether the entity is being declared (while the <!ENTITY.. parses)
2788           or wheter its references (when the &Smile; is parsed). If its referenced, record the current depth of the libxml2 parser.
2789         - When startElementNs is called while we're expanding entities, be sure to transfer the namespace of the parent node
2790           to the new node, but only do this if the current depth() is greater than the depth() at the time where entity expansion started.
2791           This way we only apply our workaround for elements inside entities, that get expanded at the insertion point.
2792         - When endElementNs is called, and our current depth() is less than our equal to the depth() where entity expansion started,
2793           clear the recorded detph(), and stop executing the workaround.
2794
2795         It requires storing an extra integer & boolean in XMLDocumentParser, which is only used for this work-around.
2796
2797         * xml/parser/XMLDocumentParser.h:
2798         (XMLDocumentParser):
2799         (WebCore::XMLDocumentParser::isParsingEntityDeclaration):
2800         (WebCore::XMLDocumentParser::setIsParsingEntityDeclaration):
2801         (WebCore::XMLDocumentParser::depthTriggeringEntityExpansion):
2802         (WebCore::XMLDocumentParser::setDepthTriggeringEntityExpansion):
2803         * xml/parser/XMLDocumentParserLibxml2.cpp:
2804         (WebCore::XMLDocumentParser::XMLDocumentParser):
2805         (WebCore::hackAroundLibXMLEntityParsingBug):
2806         (WebCore::XMLDocumentParser::startElementNs):
2807         (WebCore::XMLDocumentParser::endElementNs):
2808         (WebCore::entityDeclarationHandler):
2809         (WebCore::getEntityHandler):
2810         (WebCore::XMLDocumentParser::initializeParserContext):
2811
2812 2012-04-04  Kent Tamura  <tkent@chromium.org>
2813
2814         Add JavaScript and CSS code for the calendar picker implementation
2815         https://bugs.webkit.org/show_bug.cgi?id=83011
2816
2817         Reviewed by Hajime Morita.
2818
2819         Add calendarPicker.js and calendarPicker.css, and add a build rule to
2820         generate a C++ file. This change doesn't make any behavior change
2821         because the code is wrapped by ENABLE(CALENDAR_PICKER).
2822
2823         Tests: ManualTests/forms/calendar-picker.html
2824
2825         * Resources/calendarPicker.css: Added.
2826         * Resources/calendarPicker.js: Added.
2827         * WebCore.gyp/WebCore.gyp: Generate CalendarPicker.{cpp,h} from calendarPicker.{css,js}.
2828
2829 2012-04-05  Kinuko Yasuda  <kinuko@chromium.org>
2830
2831         Expose DataTransferItem.getAsEntry() to allow users access dropped files as FileEntry
2832         https://bugs.webkit.org/show_bug.cgi?id=82592
2833
2834         Reviewed by David Levin.
2835
2836         For now the method is prefixed thus it is to be exposed as 'webkitGetAsEntry'.
2837
2838         The API is proposed and discussed in the following whatwg thread:
2839         http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-November/033814.html
2840
2841         Add DataTransferItemFilesystem under Modules/filesystem and implemented the bridging part for chromium.
2842
2843         Test: editing/pasteboard/data-transfer-items-drag-drop-entry.html
2844
2845         * Modules/filesystem/DataTransferItemFileSystem.h: Added.
2846         (DataTransferItemFileSystem):
2847         * Modules/filesystem/DataTransferItemFileSystem.idl: Added for DataTransferItem.getAsEntry which is only exposed if filesystem is enabled.
2848         * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp: Added for chromium implementation.
2849         * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.h: Added.
2850         * Modules/filesystem/chromium/DraggedIsolatedFileSystem.cpp: Added.
2851         * Modules/filesystem/chromium/DraggedIsolatedFileSystem.h: Added.
2852         * WebCore.gypi:
2853         * platform/chromium/ChromiumDataObject.cpp:
2854         * platform/chromium/ChromiumDataObject.h:
2855         (WebCore::ChromiumDataObject::filesystemId): Added.
2856         (WebCore::ChromiumDataObject::setFilesystemId): Added.
2857         * platform/chromium/ClipboardChromium.cpp:
2858
2859 2012-04-04  Patrick Gansterer  <paroga@webkit.org>
2860
2861         Add WTF::getCurrentLocalTime()
2862         https://bugs.webkit.org/show_bug.cgi?id=83164
2863
2864         Reviewed by Alexey Proskuryakov.
2865
2866         Replace the calls to WTF::getLocalTime() with time(0) with the new function.
2867         This allows us to use Win32 API on windows to get the same result in a next step.
2868
2869         * html/FTPDirectoryDocument.cpp:
2870         (WebCore::processFileDateString):
2871         * loader/archive/mhtml/MHTMLArchive.cpp:
2872         (WebCore::MHTMLArchive::generateMHTMLData):
2873
2874 2012-04-04  Hayato Ito  <hayato@chromium.org>
2875
2876         Remove ReifiedTreeTraversal.
2877         https://bugs.webkit.org/show_bug.cgi?id=83110
2878
2879         Reviewed by Dimitri Glazkov.
2880
2881         We can now remove ReifiedTreeTraversal. All clients have switched to use ComposedShadowTreeWalker.
2882
2883         No new tests. No change in functionality.
2884
2885         * CMakeLists.txt:
2886         * GNUmakefile.list.am:
2887         * Target.pri:
2888         * WebCore.exp.in:
2889         * WebCore.gypi:
2890         * WebCore.vcproj/WebCore.vcproj:
2891         * WebCore.xcodeproj/project.pbxproj:
2892         * dom/ReifiedTreeTraversal.cpp: Removed.
2893         * dom/ReifiedTreeTraversal.h: Removed.
2894         * testing/Internals.cpp:
2895         * testing/Internals.h:
2896         (Internals):
2897         * testing/Internals.idl:
2898
2899 2012-04-04  Dmitry Lomov  <dslomov@google.com>
2900
2901         WorkerEventQueue::close might access deleted WorkerEventQueue::EventDispatcherTask.
2902         https://bugs.webkit.org/show_bug.cgi?id=83202
2903
2904         On closing the event queue, WorkerEventQueue cancels all the tasks associated with events.
2905         The tasks in their turn delete themselves from the map whenever task gets executed.
2906         However if shutdown occurs when task is in queue but before task gets executed, the task will be deleted without execution.
2907         This patch makes sure that no deleted tasks stay in WorkerEventQueue, by task removing itself in destructor.
2908
2909         Reviewed by David Levin.
2910
2911         Covered by existing tests.
2912
2913         * workers/WorkerEventQueue.cpp:
2914         (WebCore::WorkerEventQueue::EventDispatcherTask::~EventDispatcherTask):
2915         (WorkerEventQueue::EventDispatcherTask):
2916         (WebCore::WorkerEventQueue::EventDispatcherTask::performTask):
2917
2918 2012-04-04  Julien Chaffraix  <jchaffraix@webkit.org>
2919
2920         RenderLayer scrollbars' updates should be split between layout induced and style change induced
2921         https://bugs.webkit.org/show_bug.cgi?id=83213
2922
2923         Reviewed by Simon Fraser.
2924
2925         Refactoring only, no change in behavior.
2926
2927         This patches splits up the 2 reasons for modifying the scrollbars:
2928         - style updates, handled in updateScrollbarsAfterStyleChange.
2929         - layout time, handled in updateScrollbarsAfterLayout.
2930
2931         * rendering/RenderLayer.cpp:
2932         (WebCore::RenderLayer::contentsSize):
2933         Removed now unneeded const-casts.
2934
2935         (WebCore::RenderLayer::setHasHorizontalScrollbar):
2936         (WebCore::RenderLayer::setHasVerticalScrollbar):
2937         Updated to use hasHorizontalScrollbar / hasVerticalScrollbar.
2938
2939         (WebCore::RenderLayer::scrollWidth):
2940         (WebCore::RenderLayer::scrollHeight):
2941         Made those functions |const|.
2942
2943         (WebCore::RenderLayer::computeScrollDimensions):
2944         Removed the unneeded booleans and move the do-we-have-overflow-logic
2945         into hasHorizontalOverflow and hasVerticalOverflow.
2946
2947         (WebCore::RenderLayer::hasHorizontalOverflow):
2948         (WebCore::RenderLayer::hasVerticalOverflow):
2949         Added those new helper functions.
2950
2951         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
2952         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
2953         Updated the latter to call the former.
2954
2955         (WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
2956         (WebCore::RenderLayer::styleChanged):
2957         Ditto.
2958
2959         (WebCore::overflowCanHaveAScrollbar):
2960         Add this helper function for updateScrollbarsAfterStyleChange.
2961
2962         * rendering/RenderLayer.h:
2963         (WebCore::RenderLayer::hasHorizontalScrollbar):
2964         (WebCore::RenderLayer::hasVerticalScrollbar):
2965         Added those 2 new helper functions.
2966
2967 2012-04-04  Andrei Burago  <aburago@chromium.org>
2968
2969         Auto-size may not work on first load
2970         https://bugs.webkit.org/show_bug.cgi?id=82989
2971
2972         Reviewed by David Levin.
2973
2974         No new tests. The only known repro scenario involves using chrome with a third-party extension,
2975         which makes making a test out of it problematic.
2976
2977         * dom/Document.cpp:
2978         (WebCore::Document::implicitClose):
2979         * page/FrameView.cpp:
2980         (WebCore::FrameView::autoSizeIfEnabled):
2981
2982 2012-04-04  Adam Barth  <abarth@webkit.org>
2983
2984         XSSAuditor doesn't catch injected srcdoc attributes
2985         https://bugs.webkit.org/show_bug.cgi?id=83238
2986
2987         Reviewed by Daniel Bates.
2988
2989         <iframe srcdoc> is an XSS injection vector because the srcdoc inherits
2990         the security origin of the parent page.  This patch updates the XSS
2991         auditor to check whether the attribute is injected using the same
2992         hueristics we use for inline event handlers.
2993
2994         Test: http/tests/security/xssAuditor/iframe-srcdoc.html
2995
2996         * html/parser/XSSAuditor.cpp:
2997         (WebCore::XSSAuditor::filterIframeToken):
2998         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
2999         (WebCore::XSSAuditor::eraseAttributeIfInjected):
3000         (WebCore::XSSAuditor::decodedSnippetForAttribute):
3001         * html/parser/XSSAuditor.h:
3002
3003 2012-04-04  Leo Yang  <leo.yang@torchmobile.com.cn>
3004
3005         [BlackBerry] Add local: protocol support in KURL for blackberry
3006         https://bugs.webkit.org/show_bug.cgi?id=82695
3007
3008         Reviewed by Rob Buis.
3009
3010         BlackBerry porting is using local: protocol just as file: protocol
3011         with the exception that it sandboxes the path to the application private space.
3012
3013         * platform/KURL.cpp:
3014         (WebCore::KURL::parse):
3015         (WebCore::portAllowed):
3016
3017 2012-04-04  Simon Fraser  <simon.fraser@apple.com>
3018
3019         https://bugs.webkit.org/show_bug.cgi?id=82994
3020
3021         Reviewed by James Robinson.
3022         
3023         Fix an issue when removing elements with reflections from the document.
3024
3025         Test: compositing/reflections/remove-reflection.html
3026
3027         * platform/graphics/GraphicsLayer.cpp:
3028         (WebCore::GraphicsLayer::willBeDestroyed):
3029
3030 2012-04-04  Charles Wei  <charles.wei@torchmobile.com.cn>
3031
3032         Need using namespace std for system calls in MIMESniffing.cpp
3033         https://bugs.webkit.org/show_bug.cgi?id=82706
3034
3035         Reviewed by Antonio Gomes.
3036
3037         No new tests, just fix the compile error for BlackBerry porting.
3038
3039         * platform/network/MIMESniffing.cpp:
3040
3041 2012-04-04  Greg Billock  <gbillock@google.com>
3042
3043         Switch web intents API to be vendor-prefixed
3044         https://bugs.webkit.org/show_bug.cgi?id=83172
3045
3046         Reviewed by Adam Barth.
3047
3048         * Modules/intents/DOMWindowIntents.idl:
3049         * Modules/intents/NavigatorIntents.cpp:
3050         (WebCore::NavigatorIntents::webkitStartActivity):
3051         * Modules/intents/NavigatorIntents.h:
3052         (NavigatorIntents):
3053         * Modules/intents/NavigatorIntents.idl:
3054
3055 2012-04-04  Alexis Menard  <alexis.menard@openbossa.org>
3056
3057         [Part 4] We should use CSSPropertyID rather than integers when manipulating CSS property ids.
3058         https://bugs.webkit.org/show_bug.cgi?id=83224
3059
3060         Reviewed by Tony Chang.
3061
3062         CSSPropertyID enum holds all the CSS property ids but many parts of WebKit treat the ids
3063         as integers. While it's not incorrect it is nicer to use the enum as a parameter of
3064         functions manipulating property ids, as we ensure that the value passed will be an
3065         existing value. This patch clean up some remaining part of code.
3066
3067         No new tests : There should be no behavior change in this patch.
3068
3069         * css/CSSStyleSelector.cpp:
3070         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3071         * page/animation/AnimationBase.h:
3072         (WebCore::AnimationBase::affectsProperty):
3073         (WebCore::AnimationBase::isAnimatingProperty):
3074         * page/animation/CompositeAnimation.cpp:
3075         (WebCore::CompositeAnimation::getAnimationForProperty):
3076         (WebCore::CompositeAnimation::overrideImplicitAnimations):
3077         (WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations):
3078         (WebCore::CompositeAnimation::isAnimatingProperty):
3079         * page/animation/CompositeAnimation.h:
3080         (CompositeAnimation):
3081         * page/animation/ImplicitAnimation.cpp:
3082         (WebCore::ImplicitAnimation::affectsProperty):
3083         * page/animation/ImplicitAnimation.h:
3084         (WebCore::ImplicitAnimation::transitionProperty):
3085         (WebCore::ImplicitAnimation::animatingProperty):
3086         (ImplicitAnimation):
3087         * page/animation/KeyframeAnimation.cpp:
3088         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
3089         (WebCore::KeyframeAnimation::hasAnimationForProperty):
3090         (WebCore::KeyframeAnimation::overrideAnimations):
3091         (WebCore::KeyframeAnimation::resumeOverriddenAnimations):
3092         (WebCore::KeyframeAnimation::affectsProperty):
3093         * page/animation/KeyframeAnimation.h:
3094         (KeyframeAnimation):
3095         * rendering/RenderLayerBacking.cpp:
3096         (WebCore::RenderLayerBacking::transitionPaused):
3097         (WebCore::RenderLayerBacking::transitionFinished):
3098         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
3099         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
3100         * rendering/RenderLayerBacking.h:
3101         (RenderLayerBacking):
3102
3103 2012-04-04  Rafael Weinstein  <rafaelw@chromium.org>
3104
3105         [MutationObservers] implement takeRecords()
3106         https://bugs.webkit.org/show_bug.cgi?id=83218
3107
3108         Reviewed by Ojan Vafai.
3109
3110         This patch implements MutationObserver.takeRecords per the DOM4 spec.
3111         takeRecords retrieves and clears any pending mutation records for
3112         the observer.
3113
3114         Test: fast/mutation/takeRecords.html
3115
3116         * dom/WebKitMutationObserver.cpp:
3117         (WebCore::WebKitMutationObserver::takeRecords):
3118         (WebCore):
3119         (WebCore::WebKitMutationObserver::deliver):
3120         * dom/WebKitMutationObserver.h:
3121         * dom/WebKitMutationObserver.idl:
3122
3123 2012-04-04  Shinya Kawanaka  <shinyak@chromium.org>
3124
3125         Shadow DOM is exposed in JS.
3126         https://bugs.webkit.org/show_bug.cgi?id=82607
3127
3128         Reviewed by Hajime Morita.
3129
3130         DOMSelection didn't consider nested shadow trees. This patch makes DOMSelection
3131         take nested shadow trees into account.
3132
3133         To test that the element is not in a shadow tree, Internals has a treeScopeRootNode method
3134         which returns the root node of the belonging tree scope.
3135
3136         Test: fast/dom/shadow/selection-shouldnt-expose-shadow-dom.html
3137
3138         * WebCore.exp.in:
3139         * page/DOMSelection.cpp:
3140         (WebCore::selectionShadowAncestor):
3141         (WebCore):
3142         * testing/Internals.cpp:
3143         (WebCore::Internals::treeScopeRootNode):
3144         (WebCore):
3145         * testing/Internals.h:
3146         (Internals):
3147         * testing/Internals.idl:
3148
3149 2012-04-04  Luke Macpherson  <macpherson@chromium.org>
3150
3151         Replace further usage of int with CSSPropertyID.
3152         https://bugs.webkit.org/show_bug.cgi?id=83119
3153
3154         Reviewed by Simon Fraser.
3155
3156         No new tests / no functionality changed.
3157
3158         * css/CSSComputedStyleDeclaration.cpp:
3159         (WebCore::logUnimplementedPropertyID):
3160         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3161         * css/CSSGrammar.y:
3162         * css/CSSParser.cpp:
3163         (WebCore::CSSParser::CSSParser):
3164         * css/CSSParser.h:
3165         (CSSParser):
3166         (WebCore::ShorthandScope::~ShorthandScope):
3167         * css/CSSProperty.h:
3168         (WebCore::CSSProperty::CSSProperty):
3169         * css/SVGCSSComputedStyleDeclaration.cpp:
3170         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
3171         * css/StylePropertySet.h:
3172         (StylePropertySet):
3173         * css/makeprop.pl:
3174         * dom/StyledElement.h:
3175         (StyledElement):
3176         * editing/EditingStyle.h:
3177         (EditingStyle):
3178         * html/HTMLElement.h:
3179         (HTMLElement):
3180
3181 2012-04-04  Adam Klein  <adamk@chromium.org>
3182
3183         Use PassRefPtr in V8DOMWrapper interface to avoid explicit ref() calls
3184         https://bugs.webkit.org/show_bug.cgi?id=82238
3185
3186         Reviewed by Adam Barth.
3187
3188         Relanding r112163 without modification, as it still seems valid.
3189         Will watch Chrome Canaries closely for any memory issues.
3190
3191         The setJSWrapper* methods previously featured a comment that asked
3192         callers to ref the objects before passing them in. This change makes
3193         that contract explicit (and allows the removal of the comment).
3194
3195         In addition, for ConstructorCallbacks, this change slightly reduces
3196         refcount churn by passing on the initial ref via RefPtr::release().
3197
3198         No new tests, no change in behavior.
3199
3200         * bindings/scripts/CodeGeneratorV8.pm:
3201         (GenerateConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref() call.
3202         (GenerateNamedConstructorCallback): ditto.
3203         * bindings/v8/V8DOMWindowShell.cpp:
3204         (WebCore::V8DOMWindowShell::installDOMWindow): Cast to a PassRefPtr and remove explicit ref call.
3205         * bindings/v8/V8DOMWrapper.cpp:
3206         (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Pass leaked refs into the DOMNodeMaps.
3207         * bindings/v8/V8DOMWrapper.h:
3208         (V8DOMWrapper): Make the setJSWrapperFor* methods take PassRefPtr<T>.
3209         (WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Pass leaked ref into the DOMObjectMap.
3210         (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): Pass leaked ref into the ActiveDOMObjectMap.
3211         * bindings/v8/V8Proxy.h:
3212         (WebCore::toV8): Remove explicit ref.
3213         * bindings/v8/WorkerContextExecutionProxy.cpp:
3214         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): Cast to a PassRefPTr and remove explicit ref call.
3215         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
3216         (WebCore::v8HTMLImageElementConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref.
3217         * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
3218         (WebCore::V8WebKitMutationObserver::constructorCallback): ditto.
3219         * bindings/v8/custom/V8WebSocketCustom.cpp:
3220         (WebCore::V8WebSocket::constructorCallback): ditto.
3221         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
3222         (WebCore::V8XMLHttpRequest::constructorCallback): ditto.
3223
3224 2012-04-04  Chris Rogers  <crogers@google.com>
3225
3226         WaveTable::waveDataForFundamentalFrequency() should properly interpret negative frequency
3227         https://bugs.webkit.org/show_bug.cgi?id=83228
3228
3229         Reviewed by Kenneth Russell.
3230
3231         * Modules/webaudio/WaveTable.cpp:
3232         (WebCore::WaveTable::waveDataForFundamentalFrequency):
3233
3234 2012-04-04  Adam Klein  <adamk@chromium.org>
3235
3236         Delay post-insertion notifications until new DOM tree is complete
3237         https://bugs.webkit.org/show_bug.cgi?id=82631
3238
3239         Reviewed by Ojan Vafai.
3240
3241         When inserting a DocumentFragment, WebKit previously would update both
3242         internal WebCore state and mutation event listeners after each node
3243         was inserted. This is inconsistent not only with DOM4, but also
3244         with (at least) Firefox and IE. Given the many bugs over the years in
3245         WebKit due to this behavior, it seems better to delay notification
3246         until the fragment is completely inserted.
3247
3248         The changes to the three core mutation methods below are similar:
3249         the only logic remaining in the loop is checking that insertion is
3250         possible and taking care of that insertion. The entire loop is then
3251         wrapped in forbidEventDispatch/allowEventDispatch, effectively
3252         asserting that none of the code inside will have side effects.
3253
3254         The one bit of logic added to the loop is resizing the targets
3255         vector down to the set of nodes actually inserted as part of the
3256         loop. This makes it possible to simply pass the vector on to
3257         notifyChildrenInserted without having to also pass along a count of
3258         actually-inserted nodes.
3259
3260         As for the code that used to live inside the loop that could have
3261         side-effects, or depended on those side-effects, it has been moved
3262         out, either above (the check that the refChild is still valid in
3263         insertBefore) or after (the calls to notifyChildrenInserted).
3264
3265         Finally, it was necessary to retrofit ChildListMutationScope to take a
3266         vector of added nodes instead of a single node at a time, due to the
3267         assertions in isAddedNodeInOrder (now renamed to be plural). Note that
3268         there is now a single call to ChildListMutationScope::childrenAdded,
3269         inside notifyChildrenInserted.
3270
3271         Test: fast/events/domnodeinserted-entire-fragment.html
3272
3273         * dom/ChildListMutationScope.cpp:
3274         (ChildListMutationScope::MutationAccumulator): Renamed method to be plural.
3275         (WebCore::ChildListMutationScope::MutationAccumulator::areAddedNodesInOrder): Handle a NodeVector instead of a Node.
3276         (WebCore::ChildListMutationScope::MutationAccumulator::childrenAdded): Handle adding a NodeVector instead of a Node.
3277         (WebCore::ChildListMutationScope::MutationAccumulationRouter::childrenAdded): Renamed to be plural, pass NodeVector through.
3278         * dom/ChildListMutationScope.h:
3279         (WebCore::ChildListMutationScope::childrenAdded): ditto.
3280         (MutationAccumulationRouter):
3281         * dom/ContainerNode.cpp:
3282         (WebCore): Renamed updateTreeAfterInsertion to notifyChildrenInserted.
3283         (WebCore::ContainerNode::insertBefore): See main ChangeLog explanation.
3284         (WebCore::ContainerNode::replaceChild): ditto.
3285         (WebCore::ContainerNode::appendChild): ditto.
3286         (WebCore::dispatchChildInsertionEvents): Remove MutationObserver handling.
3287         (WebCore::notifyChildrenInserted): Handle a NodeVector of all inserted children,
3288         and take on responsiblity for MutationObserver handling as well as dispatchSubtreeModifiedEvent.
3289
3290 2012-04-04  Chris Rogers  <crogers@google.com>
3291
3292         RealtimeAnalyserNode should support smaller analysis sizes
3293         https://bugs.webkit.org/show_bug.cgi?id=83215
3294
3295         Reviewed by Kenneth Russell.
3296         
3297         RealtimeAnalyserNode analysis size currently goes no lower than 128.
3298         It is useful to support lower power-of-two sizes.
3299         Decrease this limit to 32.
3300
3301         Updated webaudio/realtimeanalyser-fft-sizing-expected.txt
3302
3303         * Modules/webaudio/RealtimeAnalyser.cpp:
3304         (WebCore):
3305
3306 2012-04-04  Tony Chang  <tony@chromium.org>
3307
3308         CSS transitions should work on the flex property
3309         https://bugs.webkit.org/show_bug.cgi?id=75915
3310
3311         Reviewed by Dean Jackson.
3312
3313         Test: transitions/flex-transitions.html
3314
3315         * page/animation/AnimationBase.cpp:
3316         (WebCore::PropertyWrapperGetter::equals): Fix indention.
3317         (PropertyWrapperFlex): Add a wrapper for -webkit-flex which has 3 values (two floats and
3318         a length), but is not a shorthand.
3319         (WebCore::PropertyWrapperFlex::PropertyWrapperFlex):
3320         (WebCore::PropertyWrapperFlex::equals):
3321         (WebCore::PropertyWrapperFlex::blend):
3322         (WebCore):
3323         (WebCore::AnimationBase::ensurePropertyMap):
3324
3325 2012-04-04  Tom Sepez  <tsepez@chromium.org>
3326
3327         XSSAuditor bypass through HTTP Parameter Pollution.
3328         https://bugs.webkit.org/show_bug.cgi?id=81283
3329
3330         Reviewed by Adam Barth.
3331
3332         Deal with concatenation of multiple parameters via comma-splicing that 
3333         is common to some webservers. We can no longer trust that all of the 
3334         attributes of a reflected script tag, nor the reflected script itself,
3335         came from the same single URL parameter. The fix is to take commas into
3336         account when trucating the snippet used for matching.
3337         
3338         Test: http/tests/security/xssAuditor/script-tag-with-comma.html
3339
3340         * html/parser/XSSAuditor.cpp:
3341         (WebCore::XSSAuditor::filterScriptToken):
3342         (WebCore):
3343         (WebCore::XSSAuditor::decodedSnippetForName):
3344         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
3345
3346 2012-04-04  Dan Bernstein  <mitz@apple.com>
3347
3348         Paginated webviews render nothing in their gutters
3349         https://bugs.webkit.org/show_bug.cgi?id=83231
3350
3351         Reviewed by Adele Peterson.
3352
3353         When the RenderView has columns, nothing draws in the gutters.
3354
3355         * page/FrameView.cpp:
3356         (WebCore::FrameView::paintContents): Paint the background color behind everything when
3357         paginated.
3358
3359 2012-04-04  Mark Pilgrim  <pilgrim@chromium.org>
3360
3361         Call histogramEnumeration directly
3362         https://bugs.webkit.org/show_bug.cgi?id=83106
3363
3364         Reviewed by Adam Barth.
3365
3366         Part of a refactoring project to remove the PlatformSupport
3367         abstraction from some functions. See bug 82948.
3368
3369         * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
3370         (WebCore::histogramEnumeration):
3371         * platform/chromium/HistogramSupportChromium.cpp:
3372         (WebCore::HistogramSupport::histogramEnumeration):
3373         * platform/chromium/PlatformSupport.h:
3374         (PlatformSupport):
3375
3376 2012-04-04  Zhenyao Mo  <zmo@google.com>
3377
3378         Unreviewed, GPU bots build fix.
3379
3380         Commited on behalf of sievers@chromium.org.
3381
3382         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3383         (WebCore::CCLayerTreeHostImpl::canDraw):
3384
3385 2012-04-04  Abhishek Arya  <inferno@chromium.org>
3386
3387         Add helpers to create anonymous table parts.
3388         https://bugs.webkit.org/show_bug.cgi?id=83116
3389
3390         Reviewed by Julien Chaffraix.
3391
3392         The patch introduces helpers to create anonymous table parts by
3393         introducing a new static function createAnonymousWithParentRenderer.
3394         The function builds a new anonymous wrapper of the same type as the class,
3395         inheriting style properties from parent and sets a display based on
3396         argument/default values. Also we streamline the RenderBlock functions
3397         to match this naming convention.
3398
3399         * rendering/RenderBlock.cpp:
3400         (WebCore::RenderBlock::createAnonymousBlockWithSameTypeAs):
3401         (WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
3402         (WebCore):
3403         (WebCore::RenderBlock::createAnonymousColumnsWithParentRendererAndDisplay):
3404         (WebCore::RenderBlock::createAnonymousColumnSpanWithParentRendererAndDisplay):
3405         * rendering/RenderBlock.h:
3406         (RenderBlock):
3407         (WebCore::RenderBlock::createAnonymousBlock):
3408         (WebCore::RenderBlock::createAnonymousColumnsBlock):
3409         (WebCore::RenderBlock::createAnonymousColumnSpanBlock):
3410         * rendering/RenderButton.cpp:
3411         (WebCore::RenderButton::addChild):
3412         * rendering/RenderObject.cpp:
3413         (WebCore::RenderObject::addChild):
3414         * rendering/RenderTable.cpp:
3415         (WebCore::RenderTable::addChild):
3416         (WebCore::RenderTable::createAnonymousWithParentRendererAndDisplay):
3417         (WebCore):
3418         * rendering/RenderTable.h:
3419         (RenderTable):
3420         * rendering/RenderTableCell.cpp:
3421         (WebCore::RenderTableCell::createAnonymousWithParentRendererAndDisplay):
3422         (WebCore):
3423         * rendering/RenderTableCell.h:
3424         (RenderTableCell):
3425         * rendering/RenderTableRow.cpp:
3426         (WebCore::RenderTableRow::addChild):
3427         (WebCore::RenderTableRow::createAnonymousWithParentRendererAndDisplay):
3428         (WebCore):
3429         * rendering/RenderTableRow.h:
3430         (RenderTableRow):
3431         * rendering/RenderTableSection.cpp:
3432         (WebCore::RenderTableSection::addChild):
3433         (WebCore::RenderTableSection::createAnonymousWithParentRendererAndDisplay):
3434         (WebCore):
3435         * rendering/RenderTableSection.h:
3436         (RenderTableSection):
3437
3438 2012-04-04  Erik Arvidsson  <arv@chromium.org>
3439
3440         [V8] Add a per context data store and use that for caching boiler plates as well as constructor functions
3441         https://bugs.webkit.org/show_bug.cgi?id=83093
3442
3443         Reviewed by Adam Barth.
3444
3445         This introduces a V8BindingPerContextData class. After creating a new v8::Context we also create a new
3446         per context data instance. This instance maintains the boiler plate and constructor caches. V8DOMWrapper
3447         now delegates the caching to this new class. Previously the caching was only done in V8DOMWindowShell which
3448         made workers and isolated worlds behave slightly different.
3449
3450         Tests: fast/dom/constructor-proto.html
3451                fast/workers/constructor-proto.html
3452
3453         * WebCore.gypi:
3454         * bindings/scripts/CodeGeneratorV8.pm:
3455         (GenerateConstructorGetter): Renamed getConstructor to constructorForType.
3456         * bindings/v8/V8BindingPerContextData.cpp: Added.
3457         (WebCore):
3458         (WebCore::V8BindingPerContextData::dispose): This clears the persistent handles stored in the maps.
3459         (WebCore::V8BindingPerContextData::init): This installs the hidden prototype which is used as the
3460         [[Prototype]] for the constructor functions (for HotMail compat).
3461         (WebCore::V8BindingPerContextData::createWrapperFromCacheSlowCase): Instantiates a new object and
3462         stores it in the boilerplate map, and returns a clone.
3463         (WebCore::V8BindingPerContextData::constructorForTypeSlowCase): Creates the function for the constructor
3464         and stores it in the constructor map.
3465         * bindings/v8/V8BindingPerContextData.h: Added.
3466         (WebCore):
3467         (V8BindingPerContextData):
3468         (WebCore::V8BindingPerContextData::create):
3469         (WebCore::V8BindingPerContextData::~V8BindingPerContextData):
3470         (WebCore::V8BindingPerContextData::createWrapperFromCache): Checks the cache and clones the wrapper in
3471         the cache. If no boiler plate exists one is created and cached.
3472         (WebCore::V8BindingPerContextData::constructorForType): If the constructor already exists the cached
3473         constructor function is returned, otherwise a new constructor function is created and cached.
3474         (WebCore::V8BindingPerContextData::V8BindingPerContextData):
3475         * bindings/v8/V8DOMWindowShell.cpp:
3476         (WebCore::V8DOMWindowShell::disposeContextHandles): Clear the per context data when disposing the handles.
3477         (WebCore::V8DOMWindowShell::initContextIfNeeded): Create and initialize the per context data.
3478         (WebCore::V8DOMWindowShell::installDOMWindow):
3479         * bindings/v8/V8DOMWindowShell.h:
3480         (V8DOMWindowShell):
3481         (WebCore::V8DOMWindowShell::perContextData):
3482         * bindings/v8/V8DOMWrapper.cpp:
3483         (WebCore::V8DOMWrapper::constructorForType): Static method to get the constructor. The per context data
3484         is determined based on the type of the parameters.
3485         (WebCore):
3486         (WebCore::V8DOMWrapper::perContextData):
3487         (WebCore::V8DOMWrapper::instantiateV8Object): Use the per context data to unify the code paths.
3488         * bindings/v8/V8DOMWrapper.h:
3489         (WebCore):
3490         (V8DOMWrapper):
3491         * bindings/v8/V8IsolatedContext.cpp:
3492         (WebCore::V8IsolatedContext::V8IsolatedContext): Create and initialize the per context data.
3493         (WebCore::V8IsolatedContext::destroy): Clear the per context data.
3494         * bindings/v8/V8IsolatedContext.h:
3495         (WebCore):
3496         (WebCore::V8IsolatedContext::perContextData):
3497         (V8IsolatedContext):
3498         * bindings/v8/V8Proxy.cpp:
3499         (WebCore::V8Proxy::retrievePerContextData):
3500         (WebCore):
3501         * bindings/v8/V8Proxy.h:
3502         (WebCore):
3503         (V8Proxy):
3504         * bindings/v8/WorkerContextExecutionProxy.cpp:
3505         (WebCore::WorkerContextExecutionProxy::dispose): Clear the per context data
3506         (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): Create and initialize the per context data.
3507         * bindings/v8/WorkerContextExecutionProxy.h:
3508         (WebCore):
3509         (WebCore::WorkerContextExecutionProxy::perContextData):
3510         (WorkerContextExecutionProxy):
3511
3512 2012-04-04  Shawn Singh  <shawnsingh@chromium.org>
3513
3514         [chromium] Move recursive renderSurface clearing to CCLayerTreeHostImpl
3515         https://bugs.webkit.org/show_bug.cgi?id=82091
3516
3517         Reviewed by James Robinson.
3518
3519         No new tests needed, minor refactoring covered by existing tests.
3520
3521         This patch is just a minor cleanup, moving clearRenderSurfacesOnCCLayerImplRecursive()
3522         from LayerRendererChromium to CCLayerTreeHostImpl. It makes more sense to place the code
3523         there, so that LayerRendererChromium is more like a blind utility for drawing things
3524         while CCLayerTreeHostImpl actually manages the state of the resources.
3525
3526         * platform/graphics/chromium/LayerRendererChromium.cpp:
3527         (WebCore::LayerRendererChromium::beginDrawingFrame):
3528         * platform/graphics/chromium/LayerRendererChromium.h:
3529         (LayerRendererChromium):
3530         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3531         (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl):
3532         (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
3533         (WebCore::CCLayerTreeHostImpl::sendDidLoseContextRecursive):
3534         (WebCore::CCLayerTreeHostImpl::clearRenderSurfacesOnCCLayerImplRecursive):
3535         (WebCore):
3536         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
3537         (WebCore::CCLayerTreeHostImpl::rootLayer):
3538         (CCLayerTreeHostImpl):
3539
3540 2012-04-04  Chris Rogers  <crogers@google.com>
3541
3542         Web Audio should use MutexTryLocker class
3543         https://bugs.webkit.org/show_bug.cgi?id=83194
3544
3545         Reviewed by Kenneth Russell.
3546
3547         Switch existing Web Audio code from directly calling tryLock() on a Mutex to use a MutexTryLocker.
3548         No new tests since it is a low-level threading primitive and is difficult to test.
3549         Existing Web Audio tests continue to test the process() methods affected.
3550
3551         * Modules/webaudio/AudioBufferSourceNode.cpp:
3552         (WebCore::AudioBufferSourceNode::process):
3553         * Modules/webaudio/AudioParamTimeline.cpp:
3554         (WebCore::AudioParamTimeline::valuesForTimeRange):
3555         * Modules/webaudio/ConvolverNode.cpp:
3556         (WebCore::ConvolverNode::process):
3557         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
3558         (WebCore::MediaElementAudioSourceNode::process):
3559         * Modules/webaudio/Oscillator.cpp:
3560         (WebCore::Oscillator::process):
3561         * Modules/webaudio/WaveShaperProcessor.cpp:
3562         (WebCore::WaveShaperProcessor::process):
3563
3564 2012-04-04  Raphael Kubo da Costa  <rakuco@webkit.org>
3565
3566         [CSS] Make makevalues.pl and makeprop.pl ignore '#'s.
3567         https://bugs.webkit.org/show_bug.cgi?id=83212
3568
3569         Reviewed by Tony Chang.
3570
3571         This patch is a side-effect of my intentions to make the
3572         CMake-based ports work with GCC 4.7 without changing the
3573         parameters currently passed to the preprocessor. "-P" is always
3574         being passed to the preprocessor, but this breaks
3575         dom/make_names.pl due to GCC not outputting empty lines with "-P"
3576         anymore; if I switch to never passing "-P" (my aim), the CSS
3577         scripts currently break because of the additional lines output by
3578         the preprocessor. InFilesParser.pm and make-css-file-array.pl
3579         already skip lines which start with '#', for example.
3580
3581         No new tests, tools plumbing.
3582
3583         * css/makeprop.pl:
3584         * css/makevalues.pl:
3585
3586 2012-04-04  Min Qin  <qinmin@google.com>
3587
3588         Disable fancy upsampling and dithering for decoding jpeg on android
3589         https://bugs.webkit.org/show_bug.cgi?id=83196
3590
3591         Reviewed by Kenneth Russell.
3592
3593         Dithering and fancy upsampling are currently disabled for chrome on android.
3594         This gives us about 20% performance improvement.
3595         Since the screen of mobile devices is small, impact on image quality is limited.
3596         This change does not introduce any changes on other platforms.
3597
3598         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
3599         (ditherMode):
3600         (doFancyUpsampling):
3601         (WebCore::JPEGImageReader::decode):
3602
3603 2012-04-04  Daniel Sievers  <sievers@chromium.org>
3604
3605         [Chromium] Always skip draw and readback if there is nothing
3606         to draw.
3607         https://bugs.webkit.org/show_bug.cgi?id=82680
3608
3609         This avoids corruption from pushing frames that have no valid
3610         content drawn into them.
3611         Also in addition to checking for non-existing root layers, check
3612         for root layers with no content bounds. It's possible to see those
3613         with kForceCompositing mode for empty documents.
3614
3615         Reviewed by James Robinson.
3616
3617         Added CCLayerTreeHostTestEmptyContentsShouldNotDraw.
3618
3619         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
3620         (WebCore::CCLayerTreeHostImpl::canDraw):
3621         (WebCore::CCLayerTreeHostImpl::prepareToDraw):
3622         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
3623         (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
3624
3625 2012-03-15  Jer Noble  <jer.noble@apple.com>
3626
3627         Full Screen mode should cancel before navigation.
3628         https://bugs.webkit.org/show_bug.cgi?id=81295
3629
3630         Reviewed by Anders Carlsson.
3631
3632         No new tests; protect against speculative crasher when a bad client calls the below
3633         functions at inopportune times.
3634
3635         Check that the document is not either detached or in the page cache, and if so, bail out
3636         early:
3637         * dom/Document.cpp:
3638         (WebCore::Document::webkitWillEnterFullScreenForElement):
3639         (WebCore::Document::webkitDidEnterFullScreenForElement):
3640         (WebCore::Document::webkitWillExitFullScreenForElement):
3641         (WebCore::Document::webkitDidExitFullScreenForElement):
3642
3643 2012-04-04  Emil A Eklund  <eae@chromium.org>
3644
3645         Fix getFilterOutsets parameter types in RenderLayer
3646         https://bugs.webkit.org/show_bug.cgi?id=83041
3647
3648         Reviewed by Julien Chaffraix.
3649
3650         The getFilterOutsets method was changed to take integers in r112475, update
3651         RenderLayer to use the right data type for the outset arguments.
3652
3653         No new tests, no change in functionality.
3654
3655         * rendering/RenderLayer.cpp:
3656         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
3657         (WebCore::RenderLayer::calculateLayerBounds):
3658
3659 2012-04-04  Erik Arvidsson  <arv@chromium.org>
3660
3661         Rebaseline binding tests.
3662
3663         Unreviewed.
3664
3665         * bindings/scripts/test/V8/V8TestInterface.cpp:
3666         (WebCore::V8TestInterface::constructorCallback):
3667         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3668         (WebCore::V8TestNamedConstructorConstructorCallback):
3669         * bindings/scripts/test/V8/V8TestObj.cpp:
3670         (WebCore::V8TestObj::constructorCallback):
3671         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3672         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
3673
3674 2012-04-04  Dmitry Lomov  <dslomov@google.com>
3675
3676         [JSC] ArrayBufferView and its ArrayBuffer are appended to object pool in wrong order
3677         https://bugs.webkit.org/show_bug.cgi?id=82090
3678         The implementation of structured cloning algorithm (http://www.w3.org/TR/html5/common-dom-interfaces.html#internal-structured-cloning-algorithm)
3679         in SerializedScriptValue.cpp assigns numerical identifiers to encontered objects as it traverses
3680         the cloned object during serialization.
3681         When the cloning encounters an already seen object, it transfers the assigned numerical id
3682         instead of cloning the object again. Deserialization process then repeats the process in 
3683         the mirror fashion, i.e. on deserializing the object it assigns deserialized object a numeric id and if it
3684         deserializes the id it substitutes the perviously deserialized objects. It is critical that serialization and deserialization
3685         assigns numeric ids in the same order.
3686
3687         The bug (discovered by Yong Li) is that when serializing ArrayBufferView, the ids were assigned first to 
3688         the ArrayBufferView and then to underlying ArrayBuffer; however on deserialization the ids were assigned another way round.
3689
3690         This patch fixes that by assigning the id first to ArrayBuffer and then to ArrayBufferView, and adds corresponding test cases.
3691
3692         Reviewed by Kenneth Russell.
3693
3694         New test cases added to fast/canvas/web-gl/array-message-passing.html.
3695
3696         * bindings/js/SerializedScriptValue.cpp:
3697         (WebCore::CloneSerializer::checkForDuplicate):
3698         (CloneSerializer):
3699         (WebCore::CloneSerializer::recordObject):
3700         (WebCore::CloneSerializer::startObjectInternal):
3701         (WebCore::CloneSerializer::dumpIfTerminal):
3702
3703 2012-04-04  Ian Vollick  <vollick@chromium.org>
3704
3705         [chromium] When setting animation started events, should check the root layer
3706         https://bugs.webkit.org/show_bug.cgi?id=83060
3707
3708         Reviewed by Adrienne Walker.
3709
3710         No new tests.
3711
3712         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3713         (WebCore::CCLayerTreeHost::animateLayers):
3714         (WebCore::CCLayerTreeHost::animateLayersRecursive):
3715         (WebCore::CCLayerTreeHost::setAnimationEventsRecursive):
3716
3717 2012-04-04  Adam Klein  <adamk@chromium.org>
3718
3719         Web Inspector: break on DOM node insertion only once per operation, not once per inserted node
3720         https://bugs.webkit.org/show_bug.cgi?id=82967
3721
3722         Reviewed by Ojan Vafai.
3723
3724         This change affects the case where a DocumentFragment is inserted,
3725         rather than a single node. This is most common when using innerHTML:
3726         the effect of the change is that inserting, e.g., '<input><input>',
3727         the SubtreeModified breakpoint will be hit once, rather than twice
3728         (once for each input element). Given that the particular node being
3729         inserted wasn't exposed as part of the breakpoint, this seems strictly
3730         better.
3731
3732         Now that the call to willInsertDOMNode is outside the loop, there's
3733         not an obvious node to pass in as the new child. Luckily, InspectorDOMDebuggerAgent
3734         already ignored that argument, so it's simply been removed from the signature.
3735
3736         This changes paves the way to do only tree-modification work, and no
3737         external notifications, inside the loops in appendChild/insertBefore/replaceChild.
3738
3739         * dom/ContainerNode.cpp:
3740         (WebCore::ContainerNode::insertBefore): Hoisted call to willInsertDOMNode out of loop.
3741         (WebCore::ContainerNode::replaceChild): ditto.
3742         (WebCore::ContainerNode::appendChild): ditto.
3743         * inspector/InspectorDOMDebuggerAgent.cpp:
3744         (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode): Removed first argument (now takes only the parent).
3745         * inspector/InspectorDOMDebuggerAgent.h:
3746         (InspectorDOMDebuggerAgent):
3747         * inspector/InspectorInstrumentation.cpp:
3748         (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl): Removed second argument.
3749         * inspector/InspectorInstrumentation.h:
3750         (InspectorInstrumentation):
3751         (WebCore::InspectorInstrumentation::willInsertDOMNode): Removed second argument.
3752
3753 2012-04-04  Jeffrey Pfau  <jpfau@apple.com>
3754
3755         Move pending sheet removal from ~HTMLLinkElement to removal from document.
3756         https://bugs.webkit.org/show_bug.cgi?id=69184
3757
3758         Reviewed by Adam Barth.
3759
3760         Test: fast/html/pending-stylesheet-crash.html
3761
3762         * html/HTMLLinkElement.cpp:
3763         (WebCore::HTMLLinkElement::~HTMLLinkElement):
3764         (WebCore::HTMLLinkElement::removedFromDocument):
3765
3766 2012-04-04  Mark Pilgrim  <pilgrim@chromium.org>
3767
3768         Call histogramCustomCounts directly
3769         https://bugs.webkit.org/show_bug.cgi?id=83112
3770
3771         Reviewed by Adam Barth.
3772
3773         * platform/chromium/PlatformSupport.h:
3774         (PlatformSupport):
3775         * platform/graphics/chromium/ContentLayerChromium.cpp:
3776         (WebCore::ContentLayerPainter::paint):
3777         * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
3778         (WebCore::CCOverdrawMetrics::recordMetricsInternal):
3779
3780 2012-04-04  Alexis Menard  <alexis.menard@openbossa.org>
3781
3782         Animation related classes should use CSSPropertyID rather than integers when manipulating CSS property ids.
3783         https://bugs.webkit.org/show_bug.cgi?id=83050
3784
3785         Reviewed by Simon Fraser.
3786
3787         Split the concept of animate none and animate all into a separate function rather than using the property member
3788         with some magic value set on it. Make also sure that we use CSSPropertyID all over the place rather than integers.
3789         We still have some place where convert from int to CSSPropertyID (mostly due to the fact that we need to make Hash*
3790         related classes to handle CSSPropertyID). While refactoring I also removed some dead code.
3791
3792         No new tests : not behaviour changes intented.
3793
3794         * css/CSSComputedStyleDeclaration.cpp:
3795         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3796         * css/CSSStyleApplyProperty.cpp:
3797         (WebCore::ApplyPropertyAnimation::applyInheritValue):
3798         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
3799         * css/CSSStyleSelector.cpp:
3800         (WebCore::CSSStyleSelector::collectMatchingRulesForList):
3801         * page/animation/AnimationBase.cpp:
3802         (WebCore):
3803         (WebCore::PropertyWrapperBase::PropertyWrapperBase):
3804         (WebCore::PropertyWrapperBase::property):
3805         (PropertyWrapperBase):
3806         (WebCore::PropertyWrapperGetter::PropertyWrapperGetter):
3807         (WebCore::PropertyWrapper::PropertyWrapper):
3808         (WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper):
3809         (WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper):
3810         (WebCore::PropertyWrapperColor::PropertyWrapperColor):
3811         (WebCore::PropertyWrapperShadow::PropertyWrapperShadow):
3812         (WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor):
3813         (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
3814         (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
3815         (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper):
3816         (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint):
3817         (WebCore::wrapperForProperty):
3818         (WebCore::AnimationBase::propertiesEqual):
3819         The code removed here could never be reached. propertiesEqual is used only in CompositeAnimation::updateTransitions and through
3820         ImplicitAnimation::isTargetPropertyEqual which is also called in CompositeAnimation. Both calls are protected by an ASSERT in
3821         CompositeAnimation:116 where we make sure the property id we're dealing with is a valid property id, therefore prop can't be equal to
3822         the old value cAnimateAll or even the new mode concept introduced in that patch can't be AnimateAll.
3823         (WebCore::AnimationBase::getPropertyAtIndex):
3824         (WebCore::AnimationBase::blendProperties):
3825         (WebCore::AnimationBase::animationOfPropertyIsAccelerated):
3826         (WebCore::gatherEnclosingShorthandProperties):
3827         (WebCore::AnimationBase::animatableShorthandsAffectingProperty):
3828         * page/animation/AnimationBase.h:
3829         (AnimationBase):
3830         * page/animation/CompositeAnimation.cpp:
3831         (WebCore::CompositeAnimation::updateTransitions):
3832         (WebCore::CompositeAnimation::pauseTransitionAtTime):
3833         * page/animation/CompositeAnimation.h:
3834         (CompositeAnimation):
3835         * page/animation/ImplicitAnimation.cpp:
3836         (WebCore::ImplicitAnimation::ImplicitAnimation):
3837         (WebCore::ImplicitAnimation::sendTransitionEvent):
3838         The check removed is useless as ImplicitAnimation constructor ensure via an ASSERT that the animatingProperty value is a correct and valid
3839         property id. Even the old code was ensuring the value of animatingProperty was different from cAnimateAll at construction time. As stated also
3840         in CompositeAnimation::updateTransitions and cover by the same ASSERT explained earlier, ImplicitAnimation are constructed for valid property ids.
3841         (WebCore::ImplicitAnimation::isTargetPropertyEqual):
3842         (WebCore::ImplicitAnimation::blendPropertyValueInStyle):
3843         * page/animation/ImplicitAnimation.h:
3844         (WebCore::ImplicitAnimation::create):
3845         (ImplicitAnimation):
3846         * page/animation/KeyframeAnimation.cpp:
3847         (WebCore::KeyframeAnimation::animate):
3848         (WebCore::KeyframeAnimation::getAnimatedStyle):
3849         (WebCore::KeyframeAnimation::timeToNextService):
3850         * platform/animation/Animation.cpp:
3851         (WebCore::Animation::Animation):
3852         (WebCore::Animation::operator=):
3853         (WebCore::Animation::animationsMatch):
3854         * platform/animation/Animation.h:
3855         (WebCore::Animation::property):
3856         (WebCore::Animation::animationMode):
3857         (WebCore::Animation::setProperty):
3858         (WebCore::Animation::setAnimationMode):
3859         (Animation):
3860         (WebCore::Animation::initialAnimationProperty):
3861         * rendering/RenderLayerBacking.cpp:
3862         (WebCore::RenderLayerBacking::startTransition):
3863         * rendering/RenderLayerBacking.h:
3864         (RenderLayerBacking):
3865         * rendering/style/RenderStyle.cpp:
3866         (WebCore::RenderStyle::transitionForProperty):
3867         * rendering/style/RenderStyle.h:
3868
3869 2012-04-04  Emil A Eklund  <eae@chromium.org>
3870
3871         Fix usage of LayoutUnits and snapping for scrolling in RenderBox
3872         https://bugs.webkit.org/show_bug.cgi?id=83073
3873
3874         Reviewed by Eric Seidel.
3875
3876         Fix usage of LayoutUnits and snapping/rounding logic in RenderBox.
3877
3878         No new tests, no change in functionality.
3879
3880         * rendering/RenderBox.cpp:
3881         (WebCore::RenderBox::scrollWidth):
3882         Change scrollWidth to properly pixel snap values.
3883         
3884         (WebCore::RenderBox::scrollHeight):
3885         Change scrollHeight to properly pixel snap values.
3886         
3887         (WebCore::RenderBox::scrolledContentOffset):
3888         Change to return IntSize to match function definition.
3889         
3890         (WebCore::RenderBox::cachedSizeForOverflowClip):
3891         Changed cachedSizeForOverflowClip to LayoutSize as the overflow and clip
3892         rects all have subpixel precision.
3893
3894         * rendering/RenderBox.h:
3895         (WebCore::RenderBox::pixelSnappedWidth):
3896         (WebCore::RenderBox::pixelSnappedHeight):
3897         Removed FIXME comment as the implementation 
3898         
3899         (WebCore::RenderBox::minYLayoutOverflow):
3900         (WebCore::RenderBox::maxYLayoutOverflow):
3901         (WebCore::RenderBox::minXLayoutOverflow):
3902         (WebCore::RenderBox::maxXLayoutOverflow):
3903         Added static_cast for border values.
3904         
3905         (WebCore::RenderBox::hasVisualOverflow):
3906         Changed to compare two pixel snapped values as we don't want to indicate
3907         overflow in cases where the the size is rounded down resulting in no
3908         visual overflow.
3909
3910 2012-04-04  Emil A Eklund  <eae@chromium.org>
3911
3912         Fix types for location, size and rect calculations for render objects
3913         https://bugs.webkit.org/show_bug.cgi?id=83089
3914
3915         Reviewed by Eric Seidel.
3916
3917         Fix usage of LayoutUnits and rounding for a couple of different render
3918         object classes.
3919
3920         No new tests, no change in functionality.
3921
3922         * rendering/RenderDetailsMarker.cpp:
3923         (WebCore::RenderDetailsMarker::getPath):
3924         Change getPath to take a LayoutPoint as the transform has subpixel
3925         precision already.
3926         
3927         * rendering/RenderFlowThread.cpp:
3928         (WebCore::RenderFlowThread::computeLogicalHeight):
3929         Change logicalHeight to LayoutUnit as it is computed from subpixel
3930         values.
3931         
3932         * rendering/RenderInputSpeech.cpp:
3933         (WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
3934         Change button rect computation to LayoutRect and pixel snap just before
3935         painting to preserve precision.
3936         
3937         * rendering/RenderLineBoxList.cpp:
3938         (WebCore::RenderLineBoxList::rangeIntersectsRect):
3939         (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
3940         (WebCore::RenderLineBoxList::paint):
3941         Change range calculations to LayoutUnits to preserve precision.
3942         
3943         * rendering/RenderMarquee.cpp:
3944         (WebCore::RenderMarquee::computePosition):
3945         Change width calculations to LayoutUnits to preserve precision.
3946         
3947         * rendering/RenderTable.cpp:
3948         (WebCore::RenderTable::layoutCaption):
3949         Change table captions to LayoutUnits as the values are computed from
3950         subpixel componenets.
3951         
3952         * rendering/style/RenderStyle.cpp:
3953         (WebCore::RenderStyle::getRoundedBorderFor):
3954         Snap border rect as RoundedRects use ints for crisp rendering.
3955         
3956         * rendering/style/ShadowData.cpp:
3957         (WebCore::ShadowData::adjustRectForShadow):
3958         Change adjustRectForShadow to take a LayoutRect as it already uses
3959         LayoutUnits.
3960         
3961 2012-04-04  Emil A Eklund  <eae@chromium.org>
3962
3963         Convert RootInlineBox to LayoutUnits in preparation for turning on subpixel layout
3964         https://bugs.webkit.org/show_bug.cgi?id=83054
3965
3966         Reviewed by Eric Seidel.
3967
3968         Convert RootInlineBox over to LayoutUnits, this mostly involves updating
3969         the alignment and adjustment code to be subpixel aware. 
3970
3971         No new tests, no change in functionality.
3972
3973         * rendering/RootInlineBox.cpp:
3974         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
3975         Change beforeAnnotationsAdjustment to LayoutUnit.
3976         
3977         (WebCore::RootInlineBox::beforeAnnotationsAdjustment):
3978         Change method to return LayoutUnit as it is computed from values with
3979         subpixel precision.
3980         
3981         (WebCore::RootInlineBox::lineSnapAdjustment):
3982         Round values before computing remainder.
3983
3984         (WebCore::RootInlineBox::ascentAndDescentForBox):
3985         Change ascent and decent calculation to use LayoutUnits as they are
3986         computed from values with subpixel precision.
3987         
3988         (WebCore::RootInlineBox::verticalPositionForBox):
3989         Change verticalPosition to LayoutUnit.
3990         
3991         * rendering/RootInlineBox.h:
3992         (RootInlineBox):
3993
3994 2012-04-05  Joseph Pecoraro  <pecoraro@apple.com>
3995
3996         <http://webkit.org/b/83108> Web Inspector: JSC Crash inspecting node with object event listener
3997
3998         Reviewed by Geoff Garen.
3999
4000         * bindings/js/ScriptEventListener.cpp:
4001         (WebCore::eventListenerHandlerLocation):
4002         Use jsDynamicCast to bail when the JSObject is not a JSFunction.
4003
4004 2012-04-04  Mark Pilgrim  <pilgrim@chromium.org>
4005
4006         Call suddenTerminationChanged directly
4007         https://bugs.webkit.org/show_bug.cgi?id=83114
4008
4009         Reviewed by Adam Barth.
4010
4011         * platform/chromium/PlatformSupport.h:
4012         (PlatformSupport):
4013         * platform/chromium/SuddenTerminationChromium.cpp:
4014         (WebCore::disableSuddenTermination):
4015