TextureUnit code optimization
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-07-03  Przemyslaw Szymanski  <p.szymanski3@samsung.com>
2
3         TextureUnit code optimization
4         https://bugs.webkit.org/show_bug.cgi?id=117868
5
6         Reviewed by Noam Rosenthal.
7
8         According to OpenGL ES 2.0 specification it is not possible to use both
9         texture2D and textureCubeMap in one texture unit.
10         This patch reduces amount of code, slightly increases rendering performance
11         and makes WebKit more consistent with OpenGL.
12
13         No new tests. Covered by existing tests:
14         LayoutTests/webgl/conformance/textures/tex-image-webgl.html
15         LayoutTests/webgl/conformance/textures/texture-complete.html
16
17         * html/canvas/WebGLRenderingContext.cpp:
18         (WebCore::WebGLRenderingContext::~WebGLRenderingContext):
19         (WebCore::WebGLRenderingContext::reshape):
20         (WebCore::WebGLRenderingContext::bindTexture):
21         (WebCore::WebGLRenderingContext::deleteTexture):
22         (WebCore::WebGLRenderingContext::getParameter):
23         (WebCore::WebGLRenderingContext::handleNPOTTextures):
24         (WebCore::WebGLRenderingContext::validateTextureBinding):
25         (WebCore::WebGLRenderingContext::restoreCurrentTexture2D):
26         * html/canvas/WebGLRenderingContext.h:
27
28 2013-07-03  Christophe Dumez  <ch.dumez@sisa.samsung.com>
29
30         Stop inheriting SVGFilterPrimitiveStandardAttributes in SVG
31         https://bugs.webkit.org/show_bug.cgi?id=118305
32
33         Reviewed by Kentaro Hara.
34
35         Stop inheriting SVGFilterPrimitiveStandardAttributes in SVG and use
36         Web IDL implements instead to get rid of multiple inheritance and
37         follow the latest specification:
38         - http://www.w3.org/TR/filter-effects/#DOMInterfaces
39
40         No new tests, no behavior change.
41
42         * CMakeLists.txt:
43         * DerivedSources.pri:
44         * GNUmakefile.list.am:
45         * svg/SVGFEBlendElement.idl:
46         * svg/SVGFEColorMatrixElement.idl:
47         * svg/SVGFEComponentTransferElement.idl:
48         * svg/SVGFECompositeElement.idl:
49         * svg/SVGFEConvolveMatrixElement.idl:
50         * svg/SVGFEDiffuseLightingElement.idl:
51         * svg/SVGFEDisplacementMapElement.idl:
52         * svg/SVGFEDropShadowElement.idl:
53         * svg/SVGFEFloodElement.idl:
54         * svg/SVGFEGaussianBlurElement.idl:
55         * svg/SVGFEImageElement.idl:
56         * svg/SVGFEMergeElement.idl:
57         * svg/SVGFEMorphologyElement.idl:
58         * svg/SVGFEOffsetElement.idl:
59         * svg/SVGFESpecularLightingElement.idl:
60         * svg/SVGFETileElement.idl:
61         * svg/SVGFETurbulenceElement.idl:
62
63 2013-07-03  Zalan Bujtas  <zalan@apple.com>
64
65         H&R Block 2010 Help window can not be reopened.
66         https://bugs.webkit.org/show_bug.cgi?id=118342
67
68         Reviewed by Antti Koivisto.
69
70         http://trac.webkit.org/changeset/118916 changed the window.focus() behaviour so that
71         only the opener can (re)focus() a particular window.
72         H&R Block app relies on the relaxed window.focus() rules.
73
74         * WebCore.exp.in:
75         * platform/RuntimeApplicationChecks.cpp:
76         (WebCore::applicationIsHRBlock):
77         * platform/RuntimeApplicationChecks.h:
78
79 2013-07-03  Zan Dobersek  <zdobersek@igalia.com>
80
81         Further build fixing for build configurations that disable CSS regions support.
82
83         * dom/PseudoElement.h: Wrap shouldMoveToFlowThread override into the ENABLE(CSS_REGIONS) build guard.
84
85 2013-07-03  Zan Dobersek  <zdobersek@igalia.com>
86
87         Unreviewed build fix after r152320 and r152345 for build configurations that enable
88         SVG support but disable CSS regions support.
89
90         * svg/SVGElement.cpp: Wrap shouldMoveToFlowThread override into the ENABLE(CSS_REGIONS) build guard.
91         * svg/SVGElement.h: Ditto.
92
93 2013-07-03  Radu Stavila  <stavila@adobe.com>
94
95         [CSS Regions] Improve implementation of elements in region being flowed to another flow thread
96         https://bugs.webkit.org/show_bug.cgi?id=118300
97
98         Based on patch by Zoltán Árvai <zarvai@inf.u-szeged.hu>
99
100         Reviewed by Csaba Osztrogonác.
101
102         Fixed CSS_REGIONS guard.
103
104         * dom/Element.h:
105         * dom/NodeRenderingContext.cpp:
106         (WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
107         (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
108
109 2013-07-03  Christophe Dumez  <ch.dumez@sisa.samsung.com>
110
111         Move SVGTests attributes parsing to SVGGraphicsElement
112         https://bugs.webkit.org/show_bug.cgi?id=118292
113
114         Reviewed by Darin Adler.
115
116         Move SVGTests attributes parsing to SVGGraphicsElement instead of doing
117         this in each of its subclasses. SVGGraphicsElement is now the one
118         subclassing SVGTests after r152167.
119
120         No new tests, no behavior change.
121
122         * svg/SVGAElement.cpp:
123         (WebCore::SVGAElement::isSupportedAttribute):
124         (WebCore::SVGAElement::parseAttribute):
125         * svg/SVGCircleElement.cpp:
126         (WebCore::SVGCircleElement::isSupportedAttribute):
127         (WebCore::SVGCircleElement::parseAttribute):
128         (WebCore::SVGCircleElement::svgAttributeChanged):
129         * svg/SVGClipPathElement.cpp:
130         (WebCore::SVGClipPathElement::isSupportedAttribute):
131         (WebCore::SVGClipPathElement::parseAttribute):
132         * svg/SVGEllipseElement.cpp:
133         (WebCore::SVGEllipseElement::isSupportedAttribute):
134         (WebCore::SVGEllipseElement::parseAttribute):
135         (WebCore::SVGEllipseElement::svgAttributeChanged):
136         * svg/SVGForeignObjectElement.cpp:
137         (WebCore::SVGForeignObjectElement::isSupportedAttribute):
138         (WebCore::SVGForeignObjectElement::parseAttribute):
139         (WebCore::SVGForeignObjectElement::svgAttributeChanged):
140         * svg/SVGGElement.cpp:
141         (WebCore::SVGGElement::isSupportedAttribute):
142         (WebCore::SVGGElement::parseAttribute):
143         (WebCore::SVGGElement::svgAttributeChanged):
144         * svg/SVGGraphicsElement.cpp:
145         (WebCore::SVGGraphicsElement::isSupportedAttribute):
146         (WebCore::SVGGraphicsElement::parseAttribute):
147         (WebCore::SVGGraphicsElement::svgAttributeChanged):
148         * svg/SVGImageElement.cpp:
149         (WebCore::SVGImageElement::isSupportedAttribute):
150         (WebCore::SVGImageElement::parseAttribute):
151         (WebCore::SVGImageElement::svgAttributeChanged):
152         * svg/SVGLineElement.cpp:
153         (WebCore::SVGLineElement::isSupportedAttribute):
154         (WebCore::SVGLineElement::parseAttribute):
155         (WebCore::SVGLineElement::svgAttributeChanged):
156         * svg/SVGPathElement.cpp:
157         (WebCore::SVGPathElement::isSupportedAttribute):
158         (WebCore::SVGPathElement::parseAttribute):
159         (WebCore::SVGPathElement::svgAttributeChanged):
160         * svg/SVGPolyElement.cpp:
161         (WebCore::SVGPolyElement::isSupportedAttribute):
162         (WebCore::SVGPolyElement::parseAttribute):
163         (WebCore::SVGPolyElement::svgAttributeChanged):
164         * svg/SVGRectElement.cpp:
165         (WebCore::SVGRectElement::isSupportedAttribute):
166         (WebCore::SVGRectElement::parseAttribute):
167         (WebCore::SVGRectElement::svgAttributeChanged):
168         * svg/SVGSVGElement.cpp:
169         (WebCore::SVGSVGElement::parseAttribute):
170         (WebCore::SVGSVGElement::svgAttributeChanged): Fall back to calling
171         SVGGraphicsElement::svgAttributeChanged() instead of
172         SVGStyledElement::svgAttributeChanged() as SVGGraphicsElement is the
173         parent class and it takes care of parsing SVGTests attributes now.
174         * svg/SVGUseElement.cpp:
175         (WebCore::SVGUseElement::isSupportedAttribute):
176         (WebCore::SVGUseElement::parseAttribute):
177         (WebCore::SVGUseElement::svgAttributeChanged):
178
179 2013-07-02  Ryosuke Niwa  <rniwa@webkit.org>
180
181         Modernize QualifiedName by wrapping gNameCache in a function and using more early exits
182         https://bugs.webkit.org/show_bug.cgi?id=118299
183
184         Reviewed by Andreas Kling.
185
186         Did cleanups.
187
188         * dom/QualifiedName.cpp:
189         (WebCore::qualifiedNameCache): Added to wrap gNameCache.
190         (WebCore::QualifiedName::QualifiedName):
191         (WebCore::QualifiedName::QualifiedNameImpl::~QualifiedNameImpl):
192         (WebCore::QualifiedName::toString): Use early exit and StringBuilder.
193         (WebCore::QualifiedName::init): Use early exit.
194
195 2013-07-02  Simon Fraser  <simon.fraser@apple.com>
196
197         Don't set z-index: 0 on lots of elements with -webkit-overflow-scrolling: touch
198         https://bugs.webkit.org/show_bug.cgi?id=118337
199
200         Reviewed by Benjamin Poulain.
201
202         -webkit-overflow-scrolling: touch is an inherited property that, on iOS, controls
203         the behavior of overflow scrolling content, and causes overflow scrolling elements
204         to become CSS stacking contexts.
205          
206         However, the code was too aggressive in setting style->setZIndex(0), doing so
207         for any element with overflow != hidden. Since the default for overflow is visible,
208         that meant almost every element.
209         
210         Previously, this didn't really matter. However, since r125693, any renderer with non-auto
211         z-index gets a RenderLayer, and that RenderLayer will become a stacking context. The result
212         was too many RenderLayers and incorrect stacking context behavior.
213         
214         Fix by ensuring that -webkit-overflow-scrolling: touch  only affects elements which
215         are actually scrollable.
216         
217         Also move the code that does this to below the code that adjust overflow style
218         for different elements.
219
220         * css/StyleResolver.cpp:
221         (WebCore::isScrollableOverflow):
222         (WebCore::StyleResolver::adjustRenderStyle):
223
224 2013-07-02  Commit Queue  <commit-queue@webkit.org>
225
226         Unreviewed, rolling out r152318.
227         http://trac.webkit.org/changeset/152318
228         https://bugs.webkit.org/show_bug.cgi?id=118333
229
230         This patch broke media/track/track-automatic-subtitles.html on
231         Mac (Requested by dfarler on #webkit).
232
233         * page/CaptionUserPreferencesMediaAF.cpp:
234         (WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore):
235
236 2013-07-02  Ruth Fong  <ruth_fong@apple.com>
237
238         Change event should not be dispatched by clicking a scrollbar of select listbox
239         https://bugs.webkit.org/show_bug.cgi?id=118019
240         <rdar://problem/14297760>
241
242         Reviewed by Dean Jackson.
243
244         Test: fast/forms/select/listbox-click-on-scrollbar.html
245
246         Merge the following:
247         http://src.chromium.org/viewvc/blink?view=revision&revision=151689
248         https://chromium.googlesource.com/chromium/blink/+/492549b0fcaa58a85aa0797446b62985a263704f
249
250         Previously, a select element with the multiple attribute would dispatch
251         an onChanged event when the scrollbar is clicked. This patch corrects this
252         issue by only calling listBoxOnChange(), which fires the onChanged event, 
253         when an actual option is clicked.
254
255         * html/HTMLSelectElement.cpp:
256         (WebCore::HTMLSelectElement::childrenChanged): Updated to clear the list
257         of selected items when when an <option> element is added to/deleted from its <select> element.
258         (Without this addition, if a option was selected, and then JavaScript was used to modify 
259         the <select> element, and then the scrollbar was clicked, an onChanged event would fire 
260         because it remembers the previously selected option.)
261
262         (WebCore::HTMLSelectElement::listBoxOnChange):
263
264         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler): Updated to
265         only call listBoxOnChange() if at least one option is selected. 
266
267 2013-07-02  Alex Christensen  <achristensen@apple.com>
268
269         Preparing Windows WebGL build system.
270         https://bugs.webkit.org/show_bug.cgi?id=118325
271
272         Reviewed by Brent Fulgham.
273
274         * WebCore.vcxproj/WebCore.vcxproj: Added EGL files, removed unused GraphicsContext3DOpenGL.cpp.
275         * WebCore.vcxproj/WebCore.vcxproj.filters: Added EGL filter and files, removed unused GraphicsContext3DOpenGL.cpp.
276
277 2013-07-02  Jessie Berlin  <jberlin@apple.com>
278
279         The callback for WKPageGetPlugInInformation needs info about whether or not there are any
280         non-playing instances of the plug-in on the page
281         https://bugs.webkit.org/show_bug.cgi?id=118330
282
283         Reviewed by Anders Carlsson.
284
285         * WebCore.exp.in:
286         Expose a symbol so it can be used in WebKit2.
287
288 2013-07-02  Alex Christensen  <achristensen@apple.com>
289
290         Added getProcAddress implementation for Windows in OpenGLShims.
291         https://bugs.webkit.org/show_bug.cgi?id=118312
292
293         Reviewed by Brent Fulgham.
294
295         * platform/graphics/OpenGLShims.cpp:
296         (WebCore::getProcAddress): Added for Windows.
297
298 2013-07-02  Jer Noble  <jer.noble@apple.com>
299
300         media/unsupported-rtsp.html is failing
301         https://bugs.webkit.org/show_bug.cgi?id=118327
302
303         Reviewed by Eric Carlson.
304
305         Fixes the media/unsupported-rtsp.html test.
306
307         Set the contentType field of contentInformationRequest in order to trigger AVFoundation to 
308         notice that loading failed and generate an error.
309
310         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
311         (WebCore::WebCoreAVFResourceLoader::notifyFinished):
312
313 2013-07-02  Alex Christensen  <achristensen@apple.com>
314
315         Fixed compile error in non-X11 platforms using EGL.
316         https://bugs.webkit.org/show_bug.cgi?id=118323
317
318         Reviewed by Brent Fulgham.
319
320         * platform/graphics/egl/GLContextEGL.cpp:
321         (WebCore::GLContextEGL::createPixmapContext): Put all X11-specific code into #if PLATFORM(X11).
322
323 2013-07-02  Radu Stavila  <stavila@adobe.com>
324
325         [CSS Regions] Improve implementation of elements in region being flowed to another flow thread
326         https://bugs.webkit.org/show_bug.cgi?id=118300
327
328         Reviewed by David Hyatt.
329
330         Methods that must be const have been turned back into const. Code has been better organized. 
331         Performance is better. Tests have been added to.
332
333         * dom/Element.cpp:
334         (WebCore::Element::detach):
335         (WebCore::Element::setIsInsideRegion):
336         (WebCore::Element::isInsideRegion):
337         (WebCore::Element::shouldMoveToFlowThread):
338         * dom/Element.h:
339         * dom/ElementRareData.h:
340         (WebCore::ElementRareData::isInsideRegion):
341         (WebCore::ElementRareData::setIsInsideRegion):
342         (WebCore::ElementRareData::ElementRareData):
343         * dom/Node.cpp:
344         (WebCore::Node::isRegisteredWithNamedFlow):
345         * dom/Node.h:
346         * dom/NodeRenderingContext.cpp:
347         (WebCore::NodeRenderingContext::parentRenderer):
348         (WebCore::NodeRenderingContext::shouldCreateRenderer):
349         (WebCore::NodeRenderingContext::elementInsideRegionNeedsRenderer):
350         (WebCore::NodeRenderingContext::moveToFlowThreadIfNeeded):
351         (WebCore::NodeRenderingContext::createRendererForElementIfNeeded):
352         * dom/NodeRenderingContext.h:
353         * dom/PseudoElement.h:
354         * dom/Text.cpp:
355         (WebCore::Text::textRendererIsNeeded):
356         * dom/Text.h:
357         * rendering/FlowThreadController.cpp:
358         (WebCore::FlowThreadController::unregisterNamedFlowContentNode):
359         (WebCore::FlowThreadController::isContentNodeRegisteredWithAnyNamedFlow):
360         * rendering/FlowThreadController.h:
361         * rendering/RenderObject.h:
362         * rendering/RenderRegion.h:
363         * svg/SVGElement.cpp:
364         (WebCore::SVGElement::shouldMoveToFlowThread):
365         * svg/SVGElement.h:
366
367 2013-07-02  Eric Carlson  <eric.carlson@apple.com>
368
369         [Mac] .webkitClosedCaptionsVisible doesn't work with "Automatic" caption mode
370         https://bugs.webkit.org/show_bug.cgi?id=118319
371
372         Reviewed by Darin Adler.
373
374         Test: media/track/track-legacyapi-with-automatic-mode.html
375
376         * page/CaptionUserPreferencesMediaAF.cpp:
377         (WebCore::CaptionUserPreferencesMediaAF::textTrackSelectionScore): Don't apply "automatic"
378             logic when captions were enabled with .webkitClosedCaptionsVisible.
379
380 2013-07-02  Anders Carlsson  <andersca@apple.com>
381
382         Always flip the coordinate system before drawing NSViews from Widget::paint
383         https://bugs.webkit.org/show_bug.cgi?id=118318
384         <rdar://problem/13895483>
385
386         Reviewed by Beth Dakin.
387
388         Undo the change that would not flip on 10.9; turns out the bug was in AppKit. Also remove the
389         _hasCanDrawSubviewsIntoLayerOrAncestor workaround since drawing works correctly now.
390
391         Also, pass flipped:NO when creating the NSGraphicsContext to indicate that the graphics context
392         is unflipped as far as AppKit knows (since we flipped it earlier).
393
394         * platform/mac/WidgetMac.mm:
395         (WebCore::Widget::paint):
396
397 2013-06-26  Robert Hogan  <robert@webkit.org>
398
399         empty inlines should not affect line-wrapping
400         https://bugs.webkit.org/show_bug.cgi?id=25638
401
402         Reviewed by David Hyatt.
403
404         Don't break on empty inlines if we're in the middle of a word. I took this opportunity to
405         refactor the series of checks we perform to establish if we can break at the current position.
406
407         Test: fast/text/whitespace/inline-whitespace-wrapping-11.html
408
409         * rendering/RenderBlockLineLayout.cpp:
410         (WebCore::textBeginsWithBreakablePosition):
411         (WebCore::canBreakAtThisPosition):
412         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
413
414 2013-07-02  Jae Hyun Park  <jae.park@company100.net>
415
416         Implement CoordinatedSurface for Threaded Coordinated Graphics
417         https://bugs.webkit.org/show_bug.cgi?id=109661
418
419         Reviewed by Noam Rosenthal.
420
421         This is a preparation patch for Threaded Coordianted Graphics.
422
423         This patch implements ThreadSafeCoordinatedSurface using ImageBuffer as a
424         backend. Also, this patch moves common implementation to CoordinatedSurface to
425         prevent duplication of code.
426
427         * platform/graphics/texmap/coordinated/CoordinatedSurface.cpp:
428         (WebCore::CoordinatedSurface::CoordinatedSurface):
429         * platform/graphics/texmap/coordinated/CoordinatedSurface.h:
430         (WebCore::CoordinatedSurface::size):
431         (WebCore::CoordinatedSurface::flags):
432         * platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.cpp: Added.
433         (WebCore::ThreadSafeCoordinatedSurface::create):
434         (WebCore::ThreadSafeCoordinatedSurface::ThreadSafeCoordinatedSurface):
435         (WebCore::ThreadSafeCoordinatedSurface::~ThreadSafeCoordinatedSurface):
436         (WebCore::ThreadSafeCoordinatedSurface::paintToSurface):
437         (WebCore::ThreadSafeCoordinatedSurface::copyToTexture):
438         * platform/graphics/texmap/coordinated/ThreadSafeCoordinatedSurface.h: Added.
439
440 2013-07-02  Geoffrey Garen  <ggaren@apple.com>
441
442         plainText() is O(N^2)
443         https://bugs.webkit.org/show_bug.cgi?id=118282
444         <rdar://problem/14284360>
445
446         Reviewed by Alexey Proskuryakov.
447
448         * editing/TextIterator.cpp:
449         (WebCore::plainText): Linear growth for a vector data type is O(N^2).
450         Don't do that. Luckily, StringBuilder does the right thing automatically,
451         so we can just delete code.
452
453 2013-07-02  Tim Horton  <timothy_horton@apple.com>
454
455         constrainScrollPositionForOverhang needs to handle scrollOrigin correctly
456         https://bugs.webkit.org/show_bug.cgi?id=118176
457         <rdar://problem/14301271>
458
459         Reviewed by Anders Carlsson.
460
461         Test: compositing/geometry/fixed-position-flipped-writing-mode.html
462
463         WebCore makes use of constrainScrollPositionForOverhang not only for
464         constraining fixed- and sticky-positioned elements to the viewport, but
465         also for clamping the tile cache's visible rect.
466
467         Therefore, constrainScrollPositionForOverhang needs to correctly take
468         the scrollOrigin into account. The easiest way I saw to do this was to
469         reimplement the function in terms of a pair of rect intersections
470         between a virtual scrollable "viewport" and the document (with a bit
471         of complication from headers and footers).
472
473         The first intersection is performed, then if the viewport doesn't fit,
474         it is pushed down and to the right, from the origin. Next, we intersect
475         again, this time pushing the rect up by the amount it overflowed the document
476         rect from the bottom right. This performs effectively the same constraint
477         as previously, but handles the scrollOrigin correctly and is also somewhat
478         easier to read and understand (with pictures).
479
480         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
481         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
482         Subtract the scrollOrigin out of the offset passed to scrollOffsetForFixedPosition,
483         it's expecting an offset without the origin included.
484
485         * platform/ScrollableArea.cpp:
486         (WebCore::ScrollableArea::constrainScrollPositionForOverhang):
487         Reimplement the function as described above.
488
489 2013-07-02  Christophe Dumez  <ch.dumez@sisa.samsung.com>
490
491         Remove SVGStyledLocatableElement class
492         https://bugs.webkit.org/show_bug.cgi?id=118283
493
494         Reviewed by Dirk Schulze.
495
496         Remove SVGStyledLocatableElement class and have SVGGraphicsElement
497         inherit SVGStyledElement directly instead. SVGStyledLocatableElement
498         is no longer needed and according to the specification, SVGGraphicsElement
499         should inherit SVGStyledElement (actually SVGElement once we merge
500         SVGStyledElement into SVGElement).
501
502         No new tests, no behavior change.
503
504         * CMakeLists.txt:
505         * GNUmakefile.list.am:
506         * Target.pri:
507         * WebCore.order:
508         * WebCore.vcxproj/WebCore.vcxproj:
509         * WebCore.vcxproj/WebCore.vcxproj.filters:
510         * WebCore.xcodeproj/project.pbxproj:
511         * bindings/scripts/CodeGeneratorJS.pm:
512         (GetGnuVTableOffsetForType):
513         * svg/SVGAllInOne.cpp:
514         * svg/SVGElement.cpp:
515         (WebCore::SVGElement::getBoundingBox):
516         * svg/SVGElement.h:
517         * svg/SVGGraphicsElement.cpp:
518         (WebCore::SVGGraphicsElement::SVGGraphicsElement):
519         (WebCore::SVGGraphicsElement::parseAttribute):
520         (WebCore::SVGGraphicsElement::svgAttributeChanged):
521         * svg/SVGGraphicsElement.h:
522         * svg/SVGLocatable.cpp:
523         (WebCore::SVGLocatable::getTransformToElement):
524         * svg/SVGStyledElement.cpp:
525         (WebCore::SVGStyledElement::localCoordinateSpaceTransform):
526         * svg/SVGStyledLocatableElement.cpp: Removed.
527         * svg/SVGStyledLocatableElement.h: Removed.
528
529 2013-07-02  peavo@outlook.com  <peavo@outlook.com>
530
531         [Curl] Crash after download.
532         https://bugs.webkit.org/show_bug.cgi?id=118303
533
534         Reviewed by Brent Fulgham.
535
536         We need to make sure that the Curl easy handle is removed from the Curl multi handle before it's freed.
537
538         * platform/network/curl/CurlDownload.cpp:
539         (CurlDownloadManager::updateHandleList): Use addToCurl() and removeFromCurl() methods.
540         (CurlDownloadManager::addToCurl): Add method to add easy handle to multi handle.
541         (CurlDownloadManager::removeFromCurl): Add method to remove easy handle from multi handle, and then delete the handle.
542         (CurlDownloadManager::downloadThread): Use removeFromCurl() method.
543         (CurlDownload::~CurlDownload):
544         * platform/network/curl/CurlDownload.h: Avoid deleting Curl easy handle in destructor.
545
546 2013-07-02  Radu Stavila  <stavila@adobe.com>
547
548         [CSSRegions] No other SVG elements except the SVGRoot must have RegionInfo objects attached
549         https://bugs.webkit.org/show_bug.cgi?id=118295
550
551         Reviewed by Antti Koivisto.
552
553         Only the SVGRoot element can be collected in a named flow. As such, no SVG element below the root should
554         be attached to a RenderBoxRegionInfo object.
555
556         A larger patch's test (https://bugs.webkit.org/show_bug.cgi?id=118300) is failing because of this.
557         This change will be covered by that test.
558
559         * rendering/RenderBoxModelObject.h:
560         (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion):
561         * rendering/RenderObject.h:
562         (WebCore::RenderObject::isRenderSVGBlock):
563         * rendering/svg/RenderSVGBlock.h:
564
565 2013-07-02  Kangil Han  <kangil.han@samsung.com>
566
567         is/toHTMLStyleElement should use Element* for its argument
568         https://bugs.webkit.org/show_bug.cgi?id=118286
569
570         Reviewed by Andreas Kling.
571
572         To reduce unnecessary call of isElementNode(), this patch replaces argument
573         of is/toHTMLStyleElement from Node* to Element*. Plus, use Element::hasTagName
574         in collectActiveStyleSheets function for minor code refactoring since
575         its cost is cheaper than Node::hasTagName.
576
577         * css/CSSStyleSheet.cpp:
578         (WebCore::isAcceptableCSSStyleSheetParent):
579         * css/StyleScopeResolver.cpp:
580         (WebCore::StyleScopeResolver::scopeFor):
581         * dom/DocumentStyleSheetCollection.cpp:
582         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
583         * dom/Node.cpp:
584         (WebCore::Node::numberOfScopedHTMLStyleChildren):
585         * html/HTMLStyleElement.h:
586         (WebCore::isHTMLStyleElement):
587         (WebCore::toHTMLStyleElement):
588
589 2013-07-02  Ryosuke Niwa  <rniwa@webkit.org>
590
591         Unexpose EditingPropertiesToInclude in EditingStyle.h after r151772
592         https://bugs.webkit.org/show_bug.cgi?id=118271
593
594         Reviewed by Andreas Kling.
595
596         Don't expose EditingPropertiesToInclude in EditingStyle.h and do other cleanups as described below.
597
598         No new tests since there should be no behavioral change.
599
600         * editing/EditingStyle.cpp:
601         (WebCore::copyEditingProperties): Use newly defined numAllEditingProperties and numInheritableEditingProperties
602         instead of a magic number of 2.
603         (WebCore::copyPropertiesFromComputedStyle): Renamed from editingStyleFromComputedStyle. It now takes ComputedStyleExtractor and
604         PropertiesToInclude instead of Node* and EditingPropertiesToInclude and handles AllProperties. Also added a helper that takes Node*.
605         (WebCore::EditingStyle::init): Calls copyPropertiesFromComputedStyle. Unfortunately, we need to special-case EditingPropertiesInEffect
606         and not set background-color and text-decoration. This is required probably due to a bug elsewhere.
607         (WebCore::EditingStyle::removeStyleAddedByNode):
608         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
609         (WebCore::extractEditingProperties): Renamed from EditingStyle::removeAllButEditingProperties; takes PropertiesToInclude instead of
610         EditingPropertiesToInclude since the only caller of this function, EditingStyle::mergeInlineAndImplicitStyleOfElement, was converting
611         the type.
612         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
613         * editing/EditingStyle.h:
614
615 2013-07-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
616
617         Introduce toSVGInlineTextBox
618         https://bugs.webkit.org/show_bug.cgi?id=118289
619
620         Reviewed by Andreas Kling.
621
622         As a step to change static_cast with toXXX, static_cast<SVGInlineTextBox*> can
623         be changed with toSVGInlineTextBox().
624
625         Blink merge from https://src.chromium.org/viewvc/blink?view=rev&revision=153345
626
627         * rendering/svg/RenderSVGInlineText.cpp:
628         (WebCore::RenderSVGInlineText::positionForPoint):
629         * rendering/svg/SVGInlineFlowBox.cpp:
630         (WebCore::SVGInlineFlowBox::paintSelectionBackground):
631         (WebCore::SVGInlineFlowBox::paint):
632         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
633         * rendering/svg/SVGInlineTextBox.h:
634         (WebCore::toSVGInlineTextBox):
635         * rendering/svg/SVGRenderTreeAsText.cpp:
636         (WebCore::writeSVGInlineTextBoxes):
637         * rendering/svg/SVGRootInlineBox.cpp:
638         (WebCore::SVGRootInlineBox::paint):
639         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
640         (WebCore::SVGRootInlineBox::layoutChildBoxes):
641         (WebCore::reverseInlineBoxRangeAndValueListsIfNeeded):
642         * rendering/svg/SVGTextQuery.cpp:
643         (WebCore::SVGTextQuery::collectTextBoxesInFlowBox):
644
645 2013-07-02  Christophe Dumez  <ch.dumez@sisa.samsung.com>
646
647         Simplify SVGTextContentElement::elementFromRenderer()
648         https://bugs.webkit.org/show_bug.cgi?id=118284
649
650         Reviewed by Andreas Kling.
651
652         Simplify SVGTextContentElement::elementFromRenderer() by leveraging
653         SVGElement::isTextContent() methods instead of explicitly checking
654         for tag names.
655
656         No new tests, no behavior change.
657
658         * svg/SVGTextContentElement.cpp:
659         (WebCore::SVGTextContentElement::elementFromRenderer):
660
661 2013-07-02  Csaba Osztrogonác  <ossy@webkit.org>
662
663         Fix cast-align warnings in WebCore/platform/graphics/texmap/TextureMapperGL.cpp
664         https://bugs.webkit.org/show_bug.cgi?id=118249
665
666         Reviewed by Allan Sandfeld Jensen.
667
668         * platform/graphics/texmap/TextureMapperGL.cpp:
669         (WebCore::BitmapTextureGL::updateContents):
670
671 2013-07-02  Allan Sandfeld Jensen  <allan.jensen@digia.com>
672
673         [Qt][WK1] Support WebGL with EGL on Linux
674         https://bugs.webkit.org/show_bug.cgi?id=118251
675
676         Reviewed by Kenneth Rohde Christiansen.
677
678         Let GraphicsContext3D work without a GraphicsSurface.
679
680         * Target.pri:
681         * platform/graphics/OpenGLShims.cpp:
682         (WebCore::getProcAddress):
683         * platform/graphics/qt/GraphicsContext3DQt.cpp:
684         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
685         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
686
687 2013-07-02  Catalin Badea  <badea@adobe.com>
688
689         [CSS-Regions] OverrideLogicalHeight used by both regions and flexbox
690         https://bugs.webkit.org/show_bug.cgi?id=118057
691
692         Reviewed by David Hyatt.
693
694         Remove the use of overrideLogicalContentHeight() from regions and
695         use a local variable instead. The change was needed to avoid
696         overlapping with flexbox containers.
697
698         Test: fast/regions/autoheight-flexbox.html
699
700         * rendering/RenderFlowThread.cpp:
701         (WebCore::RenderFlowThread::validateRegions):
702         (WebCore::RenderFlowThread::layout):
703         (WebCore::RenderFlowThread::applyBreakAfterContent):
704         (WebCore::RenderFlowThread::initializeRegionsComputedAutoHeight):
705         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
706         (WebCore::RenderFlowThread::addForcedRegionBreak):
707         * rendering/RenderFlowThread.h:
708         * rendering/RenderRegion.cpp:
709         (WebCore::RenderRegion::RenderRegion):
710         (WebCore::RenderRegion::pageLogicalHeight):
711         (WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent):
712         (WebCore::RenderRegion::updateRegionHasAutoLogicalHeightFlag):
713         (WebCore::RenderRegion::layoutBlock):
714         (WebCore::RenderRegion::updateLogicalHeight):
715         * rendering/RenderRegion.h:
716         (WebCore::RenderRegion::computedAutoHeight):
717         (WebCore::RenderRegion::setComputedAutoHeight):
718         (WebCore::RenderRegion::clearComputedAutoHeight):
719         (WebCore::RenderRegion::hasComputedAutoHeight):
720         * rendering/RenderView.cpp:
721
722 2013-07-01  Alex Christensen  <achristensen@apple.com>
723
724         Windows should be included in the list of platforms that can use OpenGL ES 2.
725         https://bugs.webkit.org/show_bug.cgi?id=118264
726
727         Reviewed by Dean Jackson.
728
729         * platform/graphics/GraphicsContext3D.h: Added PLATFORM(WIN) to platforms using OpenGL ES 2.
730
731 2013-07-01  Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
732
733         [GTK] Remove unsupported AC backends
734         https://bugs.webkit.org/show_bug.cgi?id=117362
735
736         Reviewed by Martin Robinson.
737
738         * GNUmakefile.am:
739         * GNUmakefile.list.am:
740         * Source/WebCore/platform/graphics/PlatformLayer.h: Removed mentions of clutter
741         and the texmap cairo backend.
742         * platform/graphics/clutter/DrawingBufferClutter.cpp: Removed.
743         * platform/graphics/clutter/GraphicsContext3DClutter.cpp: Removed.
744         * platform/graphics/clutter/GraphicsContext3DPrivate.cpp: Removed.
745         * platform/graphics/clutter/GraphicsContext3DPrivate.h: Removed.
746         * platform/graphics/clutter/GraphicsLayerActor.cpp: Removed.
747         * platform/graphics/clutter/GraphicsLayerActor.h: Removed.
748         * platform/graphics/clutter/GraphicsLayerClutter.cpp: Removed.
749         * platform/graphics/clutter/GraphicsLayerClutter.h: Removed.
750         * platform/graphics/clutter/PlatformClutterAnimation.cpp: Removed.
751         * platform/graphics/clutter/PlatformClutterAnimation.h: Removed.
752         * platform/graphics/clutter/PlatformClutterLayerClient.h: Removed.
753         * platform/graphics/clutter/TransformationMatrixClutter.cpp: Removed.
754         * Source/WebCore/platform/graphics/transforms/TransformationMatrix.h: Removed cogl
755         matrix type conversion.
756
757 2013-07-01  Alex Christensen  <achristensen@apple.com>
758
759         DrawingBuffer constructor and destructor were not defined for Windows.
760         I moved duplicate code from Cairo and Qt to DrawingBuffer.cpp to be used by Qt, Cairo, and Windows.
761         https://bugs.webkit.org/show_bug.cgi?id=118262
762
763         Reviewed by Dean Jackson.
764
765         * platform/graphics/cairo/DrawingBufferCairo.cpp: Removed duplicate DrawingBuffer constructor and destructor.
766         * platform/graphics/gpu/DrawingBuffer.cpp:
767         (WebCore::DrawingBuffer::DrawingBuffer):
768         (WebCore::DrawingBuffer::~DrawingBuffer): Moved from Cairo and Qt implementation.
769         * platform/graphics/gpu/qt/DrawingBufferQt.cpp: Removed duplicate DrawingBuffer constructor and destructor.
770
771 2013-07-01  Alex Christensen  <achristensen@apple.com>
772
773         Fixed unreachable return when GLX or EGL are used with WebGL.
774         https://bugs.webkit.org/show_bug.cgi?id=118263
775
776         Reviewed by Noam Rosenthal.
777
778         * platform/graphics/opengl/GLPlatformContext.cpp:
779         (WebCore::createOffScreenContext): Fixed unreachable return.
780
781 2013-07-01  Tim Horton  <timothy_horton@apple.com>
782
783         Maximum scroll position can be negative in some cases
784         https://bugs.webkit.org/show_bug.cgi?id=118175
785         <rdar://problem/14301217>
786
787         Reviewed by Anders Carlsson.
788
789         Test (API): WebKit2.ResizeReversePaginatedWebView
790
791         * page/FrameView.cpp:
792         (WebCore::FrameView::maximumScrollPosition):
793         * page/FrameView.h:
794         Override maximumScrollPosition() in FrameView and don't clamp to zero if
795         a reverse pagination mode is enabled, as it is possible (and common) to
796         have a negative maximum scroll position with reverse pagination.
797
798         * platform/ScrollView.cpp:
799         (WebCore::ScrollView::updateScrollbars):
800         Drive-by adoption of toIntSize().
801
802 2013-07-01  Alex Christensen  <achristensen@apple.com>
803
804         Removed all references to DrawingBuffer methods unused since the removal of Chromium:
805         DrawingBuffer::prepareBackBuffer,
806         DrawingBuffer::requiresCopyFromBackToFrontBuffer, and
807         DrawingBuffer::clearPlatformLayer.
808         https://bugs.webkit.org/show_bug.cgi?id=118257
809
810         Reviewed by Darin Adler.
811
812         * platform/graphics/blackberry/DrawingBufferBlackBerry.cpp:
813         (WebCore::DrawingBuffer::platformLayer):
814         * platform/graphics/cairo/DrawingBufferCairo.cpp:
815         (WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
816         * platform/graphics/clutter/DrawingBufferClutter.cpp:
817         (WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
818         * platform/graphics/gpu/DrawingBuffer.cpp:
819         (WebCore::DrawingBuffer::clear):
820         * platform/graphics/gpu/DrawingBuffer.h:
821         * platform/graphics/gpu/mac/DrawingBufferMac.mm:
822         (WebCore::DrawingBuffer::frontColorBuffer):
823         * platform/graphics/gpu/qt/DrawingBufferQt.cpp:
824         (WebCore::DrawingBuffer::paintCompositedResultsToCanvas):
825
826 2013-07-01  Jochen Eisinger  <jochen@chromium.org>
827
828         Remove support for consumable user gestures
829         https://bugs.webkit.org/show_bug.cgi?id=118247
830
831         Reviewed by Geoffrey Garen.
832
833         The features was not enabled on any port, and is meanwhile broken, so we
834         should delete it.
835
836         No new tests, just deleting dead code.
837
838         * accessibility/AccessibilityNodeObject.cpp:
839         (WebCore::AccessibilityNodeObject::increment):
840         (WebCore::AccessibilityNodeObject::decrement):
841         * accessibility/AccessibilityObject.cpp:
842         (WebCore::AccessibilityObject::press):
843         * bindings/ScriptControllerBase.cpp:
844         (WebCore::ScriptController::executeScript):
845         * bindings/js/ScriptController.cpp:
846         (WebCore::ScriptController::executeScriptInWorld):
847         * dom/UserGestureIndicator.cpp:
848         (WebCore::isDefinite):
849         (WebCore::UserGestureIndicator::UserGestureIndicator):
850         (WebCore::UserGestureIndicator::~UserGestureIndicator):
851         * dom/UserGestureIndicator.h:
852         (WebCore::UserGestureIndicator::processingUserGesture):
853         * inspector/InspectorFrontendClientLocal.cpp:
854         (WebCore::InspectorFrontendClientLocal::openInNewTab):
855         * inspector/InspectorFrontendHost.cpp:
856         (WebCore::FrontendMenuProvider::contextMenuItemSelected):
857         * inspector/InspectorPageAgent.cpp:
858         (WebCore::InspectorPageAgent::navigate):
859         * loader/NavigationScheduler.cpp:
860         (WebCore::ScheduledURLNavigation::fire):
861         (WebCore::ScheduledURLNavigation::didStartTimer):
862         (WebCore::ScheduledRedirect::fire):
863         (WebCore::ScheduledRefresh::fire):
864         (WebCore::ScheduledHistoryNavigation::fire):
865         (WebCore::ScheduledFormSubmission::fire):
866         (WebCore::ScheduledFormSubmission::didStartTimer):
867         * page/DOMTimer.cpp:
868         (WebCore::DOMTimer::DOMTimer):
869         (WebCore::DOMTimer::fired):
870         * page/DOMTimer.h:
871         * page/DOMWindow.cpp:
872         (WebCore::DOMWindow::showModalDialog):
873         * page/EventHandler.cpp:
874         (WebCore::EventHandler::clear):
875         (WebCore::EventHandler::handleMousePressEvent):
876         (WebCore::EventHandler::handleMouseReleaseEvent):
877         * page/EventHandler.h:
878         * rendering/HitTestResult.cpp:
879         (WebCore::HitTestResult::toggleMediaFullscreenState):
880         (WebCore::HitTestResult::enterFullscreenForVideo):
881
882 2013-07-01  Frédéric Wang  <fred.wang@free.fr>
883
884         Add Support for mspace element
885         https://bugs.webkit.org/show_bug.cgi?id=115610
886
887         Reviewed by Chris Fleizach.
888
889         This patch adds basic support for the MathML mspace element. This is
890         important to let people control spacing of mathematical formulas.
891         Attributes width, height and depth are implemented. For the moment,
892         only nonnegative width are accepted.
893
894         * CMakeLists.txt: add references to the RenderMathMLSpace files.
895         * GNUmakefile.list.am: ditto.
896         * Target.pri: ditto.
897         * WebCore.vcxproj/WebCore.vcxproj: ditto.
898         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
899         * WebCore.xcodeproj/project.pbxproj: ditto.
900         * css/mathml.css:
901         (mtable[columnlines="dashed"] > mtr > mtd + mtd): remove the obsolete linebreaking rule.
902         * mathml/MathMLTextElement.cpp:
903         (WebCore::MathMLTextElement::createRenderer): map mspaceTag to RenderMathMLSpace.
904         * mathml/mathattrs.in: add width, height and depth attributes
905         * mathml/mathtags.in: add mspace element
906         * rendering/mathml/RenderMathMLBlock.cpp:
907         (WebCore::parseMathMLLength): fix int to float conversion.
908         * rendering/mathml/RenderMathMLBlock.h: declare isRenderMathMLSpace.
909         (WebCore::RenderMathMLBlock::isRenderMathMLSpace):
910         * rendering/mathml/RenderMathMLSpace.cpp: Added.
911         (WebCore::RenderMathMLSpace::RenderMathMLSpace):
912         (WebCore::RenderMathMLSpace::isChildAllowed):
913         (WebCore::RenderMathMLSpace::computePreferredLogicalWidths):
914         (WebCore::RenderMathMLSpace::updateFromElement):
915         (WebCore::RenderMathMLSpace::updateLogicalWidth):
916         (WebCore::RenderMathMLSpace::updateLogicalHeight):
917         (WebCore::RenderMathMLSpace::layout):
918         (WebCore::RenderMathMLSpace::styleDidChange):
919         (WebCore::RenderMathMLSpace::firstLineBoxBaseline):
920         * rendering/mathml/RenderMathMLSpace.h: Added.
921         (WebCore::RenderMathMLSpace::isRenderMathMLSpace):
922         (WebCore::RenderMathMLSpace::renderName):
923         (WebCore::toRenderMathMLSpace):
924
925 2013-06-27  Jer Noble  <jer.noble@apple.com>
926
927         Audio in apps which embed WebViews is corrupted.
928         https://bugs.webkit.org/show_bug.cgi?id=118163
929
930         Reviewed by Maciej Stachowiak.
931
932         Add a preference, which defaults to off, which controls whether the
933         AudioSessionManager will switch to a large audio buffer setting for
934         power-savings during <video> playback.
935
936         * WebCore.exp.in:
937         * page/Settings.cpp:
938         (WebCore::Settings::setLowPowerVideoAudioBufferSizeEnabled): Added.  Simple setter.
939         * page/Settings.h:
940         (WebCore::Settings::lowPowerVideoAudioBufferSizeEnabled): Added.  Simple getter.
941         * platform/audio/mac/AudioSessionManagerMac.cpp:
942         (AudioSessionManager::updateSessionState): Only set the large audio buffer
943             size if lowPowerVideoAudioBufferSize is enabled.
944
945 2013-07-01  Brian Holt  <brian.holt@samsung.com>
946
947         [ATK] Leak: leaks in WebKitAccessibleInterfaceText
948         https://bugs.webkit.org/show_bug.cgi?id=118248
949
950         Fixed memory leaks.
951
952         Reviewed by Christophe Dumez.
953
954         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
955         (getPangoLayoutForAtk):
956         (webkitAccessibleTextGetText):
957
958 2013-07-01  Roger Fong  <roger_fong@apple.com>
959
960         Unreviewed. Make WebCore.make copy over QTMovieWin DLL's and PDB's.
961         <rdar://problem/14321403>
962
963         * WebCore.vcxproj/WebCore.make:
964
965 2013-07-01  peavo@outlook.com  <peavo@outlook.com>
966
967         [Win] Crash when scrolling page with images.
968         https://bugs.webkit.org/show_bug.cgi?id=117832
969
970         Reviewed by Brent Fulgham.
971
972         Avoid access violation by returning early from method if image frame doesn't have pixel data.
973
974         * platform/image-decoders/ImageDecoder.h:
975         (WebCore::ImageFrame::hasPixelData): Added method to check if frame has pixel data.
976         * platform/image-decoders/gif/GIFImageDecoder.cpp:
977         (WebCore::GIFImageDecoder::haveDecodedRow): Early return if frame doesn't have pixel data.
978
979 2013-07-01  Noam Rosenthal  <noam@webkit.org>
980
981         Avoid calling RenderLayerBacking::resetContentsRect() if possible
982         https://bugs.webkit.org/show_bug.cgi?id=118217
983
984         Reviewed by Simon Fraser.
985
986         Call resetContentsRect() only if the layer has a contentsLayer.
987         Otherwise the contentsRect is redundant for the GraphicsLayer.
988
989         No new tests - optimization only. This is covered by plenty of existing
990         tests in webgl/ and compositing/.
991
992         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
993         (WebCore::GraphicsLayerTextureMapper::hasContentsLayer):
994         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
995             Added hasContentsLayer calls for TextureMapper/CoordinatedGraphics
996
997         * rendering/RenderLayerBacking.cpp:
998         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
999
1000 2013-07-01  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1001
1002         [Qt] Avoid creating a QWindow for offscreen GraphicsContext3D
1003         https://bugs.webkit.org/show_bug.cgi?id=118244
1004
1005         Reviewed by Noam Rosenthal.
1006
1007         In Qt 5.0 we had to create invisible windows, but in Qt 5.1
1008         we can now create specific offscreen surfaces.
1009
1010         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1011         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
1012
1013 2013-07-01  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1014
1015         [Qt] Remove long unused Qt4 forward definitions
1016
1017         Unreviewed cleanu-up.
1018
1019         * platform/graphics/GraphicsContext3D.h:
1020
1021 2013-07-01  Antti Koivisto  <antti@apple.com>
1022
1023         Use DeferrableOneShotTimer for deleting decoded data
1024         https://bugs.webkit.org/show_bug.cgi?id=118150
1025
1026         Reviewed by Andreas Kling.
1027
1028         Adam Barth pointed out that the virtual function for overriding the default delay doesn't work
1029         as expected from base class constructor.
1030
1031         * loader/cache/CachedResource.cpp:
1032         (WebCore::deadDecodedDataDeletionIntervalForResourceType):
1033         (WebCore::CachedResource::CachedResource):
1034         
1035             Use static function instead of calling a virtual.
1036
1037         * loader/cache/CachedResource.h:
1038         * loader/cache/CachedScript.cpp:
1039         * loader/cache/CachedScript.h:
1040
1041 2013-07-01  Kangil Han  <kangil.han@samsung.com>
1042
1043         Adopt toHTMLTextAreaElement for code cleanup
1044         https://bugs.webkit.org/show_bug.cgi?id=118226
1045
1046         Reviewed by Andreas Kling.
1047
1048         To enhance readability, this patch adopts toHTMLTextAreaElement.
1049         This also helps out to reduce duplicated use of static_cast.
1050
1051         * accessibility/AccessibilityNodeObject.cpp:
1052         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
1053         (WebCore::AccessibilityNodeObject::isNativeTextControl):
1054         (WebCore::AccessibilityNodeObject::isReadOnly):
1055         (WebCore::AccessibilityNodeObject::text):
1056         * accessibility/AccessibilityRenderObject.cpp:
1057         (WebCore::AccessibilityRenderObject::setValue):
1058         * css/StyleResolver.cpp:
1059         (WebCore::StyleResolver::adjustRenderStyle):
1060         * editing/markup.cpp:
1061         (WebCore::StyledMarkupAccumulator::appendText):
1062         * html/HTMLFormControlElement.cpp:
1063         (WebCore::shouldAutofocus):
1064         * html/HTMLTextAreaElement.h:
1065         (WebCore::toHTMLTextAreaElement):
1066         * page/FocusController.cpp:
1067         (WebCore::clearSelectionIfNeeded):
1068         * rendering/HitTestResult.cpp:
1069         (WebCore::HitTestResult::isContentEditable):
1070         * rendering/RenderBox.cpp:
1071         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
1072         * rendering/RenderTextControlMultiLine.cpp:
1073         (WebCore::RenderTextControlMultiLine::~RenderTextControlMultiLine):
1074         (WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
1075         (WebCore::RenderTextControlMultiLine::computeControlLogicalHeight):
1076         * testing/Internals.cpp:
1077         (WebCore::Internals::wasLastChangeUserEdit):
1078
1079 2013-07-01  Kwang Yul Seo  <skyul@company100.net>
1080
1081         Add missing string headers that are used when LOG_DISABLED is 0.
1082         https://bugs.webkit.org/show_bug.cgi?id=118227
1083
1084         Reviewed by Andreas Kling.
1085
1086         Build fix for LOG_DISABLED=0.
1087
1088         No new tests, no behavior change.
1089
1090         * html/track/InbandTextTrack.cpp:
1091         * rendering/RenderLayerCompositor.cpp:
1092
1093 2013-06-29  Simon Fraser  <simon.fraser@apple.com>
1094
1095         Avoid calling into Objective-C every time we get the scrollbar width
1096         https://bugs.webkit.org/show_bug.cgi?id=118216
1097
1098         Reviewed by Geoffrey Garen.
1099
1100         Profiling shows that calling Scrollbar::isOverlayScrollbar() is somewhat
1101         expensive, because it calls down into Objective-C. Fix by caching in
1102         ScrollbarThemeMac whether we're using overlay scrollbars. We update this
1103         cache on creation, and when preferences change; ScrollAnimatorMac::updateScrollerStyle()
1104         is the function that gets called when the user changes the setting in System Preferences.
1105
1106         * platform/ScrollbarTheme.h:
1107         (WebCore::ScrollbarTheme::usesOverlayScrollbarsChanged):
1108         * platform/mac/ScrollAnimatorMac.mm:
1109         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
1110         * platform/mac/ScrollbarThemeMac.h:
1111         * platform/mac/ScrollbarThemeMac.mm:
1112         (WebCore::ScrollbarThemeMac::preferencesChanged):
1113         (WebCore::ScrollbarThemeMac::usesOverlayScrollbars):
1114         (WebCore::ScrollbarThemeMac::usesOverlayScrollbarsChanged):
1115
1116 2013-06-29  Simon Fraser  <simon.fraser@apple.com>
1117
1118         Avoid calling isSimpleContainerCompositingLayer() an extra time
1119         https://bugs.webkit.org/show_bug.cgi?id=118218
1120
1121         Reviewed by Tim Horton.
1122
1123         containsPaintedContent() called isSimpleContainerCompositingLayer(), which
1124         is not particularly cheap. But the caller already has this information,
1125         so pass it in.
1126
1127         * rendering/RenderLayerBacking.cpp:
1128         (WebCore::RenderLayerBacking::updateDrawsContent):
1129         (WebCore::RenderLayerBacking::containsPaintedContent):
1130         * rendering/RenderLayerBacking.h:
1131
1132 2013-06-29  Simon Fraser  <simon.fraser@apple.com>
1133
1134         Avoid doing work in RenderBox::outlineBoundsForRepaint() when the repaintContainer is this
1135         https://bugs.webkit.org/show_bug.cgi?id=118215
1136
1137         Reviewed by Tim Horton.
1138
1139         When the RenderGeometryMap code path was added, RenderBox::outlineBoundsForRepaint()
1140         actually got slower if no coordinate mapping was needed. So avoid doing work when
1141         we can, including avoiding the FloatQuad construction.
1142         
1143         Speeds up scrolling overflow:scroll areas with large numbers of layer children.
1144
1145         * rendering/RenderBox.cpp:
1146         (WebCore::RenderBox::outlineBoundsForRepaint):
1147
1148 2013-06-29  Kangil Han  <kangil.han@samsung.com>
1149
1150         Adopt is/toHTMLOptGroupElement for code cleanup
1151         https://bugs.webkit.org/show_bug.cgi?id=118213
1152
1153         Reviewed by Andreas Kling.
1154
1155         To enhance readability, this patch adopts is/toHTMLOptGroupElement.
1156         This also helps out to reduce duplicated use of static_cast.
1157
1158         * accessibility/AccessibilityListBoxOption.cpp:
1159         (WebCore::AccessibilityListBoxOption::isEnabled):
1160         (WebCore::AccessibilityListBoxOption::stringValue):
1161         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
1162         * css/SelectorChecker.cpp:
1163         (WebCore::SelectorChecker::checkOne):
1164         * css/StyleResolver.cpp:
1165         (WebCore::StyleResolver::canShareStyleWithElement):
1166         * html/HTMLOptGroupElement.h:
1167         (WebCore::isHTMLOptGroupElement):
1168         (WebCore::toHTMLOptGroupElement):
1169         * html/HTMLOptionElement.cpp:
1170         (WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel):
1171         (WebCore::HTMLOptionElement::isDisabledFormControl):
1172         * html/HTMLSelectElement.cpp:
1173         (WebCore::HTMLSelectElement::childShouldCreateRenderer):
1174         (WebCore::HTMLSelectElement::recalcListItems):
1175         * html/parser/HTMLConstructionSite.cpp:
1176         (WebCore::hasImpliedEndTag):
1177         * html/parser/HTMLElementStack.cpp:
1178         (WebCore::HTMLNames::isSelectScopeMarker):
1179         * html/parser/HTMLTreeBuilder.cpp:
1180         (WebCore::HTMLTreeBuilder::processStartTag):
1181         (WebCore::HTMLTreeBuilder::processEndTag):
1182         * rendering/RenderListBox.cpp:
1183         (WebCore::RenderListBox::updateFromElement):
1184         (WebCore::RenderListBox::paintItemForeground):
1185         * rendering/RenderMenuList.cpp:
1186         (WebCore::RenderMenuList::itemText):
1187         (WebCore::RenderMenuList::itemIsEnabled):
1188         (WebCore::RenderMenuList::itemIsLabel):
1189
1190 2013-06-29  ChangSeok Oh  <changseok.oh@collabora.com>
1191
1192         Build fix for unguarded SVGGraphicsElement
1193         https://bugs.webkit.org/show_bug.cgi?id=118214
1194
1195         Reviewed by Christophe Dumez.
1196
1197         Add the SVG condition to SVGGraphicsElement.idl
1198
1199         No new tests required since no functionality changed.
1200
1201         * svg/SVGGraphicsElement.idl:
1202
1203 2013-06-29  Kangil Han  <kangil.han@samsung.com>
1204
1205         Adopt is/toHTMLOptionElement for code cleanup
1206         https://bugs.webkit.org/show_bug.cgi?id=118212
1207
1208         Reviewed by Andreas Kling.
1209
1210         To enhance readability, this patch adopts is/toHTMLOptionElement.
1211         This also helps out to reduce duplicated use of static_cast.
1212
1213         * accessibility/AccessibilityListBoxOption.cpp:
1214         (WebCore::AccessibilityListBoxOption::isSelected):
1215         (WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
1216         (WebCore::AccessibilityListBoxOption::stringValue):
1217         (WebCore::AccessibilityListBoxOption::listBoxOptionParentNode):
1218         * accessibility/AccessibilityMenuListOption.cpp:
1219         (WebCore::AccessibilityMenuListOption::setElement):
1220         (WebCore::AccessibilityMenuListOption::isEnabled):
1221         (WebCore::AccessibilityMenuListOption::isSelected):
1222         (WebCore::AccessibilityMenuListOption::setSelected):
1223         (WebCore::AccessibilityMenuListOption::stringValue):
1224         * accessibility/AccessibilityMenuListPopup.cpp:
1225         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
1226         * accessibility/AccessibilityRenderObject.cpp:
1227         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
1228         * css/SelectorChecker.cpp:
1229         (WebCore::SelectorChecker::checkOne):
1230         * css/StyleResolver.cpp:
1231         (WebCore::StyleResolver::canShareStyleWithElement):
1232         * html/HTMLCollection.cpp:
1233         (WebCore::isMatchingElement):
1234         * html/HTMLOptionElement.cpp:
1235         (WebCore::HTMLOptionElement::index):
1236         * html/HTMLOptionElement.h:
1237         (WebCore::isHTMLOptionElement):
1238         (WebCore::toHTMLOptionElement):
1239         * html/HTMLOptionsCollection.cpp:
1240         (WebCore::HTMLOptionsCollection::add):
1241         * html/HTMLSelectElement.cpp:
1242         (WebCore::HTMLSelectElement::hasPlaceholderLabelOption):
1243         (WebCore::HTMLSelectElement::value):
1244         (WebCore::HTMLSelectElement::setValue):
1245         (WebCore::HTMLSelectElement::childShouldCreateRenderer):
1246         (WebCore::HTMLSelectElement::nextValidIndex):
1247         (WebCore::HTMLSelectElement::saveLastSelection):
1248         (WebCore::HTMLSelectElement::setActiveSelectionAnchorIndex):
1249         (WebCore::HTMLSelectElement::updateListBoxSelection):
1250         (WebCore::HTMLSelectElement::listBoxOnChange):
1251         (WebCore::HTMLSelectElement::recalcListItems):
1252         (WebCore::HTMLSelectElement::selectedIndex):
1253         (WebCore::HTMLSelectElement::selectOption):
1254         (WebCore::HTMLSelectElement::optionToListIndex):
1255         (WebCore::HTMLSelectElement::listToOptionIndex):
1256         (WebCore::HTMLSelectElement::deselectItemsWithoutValidation):
1257         (WebCore::HTMLSelectElement::saveFormControlState):
1258         (WebCore::HTMLSelectElement::searchOptionsForValue):
1259         (WebCore::HTMLSelectElement::restoreFormControlState):
1260         (WebCore::HTMLSelectElement::appendFormData):
1261         (WebCore::HTMLSelectElement::reset):
1262         (WebCore::HTMLSelectElement::updateSelectedState):
1263         (WebCore::HTMLSelectElement::lastSelectedListIndex):
1264         (WebCore::HTMLSelectElement::optionAtIndex):
1265         (WebCore::HTMLSelectElement::accessKeySetSelectedIndex):
1266         (WebCore::HTMLSelectElement::length):
1267         * html/parser/HTMLConstructionSite.cpp:
1268         (WebCore::hasImpliedEndTag):
1269         * html/parser/HTMLElementStack.cpp:
1270         (WebCore::HTMLNames::isSelectScopeMarker):
1271         * html/parser/HTMLTreeBuilder.cpp:
1272         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1273         (WebCore::HTMLTreeBuilder::processStartTag):
1274         (WebCore::HTMLTreeBuilder::processEndTag):
1275         * rendering/RenderListBox.cpp:
1276         (WebCore::RenderListBox::updateFromElement):
1277         (WebCore::RenderListBox::addFocusRingRects):
1278         (WebCore::RenderListBox::paintItemForeground):
1279         (WebCore::RenderListBox::paintItemBackground):
1280         * rendering/RenderMenuList.cpp:
1281         (WebCore::RenderMenuList::updateOptionsWidth):
1282         (WebCore::RenderMenuList::setTextFromOption):
1283         (WebCore::RenderMenuList::itemText):
1284         (WebCore::RenderMenuList::itemIsEnabled):
1285         (WebCore::RenderMenuList::itemIsSelected):
1286         * rendering/RenderTheme.cpp:
1287         (WebCore::RenderTheme::paintSliderTicks):
1288
1289 2013-06-29  Carlos Garcia Campos  <cgarcia@igalia.com>
1290
1291         REGRESSION(151586): multipart/x-mixed-replace images are broken
1292         https://bugs.webkit.org/show_bug.cgi?id=118169
1293
1294         Reviewed by Alexey Proskuryakov.
1295
1296         When loading multipart content the resource data will change as
1297         the next part is loaded, so we need to make a copy of the data
1298         before sending it to the resource.
1299
1300         * loader/SubresourceLoader.cpp:
1301         (WebCore::SubresourceLoader::didReceiveResponse):
1302
1303 2013-06-28  Eric Carlson  <eric.carlson@apple.com>
1304
1305         [Mac] adopt new AVFoundation caption API
1306         https://bugs.webkit.org/show_bug.cgi?id=118207
1307
1308         Reviewed by Dean Jackson.
1309
1310         No new tests, I was not able to come up with a reliable layout test.
1311
1312         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1313         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1314         (WebCore::MediaPlayerPrivateAVFoundationObjC::flushCues): New, call currentTrack->resetCueValues().
1315         (-[WebCoreAVFMovieObserver outputSequenceWasFlushed:]): New delegate method.
1316
1317 2013-06-28  Kangil Han  <kangil.han@samsung.com>
1318
1319         Adopt is/toHTMLImageElement for code cleanup
1320         https://bugs.webkit.org/show_bug.cgi?id=118182
1321
1322         Reviewed by Andreas Kling.
1323
1324         To enhance readability, this patch adopts is/toHTMLImageElement.
1325         This also helps out to reduce duplicated use of static_cast.
1326
1327         * accessibility/AccessibilityNodeObject.cpp:
1328         (WebCore::AccessibilityNodeObject::isNativeImage):
1329         * accessibility/AccessibilityRenderObject.cpp:
1330         (WebCore::AccessibilityRenderObject::url):
1331         * bindings/js/JSNodeCustom.cpp:
1332         (WebCore::isReachableFromDOM):
1333         * bridge/qt/qt_pixmapruntime.cpp:
1334         (JSC::Bindings::assignToHTMLImageElement):
1335         (JSC::Bindings::QtPixmapRuntime::toQt):
1336         * dom/Clipboard.cpp:
1337         (WebCore::Clipboard::setDragImage):
1338         * dom/Node.cpp:
1339         (WebCore::Node::enclosingLinkEventParentOrSelf):
1340         * editing/Editor.cpp:
1341         (WebCore::imageElementFromImageDocument):
1342         * html/HTMLAnchorElement.cpp:
1343         (WebCore::appendServerMapMousePosition):
1344         * html/HTMLImageElement.h:
1345         (WebCore::isHTMLImageElement):
1346         (WebCore::toHTMLImageElement):
1347         * html/HTMLMapElement.cpp:
1348         (WebCore::HTMLMapElement::imageElement):
1349         * html/HTMLNameCollection.cpp:
1350         (WebCore::WindowNameCollection::nodeMatchesIfNameAttributeMatch):
1351         (WebCore::DocumentNameCollection::nodeMatchesIfIdAttributeMatch):
1352         (WebCore::DocumentNameCollection::nodeMatchesIfNameAttributeMatch):
1353         (WebCore::DocumentNameCollection::nodeMatches):
1354         * page/DragController.cpp:
1355         (WebCore::DragController::draggableElement):
1356         * page/PageSerializer.cpp:
1357         (WebCore::PageSerializer::serializeFrame):
1358         * platform/gtk/PasteboardGtk.cpp:
1359         (WebCore::getURLForImageNode):
1360         * platform/mac/HTMLConverter.mm:
1361         (+[WebHTMLConverter editingAttributedStringFromRange:]):
1362         * rendering/HitTestResult.cpp:
1363         (WebCore::HitTestResult::altDisplayString):
1364         (WebCore::HitTestResult::absoluteImageURL):
1365         * rendering/RenderImage.cpp:
1366         (WebCore::RenderImage::paintIntoRect):
1367         (WebCore::RenderImage::imageMap):
1368         (WebCore::RenderImage::updateAltText):
1369         * rendering/RenderObject.cpp:
1370         (WebCore::RenderObject::shouldRespectImageOrientation):
1371
1372 2013-06-28  Gavin Barraclough  <barraclough@apple.com>
1373
1374         PageThrottler::shouldThrottleTimers is wrong.
1375         https://bugs.webkit.org/show_bug.cgi?id=118210
1376
1377         Reviewed by Anders Carlson.
1378
1379         m_throttleState == PageNotThrottledState
1380             -> page NOT throttled, so should NOT throttle timers
1381         m_throttleState != PageNotThrottledState
1382             -> page NOT NOT throttled, so should throttle timers
1383
1384         This needs cleaning up, but for now, 1 character fix.
1385
1386         * page/PageThrottler.h:
1387         (WebCore::PageThrottler::shouldThrottleTimers):
1388             == -> !=
1389
1390 2013-06-28  Ryosuke Niwa  <rniwa@webkit.org>
1391
1392         An element with -webkit-user-select: all should be selected on single click
1393         https://bugs.webkit.org/show_bug.cgi?id=117864
1394
1395         Reviewed by Darin Adler.
1396
1397         Set m_mouseDownMayStartSelect true even when the node cannot start selection
1398         if the node was inside an element with -webkit-user-select: all.
1399
1400         Test: editing/selection/user-select-all-with-single-click.html
1401
1402         * page/EventHandler.cpp:
1403         (WebCore::canMouseDownStartSelect):
1404
1405 2013-06-28  Ryosuke Niwa  <rniwa@webkit.org>
1406
1407         Remove unused attachChildrenLazily method and make attach/detachChildren private
1408         https://bugs.webkit.org/show_bug.cgi?id=118016
1409
1410         Reviewed by Darin Adler.
1411
1412         Merge https://chromium.googlesource.com/chromium/blink/+/009520dc31c9458e0cf71cf212fa5688c4ca68b0
1413
1414         No one should be manually trying to attach or detach all their children so there's
1415         no reason for these methods to be public.
1416         
1417         In doing this I realized that attachChildrenLazily is not used and can be removed.
1418         
1419         I also realized that we were detaching all our children before the ShadowRoots which
1420         is sad since the InsertionPoints will call detach() on them as well, and then when we
1421         call ContainerNode::detach at the end of Element::detach we'll go detach them again!
1422         This patch makes it so we only go through and detach them twice instead of three times.
1423         In the future we should figure out a way to only do this once.
1424
1425         * dom/ContainerNode.h:
1426         * dom/Element.cpp:
1427         (WebCore::Element::detach):
1428
1429 2013-06-28  Alexey Proskuryakov  <ap@apple.com>
1430
1431         [Mac] Crash when loading is stopped from -didReceiveResponse
1432         https://bugs.webkit.org/show_bug.cgi?id=118209
1433         <rdar://problem/14259249>
1434
1435         Reviewed by Brady Eidson.
1436
1437         Test: TestWebKitAPI/Tests/mac/StopLoadingFromDidReceiveResponse.mm.
1438
1439         * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveResponse):
1440         Added yet another check for reachedTerminalState().
1441
1442 2013-06-28  Beth Dakin  <bdakin@apple.com>
1443
1444         Cached pages don't update their backing scale factor when it changes
1445         https://bugs.webkit.org/show_bug.cgi?id=118206
1446         -and-
1447         <rdar://problem/14261627>
1448
1449         Reviewed by Tim Horton.
1450
1451         It is not sufficient to mark pages in the PageCache as needing a full style 
1452         recalc. We also need to ensure that the RenderLayerCompositors for the CachesPages 
1453         get updated.
1454
1455         Keep track of whether device scale has been updated with 
1456         m_needsDeviceScaleChanged. If that has been marked true, then restore() will call 
1457         Frame::deviceOrPageScaleFactorChanged().
1458         * history/CachedPage.cpp:
1459         (WebCore::CachedPage::CachedPage):
1460         (WebCore::CachedPage::restore):
1461         * history/CachedPage.h:
1462         (WebCore::CachedPage::markForDeviceScaleChanged):
1463
1464         Propagate markForDeviceScaleChanged() to all of the CachedPages.
1465         * history/PageCache.cpp:
1466         (WebCore::PageCache::markPagesForDeviceScaleChanged):
1467         * history/PageCache.h:
1468
1469         Call PageCache::markPagesForDeviceScaleChanged()
1470         * page/Page.cpp:
1471         (WebCore::Page::setDeviceScaleFactor):
1472
1473 2013-06-28  Alex Christensen  <achristensen@apple.com>
1474
1475         Added template parameters to std::min to fix compile errors in Visual Studio x64.
1476         https://bugs.webkit.org/show_bug.cgi?id=118204
1477
1478         Reviewed by Geoffrey Garen.
1479
1480         * platform/win/PasteboardWin.cpp:
1481         (WebCore::Pasteboard::writeURLToDataObject): Added <unsigned> to std::min.
1482         (WebCore::createGlobalImageFileDescriptor): Added <int> to std::min.
1483
1484 2013-06-28  Alex Christensen  <achristensen@apple.com>
1485
1486         Added WebGL files to Windows build.
1487         https://bugs.webkit.org/show_bug.cgi?id=118200
1488
1489         Reviewed by Brent Fulgham.
1490
1491         * WebCore.vcxproj/WebCore.vcxproj: Added WebGL files, removed unused GraphicsContext3DOpenGLES.cpp.
1492         * WebCore.vcxproj/WebCore.vcxproj.filters: Added WebGL files, removed unused GraphicsContext3DOpenGLES.cpp.
1493         * platform/graphics/cairo/GLContext.cpp: Only include GLContextEGL.h or GLContextGLX.h if they're needed.
1494         * platform/graphics/cg/GraphicsContext3DCG.cpp: Only include GraphicsContext3DNEON.h if it's needed.
1495
1496 2013-06-28  Ryosuke Niwa  <rniwa@webkit.org>
1497
1498         -webkit-line-break: after-white-space sometimes truncates DOM on copy & paste
1499         https://bugs.webkit.org/show_bug.cgi?id=118164
1500
1501         Reviewed by Sam Weinig.
1502
1503         We can't assume that all subsequent ancestors contain exactly one child since they could have been
1504         added in the first if statement matching: currentNode->parentNode() != rootNode && isRemovableBlock(currentNode)
1505
1506         Exit early when we encounter such an ancestor since removing its ancestor (that contains multiple children
1507         some of which aren't in nodesToRemove) can clobber more nodes than we're allowed to remove.
1508
1509         Test: editing/pasteboard/simplfiying-markup-should-not-strip-content.html
1510
1511         * editing/SimplifyMarkupCommand.cpp:
1512         (WebCore::SimplifyMarkupCommand::doApply):
1513         (WebCore::SimplifyMarkupCommand::pruneSubsequentAncestorsToRemove):
1514
1515 2013-06-28  Gwang Yoon Hwang  <ryumiel@company100.net>
1516
1517         Coordinated Graphics: Separate CoordinatedLayerTreeHost into CoordinatedLayerTreeHost and CompositingCoordinator
1518         https://bugs.webkit.org/show_bug.cgi?id=104360
1519
1520         Reviewed by Noam Rosenthal.
1521
1522         The CoordinatedLayerTreeHost has too many responsibilities. It
1523         implements LayerTreeHost, GraphicsLayerClient,
1524         CoordinatedGraphicsLayerClient, CoordinatedImageBacking::Client,
1525         UpdateAtlas::Client, GraphicsLayerFactory and
1526         WebCustomFilterProgramProxyClient.
1527
1528         This refactoring reduces the responsibilities of CoordinatedLayerTreeHost.
1529
1530         This patch introduces a new class called CompositingCoordinator, which
1531         takes the responsibility of managing compositing resources in
1532         WebProcess.
1533
1534         CoordinatedLayerTreeHost is responsible only for the scheduling and
1535         IPC-specific stuff, which are relevant only for WebKit2.
1536
1537         No new tests, covered by existing tests.
1538
1539         * CMakeLists.txt:
1540         * Target.pri:
1541         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Added.
1542         (WebCore::CompositingCoordinator::create):
1543         (WebCore::CompositingCoordinator::~CompositingCoordinator):
1544         (WebCore::CompositingCoordinator::CompositingCoordinator):
1545         (WebCore::CompositingCoordinator::setRootCompositingLayer):
1546         (WebCore::CompositingCoordinator::sizeDidChange):
1547         (WebCore::CompositingCoordinator::flushPendingLayerChanges):
1548         (WebCore::CompositingCoordinator::syncDisplayState):
1549         (WebCore::CompositingCoordinator::nextAnimationServiceTime):
1550         (WebCore::CompositingCoordinator::clearPendingStateChanges):
1551         (WebCore::CompositingCoordinator::initializeRootCompositingLayerIfNeeded):
1552         (WebCore::CompositingCoordinator::createRootLayer):
1553         (WebCore::CompositingCoordinator::syncLayerState):
1554         (WebCore::CompositingCoordinator::createImageBackingIfNeeded):
1555         (WebCore::CompositingCoordinator::createImageBacking):
1556         (WebCore::CompositingCoordinator::updateImageBacking):
1557         (WebCore::CompositingCoordinator::clearImageBackingContents):
1558         (WebCore::CompositingCoordinator::removeImageBacking):
1559         (WebCore::CompositingCoordinator::flushPendingImageBackingChanges):
1560         (WebCore::CompositingCoordinator::notifyAnimationStarted):
1561         (WebCore::CompositingCoordinator::notifyFlushRequired):
1562         (WebCore::CompositingCoordinator::paintContents):
1563         (WebCore::CompositingCoordinator::createGraphicsLayer):
1564         (WebCore::CompositingCoordinator::deviceScaleFactor):
1565         (WebCore::CompositingCoordinator::pageScaleFactor):
1566         (WebCore::CompositingCoordinator::createUpdateAtlas):
1567         (WebCore::CompositingCoordinator::removeUpdateAtlas):
1568         (WebCore::CompositingCoordinator::visibleContentsRect):
1569         (WebCore::CompositingCoordinator::mainContentsLayer):
1570         (WebCore::CompositingCoordinator::setVisibleContentsRect):
1571         (WebCore::CompositingCoordinator::deviceOrPageScaleFactorChanged):
1572         (WebCore::CompositingCoordinator::detachLayer):
1573         (WebCore::CompositingCoordinator::commitScrollOffset):
1574         (WebCore::CompositingCoordinator::renderNextFrame):
1575         (WebCore::CompositingCoordinator::purgeBackingStores):
1576         (WebCore::CompositingCoordinator::paintToSurface):
1577         (WebCore::CompositingCoordinator::scheduleReleaseInactiveAtlases):
1578         (WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
1579         * platform/graphics/texmap/coordinated/CompositingCoordinator.h: Added.
1580         (WebCore::CompositingCoordinator::clearRootLayer):
1581         (WebCore::CompositingCoordinator::rootLayer):
1582         (WebCore::CompositingCoordinator::state):
1583
1584 2013-06-28  Commit Queue  <commit-queue@webkit.org>
1585
1586         Unreviewed, rolling out r152135.
1587         http://trac.webkit.org/changeset/152135
1588         https://bugs.webkit.org/show_bug.cgi?id=118199
1589
1590         Rolling out temporary patch used for debugging the test bots
1591         (Requested by rfong on #webkit).
1592
1593         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1594         (WebCore::MediaPlayerPrivateAVFoundation::load):
1595         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
1596         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::load):
1597
1598 2013-06-28  Morten Stenshorne  <mstensho@opera.com>
1599
1600         SVG relayout problem when displayed with different image box heights
1601         https://bugs.webkit.org/show_bug.cgi?id=118140
1602
1603         Reviewed by Philip Rogers.
1604
1605         If the root element is an SVG, its position and height are affected
1606         by the view height.
1607
1608         Test: svg/as-image/same-source-different-height.html
1609
1610         * rendering/RenderView.cpp:
1611         (WebCore::RenderView::layout):
1612
1613 2013-06-28  Simon Fraser  <simon.fraser@apple.com>
1614
1615         Allow some LayoutPoint and LayoutSize conversions to be inlined
1616         https://bugs.webkit.org/show_bug.cgi?id=118167
1617
1618         Reviewed by Ryosuke Niwa.
1619
1620         Construction of FloatSize from LayoutSize, and FloatPoint's move(const LayoutSize&)
1621         and moveBy(const LayoutPoint&) were not inlined, and showed up on some profiles.
1622         
1623         Make them inlined by removing the overloaded functions, and instead providing
1624         conversion operators from LayoutSize to FloatSize, and LayoutPoint to FloatPoint.
1625         Do the same to allow a LayoutRect to be converted to a FloatRect.
1626         
1627         This is nice because it removes pollution of FloatRect, FloatPoint and FloatSize with
1628         Layout* entirely.
1629         
1630         Remove Qt-specific conversions on LayoutRect, LayoutPoint and LayoutSize. Qt can
1631         convert via IntRect/FloatRect as necessary.
1632
1633         * platform/graphics/FloatPoint.cpp:
1634         * platform/graphics/FloatPoint.h:
1635         (WebCore::FloatPoint::move):
1636         (WebCore::FloatPoint::moveBy):
1637         * platform/graphics/FloatRect.cpp:
1638         * platform/graphics/FloatRect.h:
1639         * platform/graphics/FloatSize.cpp:
1640         * platform/graphics/FloatSize.h:
1641         * platform/graphics/LayoutPoint.h:
1642         (WebCore::LayoutPoint::operator FloatPoint):
1643         * platform/graphics/LayoutRect.cpp:
1644         * platform/graphics/LayoutRect.h:
1645         (WebCore::LayoutRect::operator FloatRect):
1646         * platform/graphics/LayoutSize.h:
1647         (WebCore::LayoutSize::operator FloatSize):
1648
1649 2013-06-28  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1650
1651         Get rid of IsWorkerGlobalScope and ExtendsDOMGlobalObject extended attributes
1652         https://bugs.webkit.org/show_bug.cgi?id=118191
1653
1654         Reviewed by Kentaro Hara.
1655
1656         Remove WebKit-specific [IsWorkerGlobalScope] and [ExtendsDOMGlobalObject] IDL
1657         extended attributes and update the JSC bindings generator to figure this out
1658         on its own.
1659
1660         No new tests, no behavior change.
1661
1662         * bindings/scripts/CodeGeneratorJS.pm:
1663         (IsDOMGlobalObject):
1664         (GenerateHeader):
1665         (GenerateImplementation):
1666         (GenerateConstructorHelperMethods):
1667         * bindings/scripts/IDLAttributes.txt:
1668         * page/DOMWindow.idl:
1669         * workers/DedicatedWorkerGlobalScope.idl:
1670         * workers/SharedWorkerGlobalScope.idl:
1671         * workers/WorkerGlobalScope.idl:
1672
1673 2013-06-28  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1674
1675         Introduce SVGGraphicsElement IDL interface
1676         https://bugs.webkit.org/show_bug.cgi?id=118178
1677
1678         Reviewed by Kentaro Hara.
1679
1680         Introduce SVGGraphicsElement IDL interface as per the latest SVG
1681         specification:
1682         - https://svgwg.org/svg2-draft/types.html#InterfaceSVGGraphicsElement
1683
1684         SVGGraphicsElement is a merge of SVGLocatable and SVGTransformable.
1685         This is one step towards simplifying inheritance in SVG and matching
1686         the latest SVG2 specification.
1687
1688         No new tests, already covered by existing tests.
1689
1690         * CMakeLists.txt:
1691         * DerivedSources.cpp:
1692         * DerivedSources.make:
1693         * DerivedSources.pri:
1694         * GNUmakefile.list.am:
1695         * Target.pri:
1696         * WebCore.order:
1697         * WebCore.vcxproj/WebCore.vcxproj:
1698         * WebCore.vcxproj/WebCore.vcxproj.filters:
1699         * WebCore.xcodeproj/project.pbxproj:
1700         * bindings/scripts/CodeGeneratorJS.pm:
1701         (GetGnuVTableOffsetForType):
1702         * rendering/svg/RenderSVGEllipse.cpp:
1703         (WebCore::RenderSVGEllipse::RenderSVGEllipse):
1704         * rendering/svg/RenderSVGEllipse.h:
1705         * rendering/svg/RenderSVGPath.cpp:
1706         (WebCore::RenderSVGPath::RenderSVGPath):
1707         * rendering/svg/RenderSVGPath.h:
1708         * rendering/svg/RenderSVGResourceClipper.cpp:
1709         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
1710         * rendering/svg/RenderSVGResourceContainer.cpp:
1711         (WebCore::RenderSVGResourceContainer::transformOnNonScalingStroke):
1712         * rendering/svg/RenderSVGResourceMarker.cpp:
1713         * rendering/svg/RenderSVGShape.cpp:
1714         (WebCore::RenderSVGShape::RenderSVGShape):
1715         (WebCore::RenderSVGShape::updateShapeFromElement):
1716         (WebCore::RenderSVGShape::layout):
1717         (WebCore::RenderSVGShape::nonScalingStrokeTransform):
1718         (WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
1719         * rendering/svg/RenderSVGShape.h:
1720         * rendering/svg/RenderSVGTransformableContainer.cpp:
1721         (WebCore::RenderSVGTransformableContainer::RenderSVGTransformableContainer):
1722         (WebCore::RenderSVGTransformableContainer::calculateLocalTransform):
1723         * rendering/svg/RenderSVGTransformableContainer.h:
1724         * svg/SVGAElement.cpp:
1725         (WebCore::SVGAElement::SVGAElement):
1726         (WebCore::SVGAElement::parseAttribute):
1727         (WebCore::SVGAElement::svgAttributeChanged):
1728         (WebCore::SVGAElement::defaultEventHandler):
1729         (WebCore::SVGAElement::supportsFocus):
1730         (WebCore::SVGAElement::isURLAttribute):
1731         * svg/SVGAElement.h:
1732         * svg/SVGAElement.idl:
1733         * svg/SVGAllInOne.cpp:
1734         * svg/SVGAnimateMotionElement.cpp:
1735         (WebCore::SVGAnimateMotionElement::hasValidAttributeType):
1736         * svg/SVGCircleElement.cpp:
1737         (WebCore::SVGCircleElement::SVGCircleElement):
1738         (WebCore::SVGCircleElement::parseAttribute):
1739         (WebCore::SVGCircleElement::svgAttributeChanged):
1740         * svg/SVGCircleElement.h:
1741         * svg/SVGCircleElement.idl:
1742         * svg/SVGClipPathElement.cpp:
1743         (WebCore::SVGClipPathElement::SVGClipPathElement):
1744         (WebCore::SVGClipPathElement::parseAttribute):
1745         (WebCore::SVGClipPathElement::svgAttributeChanged):
1746         (WebCore::SVGClipPathElement::childrenChanged):
1747         * svg/SVGClipPathElement.h:
1748         * svg/SVGClipPathElement.idl:
1749         * svg/SVGDefsElement.cpp:
1750         (WebCore::SVGDefsElement::SVGDefsElement):
1751         * svg/SVGDefsElement.h:
1752         * svg/SVGDefsElement.idl:
1753         * svg/SVGElement.h:
1754         (WebCore::SVGElement::isSVGGraphicsElement):
1755         * svg/SVGEllipseElement.cpp:
1756         (WebCore::SVGEllipseElement::SVGEllipseElement):
1757         (WebCore::SVGEllipseElement::parseAttribute):
1758         (WebCore::SVGEllipseElement::svgAttributeChanged):
1759         * svg/SVGEllipseElement.h:
1760         * svg/SVGEllipseElement.idl:
1761         * svg/SVGForeignObjectElement.cpp:
1762         (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
1763         (WebCore::SVGForeignObjectElement::parseAttribute):
1764         (WebCore::SVGForeignObjectElement::svgAttributeChanged):
1765         (WebCore::SVGForeignObjectElement::rendererIsNeeded):
1766         * svg/SVGForeignObjectElement.h:
1767         * svg/SVGForeignObjectElement.idl:
1768         * svg/SVGGElement.cpp:
1769         (WebCore::SVGGElement::SVGGElement):
1770         (WebCore::SVGGElement::parseAttribute):
1771         (WebCore::SVGGElement::svgAttributeChanged):
1772         * svg/SVGGElement.h:
1773         * svg/SVGGElement.idl:
1774         * svg/SVGGraphicsElement.cpp: Renamed from Source/WebCore/svg/SVGStyledTransformableElement.cpp.
1775         (WebCore::SVGGraphicsElement::SVGGraphicsElement):
1776         (WebCore::SVGGraphicsElement::~SVGGraphicsElement):
1777         (WebCore::SVGGraphicsElement::getCTM):
1778         (WebCore::SVGGraphicsElement::getScreenCTM):
1779         (WebCore::SVGGraphicsElement::animatedLocalTransform):
1780         (WebCore::SVGGraphicsElement::supplementalTransform):
1781         (WebCore::SVGGraphicsElement::isSupportedAttribute):
1782         (WebCore::SVGGraphicsElement::parseAttribute):
1783         (WebCore::SVGGraphicsElement::svgAttributeChanged):
1784         (WebCore::SVGGraphicsElement::nearestViewportElement):
1785         (WebCore::SVGGraphicsElement::farthestViewportElement):
1786         (WebCore::SVGGraphicsElement::getBBox):
1787         (WebCore::SVGGraphicsElement::createRenderer):
1788         (WebCore::SVGGraphicsElement::toClipPath):
1789         * svg/SVGGraphicsElement.h: Renamed from Source/WebCore/svg/SVGStyledTransformableElement.h.
1790         (WebCore::SVGGraphicsElement::localCoordinateSpaceTransform):
1791         (WebCore::SVGGraphicsElement::synchronizeRequiredFeatures):
1792         (WebCore::SVGGraphicsElement::synchronizeRequiredExtensions):
1793         (WebCore::SVGGraphicsElement::synchronizeSystemLanguage):
1794         (WebCore::toSVGGraphicsElement):
1795         * svg/SVGGraphicsElement.idl: Copied from Source/WebCore/svg/SVGForeignObjectElement.idl.
1796         * svg/SVGImageElement.cpp:
1797         (WebCore::SVGImageElement::SVGImageElement):
1798         (WebCore::SVGImageElement::isPresentationAttribute):
1799         (WebCore::SVGImageElement::collectStyleForPresentationAttribute):
1800         (WebCore::SVGImageElement::parseAttribute):
1801         (WebCore::SVGImageElement::svgAttributeChanged):
1802         (WebCore::SVGImageElement::attach):
1803         (WebCore::SVGImageElement::insertedInto):
1804         (WebCore::SVGImageElement::addSubresourceAttributeURLs):
1805         (WebCore::SVGImageElement::didMoveToNewDocument):
1806         * svg/SVGImageElement.h:
1807         * svg/SVGImageElement.idl:
1808         * svg/SVGLineElement.cpp:
1809         (WebCore::SVGLineElement::SVGLineElement):
1810         (WebCore::SVGLineElement::parseAttribute):
1811         (WebCore::SVGLineElement::svgAttributeChanged):
1812         * svg/SVGLineElement.h:
1813         * svg/SVGLineElement.idl:
1814         * svg/SVGPathElement.cpp:
1815         (WebCore::SVGPathElement::SVGPathElement):
1816         (WebCore::SVGPathElement::parseAttribute):
1817         (WebCore::SVGPathElement::svgAttributeChanged):
1818         (WebCore::SVGPathElement::insertedInto):
1819         (WebCore::SVGPathElement::removedFrom):
1820         * svg/SVGPathElement.h:
1821         * svg/SVGPathElement.idl:
1822         * svg/SVGPatternElement.cpp:
1823         * svg/SVGPolyElement.cpp:
1824         (WebCore::SVGPolyElement::SVGPolyElement):
1825         (WebCore::SVGPolyElement::parseAttribute):
1826         (WebCore::SVGPolyElement::svgAttributeChanged):
1827         * svg/SVGPolyElement.h:
1828         * svg/SVGPolygonElement.idl:
1829         * svg/SVGPolylineElement.idl:
1830         * svg/SVGRectElement.cpp:
1831         (WebCore::SVGRectElement::SVGRectElement):
1832         (WebCore::SVGRectElement::parseAttribute):
1833         (WebCore::SVGRectElement::svgAttributeChanged):
1834         * svg/SVGRectElement.h:
1835         * svg/SVGRectElement.idl:
1836         * svg/SVGSVGElement.cpp:
1837         (WebCore::SVGSVGElement::SVGSVGElement):
1838         (WebCore::SVGSVGElement::didMoveToNewDocument):
1839         (WebCore::SVGSVGElement::parseAttribute):
1840         (WebCore::SVGSVGElement::insertedInto):
1841         (WebCore::SVGSVGElement::removedFrom):
1842         * svg/SVGSVGElement.h:
1843         * svg/SVGSVGElement.idl:
1844         * svg/SVGStyledElement.cpp:
1845         (WebCore::SVGStyledElement::localCoordinateSpaceTransform):
1846         * svg/SVGSwitchElement.cpp:
1847         (WebCore::SVGSwitchElement::SVGSwitchElement):
1848         * svg/SVGSwitchElement.h:
1849         * svg/SVGSwitchElement.idl:
1850         * svg/SVGUseElement.cpp:
1851         (WebCore::SVGUseElement::SVGUseElement):
1852         (WebCore::SVGUseElement::parseAttribute):
1853         (WebCore::SVGUseElement::insertedInto):
1854         (WebCore::SVGUseElement::removedFrom):
1855         (WebCore::SVGUseElement::svgAttributeChanged):
1856         (WebCore::SVGUseElement::toClipPath):
1857         (WebCore::SVGUseElement::finishParsingChildren):
1858         * svg/SVGUseElement.h:
1859         * svg/SVGUseElement.idl:
1860
1861 2013-06-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1862
1863         Add new schemes to content utils.
1864         https://bugs.webkit.org/show_bug.cgi?id=118181
1865
1866         Reviewed by Christophe Dumez.
1867
1868         According to latest content handler spec, new schemes are added to it.
1869         Those are "geo, magnet, sip, ssh and xmpp".
1870
1871         http://www.w3.org/html/wg/drafts/html/master/webappapis.html#custom-handlers
1872
1873         Tests: fast/dom/register-protocol-handler.html
1874                fast/dom/unregister-protocol-handler.html
1875
1876         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
1877         (WebCore::initProtocolHandlerWhitelist):
1878
1879 2013-06-28  Sanghyup Lee  <sh53.lee@samsung.com>
1880
1881         Avoid duplicating hostWindow() call in ScrollView.cpp
1882         https://bugs.webkit.org/show_bug.cgi?id=118168
1883
1884         Reviewed by Christophe Dumez.
1885
1886         Remove redundant hostWindow() calls in ScrollView.cpp.
1887
1888         * platform/ScrollView.cpp:
1889         (WebCore::ScrollView::scrollContents):
1890         (WebCore::ScrollView::contentsToScreen):
1891         (WebCore::ScrollView::screenToContents):
1892         (WebCore::ScrollView::repaintContentRectangle):
1893         (WebCore::ScrollView::updateOverhangAreas):
1894         (WebCore::ScrollView::addPanScrollIcon):
1895         (WebCore::ScrollView::removePanScrollIcon):
1896
1897 2013-06-28  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1898
1899         Unreviewed, fix GTK build after r152156.
1900
1901         * GNUmakefile.list.am:
1902
1903 2013-06-28  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1904
1905         Merge SVGLangSpace into SVGElement
1906         https://bugs.webkit.org/show_bug.cgi?id=118170
1907
1908         Reviewed by Kentaro Hara.
1909
1910         Remove SVGLangSpace IDL interface and move its attributes to SVGElement
1911         to match the latest specification and simplify inheritance in SVG:
1912         - https://svgwg.org/svg2-draft/types.html#InterfaceSVGElement
1913
1914         No new tests, no behavior change.
1915
1916         * DerivedSources.make:
1917         * WebCore.xcodeproj/project.pbxproj:
1918         * svg/SVGAElement.h:
1919         * svg/SVGAElement.idl:
1920         * svg/SVGCircleElement.h:
1921         * svg/SVGCircleElement.idl:
1922         * svg/SVGClipPathElement.h:
1923         * svg/SVGClipPathElement.idl:
1924         * svg/SVGDefsElement.h:
1925         * svg/SVGDefsElement.idl:
1926         * svg/SVGDescElement.h:
1927         * svg/SVGDescElement.idl:
1928         * svg/SVGElement.cpp:
1929         (WebCore::SVGElement::parseAttribute):
1930         * svg/SVGElement.h:
1931         * svg/SVGElement.idl:
1932         * svg/SVGEllipseElement.h:
1933         * svg/SVGEllipseElement.idl:
1934         * svg/SVGFEImageElement.h:
1935         * svg/SVGFEImageElement.idl:
1936         * svg/SVGFilterElement.h:
1937         * svg/SVGFilterElement.idl:
1938         * svg/SVGForeignObjectElement.h:
1939         * svg/SVGForeignObjectElement.idl:
1940         * svg/SVGGElement.h:
1941         * svg/SVGGElement.idl:
1942         * svg/SVGImageElement.h:
1943         * svg/SVGImageElement.idl:
1944         * svg/SVGLangSpace.idl: Removed.
1945         * svg/SVGLineElement.h:
1946         * svg/SVGLineElement.idl:
1947         * svg/SVGMarkerElement.h:
1948         * svg/SVGMarkerElement.idl:
1949         * svg/SVGMaskElement.h:
1950         * svg/SVGMaskElement.idl:
1951         * svg/SVGPathElement.h:
1952         * svg/SVGPathElement.idl:
1953         * svg/SVGPatternElement.h:
1954         * svg/SVGPatternElement.idl:
1955         * svg/SVGPolyElement.h:
1956         * svg/SVGPolygonElement.idl:
1957         * svg/SVGPolylineElement.idl:
1958         * svg/SVGRectElement.h:
1959         * svg/SVGRectElement.idl:
1960         * svg/SVGSVGElement.h:
1961         * svg/SVGSVGElement.idl:
1962         * svg/SVGStyleElement.h:
1963         * svg/SVGStyleElement.idl:
1964         * svg/SVGSwitchElement.h:
1965         * svg/SVGSwitchElement.idl:
1966         * svg/SVGSymbolElement.h:
1967         * svg/SVGSymbolElement.idl:
1968         * svg/SVGTextContentElement.h:
1969         * svg/SVGTextContentElement.idl:
1970         * svg/SVGTitleElement.h:
1971         * svg/SVGTitleElement.idl:
1972         * svg/SVGUseElement.h:
1973         * svg/SVGUseElement.idl:
1974
1975 2013-06-28  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1976
1977         Use & instead of | in the value of [CallWith]
1978         https://bugs.webkit.org/show_bug.cgi?id=118054
1979
1980         Reviewed by Kentaro Hara.
1981
1982         [CallWith=ScriptExecutionContext|ScriptState] meant that both the
1983         ScriptExecutionContext AND the ScriptState would be passed as
1984         arguments to the implementation (not one OR the other).
1985
1986         This patch changes the semantics for those IDL extended attributes
1987         to make it less confusing. Proper usage is now:
1988         [CallWith=ScriptExecutionContext&ScriptState]
1989
1990         No new tests, covered by existing bindings tests.
1991
1992         * bindings/scripts/CodeGenerator.pm:
1993         (ExtendedAttributeContains):
1994         * bindings/scripts/test/TestObj.idl:
1995         * page/Console.idl:
1996
1997 2013-06-27  Kangil Han  <kangil.han@samsung.com>
1998
1999         HTMLAudioElement doesn't have to know about isVideo function
2000         https://bugs.webkit.org/show_bug.cgi?id=118116
2001
2002         Reviewed by Eric Carlson.
2003
2004         Minor code cleanup to remove isVideo function from HTMLAudioElement.
2005         We can use default function in HTMLMediaElement as hasVideo does.
2006
2007         * html/HTMLAudioElement.h:
2008         * html/HTMLMediaElement.h:
2009         (WebCore::HTMLMediaElement::isVideo):
2010
2011 2013-06-27  Kangil Han  <kangil.han@samsung.com>
2012
2013         Adopt is/toHTMLInputElement for code cleanup
2014         https://bugs.webkit.org/show_bug.cgi?id=118130
2015
2016         Reviewed by Antti Koivisto.
2017
2018         To enhance readability, this patch adopts is/toHTMLInputElement.
2019         This also helps out to reduce duplicated use of static_cast.
2020
2021         * accessibility/AccessibilityMediaControls.cpp:
2022         (WebCore::AccessibilityMediaTimeline::valueDescription):
2023         * accessibility/AccessibilityNodeObject.cpp:
2024         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2025         (WebCore::AccessibilityNodeObject::isNativeTextControl):
2026         (WebCore::AccessibilityNodeObject::isNativeImage):
2027         (WebCore::AccessibilityNodeObject::isInputImage):
2028         (WebCore::AccessibilityNodeObject::isReadOnly):
2029         (WebCore::AccessibilityNodeObject::valueForRange):
2030         (WebCore::AccessibilityNodeObject::maxValueForRange):
2031         (WebCore::AccessibilityNodeObject::minValueForRange):
2032         (WebCore::AccessibilityNodeObject::actionElement):
2033         (WebCore::AccessibilityNodeObject::titleElementText):
2034         (WebCore::AccessibilityNodeObject::visibleText):
2035         (WebCore::AccessibilityNodeObject::title):
2036         (WebCore::AccessibilityNodeObject::text):
2037         (WebCore::AccessibilityNodeObject::colorValue):
2038         (WebCore::accessibleNameForNode):
2039         * accessibility/AccessibilityRenderObject.cpp:
2040         (WebCore::AccessibilityRenderObject::isFileUploadButton):
2041         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
2042         (WebCore::AccessibilityRenderObject::url):
2043         (WebCore::AccessibilityRenderObject::setValue):
2044         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2045         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
2046         * accessibility/AccessibilitySlider.cpp:
2047         (WebCore::AccessibilitySlider::element):
2048         * accessibility/ios/AccessibilityObjectIOS.mm:
2049         (WebCore::AccessibilityObject::accessibilityPasswordFieldLength):
2050         * bindings/js/JSHTMLInputElementCustom.cpp:
2051         (WebCore::JSHTMLInputElement::selectionStart):
2052         (WebCore::JSHTMLInputElement::setSelectionStart):
2053         (WebCore::JSHTMLInputElement::selectionEnd):
2054         (WebCore::JSHTMLInputElement::setSelectionEnd):
2055         (WebCore::JSHTMLInputElement::selectionDirection):
2056         (WebCore::JSHTMLInputElement::setSelectionDirection):
2057         (WebCore::JSHTMLInputElement::setSelectionRange):
2058         * css/StyleResolver.cpp:
2059         (WebCore::StyleResolver::adjustRenderStyle):
2060         * editing/FrameSelection.cpp:
2061         (WebCore::FrameSelection::isInPasswordField):
2062         * editing/ReplaceSelectionCommand.cpp:
2063         (WebCore::ReplaceSelectionCommand::shouldPerformSmartReplace):
2064         * html/HTMLFormControlElement.cpp:
2065         (WebCore::shouldAutofocus):
2066         * html/HTMLFormElement.cpp:
2067         (WebCore::HTMLFormElement::getTextFieldValues):
2068         * html/HTMLInputElement.h:
2069         (WebCore::isHTMLInputElement):
2070         (WebCore::toHTMLInputElement):
2071         * html/RadioInputType.cpp:
2072         (WebCore::RadioInputType::handleKeydownEvent):
2073         (WebCore::RadioInputType::isKeyboardFocusable):
2074         * html/shadow/MediaControlElementTypes.cpp:
2075         (WebCore::mediaControlElementType):
2076         * html/shadow/TextControlInnerElements.cpp:
2077         (WebCore::SearchFieldResultsButtonElement::defaultEventHandler):
2078         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler):
2079         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
2080         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler):
2081         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
2082         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
2083         (WebCore::InputFieldSpeechButtonElement::startSpeechInput):
2084         * loader/FormSubmission.cpp:
2085         (WebCore::FormSubmission::create):
2086         * page/Chrome.cpp:
2087         (WebCore::Chrome::setToolTip):
2088         * page/EventHandler.cpp:
2089         (WebCore::isSubmitImage):
2090         (WebCore::EventHandler::handleMousePressEvent):
2091         * page/FocusController.cpp:
2092         (WebCore::clearSelectionIfNeeded):
2093         * platform/gtk/PasteboardGtk.cpp:
2094         (WebCore::getURLForImageNode):
2095         * platform/qt/RenderThemeQt.cpp:
2096         (WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
2097         * platform/qt/RenderThemeQtMobile.cpp:
2098         (WebCore::RenderThemeQtMobile::paintSliderTrack):
2099         * rendering/HitTestResult.cpp:
2100         (WebCore::HitTestResult::altDisplayString):
2101         (WebCore::HitTestResult::absoluteImageURL):
2102         (WebCore::HitTestResult::isContentEditable):
2103         * rendering/RenderBlock.cpp:
2104         (WebCore::RenderBlock::hasLineIfEmpty):
2105         * rendering/RenderBox.cpp:
2106         (WebCore::RenderBox::sizesLogicalWidthToFitContent):
2107         * rendering/RenderButton.cpp:
2108         (WebCore::RenderButton::updateFromElement):
2109         (WebCore::RenderButton::canHaveGeneratedChildren):
2110         * rendering/RenderDetailsMarker.cpp:
2111         (WebCore::RenderDetailsMarker::isOpen):
2112         * rendering/RenderFileUploadControl.cpp:
2113         (WebCore::RenderFileUploadControl::updateFromElement):
2114         (WebCore::RenderFileUploadControl::maxFilenameWidth):
2115         (WebCore::RenderFileUploadControl::paintObject):
2116         (WebCore::RenderFileUploadControl::uploadButton):
2117         (WebCore::RenderFileUploadControl::fileTextValue):
2118         * rendering/RenderImage.cpp:
2119         (WebCore::RenderImage::updateAltText):
2120         * testing/Internals.cpp:
2121         (WebCore::Internals::selectColorInColorChooser):
2122
2123 2013-06-27  Antti Koivisto  <antti@apple.com>
2124
2125         Use DeferrableOneShotTimer for deleting decoded data
2126         https://bugs.webkit.org/show_bug.cgi?id=118150
2127
2128         Reviewed by Andreas Kling.
2129
2130         Up to 1% of page load time can be used under CachedScript::script() for restarting
2131         the decoded data deletion timer.
2132         
2133         Using DeferrableOneShotTimer instead of a plain Timer avoids unnecessary low level timer access.
2134
2135         * loader/cache/CachedResource.cpp:
2136         (WebCore::CachedResource::CachedResource):
2137         (WebCore::CachedResource::destroyDecodedDataIfNeeded):
2138         (WebCore::CachedResource::decodedDataDeletionTimerFired):
2139         (WebCore::CachedResource::decodedDataDeletionTimerDelay):
2140
2141             Adopt DeferrableOneShotTimer.
2142
2143         * loader/cache/CachedResource.h:
2144         * loader/cache/CachedScript.cpp:
2145         (WebCore::CachedScript::script):
2146         (WebCore::CachedScript::decodedDataDeletionTimerDelay):
2147         
2148             Keep using zero delay for scripts.
2149
2150         * platform/Timer.h:
2151         (WebCore::DeferrableOneShotTimer::stop):
2152         
2153             Avoid unnecessary restart after stopping and starting again.
2154
2155 2013-06-27  Anders Carlsson  <andersca@apple.com>
2156
2157         Add a new String::charactersWithNullTermination() function that returns a vector
2158         https://bugs.webkit.org/show_bug.cgi?id=118155
2159
2160         Reviewed by Andreas Kling.
2161
2162         Change calls to deprecatedCharactersWithNullTermination() to charactersWithNullTermination().data()
2163
2164         * platform/graphics/win/FontCacheWin.cpp:
2165         (WebCore::getLinkedFonts):
2166         * platform/graphics/win/FontCustomPlatformData.cpp:
2167         (WebCore::FontCustomPlatformData::fontPlatformData):
2168         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
2169         (WebCore::FontCustomPlatformData::fontPlatformData):
2170         * platform/graphics/win/IconWin.cpp:
2171         (WebCore::Icon::createIconForFiles):
2172         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2173         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime):
2174         * platform/graphics/wince/FontPlatformData.cpp:
2175         (WebCore::FontPlatformData::FontPlatformData):
2176         * platform/network/curl/CurlDownload.cpp:
2177         (CurlDownload::moveFileToDestination):
2178         * platform/network/win/CookieJarWin.cpp:
2179         (WebCore::setCookiesFromDOM):
2180         (WebCore::cookiesForDOM):
2181         * platform/network/win/DownloadBundleWin.cpp:
2182         (WebCore::DownloadBundle::appendResumeData):
2183         (WebCore::DownloadBundle::extractResumeData):
2184         * platform/network/win/ResourceHandleWin.cpp:
2185         (WebCore::createInternetHandle):
2186         (WebCore::ResourceHandle::start):
2187         (WebCore::ResourceHandle::fileLoadTimer):
2188         * platform/text/win/LocaleWin.cpp:
2189         (WebCore::LCIDFromLocaleInternal):
2190         * platform/text/win/TextCodecWin.cpp:
2191         (WebCore::TextCodecWin::enumerateSupportedEncodings):
2192         * platform/win/ClipboardUtilitiesWin.cpp:
2193         (WebCore::getWebLocData):
2194         (WebCore::createGlobalData):
2195         (WebCore::setFileDescriptorData):
2196         (WebCore::getURL):
2197         (WebCore::setCFData):
2198         * platform/win/ContextMenuWin.cpp:
2199         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
2200         * platform/win/DragImageWin.cpp:
2201         (WebCore::createDragImageIconForCachedImageFilename):
2202         * platform/win/FileSystemWin.cpp:
2203         (WebCore::getFindData):
2204         (WebCore::deleteFile):
2205         (WebCore::deleteEmptyDirectory):
2206         (WebCore::pathByAppendingComponent):
2207         (WebCore::makeAllDirectories):
2208         (WebCore::pathGetFileName):
2209         (WebCore::openTemporaryFile):
2210         (WebCore::openFile):
2211         * platform/win/MIMETypeRegistryWin.cpp:
2212         (WebCore::mimeTypeForExtension):
2213         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
2214         * platform/win/PasteboardWin.cpp:
2215         (WebCore::createGlobalImageFileDescriptor):
2216         (WebCore::createGlobalHDropContent):
2217         * platform/win/PathWalker.cpp:
2218         (WebCore::PathWalker::PathWalker):
2219         * platform/win/SSLKeyGeneratorWin.cpp:
2220         (WebCore::WebCore::signedPublicKeyAndChallengeString):
2221         * platform/win/SharedBufferWin.cpp:
2222         (WebCore::SharedBuffer::createWithContentsOfFile):
2223         * platform/wince/FileSystemWinCE.cpp:
2224         (WebCore::getFileInfo):
2225         (WebCore::fileExists):
2226         (WebCore::deleteFile):
2227         (WebCore::deleteEmptyDirectory):
2228         (WebCore::makeAllDirectories):
2229         (WebCore::openTemporaryFile):
2230         (WebCore::openFile):
2231         * plugins/win/PluginDatabaseWin.cpp:
2232         (WebCore::PluginDatabase::getPluginPathsInDirectories):
2233         (WebCore::addMozillaPluginDirectories):
2234         (WebCore::addAdobeAcrobatPluginDirectory):
2235         (WebCore::addJavaPluginDirectory):
2236         * plugins/win/PluginPackageWin.cpp:
2237         (WebCore::getVersionInfo):
2238         (WebCore::PluginPackage::fetchInfo):
2239         (WebCore::PluginPackage::load):
2240         * plugins/win/PluginViewWin.cpp:
2241         (WebCore::PluginView::handlePostReadFile):
2242
2243 2013-06-27  Frédéric Wang  <fred.wang@free.fr>
2244
2245         Implement parsing of MathML lengths.
2246         https://bugs.webkit.org/show_bug.cgi?id=118053
2247
2248         Reviewed by Chris Fleizach.
2249
2250         A parsing function for MathML lengths, similar to Gecko's one, is
2251         implemented. It is currently only used to parse mfrac@linethickness but
2252         will be convenient to parse other MathML attributes in the future.
2253
2254         Tests: mathml/presentation/mfrac-linethickness1.html
2255                mathml/presentation/mfrac-linethickness2.html
2256                mathml/presentation/mfrac-linethickness3.html
2257
2258         * rendering/mathml/RenderMathMLBlock.cpp: add parsing functions
2259         (WebCore::parseMathMLLength): parsing MathML Length (number unit)
2260         (WebCore::parseNamedSpace): parsing MathML namedspaces
2261         * rendering/mathml/RenderMathMLBlock.h: declare parsing functions
2262         * rendering/mathml/RenderMathMLFraction.cpp: use the parsing function for linethickness
2263         (WebCore::RenderMathMLFraction::updateFromElement):
2264
2265 2013-06-27  Anders Carlsson  <andersca@apple.com>
2266
2267         Remove call to deprecatedCharactersWithNullTermination() in WebGL code
2268         https://bugs.webkit.org/show_bug.cgi?id=118154
2269
2270         Reviewed by Dean Jackson.
2271
2272         Remove an unneeded call to deprecatedCharactersWithNullTermination(). Ultimately, 
2273         the string we used to call it on gets converted to an UTF-8 CString that has a null character anyway.
2274
2275         * html/canvas/WebGLProgram.cpp:
2276         (WebCore::WebGLProgram::cacheActiveAttribLocations):
2277
2278 2013-06-27  Roger Fong  <roger_fong@apple.com>
2279
2280         Unreviewed. Temporarily add some stderr output to Media Engine load methods to determine which engine buildbots are using for layout tests.
2281
2282         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2283         (WebCore::MediaPlayerPrivateAVFoundation::load):
2284         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
2285         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::load):
2286
2287 2013-06-27  Anders Carlsson  <andersca@apple.com>
2288
2289         Stop using deprecatedCharactersWithNullTermination in SQLite code
2290         https://bugs.webkit.org/show_bug.cgi?id=118146
2291
2292         Reviewed by Filip Pizlo.
2293
2294         Turns out SQLite uses UTF-8 internally so we might just as well use the SQLite functions
2295         that take UTF-8 strings and do the conversion ourselves. This has the added advantage that we can
2296         use String::utf8() which returns a null-terminated string.
2297
2298         Require a version of SQLite newer than 3.6.16 so we can remove two workarounds. 3.6.16 was released
2299         4 years ago so supported port is likely to have it.
2300
2301         * platform/sql/SQLiteFileSystem.cpp:
2302         (WebCore::SQLiteFileSystem::openDatabase):
2303         Use sqlite3_open instead of sqlite3_open16.
2304
2305         * platform/sql/SQLiteFileSystem.h:
2306         Fix parameter name capitalization.
2307
2308         * platform/sql/SQLiteStatement.cpp:
2309         (WebCore::SQLiteStatement::prepare):
2310         Use sqlite3_prepare_v2. Also, pass the length of the string (including the null character), since
2311         that lets SQLite avoid a buffer copy. Remove a workaround for versions of SQLite older than 3.6.16.
2312
2313 2013-06-27  Andrew Lo  <anlo@blackberry.com>
2314
2315         [BlackBerry] Unnecessary root layer commits occur during html5 video playback
2316         https://bugs.webkit.org/show_bug.cgi?id=118147
2317
2318         Reviewed by Rob Buis.
2319         Internally reviewed by Arvid Nilsson, John Griggs.
2320
2321         Only request layer commits when layer properties change in
2322         GraphicsLayerBlackBerry::updateContentsRect and
2323         GraphicsLayerBlackBerry::setContentsToMedia.
2324         JIRA112749.
2325
2326         * platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
2327         (WebCore::GraphicsLayerBlackBerry::setContentsToMedia):
2328         (WebCore::GraphicsLayerBlackBerry::updateContentsRect):
2329
2330 2013-06-27  Bem Jones-Bey  <bjonesbe@adobe.com>
2331
2332         [CSS Shapes] New positioning model: basic support for rectangle shape-outside
2333         https://bugs.webkit.org/show_bug.cgi?id=118080
2334
2335         Reviewed by David Hyatt.
2336
2337         With the latest Editor's Draft of the CSS Shapes specification,
2338         shape-outside no longer affects the positioning of floats. This is the
2339         first step in changing the implementation to reflect this
2340         specification change. The bulk of this change is reverting the code
2341         that was needed to position floats based on the bounding box of the
2342         shape.
2343
2344         Tests: csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-000.html
2345                csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-001.html
2346                csswg/submitted/shapes/shape-outside/shape-outside-floats-horizontal-rectangle-002.html
2347                csswg/submitted/shapes/shape-outside/shape-outside-floats-square-000.html
2348                csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-000.html
2349                csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-001.html
2350                csswg/submitted/shapes/shape-outside/shape-outside-floats-vertical-rectangle-002.html
2351
2352         * rendering/LayoutState.cpp:
2353         (WebCore::LayoutState::LayoutState): Revert changes to support float
2354             positioning from shape-outside.
2355         * rendering/RenderBlock.cpp:
2356         (WebCore::RenderBlock::blockSelectionGaps): Ditto.
2357         (WebCore::RenderBlock::insertFloatingObject): Ditto.
2358         (WebCore::RenderBlock::positionNewFloats): Ditto.
2359         (WebCore::RenderBlock::logicalLeftOffsetForLine): Instead of
2360             converting to shape bounding box coordinates, convert to the
2361             float's margin box coordinates.
2362         (WebCore::RenderBlock::logicalRightOffsetForLine): Ditto.
2363         (WebCore::positionForPointRespectingEditingBoundaries): Revert changes
2364             to support float positioning from shape-outside.
2365         * rendering/RenderBlock.h:
2366         (WebCore::RenderBlock::xPositionForFloatIncludingMargin): Ditto.
2367         (WebCore::RenderBlock::yPositionForFloatIncludingMargin): Ditto.
2368         * rendering/RenderBlockLineLayout.cpp:
2369         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Instead
2370             of converting to shape bounding box coordinates, convert to the
2371             float's margin box coordinates.
2372         * rendering/RenderBox.cpp:
2373         (WebCore::RenderBox::mapLocalToContainer): Revert changes to support
2374             float positioning from shape-outside.
2375         (WebCore::RenderBox::offsetFromContainer): Ditto.
2376         (WebCore::RenderBox::computeRectForRepaint): Ditto.
2377         (WebCore::RenderBox::layoutOverflowRectForPropagation): Ditto.
2378         * rendering/RenderBoxModelObject.cpp: Ditto.
2379         * rendering/RenderBoxModelObject.h: Ditto.
2380         * rendering/RenderInline.cpp:
2381         (WebCore::RenderInline::clippedOverflowRectForRepaint): Ditto.
2382         (WebCore::RenderInline::computeRectForRepaint): Ditto.
2383         (WebCore::RenderInline::mapLocalToContainer): Ditto.
2384         * rendering/RenderLayer.cpp:
2385         (WebCore::RenderLayer::updateLayerPosition): Ditto.
2386         (WebCore::RenderLayer::calculateClipRects): Ditto.
2387         (WebCore::RenderLayer::shouldBeNormalFlowOnly): Ditto.
2388         * rendering/RenderLayer.h:
2389         (WebCore::RenderLayer::offsetForInFlowPosition): Ditto.
2390         * rendering/RenderObject.h: Ditto.
2391         * rendering/shapes/ShapeInfo.h: Make m_renderer protected, since we
2392             now need it in the subclass to compute the segments.
2393         * rendering/shapes/ShapeOutsideInfo.cpp:
2394         (WebCore::ShapeOutsideInfo::computeSegmentsForLine): Update segment
2395             computation to use the float's margin box instead of the shape's
2396             bounding box for computing the deltas.
2397         (WebCore::ShapeOutsideInfo::leftSegmentMarginBoxDelta): This used to
2398             be leftSegmentShapeBoundingBoxDelta, which has been renamed in the
2399             obvious way.
2400         (WebCore::ShapeOutsideInfo::rightSegmentMarginBoxDelta): This used to
2401             be rightSegmentShapeBoundingBoxDelta, which has been renamed in the
2402             obvious way.
2403         * rendering/shapes/ShapeOutsideInfo.h: Revert changes to support float
2404             positioning from shape-outside.
2405         * rendering/style/RenderStyle.h: Ditto.
2406
2407 2013-06-27  Antti Koivisto  <antti@apple.com>
2408
2409         RenderLayerCompositor destructor is fragile
2410         https://bugs.webkit.org/show_bug.cgi?id=118143
2411
2412         Reviewed by Simon Fraser.
2413
2414         With iOS tile cache implementation deleting RenderLayerCompositor may end up starting a deleted timer. 
2415         This corrupts the timer heap and leads to a crash later. This happens because GraphicsLayers destructor 
2416         calls back to the RenderLayerCompositor that is being deleted. This is pretty fragile in general.
2417         
2418         No test as there is no known way to repro this with plain webkit.
2419
2420         * platform/Timer.cpp:
2421         (WebCore::TimerBase::TimerBase):
2422         (WebCore::TimerBase::~TimerBase):
2423         (WebCore::TimerBase::setNextFireTime):
2424         * platform/Timer.h:
2425         
2426             Assert that the timer is alive before starting it. This turns bugs like this into clear crash stacks
2427             instead of hard-to-debug timer heap corruptions.
2428
2429         * rendering/RenderLayerCompositor.cpp:
2430         (WebCore::RenderLayerCompositor::~RenderLayerCompositor):
2431         
2432             Take care to delete owned GraphicsLayers before proceeding with the rest of the destructor.
2433
2434 2013-06-27  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2435
2436         Update SVG interfaces to stop inheriting from SVGURIReference and SVGTests
2437         https://bugs.webkit.org/show_bug.cgi?id=118142
2438
2439         Reviewed by Ryosuke Niwa.
2440
2441         Stop inheriting from SVGURIReference and SVGTests and use IDL implements statements
2442         instead. This is one step towards getting rid of multiple inheritance in SVG (which
2443         is no longer supported by Web IDL) and matching the latest specification:
2444         - https://svgwg.org/svg2-draft/types.html#BasicDOMInterfaces
2445
2446         No new tests, no behavior change.
2447
2448         * CMakeLists.txt:
2449         * DerivedSources.pri:
2450         * GNUmakefile.list.am:
2451         * svg/SVGAElement.idl:
2452         * svg/SVGAltGlyphElement.idl:
2453         * svg/SVGAnimationElement.idl:
2454         * svg/SVGCircleElement.idl:
2455         * svg/SVGClipPathElement.idl:
2456         * svg/SVGCursorElement.idl:
2457         * svg/SVGDefsElement.idl:
2458         * svg/SVGEllipseElement.idl:
2459         * svg/SVGFEImageElement.idl:
2460         * svg/SVGFilterElement.idl:
2461         * svg/SVGForeignObjectElement.idl:
2462         * svg/SVGGElement.idl:
2463         * svg/SVGGlyphRefElement.idl:
2464         * svg/SVGGradientElement.idl:
2465         * svg/SVGImageElement.idl:
2466         * svg/SVGLineElement.idl:
2467         * svg/SVGMPathElement.idl:
2468         * svg/SVGMaskElement.idl:
2469         * svg/SVGPathElement.idl:
2470         * svg/SVGPatternElement.idl:
2471         * svg/SVGPolygonElement.idl:
2472         * svg/SVGPolylineElement.idl:
2473         * svg/SVGRectElement.idl:
2474         * svg/SVGSVGElement.idl:
2475         * svg/SVGScriptElement.idl:
2476         * svg/SVGSwitchElement.idl:
2477         * svg/SVGTRefElement.idl:
2478         * svg/SVGTextContentElement.idl:
2479         * svg/SVGTextPathElement.idl:
2480         * svg/SVGUseElement.idl:
2481
2482 2013-06-27  Ruth Fong  <ruth_fong@apple.com>
2483
2484         Polish context menus for media elements
2485         https://bugs.webkit.org/show_bug.cgi?id=118078
2486         <rdar://problem/14278960>
2487
2488         Reviewed by Eric Carlson.
2489
2490         No new tests: media/context-menu-action.html,
2491         which has been disabled by bug 116651, is used to test context menus.
2492
2493         * English.lproj/Localizable.strings: Changed "Fullscreen" to "Full Screen"
2494         and added strings "Show Controls" and "Hide Controls".
2495
2496         * page/ContextMenuController.cpp: Updated to include a new context menu item 
2497         that toggles betweeen "Show Controls" and "Hide Controls".
2498
2499         * platform/ContextMenuItem.h:
2500
2501         * platform/LocalizedStrings.cpp:
2502         * platform/LocalizedStrings.h:
2503         * platform/efl/LocalizedStringsEfl.cpp:
2504         * platform/gtk/LocalizedStringsGtk.cpp:
2505         * platform/qt/LocalizedStringsQt.cpp:
2506         Added equivalents of localized strings "Show Controls" and "Hide Controls".
2507
2508 2013-06-27  Chris Fleizach  <cfleizach@apple.com>
2509
2510         AX: IOS: crash while navigating with SVG
2511         https://bugs.webkit.org/show_bug.cgi?id=118101
2512
2513         Need to check if the SVG path exists before copying it.
2514
2515         Reviewed by Stephen Chenney.
2516
2517         Test: platform/iphone-simulator/accessibility/svg-path-crash.html
2518
2519         * accessibility/AccessibilityRenderObject.cpp:
2520         (WebCore::AccessibilityRenderObject::elementPath):
2521         * rendering/svg/RenderSVGShape.h:
2522         (WebCore::RenderSVGShape::hasPath):
2523
2524 2013-06-27  Seokju Kwon  <seokju.kwon@gmail.com>
2525
2526         Removing the redundant checks after r152078
2527         https://bugs.webkit.org/show_bug.cgi?id=118117
2528
2529         Reviewed by Simon Fraser.
2530
2531         Avoided redundant checks in RenderLayerCompositor::reasonsForCompositing() after r152078.
2532
2533         No new tests as no functionality change.
2534
2535         * inspector/InspectorLayerTreeAgent.cpp:
2536         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
2537         * rendering/RenderLayerCompositor.cpp:
2538         (WebCore::RenderLayerCompositor::logReasonsForCompositing):
2539
2540 2013-06-27  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2541
2542         Remove [NoInterfaceObject] from WorkerGlobalScope
2543         https://bugs.webkit.org/show_bug.cgi?id=118071
2544
2545         Reviewed by Kentaro Hara.
2546
2547         Expose WorkerGlobalScope interface in worker environment as per the latest
2548         specification:
2549         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#the-workerglobalscope-common-interface
2550
2551         Also expose the SharedWorkerGlobalScope interface when the JavaScript global environment is a
2552         shared worker environment, and the DedicatedWorkerGlobalScope interface when the JavaScript
2553         global environment is a dedicated worker environment:
2554         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#sharedworkerglobalscope
2555         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#dedicatedworkerglobalscope
2556
2557         The semantics of the [GlobalContext] IDL extended attribute has changed to support this
2558         use case. The value for the extended attribute is now the name of the interface to which the
2559         Constructor attribute should be added (Window, WorkerGlobalScope, SharedWorkerGlobalScope...).
2560         It is possible to specify several interface names by using '&' as separator. For e.g.
2561         [GlobalContext=DOMWindow&WorkerGlobalScope].
2562
2563         Tests: fast/js/global-constructors-attributes-dedicated-worker.html
2564                fast/js/global-constructors-attributes-shared-worker.html
2565
2566         * CMakeLists.txt:
2567         * DerivedSources.make:
2568         * DerivedSources.pri:
2569         * GNUmakefile.am:
2570         * Modules/websockets/WebSocket.idl:
2571         * UseJSC.cmake:
2572         * bindings/scripts/CodeGeneratorJS.pm:
2573         (GenerateConstructorHelperMethods):
2574         * bindings/scripts/IDLAttributes.txt:
2575         * bindings/scripts/generate-bindings.pl:
2576         (checkIfIDLAttributesExists):
2577         * bindings/scripts/preprocess-idls.pl:
2578         * dom/MessageChannel.idl:
2579         * dom/MessageEvent.idl:
2580         * fileapi/Blob.idl:
2581         * fileapi/FileReader.idl:
2582         * fileapi/FileReaderSync.idl:
2583         * html/DOMURL.idl:
2584         * html/canvas/ArrayBuffer.idl:
2585         * html/canvas/DataView.idl:
2586         * html/canvas/Float32Array.idl:
2587         * html/canvas/Float64Array.idl:
2588         * html/canvas/Int16Array.idl:
2589         * html/canvas/Int32Array.idl:
2590         * html/canvas/Int8Array.idl:
2591         * html/canvas/Uint16Array.idl:
2592         * html/canvas/Uint32Array.idl:
2593         * html/canvas/Uint8Array.idl:
2594         * html/canvas/Uint8ClampedArray.idl:
2595         * page/EventSource.idl:
2596         * workers/DedicatedWorkerGlobalScope.idl:
2597         * workers/SharedWorkerGlobalScope.idl:
2598         * workers/WorkerGlobalScope.idl:
2599         * workers/WorkerLocation.idl:
2600         * xml/XMLHttpRequest.idl:
2601
2602 2013-06-27  Commit Queue  <commit-queue@webkit.org>
2603
2604         Unreviewed, rolling out r152074.
2605         http://trac.webkit.org/changeset/152074
2606         https://bugs.webkit.org/show_bug.cgi?id=118137
2607
2608         It caused lots of layout and API test crash on Qt Wk2.
2609         (Requested by kadam on #webkit).
2610
2611         * CMakeLists.txt:
2612         * Target.pri:
2613         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Removed.
2614         * platform/graphics/texmap/coordinated/CompositingCoordinator.h: Removed.
2615
2616 2013-06-27  Seokju Kwon  <seokju.kwon@gmail.com>
2617
2618         Avoid duplicating hostWindow() call in FrameView::setFrameRect()
2619         https://bugs.webkit.org/show_bug.cgi?id=118115
2620
2621         Reviewed by Christophe Dumez.
2622
2623         Remove a redundant call in FrameView::setFrameRect().
2624
2625         No function change, no tests.
2626
2627         * page/FrameView.cpp:
2628         (WebCore::FrameView::scheduleAnimation):
2629
2630 2013-06-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2631
2632         Fixing some compiler warnings
2633         https://bugs.webkit.org/show_bug.cgi?id=117791
2634
2635         Reviewed by Martin Robinson.
2636
2637         No new tests needed.
2638
2639         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2640         (webkitAccessibleTextGetTextForOffset): Fixed warning about
2641         uninitialized variable.
2642
2643 2013-06-27  Iago Toral Quiroga  <itoral@igalia.com>
2644
2645         Use consistent file names for WidgetBackingStoreGtkX11 class
2646         https://bugs.webkit.org/show_bug.cgi?id=118124
2647
2648         Reviewed by Carlos Garcia Campos.
2649
2650         * GNUmakefile.list.am:
2651         * PlatformGTK.cmake:
2652         * platform/gtk/GtkWidgetBackingStoreX11.cpp: Removed.
2653         * platform/gtk/GtkWidgetBackingStoreX11.h: Removed.
2654         * platform/gtk/WidgetBackingStoreGtkX11.cpp: Added.
2655         (WebCore::WidgetBackingStoreGtkX11::create):
2656         (WebCore::WidgetBackingStoreGtkX11::WidgetBackingStoreGtkX11):
2657         (WebCore::WidgetBackingStoreGtkX11::~WidgetBackingStoreGtkX11):
2658         (WebCore::WidgetBackingStoreGtkX11::cairoSurface):
2659         (WebCore::WidgetBackingStoreGtkX11::scroll):
2660         * platform/gtk/WidgetBackingStoreGtkX11.h: Added.
2661
2662 2013-06-27  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
2663
2664         Buildfix for !ENABLE(SVG) builds.
2665
2666         Reviewed by Csaba Osztrogonác.
2667
2668         Moving RenderObject::hasAspectRatio() outside from ENABLE(SVG) guard.
2669
2670         * rendering/RenderObject.h:
2671         (WebCore::RenderObject::hasAspectRatio):
2672
2673 2013-06-27  Kangil Han  <kangil.han@samsung.com>
2674
2675         Adopt is/toHTMLLabelElement for code cleanup
2676         https://bugs.webkit.org/show_bug.cgi?id=118113
2677
2678         Reviewed by Andreas Kling.
2679
2680         To enhance readability, this patch adopts is/toHTMLLabelElement.
2681         This also helps out to reduce duplicated use of static_cast.
2682
2683         * accessibility/AXObjectCache.cpp:
2684         (WebCore::AXObjectCache::handleAttributeChanged):
2685         (WebCore::AXObjectCache::labelChanged):
2686         * accessibility/AccessibilityNodeObject.cpp:
2687         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2688         (WebCore::AccessibilityNodeObject::labelForElement):
2689         * accessibility/AccessibilityRenderObject.cpp:
2690         (WebCore::AccessibilityRenderObject::labelElementContainer):
2691         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2692         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2693         * dom/DocumentOrderedMap.cpp:
2694         (WebCore::keyMatchesLabelForAttribute):
2695         * dom/Element.cpp:
2696         (WebCore::Element::updateLabel):
2697         * dom/TreeScope.cpp:
2698         (WebCore::TreeScope::labelElementForId):
2699         * html/HTMLLabelElement.h:
2700         (WebCore::isHTMLLabelElement):
2701         (WebCore::toHTMLLabelElement):
2702         * html/LabelsNodeList.cpp:
2703         (WebCore::LabelsNodeList::nodeMatches):
2704
2705 2013-06-27  Peter Gal  <galpeter@inf.u-szeged.hu>
2706
2707         [curl] Fix unused variable/parameter warnings
2708         https://bugs.webkit.org/show_bug.cgi?id=118050
2709
2710         Reviewed by Christophe Dumez.
2711
2712         Commented out unused parameters and removed an unused variable in the curl backend.
2713
2714         No tests required.
2715
2716         * platform/network/curl/CredentialStorageCurl.cpp:
2717         (WebCore::CredentialStorage::getFromPersistentStorage):
2718         * platform/network/curl/DNSCurl.cpp:
2719         (WebCore::prefetchDNS):
2720         * platform/network/curl/ResourceHandleManager.cpp:
2721         (WebCore::curl_lock_callback):
2722         (WebCore::curl_unlock_callback):
2723         (WebCore::headerCallback):
2724         (WebCore::ResourceHandleManager::downloadTimerCallback):
2725
2726 2013-06-27  Csaba Osztrogonác  <ossy@webkit.org>
2727
2728         Fix cast-align warnings in WebCore/platform/graphics/cairo
2729         https://bugs.webkit.org/show_bug.cgi?id=117990
2730
2731         Reviewed by Rob Buis.
2732
2733         * platform/graphics/cairo/BitmapImageCairo.cpp:
2734         (WebCore::BitmapImage::checkForSolidColor):
2735         * platform/graphics/cairo/ImageBufferCairo.cpp:
2736         (WebCore::ImageBuffer::platformTransformColorSpace):
2737         (WebCore::getImageData):
2738         (WebCore::ImageBuffer::putByteArray):
2739
2740 2013-06-27  Szabolcs Dávid  <davidsz@inf.u-szeged.hu>
2741
2742         [curl] Add "set-cookie" to appendable headers
2743         https://bugs.webkit.org/show_bug.cgi?id=118061
2744
2745         Reviewed by Christophe Dumez.
2746
2747         Mark set-cookie as an appendable header.
2748
2749         * platform/network/curl/ResourceHandleManager.cpp:
2750         (WebCore::isAppendableHeader):
2751
2752 2013-06-27  Horia Iosif Olaru  <olaru@adobe.com>
2753
2754         Remove ENABLE_CSS_COMPOSITING guards around -webkit-background-blend mode related code. The same flag guards -webkit-blend-mode code, but those guards are not touched by this change.
2755
2756         https://bugs.webkit.org/show_bug.cgi?id=117619
2757
2758         Reviewed by Dean Jackson.
2759
2760         Test: css3/compositing/effect-background-blend-mode-tiled.html
2761
2762         * WebCore.exp.in:
2763         * bindings/generic/RuntimeEnabledFeatures.h:
2764         * css/CSSComputedStyleDeclaration.cpp:
2765         (WebCore::ComputedStyleExtractor::propertyValue):
2766         * css/CSSParser.cpp:
2767         (WebCore::CSSParser::parseValue):
2768         (WebCore::CSSParser::parseFillProperty):
2769         * css/CSSProperty.cpp:
2770         (WebCore::CSSProperty::isInheritedProperty):
2771         * css/CSSPropertyNames.in:
2772         * css/DeprecatedStyleBuilder.cpp:
2773         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2774
2775 2013-06-26  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2776
2777         Rename WorkerContext to WorkerGlobalScope
2778         https://bugs.webkit.org/show_bug.cgi?id=118059
2779
2780         Reviewed by Kentaro Hara.
2781
2782         Rename WorkerContext / SharedWorkerContext / DedicatedWorkerContext to
2783         WorkerGlobalScope / SharedWorkerGlobalScope / DedicatedWorkerGlobalScope
2784         to match the latest specification:
2785         http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html#workerglobalscope
2786
2787         Those interfaces have [NoInterfaceObject] IDL extended attribute so the
2788         name did not matter much so far. However, the specification was updated
2789         and [NoInterfaceObject] was removed. We should therefore rename those
2790         interfaces as a preparation for this change.
2791
2792         No new tests, no behavior change as these interfaces are not exposed to
2793         JavaScript yet.
2794
2795         * CMakeLists.txt:
2796         * DerivedSources.cpp:
2797         * DerivedSources.make:
2798         * DerivedSources.pri:
2799         * GNUmakefile.am:
2800         * GNUmakefile.list.am:
2801         * Modules/filesystem/WorkerGlobalScopeFileSystem.cpp: Renamed from Source/WebCore/Modules/filesystem/WorkerContextFileSystem.cpp.
2802         (WebCore::WorkerGlobalScopeFileSystem::webkitRequestFileSystem):
2803         (WebCore::WorkerGlobalScopeFileSystem::webkitRequestFileSystemSync):
2804         (WebCore::WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemURL):
2805         (WebCore::WorkerGlobalScopeFileSystem::webkitResolveLocalFileSystemSyncURL):
2806         * Modules/filesystem/WorkerGlobalScopeFileSystem.h: Renamed from Source/WebCore/Modules/filesystem/WorkerContextFileSystem.h.
2807         * Modules/filesystem/WorkerGlobalScopeFileSystem.idl: Renamed from Source/WebCore/Modules/filesystem/WorkerContextFileSystem.idl.
2808         * Modules/indexeddb/IDBFactory.cpp:
2809         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp: Renamed from Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.cpp.
2810         (WebCore::WorkerGlobalScopeIndexedDatabase::WorkerGlobalScopeIndexedDatabase):
2811         (WebCore::WorkerGlobalScopeIndexedDatabase::~WorkerGlobalScopeIndexedDatabase):
2812         (WebCore::WorkerGlobalScopeIndexedDatabase::supplementName):
2813         (WebCore::WorkerGlobalScopeIndexedDatabase::from):
2814         (WebCore::WorkerGlobalScopeIndexedDatabase::indexedDB):
2815         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.h: Renamed from Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.h.
2816         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.idl: Renamed from Source/WebCore/Modules/indexeddb/WorkerContextIndexedDatabase.idl.
2817         * Modules/notifications/Notification.cpp:
2818         * Modules/notifications/NotificationCenter.cpp:
2819         * Modules/notifications/WorkerGlobalScopeNotifications.cpp: Renamed from Source/WebCore/Modules/notifications/WorkerContextNotifications.cpp.
2820         (WebCore::WorkerGlobalScopeNotifications::WorkerGlobalScopeNotifications):
2821         (WebCore::WorkerGlobalScopeNotifications::~WorkerGlobalScopeNotifications):
2822         (WebCore::WorkerGlobalScopeNotifications::supplementName):
2823         (WebCore::WorkerGlobalScopeNotifications::from):
2824         (WebCore::WorkerGlobalScopeNotifications::webkitNotifications):
2825         * Modules/notifications/WorkerGlobalScopeNotifications.h: Renamed from Source/WebCore/Modules/notifications/WorkerContextNotifications.h.
2826         * Modules/notifications/WorkerGlobalScopeNotifications.idl: Renamed from Source/WebCore/Modules/notifications/WorkerContextNotifications.idl.
2827         * Modules/webdatabase/DatabaseContext.cpp:
2828         (WebCore::DatabaseContext::allowDatabaseAccess):
2829         (WebCore::DatabaseContext::databaseExceededQuota):
2830         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.cpp: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.cpp.
2831         (WebCore::WorkerGlobalScopeWebDatabase::openDatabase):
2832         (WebCore::WorkerGlobalScopeWebDatabase::openDatabaseSync):
2833         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.h: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.h.
2834         (WebCore::WorkerGlobalScopeWebDatabase::WorkerGlobalScopeWebDatabase):
2835         (WebCore::WorkerGlobalScopeWebDatabase::~WorkerGlobalScopeWebDatabase):
2836         * Modules/webdatabase/WorkerGlobalScopeWebDatabase.idl: Renamed from Source/WebCore/Modules/webdatabase/WorkerContextWebDatabase.idl.
2837         * Modules/websockets/ThreadableWebSocketChannel.cpp:
2838         (WebCore::ThreadableWebSocketChannel::create):
2839         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
2840         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasksCallback):
2841         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2842         (WebCore::WorkerThreadableWebSocketChannel::WorkerThreadableWebSocketChannel):
2843         (WebCore::workerGlobalScopeDidSend):
2844         (WebCore::WorkerThreadableWebSocketChannel::Peer::send):
2845         (WebCore::workerGlobalScopeDidGetBufferedAmount):
2846         (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount):
2847         (WebCore::workerGlobalScopeDidConnect):
2848         (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect):
2849         (WebCore::workerGlobalScopeDidReceiveMessage):
2850         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage):
2851         (WebCore::workerGlobalScopeDidReceiveBinaryData):
2852         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
2853         (WebCore::workerGlobalScopeDidUpdateBufferedAmount):
2854         (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount):
2855         (WebCore::workerGlobalScopeDidStartClosingHandshake):
2856         (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake):
2857         (WebCore::workerGlobalScopeDidClose):
2858         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
2859         (WebCore::workerGlobalScopeDidReceiveMessageError):
2860         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError):
2861         (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
2862         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::create):
2863         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::~WorkerGlobalScopeDidInitializeTask):
2864         (WebCore::WorkerThreadableWebSocketChannel::WorkerGlobalScopeDidInitializeTask::WorkerGlobalScopeDidInitializeTask):
2865         (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
2866         (WebCore::WorkerThreadableWebSocketChannel::Bridge::disconnect):
2867         (WebCore::WorkerThreadableWebSocketChannel::Bridge::waitForMethodCompletion):
2868         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
2869         (WebCore::WorkerThreadableWebSocketChannel::create):
2870         (WebCore::WorkerThreadableWebSocketChannel::Bridge::create):
2871         * Target.pri:
2872         * UseJSC.cmake:
2873         * WebCore.order:
2874         * WebCore.vcxproj/WebCore.vcxproj:
2875         * WebCore.vcxproj/WebCore.vcxproj.filters:
2876         * WebCore.xcodeproj/project.pbxproj:
2877         * bindings/cpp/WebDOMEventTarget.cpp:
2878         (toWebKit):
2879         * bindings/cpp/WebDOMEventTarget.h:
2880         * bindings/generic/ActiveDOMCallback.cpp:
2881         * bindings/js/DOMRequestState.h:
2882         (WebCore::DOMRequestState::DOMRequestState):
2883         * bindings/js/JSBindingsAllInOne.cpp:
2884         * bindings/js/JSDOMBinding.h:
2885         * bindings/js/JSDOMGlobalObject.cpp:
2886         (WebCore::JSDOMGlobalObject::scriptExecutionContext):
2887         (WebCore::toJSDOMGlobalObject):
2888         * bindings/js/JSDedicatedWorkerGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSDedicatedWorkerContextCustom.cpp.
2889         (WebCore::JSDedicatedWorkerGlobalScope::postMessage):
2890         * bindings/js/JSEventListener.cpp:
2891         (WebCore::JSEventListener::handleEvent):
2892         * bindings/js/JSEventTargetCustom.cpp:
2893         (WebCore::toJS):
2894         * bindings/js/JSWorkerGlobalScopeBase.cpp: Renamed from Source/WebCore/bindings/js/JSWorkerContextBase.cpp.
2895         (WebCore::JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase):
2896         (WebCore::JSWorkerGlobalScopeBase::finishCreation):
2897         (WebCore::JSWorkerGlobalScopeBase::destroy):
2898         (WebCore::JSWorkerGlobalScopeBase::scriptExecutionContext):
2899         (WebCore::toJS):
2900         (WebCore::toJSDedicatedWorkerGlobalScope):
2901         (WebCore::toJSSharedWorkerGlobalScope):
2902         (WebCore::toJSWorkerGlobalScope):
2903         * bindings/js/JSWorkerGlobalScopeBase.h: Renamed from Source/WebCore/bindings/js/JSWorkerContextBase.h.
2904         (WebCore::JSWorkerGlobalScopeBase::impl):
2905         (WebCore::JSWorkerGlobalScopeBase::createStructure):
2906         * bindings/js/JSWorkerGlobalScopeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSWorkerContextCustom.cpp.
2907         (WebCore::JSWorkerGlobalScope::visitChildren):
2908         (WebCore::JSWorkerGlobalScope::getOwnPropertySlotDelegate):
2909         (WebCore::JSWorkerGlobalScope::getOwnPropertyDescriptorDelegate):
2910         (WebCore::JSWorkerGlobalScope::importScripts):
2911         (WebCore::JSWorkerGlobalScope::setTimeout):
2912         (WebCore::JSWorkerGlobalScope::setInterval):
2913         * bindings/js/ScheduledAction.cpp:
2914         (WebCore::ScheduledAction::execute):
2915         * bindings/js/ScheduledAction.h:
2916         * bindings/js/ScriptProfiler.cpp:
2917         (WebCore::ScriptProfiler::startForWorkerGlobalScope):
2918         (WebCore::ScriptProfiler::stopForWorkerGlobalScope):
2919         * bindings/js/ScriptProfiler.h:
2920         * bindings/js/ScriptState.cpp:
2921         (WebCore::scriptStateFromWorkerGlobalScope):
2922         * bindings/js/ScriptState.h:
2923         * bindings/js/WorkerScriptController.cpp:
2924         (WebCore::WorkerScriptController::WorkerScriptController):
2925         (WebCore::WorkerScriptController::~WorkerScriptController):
2926         (WebCore::WorkerScriptController::initScript):
2927         (WebCore::WorkerScriptController::evaluate):
2928         (WebCore::WorkerScriptController::setException):
2929         (WebCore::WorkerScriptController::forbidExecution):
2930         (WebCore::WorkerScriptController::isExecutionForbidden):
2931         (WebCore::WorkerScriptController::disableEval):
2932         (WebCore::WorkerScriptController::attachDebugger):
2933         (WebCore::WorkerScriptController::detachDebugger):
2934         * bindings/js/WorkerScriptController.h:
2935         (WebCore::WorkerScriptController::workerGlobalScopeWrapper):
2936         (WebCore::WorkerScriptController::initScriptIfNeeded):
2937         * bindings/js/WorkerScriptDebugServer.cpp:
2938         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
2939         (WebCore::WorkerScriptDebugServer::addListener):
2940         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
2941         (WebCore::WorkerScriptDebugServer::removeListener):
2942         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
2943         * bindings/js/WorkerScriptDebugServer.h:
2944         * bindings/scripts/CodeGeneratorJS.pm:
2945         (GenerateHeader):
2946         (GenerateImplementation):
2947         * bindings/scripts/IDLAttributes.txt:
2948         * bindings/scripts/preprocess-idls.pl:
2949         * dom/ActiveDOMObject.cpp:
2950         * dom/EventTarget.h:
2951         * dom/EventTargetFactory.in:
2952         * dom/MessagePort.cpp:
2953         (WebCore::MessagePort::dispatchMessages):
2954         * dom/ScriptExecutionContext.cpp:
2955         (WebCore::ScriptExecutionContext::createdMessagePort):
2956         (WebCore::ScriptExecutionContext::destroyedMessagePort):
2957         (WebCore::ScriptExecutionContext::vm):
2958         * dom/ScriptExecutionContext.h:
2959         (WebCore::ScriptExecutionContext::isWorkerGlobalScope):
2960         * inspector/InjectedScriptManager.cpp:
2961         (WebCore::InjectedScriptManager::createForWorker):
2962         (WebCore::InjectedScriptManager::canAccessInspectedWorkerGlobalScope):
2963         * inspector/InjectedScriptManager.h:
2964         * inspector/InspectorConsoleInstrumentation.h:
2965         (WebCore::InspectorInstrumentation::addMessageToConsole):
2966         * inspector/InspectorInstrumentation.cpp:
2967         (WebCore::InspectorInstrumentation::didStartWorkerGlobalScopeImpl):
2968         (WebCore::InspectorInstrumentation::willEvaluateWorkerScript):
2969         (WebCore::InspectorInstrumentation::workerGlobalScopeTerminatedImpl):
2970         (WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
2971         (WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext):
2972         * inspector/InspectorInstrumentation.h:
2973         (WebCore::InspectorInstrumentation::didStartWorkerGlobalScope):
2974         (WebCore::InspectorInstrumentation::workerGlobalScopeTerminated):
2975         * inspector/InspectorProfilerAgent.cpp:
2976         (WebCore::WorkerProfilerAgent::WorkerProfilerAgent):
2977         (WebCore::WorkerProfilerAgent::startProfiling):
2978         (WebCore::WorkerProfilerAgent::stopProfiling):
2979         (WebCore::InspectorProfilerAgent::create):
2980         * inspector/InspectorProfilerAgent.h:
2981         * inspector/InspectorRuntimeAgent.h:
2982         * inspector/InspectorWorkerAgent.cpp:
2983         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::WorkerFrontendChannel):
2984         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::~WorkerFrontendChannel):
2985         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::proxy):
2986         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::connectToWorkerGlobalScope):
2987         (WebCore::InspectorWorkerAgent::WorkerFrontendChannel::disconnectFromWorkerGlobalScope):
2988         (WebCore::InspectorWorkerAgent::connectToWorker):
2989         (WebCore::InspectorWorkerAgent::disconnectFromWorker):
2990         (WebCore::InspectorWorkerAgent::didStartWorkerGlobalScope):
2991         (WebCore::InspectorWorkerAgent::workerGlobalScopeTerminated):
2992         (WebCore::InspectorWorkerAgent::destroyWorkerFrontendChannels):
2993         (WebCore::InspectorWorkerAgent::createWorkerFrontendChannel):
2994         * inspector/InspectorWorkerAgent.h:
2995         * inspector/InstrumentingAgents.cpp:
2996         (WebCore::instrumentationForWorkerGlobalScope):
2997         * inspector/InstrumentingAgents.h:
2998         * inspector/WorkerDebuggerAgent.cpp:
2999         (WebCore::WorkerDebuggerAgent::create):
3000         (WebCore::WorkerDebuggerAgent::WorkerDebuggerAgent):
3001         (WebCore::WorkerDebuggerAgent::~WorkerDebuggerAgent):
3002         (WebCore::WorkerDebuggerAgent::interruptAndDispatchInspectorCommands):
3003         (WebCore::WorkerDebuggerAgent::injectedScriptForEval):
3004         * inspector/WorkerDebuggerAgent.h:
3005         * inspector/WorkerInspectorController.cpp:
3006         (WebCore::WorkerInspectorController::WorkerInspectorController):
3007         (WebCore::WorkerInspectorController::connectFrontend):
3008         * inspector/WorkerInspectorController.h:
3009         * inspector/WorkerRuntimeAgent.cpp:
3010         (WebCore::WorkerRuntimeAgent::WorkerRuntimeAgent):
3011         (WebCore::WorkerRuntimeAgent::injectedScriptForEval):
3012         (WebCore::WorkerRuntimeAgent::pauseWorkerGlobalScope):
3013         * inspector/WorkerRuntimeAgent.h:
3014         (WebCore::WorkerRuntimeAgent::create):
3015         * loader/ThreadableLoader.cpp:
3016         (WebCore::ThreadableLoader::create):
3017         (WebCore::ThreadableLoader::loadResourceSynchronously):
3018         * loader/WorkerThreadableLoader.cpp:
3019         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
3020         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
3021         (WebCore::workerGlobalScopeDidSendData):
3022         (WebCore::WorkerThreadableLoader::MainThreadBridge::didSendData):
3023         (WebCore::workerGlobalScopeDidReceiveResponse):
3024         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveResponse):
3025         (WebCore::workerGlobalScopeDidReceiveData):
3026         (WebCore::WorkerThreadableLoader::MainThreadBridge::didReceiveData):
3027         (WebCore::workerGlobalScopeDidFinishLoading):
3028         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFinishLoading):
3029         (WebCore::workerGlobalScopeDidFail):
3030         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
3031         (WebCore::workerGlobalScopeDidFailAccessControlCheck):
3032         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck):
3033         (WebCore::workerGlobalScopeDidFailRedirectCheck):
3034         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailRedirectCheck):
3035         * loader/WorkerThreadableLoader.h:
3036         (WebCore::WorkerThreadableLoader::create):
3037         * loader/cache/MemoryCache.cpp:
3038         (WebCore::MemoryCache::removeRequestFromCache):
3039         * platform/blackberry/LocalFileSystemBlackBerry.cpp:
3040         (WebCore::openFileSystem):
3041         (WebCore::LocalFileSystem::deleteFileSystem):
3042         * platform/blackberry/WorkerAsyncFileSystemBlackBerry.cpp:
3043         (WebCore::WorkerAsyncFileSystemBlackBerry::WorkerAsyncFileSystemBlackBerry):
3044         (WebCore::WorkerAsyncFileSystemBlackBerry::openFileSystem):
3045         (WebCore::WorkerAsyncFileSystemBlackBerry::deleteFileSystem):
3046         * platform/blackberry/WorkerAsyncFileSystemBlackBerry.h:
3047         (WebCore::WorkerAsyncFileSystemBlackBerry::create):
3048         * platform/blackberry/WorkerAsyncFileWriterBlackBerry.h:
3049         * platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.cpp:
3050         (WebCore::WorkerPlatformAsyncFileSystemCallbacks::postTaskToWorkerThread):
3051         * platform/blackberry/WorkerPlatformAsyncFileSystemCallbacks.h:
3052         * platform/blackberry/WorkerPlatformFileWriterClient.cpp:
3053         (WebCore::WorkerPlatformFileWriterClient::postTaskToWorkerThreadIfNeeded):
3054         * platform/blackberry/WorkerPlatformFileWriterClient.h:
3055         * workers/DedicatedWorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/DedicatedWorkerContext.cpp.
3056         (WebCore::DedicatedWorkerGlobalScope::create):
3057         (WebCore::DedicatedWorkerGlobalScope::DedicatedWorkerGlobalScope):
3058         (WebCore::DedicatedWorkerGlobalScope::~DedicatedWorkerGlobalScope):
3059         (WebCore::DedicatedWorkerGlobalScope::interfaceName):
3060         (WebCore::DedicatedWorkerGlobalScope::postMessage):
3061         (WebCore::DedicatedWorkerGlobalScope::importScripts):
3062         (WebCore::DedicatedWorkerGlobalScope::thread):
3063         * workers/DedicatedWorkerGlobalScope.h: Renamed from Source/WebCore/workers/DedicatedWorkerContext.h.
3064         * workers/DedicatedWorkerGlobalScope.idl: Renamed from Source/WebCore/workers/DedicatedWorkerContext.idl.
3065         * workers/DedicatedWorkerThread.cpp:
3066         (WebCore::DedicatedWorkerThread::createWorkerGlobalScope):
3067         (WebCore::DedicatedWorkerThread::runEventLoop):
3068         * workers/DedicatedWorkerThread.h:
3069         * workers/DefaultSharedWorkerRepository.cpp:
3070         (WebCore::SharedWorkerProxy::postTaskForModeToWorkerGlobalScope):
3071         (WebCore::SharedWorkerProxy::workerGlobalScopeClosed):
3072         (WebCore::SharedWorkerProxy::workerGlobalScopeDestroyed):
3073         (WebCore::SharedWorkerConnectTask::performTask):
3074         (WebCore::SharedWorkerScriptLoader::notifyFinished):
3075         (WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
3076         * workers/SharedWorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/SharedWorkerContext.cpp.
3077         (WebCore::createConnectEvent):
3078         (WebCore::SharedWorkerGlobalScope::create):
3079         (WebCore::SharedWorkerGlobalScope::SharedWorkerGlobalScope):
3080         (WebCore::SharedWorkerGlobalScope::~SharedWorkerGlobalScope):
3081         (WebCore::SharedWorkerGlobalScope::interfaceName):
3082         (WebCore::SharedWorkerGlobalScope::thread):
3083         (WebCore::SharedWorkerGlobalScope::logExceptionToConsole):
3084         * workers/SharedWorkerGlobalScope.h: Renamed from Source/WebCore/workers/SharedWorkerContext.h.
3085         (WebCore::SharedWorkerGlobalScope::name):
3086         * workers/SharedWorkerGlobalScope.idl: Renamed from Source/WebCore/workers/SharedWorkerContext.idl.
3087         * workers/SharedWorkerThread.cpp:
3088         (WebCore::SharedWorkerThread::createWorkerGlobalScope):
3089         * workers/SharedWorkerThread.h:
3090         * workers/Worker.cpp:
3091         (WebCore::Worker::Worker):
3092         (WebCore::Worker::postMessage):
3093         (WebCore::Worker::terminate):
3094         (WebCore::Worker::notifyFinished):
3095         * workers/Worker.h:
3096         * workers/WorkerGlobalScope.cpp: Renamed from Source/WebCore/workers/WorkerContext.cpp.
3097         (WebCore::CloseWorkerGlobalScopeTask::create):
3098         (WebCore::CloseWorkerGlobalScopeTask::performTask):
3099         (WebCore::CloseWorkerGlobalScopeTask::isCleanupTask):
3100         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
3101         (WebCore::WorkerGlobalScope::~WorkerGlobalScope):
3102         (WebCore::WorkerGlobalScope::applyContentSecurityPolicyFromString):
3103         (WebCore::WorkerGlobalScope::scriptExecutionContext):
3104         (WebCore::WorkerGlobalScope::virtualURL):
3105         (WebCore::WorkerGlobalScope::virtualCompleteURL):
3106         (WebCore::WorkerGlobalScope::completeURL):
3107         (WebCore::WorkerGlobalScope::userAgent):
3108         (WebCore::WorkerGlobalScope::disableEval):
3109         (WebCore::WorkerGlobalScope::location):
3110         (WebCore::WorkerGlobalScope::close):
3111         (WebCore::WorkerGlobalScope::navigator):
3112         (WebCore::WorkerGlobalScope::hasPendingActivity):
3113         (WebCore::WorkerGlobalScope::postTask):
3114         (WebCore::WorkerGlobalScope::setTimeout):
3115         (WebCore::WorkerGlobalScope::clearTimeout):
3116         (WebCore::WorkerGlobalScope::clearInspector):
3117         (WebCore::WorkerGlobalScope::setInterval):
3118         (WebCore::WorkerGlobalScope::clearInterval):
3119         (WebCore::WorkerGlobalScope::importScripts):
3120         (WebCore::WorkerGlobalScope::errorEventTarget):
3121         (WebCore::WorkerGlobalScope::logExceptionToConsole):
3122         (WebCore::WorkerGlobalScope::addConsoleMessage):
3123         (WebCore::WorkerGlobalScope::addMessage):
3124         (WebCore::WorkerGlobalScope::addMessageToWorkerConsole):
3125         (WebCore::WorkerGlobalScope::isContextThread):
3126         (WebCore::WorkerGlobalScope::isJSExecutionForbidden):
3127         (WebCore::WorkerGlobalScope::eventTargetData):
3128         (WebCore::WorkerGlobalScope::ensureEventTargetData):
3129         (WebCore::WorkerGlobalScope::Observer::Observer):
3130         (WebCore::WorkerGlobalScope::Observer::~Observer):
3131         (WebCore::WorkerGlobalScope::Observer::stopObserving):
3132         (WebCore::WorkerGlobalScope::registerObserver):
3133         (WebCore::WorkerGlobalScope::unregisterObserver):
3134         (WebCore::WorkerGlobalScope::notifyObserversOfStop):
3135         (WebCore::WorkerGlobalScope::eventQueue):
3136         * workers/WorkerGlobalScope.h: Renamed from Source/WebCore/workers/WorkerContext.h.
3137         (WebCore::WorkerGlobalScope::isSharedWorkerGlobalScope):
3138         (WebCore::WorkerGlobalScope::isDedicatedWorkerGlobalScope):
3139         (WebCore::WorkerGlobalScope::url):
3140         (WebCore::WorkerGlobalScope::groupSettings):
3141         (WebCore::WorkerGlobalScope::script):
3142         (WebCore::WorkerGlobalScope::clearScript):
3143         (WebCore::WorkerGlobalScope::thread):
3144         (WebCore::WorkerGlobalScope::self):
3145         (WebCore::WorkerGlobalScope::workerInspectorController):
3146         (WebCore::WorkerGlobalScope::optionalNavigator):
3147         (WebCore::WorkerGlobalScope::optionalLocation):
3148         (WebCore::WorkerGlobalScope::isClosing):
3149         * workers/WorkerGlobalScope.idl: Renamed from Source/WebCore/workers/WorkerContext.idl.
3150         * workers/WorkerGlobalScopeProxy.h: Renamed from Source/WebCore/workers/WorkerContextProxy.h.
3151         (WebCore::WorkerGlobalScopeProxy::~WorkerGlobalScopeProxy):
3152         (WebCore::WorkerGlobalScopeProxy::PageInspector::~PageInspector):
3153         (WebCore::WorkerGlobalScopeProxy::connectToInspector):
3154         (WebCore::WorkerGlobalScopeProxy::disconnectFromInspector):
3155         (WebCore::WorkerGlobalScopeProxy::sendMessageToInspector):
3156         * workers/WorkerLoaderProxy.h:
3157         * workers/WorkerMessagingProxy.cpp:
3158         (WebCore::MessageWorkerGlobalScopeTask::create):
3159         (WebCore::MessageWorkerGlobalScopeTask::MessageWorkerGlobalScopeTask):
3160         (WebCore::MessageWorkerGlobalScopeTask::performTask):
3161         (WebCore::WorkerGlobalScopeDestroyedTask::create):
3162         (WebCore::WorkerGlobalScopeDestroyedTask::WorkerGlobalScopeDestroyedTask):
3163         (WebCore::WorkerGlobalScopeDestroyedTask::performTask):
3164         (WebCore::WorkerTerminateTask::performTask):
3165         (WebCore::PostMessageToPageInspectorTask::performTask):
3166         (WebCore::WorkerGlobalScopeProxy::create):
3167         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
3168         (WebCore::WorkerMessagingProxy::~WorkerMessagingProxy):
3169         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope):
3170         (WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
3171         (WebCore::WorkerMessagingProxy::postTaskForModeToWorkerGlobalScope):
3172         (WebCore::WorkerMessagingProxy::workerObjectDestroyedInternal):
3173         (WebCore::connectToWorkerGlobalScopeInspectorTask):
3174         (WebCore::WorkerMessagingProxy::connectToInspector):
3175         (WebCore::disconnectFromWorkerGlobalScopeInspectorTask):
3176         (WebCore::WorkerMessagingProxy::disconnectFromInspector):
3177         (WebCore::dispatchOnInspectorBackendTask):
3178         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyed):
3179         (WebCore::WorkerMessagingProxy::workerGlobalScopeClosed):
3180         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyedInternal):
3181         (WebCore::WorkerMessagingProxy::terminateWorkerGlobalScope):
3182         * workers/WorkerMessagingProxy.h:
3183         * workers/WorkerObjectProxy.h:
3184         * workers/WorkerReportingProxy.h:
3185         * workers/WorkerRunLoop.cpp:
3186         (WebCore::WorkerRunLoop::run):
3187         (WebCore::WorkerRunLoop::runInMode):
3188         (WebCore::WorkerRunLoop::runCleanupTasks):
3189         (WebCore::WorkerRunLoop::Task::performTask):
3190         * workers/WorkerRunLoop.h:
3191         * workers/WorkerScriptLoader.cpp:
3192         (WebCore::WorkerScriptLoader::loadSynchronously):
3193         * workers/WorkerThread.cpp:
3194         (WebCore::WorkerThread::workerThread):
3195         (WebCore::WorkerThread::runEventLoop):
3196         (WebCore::WorkerThreadShutdownFinishTask::performTask):
3197         (WebCore::WorkerThreadShutdownStartTask::performTask):
3198         (WebCore::WorkerThread::stop):
3199         * workers/WorkerThread.h:
3200         (WebCore::WorkerThread::workerGlobalScope):
3201         * xml/XMLHttpRequest.cpp:
3202         (WebCore::XMLHttpRequest::usesDashboardBackwardCompatibilityMode):
3203         (WebCore::XMLHttpRequest::responseXML):
3204
3205 2013-06-26  Sanjoy Pal  <sanjoy.pal@samsung.com>
3206
3207         Avoid redundant checks for Compositing reasons in RenderLayerCompositor
3208         https://bugs.webkit.org/show_bug.cgi?id=118114
3209
3210         Reviewed by Anders Carlsson.
3211
3212         A RenderObject can be any one of the Video, Canvas, Plugin or Iframe.
3213         Hence removing the redundant checks.
3214
3215         No new tests as no functionality change.
3216
3217         * rendering/RenderLayerCompositor.cpp:
3218         (WebCore::RenderLayerCompositor::reasonsForCompositing):
3219
3220 2013-06-26  Gwang Yoon Hwang  <ryumiel@company100.net>
3221
3222         Coordinated Graphics: Separate CoordinatedLayerTreeHost into CoordinatedLayerTreeHost and CompositingCoordinator
3223         https://bugs.webkit.org/show_bug.cgi?id=104360
3224
3225         Reviewed by Noam Rosenthal.
3226
3227         The CoordinatedLayerTreeHost has too many responsibilities. It
3228         implements LayerTreeHost, GraphicsLayerClient,
3229         CoordinatedGraphicsLayerClient, CoordinatedImageBacking::Client,
3230         UpdateAtlas::Client, GraphicsLayerFactory and
3231         WebCustomFilterProgramProxyClient.
3232
3233         This refactoring reduces the responsibilities of CoordinatedLayerTreeHost.
3234
3235         This patch introduces a new class called CompositingCoordinator, which
3236         takes the responsibility of managing compositing resources in
3237         WebProcess.
3238
3239         CoordinatedLayerTreeHost is responsible only for the scheduling and
3240         IPC-specific stuff, which are relevant only for WebKit2.
3241
3242         No new tests, covered by existing tests.
3243
3244         * CMakeLists.txt:
3245         * Target.pri:
3246         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp: Added.
3247         (WebCore::CompositingCoordinator::create):
3248         (WebCore::CompositingCoordinator::~CompositingCoordinator):
3249         (WebCore::CompositingCoordinator::CompositingCoordinator):
3250         (WebCore::CompositingCoordinator::setRootCompositingLayer):
3251         (WebCore::CompositingCoordinator::sizeDidChange):
3252         (WebCore::CompositingCoordinator::flushPendingLayerChanges):
3253         (WebCore::CompositingCoordinator::syncDisplayState):
3254         (WebCore::CompositingCoordinator::nextAnimationServiceTime):
3255         (WebCore::CompositingCoordinator::clearPendingStateChanges):
3256         (WebCore::CompositingCoordinator::initializeRootCompositingLayerIfNeeded):
3257         (WebCore::CompositingCoordinator::createRootLayer):
3258         (WebCore::CompositingCoordinator::syncLayerState):
3259         (WebCore::CompositingCoordinator::createImageBackingIfNeeded):
3260         (WebCore::CompositingCoordinator::createImageBacking):
3261         (WebCore::CompositingCoordinator::updateImageBacking):
3262         (WebCore::CompositingCoordinator::clearImageBackingContents):
3263         (WebCore::CompositingCoordinator::removeImageBacking):
3264         (WebCore::CompositingCoordinator::flushPendingImageBackingChanges):
3265         (WebCore::CompositingCoordinator::notifyAnimationStarted):
3266         (WebCore::CompositingCoordinator::notifyFlushRequired):
3267         (WebCore::CompositingCoordinator::paintContents):
3268         (WebCore::CompositingCoordinator::createGraphicsLayer):
3269         (WebCore::CompositingCoordinator::deviceScaleFactor):
3270         (WebCore::CompositingCoordinator::pageScaleFactor):
3271         (WebCore::CompositingCoordinator::createUpdateAtlas):
3272         (WebCore::CompositingCoordinator::removeUpdateAtlas):
3273         (WebCore::CompositingCoordinator::visibleContentsRect):
3274         (WebCore::CompositingCoordinator::mainContentsLayer):
3275         (WebCore::CompositingCoordinator::setVisibleContentsRect):
3276         (WebCore::CompositingCoordinator::deviceOrPageScaleFactorChanged):
3277         (WebCore::CompositingCoordinator::detachLayer):
3278         (WebCore::CompositingCoordinator::commitScrollOffset):
3279         (WebCore::CompositingCoordinator::renderNextFrame):
3280         (WebCore::CompositingCoordinator::purgeBackingStores):
3281         (WebCore::CompositingCoordinator::paintToSurface):
3282         (WebCore::CompositingCoordinator::scheduleReleaseInactiveAtlases):
3283         (WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):
3284         * platform/graphics/texmap/coordinated/CompositingCoordinator.h: Added.
3285         (WebCore::CompositingCoordinator::clearRootLayer):
3286         (WebCore::CompositingCoordinator::rootLayer):
3287         (WebCore::CompositingCoordinator::state):
3288
3289 2013-06-26  Kihong Kwon  <kihong.kwon@samsung.com>
3290
3291         Vibration cannot be canceled during pattern vibration.
3292         https://bugs.webkit.org/show_bug.cgi?id=117822
3293
3294         Reviewed by Gyuyoung Kim.
3295
3296         Vibration can not cancel during pattern vibration is working. If resting time which are
3297         even numbers of pattern m_isVibraing will be false and cancel will thus return early.
3298         In addition, m_timerStart needs to be stopped in the cancelVibration().
3299         If cancelVibration() is called right after m_timerStart is fired, timerStartFired
3300         function can be called even if vibration is already canceled because of timing issue of timer.
3301
3302         Test: vibration/cancelVibration-during-pattern-vibrating.html
3303
3304         * Modules/vibration/Vibration.cpp:
3305         (WebCore::Vibration::vibrate):
3306         (WebCore::Vibration::cancelVibration):
3307         (WebCore::Vibration::suspendVibration):
3308         (WebCore::Vibration::resumeVibration):
3309         (WebCore::Vibration::stopVibration):
3310         (WebCore::Vibration::timerStartFired):
3311         (WebCore::Vibration::timerStopFired):
3312         * Modules/vibration/Vibration.h:
3313
3314 2013-06-26  Anders Carlsson  <andersca@apple.com>
3315
3316         Deprecate StringImpl::charactersWithNullTermination
3317         https://bugs.webkit.org/show_bug.cgi?id=118108
3318
3319         Reviewed by Beth Dakin.
3320
3321         Rename calls to charactersWithNullTermination to deprecatedCharactersWithNullTermination.
3322
3323         * html/canvas/WebGLProgram.cpp:
3324         (WebCore::WebGLProgram::cacheActiveAttribLocations):
3325         * platform/graphics/win/FontCacheWin.cpp:
3326         (WebCore::getLinkedFonts):
3327         * platform/graphics/win/FontCustomPlatformData.cpp:
3328         (WebCore::FontCustomPlatformData::fontPlatformData):
3329         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
3330         (WebCore::FontCustomPlatformData::fontPlatformData):
3331         * platform/graphics/win/IconWin.cpp:
3332         (WebCore::Icon::createIconForFiles):
3333         * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:
3334         (WebCore::MediaPlayerPrivateQuickTimeVisualContext::setUpCookiesForQuickTime):
3335         * platform/graphics/wince/FontPlatformData.cpp:
3336         (WebCore::FontPlatformData::FontPlatformData):
3337         * platform/network/curl/CurlDownload.cpp:
3338         (CurlDownload::moveFileToDestination):
3339         * platform/network/win/CookieJarWin.cpp:
3340         (WebCore::setCookiesFromDOM):
3341         (WebCore::cookiesForDOM):
3342         * platform/network/win/DownloadBundleWin.cpp:
3343         (WebCore::DownloadBundle::appendResumeData):
3344         (WebCore::DownloadBundle::extractResumeData):
3345         * platform/network/win/ResourceHandleWin.cpp:
3346         (WebCore::createInternetHandle):
3347         (WebCore::ResourceHandle::start):
3348         (WebCore::ResourceHandle::fileLoadTimer):
3349         * platform/sql/SQLiteFileSystem.cpp:
3350         (WebCore::SQLiteFileSystem::openDatabase):
3351         * platform/sql/SQLiteStatement.cpp:
3352         (WebCore::SQLiteStatement::prepare):
3353         * platform/text/win/LocaleWin.cpp:
3354         (WebCore::LCIDFromLocaleInternal):
3355         * platform/text/win/TextCodecWin.cpp:
3356         (WebCore::TextCodecWin::enumerateSupportedEncodings):
3357         * platform/win/ClipboardUtilitiesWin.cpp:
3358         (WebCore::getWebLocData):
3359         (WebCore::createGlobalData):
3360         (WebCore::setFileDescriptorData):
3361         (WebCore::getURL):
3362         (WebCore::setCFData):
3363         * platform/win/ContextMenuWin.cpp:
3364         (WebCore::ContextMenu::createPlatformContextMenuFromItems):
3365         * platform/win/DragImageWin.cpp:
3366         (WebCore::createDragImageIconForCachedImageFilename):
3367         * platform/win/FileSystemWin.cpp:
3368         (WebCore::getFindData):
3369         (WebCore::deleteFile):
3370         (WebCore::deleteEmptyDirectory):
3371         (WebCore::pathByAppendingComponent):
3372         (WebCore::makeAllDirectories):
3373         (WebCore::pathGetFileName):
3374         (WebCore::openTemporaryFile):
3375         (WebCore::openFile):
3376         * platform/win/MIMETypeRegistryWin.cpp:
3377         (WebCore::mimeTypeForExtension):
3378         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
3379         * platform/win/PasteboardWin.cpp:
3380         (WebCore::createGlobalImageFileDescriptor):
3381         (WebCore::createGlobalHDropContent):
3382         * platform/win/PathWalker.cpp:
3383         (WebCore::PathWalker::PathWalker):
3384         * platform/win/SSLKeyGeneratorWin.cpp:
3385         (WebCore::WebCore::signedPublicKeyAndChallengeString):
3386         * platform/win/SharedBufferWin.cpp:
3387         (WebCore::SharedBuffer::createWithContentsOfFile):
3388         * platform/wince/FileSystemWinCE.cpp:
3389         (WebCore::getFileInfo):
3390         (WebCore::fileExists):
3391         (WebCore::deleteFile):
3392         (WebCore::deleteEmptyDirectory):
3393         (WebCore::makeAllDirectories):
3394         (WebCore::openTemporaryFile):
3395         (WebCore::openFile):
3396         * plugins/win/PluginDatabaseWin.cpp:
3397         (WebCore::PluginDatabase::getPluginPathsInDirectories):
3398         (WebCore::addMozillaPluginDirectories):
3399         (WebCore::addAdobeAcrobatPluginDirectory):
3400         (WebCore::addJavaPluginDirectory):
3401         * plugins/win/PluginPackageWin.cpp:
3402         (WebCore::getVersionInfo):
3403         (WebCore::PluginPackage::fetchInfo):
3404         (WebCore::PluginPackage::load):
3405         * plugins/win/PluginViewWin.cpp:
3406         (WebCore::PluginView::handlePostReadFile):
3407
3408 2013-06-26  Roger Fong  <roger_fong@apple.com>
3409
3410         Add an accessibility delegate interface to AppleWin port.
3411         https://bugs.webkit.org/show_bug.cgi?id=118094.
3412
3413         Reviewed by Brent Fulgham.
3414
3415         * accessibility/win/AXObjectCacheWin.cpp: We call the page client's AXStartFrameLoad and AXFinishFrameLoad methods here, which will in turn call the AccessibilityDelegate's callbacks.
3416         (WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
3417         * loader/EmptyClients.h:
3418         (WebCore::EmptyChromeClient::AXStartFrameLoad):
3419         (WebCore::EmptyChromeClient::AXFinishFrameLoad):
3420         * page/ChromeClient.h:
3421
3422 2013-06-26  Jer Noble  <jer.noble@apple.com>
3423
3424         Potential use-after-free after neutering AudioBuffer's underlying ArrayBuffer.
3425         https://bugs.webkit.org/show_bug.cgi?id=118040
3426
3427         Reviewed by Filip Pizlo.
3428
3429         Test: webaudio/audiobuffer-neuter.html
3430
3431         When creating an AudioBuffer's backing ArrayBufferView objects, mark them as 'unneuterable',
3432         meaning the underlying data will be copied in a neuter scenario rather than transferred. This
3433         means the underlying assumtions of the webaudio code can continue to assume that the memory
3434         areas owned by the ArrayBufferView will be present until the AudioBuffer is itself destroyed.
3435
3436         In order to not expose the 'unneuterable' behavior to JavaScript, return a fresh Float32Array
3437         wrapper around the ArrayBuffer object, rather than our own.
3438
3439         * Modules/webaudio/AudioBuffer.cpp:
3440         (WebCore::AudioBuffer::AudioBuffer): Mark the newly created channels as not neuterable.
3441         (WebCore::AudioBuffer::getChannelData): Return a new Float32Array object rather than a pointer to our own.
3442         * Modules/webaudio/AudioBuffer.h:
3443
3444 2013-06-26  Brent Fulgham  <bfulgham@apple.com>
3445
3446         [Windows] Unreviewed build correction after r152035.
3447
3448         * page/CaptionUserPreferencesMediaAF.cpp: Don't attempt to include CoreText.h
3449           if we do not have MediaAccessibility Framework.
3450
3451 2013-06-26  Brent Fulgham  <bfulgham@apple.com>
3452
3453         [Windows] Enable CaptionUserPreferencesMediaAF on Windows.
3454         https://bugs.webkit.org/show_bug.cgi?id=118076
3455
3456         Reviewed by Eric Carlson.
3457
3458         * WebCore.vcxproj/WebCore.vcxproj: Enable building the CaptionUserPreferencesMediaAF source file.