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