[GTK] Add accelerated 2D canvas support using cairo-gl
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-04-11  Martin Robinson  <mrobinson@igalia.com>
2
3         [GTK] Add accelerated 2D canvas support using cairo-gl
4         https://bugs.webkit.org/show_bug.cgi?id=104672
5
6         Reviewed by Alejandro G. Castro.
7
8         No new tests. We do not yet have the ability to run tests against
9         accelerated content.
10
11         * platform/graphics/GraphicsContext.cpp:
12         (WebCore): We don't use the stub implementation of isAcceleratedContext any longer.
13         * platform/graphics/ImageBuffer.cpp:
14         (WebCore): Ditto for ImageBuffer::platformLayer.
15         * platform/graphics/cairo/GLContext.h:
16         (GLContext): Added method to get a cairo_device_t from the context.
17         * platform/graphics/cairo/GraphicsContextCairo.cpp:
18         (WebCore::GraphicsContext::isAcceleratedContext): Return true when we are a CairoGL surface.
19         * platform/graphics/cairo/ImageBufferCairo.cpp:
20         (WebCore::ImageBufferData::ImageBufferData): Initialize the size and the texture to 0.
21         (WebCore::createCairoGLSurface): Added this helper.
22         (WebCore::ImageBuffer::ImageBuffer): When we are in accelerated rendering mode, create
23         a CairoGL surface.
24         (WebCore::ImageBuffer::platformTransformColorSpace): Do not implement this for accelerated
25         contexts yet.
26         (WebCore::mapSurfaceToImage): Added this helper, since we don't require Cairo 1.12 yet,
27         which provides an builtin implementation.
28         (WebCore::unmapSurfaceFromImage): Ditto.
29         (WebCore::getImageData): Map the surface to an image surface first.
30         (WebCore::ImageBuffer::putByteArray): Ditto.
31         (WebCore::ImageBufferData::paintToTextureMapper): Connect the accelerated canvas into the
32         TextureMapper infrastructure.
33         (WebCore::ImageBuffer::platformLayer): This lets the TextureMapper at the ImageBufferData.
34         * platform/graphics/cairo/ImageBufferDataCairo.h:
35         (ImageBufferData): Subclass TexturMapperPlatformLayer where appropriate.
36         * platform/graphics/egl/GLContextEGL.cpp: Added implementation of cairoDevice.
37         * platform/graphics/egl/GLContextEGL.h: Ditto.
38         * platform/graphics/glx/GLContextGLX.cpp: Ditto
39         * platform/graphics/glx/GLContextGLX.h: Ditto.
40
41 2013-04-11  Anders Carlsson  <andersca@apple.com>
42
43         Implement removing storage area items
44         https://bugs.webkit.org/show_bug.cgi?id=114472
45
46         Reviewed by Beth Dakin.
47
48         Export StorageMap::removeItem.
49
50         * WebCore.exp.in:
51
52 2013-04-11  Brendan Long  <b.long@cablelabs.com>
53
54         TextTrackList's .onremovetrack is missing from IDL
55         https://bugs.webkit.org/show_bug.cgi?id=103421
56
57         Reviewed by Eric Carlson.
58
59         Fixed test media/track/opera/interfaces/TextTrackList/onremovetrack.html
60
61         * html/track/TextTrackList.cpp:
62         (TextTrackList::remove):
63         (TextTrackList::scheduleRemoveTrackEvent):
64         * html/track/TextTrackList.h:
65         (TextTrackList):
66         * html/track/TextTrackList.idl:
67
68 2013-04-11  Alberto Garcia  <agarcia@igalia.com>
69
70         [BlackBerry] Upstream the filesystem code
71         https://bugs.webkit.org/show_bug.cgi?id=114437
72
73         Reviewed by Rob Buis.
74
75         This patch contains contributions from many members of the
76         BlackBerry WebKit team.
77
78         * platform/blackberry/AsyncFileWriterBlackBerry.cpp: Added.
79         (WebCore):
80         (WebCore::AsyncFileWriterBlackBerry::write):
81         * platform/blackberry/AsyncFileWriterBlackBerry.h: Added.
82         (WTF):
83         (WTF::BlackBerry::Platform::WebFileWriter):
84         (WebCore):
85         * platform/blackberry/DOMFileSystemBlackBerry.cpp: Added.
86         (WebCore):
87         (WebCore::DOMFileSystemBase::createFileSystemURL):
88         (WebCore::DOMFileSystemBase::crackFileSystemURL):
89         (WebCore::DOMFileSystemBase::supportsToURL):
90         (WebCore::DOMFileSystemBase::isValidType):
91         * platform/blackberry/LocalFileSystemBlackBerry.cpp: Added.
92         (WebCore):
93         (WebCore::fileSystemTypeString):
94         (WebCore::openFileSystem):
95         (WebCore::LocalFileSystem::deleteFileSystem):
96         (WebCore::LocalFileSystem::readFileSystem):
97         (WebCore::LocalFileSystem::requestFileSystem):
98         * platform/blackberry/PlatformAsyncFileSystemCallbacks.cpp: Added.
99         (WebCore):
100         (WebCore::PlatformAsyncFileSystemCallbacks::notifyOpenFileSystem):
101         (WebCore::PlatformAsyncFileSystemCallbacks::notifySucceed):
102         (WebCore::PlatformAsyncFileSystemCallbacks::notifyFail):
103         (WebCore::getFileMetadata):
104         (WebCore::PlatformAsyncFileSystemCallbacks::notifyReadMetadata):
105         (WebCore::PlatformAsyncFileSystemCallbacks::notifyCreateSnapshotFileAndReadMetadata):
106         (WebCore::PlatformAsyncFileSystemCallbacks::notifyReadDirectory):
107         (WebCore::PlatformAsyncFileSystemCallbacks::notifyCreateFileWriter):
108         (WebCore::PlatformAsyncFileSystemCallbacks::createAsyncFileSystem):
109         (WebCore::PlatformAsyncFileSystemCallbacks::createAsyncFileWriter):
110         (WebCore::PlatformAsyncFileSystemCallbacks::deleteMe):
111         * platform/blackberry/PlatformAsyncFileSystemCallbacks.h: Added.
112         (WebCore):
113         * platform/blackberry/PlatformBlob.cpp: Added.
114         (WebCore):
115         (WebCore::PlatformBlob::nextDataItem):
116         * platform/blackberry/PlatformBlob.h: Added.
117         (WebCore):
118         * platform/blackberry/PlatformFileWriterClient.cpp: Added.
119         (WebCore):
120         (WebCore::PlatformFileWriterClient::notifyWrite):
121         (WebCore::PlatformFileWriterClient::notifyTruncate):
122         (WebCore::PlatformFileWriterClient::notifyFail):
123         * platform/blackberry/PlatformFileWriterClient.h: Added.
124         (WebCore):
125         (WTF):
126         (WTF::WebCore::PlatformFileWriterClient):
127         * platform/blackberry/WorkerAsyncFileSystemBlackBerry.cpp: Added.
128         (WebCore):
129         (WebCore::WorkerAsyncFileSystemBlackBerry::WorkerAsyncFileSystemBlackBerry):
130         (WebCore::WorkerAsyncFileSystemBlackBerry::~WorkerAsyncFileSystemBlackBerry):
131         (WebCore::WorkerAsyncFileSystemBlackBerry::waitForOperationToComplete):
132         (WebCore::WorkerAsyncFileSystemBlackBerry::openFileSystemOnMainThread):
133         (WebCore::WorkerAsyncFileSystemBlackBerry::deleteFileSystemOnMainThread):
134         (WebCore::WorkerAsyncFileSystemBlackBerry::moveOnMainThread):
135         (WebCore::WorkerAsyncFileSystemBlackBerry::copyOnMainThread):
136         (WebCore::WorkerAsyncFileSystemBlackBerry::removeOnMainThread):
137         (WebCore::WorkerAsyncFileSystemBlackBerry::removeRecursivelyOnMainThread):
138         (WebCore::WorkerAsyncFileSystemBlackBerry::readMetadataOnMainThread):
139         (WebCore::WorkerAsyncFileSystemBlackBerry::createFileOnMainThread):
140         (WebCore::WorkerAsyncFileSystemBlackBerry::createDirectoryOnMainThread):
141         (WebCore::WorkerAsyncFileSystemBlackBerry::fileExistsOnMainThread):
142         (WebCore::WorkerAsyncFileSystemBlackBerry::directoryExistsOnMainThread):
143         (WebCore::WorkerAsyncFileSystemBlackBerry::readDirectoryOnMainThread):
144         (WebCore::WorkerAsyncFileSystemBlackBerry::createWriterOnMainThread):
145         (WebCore::WorkerAsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadataOnMainThread):
146         (WebCore::WorkerAsyncFileSystemBlackBerry::openFileSystem):
147         (WebCore::WorkerAsyncFileSystemBlackBerry::deleteFileSystem):
148         (WebCore::WorkerAsyncFileSystemBlackBerry::move):
149         (WebCore::WorkerAsyncFileSystemBlackBerry::copy):
150         (WebCore::WorkerAsyncFileSystemBlackBerry::remove):
151         (WebCore::WorkerAsyncFileSystemBlackBerry::removeRecursively):
152         (WebCore::WorkerAsyncFileSystemBlackBerry::readMetadata):
153         (WebCore::WorkerAsyncFileSystemBlackBerry::createFile):
154         (WebCore::WorkerAsyncFileSystemBlackBerry::createDirectory):
155         (WebCore::WorkerAsyncFileSystemBlackBerry::fileExists):
156         (WebCore::WorkerAsyncFileSystemBlackBerry::directoryExists):
157         (WebCore::WorkerAsyncFileSystemBlackBerry::readDirectory):
158         (WebCore::WorkerAsyncFileSystemBlackBerry::createWriter):
159         (WebCore::WorkerAsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata):
160         * platform/blackberry/WorkerAsyncFileSystemBlackBerry.h: Added.
161         (WebCore):
162         (WorkerAsyncFileSystemBlackBerry):
163         (WebCore::WorkerAsyncFileSystemBlackBerry::create):
164         * platform/blackberry/WorkerAsyncFileWriterBlackBerry.cpp: Added.
165         (WebCore):
166         (WebCore::WorkerAsyncFileWriterBlackBerry::writeOnMainThread):
167         (WebCore::WorkerAsyncFileWriterBlackBerry::truncateOnMainThread):
168         (WebCore::WorkerAsyncFileWriterBlackBerry::abortOnMainThread):
169         (WebCore::WorkerAsyncFileWriterBlackBerry::write):
170         (WebCore::WorkerAsyncFileWriterBlackBerry::truncate):
171         (WebCore::WorkerAsyncFileWriterBlackBerry::abort):
172         (WebCore::WorkerAsyncFileWriterBlackBerry::waitForOperationToComplete):
173         (WebCore::WorkerAsyncFileWriterBlackBerry::platformWriterClient):
174         * platform/blackberry/WorkerAsyncFileWriterBlackBerry.h: Added.
175         (WebCore):
176         * platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.cpp: Added.
177         (WebCore):
178         (WebCore::performTaskOnMainThread):
179         (WebCore::postTaskToMainThread):
180         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyStop):
181         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyOpenFileSystem):
182         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifySucceed):
183         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyFail):
184         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyReadMetadata):
185         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyReadDirectory):
186         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyCreateFileWriter):
187         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::createAsyncFileSystem):
188         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::createAsyncFileWriter):
189         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::deleteMe):
190         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::postTaskToWorkerThread):
191         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyOpenFileSystemOnWorkerThread):
192         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifySucceedOnWorkerThread):
193         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyFailOnWorkerThread):
194         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyReadMetadataOnWorkerThread):
195         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyReadDirectoryEntryOnWorkerThread):
196         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyCreateFileWriterOnWorkerThread):
197         * platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.h: Added.
198         (WebCore):
199         * platform/blackberry/WorkerPlatformFileWriterClient.cpp: Added.
200         (WebCore):
201         (WebCore::WorkerPlatformFileWriterClient::notifyWriteOnWorkerThread):
202         (WebCore::WorkerPlatformFileWriterClient::notifyFailOnWorkerThread):
203         (WebCore::WorkerPlatformFileWriterClient::notifyTruncateOnWorkerThread):
204         (WebCore::WorkerPlatformFileWriterClient::notifyWrite):
205         (WebCore::WorkerPlatformFileWriterClient::notifyTruncate):
206         (WebCore::WorkerPlatformFileWriterClient::notifyFail):
207         (WebCore::WorkerPlatformFileWriterClient::postTaskToWorkerThreadIfNeeded):
208         * platform/blackberry/WorkerPlatformFileWriterClient.h: Added.
209         (WebCore):
210         (WTF):
211         (WTF::WebCore::WorkerPlatformFileWriterClient):
212
213 2013-04-11  Ryosuke Niwa  <rniwa@webkit.org>
214
215         Mac Lion build fix attempt after r148197.
216
217         * page/scrolling/mac/ScrollingStateNodeMac.mm:
218
219 2013-04-11  Alexey Proskuryakov  <ap@apple.com>
220
221         <rdar://problem/10416316> [Mac] WebSocket doesn't work with authenticating proxies
222         https://bugs.webkit.org/show_bug.cgi?id=114464
223
224         Reviewed by Brady Eidson.
225
226         * platform/mac/WebCoreSystemInterface.h:
227         * platform/mac/WebCoreSystemInterface.mm:
228         Updated for new wkCopyCONNECTProxyResponse signature.
229
230         * platform/network/cf/SocketStreamHandleCFNet.cpp:
231         (WebCore::SocketStreamHandle::executePACFileURL): Fixed a typo in a comment.
232         (WebCore::SocketStreamHandle::addCONNECTCredentials): Don't crash even if the rest
233         of the fix didn't work (which would be the case on some OS versions).
234         (WebCore::SocketStreamHandle::readStreamCallback): Replaced most breaks with returns,
235         because breaks were confusing in such a huge switch. Changed null proxyResponse
236         to not be treated as authentication success, because it's not. Merged two parts
237         of WaitingForConnect state handling for clarity.
238         (WebCore::SocketStreamHandle::writeStreamCallback): Don't blindly assume that we
239         can start WebSocket handshake after kCFStreamEventCanAcceptBytes. Perhaps it's
240         nothing but a failed CONNECT, and a read callback still needs to send authentication.
241         Without this, establishing connections was flaky. Added a check for Closed state,
242         matching read callback.
243
244 2013-04-11  Sukolsak Sakshuwong  <sukolsak@gmail.com>
245
246         MutationRecord is not exposed
247         https://bugs.webkit.org/show_bug.cgi?id=114288
248
249         Reviewed by Darin Adler.
250
251         Expose MutationRecord on DOMWindow. This patch is copied from a patch
252         by Adam Klein. https://codereview.chromium.org/13861028
253
254         Test: fast/dom/MutationObserver/mutation-record-constructor.html
255
256         * page/DOMWindow.idl:
257
258 2013-04-11  Beth Dakin  <bdakin@apple.com>
259
260         Cannot scroll to footer on a page with overflow:hidden on the body
261         https://bugs.webkit.org/show_bug.cgi?id=114462
262         -and corresponding-
263         <rdar://problem/13530042>
264
265         Reviewed by Simon Fraser.
266
267         Add a new scenario in which we want to overrideHidden -- whenever we are the 
268         mainFrame and there is a header or footer.
269
270         * page/FrameView.cpp:
271         (WebCore::FrameView::applyOverflowToViewport):
272
273 2013-04-11  Commit Queue  <rniwa@webkit.org>
274
275         Unreviewed, rolling out r148034, r148052, r148097, and
276         r148194.
277         http://trac.webkit.org/changeset/148034
278         http://trac.webkit.org/changeset/148052
279         http://trac.webkit.org/changeset/148097
280         http://trac.webkit.org/changeset/148194
281         https://bugs.webkit.org/show_bug.cgi?id=114463
282
283         broke mutiresolution favicons, among other things (Requested
284         by thorton on #webkit).
285
286         * loader/icon/IconDatabase.cpp:
287         (WebCore::IconDatabase::setIconDataForIconURL):
288         * loader/icon/IconDatabase.h:
289         (IconDatabase):
290         * loader/icon/IconDatabaseBase.h:
291         * loader/icon/IconRecord.cpp:
292         * loader/icon/IconRecord.h:
293         (IconRecord):
294
295 2013-04-11  ChangSeok Oh  <changseok.oh@collabora.com>
296
297         [GTK][AC] Implement GraphicsLayerClutter::moveOrCopyAnimations
298         https://bugs.webkit.org/show_bug.cgi?id=114019
299
300         Reviewed by Gustavo Noronha Silva.
301
302         Fill moveOrCopyAnimations that is based on Mac port implementation.
303
304         Tests: animations/3d/change-transform-in-end-event.html
305                animations/3d/transform-origin-vs-functions.html
306                compositing/animation/state-at-end-event-transform-layer.html
307
308         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
309         (WebCore::GraphicsLayerClutter::moveOrCopyLayerAnimation):
310         (WebCore):
311         (WebCore::GraphicsLayerClutter::moveOrCopyAnimations):
312         * platform/graphics/clutter/GraphicsLayerClutter.h:
313
314 2013-04-11  Anders Carlsson  <andersca@apple.com>
315
316         Implement StorageManager::getValues
317         https://bugs.webkit.org/show_bug.cgi?id=114461
318
319         Reviewed by Beth Dakin.
320
321         Expose the item hash map.
322
323         * storage/StorageMap.h:
324         (WebCore::StorageMap::items):
325
326 2013-04-11  Eli Fidler  <efidler@blackberry.com>
327
328         [BlackBerry] Use the platform list of languages with fonts instead of hardcoding
329         https://bugs.webkit.org/show_bug.cgi?id=114452
330
331         Reviewed by Rob Buis.
332
333         BlackBerry PR 325244
334         Internally reviewed by Jeff Rogers
335
336         No functional change, but platform font changes won't need a WebKit change
337         going forward.
338
339         * page/blackberry/SettingsBlackBerry.cpp:
340         (WebCore::Settings::initializeDefaultFontFamilies):
341
342 2013-04-11  Dirk Schulze  <krit@webkit.org>
343
344         [CSS Shaders] Parse parameters descriptor
345         https://bugs.webkit.org/show_bug.cgi?id=114455
346
347         Reviewed by Dean Jackson.
348
349         Add support for the 'parameters' descriptor in the filter at-rule to support
350         parameterization of CSS Shaders.
351
352         https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#custom-filter-parameters
353
354         Tests: css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid.html
355                css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid.html
356
357         * css/CSSComputedStyleDeclaration.cpp:
358         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
359         * css/CSSParser.cpp: Added 'parameters' property and fail parsing if not inside
360             of an @filter rule.
361         (WebCore::CSSParser::parseValue):
362         (WebCore::CSSParser::parseFilterRuleParameters): New helper function to verify
363             values.
364         (WebCore):
365         * css/CSSParser.h:
366         * css/CSSProperty.cpp:
367         (WebCore::CSSProperty::isInheritedProperty):
368         * css/CSSPropertyNames.in: Added new property name 'parameters'.
369         * css/StyleResolver.cpp:
370         (WebCore::StyleResolver::applyProperty):
371
372 2013-04-11  Arunprasad Rajkumar  <arunprasadr@nds.com>
373
374         Default Implementation of toString for NPObject shouldn't return NPClass & NPObject address as String
375         https://bugs.webkit.org/show_bug.cgi?id=114450
376
377         Reviewed by Anders Carlsson.
378
379         * bridge/c/c_instance.cpp:
380         (JSC::Bindings::CInstance::stringValue):
381
382 2013-04-11  Robert Hogan  <robert@webkit.org>
383
384         REGRESSION (142152): ensure we skip past out-of-flow objects when detecting whitespace to ignore after leading empty inlines
385         https://bugs.webkit.org/show_bug.cgi?id=114311
386
387         Reviewed by Emil A Eklund.
388
389         When we hit an empty inline in line layout and try to detect whether it has any whitespace after it that we ought to ignore, then
390         we need to skip past out-of-flow and floating objects when looking for that whitespace. Failure to do so will result in us
391         adding the width from the first space we encounter to our line width and over-estimating the real width of the line.
392
393         We're hitting this bug now because we have broadened the category of empty inlines that get lineboxes so we go into line layout 
394         and have to deal with them and their subsequent whitespace there. Previously this sort of whitespace would have been simply
395         consumed by |skipLeadingWhitespace|.
396
397         Test: fast/inline/out-of-flow-objects-and-whitespace-after-empty-inline.html
398
399         * rendering/RenderBlockLineLayout.cpp:
400         (WebCore::shouldSkipWhitespaceAfterStartObject):
401
402 2013-04-11  Ryosuke Niwa  <rniwa@webkit.org>
403
404         Autocorrected text doesn't have a marker of type autocorrected
405         https://bugs.webkit.org/show_bug.cgi?id=114337
406
407         Reviewed by Darin Adler.
408
409         The bug was caused by markAndReplaceFor's text replacement errornously assuming that there are
410         no other text checking result starting at the same offset. That resulted in us adjusting location
411         offsets of the subsequent results pointing at the replaced text, hit an assertion, and blow up.
412
413         Fixed the bug by skipping all remaining results for the replaced text since they're no longer
414         applicable.
415
416         Tests: Existing autocorection tests have been updated to assert new behavior.
417
418         * editing/Editor.cpp:
419         (WebCore::Editor::markAndReplaceFor):
420
421 2013-04-11  Michelangelo De Simone  <michelangelo@webkit.org>
422
423         [CSS Shaders] Parse the geometry descriptor
424         https://bugs.webkit.org/show_bug.cgi?id=110815
425
426         Added initial parsing for the "geometry" descriptor, as per specification:
427         https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#geometry
428         This descriptor allows to specify the mesh geometry for custom filters.
429
430         Reviewed by Dirk Schulze.
431
432         Tests: css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-invalid.html
433                css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-valid.html
434
435         * css/CSSComputedStyleDeclaration.cpp:
436         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
437         * css/CSSParser.cpp:
438         (WebCore::CSSParser::parseValue):
439         (WebCore::CSSParser::parseGeometry): New method that parses the geometry
440         descriptor (grid()).
441         (WebCore):
442         * css/CSSParser.h:
443         * css/CSSProperty.cpp:
444         (WebCore::CSSProperty::isInheritedProperty):
445         * css/CSSPropertyNames.in: Added conditional "geometry" property.
446         * css/CSSValueKeywords.in: Added conditional "attached" value keyword; detached
447         was already there.
448
449 2013-04-11  Anders Carlsson  <andersca@apple.com>
450
451         Make StorageAreaMap dispatch session storage events
452         https://bugs.webkit.org/show_bug.cgi?id=114454
453
454         Reviewed by Beth Dakin.
455
456         Export storage symbols and headers needed by WebKit2.
457
458         * WebCore.exp.in:
459         * WebCore.xcodeproj/project.pbxproj:
460
461 2013-04-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
462
463         handleMouseMoveEvent should let hit-testing hit-test scrollbars
464         https://bugs.webkit.org/show_bug.cgi?id=114430
465
466         Reviewed by Antonio Gomes.
467
468         Allow hit-testing to hit-test frame scrollbars so handleMouseMoveEvent
469         does not have to do it itself.
470
471         * page/EventHandler.cpp:
472         (WebCore::EventHandler::handleMouseMoveEvent):
473
474 2013-04-11  Brian Holt  <brian.holt@samsung.com>
475
476         [Gtk] Combo boxes should be arrow-out-of-able similar to list boxes when caret-browsing is enabled.
477         https://bugs.webkit.org/show_bug.cgi?id=76796
478
479         Reviewed by Chris Fleizach.
480
481         When using caret-browsing with the right and left arrows, the
482         behaviour of menuLists should be the same as listBoxes. This means
483         not default-handling the event and passing it up the stack instead.
484
485         * html/HTMLSelectElement.cpp:
486         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
487
488 2013-04-11  Alexey Proskuryakov  <ap@apple.com>
489
490         Remove some ResourceHandle.h includes
491         https://bugs.webkit.org/show_bug.cgi?id=114416
492
493         Reviewed by Ryosuke Niwa.
494
495         * loader/CrossOriginAccessControl.h:
496         * loader/CrossOriginPreflightResultCache.h:
497         These files don't need ResourceHandle.h, just ResourceHandleTypes.h.
498
499         * loader/TextTrackLoader.cpp:
500         * loader/ThreadableLoader.h:
501         * loader/appcache/ApplicationCacheGroup.h:
502         * loader/cache/MemoryCache.h:
503         * loader/mac/ResourceLoaderMac.mm:
504         * page/Settings.cpp:
505         * platform/network/AuthenticationChallengeBase.cpp:
506         * platform/network/cf/CookieJarCFNet.cpp:
507         * platform/network/cf/ResourceRequestCFNet.cpp:
508         * xml/XSLTProcessorLibxslt.cpp:
509         * xml/parser/XMLDocumentParser.cpp:
510         * xml/parser/XMLDocumentParserLibxml2.cpp:
511         Just straightforward removal of includes.
512
513 2013-04-04  Allan Sandfeld Jensen  <allan.jensen@digia.com>
514
515         Use CSS4 image-rendering to determing image scaling quality
516         https://bugs.webkit.org/show_bug.cgi?id=113405
517
518         Reviewed by Simon Fraser.
519
520         Implement the new CSS4 image-rendering property values.
521
522         Image scaling now uses low-quality (pixelated) scaling for
523         crisp-edges, pixelated and optimizeSpeed values, and always
524         use high quality (smooth) scaling for -webkit-smooth and
525         optimizeQuality. The latter can be used to disable low quality
526         scaling during CSS animations or live resizing.
527
528         The new values are protected with a new CSS4_IMAGES feature, but
529         the crisp-edge value has been introduced before to displace the
530         deprecated -webkit-optimize-contrast value, and optimizeSpeed
531         and optimizeQuality values are supported for SVG compatibility.
532
533         * css/CSSParser.cpp:
534         (WebCore::isValidKeywordPropertyAndValue):
535         * css/CSSPrimitiveValueMappings.h:
536         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
537         (WebCore::CSSPrimitiveValue::operator EImageRendering):
538         * css/CSSValueKeywords.in:
539         * rendering/RenderBoxModelObject.cpp:
540         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
541         * rendering/RenderHTMLCanvas.cpp:
542         (WebCore::RenderHTMLCanvas::paintReplaced):
543         * rendering/style/RenderStyleConstants.h:
544
545 2013-04-11  Adenilson Cavalcanti  <cavalcantii@gmail.com>
546
547         Build fix: use of uninitialized variable in ScrollingStateTree
548         https://bugs.webkit.org/show_bug.cgi?id=114443
549
550         Reviewed by Anders Carlsson.
551
552         Initialize pointer to zero before use, fixes build.
553         No new tests, no changes on behavior.
554
555         * page/scrolling/ScrollingStateTree.cpp:
556         (WebCore::ScrollingStateTree::attachNode):
557
558 2013-04-11  Dirk Schulze  <krit@webkit.org>
559
560         [CSS Shaders] Parse mix descriptor
561         https://bugs.webkit.org/show_bug.cgi?id=114414
562
563         Reviewed by Antti Koivisto.
564
565         Add support for the 'mix' descriptor in the filter at-rule to support blend modes
566         and composite operators in CSS Shaders.
567         Each pixel in the fragment shader will be blended and composited with the
568         backdrop by taking these values into account.
569
570         https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#custom-filter-mix
571
572         Tests: css3/filters/custom-with-at-rule-syntax/parsing-mix-property-invalid.html
573                css3/filters/custom-with-at-rule-syntax/parsing-mix-property-valid.html
574
575         * css/CSSComputedStyleDeclaration.cpp:
576         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
577         * css/CSSParser.cpp: Added 'mix' property and fail parsing if not inside
578             of an @filter rule.
579         (WebCore::CSSParser::parseValue):
580         (WebCore::CSSParser::parseFilterRuleMix): New helper function to verify
581             values.
582         (WebCore):
583         * css/CSSParser.h:
584         * css/CSSProperty.cpp:
585         (WebCore::CSSProperty::isInheritedProperty):
586         * css/CSSPropertyNames.in: Added new property name 'mix'.
587         * css/StyleResolver.cpp:
588         (WebCore::StyleResolver::applyProperty):
589
590 2013-04-11  Zalan Bujtas  <zalan@apple.com>
591
592         Parent box with background-size auto and gradient image does not get properly repainted when child box is resized. 
593         https://bugs.webkit.org/show_bug.cgi?id=114424
594
595         Reviewed by Antti Koivisto.
596         
597         Initiate full repaint on fill layer, when the image is generated and the background
598         property defines auto size.
599         http://www.w3.org/TR/css3-background/#background-size
600         'If the image has neither an intrinsic width nor an intrinsic height, its size is determined as for 'contain'.'
601
602         Extended fast/repaint/background-shorthand-with-gradient-and-height-changes.html
603         to cover this case too.
604
605         * rendering/RenderObject.cpp:
606         (WebCore::mustRepaintFillLayers):
607
608 2013-04-11  ChangSeok Oh  <changseok.oh@collabora.com>
609
610         [GTK][AC] use a smart pointer for GList and ClutterCanvas
611         https://bugs.webkit.org/show_bug.cgi?id=114057
612
613         Reviewed by Gustavo Noronha Silva.
614
615         We can make simple code & prevent possible memory leak by using a proper smart pointer.
616         Especially if we get children by clutter_actor_get_children, we should free it after using.
617
618         No functionality changed.
619
620         * platform/graphics/clutter/GraphicsLayerActor.cpp:
621         (graphicsLayerActorUpdateTexture):
622         (graphicsLayerActorRemoveAll):
623
624 2013-04-11  Arvid Nilsson  <anilsson@rim.com>
625
626         [BlackBerry][CSS Filters] Blur filter fails to recompute blur size when layer size changes
627         https://bugs.webkit.org/show_bug.cgi?id=114272
628
629         Reviewed by Rob Buis.
630
631         Blur appeared blocky or pixelated when surface changed size after
632         creating the filter actions. The initial image size was used to
633         determine the blur size (expressed in texture coordinate system).
634         Fixed by recomputing the blur size when the surface size changes, using
635         a new Uniform1f subclass that can use a functor to compute the uniform
636         value per-frame.
637
638         This fixes css3/filters/effect-blur-hw.html. This can only be verified
639         by manual inspection because the BlackBerry port is not currently using
640         pixel tests.
641
642         PR 323730
643
644         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
645         (WebCore):
646         (SurfaceFunctor):
647         (WebCore::SurfaceFunctor::SurfaceFunctor):
648         (InverseSurfaceWidth):
649         (WebCore::InverseSurfaceWidth::InverseSurfaceWidth):
650         (WebCore::InverseSurfaceWidth::operator()):
651         (InverseSurfaceHeight):
652         (WebCore::InverseSurfaceHeight::InverseSurfaceHeight):
653         (WebCore::LayerFilterRenderer::actionsForOperations):
654         * platform/graphics/blackberry/LayerFilterRenderer.h:
655         (Uniform1f):
656         (WebCore):
657         (Uniform1fWithFunctor):
658         (WebCore::Uniform1fWithFunctor::create):
659         (WebCore::Uniform1fWithFunctor::Uniform1fWithFunctor):
660         (WebCore::Uniform1fWithFunctor::apply):
661         (WebCore::Uniform1f::createWithFunctor):
662
663 2013-04-11  Arvid Nilsson  <anilsson@rim.com>
664
665         [BlackBerry] Accelerated compositing debug rectangle incorrectly drawn for layers with surfaces
666         https://bugs.webkit.org/show_bug.cgi?id=114275
667
668         Reviewed by Carlos Garcia Campos.
669
670         The drawDebugBorder method was updated to mirror the logic in
671         compositeLayersRecursive, i.e. if we're compositing a surface to the
672         screen, use the transformed bounds stored in the surface. The bounds
673         stored in the layer should only be used when drawing the layer to the
674         surface.
675
676         Speaking of which, also update the code to skip border drawing when
677         drawing a layer to a surface. Drawing the borders inside the surface
678         would only result in messing up the surface contents, especially when
679         CSS filters like blur were the reason for having a surface in the first
680         place - the border would be blurred and hard to discern.
681
682         Only manually testable, the debug border is disabled during layout
683         tests.
684
685         PR 323746
686
687         * platform/graphics/blackberry/LayerRenderer.cpp:
688         (WebCore::LayerRenderer::drawDebugBorder):
689         * platform/graphics/blackberry/LayerRendererSurface.cpp:
690         (WebCore::LayerRendererSurface::drawRect):
691         (WebCore::LayerRendererSurface::transformedBounds): Added.
692         (WebCore):
693         * platform/graphics/blackberry/LayerRendererSurface.h:
694         (LayerRendererSurface):
695
696 2013-04-11  Arvid Nilsson  <anilsson@rim.com>
697
698         [BlackBerry] Compiler warning in LayerWebKitThread.cpp
699         https://bugs.webkit.org/show_bug.cgi?id=114277
700
701         Reviewed by Carlos Garcia Campos.
702
703         All the relevant WTF::Vector APIs use size_t, storing the position in
704         an int resulted in a compiler warning. Fixed by switching to size_t.
705
706         No change in behavior, no new tests.
707
708         PR 323753
709
710         * platform/graphics/blackberry/LayerWebKitThread.cpp:
711         (WebCore::LayerWebKitThread::remove):
712         (WebCore::LayerWebKitThread::replaceSublayer):
713
714 2013-04-11  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
715
716         [CoordinatedGraphics] Use ScrollingStateTree to handle fixed elements positioning while scrolling
717         https://bugs.webkit.org/show_bug.cgi?id=114353
718
719         Reviewed by Noam Rosenthal.
720         
721         ScrollingCoordinatorCoordinatedGraphics should implement threaded scrolling interface and
722         re-use threaded scrolling approach (ScrollingStateTree and ViewportConstraints) to handle
723         fixed/sticky elements positioning while scrolling. The rationals are below.
724
725         Before the change ScrollingCoordinatorCoordinatedGraphics was implementing Chromium-specific
726         interface which is going to be removed eventually as there is no ScrollingCoordinatorChromium
727         existing.
728
729         Tested by existing manual tests (fixed-position.html for example.
730
731         * CMakeLists.txt:
732         * Target.pri:
733             Included ScrollingStateTree files.
734
735         * page/scrolling/ScrollingStateFixedNode.cpp:
736         * page/scrolling/ScrollingStateFixedNode.h:
737         * page/scrolling/ScrollingStateNode.cpp:
738         * page/scrolling/ScrollingStateNode.h:
739         * page/scrolling/ScrollingStateScrollingNode.cpp:
740         * page/scrolling/ScrollingStateScrollingNode.h:
741         * page/scrolling/ScrollingStateStickyNode.cpp:
742         * page/scrolling/ScrollingStateStickyNode.h:
743         * page/scrolling/ScrollingStateTree.cpp:
744         * page/scrolling/ScrollingStateTree.h:
745             Removed ENABLE(THREADED_SCROLLING) code guards.
746
747         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
748         (WebCore::ScrollingCoordinatorCoordinatedGraphics::ScrollingCoordinatorCoordinatedGraphics):
749         (WebCore::ScrollingCoordinatorCoordinatedGraphics::~ScrollingCoordinatorCoordinatedGraphics):
750         (WebCore):
751         (WebCore::ScrollingCoordinatorCoordinatedGraphics::attachToStateTree):
752         (WebCore::ScrollingCoordinatorCoordinatedGraphics::detachFromStateTree):
753         (WebCore::ScrollingCoordinatorCoordinatedGraphics::clearStateTree):
754         (WebCore::ScrollingCoordinatorCoordinatedGraphics::updateViewportConstrainedNode):
755         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
756             ScrollingCoordinatorCoordinatedGraphics is using threaded scrolling approach to handle fixed
757             elements positioning while scrolling.
758
759         (WebCore):
760         (ScrollingCoordinatorCoordinatedGraphics):
761         * page/scrolling/coordinatedgraphics/ScrollingStateNodeCoordinatedGraphics.cpp: Added.
762         (WebCore):
763         (WebCore::ScrollingStateNode::platformScrollLayer):
764         (WebCore::ScrollingStateNode::setScrollPlatformLayer):
765         (WebCore::ScrollingStateNode::setScrollLayer):
766         * page/scrolling/coordinatedgraphics/ScrollingStateScrollingNodeCoordinatedGraphics.cpp: Added.
767         (WebCore):
768         (WebCore::ScrollingStateScrollingNode::counterScrollingPlatformLayer):
769         (WebCore::ScrollingStateScrollingNode::setCounterScrollingLayer):
770
771 2013-04-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
772
773         [Qt] EventHandler should handle Space and BackSpace 
774         https://bugs.webkit.org/show_bug.cgi?id=114428
775
776         Reviewed by Jocelyn Turcotte.
777
778         Enable default space-handling for Qt.
779
780         * page/EventHandler.cpp:
781
782 2013-04-11  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
783
784         IconDatabase: Simplify boolean logic in assertion.
785         https://bugs.webkit.org/show_bug.cgi?id=114425
786
787         Reviewed by Andreas Kling.
788
789         Follow-up to r148097; drop the overzealous use of !! to turn a
790         PassRefPtr into a boolean.
791
792         * loader/icon/IconDatabase.cpp:
793         (WebCore::IconDatabase::updateIconRecord):
794
795 2013-04-11  Arvid Nilsson  <anilsson@rim.com>
796
797         [BlackBerry] LayerTexture refactoring
798         https://bugs.webkit.org/show_bug.cgi?id=114276
799
800         Reviewed by Carlos Garcia Campos.
801
802         Remove the GpuHandle and HostType typedefs from LayerTexture, they
803         don't make any sense now that we removed the Skia code paths. With Skia
804         they used to be an OpenGL texture ID and an SkBitmap respectively, but
805         now it's just BlackBerry::Platform::Graphics::Buffer all around.
806
807         This allows us to rename textureId() into buffer() which is more to the
808         point. The texture ID concept is now up for grabs and can be used to
809         consolidate all the various code for extracting an OpenGL texture from
810         a BlackBerry::Platform::Graphics::Buffer. This opportunity is seized in
811         LayerTexture::platformTexture(), a name which makes more sense than
812         textureId() for anyone familiar with the GraphicsContext3D code. We can
813         also leverage the Platform3DObject typedef to avoid including gl2.h.
814
815         The vertex attribute state was getting trampled when interacting with
816         BlackBerry::Platform::Graphics in the LayerFilterRenderer. Some
817         additional GL state save/restore incantations when accessing the OpenGL
818         texture for a LayerTexture in the new LayerTexture::platformTexture()
819         method fixes various CSS Filters test cases.
820
821         Since we removed the Skia integration from LayerTiler, nobody cares
822         about the dirty rect, tile rect or opaqueness of the tile contents. So
823         remove those parameters from the updateContents code path.
824
825         No change in behavior except for fixing CSS Filters tests like
826         css3/filters/effect-blur-hw.html. This can only be verified by manually
827         looking at the tests, we don't have pixel test support to catch this
828         kind of regression.
829
830         PR 322882
831
832         * platform/graphics/blackberry/LayerCompositingThread.cpp:
833         (WebCore::LayerCompositingThread::drawSurface):
834         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
835         (WebCore::LayerFilterRenderer::ping):
836         (WebCore::LayerFilterRenderer::pong):
837         (WebCore::LayerFilterRenderer::pushSnapshot):
838         (WebCore::LayerFilterRenderer::popSnapshot):
839         (WebCore::LayerFilterRenderer::applyActions):
840         * platform/graphics/blackberry/LayerRenderer.cpp:
841         (WebCore::LayerRenderer::useSurface):
842         * platform/graphics/blackberry/LayerTexture.cpp:
843         (WebCore::LayerTexture::LayerTexture):
844         (WebCore::LayerTexture::updateContents):
845         (WebCore::LayerTexture::setContentsToColor):
846         (WebCore::LayerTexture::protect):
847         (WebCore::LayerTexture::platformTexture):
848         (WebCore):
849         * platform/graphics/blackberry/LayerTexture.h:
850         (WebCore::LayerTexture::isDirty):
851         (WebCore::LayerTexture::buffer):
852         (LayerTexture):
853         (WebCore::LayerTexture::setBuffer):
854         * platform/graphics/blackberry/LayerTile.cpp:
855         (WebCore::LayerTile::setContents):
856         (WebCore::LayerTile::updateContents):
857         * platform/graphics/blackberry/LayerTile.h:
858         (WebCore::LayerTile::hasTexture):
859         (LayerTile):
860         * platform/graphics/blackberry/LayerTiler.cpp:
861         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
862         (WebCore::LayerTiler::uploadTexturesIfNeeded):
863         (WebCore::LayerTiler::performTileJob):
864         (WebCore::LayerTiler::drawTile):
865         * platform/graphics/blackberry/LayerTiler.h:
866         (WebCore::LayerTiler::TextureJob::TextureJob):
867         (WebCore::LayerTiler::TextureJob::setContents):
868         (WebCore::LayerTiler::TextureJob::updateContents):
869         (TextureJob):
870         (LayerTiler):
871         * platform/graphics/blackberry/TextureCacheCompositingThread.cpp:
872         (WebCore::TextureCacheCompositingThread::createBuffer):
873         (WebCore::TextureCacheCompositingThread::collectGarbage):
874         (WebCore::TextureCacheCompositingThread::install):
875         (WebCore::TextureCacheCompositingThread::resizeTexture):
876         (WebCore::TextureCacheCompositingThread::evict):
877         (WebCore::TextureCacheCompositingThread::textureForContents):
878         (WebCore::TextureCacheCompositingThread::updateContents):
879         * platform/graphics/blackberry/TextureCacheCompositingThread.h:
880         (TextureCacheCompositingThread):
881         (WebCore::TextureCacheCompositingThread::ZombieTexture::ZombieTexture):
882         (ZombieTexture):
883
884 2013-04-11  Alberto Garcia  <agarcia@igalia.com>
885
886         [BlackBerry] RenderThemeBlackBerry: upstream missing code
887         https://bugs.webkit.org/show_bug.cgi?id=114343
888
889         Reviewed by Xan Lopez.
890
891         Add implementations of sliderTickSize() and
892         sliderTickOffsetFromTrackCenter(), as well as a missing header.
893
894         * platform/blackberry/RenderThemeBlackBerry.cpp:
895         (WebCore):
896         (WebCore::RenderThemeBlackBerry::sliderTickSize):
897         (WebCore::RenderThemeBlackBerry::sliderTickOffsetFromTrackCenter):
898         * platform/blackberry/RenderThemeBlackBerry.h:
899         (RenderThemeBlackBerry):
900
901 2013-04-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
902
903         HitTestRequest::AllowFrameScrollbars does not test main frame scrollbar
904         https://bugs.webkit.org/show_bug.cgi?id=112563
905
906         Reviewed by Antonio Gomes.
907
908         Move the frame scrollbar testing from RenderPart to RenderView, so that it is
909         tested by all frame and not just child frames. At the same time remove the 
910         main frame test from the one current callsite using the option.
911
912         Tested by fast/events/touch/gesture/gesture-scrollbar.html.
913
914         * page/EventHandler.cpp:
915         (WebCore::EventHandler::handleGestureEvent):
916         * rendering/RenderPart.cpp:
917         (WebCore::RenderPart::nodeAtPoint):
918         * rendering/RenderView.cpp:
919         (WebCore::RenderView::hitTest):
920
921 2013-04-11  Rune Lillesveen  <rune@opera.com>
922
923         Incorrect evaluation of resolution media queries
924         https://bugs.webkit.org/show_bug.cgi?id=114029
925
926         Reviewed by Kenneth Rohde Christiansen.
927
928         The implementation used the physical resolution to evaluate the
929         resolution media features. Changed to use the actual CSS resolution,
930         also known as the device-pixel-ratio, instead. Unified the code for
931         evaluating the resolution and device-pixel-ratio media features.
932
933         No new tests, covered by existing tests.
934
935         * WebCore.exp.in:
936         * css/CSSPrimitiveValue.h:
937         (WebCore::CSSPrimitiveValue::isResolution):
938         * css/MediaQueryEvaluator.cpp:
939         (WebCore::evalResolution):
940         (WebCore::device_pixel_ratioMediaFeatureEval):
941         (WebCore::resolutionMediaFeatureEval):
942         * page/Screen.cpp:
943         * page/Screen.h:
944         * page/Settings.cpp:
945         (WebCore):
946         * page/Settings.h:
947         (Settings):
948         * testing/InternalSettings.cpp:
949         (WebCore::InternalSettings::Backup::Backup):
950         (WebCore::InternalSettings::Backup::restoreTo):
951         * testing/InternalSettings.h:
952         (Backup):
953         (InternalSettings):
954         * testing/InternalSettings.idl:
955
956 2013-04-11  Carlos Garcia Campos  <cgarcia@igalia.com>
957
958         FrameLoaderClient::assignIdentifierToInitialRequest() not called for the main resource when loaded from the memory cache
959         https://bugs.webkit.org/show_bug.cgi?id=112418
960
961         Reviewed by Darin Adler.
962
963         When the main resource is loaded from the memory cache the
964         response is not added to the ResponseVector of the document
965         loader, so that when committing the provisional load the remaining
966         delegate messages are not called because the ResponseVector of the
967         document loader is empty. When the main resource is loaded from
968         the memory cache, there's no resource loader, and the client is
969         notified about the response received using
970         ResourceLoadNotifier::dispatchDidReceiveResponse() directly
971         instead of ResourceLoadNotifier::didReceiveResponse() which is the
972         one adding the response to the ResponseVector of the document
973         loader. So, the problem can be fixed by adding the response to the
974         ResponseVector before calling dispatchDidReceiveResponse() when
975         loading the main resource without a resource loade
976
977         Test: loader/go-back-cached-main-resource.html
978
979         * loader/DocumentLoader.cpp:
980         (WebCore::DocumentLoader::responseReceived):
981
982 2013-04-10  Alexey Proskuryakov  <ap@apple.com>
983
984         Remove some includes of CachedImage.h
985         https://bugs.webkit.org/show_bug.cgi?id=114411
986
987         Reviewed by Dan Bernstein.
988
989         * css/CSSCrossfadeValue.h: Initializing CachedResourceHandle with 0 requires a
990         definition of a class it holds, but default construction does not.
991
992         * rendering/RenderImageResource.cpp:
993         * rendering/RenderImageResource.h:
994         Moved definitions of virtual functions to a .cpp file. There is no win from having
995         them inline, and now we don't need CachedImage.h in the header.
996
997         * bindings/js/JSNodeCustom.cpp:
998         * dom/Clipboard.cpp:
999         (WebCore::Clipboard::Clipboard):
1000         * platform/mac/ClipboardMac.h:
1001         * rendering/InlineFlowBox.cpp:
1002         * rendering/RenderBox.cpp:
1003         * rendering/RenderListItem.cpp:
1004         * rendering/RenderListMarker.cpp:
1005         * rendering/RenderTableCol.cpp:
1006         * rendering/RenderTableRow.cpp:
1007         * rendering/RenderTableSection.cpp:
1008         * svg/graphics/SVGImageCache.cpp:
1009         Removed unnecessary includes.
1010
1011         * platform/mac/PasteboardMac.mm:
1012         * rendering/RenderSnapshottedPlugIn.cpp:
1013         Added ones where they are now necessary.
1014
1015 2013-04-10  No'am Rosenthal  <noam@webkit.org>
1016
1017         Allow direct compositing of background images
1018         https://bugs.webkit.org/show_bug.cgi?id=108203
1019
1020         Reviewed by Simon Fraser.
1021
1022         Use setContentsToImage for background images, if the GraphicsLayer has only a background
1023         bitmap image and nothing else. Compute the contentsRect/contentsTileRect from the box model.
1024         Added new properties to GraphicsLayer, contentsTilePhase and contentsTileSize, which controls the "single tile rect",
1025         which allows us to compute the pattern-space transform of a tile, thus allowing background-size
1026         and other characteristics of background images.
1027
1028         This feature is explicitly disabled when there is any composition with a background color or if
1029         there are several background images, as in that case having a single backing store has some
1030         advantages over directly compositing in hardware.
1031
1032         Currently, this feature is disabled for all ports, allowing ports to implement their backend
1033         and decide when to enable it.
1034
1035         Note that RenderBoxModelObject::getGeometryForBackgroundImage crops the contents rect to the 
1036         area that contains the tiles, which allows us to assume full tiling in GraphicsLayer.
1037         In this way contentsTileSize/Phase is equivalent to GraphicsContext::drawTiledImage.
1038
1039         Tests: compositing/patterns/direct-pattern-compositing-add-text.html
1040                compositing/patterns/direct-pattern-compositing-change.html
1041                compositing/patterns/direct-pattern-compositing-contain.html
1042                compositing/patterns/direct-pattern-compositing-cover.html
1043                compositing/patterns/direct-pattern-compositing-load.html
1044                compositing/patterns/direct-pattern-compositing-padding.html
1045                compositing/patterns/direct-pattern-compositing-position.html
1046                compositing/patterns/direct-pattern-compositing-rotation.html
1047                compositing/patterns/direct-pattern-compositing-size.html
1048                compositing/patterns/direct-pattern-compositing.html
1049
1050         * platform/graphics/GraphicsLayer.h:
1051         (GraphicsLayer):
1052         (WebCore::GraphicsLayer::setContentsTileSize):
1053         (WebCore::GraphicsLayer::setContentsTilePhase):
1054         (WebCore::GraphicsLayer::contentsTileSize):
1055         (WebCore::GraphicsLayer::contentsTilePhase):
1056         (WebCore::GraphicsLayer::supportsContentsTiling):
1057                 Add a contentsTileRect property that enables tile-repeat of background images.
1058
1059         * rendering/RenderBox.cpp:
1060         (WebCore::RenderBox::imageChanged):
1061                 Pass background image changes to the layer backing.
1062
1063         * rendering/RenderBoxModelObject.cpp:
1064         * rendering/RenderBoxModelObject.h:
1065         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
1066                 Expose a function that performs the geometry calculations needed to determine 
1067                 the tileRect for a background image. This function is also responsible
1068                 for cropping the contentsRect to fit the area that is drawn into.
1069
1070         * rendering/RenderLayerBacking.h:
1071         * rendering/RenderLayerBacking.cpp:
1072         (WebCore::RenderLayerBacking::contentChanged):
1073         (WebCore::RenderLayerBacking::updateGraphicsLayerConfiguration):
1074         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1075         (WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
1076         (WebCore::RenderLayerBacking::resetContentsRect):
1077         (WebCore::hasBoxDecorationsOrBackgroundImage):
1078         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor):
1079         (WebCore::canCreateTiledImage):
1080         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
1081         (WebCore::backgroundRectForBox):
1082                 Allow background images to be directly composited if conditions allow (see bug description).
1083
1084 2013-04-10  Patrick Gansterer  <paroga@webkit.org>
1085
1086         Replace ENABLE_LEGACY_WEB_AUDIO preprocessor statements in IDL files with Conditional attribute
1087         https://bugs.webkit.org/show_bug.cgi?id=114351
1088
1089         Reviewed by Ryosuke Niwa.
1090
1091         The Conditional attribute does not need a preprocessor, which is source of much pain on native windows.
1092
1093         * Modules/webaudio/AudioBufferSourceNode.idl:
1094         * Modules/webaudio/AudioContext.idl:
1095         * Modules/webaudio/AudioParam.idl:
1096         * Modules/webaudio/OscillatorNode.idl:
1097
1098 2013-04-10  Patrick Gansterer  <paroga@webkit.org>
1099
1100         Replace ENABLE_DIRECTORY_UPLOAD preprocessor statements in IDL files with Conditional attribute
1101         https://bugs.webkit.org/show_bug.cgi?id=114350
1102
1103         Reviewed by Ryosuke Niwa.
1104
1105         The Conditional attribute does not need a preprocessor, which is source of much pain on native windows.
1106
1107         * fileapi/File.idl:
1108
1109 2013-04-10  Ryosuke Niwa  <rniwa@webkit.org>
1110
1111         Cleanup local variables in Editor::markAndReplaceFor
1112         https://bugs.webkit.org/show_bug.cgi?id=114383
1113
1114         Reviewed by Enrica Casucci.
1115
1116         Added resultEndLocation, which is the sum of resultLocation and resultLength.
1117
1118         Also replaced ambiguousBoundaryOffset by useAmbiguousBoundaryOffset since the ambiguous offset is always
1119         selectionOffset -1 to avoid the extra house keeping and obnoxious -1 check.
1120
1121         * editing/Editor.cpp:
1122         (WebCore::Editor::markAndReplaceFor):
1123
1124 2013-04-10  Benjamin Poulain  <bpoulain@apple.com>
1125
1126         Mass remove all the empty directories
1127
1128         Rubberstamped by Ryosuke Niwa.
1129
1130         * Modules/intents: Removed.
1131         * Modules/protocolhandler: Removed.
1132         * Modules/speech/mac: Removed.
1133         * accessibility/efl: Removed.
1134         * accessibility/gtk: Removed.
1135         * bridge/jni/jsc: Removed.
1136         * editing/android: Removed.
1137         * editing/gtk: Removed.
1138         * history/android: Removed.
1139         * page/android: Removed.
1140         * platform/android: Removed.
1141         * platform/clutter: Removed.
1142         * platform/graphics/blackberry/skia: Removed.
1143         * platform/graphics/harfbuzz/ng: Removed.
1144         * platform/graphics/pango: Removed.
1145         * platform/image-decoders/cg: Removed.
1146         * platform/image-decoders/qt: Removed.
1147         * platform/network/android: Removed.
1148         * platform/network/soup/cache/webkit: Removed.
1149         * platform/text/android: Removed.
1150         * platform/text/wince: Removed.
1151         * platform/track: Removed.
1152
1153 2013-04-10  Simon Fraser  <simon.fraser@apple.com>
1154
1155         Log when the animation timer fires
1156         https://bugs.webkit.org/show_bug.cgi?id=114393
1157
1158         Reviewed by Dean Jackson.
1159
1160         Logging to the Animations log channel when the updateAnimationTimer
1161         fires is useful, because it indicates whether we're running
1162         software animations.
1163
1164         * page/animation/AnimationController.cpp:
1165         (WebCore::AnimationControllerPrivate::updateAnimationTimer):
1166
1167 2013-04-10  Beth Dakin  <bdakin@apple.com>
1168
1169         Inspector highlights are offset when the WKView has a header
1170         https://bugs.webkit.org/show_bug.cgi?id=114389
1171         -and corresponding-
1172         <rdar://problem/13522434>
1173
1174         Reviewed by Sam Weinig.
1175
1176         rootViewToContents() and contentsToRootView() need to factor in the 
1177         headerHeight(), much like windowToContents() and contentsToWindow() do already. 
1178         * platform/ScrollView.cpp:
1179         (WebCore::ScrollView::rootViewToContents):
1180         (WebCore::ScrollView::contentsToRootView):
1181
1182 2013-04-10  Simon Fraser  <simon.fraser@apple.com>
1183
1184         Flesh out the Animations logging
1185         https://bugs.webkit.org/show_bug.cgi?id=114388
1186
1187         Reviewed by Dean Jackson.
1188
1189         Log state changes and transition/animation creation and destruction
1190         to the Animations log channel.
1191
1192         * page/animation/AnimationBase.cpp:
1193         (WebCore::nameForState):
1194         (WebCore::AnimationBase::updateStateMachine):
1195         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
1196         (WebCore::AnimationBase::goIntoEndingOrLoopingState):
1197         (WebCore::AnimationBase::freezeAtTime):
1198         * page/animation/CompositeAnimation.cpp:
1199         (WebCore::CompositeAnimation::updateTransitions):
1200         (WebCore::CompositeAnimation::updateKeyframeAnimations):
1201         * page/animation/KeyframeAnimation.h:
1202         (WebCore::KeyframeAnimation::keyframes):
1203         (KeyframeAnimation):
1204
1205 2013-04-10  Alexey Proskuryakov  <ap@apple.com>
1206
1207         <rdar://problem/13047266> External XML entities are not loaded with modern libxml2
1208         https://bugs.webkit.org/show_bug.cgi?id=114377
1209
1210         Reviewed by Darin Adler.
1211
1212         Covered by http/tests/security/xss-DENIED-xml-external-entity.xhtml when using
1213         new enough libxml2.
1214
1215         * xml/parser/XMLDocumentParserLibxml2.cpp:
1216         (WebCore::switchToUTF16): Added a FIXME with an idea for improvement.
1217         (WebCore::XMLParserContext::createStringParser): Apply XML_PARSE_NOENT in a non-hacky
1218         way, so that the new libxml2 check doesn't fail.
1219         (WebCore::XMLParserContext::createMemoryParser): Updated an unhelpful and incorrect
1220         comment (XML_PARSE_NODICT actually means "Do not reuse the context dictionary").
1221
1222 2013-04-10  Eric Carlson  <eric.carlson@apple.com>
1223
1224         [Mac] in-band tracks sometimes not recognized
1225         https://bugs.webkit.org/show_bug.cgi?id=114380
1226
1227         Reviewed by Jer Noble.
1228
1229         No new tests, covered by existing in-band tests.
1230
1231         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1232         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Don't call selectMediaOption,
1233             availableMediaCharacteristicsWithMediaSelectionOptions is unlikely to be loaded at this time.
1234         (WebCore::MediaPlayerPrivateAVFoundationObjC::processTextTracks): Disable automatic text track
1235             selection.
1236         (WebCore::assetMetadataKeyNames): Watch for the status of availableMediaCharacteristicsWithMediaSelectionOptions
1237             to change.
1238
1239 2013-04-10  Hans Muller  <hmuller@adobe.com>
1240
1241         [CSS Exclusions] Zoom causes shape-inside to fail when shape-padding is specified
1242         https://bugs.webkit.org/show_bug.cgi?id=113730
1243
1244         Reviewed by Dirk Schulze.
1245
1246         Snap computed margin and polygon boundaries to the LayoutUnit grid to ensure
1247         that they fall within the shape's LayoutUnit bounding box.
1248
1249         Test: fast/exclusions/shape-inside/shape-inside-polygon-zoom.html
1250
1251         * rendering/ExclusionPolygon.cpp:
1252         (WebCore::snapVerticesToLayoutUnitGrid): Convert the FloatPoint coordinates to LayoutUnits and then back to floats.
1253         (WebCore::computeShapePaddingBounds): Now calls snapVerticesToLayoutUnitGrid() before creating a FloatPolygon.
1254         (WebCore::computeShapeMarginBounds): Ditto.
1255
1256 2013-04-10  Csaba Osztrogonác  <ossy@webkit.org>
1257
1258         One more unreviewed buildfix after r148123.
1259
1260         * platform/graphics/filters/CustomFilterMeshGenerator.h:
1261
1262 2013-04-10  Beth Dakin  <bdakin@apple.com>
1263
1264         FindBanner matches are offset when the WKView has a header or footer
1265         https://bugs.webkit.org/show_bug.cgi?id=114314
1266         -and corresponding-
1267         <rdar://problem/13522434>
1268
1269         Reviewed by Simon Fraser.
1270
1271         There were already a few places in the code where we needed to adjust the 
1272         scrollOffset() to pretend that (0,0) is that the top of the Document rather than 
1273         the top of the header. To fix the FindBanner issues, we need to know that version 
1274         of the offset in a few more places, so I added a function on ScrollView to fetch 
1275         it called scrollOffsetRelativeToDocument().
1276
1277         New function subtracts out the headerHeight() to treat the top of 
1278         the document as (0,0).
1279         * WebCore.exp.in:
1280         * platform/ScrollView.cpp:
1281         (WebCore::ScrollView::scrollOffsetRelativeToDocument):
1282
1283         Use scrollOffsetRelativeToDocument() where we were previously making this 
1284         calculation. Also re-name an inaccurately named variable where we are actually 
1285         converting FROM a document offset to a ScrollableArea offset.
1286         (WebCore::ScrollView::windowToContents):
1287         * platform/ScrollView.h:
1288         (ScrollView):
1289
1290         getRectToExpose needs to know about the actual visibleContentRect and the 
1291         visibleContentRect that is relative to the Document. So this 
1292         patch adds a new parameter to getRectToExpose for that purpose.
1293         * rendering/RenderLayer.cpp:
1294         (WebCore::RenderLayer::scrollRectToVisible):
1295         (WebCore::RenderLayer::getRectToExpose):
1296         * rendering/RenderLayer.h:
1297
1298 2013-04-10  Chris Fleizach  <cfleizach@apple.com>
1299
1300         when ARIA button contains a link, label text is ignored (affects main buttons on m.facebook.com)
1301         https://bugs.webkit.org/show_bug.cgi?id=113906
1302
1303         Reviewed by Tim Horton.
1304
1305         If an element does not expose any children, then it's safe to include all of its sub children when determining
1306         the visible text.
1307         The bug is that all elements were ignoring focusable elements (like <a>) when determining visible children text
1308
1309         Test: accessibility/link-inside-button-accessible-text.html
1310
1311         * accessibility/AccessibilityNodeObject.cpp:
1312         (WebCore::shouldUseAccessiblityObjectInnerText):
1313         * accessibility/AccessibilityNodeObject.h:
1314         (AccessibilityNodeObject):
1315         * accessibility/AccessibilityObject.h:
1316         (WebCore::AccessibilityObject::isDescendantOfBarrenParent):
1317         (AccessibilityObject):
1318
1319 2013-04-10  Chris Fleizach  <cfleizach@apple.com>
1320
1321         AX: Make sure all AX methods called from outside call prepareAccessibility
1322         https://bugs.webkit.org/show_bug.cgi?id=113818
1323
1324         Reviewed by Darin Adler.
1325
1326         Make sure any calls that can be made from outside WebCore are protected with the
1327         prepareAccessibility method.
1328
1329         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1330         (-[WebAccessibilityObjectWrapper accessibilityMathRootIndexObject]):
1331         (-[WebAccessibilityObjectWrapper accessibilityMathRadicandObject]):
1332         (-[WebAccessibilityObjectWrapper accessibilityMathNumeratorObject]):
1333         (-[WebAccessibilityObjectWrapper accessibilityMathDenominatorObject]):
1334         (-[WebAccessibilityObjectWrapper accessibilityMathBaseObject]):
1335         (-[WebAccessibilityObjectWrapper accessibilityMathSubscriptObject]):
1336         (-[WebAccessibilityObjectWrapper accessibilityMathSuperscriptObject]):
1337         (-[WebAccessibilityObjectWrapper accessibilityMathUnderObject]):
1338         (-[WebAccessibilityObjectWrapper accessibilityMathOverObject]):
1339         (-[WebAccessibilityObjectWrapper accessibilityMathFencedOpenString]):
1340         (-[WebAccessibilityObjectWrapper accessibilityMathFencedCloseString]):
1341         (-[WebAccessibilityObjectWrapper accessibilityIsMathTopObject]):
1342         (-[WebAccessibilityObjectWrapper accessibilityMathType]):
1343
1344 2013-04-10  Csaba Osztrogonác  <ossy@webkit.org>
1345
1346         Unreviewed buildfix after r148123.
1347
1348         * inspector/InspectorInstrumentation.h:
1349         (WebCore):
1350
1351 2013-04-10  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1352
1353         Clicking on the volume slider of HTML5 elements is pausing sometimes
1354         https://bugs.webkit.org/show_bug.cgi?id=112548
1355
1356         Reviewed by Eric Carlson.
1357
1358         Test: media/click-volume-bar-not-pausing.html
1359
1360         * html/shadow/MediaControlElementTypes.cpp:
1361         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler):
1362         Calling the setDefaultHandled() method on the event prevents it
1363         from being incorrectly propagated from the volume button up to the
1364         MediaDocument.
1365
1366 2013-04-10  Arvid Nilsson  <anilsson@rim.com>
1367
1368         [BlackBerry] Rename BlackBerry specific Texture class
1369         https://bugs.webkit.org/show_bug.cgi?id=95781
1370
1371         Reviewed by Rob Buis.
1372
1373         Texture was a bit too generic and prone to name conflicts. Renamed it
1374         to LayerTexture.
1375
1376         No change in behavior, no new tests.
1377
1378         PR 322882
1379
1380         * PlatformBlackBerry.cmake:
1381         * platform/graphics/blackberry/LayerCompositingThread.cpp:
1382         (WebCore::LayerCompositingThread::drawSurface):
1383         (WebCore::LayerCompositingThread::contentsTexture):
1384         * platform/graphics/blackberry/LayerCompositingThread.h:
1385         (LayerCompositingThread):
1386         * platform/graphics/blackberry/LayerCompositingThreadClient.h:
1387         (WebCore):
1388         (WebCore::LayerCompositingThreadClient::contentsTexture):
1389         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
1390         (WebCore::LayerFilterRenderer::applyActions):
1391         * platform/graphics/blackberry/LayerFilterRenderer.h:
1392         (LayerFilterRenderer):
1393         * platform/graphics/blackberry/LayerRendererSurface.h:
1394         (WebCore::LayerRendererSurface::texture):
1395         (LayerRendererSurface):
1396         * platform/graphics/blackberry/LayerTexture.cpp: Renamed from Source/WebCore/platform/graphics/blackberry/Texture.cpp.
1397         (WebCore):
1398         (WebCore::LayerTexture::LayerTexture):
1399         (WebCore::LayerTexture::~LayerTexture):
1400         (WebCore::LayerTexture::updateContents):
1401         (WebCore::LayerTexture::setContentsToColor):
1402         (WebCore::LayerTexture::protect):
1403         * platform/graphics/blackberry/LayerTexture.h: Renamed from Source/WebCore/platform/graphics/blackberry/Texture.h.
1404         (WebCore):
1405         (LayerTexture):
1406         (WebCore::LayerTexture::create):
1407         (WebCore::LayerTexture::textureId):
1408         (WebCore::LayerTexture::isDirty):
1409         (WebCore::LayerTexture::hasTexture):
1410         (WebCore::LayerTexture::isColor):
1411         (WebCore::LayerTexture::isOpaque):
1412         (WebCore::LayerTexture::isProtected):
1413         (WebCore::LayerTexture::protect):
1414         (WebCore::LayerTexture::unprotect):
1415         (WebCore::LayerTexture::size):
1416         (WebCore::LayerTexture::width):
1417         (WebCore::LayerTexture::height):
1418         (WebCore::LayerTexture::bytesPerPixel):
1419         (WebCore::LayerTexture::sizeInBytes):
1420         (WebCore::LayerTexture::setTextureId):
1421         (WebCore::LayerTexture::setSize):
1422         * platform/graphics/blackberry/LayerTile.cpp:
1423         (WebCore::LayerTile::setContents):
1424         (WebCore::LayerTile::updateContents):
1425         (WebCore::LayerTile::setTexture):
1426         * platform/graphics/blackberry/LayerTile.h:
1427         (WebCore::LayerTile::texture):
1428         (LayerTile):
1429         * platform/graphics/blackberry/LayerTiler.cpp:
1430         (WebCore::LayerTiler::drawTile):
1431         (WebCore::LayerTiler::contentsTexture):
1432         * platform/graphics/blackberry/LayerTiler.h:
1433         (LayerTiler):
1434         (WebCore::LayerTiler::TextureJob::TextureJob):
1435         (WebCore::LayerTiler::TextureJob::setContents):
1436         (WebCore::LayerTiler::TextureJob::updateContents):
1437         (TextureJob):
1438         * platform/graphics/blackberry/TextureCacheCompositingThread.cpp:
1439         (WebCore::TextureProtector::TextureProtector):
1440         (TextureProtector):
1441         (WebCore::TextureCacheCompositingThread::allocateTextureId):
1442         (WebCore::freeTextureId):
1443         (WebCore::TextureCacheCompositingThread::textureResized):
1444         (WebCore::TextureCacheCompositingThread::textureSizeInBytesChanged):
1445         (WebCore::TextureCacheCompositingThread::textureDestroyed):
1446         (WebCore::TextureCacheCompositingThread::install):
1447         (WebCore::TextureCacheCompositingThread::resizeTexture):
1448         (WebCore::TextureCacheCompositingThread::evict):
1449         (WebCore::TextureCacheCompositingThread::textureAccessed):
1450         (WebCore::TextureCacheCompositingThread::prune):
1451         (WebCore::TextureCacheCompositingThread::textureForTiledContents):
1452         (WebCore::TextureCacheCompositingThread::textureForColor):
1453         (WebCore::TextureCacheCompositingThread::updateContents):
1454         * platform/graphics/blackberry/TextureCacheCompositingThread.h:
1455         (WebCore::TextureCacheCompositingThread::createTexture):
1456         (TextureCacheCompositingThread):
1457         (WebCore::TextureCacheCompositingThread::ZombieTexture::ZombieTexture):
1458         (ZombieTexture):
1459
1460 2013-04-10  Andreas Kling  <akling@apple.com>
1461
1462         Disallow programmatic movement of the browser window while user gestures are in progress.
1463         <http://webkit.org/b/114271>
1464         <rdar://problem/13226530>
1465
1466         Reviewed by Oliver Hunt.
1467
1468         * page/DOMWindow.cpp:
1469         (WebCore::DOMWindow::moveBy):
1470         (WebCore::DOMWindow::moveTo):
1471         (WebCore::DOMWindow::resizeBy):
1472         (WebCore::DOMWindow::resizeTo):
1473
1474 2013-04-10  Ryosuke Niwa  <rniwa@webkit.org>
1475
1476         Refactor Editor::markAndReplaceFor before fixing autocorrection bugs
1477         https://bugs.webkit.org/show_bug.cgi?id=114344
1478
1479         Reviewed by Enrica Casucci.
1480
1481         This patch refactors Editor::markAndReplaceFor so that we can start fixing bugs in a sane state.
1482         Extracted isAutomaticTextReplacementType and correctSpellcheckingPreservingTextCheckingParagraph,
1483         and made convenience local variables const.
1484
1485         In particular, shouldMarkSpelling used to be assigned of false when shouldShowCorrectionPanel was true
1486         in a middle of a function but this was removed in favor of explicitly checking this condition later
1487         since shouldMarkSpelling was only referenced once after the assignment.
1488
1489         * editing/Editor.cpp:
1490         (WebCore::isAutomaticTextReplacementType): Extracted.
1491
1492         (WebCore::correctSpellcheckingPreservingTextCheckingParagraph): Extracted.  Used highestAncestor
1493         and rangeFromLocationAndLength to match the rest of the up-to-date editing code.
1494
1495         (WebCore::Editor::markAndReplaceFor): See above.
1496
1497 2013-04-08  Anders Carlsson  <andersca@apple.com>
1498
1499         Remove unneeded headers from FrameLoader.h
1500         https://bugs.webkit.org/show_bug.cgi?id=114223
1501
1502         Reviewed by Geoffrey Garen.
1503
1504         Remove unneeded headers from FrameLoader.h and add them back into the respective .cpp files where needed.
1505
1506         * dom/Document.cpp:
1507         * history/CachedFrame.cpp:
1508         * history/PageCache.cpp:
1509         * inspector/InspectorResourceAgent.cpp:
1510         * loader/DocumentLoader.cpp:
1511         * loader/FrameLoader.cpp:
1512         (WebCore::FrameLoader::FrameLoader):
1513         (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
1514         * loader/FrameLoader.h:
1515         (WebCore):
1516         (WebCore::FrameLoader::policyChecker):
1517         (WebCore::FrameLoader::history):
1518         (WebCore::FrameLoader::icon):
1519         * loader/MixedContentChecker.h:
1520         * loader/icon/IconLoader.cpp:
1521         * page/History.cpp:
1522         * page/Page.cpp:
1523         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1524         * testing/Internals.cpp:
1525
1526 2013-04-10  Simon Fraser  <simon.fraser@apple.com>
1527
1528         Minor code cleanup in AnimationBase::progress
1529         https://bugs.webkit.org/show_bug.cgi?id=114371
1530
1531         Reviewed by Dean Jackson.
1532
1533         Convert some "return; else if" to just "return; if".
1534
1535         * page/animation/AnimationBase.cpp:
1536         (WebCore::AnimationBase::progress):
1537
1538 2013-04-10  Robert Hogan  <robert@webkit.org>
1539
1540         Empty inline continuations should only get lineboxes if the padding applies to their side of the inline
1541         https://bugs.webkit.org/show_bug.cgi?id=113896
1542
1543         Reviewed by David Hyatt.
1544
1545         Test: fast/inline/inline-with-empty-inline-continuations.html
1546
1547         Where an empty inline is split across anonymous blocks we should only give lineboxes to the 'sides' of the
1548         inline that have borders, padding or margin.
1549
1550         * rendering/RenderBlockLineLayout.cpp:
1551         (WebCore::shouldApplyStartBorderPaddingOrMargin):
1552         (WebCore):
1553         (WebCore::shouldApplyEndBorderPaddingOrMargin):
1554         (WebCore::hasInlineDirectionBordersPaddingOrMargin):
1555         (WebCore::alwaysRequiresLineBox):
1556
1557 2013-04-10  Zoltan Horvath  <zoltan@webkit.org>
1558
1559         [CSS Exclusions] Increasing padding does not correctly layout child blocks
1560         https://bugs.webkit.org/show_bug.cgi?id=112929
1561
1562         Reviewed by David Hyatt.
1563
1564         If a child block has changed dimension inside a shape and it has affected the block siblings
1565         we need to relayout the content inside the shape.
1566
1567         Test: fast/exclusions/shape-inside/shape-inside-sibling-block-dimension-change-needs-relayout.html
1568
1569         * rendering/RenderBlock.cpp:
1570         (WebCore::RenderBlock::updateRegionsAndExclusionsAfterChildLayout): Add condition for dimension change.
1571         (WebCore::RenderBlock::layoutBlock): Call updateRegionsAndExclusionsAfterChildLayout with the new parameter.
1572         * rendering/RenderBlock.h:
1573         (RenderBlock): Add extra parameter to updateRegionsAndExclusionsAfterChildLayout(...)
1574
1575 2013-04-10  Geoffrey Garen  <ggaren@apple.com>
1576
1577         Removed bitrotted TimeoutChecker code
1578         https://bugs.webkit.org/show_bug.cgi?id=114336
1579
1580         Reviewed by Alexey Proskuryakov.
1581
1582         This mechanism hasn't worked for a while.
1583
1584         MarkL is working on a new version of this feature with a distinct
1585         implementation.
1586
1587         * bindings/js/JSCallbackData.cpp:
1588         (WebCore::JSCallbackData::invokeCallback):
1589         * bindings/js/JSCustomXPathNSResolver.cpp:
1590         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1591         * bindings/js/JSDOMWindowBase.cpp:
1592         (WebCore::JSDOMWindowBase::commonJSGlobalData):
1593         * bindings/js/JSErrorHandler.cpp:
1594         (WebCore::JSErrorHandler::handleEvent):
1595         * bindings/js/JSEventListener.cpp:
1596         (WebCore::JSEventListener::handleEvent):
1597         * bindings/js/JSMutationCallback.cpp:
1598         (WebCore::JSMutationCallback::call):
1599         * bindings/js/ScheduledAction.cpp:
1600         (WebCore::ScheduledAction::executeFunctionInContext):
1601         * bindings/js/ScriptController.cpp:
1602         (WebCore::ScriptController::evaluateInWorld):
1603         * bindings/js/SerializedScriptValue.cpp:
1604         (WebCore::CloneBase::CloneBase):
1605         (WebCore::CloneSerializer::serialize):
1606         (WebCore::CloneDeserializer::deserialize):
1607         * bindings/js/WorkerScriptController.cpp:
1608         (WebCore::WorkerScriptController::evaluate):
1609         * bindings/objc/WebScriptObject.mm:
1610         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1611         (-[WebScriptObject evaluateWebScript:]):
1612
1613 2013-04-10  Patrick Gansterer  <paroga@webkit.org>
1614
1615         Replace ENABLE_JAVASCRIPT_DEBUGGER preprocessor statements in IDL files with Conditional attribute
1616         https://bugs.webkit.org/show_bug.cgi?id=114352
1617
1618         Reviewed by Timothy Hatcher.
1619
1620         The Conditional attribute does not need a preprocessor, which is source of much pain on native windows.
1621
1622         * page/Console.idl:
1623
1624 2013-04-10  Alexandru Chiculita  <achicu@adobe.com>
1625
1626         Layers with opacity and blur filters are reported as opaque to the compositor
1627         https://bugs.webkit.org/show_bug.cgi?id=114295
1628
1629         Reviewed by Simon Fraser.
1630
1631         Test: compositing/contents-opaque/filter.html
1632
1633         Some filters like opacity and blur might still trigger transparency in the layer, even though the
1634         background is opaque. I've added the special case in RenderLayer::backgroundIsKnownToBeOpaqueInRect to check
1635         for filters that might have transparency. Note that this special case is required only for software drawn
1636         filters, as the transparency is going to be backed in the GraphicsLayer content. Composited filters can
1637         figure it out in the compositor.
1638
1639         * rendering/RenderLayer.cpp:
1640         (WebCore::RenderLayer::backgroundIsKnownToBeOpaqueInRect):
1641
1642 2013-04-10  Noam Rosenthal  <noam@webkit.org>
1643
1644         [Texmap] In certain situations nested blending with overflow:hidden displays clipped results
1645         https://bugs.webkit.org/show_bug.cgi?id=114290
1646
1647         Reviewed by Allan Sandfeld Jensen.
1648
1649         Always apply the clip when binding a surface, even if it hasn't changed.
1650         Otherwise when binding a nested surface and rebinding its container surface,
1651         the clip wouldn't apply.
1652
1653         Test: compositing/overlap-blending/nested-overlap-overflow.html
1654
1655         * platform/graphics/texmap/TextureMapperGL.cpp:
1656         (WebCore::BitmapTextureGL::bind):
1657
1658 2013-04-10  Antti Koivisto  <antti@apple.com>
1659
1660         Use minimal tiles during live resize
1661         https://bugs.webkit.org/show_bug.cgi?id=114364
1662
1663         Reviewed by Darin Adler.
1664
1665         We currently update non-visible speculative tiles during resizing. We should just drop them.
1666
1667         * page/FrameView.cpp:
1668         (WebCore::FrameView::willStartLiveResize):
1669         (WebCore::FrameView::willEndLiveResize):
1670         * page/FrameView.h:
1671         * rendering/RenderLayerBacking.cpp:
1672         (WebCore::computeTileCoverage):
1673         
1674             Use minimal coverage in live resize state.
1675
1676 2013-04-10  Victor Costan  <costan@gmail.com>
1677
1678         Blob content type normalization.
1679         https://bugs.webkit.org/show_bug.cgi?id=111380
1680
1681         Reviewed by Alexey Proskuryakov.
1682
1683         Tests: http/tests/fast/files/blob-constructor.js
1684                http/tests/fileapi/xhr-send-form-data-filename-escaping.html
1685                http/tests/fileapi/xhr-send-form-data-mimetype-normalization.html
1686
1687         * WebCore.exp.in: exported Blob::isNormalizedContentType()
1688         * bindings/js/JSBlobCustom.cpp:
1689         (WebCore::JSBlobConstructor::constructJSBlob): remove checks on Blob type, BlobBuilder will normalize it
1690         * fileapi/Blob.cpp:
1691         (BlobType): utilities for normalizing a Blob's type according to the File API spec
1692         (WebCore::BlobType::isValid): content type validity checks in the File API spec
1693         (WebCore::BlobType::normalize): implements the normalization rules in the File API spec
1694         (WebCore::BlobType::isNormalized): useful for ASSERTing that a Blob type has been normalized
1695         (WebCore): implement Blob type normalization according to the File API spec
1696         (WebCore::Blob::Blob): normalize the Blob type in the data URL
1697         (WebCore::Blob::slice): normalize the Blob type argument
1698         * fileapi/Blob.h:
1699         (BlobType): utilities for normalizing a Blob's type according to the File API spec
1700         (WebCore::Blob::create): assert that the deserialized Blob's type was normalized
1701         * fileapi/File.cpp:
1702         (WebCore::createBlobDataForFileWithType): assert that the File's MIME type is a normalized Blob type
1703         * fileapi/WebKitBlobBuilder.cpp:
1704         (WebCore::BlobBuilder::getBlob): normalize the Blob's type before building it
1705         * platform/network/BlobData.h:
1706         (WebCore::BlobData::setContentType): assert that the Blob type has been normalized
1707         * platform/network/FormData.cpp:
1708         (WebCore::FormData::appendKeyValuePairItems): assert that Blob's type has been normalized
1709         * platform/network/FormDataBuilder.cpp:
1710         (WebCore::FormDataBuilder::addContentTypeToMultiPartHeader): assert that the Content-Type field is normalized
1711         * xml/XMLHttpRequest.cpp: when responseType is blob, normalize Content-Type before passing to Blob constructor
1712
1713 2013-04-10  Tim Horton  <timothy_horton@apple.com>
1714
1715         TileController doesn't remove tiles when the view is resized, leading to stale content
1716         https://bugs.webkit.org/show_bug.cgi?id=114323
1717         <rdar://problem/13520671>
1718
1719         Reviewed by Simon Fraser.
1720
1721         Ensure that tiles are removed if the view shrinks, so that they are not displayed
1722         with stale content if the view later grows again (they will not be repainted by WebCore
1723         while out-of-view).
1724
1725         * platform/graphics/ca/mac/TileController.h:
1726         * platform/graphics/ca/mac/TileController.mm:
1727         (WebCore::TileController::revalidateTiles):
1728
1729 2013-04-10  Jessie Berlin  <jberlin@apple.com>
1730
1731         Update the localizable strings file.
1732
1733         Rubber-stamped by Dan Bernstein.
1734
1735         * English.lproj/Localizable.strings:
1736
1737 2013-04-10  Patrick Gansterer  <paroga@webkit.org>
1738
1739         Replace ENABLE_CHANNEL_MESSAGING preprocessor statements in IDL files with Conditional attribute
1740         https://bugs.webkit.org/show_bug.cgi?id=114346
1741
1742         Reviewed by Geoffrey Garen.
1743
1744         The Conditional attribute does not need a preprocessor, which is source of much pain on native windows.
1745
1746         * page/DOMWindow.idl:
1747         * workers/WorkerContext.idl:
1748
1749 2013-04-10  Eric Carlson  <eric.carlson@apple.com>
1750
1751         Update all float attributes in HTMLMediaElement to double
1752         https://bugs.webkit.org/show_bug.cgi?id=113615
1753
1754         Reviewed by Geoffrey Garen
1755         Patch by Aaron Colwell
1756
1757         No new tests. Primary behavior doesn't change. Just time, playbackRate, and volume precision.
1758         All existing LayoutTests/media tests still pass.
1759
1760         * WebCore.exp.in: Remove function that no longer need to be exported.
1761
1762         * html/HTMLMediaElement.cpp: Change all float attributes to double.
1763         * html/HTMLMediaElement.h: Ditto.
1764         * html/HTMLMediaElement.idl: Ditto.
1765         * html/MediaController.cpp: Ditto.
1766         * html/MediaController.h: Ditto.
1767         * html/MediaControllerInterface.h: Ditto.
1768         * html/TimeRanges.cpp: Ditto.
1769         * html/TimeRanges.idl: Ditto.
1770         * html/shadow/MediaControlElementTypes.cpp: Ditto.
1771         * html/shadow/MediaControlElementTypes.h: Ditto.
1772         * html/shadow/MediaControlElements.cpp: Ditto.
1773         * html/shadow/MediaControlElements.h: Ditto.
1774         * html/shadow/MediaControls.cpp: Ditto.
1775         * html/shadow/MediaControlsApple.cpp: Ditto.
1776         * html/shadow/MediaControlsBlackBerry.cpp: Ditto.
1777         * html/shadow/MediaControlsBlackBerry.h: Ditto.
1778         * html/shadow/MediaControlsGtk.cpp: Ditto.
1779         * html/track/TextTrackCue.cpp: Ditto.
1780         * html/track/TextTrackCue.h: Ditto.
1781         * platform/Clock.h: Ditto.
1782         * platform/ClockGeneric.cpp: Ditto.
1783         * platform/ClockGeneric.h: Ditto.
1784         * platform/graphics/MediaPlayer.cpp: Ditto.
1785         * platform/graphics/MediaPlayer.h: Ditto.
1786         * platform/graphics/MediaPlayerPrivate.h: Ditto.
1787         * platform/mac/PlatformClockCA.cpp: Ditto.
1788         * platform/mac/PlatformClockCA.h: Ditto.
1789         * platform/mac/PlatformClockCM.h: Ditto.
1790         * platform/mac/PlatformClockCM.mm: Ditto.
1791
1792 2013-04-10  Patrick Gansterer  <paroga@webkit.org>
1793
1794         Replace ENABLE_MICRODATA preprocessor statements in IDL files with Conditional attribute
1795         https://bugs.webkit.org/show_bug.cgi?id=114349
1796
1797         Reviewed by Geoffrey Garen.
1798
1799         The Conditional attribute does not need a preprocessor, which is source of much pain on native windows.
1800
1801         * dom/Document.idl:
1802         * html/HTMLElement.idl:
1803
1804 2013-04-10  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
1805
1806         REGRESSION(r148034): IconDatabase::updateIconRecord crashes with null iconData and iconBitmap.
1807         https://bugs.webkit.org/show_bug.cgi?id=114356
1808
1809         Reviewed by Tim Horton.
1810
1811         When loading an icon fails (for example, when a non-existent URI is
1812         passed to the loader), updateIconRecord can be called with both
1813         iconData and iconBitmap having no data.
1814
1815         This used to be fine before r148034, but causes an assertion now.
1816
1817         No new tests, existing tests such as fast/encoding/mispositioned-meta.html
1818         were crashing.
1819
1820         * loader/icon/IconDatabase.cpp:
1821         (WebCore::IconDatabase::updateIconRecord): Change the ASSERT() to check
1822         for a NAND condition that only fails if both iconData and iconBitmap
1823         are not 0.
1824
1825 2013-04-10  JungJik Lee  <jungjik.lee@samsung.com>
1826
1827         [Texmap] Update a dirty region which is not covered with keepRect.
1828         https://bugs.webkit.org/show_bug.cgi?id=113752
1829
1830         Reviewed by Jocelyn Turcotte.
1831
1832         There can be a dirty region which is not covered with keepRect. 
1833         However the dirty could be inside the tile area. In this case, 
1834         currently we ignore the dirty by intersecting with keepRect 
1835         and the dirty region will not be invalidated until the tile is 
1836         recreated. We must expand the keep rect to its intersecting tiles 
1837         to make sure that the dirty region is applied to existing tiles. 
1838
1839         No tests needed, change is unobservable.
1840
1841         * platform/graphics/TiledBackingStore.cpp:
1842         (WebCore::TiledBackingStore::invalidate):
1843
1844 2013-04-10  Laszlo Gombos  <l.gombos@samsung.com>
1845
1846         Remove ENABLE_3D_PLUGIN
1847         https://bugs.webkit.org/show_bug.cgi?id=108002
1848
1849         Remove ENABLE_3D_PLUGIN, it was only used by Chromium.
1850
1851         Reviewed by Antti Koivisto.
1852
1853         No new tests, removing dead code.
1854
1855         * loader/SubframeLoader.cpp:
1856         (WebCore::SubframeLoader::loadPlugin):
1857
1858 2013-04-10  Noam Rosenthal  <noam@webkit.org>
1859
1860         [Texmap] Hierarchy of layers with opacity may result in wrong blending.
1861         https://bugs.webkit.org/show_bug.cgi?id=113732
1862
1863         Reviewed by Allan Sandfeld Jensen.
1864
1865         This is a combination of three issues with nested intermediate surfaces:
1866         - glScissor inside an intermediate surface should not be mirrored.
1867         - The current surface should be passed to the next surface in paintOptions.
1868         - When clipping for the non-overlap region, the containing surface offset 
1869         should be applied.
1870
1871         Though the changes are separate, they cannot be tested separately as neither
1872         fixes a testable case on its own. 
1873
1874         Tests: compositing/overlap-blending/nested-non-overlap-clipping.html
1875                compositing/overlap-blending/nested-overlap.html
1876
1877         * platform/graphics/texmap/TextureMapperGL.cpp:
1878         (WebCore::TextureMapperGL::ClipStack::reset):
1879         (WebCore::TextureMapperGL::ClipStack::apply):
1880         (WebCore::TextureMapperGL::beginPainting):
1881         (WebCore::BitmapTextureGL::clearIfNeeded):
1882         * platform/graphics/texmap/TextureMapperGL.h:
1883         (ClipStack):
1884             Do not mirror the scissor clip when painting to an FBO.
1885             Also a minor refactor to avoid reading the viewport values from the driver.
1886
1887         * platform/graphics/texmap/TextureMapperLayer.cpp:
1888         (WebCore::TextureMapperLayer::paintUsingOverlapRegions):
1889             Apply the offset when clipping for a non-overlap region.
1890         (WebCore::TextureMapperLayer::paintIntoSurface):
1891             Make sure the current surface is passed to the next one.
1892
1893 2013-04-10  Antti Koivisto  <antti@apple.com>
1894
1895         Create fewer tiles when page is loading
1896         https://bugs.webkit.org/show_bug.cgi?id=114294
1897
1898         Reviewed by Anders Carlsson.
1899
1900         We currently create speculative tiles immediately. Page is often changing rapidly during loading and
1901         keeping the speculative tiles up to date creates extra work.
1902         
1903         Tests: platform/mac-wk2/tiled-drawing/tile-coverage-after-scroll-speculative.html
1904                platform/mac-wk2/tiled-drawing/tile-coverage-speculative.html
1905         
1906        * loader/FrameLoader.cpp:
1907         (WebCore::FrameLoader::loadProgressingStatusChanged):
1908         * page/FrameView.cpp:
1909         (WebCore::FrameView::adjustTiledBackingCoverage):
1910         (WebCore::FrameView::setWasScrolledByUser):
1911         
1912             User scrolling enables speculative tiling no matter what the load status.
1913
1914         * page/FrameView.h:
1915         * rendering/RenderLayerBacking.cpp:
1916         (WebCore::computeTileCoverage):
1917         (WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
1918         
1919             Cover only the viewport during loading.
1920
1921 2013-04-10  Alberto Garcia  <agarcia@igalia.com>
1922
1923         [BlackBerry] RenderThemeBlackBerry: get rid of all the SKIA code
1924         https://bugs.webkit.org/show_bug.cgi?id=114339
1925
1926         Reviewed by Carlos Garcia Campos.
1927
1928         * platform/blackberry/RenderThemeBlackBerry.cpp:
1929         (WebCore::RenderThemeBlackBerry::paintMediaSliderTrack):
1930         (WebCore::RenderThemeBlackBerry::paintMediaSliderThumb):
1931         (WebCore::RenderThemeBlackBerry::paintMediaVolumeSliderTrack):
1932         (WebCore::RenderThemeBlackBerry::paintMediaVolumeSliderThumb):
1933
1934 2013-04-10  Zan Dobersek  <zdobersek@igalia.com>
1935
1936         REGRESSION (r147719): Failures in two a11y tests on GTK
1937         https://bugs.webkit.org/show_bug.cgi?id=114259
1938
1939         Reviewed by Ryosuke Niwa.
1940
1941         No new tests - covered by existing tests.
1942
1943         Partially revert r147719, restoring the possible creation of the AXObject cache 
1944         and the subsequent call to its handleFocusedUIElementChanged method. Removing this
1945         code caused regressions in accessibility tests on the GTK port, so the comment about
1946         the AXObject cache is adjusted accordingly.
1947
1948         * dom/Document.cpp:
1949         (WebCore::Document::setFocusedNode):
1950
1951 2013-04-09  Philippe Normand  <pnormand@igalia.com>
1952
1953         [GStreamer] playbin uri getter is invalid
1954         https://bugs.webkit.org/show_bug.cgi?id=113884
1955
1956         Reviewed by Martin Robinson.
1957
1958         When loading a new media location use the url stored as a member
1959         variable instead of the one stored as a playbin property. The uri
1960         property semantic changed in playbin since 0.10.36+. One should
1961         now use current-uri but to avoid ifdefs depending on GStreamer
1962         version we simply use the url already known as member variable.
1963
1964         Test: http/tests/media/video-redirect.html
1965
1966         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1967
1968 2013-04-09  Geoffrey Garen  <ggaren@apple.com>
1969
1970         [JSC] Script run from an isolated world should bypass a page's CSP
1971         https://bugs.webkit.org/show_bug.cgi?id=100815
1972
1973         Reviewed by Oliver Hunt.
1974
1975         * bindings/js/ScriptController.cpp:
1976         (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
1977         * bindings/js/ScriptController.h: Test the current caller's DOM wrapper
1978         world to decide whether CSP should be enforced.
1979
1980         Like most of CSP, this is a stupid policy because it doesn't address
1981         second-order effects like <script> parsing or event handler execution,
1982         which might be triggered indirectly by privileged scripts. These indirect
1983         effects are still broken. Oh well.
1984
1985 2013-04-09  Benjamin Poulain  <bpoulain@apple.com>
1986
1987         Remove chromium exceptions from WebCore's gitattributes
1988         https://bugs.webkit.org/show_bug.cgi?id=114327
1989
1990         Reviewed by Darin Adler.
1991
1992         * .gitattributes:
1993
1994 2013-04-09  Adam Klein  <adamk@chromium.org>
1995
1996         Update Document's event listener type bitfield when adopting a Node
1997         https://bugs.webkit.org/show_bug.cgi?id=114322
1998
1999         Reviewed by Darin Adler.
2000
2001         Without this, moving a Node between documents can silently deactivate
2002         an event listener, if it's one of the types that whose creation is
2003         optimized away by Document::hasListenerType.
2004
2005         An alternate approach would be to simply copy the old document's
2006         bitfield over. It's a tradeoff between making adoption fast and making
2007         the operation of any operation depending on these event types fast.
2008         The latter seems like the right optimization given that adoption
2009         doesn't happen very often.
2010
2011         Test: fast/events/event-listener-moving-documents.html
2012
2013         * dom/Node.cpp:
2014         (WebCore::Node::didMoveToNewDocument): For each event listener type on the adopted node, update the new document's list of listener types.
2015
2016 2013-04-09  Dean Jackson  <dino@apple.com>
2017
2018         Add logging channel for animations
2019         https://bugs.webkit.org/show_bug.cgi?id=114325
2020
2021         Reviewed by Simon Fraser.
2022
2023         * platform/Logging.cpp: Add LogAnimations.
2024         (WebCore::getChannelFromName): Return LogAnimations for "Animations".
2025         * platform/Logging.h: Add LogAnimations.
2026         * platform/mac/LoggingMac.mm:
2027         (WebCore::initializeLoggingChannelsIfNecessary): Copy preference.
2028         * platform/win/LoggingWin.cpp:
2029         (WebCore::initializeLoggingChannelsIfNecessary): Copy preference.
2030
2031 2013-04-09  Dongwoo Joshua Im  <dw.im@samsung.com>
2032
2033         [CSS3] Parsing the property, text-justify.
2034         https://bugs.webkit.org/show_bug.cgi?id=100058
2035
2036         Reviewed by Andreas Kling.
2037
2038         This patch implements the parsing side of the "text-justify" property specified
2039         in CSS3 working draft, with "-webkit-" prefix, under ENABLE_CSS3_TEXT flag.
2040         Specification link : http://www.w3.org/TR/css3-text/#text-justify
2041
2042         Tests: fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify-inherited.html
2043                fast/css3-text/css3-text-justify/getComputedStyle/getComputedStyle-text-justify.html
2044
2045         * css/CSSComputedStyleDeclaration.cpp:
2046         (WebCore):
2047         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2048         * css/CSSParser.cpp:
2049         (WebCore::isValidKeywordPropertyAndValue):
2050         (WebCore::isKeywordPropertyID):
2051         (WebCore::CSSParser::parseValue):
2052         * css/CSSPrimitiveValueMappings.h:
2053         (WebCore):
2054         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2055         (WebCore::CSSPrimitiveValue::operator TextJustify):
2056         * css/CSSProperty.cpp:
2057         (WebCore::CSSProperty::isInheritedProperty):
2058         * css/CSSPropertyNames.in:
2059         * css/CSSValueKeywords.in:
2060         * css/StyleBuilder.cpp:
2061         (WebCore::StyleBuilder::StyleBuilder):
2062         * css/StylePropertySet.cpp:
2063         (WebCore):
2064         * css/StyleResolver.cpp:
2065         (WebCore::StyleResolver::applyProperty):
2066         * rendering/style/RenderStyle.h:
2067         * rendering/style/RenderStyleConstants.h:
2068         * rendering/style/StyleRareInheritedData.cpp:
2069         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2070         (WebCore::StyleRareInheritedData::operator==):
2071         * rendering/style/StyleRareInheritedData.h:
2072         (StyleRareInheritedData):
2073
2074 2013-04-09  Joone Hur  <joone.hur@intel.com>
2075
2076         [GTK][AC] Adding contentsLayer for image and video
2077         https://bugs.webkit.org/show_bug.cgi?id=113912
2078
2079         Reviewed by Gustavo Noronha Silva.
2080
2081         contentsLayer is a ClutterActor, which is added to the main layer 
2082         as a child when GraphicsLayer needs to render an image or video. 
2083
2084         No new tests, already covered by existing AC tests.
2085
2086         * platform/graphics/clutter/GraphicsLayerActor.cpp:
2087         (graphicsLayerActorUpdateTexture):
2088         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2089         (WebCore::GraphicsLayerClutter::GraphicsLayerClutter):
2090         (WebCore::GraphicsLayerClutter::~GraphicsLayerClutter):
2091         (WebCore):
2092         (WebCore::GraphicsLayerClutter::setContentsToImage): Pass a Cairo surface to GraphicsLayer.
2093         (WebCore::GraphicsLayerClutter::setContentsNeedsDisplay):
2094         (WebCore::GraphicsLayerClutter::setContentsRect):
2095         (WebCore::GraphicsLayerClutter::commitLayerChangesBeforeSublayers):
2096         (WebCore::GraphicsLayerClutter::setupContentsLayer):
2097         (WebCore::GraphicsLayerClutter::updateContentsImage): Set the Cairo surface for contentsLayer 
2098         to upload it as a texture.
2099         (WebCore::GraphicsLayerClutter::updateContentsNeedsDisplay):
2100         (WebCore::GraphicsLayerClutter::updateContentsRect):
2101         (WebCore::GraphicsLayerClutter::updateSublayerList):
2102         * platform/graphics/clutter/GraphicsLayerClutter.h:
2103         (WebCore::GraphicsLayerClutter::hasContentsLayer):
2104         (GraphicsLayerClutter):
2105         (WebCore::GraphicsLayerClutter::contentsLayer):
2106
2107 2013-04-09  Alexey Proskuryakov  <ap@apple.com>
2108
2109         REGRESSION: Blob URLs broken with NetworkProcess
2110         https://bugs.webkit.org/show_bug.cgi?id=114320
2111
2112         Reviewed by Brady Eidson.
2113
2114         Update BlobResourceHandle to use modern resource client calls.
2115
2116         * platform/network/BlobResourceHandle.cpp:
2117         (WebCore::BlobResourceHandle::readSync): Don't call notifyReceiveData if there is
2118         no data (it's especially egregious when length is -1, signaling an error).
2119         (WebCore::BlobResourceHandle::notifyResponseOnSuccess): Use didReceiveResponseAsync
2120         when a client wants async callbacks. This is not very clean, as we don't wait
2121         for response, but should be workable for blobs.
2122         (WebCore::BlobResourceHandle::notifyResponseOnError): Ditto.
2123         (WebCore::BlobResourceHandle::notifyReceiveData): Use didReceiveBuffer (clients
2124         that only implement didReceiveData will have it automatically unwrapped).
2125
2126 2013-04-09  Jer Noble  <jer.noble@apple.com>
2127
2128         REGRESSION (r123837): Full screen transition is broken at apple.com
2129         https://bugs.webkit.org/show_bug.cgi?id=95650
2130
2131         Reviewed by Simon Fraser.
2132
2133         Cancel any outstanding animations on <video> elements as they enter full screen, so as to
2134         not confuse the WebKit/WebKit2 full screen window animation about the starting and destination
2135         screen rects.
2136
2137         * css/fullscreen.css:
2138         (video:-webkit-full-screen, audio:-webkit-full-screen):
2139
2140 2013-04-09  Jer Noble  <jer.noble@apple.com>
2141
2142         hang in mediaSelectionGroupForMediaCharacteristic
2143         https://bugs.webkit.org/show_bug.cgi?id=114054
2144
2145         Reviewed by Eric Carlson.
2146
2147         No new tests; Fixes sporadic hangs in media/ tests.
2148
2149         -[AVURLAsset mediaSelectionGroupForMediaCharacteristic:] can deadlock in certain situations: When AVURLAsset
2150         posts a synchronous AVAssetResourceLoader notification to the main thread, calling -mediaSelectionGroupForMediaCharacteristic:
2151         on the main thread requires IO to occur if the media characteristics are not yet loaded. Instead of blocking,
2152         bail out early if the media characteristics are not yet known.
2153         
2154         Add a new method, safeMediaSelectionGroupForLegibleMedia(), which first checks selection group availability
2155         before calling mediaSelectionGroupForMediaCharacteristic:.
2156
2157         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2158         (MediaPlayerPrivateAVFoundationObjC):
2159         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2160         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia): Added.
2161         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Use new safe method.
2162         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged): Ditto.
2163         (WebCore::MediaPlayerPrivateAVFoundationObjC::processTextTracks): Ditto.
2164         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Ditto.
2165
2166 2013-04-09  Chris Fleizach  <cfleizach@apple.com>
2167
2168         AX: Bounding paths should be made available through accessibility
2169         https://bugs.webkit.org/show_bug.cgi?id=113817
2170
2171         Unreviewed build fix for iOS.
2172
2173         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2174         (-[WebAccessibilityObjectWrapper _accessibilityPath]):
2175         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
2176
2177 2013-04-09  Eric Carlson  <eric.carlson@apple.com>
2178
2179         Unreviewed correctness fix: use lroundf instead of lround for a float to int conversion.
2180
2181         * html/shadow/MediaControlElements.cpp:
2182         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired):
2183
2184 2013-04-06  Roger Fong  <roger_fong@apple.com>
2185
2186         Change requisite hardware checks for enabling antialiasing.
2187         https://bugs.webkit.org/show_bug.cgi?id=114101
2188         <rdar://problem/12342776>.
2189
2190         m_maySupportMultisampling should be true by default for all platforms/hardware now except older versions of AMD.
2191
2192         Reviewed by Dean Jackson.
2193
2194         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2195         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
2196
2197 2013-04-09  Commit Queue  <rniwa@webkit.org>
2198
2199         Unreviewed, rolling out r148010.
2200         http://trac.webkit.org/changeset/148010
2201         https://bugs.webkit.org/show_bug.cgi?id=114310
2202
2203         Causes problems with focus rings (Requested by anttik on
2204         #webkit).
2205
2206         * css/StyleBuilder.cpp:
2207         (WebCore::ApplyPropertyComputeLength::applyValue):
2208         (WebCore::ApplyPropertyComputeLength::createHandler):
2209         (WebCore::StyleBuilder::StyleBuilder):
2210
2211 2013-04-09  Eric Carlson  <eric.carlson@apple.com>
2212
2213         Unreviewed, another fix for the Windows build after r148050.
2214
2215         * html/track/TextTrackCueGeneric.cpp:
2216         (WebCore::TextTrackCueGeneric::setFontSize): Use lround().
2217
2218 2013-04-09  Bem Jones-Bey  <bjonesbe@adobe.com>
2219
2220         [CSS Exclusions] Properly position multiple stacked floats with non rectangular shape outside
2221         https://bugs.webkit.org/show_bug.cgi?id=110372
2222
2223         Reviewed by Dean Jackson.
2224
2225         Stacked floats get positioned based on the bounding box of the shape,
2226         not on the shape contours itself. This patch causes that to happen.
2227
2228         Test: fast/exclusions/shape-outside-floats/shape-outside-floats-stacked.html
2229
2230         * rendering/RenderBlock.cpp:
2231         (WebCore::RenderBlock::computeLogicalLocationForFloat): Use the
2232             "BoundingBoxOffset" mode so that we compute offsets based on the shape
2233             bounding boxes of previous floats, not the shape contour.
2234         (WebCore::RenderBlock::logicalLeftOffsetForLine): Check the
2235             ShapeOutsideFloatOffsetMode to determine if the offset should be
2236             adjusted for the shape contour or not.
2237         (WebCore::RenderBlock::logicalRightOffsetForLine): Ditto.
2238         * rendering/RenderBlock.h:
2239         (WebCore::RenderBlock::logicalRightOffsetForLine): Add parameter for offset mode.
2240         (WebCore::RenderBlock::logicalLeftOffsetForLine): Ditto.
2241         (RenderBlock):
2242         * rendering/RenderBlockLineLayout.cpp:
2243         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): If the
2244             new float is being added on top of a previous float on the same line,
2245             undo the offset for the previous float's shape contour so that we
2246             position the new float based on the bounding box.
2247
2248 2013-04-09  Eric Carlson  <eric.carlson@apple.com>
2249
2250         Unreviewed, fix the Windows build after r148050.
2251
2252         * html/shadow/MediaControlElements.cpp:
2253         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Use lround().
2254
2255 2013-04-09  Tim Horton  <timothy_horton@apple.com>
2256
2257         [wk2] IconDatabase images should be decoded in the WebProcess
2258         ​https://bugs.webkit.org/show_bug.cgi?id=112524
2259         <rdar://problem/10133914>
2260
2261         Reviewed by Simon Fraser.
2262
2263         Move an ASSERT that dereferenced a pointer inside the null-check for that pointer.
2264
2265         * loader/icon/IconDatabase.cpp:
2266         (WebCore::IconDatabase::setIconBitmapForIconURL):
2267
2268 2013-04-09  Eric Carlson  <eric.carlson@apple.com>
2269
2270         [Mac] user caption styles not applied to correct element
2271         https://bugs.webkit.org/show_bug.cgi?id=114230
2272
2273         Reviewed by Jer Noble.
2274
2275         Test: media/track/track-css-user-override.html
2276
2277         * html/HTMLMediaElement.cpp:
2278         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Drive by clean-up so we don't log excessively.
2279
2280         * html/shadow/MediaControlElements.cpp:
2281         (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): Initialize
2282             new member variables.
2283         (WebCore::MediaControlTextTrackContainerElement::updateDisplay): Set cue font size when it is
2284             inserted into the tree.
2285         (WebCore::MediaControlTextTrackContainerElement::updateTimerFired): Update the font size of 
2286             all active cues.
2287         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Set size-relative CSS properties
2288             after a time because this can be called during layout.
2289         * html/shadow/MediaControlElements.h:
2290
2291         * html/shadow/MediaControls.cpp:
2292         (WebCore::MediaControls::textTrackPreferencesChanged): Call closedCaptionTracksChanged before updateSizes.
2293
2294         * html/track/TextTrackCue.cpp:
2295         (WebCore::TextTrackCue::setFontSize): New, set the cue's font size.
2296         * html/track/TextTrackCue.h:
2297
2298         * html/track/TextTrackCueGeneric.cpp:
2299         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): Set cue properties on the cue element
2300             instead of on the cue box to match what we do for the "cue" pseudo element.
2301         (WebCore::TextTrackCueGeneric::setFontSize): New, set the cue's font size.
2302         * html/track/TextTrackCueGeneric.h:
2303
2304         * html/track/TextTrackList.cpp:
2305         (TextTrackList::remove): Drive-by cleanup, don't ASSERT when the media element is NULL.
2306
2307         * page/CaptionUserPreferences.cpp:
2308         (WebCore::CaptionUserPreferences::setCaptionsStyleSheetOverride): New, allow user CSS overrides
2309             to be tested in DRT.
2310         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride): New, generate a user style
2311             sheet override. Moved here from CaptionUserPreferencesMac.
2312         * page/CaptionUserPreferences.h:
2313
2314         * page/CaptionUserPreferencesMac.h:
2315         * page/CaptionUserPreferencesMac.mm:
2316         (WebCore::CaptionUserPreferencesMac::captionsBackgroundCSS): Don't ignore background color importance.
2317         (WebCore::CaptionUserPreferencesMac::captionsStyleSheetOverride): Implement even when we don't 
2318             have the media accessibility framework so this can be tested in DRT. Apply all cue properties
2319             to the element used for the "cue" pseudo element.
2320
2321         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2322         (WebCore::MediaPlayerPrivateAVFoundation::didLoadingProgress): Drive-by cleanup, remove logging
2323             because this method is called so frequently and the logging is not especially useful.
2324         (WebCore::MediaPlayerPrivateAVFoundation::updateStates): Only log when the ready/network
2325             state changes because this method is called so frequently.
2326
2327         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2328         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer): Drive-by cleanup, remove logging
2329             because this method is called so frequently and the logging is not especially useful.
2330         (WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTrack): Make the logging more useful.
2331
2332         * testing/Internals.cpp:
2333         (WebCore::Internals::resetToConsistentState): Reset captions style sheet override.
2334         (WebCore::Internals::captionsStyleSheetOverride): New, return the captions style sheet override.
2335         (WebCore::Internals::setCaptionsStyleSheetOverride): New, override the captions style sheet override.
2336         * testing/Internals.h:
2337         * testing/Internals.idl:
2338
2339 2013-04-08  Simon Fraser  <simon.fraser@apple.com>
2340
2341         Repaint rect too small on elements with shadows
2342         https://bugs.webkit.org/show_bug.cgi?id=114225
2343
2344         Reviewed by Dain Adler.
2345         
2346         We assumed that shadows (box-shadow, text-shadow, svg shadows)
2347         only required inflating the repaint rect by the blur radius of
2348         the shadow. However, this is incorrect; the shadow can extend
2349         further, which resulted in clipped or incorrectly invalidated
2350         shadows.
2351         
2352         Fix by disambiguating the blur radius (which is 2x the standard
2353         deviation of the Gaussian distribution used to generate the blur),
2354         from the painting extent, which is how far the shadow visually
2355         projects. Using a 1.4 multiplier of the blur radius is a good
2356         approximation for the painting extent.
2357         
2358         Renamed ShadowData::blur() to ShadowData::radius(), and added
2359         ShadowData::paintingExtent(). Use the latter in all places
2360         which relate to invalidation.
2361
2362         Test: fast/box-shadow/shadow-repaint.html
2363
2364         * css/CSSComputedStyleDeclaration.cpp:
2365         (WebCore::CSSComputedStyleDeclaration::valueForShadow):
2366         * editing/mac/EditorMac.mm:
2367         (WebCore::Editor::fontAttributesForSelectionStart):
2368         * page/animation/CSSPropertyAnimation.cpp:
2369         (WebCore::blendFunc):
2370         * rendering/EllipsisBox.cpp:
2371         (WebCore::EllipsisBox::paint):
2372         * rendering/InlineTextBox.cpp:
2373         (WebCore::InlineTextBox::applyShadowToGraphicsContext):
2374         (WebCore::InlineTextBox::paintDecoration):
2375         * rendering/RenderBoxModelObject.cpp:
2376         (WebCore::applyBoxShadowForBackground):
2377         (WebCore::areaCastingShadowInHole):
2378         (WebCore::RenderBoxModelObject::paintBoxShadow):
2379         * rendering/style/RenderStyle.cpp:
2380         (WebCore::RenderStyle::getShadowExtent):
2381         (WebCore::RenderStyle::getShadowInsetExtent):
2382         (WebCore::RenderStyle::getShadowHorizontalExtent):
2383         (WebCore::RenderStyle::getShadowVerticalExtent):
2384         * rendering/style/ShadowData.cpp:
2385         (WebCore::ShadowData::ShadowData):
2386         (WebCore::ShadowData::operator==):
2387         (WebCore::calculateShadowExtent):
2388         * rendering/style/ShadowData.h:
2389         (WebCore::ShadowData::ShadowData):
2390         (WebCore::ShadowData::radius):
2391         (WebCore::ShadowData::paintingExtent):
2392         * rendering/svg/SVGRenderingContext.cpp:
2393         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
2394
2395 2013-04-08  Simon Fraser  <simon.fraser@apple.com>
2396
2397         window.internals.repaintRectsAsText() is hard to use because it doesn't force layout
2398         https://bugs.webkit.org/show_bug.cgi?id=114219
2399
2400         Reviewed by Beth Dakin.
2401
2402         Force layout when setTracksRepaints() is set to true, to flush out any pending
2403         repaints from a layout that hasn't happened yet. Also force layout in
2404         trackedRepaintRectsAsText(), so that any pending layout happpens and thus
2405         repaints.
2406
2407         * page/FrameView.cpp:
2408         (WebCore::FrameView::setTracksRepaints):
2409         (WebCore::FrameView::trackedRepaintRectsAsText):
2410
2411 2013-04-09  Chris Fleizach  <cfleizach@apple.com>
2412
2413         AX: Bounding paths should be made available through accessibility
2414         https://bugs.webkit.org/show_bug.cgi?id=113817
2415
2416         Unreviewed build fix (again).
2417
2418         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2419         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
2420
2421 2013-04-09  Chris Fleizach  <cfleizach@apple.com>
2422
2423         AX: Bounding paths should be made available through accessibility
2424         https://bugs.webkit.org/show_bug.cgi?id=113817
2425
2426         Unreviewed build fix.
2427
2428         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2429         (WebTransformCGPathToNSBezierPath):
2430
2431 2013-04-09  Chris Fleizach  <cfleizach@apple.com>
2432
2433         AX: Bounding paths should be made available through accessibility
2434         https://bugs.webkit.org/show_bug.cgi?id=113817
2435
2436         Reviewed by Tim Horton.
2437
2438         Minor fix from review feedback.
2439
2440         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2441         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
2442
2443 2013-04-09  Tim Horton  <timothy_horton@apple.com>
2444
2445         [wk2] IconDatabase images should be decoded in the WebProcess
2446         https://bugs.webkit.org/show_bug.cgi?id=112524
2447         <rdar://problem/10133914>
2448
2449         Reviewed by Oliver Hunt.
2450
2451         No testable behavior change.
2452
2453         * loader/icon/IconDatabase.cpp:
2454         (WebCore::IconDatabase::updateIconRecord):
2455         Added updateIconRecord, which factors most of setIconDataForIconURL out so it can
2456         be shared with setIconBitmapForIconURL. This function will set either a bitmap or
2457         raw image data for the given icon URL.
2458
2459         (WebCore::IconDatabase::setIconBitmapForIconURL):
2460         Added; make a copy of the bitmap for thread-safety purposes, and call updateIconRecord.
2461
2462         (WebCore::IconDatabase::setIconDataForIconURL):
2463         Factored out of what is now updateIconRecord.
2464
2465         * loader/icon/IconDatabase.h:
2466         (IconDatabase): Add setIconBitmapForIconURL and updateIconRecord.
2467
2468         * loader/icon/IconDatabaseBase.h:
2469         (WebCore::IconDatabaseBase::setIconBitmapForIconURL): Added.
2470         * loader/icon/IconRecord.cpp:
2471         (WebCore::IconRecord::setImage): Set the image for an icon record directly (as opposed
2472         to setting the image data, which causes the image to be decoded in the WebProcess).
2473         * loader/icon/IconRecord.h:
2474         (IconRecord): Add setImage.
2475
2476 2013-04-09  Chris Fleizach  <cfleizach@apple.com>
2477
2478         AX: The bounding paths should be made available through accessibility
2479         https://bugs.webkit.org/show_bug.cgi?id=113817
2480
2481         Reviewed by David Kilzer.
2482
2483         This allows bounding paths to be returned for some web elements (image map areas and SVG shapes).
2484         This provides more accuracy when assistive technologies highlight elements.
2485         The Mac and iOS platforms share some code to help transform paths to their screen coordinates.
2486
2487         Tests: platform/iphone-simulator/accessibility/element-paths.html
2488                platform/mac/accessibility/element-paths.html
2489
2490         * accessibility/AccessibilityImageMapLink.cpp:
2491         (WebCore::AccessibilityImageMapLink::imageMapLinkRenderer):
2492         (WebCore):
2493         (WebCore::AccessibilityImageMapLink::elementPath):
2494         (WebCore::AccessibilityImageMapLink::elementRect):
2495         * accessibility/AccessibilityImageMapLink.h:
2496         (AccessibilityImageMapLink):
2497         (WebCore::AccessibilityImageMapLink::supportsPath):
2498         * accessibility/AccessibilityObject.h:
2499         (WebCore::AccessibilityObject::elementPath):
2500         (WebCore::AccessibilityObject::supportsPath):
2501         * accessibility/AccessibilityRenderObject.cpp:
2502         (WebCore):
2503         (WebCore::AccessibilityRenderObject::supportsPath):
2504         (WebCore::AccessibilityRenderObject::elementPath):
2505         * accessibility/AccessibilityRenderObject.h:
2506         (AccessibilityRenderObject):
2507         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2508         (-[WebAccessibilityObjectWrapper _accessibilityPath]):
2509         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
2510         (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
2511         (-[WebAccessibilityObjectWrapper accessibilityActivationPoint]):
2512         (-[WebAccessibilityObjectWrapper accessibilityFrame]):
2513         (-[WebAccessibilityObjectWrapper frameForTextMarkers:]):
2514         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
2515         (WebCore):
2516         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
2517         (PathConversionInfo):
2518         (ConvertPathToScreenSpaceFunction):
2519         (-[WebAccessibilityObjectWrapperBase convertPathToScreenSpace:]):
2520         (-[WebAccessibilityObjectWrapperBase convertPointToScreenSpace:]):
2521         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2522         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2523         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
2524         (WebTransformCGPathToNSBezierPath):
2525         (-[WebAccessibilityObjectWrapper bezierPathFromPath:]):
2526         (-[WebAccessibilityObjectWrapper path]):
2527         (-[WebAccessibilityObjectWrapper position]):
2528         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2529
2530 2013-04-09  Benjamin Poulain  <bpoulain@apple.com>
2531
2532         Remove the WebKit copy of GLU and the file using it
2533         https://bugs.webkit.org/show_bug.cgi?id=114249
2534
2535         Reviewed by Darin Adler.
2536
2537         * platform/graphics/gpu/LoopBlinnPathProcessor.cpp: Removed.
2538
2539 2013-04-09  Andreas Kling  <akling@apple.com>
2540
2541         Throttle resize events during live window resize.
2542         <http://webkit.org/b/114292>
2543         <rdar://problem/13411454>
2544
2545         Reviewed by Geoffrey Garen.
2546
2547         Limit resize events to one at max every 0.2 seconds during live window resize.
2548         This mitigates heavy CPU usage during resize on pages with complex onresize handlers.
2549         If there's a pending resize event when the live resize ends, it fires immediately.
2550
2551         * page/FrameView.cpp:
2552         (WebCore::FrameView::sendResizeEvent):
2553
2554             Factored out dispatch of the resize event after layout so we can call it on a timer
2555             instead of immediately while live window resize is active.
2556
2557         (WebCore::FrameView::FrameView):
2558         (WebCore::FrameView::performPostLayoutTasks):
2559         (WebCore::FrameView::delayedResizeEventTimerFired):
2560         (WebCore::FrameView::willEndLiveResize):
2561         (WebCore::FrameView::scheduleResizeEvent):
2562         * page/FrameView.h:
2563         * platform/ScrollableArea.h:
2564
2565             Made willStartLiveResize() and willEndLiveResize() virtual so we can override
2566             them on FrameView.
2567
2568 2013-04-09  Jeff Rogers  <jrogers@rim.com>
2569
2570         Add webp to supported image mime types if WEBP feature is enabled/used
2571         https://bugs.webkit.org/show_bug.cgi?id=112819
2572
2573         Reviewed by Darin Adler.
2574
2575         Add WebP to list of supported image types in MIMETypeRegistry if enabled.
2576
2577         No new tests: WebP image decoding already covered by exisiting tests.
2578
2579         * platform/MIMETypeRegistry.cpp:
2580         (WebCore::initializeSupportedImageMIMETypes):
2581
2582 2013-04-09  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2583
2584         Whitespace in particular source code changes rendering; does not in Firefox
2585         https://bugs.webkit.org/show_bug.cgi?id=100943
2586
2587         Reviewed by Darin Adler.
2588
2589         A render inline which requires a line box is considered a possible
2590         trailing object. So, ensureLineBoxInsideIgnoredSpaces will be called
2591         for it, even if it is placed after a text render ending with a single
2592         space.
2593
2594         Tests: fast/text/whitespace/trailing-space-before-empty-span-1.html
2595                fast/text/whitespace/trailing-space-before-empty-span-2.html
2596
2597         * rendering/RenderBlockLineLayout.cpp:
2598         (TrailingObjects):
2599         (WebCore::TrailingObjects::appendBoxIfNeeded):
2600         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2601
2602 2013-04-09  Andrei Bucur  <abucur@adobe.com>
2603
2604         Use DOM ordering for list counts
2605         https://bugs.webkit.org/show_bug.cgi?id=110352
2606
2607         Reviewed by Elliott Sprehn.
2608
2609         Currently the list items ordering is made by traversing the render tree. This gives bad results for:
2610         - list items flown inside regions because they are not rendered as descendants of their DOM list ancestors.
2611         - list items matched to insertion points inside a shadow tree. The insertion point may be a child of a
2612         list so the numbering gets broken.
2613
2614         To implement correct DOM ordering I've taken into account the fact that pseudo-elements can have display: list-item
2615         so they should be included when traversing the DOM tree. I've added helper methods on the NodeTraversal
2616         namespace that should allow easily traversing the tree including the pseudo-elements (e.g. firstChildWithPseudo
2617         for an element with pseudo-before will return the before PseudoElement). Using these helper methods I've implemented
2618         pre-order traversal methods aware of the pseudo-elements.
2619         An effect of this change is how the list items inside shadow tree update their counting. With the patch, if there's
2620         no <ol> or <ul> element on the ancestor chain of a <li> element to the shadow root, the list node will be considered the
2621         first parent of the <li> or the shadow root if there is no ancestor.
2622         The RenderListItem class now makes use of this new method of traversal, replacing the one based on the render tree.
2623         To simplify the CSS counters implementation, I've changed the traversal functions inside RenderCounter to also make use
2624         of this method. The CSS counters and the list items now have the same traversal algorithm.
2625
2626         In later patches I'll add tests that should cover the regions and shadow DOM use cases.
2627         Tests bug for shadow DOM: https://bugs.webkit.org/show_bug.cgi?id=113193
2628         Tests bug for regions: https://bugs.webkit.org/show_bug.cgi?id=103975
2629
2630         Tests: no new tests is this patch; added the correct expectations for fast/lists/positioned-count-crash.html
2631         and fast/dom/shadow/shadow-and-list-elements.html
2632
2633         * dom/Node.cpp:
2634         (WebCore::Node::pseudoAwarePreviousSibling):
2635         (WebCore):
2636         (WebCore::Node::pseudoAwareNextSibling):
2637         (WebCore::Node::pseudoAwareFirstChild):
2638         (WebCore::Node::pseudoAwareLastChild):
2639         * dom/Node.h:
2640         (Node):
2641         * dom/NodeTraversal.cpp:
2642         (WebCore):
2643         (WebCore::NodeTraversal::previousIncludingPseudo):
2644         (NodeTraversal):
2645         (WebCore::NodeTraversal::nextIncludingPseudo):
2646         (WebCore::NodeTraversal::nextIncludingPseudoSkippingChildren):
2647         * dom/NodeTraversal.h:
2648         (ElementTraversal):
2649         (NodeTraversal):
2650         (WebCore::ElementTraversal::previousIncludingPseudo):
2651         (WebCore::ElementTraversal::nextIncludingPseudo):
2652         (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
2653         (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
2654         * html/HTMLLIElement.cpp:
2655         (WebCore::HTMLLIElement::attach):
2656         * html/HTMLOListElement.cpp:
2657         (WebCore::HTMLOListElement::updateItemValues):
2658         (WebCore::HTMLOListElement::recalculateItemCount):
2659         * rendering/RenderCounter.cpp:
2660         (WebCore::previousInPreOrder):
2661         (WebCore::previousSiblingOrParent):
2662         (WebCore::parentElement):
2663         (WebCore::nextInPreOrder):
2664         * rendering/RenderListItem.cpp:
2665         (WebCore):
2666         (WebCore::enclosingList):
2667         (WebCore::RenderListItem::nextListItem):
2668         (WebCore::previousListItem):
2669         (WebCore::RenderListItem::calcValue):
2670         (WebCore::RenderListItem::explicitValueChanged):
2671         (WebCore::previousOrNextItem):
2672         (WebCore::RenderListItem::updateListMarkerNumbers):
2673         * rendering/RenderListItem.h:
2674         (RenderListItem):
2675
2676 2013-04-09  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
2677
2678         [Texmap] TextureMapperLayer refactor for readiblity
2679         https://bugs.webkit.org/show_bug.cgi?id=114278
2680
2681         Reviewed by Noam Rosenthal.
2682
2683         Removes non-needed return values, function parameters and changes
2684         boolean values with enums for readibility.
2685
2686         No behavioral changes, thus no tests.
2687
2688         * platform/graphics/texmap/TextureMapperLayer.cpp:
2689         (WebCore::TextureMapperLayer::computeTransformsRecursive):
2690         (WebCore::TextureMapperLayer::paintSelf):
2691         (WebCore::TextureMapperLayer::sortByZOrder):
2692         (WebCore::TextureMapperLayer::computeOverlapRegions):
2693         (WebCore::TextureMapperLayer::paintUsingOverlapRegions):
2694         (WebCore::commitSurface):
2695         (WebCore::TextureMapperLayer::paintWithIntermediateSurface):
2696         (WebCore::TextureMapperLayer::paintRecursive):
2697         * platform/graphics/texmap/TextureMapperLayer.h:
2698         (TextureMapperLayer):
2699
2700 2013-04-09  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
2701
2702         [WebSocket] Ignore incoming message in CLOSING state
2703         https://bugs.webkit.org/show_bug.cgi?id=85934
2704
2705         Reviewed by Kent Tamura.
2706
2707         Change WebSocket implementation to suit the new WebSocket API, which
2708         states that we should ignore messages in CLOSING state.
2709
2710         No new tests, updating existing tests.
2711
2712         * Modules/websockets/WebSocket.cpp:
2713         (WebCore::WebSocket::didReceiveMessage):
2714
2715 2013-04-09  Seokju Kwon  <seokju.kwon@gmail.com>
2716
2717         Web Inspector: Add Localized strings after r144154 and r135127
2718         https://bugs.webkit.org/show_bug.cgi?id=114269
2719
2720         Reviewed by Timothy Hatcher.
2721
2722         No new tests, no behavior change.
2723
2724         * English.lproj/localizedStrings.js:
2725
2726 2013-04-09  Antti Koivisto  <antti@apple.com>
2727
2728         Throttle compositing layer flushes in subframes
2729         https://bugs.webkit.org/show_bug.cgi?id=114267
2730
2731         Reviewed by Andreas Kling.
2732
2733         Throttle compositing layer flushes in all frames, not just the main one.
2734         
2735         This especially reduces flushes/repaints generated by ads in iframes.
2736
2737         * loader/FrameLoader.cpp:
2738         (WebCore::FrameLoader::loadProgressingStatusChanged):
2739         * page/FrameView.cpp:
2740         (WebCore::FrameView::updateLayerFlushThrottlingInAllFrames):
2741         * page/FrameView.h:
2742
2743 2013-04-09  Suchit Agrawal  <a.suchit@samsung.com>
2744
2745         Table border doesn't show up
2746         https://bugs.webkit.org/show_bug.cgi?id=13709
2747
2748         Reviewed by Antti Koivisto.
2749
2750         Border issue is fixed when border width is less than 0.8pt
2751
2752         Border width is stored as unsigned. Border width (specified by
2753         author) is converted into pixels and some times this pixel value
2754         goes less than 1px. In this case, border width becomes 0px when
2755         pixel value (double type) assigned to unsigned type.
2756         Border width should not fall to 0px unless it is specified by
2757         author.
2758
2759         Test: fast/borders/border-width-less-then-a-unit-of-pt.html
2760
2761         * css/StyleBuilder.cpp:
2762         ApplyPropetyComputeLength class is replaced with 3 classes :
2763         ApplyPropertyComputeBorderWidth, ApplyPropertyComputeTextSpacing
2764         and ApplyPropertyComputeTransformOriginZ.
2765
2766         (WebCore::ApplyPropertyComputeBorderWidth::applyValue):
2767         (WebCore::ApplyPropertyComputeBorderWidth::createHandler):
2768         This class handles all width properties like border, outline,
2769         etc. These all properties stores value in integer types.
2770         Pixel value rounded of to 1px if value less than 1px and greater
2771         than 0px.
2772
2773         (WebCore):
2774         (ApplyPropertyComputeTextSpacing):
2775         (WebCore::ApplyPropertyComputeTextSpacing::setValue):
2776         (WebCore::ApplyPropertyComputeTextSpacing::applyValue):
2777         (WebCore::ApplyPropertyComputeTextSpacing::createHandler):
2778         This class handles all spacing properties like word-spacing,
2779         letter-spacing etc.
2780
2781         (ApplyPropertyComputeTransformOriginZ):
2782         (WebCore::ApplyPropertyComputeTransformOriginZ::setValue):
2783         (WebCore::ApplyPropertyComputeTransformOriginZ::applyValue):
2784         (WebCore::ApplyPropertyComputeTransformOriginZ::createHandler):
2785         This class handles TransformOriginZ Property.
2786
2787         (WebCore::StyleBuilder::StyleBuilder):
2788         ApplyProprtyComputeLength class usage changed with defined new
2789         classes as per class definition.
2790
2791 2013-04-09  Gabor Loki  <loki@webkit.org>
2792
2793         Initialization skipped error on WinCario after r147643
2794         https://bugs.webkit.org/show_bug.cgi?id=114258
2795
2796         Reviewed by Csaba Osztrogonác.
2797
2798         Build fix. Adding extra block statement to avoid error C2362 on WinCario
2799
2800         * platform/win/DragImageCairoWin.cpp:
2801         (WebCore::createDragImageFromImage):
2802
2803 2013-04-09  Jinwoo Song  <jinwoo7.song@samsung.com>
2804
2805         [WK2] Remove build warnings for unused parameters
2806         https://bugs.webkit.org/show_bug.cgi?id=114234
2807
2808         Reviewed by Andreas Kling.
2809
2810         Fix build warnings -Wunused-parameter.
2811
2812         * Modules/indexeddb/IDBBackingStore.cpp:
2813         (WebCore::IDBBackingStore::openInMemory):
2814         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2815         (WebCore::CreateIndexAbortOperation::perform):
2816         (WebCore::DeleteIndexAbortOperation::perform):
2817         (WebCore::CreateObjectStoreAbortOperation::perform):
2818         (WebCore::DeleteObjectStoreAbortOperation::perform):
2819         (WebCore::IDBDatabaseBackendImpl::VersionChangeAbortOperation::perform):
2820         * Modules/indexeddb/IDBLevelDBCoding.cpp:
2821         (WebCore::IDBLevelDBCoding::decodeBool):
2822         (WebCore::IDBLevelDBCoding::KeyPrefix::KeyPrefix):
2823         * Modules/indexeddb/IDBLevelDBCoding.h:
2824         (WebCore::IDBLevelDBCoding::encodeIntSafely):
2825         * bindings/js/IDBBindingUtilities.cpp:
2826         (WebCore::canSet):
2827         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2828         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
2829         * platform/leveldb/LevelDBDatabase.cpp:
2830         (WebCore::ComparatorAdapter::FindShortestSeparator):
2831         (WebCore::ComparatorAdapter::FindShortSuccessor):
2832
2833 2013-04-09  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2834
2835         [WK2] Drop WebProcess capabilities on Linux using seccomp filters
2836         https://bugs.webkit.org/show_bug.cgi?id=89875
2837
2838         Reviewed by Maciej Stachowiak.
2839
2840         Make the DATA_DIR global since it is now needed for WebCore and WebKit2.
2841         It is now used to set a sandbox policy for the EFL port.
2842
2843         * PlatformEfl.cmake:
2844
2845 2013-04-08  Ryosuke Niwa  <rniwa@webkit.org>
2846
2847         Remove WebCore.gyp/gypi
2848         https://bugs.webkit.org/show_bug.cgi?id=114239
2849
2850         Reviewed by Benjamin Poulain.
2851
2852         * WebCore.gyp: Removed.
2853         * WebCore.gyp/.gitignore: Removed.
2854         * WebCore.gyp/ConvertFileToHeaderWithCharacterArray.gypi: Removed.
2855         * WebCore.gyp/MakeNames.gypi: Removed.
2856         * WebCore.gyp/WebCore.gyp: Removed.
2857         * WebCore.gyp/mac: Removed.
2858         * WebCore.gyp/mac/adjust_visibility.sh: Removed.
2859         * WebCore.gyp/mac/check_objc_rename.sh: Removed.
2860         * WebCore.gyp/scripts: Removed.
2861         * WebCore.gyp/scripts/action_csspropertynames.py: Removed.
2862         * WebCore.gyp/scripts/action_cssvaluekeywords.py: Removed.
2863         * WebCore.gyp/scripts/action_derivedsourcesallinone.py: Removed.
2864         * WebCore.gyp/scripts/action_makenames.py: Removed.
2865         * WebCore.gyp/scripts/action_useragentstylesheets.py: Removed.
2866         * WebCore.gyp/scripts/rule_bison.py: Removed.
2867         * WebCore.gyp/scripts/supplemental_idl_files.py: Removed.
2868         * WebCore.gypi: Removed.
2869
2870 2013-04-08  Mihai Maerean  <mmaerean@adobe.com>
2871
2872         Rollout r147756: performance regression
2873         https://bugs.webkit.org/show_bug.cgi?id=114176
2874
2875         Reviewed by Alexis Menard.
2876
2877         Rolling out the patch for https://bugs.webkit.org/show_bug.cgi?id=74144 "[CSS Regions] Elements in a region
2878         should be assignable to a named flow" because of the performance regression in Parser/html5-full-render.html .
2879
2880         No new tests (because this is a rollout patch).
2881
2882         * dom/Element.cpp:
2883         * dom/Element.h:
2884         * dom/NodeRenderingContext.cpp:
2885         (WebCore::NodeRenderingContext::parentRenderer):
2886         (WebCore::NodeRenderingContext::shouldCreateRenderer):
2887         (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
2888         * dom/NodeRenderingContext.h:
2889         * dom/PseudoElement.h:
2890         * dom/Text.cpp:
2891         (WebCore::Text::textRendererIsNeeded):
2892         (WebCore::Text::updateTextRenderer):
2893         * dom/Text.h:
2894         * rendering/FlowThreadController.cpp:
2895         * rendering/FlowThreadController.h:
2896         * rendering/RenderObject.h:
2897         * rendering/RenderRegion.h:
2898         * svg/SVGElement.cpp:
2899         * svg/SVGElement.h:
2900         
2901 2013-04-08  Benjamin Poulain  <benjamin@webkit.org>
2902
2903         Remove HTML Notification
2904         https://bugs.webkit.org/show_bug.cgi?id=114231
2905
2906         Reviewed by Ryosuke Niwa.
2907
2908         The feature is dead. It was only kept in the tree because of chromium.
2909
2910         * Configurations/FeatureDefines.xcconfig:
2911         * Modules/notifications/Notification.cpp:
2912         (WebCore):
2913         (WebCore::Notification::Notification):
2914         * Modules/notifications/Notification.h:
2915         (Notification):
2916         * Modules/notifications/NotificationCenter.h:
2917         (NotificationCenter):
2918         * Modules/notifications/NotificationCenter.idl:
2919         * page/FeatureObserver.h:
2920
2921 2013-04-08  Dean Jackson  <dino@apple.com>
2922
2923         Don't try to remove a non-existent snapshot
2924         https://bugs.webkit.org/show_bug.cgi?id=114226
2925         <rdar://problem/13604480>
2926
2927         Reviewed by Darin Adler.
2928
2929         We don't need to trigger the timer to remove a snapshot
2930         if there was never a snapshot displayed.
2931
2932         * html/HTMLPlugInImageElement.cpp:
2933         (WebCore::HTMLPlugInImageElement::setDisplayState): Detect if we're moving from the DisplayingSnapshot state.
2934         (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired): Guard against a missing renderer.
2935
2936 2013-04-08  Patrick Gansterer  <paroga@webkit.org>
2937
2938         Do not define CAN_THEME_URL_ICON for PLATFORM(WIN_CAIRO)
2939         https://bugs.webkit.org/show_bug.cgi?id=108444
2940
2941         Reviewed by Darin Adler.
2942
2943         Image::loadPlatformResource("urlIcon") returns nothing
2944         since r30961 on Windows which makes the code useless.
2945
2946         * loader/icon/IconDatabase.cpp:
2947
2948 2013-04-05  Roger Fong  <roger_fong@apple.com>
2949
2950         Build fix.
2951
2952         * platform/win/DragImageWin.cpp:
2953         (WebCore::createDragImageIconForCachedImageFilename):
2954
2955 2013-04-08  Geoffrey Garen  <ggaren@apple.com>
2956
2957         Stop #include-ing all of JavaScriptCore in every DOM-related file
2958         https://bugs.webkit.org/show_bug.cgi?id=114220
2959
2960         Reviewed by Sam Weinig.
2961
2962         I separated ScriptWrappableInlines.h from ScriptWrappable.h so
2963         WebCore data types that inherit from ScriptWrappable don't
2964         have to #include all of the infrastructure for accessing that data member.
2965
2966         * ForwardingHeaders/heap/PassWeak.h: Added.
2967         * ForwardingHeaders/heap/WeakInlines.h: Added.
2968         * WebCore.xcodeproj/project.pbxproj:
2969         * bindings/js/DOMWrapperWorld.h:
2970         * bindings/js/JSDOMBinding.h:
2971         (JSC):
2972         * bindings/js/JSEventListener.h:
2973         * bindings/js/JSMutationCallback.cpp:
2974         * bindings/js/JSNodeFilterCondition.h:
2975         * bindings/js/ScriptWrappable.h:
2976         (JSC):
2977         (WebCore):
2978         (ScriptWrappable):
2979         * bindings/js/ScriptWrappableInlines.h: Added.
2980         (WebCore):
2981         (WebCore::ScriptWrappable::wrapper):
2982         (WebCore::ScriptWrappable::setWrapper):
2983         (WebCore::ScriptWrappable::clearWrapper):
2984         * bridge/qt/qt_instance.h:
2985         * bridge/qt/qt_runtime.h:
2986         * bridge/runtime_root.cpp:
2987         * bridge/runtime_root.h:
2988         * css/StylePropertySet.cpp:
2989         * dom/LiveNodeList.cpp:
2990         (WebCore::LiveNodeListBase::reportMemoryUsage):
2991         * dom/Node.cpp:
2992         (WebCore::Node::reportMemoryUsage):
2993         * inspector/InspectorDebuggerAgent.cpp:
2994         * inspector/NetworkResourcesData.cpp:
2995         * loader/cache/CachedSVGDocument.cpp:
2996         * xml/XMLHttpRequest.cpp:
2997         (WebCore::XMLHttpRequest::reportMemoryUsage):
2998
2999 2013-04-08  Tiancheng Jiang  <tijiang@rim.com>
3000
3001         [BlackBerry] Clean up render theme code. 
3002         https://bugs.webkit.org/show_bug.cgi?id=114216
3003
3004         Reviewed by Rob Buis.
3005
3006         BlackBerry PR 323062
3007
3008         Clean up redundant code.
3009
3010         * platform/blackberry/RenderThemeBlackBerry.cpp:
3011         (WebCore):
3012         (WebCore::RenderThemeBlackBerry::paintSliderTrack):
3013         * platform/blackberry/RenderThemeBlackBerry.h:
3014         (RenderThemeBlackBerry):
3015
3016 2013-04-08  Arunprasad Rajkumar  <arunprasadr@nds.com>
3017
3018         Call Netscape Plugin's toString() and valueOf() instead of providing default implementation
3019         https://bugs.webkit.org/show_bug.cgi?id=113139
3020
3021         Reviewed by Anders Carlsson.
3022
3023         Tests: plugins/npruntime/tostring.html
3024                plugins/npruntime/valueof.html
3025
3026         * bridge/c/c_instance.cpp:
3027         (JSC::Bindings::CInstance::~CInstance):
3028         (JSC::Bindings::CInstance::invokeMethod):
3029         (JSC::Bindings::CInstance::invokeDefaultMethod):
3030         (Bindings):
3031         (JSC::Bindings::CInstance::invokeConstruct):
3032         (JSC::Bindings::CInstance::stringValue):
3033         (JSC::Bindings::CInstance::booleanValue):
3034         (JSC::Bindings::CInstance::valueOf):
3035         (JSC::Bindings::CInstance::toJSPrimitive):
3036         * bridge/c/c_instance.h:
3037         (CInstance):
3038
3039 2013-04-08  Tim Horton  <timothy_horton@apple.com>
3040
3041         REGRESSION (r138858): Crash in WebCore::FrameLoader::~FrameLoader() when opening page in a background tab
3042         https://bugs.webkit.org/show_bug.cgi?id=109935
3043         <rdar://problem/13225963>
3044
3045         Reviewed by Brady Eidson.
3046
3047         Previously, we were deciding if a Page could go into
3048         the PageCache by blacklisting certain load types. Instead,
3049         whitelist the load types that we know can go into the cache,
3050         so that newly-added load types are not cached unless
3051         that is explicitly desired.
3052
3053         The crash occurs when a page which is actively loading
3054         is put into the page cache while doing a redirect with
3055         FrameLoadTypeRedirectWithLockedBackForwardList (note that
3056         this is a redirect that was not covered in the blacklist),
3057         and then promptly removed from the page cache, resulting
3058         in resources from the redirect target (the now-active page)
3059         being incorrectly destroyed.
3060
3061         No new tests, only known crash repro case is extremely
3062         timing dependent (and only happens in WebKit2, with tiled
3063         drawing, in background tabs).
3064
3065         * history/PageCache.cpp:
3066         (WebCore::PageCache::canCache):
3067
3068 2013-04-08  Anders Carlsson  <andersca@apple.com>
3069
3070         Fix build.
3071
3072         * platform/network/ResourceHandle.cpp:
3073         (WebCore::ResourceHandle::continueDidReceiveResponse):
3074
3075 2013-04-08  Anders Carlsson  <andersca@apple.com>
3076
3077         Add an async version of ResourceHandle::didReceiveResponse
3078         https://bugs.webkit.org/show_bug.cgi?id=114215
3079
3080         Reviewed by Sam Weinig.
3081
3082         In order to support converting NSURLConnections to NSURLDownloads when using the network process
3083         we need an async version of didReceiveResponse.
3084
3085         * WebCore.exp.in:
3086         * platform/network/ResourceHandleClient.cpp:
3087         (WebCore::ResourceHandleClient::didReceiveResponseAsync):
3088         Just call continueDidReceiveResponse().
3089
3090         * platform/network/mac/ResourceHandleMac.mm:
3091         (WebCore::ResourceHandle::continueWillSendRequest):
3092         Split up a single condition in two, making it easier to see which assertion fails.
3093
3094         (WebCore::ResourceHandle::continueDidReceiveResponse):
3095         Call -[WebCoreResourceHandleAsOperationQueueDelegate continueDidReceiveResponse].
3096
3097         (WebCore::ResourceHandle::continueShouldUseCredentialStorage):
3098         (WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace):
3099         (WebCore::ResourceHandle::continueWillCacheResponse):
3100         Split up a single condition in two, making it easier to see which assertion fails.
3101
3102         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h:
3103         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
3104         (-[WebCoreResourceHandleAsOperationQueueDelegate continueDidReceiveResponse]):
3105         Signal the semaphore.
3106
3107         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
3108         Call didReceiveResponseAsync on the main thread and wait on the semaphore.
3109
3110 2013-04-08  Beth Dakin  <bdakin@apple.com>
3111
3112         Crash in ScrollingCoordinator::mainThreadScrollingReasons() when going back
3113         https://bugs.webkit.org/show_bug.cgi?id=114214
3114         -and corresponding-
3115         <rdar://problem/13208616>
3116
3117         Reviewed by Anders Carlsson.
3118
3119         When a page is restoring from the page cache, the mainFrame can have a null 
3120         Document. So we should null-check the Document here. 
3121
3122         * page/scrolling/ScrollingCoordinator.cpp:
3123         (WebCore::ScrollingCoordinator::mainThreadScrollingReasons):
3124
3125 2013-04-08  Andrei Bucur  <abucur@adobe.com>
3126
3127         Simplify ContainerNode::removeChildren
3128         https://bugs.webkit.org/show_bug.cgi?id=113517
3129
3130         Reviewed by Darin Adler.
3131
3132         The patch is based on the work made by Elliott Sprehn. He kindly agreed
3133         for me to finalize the last bits and pieces of the fix.
3134
3135         Simplify ContainerNode::removeChildren by merging the loops and removing
3136         willRemoveChildren. This removes two traversals of the children, avoids
3137         refing and derefing all the children once, avoids allocating a second
3138         NodeVector of children, and means we detach() in the same order as
3139         normal removal.
3140
3141         This does mean you can get into an infinite loop with DOMNodeRemoved
3142         listeners by continously adding nodes but this is true in all other browsers
3143         and the current behavior is bad because it means you don't get notified
3144         of nodes added during removal (which other browsers do notify of). This
3145         patch removes the containerNode.html test that originally tested for this
3146         infinite loop and adds a new one that tests that all nodes get notified.
3147
3148         This makes PerformanceTests/Parser/innerHTML-setter.html 2-6% faster.
3149
3150         There's also a new test verifying ranges remain consistent if modified
3151         inside an mutation event handler. Without the patch it's possible to create
3152         a range with boundaries outside of the DOM tree.
3153
3154         Tests: fast/dom/Range/range-remove-children-event.html
3155                fast/events/mutation-during-innerHTML.html
3156
3157         * dom/ContainerNode.cpp:
3158         (WebCore::ContainerNode::removeChildren):
3159         * dom/Document.cpp:
3160         * dom/Document.h: nodeChildrenWillBeRemoved is not needed any more.
3161         * dom/Range.cpp:
3162         * dom/Range.h: nodeChildrenWillBeRemoved is not needed any more.
3163
3164 2013-04-06  Simon Fraser  <simon.fraser@apple.com>
3165
3166         Remove some #includes in headers in rendering code
3167         https://bugs.webkit.org/show_bug.cgi?id=114079
3168
3169         Reviewed by Sam Weinig.
3170
3171         Clean up #includes in RenderObject, RenderLayer etc.
3172         Moved makeMatrixRenderable() into RenderLayer.app, allowing
3173         the removal of a TransformationMatrix.h include.
3174         
3175         Make some RenderLayer functions that deal with filters not inline,
3176         to avoid including RenderLayerFilterInfo.h.
3177
3178         * platform/graphics/GraphicsLayer.h:
3179         * platform/graphics/ImageOrientation.cpp:
3180         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3181         * platform/graphics/qt/GraphicsContextQt.cpp:
3182         * platform/graphics/transforms/AffineTransform.cpp:
3183         * platform/graphics/transforms/AffineTransform.h:
3184         * rendering/RenderBoxModelObject.h:
3185         * rendering/RenderLayer.cpp:
3186         (WebCore::makeMatrixRenderable):
3187         (WebCore::RenderLayer::filterRenderer):
3188         (WebCore::RenderLayer::filterInfo):
3189         (WebCore::RenderLayer::ensureFilterInfo):
3190         (WebCore::RenderLayer::removeFilterInfoIfNeeded):
3191         * rendering/RenderLayer.h:
3192         * rendering/RenderLayerBacking.h:
3193         * rendering/RenderLineBoxList.h:
3194         * rendering/RenderObject.h:
3195
3196 2013-04-08  Robert Hogan  <robert@webkit.org>
3197
3198         Unreviewed, rolling out r147850.
3199         http://trac.webkit.org/changeset/147850
3200         https://bugs.webkit.org/show_bug.cgi?id=113706
3201
3202         Changeset crossed paths with 147505, which is the same fix.
3203
3204         * rendering/RenderBlockLineLayout.cpp:
3205         (WebCore::inlineLogicalWidth):
3206
3207 2013-04-08  Alexey Proskuryakov  <ap@apple.com>
3208
3209         <rdar://problem/12834449> Crashes in WebSocketChannel::processFrame when processing a ping
3210         https://bugs.webkit.org/show_bug.cgi?id=114178
3211
3212         Reviewed by Brady Eidson.
3213
3214         No test, I could never reproduce even manually.
3215
3216         Calling enqueueRawFrame() could change incoming buffer, so a subsequent skipBuffer()
3217         would operate on wrong assumptions. This happened because enqueueRawFrame() actually
3218         tried to process the queue, and send failure sometimed clears m_buffer.
3219
3220         Fixing this by decoupling enqueuing from sending, and making sure that skipBuffer()
3221         in ping frame processing case is performed at a safe time.
3222
3223         * Modules/websockets/WebSocketChannel.cpp:
3224         (WebCore::WebSocketChannel::send):
3225         (WebCore::WebSocketChannel::startClosingHandshake):
3226         (WebCore::WebSocketChannel::processFrame):
3227         (WebCore::WebSocketChannel::enqueueTextFrame):
3228         (WebCore::WebSocketChannel::enqueueRawFrame):
3229         (WebCore::WebSocketChannel::enqueueBlobFrame):
3230
3231 2013-04-08  Max Vujovic  <mvujovic@adobe.com>
3232
3233         REGRESSION (r147502): Animations of CA filters broken
3234         https://bugs.webkit.org/show_bug.cgi?id=114067
3235
3236         Reviewed by Dean Jackson.
3237
3238         Revert r147502 [1] because it broke CA filter animations.
3239         
3240         [1]: http://trac.webkit.org/changeset/147502
3241
3242         * platform/graphics/IntRectExtent.h:
3243         (WebCore::IntRectExtent::isZero):
3244         (IntRectExtent):
3245         * rendering/RenderLayer.cpp:
3246         (WebCore::RenderLayer::needsCompositingLayersRebuiltForOverflow):
3247         (WebCore):
3248         (WebCore::RenderLayer::styleChanged):
3249         * rendering/RenderLayer.h:
3250         (RenderLayer):
3251         * rendering/RenderLayerBacking.cpp:
3252         (WebCore::RenderLayerBacking::updateFilters):
3253         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3254         * rendering/RenderLayerBacking.h:
3255         (RenderLayerBacking):
3256         * rendering/RenderLayerCompositor.cpp:
3257         (WebCore::RenderLayerCompositor::calculateCompositedBounds):
3258
3259 2013-04-08  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
3260
3261         [Qt] Avoid "QFont::setPixelSize: Pixel size <= 0 (0)"
3262         https://bugs.webkit.org/show_bug.cgi?id=114175
3263
3264         Reviewed by Allan Sandfeld Jensen.
3265
3266         QFont doesn't support a 0-size but WebCore does.
3267         Leave our QFont in its default state in this case to avoid the warning.
3268
3269         * platform/graphics/qt/FontPlatformDataQt.cpp:
3270         (WebCore::FontPlatformData::FontPlatformData):
3271
3272 2013-04-08  Yi Shen  <max.hong.shen@gmail.com>
3273
3274         Counter still gets incremented when counter-increment is set to none
3275         https://bugs.webkit.org/show_bug.cgi?id=84985
3276
3277         Reviewed by Darin Adler.
3278
3279         When the counter-increment is set to none, no counters are incremented.
3280
3281         Tests: New test cases added in fast/css/counters/counter-increment-tests.htm
3282
3283         * css/StyleBuilder.cpp:
3284         (WebCore::ApplyPropertyCounter::applyValue):
3285
3286 2013-04-08  Douglas Stockwell  <dstockwell@chromium.org>
3287
3288         Crash in WebCore::ElementRuleCollector::collectMatchingRulesForList
3289         https://bugs.webkit.org/show_bug.cgi?id=113458
3290
3291         Reviewed by Darin Adler.
3292
3293         A stylesheet which has been invalidated (type changed from "" or
3294         "text/css") was not correctly removed from the list of active
3295         style sheets when its children are changed.
3296
3297         This change releases StyleElement::m_sheet in advance of calling
3298         DocumentStyleSheetCollection::updateActiveStyleSheets.
3299
3300         (StyleElement::clearSheet calls CSSStyleSheet::clearOwnerNode calls
3301         CSSStyleSheet::didMutate calls Document::styleResolverChanged calls
3302         DocumentStyleSheetCollection::updateActiveStyleSheets)
3303
3304         Test: fast/css/style-element-invalidation-crash.html
3305
3306         * dom/StyleElement.cpp:
3307         (WebCore::StyleElement::clearSheet): Release m_sheet before we
3308           trigger an update of the active style sheets.
3309
3310 2013-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
3311
3312         [GTK] DOM objects created wrapping a base class have incorrect GObject type
3313         https://bugs.webkit.org/show_bug.cgi?id=113132
3314
3315         Reviewed by Gustavo Noronha Silva.
3316
3317         Some of the DOM methods can create a concrete instance of another
3318         object, but return a base class. GObject bindings provide custom
3319         kit implementations for Node, Element, Event and EvenTarget, so
3320         any concrete HTMLElement wrapped as an HTMLElement ends up
3321         wrapping the right WebCore object but in the wrong GObject type.
3322         This affects not only HTMLElements, but any polymorphic object
3323         wrapped using a base class.
3324         This patch changes the way objects are created, so that all
3325         classes have their own kit implementation, but for polymorphic
3326         objects the kit implementation of the base class is always
3327         used. The kit method of polymorphic base classes use a generic
3328         wrap method instead of the wrapFoo method like all other
3329         classes. In the static code we provide the implementation of the
3330         generic wrap method for every polimorphic base class, falling back
3331         to their wrapFoo method if the concrete object can't be used to
3332         wrap the object.
3333         Both WebKitDOMBinding and WebKitHTMLElementWrapperFactory now provide
3334         implementations of wrap and have been renamed to WebKitDOMPrivate
3335         and WebKitDOMHTMLPrivate.
3336
3337         * bindings/gobject/GNUmakefile.am:
3338         * bindings/gobject/WebKitDOMBinding.cpp: Removed.
3339         * bindings/gobject/WebKitDOMEventTarget.cpp:
3340         (WebKit::kit): Moved kit implementation from WebKitDOMBinding for
3341         consistency with all other objects that have their own kit.
3342         (WebKit::core): Updated to match the core implementation fo all
3343         other objects.
3344         * bindings/gobject/WebKitDOMEventTargetPrivate.h:
3345         (WebCore):
3346         (WebKit):
3347         * bindings/gobject/WebKitDOMHTMLPrivate.cpp: Added.
3348         (WebKit): Use preprocessor macros to define and set the wrap
3349         functions of all HTML elements, removing a lot of boilerplate code
3350         and making it easier to add new wrap functions in the future.
3351         (WebKit::wrap):
3352         * bindings/gobject/WebKitDOMHTMLPrivate.h: Renamed from Source/WebCore/bindings/gobject/WebKitHTMLElementWrapperFactory.h.
3353         (WebCore):
3354         (WebKit):
3355         * bindings/gobject/WebKitDOMObject.cpp:
3356         * bindings/gobject/WebKitDOMPrivate.cpp: Added.
3357         (WebKit):
3358         (WebKit::wrap):
3359         * bindings/gobject/WebKitDOMPrivate.h: Renamed from Source/WebCore/bindings/gobject/WebKitDOMBinding.h.
3360         (WebCore):
3361         (WebKit):
3362         * bindings/gobject/WebKitHTMLElementWrapperFactory.cpp: Removed.
3363         * bindings/scripts/CodeGeneratorGObject.pm:
3364         (IsBaseType): Helper function to check if a type is a base class.
3365         (GetBaseClass): Helper function to get the base class for a given
3366         parent type.
3367         (GenerateFunction): Remove special case for EventTarget since the
3368         kit prototype of EventTarget is in its private header like all
3369         other objects.
3370         (GenerateCFile): Add a kit implementation for all objects.
3371         (IsPolymorphic): Helper function to check if the given type is the
3372         base class of a polymorphic object.
3373         (Generate): Include the private header of the base class for
3374         polymorphic objects.
3375         (WriteData): Remove the special case for WebKitDOMNode since now
3376         all objects has a kit method.
3377         * bindings/scripts/test/GObject/WebKitDOMFloat64Array.cpp:
3378         (WebKit::kit):
3379         * bindings/scripts/test/GObject/WebKitDOMFloat64ArrayPrivate.h:
3380         (WebKit):
3381         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObject.cpp:
3382         * bindings/scripts/test/GObject/WebKitDOMTestActiveDOMObjectPrivate.h:
3383         (WebKit):
3384         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
3385         * bindings/scripts/test/GObject/WebKitDOMTestCallbackPrivate.h:
3386         (WebKit):
3387         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetter.cpp:
3388         * bindings/scripts/test/GObject/WebKitDOMTestCustomNamedGetterPrivate.h:
3389         (WebKit):
3390         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructor.cpp:
3391         * bindings/scripts/test/GObject/WebKitDOMTestEventConstructorPrivate.h:
3392         (WebKit):
3393         * bindings/scripts/test/GObject/WebKitDOMTestEventTarget.cpp:
3394         * bindings/scripts/test/GObject/WebKitDOMTestEventTargetPrivate.h:
3395         (WebKit):
3396         * bindings/scripts/test/GObject/WebKitDOMTestException.cpp:
3397         * bindings/scripts/test/GObject/WebKitDOMTestExceptionPrivate.h:
3398         (WebKit):
3399         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
3400         * bindings/scripts/test/GObject/WebKitDOMTestInterfacePrivate.h:
3401         (WebKit):
3402         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListener.cpp:
3403         * bindings/scripts/test/GObject/WebKitDOMTestMediaQueryListListenerPrivate.h:
3404         (WebKit):
3405         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructor.cpp:
3406         * bindings/scripts/test/GObject/WebKitDOMTestNamedConstructorPrivate.h:
3407         (WebKit):
3408         * bindings/scripts/test/GObject/WebKitDOMTestNode.cpp:
3409         (WebKit::kit):
3410         * bindings/scripts/test/GObject/WebKitDOMTestNodePrivate.h:
3411         (WebKit):
3412         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3413         * bindings/scripts/test/GObject/WebKitDOMTestObjPrivate.h:
3414         (WebKit):
3415         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructors.cpp:
3416         * bindings/scripts/test/GObject/WebKitDOMTestOverloadedConstructorsPrivate.h:
3417         (WebKit):
3418         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
3419         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterfacePrivate.h:
3420         (WebKit):
3421         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
3422         * bindings/scripts/test/GObject/WebKitDOMTestTypedefsPrivate.h:
3423         (WebKit):
3424
3425 2013-04-08  Andras Becsi  <andras.becsi@digia.com>
3426
3427         Fix the build with strict GCC 4.8
3428
3429         Unreviewed build fix.
3430
3431         Initialize dragImage to suppress GCC's warning about it being possibly used uninitialized,
3432         which results is a build failure with GCC 4.8 that sets -Werror=maybe-uninitialized.
3433
3434         No new tests needed.
3435
3436         * page/DragController.cpp:
3437         (WebCore::DragController::doImageDrag):
3438
3439 2013-04-08  Zan Dobersek  <zdobersek@igalia.com>
3440
3441         Remove the unused LayoutTestSupport class
3442         https://bugs.webkit.org/show_bug.cgi?id=114170
3443
3444         Reviewed by Alexey Proskuryakov.
3445
3446         The LayoutTestSupport class is not used by any port anywhere in the code and should be removed.
3447
3448         No new tests - no changes in functionality.
3449
3450         * CMakeLists.txt:
3451         * GNUmakefile.list.am:
3452         * Target.pri:
3453         * WebCore.vcproj/WebCore.vcproj:
3454         * WebCore.vcxproj/WebCore.vcxproj:
3455         * WebCore.vcxproj/WebCore.vcxproj.filters:
3456         * WebCore.xcodeproj/project.pbxproj:
3457         * platform/LayoutTestSupport.cpp: Removed.
3458         * platform/LayoutTestSupport.h: Removed.
3459
3460 2013-04-08  Zan Dobersek  <zdobersek@igalia.com>
3461
3462         Remove WebCore::(enable|disable)SecureTextInput methods
3463         https://bugs.webkit.org/show_bug.cgi?id=114126
3464