[Windows WebKit2] Use cookies set in WebKit1
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-05-11  Jessie Berlin  <jberlin@apple.com>
2
3         Reviewed by Steve Falkenburg.
4
5         [Windows WebKit2] Use cookies set in WebKit1
6         https://bugs.webkit.org/show_bug.cgi?id=60274
7
8         Share the default storage session between the UI and Web Processes.
9
10         * platform/network/cf/CookieStorageCFNet.cpp:
11         (WebCore::defaultSessionCookieStorage):
12         Keep track of the default storage session cookie storage.
13         (WebCore::currentCookieStorage):
14         Call defaultCookieStorage to get the default cookie storage.
15         (WebCore::defaultCookieStorage):
16         If there is a default storage session cookie storage, prefer that over getting the default
17         cookie storage. In the Web Process, asking CFNetwork for the default cookie storage directly
18         without specifying a storage session will not get the cookie storage being shared by the UI
19         and Web Processes.
20
21         * platform/network/ResourceHandle.h:
22         * platform/network/cf/ResourceHandleCFNet.cpp:
23         (WebCore::willSendRequest):
24         Make sure to set the current storage session on any requests used by the Web
25         Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
26         doing anything with the Web Process's default storage session (which is not the one shared
27         with the UI Process).
28         (WebCore::makeFinalRequest):
29         Ditto.
30         (WebCore::ResourceHandle::willSendRequest):
31         Ditto.
32         (WebCore::ResourceHandle::currentStorageSession):
33         If there is a Private Browsing storage session, return that.
34         If not, on Windows return the default storage session that is being shared with the UI
35         Process and on Mac return 0.
36         (WebCore::defaultCFURLStorageSession):
37         (WebCore::ResourceHandle::setDefaultStorageSession):
38         (WebCore::ResourceHandle::defaultStorageSession):
39
40         * platform/network/cf/ResourceRequestCFNet.cpp:
41         (WebCore::ResourceRequest::doUpdatePlatformRequest):
42         Make sure to set the current storage session on any requests used by the Web
43         Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
44         doing anything with the Web Process's default storage session (which is not the one shared
45         with the UI Process).
46
47 2011-05-11  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
48
49         Reviewed by David Kilzer.
50
51         Remove wml directory from include lists
52         https://bugs.webkit.org/show_bug.cgi?id=60646
53
54         Remove wml dir from CMake, Autotools and qmake build systems since WML
55         was removed in r85256.
56
57         No new tests since no change in functionality.
58
59         * CMakeLists.txt:
60         * GNUmakefile.am:
61         * WebCore.pri:
62
63 2011-05-11  Lucas De Marchi  <lucas.demarchi@profusion.mobi>
64
65         Reviewed by Antonio Gomes.
66
67         [CMAKE] Move EFL-specific file to CMakeListsEfl.txt
68         https://bugs.webkit.org/show_bug.cgi?id=60642
69
70         Move file EFL-specific file to the CMakeListsEfl.txt file. This implies
71         having to include CMakeLists${PORT}.txt before the ADD_CUSTOM_COMMAND
72         calls, since they depend on lists that now may change inside a port
73         like WebCore_USER_AGENT_STYLE_SHEETS.
74
75         No new tests since no change in functionality.
76
77         * CMakeLists.txt: remove css file specific to EFL port.
78         * CMakeListsEfl.txt: move file here.
79
80 2011-05-11  Tao Bai  <michaelbai@chromium.org>
81
82         Reviewed by David Kilzer.
83
84         Return empty Favicon URL instead of default one when the frame isn't top level one
85         https://bugs.webkit.org/show_bug.cgi?id=60527
86         This issue was discovered by chromium browser test.
87
88         * dom/Document.cpp:
89         (WebCore::Document::setIconURL):
90         Restored original logic which was inadvertently flipped by http://trac.webkit.org/changeset/85785.
91         * loader/FrameLoader.cpp:
92         (WebCore::FrameLoader::iconURLs):
93         (WebCore::FrameLoader::fillIconURL):
94         Restored original logic, the empty URL should be returned instead of default one. The client (at
95         least chromium) may rely on the returned value to decided whether the favicon should be changed.
96
97 2011-05-11  Nat Duca  <nduca@chromium.org>
98
99         Reviewed by Kenneth Russell.
100
101         [chromium] Make throttling of WebGL based on webgl frames, not compositor frames
102         https://bugs.webkit.org/show_bug.cgi?id=60508
103
104         When a WebGL layer is dirtied outside of a requestAnimFrame callback, we need
105         to prevent WebGL from running too far ahead of the GPU process. The current
106         throttling mechanism relies on prepareTexture being called for every WebGL frame.
107         However, in a non-requestAnimFrame application, multiple frames might get created
108         before the compositor runs and calls prepareTexture on the surface.
109
110         To address this, we post a task that calls a special rate limiting GL extension on
111         the WebGL context after every WebGL "frame." When the compositor runs, it calls
112         prepareTexture as usual.
113
114         * platform/graphics/chromium/Extensions3DChromium.h:
115         * platform/graphics/chromium/LayerRendererChromium.cpp:
116         (WebCore::LayerRendererChromium::LayerRendererChromium):
117         * platform/graphics/chromium/LayerRendererChromium.h:
118         (WebCore::LayerRendererChromium::setIsAnimating):
119         (WebCore::LayerRendererChromium::isAnimating):
120         * platform/graphics/chromium/WebGLLayerChromium.cpp:
121         (WebCore::WebGLLayerChromiumRateLimitTask::WebGLLayerChromiumRateLimitTask):
122         (WebCore::WebGLLayerChromiumRateLimitTask::run):
123         (WebCore::WebGLLayerChromiumRateLimitTask::cancel):
124         (WebCore::WebGLLayerChromium::WebGLLayerChromium):
125         (WebCore::WebGLLayerChromium::~WebGLLayerChromium):
126         (WebCore::WebGLLayerChromium::setTextureUpdated):
127         (WebCore::WebGLLayerChromium::setContext):
128         * platform/graphics/chromium/WebGLLayerChromium.h:
129         (WebCore::WebGLLayerChromium::context):
130
131 2011-05-11  Noam Rosenthal  <noam.rosenthal@nokia.com>
132
133         Reviewed by Kenneth Rohde Christiansen.
134
135         [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
136         https://bugs.webkit.org/show_bug.cgi?id=60439
137
138         Patch 12/12: Enable accelerated animations in texture-mapper. The entire interpolation
139         mechanism happens inside TextureMapper, and we interpolate right before we paint.
140
141         No new tests. Tests in LayoutTests/compositing cover this.
142
143         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
144         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
145         (WebCore::GraphicsLayerTextureMapper::syncCompositingState):
146         (WebCore::GraphicsLayerTextureMapper::addAnimation):
147         (WebCore::GraphicsLayerTextureMapper::pauseAnimation):
148         (WebCore::GraphicsLayerTextureMapper::removeAnimation):
149         (WebCore::GraphicsLayerTextureMapper::animationStartedTimerFired):
150         * platform/graphics/texmap/TextureMapperNode.cpp:
151         (WebCore::TextureMapperNode::descendantsOrSelfHaveRunningAnimations):
152         (WebCore::normalizedAnimationValue):
153         (WebCore::TextureMapperNode::applyOpacityAnimation):
154         (WebCore::solveEpsilon):
155         (WebCore::solveCubicBezierFunction):
156         (WebCore::solveStepsFunction):
157         (WebCore::applyTimingFunction):
158         (WebCore::TextureMapperNode::applyTransformAnimation):
159         (WebCore::TextureMapperNode::applyAnimationFrame):
160         (WebCore::TextureMapperNode::applyAnimation):
161         (WebCore::TextureMapperNode::hasRunningOpacityAnimation):
162         (WebCore::TextureMapperNode::hasRunningTransformAnimation):
163         (WebCore::TextureMapperNode::syncAnimations):
164         (WebCore::copyTimingFunction):
165         (WebCore::copyAnimationValue):
166         (WebCore::TextureMapperAnimation::TextureMapperAnimation):
167         * platform/graphics/texmap/TextureMapperNode.h:
168         (WebCore::TextureMapperAnimation::create):
169
170 2011-05-11  Noam Rosenthal  <noam.rosenthal@nokia.com>
171
172         Reviewed by Kenneth Rohde Christiansen.
173
174         [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
175         https://bugs.webkit.org/show_bug.cgi?id=60439
176
177         Patch 11/12: Patch PluginView to build with TextureMapper on Linux.
178
179         No new tests. This is a build fix.
180
181         * platform/qt/QWebPageClient.h:
182         (QWebPageClient::setRootGraphicsLayer):
183
184 2011-05-11  Noam Rosenthal  <noam.rosenthal@nokia.com>
185
186         Reviewed by Kenneth Rohde Christiansen.
187
188         [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
189         https://bugs.webkit.org/show_bug.cgi?id=60439
190
191         Patch 10/12: Glue the TextureMapper refactoring into Webkit(1).
192         Pass a GraphicsLayer* instead of a PlatformLayer* to the QWebPageClient.
193
194         No new tests. Tests in LayoutTests/compositing cover this.
195
196         * platform/qt/QWebPageClient.h:
197         (QWebPageClient::setRootGraphicsLayer):
198
199 2011-05-11  Noam Rosenthal  <noam.rosenthal@nokia.com>
200
201         Reviewed by Kenneth Rohde Christiansen.
202
203         [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
204         https://bugs.webkit.org/show_bug.cgi?id=60439
205
206         Patch 9/12: Refactor TextureMapperNode for performance, readability and accuracy.
207         Changes include:
208         1. Support the new TextureMapperPlatformLayer for media & WebGL.
209         2. Use a pool for intermediate surfaces, to avoid constant allocating/freeing of textures.
210         3. Divide computation operations to different smaller functions.
211         4. Get rid of scissor/clip layers, use transformed clip instead.
212         5. Allow tiling for big layers.
213
214         No new tests. Tests in LayoutTests/compositing cover this.
215
216         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
217         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
218         (WebCore::GraphicsLayerTextureMapper::setNeedsDisplayInRect):
219         (WebCore::GraphicsLayerTextureMapper::setContentsToMedia):
220         (WebCore::GraphicsLayerTextureMapper::platformLayer):
221         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
222         (WebCore::GraphicsLayerTextureMapper::setContentsNeedsDisplay):
223         (WebCore::GraphicsLayerTextureMapper::setContentsToCanvas):
224         (WebCore::GraphicsLayerTextureMapper::node):
225         * platform/graphics/texmap/TextureMapperNode.cpp:
226         (WebCore::TextureMapperSurfaceManager::getIntermediateSurface):
227         (WebCore::TextureMapperSurfaceManager::releaseIntermediateSurface):
228         (WebCore::toTextureMapperNode):
229         (WebCore::TextureMapperNode::rootLayer):
230         (WebCore::TextureMapperNode::setTransform):
231         (WebCore::TextureMapperNode::computePerspectiveTransformIfNeeded):
232         (WebCore::TextureMapperNode::countDescendantsWithContent):
233         (WebCore::TextureMapperNode::computeOverlapsIfNeeded):
234         (WebCore::TextureMapperNode::computeReplicaTransformIfNeeded):
235         (WebCore::TextureMapperNode::computeLocalTransformIfNeeded):
236         (WebCore::TextureMapperNode::needsToComputeBoundingRect):
237         (WebCore::TextureMapperNode::computeAllTransforms):
238         (WebCore::TextureMapperNode::computeBoundingRectFromRootIfNeeded):
239         (WebCore::TextureMapperNode::computeTiles):
240         (WebCore::TextureMapperNode::computeVisibleRectIfNeeded):
241         (WebCore::TextureMapperNode::renderContent):
242         (WebCore::TextureMapperNode::paint):
243         (WebCore::TextureMapperNode::targetRectForTileRect):
244         (WebCore::TextureMapperNode::paintSelf):
245         (WebCore::TextureMapperNode::compareGraphicsLayersZValue):
246         (WebCore::TextureMapperNode::sortByZOrder):
247         (WebCore::TextureMapperNode::paintSelfAndChildren):
248         (WebCore::TextureMapperNode::paintReflection):
249         (WebCore::TextureMapperNode::paintRecursive):
250         (WebCore::TextureMapperNode::~TextureMapperNode):
251         (WebCore::TextureMapperNode::resetDescendants):
252         (WebCore::TextureMapperNode::setContentScale):
253         (WebCore::TextureMapperNode::setVisibleRect):
254         (WebCore::TextureMapperNode::syncCompositingState):
255         (WebCore::TextureMapperNode::invalidateOverlaps):
256         (WebCore::TextureMapperNode::syncCompositingStateSelf):
257         (WebCore::TextureMapperNode::descendantsOrSelfHaveRunningAnimations):
258         * platform/graphics/texmap/TextureMapperNode.h:
259         (WebCore::TextureMapperPaintOptions::TextureMapperPaintOptions):
260         (WebCore::TextureMapperAnimation::create):
261         (WebCore::TextureMapperNode::TextureMapperNode):
262         (WebCore::TextureMapperNode::size):
263         (WebCore::TextureMapperNode::setOpacity):
264         (WebCore::TextureMapperNode::setTextureMapper):
265         (WebCore::TextureMapperNode::media):
266         (WebCore::TextureMapperNode::texture):
267         (WebCore::TextureMapperNode::targetRect):
268         (WebCore::TextureMapperNode::entireRect):
269         (WebCore::TextureMapperNode::contentSize):
270         (WebCore::TextureMapperNode::State::State):
271         (WebCore::deleteOwnedPtr):
272
273 2011-05-07  Noam Rosenthal  <noam.rosenthal@nokia.com>
274
275         Reviewed by Kenneth Rohde Christiansen.
276
277         [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
278         https://bugs.webkit.org/show_bug.cgi?id=60439
279
280         Patch 8/12: Changes to the GL backend of TextureMapper. The code for these changes is intertwined so it was hard to separate
281         them to different patches. This is the summary of what the changes do:
282
283         1. Use stencil for clipping instead of scissors, refactor beginClip/endClip functions to accomodate that.
284         2. Get rid of the "Target" program which forced an intermediate framebuffer for any content. Instead,
285            we upload the texture with BGRA from the start. Ports other than Qt can optimize this for their needs.
286         3. Use glGetAttribLocation instead of glBindAttribLocation; On some platforms we might be polluting the
287            GL context otherwise.
288         4. Use image UIDs (cache-key in Qt) instead of image pointers. This is important for images that change their
289            internal content.
290         5. Allow packing and unpacking. This is currently a stub, for future memory optimizations.
291         6. Put some of the initialization code here (beginPainting/endPainting).
292         7. Allow painting a texture via an ID instead of a BitmapTexture data type.
293         8. Get rid of makeContextCurrent / obtainCurrentContext. We only use texture-mapper when the context is current.
294
295         No new tests. Tests in LayoutTests/compositing test this.
296
297         * platform/graphics/opengl/TextureMapperGL.cpp:
298         (WebCore::debugGLCommand):
299         (WebCore::TextureMapperGLData::GlobalGLData::createShaderProgram):
300         (WebCore::TextureMapperGLData::GlobalGLData::GlobalGLData):
301         (WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::findOrCreate):
302         (WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::deref):
303         (WebCore::TextureMapperGLData::DirectlyCompositedImageRepository::~DirectlyCompositedImageRepository):
304         (WebCore::TextureMapperGLData::TextureMapperGLData):
305         (WebCore::BitmapTextureGL::id):
306         (WebCore::BitmapTextureGL::isOpaque):
307         (WebCore::BitmapTextureGL::relativeSize):
308         (WebCore::BitmapTextureGL::setTextureMapper):
309         (WebCore::BitmapTextureGL::pack):
310         (WebCore::BitmapTextureGL::unpack):
311         (WebCore::BitmapTextureGL::isPacked):
312         (WebCore::BitmapTextureGL::BitmapTextureGL):
313         (WebCore::TextureMapperGL::TextureMapperGL):
314         (WebCore::TextureMapperGL::initializeShaders):
315         (WebCore::TextureMapperGL::beginPainting):
316         (WebCore::TextureMapperGL::endPainting):
317         (WebCore::TextureMapperGL::drawTexture):
318         (WebCore::BitmapTextureGL::reset):
319         (WebCore::BitmapTextureGL::endPaint):
320         (WebCore::BitmapTextureGL::setContentsToImage):
321         (WebCore::createProjectionMatrix):
322         (WebCore::BitmapTextureGL::bind):
323         (WebCore::BitmapTextureGL::destroy):
324         (WebCore::TextureMapperGL::~TextureMapperGL):
325         (WebCore::TextureMapperGL::bindSurface):
326         (WebCore::TextureMapperGL::beginClip):
327         (WebCore::TextureMapperGL::endClip):
328         (WebCore::TextureMapperGL::createTexture):
329         * platform/graphics/opengl/TextureMapperGL.h:
330         (WebCore::TextureMapperGL::allowSurfaceForRoot):
331         (WebCore::TextureMapperGL::create):
332         (WebCore::TextureMapperGL::setGraphicsContext):
333         (WebCore::TextureMapperGL::graphicsContext):
334         (WebCore::TextureMapperGL::isOpenGLBacked):
335         * platform/graphics/qt/GraphicsContext3DQt.cpp:
336         (WebCore::GraphicsContext3DInternal::paintToTextureMapper):
337         (WebCore::GraphicsContext3DInternal::boundingRect):
338         (WebCore::GraphicsContext3DInternal::paint):
339         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
340         (WebCore::MediaPlayerPrivateQt::repaint):
341         (WebCore::MediaPlayerPrivateQt::paintToTextureMapper):
342         * platform/graphics/qt/MediaPlayerPrivateQt.h:
343         (WebCore::MediaPlayerPrivateQt::acceleratedRenderingStateChanged):
344         (WebCore::MediaPlayerPrivateQt::platformLayer):
345
346 2011-05-11  Noam Rosenthal  <noam.rosenthal@nokia.com>
347
348         Reviewed by Kenneth Rohde Christiansen.
349
350         [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
351         https://bugs.webkit.org/show_bug.cgi?id=60439
352
353         Patch 7/12: Allow a 3D-context (WebGL) to paint itself into a TextureMapper.
354         This allows using a WebGL canvas with CSS.
355
356         No new tests. Tests in LayoutTests/compositing/webgl cover this.
357
358         * platform/graphics/qt/GraphicsContext3DQt.cpp:
359         (WebCore::GraphicsContext3DInternal::paintToTextureMapper):
360         (WebCore::GraphicsContext3DInternal::boundingRect):
361         (WebCore::GraphicsContext3DInternal::paint):
362         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
363         (WebCore::MediaPlayerPrivateQt::repaint):
364         (WebCore::MediaPlayerPrivateQt::paintToTextureMapper):
365         * platform/graphics/qt/MediaPlayerPrivateQt.h:
366         (WebCore::MediaPlayerPrivateQt::acceleratedRenderingStateChanged):
367         (WebCore::MediaPlayerPrivateQt::platformLayer):
368
369 2011-05-11  Noam Rosenthal  <noam.rosenthal@nokia.com>
370
371         Reviewed by Kenneth Rohde Christiansen.
372
373         [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
374         https://bugs.webkit.org/show_bug.cgi?id=60439
375
376         Patch 6/12: Allow the Qt media player implementation to paint into a TextureMapper,
377         to allow videos to be composited.
378
379         No new tests. Tests in LayoutTests/compositing cover this.
380
381         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
382         (WebCore::MediaPlayerPrivateQt::repaint):
383         (WebCore::MediaPlayerPrivateQt::paintToTextureMapper):
384         * platform/graphics/qt/MediaPlayerPrivateQt.h:
385         (WebCore::MediaPlayerPrivateQt::acceleratedRenderingStateChanged):
386         (WebCore::MediaPlayerPrivateQt::platformLayer):
387
388 2011-05-11  John Bauman  <jbauman@chromium.org>
389
390         Reviewed by Kenneth Russell.
391
392         Don't send zeros in TexImage if GL implementation handles that
393         https://bugs.webkit.org/show_bug.cgi?id=60581
394
395         Chromium already handles zeroing textures upon creation, so don't
396         bother zeroing them in WebKit, as that causes some unnecessary memcpys
397         of zeros.
398
399         No new tests as functionality is the same.
400
401         * html/canvas/WebGLRenderingContext.cpp:
402         (WebCore::WebGLRenderingContext::texImage2DBase):
403         * platform/graphics/GraphicsContext3D.cpp:
404         (WebCore::GraphicsContext3D::texImage2DResourceSafe):
405         * platform/graphics/GraphicsContext3D.h:
406         * platform/graphics/gtk/GraphicsContext3DGtk.cpp:
407         (WebCore::GraphicsContext3D::GraphicsContext3D):
408         * platform/graphics/mac/GraphicsContext3DMac.mm:
409         (WebCore::GraphicsContext3D::GraphicsContext3D):
410         * platform/graphics/qt/GraphicsContext3DQt.cpp:
411         (WebCore::GraphicsContext3D::GraphicsContext3D):
412
413 2011-05-11  Simon Fraser  <simon.fraser@apple.com>
414
415         Attempt to fix Chromium Mac build.
416
417         * rendering/RenderThemeMac.mm:
418         (WebCore::RenderThemeMac::paintSliderThumb):
419
420 2011-05-11  Daniel Bates  <dbates@rim.com>
421
422         Reviewed by Antonio Gomes.
423
424         [Qt] Extract code to set mouse event modifiers into common function
425         https://bugs.webkit.org/show_bug.cgi?id=60649
426
427         Consolidate code to set the keyboard modifiers for a mouse event into a common
428         function that can be used by both PlatformMouseEvent(QGraphicsSceneMouseEvent*, int clickCount)
429         and PlatformMouseEvent(QInputEvent*, int clickCount) so as to remove duplicate code.
430
431         No functionality was changed. So, no new tests.
432
433         * platform/qt/PlatformMouseEventQt.cpp:
434         (WebCore::mouseEventModifiersFromQtKeyboardModifiers): Added.
435         (WebCore::PlatformMouseEvent::PlatformMouseEvent): Modified to call mouseEventModifiersFromQtKeyboardModifiers().
436
437 2011-05-11  Levi Weintraub  <leviw@chromium.org>
438
439         Reviewed by Eric Seidel.
440
441         Switch RenderBoxModelObject::paintBorder to use IntRect instead of four ints
442         https://bugs.webkit.org/show_bug.cgi?id=60591
443
444         Switching RenderBoxModelObject::paintBorder to use IntRect instead of four ints representing a rect.
445
446         No new tests since there is no functionality change.
447
448         * rendering/InlineFlowBox.cpp:
449         (WebCore::InlineFlowBox::paintBoxDecorations):
450         * rendering/RenderBox.cpp:
451         (WebCore::RenderBox::paintBoxDecorationsWithSize):
452         * rendering/RenderBoxModelObject.cpp:
453         (WebCore::RenderBoxModelObject::paintBorder):
454         * rendering/RenderBoxModelObject.h:
455         * rendering/RenderFieldset.cpp:
456         (WebCore::RenderFieldset::paintBoxDecorations):
457         * rendering/RenderTable.cpp:
458         (WebCore::RenderTable::paintBoxDecorations):
459         * rendering/RenderTableCell.cpp:
460         (WebCore::RenderTableCell::paintBoxDecorations):
461
462 2011-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
463
464         Unreviewed, rolling out r86255.
465         http://trac.webkit.org/changeset/86255
466         https://bugs.webkit.org/show_bug.cgi?id=60660
467
468         REGRESSION (r86255): Lots of tests crashing in
469         CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release
470         (WebKit2 Tests) (Requested by aroben on #webkit).
471
472         * platform/network/ResourceHandle.h:
473         * platform/network/cf/CookieStorageCFNet.cpp:
474         (WebCore::currentCookieStorage):
475         (WebCore::defaultCookieStorage):
476         * platform/network/cf/ResourceHandleCFNet.cpp:
477         (WebCore::willSendRequest):
478         (WebCore::makeFinalRequest):
479         (WebCore::ResourceHandle::willSendRequest):
480         * platform/network/cf/ResourceRequestCFNet.cpp:
481         (WebCore::ResourceRequest::doUpdatePlatformRequest):
482
483 2011-05-11  Sam Weinig  <sam@webkit.org>
484
485         Reviewed by Eric Seidel.
486
487         Frequent crashes beneath WebCore::ScriptElement::prepareScript
488         https://bugs.webkit.org/show_bug.cgi?id=60559
489
490         * html/parser/HTMLScriptRunner.cpp:
491         (WebCore::HTMLScriptRunner::runScript):
492         Add null check and explanation that we are keeping the ASSERT to help
493         track down the cause and produce a test.
494
495 2011-05-11  Noam Rosenthal  <noam.rosenthal@nokia.com>
496
497         Reviewed by Kenneth Rohde Christiansen.
498
499         [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
500         https://bugs.webkit.org/show_bug.cgi?id=60439
501
502         Patch 5/12: Implement the new TextureMapper functions for the Qt backend.
503         This allow non-rectangular clipping, some stub functions, and getting a unique
504         id for an image.
505
506         No new tests. Tests in LayoutTests/compositing cover this.
507
508         * platform/graphics/qt/TextureMapperQt.cpp:
509         (WebCore::TextureMapperQt::beginClip):
510         (WebCore::TextureMapperQt::endClip):
511         (WebCore::TextureMapperQt::viewportSize):
512         (WebCore::TextureMapperQt::setGraphicsContext):
513         (WebCore::TextureMapperQt::graphicsContext):
514         (WebCore::TextureMapperQt::drawTexture):
515         (WebCore::TextureMapperQt::beginPainting):
516         (WebCore::TextureMapperQt::endPainting):
517         (WebCore::RGBA32PremultimpliedBufferQt::beginPaint):
518         (WebCore::uidForImage):
519         * platform/graphics/qt/TextureMapperQt.h:
520
521 2011-05-11  Noam Rosenthal  <noam.rosenthal@nokia.com>
522
523         Reviewed by Kenneth Rohde Christiansen.
524
525         [Texmap] Upstream texture-mapper changes from Qt's WebKit2 branch
526         https://bugs.webkit.org/show_bug.cgi?id=60439
527
528         Patch 3/12: TextureMapper shouldn't depend on OpenGL, but rather only allow the GL backend when
529         OpenGL is present.
530
531         No new tests. This is a build fix.
532
533         * WebCore.pri:
534         * WebCore.pro:
535
536 2011-05-11  Noam Rosenthal  <noam.rosenthal@nokia.com>
537
538         Reviewed by Kenneth Rohde Christiansen.
539
540         [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
541         https://bugs.webkit.org/show_bug.cgi?id=60439
542
543         Patch 2/12: Add a few functions to the TextureMapper API, allowing:
544         1. an entry/exit point for painting (beginPaint/endPaint)
545         2. Clipping with a matrix, since we use stencil instead of scissors
546         3. Draw a texture directly with an ID
547         4. Remove offset, since we're using real tiling
548         5. numberOfBytes calculation for textures, for memory management
549
550         No new tests. Tests in LayoutTests/compositing test this.
551
552         * platform/graphics/texmap/TextureMapper.h:
553         (WebCore::BitmapTexture::destroy):
554         (WebCore::BitmapTexture::allowOfflineTextureUpload):
555         (WebCore::BitmapTexture::bpp):
556         (WebCore::BitmapTexture::numberOfBytes):
557         (WebCore::TextureMapper::viewportSize):
558         (WebCore::TextureMapper::setViewportSize):
559         (WebCore::TextureMapper::allowPartialUpdates):
560         (WebCore::TextureMapper::isOpenGLBacked):
561         (WebCore::TextureMapper::setTransform):
562         (WebCore::TextureMapper::transform):
563         (WebCore::TextureMapper::beginPainting):
564         (WebCore::TextureMapper::endPainting):
565
566 2011-05-11  Noam Rosenthal  <noam.rosenthal@nokia.com>
567
568         Reviewed by Kenneth Rohde Christiansen.
569
570         [Texmap][Qt] Upstream texture-mapper changes from Qt's WebKit2 branch
571         https://bugs.webkit.org/show_bug.cgi?id=60439
572
573         Patch 1/12: Change the TextureMapperPlatformLayer API to allow a 3D-context or a
574         media player to decide how to paint into the TextureMapper, rather than mandate specific
575         types of platform layers.
576
577         No new tests. Tests in LayoutTests/compositing test this.
578
579         * platform/graphics/GraphicsLayer.h:
580         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
581
582 2011-05-11  Simon Fraser  <simon.fraser@apple.com>
583
584         Reviewed by Darin Adler.
585
586         Flesh out RenderLayer's ScrollableArea implementation a little more
587         https://bugs.webkit.org/show_bug.cgi?id=60593
588
589         Override a few more ScrollableArea methods on RenderLayer
590         as a baby-step towards animating overflow div scrolling.
591
592         * platform/ScrollableArea.h:
593         (WebCore::ScrollableArea::visibleContentRect):
594         * rendering/RenderLayer.cpp:
595         (WebCore::RenderLayer::scrollPosition):
596         (WebCore::RenderLayer::minimumScrollPosition):
597         (WebCore::RenderLayer::maximumScrollPosition):
598         (WebCore::RenderLayer::visibleContentRect):
599         (WebCore::RenderLayer::overhangAmount):
600         (WebCore::RenderLayer::didCompleteRubberBand):
601         * rendering/RenderLayer.h:
602         (WebCore::RenderLayer::shouldSuspendScrollAnimations):
603
604 2011-05-11  Simon Fraser  <simon.fraser@apple.com>
605
606         Reviewed by Dave Hyatt.
607
608         <rdar://problem/9421781> Slider thumb draws upside-down in WebKit2
609         <rdar://problem/9418025> Slider thumb has odd appearance
610
611         Fix two issues drawing the slider thumb.
612         
613         To fix <rdar://problem/9421781>, if we detect that we're in WebKit2
614         by virtual of the FrameView not having a documentView, then flip
615         the graphics context.
616
617         To fix <rdar://problem/9418025>, we call -drawInteriorWithFrame:inView:
618         rather than -drawWithFrame:inView: so that AppKit doesn't draw a section
619         of track behind the thumb.
620
621         * rendering/RenderThemeMac.mm:
622         (WebCore::RenderThemeMac::paintSliderThumb):
623
624 2011-05-11  Jessie Berlin  <jberlin@apple.com>
625
626         Reviewed by Steve Falkenburg.
627
628         [Windows WebKit2] Use cookies set in WebKit1
629         https://bugs.webkit.org/show_bug.cgi?id=60274
630
631         Share the default storage session between the UI and Web Processes.
632
633         * platform/network/cf/CookieStorageCFNet.cpp:
634         (WebCore::defaultSessionCookieStorage):
635         Keep track of the default storage session cookie storage.
636         (WebCore::currentCookieStorage):
637         Call defaultCookieStorage to get the default cookie storage.
638         (WebCore::defaultCookieStorage):
639         If there is a default storage session cookie storage, prefer that over getting the default
640         cookie storage. In the Web Process, asking CFNetwork for the default cookie storage directly
641         without specifying a storage session will not get the cookie storage being shared by the UI
642         and Web Processes.
643
644         * platform/network/ResourceHandle.h:
645         * platform/network/cf/ResourceHandleCFNet.cpp:
646         (WebCore::willSendRequest):
647         Make sure to set the current storage session on any requests used by the Web
648         Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
649         doing anything with the Web Process's default storage session (which is not the one shared
650         with the UI Process).
651         (WebCore::makeFinalRequest):
652         Ditto.
653         (WebCore::ResourceHandle::willSendRequest):
654         Ditto.
655         (WebCore::ResourceHandle::currentStorageSession):
656         If there is a Private Browsing storage session, return that.
657         If not, on Windows return the default storage session that is being shared with the UI
658         Process and on Mac return 0.
659         (WebCore::defaultCFURLStorageSession):
660         (WebCore::ResourceHandle::setDefaultStorageSession):
661         (WebCore::ResourceHandle::defaultStorageSession):
662
663         * platform/network/cf/ResourceRequestCFNet.cpp:
664         (WebCore::ResourceRequest::doUpdatePlatformRequest):
665         Make sure to set the current storage session on any requests used by the Web
666         Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
667         doing anything with the Web Process's default storage session (which is not the one shared
668         with the UI Process).
669
670 2011-05-11  Martin Robinson  <mrobinson@igalia.com>
671
672         Try once more to fix the WinCairo build.
673
674         * platform/graphics/cairo/CairoUtilities.h: Include GraphicsTypes.h with a relative
675         include rather than a system include.
676
677 2011-05-11  Sam Weinig  <sam@webkit.org>
678
679         Reviewed by Eric Seidel.
680
681         Stop including Console.h just to get Console enum types
682         https://bugs.webkit.org/show_bug.cgi?id=60607
683
684         Move MessageSource, MessageType and MessageLevel into its own
685         header and cleanup surrounding classes.
686
687         * GNUmakefile.list.am:
688         * WebCore.gypi:
689         * WebCore.pro:
690         * WebCore.vcproj/WebCore.vcproj:
691         * WebCore.xcodeproj/project.pbxproj:
692         * bindings/js/JSCustomXPathNSResolver.cpp:
693         * bindings/scripts/CodeGeneratorJS.pm:
694         * bindings/v8/V8Proxy.cpp:
695         * dom/ScriptExecutionContext.h:
696         * html/HTMLFormElement.cpp:
697         * html/parser/XSSFilter.cpp:
698         * inspector/ConsoleMessage.h:
699         * inspector/InjectedScriptHost.h:
700         * inspector/InspectorAgent.h:
701         * inspector/InspectorConsoleAgent.h:
702         * inspector/InspectorFrontendHost.h:
703         * inspector/InspectorInstrumentation.cpp:
704         * inspector/InspectorInstrumentation.h:
705         * loader/EmptyClients.h:
706         * loader/FrameLoader.cpp:
707         * loader/MainResourceLoader.cpp:
708         * loader/appcache/ApplicationCacheGroup.cpp:
709         * page/ChromeClient.h:
710         * page/Console.cpp:
711         (WebCore::Console::~Console):
712         * page/Console.h:
713         * page/ConsoleTypes.h: Added.
714         * page/ContentSecurityPolicy.cpp:
715         * page/Geolocation.h:
716         * workers/WorkerReportingProxy.h:
717         * xml/XMLHttpRequest.cpp:
718
719 2011-05-11  Dimitri Glazkov  <dglazkov@chromium.org>
720
721         Unreviewed, rolling out r85650.
722         http://trac.webkit.org/changeset/85650
723         https://bugs.webkit.org/show_bug.cgi?id=59983
724
725         Triggers m_numNodeListCaches > 0 assert in gc-heavy sites.
726
727         * dom/ContainerNode.cpp:
728         (WebCore::ContainerNode::childrenChanged):
729         * dom/Node.cpp:
730         (WebCore::Node::~Node):
731         (WebCore::Node::setDocument):
732         (WebCore::Node::setTreeScopeRecursively):
733         (WebCore::Node::childNodes):
734         (WebCore::Node::registerDynamicNodeList):
735         (WebCore::Node::unregisterDynamicNodeList):
736         (WebCore::Node::notifyLocalNodeListsAttributeChanged):
737         (WebCore::Node::notifyLocalNodeListsChildrenChanged):
738         (WebCore::Node::getElementsByTagName):
739         (WebCore::Node::getElementsByTagNameNS):
740         (WebCore::Node::getElementsByName):
741         (WebCore::Node::getElementsByClassName):
742         * dom/Node.h:
743         * html/HTMLFormControlElement.cpp:
744         (WebCore::HTMLFormControlElement::labels):
745
746 2011-05-11  Eric Carlson  <eric.carlson@apple.com>
747
748         Reviewed by Darin Adler.
749
750         Video track sometimes fails to draw.
751         https://bugs.webkit.org/show_bug.cgi?id=60635
752         <rdar://problem/9281951>
753
754         No new tests, covered by existing pixel tests.
755
756         * html/HTMLMediaElement.cpp:
757         (WebCore::HTMLMediaElement::loadResource): Set display mode to "Unknown" to force a 
758             recalculation, and media engine notification, the next time the state machine runs.
759
760 2011-05-11  Adam Roben  <aroben@apple.com>
761
762         WinCE build fixes for strict PassOwnPtr
763
764         * platform/graphics/wince/SharedBitmap.cpp:
765         (WebCore::SharedBitmap::createHandle):
766         (WebCore::SharedBitmap::clipBitmap):
767         Use nullptr instead of 0.
768
769         * platform/graphics/wince/SimpleFontDataWinCE.cpp: Keep LOOSE_PASS_OWN_PTR turned on for
770         this file until SimpleFontData::scaledFontData is dealt with on all platforms.
771
772         * platform/text/wince/TextCodecWinCE.cpp:
773         (WebCore::newTextCodecWinCE): Use adoptPtr.
774
775 2011-05-11  Chang Shu  <cshu@webkit.org>
776
777         Reviewed by Antonio Gomes.
778
779         [Qt] Tab not working in editing/inserting/typing-tab-designmode-forms.html
780         https://bugs.webkit.org/show_bug.cgi?id=60477
781
782         PlatformKeyboardEvent.m_text should be set to "\t" instead of leaving as null.
783         The value is checked at EventHandler.cpp:2527 (r86166).
784
785         Function keyTextForKeyEvent is partially implemented and can be enhanced in
786         a need-base.
787
788         * platform/qt/PlatformKeyboardEventQt.cpp:
789         (WebCore::keyTextForKeyEvent):
790         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
791
792 2011-05-11  Adam Roben  <aroben@apple.com>
793
794         Use case-insensitive comparisons when checking plugin filenames on Windows
795
796         Windows paths are nearly always case-insensitive.
797
798         I couldn't think of a good way to test this.
799
800         Fixes <http://webkit.org/b/60633> WebKit1 loads Windows Presentation Foundation plugin, but
801         should not
802
803         Reviewed by Steve Falkenburg.
804
805         * plugins/win/PluginPackageWin.cpp:
806         (WebCore::PluginPackage::isPluginBlacklisted): Use equalIgnoringCase instead of == when
807         checking plugin filenames.
808
809 2011-05-11  Adam Roben  <aroben@apple.com>
810
811         Turn on strict PassOwnPtr on Windows
812
813         Fixes <http://webkit.org/b/60632> Windows should build with strict PassOwnPtr enabled
814
815         Reviewed by Adam Barth.
816
817         * platform/graphics/win/SimpleFontDataWin.cpp: Keep LOOSE_PASS_OWN_PTR turned on for this
818         file until SimpleFontData::scaledFontData is dealt with on all platforms.
819
820 2011-05-11  Julien Chaffraix  <jchaffraix@webkit.org>
821
822         Reviewed by Geoffrey Garen.
823
824         XPathResult should keep its node set's JS wrappers alive
825         https://bugs.webkit.org/show_bug.cgi?id=34231
826
827         The change added a custom mark function for JSC. V8 was already properly
828         marking the nodes so no change were done on the V8 side.
829
830         Tests: fast/xpath/xpath-iterator-result-should-mark-its-nodeset.html
831                fast/xpath/xpath-other-nodeset-result-should-mark-its-nodeset.html
832                fast/xpath/xpath-result-eventlistener-crash.html
833                fast/xpath/xpath-snapshot-result-should-mark-its-nodeset.html
834
835         * Android.jscbindings.mk:
836         * GNUmakefile.list.am:
837         * UseJSC.cmake:
838         * WebCore.gypi:
839         * WebCore.pro:
840         * WebCore.vcproj/WebCore.vcproj:
841         * WebCore.xcodeproj/project.pbxproj:
842         * bindings/js/JSBindingsAllInOne.cpp:
843         Added the new file to our build systems.
844
845         * bindings/js/JSXPathResultCustom.cpp: Added.
846         (WebCore::JSXPathResult::markChildren): Added code to mark the
847         XPathResult snapshot's nodes.
848         * xml/XPathResult.h:
849         (WebCore::XPathResult::value): Exposed this getter so that we can
850         mark our XPathValue.
851         * xml/XPathResult.idl: Told the IDL parser that we now need
852         a custom mark function.
853
854 2011-05-04  Philippe Normand  <pnormand@igalia.com>
855
856         Reviewed by Martin Robinson.
857
858         [Gtk+] deadlock in gstreamer video player when exiting fullscreen
859         https://bugs.webkit.org/show_bug.cgi?id=58548
860
861         Block data flow towards the pipeline branch to remove to avoid
862         potential deadlocks during the PAUSED->READY transitions of the
863         elements to remove.
864
865         * platform/graphics/gstreamer/GStreamerGWorld.cpp:
866         (WebCore::GStreamerGWorld::exitFullscreen):
867
868 2011-05-11  Kent Tamura  <tkent@chromium.org>
869
870         Reviewed by Hajime Morita.
871
872         The position of validation message bubble is wrong for non text fields.
873         https://bugs.webkit.org/show_bug.cgi?id=60341
874
875         Tests: fast/forms/validation-message-on-checkbox.html
876                fast/forms/validation-message-on-listbox.html
877                fast/forms/validation-message-on-menulist.html
878                fast/forms/validation-message-on-radio.html
879                fast/forms/validation-message-on-textarea.html
880
881         * css/html.css:
882         (::-webkit-validation-bubble-message):
883           Add white-space:normal in order not to inherit white-space:pre for <select>.
884         * html/ValidationMessage.cpp:
885         (WebCore::adjustBubblePosition):
886           Adjust the bubble position.
887           - The top of the bubble should be same as the bottom of the target control.
888           - The left of the bubble should be same as the left of the target control.
889             But If the left+32 is larger than the center of the target control,
890             left+32 should be at the center of the target control.
891             But the left position should not be less than 0.
892         (WebCore::ValidationMessage::buildBubbleTree): Call adjustBubblePosition().
893
894 2011-05-11  Emil A Eklund  <eae@chromium.org>
895
896         Reviewed by Eric Seidel.
897
898         Convert RenderFlexibleBox to use IntPoint/IntSize instead of x,y/w,h pairs
899         https://bugs.webkit.org/show_bug.cgi?id=60592
900
901         Refactoring, covered by existing tests.
902
903         * rendering/RenderFlexibleBox.cpp:
904         (WebCore::RenderFlexibleBox::layoutBlock):
905         (WebCore::RenderFlexibleBox::layoutHorizontalBox):
906         (WebCore::RenderFlexibleBox::layoutVerticalBox):
907         (WebCore::RenderFlexibleBox::placeChild):
908         * rendering/RenderFlexibleBox.h:
909
910 2011-05-10  Ilya Tikhonovsky  <loislo@chromium.org>
911
912         Unreviewed buildfix for strict OwnPtr.
913
914         * platform/audio/AudioBus.cpp:
915         (WebCore::AudioBus::createBufferFromRange):
916         (WebCore::AudioBus::createBySampleRateConverting):
917         (WebCore::AudioBus::createByMixingToMono):
918         * platform/audio/HRTFElevation.cpp:
919         (WebCore::HRTFElevation::createForSubject):
920         (WebCore::HRTFElevation::createByInterpolatingSlices):
921         * platform/audio/Panner.cpp:
922         (WebCore::Panner::create):
923         * platform/audio/Reverb.cpp:
924         (WebCore::Reverb::initialize):
925         * platform/audio/chromium/AudioBusChromium.cpp:
926         (WebCore::AudioBus::loadPlatformResource):
927         (WebCore::createBusFromInMemoryAudioFile):
928
929 2011-05-10  Adam Barth  <abarth@webkit.org>
930
931         Build fix for font data madness.  I've had to whitelist this on several
932         ports.  They need to all be fixed at once.
933
934         * platform/graphics/chromium/SimpleFontDataChromiumWin.cpp:
935
936 2011-05-10  David Kilzer  <ddkilzer@apple.com>
937
938         BUILD FIX for !ENABLE(TEXT_CARET) after r86039
939
940         * editing/FrameSelection.cpp:
941         (WebCore::DragCaretController::paintDragCaret): Added
942         UNUSED_PARAM(frame) for !ENABLE(TEXT_CARET).
943
944 2011-05-10  James Robinson  <jamesr@chromium.org>
945
946         Reviewed by Kenneth Russell.
947
948         [chromium] Clean up setLayerRenderer() calls in LayerRendererChromium
949         https://bugs.webkit.org/show_bug.cgi?id=60524
950
951         This refactors the way LayerRendererChromium calls setLayerRenderer on its layers in a few ways to clean things
952         up:
953
954         *) Move the pre-paint call to setLayerRenderer from updatePropertiesAndRenderSurfaces() to paintLayerContents().
955             updatePropertiesAndRenderSurfaces() does too much and the layer renderer pointer only has to be up to date to do
956             the actual paint. Longer term we won't need to call this at all in order to call paint and this call will just
957             go away.
958         *) Tweaks updateCompositorResourcesRecursive() to be slightly shorter and less error-prone.
959         *) Explicitly set the LayerRendererChromium for each layer in the tree when transfering the root layer (used
960             during lost context).  LayerChromium::setLayerRenderer checks if the new LayerRendererChromium is different
961             by comparing the pointer value to the old one.  This check will be incorrect if there are multiple lost
962             contexts between a setLayerRenderer() call and a new LayerRendererChromium happens to be allocated at the
963             same address as the old one.  An explicit call to setLayerRenderer() for every layer in the tree fixes this
964             since when this function is called the new and old LayerRendererChromium are still live and so they cannot
965             live at the same address.
966
967         The first two changes are purely refactors and do not change behavior.  The third issue can't be tested via a
968         layout test directly as we don't have a way to induce a lost context on the compositor in a layout test.
969
970         * platform/graphics/chromium/LayerRendererChromium.cpp:
971         (WebCore::LayerRendererChromium::paintLayerContents):
972         (WebCore::LayerRendererChromium::clearLayerRendererRecursive):
973         (WebCore::LayerRendererChromium::transferRootLayer):
974         (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces):
975         (WebCore::LayerRendererChromium::updateCompositorResourcesRecursive):
976         * platform/graphics/chromium/LayerRendererChromium.h:
977
978 2011-05-10  Anton D'Auria  <adauria@apple.com>
979
980         Reviewed by David Levin.
981
982         StorageTracker should report actual local storage usage on disk
983         https://bugs.webkit.org/show_bug.cgi?id=60558
984
985         Tests: storage/domstorage/localstorage/storagetracker/storage-tracker-6-create.html
986                storage/domstorage/localstorage/storagetracker/storage-tracker-7-usage.html
987
988         Use SQLiteFileSystem::getDatabaseFileSize to get actual usage by
989         an origin's local storage db. Factored out code that retrieves
990         path of local storage db.
991
992         * WebCore.exp.in: Sorted alphabetically StorageTracker's mangled
993         function names.
994         * storage/StorageTracker.cpp:
995         (WebCore::StorageTracker::syncDeleteOrigin): Uses helper function
996         to get path of origin's db
997         (WebCore::StorageTracker::databasePathForOrigin): New helper function.
998         that gets the path of an origin's local storage db from StorageTracker.
999         (WebCore::StorageTracker::diskUsageForOrigin): New API.
1000         * storage/StorageTracker.h:
1001
1002 2011-05-10  Anton D'Auria  <adauria@apple.com>
1003
1004         Reviewed by Alexey Proskuryakov.
1005
1006         Add ApplicationCache API to get disk usage per origin
1007         https://bugs.webkit.org/show_bug.cgi?id=57127
1008
1009         ApplicationCacheStorage already provides an API to get per-origin
1010         disk usage. This should be exposed through WebCore::ApplicationCache
1011         to not be dependent on storage implementation.
1012
1013         Test: http/tests/appcache/origin-usage.html
1014
1015         * WebCore.exp.in:
1016         * loader/appcache/ApplicationCache.cpp:
1017         (WebCore::ApplicationCache::diskUsageForOrigin):
1018         * loader/appcache/ApplicationCache.h:
1019
1020 2011-05-10  Pratik Solanki  <psolanki@apple.com>
1021
1022         Reviewed by Alexey Proskuryakov.
1023
1024         Protect self in [WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]
1025         https://bugs.webkit.org/show_bug.cgi?id=60594
1026         <rdar://problem/9203259>
1027
1028         No tests since we don't have any bots testing CFNETWORK_DATA_ARRAY_CALLBACK.
1029
1030         * platform/network/mac/ResourceHandleMac.mm:
1031         (-[WebCoreResourceHandleAsDelegate connection:didReceiveDataArray:]): The didReceiveData()
1032         callback on client can result in the load being cancelled. This results in the delegate
1033         (self) being freed.  Protect self during the loop so we can check for m_handle and safely
1034         return without crashing.
1035
1036 2011-05-10  Chris Guillory  <chris.guillory@google.com>
1037
1038         Reviewed by James Robinson.
1039
1040         [ChromiumWin] Font::drawComplexText calls EndPlatformPaint without calling BeginPlatformPaint.
1041         https://bugs.webkit.org/show_bug.cgi?id=59848
1042
1043         To test this I plan to make the non-printing device (BitmapPlatformDevice) fail
1044         when EndPlatformPaint doesn't matchup with BeginPlatformPaint.
1045         http://codereview.chromium.org/6949012/ 
1046
1047         * platform/graphics/chromium/FontChromiumWin.cpp:
1048         (WebCore::Font::drawComplexText):
1049
1050 2011-05-10  Sheriff Bot  <webkit.review.bot@gmail.com>
1051
1052         Unreviewed, rolling out r86195.
1053         http://trac.webkit.org/changeset/86195
1054         https://bugs.webkit.org/show_bug.cgi?id=60597
1055
1056         LayerOffset is a really bad name (Requested by smfr on
1057         #webkit).
1058
1059         * GNUmakefile.list.am:
1060         * WebCore.gypi:
1061         * WebCore.pro:
1062         * WebCore.vcproj/WebCore.vcproj:
1063         * WebCore.xcodeproj/project.pbxproj:
1064         * page/FrameView.cpp:
1065         (WebCore::FrameView::paintScrollCorner):
1066         * platform/graphics/LayerOffset.h: Removed.
1067         * rendering/InlineTextBox.cpp:
1068         (WebCore::InlineTextBox::paint):
1069         (WebCore::InlineTextBox::paintCustomHighlight):
1070         * rendering/InlineTextBox.h:
1071         * rendering/RenderBox.cpp:
1072         (WebCore::RenderBox::paintCustomHighlight):
1073         * rendering/RenderBox.h:
1074         * rendering/RenderImage.cpp:
1075         (WebCore::RenderImage::paintReplaced):
1076         * rendering/RenderLayer.cpp:
1077         (WebCore::RenderLayer::paintScrollCorner):
1078         (WebCore::RenderLayer::paintResizer):
1079         * rendering/RenderListMarker.cpp:
1080         (WebCore::RenderListMarker::paint):
1081         * rendering/RenderObject.h:
1082         * rendering/RenderScrollbar.cpp:
1083         (WebCore::RenderScrollbar::paintPart):
1084         * rendering/RenderScrollbarPart.cpp:
1085         (WebCore::RenderScrollbarPart::paintIntoRect):
1086         * rendering/RenderScrollbarPart.h:
1087         * rendering/RenderTable.cpp:
1088         (WebCore::RenderTable::paintObject):
1089         (WebCore::RenderTable::paintMask):
1090         * rendering/RenderTable.h:
1091         * rendering/RenderWidget.cpp:
1092         (WebCore::RenderWidget::paint):
1093         * rendering/RootInlineBox.cpp:
1094         (WebCore::RootInlineBox::paintCustomHighlight):
1095         (WebCore::RootInlineBox::paint):
1096         * rendering/RootInlineBox.h:
1097
1098 2011-05-10  Emil A Eklund  <eae@chromium.org>
1099
1100         Reviewed by Eric Seidel.
1101
1102         Convert x,y and width,height pairs to IntPoint and IntSize for RenderLayer
1103         https://bugs.webkit.org/show_bug.cgi?id=60409
1104
1105         Convert RenderLayer to use IntPoint for x,y pairs and IntSize for offsets and sizes.
1106
1107         Refactoring, covered by existing tests.
1108
1109         * rendering/RenderLayer.cpp:
1110         (WebCore::RenderLayer::RenderLayer):
1111         (WebCore::RenderLayer::updateLayerPositions):
1112         (WebCore::RenderLayer::updateLayerPosition):
1113         (WebCore::RenderLayer::scrollTo):
1114         (WebCore::RenderLayer::visibleHeight):
1115         (WebCore::RenderLayer::visibleWidth):
1116         (WebCore::RenderLayer::scrollWidth):
1117         (WebCore::RenderLayer::scrollHeight):
1118         (WebCore::RenderLayer::computeScrollDimensions):
1119         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1120         * rendering/RenderLayer.h:
1121         (WebCore::RenderLayer::x):
1122         (WebCore::RenderLayer::y):
1123         (WebCore::RenderLayer::setLocation):
1124         (WebCore::RenderLayer::width):
1125         (WebCore::RenderLayer::height):
1126         (WebCore::RenderLayer::size):
1127         (WebCore::RenderLayer::setWidth):
1128         (WebCore::RenderLayer::setHeight):
1129         (WebCore::RenderLayer::scrolledContentOffset):
1130         (WebCore::RenderLayer::scrollXOffset):
1131         (WebCore::RenderLayer::scrollYOffset):
1132         (WebCore::RenderLayer::scrollOffset):
1133         (WebCore::RenderLayer::scrollToXOffset):
1134         (WebCore::RenderLayer::scrollToYOffset):
1135         (WebCore::RenderLayer::relativePositionOffset):
1136
1137 2011-05-10  Levi Weintraub  <leviw@chromium.org>
1138
1139         Reviewed by Eric Seidel.
1140
1141         Create LayerOffset class
1142         https://bugs.webkit.org/show_bug.cgi?id=60490
1143
1144         Adding a LayerOffset class that will replace existing usage of tx/ty.
1145         LayerOffset is necessary since these values are commonly used as both
1146         a size and a point. Updating paintIntoRect to use this new class.
1147
1148         No new tests since this doesn't change any behavior.
1149
1150         * GNUmakefile.list.am:
1151         * WebCore.gypi:
1152         * WebCore.pro:
1153         * WebCore.vcproj/WebCore.vcproj:
1154         * WebCore.xcodeproj/project.pbxproj:
1155         * page/FrameView.cpp:
1156         (WebCore::FrameView::paintScrollCorner):
1157         * platform/graphics/LayerOffset.h: Added.
1158         (WebCore::LayerOffset::LayerOffset):
1159         (WebCore::LayerOffset::x):
1160         (WebCore::LayerOffset::y):
1161         (WebCore::LayerOffset::setX):
1162         (WebCore::LayerOffset::setY):
1163         (WebCore::LayerOffset::toSize):
1164         (WebCore::LayerOffset::toPoint):
1165         (WebCore::operator+=):
1166         (WebCore::operator-=):
1167         (WebCore::operator+):
1168         (WebCore::operator-):
1169         (WebCore::operator==):
1170         (WebCore::operator!=):
1171         * rendering/RenderLayer.cpp:
1172         (WebCore::RenderLayer::paintScrollCorner):
1173         (WebCore::RenderLayer::paintResizer):
1174         * rendering/RenderScrollbar.cpp:
1175         (WebCore::RenderScrollbar::paintPart):
1176         * rendering/RenderScrollbarPart.cpp:
1177         (WebCore::RenderScrollbarPart::paintIntoRect):
1178         * rendering/RenderScrollbarPart.h:
1179
1180 2011-05-10  Ryosuke Niwa  <rniwa@webkit.org>
1181
1182         Reviewed by Darin Adler.
1183
1184         Make member variables of CaretBase private
1185         https://bugs.webkit.org/show_bug.cgi?id=60454
1186
1187         Moved m_absCaretBounds, m_absoluteCaretRepaintBounds, m_absCaretBoundsDirty, and m_caretPaint back
1188         from CaretBase to FrameSelection because they are only used in FrameSelection, and made the rest
1189         of member variables in CaretBase private.
1190
1191         * editing/FrameSelection.cpp:
1192         (WebCore::CaretBase::CaretBase): Takes CaretVisibility as an argument.
1193         (WebCore::DragCaretController::DragCaretController):
1194         (WebCore::FrameSelection::FrameSelection): Initializes m_absCaretBoundsDirty and m_caretPaint
1195         now that they are part of FrameSelection again.
1196         (WebCore::DragCaretController::setCaretPosition):
1197         (WebCore::FrameSelection::setSelection):
1198         (WebCore::CaretBase::clearCaretRect): Extracted from updateCaretRect.
1199         (WebCore::CaretBase::updateCaretRect): No longer clears caret; all call sites (namely setCaretPosition
1200         and localCaretRect) that used to call updateCaretRect now need to call clearCaretRect or updateCaretRect
1201         based on some conditions.
1202         (WebCore::FrameSelection::localCaretRect):
1203         (WebCore::CaretBase::caretRepaintRect):
1204         (WebCore::FrameSelection::recomputeCaretRect):
1205         (WebCore::FrameSelection::paintCaret): Only calls CaretBase::paintCaret if m_caretPaint is true.
1206         (WebCore::CaretBase::paintCaret): Removed an early exit for when m_caretPaint is false since m_caretPaint
1207         has been moved from CaretBase to FrameSelection.
1208         (WebCore::FrameSelection::focusedOrActiveStateChanged):
1209         (WebCore::FrameSelection::updateAppearance):
1210         (WebCore::FrameSelection::setCaretVisibility): Takes CaretVisibility instead of bool.
1211         (WebCore::FrameSelection::caretBlinkTimerFired):
1212         * editing/FrameSelection.h:
1213         (WebCore::CaretBase::fastLocalCaretRect): Added; replaces localCaretRectForPainting.
1214         (WebCore::CaretBase::shouldUpdateCaretRect): Added.
1215         (WebCore::CaretBase::setCaretRectNeedsUpdate): Added.
1216         (WebCore::CaretBase::setCaretVisibility): Added.
1217         (WebCore::CaretBase::caretIsVisible): Added.
1218         (WebCore::FrameSelection::setCaretRectNeedsUpdate): Added.
1219
1220 2011-05-10  James Robinson  <jamesr@chromium.org>
1221
1222         Reviewed by Nate Chapin.
1223
1224         [chromium] Use parent/child terms for compositor tree structures consistently instead of superlayer/sublayer
1225         https://bugs.webkit.org/show_bug.cgi?id=60588
1226
1227         GraphicsLayer uses parent/child terminology for tree structure, as does CCLayerImpl.  LayerChromium was using
1228         superlayer/sublayer terms, inherited from this code's branching from the platform/graphics/win/CACF code.  The
1229         mixed terminology is confusing and parent/child is more common, so this unifies everything to use parent/child.
1230
1231         No new tests, refactor only.
1232
1233         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
1234         (WebCore::GraphicsLayerChromium::setChildren):
1235         (WebCore::GraphicsLayerChromium::addChild):
1236         (WebCore::GraphicsLayerChromium::addChildAtIndex):
1237         (WebCore::GraphicsLayerChromium::addChildBelow):
1238         (WebCore::GraphicsLayerChromium::addChildAbove):
1239         (WebCore::GraphicsLayerChromium::replaceChild):
1240         (WebCore::GraphicsLayerChromium::removeFromParent):
1241         (WebCore::GraphicsLayerChromium::setContentsToImage):
1242         (WebCore::GraphicsLayerChromium::setContentsToCanvas):
1243         (WebCore::GraphicsLayerChromium::setContentsToMedia):
1244         (WebCore::GraphicsLayerChromium::hostLayerForChildren):
1245         (WebCore::GraphicsLayerChromium::layerForParent):
1246         (WebCore::GraphicsLayerChromium::updateChildList):
1247         (WebCore::GraphicsLayerChromium::updateLayerPreserves3D):
1248         (WebCore::GraphicsLayerChromium::setupContentsLayer):
1249         * platform/graphics/chromium/GraphicsLayerChromium.h:
1250         * platform/graphics/chromium/LayerChromium.cpp:
1251         (WebCore::LayerChromium::LayerChromium):
1252         (WebCore::LayerChromium::~LayerChromium):
1253         (WebCore::LayerChromium::addChild):
1254         (WebCore::LayerChromium::insertChild):
1255         (WebCore::LayerChromium::removeFromParent):
1256         (WebCore::LayerChromium::removeChild):
1257         (WebCore::LayerChromium::replaceChild):
1258         (WebCore::LayerChromium::indexOfChild):
1259         (WebCore::LayerChromium::rootLayer):
1260         (WebCore::LayerChromium::removeAllChildren):
1261         (WebCore::LayerChromium::setChildren):
1262         (WebCore::LayerChromium::parent):
1263         (WebCore::LayerChromium::dumpLayer):
1264         * platform/graphics/chromium/LayerChromium.h:
1265         (WebCore::LayerChromium::children):
1266         (WebCore::LayerChromium::setParent):
1267         (WebCore::LayerChromium::numChildren):
1268         * platform/graphics/chromium/LayerRendererChromium.cpp:
1269         (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces):
1270         (WebCore::LayerRendererChromium::updateCompositorResourcesRecursive):
1271         (WebCore::LayerRendererChromium::dumpRenderSurfaces):
1272         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
1273         (WebCore::CCLayerImpl::parent):
1274         (WebCore::CCLayerImpl::descendantsDrawsContent):
1275         * platform/graphics/chromium/cc/CCLayerImpl.h:
1276
1277 2011-05-10  Levi Weintraub  <leviw@chromium.org>
1278
1279         Reviewed by Darin Adler.
1280
1281         Switch RenderBoxModelObject::paintNinePieceImage to use IntRect instead of four ints
1282         https://bugs.webkit.org/show_bug.cgi?id=60586
1283
1284         Switch paintNinePieceImage to take an IntRect instead of four ints representing an IntRect!
1285
1286         No new tests as this is simply refactoring.
1287
1288         * rendering/InlineFlowBox.cpp:
1289         (WebCore::InlineFlowBox::paintMask):
1290         * rendering/RenderBox.cpp:
1291         (WebCore::RenderBox::paintMaskImages):
1292         * rendering/RenderBoxModelObject.cpp:
1293         (WebCore::RenderBoxModelObject::paintNinePieceImage):
1294         (WebCore::RenderBoxModelObject::paintBorder):
1295         * rendering/RenderBoxModelObject.h:
1296
1297 2011-05-05  Jer Noble  <jer.noble@apple.com>
1298
1299         Reviewed by Maciej Stachowiak.
1300
1301         Removing the full screen element via parent.innerHTML="" does not result in a webkitfullscreenchange event.
1302         https://bugs.webkit.org/show_bug.cgi?id=60278
1303
1304         Handle the removal of a full screen element from within Node::willRemove() instead
1305         of Document::nodeWillBeRemoved().  The new function Document::fullScreenElementWillBeRemoved() will
1306         be called by Node::willRemove() to handle those changes which used to occur in nodeWillBeRemoved().
1307
1308         Test: fullscreen/full-screen-remove-children.html
1309
1310         * dom/Document.cpp:
1311         (WebCore::Document::nodeWillBeRemoved): Removed the code checking for the full screen element.
1312         (WebCore::Document::fullScreenElementWillBeRemoved): Added, moved from nodeWillBeRemoved.
1313         * dom/Document.h:
1314         * dom/Node.cpp:
1315         (WebCore::Node::willRemove): Check to see if this is the current full screen element.
1316
1317 2011-05-10  Beth Dakin  <bdakin@apple.com>
1318
1319         Reviewed by Darin Adler.
1320
1321         https://bugs.webkit.org/show_bug.cgi?id=60582
1322         Crash switching overlay/non-overlay scrollbar preference still possible
1323         -and corresponding-
1324         <rdar://problem/9323983>
1325
1326         This patch prevents any work from being done on pages that are in the page cache 
1327         when the preference is switched.
1328
1329         When the Document is going into or coming out of the page cache, have the 
1330         FrameView inactivate or activate the Page's ScrollAnimators as appropriate.
1331         * dom/Document.cpp:
1332         (WebCore::Document::setInPageCache):
1333
1334         Iterate through the Page's ScrollableAreas setting the active state of the 
1335         ScrollAnimators.
1336         * page/FrameView.cpp:
1337         (WebCore::FrameView::setAnimatorsAreActive):
1338         * page/FrameView.h:
1339
1340         ScrollAnimator has a new bit -- m_isActive. Right now m_isActive is always true 
1341         unless the ScrollAnimator belongs to a ScrollableArea that is in the page cache.
1342         * platform/ScrollAnimator.cpp:
1343         (WebCore::ScrollAnimator::ScrollAnimator):
1344         * platform/ScrollAnimator.h:
1345         (WebCore::ScrollAnimator::setIsActive):
1346         (WebCore::ScrollAnimator::isActive):
1347
1348         ScrollAnimatorMac has a new bit -- m_needsScrollerStyleUpdate. This is set to true 
1349         when a ScrollAnimator is inactive and has received the 
1350         updateScrollerStyleForNewRecommendedScrollerStyle delegate notification. It 
1351         prevents any work from being done for this delegate until the ScrollAnimator 
1352         becomes active again.
1353         * platform/mac/ScrollAnimatorMac.h:
1354         (WebCore::ScrollAnimatorMac::setNeedsScrollerStyleUpdate):
1355         (WebCore::ScrollAnimatorMac::needsScrollerStyleUpdate):
1356
1357         This delegate method has been re-factored into ScrollAnimatorMac:: 
1358         updateScrollerStyle(). This way the meat of the function can be called by both the 
1359         delegate and ScrollAnimatorMac::setIsActive()
1360         * platform/mac/ScrollAnimatorMac.mm:
1361         (-[ScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
1362         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1363
1364         This override of ScrollAnimator::setIsActive() calls the base class, and then calls updateScrollerStyle() if needsScrollerStyleUpdate() is set to true.
1365         (WebCore::ScrollAnimatorMac::setIsActive):
1366
1367         This is mostly the same as the old delegate method. Key differences are that if 
1368         the ScrollAnimator is inactive, we now setNeedsScrollerStyleUpdate(true) and 
1369         return early. We also only call scrollableArea()->scrollbarStyleChanged() if 
1370         needsScrollerStyleUpdate() is false since in the true case when we are restoring 
1371         from the page cache, this would be duplicated work.
1372         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
1373
1374         New WKSystemInterface function is needed to retrieve the scrollbar style.
1375         * WebCore.exp.in:
1376         * platform/mac/WebCoreSystemInterface.h:
1377         * platform/mac/WebCoreSystemInterface.mm:
1378
1379 2011-05-10  Adam Barth  <abarth@webkit.org>
1380
1381         Reviewed by David Levin.
1382
1383         Enable strict PassOwnPtr on Chromium
1384         https://bugs.webkit.org/show_bug.cgi?id=60502
1385
1386         Technically there are a few bits in here that weren't reviewed by Dave,
1387         but close enough for government work.  This patch all fixes  the
1388         remaining strict PassOwnPtr violations on Chromium Linux.
1389
1390         * platform/graphics/chromium/PlatformCanvas.cpp:
1391         (WebCore::PlatformCanvas::resize):
1392         * platform/graphics/chromium/SimpleFontDataLinux.cpp:
1393         * platform/graphics/skia/ImageBufferSkia.cpp:
1394         (WebCore::ImageBuffer::ImageBuffer):
1395         * platform/graphics/skia/PlatformContextSkia.cpp:
1396         (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
1397
1398 2011-05-10  Brady Eidson  <beidson@apple.com>
1399
1400         Reviewed by Alice Liu.
1401
1402         <rdar://problem/9343191> and https://bugs.webkit.org/show_bug.cgi?id=60572
1403         REGRESSION - Canon On-screen Manual.app crashes after a search
1404
1405         No new tests - There's no way to reproduce the truly bizarre things Canon does in their app
1406         that would reasonably fit in to our testing infrastructure.
1407
1408         In r66577 a new behavior was added where changing the "setLoadsImagesAutomatically" setting to "true" would immediately
1409         start loading those images that had been disabled.
1410
1411         If this happens while a WebView is being dealloc'ed, and we don't know the WebView is being dealloc'ed, these new loads
1412         can cause crashes downstream when the WebView memory has actually been free'd.
1413
1414         One example where this can happen is in Mac apps that subclass WebView then do work in their overridden dealloc methods.
1415         And the Canon Onscreen Manual is one such app.
1416
1417         Starting these loads synchronously is not important.  By putting it on a 0-delay, properly closing the Page cancels them
1418         before they have a chance to really start.
1419
1420         See http://webkit.org/b/60572 for more discussion.
1421
1422
1423         Add a timer to Settings and instead of calling setLoadsImagesAutomaticallyInAllFrames right
1424         away when this pref changes, call it on a 0-delay:
1425         * page/Settings.cpp:
1426         (WebCore::Settings::Settings):
1427         (WebCore::Settings::setLoadsImagesAutomatically):
1428         (WebCore::Settings::loadsImagesAutomaticallyTimerFired):
1429         * page/Settings.h:
1430
1431 2011-05-10  Martin Robinson  <mrobinson@igalia.com>
1432
1433         Reviewed by Xan Lopez.
1434
1435         [GTK][WebKit2] GTK+ 2.x widget rendering fails after r85480
1436         https://bugs.webkit.org/show_bug.cgi?id=59990
1437
1438         No new tests. This is covered by existing pixel tests.
1439
1440         * platform/gtk/GtkVersioning.c:
1441         (getGdkDrawableSize): Added this helper method.
1442         * platform/gtk/GtkVersioning.h: Added helper method declaration.
1443         * platform/gtk/WidgetRenderingContext.cpp:
1444         (WebCore::WidgetRenderingContext::WidgetRenderingContext): Call into the helper if
1445         there is actually a GdkDrawable. If not, disable the sanity check.
1446
1447 2011-05-10  Martin Robinson  <mrobinson@igalia.com>
1448
1449         Fix the GTK+ WebKit2 build. Add a CredentialsStorage stub for libsoup.
1450
1451         * GNUmakefile.list.am: Add stub to source list.
1452         * platform/network/soup/CredentialStorageSoup.cpp: Added.
1453         (WebCore::CredentialStorage::getFromPersistentStorage):  Added stub.
1454         (WebCore::CredentialStorage::get):
1455
1456 2011-05-09  David Hyatt  <hyatt@apple.com>
1457
1458         Reviewed by Dan Bernstein.
1459
1460         <rdar://problem/9354979> REGRESSION (r83070-r83126): This conversation takes 10 seconds to load and makes mail unresponsive
1461         
1462         Second attempts at a fix for this bug.  Instead of removing the dirtying (which turned out to be needed in a few cases),
1463         make dirtyLinesFromChangedChild mark a child as needing layout when it has to recur to the parent.  Because the method already
1464         aborts the recursion if selfNeedsLayout() is set on the parent, this has the effect of stopping the O(n^2) pathological
1465         behavior, since you can use the selfNeedsLayout() bit to understand that you've dirtied the lines already.
1466
1467         * rendering/RenderLineBoxList.cpp:
1468         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
1469
1470 2011-05-05  Brent Fulgham  <bfulgham@webkit.org> and Martin Robinson  <mrobinson@igalia.com>
1471
1472         Reviewed by Anders Carlsson.
1473
1474         [Cairo][WebKit2] Add an implementation of ShareableBitmap for Cairo
1475         https://bugs.webkit.org/show_bug.cgi?id=60293
1476
1477         No new tests. This is covered by current pixel tests.
1478
1479         * platform/graphics/cairo/CairoUtilities.cpp:
1480         (WebCore::copyCairoImageSurface): Abstract the code from WebCore::ImageBuffer::copyImage
1481         into this helper which creates a deep copy of a Cairo image surface.
1482         * platform/graphics/cairo/CairoUtilities.h: Added declaration.
1483         * platform/graphics/cairo/ImageBufferCairo.cpp:
1484         (WebCore::ImageBuffer::copyImage): Use the new helper.
1485         * platform/graphics/cairo/ImageCairo.cpp: Abstract some of this logic
1486         into the new drawSurfaceToContext method on PlatformContextCairo.
1487         (WebCore::BitmapImage::draw):
1488         * platform/graphics/cairo/PlatformContextCairo.cpp:
1489         (WebCore::drawPatternToCairoContext): Added.
1490         (WebCore::PlatformContextCairo::drawSurfaceToContext): Added.
1491         * platform/graphics/cairo/PlatformContextCairo.h: Added declarations.
1492
1493 2011-05-10  Anders Carlsson  <andersca@apple.com>
1494
1495         Attempt to fix Qt build.
1496
1497         * platform/network/qt/CredentialStorageQt.cpp:
1498         (WebCore::CredentialStorage::get):
1499         Add stub.
1500
1501 2011-05-10  Kenichi Ishibashi  <bashi@chromium.org>
1502
1503         Reviewed by Tony Chang.
1504
1505         REGRESSION(r85013): platform/chromium-linux/fast/text/international/complex-joining-using-gpos.html is failing
1506         https://bugs.webkit.org/show_bug.cgi?id=60079
1507
1508         Set resultingNumPoints = 0 so that harfbuzz uses the design coordinate
1509         value pair.
1510
1511         * platform/graphics/chromium/HarfbuzzSkia.cpp:
1512         (WebCore::getOutlinePoint): Just return HB_Err_Ok with resultingNumPoints = 0.
1513
1514 2011-05-10  Anders Carlsson  <andersca@apple.com>
1515
1516         Reviewed by Sam Weinig.
1517
1518         Extra sign in required to view video on MobileMe Gallery album
1519         https://bugs.webkit.org/show_bug.cgi?id=60560
1520         <rdar://problem/9338693>
1521
1522         Add symbols required by WebKit2.
1523
1524         * WebCore.exp.in:
1525
1526 2011-05-10  Alexander Pavlov  <apavlov@chromium.org>
1527
1528         Reviewed by Pavel Feldman.
1529
1530         Web Inspector: Styles sidebar is not updated upon changes in the Resources panel.
1531         https://bugs.webkit.org/show_bug.cgi?id=60320
1532
1533         * inspector/front-end/ElementsPanel.js:
1534         (WebInspector.ElementsPanel):
1535
1536 2011-05-06  Brett Wilson  <brettw@chromium.org>
1537
1538         Reviewed by Adam Barth.
1539
1540         Use a File object to store the downloaded file reference rather than
1541         just the path. This keeps the file and permissions in scope (using the
1542         already-existing blob system) so the browser won't delete the file
1543         when the load is complete. Instead, the file will be cleaned up when
1544         the request objects are deleted.
1545         https://bugs.webkit.org/show_bug.cgi?id=60281
1546
1547         * platform/network/chromium/ResourceResponse.cpp:
1548         (WebCore::ResourceResponse::doPlatformCopyData):
1549         (WebCore::ResourceResponse::doPlatformAdopt):
1550         * platform/network/chromium/ResourceResponse.h:
1551         (WebCore::ResourceResponse::downloadedFile):
1552         (WebCore::ResourceResponse::setDownloadedFile):
1553
1554 2011-05-10  Eric Carlson  <eric.carlson@apple.com>
1555
1556         Reviewed by Darin Adler.
1557
1558         Files that load quickly sometimes won't play.
1559         https://bugs.webkit.org/show_bug.cgi?id=60556
1560         <rdar://problem/9330567>
1561
1562         No new tests, this failure is very difficult to reproduce on some machines. The fix was
1563         verified manually.
1564
1565         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1566         (WebCore::MediaPlayerPrivateAVFoundation::playabilityKnown): Move the call to updateStates
1567             to dispatchNotification so it is more obvious which state changes call it.
1568         (WebCore::MediaPlayerPrivateAVFoundation::setNaturalSize): Correct logging typo.
1569         (WebCore::MediaPlayerPrivateAVFoundation::metadataLoaded): Move updateStates call to 
1570             dispatchNotification.
1571         (WebCore::MediaPlayerPrivateAVFoundation::rateChanged): Ditto.
1572         (WebCore::MediaPlayerPrivateAVFoundation::loadedTimeRangesChanged): Ditto.
1573         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Call updateStates after
1574             processing "size changed" notification so we detect all state changes. Consolidate
1575             calls to updateStates here.
1576
1577         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
1578         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Name the video layer in
1579             a debug build.
1580
1581 2011-05-10  Abhishek Arya  <inferno@chromium.org>
1582
1583         Reviewed by Simon Fraser.
1584
1585         Add containsFloats call to hasOverhangingFloats.
1586         https://bugs.webkit.org/show_bug.cgi?id=60537
1587
1588         Test: fast/block/float/no-overhanging-float-crash.html
1589
1590         * rendering/RenderBlock.cpp:
1591         (WebCore::RenderBlock::repaintOverhangingFloats):
1592         * rendering/RenderBlock.h:
1593         (WebCore::RenderBlock::hasOverhangingFloats):
1594
1595 2011-05-10  Alexis Menard  <alexis.menard@openbossa.org>
1596
1597         Reviewed by Antonio Gomes.
1598
1599         Warning fix on PluginPackage.cpp.
1600         https://bugs.webkit.org/show_bug.cgi?id=60371
1601
1602         Warning fix on conversion from time_t to unsigned on Linux with GCC 4.6.0.
1603         Let's use a struct rather than an array so we can pass everything to StringHasher.
1604
1605         * plugins/PluginPackage.cpp:
1606         (WebCore::PluginPackage::hash):
1607
1608 2011-05-10  Andreas Kling  <andreas.kling@nokia.com>
1609
1610         Rubber-stamped by Csaba Osztrogonác.
1611
1612         [Qt] Disable HAVE_QRAWFONT until Qt API stabilizes.
1613         https://bugs.webkit.org/show_bug.cgi?id=60551
1614
1615         * WebCore.pro: Disable the line that enables HAVE_QRAWFONT
1616         if the feature is found. Added a comment about why.
1617
1618 2011-05-10  Andrey Kosyakov  <caseq@chromium.org>
1619
1620         Reviewed by Sam Weinig.
1621
1622         Web Inspector: inspector/console/console-shadow-dom-access.html crashes on mac debug
1623         https://bugs.webkit.org/show_bug.cgi?id=60266
1624
1625         * bindings/objc/DOM.mm:
1626         (kitClass): return DOMNode class for shadow root node
1627
1628
1629 2011-05-10  Ben Murdoch  <benm@google.com>
1630
1631         Reviewed by Steve Block.
1632
1633         Fix build in WebCore/xml/XSLTProcessorLibxslt.cpp
1634         https://bugs.webkit.org/show_bug.cgi?id=60478
1635
1636         No new tests), build fix only.
1637
1638         * xml/XSLTProcessorLibxslt.cpp: Add CString.h include.
1639
1640 2011-05-10  Keith Kyzivat  <keith.kyzivat@nokia.com>
1641
1642         Reviewed by Kenneth Rohde Christiansen.
1643
1644         [Qt] QtRawFont support should check based on feature, not version
1645         https://bugs.webkit.org/show_bug.cgi?id=60513
1646
1647         Build fix - no tests added.
1648
1649         * WebCore.pro:
1650
1651 2011-05-10  Tony Gentilcore  <tonyg@chromium.org>
1652
1653         Build fix: include ExceptionCode
1654         https://bugs.webkit.org/show_bug.cgi?id=60538
1655
1656         * bindings/js/JSDOMBinding.cpp:
1657
1658 2011-05-06  Tony Gentilcore  <tonyg@chromium.org>
1659
1660         Reviewed by Darin Adler.
1661
1662         Fix some unnecessary includes in headers
1663         https://bugs.webkit.org/show_bug.cgi?id=60388
1664
1665         These were all found using the include-what-you-use clang plugin.
1666
1667         * css/CSSFontFaceSrcValue.h:
1668         * css/CSSImageGeneratorValue.h:
1669         * css/CSSParser.h:
1670         * css/CSSPrimitiveValueCache.cpp:
1671         * css/CSSPrimitiveValueCache.h:
1672         * css/CSSStyleSelector.cpp:
1673         * css/CSSStyleSelector.h:
1674         * css/RGBColor.cpp:
1675         * css/RGBColor.h:
1676         * dom/EventTarget.h:
1677         * dom/ExceptionBase.cpp:
1678         * dom/ExceptionBase.h:
1679         * dom/MessagePort.cpp:
1680         * dom/Range.cpp:
1681         * dom/Range.h:
1682         * dom/SelectElement.cpp:
1683         * dom/SelectElement.h:
1684         * dom/TextEvent.cpp:
1685         * dom/TextEvent.h:
1686         * dom/Touch.cpp:
1687         * dom/Touch.h:
1688         * dom/TouchEvent.cpp:
1689         * dom/TouchEvent.h:
1690         * dom/XMLDocumentParser.h:
1691         * dom/XMLDocumentParserScope.h:
1692         * editing/AppendNodeCommand.cpp:
1693         * editing/ApplyBlockElementCommand.h:
1694         * editing/DeleteFromTextNodeCommand.cpp:
1695         * editing/EditCommand.h:
1696         * editing/Editor.h:
1697         * editing/FormatBlockCommand.h:
1698         * editing/IndentOutdentCommand.h:
1699         * editing/InsertIntoTextNodeCommand.cpp:
1700         * editing/InsertNodeBeforeCommand.cpp:
1701         * editing/ReplaceSelectionCommand.h:
1702         * editing/SetNodeAttributeCommand.h:
1703         * html/HTMLSelectElement.h:
1704         * html/canvas/CanvasRenderingContext2D.cpp:
1705         * loader/appcache/DOMApplicationCache.cpp:
1706         * page/EventSource.cpp:
1707         * rendering/RenderListBox.cpp:
1708         * rendering/RenderMenuList.cpp:
1709         * rendering/RenderTextControlSingleLine.cpp:
1710         * rendering/svg/RenderSVGInlineText.cpp:
1711         * svg/SVGMatrix.h:
1712         * websockets/WebSocket.cpp:
1713         * workers/AbstractWorker.cpp:
1714         * xml/XMLHttpRequest.cpp:
1715         * xml/XPathExpression.cpp:
1716
1717 2011-05-10  MORITA Hajime  <morrita@google.com>
1718
1719         Reviewed by Ryosuke Niwa.
1720
1721         REGRESSION(r73886): Frequent crashes in replaceSelectionWithFragment
1722         https://bugs.webkit.org/show_bug.cgi?id=60090
1723
1724         SpellChecker uses TextCheckerClient, which belongs Page object,
1725         which is possibly destroyed during SpellChecker's lifetime.
1726         This change added to a guard before using TextCheckerClient to
1727         ensure it being live.
1728         
1729         No new tests, this is a speculative fix for a real crash.
1730
1731         * editing/Editor.cpp:
1732         (WebCore::Editor::Editor):
1733         * editing/SpellChecker.cpp:
1734         (WebCore::SpellChecker::SpellChecker):
1735         (WebCore::SpellChecker::client):
1736         (WebCore::SpellChecker::canCheckAsynchronously):
1737         (WebCore::SpellChecker::requestCheckingFor):
1738         * editing/SpellChecker.h:
1739
1740 2011-05-09  Dan Bernstein  <mitz@apple.com>
1741
1742         Try to fix the LLVM Compiler build.
1743
1744         * page/EventHandler.h:
1745
1746 2011-05-09  Daniel Cheng  <dcheng@chromium.org>
1747
1748         Fix the build.
1749
1750         Really add the file this time.
1751
1752         * page/DragState.h: Added.
1753         (WebCore::DragState::DragState):
1754
1755 2011-05-09  Daniel Cheng  <dcheng@chromium.org>
1756
1757         Reviewed by Tony Chang.
1758
1759         Refactor RenderObject::draggableNode.
1760         https://bugs.webkit.org/show_bug.cgi?id=60503
1761
1762         This patch lays the ground for refactoring the drag start logic. It moves draggableNode to
1763         DragController to avoid the awkward plumbing of calling DragController from RenderObject and
1764         also moves EventHandlerDragState out from EventHandler so it can be shared between
1765         EventHandler and DragController where appropriate.
1766
1767         No new tests since there should be no behavior change.
1768
1769         * GNUmakefile.list.am:
1770         * WebCore.gypi:
1771         * WebCore.pro:
1772         * WebCore.vcproj/WebCore.vcproj:
1773         * WebCore.xcodeproj/project.pbxproj:
1774         * page/DragController.cpp:
1775         (WebCore::DragController::draggableNode):
1776         (WebCore::DragController::mayStartDragAtEventLocation):
1777         * page/DragController.h:
1778         * page/DragState.h: Added.
1779         (WebCore::DragState::DragState):
1780         * page/EventHandler.cpp:
1781         (WebCore::EventHandler::dragState):
1782         (WebCore::EventHandler::eventMayStartDrag):
1783         (WebCore::EventHandler::handleDrag):
1784         * page/EventHandler.h:
1785         * rendering/RenderObject.cpp:
1786         * rendering/RenderObject.h:
1787
1788 2011-05-09  Luke Macpherson   <macpherson@chromium.org>
1789
1790         Reviewed by Darin Adler.
1791
1792         Enable casting between CSSPrimitiveValue and FontWeight enum
1793         https://bugs.webkit.org/show_bug.cgi?id=60516
1794
1795         No new tests added as no functionality changed.
1796
1797         * css/CSSPrimitiveValueMappings.h:
1798         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1799         Implement cast from FontWeight to CSSPrimitiveValue.
1800         (WebCore::CSSPrimitiveValue::operator FontWeight):
1801         Implement cast from CSSPrimitiveValue to FontWeight
1802         * css/CSSStyleSelector.cpp:
1803         (WebCore::CSSStyleSelector::applyProperty):
1804         Use new cast to reduce code size.
1805         Flatten switch inside if.
1806
1807 2011-05-09  Simon Fraser  <simon.fraser@apple.com>
1808
1809         Move IconURL.* into the dom grouping.
1810
1811         * WebCore.xcodeproj/project.pbxproj:
1812
1813 2011-05-08  Jeremy Noble  <jer.noble@apple.com>
1814
1815         Reviewed by Dan Bernstein.
1816
1817         Full-screen video disappears behind black screen with scrollbar, followed by crash at jerryseinfeld.com
1818         https://bugs.webkit.org/show_bug.cgi?id=60449
1819
1820         Make RenderFullScreen a non-anonymous block, so that it does not get deleted when a parent attempts to 
1821         coalesce anonymous children.
1822
1823         Test: fullscreen/full-screen-remove-sibling.html
1824
1825         * rendering/RenderObject.h:
1826         (WebCore::RenderObject::isAnonymousBlock):
1827
1828 2011-05-09  Jeremy Noble  <jer.noble@apple.com>
1829
1830         Reviewed by Simon Fraser.
1831
1832         REGRESSION (r84706): Crazy rendering of vimeo.com after exiting fullscreen video
1833         https://bugs.webkit.org/show_bug.cgi?id=60512
1834
1835         Initialize m_containsFullScreenElement.
1836
1837         * html/HTMLFrameElementBase.cpp:
1838         (WebCore::HTMLFrameElementBase::HTMLFrameElementBase):
1839
1840 2011-05-09  Ryosuke Niwa  <rniwa@webkit.org>
1841
1842         Reviewed by Darin Adler.
1843
1844         REGRESSION(r86039): DragCaretController doesn't draw caret
1845         https://bugs.webkit.org/show_bug.cgi?id=60505
1846
1847         Removed an early exit in setCaretPosition introduced by r86039.
1848         Also replaced calls to containerNode by deprecatedNode since rendering code doesn't
1849         support container node for rendering caret.
1850
1851         * editing/FrameSelection.cpp:
1852         (WebCore::DragCaretController::setCaretPosition):
1853
1854 2011-04-29  Martin Robinson  <mrobinson@igalia.com>
1855
1856         Reviewed by Gustavo Noronha Silva.
1857
1858         [GTK] Untangle GtkAdjustments from WebCore
1859         https://bugs.webkit.org/show_bug.cgi?id=59821
1860
1861         Completely remove the ability for WebKit to set GtkAdjustments on ScrollViews
1862         and, consequently, Scrollbars. Handling adjustment updates can now be managed
1863         in WebKit.
1864
1865         No new tests. This is covered by existing Scrollbar tests.
1866
1867         * platform/ScrollView.cpp: platformInit and platformDestroy can now be shared
1868         between ScrollView.cpp and ScrollViewGtk.cpp.
1869         * platform/ScrollView.h: Remove unused methods.
1870         * platform/gtk/MainFrameScrollbarGtk.cpp:
1871         (MainFrameScrollbarGtk::create): No longer need to pass in the adjustment.
1872         (MainFrameScrollbarGtk::MainFrameScrollbarGtk): Update the comments here.
1873         * platform/gtk/MainFrameScrollbarGtk.h: Lots of code removal.
1874         * platform/gtk/ScrollViewGtk.cpp: Ditto.
1875         (WebCore::ScrollView::createScrollbar): Ditto.
1876         (WebCore::ScrollView::setScrollbarModes): Ditto.
1877         * plugins/gtk/PluginViewGtk.cpp: This file needs the GRefPtrGtk.h include now
1878         that it doesn't receive it transitively.
1879
1880 2011-05-09  Adam Barth  <abarth@webkit.org>
1881
1882         Reviewed by Eric Seidel.
1883
1884         CSP should block Function constructor
1885         https://bugs.webkit.org/show_bug.cgi?id=60240
1886
1887         Tests: http/tests/security/contentSecurityPolicy/function-constructor-allowed.html
1888                http/tests/security/contentSecurityPolicy/function-constructor-blocked.html
1889
1890         * bindings/js/JSLazyEventListener.cpp:
1891         (WebCore::JSLazyEventListener::initializeJSFunction):
1892             - Update call site to the new entrypoint.
1893         * bindings/v8/V8LazyEventListener.cpp:
1894         (WebCore::V8LazyEventListener::prepareListenerObject):
1895             - Add some comments about the rediculousness of this implementation.
1896
1897 2011-05-09  Chris Rogers  <crogers@google.com>
1898
1899         Reviewed by Kenneth Russell.
1900
1901         Add RAII-style DenormalDisabler class to disable denormals which hurt audio performance
1902         https://bugs.webkit.org/show_bug.cgi?id=60396
1903
1904         No new tests since audio API is not yet implemented.
1905
1906         * WebCore.gypi:
1907         * WebCore.xcodeproj/project.pbxproj:
1908         * platform/audio/DenormalDisabler.h: Added.
1909         (WebCore::DenormalDisabler::DenormalDisabler):
1910         (WebCore::DenormalDisabler::~DenormalDisabler):
1911         (WebCore::DenormalDisabler::getCSR):
1912         (WebCore::DenormalDisabler::setCSR):
1913         * webaudio/AudioDestinationNode.cpp:
1914         (WebCore::AudioDestinationNode::provideInput):
1915
1916 2011-05-09  Tony Chang  <tony@chromium.org>
1917
1918         Reviewed by Eric Seidel.
1919
1920         Style cleanups in RenderFlexibleBox.cpp
1921         https://bugs.webkit.org/show_bug.cgi?id=60504
1922
1923         No new tests, just refactoring.
1924
1925         * rendering/RenderFlexibleBox.cpp:
1926         (WebCore::FlexBoxIterator::FlexBoxIterator): Use m_ for member variables, and
1927             use class initializer list.
1928         (WebCore::FlexBoxIterator::reset):
1929         (WebCore::FlexBoxIterator::next):
1930         (WebCore::RenderFlexibleBox::RenderFlexibleBox):
1931         (WebCore::marginWidthForChild): Pull out common code used in calc*PrefWidths
1932         (WebCore::RenderFlexibleBox::calcHorizontalPrefWidths):
1933         (WebCore::RenderFlexibleBox::calcVerticalPrefWidths):
1934         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
1935         (WebCore::RenderFlexibleBox::layoutBlock):
1936         (WebCore::gatherFlexChildrenInfo): Rewrite uses of FlexBoxIterator into for statements
1937             rather than while loops.
1938         (WebCore::RenderFlexibleBox::layoutHorizontalBox): ditto
1939         (WebCore::RenderFlexibleBox::layoutVerticalBox): ditto
1940         (WebCore::RenderFlexibleBox::applyLineClamp):
1941         (WebCore::RenderFlexibleBox::allowedChildFlex): Rename variables w/h to width/height.
1942
1943 2011-05-09  Eric Seidel  <eric@webkit.org>
1944
1945         Reviewed by Ryosuke Niwa.
1946
1947         Abstract line deletion code into a function
1948         https://bugs.webkit.org/show_bug.cgi?id=60501
1949
1950         No change in behavior, thus no testing.
1951
1952         * rendering/RenderBlockLineLayout.cpp:
1953         (WebCore::deleteLineRange):
1954         (WebCore::RenderBlock::layoutRunsAndFloats):
1955         (WebCore::RenderBlock::determineStartPosition):
1956         (WebCore::RenderBlock::matchedEndLine):
1957
1958 2011-05-09  Darin Adler  <darin@apple.com>
1959
1960         Cleared some stray executable bits on source files.
1961
1962         * bindings/js/WorkerScriptDebugServer.cpp: Removed property svn:executable.
1963         * bindings/js/WorkerScriptDebugServer.h: Removed property svn:executable.
1964
1965 2011-05-09  Erik Arvidsson  <arv@chromium.org>
1966
1967         Reviewed by Darin Adler.
1968
1969         radiogroup: onchange not detected when triggered by keyboard
1970         https://bugs.webkit.org/show_bug.cgi?id=32013
1971
1972         Test: fast/forms/radio-group-keyboard-change-event.html
1973
1974         * html/RadioInputType.cpp:
1975         (WebCore::RadioInputType::handleKeydownEvent): Ensure that we do not check the radio input before we simulate the click
1976             event. The simulated click event will check it for us but more importantly it will fire the "change" event as
1977             expected.
1978
1979 2011-05-09  Adam Barth  <abarth@webkit.org>
1980
1981         Reviewed by Daniel Bates.
1982
1983         XSSAuditor should be more selective about the <meta http-equivs> that it blocks
1984         https://bugs.webkit.org/show_bug.cgi?id=60489
1985
1986         We don't need to filter most http-equiv attributes.  This patch
1987         introduces a blacklist for two that we probably do want to filter.
1988         It's possible a whitelist would be more appropriate, but I'm inclined
1989         to start with a blacklist and see how it works.
1990
1991         This patch will hopefully fix a false positive that is causing errors
1992         with copy-and-pasted text in Gmail in some configurations (due to using
1993         the <meta> tag to request UTF-8 encoding both in the pasted text and in
1994         the page itself).
1995
1996         * html/parser/XSSFilter.cpp:
1997         (WebCore::isNonCanonicalCharacter):
1998         (WebCore::canonicalize):
1999         (WebCore::isRequiredForInjection):
2000         (WebCore::hasName):
2001         (WebCore::findAttributeWithName):
2002         (WebCore::isNameOfInlineEventHandler):
2003         (WebCore::isDangerousHTTPEquiv):
2004             - This function is new in the patch and includes a blacklist of
2005               dangerous http-equivs.  Many of the other functions listed here
2006               are just being moved from an anonymous namespace to use static
2007               for internal linkage.
2008         (WebCore::containsJavaScriptURL):
2009         (WebCore::decodeURL):
2010         (WebCore::XSSFilter::eraseAttributeIfInjected):
2011
2012 2011-05-05  Matthew Delaney  <mdelaney@apple.com>
2013
2014         Reviewed by Simon Fraser.
2015
2016         Remove canvas usage of roundToDevicePixels
2017         https://bugs.webkit.org/show_bug.cgi?id=60331
2018
2019         No new tests. This could only affect canvases at non-integral scale factors. Our tests only run in 1.0x.
2020
2021         * html/canvas/CanvasRenderingContext2D.cpp:
2022         (WebCore::CanvasRenderingContext2D::drawImage):
2023
2024 2011-05-09  Alexis Menard  <alexis.menard@openbossa.org>
2025
2026         Reviewed by Andreas Kling.
2027
2028         [Qt] Fix the build on Embedded Linux.
2029         https://bugs.webkit.org/show_bug.cgi?id=60347        
2030
2031         qpa is the name for lighthouse but the old name for Qt for Embedded Linux should
2032         still be used in order to build properly.
2033
2034         * WebCore.pri:
2035
2036 2011-05-09  Andreas Kling  <kling@webkit.org>
2037
2038         Reviewed by Kenneth Rohde Christiansen.
2039
2040         [Qt] Simple small-caps text is displayed in uniform size.
2041         https://bugs.webkit.org/show_bug.cgi?id=60492
2042
2043         Covered by existing tests.
2044
2045         * platform/graphics/qt/FontPlatformDataQt.cpp:
2046         (WebCore::FontPlatformData::FontPlatformData): In the FontPlatformData constructor
2047         used by SimpleFontData::scaledFontData(), pass the pixel size to both QFont and QRawFont
2048         to make small caps and emphasis marks have the correct size when rendered through
2049         the fast font path.
2050
2051 2011-05-09  Andreas Kling  <kling@webkit.org>
2052
2053         Reviewed by Tor Arne Vestbø.
2054
2055         [Qt] Remove unused FontPlatformData functions.
2056         https://bugs.webkit.org/show_bug.cgi?id=60485
2057
2058         * platform/graphics/qt/FontPlatformData.h:
2059         (WebCore::FontPlatformData::bold): Removed.
2060         (WebCore::FontPlatformData::family): Removed.
2061         (WebCore::FontPlatformData::italic): Removed.
2062         (WebCore::FontPlatformData::smallCaps): Removed.
2063
2064 2011-05-09  Robin Dunn  <robin@alldunn.com>
2065
2066         Reviewed by Kevin Ollivier.
2067
2068         [wx] Add invalid file handle check.
2069         
2070         https://bugs.webkit.org/show_bug.cgi?id=60483
2071
2072         * platform/wx/FileSystemWx.cpp:
2073         (WebCore::closeFile):
2074
2075 2011-05-09  Robin Dunn  <robin@alldunn.com>
2076
2077         Reviewed by Kevin Ollivier.
2078
2079         [wx] Update the popup menu code to grab the native control and initialize the
2080         event handler properly.
2081         
2082         https://bugs.webkit.org/show_bug.cgi?id=60482
2083
2084         * platform/wx/PopupMenuWx.cpp:
2085         (WebCore::PopupMenuWx::PopupMenuWx):
2086         (WebCore::PopupMenuWx::~PopupMenuWx):
2087         (WebCore::PopupMenuWx::show):
2088
2089 2011-05-09  Robin Dunn  <robin@alldunn.com>
2090
2091         Reviewed by Kevin Ollivier.
2092
2093         [wx] Make sure other controls adjust the rect to handle transforms, and turn off the
2094         adjustment in 2.9.2+ where it is handled internally by wx.
2095         
2096         Also add a couple drawing and focus handling fixes for text fields and menulist controls.
2097         
2098         https://bugs.webkit.org/show_bug.cgi?id=60481
2099
2100         * platform/wx/RenderThemeWx.cpp:
2101         (WebCore::getAdjustedRect):
2102         (WebCore::RenderThemeWx::supportsFocus):
2103         (WebCore::RenderThemeWx::paintButton):
2104         (WebCore::RenderThemeWx::adjustTextFieldStyle):
2105         (WebCore::RenderThemeWx::paintTextField):
2106         (WebCore::RenderThemeWx::adjustMenuListStyle):
2107         (WebCore::RenderThemeWx::paintMenuList):
2108         (WebCore::RenderThemeWx::paintMenuListButton):
2109
2110 2011-05-09  Tony Gentilcore  <tonyg@chromium.org>
2111
2112         Reviewed by Darin Adler.
2113
2114         Style fix: Function names must begin with lowercase letter and should not use "get".
2115         https://bugs.webkit.org/show_bug.cgi?id=60475
2116
2117         * dom/Document.cpp:
2118         (WebCore::Document::webkitVisibilityState):
2119         * page/PageVisibilityState.cpp:
2120         (WebCore::pageVisibilityStateString): Renamed.
2121         * page/PageVisibilityState.h:
2122
2123 2011-05-09  Adam Barth  <abarth@webkit.org>
2124
2125         Reviewed by Tony Gentilcore.
2126
2127         Make Chromium build with strict PassOwnPtr
2128         https://bugs.webkit.org/show_bug.cgi?id=60461
2129
2130         Fix many, many PassOwnPtr nits.
2131
2132         * bindings/v8/V8Proxy.cpp:
2133         (WebCore::V8Proxy::precompileScript):
2134         * bindings/v8/custom/V8DOMWindowCustom.cpp:
2135         (WebCore::WindowSetTimeoutImpl):
2136         * bindings/v8/custom/V8MessageEventCustom.cpp:
2137         (WebCore::V8MessageEvent::initMessageEventCallback):
2138         * bindings/v8/custom/V8WorkerContextCustom.cpp:
2139         (WebCore::SetTimeoutOrInterval):
2140         * dom/Document.cpp:
2141         (WebCore::Document::removedLastRef):
2142         (WebCore::Document::detach):
2143         * fileapi/DOMFileSystem.h:
2144         (WebCore::DOMFileSystem::scheduleCallback):
2145         * fileapi/FileSystemCallbacks.cpp:
2146         (WebCore::FileSystemCallbacks::didOpenFileSystem):
2147         (WebCore::ResolveURICallbacks::didOpenFileSystem):
2148         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2149         (WebCore::GraphicsLayer::create):
2150         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2151         (WebCore::CCLayerImpl::createRenderSurface):
2152         * platform/graphics/gpu/BicubicShader.cpp:
2153         (WebCore::BicubicShader::create):
2154         * platform/graphics/gpu/ConvolutionShader.cpp:
2155         (WebCore::ConvolutionShader::create):
2156         * platform/graphics/gpu/LoopBlinnSolidFillShader.cpp:
2157         (WebCore::LoopBlinnSolidFillShader::create):
2158         * platform/graphics/gpu/SolidFillShader.cpp:
2159         (WebCore::SolidFillShader::create):
2160         * platform/graphics/gpu/TexShader.cpp:
2161         (WebCore::TexShader::create):
2162         * platform/graphics/gpu/Texture.cpp:
2163         (WebCore::Texture::create):
2164         * storage/chromium/DatabaseTrackerChromium.cpp:
2165         (WebCore::TrackerRemoveOpenDatabaseTask::create):
2166         * storage/chromium/SQLTransactionClientChromium.cpp:
2167         (WebCore::NotifyDatabaseChangedTask::create):
2168
2169 2011-05-07  Martin Robinson  <mrobinson@igalia.com>
2170
2171         Reviewed by Daniel Bates.
2172
2173         [Soup] Clean up error handling in ResourceHandleSoup
2174         https://bugs.webkit.org/show_bug.cgi?id=60436
2175
2176         Instead of repeating the ResourceError creation twice, abstract
2177         it into a helper method.
2178
2179         No new tests. This is a code cleanup.
2180
2181         * platform/network/soup/ResourceHandleSoup.cpp:
2182         (WebCore::soupErrorShouldCauseLoadFailure): Added.
2183         (WebCore::convertSoupErrorToResourceError): Added.
2184         (WebCore::sendRequestCallback): Use the new helpers.
2185         (WebCore::readCallback): Ditto.
2186
2187 2011-05-09  Abhishek Arya  <inferno@chromium.org>
2188
2189         Reviewed by Dave Hyatt.
2190
2191         Regression(r85869): Restore dirty line logic in RenderInline::destroy.
2192         https://bugs.webkit.org/show_bug.cgi?id=60448
2193
2194         Test: fast/inline/inline-destroy-dirty-lines-crash.html
2195
2196         * rendering/RenderInline.cpp:
2197         (WebCore::RenderInline::destroy):
2198
2199 2011-05-09  Alejandro G. Castro  <alex@igalia.com>
2200
2201         Reviewed by Martin Robinson.
2202
2203         [GTK] WidgetGtk setFocus can not access directly the widget in WK2
2204         https://bugs.webkit.org/show_bug.cgi?id=60016
2205
2206         Added code to check the situation where we do not have direct
2207         access to the widget. We use the page to grab the focus which
2208         would send a request to the UIProcess in WK2.
2209
2210         * platform/gtk/WidgetGtk.cpp:
2211         (WebCore::Widget::setFocus):
2212
2213 2011-05-09  Leandro Gracia Gil  <leandrogracia@chromium.org>
2214
2215         Reviewed by Tony Gentilcore.
2216
2217         Media Stream API: add exception raising to the getUserMedia method.
2218         https://bugs.webkit.org/show_bug.cgi?id=60387
2219
2220         Perform the required changes to support rising exceptions in the
2221         navigator.getUserMedia method. This is required by the latest changes in the spec:
2222         http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#dom-navigator-getusermedia
2223
2224         Test: fast/dom/MediaStream/argument-types.html
2225
2226         * bindings/js/JSNavigatorCustom.cpp:
2227         (WebCore::JSNavigator::webkitGetUserMedia):
2228         * bindings/v8/custom/V8NavigatorCustom.cpp:
2229         (WebCore::V8Navigator::webkitGetUserMediaCallback):
2230         * page/Navigator.cpp:
2231         (WebCore::Navigator::webkitGetUserMedia):
2232         * page/Navigator.h:
2233         * page/Navigator.idl:
2234
2235 2011-05-09  Csaba Osztrogonác  <ossy@webkit.org>
2236
2237         Unreviewed Qt 4.8 fix.
2238
2239         * WebCore.pro: 4.8 bots are updated with the full QRawFont APIs, so we can set HAVE_QRAWFONT now.
2240
2241 2011-05-09  Adam Roben  <aroben@apple.com>
2242
2243         Windows project file fix after r86047
2244
2245         * WebCore.vcproj/WebCore.vcproj: Added missing closing tags.
2246
2247 2011-05-06  Chris Marrin  <cmarrin@apple.com>
2248
2249         Reviewed by Darin Adler.
2250
2251         Fix layer names to say "tiled" and show CALayer addresses, not PlatformCALayer addresses
2252         https://bugs.webkit.org/show_bug.cgi?id=60417
2253
2254         Layer name now has "Tiled" prepended if it is a TiledLayer. This is true on Mac where
2255         the layer is a CATiledLayer and on Win where the layer is actually still a CACFLayer
2256         but implements a tiled layer. I also now print the address of the CALayer or CACFLayer
2257         instead of the PlatformCALayer everywhere.
2258
2259         * platform/graphics/ca/GraphicsLayerCA.cpp:
2260         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
2261
2262 2011-05-09  Rob Buis  <rbuis@rim.com>
2263
2264         Reviewed by Dirk Schulze.
2265
2266         Elements should assert that the QualifiedName given to their constructor corresponds to the Element constructed
2267         https://bugs.webkit.org/show_bug.cgi?id=22576
2268
2269         Add tag name ASSERTs in SVG Element constructors.
2270
2271         No new tests, since no change in behaviour.
2272
2273         * svg/SVGAElement.cpp:
2274         (WebCore::SVGAElement::SVGAElement):
2275         * svg/SVGAltGlyphElement.cpp:
2276         (WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
2277         * svg/SVGAnimateColorElement.cpp:
2278         (WebCore::SVGAnimateColorElement::SVGAnimateColorElement):
2279         * svg/SVGAnimateElement.cpp:
2280         (WebCore::SVGAnimateElement::SVGAnimateElement):
2281         * svg/SVGAnimateMotionElement.cpp:
2282         (WebCore::SVGAnimateMotionElement::SVGAnimateMotionElement):
2283         * svg/SVGAnimateTransformElement.cpp:
2284         (WebCore::SVGAnimateTransformElement::SVGAnimateTransformElement):
2285         * svg/SVGCircleElement.cpp:
2286         (WebCore::SVGCircleElement::SVGCircleElement):
2287         * svg/SVGClipPathElement.cpp:
2288         (WebCore::SVGClipPathElement::SVGClipPathElement):
2289         * svg/SVGCursorElement.cpp:
2290         (WebCore::SVGCursorElement::SVGCursorElement):
2291         * svg/SVGDefsElement.cpp:
2292         (WebCore::SVGDefsElement::SVGDefsElement):
2293         * svg/SVGDescElement.cpp:
2294         (WebCore::SVGDescElement::SVGDescElement):
2295         * svg/SVGEllipseElement.cpp:
2296         (WebCore::SVGEllipseElement::SVGEllipseElement):
2297         * svg/SVGFEBlendElement.cpp:
2298         (WebCore::SVGFEBlendElement::SVGFEBlendElement):
2299         * svg/SVGFEColorMatrixElement.cpp:
2300         (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
2301         * svg/SVGFEComponentTransferElement.cpp:
2302         (WebCore::SVGFEComponentTransferElement::SVGFEComponentTransferElement):
2303         * svg/SVGFECompositeElement.cpp:
2304         (WebCore::SVGFECompositeElement::SVGFECompositeElement):
2305         * svg/SVGFEConvolveMatrixElement.cpp:
2306         (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
2307         * svg/SVGFEDiffuseLightingElement.cpp:
2308         (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
2309         * svg/SVGFEDisplacementMapElement.cpp:
2310         (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
2311         * svg/SVGFEDistantLightElement.cpp:
2312         (WebCore::SVGFEDistantLightElement::SVGFEDistantLightElement):
2313         * svg/SVGFEDropShadowElement.cpp:
2314         (WebCore::SVGFEDropShadowElement::SVGFEDropShadowElement):
2315         * svg/SVGFEFloodElement.cpp:
2316         (WebCore::SVGFEFloodElement::SVGFEFloodElement):
2317         * svg/SVGFEFuncAElement.cpp:
2318         (WebCore::SVGFEFuncAElement::SVGFEFuncAElement):
2319         * svg/SVGFEFuncBElement.cpp:
2320         (WebCore::SVGFEFuncBElement::SVGFEFuncBElement):
2321         * svg/SVGFEFuncGElement.cpp:
2322         (WebCore::SVGFEFuncGElement::SVGFEFuncGElement):
2323         * svg/SVGFEFuncRElement.cpp:
2324         (WebCore::SVGFEFuncRElement::SVGFEFuncRElement):
2325         * svg/SVGFEGaussianBlurElement.cpp:
2326         (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
2327         * svg/SVGFEImageElement.cpp:
2328         (WebCore::SVGFEImageElement::SVGFEImageElement):
2329         * svg/SVGFEMergeElement.cpp:
2330         (WebCore::SVGFEMergeElement::SVGFEMergeElement):
2331         * svg/SVGFEMergeNodeElement.cpp:
2332         (WebCore::SVGFEMergeNodeElement::SVGFEMergeNodeElement):
2333         * svg/SVGFEMorphologyElement.cpp:
2334         (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
2335         * svg/SVGFEOffsetElement.cpp:
2336         (WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
2337         * svg/SVGFEPointLightElement.cpp:
2338         (WebCore::SVGFEPointLightElement::SVGFEPointLightElement):
2339         * svg/SVGFESpecularLightingElement.cpp:
2340         (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
2341         * svg/SVGFESpotLightElement.cpp:
2342         (WebCore::SVGFESpotLightElement::SVGFESpotLightElement):
2343         * svg/SVGFETileElement.cpp:
2344         (WebCore::SVGFETileElement::SVGFETileElement):
2345         * svg/SVGFETurbulenceElement.cpp:
2346         (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
2347         * svg/SVGFilterElement.cpp:
2348         (WebCore::SVGFilterElement::SVGFilterElement):
2349         * svg/SVGFontElement.cpp:
2350         (WebCore::SVGFontElement::SVGFontElement):
2351         * svg/SVGFontFaceElement.cpp:
2352         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
2353         * svg/SVGFontFaceFormatElement.cpp:
2354         (WebCore::SVGFontFaceFormatElement::SVGFontFaceFormatElement):
2355         * svg/SVGFontFaceNameElement.cpp:
2356         (WebCore::SVGFontFaceNameElement::SVGFontFaceNameElement):
2357         * svg/SVGFontFaceSrcElement.cpp:
2358         (WebCore::SVGFontFaceSrcElement::SVGFontFaceSrcElement):
2359         * svg/SVGFontFaceUriElement.cpp:
2360         (WebCore::SVGFontFaceUriElement::SVGFontFaceUriElement):
2361         * svg/SVGForeignObjectElement.cpp:
2362         (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
2363         * svg/SVGGElement.cpp:
2364         (WebCore::SVGGElement::SVGGElement):
2365         * svg/SVGGlyphElement.cpp:
2366         (WebCore::SVGGlyphElement::SVGGlyphElement):
2367         * svg/SVGHKernElement.cpp:
2368         (WebCore::SVGHKernElement::SVGHKernElement):
2369         * svg/SVGImageElement.cpp:
2370         (WebCore::SVGImageElement::SVGImageElement):
2371         * svg/SVGLineElement.cpp:
2372         (WebCore::SVGLineElement::SVGLineElement):
2373         * svg/SVGLinearGradientElement.cpp:
2374         (WebCore::SVGLinearGradientElement::SVGLinearGradientElement):
2375         * svg/SVGMPathElement.cpp:
2376         (WebCore::SVGMPathElement::SVGMPathElement):
2377         * svg/SVGMarkerElement.cpp:
2378         (WebCore::SVGMarkerElement::SVGMarkerElement):
2379         * svg/SVGMaskElement.cpp:
2380         (WebCore::SVGMaskElement::SVGMaskElement):
2381         * svg/SVGMetadataElement.cpp:
2382         (WebCore::SVGMetadataElement::SVGMetadataElement):
2383         * svg/SVGMissingGlyphElement.cpp:
2384         (WebCore::SVGMissingGlyphElement::SVGMissingGlyphElement):
2385         * svg/SVGPathElement.cpp:
2386         (WebCore::SVGPathElement::SVGPathElement):
2387         * svg/SVGPatternElement.cpp:
2388         (WebCore::SVGPatternElement::SVGPatternElement):
2389         * svg/SVGPolygonElement.cpp:
2390         (WebCore::SVGPolygonElement::SVGPolygonElement):
2391         * svg/SVGPolylineElement.cpp:
2392         (WebCore::SVGPolylineElement::SVGPolylineElement):
2393         * svg/SVGRadialGradientElement.cpp:
2394         (WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
2395         * svg/SVGRectElement.cpp:
2396         (WebCore::SVGRectElement::SVGRectElement):
2397         * svg/SVGSVGElement.cpp:
2398         (WebCore::SVGSVGElement::SVGSVGElement):
2399         * svg/SVGScriptElement.cpp:
2400         (WebCore::SVGScriptElement::SVGScriptElement):
2401         * svg/SVGSetElement.cpp:
2402         (WebCore::SVGSetElement::SVGSetElement):
2403         * svg/SVGStopElement.cpp:
2404         (WebCore::SVGStopElement::SVGStopElement):
2405         * svg/SVGStyleElement.cpp:
2406         (WebCore::SVGStyleElement::SVGStyleElement):
2407         * svg/SVGSwitchElement.cpp:
2408         (WebCore::SVGSwitchElement::SVGSwitchElement):
2409         * svg/SVGSymbolElement.cpp:
2410         (WebCore::SVGSymbolElement::SVGSymbolElement):
2411         * svg/SVGTRefElement.cpp:
2412         (WebCore::SVGTRefElement::SVGTRefElement):
2413         * svg/SVGTSpanElement.cpp:
2414         (WebCore::SVGTSpanElement::SVGTSpanElement):
2415         * svg/SVGTextElement.cpp:
2416         (WebCore::SVGTextElement::SVGTextElement):
2417         * svg/SVGTextPathElement.cpp:
2418         (WebCore::SVGTextPathElement::SVGTextPathElement):
2419         * svg/SVGTitleElement.cpp:
2420         (WebCore::SVGTitleElement::SVGTitleElement):
2421         * svg/SVGUseElement.cpp:
2422         (WebCore::SVGUseElement::SVGUseElement):
2423         * svg/SVGVKernElement.cpp:
2424         (WebCore::SVGVKernElement::SVGVKernElement):
2425         * svg/SVGViewElement.cpp:
2426         (WebCore::SVGViewElement::SVGViewElement):
2427
2428 2011-05-09  Shishir Agrawal  <shishir@chromium.org>
2429
2430         Reviewed by Tony Gentilcore.
2431
2432         Implement Page Visibility API.
2433         https://bugs.webkit.org/show_bug.cgi?id=54181
2434
2435         Tests: fast/events/page-visibility-iframe-delete-test.html
2436                fast/events/page-visibility-iframe-move-test.html
2437                fast/events/page-visibility-iframe-propagation-test.html
2438                fast/events/page-visibility-transition-test.html
2439
2440         * CMakeLists.txt:
2441         * GNUmakefile.list.am:
2442         * WebCore.gypi:
2443         * WebCore.pro:
2444         * WebCore.vcproj/WebCore.vcproj:
2445         * WebCore.xcodeproj/project.pbxproj:
2446         * dom/Document.cpp:
2447         (WebCore::Document::visibilityState):
2448         (WebCore::Document::webkitVisibilityState):
2449         (WebCore::Document::webkitIsVisible):
2450         (WebCore::Document::dispatchVisibilityStateChangeEvent):
2451         * dom/Document.h:
2452         * dom/Document.idl:
2453         * dom/EventNames.h:
2454         * page/Frame.cpp:
2455         (WebCore::Frame::dispatchVisibilityStateChangeEvent):
2456         * page/Frame.h:
2457         * page/Page.cpp:
2458         (WebCore::Page::Page):
2459         (WebCore::Page::setVisibilityState):
2460         (WebCore::Page::visibilityState):
2461         * page/Page.h:
2462         * page/PageVisibilityState.cpp: Added.
2463         (WebCore::GetPageVisibilityStateString):
2464         * page/PageVisibilityState.h: Added.
2465
2466 2011-05-09  Luke Macpherson   <macpherson@chromium.org>
2467
2468         Reviewed by Eric Seidel.
2469
2470         Implement expanding CSS border properties in CSSStyleApplyProperty.
2471         https://bugs.webkit.org/show_bug.cgi?id=60456
2472
2473         No new tests added as no functionality changed.
2474
2475         * css/CSSStyleApplyProperty.cpp:
2476         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
2477         Create CSS border expanding property handlers.
2478         * css/CSSStyleSelector.cpp:
2479         (WebCore::CSSStyleSelector::applyProperty):
2480         Remove property handlers that are no longer needed.
2481
2482 2011-05-08  Ryosuke Niwa  <rniwa@webkit.org>
2483
2484         Reviewed by Kent Tamura.
2485
2486         selectstart event does not fire when selection is made via select all
2487         https://bugs.webkit.org/show_bug.cgi?id=60376
2488
2489         Fire selectstart event when a user selects all contents (i.e. document.execCommand('SelectAll')) in
2490         document, editable region, or text control.
2491
2492         Tests: editing/selection/selectstart-on-selectall.html
2493                editing/selection/selectstart-prevent-selectall.html
2494
2495         * dom/Node.h: Removed canSelectAll and selectAll as they are left over from WMLSelectElement.
2496         * editing/FrameSelection.cpp:
2497         (WebCore::FrameSelection::selectAll): Dispatch selectstart event on selectStartTarget, which is
2498         input element or textarea element when the current selection is inside a shadow DOM, and the root
2499         editable element if it's inside a non-shadow editable region, and the body element otherwise.
2500         * html/HTMLSelectElement.h: Made canSelectAll and selectAll public since they are no longer
2501         declared in Node.
2502
2503 2011-05-08  Luke Macpherson   <macpherson@chromium.org>
2504
2505         Reviewed by Eric Seidel.
2506
2507         Make RenderStyle::setColumnBreakInside() reject unsupported enum values.
2508         https://bugs.webkit.org/show_bug.cgi?id=60249
2509
2510         No new tests added as no functionality changed.
2511
2512         * css/CSSStyleSelector.cpp:
2513         (WebCore::CSSStyleSelector::applyProperty):
2514         Remove special-case code and use appropriate macro.
2515         * rendering/style/RenderStyle.h:
2516         (WebCore::InheritedFlags::setColumnBreakInside):
2517         Assert that supported values are used.
2518
2519 2011-05-08  Ryosuke Niwa  <rniwa@webkit.org>
2520
2521         Reviewed by Darin Adler.
2522
2523         Extract a DragCaretController from FrameSelection
2524         https://bugs.webkit.org/show_bug.cgi?id=60273
2525
2526         Extracted CaretBase and DragCaretController from FrameSelection. CaretBase is a base class for
2527         DragCaretController and FrameSelection and provides functions to paint caret.
2528
2529         Since DragCaretController doesn't need to store selection, it only holds one VisiblePosition.
2530
2531         * WebCore.exp.in:
2532         * editing/FrameSelection.cpp:
2533         (WebCore::CaretBase::CaretBase): Added.
2534         (WebCore::DragCaretController::DragCaretController): Added; Set m_caretVisible true.
2535         (WebCore::DragCaretController::isContentRichlyEditable): Added.
2536         (WebCore::FrameSelection::FrameSelection): Several member variables are move to CaretBase.
2537         (WebCore::DragCaretController::setCaretPosition): Extracted from FrameSelection::setSelection.
2538         (WebCore::FrameSelection::setSelection): Removed an early exit for DragCaretController.
2539         (WebCore::clearRenderViewSelection): Extracted from FrameSelection::respondToNodeModification.
2540         (WebCore::DragCaretController::nodeWillBeRemoved): Extracted from FrameSelection::nodeWillBeRemoved
2541         and respondToNodeModification. Note that the position DragCaretController holds is equivalent to
2542         FrameSelection's base or start so when removingNodeRemovesPosition returns true for m_position,
2543         we used to execute the first if clause and cleared render tree selection and DOM tree selection.
2544         This is exactly what new DragCaretController::nodeWillBeRemoved does.
2545         (WebCore::FrameSelection::nodeWillBeRemoved): Simplified early exist conditions.
2546         (WebCore::FrameSelection::respondToNodeModification): Calls clearRenderViewSelection.
2547         (WebCore::CaretBase::updateCaretRect): Takes document, caretPosition, selection type, and boolean isOrphaned.
2548         Note that we can't obtain the document from caretPosition because VisiblePosition can be null even if
2549         FrameSelection's start was not null.
2550         (WebCore::caretRendersInsideNode): Moved; Made static local.
2551         (WebCore::CaretBase::caretRenderer): Extracted from FrameSelection::caretRenderer.
2552         (WebCore::FrameSelection::caretRenderer): Calls CaretBase::caretRenderer.
2553         (WebCore::DragCaretController::caretRenderer): Ditto.
2554         (WebCore::FrameSelection::localCaretRect): Calls updateCaretRect with extra arguments.
2555         (WebCore::CaretBase::absoluteBoundsForLocalRect): Moved from FrameSelection; Takes Node*.
2556         (WebCore::CaretBase::caretRepaintRect): Ditto.
2557         (WebCore::FrameSelection::recomputeCaretRect): Calls absoluteBoundsForLocalRect, caretRepaintRect,
2558         and shouldRepaintCaret with extra arguments.
2559         (WebCore::CaretBase::shouldRepaintCaret): Takes a boolean isContentEditable.
2560         (WebCore::FrameSelection::invalidateCaretRect): Calls CaretBase::invalidateCaretRect.
2561         (WebCore::CaretBase::invalidateCaretRect): Extracted from FrameSelection::invalidateCaretRect.
2562         (WebCore::FrameSelection::paintCaret): Calls CaretBase::paintCaret.
2563         (WebCore::CaretBase::paintCaret): Extracted from FrameSelection::paintCaret.
2564         (WebCore::FrameSelection::updateAppearance): Removed an assertion that this function is never called for
2565         DragCaretController.
2566         (WebCore::DragCaretController::paintDragCaret): Moved from FrameSelection::paintDragCaret.
2567         * editing/FrameSelection.h:
2568         (WebCore::CaretBase::localCaretRectForPainting): Added.
2569         (WebCore::DragCaretController::isContentEditable): Added.
2570         (WebCore::DragCaretController::hasCaret): Added.
2571         (WebCore::DragCaretController::caretPosition): Added.
2572         (WebCore::DragCaretController::clear): Added.
2573         * page/DragController.cpp:
2574         (WebCore::DragController::tryDocumentDrag): Uses DragCaretController.
2575         (WebCore::DragController::dispatchTextInputEventFor): Ditto.
2576         (WebCore::DragController::concludeEditDrag): Ditto.
2577         (WebCore::DragController::placeDragCaret): Ditto.
2578         * page/Page.cpp:
2579         (WebCore::Page::Page): Instantiates DragCaretController instead of FrameSelection.
2580         * page/Page.h:
2581         (WebCore::Page::dragCaretController): Returns DragCaretController* instead of FrameSelection*.
2582         * rendering/RenderBlock.cpp:
2583         (WebCore::RenderBlock::paintCaret): Uses FrameSelection and DragCaretController.
2584
2585 2011-05-08  Dan Bernstein  <mitz@apple.com>
2586
2587         Reviewed by Darin Adler.
2588
2589         <rdar://problem/9401853> REGRESSION (r78846): Insufficient expansion for justification when there are multiple inline boxes
2590         https://bugs.webkit.org/show_bug.cgi?id=60432
2591
2592         * rendering/InlineTextBox.h:
2593         (WebCore::InlineTextBox::setExpansion): Changed back to take a int, since the m_expansion member
2594         variable is a (truncated) int anyway.
2595         * rendering/RenderBlockLineLayout.cpp:
2596         (WebCore::computeExpansionForJustifiedText): Changed the expansion local variable into an int
2597         so that the right amount is added to the total width. Also changed to use an early return.
2598
2599 2011-05-08  Pavel Feldman  <pfeldman@chromium.org>
2600
2601         Not reviewed: ignore 0 responses in the inspector network instrumentation.
2602
2603         * inspector/front-end/NetworkManager.js:
2604
2605 2011-05-08  Jarkko Sakkinen  <jarkko.j.sakkinen@gmail.com>
2606
2607         Reviewed by Kenneth Rohde Christiansen.
2608
2609         [Qt] GraphicsContext3D::getImageData() does not retrieve image data correctly
2610         https://bugs.webkit.org/show_bug.cgi?id=58556
2611
2612         Tests: fast/canvas/webgl/gl-teximage.html
2613
2614         * platform/graphics/qt/GraphicsContext3DQt.cpp:
2615         (WebCore::GraphicsContext3D::getImageData):
2616
2617 2011-05-07  Dan Bernstein  <mitz@apple.com>
2618
2619         Reviewed by Maciej Stachowiak.
2620
2621         <rdar://problem/9403055> REGRESSION (r85499): Inline images in iChat overflow their chat bubbles
2622         https://bugs.webkit.org/show_bug.cgi?id=60443
2623
2624         Test: fast/replaced/table-percent-height-positioned.html
2625
2626         * rendering/RenderBox.cpp:
2627         (WebCore::RenderBox::computeReplacedLogicalHeightUsing): Do not apply the logic to prevent precent-height
2628         replaced elements from being squeezed by table cells when the replaced element is positioned (and thus
2629         doesn’t affect the table cell’s height).
2630
2631 2011-05-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2632
2633         Unreviewed, rolling out r86016.
2634         http://trac.webkit.org/changeset/86016
2635         https://bugs.webkit.org/show_bug.cgi?id=60445
2636
2637         caused crashes on the WK2 Windows bots (Requested by
2638         jessieberlin on #webkit).
2639
2640         * platform/network/ResourceHandle.h:
2641         * platform/network/cf/CookieStorageCFNet.cpp:
2642         (WebCore::currentCookieStorage):
2643         (WebCore::defaultCookieStorage):
2644         * platform/network/cf/ResourceHandleCFNet.cpp:
2645         (WebCore::willSendRequest):
2646         (WebCore::makeFinalRequest):
2647         (WebCore::ResourceHandle::willSendRequest):
2648         * platform/network/cf/ResourceRequestCFNet.cpp:
2649         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2650
2651 2011-05-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2652
2653         Unreviewed, rolling out r85974.
2654         http://trac.webkit.org/changeset/85974
2655         https://bugs.webkit.org/show_bug.cgi?id=60444
2656
2657         broke browser tests (Requested by inferno-sec on #webkit).
2658
2659         * platform/network/chromium/ResourceResponse.cpp:
2660         (WebCore::ResourceResponse::doPlatformCopyData):
2661         (WebCore::ResourceResponse::doPlatformAdopt):
2662         * platform/network/chromium/ResourceResponse.h:
2663         (WebCore::ResourceResponse::downloadFilePath):
2664         (WebCore::ResourceResponse::setDownloadFilePath):
2665
2666 2011-05-07  Jessie Berlin  <jberlin@apple.com>
2667
2668         Reviewed by Steve Falkenburg.
2669
2670         [Windows WebKit2] Use cookies set in WebKit1
2671         https://bugs.webkit.org/show_bug.cgi?id=60274
2672
2673         Share the default storage session between the UI and Web Processes.
2674
2675         * platform/network/cf/CookieStorageCFNet.cpp:
2676         (WebCore::defaultSessionCookieStorage):
2677         Keep track of the default storage session cookie storage.
2678         (WebCore::currentCookieStorage):
2679         Call defaultCookieStorage to get the default cookie storage.
2680         (WebCore::defaultCookieStorage):
2681         If there is a default storage session cookie storage, prefer that over getting the default
2682         cookie storage. In the Web Process, asking CFNetwork for the default cookie storage directly
2683         without specifying a storage session will not get the cookie storage being shared by the UI
2684         and Web Processes.
2685
2686         * platform/network/ResourceHandle.h:
2687         * platform/network/cf/ResourceHandleCFNet.cpp:
2688         (WebCore::willSendRequest):
2689         Make sure to set the current storage session on any requests used by the Web
2690         Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
2691         doing anything with the Web Process's default storage session (which is not the one shared
2692         with the UI Process).
2693         (WebCore::makeFinalRequest):
2694         Ditto.
2695         (WebCore::ResourceHandle::willSendRequest):
2696         Ditto.
2697         (WebCore::ResourceHandle::currentStorageSession):
2698         If there is a Private Browsing storage session, return that.
2699         If not, on Windows return the default storage session that is being shared with the UI
2700         Process and on Mac return 0.
2701         (WebCore::defaultCFURLStorageSession):
2702         (WebCore::ResourceHandle::setDefaultStorageSession):
2703         (WebCore::ResourceHandle::defaultStorageSession):
2704
2705         * platform/network/cf/ResourceRequestCFNet.cpp:
2706         (WebCore::ResourceRequest::doUpdatePlatformRequest):
2707         Make sure to set the current storage session on any requests used by the Web
2708         Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
2709         doing anything with the Web Process's default storage session (which is not the one shared
2710         with the UI Process).
2711
2712 2011-05-07  Joe Mason  <jmason@rim.com>
2713
2714         Reviewed by Daniel Bates.
2715
2716         FrameLoader::isProcessingUserGesture is wrong in dispatchWillPerformClientRedirect
2717         https://bugs.webkit.org/show_bug.cgi?id=52211
2718
2719         Create a UserGestureIndicator when calling the clientRedirected callback.
2720
2721         * loader/NavigationScheduler.cpp:
2722         (WebCore::ScheduledURLNavigation::didStartTimer):
2723         (WebCore::ScheduledURLNavigation::didStopTimer):
2724         (WebCore::ScheduledFormSubmission::didStartTimer):
2725         (WebCore::ScheduledFormSubmission::didStopTimer):
2726
2727 2011-05-06  Jon Lee  <jonlee@apple.com>
2728
2729         Reviewed by Alice Liu.
2730
2731         Crash when sending a wheel event to a node with no shadow ancestor node
2732         https://bugs.webkit.org/show_bug.cgi?id=60429
2733         <rdar://problem/9389619>
2734
2735         * page/EventHandler.cpp:
2736         (WebCore::EventHandler::handleWheelEvent):add check to see if the shadow ancestor node of the node that was under the mouse exists before trying to dispatch the wheel event to it.
2737
2738 2011-05-06  Kent Tamura  <tkent@chromium.org>
2739
2740         Reviewed by Ryosuke Niwa.
2741
2742         Eliminate WebCore/dom/InputElement.{cpp,h}
2743         https://bugs.webkit.org/show_bug.cgi?id=60262
2744
2745         - Fold in all of the code of InputElement.{cpp,h} into HTMLInputElement
2746           and TextFieldInputType.
2747         - Change the return type of Node::toInputElement():
2748           InputElement* -> HTMLInputElement*
2749
2750         No new tests. This change should not change the existing behaviour.
2751
2752         * CMakeLists.txt: Remove InpuntElement.cpp and/or InputElement.h.
2753         * GNUmakefile.list.am: ditto.
2754         * WebCore.exp.in: Add symbols of functions exposed to WebKit.
2755         * WebCore.gypi: Remove InpuntElement.cpp and/or InputElement.h.
2756         * WebCore.pro: ditto.
2757         * WebCore.vcproj/WebCore.vcproj: ditto.
2758         * WebCore.xcodeproj/project.pbxproj: ditto.
2759         * accessibility/AXObjectCache.cpp:
2760         (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
2761           Follow the return type change of Node::toInputElement().
2762         * accessibility/AccessibilityRenderObject.cpp:
2763         (WebCore::AccessibilityRenderObject::isPasswordField): ditto.
2764         (WebCore::AccessibilityRenderObject::isIndeterminate): ditto.
2765         (WebCore::AccessibilityRenderObject::isNativeCheckboxOrRadio): ditto.
2766         (WebCore::AccessibilityRenderObject::isChecked): ditto.
2767         * css/CSSStyleSelector.cpp:
2768         (WebCore::CSSStyleSelector::canShareStyleWithElement): ditto.
2769         (WebCore::CSSStyleSelector::SelectorChecker::checkOneSelector): ditto.
2770         * dom/CheckedRadioButtons.cpp:
2771         (WebCore::CheckedRadioButtons::removeButton): ditto.
2772         * dom/DOMAllInOne.cpp: Remove InputElement.h.
2773         * dom/InputElement.cpp: Removed.
2774         * dom/InputElement.h: Removed.
2775         * dom/Node.cpp:
2776         (WebCore::Node::toInputElement):
2777           Change the return type from InputElement* to HTMLInputElement*.
2778         * dom/Node.h: ditto.
2779         * html/HTMLInputElement.cpp:
2780         (WebCore::HTMLInputElement::HTMLInputElement):
2781         (WebCore::HTMLInputElement::formControlName):
2782         (WebCore::HTMLInputElement::tooLong):
2783         (WebCore::HTMLInputElement::updateFocusAppearance):
2784         (WebCore::HTMLInputElement::aboutToUnload):
2785         (WebCore::HTMLInputElement::handleFocusEvent):
2786         (WebCore::HTMLInputElement::handleBlurEvent):
2787         (WebCore::HTMLInputElement::updateType):
2788         (WebCore::HTMLInputElement::parseMappedAttribute):
2789         (WebCore::HTMLInputElement::size):
2790         (WebCore::HTMLInputElement::copyNonAttributeProperties):
2791         (WebCore::HTMLInputElement::value):
2792         (WebCore::HTMLInputElement::suggestedValue):
2793         (WebCore::HTMLInputElement::setSuggestedValue):
2794         (WebCore::HTMLInputElement::setValue):
2795         (WebCore::HTMLInputElement::setValueFromRenderer):
2796         (WebCore::HTMLInputElement::setFileListFromRenderer):
2797         (WebCore::HTMLInputElement::setDefaultName):
2798         (WebCore::HTMLInputElement::maxLength):
2799         (WebCore::HTMLInputElement::cacheSelection):
2800         (WebCore::formatCodes): Moved from InputElement.
2801         (WebCore::cursorPositionToMaskIndex): ditto.
2802         (WebCore::HTMLInputElement::isConformToInputMask): ditto.
2803         (WebCore::HTMLInputElement::validateInputMask): ditto.
2804         (WebCore::HTMLInputElement::setWapInputFormat): ditto.
2805         (WebCore::HTMLInputElement::notifyFormStateChanged): ditto.
2806         (WebCore::HTMLInputElement::parseMaxLengthAttribute): ditto.
2807         (WebCore::HTMLInputElement::updateValueIfNeeded):ditto.
2808         * html/HTMLInputElement.h:
2809           - Add data members which were defined in InputElementData.
2810           - Make some functions public because the public interface InputElement is removed.
2811           - Make some functions non-virtual because they don't override
2812             corresponding virtual functions of InputElement anymore.
2813         (WebCore::HTMLInputElement::toInputElement):
2814           Follow the return type change of Node::toInputElement().
2815         (WebCore::HTMLInputElement::isIndeterminate):
2816         (WebCore::HTMLInputElement::isAutofilled):
2817         (WebCore::HTMLInputElement::supportsMaxLength):
2818         (WebCore::HTMLInputElement::cachedSelectionStart):
2819         (WebCore::HTMLInputElement::cachedSelectionEnd):
2820         * html/HTMLTextAreaElement.cpp: Remove unused InputElement.h.
2821         * html/InputType.cpp:
2822         (WebCore::InputType::handleBeforeTextInsertedEvent): Remove the code.
2823         * html/InputType.h: Update for the above.
2824         * html/TextFieldInputType.cpp:
2825         (WebCore::replaceEOLAndLimitLength): Moved from InputElement.cpp.
2826         (WebCore::TextFieldInputType::sanitizeValue): Implement with replaceEOLAndLimitLength().
2827         (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
2828           Move the code from InputElement::handleBeforeTextInsertedEvent().
2829         * html/TextFieldInputType.h: Update declarations.
2830         * rendering/RenderTextControlSingleLine.cpp:
2831           - Remove ASSERT(node()->isHTMLElement()) because it is checked in the constructor.
2832           - Follow the return type change of inputElement().
2833         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
2834           Make sure node() is an HTMLInputElement instance.
2835         (WebCore::RenderTextControlSingleLine::addSearchResult):
2836         (WebCore::RenderTextControlSingleLine::stopSearchEventTimer):
2837         (WebCore::RenderTextControlSingleLine::showPopup):
2838         (WebCore::RenderTextControlSingleLine::hidePopup):
2839         (WebCore::RenderTextControlSingleLine::subtreeHasChanged):
2840         (WebCore::RenderTextControlSingleLine::updateFromElement):
2841         (WebCore::RenderTextControlSingleLine::createInnerBlockStyle):
2842         (WebCore::RenderTextControlSingleLine::createResultsButtonStyle):
2843         (WebCore::RenderTextControlSingleLine::createCancelButtonStyle):
2844         (WebCore::RenderTextControlSingleLine::createInnerSpinButtonStyle):
2845         (WebCore::RenderTextControlSingleLine::createOuterSpinButtonStyle):
2846         (WebCore::RenderTextControlSingleLine::createSpeechButtonStyle):
2847         (WebCore::RenderTextControlSingleLine::visibilityForCancelButton):
2848         (WebCore::RenderTextControlSingleLine::startSearchEventTimer):
2849         (WebCore::RenderTextControlSingleLine::searchEventTimerFired):
2850         (WebCore::RenderTextControlSingleLine::valueChanged):
2851         (WebCore::RenderTextControlSingleLine::setTextFromItem):
2852         (WebCore::RenderTextControlSingleLine::inputElement):
2853         * rendering/RenderTextControlSingleLine.h:
2854           Change the return type of inputElement(): InputElement* -> HTMLInputElement*.
2855         * rendering/RenderTheme.cpp:
2856         (WebCore::RenderTheme::isChecked):
2857           Follow the return type change of Node::toInputElement().
2858         (WebCore::RenderTheme::isIndeterminate): ditto.
2859         (WebCore::RenderTheme::shouldHaveSpinButton):
2860           Change the parameter type: InputElement* -> HTMLInputElement*.
2861         * rendering/RenderTheme.h: ditto.
2862
2863 2011-05-06  Adam Barth  <abarth@webkit.org>
2864
2865         Reviewed by Eric Seidel.
2866
2867         Implement "Report-Only" mode for CSP
2868         https://bugs.webkit.org/show_bug.cgi?id=60402
2869
2870         This mode lets web sites try out CSP by getting violation reports (and
2871         console spam) without actually changing the behavior of their web sites.
2872
2873         Test: http/tests/security/contentSecurityPolicy/report-only.html
2874
2875         * dom/Document.cpp:
2876         (WebCore::Document::processHttpEquiv):
2877         * loader/FrameLoader.cpp:
2878         (WebCore::FrameLoader::didBeginDocument):
2879         * page/ContentSecurityPolicy.cpp:
2880         (WebCore::ContentSecurityPolicy::ContentSecurityPolicy):
2881         (WebCore::ContentSecurityPolicy::didReceiveHeader):
2882         (WebCore::ContentSecurityPolicy::reportViolation):
2883         (WebCore::ContentSecurityPolicy::checkInlineAndReportViolation):
2884         (WebCore::ContentSecurityPolicy::checkEvalAndReportViolation):
2885         (WebCore::ContentSecurityPolicy::checkSourceAndReportViolation):
2886         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
2887         * page/ContentSecurityPolicy.h:
2888
2889 2011-05-06  Beth Dakin  <bdakin@apple.com>
2890
2891         Reviewed by Darin Adler.
2892
2893         https://bugs.webkit.org/show_bug.cgi?id=60421
2894         Custom scrollbars nested inside an overlay scrollbar overflow region end up 
2895         painting twice
2896         -and corresponding-
2897         <rdar://problem/9389072>
2898
2899         Be sure not to paint custom css scrollbars during the special overlay-scrollbar 
2900         painting pass.
2901         * rendering/RenderLayer.cpp:
2902         (WebCore::RenderLayer::paintOverflowControls):
2903
2904 2011-05-06  Cary Clark  <caryclark@google.com>
2905
2906         Reviewed by Eric Seidel.
2907
2908         Add utility for converting SkCanvas to CGContext
2909         https://bugs.webkit.org/show_bug.cgi?id=59808
2910
2911         Skia on Mac uses Skia to render WebKit, and CG 
2912         to render UI elements. The CG elements need a 
2913         transcribed graphics context that preserves the 
2914         canvas matrix, and the canvas clip. 
2915
2916         The BitLockerSkia utility class sets up a CGContext 
2917         from the SkCanvas, locks the bitmap's bits, and 
2918         releases the lock when the class goes out of scope. 
2919
2920         Each time the CGContext is retrieved, it is rebuilt. 
2921         This permits the caller to modify the same canvas 
2922         between calls. 
2923
2924         This change adds utilities but does not modify any 
2925         existing code. For now, there are no callers to these 
2926         utilities, so there is no functional change.
2927
2928         No new tests.
2929
2930         * platform/graphics/skia/BitLockerSkia.cpp: Added.
2931         (WebCore::SkMatrixToCGAffineTransform): Conversion utility.
2932         (WebCore::BitLockerSkia::BitLockerSkia): Takes SkCanvas.
2933         (WebCore::BitLockerSkia::~BitLockerSkia): Unlocks, cleans up.
2934         (WebCore::BitLockerSkia::release): Internal private helper.
2935         (WebCore::BitLockerSkia::cgContext): Returns CGContextRef.
2936         * platform/graphics/skia/BitLockerSkia.h: Added.
2937
2938 2011-05-06  Martin Robinson  <mrobinson@igalia.com>
2939
2940         Reviewed by Xan Lopez.
2941
2942         [GTK] [WebKit2] WebView::windowToScreen needs an implementation
2943         https://bugs.webkit.org/show_bug.cgi?id=55960
2944
2945         Abstract coordinate system translation code from WebKit into WebCore.
2946         This will allow the code to be shared between WebKit and WebKit2. The code
2947         now lives in a new GtkUtilities.cpp helper file.
2948
2949         * GNUmakefile.list.am: Added GtkUtilities to the source list.
2950         * platform/gtk/GtkUtilities.cpp: Added.
2951         (WebCore::convertWidgetRectToScreenRect):
2952         * platform/gtk/GtkUtilities.h: Added.
2953
2954 2011-05-06  Martin Robinson  <mrobinson@igalia.com>
2955
2956         Reviewed by Xan Lopez.
2957
2958         Remove some unnecessary static methods in ResourceHandleSoup.
2959
2960         No new tests. This is only a small cleanup.
2961
2962         * platform/network/soup/ResourceHandleSoup.cpp:
2963         (WebCore::restartedCallback): Call ResourceResponse::updateFromSoupMessage directly.
2964         (WebCore::gotHeadersCallback):Ditto.
2965         (WebCore::contentSniffedCallback):Ditto.
2966         (WebCore::sendRequestCallback):Ditto.
2967         (WebCore::ResourceHandle::defaultSession): Create the soup session directly.
2968
2969 2011-05-06  Martin Robinson  <mrobinson@igalia.com>
2970
2971         Reviewed by Xan Lopez.
2972
2973         [Soup] ResourceHandles are leaked on 304 responses
2974         https://bugs.webkit.org/show_bug.cgi?id=60413
2975
2976         Always call cleanupSoupRequestOperation, even when the request was not
2977         canceled. Before the code would call didFinishLoading and then never clean up
2978         the request.
2979
2980         No new tests. This simply fixes a memory leak.
2981
2982         * platform/network/soup/ResourceHandleSoup.cpp:
2983         (WebCore::sendRequestCallback):
2984
2985 2011-05-06  Adam Barth  <abarth@webkit.org>
2986
2987         Reviewed by Eric Seidel.
2988
2989         Add disable-javascript-urls CSP directive
2990         https://bugs.webkit.org/show_bug.cgi?id=60301
2991
2992         This CSP directive is not in the CSP spec.  This patch is somewhat of
2993         an experiment to see whether this feature is useful.  Based on our
2994         implementation experience, we will coordinate with folks via the W3C to
2995         see if this makes sense to add to the spec.
2996
2997         Test: http/tests/security/contentSecurityPolicy/javascript-urls-blocked.html
2998
2999         * page/ContentSecurityPolicy.cpp:
3000         (WebCore::ContentSecurityPolicy::ContentSecurityPolicy):
3001         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
3002         (WebCore::ContentSecurityPolicy::addDirective):
3003         * page/ContentSecurityPolicy.h:
3004
3005 2011-05-06  Brett Wilson  <brettw@chromium.org>
3006
3007         Reviewed by Adam Barth.
3008
3009         Use a File object to store the downloaded file reference rather than
3010         just the path. This keeps the file and permissions in scope (using the
3011         already-existing blob system) so the browser won't delete the file
3012         when the load is complete. Instead, the file will be cleaned up when
3013         the request objects are deleted.
3014         https://bugs.webkit.org/show_bug.cgi?id=60281
3015
3016         * platform/network/chromium/ResourceResponse.cpp:
3017         (WebCore::ResourceResponse::doPlatformCopyData):
3018         (WebCore::ResourceResponse::doPlatformAdopt):
3019         * platform/network/chromium/ResourceResponse.h:
3020         (WebCore::ResourceResponse::downloadedFile):
3021         (WebCore::ResourceResponse::setDownloadedFile):
3022
3023 2011-05-06  Alexis Menard  <alexis.menard@openbossa.org>
3024
3025         Reviewed by Darin Adler.
3026
3027         Fix two warnings of unused variables.
3028         https://bugs.webkit.org/show_bug.cgi?id=60370
3029
3030         Remove two unused local variable from the code.
3031
3032         No new tests, the existing ones should cover.
3033
3034         * rendering/RenderFlexibleBox.cpp:
3035         (WebCore::RenderFlexibleBox::layoutVerticalBox):
3036         * svg/animation/SVGSMILElement.cpp:
3037         (WebCore::SVGSMILElement::calculateNextProgressTime):
3038
3039 2011-05-06  Adam Barth  <abarth@webkit.org>
3040
3041         Reviewed by Eric Seidel.
3042
3043         Wire up CSP's eval blocking to V8's new API
3044         https://bugs.webkit.org/show_bug.cgi?id=60384
3045
3046         * bindings/v8/ScriptController.cpp:
3047         (WebCore::ScriptController::disableEval):
3048
3049 2011-05-06  David Hyatt  <hyatt@apple.com>
3050
3051         Reviewed by Dan Bernstein.
3052
3053         https://bugs.webkit.org/show_bug.cgi?id=60398 (<rdar://problem/9307696>)
3054         REGRESSION (r81684?): cox.com sign in button is missing
3055         
3056         Fix a typo in r81684 where the ascent was used in a comparison instead of boxHeight.
3057         This restores the original behavior before the refactoring messed it up.
3058
3059         Added fast/inline/nested-top-alignment.html
3060
3061         * rendering/InlineFlowBox.cpp:
3062         (WebCore::InlineFlowBox::computeLogicalBoxHeights):
3063
3064 2011-05-06  David Hyatt  <hyatt@apple.com>
3065
3066         Reviewed by Dan Bernstein.
3067
3068         https://bugs.webkit.org/show_bug.cgi?id=60390 (<rdar://problem/9364449>)
3069         REGRESSION (r81992): portions of ticketmaster site render blank
3070
3071         Make simplified layout skip from a positioned object out to its containing block.  There is no
3072         need to dirty the intermediate inlines, and in this case it's actively harmful, since the
3073         block responsible for the layout of the positioned object doesn't get m_posChildNeedsLayout set.
3074
3075         Added fast/block/positioning/hiding-inside-relpositioned-inline.html
3076
3077         * rendering/RenderObject.h:
3078         (WebCore::RenderObject::markContainingBlocksForLayout):
3079
3080 2011-05-06  Pavel Feldman  <pfeldman@chromium.org>
3081
3082         Not reviewed: move selection test into the text area branch.
3083
3084         * inspector/front-end/TextViewer.js:
3085         (WebInspector.TextViewer.prototype._contextMenu):
3086
3087 2011-05-04  Adrienne Walker  <enne@google.com>
3088
3089         Reviewed by James Robinson.
3090
3091         [chromium] Fix incorrect scissor rect for layers that render into a rendersurface
3092         https://bugs.webkit.org/show_bug.cgi?id=59020
3093
3094         Allow for empty scissor rects, which implies scissoring to the render
3095         surface. The previous code and previous patch on this bug both didn't
3096         take into account that the scissor rect should be the render surface
3097         and not the projection of the layer itself, because child layers
3098         aren't necessarily contained within the bounds of their superlayer.
3099
3100         Test: compositing/flat-with-transformed-child.html
3101
3102         * platform/graphics/chromium/LayerRendererChromium.cpp:
3103         (WebCore::LayerRendererChromium::paintLayerContents):
3104         (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces):
3105         (WebCore::LayerRendererChromium::drawLayer):
3106         (WebCore::LayerRendererChromium::setScissorToRect):
3107
3108 2011-05-06  Simon Fraser  <simon.fraser@apple.com>
3109
3110         Reviewed by Sam Weinig.
3111
3112         Lazily allocate ScrollAnimator in ScrollableArea
3113         https://bugs.webkit.org/show_bug.cgi?id=60327
3114
3115         Avoid allocating the ScrollAnimator up-front, because we
3116         create lots of ScrollableAreas via RenderLayer, and we should
3117         only need the animator when scrolling.
3118
3119         * platform/ScrollableArea.cpp:
3120         (WebCore::ScrollableArea::ScrollableArea):
3121         (WebCore::ScrollableArea::scrollAnimator):
3122         (WebCore::ScrollableArea::scroll):
3123         (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
3124         (WebCore::ScrollableArea::scrollToXOffsetWithoutAnimation):
3125         (WebCore::ScrollableArea::scrollToYOffsetWithoutAnimation):
3126         (WebCore::ScrollableArea::handleWheelEvent):
3127         (WebCore::ScrollableArea::handleGestureEvent):
3128         * platform/ScrollableArea.h:
3129
3130 2011-05-06  Eric Carlson  <eric.carlson@apple.com>
3131
3132         Reviewed by Darin Adler.
3133
3134         REGRESSION (r77954): HTTP Live Streams have incorrect controller UI
3135         https://bugs.webkit.org/show_bug.cgi?id=60304
3136         <rdar://problem/9392609>
3137
3138         Don't assume that the only time the media controls UI may need to change is on a 
3139         network state change, readyState changes can be significant as well.
3140
3141         Tested manually because we don't have any live streams to test in DRT.
3142
3143         * html/HTMLMediaElement.cpp:
3144         (WebCore::HTMLMediaElement::setNetworkState): changedNetworkState -> updateStatusDisplay.
3145         (WebCore::HTMLMediaElement::setReadyState): Call updateStatusDisplay.
3146
3147         * html/shadow/MediaControlRootElement.cpp:
3148         (WebCore::MediaControlRootElement::reset): changedNetworkState -> updateStatusDisplay.
3149         (WebCore::MediaControlRootElement::updateStatusDisplay): Ditto.
3150         * html/shadow/MediaControlRootElement.h:
3151
3152         * html/shadow/MediaControlRootElementChromium.cpp:
3153         (WebCore::MediaControlRootElementChromium::reset): Ditto.
3154         (WebCore::MediaControlRootElementChromium::updateStatusDisplay): Ditto.
3155         * html/shadow/MediaControlRootElementChromium.h:
3156         * html/shadow/MediaControls.h:
3157
3158 2011-05-06  Andreas Kling  <andreas.kling@nokia.com>
3159
3160         Unreviewed Qt 4.8 build fix.
3161
3162         * WebCore.pro: Don't set HAVE_QRAWFONT yet. Left a FIXME so we can
3163         enable it after the 4.8 bots are updated with the full QRawFont APIs.
3164
3165 2011-05-06  Alexander Pavlov  <apavlov@chromium.org>
3166
3167         Reviewed by Yury Semikhatsky.
3168
3169         Web Inspector: editing CSS in the Resources panel and not committing does not revert the change.
3170         https://bugs.webkit.org/show_bug.cgi?id=60319
3171
3172         * inspector/front-end/ResourceView.js:
3173         (WebInspector.ResourceSourceFrame.prototype.cancelEditing):
3174
3175 2011-05-06  Joe Mason  <jmason@rim.com>
3176
3177         Reviewed by Adam Barth.
3178
3179         WebSocket urls should always be encoded as UTF-8.
3180         https://bugs.webkit.org/show_bug.cgi?id=57138
3181
3182         Change WebSocket::connect to take the raw URL string and parse it
3183         internally using the simple KURL constructor, which expects an absolute
3184         UTF-8 encoded URL.  This ensures that all code that creates a WebSocket
3185         goes through this method instead of completeURL.
3186
3187         Test: http/tests/websocket/tests/url-with-nonascii-query.html
3188
3189         * bindings/js/JSWebSocketCustom.cpp:
3190         (WebCore::JSWebSocketConstructor::constructJSWebSocket): Pass String instead of KURL to WebSocket::connect().
3191         * websockets/WebSocket.cpp:
3192         (WebCore::WebSocket::connect): Now takes a String instead of a KURL and parses it using UTF-8.
3193         * websockets/WebSocket.h:
3194
3195 2011-05-06  Luke Macpherson   <macpherson@chromium.org>
3196
3197         Reviewed by Eric Seidel.
3198
3199         Make CSSStyleSelector::applyProperty() CSSPropertyWebkitColorCorrection case use appropriate macro.
3200         https://bugs.webkit.org/show_bug.cgi?id=60339
3201
3202         No tests added as no functionality changed.
3203
3204         * css/CSSStyleSelector.cpp:
3205         (WebCore::CSSStyleSelector::applyProperty):
3206         Use correct macro for CSSPropertySpeak.
3207         * rendering/style/RenderStyle.h:
3208         (WebCore::InheritedFlags::initialColorSpace):
3209         Add initialColorSpace() static method.
3210
3211 2011-05-06  Luke Macpherson   <macpherson@chromium.org>
3212
3213         Reviewed by Eric Seidel.
3214
3215         Make RenderStyle::setPageBreakInside() reject unsupported enum values.
3216         https://bugs.webkit.org/show_bug.cgi?id=60235
3217
3218         No tests added as no functionality changed.
3219
3220         * css/CSSStyleSelector.cpp:
3221         (WebCore::CSSStyleSelector::applyProperty):
3222         Remove special-case code and use appropriate macro.
3223         * rendering/style/RenderStyle.h:
3224         (WebCore::InheritedFlags::setPageBreakInside):
3225         Assert that only supported values are used.
3226
3227 2011-05-06  Luke Macpherson   <macpherson@chromium.org>
3228
3229         Reviewed by Eric Seidel.
3230
3231         Move burden of checking for BJustify box alignment into RenderStyle
3232         https://bugs.webkit.org/show_bug.cgi?id=60246
3233
3234         No new tests added as no functionality changed.
3235
3236         * css/CSSStyleSelector.cpp:
3237         (WebCore::CSSStyleSelector::applyProperty):
3238         Remove special-case logic checking for BJUSTIFY and use existing macro.
3239         * rendering/style/RenderStyle.h:
3240         (WebCore::InheritedFlags::setBoxAlign):
3241         Assert valid values are used.
3242
3243 2011-05-06  Luke Macpherson   <macpherson@chromium.org>
3244
3245         Reviewed by Eric Seidel.
3246
3247         Make CSSStyleSelector::applyProperty() CSSPropertyPointerEvents use the correct macro.
3248         https://bugs.webkit.org/show_bug.cgi?id=60338
3249
3250         No tests added as no functionality changed.
3251
3252         * css/CSSStyleSelector.cpp:
3253         (WebCore::CSSStyleSelector::applyProperty):
3254         Use correct macro for CSSPropertySpeak.
3255
3256 2011-05-06  Alexis Menard  <alexis.menard@openbossa.org>
3257
3258         Reviewed by Alexey Proskuryakov.
3259
3260         Build fix with gcc 4.6 and c++0x support.
3261         https://bugs.webkit.org/show_bug.cgi?id=60284
3262
3263         When enabling support of c++0x the compilation fails because of an
3264         ambiguous overload error. In this code when constructing the pair
3265         we use the new c++0x rvalue reference feature (&&). It means we are
3266         calling String(const WTF::AtomicString&) which becomes ambiguous because
3267         it has an overload WTF::String::String(const WTF::String&) and usually one
3268         with the native port string type (e.g. QString). In this code we want the
3269         String version because the pair store Strings.
3270
3271         No new tests, build fix.
3272
3273         * loader/FormSubmission.cpp:
3274         (WebCore::FormSubmission::create):
3275
3276 2011-05-06  Cris Neckar  <cdn@chromium.org>
3277
3278         Reviewed by Dirk Schulze.
3279
3280         Tests for crash when a transform is applied to certain filters.
3281         https://bugs.webkit.org/show_bug.cgi?id=59551
3282
3283         Test: svg/filters/filter-after-transform-crash.svg
3284
3285         * platform/graphics/filters/FEComposite.cpp:
3286         (WebCore::FEComposite::determineAbsolutePaintRect):
3287         * platform/graphics/filters/FEConvolveMatrix.h:
3288         (WebCore::FEConvolveMatrix::determineAbsolutePaintRect):
3289         * platform/graphics/filters/FEDisplacementMap.h:
3290         (WebCore::FEDisplacementMap::determineAbsolutePaintRect):
3291         * platform/graphics/filters/FEFlood.h:
3292         (WebCore::FEFlood::determineAbsolutePaintRect):
3293         * platform/graphics/filters/FELighting.h:
3294         (WebCore::FELighting::determineAbsolutePaintRect):
3295         * platform/graphics/filters/FETile.h:
3296         (WebCore::FETile::determineAbsolutePaintRect):
3297         * platform/graphics/filters/FETurbulence.h:
3298         (WebCore::FETurbulence::determineAbsolutePaintRect):
3299         * platform/graphics/filters/FilterEffect.cpp:
3300         (WebCore::isFilterSizeValid):
3301         (WebCore::FilterEffect::determineAbsolutePaintRect):
3302         (WebCore::FilterEffect::asUnmultipliedImage):
3303         (WebCore::FilterEffect::asPremultipliedImage):
3304         (WebCore::FilterEffect::copyUnmultipliedImage):
3305         (WebCore::FilterEffect::copyPremultipliedImage):
3306         (WebCore::FilterEffect::createUnmultipliedImageResult):
3307         (WebCore::FilterEffect::createPremultipliedImageResult):
3308         * platform/graphics/filters/FilterEffect.h:
3309         (WebCore::FilterEffect::maxEffectRect):
3310         (WebCore::FilterEffect::setMaxEffectRect):
3311         * rendering/svg/RenderSVGResourceFilter.cpp:
3312         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
3313         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
3314
3315 2011-05-06  Luke Macpherson   <macpherson@chromium.org>
3316
3317         Reviewed by Eric Seidel.
3318
3319         Use cast to convert primitive value to FontSmoothingMode.
3320         https://bugs.webkit.org/show_bug.cgi?id=60242
3321
3322         No tests added as no functionality changed.
3323
3324         * css/CSSStyleSelector.cpp:
3325         (WebCore::CSSStyleSelector::applyProperty):
3326         Use cast to convert primitive value to FontSmoothingMode.
3327
3328 2011-05-05  Luke Macpherson   <macpherson@chromium.org>
3329
3330         Reviewed by Eric Seidel.
3331
3332         Make CSSPropertySpeak use the correct macro.
3333         https://bugs.webkit.org/show_bug.cgi?id=60335
3334
3335         No tests added as no functionality changed.
3336
3337         * css/CSSStyleSelector.cpp:
3338         (WebCore::CSSStyleSelector::applyProperty):
3339         Use correct macro for CSSPropertySpeak.
3340
3341 2011-05-05  Eric Carlson  <eric.carlson@apple.com>
3342
3343         Reviewed by Maciej Stachowiak.
3344
3345         <rdar://problem/9390864>
3346         https://bugs.webkit.org/show_bug.cgi?id=60343
3347         Crash on Recovery System when trying to load page that includes media element
3348
3349         Automated test not possible, tested manually.
3350
3351         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
3352         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable): Only return true if
3353             AVFoundation and CoreMedia are installed.
3354
3355         * platform/mac/SoftLinking.h: Define SOFT_LINK_FRAMEWORK_OPTIONAL, identical to 
3356             SOFT_LINK_FRAMEWORK except that it doesn't ASSERT if the framework doesn't exist.
3357
3358 2011-05-05  Eric Carlson  <eric.carlson@apple.com>
3359
3360         Reviewed by Darin Adler.
3361
3362         Live streams sometimes won't play with AVFoundation backend
3363         https://bugs.webkit.org/show_bug.cgi?id=58961
3364         rdar://problem/9284748
3365
3366         Tested manually because we don't have any live streams to test in DRT.
3367
3368         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3369         (WebCore::MediaPlayerPrivateAVFoundation::updateStates): Don't special case seeking, assume
3370             AVFoundation will notify us when internal states change.
3371
3372         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h: Make m_timeObserver
3373             a RetainPtr
3374         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
3375         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Ditto.
3376         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Ditto.
3377
3378 2011-05-05  Jay Civelli  <jcivelli@chromium.org>
3379
3380         Reviewed by Adam Barth.
3381
3382         Adding quoted-printable encoding/decoding capabilities.
3383         This is needed for MHTML support.
3384         https://bugs.webkit.org/show_bug.cgi?id=59834
3385
3386         * CMakeLists.txt:
3387         * GNUmakefile.list.am:
3388         * WebCore.gypi:
3389         * WebCore.pro:
3390         * WebCore.vcproj/WebCore.vcproj:
3391         * WebCore.xcodeproj/project.pbxproj:
3392         * platform/text/QuotedPrintable.cpp: Added.
3393         * platform/text/QuotedPrintable.h: Added.
3394
3395 2011-05-05  Andy Estes  <aestes@apple.com>
3396
3397         Reviewed by Eric Seidel.
3398
3399         Implement document.innerHTML
3400         https://bugs.webkit.org/show_bug.cgi?id=60316
3401
3402         ASSERT that contextElement is non-0 when constructing a HTMLTreeBuilder
3403         for fragment parsing. This assertion will become invalid when
3404         document.innerHTML is implemented, which is the only case where HTML5
3405         specifies that a fragment will not have a context element.
3406
3407         * html/parser/HTMLTreeBuilder.cpp:
3408         (WebCore::HTMLTreeBuilder::HTMLTreeBuilder):
3409
3410 2011-05-05  Kevin Ollivier  <kevino@theolliviers.com>
3411
3412         [wx] Unreviewed build fix. Include ApplicationServices for wx port.
3413
3414         * platform/graphics/GlyphBuffer.h:
3415         * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
3416
3417 2011-05-05  Dan Bernstein  <mitz@apple.com>
3418
3419         Reviewed by Simon Fraser.
3420
3421         WebCore part of <rdar://problem/9155590> Broken animation in iAd producer
3422
3423         * WebCore.exp.in: Export wkExecutableWasLinkedOnOrBeforeSnowLeopard.
3424         * platform/graphics/ca/GraphicsLayerCA.cpp:
3425         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): Account for the binary-compatiblity
3426         check in Core Animation.
3427         * platform/mac/WebCoreSystemInterface.h: Added wkExecutableWasLinkedOnOrBeforeSnowLeopard.
3428         * platform/mac/WebCoreSystemInterface.mm: Ditto.
3429
3430 2011-05-05  Sam Weinig  <sam@webkit.org>
3431
3432         Reviewed by Anders Carlsson.
3433
3434         WebKit2 (Mac): Background tabs/windows can force themselves to the front
3435         <rdar://problem/9386346>
3436         https://bugs.webkit.org/show_bug.cgi?id=60315
3437
3438         * platform/mac/WidgetMac.mm:
3439         (WebCore::Widget::setFocus):
3440         It is incorrect for us to call Chrome::focus() here, which could bring a window/tab
3441         to the front. Calling focusNSView() was only necessary because in WebKit we must inform
3442         the platform widget that the focus has changed. WebKit2 Mac now matches other ports.
3443
3444 2011-05-05  Justin Novosad  <junov@chromium.org>
3445
3446         Reviewed by Kenneth Russell.
3447
3448         [Chromium] Change the --accelerated-2d-canvas flag to mean Ganesh, and stop using --enable-accelerated-drawing for that purpose
3449         https://bugs.webkit.org/show_bug.cgi?id=60173
3450
3451         * page/Page.cpp:
3452         (WebCore::Page::sharedGraphicsContext3D):
3453         Flipping the switch to make Skia the default for the accelerated 2d canvas
3454
3455 2011-05-05  Tony Gentilcore  <tonyg@chromium.org>
3456
3457         Reviewed by Adam Barth.
3458
3459         ASSERT(m_state == ParsingState) fires @ www.canalplus.fr
3460         https://bugs.webkit.org/show_bug.cgi?id=60101
3461
3462         Test: fast/parser/close-while-stopping.html
3463
3464         * dom/Document.cpp:
3465         (WebCore::Document::close): According to http://www.whatwg.org/specs/web-apps/current-work/#dom-document-close,
3466         the close() steps should be aborted if there is no script-created parser
3467         associated with the document. Our parser lives throughout
3468         http://www.whatwg.org/specs/web-apps/current-work/#the-end, but it seems
3469         the spec doesn't consider the parser active any more. So to properly
3470         respect this, we need to check that the parser is still parsing.
3471
3472 2011-04-28  Evan Martin  <evan@chromium.org>
3473
3474         Reviewed by Ojan Vafai.
3475
34