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