Fix GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush() to do predictive visib...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-04-17  Simon Fraser  <simon.fraser@apple.com>
2
3         Fix GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush() to do predictive visible rect expansion
4         https://bugs.webkit.org/show_bug.cgi?id=114775
5
6         Reviewed by Tim Horton.
7
8         GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush() is intended to answer the question
9         "if your visible rect is changed to X, would any tiles be created or destroyed?".
10         
11         However, for compositing layer tiled layers, we do some predictive visible rect expansion based on how
12         the visible rect is changing when we actually commit visible rect changes. recursiveVisibleRectChangeRequiresFlush()
13         was not doing that, causing it to give confusing answers, so fix it to do so.
14         
15         Both now call adjustTiledLayerVisibleRect(), and it's cleaner to make this a static function.
16         
17         A somewhat unrelated change is to take the layer bounds origin into account
18         in GraphicsLayerCA::computeVisibleRect(). Desktop WebKit never sets this, but it's used
19         on other platforms for composited scrolling, so needs to be taken into account
20         when computing visible rects.
21
22         * platform/graphics/ca/GraphicsLayerCA.cpp:
23         (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush):
24         (WebCore::GraphicsLayerCA::computeVisibleRect):
25         (WebCore::GraphicsLayerCA::adjustTiledLayerVisibleRect):
26         (WebCore::GraphicsLayerCA::updateVisibleRect):
27         * platform/graphics/ca/GraphicsLayerCA.h:
28         (GraphicsLayerCA):
29
30 2013-04-17  Oliver Hunt  <oliver@apple.com>
31
32         Automate generation of toJS function for classes that need to report extra memory usage
33         https://bugs.webkit.org/show_bug.cgi?id=114768
34
35         Reviewed by Geoff Garen.
36
37         Only really used by AudioBuffer for now.  The other classes that need it can be
38         trivially refactored at a later date.
39
40         * Modules/webaudio/AudioBuffer.idl:
41         * bindings/js/JSAudioBufferCustom.cpp:
42         * bindings/js/JSDOMBinding.h:
43         (WebCore):
44         (HasMemoryCost):
45         (NoType):
46         (BaseMixin):
47         * bindings/scripts/CodeGeneratorJS.pm:
48         (GenerateImplementation):
49
50 2013-04-17  Dirk Schulze  <krit@webkit.org>
51
52         BasicShapeFunctions should use RenderStyle instead of StyleResolver
53         https://bugs.webkit.org/show_bug.cgi?id=114743
54
55         Reviewed by Antti Koivisto.
56
57         BasicShapeFunctions does include RenderStyle instead of StyleResolver now.
58         This is a simple refactoring patch, no new tests.
59
60         * css/BasicShapeFunctions.cpp:
61         (WebCore::convertToLength): Use style and rootElementStyle directly.
62         (WebCore::basicShapeForValue): Ditto.
63         * css/BasicShapeFunctions.h:
64         (WebCore):
65         * css/DeprecatedStyleBuilder.cpp:
66         (WebCore::ApplyPropertyClipPath::applyValue):
67         (WebCore::ApplyPropertyExclusionShape::applyValue):
68
69 2013-04-17  Beth Dakin  <bdakin@apple.com>
70
71         Content inside frames and scrollbars in overflow areas hit-tests incorrectly when 
72         the WKView has a header
73         https://bugs.webkit.org/show_bug.cgi?id=114769
74
75         Reviewed by Simon Fraser.
76
77         convertToRenderer() and convertFromRenderer() need to factor in the headerHeight, 
78         much like all of the conversion functions on ScrollView. 
79         * page/FrameView.cpp:
80         (WebCore::FrameView::convertFromRenderer):
81         (WebCore::FrameView::convertToRenderer):
82
83         The scrollPosition equivalent of the existing scrollOffsetRelativeToDocument() 
84         function. 
85         * platform/ScrollView.cpp:
86         (WebCore::ScrollView::scrollPositionRelativeToDocument):
87         * platform/ScrollView.h:
88         (ScrollView):
89
90 2013-04-17  Andreas Kling  <akling@apple.com>
91
92         Remove FragmentScriptingPermission.h include from Element.h.
93         <http://webkit.org/b/114757>
94
95         Rubber-stamped by Anders Carlsson.
96
97         * dom/Element.h:
98
99 2013-04-17  Mark Lam  <mark.lam@apple.com>
100
101         Add LLINT and baseline JIT support for timing out scripts.
102         https://bugs.webkit.org/show_bug.cgi?id=114577.
103
104         Reviewed by Geoffrey Garen.
105
106         Replaced use of the obsolete JSGlobalData.terminator methods with the
107         JSGlobalData.watchdog equivalents.
108
109         * bindings/js/JSEventListener.cpp:
110         (WebCore::JSEventListener::handleEvent):
111         * bindings/js/SerializedScriptValue.cpp:
112         (WebCore::SerializedScriptValue::maybeThrowExceptionIfSerializationFailed):
113         * bindings/js/WorkerScriptController.cpp:
114         (WebCore::WorkerScriptController::evaluate):
115         (WebCore::WorkerScriptController::scheduleExecutionTermination):
116         (WebCore::WorkerScriptController::isExecutionTerminating):
117
118 2013-04-16  Jer Noble <jer.noble@apple.com>
119
120         Crash in WebCore::HTMLMediaElement::~HTMLMediaElement.
121         https://bugs.webkit.org/show_bug.cgi?id=113531
122
123         Reviewed by Eric Carlson.
124
125         No new tests, though this is intermittently reproducible with
126         http/tests/misc/delete-frame-during-readystatechange.html under ASAN.
127
128         * html/HTMLMediaElement.cpp:
129         (WebCore::HTMLMediaElement::~HTMLMediaElement): Clear the media player manually
130             before the destructor exits. Clearing the media player may cancel a resource load,
131             which can trigger a readystatechange event. It's possible for the HTMLMediaElement
132             to attempt to fire an abort event within the readystatechange event, even though it is
133             now in an inconsistent state. Clearling the media player before finishing the destructor
134             ensures that the HTMLMediaElement will at least still be alive if this case is triggered.
135             Set m_completelyLoaded to true to ensure that if userCancelledLoad() is called, it doesn't
136             attempt to fire events while destructing.
137
138 2013-04-17  Sergio Correia  <sergio.correia@openbossa.org>
139
140         Web Inspector: make generate-inspector-protocol-version work with python3 
141         https://bugs.webkit.org/show_bug.cgi?id=114717
142
143         Revision r146765 added print() calls that made the script complain about 
144         invalid syntax when using python3.
145
146         This commit replaces such calls with calls to sys.stdout.write(), analogous
147         to the sys.stderr.write() ones already used throughout the file.
148
149         Reviewed by Timothy Hatcher.
150
151         No new tests. No user visible behavior changed.
152
153         * inspector/generate-inspector-protocol-version:
154         (main):
155
156 2013-04-17  Seokju Kwon  <seokju.kwon@gmail.com>
157
158         Web Inspector: Fix Localized string warngs
159         https://bugs.webkit.org/show_bug.cgi?id=114718
160
161         Reviewed by Timothy Hatcher.
162
163         No tests because no behavior change is expected.
164
165         * English.lproj/localizedStrings.js:
166
167 2013-04-17  Csaba Osztrogon√°c  <ossy@webkit.org>
168
169         [Qt] Unreviewed Windows buildfix.
170
171         * platform/qt/DragDataQt.cpp: Add a missing include.
172
173 2013-04-17  ChangSeok Oh  <shivamidow@gmail.com>
174
175         Breaking Float: floated block level element following inline element in floated container breaks to next line
176         https://bugs.webkit.org/show_bug.cgi?id=45274
177
178         Reviewed by David Hyatt.
179
180         Fix position issue of floating element in floating element.
181         Inner floating element has placed at next line when outer floating element has text,
182         even though previous line has spaces enough to fit it.
183         To solve this, the width of a space added temporarily for prohibiting duplication more than 2 empty spaces
184         is subtracted when floating element is checked whether it fits on a line.
185
186         Tests: css2.1/20110323/floats-001.html
187                css2.1/20110323/floats-102.html
188                fast/inline-block/float-both-whitespace.html
189                fast/inline-block/float-leading-whitespace.html
190                fast/inline-block/float-no-whitespace.html
191                fast/inline-block/float-trailing-whitespace.html
192                fast/inline-block/multiple-floats-with-whitespace.html
193
194         * rendering/RenderBlockLineLayout.cpp:
195         (WebCore::LineWidth::LineWidth):
196         (WebCore::LineWidth::fitsOnLine):
197         (WebCore::LineWidth::trailingWhitespaceWidth):
198         (WebCore::LineWidth::setTrailingWhitespaceWidth):
199         (LineWidth):
200         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
201
202 2013-04-17  Leo Yang  <leoyang@rim.com>
203
204         Lots of unused parameter warnings in filesystem code
205         https://bugs.webkit.org/show_bug.cgi?id=114747
206
207         Reviewed by Carlos Garcia Campos.
208
209         Comment out or remove unused parameter identifiers.
210
211         No functionalities changed, no new tests.
212
213         * Modules/filesystem/DOMFileSystem.cpp: Comment out |snapshot| because
214         it is referred in the comments inside the function.
215         (WebCore):
216         * Modules/filesystem/DOMFileSystemSync.cpp: Ditto.
217         (WebCore):
218         * Modules/filesystem/FileWriter.cpp: Remove unused |ec|.
219         (WebCore::FileWriter::abort):
220         * Modules/filesystem/FileWriterSync.cpp:
221         (WebCore::FileWriterSync::didWrite): Remove unused |bytes|.
222         * platform/AsyncFileSystemCallbacks.h:
223         (WebCore::AsyncFileSystemCallbacks::didOpenFileSystem): Comment out unused parameters
224         because the function is inlined.
225         (WebCore::AsyncFileSystemCallbacks::didCreateSnapshotFile): Ditto.
226         (WebCore::AsyncFileSystemCallbacks::didReadDirectoryEntry): Ditto.
227         (WebCore::AsyncFileSystemCallbacks::didReadDirectoryEntries): Ditto.
228         (WebCore::AsyncFileSystemCallbacks::didCreateFileWriter): Ditto.
229         * platform/blackberry/WorkerAsyncFileSystemBlackBerry.cpp:
230         (WebCore::WorkerAsyncFileSystemBlackBerry::createWriterOnMainThread): Remove unused |client|.
231
232 2013-04-17  Brent Fulgham  <bfulgham@webkit.org>
233
234         [Windows, WinCairo] Stop individually building WTF files in WebCore
235         https://bugs.webkit.org/show_bug.cgi?id=114705
236
237         Reviewed by Anders Carlsson.
238
239         * WebCore.vcproj/WebCore.vcproj: Remove references to WTF objects.
240         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
241         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto
242
243 2013-04-17  Dirk Schulze  <krit@webkit.org>
244
245         Make lengthConversion methods and arguments const
246         https://bugs.webkit.org/show_bug.cgi?id=114749
247
248         Reviewed by Andreas Kling.
249
250         Refactoring, no new tests.
251
252         * css/CSSCalculationValue.cpp:
253         (WebCore::CSSCalcValue::computeLengthPx):
254         (WebCore::CSSCalcPrimitiveValue::toCalcValue):
255         (WebCore::CSSCalcPrimitiveValue::computeLengthPx):
256         (WebCore::CSSCalcBinaryOperation::toCalcValue):
257         (WebCore::CSSCalcBinaryOperation::computeLengthPx):
258         * css/CSSCalculationValue.h:
259         (WebCore::CSSCalcValue::toCalcValue):
260         (CSSCalcValue):
261         * css/CSSPrimitiveValue.cpp:
262         (WebCore::CSSPrimitiveValue::computeLength):
263         (WebCore::CSSPrimitiveValue::computeLengthDouble):
264         (WebCore::CSSPrimitiveValue::viewportPercentageLength):
265         * css/CSSPrimitiveValue.h:
266         (CSSPrimitiveValue):
267         * css/CSSPrimitiveValueMappings.h:
268         (WebCore::CSSPrimitiveValue::convertToLength):
269         * css/StyleResolver.cpp:
270         (WebCore::StyleResolver::convertToIntLength):
271         (WebCore::StyleResolver::convertToFloatLength):
272         * css/StyleResolver.h:
273         (StyleResolver):
274
275 2013-04-17  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
276
277         [refactor] Moved ScriptedAnimationController common code to inline function
278         https://bugs.webkit.org/show_bug.cgi?id=114681
279
280         Reviewed by Daniel Bates.
281
282         Avoided duplicated code by moving ScriptedAnimationController clearance
283         code to a common function used by both Document::dispose() and
284         Document::detach().
285
286         No new tests, no behavior changes.
287
288         * dom/Document.cpp:
289         (WebCore::Document::dispose):
290         (WebCore::Document::detach):
291         (WebCore::Document::clearScriptedAnimationController): Added.
292         * dom/Document.h:
293         (Document):
294
295 2013-04-17  Chris Fleizach  <cfleizach@apple.com>
296
297         AX: When img@alt is undefined, WebKit should use @title as accessibility label if available
298         https://bugs.webkit.org/show_bug.cgi?id=114535
299
300         Reviewed by Tim Horton.
301
302         Don't hide images from Accessibility that have the title attribute on them.
303
304         Test: accessibility/empty-image-with-title.html
305
306         * accessibility/AccessibilityRenderObject.cpp:
307         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
308
309 2013-04-17  Arpita Bahuguna  <a.bah@samsung.com>
310
311         getAttribute does not behave correctly for mixed-case attributes on HTML elements
312         https://bugs.webkit.org/show_bug.cgi?id=105713
313
314         Reviewed by Andreas Kling.
315
316         getAttribute() and getAttributeNode() APIs do not convert the
317         passed attribute name to lowercase before comparing against the
318         existing attributes.
319         The specification however states that the passed name should
320         be converted to ASCII lowercase before checking for the existence
321         of the given attribute. [www.w3.org/TR/domcore/#dom-element-getattribute]
322
323         Test: fast/dom/Element/getAttribute-case-insensitivity.html
324
325         * dom/Element.h:
326         (WebCore::ElementData::getAttributeItemIndex):
327         getAttributeItemIndex() accepts a bool param 'shouldIgnoreAttributeCase'
328         which specifies whether or not the attribute's case should be ignored
329         before comparison but we don't really convert the passed name to lowercase
330         before carrying out the comparison.
331
332         Thus, when called from APIs such as getAttribute() and getAttributeNode()
333         which do not explicitally convert the attribute name to lowercase
334         before calling on this method, it fails to carry out a case-insensitive
335         search.
336
337         Have thus made changes to convert the passed attribute's name to
338         lowercase if 'shouldIgnoreAttributeCase' is true.
339
340 2013-04-17  John Griggs  <jgriggs@blackberry.com>
341
342         [BlackBerry] Add support for filesystem: URLs to BlackBerry Media Player.
343         https://bugs.webkit.org/show_bug.cgi?id=114686
344         https://przilla.ott.qnx.com/bugzilla/show_bug.cgi?id=314865
345
346         Reviewed by Rob Buis.
347
348         Translate filesystem: URLs to file:// URLs for use by the media player, but only after the filesystem: URL has been checked for security, etc.
349
350         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
351         (WebCore::MediaPlayerPrivate::load):
352         (WebCore::MediaPlayerPrivate::onError):
353         (WebCore::MediaPlayerPrivate::onDurationChanged):
354         (WebCore::MediaPlayerPrivate::notifyChallengeResult):
355
356 2013-04-17  Brendan Long  <b.long@cablelabs.com>
357
358         [GStreamer] Eclipse warnings in MediaPlayerPrivateGStreamer
359         https://bugs.webkit.org/show_bug.cgi?id=114654
360
361         Reviewed by Philippe Normand.
362
363         No new tests (nothing added).
364
365         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
366         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
367         Initialize m_volumeAndMuteInitialized
368         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
369         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
370         Initialize signal handlers to 0.
371
372 2013-04-17  Andrei Bucur  <abucur@adobe.com>
373
374         [CSS Regions] Remove m_flowThread from NodeRenderingContext
375         https://bugs.webkit.org/show_bug.cgi?id=114732
376
377         Reviewed by Antti Koivisto.
378
379         Cleanup NodeRenderingContext. Remove unused member m_flowThread.
380
381         Tests: None needed.
382
383         * dom/NodeRenderingContext.cpp:
384         (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
385         * dom/NodeRenderingContext.h: Removed m_flowThread.
386
387 2013-04-17  Allan Sandfeld Jensen  <allan.jensen@digia.com>
388
389         [Qt] MediaPlayerPrivateQt.cpp doesn't build in debug
390
391         Unreviewed build fix.
392
393         We need to include Logging.h to get the LOG definitions.
394
395         * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
396
397 2013-04-17  Claudio Saavedra  <csaavedra@igalia.com>
398
399         execCommand("RemoveFormat") might remove format after the selection
400         https://bugs.webkit.org/show_bug.cgi?id=112240
401
402         Reviewed by Ryosuke Niwa.
403
404         Tests: editing/execCommand/remove-format-multiple-elements-mac.html
405
406         This bug is hit when ApplyStyleCommand is used to change the
407         style and the current selection ends in the beginning of a new node.
408         The bug is actually a two-fold thing:
409
410         1. There was no check as to whether the end node is really
411         selected or not, and format was always removed from it with
412         pushDownInlineStyleAroundNode(). An equivalent check for the start
413         node was already in place, so fix it analogously.
414
415         2. Previous stage might change the dom tree, resulting in a render
416         tree that is not up-to-date. Position::upstream() is later used
417         and, in order to be able to find a visually equivalent position in
418         a text node, this method needs the render tree to be up-to-date,
419         therefore, a call to updateLayoutIgnorePendingStylesheets() is
420         necessary.
421
422         * editing/ApplyStyleCommand.cpp:
423         (WebCore::ApplyStyleCommand::removeInlineStyle): Make sure that no
424         format is removed from the end node if it's not fully selected.
425         (WebCore::ApplyStyleCommand::nodeFullySelected): Call updateLayoutIgnorePendingStylesheets()
426
427 2013-04-17  Alberto Garcia  <agarcia@igalia.com>
428
429         [BlackBerry] GraphicsContext3D: don't initialize m_extensions in the constructor
430         https://bugs.webkit.org/show_bug.cgi?id=114726
431
432         Reviewed by Carlos Garcia Campos.
433
434         m_extensions is now initialized on demand by
435         GraphicsContext3D::getExtensions().
436
437         Doing it in the constructor produces a crash, because
438         Extensions3DOpenGLES() calls glGetString before the WebGL context
439         is current.
440
441         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
442         (WebCore::GraphicsContext3D::GraphicsContext3D):
443
444 2013-04-16  Maciej Stachowiak  <mjs@apple.com>
445
446         Replace JSC-specific IDL extended attributes with generic (JSC+V8) ones, now that the distinction no longer matters
447         https://bugs.webkit.org/show_bug.cgi?id=114712
448
449         Reviewed by Dan Bernstein.
450
451         No behavior change expected.
452
453         * bindings/scripts/IDLAttributes.txt: Remove the JSFoo attributes
454         that have bare Foo equivalents.
455         * bindings/scripts/CodeGeneratorJS.pm: Remove support for JSFoo
456         aliases.
457         (GetGenerateIsReachable):
458         (GetCustomIsReachable):
459         (ShouldGenerateToJSDeclaration):
460         (ShouldGenerateToJSImplementation):
461         (HasCustomConstructor):
462         (HasCustomGetter):
463         (HasCustomSetter):
464         (HasCustomMethod):
465
466         Replace JSFoo attributes with equivalen Foo attributs in all files
467         below:
468         
469         * Modules/geolocation/Geolocation.idl:
470         * Modules/indexeddb/IDBDatabase.idl:
471         * Modules/indexeddb/IDBObjectStore.idl:
472         * Modules/webaudio/DOMWindowWebAudio.idl:
473         * Modules/websockets/DOMWindowWebSocket.idl:
474         * Modules/websockets/WorkerContextWebSocket.idl:
475         * css/CSSRule.idl:
476         * css/CSSRuleList.idl:
477         * css/CSSStyleDeclaration.idl:
478         * css/CSSValue.idl:
479         * css/MediaList.idl:
480         * css/StyleMedia.idl:
481         * css/StyleSheet.idl:
482         * dom/MessagePort.idl:
483         * dom/MutationObserver.idl:
484         * dom/Node.idl:
485         * fileapi/Blob.idl:
486         * html/HTMLDocument.idl:
487         * html/HTMLTemplateElement.idl:
488         * html/canvas/ArrayBuffer.idl:
489         * html/canvas/CanvasRenderingContext.idl:
490         * html/canvas/DataView.idl:
491         * html/canvas/EXTDrawBuffers.idl:
492         * html/canvas/EXTTextureFilterAnisotropic.idl:
493         * html/canvas/OESElementIndexUint.idl:
494         * html/canvas/OESStandardDerivatives.idl:
495         * html/canvas/OESTextureFloat.idl:
496         * html/canvas/OESTextureHalfFloat.idl:
497         * html/canvas/OESVertexArrayObject.idl:
498         * html/canvas/WebGLCompressedTextureATC.idl:
499         * html/canvas/WebGLCompressedTexturePVRTC.idl:
500         * html/canvas/WebGLCompressedTextureS3TC.idl:
501         * html/canvas/WebGLDebugRendererInfo.idl:
502         * html/canvas/WebGLDebugShaders.idl:
503         * html/canvas/WebGLDepthTexture.idl:
504         * html/canvas/WebGLLoseContext.idl:
505         * html/track/TextTrack.idl:
506         * html/track/TextTrackCue.idl:
507         * html/track/TextTrackList.idl:
508         * loader/appcache/DOMApplicationCache.idl:
509         * page/BarInfo.idl:
510         * page/Console.idl:
511         * page/DOMSelection.idl:
512         * page/DOMWindow.idl:
513         * page/History.idl:
514         * page/Location.idl:
515         * page/MemoryInfo.idl:
516         * page/Navigator.idl:
517         * page/Screen.idl:
518         * page/WorkerNavigator.idl:
519         * plugins/DOMMimeTypeArray.idl:
520         * plugins/DOMPluginArray.idl:
521         * storage/Storage.idl:
522         * workers/AbstractWorker.idl:
523         * workers/SharedWorker.idl:
524         * workers/Worker.idl:
525         * workers/WorkerContext.idl:
526         * workers/WorkerLocation.idl:
527         * xml/XMLHttpRequestUpload.idl:
528
529 2013-04-16  Beth Dakin  <bdakin@apple.com>
530
531         Re-name Page::layoutMilestones() to Page::requestedLayoutMilestones()
532         https://bugs.webkit.org/show_bug.cgi?id=114713
533
534         Reviewed by Simon Fraser.
535
536         * page/FrameView.cpp:
537         (WebCore::FrameView::performPostLayoutTasks):
538         * page/Page.cpp:
539         (WebCore::Page::Page):
540         (WebCore::Page::addLayoutMilestones):
541         (WebCore::Page::removeLayoutMilestones):
542         (WebCore::Page::isCountingRelevantRepaintedObjects):
543         * page/Page.h:
544         (WebCore::Page::requestedLayoutMilestones):
545         (Page):
546         * rendering/RenderLayerCompositor.cpp:
547         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
548
549 2013-04-16  Patrick Gansterer  <paroga@webkit.org>
550
551         [CMake] Fix dependecy calculation for generated inspector files
552         https://bugs.webkit.org/show_bug.cgi?id=114092
553
554         Reviewed by Brent Fulgham.
555
556         At least in a generated Visual Studio solution the files generated via
557         CodeGeneratorInspector.py are considered outdated all the time because
558         the code generator only touches the file when the content changed.
559         Add an --write_always parameter to the script to touch the file always.
560
561         * CMakeLists.txt:
562         * inspector/CodeGeneratorInspector.py:
563
564 2013-04-16  Anders Carlsson  <andersca@apple.com>
565
566         Clone storage namespaces for window.open
567         https://bugs.webkit.org/show_bug.cgi?id=114703
568
569         Reviewed by Sam Weinig.
570
571         Pass the new page to StorageNamespace::copy.
572
573         * page/Chrome.cpp:
574         (WebCore::Chrome::createWindow):
575         * storage/StorageNamespace.h:
576         (StorageNamespace):
577         * storage/StorageNamespaceImpl.cpp:
578         (WebCore::StorageNamespaceImpl::copy):
579         * storage/StorageNamespaceImpl.h:
580         (WebCore):
581         (StorageNamespaceImpl):
582
583 2013-04-16  Sam Weinig  <sam@webkit.org>
584
585         Fix fallout after r148545.
586
587         * platform/text/TextChecking.h:
588         Move Platform defines that were incorrectly in WebCore, into Platform.h
589
590 2013-04-16  Hans Muller  <hmuller@adobe.com>
591
592         [CSS Exclusions] polygon shape-inside layout fails
593         https://bugs.webkit.org/show_bug.cgi?id=114402
594
595         Reviewed by Dirk Schulze.
596
597         The firstIncludedIntervalLogicalTop() method's implementation relied on optimistic
598         assumptions about floating point accuracy which, in rare cases, caused it to discard
599         first-fit locations based on the intersection of the minLogicalIntervalTop offset edge
600         and a polygon offset edge. Now: we do not verify that first-fit locations based on the
601         intersection of an offset edge and the minLogicalIntervalTop offset edge are below
602         the horizontal minLogicalIntervalTop line. They're essentially below the line "by definition".
603
604         Test: fast/exclusions/shape-inside/shape-inside-polygon-layout.html
605
606         * rendering/ExclusionPolygon.cpp:
607         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Avoid floating point problems
608             when checking intersections with the offset edge based on minLogicalIntervalTop.
609         * rendering/ExclusionPolygon.h:
610         (WebCore::OffsetPolygonEdge::OffsetPolygonEdge): Initialize the basis field.
611         (WebCore::OffsetPolygonEdge::basis): Report what the offset edge is "based on": a polygon
612             edge, the top of the line, or a (reflex) vertex.
613         (OffsetPolygonEdge): Added the Basis enum to enable tracking what the geometry of
614             an offset edge is based on.
615
616 2013-04-16  Jer Noble  <jer.noble@apple.com>
617
618         Further unreviewed build fix: protect JSAudioBufferCustom with a ENABLE(WEB_AUDIO) check.
619
620         * bindings/js/JSAudioBufferCustom.cpp:
621
622 2013-04-16  Jer Noble  <jer.noble@apple.com>
623
624         Unreviewed build fix; add new JSAudioBuffer.cpp file to more build systems.
625
626         * GNUmakefile.list.am:
627         * Target.pri:
628         * UseJSC.cmake:
629
630 2013-04-16  Jer Noble  <jer.noble@apple.com>
631
632         Repeated use of decodeAudioData() causes leak
633         https://bugs.webkit.org/show_bug.cgi?id=114709
634
635         Reviewed by Geoffrey Garen.
636
637         Report the correct size of the AudioBuffer to the garbage collector so that creating
638         these large buffers will trigger garbage collection.
639
640         * Modules/webaudio/AudioBuffer.cpp:
641         (WebCore::AudioBuffer::memoryCost): Added; simple sum of the buffer sizes in m_channels;
642         * Modules/webaudio/AudioBuffer.h:
643         * Modules/webaudio/AudioBuffer.idl: Add the CustomToJSObject flag.
644         * WebCore.xcodeproj/project.pbxproj:
645         * bindings/js/JSAudioBufferCustom.cpp: Added.
646         (WebCore::toJS): Added; report the extra size of an AudioBuffer when the wrapper
647             is created.
648
649 2013-04-16  Beth Dakin  <bdakin@apple.com>
650
651         Need a new layout milestone to notify bundle clients when the header has been 
652         flushed
653         https://bugs.webkit.org/show_bug.cgi?id=114706
654         -and corresponding-
655         <rdar://problem/13657284>
656
657         Reviewed by Simon Fraser.
658
659         New LayoutMilestone is DidFirstFlushForHeaderLayer.
660         * page/LayoutMilestones.h:
661         
662         New API to allow removing a LayoutMilestone.
663         * WebCore.exp.in:
664         * page/Page.cpp:
665         (WebCore::Page::removeLayoutMilestones):
666         * page/Page.h:
667         (Page):
668
669         New boolean member variable m_headerLayerAwaitingFirstFlush keeps track of whether 
670         we need to send the DidFirstFlushForHeaderLayer milestone.
671         * rendering/RenderLayerCompositor.h:
672         (RenderLayerCompositor):
673         * rendering/RenderLayerCompositor.cpp:
674         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
675
676         Send the milestone if appropriate.
677         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
678
679          Set m_headerLayerAwaitingFirstFlush to true for a newly created layer.
680         (WebCore::RenderLayerCompositor::updateLayerForHeader):
681
682 2013-04-16  Tim Horton  <timothy_horton@apple.com>
683
684         PlugIn Snapshotting: Crashes refreshing non-main-frame PDFPlugins
685         https://bugs.webkit.org/show_bug.cgi?id=114702
686         <rdar://problem/13542020>
687
688         Reviewed by Dean Jackson.
689
690         If:
691
692             a) a plugin fails all the tests in willCreatePlugIn, so it is WaitingForSnapshot there
693             b) primary plugin detection attempts to restart a plugin between the
694                time that willCreatePlugIn and didCreatePlugIn fire
695             c) when didCreatePlugIn fires, shouldAlwaysAutoStart() returns true,
696                because the plug-in is whitelisted,
697
698         we end up reattach()ing and going to Restarted state, and then going straight
699         to Playing state in didCreatePlugIn.
700
701         Instead, primary plugin promotion should be deferred until after the plugin is created,
702         so that we can take that one last bit of information (shouldAlwaysAutoStart) into account
703         before restarting and reattaching the plug-in.
704
705         * html/HTMLPlugInImageElement.cpp:
706         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
707         (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn):
708         (WebCore::HTMLPlugInImageElement::restartSnapshottedPlugIn):
709         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
710         (WebCore::HTMLPlugInImageElement::subframeLoaderDidCreatePlugIn):
711         * html/HTMLPlugInImageElement.h:
712
713 2013-04-16  Wei James  <james.wei@intel.com>
714
715         ASSERTION FAILED: i < size(), UNKNOWN in WebCore::ChannelMergerNode::process
716         https://bugs.webkit.org/show_bug.cgi?id=112657
717
718         Avoid to access input bus in checkNumberOfChannelsForInput() before the
719         bus is updated with AudioNode::checkNumberOfChannelsForInput().
720
721         Reviewed by Chris Rogers.
722
723         * Modules/webaudio/ChannelMergerNode.cpp:
724         (WebCore::ChannelMergerNode::checkNumberOfChannelsForInput):
725
726 2013-04-16  Ryosuke Niwa  <rniwa@webkit.org>
727
728         Even more Windows build fix and a Qt minimal build fix attempt.
729
730         * html/parser/XSSAuditorDelegate.cpp:
731         * page/win/FrameCGWin.cpp:
732
733 2013-04-16  Ryosuke Niwa  <rniwa@webkit.org>
734
735         More Windows build fixes.
736
737         * platform/win/DragDataWin.cpp:
738         * platform/win/PasteboardWin.cpp:
739
740 2013-04-16  Sam Weinig  <sam@webkit.org>
741
742         Windows build fix.
743
744         * page/win/FrameWin.cpp:
745
746 2013-04-16  Dean Jackson  <dino@apple.com>
747
748         PlugIns that resize in user gestures should be immune to snapshotting
749         https://bugs.webkit.org/show_bug.cgi?id=114697
750         <rdar://problem/13666258>
751
752         Reviewed by Tim Horton.
753
754         Now that we snapshot plugins if they resize above the snapshotting threshold,
755         we need to make sure that we don't do it in response to a user gesture
756         such as a click.
757
758         Due to the complexities of real-world content and the way they often do
759         things using timeout, I copied the code from the generic user gesture
760         timeout, which gives a 5 second grace period after clicks.
761
762         * html/HTMLPlugInImageElement.cpp:
763         (WebCore::documentHadRecentUserGesture): New static function to share the code for
764             checking the time since the last click (or whatever).
765         (WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting): Make sure
766             to test for a user gesture.
767         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Move the
768             code into the new function.
769
770 2013-04-15  Sam Weinig  <sam@webkit.org>
771
772         Remove more #includes from Frame.h
773         https://bugs.webkit.org/show_bug.cgi?id=114642
774
775         Reviewed by Anders Carlsson.
776
777         Convert Editor, FrameSelection, EventHandler and AnimationController into
778         OwnPtrs, to avoid inclusion.
779
780         * accessibility/AXObjectCache.cpp:
781         * accessibility/AccessibilityObject.cpp:
782         * accessibility/atk/WebKitAccessibleInterfaceEditableText.cpp:
783         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
784         * bindings/objc/DOM.mm:
785         * dom/CharacterData.cpp:
786         * dom/ContainerNode.cpp:
787         * dom/Element.cpp:
788         * editing/AlternativeTextController.cpp:
789         * editing/CompositeEditCommand.cpp:
790         * editing/DeleteButtonController.h:
791         * editing/EditingStyle.cpp:
792         * editing/InsertLineBreakCommand.cpp:
793         * editing/SpellChecker.cpp:
794         * editing/SpellingCorrectionCommand.cpp:
795         * editing/TextInsertionBaseCommand.cpp:
796         * history/CachedFrame.cpp:
797         * html/HTMLAnchorElement.cpp:
798         * html/HTMLInputElement.cpp:
799         * html/HTMLPlugInElement.cpp:
800         * html/HTMLSelectElement.cpp:
801         * html/HTMLTextAreaElement.cpp:
802         * html/HTMLTextFormControlElement.cpp:
803         * html/TextFieldInputType.cpp:
804         * html/shadow/ClearButtonElement.cpp:
805         * html/shadow/MediaControlElements.cpp:
806         * html/shadow/SliderThumbElement.cpp:
807         * inspector/InspectorPageAgent.h:
808         * loader/FrameLoader.cpp:
809         * page/DOMWindow.cpp:
810         * page/Frame.cpp:
811         * page/Frame.h:
812         * page/FrameView.cpp:
813         * page/FrameView.h:
814         * page/Page.cpp:
815         * page/TouchAdjustment.cpp:
816         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
817         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
818         * platform/gtk/PasteboardGtk.cpp:
819         * platform/qt/ClipboardQt.cpp:
820         * rendering/HitTestResult.cpp:
821         * rendering/RenderBlock.cpp:
822         * rendering/RenderEmbeddedObject.cpp:
823         * rendering/RenderLayer.cpp:
824         * rendering/RenderNamedFlowThread.cpp:
825         * rendering/RenderObject.cpp:
826         * rendering/RenderSnapshottedPlugIn.cpp:
827         * svg/graphics/SVGImage.cpp:
828         * testing/Internals.cpp:
829
830 2013-04-16  Jessie Berlin  <jberlin@apple.com>
831
832         Speculative Windows build fix.
833
834         * platform/win/ContextMenuWin.cpp:
835
836 2013-04-16  Eric Carlson  <eric.carlson@apple.com>
837
838         [Mac] in-band cues sometimes displayed late
839         https://bugs.webkit.org/show_bug.cgi?id=114629
840
841         Reviewed by Jer Noble.
842
843         No new tests, this deals with a platform-specific issue that is extremely timing dependent.
844
845         * html/track/InbandTextTrack.cpp:
846         (WebCore::TextTrackCueMap::add): New, two way cue data <-> cue map.
847         (WebCore::TextTrackCueMap::find): 
848         (WebCore::TextTrackCueMap::remove):
849         (WebCore::InbandTextTrack::updateCueFromCueData): New, update an existing cue. Set cue end time
850             to video duration if it is unknown.
851         (WebCore::InbandTextTrack::addGenericCue): Look for existing cues without considering duration
852             so we can match incomplete cues.
853         (WebCore::InbandTextTrack::updateGenericCue): New, update an existing cue. This allows us to 
854             add in-band cues as soon as we get them from the media engine and update them as more
855             information becomes available.
856         (WebCore::InbandTextTrack::removeGenericCue): New, remove an existing cue. This is necessary
857             because we never want to keep an incomplete cue when a seek happens.
858         (WebCore::InbandTextTrack::removeCue): New, base class override so we can keep the two way
859             map up to date.
860         * html/track/InbandTextTrack.h:
861
862         * html/track/TextTrack.cpp:
863         (WebCore::TextTrack::addCue): TextTrack::removeCue takes a RefPtr.
864         (WebCore::TextTrack::removeCue): Take a RefPtr.
865         (WebCore::TextTrack::hasCue): Allow caller to request match without considering end time.
866         * html/track/TextTrack.h:
867
868         * html/track/TextTrackCue.cpp:
869         (WebCore::TextTrackCue::TextTrackCue): Initialize m_processingCueChanges.
870         (WebCore::TextTrackCue::willChange): Renamed from cueWillChange. Use m_processingCueChanges
871             to avoid thrashing the track when many cue properties will change.
872         (WebCore::TextTrackCue::didChange): Renamed from cueDidChange. Use m_processingCueChanges
873             to avoid thrashing the track when many cue properties will change.
874         (WebCore::TextTrackCue::setId): cueWillChange -> willChange. cueDidChange -> didChange. 
875         (WebCore::TextTrackCue::setStartTime): Ditto.
876         (WebCore::TextTrackCue::setEndTime): Ditto.
877         (WebCore::TextTrackCue::setPauseOnExit): Ditto.
878         (WebCore::TextTrackCue::setVertical): Ditto.
879         (WebCore::TextTrackCue::setSnapToLines): Ditto.
880         (WebCore::TextTrackCue::setLine): Ditto.
881         (WebCore::TextTrackCue::setPosition): Ditto.
882         (WebCore::TextTrackCue::setSize): Ditto.
883         (WebCore::TextTrackCue::setAlign): Ditto.
884         (WebCore::TextTrackCue::setText): Ditto.
885         (WebCore::TextTrackCue::setRegionId): Ditto.
886         (WebCore::TextTrackCue::isEqual): Renamed from operator==, take match rules param.
887         * html/track/TextTrackCue.h:
888
889         * html/track/TextTrackCueGeneric.cpp:
890         (WebCore::TextTrackCueGeneric::isEqual): Renamed from operator==, take match rules param.
891         * html/track/TextTrackCueGeneric.h:
892
893         * platform/graphics/InbandTextTrackPrivateClient.h: Make GenericCueData refcounted.
894         (WebCore::GenericCueData::create): New.
895         (WebCore::GenericCueData::status): Ditto.
896         (WebCore::GenericCueData::setStatus): Ditto.
897         (WebCore::GenericCueData::GenericCueData):
898
899         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
900         (WebCore::InbandTextTrackPrivateAVF::processCue): Add cues as soon as we get them from the media
901             engine, update duration once we know it.
902         (WebCore::InbandTextTrackPrivateAVF::resetCueValues): Tell the client to remove all incomplete
903             cues we have delivered.
904         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
905
906         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
907         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Do not flush cues when seek completes,
908             we did that when the seek started and cues can be delivered before we get the the 
909             seek completed  notification.
910
911 2013-04-16  James Craig  <james@cookiecrook.com>
912
913         dfn element should be exposed as AXGroup:AXDefinition
914         https://bugs.webkit.org/show_bug.cgi?id=108980
915
916         Reviewed by Chris Fleizach.
917
918         dfn element now exposed as AXGroup:AXDefinition. Updated existing tests.
919
920         * accessibility/AccessibilityRenderObject.cpp:
921         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
922         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
923
924 2013-04-16  Anders Carlsson  <andersca@apple.com>
925
926         Begin chipping away at ScriptState
927         https://bugs.webkit.org/show_bug.cgi?id=114695
928
929         Reviewed by Geoffrey Garen.
930
931         Remove ScriptStateProtectedPtr as well as evalEnabled and setEvalEnabled.
932
933         * bindings/js/ScriptState.cpp:
934         * bindings/js/ScriptState.h:
935         * inspector/InjectedScriptBase.cpp:
936         (WebCore::InjectedScriptBase::callFunctionWithEvalEnabled):
937         * inspector/ScriptArguments.cpp:
938         (WebCore::ScriptArguments::ScriptArguments):
939         (WebCore::ScriptArguments::globalState):
940         * inspector/ScriptArguments.h:
941
942 2013-04-15  Anders Carlsson  <andersca@apple.com>
943
944         Remove unneeded headers from ScriptExecutionContext.h
945         https://bugs.webkit.org/show_bug.cgi?id=114631
946
947         Reviewed by Alexey Proskuryakov.
948
949         This shaves another minute off WebCore build time on my MacBook Pro.
950
951         * dom/ScriptExecutionContext.cpp:
952         * dom/ScriptExecutionContext.h:
953         * fileapi/Blob.cpp:
954         * rendering/RenderBlock.cpp:
955         * rendering/RenderBox.cpp:
956         * rendering/RenderFlowThread.cpp:
957         * rendering/RenderFrameSet.cpp:
958         * rendering/RenderIFrame.cpp:
959         * rendering/RenderImage.cpp:
960         * rendering/RenderListBox.cpp:
961         * rendering/RenderListItem.cpp:
962         * rendering/RenderListMarker.cpp:
963         * rendering/RenderMedia.cpp:
964         * rendering/RenderObject.cpp:
965         * rendering/RenderRegion.cpp:
966         * rendering/RenderReplaced.cpp:
967         * rendering/RenderReplica.cpp:
968         * rendering/RenderRubyRun.cpp:
969         * rendering/RenderScrollbarPart.cpp:
970         * rendering/RenderSlider.cpp:
971         * rendering/RenderTable.cpp:
972         * rendering/RenderTableCell.cpp:
973         * rendering/RenderTableRow.cpp:
974         * rendering/RenderTableSection.cpp:
975         * rendering/RenderTextControlSingleLine.cpp:
976         * rendering/RenderTextTrackCue.cpp:
977         * rendering/RenderVideo.cpp:
978         * rendering/RenderView.cpp:
979         * rendering/RenderWidget.cpp:
980         * rendering/svg/RenderSVGContainer.cpp:
981         * rendering/svg/RenderSVGForeignObject.cpp:
982         * rendering/svg/RenderSVGGradientStop.cpp:
983         * rendering/svg/RenderSVGHiddenContainer.cpp:
984         * rendering/svg/RenderSVGImage.cpp:
985         * rendering/svg/RenderSVGResourceContainer.cpp:
986         * rendering/svg/RenderSVGResourceMarker.cpp:
987         * rendering/svg/RenderSVGRoot.cpp:
988         * rendering/svg/RenderSVGShape.cpp:
989         * rendering/svg/RenderSVGText.cpp:
990
991 2013-04-16  Maciej Stachowiak  <mjs@apple.com>
992
993         Remove even yet still more traces of v8
994         https://bugs.webkit.org/show_bug.cgi?id=114693
995
996         Reviewed by Anders Carlsson.
997
998         No behavior change.
999
1000         * bindings/generic/ActiveDOMCallback.h:
1001         (WebCore::ActiveDOMCallback::isScriptControllerTerminating): Remove a V8-specific
1002         method and the comment referencing it.
1003         * bindings/generic/ActiveDOMCallback.cpp:
1004         (WebCore::ActiveDOMCallback::isScriptControllerTerminating): ditto
1005         * fileapi/File.cpp:
1006         (WebCore::File::File): Remove a comment referencing v8
1007         * inspector/InjectedScriptExterns.js: ditto
1008
1009 2013-04-16  Alexey Proskuryakov  <ap@apple.com>
1010
1011         Remove unused AlternativeTextClient::dismissDictationAlternativeUI
1012         https://bugs.webkit.org/show_bug.cgi?id=114598
1013
1014         Reviewed by Ryosuke Niwa.
1015
1016         Removing dead code.
1017
1018         * WebCore.exp.in:
1019         * editing/mac/AlternativeTextUIController.h: Made dismissAlternatives() private.
1020         * page/AlternativeTextClient.h:
1021
1022 2013-04-16  Robert Hogan  <robert@webkit.org>
1023
1024         Float at exact multiple of line-height affects too many lines
1025         https://bugs.webkit.org/show_bug.cgi?id=112744
1026
1027         Reviewed by David Hyatt.
1028
1029         Tests: fast/block/float/float-with-fractional-height-vertical-lr.html
1030                fast/block/float/float-with-fractional-height.html
1031
1032         When adding floats to the interval tree used for testing floats' overlap with lineboxes
1033         truncate the dimensions of the float rather than rounding them. This matches the
1034         treatment of linebox dimensions so ensures the test for overlap is comparing like
1035         with like.
1036
1037         * rendering/RenderBlock.cpp:
1038         (WebCore::::collectIfNeeded):
1039         (WebCore::RenderBlock::FloatingObjects::intervalForFloatingObject):
1040         (WebCore::::string):
1041
1042 2013-04-16  Chris Fleizach  <cfleizach@apple.com>
1043
1044         AX: aria-valuetext is not exposed on OS X.
1045         https://bugs.webkit.org/show_bug.cgi?id=114628
1046
1047         Reviewed by Tim Horton.
1048
1049         aria-valuetext is only being exposed on ARIA controls. That's because there were
1050         checks in place so that ONLY ARIA defined controls would return anything related to valuetext.
1051         We should allow this to work on native controls as well.
1052
1053         Test: platform/mac/accessibility/aria-valuetext-on-native-slider.html
1054
1055         * accessibility/AccessibilityNodeObject.cpp:
1056         (WebCore::AccessibilityNodeObject::valueDescription):
1057         (WebCore):
1058         (WebCore::AccessibilityNodeObject::valueForRange):
1059         (WebCore::AccessibilityNodeObject::maxValueForRange):
1060         (WebCore::AccessibilityNodeObject::minValueForRange):
1061         * accessibility/AccessibilityNodeObject.h:
1062         (AccessibilityNodeObject):
1063         * accessibility/AccessibilityObject.cpp:
1064         (WebCore::AccessibilityObject::isRangeControl):
1065              Rename isARIAControl to isRangeControl and make it apply to all elements.
1066         * accessibility/AccessibilityObject.h:
1067
1068 2013-04-15  Jon Lee  <jonlee@apple.com>
1069
1070         RenderView should bail out of paintBoxDecorations() when painting with a different renderer
1071         https://bugs.webkit.org/show_bug.cgi?id=114665
1072         <rdar://problem/13434884>
1073
1074         Reviewed by Simon Fraser.
1075
1076         * rendering/RenderView.cpp:
1077         (WebCore::RenderView::paintBoxDecorations): Add a check to see if we should paint within the renderer.
1078         This check exists in all other implementations of paintBoxDecorations(), and correctly avoids painting the
1079         decorations if the root provided is not the RenderView.
1080
1081 2013-04-16  Max Vujovic  <mvujovic@adobe.com>
1082
1083         [CSS Shaders] Remove the cache of validated programs
1084         https://bugs.webkit.org/show_bug.cgi?id=112844
1085
1086         Reviewed by Dean Jackson.
1087
1088         Since we're caching CustomFilterProgram(s) now, we don't need another cache for
1089         CustomFilterValidatedProgram(s). With this patch, CustomFilterProgram stores a reference
1090         to a lazily created CustomFilterValidatedProgram, and CustomFilterGlobalContext no longer
1091         has a validated program cache.
1092
1093         Also, this patch removes the CustomFilterValidatedProgram's stored reference to
1094         CustomFilterGlobalContext. The removal of the validated program cache would cause
1095         this reference to become weak. Validated programs only needed to keep the global context
1096         reference in order to create a CustomFilterCompiledProgram. In this patch, we create
1097         CustomFilterCompiledProgram(s) in FECustomFilter instead of in CustomFilterValidatedProgram,
1098         so validated programs don't need to store the global context reference anymore.
1099
1100         No new tests. Just Refactoring.
1101
1102         * platform/graphics/filters/CustomFilterCompiledProgram.cpp:
1103         (WebCore::CustomFilterCompiledProgram::CustomFilterCompiledProgram):
1104         * platform/graphics/filters/CustomFilterGlobalContext.cpp:
1105         (WebCore::CustomFilterGlobalContext::~CustomFilterGlobalContext):
1106         * platform/graphics/filters/CustomFilterGlobalContext.h:
1107         (CustomFilterGlobalContext):
1108         * platform/graphics/filters/CustomFilterProgram.cpp:
1109         (WebCore::CustomFilterProgram::validatedProgram):
1110         (WebCore::CustomFilterProgram::setValidatedProgram):
1111         * platform/graphics/filters/CustomFilterProgram.h:
1112         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
1113         (WebCore::CustomFilterValidatedProgram::CustomFilterValidatedProgram):
1114         (WebCore::CustomFilterValidatedProgram::compiledProgram):
1115         (WebCore::CustomFilterValidatedProgram::setCompiledProgram):
1116         (WebCore::CustomFilterValidatedProgram::~CustomFilterValidatedProgram):
1117         * platform/graphics/filters/CustomFilterValidatedProgram.h:
1118         (CustomFilterValidatedProgram):
1119         * platform/graphics/filters/FECustomFilter.cpp:
1120         (WebCore::FECustomFilter::prepareForDrawing):
1121         * rendering/FilterEffectRenderer.cpp:
1122         * rendering/RenderLayer.cpp:
1123         (WebCore::RenderLayer::computeFilterOperations):
1124
1125 2013-04-16  Anthony Scian  <ascian@blackberry.com>
1126
1127         [BlackBerry] LayerTexture: check if the graphics context is NULL
1128         https://bugs.webkit.org/show_bug.cgi?id=114674
1129
1130         Reviewed by Rob Buis.
1131
1132         Internal PR: 256522
1133
1134         * platform/graphics/blackberry/LayerTexture.cpp:
1135         (WebCore::LayerTexture::setContentsToColor):
1136
1137 2013-04-13  Andreas Kling  <akling@apple.com>
1138
1139         REGRESSION(r148128): window.resizeTo doesn't work from Safari address bar.
1140         <rdar://problem/13635894>
1141         <http://webkit.org/b/114561>
1142
1143         Reviewed by Sam Weinig.
1144
1145         Suppressing window geometry changes while any user gesture is active was a bit too restrictive,
1146         and broke legitimate use-cases. Narrow it down to checking EventHandler::mousePressed().
1147
1148         No test yet, adding one is tracked by <http://webkit.org/b/114561>.
1149
1150         * page/DOMWindow.cpp:
1151         (WebCore::DOMWindow::allowedToChangeWindowGeometry):
1152
1153             Added to share code between all DOMWindow functions that alter window geometry.
1154
1155         (WebCore::DOMWindow::moveBy):
1156         (WebCore::DOMWindow::moveTo):
1157         (WebCore::DOMWindow::resizeBy):
1158         (WebCore::DOMWindow::resizeTo):
1159
1160 2013-04-16  Manuel Rego Casasnovas  <rego@igalia.com>
1161
1162         [GTK][EFL] Remove deprecated libsoup API usage
1163         https://bugs.webkit.org/show_bug.cgi?id=104894
1164
1165         Reviewed by Philippe Normand.
1166
1167         Based on a patch by Claudio Saavedra <csaavedra@igalia.com>.
1168         Remove LIBSOUP_USE_UNSTABLE_REQUEST_API and only include
1169         libsoup/soup.h.
1170
1171         * platform/network/ResourceHandleInternal.h:
1172         * platform/network/soup/GOwnPtrSoup.cpp:
1173         * platform/network/soup/ProxyResolverSoup.h:
1174         * platform/network/soup/ResourceErrorSoup.cpp:
1175         * platform/network/soup/ResourceHandleSoup.cpp:
1176         (WebCore::ensureSessionIsInitialized): No need to add the requester
1177         feature.
1178         (WebCore::createSoupRequestAndMessageForHandle): SoupSession has a
1179         requester API, use it.
1180
1181 2013-04-15  Maciej Stachowiak  <mjs@apple.com>
1182
1183         Remove more traces of the now-obsolete support for V8
1184         https://bugs.webkit.org/show_bug.cgi?id=114657
1185
1186         Reviewed by Ryosuke Niwa.
1187
1188         In addition to passing existing tests, I verified that the ElementFactory
1189         and ElementWrapperFactory files were all textually identical before and after.
1190
1191         * dom/CustomEvent.cpp:
1192         (WebCore): Remove Use(V8) bock.
1193         * dom/CustomEvent.h:
1194         (CustomEvent): ditto
1195         * dom/MessageEvent.cpp:
1196         (WebCore::MessageEvent::MessageEvent): ditto
1197         (WebCore::MessageEvent::initMessageEvent): ditto
1198         * dom/Node.h:
1199         (Node): ditto
1200         * dom/make_event_factory.pl:
1201         (generateImplementation): Remove V8 support.
1202         * dom/make_names.pl: Remove gobs of V8 support and simplify.
1203         (printJSElementIncludes): 
1204         (printConditionalElementIncludes):
1205         (printFactoryCppFile):
1206         (printWrapperFunctions):
1207         (printWrapperFactoryCppFile):
1208         (printWrapperFactoryHeaderFile):
1209         * inspector/InjectedScriptCanvasModuleSource.js: Remove V8 stack
1210         trace code.
1211         * platform/qt/PlatformSupport.h: Remove a macro only used for V8 
1212         bindings.
1213         * svg/SVGZoomAndPan.h:
1214         (SVGZoomAndPan): Remove mention of V8 from comment.
1215
1216 2013-04-15  Ryosuke Niwa  <rniwa@webkit.org>
1217
1218         Potential use after free in ApplyStyleCommand::splitAncestorsWithUnicodeBidi
1219         https://bugs.webkit.org/show_bug.cgi?id=114664
1220
1221         Reviewed by Oliver Hunt.
1222
1223         Use RefPtr as needed.
1224
1225         No new tests since this bug was discovered by code inspection.
1226
1227         * editing/ApplyStyleCommand.cpp:
1228         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
1229
1230 2013-04-15  Timothy Hatcher  <timothy@apple.com>
1231
1232         Web Inspector: Make var and function declarations work again in the Console.
1233
1234         https://webkit.org/b/114534
1235         rdar://problem/13614477
1236
1237         Reviewed by Oliver Hunt.
1238
1239         * inspector/InjectedScriptSource.js:
1240         (InjectedScript.prototype._evaluateOn): Use 'with' when not evaluating
1241         on a call frame.
1242
1243 2013-04-15  Seokju Kwon  <seokju.kwon@gmail.com>
1244
1245         Web Inspector: Add missing Localized strings
1246         https://bugs.webkit.org/show_bug.cgi?id=114656
1247
1248         Reviewed by Timothy Hatcher.
1249
1250         No tests because no behavior change is expected.
1251
1252         * English.lproj/localizedStrings.js:
1253
1254 2013-04-15  Dean Jackson  <dino@apple.com>
1255
1256         Rename restartedPlugin to isRestartedPlugin. This was
1257         review feedback from r148038 that I thought I fixed
1258         everywhere but failed.
1259         https://bugs.webkit.org/show_bug.cgi?id=114233
1260
1261         * html/HTMLPlugInElement.h:
1262         (WebCore::HTMLPlugInElement::isRestartedPlugin): Prefix with "is".
1263         * html/HTMLPlugInImageElement.cpp:
1264         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
1265         (WebCore::HTMLPlugInImageElement::setDisplayState):
1266         (WebCore::HTMLPlugInImageElement::removeSnapshotTimerFired):
1267         * html/HTMLPlugInImageElement.h:
1268         * rendering/RenderEmbeddedObject.cpp:
1269         (WebCore::RenderEmbeddedObject::paintContents):
1270         * rendering/RenderLayerBacking.cpp:
1271         (WebCore::isRestartedPlugin):
1272
1273 2013-04-15  Maciej Stachowiak  <mjs@apple.com>
1274
1275         Remove V8 attribtues from IDLAttributes.txt
1276         https://bugs.webkit.org/show_bug.cgi?id=114651
1277
1278         Reviewed by Sam Weinig.
1279
1280         No tests because no behavior change is expected.
1281
1282         * bindings/scripts/IDLAttributes.txt: Remove V8 attribtues.
1283         * html/track/TextTrackList.idl: Remove a stray V8-specific attribute
1284         (so I guess this change is not useless)
1285
1286 2013-04-15  James Craig  <james@cookiecrook.com>
1287
1288         WebKit should not expose AXSubrole:AXDescriptionList on Mountain Lion as it causes a regression in VoiceOver behavior
1289         https://bugs.webkit.org/show_bug.cgi?id=113975
1290
1291         Reviewed by Chris Fleizach.
1292
1293         Serve NSAccessibilityDescriptionListSubrole or NSAccessibilityDefinitionListSubrole
1294         depending on platform. Updated existing test coverage.
1295
1296         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1297         (-[WebAccessibilityObjectWrapper subrole]):
1298
1299 2013-04-15  Dean Jackson  <dino@apple.com>
1300
1301         Plugins that resize might need to be snapshotted.
1302         https://bugs.webkit.org/show_bug.cgi?id=102157
1303         <rdar://problem/12696259>
1304
1305         Reviewed by Tim Horton.
1306
1307         A plugin could avoid snapshotting if it started very
1308         small (below the threshold where we autostart), and then
1309         resized to be large (above the threshold). Detect this
1310         case and tell the plugin to snapshot.
1311
1312         There unfortunately is a bit of state to track when doing
1313         this. We have to start the snapshotting in a post-layout
1314         task, so we carry a flag to say we're checking size but
1315         not wanting the plugin to update (which would restart it).
1316         We also might be a plugin that would have already restarted
1317         due to a similar plugin being clicked or detected as dominant.
1318         So this patch introduces a member variable that tracks what
1319         decision has been made on snapshotting.
1320
1321         I also added some more logging to be more clear about what is
1322         happening to plugins going through the snapshot process, and
1323         changed the order of the tests in the algorithm so that domain
1324         detection comes before examining the size.
1325
1326         * html/HTMLPlugInImageElement.cpp:
1327         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Initialise
1328             the two new member variables.
1329         (WebCore::HTMLPlugInImageElement::setDisplayState): Mark a restarted
1330             plugin as NeverSnapshot. This means that if it later resizes above the
1331             threshold, it won't trigger the snapshot detection.
1332         (WebCore::HTMLPlugInImageElement::checkSnapshotStatus): Renamed from
1333             updateSnapshotInfo. This now updates the snapshot, but also runs
1334             the check for size changes.
1335         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin): Gather all plugins
1336             that look like a restarting plugin, not just those snapshotted. That
1337             way they can all be marked as NeverSnapshot.
1338         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns): Bless every
1339             plugin that looks similar, whether or not it is snapshotted.
1340         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): More logging.
1341         (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Ditto.
1342         (WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting): New
1343             method. If the plugin was below the threshold and is now above it,
1344             begin the snapshotting process.
1345         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Plugins
1346             that were marked as NeverSnapshot should start immediately. Move the origin
1347             test earlier in the method. If a plugin avoided snapshotting due to size,
1348             remember the size.
1349         (WebCore::HTMLPlugInImageElement::subframeLoaderDidCreatePlugIn): Mark the
1350             plugin as NeverSnapshot.
1351
1352         * html/HTMLPlugInImageElement.h:
1353         (HTMLPlugInImageElement): Four new member variables:
1354             - the decision we made regarding snapshotting (or not), uses the SnapshotDecision enum
1355             - the size when it avoided snapshotting
1356             - a flag to indicate the post layout update was triggered due to
1357               a size change
1358         (WebCore::HTMLPlugInImageElement::needsCheckForSizeChange): New method.
1359         (WebCore::HTMLPlugInImageElement::setNeedsCheckForSizeChange): New method.
1360         (WebCore::HTMLPlugInImageElement::snapshotDecision): Return the decision
1361             regarding snapshotting or not snapshotting.
1362
1363         * page/FrameView.cpp:
1364         (WebCore::FrameView::addWidgetToUpdate): Guard updating the widget. We don't
1365             want to do it when we're checking for a size change in the plugin.
1366         (WebCore::FrameView::updateWidget): Call new name.
1367
1368         * plugins/PluginViewBase.h:
1369         (WebCore::PluginViewBase::beginSnapshottingRunningPlugin): Empty virtual
1370             method to snapshot a running plugin.
1371
1372         * rendering/RenderEmbeddedObject.cpp:
1373         (WebCore::RenderEmbeddedObject::layout): If the plugin has increased in
1374             size add it to the post layout list so that it will be checked.
1375
1376 2013-04-15  Chris Fleizach  <cfleizach@apple.com>
1377
1378         activating a focused link to an in-page fragment ID should transfer focus to the target of the link when possible
1379         https://bugs.webkit.org/show_bug.cgi?id=17450
1380
1381         Reviewed by Maciej Stachowiak.
1382
1383         When a fragment is scrolled to due to an activation event or on load, focus should attempt to 
1384         move to the fragment if possible.
1385
1386         Test: fast/dom/fragment-activation-focuses-target.html
1387
1388         * page/FrameView.cpp:
1389         (WebCore::FrameView::scrollToAnchor):
1390
1391 2013-04-12  Maciej Stachowiak  <mjs@apple.com>
1392
1393         Remove V8-specific extended attributes from IDL files
1394         https://bugs.webkit.org/show_bug.cgi?id=114523
1395
1396         Reviewed by Geoffrey Garen.
1397
1398         No tests because no behavior change is expected.
1399
1400         * Modules/encryptedmedia/MediaKeyMessageEvent.idl:
1401         * Modules/encryptedmedia/MediaKeyNeededEvent.idl:
1402         * Modules/encryptedmedia/MediaKeySession.idl:
1403         * Modules/encryptedmedia/MediaKeys.idl:
1404         * Modules/filesystem/HTMLInputElementFileSystem.idl:
1405         * Modules/indexeddb/IDBAny.idl:
1406         * Modules/mediasource/MediaSource.idl:
1407         * Modules/mediasource/SourceBuffer.idl:
1408         * Modules/mediasource/SourceBufferList.idl:
1409         * Modules/mediastream/MediaStream.idl:
1410         * Modules/webaudio/AudioDestinationNode.idl:
1411         * html/track/TextTrackCue.idl:
1412         * html/track/TextTrackCueList.idl:
1413         * html/track/TextTrackList.idl:
1414         * html/track/TextTrackRegion.idl:
1415         * html/track/TextTrackRegionList.idl:
1416         * html/track/TrackEvent.idl:
1417         * storage/Storage.idl:
1418         * svg/SVGDocument.idl:
1419         * svg/SVGElement.idl:
1420         * workers/WorkerContext.idl:
1421         * xml/XMLHttpRequest.idl:
1422         * xml/XPathNSResolver.idl:
1423
1424 2013-04-15  Anders Carlsson  <andersca@apple.com>
1425
1426         ScriptWrappable subclasses shouldn't have to include WeakInlines.h
1427         https://bugs.webkit.org/show_bug.cgi?id=114641
1428
1429         Reviewed by Alexey Proskuryakov.
1430
1431         Remove ScriptWrappableInlines.h includes, they're not needed anymore.
1432
1433         * css/WebKitCSSMatrix.cpp:
1434         * dom/ClientRect.cpp:
1435         * dom/ClientRectList.cpp:
1436         * dom/Clipboard.cpp:
1437         * dom/DOMStringMap.cpp:
1438         * dom/Event.cpp:
1439         * dom/MutationRecord.cpp:
1440         * fileapi/FileList.cpp:
1441         * page/BarInfo.cpp:
1442         * plugins/DOMMimeTypeArray.cpp:
1443         * plugins/DOMPlugin.cpp:
1444         * plugins/DOMPluginArray.cpp:
1445         * storage/Storage.cpp:
1446
1447 2013-04-15  Igor Oliveira  <igor.o@sisa.samsung.com>
1448
1449         Call directly RenderBlock::deleteLineBoxTree
1450         https://bugs.webkit.org/show_bug.cgi?id=102761
1451
1452         Reviewed by Darin Adler.
1453
1454         Instead of implementing RenderLineBoxList::deleteLineBoxTree logic inside 
1455         RenderBlock::determineStartPosition, we can reuse the code. The commentaries added
1456         in the changeset #86628 are not valid anymore, nextRootBox is casting m_nextLineBox 
1457         and nextLineBox is returning m_nextLineBox.
1458
1459         * rendering/RenderBlockLineLayout.cpp:
1460         (WebCore::RenderBlock::determineStartPosition):
1461
1462 2013-04-15  Anders Carlsson  <andersca@apple.com>
1463
1464         Remove files related to quota and proximity events from the Xcode project
1465         https://bugs.webkit.org/show_bug.cgi?id=114635
1466
1467         Reviewed by Benjamin Poulain.
1468
1469         * WebCore.xcodeproj/project.pbxproj:
1470         * history/PageCache.cpp:
1471         * page/DOMWindow.cpp:
1472
1473 2013-04-15  Patrick Gansterer  <paroga@webkit.org>
1474
1475         [CMake] Add WTF_USE_*_UNICODE variables
1476         https://bugs.webkit.org/show_bug.cgi?id=114556
1477
1478         Reviewed by Brent Fulgham.
1479
1480         WTF_USE_ICU_UNICODE and WTF_USE_WCHAR_UNICODE are used to
1481         reduce duplication in the platform specific CMake files.
1482
1483         * CMakeLists.txt:
1484         * PlatformBlackBerry.cmake:
1485         * PlatformEfl.cmake:
1486         * PlatformWinCE.cmake:
1487
1488 2013-04-15  Eric Carlson  <eric.carlson@apple.com>
1489
1490         HTMLMediaElement::removeTextTrack should clear track client
1491         https://bugs.webkit.org/show_bug.cgi?id=114630
1492
1493         Reviewed by Jer Noble.
1494
1495         No new tests, this is clean-up that prevents a potential crash.
1496
1497         * html/HTMLMediaElement.cpp:
1498         (WebCore::HTMLMediaElement::removeTextTrack): Clear the track client.
1499
1500 2013-04-15  Robert Hogan  <robert@webkit.org>
1501
1502         An inline element with an absolutely positioned child does not correctly calculate/render padding and margin
1503         https://bugs.webkit.org/show_bug.cgi?id=47554
1504
1505         Reviewed by David Hyatt.
1506
1507         When looking for padding/margin to add from the start of a child's parent skip past any leading positioned siblings as 
1508         we don't add the padding/margin of the common parent when skipping past them in |skipLeadingWhitespace|. We
1509         don't need to worry about the case of trailing positioned objects as we will account for their parent's
1510         border/margin/padding when we encounter them in |nextSegmentBreak|.
1511
1512         Test: fast/inline/padding-before-leading-positioned-element-contributes-width.html
1513
1514         * rendering/RenderBlockLineLayout.cpp:
1515         (WebCore::previousInFlowSibling):
1516         (WebCore):
1517         (WebCore::inlineLogicalWidth):
1518
1519 2013-04-15  peavo@outlook.com  <peavo@outlook.com>
1520
1521         [WinCairo] Compile fix.
1522         https://bugs.webkit.org/show_bug.cgi?id=114623
1523
1524         Reviewed by Brent Fulgham.
1525
1526         * platform/network/curl/CookieJarCurl.cpp: Added required header files.
1527
1528 2013-04-15  Rob Buis  <rbuis@rim.com>
1529
1530         Fix some compiler warnings (miscellaneous)
1531         https://bugs.webkit.org/show_bug.cgi?id=80790
1532
1533         Reviewed by Darin Adler.
1534
1535         It does not seem needed to initialize jpeg_create_compress struct to zero,
1536         all that is needed is set the err field. See for instance SkImageDecoder_libjpeg.cpp.
1537
1538         * platform/image-encoders/JPEGImageEncoder.cpp:
1539         (WebCore::compressRGBABigEndianToJPEG):
1540
1541 2013-04-15  Patrick Gansterer  <paroga@webkit.org>
1542
1543         [GTK] Remove platform specific implementation of KURL::fileSystemPath()
1544         https://bugs.webkit.org/show_bug.cgi?id=114133
1545
1546         Reviewed by Martin Robinson.
1547
1548         r147883 added a generic implementation of this function,
1549         which can be used by all ports to share the code.
1550
1551         * GNUmakefile.list.am:
1552         * platform/KURL.cpp:
1553         (WebCore):
1554         * platform/gtk/KURLGtk.cpp: Removed.
1555
1556 2013-04-15  Csaba Osztrogon√°c  <ossy@webkit.org>
1557
1558         Debug buildfix after r148433.
1559         https://bugs.webkit.org/show_bug.cgi?id=108295
1560
1561         Reviewed by Allan Sandfeld Jensen.
1562
1563         * platform/graphics/texmap/TextureMapperLayer.h:
1564         (WebCore::TextureMapperLayer::children): Added.
1565
1566 2013-04-15  Noam Rosenthal  <noam@webkit.org>
1567
1568         Coordinated Graphics: Remove GraphicsLayerTextureMapper dependency from CoordinatedGraphicsScene.
1569         https://bugs.webkit.org/show_bug.cgi?id=108295
1570
1571         Since all the changes to the TextureMapperLayer tree now come in a single IPC message via
1572         CoordinatedGraphicsState, we don't need the additional buffering done in GraphicsLayerTextureMapper.
1573
1574         This reduces unnecessary function calls, and also streamlines GraphicsLayerTextureMapper to be used
1575         only in WebKit1 (without CoordinatedGraphics).
1576
1577         Reviewed by Allan Sandfeld Jensen.
1578
1579         No new tests, refactor only.
1580
1581         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1582         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
1583         (WebCore::GraphicsLayerTextureMapper::setNeedsDisplay):
1584         (WebCore::GraphicsLayerTextureMapper::setNeedsDisplayInRect):
1585         (WebCore::GraphicsLayerTextureMapper::setDrawsContent):
1586         (WebCore::GraphicsLayerTextureMapper::prepareBackingStoreIfNeeded):
1587         (WebCore::GraphicsLayerTextureMapper::updateDebugBorderAndRepaintCount):
1588         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
1589         (WebCore):
1590         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
1591         (GraphicsLayerTextureMapper):
1592             Removed references to m_hasOwnBackingStore, which was done to separate the CoordinatedGraphics
1593             path from the WK1 path.
1594
1595         * platform/graphics/texmap/TextureMapperLayer.h:
1596         (WebCore::TextureMapperLayer::drawsContent):
1597         (WebCore::TextureMapperLayer::contentsAreVisible):
1598         (WebCore::TextureMapperLayer::size):
1599         (WebCore::TextureMapperLayer::opacity):
1600         (WebCore::TextureMapperLayer::transform):
1601         (WebCore::TextureMapperLayer::isShowingRepaintCounter):
1602         (WebCore::TextureMapperLayer::fixedToViewport):
1603         (TextureMapperLayer):
1604             Added a few public functions needed by CoordinatedGraphicsScene.
1605
1606         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1607         (WebCore::layerShouldHaveBackingStore):
1608         (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
1609         (WebCore::CoordinatedGraphicsScene::paintToGraphicsContext):
1610         (WebCore::CoordinatedGraphicsScene::adjustPositionForFixedLayers):
1611         (WebCore::CoordinatedGraphicsScene::createCanvasIfNeeded):
1612         (WebCore::CoordinatedGraphicsScene::syncCanvasIfNeeded):
1613         (WebCore::CoordinatedGraphicsScene::destroyCanvasIfNeeded):
1614         (WebCore::CoordinatedGraphicsScene::setLayerRepaintCountIfNeeded):
1615         (WebCore::CoordinatedGraphicsScene::setLayerChildrenIfNeeded):
1616         (WebCore::CoordinatedGraphicsScene::setLayerFiltersIfNeeded):
1617         (WebCore::CoordinatedGraphicsScene::setLayerState):
1618         (WebCore::CoordinatedGraphicsScene::getLayerByIDIfExists):
1619         (WebCore::CoordinatedGraphicsScene::createLayer):
1620         (WebCore::CoordinatedGraphicsScene::deleteLayer):
1621         (WebCore::CoordinatedGraphicsScene::setRootLayerID):
1622         (WebCore::CoordinatedGraphicsScene::prepareContentBackingStore):
1623         (WebCore::CoordinatedGraphicsScene::createBackingStoreIfNeeded):
1624         (WebCore::CoordinatedGraphicsScene::removeBackingStoreIfNeeded):
1625         (WebCore::CoordinatedGraphicsScene::resetBackingStoreSizeToLayerSize):
1626         (WebCore::CoordinatedGraphicsScene::createTilesIfNeeded):
1627         (WebCore::CoordinatedGraphicsScene::removeTilesIfNeeded):
1628         (WebCore::CoordinatedGraphicsScene::updateTilesIfNeeded):
1629         (WebCore::CoordinatedGraphicsScene::assignImageBackingToLayer):
1630         (WebCore::CoordinatedGraphicsScene::commitSceneState):
1631         (WebCore::CoordinatedGraphicsScene::ensureRootLayer):
1632         (WebCore::CoordinatedGraphicsScene::setLayerAnimationsIfNeeded):
1633         (WebCore::CoordinatedGraphicsScene::findScrollableContentsLayerAt):
1634         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1635         (CoordinatedGraphicsScene):
1636         (WebCore::CoordinatedGraphicsScene::layerByID):
1637         (WebCore::CoordinatedGraphicsScene::rootLayer):
1638             Use TextureMapperLayer instead of GraphicsLayer and GraphicsLayerTextureMapper.
1639
1640 2013-04-15  Antti Koivisto  <antti@apple.com>
1641
1642         Dynamically triggered subframe loads are causing tile churn
1643         https://bugs.webkit.org/show_bug.cgi?id=114440
1644         
1645         Reviewed by Andreas Kling.
1646         
1647         In some cases we switch in and out of minimal tiles multiple times during page loading. This
1648         creates tile churn where we create speculative tiles and then throw them out. This can be
1649         caused by various reasons including dynamically created subframes.
1650
1651         * page/FrameView.cpp:
1652         (WebCore::FrameView::setIsVisuallyNonEmpty):
1653         
1654             Stay in minimal tiles modes until there is some visual contents. This avoids switching out from minimal
1655             tiles while awaiting response for the initial requests.
1656
1657         * page/FrameView.h:
1658         * rendering/RenderLayerBacking.cpp:
1659         (WebCore::RenderLayerBacking::RenderLayerBacking):
1660         (WebCore::computeTileCoverage):
1661         * rendering/RenderLayerBacking.h:
1662         (WebCore::RenderLayerBacking::didSwitchToFullTileCoverageDuringLoading):
1663         (WebCore::RenderLayerBacking::setDidSwitchToFullTileCoverageDuringLoading):
1664         
1665             Only switch into minimal coverage mode once per page load.
1666
1667         (RenderLayerBacking):
1668
1669 2013-04-15  Rune Lillesveen  <rune@opera.com>
1670
1671         color-index media feature not supported
1672         https://bugs.webkit.org/show_bug.cgi?id=114468
1673
1674         Reviewed by Kenneth Rohde Christiansen.
1675
1676         Support the color-index media feature. Currently assumes that no WebKit
1677         browser will have an output device that uses a color lookup table.
1678
1679         Tests: fast/media/mq-color-index-01.html
1680                fast/media/mq-color-index-02.html
1681
1682         * css/MediaFeatureNames.h:
1683         (MediaFeatureNames):
1684         * css/MediaQueryEvaluator.cpp:
1685         (WebCore::color_indexMediaFeatureEval):
1686         (WebCore):
1687         (WebCore::min_color_indexMediaFeatureEval):
1688         (WebCore::max_color_indexMediaFeatureEval):
1689         * css/MediaQueryExp.cpp:
1690         (WebCore::featureWithPositiveInteger):
1691         (WebCore::featureWithoutValue):
1692
1693 2013-04-15  Balazs Kelemen  <kbalazs@webkit.org>
1694
1695         [CoordGfx] Background color should not be part of GraphicsLayerState
1696         https://bugs.webkit.org/show_bug.cgi?id=113785
1697
1698         Page background is independent from layer state, send it to the UI
1699         as soon as possible.
1700
1701         Should not cause observable change in behavior so no new tests.
1702
1703         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1704         (WebCore::CoordinatedGraphicsScene::commitSceneState):
1705         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
1706
1707 2013-04-15  Carlos Garcia Campos  <cgarcia@igalia.com>
1708
1709         [BlackBerry] Filesystem callback notifyCreateSnapshotFileAndReadMetadata can be called on the wring thread
1710         https://bugs.webkit.org/show_bug.cgi?id=114610
1711
1712         Reviewed by Xan Lopez.
1713
1714         Override notifyCreateSnapshotFileAndReadMetadata to make sure the
1715         callback is called on the right thread.
1716
1717         Fixes a crash in several fast/filesystem test in debug builds.
1718
1719         * platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.cpp:
1720         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyCreateSnapshotFileAndReadMetadata):
1721         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::notifyCreateSnapshotFileAndReadMetadataOnWorkerThread):
1722         * platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.h:
1723
1724 2013-04-15  Arvid Nilsson  <anilsson@rim.com>
1725
1726         [BlackBerry][CSS Filters] Non-image content disappears when filter applied
1727         https://bugs.webkit.org/show_bug.cgi?id=114498
1728
1729         Reviewed by Carlos Garcia Campos.
1730
1731         Applying a filter to a div with simple text content caused the div to
1732         disappear.
1733
1734         In https://bugs.webkit.org/show_bug.cgi?id=114276, we added some GL
1735         state save/restore code for vertex attributes to make sure the state
1736         changes done by BlackBerry::Platform::Graphics don't interfere with
1737         GL code executing in WebKit. However, saving and restoring vertex
1738         attribute state won't do much good if those attributes were never
1739         enabled to begin with. Fixed by enabling vertex attributes
1740         appropriately when setting them, so that state can be saved and
1741         restored.
1742
1743         All the CSS Filters layout tests apply the filters to simple rectangles
1744         or images, there's nothing sufficiently complex that we manage to
1745         trigger this GL state conflict in the BlackBerry port. This suggests
1746         adding a new platform-specific layout test would be appropriate, but
1747         since we don't use pixel tests yet, such a test would not help detect
1748         regressions. Ultimately we decided against adding a layout test for
1749         this bug at this time.
1750
1751         * platform/graphics/blackberry/LayerFilterRenderer.cpp:
1752         (WebCore::LayerFilterRenderer::applyActions):
1753
1754 2013-04-14  Jaehun Lim  <ljaehun.lim@samsung.com>
1755
1756         [css3-text] Parsing -webkit-hanging value for text-indent from css3-text
1757         https://bugs.webkit.org/show_bug.cgi?id=113680
1758
1759         Reviewed by Andreas Kling.
1760
1761         This patch is the parsing part to support hanging value for text-indent.
1762         "hanging" means "Inverts which lines are affected."
1763         It's prefixed and guarded by CSS3_TEXT flag.
1764
1765         No new tests, this patch updates existing tests.
1766
1767         * css/CSSComputedStyleDeclaration.cpp:
1768         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1769         * css/CSSParser.cpp:
1770         (WebCore::CSSParser::parseTextIndent): Parsed "-webkit-hanging" with "-webkit-each-line".
1771         * css/CSSValueKeywords.in: Added "-webkit-hanging" keyword.
1772         * css/DeprecatedStyleBuilder.cpp:
1773         (WebCore::ApplyPropertyTextIndent::applyInheritValue):
1774         (WebCore::ApplyPropertyTextIndent::applyInitialValue):
1775         (WebCore::ApplyPropertyTextIndent::applyValue):
1776         * rendering/style/RenderStyle.h:
1777         * rendering/style/RenderStyleConstants.h: Added enum TextIndentType.
1778         * rendering/style/StyleRareInheritedData.cpp:
1779         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
1780         (WebCore::StyleRareInheritedData::operator==):
1781         * rendering/style/StyleRareInheritedData.h: Added m_textIndentType.
1782         (StyleRareInheritedData):
1783             Added the usual getter / setter / initial methods for m_textIndentType.
1784
1785 2013-04-14  Sam Weinig  <sam@webkit.org>
1786
1787         Move Mac specific snapshotting code into its own file
1788         https://bugs.webkit.org/show_bug.cgi?id=114597
1789
1790         Reviewed by Andreas Kling.
1791
1792         * WebCore.exp.in:
1793         * WebCore.xcodeproj/project.pbxproj:
1794         * bindings/objc/DOM.mm:
1795         (-[DOMRange renderedImageForcingBlackText:]):
1796         * page/Frame.h:
1797         * page/mac/FrameMac.mm:
1798         (WebCore::Frame::nodeImage):
1799         (WebCore::Frame::dragImageForSelection):
1800         * page/mac/FrameSnapshottingMac.h: Added.
1801         * page/mac/FrameSnapshottingMac.mm: Added.
1802         (WebCore::imageFromRect):
1803         (WebCore::selectionImage):
1804         (WebCore::rangeImage):
1805         (WebCore::snapshotDragImage):
1806         * platform/mac/ClipboardMac.mm:
1807         (WebCore::ClipboardMac::dragNSImage):
1808         Move the four Mac specific snapshotting functions in Frame.h into FrameSnapshottingMac.h/mm and turn
1809         them into free standing functions.
1810
1811 2013-04-14  Andreas Kling  <akling@apple.com>
1812
1813         Hawtfix Mac build.
1814
1815         * WebCore.exp.in:
1816
1817 2013-04-14  Andreas Kling  <akling@apple.com>
1818
1819         Only MutableStylePropertySets should be able to have CSSOM wrappers.
1820         <http://webkit.org/b/114595>
1821
1822         Reviewed by Antti Koivisto.
1823
1824         Tighten typing so that only MutableStylePropertySets can have CSSOM wrappers associated.
1825         This allows us to get rid of the out-of-line base class destructor.
1826
1827         * WebCore.exp.in:
1828         * css/StylePropertySet.cpp:
1829         (WebCore::MutableStylePropertySet::~MutableStylePropertySet):
1830         (WebCore::MutableStylePropertySet::cssStyleDeclaration):
1831         (WebCore::MutableStylePropertySet::ensureInlineCSSStyleDeclaration):
1832         * css/StylePropertySet.h:
1833         (StylePropertySet):
1834         (MutableStylePropertySet):
1835         * dom/StyledElement.cpp:
1836         (WebCore::StyledElement::inlineStyleCSSOMWrapper):
1837
1838 2013-04-14  Andreas Kling  <akling@apple.com>
1839
1840         Remove unused function declaration StylePropertySet::setNeedsStyleRecalc().
1841
1842         Rubber-stamped by Antti Koivisto.
1843
1844         * css/StylePropertySet.h:
1845         (StylePropertySet):
1846
1847 2013-04-14  Andreas Kling  <akling@apple.com>
1848
1849         Move StylePropertySet internal storage access helpers to subclass.
1850         <http://webkit.org/b/114592>
1851
1852         Reviewed by Antti Koivisto.
1853
1854         Removed mutablePropertyVector() since most call sites are inside MutableStylePropertySet
1855         and can access m_propertyVector directly. The few ones that aren't can just cast.
1856
1857         For ImmutableStylePropertySet, moved value/metadata array accessors to the subclass
1858         and remove "immutable" from their names.
1859
1860         * css/StylePropertySet.cpp:
1861         (WebCore::StylePropertySet::immutableCopyIfNeeded):
1862         (WebCore::ImmutableStylePropertySet::ImmutableStylePropertySet):
1863         (WebCore::ImmutableStylePropertySet::~ImmutableStylePropertySet):
1864         (WebCore::MutableStylePropertySet::MutableStylePropertySet):
1865         (WebCore::MutableStylePropertySet::removeProperty):
1866         (WebCore::MutableStylePropertySet::removePrefixedOrUnprefixedProperty):
1867         (WebCore::MutableStylePropertySet::setProperty):
1868         (WebCore::MutableStylePropertySet::appendPrefixingVariantProperty):
1869         (WebCore::MutableStylePropertySet::parseDeclaration):
1870         (WebCore::MutableStylePropertySet::addParsedProperties):
1871         (WebCore::MutableStylePropertySet::clear):
1872         (WebCore::MutableStylePropertySet::removePropertiesInSet):
1873         (WebCore::MutableStylePropertySet::findCSSPropertyWithID):
1874         (WebCore::MutableStylePropertySet::removeEquivalentProperties):
1875         (WebCore::StylePropertySet::reportMemoryUsage):
1876         * css/StylePropertySet.h:
1877         (PropertyReference):
1878         (StylePropertySet):
1879         (ImmutableStylePropertySet):
1880         (WebCore::ImmutableStylePropertySet::valueArray):
1881         (WebCore::ImmutableStylePropertySet::metadataArray):
1882         (WebCore::StylePropertySet::PropertyReference::propertyMetadata):
1883         (WebCore::StylePropertySet::PropertyReference::propertyValue):
1884         (WebCore::StylePropertySet::propertyCount):
1885
1886 2013-04-14  Andreas Kling  <akling@apple.com>
1887
1888         Specialize propertyCount() in StylePropertySet subclasses.
1889         <http://webkit.org/b/114590>
1890
1891         Reviewed by Antti Koivisto.
1892
1893         Avoid branching on m_isMutable in code that already knows which type of set it is.
1894
1895         * css/StylePropertySet.h:
1896         (WebCore::ImmutableStylePropertySet::propertyCount):
1897         (ImmutableStylePropertySet):
1898         (WebCore::MutableStylePropertySet::propertyCount):
1899         (MutableStylePropertySet):
1900
1901 2013-04-14  Andreas Kling  <akling@apple.com>
1902
1903         Move property setting/removing functions to MutableStylePropertySet.
1904         <http://webkit.org/b/114589>
1905
1906         Reviewed by Antti Koivisto.
1907
1908         Move all functions for setting/removing properties from StylePropertySet to MutableStylePropertySet.
1909         Had to change SVGElement::animatedSMILStyleProperties() & friends to hand out MutableStylePropertySet*
1910         which was always the internal type anyway.
1911
1912         * css/StylePropertySet.cpp:
1913         (WebCore::MutableStylePropertySet::removeShorthandProperty):
1914         (WebCore::MutableStylePropertySet::removeProperty):
1915         (WebCore::MutableStylePropertySet::removePrefixedOrUnprefixedProperty):
1916         (WebCore::MutableStylePropertySet::setProperty):
1917         (WebCore::MutableStylePropertySet::appendPrefixingVariantProperty):
1918         (WebCore::MutableStylePropertySet::setPrefixingVariantProperty):
1919         (WebCore::MutableStylePropertySet::mergeAndOverrideOnConflict):
1920         (WebCore::MutableStylePropertySet::removeBlockProperties):
1921         (WebCore::MutableStylePropertySet::removePropertiesInSet):
1922         (WebCore::MutableStylePropertySet::findCSSPropertyWithID):
1923         (WebCore::MutableStylePropertySet::removeEquivalentProperties):
1924         * css/StylePropertySet.h:
1925         (StylePropertySet):
1926         (MutableStylePropertySet):
1927         * editing/ApplyStyleCommand.cpp:
1928         (WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
1929         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
1930         (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
1931         * editing/EditingStyle.cpp:
1932         (WebCore::EditingStyle::triStateOfStyle):
1933         (WebCore::removePropertiesInStyle):
1934         (WebCore::reconcileTextDecorationProperties):
1935         * svg/SVGAnimateElement.cpp:
1936         (WebCore::applyCSSPropertyToTarget):
1937         * svg/SVGElement.cpp:
1938         (WebCore::SVGElement::animatedSMILStyleProperties):
1939         (WebCore::SVGElement::ensureAnimatedSMILStyleProperties):
1940         * svg/SVGElement.h:
1941         (SVGElement):
1942         * svg/SVGElementRareData.h:
1943         (WebCore::SVGElementRareData::animatedSMILStyleProperties):
1944         (WebCore::SVGElementRareData::ensureAnimatedSMILStyleProperties):
1945         (SVGElementRareData):
1946
1947 2013-04-14  Andreas Kling  <akling@apple.com>
1948
1949         EditingStyle should have a MutableStylePropertySet internally.
1950         <http://webkit.org/b/114588>
1951
1952         Reviewed by Anders Carlsson.
1953
1954         Switch EditingStyle::m_mutableStyle to a RefPtr<MutableStylePropertySet>.
1955
1956         * css/StylePropertySet.cpp:
1957         (WebCore::StylePropertySet::copyBlockProperties):
1958         * css/StylePropertySet.h:
1959         (StylePropertySet):
1960         * editing/EditingStyle.cpp:
1961         (WebCore::EditingStyle::setStyle):
1962         (WebCore::EditingStyle::mergeStyleFromRules):
1963         (WebCore::StyleChange::StyleChange):
1964         (WebCore::setTextDecorationProperty):
1965         (WebCore::StyleChange::extractTextStyles):
1966         (WebCore::diffTextDecorations):
1967         (WebCore::getPropertiesNotIn):
1968         * editing/EditingStyle.h:
1969         (WebCore::EditingStyle::style):
1970         (EditingStyle):
1971         (StyleChange):
1972
1973 2013-04-14  Andreas Kling  <akling@apple.com>
1974
1975         Move addParsedProperty/addParsedProperties to MutableStylePropertySet.
1976         <http://webkit.org/b/114587>
1977
1978         Reviewed by Antti Koivisto.
1979
1980         All CSSParser methods that mutate an existing StylePropertySet now take a MutableStylePropertySet*
1981         instead of a StylePropertySet*.
1982
1983         * css/CSSParser.cpp:
1984         (WebCore::parseColorValue):
1985         (WebCore::parseSimpleLengthValue):
1986         (WebCore::parseKeywordValue):
1987         (WebCore::parseTranslateTransformValue):
1988         (WebCore::CSSParser::parseValue):
1989         (WebCore::CSSParser::parseDeclaration):
1990         * css/CSSParser.h:
1991         (CSSParser):
1992         * css/StylePropertySet.cpp:
1993         (WebCore::StylePropertySet::setProperty):
1994         (WebCore::MutableStylePropertySet::addParsedProperties):
1995         (WebCore::MutableStylePropertySet::addParsedProperty):
1996         * css/StylePropertySet.h:
1997         (StylePropertySet):
1998         (MutableStylePropertySet):
1999         * css/ViewportStyleResolver.h:
2000         (ViewportStyleResolver):
2001
2002 2013-04-14  Andreas Kling  <akling@apple.com>
2003
2004         CSSParser should return ImmutableStylePropertySets.
2005         <http://webkit.org/b/114585>
2006
2007         Reviewed by Anders Carlsson.
2008
2009         The StylePropertySets created by CSSParser were already immutable.
2010         Let this be reflected in the pointer types returned.
2011
2012         * css/CSSParser.cpp:
2013         (WebCore::CSSParser::parseInlineStyleDeclaration):
2014         (WebCore::CSSParser::parseDeclaration):
2015         (WebCore::CSSParser::createStylePropertySet):
2016         * css/CSSParser.h:
2017         (CSSParser):
2018
2019 2013-04-14  Andreas Kling  <akling@apple.com>
2020
2021         Move StylePropertySet::createImmutable() to ImmutableStylePropertySet.
2022         <http://webkit.org/b/114584>
2023
2024         Reviewed by Anders Carlsson.
2025
2026         StylePropertySet::createImmutable() -> ImmutableStylePropertySet::create()
2027         Also, immutableCopyIfNeeded() now returns a PassRefPtr<ImmutableStylePropertySet>.
2028
2029         * css/CSSParser.cpp:
2030         (WebCore::CSSParser::createStylePropertySet):
2031         * css/StylePropertySet.cpp:
2032         (WebCore::ImmutableStylePropertySet::create):
2033         (WebCore::StylePropertySet::immutableCopyIfNeeded):
2034         * css/StylePropertySet.h:
2035         (StylePropertySet):
2036         (ImmutableStylePropertySet):
2037
2038 2013-04-14  Andreas Kling  <akling@apple.com>
2039
2040         Move parseDeclaration() and clear() to MutableStylePropertySet.
2041         <http://webkit.org/b/114583>
2042
2043         Reviewed by Anders Carlsson.
2044
2045         ...and remove ASSERT(isMutable()) from the function bodies.
2046
2047         * svg/SVGFontFaceElement.cpp:
2048         (WebCore::SVGFontFaceElement::removedFrom):
2049
2050             Use clear() directly instead of taking an empty string through the CSS parser.
2051
2052         * css/StylePropertySet.cpp:
2053         (WebCore::MutableStylePropertySet::parseDeclaration):
2054         (WebCore::MutableStylePropertySet::clear):
2055         * css/StylePropertySet.h:
2056         (StylePropertySet):
2057         (MutableStylePropertySet):
2058         * dom/StyledElement.cpp:
2059         (WebCore::StyledElement::setInlineStyleFromString):
2060
2061 2013-04-14  Andreas Kling  <akling@apple.com>
2062
2063         Move CSSOM classes to using MutableStylePropertySet over StylePropertySet.
2064         <http://webkit.org/b/114581>
2065
2066         Reviewed by Anders Carlsson.
2067
2068         Moved ensureCSSStyleDeclaration() and ensureInlineCSSStyleDeclaration() from StylePropertySet
2069         to MutableStylePropertySet.
2070
2071         StyleRule & co now return a MutableStylePropertySet* from mutableProperties() to aid with...
2072
2073         CSSStyleDeclaration now only deals with MutableStylePropertySets. This was already the case
2074         in practice, we just didn't have any compile-time foot-shooting protection.
2075         In other words, if there's a CSSOM wrapper for a given StylePropertySet, it's guaranteed to
2076         be mutable, and the pointer types now reflect this.
2077
2078         * WebCore.exp.in:
2079         * css/PropertySetCSSStyleDeclaration.cpp:
2080         (WebCore::StyleRuleCSSStyleDeclaration::StyleRuleCSSStyleDeclaration):
2081         (WebCore::StyleRuleCSSStyleDeclaration::reattach):
2082         * css/PropertySetCSSStyleDeclaration.h:
2083         (WebCore::PropertySetCSSStyleDeclaration::PropertySetCSSStyleDeclaration):
2084         (PropertySetCSSStyleDeclaration):
2085         (WebCore::StyleRuleCSSStyleDeclaration::create):
2086         (StyleRuleCSSStyleDeclaration):
2087         (WebCore::InlineCSSStyleDeclaration::InlineCSSStyleDeclaration):
2088         * css/StylePropertySet.cpp:
2089         (WebCore::MutableStylePropertySet::ensureCSSStyleDeclaration):
2090         (WebCore::MutableStylePropertySet::ensureInlineCSSStyleDeclaration):
2091         * css/StylePropertySet.h:
2092         (StylePropertySet):
2093         (MutableStylePropertySet):
2094         * css/StyleRule.cpp:
2095         (WebCore::StyleRule::mutableProperties):
2096         (WebCore::StyleRulePage::mutableProperties):
2097         (WebCore::StyleRuleFontFace::mutableProperties):
2098         (WebCore::StyleRuleViewport::mutableProperties):
2099         (WebCore::StyleRuleFilter::mutableProperties):
2100         * css/StyleRule.h:
2101         (StyleRule):
2102         (StyleRuleFontFace):
2103         (StyleRulePage):
2104         (StyleRuleViewport):
2105         (StyleRuleFilter):
2106         * css/WebKitCSSKeyframeRule.cpp:
2107         (WebCore::StyleKeyframe::mutableProperties):
2108         * css/WebKitCSSKeyframeRule.h:
2109         (StyleKeyframe):
2110         * dom/Attr.cpp:
2111         (WebCore::Attr::style):
2112         * dom/Attr.h:
2113         (Attr):
2114         * editing/EditingStyle.cpp:
2115         (WebCore::EditingStyle::removeStyleAddedByNode):
2116         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
2117         (WebCore::EditingStyle::triStateOfStyle):
2118         (WebCore::styleFromMatchedRulesForElement):
2119         (WebCore::EditingStyle::removeStyleFromRulesAndContext):
2120         * editing/FrameSelection.cpp:
2121         (WebCore::FrameSelection::copyTypingStyle):
2122         * editing/FrameSelection.h:
2123         * inspector/InspectorCSSAgent.cpp:
2124         (WebCore::InspectorCSSAgent::buildObjectForAttributesStyle):
2125
2126 2013-04-14  Andreas Kling  <akling@apple.com>
2127
2128         Move create() methods from StylePropertySet to MutableStylePropertySet.
2129         <http://webkit.org/b/114574>
2130
2131         Reviewed by Antti Koivisto.
2132
2133         Move the two create() methods that create MutableStylePropertySets from StylePropertySet
2134         to MutableStylePropertySet, and make them actually return MutableStylePropertySets.
2135         Switch to using {Pass,}RefPtr<MutableStylePropertySet> where appropriate to keep things building.
2136
2137         * css/CSSComputedStyleDeclaration.cpp:
2138         (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
2139         * css/CSSParser.cpp:
2140         (WebCore::CSSParser::parseFontFaceValue):
2141         * css/DOMWindowCSS.cpp:
2142         (WebCore::DOMWindowCSS::supports):
2143         * css/ElementRuleCollector.cpp:
2144         (WebCore::leftToRightDeclaration):
2145         (WebCore::rightToLeftDeclaration):
2146         * css/FontLoader.cpp:
2147         (WebCore::FontLoader::resolveFontStyle):
2148         * css/StylePropertySet.cpp:
2149         (WebCore::StylePropertySet::copyPropertiesInSet):
2150         (WebCore::MutableStylePropertySet::create):
2151         * css/StylePropertySet.h:
2152         (StylePropertySet):
2153         (MutableStylePropertySet):
2154         * css/StyleResolver.cpp:
2155         (WebCore::StyleResolver::resolveVariables):
2156         * css/WebKitCSSMatrix.cpp:
2157         (WebCore::WebKitCSSMatrix::setMatrixValue):
2158         * dom/Attr.cpp:
2159         (WebCore::Attr::style):
2160         * dom/Document.cpp:
2161         (WebCore::Document::createCSSStyleDeclaration):
2162         * dom/StyledElement.cpp:
2163         (WebCore::StyledElement::ensureMutableInlineStyle):
2164         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2165         * editing/ApplyStyleCommand.cpp:
2166         (WebCore::copyStyleOrCreateEmpty):
2167         * editing/EditingStyle.cpp:
2168         (WebCore::editingStyleFromComputedStyle):
2169         (WebCore::HTMLAttributeEquivalent::attributeValueAsCSSValue):
2170         (WebCore::EditingStyle::setProperty):
2171         (WebCore::EditingStyle::extractAndRemoveTextDirection):
2172         (WebCore::styleFromMatchedRulesForElement):
2173         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
2174         (WebCore::EditingStyle::forceInline):
2175         * editing/Editor.cpp:
2176         (WebCore::Editor::setBaseWritingDirection):
2177         * editing/EditorCommand.cpp:
2178         (WebCore::executeApplyStyle):
2179         (WebCore::executeToggleStyleInList):
2180         (WebCore::executeApplyParagraphStyle):
2181         (WebCore::executeMakeTextWritingDirectionLeftToRight):
2182         (WebCore::executeMakeTextWritingDirectionNatural):
2183         (WebCore::executeMakeTextWritingDirectionRightToLeft):
2184         * html/HTMLTableElement.cpp:
2185         (WebCore::leakBorderStyle):
2186         (WebCore::HTMLTableElement::createSharedCellStyle):
2187         (WebCore::leakGroupBorderStyle):
2188         * html/canvas/CanvasRenderingContext2D.cpp:
2189         (WebCore::CanvasRenderingContext2D::setFont):
2190         * inspector/InspectorStyleSheet.cpp:
2191         (WebCore::InspectorStyle::setPropertyText):
2192         (WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges):
2193         * page/DragController.cpp:
2194         (WebCore::DragController::concludeEditDrag):
2195         * svg/SVGElementRareData.h:
2196         (WebCore::SVGElementRareData::ensureAnimatedSMILStyleProperties):
2197         * svg/SVGFontFaceElement.cpp:
2198         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
2199         * svg/SVGStyledElement.cpp:
2200         (WebCore::SVGStyledElement::getPresentationAttribute):
2201
2202 2013-04-13  Sam Weinig  <sam@webkit.org>
2203
2204         Fix three crashes seen on the bots after "Make Frame's ScriptController an OwnPtr and remove the #include"
2205
2206         * xml/XMLHttpRequest.cpp:
2207         (WebCore::XMLHttpRequest::open):
2208         Check that the frame is not null (as it can be in cases like http/tests/xmlhttprequest/detaching-frame-2.html).
2209         We used to be getting lucky, in that shouldBypassMainWorldContentSecurityPolicy(), the function that is ultimately
2210         called, only operates on global state. Now that we need to actually dereference the Frame to get the ScriptController,
2211         we see this crash.
2212
2213 2013-04-13  Sukolsak Sakshuwong  <sukolsak@gmail.com>
2214
2215         Selection direction is not preserved when applying styles
2216         https://bugs.webkit.org/show_bug.cgi?id=110979
2217
2218         Reviewed by Ryosuke Niwa.
2219
2220         The patch is based on the one submitted by Shezan Baig.
2221
2222         If the starting selection was directional and its base was not first,
2223         switch newStart and newEnd when setting the ending direction. Otherwise,
2224         leave the order unchanged.
2225
2226         Test: editing/style/preserve-selection-direction.html
2227
2228         * editing/ApplyStyleCommand.cpp:
2229         (WebCore::ApplyStyleCommand::updateStartEnd):
2230
2231 2013-04-13  Alexey Proskuryakov  <ap@apple.com>
2232
2233         Added svn:ignore for inspector/CodeGeneratorInspectorStrings.pyc
2234
2235         * inspector: Added property svn:ignore.
2236
2237 2013-04-13  Sam Weinig  <sam@webkit.org>
2238
2239         Make Frame's ScriptController an OwnPtr and remove the #include
2240         https://bugs.webkit.org/show_bug.cgi?id=114105
2241
2242         Reviewed by Dean Jackson.
2243
2244         * Modules/websockets/WebSocket.cpp:
2245         * bindings/generic/BindingSecurity.cpp:
2246         * bindings/js/JSEventListener.cpp:
2247         * bindings/js/JSLazyEventListener.cpp:
2248         * bindings/js/PageScriptDebugServer.cpp:
2249         * bindings/js/ScriptEventListener.cpp:
2250         * bindings/js/ScriptState.cpp:
2251         * bindings/objc/DOM.mm:
2252         * bindings/objc/DOMAbstractView.mm:
2253         * bindings/objc/DOMInternal.mm:
2254         * dom/DocumentStyleSheetCollection.cpp:
2255         * dom/EventTarget.cpp:
2256         * dom/ScriptElement.cpp:
2257         * history/CachedFrame.cpp:
2258         * html/HTMLCanvasElement.cpp:
2259         * html/HTMLDocument.cpp:
2260         * html/HTMLElement.cpp:
2261         * html/HTMLFormElement.cpp:
2262         * html/HTMLPlugInElement.cpp:
2263         * html/HTMLPlugInImageElement.cpp:
2264         * html/parser/HTMLParserOptions.cpp:
2265         * inspector/InspectorAgent.cpp:
2266         * inspector/InspectorController.cpp:
2267         * inspector/InspectorFrontendClientLocal.cpp:
2268         * inspector/InspectorFrontendHost.cpp:
2269         * inspector/InspectorInstrumentation.cpp:
2270         * inspector/InspectorOverlay.cpp:
2271         * inspector/InspectorPageAgent.cpp:
2272         * inspector/PageRuntimeAgent.cpp:
2273         * loader/DocumentWriter.cpp:
2274         * loader/NavigationScheduler.cpp:
2275         * loader/SubframeLoader.cpp:
2276         * loader/cache/CachedResourceLoader.cpp:
2277         * page/DOMWindow.cpp:
2278         * page/EventSource.cpp:
2279         * page/Frame.cpp:
2280         * page/Frame.h:
2281         * page/Navigator.cpp:
2282         * page/Page.cpp:
2283         * page/PageGroup.cpp:
2284         * xml/XMLHttpRequest.cpp:
2285         * xml/XMLTreeViewer.cpp:
2286
2287 2013-04-13  Anders Carlsson  <andersca@apple.com>
2288
2289         Add form delegate method that's invoked right before sending a submit event to a form element
2290         https://bugs.webkit.org/show_bug.cgi?id=114575
2291
2292         Reviewed by Dan Bernstein.
2293
2294         * WebCore.exp.in:
2295         Export a symbol.
2296
2297         * WebCore.xcodeproj/project.pbxproj:
2298         Make DOMHTMLFormElementInternal.h a private header.
2299
2300 2013-03-13  Robert Hogan  <robert@webkit.org>
2301
2302         Whitespace between nowrap elements ignored after collapsed trailing space in a text run
2303         https://bugs.webkit.org/show_bug.cgi?id=17705
2304
2305         Reviewed by Ryosuke Niwa.
2306
2307         Bug 93448 and r138654 fixed the treatment of line-breaks between nowrap elements. This augments
2308         that fix by recognizing that we have a potential break not only in situations where the next character is a 
2309         space and the current character is not, but also where the next character is a space and the current character 
2310         *is* a space *and* we are ignoring spaces. This is so because any spaces we have ignored up to this point 
2311         after the actual word end will get collapsed away even if we don't end up taking the line break. 
2312
2313         In a nutshell, if we allow whitespace collapsing 'word  ' and 'word' are equivalent when before a whitespace
2314         character, so treat the first as well as the second as a potential linebreak.
2315
2316         Test: fast/text/whitespace/inline-whitespace-wrapping-5.html
2317
2318         * rendering/RenderBlockLineLayout.cpp:
2319         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2320
2321 2013-04-13  Andreas Kling  <akling@apple.com>
2322
2323         Rename/tweak some StylePropertySet/CSSStyleDeclaration copying functions.
2324         <http://webkit.org/b/114569>
2325
2326         Reviewed by Anders Carlsson.
2327
2328         - StylePropertySet::copy() -> mutableCopy()
2329
2330             This function now returns a MutableStylePropertySet, and this is also reflected in the name.
2331
2332         - CSSStyleDeclaration::copy() -> copyProperties()
2333
2334             Renamed to reflect that it's the properties being copied, not the CSSStyleDeclaration.
2335             They also now return MutableStylePropertySets.
2336
2337         - StylePropertySet::copyPropertiesInSet()
2338         - CSSStyleDeclaration::copyPropertiesInSet()
2339
2340             These functions now return MutableStylePropertySets.
2341
2342         * css/CSSComputedStyleDeclaration.cpp:
2343         (WebCore::CSSComputedStyleDeclaration::copyProperties):
2344         (WebCore::CSSComputedStyleDeclaration::copyPropertiesInSet):
2345         * css/CSSComputedStyleDeclaration.h:
2346         (CSSComputedStyleDeclaration):
2347         * css/CSSStyleDeclaration.h:
2348         (CSSStyleDeclaration):
2349         * css/PropertySetCSSStyleDeclaration.cpp:
2350         (WebCore::PropertySetCSSStyleDeclaration::copyProperties):
2351         * css/PropertySetCSSStyleDeclaration.h:
2352         * css/StylePropertySet.cpp:
2353         (WebCore::StylePropertySet::mutableCopy):
2354         (WebCore::StylePropertySet::copyPropertiesInSet):
2355         * css/StylePropertySet.h:
2356         (StylePropertySet):
2357         * css/StyleRule.cpp:
2358         (WebCore::StyleRule::StyleRule):
2359         (WebCore::StyleRule::mutableProperties):
2360         (WebCore::StyleRulePage::StyleRulePage):
2361         (WebCore::StyleRulePage::mutableProperties):
2362         (WebCore::StyleRuleFontFace::StyleRuleFontFace):
2363         (WebCore::StyleRuleFontFace::mutableProperties):
2364         (WebCore::StyleRuleViewport::StyleRuleViewport):
2365         (WebCore::StyleRuleViewport::mutableProperties):
2366         (WebCore::StyleRuleFilter::StyleRuleFilter):
2367         (WebCore::StyleRuleFilter::mutableProperties):
2368         * css/ViewportStyleResolver.cpp:
2369         (WebCore::ViewportStyleResolver::addViewportRule):
2370         * css/WebKitCSSKeyframeRule.cpp:
2371         (WebCore::StyleKeyframe::mutableProperties):
2372         * dom/Element.cpp:
2373         (WebCore::UniqueElementData::UniqueElementData):
2374         * dom/StyledElement.cpp:
2375         (WebCore::StyledElement::ensureMutableInlineStyle):
2376         * editing/ApplyStyleCommand.cpp:
2377         (WebCore::copyStyleOrCreateEmpty):
2378         * editing/EditingStyle.cpp:
2379         (WebCore::copyEditingProperties):
2380         (WebCore::editingStyleFromComputedStyle):
2381         (WebCore::EditingStyle::EditingStyle):
2382         (WebCore::EditingStyle::init):
2383         (WebCore::EditingStyle::copy):
2384         (WebCore::EditingStyle::mergeStyle):
2385         (WebCore::getPropertiesNotIn):
2386         * editing/FrameSelection.cpp:
2387         (WebCore::FrameSelection::copyTypingStyle):
2388
2389 2013-04-13  Dirk Schulze  <krit@webkit.org>
2390
2391         Rename StyleBuilder to DeprecatedStyleBuilder
2392         https://bugs.webkit.org/show_bug.cgi?id=114532
2393
2394         Reviewed by Benjamin Poulain.
2395
2396         The StyleBuilder code is hard to read and maintain. People should
2397         not add new properties to this class. To make this clear, this
2398         patch renames the class to DeprecatedStyleBuilder.
2399
2400         Pure refactoring, no change in functionality.
2401
2402         * CMakeLists.txt:
2403         * GNUmakefile.list.am:
2404         * Target.pri:
2405         * WebCore.vcproj/WebCore.vcproj:
2406         * WebCore.vcxproj/WebCore.vcxproj.filters:
2407         * WebCore.xcodeproj/project.pbxproj:
2408         * css/CSSAllInOne.cpp:
2409         * css/DeprecatedStyleBuilder.cpp: Renamed from Source/WebCore/css/StyleBuilder.cpp.
2410         * css/DeprecatedStyleBuilder.h: Renamed from Source/WebCore/css/StyleBuilder.h.
2411         * css/StyleResolver.cpp:
2412         (WebCore::StyleResolver::StyleResolver):
2413         (WebCore::StyleResolver::applyProperty):
2414         (WebCore::StyleResolver::reportMemoryUsage):
2415         * css/StyleResolver.h:
2416         (StyleResolver):
2417         * rendering/style/RenderStyle.h:
2418
2419 2013-04-13  Andreas Kling  <akling@apple.com>
2420
2421         Remove unused method CSSStyleDeclaration::makeMutable().
2422         <http://webkit.org/b/114567>
2423
2424         Reviewed by Anders Carlsson.
2425
2426         * css/CSSComputedStyleDeclaration.cpp:
2427         * css/CSSComputedStyleDeclaration.h:
2428         (CSSComputedStyleDeclaration):
2429         * css/CSSStyleDeclaration.h:
2430         (CSSStyleDeclaration):
2431         * css/PropertySetCSSStyleDeclaration.cpp:
2432         * css/PropertySetCSSStyleDeclaration.h:
2433
2434 2013-04-13  Antoine Quint  <graouts@apple.com>
2435
2436         Width of last of consecutive tabs may be incorrect with "white-space: pre-wrap"
2437         https://bugs.webkit.org/show_bug.cgi?id=114562
2438
2439         Reviewed by Dan Bernstein.
2440
2441         When we measure the last word of a RenderText, make sure we use the correct x
2442         position taking into account the current accumulated word measurements up to
2443         this character. This is of particular importance in the case of tabs where the
2444         measured width would differ based on the x position.
2445
2446         Test: fast/text/tab-last-word-in-renderer-pre-wrap.html
2447
2448         * rendering/RenderBlockLineLayout.cpp:
2449         (WebCore::setLogicalWidthForTextRun):
2450
2451 2013-04-13  Mark Salisbury  <mark.salisbury@hp.com>
2452
2453         [Windows, WinCairo] ImageBufferCairo.cpp fails to compile after 148247, 148264.
2454         https://bugs.webkit.org/show_bug.cgi?id=114540
2455         
2456         Reviewed by Brent Fulgham.
2457
2458         * platform/graphics/cairo/ImageBufferCairo.cpp:
2459
2460 2013-04-13  Zan Dobersek  <zdobersek@igalia.com>
2461
2462         Unreviewed GTK build fix after r148305.
2463
2464         * GNUmakefile.list.am: Adding the TrackListBase build targets to the build.
2465
2466 2013-04-09  Roger Fong  <roger_fong@apple.com>
2467
2468         Update AVFoundationCF code following http://trac.webkit.org/changeset/148291.
2469         https://bugs.webkit.org/show_bug.cgi?id=114548.
2470
2471         Reviewed by Eric Carlson.
2472
2473         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2474         (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
2475         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
2476         (WebCore):
2477         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
2478         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2479         (MediaPlayerPrivateAVFoundationCF):
2480
2481 2013-04-12  Simon Fraser  <simon.fraser@apple.com>
2482
2483         Demystify some code in RenderLayer::updateScrollableAreaSet()
2484         https://bugs.webkit.org/show_bug.cgi?id=114543
2485
2486         Reviewed by Tim Horton.
2487
2488         Clean up some code that called functions with important side effects
2489         inside a ternary operator, and clean up the #ifdefs.
2490
2491         * rendering/RenderLayer.cpp:
2492         (WebCore::RenderLayer::updateScrollableAreaSet):
2493
2494 2013-04-12  Alexey Proskuryakov  <ap@apple.com>
2495
2496         <rdar://problem/13277362> REGRESSION (r141981): Crash when closing a Google Docs document
2497         https://bugs.webkit.org/show_bug.cgi?id=114541
2498
2499         Reviewed by Brady Eidson.
2500
2501         Test: http/tests/ssl/ping-with-unsafe-redirect.html
2502
2503         * loader/FrameNetworkingContext.h:
2504         (WebCore::FrameNetworkingContext::shouldClearReferrerOnHTTPSToHTTPRedirect):
2505         Added a null check. All NetworkingContext functions except for this one had it already.
2506
2507 2013-04-12  Ryosuke Niwa  <rniwa@webkit.org>
2508
2509         [Mac] REGRESSION: Auto substitution strips new lines
2510         https://bugs.webkit.org/show_bug.cgi?id=114537
2511
2512         Reviewed by Enrica Casucci.
2513
2514         The bug was caused by SpellingCorrectionCommand's use of InsertTextCommand. This command can't insert
2515         new lines and there's even an assertion for it. Use TypingCommand::insertText instead.
2516
2517         Since TypingCommand::insertText calls appliedEditing on its own, we need to avoid calling that again in
2518         CompositeEditCommand::apply after SpellingCorrectionCommand::doApply. Replaced the check in apply to use
2519         callsAppliedEditingInDoApply instead of isTypingCommand, and added callsAppliedEditingInDoApply to both
2520         TypingCommand and SpellingCorrectionCommand to return true (it returns false by default).
2521
2522         Test: platform/mac/editing/spelling/autocorrection-with-multi-line-text.html
2523
2524         * editing/CompositeEditCommand.cpp:
2525         (WebCore::CompositeEditCommand::apply): Use TypingCommand::insertText instead of InsertTextCommand
2526         (WebCore::CompositeEditCommand::callsAppliedEditingInDoApply): Added. Returns false.
2527         * editing/CompositeEditCommand.h:
2528         (CompositeEditCommand):
2529         * editing/SpellingCorrectionCommand.cpp:
2530         (WebCore::SpellingCorrectionCommand::doApply):
2531         (WebCore::SpellingCorrectionCommand::callsAppliedEditingInDoApply): Added. Returns true.
2532         * editing/SpellingCorrectionCommand.h:
2533         (SpellingCorrectionCommand):
2534         * editing/TypingCommand.cpp:
2535         (WebCore::TypingCommand::callsAppliedEditingInDoApply): Added. Returns true.
2536         * editing/TypingCommand.h:
2537         (TypingCommand):
2538
2539 2013-04-12  Brendan Long  <b.long@cablelabs.com>
2540
2541         Refactor TextTrack and TextTrackList to make it easier to add audio and video tracks
2542         https://bugs.webkit.org/show_bug.cgi?id=114330
2543
2544         Reviewed by Jer Noble.
2545
2546         No new tests because this doesn't add new functionality.
2547
2548         * CMakeLists.txt: Only compile text track files if ENABLE(VIDEO_TRACK), and add TrackListBase
2549         * Target.pri: Add TrackListBase
2550         * WebCore.vcproj/WebCore.vcproj: Correct InbandTextTrackPrivate.h's location and add TrackListBase
2551         * WebCore.xcodeproj/project.pbxproj: Add TrackListBase
2552         * html/HTMLMediaElement.cpp: Renamed "track" functions to "textTrack"
2553         (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Renamed.
2554         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveTextTrack): Renamed.
2555         (WebCore::HTMLMediaElement::addTextTrack): Renamed.
2556         (WebCore::HTMLMediaElement::removeTextTrack): Renamed.
2557         (WebCore::HTMLMediaElement::removeAllInbandTracks): Use renamed functions.
2558         (WebCore::HTMLMediaElement::didAddTextTrack): Renamed.
2559         (WebCore::HTMLMediaElement::didRemoveTextTrack): Renamed.
2560         * html/HTMLMediaElement.h:
2561         Renamed "track" functions to "textTrack" and only forward-declare TextTrackList if ENABLE(VIDEO_TRACK)
2562         * html/HTMLTrackElement.cpp: Renamed "track" functions to "textTrack"
2563         (WebCore::HTMLTrackElement::insertedInto):
2564         (WebCore::HTMLTrackElement::removedFrom):
2565         * html/track/TextTrack.cpp:
2566         Move media element, label, language and kind into TrackBase and move EventTarget functions into TextTrack.
2567         (WebCore::TextTrack::TextTrack): Added.
2568         (WebCore::TextTrack::interfaceName): Added.
2569         (WebCore::TextTrack::scriptExecutionContext): Added.
2570         (WebCore::TextTrack::eventTargetData): Added.
2571         (WebCore::TextTrack::ensureEventTargetData): Added.
2572         (WebCore::TextTrack::isValidKind): Added to support TrackBase::setKind()
2573         (WebCore::TextTrack::setKind): Override to support textTrackKindChanged()
2574         (WebCore::TextTrack::isRendered): Use kind(), label() and language() instead of m_kind, etc.
2575         (WebCore::TextTrack::platformTextTrack): Ditto.
2576         (WebCore::TextTrack::isMainProgramContent): Ditto.
2577         * html/track/TextTrack.h:
2578         Same as TextTrack.cpp, plus added defaultKindKeyword() so TrackBase::setKind() will work and added
2579         toTextTrack().
2580         * html/track/TextTrackList.cpp:
2581         Move functionality into TrackListBase, add toTextTrack() casts, use
2582         TrackBase where necesssary and use owner() instead of m_owner.
2583
2584         Moved EventTarget functions into TrackListBase.
2585         (TextTrackList::TextTrackList):
2586         (TextTrackList::getTrackIndexRelativeToRenderedTracks):
2587         (TextTrackList::item):
2588         (TextTrackList::invalidateTrackIndexesAfterTrack):
2589         (TextTrackList::append):
2590         (TextTrackList::remove):
2591         (TextTrackList::contains):
2592         * html/track/TextTrackList.h:
2593         Move EventTarget, RefCounted and m_inbandTracks into TrackListBase.
2594         Override length(), contains() and remove().
2595         * html/track/TrackBase.cpp: Remove EventTarget functions.
2596         (WebCore::TrackBase::TrackBase):
2597         Remove EventTarget, add label and language
2598         (WebCore::TrackBase::setKind): Added
2599         * html/track/TrackBase.h:
2600         Don't extend EventTarget (AudioTrack and VideoTrack aren't). Handle
2601         kind, label, language and media element.
2602         (WebCore::TrackBase::setMediaElement): Added.
2603         (WebCore::TrackBase::mediaElement): Added.
2604         (WebCore::TrackBase::kind): Added.
2605         (WebCore::TrackBase::label): Added.
2606         (WebCore::TrackBase::setLabel): Added.
2607         (WebCore::TrackBase::language): Added.
2608         (WebCore::TrackBase::setLanguage): Added.
2609         * html/track/TrackListBase.cpp:
2610         Added. Handles functionality common to TextTrackList, AudioTrackList and
2611         VideoTrackList.
2612         (TrackListBase::TrackListBase): Added.
2613         (TrackListBase::~TrackListBase): Added.
2614         (TrackListBase::length): Added.
2615         (TrackListBase::remove): Added.
2616         (TrackListBase::contains): Added.
2617         (TrackListBase::scheduleAddTrackEvent): Added.
2618         (TrackListBase::scheduleRemoveTrackEvent): Added.
2619         (TrackListBase::scheduleChangeEvent): Added.
2620         (TrackListBase::asyncEventTimerFired): Added.
2621         * html/track/TrackListBase.h:
2622         Copied from Source/WebCore/html/track/TextTrackList.h. Handles
2623         functionality common to TextTrackList, AudioTrackList and VideoTrackList.
2624         (WebCore::TrackListBase::scriptExecutionContext): Added.
2625         (WebCore::TrackListBase::clearOwner): Added.
2626         (WebCore::TrackListBase::owner): Added.
2627         (WebCore::TrackListBase::isFiringEventListeners): Added.
2628         * platform/graphics/MediaPlayer.cpp:
2629         (WebCore::MediaPlayer::addTextTrack): Renamed (was addTrack)
2630         (WebCore::MediaPlayer::removeTextTrack): Renamed (was removeTrack)
2631         * platform/graphics/MediaPlayer.h:
2632         (WebCore::MediaPlayerClient::mediaPlayerDidAddTextTrack): Renamed (was mediaPlayerDidAddTrack)
2633         (WebCore::MediaPlayerClient::mediaPlayerDidRemoveTextTrack): Renamed (was mediaPlayerDidRemoveTrack)
2634
2635 2013-04-12  Oliver Hunt  <oliver@apple.com>
2636
2637         make the codegenerator actually emit polymorphism check in the "no vtable" path
2638         https://bugs.webkit.org/show_bug.cgi?id=114533
2639
2640         Reviewed by David Kilzer.
2641
2642         Make the "no vtable" check correct so that we actually plant a polymorphism
2643         check.  Update a few interfaces to have the correct validation attributes.        
2644
2645         * Modules/webdatabase/SQLTransaction.idl:
2646         * bindings/scripts/CodeGeneratorJS.pm:
2647         (GenerateImplementation):
2648         * bindings/scripts/test/JS/JSTestInterface.cpp:
2649         (WebCore::toJS):
2650         * bindings/scripts/test/TestInterface.idl:
2651         * html/track/TextTrackCue.idl:
2652         * svg/SVGAnimatedAngle.idl:
2653         * svg/SVGAnimatedBoolean.idl:
2654         * svg/SVGAnimatedEnumeration.idl:
2655         * svg/SVGAnimatedInteger.idl:
2656         * svg/SVGAnimatedLength.idl:
2657         * svg/SVGAnimatedLengthList.idl:
2658         * svg/SVGAnimatedNumber.idl:
2659         * svg/SVGAnimatedNumberList.idl:
2660         * svg/SVGAnimatedPreserveAspectRatio.idl:
2661         * svg/SVGAnimatedRect.idl:
2662         * svg/SVGAnimatedString.idl:
2663         * svg/SVGAnimatedTransformList.idl:
2664
2665 2013-04-12  Oliver Hunt  <oliver@apple.com>
2666
2667         Make CodeGeneratorJS plant comments to explain failures in the binding validation
2668         https://bugs.webkit.org/show_bug.cgi?id=114528
2669
2670         Reviewed by Sam Weinig.
2671
2672         No change in behaviour, just make the generated bindings include comments
2673         to aid diagnosing issues that may be non-obvious.
2674
2675         * bindings/scripts/CodeGeneratorJS.pm:
2676         (GenerateImplementation):
2677         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2678         (WebCore::toJS):
2679         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2680         (WebCore::toJS):
2681         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2682         (WebCore::toJS):
2683         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2684         (WebCore::toJS):
2685         * bindings/scripts/test/JS/JSTestException.cpp:
2686         (WebCore::toJS):
2687         * bindings/scripts/test/JS/JSTestInterface.cpp:
2688         (WebCore::toJS):
2689         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2690         (WebCore::toJS):
2691         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2692         (WebCore::toJS):
2693         * bindings/scripts/test/JS/JSTestObj.cpp:
2694         (WebCore::toJS):
2695         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2696         (WebCore::toJS):
2697         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2698         (WebCore::toJS):
2699         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2700         (WebCore::toJS):
2701
2702 2013-04-12  Tim Horton  <timothy_horton@apple.com>
2703
2704         REGRESSION (r138858): GIFs don't start playing when they come out of background tabs
2705         https://bugs.webkit.org/show_bug.cgi?id=108864
2706         <rdar://problem/13140489>
2707
2708         Reviewed by Antti Koivisto.
2709
2710         * loader/cache/CachedImage.cpp:
2711         (WebCore::CachedImage::resumeAnimatingImagesForLoader): Added.
2712         Iterate through all of the loader's cached resources. If they are bitmap images
2713         which claim to be animatable, notify the image's observers that the animation advanced
2714         by one frame. In reality, the image is still on the same frame, but will now be repainted,
2715         restarting the animation loop.
2716         * loader/cache/CachedImage.h:
2717         * page/FrameView.cpp:
2718         (WebCore::FrameView::setIsInWindow):
2719         When the FrameView is brought into a window, repaint all animated images.
2720         * platform/graphics/BitmapImage.cpp:
2721         (WebCore::BitmapImage::canAnimate): Added. 
2722         Return whether or not the image should animate (claims to animate, has not already
2723         finished its animation, and has an ImageObserver) *and* has more than one frame.
2724         * platform/graphics/BitmapImage.h:
2725         (BitmapImage): Add canAnimate.
2726
2727 2013-04-12  Martin Robinson  <mrobinson@igalia.com>
2728
2729         r148197 broke the GTK+ build
2730         https://bugs.webkit.org/show_bug.cgi?id=114525
2731
2732         Reviewed by Anders Carlsson.
2733
2734         Re-add the ENABLE(SCROLLING_THREAD) guards to scrolling thread files
2735         and extend them with USE(COORDINATED_GRAPHICS). This code is unused
2736         by other configurations currently.
2737
2738         * page/scrolling/ScrollingStateFixedNode.cpp: Re-add guards.
2739         * page/scrolling/ScrollingStateFixedNode.h: Ditto.
2740         * page/scrolling/ScrollingStateNode.cpp: Ditto.
2741         * page/scrolling/ScrollingStateNode.h: Ditto.
2742         * page/scrolling/ScrollingStateScrollingNode.cpp: Ditto.
2743         * page/scrolling/ScrollingStateScrollingNode.h: Ditto.
2744         * page/scrolling/ScrollingStateStickyNode.cpp: Ditto.
2745         * page/scrolling/ScrollingStateStickyNode.h: Ditto.
2746         * page/scrolling/ScrollingStateTree.cpp: Ditto.
2747         * page/scrolling/ScrollingStateTree.h: Ditto.
2748         * page/scrolling/mac/ScrollingStateNodeMac.mm: Ditto.
2749         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm: Ditto.
2750
2751 2013-04-12  Jer Noble  <jer.noble@apple.com>
2752
2753         (AVFoundation) WebKit fails to detect live stream.
2754         https://bugs.webkit.org/show_bug.cgi?id=114474
2755
2756         Reviewed by Eric Carlson.
2757
2758         Remove a workaround (added by r88944) for an error in an Apple.com javascript
2759         media controller. The error has been fixed, and the workaround is causing problems
2760         with other media streams.
2761
2762         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2763         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
2764
2765 2013-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2766
2767         [GTK] Split GtkAuthenticationDialog in two widgets
2768         https://bugs.webkit.org/show_bug.cgi?id=103644
2769
2770         Reviewed by Xan Lopez.
2771
2772         The current GtkAuthenticationDialog implements both the common
2773         logic and widgets to implement a real GtkDialog and a widget to be
2774         embedded in any container. WebKit1 uses a GtkDialog while WebKit2
2775         embeds the dialog in the WebView. This patch splits the code to
2776         leave in Platform only the code that is actually common, leaving
2777         the widget implementation to the WebKit layer, using a dialog in
2778         WebKit1 and embedding auth widget in the WebView in WebKit2.
2779
2780         * GNUmakefile.list.am: Add new files to compilation.
2781         * platform/gtk/GtkAuthenticationDialog.cpp: Removed.
2782         * platform/gtk/GtkAuthenticationDialog.h: Removed.
2783         * platform/gtk/WebKitAuthenticationWidget.cpp: Added.
2784         (_WebKitAuthenticationWidgetPrivate):
2785         (packTwoColumnLayoutInBox):
2786         (createLabel):
2787         (createEntry):
2788         (webkitAuthenticationWidgetInitialize):
2789         (webkitAuthenticationWidgetFinalize):
2790         (webkit_authentication_widget_init):
2791         (webkit_authentication_widget_class_init):
2792         (webkitAuthenticationWidgetNew):
2793         (webkitAuthenticationWidgetCreateCredential):
2794         (webkitAuthenticationWidgetGetChallenge):
2795         * platform/gtk/WebKitAuthenticationWidget.h: Added.
2796         (_WebKitAuthenticationWidget):
2797         (_WebKitAuthenticationWidgetClass):
2798
2799 2013-04-11  Jer Noble  <jer.noble@apple.com>
2800
2801         Add support for MediaPlayer::minTimeSeekable()
2802         https://bugs.webkit.org/show_bug.cgi?id=114484
2803
2804         Reviewed by Eric Carlson.
2805
2806         Plumb a new minTimeSeekable() method through MediaPlayer and
2807         MediaPlayerPrivate and use this new method in the existing
2808         HTMLMediaElement::minTimeSeekable() method.
2809
2810         * html/HTMLMediaElement.cpp:
2811         (WebCore::HTMLMediaElement::minTimeSeekable): Pass to MediaPlayer.
2812         * platform/graphics/MediaPlayer.cpp:
2813         (WebCore::NullMediaPlayerPrivate::minTimeSeekable): Return 0.
2814         (WebCore::MediaPlayer::minTimeSeekable): Pass to MediaPlayerPrivate.
2815         * platform/graphics/MediaPlayer.h:
2816         * platform/graphics/MediaPlayerPrivate.h:
2817         (WebCore::MediaPlayerPrivateInterface::seekable): Define in terms of 
2818             minTimeSeekable()
2819         (WebCore::MediaPlayerPrivateInterface::minTimeSeekable): Default to 0.
2820         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2821         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
2822             Initialize new m_cachedMinTimeSeekable ivar.
2823         (WebCore::MediaPlayerPrivateAVFoundation::maxTimeSeekableDouble):
2824             Renamed from maxTimeSeekable().
2825         (WebCore::MediaPlayerPrivateAVFoundation::minTimeSeekable): Added.
2826             Cache value of platformMinTimeSeekable().
2827         (WebCore::MediaPlayerPrivateAVFoundation::seekableTimeRangesChanged):
2828             Reset m_cachedMinTimeSeekable.
2829         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2830         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2831         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2832         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): float -> double.
2833         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
2834             Added. Retrieve the lowest value from -[m_playerItem seekableTimeRanges].
2835         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
2836             float -> double.
2837
2838 2013-04-12  Commit Queue  <rniwa@webkit.org>
2839
2840         Unreviewed, rolling out r147942, r148026, and r148092.
2841         http://trac.webkit.org/changeset/147942
2842         http://trac.webkit.org/changeset/148026
2843         http://trac.webkit.org/changeset/148092
2844         https://bugs.webkit.org/show_bug.cgi?id=114521
2845
2846         "r147942 is buggy. Rollback all the patches depending on it."
2847         (Requested by abucur on #webkit).
2848
2849         * dom/ContainerNode.cpp:
2850         (WebCore::willRemoveChildren):
2851         (WebCore):
2852         (WebCore::ContainerNode::removeChildren):
2853         * dom/Document.cpp:
2854         (WebCore::Document::nodeChildrenWillBeRemoved):
2855         (WebCore):
2856         * dom/Document.h:
2857         (Document):
2858         * dom/Node.cpp:
2859         * dom/Node.h:
2860         (Node):
2861         * dom/NodeTraversal.cpp:
2862         * dom/NodeTraversal.h:
2863         (ElementTraversal):
2864         (NodeTraversal):
2865         * dom/Range.cpp:
2866         (WebCore::boundaryNodeChildrenWillBeRemoved):
2867         (WebCore):
2868         (WebCore::Range::nodeChildrenWillBeRemoved):
2869         * dom/Range.h:
2870         * html/HTMLLIElement.cpp:
2871         (WebCore::HTMLLIElement::attach):
2872         * html/HTMLOListElement.cpp:
2873         (WebCore::HTMLOListElement::updateItemValues):
2874         (WebCore::HTMLOListElement::recalculateItemCount):
2875         * rendering/RenderCounter.cpp:
2876         (WebCore::previousInPreOrder):
2877         (WebCore::previousSiblingOrParent):
2878         (WebCore::parentElement):
2879         (WebCore::nextInPreOrder):
2880         * rendering/RenderListItem.cpp:
2881         (WebCore::enclosingList):
2882         (WebCore::RenderListItem::nextListItem):
2883         (WebCore::previousListItem):
2884         (WebCore::RenderListItem::calcValue):
2885         (WebCore::RenderListItem::explicitValueChanged):
2886         (WebCore::previousOrNextItem):
2887         (WebCore::RenderListItem::updateListMarkerNumbers):
2888         * rendering/RenderListItem.h:
2889         (RenderListItem):
2890
2891 2013-04-12  Jer Noble  <jer.noble@apple.com>
2892
2893         TimeRanges::nearest() returns incorrect results.
2894         https://bugs.webkit.org/show_bug.cgi?id=114483
2895
2896         Reviewed by Eric Carlson.
2897
2898         Test: media/timeranges-nearest.html
2899
2900         TimeRanges::nearest() has had an incorrect algorithm since its
2901         addition, which has gone unnoticed because no media engine supports
2902         seekable ranges with greater than one entry, and no media engine
2903         seekable ranges with startTime values > 0.
2904
2905         Fix the algorithm used to walk a TimeRanges object; return the closest
2906         time, not the smallest delta between range and target time.
2907         * html/TimeRanges.cpp:
2908         (TimeRanges::nearest):
2909
2910         Add some internal functions to allow us to write LayoutTests for
2911         TimeRanges objects:
2912         * WebCore.exp.in:
2913         * testing/Internals.cpp:
2914         (WebCore::Internals::createTimeRanges):
2915         (WebCore::Internals::closestTimeToTimeRanges):
2916         * testing/Internals.h:
2917         * testing/Internals.idl:
2918
2919 2013-04-12  Eric Carlson  <eric.carlson@apple.com>
2920
2921         Support "forced" subtitles
2922         https://bugs.webkit.org/show_bug.cgi?id=114460
2923
2924         Reviewed by Jer Noble.
2925
2926         Test: media/track/track-forced-subtitles.html
2927
2928         * html/HTMLMediaElement.cpp:
2929         (WebCore::HTMLMediaElement::configureTextTrackGroup): Enable a forced track if nothing else is enabled.
2930         (WebCore::HTMLMediaElement::configureTextTracks): Include forced tracks with captions+subtitles.
2931
2932         * html/track/InbandTextTrack.cpp:
2933         (WebCore::InbandTextTrack::InbandTextTrack): Deal with kind=forced.
2934
2935         * html/track/TextTrack.cpp:
2936         (WebCore::TextTrack::forcedKeyword): New keyword.
2937         (WebCore::TextTrack::isValidKindKeyword): Include forced.
2938         (WebCore::TextTrack::platformTextTrack): Ditto.
2939         * html/track/TextTrack.h:
2940
2941         * page/CaptionUserPreferences.cpp:
2942         (WebCore::CaptionUserPreferences::primaryAudioTrackLanguageOverride): New override to support testing.
2943         * page/CaptionUserPreferences.h:
2944
2945         * page/CaptionUserPreferencesMac.mm:
2946         (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Support forced tracks.
2947         * platform/graphics/InbandTextTrackPrivate.h:
2948
2949         * platform/graphics/PlatformTextTrack.h: Add Forced, minor cleanup.
2950
2951         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2952         (WebCore::InbandTextTrackPrivateAVF::processCue): Drive-by enhancement: log cue position.
2953
2954         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
2955         (WebCore::InbandTextTrackPrivateAVFObjC::kind): Support forced.
2956         (WebCore::InbandTextTrackPrivateAVFObjC::label): Drive-by cleanup.
2957
2958         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2959         (WebCore::MediaPlayerPrivateAVFoundationObjC::processTextTracks): Don't filter out forced tracks.
2960         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Log the language returned.
2961
2962         * testing/Internals.cpp:
2963         (WebCore::Internals::setPrimaryAudioTrackLanguageOverride): New.
2964         (WebCore::Internals::setCaptionDisplayMode): New.
2965         * testing/Internals.h:
2966         * testing/Internals.idl:
2967
2968 2013-04-12  Ryosuke Niwa  <rniwa@webkit.org>
2969
2970         [Mac] Some ligatures are applied across different fronts
2971         https://bugs.webkit.org/show_bug.cgi?id=113604
2972
2973         Reviewed by Darin Adler.
2974
2975         The bug was caused by applyFontTransforms applying ligatures without updating the font data in the glyph buffer.
2976
2977         Suppose we have characters AB and A uses font X and B uses font Y. Further suppose that we have ligatures for AB
2978         in Y. The problem was that WithIterator::advanceInternal calls applyFontTransforms on AB to apply this ligature
2979         even though A and B use different fonts. Since X doesn't contain the same ligature for A to be paired with that
2980         of B in X, we get a blank A.
2981
2982         Fixed the bug by resetting lastGlyphCount after calling applyFontTransforms. This ensures that we don't call
2983         applyFontTransforms across different fonts.
2984
2985         No new tests since this requires a variant of Osaka font that doesn't come with OS X.
2986
2987         The bug 114482 tracks the effort to add a test for this bug fix. I've already asked someone to create a custom
2988         font for us so that we can test this bug fix but that's going to a while.
2989
2990         * platform/graphics/WidthIterator.cpp:
2991         (WebCore::WidthIterator::advanceInternal):
2992
2993 2013-04-12  Ryosuke Niwa  <rniwa@webkit.org>
2994
2995         [Mac] Enable spellchecking tests added in r141471
2996         https://bugs.webkit.org/show_bug.cgi?id=108525
2997
2998         Reviewed by Darin Adler.
2999
3000         Made automatic quote substitution, dash substitution, text replacement, and spelling correction
3001         togglable via internals object. These functions are no-op when text replacement is not used.
3002
3003         This allows us to disable automatic spelling correction in spellcheck tests.
3004
3005         Enabled several tests added in r141471.
3006
3007         * WebCore.exp.in:
3008         * testing/Internals.cpp:
3009         (WebCore::Internals::setContinuousSpellCheckingEnabled): Don't null check editor() since it's not
3010         null whenever frame() is not null.
3011         (WebCore::Internals::setAutomaticQuoteSubstitutionEnabled): Added.
3012         (WebCore::Internals::setAutomaticLinkDetectionEnabled): Added.
3013         (WebCore::Internals::setAutomaticDashSubstitutionEnabled): Added.
3014         (WebCore::Internals::setAutomaticTextReplacementEnabled): Added.
3015         (WebCore::Internals::setAutomaticSpellingCorrectionEnabled): Added.
3016         * testing/Internals.h:
3017         * testing/Internals.idl:
3018
3019 2013-04-12  Alberto Garcia  <agarcia@igalia.com>
3020
3021         [BlackBerry] Upstream the filesystem code
3022         https://bugs.webkit.org/show_bug.cgi?id=114437
3023
3024         Reviewed by Rob Buis.
3025
3026         These are the changes for AsyncFileSystemBlackBerry.
3027
3028         This patch contains contributions from many members of the
3029         BlackBerry WebKit team.
3030
3031         * platform/blackberry/AsyncFileSystemBlackBerry.cpp:
3032         (WebCore::AsyncFileSystem::isAvailable):
3033         (WebCore):
3034         (WebCore::AsyncFileSystem::create):
3035         (WebCore::AsyncFileSystem::openFileSystem):
3036         (WebCore::AsyncFileSystemBlackBerry::openFileSystem):
3037         (WebCore::AsyncFileSystem::deleteFileSystem):
3038         (WebCore::AsyncFileSystemBlackBerry::AsyncFileSystemBlackBerry):
3039         (WebCore::AsyncFileSystemBlackBerry::~AsyncFileSystemBlackBerry):
3040         (WebCore::AsyncFileSystemBlackBerry::move):
3041         (WebCore::AsyncFileSystemBlackBerry::copy):
3042         (WebCore::AsyncFileSystemBlackBerry::remove):
3043         (WebCore::AsyncFileSystemBlackBerry::removeRecursively):
3044         (WebCore::AsyncFileSystemBlackBerry::readMetadata):
3045         (WebCore::AsyncFileSystemBlackBerry::createFile):
3046         (WebCore::AsyncFileSystemBlackBerry::createDirectory):
3047         (WebCore::AsyncFileSystemBlackBerry::fileExists):
3048         (WebCore::AsyncFileSystemBlackBerry::directoryExists):
3049         (WebCore::AsyncFileSystemBlackBerry::readDirectory):
3050         (WebCore::AsyncFileSystemBlackBerry::createWriter):
3051         (WebCore::AsyncFileSystemBlackBerry::createSnapshotFileAndReadMetadata):
3052         (WebCore::AsyncFileSystemBlackBerry::fileSystemURLToPath):
3053         * platform/blackberry/AsyncFileSystemBlackBerry.h:
3054         (WTF):
3055         (WTF::BlackBerry::Platform::WebFileSystem):
3056         (WebCore::AsyncFileSystemBlackBerry::create):
3057         (AsyncFileSystemBlackBerry):
3058
3059 2013-04-12  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
3060
3061         Apply our MSVC 2012 optimizer bug workaround to all minor releases
3062         https://bugs.webkit.org/show_bug.cgi?id=114436
3063
3064         Reviewed by Alexey Proskuryakov.
3065
3066         The bug has only been partially fixed in Update 2 but our Update 1 workaround
3067         still avoids the crash.
3068
3069         * platform/text/TextEncodingRegistry.cpp:
3070         (WebCore::TextEncodingNameHash::equal):
3071
3072 2013-04-12  Mark Rowe  <mrowe@apple.com>
3073
3074         And again, with the correct case this time.
3075
3076         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
3077
3078 2013-04-12  Mark Rowe  <mrowe@apple.com>
3079
3080         Build fix.
3081
3082         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
3083         Add missing #include and forward declaration.
3084
3085 2013-04-12  Zan Dobersek  <zdobersek@igalia.com>
3086
3087         Unreviewed functionality fix for ports enabling the MicroData feature.
3088
3089         * html/DOMSettableTokenList.idl: Add the SkipVTableValidation IDL attribute to the DOMSettableTokenList interface.
3090         This removes crashes in the MicroData layout tests that are occurring on EFL and GTK builders, the two ports being
3091         the only ports that enable this feature.
3092
3093 2013-04-11  Alexey Proskuryakov  <ap@apple.com>
3094
3095         Move CachedRawResourceClient into a separate file
3096         https://bugs.webkit.org/show_bug.cgi?id=114491
3097
3098         Reviewed by Mark Rowe.
3099
3100         * GNUmakefile.list.am:
3101         * Target.pri:
3102         * WebCore.vcproj/WebCore.vcproj:
3103         * WebCore.vcxproj/WebCore.vcxproj:
3104         * WebCore.vcxproj/WebCore.vcxproj.filters:
3105         * WebCore.xcodeproj/project.pbxproj:
3106         * loader/DocumentLoader.cpp:
3107         * loader/DocumentLoader.h:
3108         * loader/DocumentThreadableLoader.h:
3109         * loader/archive/cf/LegacyWebArchive.cpp:
3110         * loader/cache/CachedRawResource.cpp:
3111         * loader/cache/CachedRawResource.h:
3112         * loader/cache/CachedRawResourceClient.h: Added.
3113         * loader/icon/IconLoader.h:
3114         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h:
3115
3116 2013-04-12  Commit Queue  <rniwa@webkit.org>
3117
3118         Unreviewed, rolling out r148262.
3119         http://trac.webkit.org/changeset/148262
3120         https://bugs.webkit.org/show_bug.cgi?id=114493
3121
3122         Cairo dep should now build, rolling r148247 back in (Requested
3123         by zdobersek on #webkit).
3124
3125         * platform/graphics/GraphicsContext.cpp:
3126         (WebCore):
3127         * platform/graphics/ImageBuffer.cpp:
3128         (WebCore):
3129         * platform/graphics/cairo/GLContext.h:
3130         (GLContext):
3131         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3132         (WebCore::GraphicsContext::isAcceleratedContext):
3133         (WebCore):
3134         * platform/graphics/cairo/ImageBufferCairo.cpp:
3135         (WebCore::ImageBufferData::ImageBufferData):
3136         (WebCore):
3137         (WebCore::createCairoGLSurface):
3138         (WebCore::ImageBuffer::ImageBuffer):
3139         (WebCore::ImageBuffer::platformTransformColorSpace):
3140         (WebCore::mapSurfaceToImage):
3141         (WebCore::unmapSurfaceFromImage):
3142         (WebCore::getImageData):
3143         (WebCore::ImageBuffer::putByteArray):
3144         (WebCore::ImageBufferData::paintToTextureMapper):
3145         (WebCore::ImageBuffer::platformLayer):
3146         * platform/graphics/cairo/ImageBufferDataCairo.h:
3147         (ImageBufferData):
3148         * platform/graphics/egl/GLContextEGL.cpp:
3149         (WebCore::GLContextEGL::GLContextEGL):
3150         (WebCore::GLContextEGL::~GLContextEGL):
3151         (WebCore::GLContextEGL::cairoDevice):
3152         (WebCore):
3153         * platform/graphics/egl/GLContextEGL.h:
3154         * platform/graphics/glx/GLContextGLX.cpp:
3155         (WebCore::GLContextGLX::GLContextGLX):
3156         (WebCore::GLContextGLX::~GLContextGLX):
3157         (WebCore::GLContextGLX::cairoDevice):
3158         (WebCore):
3159         * platform/graphics/glx/GLContextGLX.h:
3160         (GLContextGLX):
3161
3162 2013-04-11  Alexey Proskuryakov  <ap@apple.com>
3163
3164         Reduce includes of CachedSVGDocument.h
3165         https://bugs.webkit.org/show_bug.cgi?id=114489
3166
3167         Reviewed by Jon Honeycutt.
3168
3169         * loader/cache/CachedSVGDocumentReference.cpp: Added.
3170         * loader/cache/CachedSVGDocumentReference.h:
3171         Moved function implementations to newly added .cpp file, and removed an include
3172         of CachedSVGDocument.h.
3173
3174         * css/WebKitCSSSVGDocumentValue.h: Just removed an unnecessary include.
3175
3176         * CMakeLists.txt:
3177         * GNUmakefile.list.am:
3178         * Target.pri:
3179         * WebCore.vcproj/WebCore.vcproj:
3180         * WebCore.vcxproj/WebCore.vcxproj:
3181         * WebCore.vcxproj/WebCore.vcxproj.filters:
3182         * WebCore.xcodeproj/project.pbxproj:
3183
3184 2013-04-11  Commit Queue  <rniwa@webkit.org>
3185
3186         Unreviewed, rolling out r148247.
3187         http://trac.webkit.org/changeset/148247
3188         https://bugs.webkit.org/show_bug.cgi?id=114490
3189
3190         Cairo dep fails to build on builders due to missing EGL
3191         headers (Requested by zdobersek on #webkit).
3192
3193         * platform/graphics/GraphicsContext.cpp:
3194         (WebCore):
3195         * platform/graphics/ImageBuffer.cpp:
3196         (WebCore):
3197         * platform/graphics/cairo/GLContext.h:
3198         (GLContext):
3199         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3200         * platform/graphics/cairo/ImageBufferCairo.cpp:
3201         (WebCore::ImageBufferData::ImageBufferData):
3202         (WebCore::ImageBuffer::ImageBuffer):
3203         (WebCore::ImageBuffer::platformTransformColorSpace):
3204         (WebCore::getImageData):
3205         (WebCore::ImageBuffer::putByteArray):
3206         (WebCore):
3207         * platform/graphics/cairo/ImageBufferDataCairo.h:
3208         (ImageBufferData):
3209         * platform/graphics/egl/GLContextEGL.cpp:
3210         (WebCore::GLContextEGL::GLContextEGL):
3211         (WebCore::GLContextEGL::~GLContextEGL):
3212         * platform/graphics/egl/GLContextEGL.h:
3213         * platform/graphics/glx/GLContextGLX.cpp:
3214         (WebCore::GLContextGLX::GLContextGLX):
3215         (WebCore::GLContextGLX::~GLContextGLX):
3216         * platform/graphics/glx/GLContextGLX.h:
3217         (GLContextGLX):
3218
3219 2013-04-11  Nico Weber  <thakis@chromium.org>
3220
3221         Remove debugging code that is no longer used with current mac sdks.
3222         https://bugs.webkit.org/show_bug.cgi?id=114486
3223
3224         Reviewed by Dan Bernstein.
3225
3226         This code compared __MAC_OS_X_VERSION_MAX_ALLOWED and friends to
3227         107 and 106 instead of the correct 1070 and 1060. Instead of fixing
3228         this, rip the code out completely: Since WebKit now only targets
3229         current systems, the ifdef is always false anyways.
3230
3231         No tests, as this only removes debugging code.
3232
3233         * platform/graphics/mac/SimpleFontDataMac.mm:
3234         (WebCore::SimpleFontData::platformInit):
3235
3236 2013-04-11  Oliver Hunt  <oliver@apple.com>
3237
3238         Fix windows build and land new binding test results
3239
3240         * bindings/scripts/CodeGeneratorJS.pm:
3241         (GenerateImplementation):
3242         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3243         (WebCore):
3244         (WebCore::toJS):
3245         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3246         (WebCore):
3247         (WebCore::toJS):
3248         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3249         (WebCore):
3250         (WebCore::toJS):
3251         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3252         (WebCore):
3253         (WebCore::toJS):
3254         * bindings/scripts/test/JS/JSTestException.cpp:
3255         (WebCore):
3256         (WebCore::toJS):
3257         * bindings/scripts/test/JS/JSTestInterface.cpp:
3258         (WebCore):
3259         (WebCore::toJS):
3260         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3261         (WebCore):
3262         (WebCore::toJS):
3263         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3264         (WebCore):
3265         (WebCore::toJS):
3266         * bindings/scripts/test/JS/JSTestObj.cpp:
3267         (WebCore):
3268         (WebCore::toJS):
3269         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3270         (WebCore):
3271         (WebCore::toJS):
3272         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3273         (WebCore):
3274         (WebCore::toJS):
3275         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3276         (WebCore):
3277         (WebCore::toJS):
3278
3279 2013-04-11  Shezan Baig  <sbaig1@bloomberg.net>
3280
3281         Selection gaps don't repaint correctly with transforms
3282         https://bugs.webkit.org/show_bug.cgi?id=111000
3283
3284         Reviewed by Simon Fraser.
3285
3286         When computing offsetFromRepaintContainer, we need to add UseTransforms
3287         to the MapCoordinateFlags argument. Note that ApplyContainerFlip is
3288         the default value for the flag, so this change effectively only adds
3289         the UseTransforms flag.
3290
3291         Tests: fast/repaint/selection-gap-absolute-child.html
3292                fast/repaint/selection-gap-fixed-child.html
3293                fast/repaint/selection-gap-flipped-absolute-child.html
3294                fast/repaint/selection-gap-flipped-fixed-child.html
3295                fast/repaint/selection-gap-transformed-absolute-child.html
3296                fast/repaint/selection-gap-transformed-fixed-child.html
3297
3298         * rendering/RenderBlock.cpp:
3299         (WebCore::RenderBlock::selectionGapRectsForRepaint):
3300
3301 2013-04-11  Oliver Hunt  <oliver@apple.com>
3302
3303         Add more type validation to debug builds
3304         https://bugs.webkit.org/show_bug.cgi?id=114478
3305
3306         Reviewed by Mark Hahnenberg.
3307
3308         Add a bunch more type checks to the JS DOM bindings.
3309
3310         * Modules/mediastream/MediaStream.idl:
3311         * Modules/webaudio/AudioDestinationNode.idl:
3312         * WebCore.xcodeproj/project.pbxproj:
3313         * bindings/js/JSDOMBinding.h:
3314         (WebCore::getExistingWrapper):
3315         (WebCore):
3316         (WebCore::createNewWrapper):
3317         * bindings/scripts/CodeGeneratorJS.pm:
3318         (GetNativeTypeForConversions):
3319         (GetGnuVTableRefForInterface):
3320         (GetGnuVTableNameForInterface):
3321         (GetGnuMangledNameForInterface):
3322         (GetGnuVTableOffsetForType):
3323         (GetWinVTableRefForInterface):
3324         (GetWinVTableNameForInterface):
3325         (GetWinMangledNameForInterface):
3326         (GetNamespaceForInterface):
3327         (GetImplementationLacksVTableForInterface):
3328         (GetSkipVTableValidationForInterface):
3329         (GenerateImplementation):
3330         * bindings/scripts/IDLAttributes.txt:
3331         * css/CSSRuleList.idl:
3332         * css/CSSStyleDeclaration.idl:
3333         * dom/Clipboard.idl:
3334         * dom/DOMStringMap.idl:
3335         * dom/MutationRecord.idl:
3336         * dom/NodeList.idl:
3337         * html/DOMTokenList.idl:
3338         * html/track/TextTrack.idl:
3339         * inspector/ScriptProfileNode.idl:
3340         * storage/Storage.idl:
3341         * xml/XPathNSResolver.idl:
3342
3343 2013-04-11  Ryosuke Niwa  <rniwa@webkit.org>
3344
3345         Remove ResourceLoadInfo
3346         https://bugs.webkit.org/show_bug.cgi?id=113302
3347
3348         Reviewed by Benjamin Poulain.
3349
3350         Co-authored by Christophe Dumez.
3351
3352         Removed ResourceLoadInfo since it had been only used by Chromium port.
3353
3354         * GNUmakefile.list.am:
3355         * Target.pri:
3356         * WebCore.order:
3357         * WebCore.vcproj/WebCore.vcproj:
3358         * WebCore.vcxproj/WebCore.vcxproj:
3359         * WebCore.vcxproj/WebCore.vcxproj.filters:
3360         * WebCore.xcodeproj/project.pbxproj:
3361         * inspector/InspectorResourceAgent.cpp:
3362         (WebCore::buildObjectForResourceResponse):
3363         * loader/FrameLoader.cpp:
3364         (WebCore::FrameLoader::loadResourceSynchronously):
3365         * platform/network/ResourceLoadInfo.h: Removed.
3366         * platform/network/ResourceResponseBase.cpp:
3367         (WebCore):
3368         (WebCore::ResourceResponseBase::reportMemoryUsage):
3369         * platform/network/ResourceResponseBase.h:
3370         (ResourceResponseBase):
3371
3372 2013-04-11  Ryosuke Niwa  <rniwa@webkit.org>
3373
3374         Another Mac Lion build fix attempt after r148197.
3375
3376         * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm:
3377
3378 2013-04-11  Sukolsak Sakshuwong  <sukolsak@gmail.com>
3379
3380         Unable to paste twice in input field when specific CSS present
3381         https://bugs.webkit.org/show_bug.cgi?id=108675
3382
3383         Reviewed by Ryosuke Niwa.
3384
3385         When we are pre-rendering text in ReplaceSelectionCommand, we shouldn't care
3386         whether the content is clipped by its ancestors or not. This bug was caused
3387         by the fact the plainText() method returned an empty string because the text
3388         was fully clipped by its ancestors. Make plainText ignore style visibility.
3389
3390         Test: editing/inserting/insert-text-into-text-field.html
3391
3392         * editing/ReplaceSelectionCommand.cpp:
3393         (WebCore::ReplacementFragment::ReplacementFragment):
3394
3395 2013-04-11  Martin Robinson  <mrobinson@igalia.com>
3396
3397         [GTK] Add accelerated 2D canvas support using cairo-gl
3398         https://bugs.webkit.org/show_bug.cgi?id=104672
3399
3400         Reviewed by Alejandro G. Castro.
3401
3402         No new tests. We do not yet have the ability to run tests against
3403         accelerated content.
3404
3405         * platform/graphics/GraphicsContext.cpp:
3406         (WebCore): We don't use the stub implementation of isAcceleratedContext any longer.
3407         * platform/graphics/ImageBuffer.cpp:
3408         (WebCore): Ditto for ImageBuffer::platformLayer.
3409         * platform/graphics/cairo/GLContext.h:
3410         (GLContext): Added method to get a cairo_device_t from the context.
3411         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3412         (WebCore::GraphicsContext::isAcceleratedContext): Return true when we are a CairoGL surface.
3413         * platform/graphics/cairo/ImageBufferCairo.cpp:
3414         (WebCore::ImageBufferData::ImageBufferData): Initialize the size and the texture to 0.
3415         (WebCore::createCairoGLSurface): Added this helper.
3416         (WebCore::ImageBuffer::ImageBuffer): When we are in accelerated rendering mode, create
3417         a CairoGL surface.
3418         (WebCore::ImageBuffer::platformTransformColorSpace): Do not implement this for accelerated
3419         contexts yet.
3420         (WebCore::mapSurfaceToImage): Added this helper, since we don't require Cairo 1.12 yet,
3421         which provides an builtin implementation.
3422         (WebCore::unmapSurfaceFromImage): Ditto.
3423         (WebCore::getImageData): Map the surface to an image surface first.
3424         (WebCore::ImageBuffer::putByteArray): Ditto.
3425         (WebCore::ImageBufferData::paintToTextureMapper): Connect the accelerated canvas into the
3426         TextureMapper infrastructure.
3427         (WebCore::ImageBuffer::platformLayer): This lets the TextureMapper at the ImageBufferData.
3428         * platform/graphics/cairo/ImageBufferDataCairo.h:
3429         (ImageBufferData): Subclass TexturMapperPlatformLayer where appropriate.
3430         * platform/graphics/egl/GLContextEGL.cpp: Added implementation of cairoDevice.
3431         * platform/graphics/egl/GLContextEGL.h: Ditto.
3432         * platform/graphics/glx/GLContextGLX.cpp: Ditto
3433         * platform/graphics/glx/GLContextGLX.h: Ditto.
3434
3435 2013-04-11  Anders Carlsson  <andersca@apple.com>
3436
3437         Implement removing storage area items
3438         https://bugs.webkit.org/show_bug.cgi?id=114472
3439
3440         Reviewed by Beth Dakin.
3441
3442         Export StorageMap::removeItem.
3443
3444         * WebCore.exp.in:
3445
3446 2013-04-11  Brendan Long  <b.long@cablelabs.com>
3447
3448         TextTrackList's .onremovetrack is missing from IDL
3449         https://bugs.webkit.org/show_bug.cgi?id=103421
3450
3451         Reviewed by Eric Carlson.
3452
3453         Fixed test media/track/opera/interfaces/TextTrackList/onremovetrack.html
3454
3455         * html/track/TextTrackList.cpp:
3456         (TextTrackList::remove):
3457         (TextTrackList::scheduleRemoveTrackEvent):
3458         * html/track/TextTrackList.h:
3459         (TextTrackList):
3460         * html/track/TextTrackList.idl:
3461
3462 2013-04-11  Alberto Garcia  <agarcia@igalia.com>
3463
3464         [BlackBerry] Upstream the filesystem code
3465         https://bugs.webkit.org/show_bug.cgi?id=114437
3466
3467         Reviewed by Rob Buis.
3468
3469         This patch contains contributions from many members of the
3470         BlackBerry WebKit team.
3471
3472         * platform/blackberry/AsyncFileWriterBlackBerry.cpp: Added.
3473         (WebCore):
3474         (WebCore::AsyncFileWriterBlackBerry::write):
3475         * platform/blackberry/AsyncFileWriterBlackBerry.h: Added.
3476         (WTF):
3477         (WTF::BlackBerry::Platform::WebFileWriter):
3478         (WebCore):
3479         * platform/blackberry/DOMFileSystemBlackBerry.cpp: Added.
3480         (WebCore):
3481         (WebCore::DOMFileSystemBase::createFileSystemURL):
3482         (WebCore::DOMFileSystemBase::crackFileSystemURL):
3483         (WebCore::DOMFileSystemBase::supportsToURL):
3484         (WebCore::DOMFileSystemBase::isValidType):
3485         * platform/blackberry/LocalFileSystemBlackBerry.cpp: Added.
3486         (WebCore):
3487         (WebCore::fileSystemTypeString):
3488         (WebCore::openFileSystem):
3489         (WebCore::LocalFileSystem::deleteFileSystem):
3490     &n