[CSS Grid Layout] Ignore ::first-letter pseudo-element
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-09-09  Manuel Rego Casasnovas  <rego@igalia.com>
2
3         [CSS Grid Layout] Ignore ::first-letter pseudo-element
4         https://bugs.webkit.org/show_bug.cgi?id=136625
5
6         Reviewed by Darin Adler.
7
8         According to the spec the ::first-letter pseudo-element do not apply to
9         grid containers (neither to flexboxes).
10
11         Fixed issue in RenderBlock::getFirstLetter() that applies to both grids
12         and flexboxes. Basically if the grid's or flexbox's container was
13         defining the ::first-line pseudo-element and the grid or flexbox itself
14         too, the value from the grid or flexbox was being applied to the items.
15         Added the proper check to avoid this.
16
17         Added two new tests for grid and modified one flexbox test to cover the
18         issue explained above.
19
20         Tests: css3/flexbox/flexbox-ignore-container-firstLetter.html
21                fast/css-grid-layout/grid-container-ignore-first-letter.html
22                fast/css-grid-layout/grid-item-first-letter-valid.html
23
24         * rendering/RenderBlock.cpp:
25         (WebCore::isRenderBlockFlowOrRenderButton): New method refactoring
26         similar calls through the source code.
27         (WebCore::RenderBlock::firstLineBlock): Use
28         isRenderBlockFlowOrRenderButton().
29         (WebCore::findFirstLetterBlock): Modify it to use
30         isRenderBlockFlowOrRenderButton() in order to include grids and not only
31         check flexboxes.
32         (WebCore::RenderBlock::getFirstLetter): Use
33         isRenderBlockFlowOrRenderButton().
34         (WebCore::RenderBlock::updateFirstLetter): Early return if
35         firstLetterContainer is null (in the case of flexboxes or grids).
36
37 2014-09-09  Benjamin Poulain  <benjamin@webkit.org>
38
39         Add support for :read-write/:read-only matching editable content
40         https://bugs.webkit.org/show_bug.cgi?id=136668
41
42         Reviewed by Antti Koivisto.
43
44         This is the second part of the update of :read-write/:read-only to the latest spec
45         (http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting.html#selectors).
46
47         The selectors :read-write/:read-only should match elements that are editable. The exact definition is:
48         "elements that are editing hosts or editable and are neither input elements nor textarea elements".
49
50         Matching that definition is really easy. It was done by updating HTMLElement's matchesReadWritePseudoClass()
51         to consider both contentEditable and designMode.
52
53         The tricky part is making that efficient in all cases. Matching contentEditable is horribly inefficient
54         compared to the other primitives. We don't want to execute that for every element.
55
56         Since matchesReadWritePseudoClass() was used by the theming code, that code was adjusted to
57         -Avoid calling that on regular HTMLElement, limiting the query to <input> and <textarea> where it is fast.
58         -Avoid the call entirely when possible.
59
60         Tests: fast/css/read-only-read-write-contenteditable-basics.html
61                fast/css/read-only-read-write-designmode-basics.html
62                fast/css/read-only-read-write-webkit-user-modify.html
63                fast/selectors/read-only-read-write-contenteditable-basics.html
64                fast/selectors/read-only-read-write-contenteditable-svg-foreignObject.html
65                fast/selectors/read-only-read-write-designmode-basics.html
66                fast/selectors/read-only-read-write-style-update.html
67
68         * html/HTMLElement.cpp:
69         (WebCore::contentEditableType):
70         This code is a generalization of the code that was in HTMLElement::contentEditable().
71         It is used by both matchesReadWritePseudoClass() and contentEditable() to determine
72         a valid state from the value of contentEditable.
73
74         (WebCore::HTMLElement::matchesReadWritePseudoClass):
75         Per the definition of editable content, we first check if the current element is an editing host,
76         if not we look for an editing host. If there are none, test for designMode.
77
78         (WebCore::HTMLElement::contentEditable):
79
80         (WebCore::RenderTheme::isReadOnlyControl):
81         The old definition would only match <input> and <textarea>. The code was updated to keep the same
82         behavior after matchesReadWritePseudoClass() is udpated. This avoids the performance problem of calling
83         matchesReadWritePseudoClass() on regular HTMLElement.
84
85         * platform/ControlStates.h:
86         ReadOnlyState was only used by ThemeMac for convertControlStatesToThemeDrawState().
87         In turn, convertControlStatesToThemeDrawState() was only used for painting
88         "-webkit-inner-spin-button". Buttons are not read-write to begin with.
89         The whole code looks like legacy from styling of input elements and was removed.
90
91         Removing ReadOnlyState removes the expensive part of extractControlStatesForRenderer().
92
93         * html/HTMLElement.h:
94         * html/HTMLFormControlElement.cpp:
95         (WebCore::HTMLFormControlElement::readOnlyAttributeChanged):
96         * platform/mac/ThemeMac.mm:
97         (WebCore::convertControlStatesToThemeDrawState):
98         * rendering/RenderTheme.cpp:
99         (WebCore::RenderTheme::extractControlStatesForRenderer):
100
101 2014-09-09  Jer Noble  <jer.noble@apple.com>
102
103         [MSE] media/media-source tests broken after r173318
104         https://bugs.webkit.org/show_bug.cgi?id=136675
105
106         Reviewed by Eric Carlson.
107
108         Fixes the following tests:
109             http/tests/media/media-source/mediasource-play.html
110             http/tests/media/media-source/mediasource-remove.html
111             media/media-source/media-source-monitor-source-buffers.html
112             media/media-source/media-source-overlapping-append-buffered.html   
113
114         In r173318, a for loop was converted to a C++11 loop, but in so doing, left
115         pre-initialized, empty values in the beginning of returned Vector, which caused
116         the calling algorithm to miscalculate the amount of data buffered by the media
117         source.
118
119         * Modules/mediasource/MediaSource.cpp:
120         (WebCore::MediaSource::activeRanges):
121
122 2014-09-09  Takeshi Kurosawa  <taken.spc@gmail.com>
123
124         AX: HTML5 landmark (and related) elements should not be ignored.
125         https://bugs.webkit.org/show_bug.cgi?id=135116
126
127         Reviewed by Chris Fleizach.
128
129         Make sure following element should not be ignored in computeAccessibilityIsIgnored
130         - header, aside, address, main, nav, article, section
131         - dt, dd
132
133         Tests: platform/mac/accessibility/descriptionlist-not-ignored.html
134                platform/mac/accessibility/landmark-not-ignored.html
135
136         * accessibility/AccessibilityRenderObject.cpp:
137         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
138
139 2014-09-08  Sergio Villar Senin  <svillar@igalia.com>
140
141         [CSS Grid Layout] RenderGrid methods should take RenderBox references
142         https://bugs.webkit.org/show_bug.cgi?id=136630
143
144         Reviewed by Darin Adler.
145
146         RenderGrid has several methods that take pointers to RenderBox
147         instances but the body of those methods assumes that the objects
148         will never be NULL. We should replace them by references.
149
150         * rendering/RenderGrid.cpp:
151         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
152         (WebCore::RenderGrid::logicalContentHeightForChild):
153         (WebCore::RenderGrid::minContentForChild):
154         (WebCore::RenderGrid::maxContentForChild):
155         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
156         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
157         (WebCore::RenderGrid::insertItemIntoGrid):
158         (WebCore::RenderGrid::placeItemsOnGrid):
159         (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
160         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
161         (WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid):
162         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
163         (WebCore::RenderGrid::layoutGridItems):
164         (WebCore::RenderGrid::cachedGridCoordinate):
165         (WebCore::RenderGrid::gridAreaBreadthForChild):
166         (WebCore::RenderGrid::findChildLogicalPosition):
167         * rendering/RenderGrid.h:
168
169 2014-09-09  Antti Koivisto  <antti@apple.com>
170
171         Remove unnecessary assert that is getting hit in some scenarios.
172
173         * platform/network/ResourceResponseBase.cpp:
174         (WebCore::ResourceResponseBase::certificateInfo):
175
176 2014-09-09  Antti Koivisto  <antti@apple.com>
177
178         Try to fix windows build.
179
180         * platform/network/cf/ResourceResponseCFNet.cpp:
181         (WebCore::ResourceResponse::platformCertificateInfo):
182
183 2014-09-08  Mihnea Ovidenie  <mihnea@adobe.com>
184
185         [CSSRegions]Incorrect layout for multicol element transformed into region
186         https://bugs.webkit.org/show_bug.cgi?id=136459
187
188         Reviewed by David Hyatt.
189
190         Until we will support the multicolumn region functionality, a multicolumn element
191         that also has flow-from style is not transformed into a region (https://bugs.webkit.org/show_bug.cgi?id=135153).
192         However, when a multicolumn element with flow-from style dynamically loses
193         its multicolumn style while keeping the flow-from style, we have to transform
194         the element into a region by detaching and attaching the associated DOM node,
195         in the same way we are proceeding when an element receives a different flow-from style.
196
197         Test: fast/regions/multicol/nested-multicol-into-region-dynamic.html
198
199         * style/StyleResolveTree.cpp:
200         (WebCore::Style::determineChange):
201
202 2014-09-08  Antti Koivisto  <antti@apple.com>
203
204         Pass certificate info as part of ResourceResponse
205         https://bugs.webkit.org/show_bug.cgi?id=136611
206
207         Reviewed by Darin Adler.
208
209         The current way of passing certificate info separately from ResourceResponse and then jamming it back
210         is complex and confusing. This patch makes it a true part of the ResourceResponse.
211
212         With this patch we also only create and pass the certificate info object for the main resource. It is
213         a big and complex object and we never look into it for any other resource type.
214
215         * WebCore.exp.in:
216         * platform/network/ResourceResponseBase.cpp:
217         (WebCore::ResourceResponseBase::ResourceResponseBase):
218
219             Mark initialized for synthetic responses, unitialized for those backed by a platform request.
220
221         (WebCore::ResourceResponseBase::initializeCertificateInfo):
222
223             Calling this pulls the certificate info out from the platform type.
224             It shoud only be used for resources that need it.
225
226         (WebCore::ResourceResponseBase::certificateInfo):
227         * platform/network/ResourceResponseBase.h:
228         (WebCore::ResourceResponseBase::platformCertificateInfo):
229         (WebCore::ResourceResponseBase::platformSuggestedFileName):
230         (WebCore::ResourceResponseBase::encode):
231         (WebCore::ResourceResponseBase::decode):
232
233             Encode and decode certificate info if it is present.
234
235         * platform/network/cf/ResourceResponse.h:
236         * platform/network/mac/CertificateInfo.h:
237         * platform/network/mac/CertificateInfoMac.mm:
238         (WebCore::CertificateInfo::CertificateInfo):
239         * platform/network/mac/ResourceResponseMac.mm:
240         (WebCore::ResourceResponse::platformCertificateInfo):
241         (WebCore::ResourceResponse::setCertificateChain): Deleted.
242         (WebCore::ResourceResponse::certificateChain): Deleted.
243         * platform/network/soup/ResourceResponse.h:
244         * platform/network/soup/ResourceResponseSoup.cpp:
245         (WebCore::ResourceResponse::platformCertificateInfo):
246
247 2014-09-09  Mihnea Ovidenie  <mihnea@adobe.com>
248
249         [CSSRegions] Use C++11 range-based loops in FlowThreadController
250         https://bugs.webkit.org/show_bug.cgi?id=136634
251
252         Reviewed by Andrei Bucur.
253
254         No new tests as no new functionality was introduced.
255
256         * rendering/FlowThreadController.cpp:
257         (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
258         (WebCore::FlowThreadController::styleDidChange):
259         (WebCore::FlowThreadController::layoutRenderNamedFlowThreads):
260         (WebCore::FlowThreadController::updateFlowThreadsChainIfNecessary):
261         (WebCore::FlowThreadController::updateFlowThreadsNeedingLayout):
262         (WebCore::FlowThreadController::updateFlowThreadsNeedingTwoStepLayout):
263         (WebCore::FlowThreadController::resetFlowThreadsWithAutoHeightRegions):
264         (WebCore::FlowThreadController::updateFlowThreadsIntoMeasureContentPhase):
265         (WebCore::FlowThreadController::updateFlowThreadsLayerToRegionMappingsIfNeeded):
266         (WebCore::FlowThreadController::updateNamedFlowsLayerListsIfNeeded):
267         (WebCore::FlowThreadController::collectFixedPositionedLayers):
268         (WebCore::FlowThreadController::isAutoLogicalHeightRegionsCountConsistent):
269
270 2014-09-08  Simon Fraser  <simon.fraser@apple.com>
271
272         Minor refactor in CSSComputedStyleDeclaration
273         https://bugs.webkit.org/show_bug.cgi?id=136664
274
275         Reviewed by Darin Adler.
276
277         The "if (length.isPercentNotCalculated()) createValue() else zoomAdjustedPixelValue()"
278         pattern occurred a number of times here, so factor into percentageOrZoomAdjustedValue().
279
280         * css/CSSComputedStyleDeclaration.cpp:
281         (WebCore::positionOffsetValue): l -> length
282         (WebCore::percentageOrZoomAdjustedValue):
283         (WebCore::getBorderRadiusCornerValues):
284         (WebCore::getBorderRadiusCornerValue):
285         (WebCore::scrollSnapDestination):
286         (WebCore::scrollSnapPoints):
287         (WebCore::scrollSnapCoordinates):
288
289 2014-09-08  Alexey Proskuryakov  <ap@apple.com>
290
291         Application Cache Storage: failed to execute statement "DELETE FROM CacheGroups" error "no such table: CacheGroups"
292         https://bugs.webkit.org/show_bug.cgi?id=136647
293
294         Reviewed by Darin Adler.
295
296         * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::verifySchemaVersion):
297         Don't try to delete the tables if we can't expect to have them yet.
298
299 2014-09-08  Myles C. Maxfield  <mmaxfield@apple.com>
300
301         REGRESSION (r172153): Text drawn with wrong color when second text shadow has zero offset and blur (breaks buttons at aws.amazon.com)
302         https://bugs.webkit.org/show_bug.cgi?id=136612
303
304         Reviewed by Darin Adler.
305
306         r172153 was fundamentally broken, and would restore graphics contexts that had never been saved. This patch
307         reimplements r172153 by using "continue" to skip loop iterations instead of changing the internal logic of
308         the loop.
309
310         In addition, I have refactored InlineTextBox::applyShadowToGraphicsContext() to take an extra boolean
311         reference as an out parameter in order to make it obvious it if saved a graphics context that needs
312         to be restored. This should make it less likely to make these kinds of mistakes in the future.
313
314         Test: fast/text/empty-shadow-with-color.html
315
316         * rendering/InlineTextBox.cpp:
317         (WebCore::InlineTextBox::applyShadowToGraphicsContext): Add bool reference out param.
318         * rendering/InlineTextBox.h: Ditto.
319         * rendering/TextPainter.cpp:
320         (WebCore::isEmptyShadow): Change logic to not skip loop iterations on a null shadow.
321         (WebCore::paintTextWithShadows): Use continue to skip loop iterations for empty shadows. In addition,
322         use the out param in InlineTextBox::applyShadowToGraphicsContext().
323         * rendering/svg/SVGInlineTextBox.cpp:
324         (WebCore::SVGInlineTextBox::paintTextWithShadows): Update for new sigurature of
325         InlineTextBox::applyShadowToGraphicsContext().
326
327 2014-09-08  Commit Queue  <commit-queue@webkit.org>
328
329         Unreviewed, rolling out r173402.
330         https://bugs.webkit.org/show_bug.cgi?id=136649
331
332         Breaking buildw with error "unable to restore file position to
333         0x00000c60 for section __DWARF.__debug_info (errno = 9)"
334         (Requested by mlam_ on #webkit).
335
336         Reverted changeset:
337
338         "Move CallFrame and Register inlines functions out of
339         JSScope.h."
340         https://bugs.webkit.org/show_bug.cgi?id=136579
341         http://trac.webkit.org/changeset/173402
342
343 2014-09-05  Mark Lam  <mark.lam@apple.com>
344
345         Move CallFrame and Register inlines functions out of JSScope.h.
346         <https://webkit.org/b/136579>
347
348         Reviewed by Geoffrey Garen.
349
350         No new tests.
351
352         Added #include of the appropriate *Inlines.h files.  Unlike in
353         JavaScriptCore, I #include'd the specific needed *Inlines.h instead of
354         JSCInlines.h.  This is done to minimize the need for WebCore to be
355         rebuilt when JSC changes are introduced.
356
357         * ForwardingHeaders/interpreter/RegisterInlines.h: Added.
358         * bindings/js/JSAudioBufferSourceNodeCustom.cpp:
359         * bindings/js/JSAudioTrackCustom.cpp:
360         * bindings/js/JSBiquadFilterNodeCustom.cpp:
361         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
362         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
363         * bindings/js/JSCommandLineAPIHostCustom.cpp:
364         * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
365         * bindings/js/JSDOMBinding.h:
366         * bindings/js/JSDOMStringListCustom.cpp:
367         * bindings/js/JSDOMWindowBase.cpp:
368         * bindings/js/JSDOMWindowShell.cpp:
369         * bindings/js/JSDocumentCustom.cpp:
370         * bindings/js/JSHTMLDocumentCustom.cpp:
371         * bindings/js/JSOscillatorNodeCustom.cpp:
372         * bindings/js/JSPannerNodeCustom.cpp:
373         * bindings/js/JSPopStateEventCustom.cpp:
374         * dom/TreeWalker.cpp:
375         * html/HTMLPlugInImageElement.cpp:
376         * inspector/CommandLineAPIModule.cpp:
377         * inspector/InspectorController.cpp:
378
379 2014-09-08  Dean Jackson  <dino@apple.com>
380
381         Separate the Apple media controls module from other ports
382         https://bugs.webkit.org/show_bug.cgi?id=136644
383         rdar://problem/18270969
384
385         Reviewed by Eric Carlson.
386
387         Make a mediaControlsBase.{js|css} that acts as the base
388         class for the EFL and GTK ports (they were using mediaControlsApple).
389         Over time, the Apple-specific controls may use more of the
390         Base class.
391
392         * Modules/mediacontrols/mediaControlsBase.css: Added.
393         * Modules/mediacontrols/mediaControlsBase.js: Added.
394         * PlatformEfl.cmake:
395         * PlatformGTK.cmake:
396         * platform/efl/RenderThemeEfl.cpp:
397         (WebCore::RenderThemeEfl::mediaControlsStyleSheet): Load Base rather than Apple.
398         (WebCore::RenderThemeEfl::mediaControlsScript): Ditto.
399         * rendering/RenderThemeGtk.cpp:
400         (WebCore::RenderThemeGtk::mediaControlsScript): Ditto.
401
402 2014-09-08  Jochen Eisinger  <jochen@chromium.org>
403
404         Always update the referrer header in CachedResource
405         https://bugs.webkit.org/show_bug.cgi?id=136642
406
407         Reviewed by Alexey Proskuryakov.
408
409         If a request already includes a referrer header, and the document has
410         a non-default referrer policy, it is possible that we have to modify
411         the referrer header.
412
413         * loader/cache/CachedResource.cpp:
414         (WebCore::CachedResource::addAdditionalRequestHeaders):
415
416 2014-09-08  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
417
418         Remove FILTERS flag
419         https://bugs.webkit.org/show_bug.cgi?id=136571
420
421         Reviewed by Darin Adler.
422
423         No new tests required, no new functionality.
424
425         * CMakeLists.txt:
426         * Configurations/FeatureDefines.xcconfig:
427         * DerivedSources.make:
428         * dom/DOMImplementation.cpp:
429         (WebCore::isSupportedSVG10Feature):
430         (WebCore::isSupportedSVG11Feature):
431         * platform/graphics/cpu/arm/filters/FEBlendNEON.h:
432         * platform/graphics/cpu/arm/filters/FECompositeArithmeticNEON.h:
433         * platform/graphics/cpu/arm/filters/FEGaussianBlurNEON.h:
434         * platform/graphics/cpu/arm/filters/NEONHelpers.h:
435         * platform/graphics/filters/DistantLightSource.cpp:
436         * platform/graphics/filters/DistantLightSource.h:
437         * platform/graphics/filters/FEBlend.cpp:
438         * platform/graphics/filters/FEBlend.h:
439         * platform/graphics/filters/FEColorMatrix.cpp:
440         * platform/graphics/filters/FEColorMatrix.h:
441         * platform/graphics/filters/FEComponentTransfer.cpp:
442         * platform/graphics/filters/FEComponentTransfer.h:
443         * platform/graphics/filters/FEComposite.cpp:
444         * platform/graphics/filters/FEComposite.h:
445         * platform/graphics/filters/FEConvolveMatrix.cpp:
446         * platform/graphics/filters/FEConvolveMatrix.h:
447         * platform/graphics/filters/FEDiffuseLighting.cpp:
448         * platform/graphics/filters/FEDiffuseLighting.h:
449         * platform/graphics/filters/FEDisplacementMap.cpp:
450         * platform/graphics/filters/FEDisplacementMap.h:
451         * platform/graphics/filters/FEDropShadow.cpp:
452         * platform/graphics/filters/FEDropShadow.h:
453         * platform/graphics/filters/FEFlood.cpp:
454         * platform/graphics/filters/FEFlood.h:
455         * platform/graphics/filters/FEGaussianBlur.cpp:
456         * platform/graphics/filters/FEGaussianBlur.h:
457         * platform/graphics/filters/FELighting.cpp:
458         * platform/graphics/filters/FELighting.h:
459         * platform/graphics/filters/FEMerge.cpp:
460         * platform/graphics/filters/FEMerge.h:
461         * platform/graphics/filters/FEMorphology.cpp:
462         * platform/graphics/filters/FEMorphology.h:
463         * platform/graphics/filters/FEOffset.cpp:
464         * platform/graphics/filters/FEOffset.h:
465         * platform/graphics/filters/FESpecularLighting.cpp:
466         * platform/graphics/filters/FESpecularLighting.h:
467         * platform/graphics/filters/FETile.cpp:
468         * platform/graphics/filters/FETile.h:
469         * platform/graphics/filters/FETurbulence.cpp:
470         * platform/graphics/filters/FETurbulence.h:
471         * platform/graphics/filters/Filter.h:
472         * platform/graphics/filters/FilterEffect.cpp:
473         * platform/graphics/filters/FilterEffect.h:
474         * platform/graphics/filters/LightSource.h:
475         * platform/graphics/filters/PointLightSource.cpp:
476         * platform/graphics/filters/PointLightSource.h:
477         * platform/graphics/filters/SourceAlpha.cpp:
478         * platform/graphics/filters/SourceAlpha.h:
479         * platform/graphics/filters/SourceGraphic.cpp:
480         * platform/graphics/filters/SourceGraphic.h:
481         * platform/graphics/filters/SpotLightSource.cpp:
482         * platform/graphics/filters/SpotLightSource.h:
483         * rendering/svg/RenderSVGResource.cpp:
484         (WebCore::removeFromCacheAndInvalidateDependencies):
485         * rendering/svg/RenderSVGResourceFilter.cpp:
486         * rendering/svg/RenderSVGResourceFilter.h:
487         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
488         * rendering/svg/RenderSVGResourceFilterPrimitive.h:
489         * rendering/svg/RenderSVGRoot.cpp:
490         * rendering/svg/SVGRenderSupport.cpp:
491         (WebCore::SVGRenderSupport::intersectRepaintRectWithResources):
492         * rendering/svg/SVGRenderTreeAsText.cpp:
493         (WebCore::writeSVGResourceContainer):
494         (WebCore::writeResources):
495         * rendering/svg/SVGRenderingContext.cpp:
496         (WebCore::SVGRenderingContext::~SVGRenderingContext):
497         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
498         * rendering/svg/SVGRenderingContext.h:
499         (WebCore::SVGRenderingContext::SVGRenderingContext):
500         * rendering/svg/SVGResources.cpp:
501         (WebCore::targetReferenceFromResource):
502         (WebCore::SVGResources::buildCachedResources):
503         (WebCore::SVGResources::removeClientFromCache):
504         (WebCore::SVGResources::resourceDestroyed):
505         (WebCore::SVGResources::buildSetOfResources):
506         (WebCore::SVGResources::resetFilter):
507         (WebCore::SVGResources::dump):
508         * rendering/svg/SVGResources.h:
509         (WebCore::SVGResources::filter):
510         (WebCore::SVGResources::ClipperFilterMaskerData::ClipperFilterMaskerData):
511         * rendering/svg/SVGResourcesCycleSolver.cpp:
512         (WebCore::SVGResourcesCycleSolver::breakCycle):
513         * svg/SVGAnimatedEnumeration.cpp:
514         (WebCore::enumerationValueForTargetAttribute):
515         * svg/SVGComponentTransferFunctionElement.cpp:
516         * svg/SVGComponentTransferFunctionElement.h:
517         * svg/SVGComponentTransferFunctionElement.idl:
518         * svg/SVGFEBlendElement.cpp:
519         * svg/SVGFEBlendElement.h:
520         * svg/SVGFEBlendElement.idl:
521         * svg/SVGFEColorMatrixElement.cpp:
522         * svg/SVGFEColorMatrixElement.h:
523         * svg/SVGFEColorMatrixElement.idl:
524         * svg/SVGFEComponentTransferElement.cpp:
525         * svg/SVGFEComponentTransferElement.h:
526         * svg/SVGFEComponentTransferElement.idl:
527         * svg/SVGFECompositeElement.cpp:
528         * svg/SVGFECompositeElement.h:
529         * svg/SVGFECompositeElement.idl:
530         * svg/SVGFEConvolveMatrixElement.cpp:
531         * svg/SVGFEConvolveMatrixElement.h:
532         * svg/SVGFEConvolveMatrixElement.idl:
533         * svg/SVGFEDiffuseLightingElement.cpp:
534         * svg/SVGFEDiffuseLightingElement.h:
535         * svg/SVGFEDiffuseLightingElement.idl:
536         * svg/SVGFEDisplacementMapElement.cpp:
537         * svg/SVGFEDisplacementMapElement.h:
538         * svg/SVGFEDisplacementMapElement.idl:
539         * svg/SVGFEDistantLightElement.cpp:
540         * svg/SVGFEDistantLightElement.h:
541         * svg/SVGFEDistantLightElement.idl:
542         * svg/SVGFEDropShadowElement.cpp:
543         * svg/SVGFEDropShadowElement.h:
544         * svg/SVGFEDropShadowElement.idl:
545         * svg/SVGFEFloodElement.cpp:
546         * svg/SVGFEFloodElement.h:
547         * svg/SVGFEFloodElement.idl:
548         * svg/SVGFEFuncAElement.cpp:
549         * svg/SVGFEFuncAElement.h:
550         * svg/SVGFEFuncAElement.idl:
551         * svg/SVGFEFuncBElement.cpp:
552         * svg/SVGFEFuncBElement.h:
553         * svg/SVGFEFuncBElement.idl:
554         * svg/SVGFEFuncGElement.cpp:
555         * svg/SVGFEFuncGElement.h:
556         * svg/SVGFEFuncGElement.idl:
557         * svg/SVGFEFuncRElement.cpp:
558         * svg/SVGFEFuncRElement.h:
559         * svg/SVGFEFuncRElement.idl:
560         * svg/SVGFEGaussianBlurElement.cpp:
561         * svg/SVGFEGaussianBlurElement.h:
562         * svg/SVGFEGaussianBlurElement.idl:
563         * svg/SVGFEImageElement.cpp:
564         * svg/SVGFEImageElement.h:
565         * svg/SVGFEImageElement.idl:
566         * svg/SVGFELightElement.cpp:
567         * svg/SVGFELightElement.h:
568         * svg/SVGFEMergeElement.cpp:
569         * svg/SVGFEMergeElement.h:
570         * svg/SVGFEMergeElement.idl:
571         * svg/SVGFEMergeNodeElement.cpp:
572         * svg/SVGFEMergeNodeElement.h:
573         * svg/SVGFEMergeNodeElement.idl:
574         * svg/SVGFEMorphologyElement.cpp:
575         * svg/SVGFEMorphologyElement.h:
576         * svg/SVGFEMorphologyElement.idl:
577         * svg/SVGFEOffsetElement.cpp:
578         * svg/SVGFEOffsetElement.h:
579         * svg/SVGFEOffsetElement.idl:
580         * svg/SVGFEPointLightElement.cpp:
581         * svg/SVGFEPointLightElement.h:
582         * svg/SVGFEPointLightElement.idl:
583         * svg/SVGFESpecularLightingElement.cpp:
584         * svg/SVGFESpecularLightingElement.h:
585         * svg/SVGFESpecularLightingElement.idl:
586         * svg/SVGFESpotLightElement.cpp:
587         * svg/SVGFESpotLightElement.h:
588         * svg/SVGFESpotLightElement.idl:
589         * svg/SVGFETileElement.cpp:
590         * svg/SVGFETileElement.h:
591         * svg/SVGFETileElement.idl:
592         * svg/SVGFETurbulenceElement.cpp:
593         * svg/SVGFETurbulenceElement.h:
594         * svg/SVGFETurbulenceElement.idl:
595         * svg/SVGFilterElement.cpp:
596         * svg/SVGFilterElement.h:
597         * svg/SVGFilterElement.idl:
598         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
599         * svg/SVGFilterPrimitiveStandardAttributes.h:
600         * svg/graphics/filters/SVGFEImage.cpp:
601         * svg/graphics/filters/SVGFEImage.h:
602         * svg/graphics/filters/SVGFilter.cpp:
603         * svg/graphics/filters/SVGFilter.h:
604         * svg/graphics/filters/SVGFilterBuilder.cpp:
605         * svg/graphics/filters/SVGFilterBuilder.h:
606         * svg/svgtags.in:
607
608 2014-09-08  Simon Fraser  <simon.fraser@apple.com>
609
610         Use enum class for the RunPostLayoutTasks enum
611         https://bugs.webkit.org/show_bug.cgi?id=136640
612
613         Reviewed by Dean Jackson.
614
615         Use enum class for RunPostLayoutTasks fixing callers. Add an explanatory comment,
616         and add some spacing.
617
618         * dom/Document.cpp:
619         (WebCore::Document::updateLayoutIgnorePendingStylesheets):
620         * dom/Document.h:
621         * html/HTMLAppletElement.cpp:
622         (WebCore::HTMLAppletElement::renderWidgetForJSBindings):
623         * html/HTMLEmbedElement.cpp:
624         (WebCore::HTMLEmbedElement::renderWidgetForJSBindings):
625         * html/HTMLObjectElement.cpp:
626         (WebCore::HTMLObjectElement::renderWidgetForJSBindings):
627         * testing/Internals.cpp:
628         (WebCore::Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks):
629
630 2014-09-08  peavo@outlook.com  <peavo@outlook.com>
631
632         [WinCairo] Compile error.
633         https://bugs.webkit.org/show_bug.cgi?id=136633
634
635         Reviewed by Darin Adler.
636
637         Enum name has already been defined.
638
639         * platform/audio/AudioHardwareListener.h:
640
641 2014-09-08  Tim Horton  <timothy_horton@apple.com>
642
643         Remove some unused code in ImageSourceCG
644         https://bugs.webkit.org/show_bug.cgi?id=136638
645
646         Reviewed by Dan Bernstein.
647
648         * platform/graphics/cg/ImageSourceCG.cpp:
649         (WebCore::ImageSource::setData):
650         Remove this code. Firstly, it's in a USE(CG) && !PLATFORM(COCOA) && !PLATFORM(WIN)
651         block, and that's simply not a thing. Secondly, the referenced bug was fixed in Lion.
652
653 2014-09-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
654
655         Introduce CSS_RULE_TYPE_CASTS, and use it
656         https://bugs.webkit.org/show_bug.cgi?id=136628
657
658         Reviewed by Darin Adler.
659
660         As a step to use toFoo, this patch introduces toCSSFooRule(). This will help to detect
661         wrong type cast. Additionally some missing type casts are clean up as well.
662
663         No new tests, no behavior changes.
664
665         * bindings/gobject/WebKitDOMPrivate.cpp:
666         (WebKit::wrap):
667         * css/CSSFontSelector.cpp:
668         (WebCore::CSSFontSelector::addFontFaceRule):
669         * css/CSSImportRule.h:
670         * css/CSSMediaRule.h:
671         * css/CSSParser.cpp:
672         (WebCore::CSSParser::parseGridTemplateRowsAndAreas):
673         * css/CSSRule.h:
674         * css/CSSStyleRule.h:
675         * css/CSSSupportsRule.h:
676         * css/InspectorCSSOMWrappers.cpp:
677         (WebCore::InspectorCSSOMWrappers::collect):
678         * css/WebKitCSSRegionRule.h:
679         * inspector/InspectorCSSAgent.cpp:
680         (WebCore::InspectorCSSAgent::asCSSStyleRule):
681         (WebCore::InspectorCSSAgent::collectStyleSheets):
682         * inspector/InspectorStyleSheet.cpp:
683         (WebCore::asCSSRuleList):
684         (WebCore::fillMediaListChain):
685         * page/PageSerializer.cpp:
686         (WebCore::PageSerializer::serializeCSSStyleSheet):
687
688 2014-09-08  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
689
690         [EFL[WK2] MiniBrowser comes to crash on debug mode
691         https://bugs.webkit.org/show_bug.cgi?id=136617
692
693         Reviewed by Csaba Osztrogonác.
694
695         Fix wrong ASSERTION use in applyCursorFromEcoreX().
696
697         * platform/efl/EflScreenUtilities.cpp: Change ASSERT(!window) with *ASSERT(window)*
698         (WebCore::applyCursorFromEcoreX):
699
700 2014-09-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
701
702         Introduce toBasicShapeFoo() instead of static_cast<BasicShapeFoo*>
703         https://bugs.webkit.org/show_bug.cgi?id=136609
704
705         Reviewed by Darin Adler.
706
707         To use BasicShapeFoo() helps to detect wrong type casting and improve code readability.
708
709         No new tests, no behavior changes.
710
711         * css/BasicShapeFunctions.cpp:
712         (WebCore::valueForBasicShape):
713         * rendering/shapes/Shape.cpp:
714         (WebCore::Shape::createShape):
715         * rendering/style/BasicShapes.cpp:
716         (WebCore::BasicShape::canBlend):
717         (WebCore::BasicShapeCircle::blend):
718         (WebCore::BasicShapeEllipse::blend):
719         (WebCore::BasicShapePolygon::blend):
720         (WebCore::BasicShapeInset::blend):
721         * rendering/style/BasicShapes.h:
722
723 2014-09-06  Jer Noble  <jer.noble@apple.com>
724
725         [Fullscreen] Add a site-specific hack to work around "flash on exit" behavior of YouTube.com.
726         https://bugs.webkit.org/show_bug.cgi?id=136604
727
728         Reviewed by Eric Carlson.
729
730         YouTube.com will cause a "flash" of the full screen sized <video> element upon exiting full
731         screen because the "fullscreenchange" event is fired asynchronously after the exit animation
732         completes. Only YouTube sites and embeds, add a site-specific-quirk which runs the "fullscreenchange"
733         event synchronously at the end of the exit animation. This causes YouTube's video resizing logic
734         to run during the period of time where we've disabled screen updates, instead of immediately
735         after.
736
737         * dom/Document.cpp:
738         (WebCore::Document::webkitDidExitFullScreenForElement):
739
740 2014-09-06  Darin Adler  <darin@apple.com>
741
742         Make updates suggested by new version of Xcode
743         https://bugs.webkit.org/show_bug.cgi?id=136603
744
745         Reviewed by Mark Rowe.
746
747         * Configurations/Base.xcconfig: Added COMBINE_HIDPI_IMAGES and
748         ENABLE_STRICT_OBJC_MSGSEND as suggested by Xcode upgrade check.
749
750         * WebCore.xcodeproj/project.pbxproj: Let Xcode remove an orphaned item from the file,
751         and also updated LastUpgradeCheck.
752
753         * html/HTMLMediaElement.cpp:
754         (WebCore::HTMLMediaElement::updateTextTrackDisplay): Use #if/#else/#endif instead of
755         using #if/return/#endif and leaving code unreachable.
756         (WebCore::HTMLMediaElement::configureMediaControls): Ditto.
757         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Ditto.
758         * html/canvas/WebGLDrawBuffers.cpp:
759         (WebCore::WebGLDrawBuffers::supported): Ditto.
760
761 2014-09-06  Brian J. Burg  <burg@cs.washington.edu>
762
763         Web Inspector: convert DockSide to an enum class
764         https://bugs.webkit.org/show_bug.cgi?id=136601
765
766         Reviewed by Timothy Hatcher.
767
768         * inspector/InspectorFrontendClient.h:
769         * inspector/InspectorFrontendClientLocal.cpp:
770         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
771         (WebCore::InspectorFrontendClientLocal::requestSetDockSide):
772         (WebCore::InspectorFrontendClientLocal::canAttachWindow):
773         (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
774         * inspector/InspectorFrontendHost.cpp:
775         (WebCore::InspectorFrontendHost::requestSetDockSide):
776
777 2014-09-06  Antti Koivisto  <antti@apple.com>
778
779         Serialize ResourceResponses using WebKit types
780         https://bugs.webkit.org/show_bug.cgi?id=136545
781
782         Fix the failing webarchive tests.
783
784         * platform/network/mac/ResourceResponseMac.mm:
785         (WebCore::ResourceResponse::initNSURLResponse): Map empty text encoding name to nil NSString.
786
787 2014-09-06  peavo@outlook.com  <peavo@outlook.com>
788
789         [WinCairo][Curl] fileExists() incorrectly claims folder does not exist.
790         https://bugs.webkit.org/show_bug.cgi?id=136598
791
792         Reviewed by Alex Christensen.
793
794         The fileExists() function will always return false on Windows,
795         if the filename parameter ends with a slash or backslash.
796
797         * platform/network/curl/CurlCacheManager.cpp:
798         (WebCore::CurlCacheManager::setCacheDirectory): Add slash after call to fileExists().
799
800 2014-09-06  David Kilzer  <ddkilzer@apple.com>
801
802         New clang warns about boolean checks for |this| pointer in RenderObject debug methods
803         <http://webkit.org/b/136599>
804
805         Reviewed by Zalan Bujtas.
806
807         Ignores the following static analyzer warnings:
808
809             Source/WebCore/rendering/RenderObject.cpp:1465:10: error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]
810                 if (!this) {
811                     ~^~~~
812             Source/WebCore/rendering/RenderObject.cpp:1584:10: error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]
813                 if (!this)
814                     ~^~~~
815
816         * rendering/RenderObject.cpp:
817         (WebCore::RenderObject::showRenderObject):
818         (WebCore::RenderObject::showRenderSubTreeAndMark):
819         Add "#pragma clang" preprocessor macros to ignore this warning
820         since the code is only compiled for Debug builds.  Also add a
821         pragma for the pragma so older clangs don't complain about an
822         unkonwn pragma.
823
824 2014-09-06  Antti Koivisto  <antti@apple.com>
825
826         Serialize ResourceResponses using WebKit types
827         https://bugs.webkit.org/show_bug.cgi?id=136545
828
829         Reviewed by Alexey Proskuryakov.
830
831         Serialization is faster and we can mostly avoid having NSURLResponses in web process.
832
833         * WebCore.exp.in:
834         * platform/network/ResourceLoadTiming.h:
835         (WebCore::ResourceLoadTiming::encode):
836         (WebCore::ResourceLoadTiming::decode):
837         * platform/network/ResourceResponseBase.h:
838         (WebCore::ResourceResponseBase::encode):
839         (WebCore::ResourceResponseBase::decode):
840
841             Serialize from the WebCore data instead of serializing NSURLResponse.
842
843         * platform/network/cf/ResourceResponseCFNet.cpp:
844         (WebCore::ResourceResponse::cfURLResponse):
845
846             Synthesize CFURLResponse by creating NSURLResponse on Cocoa platforms so we don't need copy code.
847             This has negligible performance impact, NSURLResponse is just a wrapper around CFURLResponse.
848
849         * platform/network/mac/ResourceResponseMac.mm:
850         (WebCore::ResourceResponse::nsURLResponse):
851         (WebCore::ResourceResponse::setCertificateChain):
852
853             Avoid unnecessary NSURLRequest instantiation in debug builds.
854
855 2014-09-06  David Kilzer  <ddkilzer@apple.com>
856
857         HTMLElement.cpp does not compile with new clang
858         <http://webkit.org/b/136600>
859
860         Reviewed by Chris Fleizach.
861
862         Fixes the following static analyzer warning:
863
864             Source/WebCore/html/HTMLElement.cpp:545:10: error: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Werror,-Wundefined-bool-conversion]
865                 if (!this || !parentNode())
866                     ~^~~~
867
868         * html/HTMLElement.cpp:
869         (WebCore::HTMLElement::setOuterText): Remove "!this" check added
870         in r75738.  It would only cover up real bugs, and isn't even hit
871         in layout tests.
872
873 2014-09-06  Ryuan Choi  <ryuan.choi@gmail.com>
874
875         [EFL] Drop evas object cursor support
876         https://bugs.webkit.org/show_bug.cgi?id=136324
877
878         Reviewed by Gyuyoung Kim.
879
880         Removed evas object cursor because there are some bugs.
881         ewebkit will only support ecore_x_cursor because ewebkit is available with X, now.
882
883         * platform/efl/DefaultTheme/CMakeLists.txt: Removed cursor related code.
884         * platform/efl/DefaultTheme/default.edc: Ditto.
885         * platform/efl/DefaultTheme/widget/cursor/cursor.edc: Removed.
886         * platform/efl/EflScreenUtilities.cpp:
887         (WebCore::getEcoreCursor):
888         (WebCore::applyCursorFromEcoreX): Renamed applyFallbackCursor.
889         (WebCore::createCustomCursor): Added to make custom cursor.
890         (WebCore::applyFallbackCursor): Deleted.
891         * platform/efl/EflScreenUtilities.h:
892
893 2014-09-05  Commit Queue  <commit-queue@webkit.org>
894
895         Unreviewed, rolling out r173340 and r173342.
896         https://bugs.webkit.org/show_bug.cgi?id=136596
897
898         Broke many tests (Requested by ap on #webkit).
899
900         Reverted changesets:
901
902         "Remove PLATFORM(IOS) from WebCore/editing (Part 3)."
903         https://bugs.webkit.org/show_bug.cgi?id=136474
904         http://trac.webkit.org/changeset/173340
905
906         "Build fix after r173340."
907         http://trac.webkit.org/changeset/173342
908
909 2014-09-05  Joseph Pecoraro  <pecoraro@apple.com>
910
911         Use WTFString::split(char) in more places
912         https://bugs.webkit.org/show_bug.cgi?id=136543
913
914         Reviewed by Sam Weinig.
915
916         * inspector/InspectorDOMAgent.cpp:
917         (WebCore::InspectorDOMAgent::nodeForPath):
918         * mathml/MathMLMencloseElement.cpp:
919         (WebCore::MathMLMencloseElement::collectStyleForPresentationAttribute):
920         * page/PerformanceResourceTiming.cpp:
921         (WebCore::passesTimingAllowCheck):
922         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
923         (WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):
924         * platform/graphics/opengl/GLPlatformContext.cpp:
925         (WebCore::parseExtensions):
926         * platform/gtk/PasteboardHelper.cpp:
927         (WebCore::PasteboardHelper::fillDataObjectFromDropData):
928         * platform/network/curl/CurlCacheEntry.cpp:
929         (WebCore::CurlCacheEntry::loadResponseHeaders):
930         * platform/network/curl/CurlCacheManager.cpp:
931         (WebCore::CurlCacheManager::loadIndex):
932
933 2014-09-05  Myles C. Maxfield  <mmaxfield@apple.com>
934
935         Laying out a TextRun using an SVG font is O(n^2)
936         https://bugs.webkit.org/show_bug.cgi?id=136584
937
938         Reviewed by Andreas Kling.
939
940         Caching the version of the run with normalized spaces leads to a 5x speedup on the
941         performance test this patch adds.
942
943         Note that SVGFontData::applySVGGlyphSelection() is still unnecesarrily O(n), so more
944         work can be done here. In particular, the call to collectGlyphsForString() can likely
945         be sped up.
946
947         No new correctness tests because there is no behavior change.
948         Performance Test: SVG/SVG-Text.html
949
950         * platform/graphics/Font.h:
951         (WebCore::Font::treatAsSpace): Make inline.
952         (WebCore::Font::treatAsZeroWidthSpace): Ditto.
953         (WebCore::Font::treatAsZeroWidthSpaceInComplexScript): Ditto.
954         * platform/graphics/SimpleFontData.h: Add String cache argument.
955         * platform/graphics/TextRun.h: Move member variables around for better packing.
956         (WebCore::TextRun::TextRun): Ditto.
957         * platform/graphics/WidthIterator.cpp: Add String cache argument.
958         (WebCore::WidthIterator::glyphDataForCharacter): Ditto.
959         (WebCore::WidthIterator::advanceInternal): Create String cache and pass it to
960         glyphDataForCharacter.
961         * platform/graphics/WidthIterator.h: Add String cache argument.
962         * rendering/svg/SVGTextRunRenderingContext.cpp: Ditto.
963         (WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): Ditto.
964         * rendering/svg/SVGTextRunRenderingContext.h: Ditto.
965         * svg/SVGFontData.cpp:
966         (WebCore::SVGFontData::applySVGGlyphSelection): Call computeNormalizedSpaces
967         to consult with the cache.
968         (WebCore::computeNormalizedSpaces): Compute cached String value.
969         * svg/SVGFontData.h: Add String cache argument.
970
971 2014-09-05  David Kilzer  <ddkilzer@apple.com>
972
973         REGRESSION (r169407): Calls to RenderStyle::getRoundedBorderFor() in computeRoundedRectForBoxShape() still include RenderView pointer
974         <http://webkit.org/b/136591>
975         <rdar://problem/18143731>
976
977         Reviewed by Simon Fraser.
978
979         In r169407, the RenderView* argument was removed from
980         RenderStyle::getRoundedBorderFor().  This argument was not
981         removed from these calls in computeRoundedRectForBoxShape(), but
982         because getRoundedBorderFor() always returned a reference, and
983         because the default for the next argument was true, there was no
984         actual change in behavior from this bug.
985
986         No new tests since there is no change in behavior.
987
988         * rendering/shapes/BoxShape.cpp:
989         (WebCore::computeRoundedRectForBoxShape): Remove RenderView*
990         arguments from calls to getRoundedBorderFor().
991
992 2014-09-05  Tim Horton  <timothy_horton@apple.com>
993
994         [iOS] Work around bug 136593 by disabling the PDFDocumentImage live resize optimization there
995         https://bugs.webkit.org/show_bug.cgi?id=136594
996         rdar://problem/17457013
997
998         Reviewed by Simon Fraser.
999
1000         * platform/graphics/cg/PDFDocumentImage.cpp:
1001         (WebCore::PDFDocumentImage::updateCachedImageIfNeeded):
1002         Disable the optimization on iOS, because bug 136593 rears its head
1003         most often on iOS because it is more common to have contexts that always
1004         use low-quality image interpolation on that platform.
1005
1006 2014-09-05  Tim Horton  <timothy_horton@apple.com>
1007
1008         Doing a navigation on a non-opaque WKWebView can result in an empty layer tree
1009         https://bugs.webkit.org/show_bug.cgi?id=136590
1010         <rdar://problem/18234000>
1011
1012         Reviewed by Simon Fraser.
1013
1014         * page/FrameView.cpp:
1015         (WebCore::FrameView::setTransparent):
1016         Avoid scheduling a compositing layer update if the RenderView isn't the
1017         one associated with this FrameView. This can happen during a navigation,
1018         before the new Document (and RenderView) is swapped in. This is particularly
1019         bad in the case of setTransparent because it is called from Frame::createView,
1020         which is right in the middle of that transition window. If we let the compositing
1021         layer update go ahead, it can end up detaching the new Document's layer tree,
1022         and we have no mechanism that would cause it to reattach.
1023
1024 2014-09-05  Enrica Casucci  <enrica@apple.com>
1025
1026         Remove PLATFORM(IOS) from WebCore/editing (Part 3).
1027         https://bugs.webkit.org/show_bug.cgi?id=136474
1028
1029         Reviewed by Benjamin Poulain.
1030
1031         This patch removes the use of PLATFORM(IOS) from TextAffinity.h
1032         and removes the assumption that EAffinity values match NSSelectionAffinity
1033         values. It also removes the includes in TextAffinity.h, creating the need to
1034         include explicitly the files when necessary. It also removes the unnecessary
1035         use of platform specific types, replacing them with WebCore types.
1036
1037         * editing/TextAffinity.h:
1038         (kit): Deleted.
1039         (core): Deleted.
1040         * editing/cocoa/HTMLConverter.mm:
1041         * page/mac/WebCoreFrameView.h:
1042         * platform/ios/ScrollViewIOS.mm:
1043         (WebCore::ScrollView::platformSetScrollPosition):
1044         (WebCore::ScrollView::platformSetScrollOrigin):
1045         * platform/ios/wak/WAKScrollView.mm:
1046         (-[WAKScrollView setScrollOrigin:updatePositionAtAll:immediately:]):
1047         (-[WAKScrollView scrollOrigin]):
1048
1049 2014-09-05  Jer Noble  <jer.noble@apple.com>
1050
1051         Unreviewed GTK build fix; include StringPrintStream to pull in toString().
1052
1053         * html/HTMLMediaElement.h:
1054
1055 2014-09-05  Brady Eidson  <beidson@apple.com>
1056
1057         Allow pages with unload handlers in the page cache
1058         <rdar://problem/11084669> and https://bugs.webkit.org/show_bug.cgi?id=136535
1059
1060         Reviewed by Oliver Hunt.
1061
1062         This will match what iOS has been doing for some time.
1063
1064         Updated tests for new behavior.
1065
1066         * history/PageCache.cpp:
1067         (WebCore::logCanCacheFrameDecision):
1068         (WebCore::PageCache::canCachePageContainingThisFrame):
1069
1070 2014-09-05  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1071
1072         [SOUP] Implement ResourceResponse::platformSuggestedFilename() when USE(SOUP) is enabled.
1073         https://bugs.webkit.org/show_bug.cgi?id=136562
1074
1075         Reviewed by Martin Robinson.
1076
1077         No new tests, this makes existing tests pass.
1078
1079         * platform/network/soup/ResourceResponseSoup.cpp:
1080         (WebCore::ResourceResponse::platformSuggestedFilename):
1081         Implement ResourceResponse::platformSuggestedFilename() for SOUP after r173272, r173301 and r173305.
1082
1083 2014-09-05  peavo@outlook.com  <peavo@outlook.com>
1084
1085         [Curl] Compile error.
1086         https://bugs.webkit.org/show_bug.cgi?id=136574
1087
1088         Reviewed by Alex Christensen.
1089
1090         The ResourceResponse::setSuggestedFilename method is no longer available.
1091
1092         * platform/network/curl/CurlCacheEntry.cpp:
1093         (WebCore::CurlCacheEntry::setResponseFromCachedHeaders):
1094         * platform/network/curl/CurlDownload.cpp:
1095         (WebCore::CurlDownload::didReceiveHeader):
1096         * platform/network/curl/MultipartHandle.cpp:
1097         (WebCore::MultipartHandle::didReceiveResponse):
1098         * platform/network/curl/ResourceHandleManager.cpp:
1099         (WebCore::headerCallback):
1100         * platform/network/curl/ResourceResponse.h:
1101         (WebCore::ResourceResponse::platformSuggestedFilename):
1102
1103 2014-09-05  Benjamin Poulain  <benjamin@webkit.org>
1104
1105         Update the current matching of :read-only and :read-write to the latest spec
1106         https://bugs.webkit.org/show_bug.cgi?id=136566
1107
1108         Reviewed by Antti Koivisto.
1109
1110         WebKit's implementation of :read-only and :read-write dated from 2008 and
1111         it was based on the web form spec (http://www.w3.org/TR/web-forms-2/).
1112         That spec is very dead now.
1113
1114         There are new definitions of :read-only and :read-write in three specs:
1115         -the HTML living spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/scripting.html#selector-read-only
1116         -Selectors level 4: http://dev.w3.org/csswg/selectors4/#rw-pseudos
1117         -CSS 3 UI: http://www.w3.org/TR/css3-ui/
1118
1119         All the definitions say about the same thing. The definitions of Selector Level 4 and
1120         CSS 3 UI are very vague and poorly worded. I used the HTML when something was ambiguous.
1121
1122         In the new definitions, :read-only and :read-write are opposite. It is no longer possible to
1123         match both selector simultaneously for the same element.
1124         Consequently, I got rid of Element:matchesReadOnlyPseudoClass(). Matching :read-only is now equivalent
1125         to :not(:read-write).
1126
1127         The existing definition of :read-write was matching the spec so I could reuse that.
1128
1129         There is one more part to the new spec that is not addressed here: the pseudo class :read-write should
1130         now also match arbitrary editable HTMLElement (e.g. an element with contenteditable). This will be fixed
1131         in a follow up.
1132
1133         Tests: fast/css/read-only-read-write-input-basics.html
1134                fast/css/read-only-read-write-textarea-basics.html
1135                fast/selectors/read-only-read-write-input-basics.html
1136                fast/selectors/read-only-read-write-input-in-fieldset.html
1137                fast/selectors/read-only-read-write-textarea-basics.html
1138                fast/selectors/read-only-read-write-textarea-in-fieldset.html
1139
1140         * css/SelectorCheckerTestFunctions.h:
1141         (WebCore::matchesReadOnlyPseudoClass):
1142         * dom/Element.cpp:
1143         (WebCore::Element::matchesReadOnlyPseudoClass): Deleted.
1144         * dom/Element.h:
1145         * html/HTMLInputElement.cpp:
1146         (WebCore::HTMLInputElement::matchesReadOnlyPseudoClass): Deleted.
1147         * html/HTMLInputElement.h:
1148         * html/HTMLTextAreaElement.cpp:
1149         (WebCore::HTMLTextAreaElement::matchesReadOnlyPseudoClass): Deleted.
1150         * html/HTMLTextAreaElement.h:
1151         * html/shadow/SliderThumbElement.cpp:
1152         (WebCore::SliderThumbElement::matchesReadOnlyPseudoClass): Deleted.
1153         * html/shadow/SliderThumbElement.h:
1154         * html/shadow/SpinButtonElement.cpp:
1155         (WebCore::SpinButtonElement::matchesReadOnlyPseudoClass): Deleted.
1156         * html/shadow/SpinButtonElement.h:
1157         * rendering/RenderTheme.cpp:
1158         (WebCore::RenderTheme::isReadOnlyControl):
1159
1160 2014-09-05  Andreas Kling  <akling@apple.com>
1161
1162         CTTE: SVGResourcesCache should only allow RenderElements.
1163         <https://webkit.org/b/136578>
1164
1165         Only RenderElement subclasses can use SVG resources.
1166         Codify this by making SVGResourcesCache::m_cache keyed on RenderElement.
1167
1168         Reviewed by Antti Koivisto.
1169
1170         * rendering/svg/RenderSVGContainer.cpp:
1171         (WebCore::RenderSVGContainer::selfWillPaint):
1172         * rendering/svg/RenderSVGImage.cpp:
1173         (WebCore::RenderSVGImage::imageChanged):
1174         * rendering/svg/RenderSVGResource.cpp:
1175         (WebCore::requestPaintingResource):
1176         (WebCore::removeFromCacheAndInvalidateDependencies):
1177         * rendering/svg/RenderSVGResourceClipper.cpp:
1178         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1179         * rendering/svg/RenderSVGRoot.cpp:
1180         (WebCore::RenderSVGRoot::paintReplaced):
1181         * rendering/svg/RenderSVGShape.cpp:
1182         (WebCore::RenderSVGShape::shouldGenerateMarkerPositions):
1183         (WebCore::RenderSVGShape::markerRect):
1184         (WebCore::RenderSVGShape::drawMarkers):
1185         * rendering/svg/SVGRenderSupport.cpp:
1186         (WebCore::invalidateResourcesOfChildren):
1187         (WebCore::SVGRenderSupport::intersectRepaintRectWithResources):
1188         (WebCore::SVGRenderSupport::filtersForceContainerLayout):
1189         (WebCore::SVGRenderSupport::pointInClippingArea):
1190         * rendering/svg/SVGRenderingContext.cpp:
1191         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1192         * rendering/svg/SVGResourcesCache.cpp:
1193         (WebCore::resourcesCacheFromRenderer):
1194         (WebCore::SVGResourcesCache::cachedResourcesForRenderer):
1195         (WebCore::SVGResourcesCache::clientLayoutChanged):
1196         (WebCore::SVGResourcesCache::clientDestroyed):
1197         (WebCore::SVGResourcesCache::resourceDestroyed):
1198         (WebCore::SVGResourcesCache::cachedResourcesForRenderObject): Deleted.
1199         * rendering/svg/SVGResourcesCache.h:
1200         * rendering/svg/SVGResourcesCycleSolver.cpp:
1201         (WebCore::SVGResourcesCycleSolver::resourceContainsCycles):
1202
1203 2014-09-05  Simon Fraser  <simon.fraser@apple.com>
1204
1205         IDB version changed events should have a valid eventType()
1206         https://bugs.webkit.org/show_bug.cgi?id=136583
1207
1208         Reviewed by Brady Eidson.
1209
1210         IDBDatabase::dispatchEvent() asserts that the event type is versionchangeEvent,
1211         but the version changed event created with an empty event type. Correct this.
1212
1213         * Modules/indexeddb/IDBDatabase.cpp:
1214         (WebCore::IDBDatabase::onVersionChange):
1215
1216 2014-09-05  Simon Fraser  <simon.fraser@apple.com>
1217
1218         Remove some PLATFORM(IOS) code in Color.h/cpp
1219         https://bugs.webkit.org/show_bug.cgi?id=136582
1220
1221         Reviewed by Dan Bates.
1222
1223         Remove Color::tap which is unused, and remove createCGColorWithDeviceWhite()
1224         which was only called in one file in WebKit.
1225
1226         * WebCore.exp.in:
1227         * platform/graphics/Color.h:
1228         * platform/graphics/cg/ColorCG.cpp:
1229         (WebCore::createCGColorWithDeviceWhite): Deleted.
1230
1231 2014-09-05  Beth Dakin  <bdakin@apple.com>
1232
1233         ScrollablArea::handleWheelEvent() should return early if the ScrollableArea is not 
1234         actually scrollable
1235         https://bugs.webkit.org/show_bug.cgi?id=136558
1236
1237         Reviewed by Simon Fraser.
1238
1239         This patch requires adding a new virtual function to ScrollableArea called 
1240         isScrollableOrRubberbandable(). Unfortunately, there is already a virtual function 
1241         of that name that exists on RenderLayerModelObject, which is only problematic 
1242         because RenderListBox inherits from both RenderLayerModelObject and 
1243         ScrollableArea. This patch resolves that conflict in the simplest way, by re-
1244         naming the RenderLayerModelObject version of the function to 
1245         isScrollableOrRubberbandableBox(). It’s a little unfortunate, but simpler than the 
1246         other solutions I came up with.
1247
1248         New ScrollableArea virtual function.
1249         * page/FrameView.cpp:
1250         (WebCore::FrameView::isScrollableOrRubberbandable):
1251         * page/FrameView.h:
1252
1253         The point of the whole patch! Return early if you can’t scroll or rubber band.
1254         * platform/ScrollableArea.cpp:
1255         (WebCore::ScrollableArea::handleWheelEvent):
1256
1257         New ScrollableArea virtual function.
1258         * platform/ScrollableArea.h:
1259         * platform/win/PopupMenuWin.h:
1260
1261         Re-name.
1262         * rendering/RenderBox.cpp:
1263         (WebCore::RenderBox::isScrollableOrRubberbandableBox):
1264         (WebCore::RenderBox::isScrollableOrRubberbandable): Deleted.
1265         * rendering/RenderBox.h:
1266
1267         Implement new ScrollableArea virtual function, and adapt to the re-name.
1268         * rendering/RenderLayer.cpp:
1269         (WebCore::RenderLayer::isScrollableOrRubberbandable):
1270         (WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):
1271         * rendering/RenderLayer.h:
1272
1273         Re-name.
1274         * rendering/RenderLayerModelObject.h:
1275         (WebCore::RenderLayerModelObject::isScrollableOrRubberbandableBox):
1276         (WebCore::RenderLayerModelObject::isScrollableOrRubberbandable): Deleted.
1277
1278         Implement ScrollableArea virtual function.
1279         * rendering/RenderListBox.cpp:
1280         (WebCore::RenderListBox::isScrollableOrRubberbandable):
1281         * rendering/RenderListBox.h:
1282
1283         Re-name.
1284         * rendering/RenderView.cpp:
1285         (WebCore::RenderView::isScrollableOrRubberbandableBox):
1286         (WebCore::RenderView::isScrollableOrRubberbandable): Deleted.
1287         * rendering/RenderView.h:
1288
1289 2014-06-06  Jer Noble  <jer.noble@apple.com>
1290
1291         Refactoring: make MediaTime the primary time type for audiovisual times.
1292         https://bugs.webkit.org/show_bug.cgi?id=133579
1293
1294         Reviewed by Eric Carlson.
1295
1296         In order to limit the number of floating-point rounding errors for media systems which
1297         can make use of rational time objects.
1298
1299         Add some convenience methods to convert between QTTime and MediaTime.
1300         * platform/graphics/mac/MediaTimeQTKit.h: Added.
1301         * platform/graphics/mac/MediaTimeQTKit.mm: Added.
1302         (WebCore::toMediaTime):
1303         (WebCore::toQTTime):
1304
1305         Rename MediaTimeMac -> MediaTimeAVFoundation:
1306         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp: Renamed from Source/WebCore/platform/mac/MediaTimeMac.cpp.
1307         (WebCore::toMediaTime):
1308         (WebCore::toCMTime):
1309         * platform/graphics/avfoundation/MediaTimeAVFoundation.h: Renamed from Source/WebCore/platform/mac/MediaTimeMac.h.
1310
1311         Use MediaTime instead of double:
1312         * Modules/mediasource/MediaSource.cpp:
1313         (WebCore::MediaSource::duration):
1314         (WebCore::MediaSource::currentTime):
1315         (WebCore::MediaSource::buffered):
1316         (WebCore::MediaSource::setDuration):
1317         (WebCore::MediaSource::activeRanges):
1318         * Modules/mediasource/MediaSource.h:
1319         * Modules/mediasource/SourceBuffer.cpp:
1320         (WebCore::SourceBuffer::remove):
1321         (WebCore::SourceBuffer::removeCodedFrames):
1322         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
1323         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1324         (WebCore::SourceBuffer::hasCurrentTime):
1325         (WebCore::SourceBuffer::hasFutureTime):
1326         (WebCore::SourceBuffer::canPlayThrough):
1327         * WebCore.xcodeproj/project.pbxproj:
1328         * bindings/js/JSDataCueCustom.cpp:
1329         (WebCore::JSDataCueConstructor::constructJSDataCue):
1330         * html/HTMLMediaElement.cpp:
1331         (WebCore::HTMLMediaElement::HTMLMediaElement):
1332         (WebCore::HTMLMediaElement::parseAttribute):
1333         * html/HTMLMediaElement.h:
1334         (WebCore::ValueToString<MediaTime>::string):
1335         * html/MediaFragmentURIParser.cpp:
1336         (WebCore::MediaFragmentURIParser::MediaFragmentURIParser):
1337         (WebCore::MediaFragmentURIParser::startTime):
1338         (WebCore::MediaFragmentURIParser::endTime):
1339         (WebCore::MediaFragmentURIParser::parseTimeFragment):
1340         (WebCore::MediaFragmentURIParser::parseNPTFragment):
1341         (WebCore::MediaFragmentURIParser::parseNPTTime):
1342         (WebCore::MediaFragmentURIParser::invalidTimeValue): Deleted.
1343         * html/MediaFragmentURIParser.h:
1344         * html/TimeRanges.h:
1345         (WebCore::TimeRanges::ranges):
1346         * html/track/DataCue.cpp:
1347         (WebCore::DataCue::DataCue):
1348         * html/track/DataCue.h:
1349         (WebCore::DataCue::create):
1350         * html/track/InbandDataTextTrack.cpp:
1351         (WebCore::InbandDataTextTrack::addDataCue):
1352         (WebCore::InbandDataTextTrack::updateDataCue):
1353         (WebCore::InbandDataTextTrack::removeDataCue):
1354         * html/track/InbandDataTextTrack.h:
1355         * html/track/InbandGenericTextTrack.cpp:
1356         (WebCore::InbandGenericTextTrack::updateCueFromCueData):
1357         (WebCore::InbandGenericTextTrack::addGenericCue):
1358         (WebCore::InbandGenericTextTrack::removeGenericCue):
1359         * html/track/InbandTextTrack.cpp:
1360         (WebCore::InbandTextTrack::startTimeVariance):
1361         * html/track/InbandTextTrack.h:
1362         * html/track/InbandWebVTTTextTrack.cpp:
1363         (WebCore::InbandWebVTTTextTrack::newCuesParsed):
1364         * html/track/TextTrack.cpp:
1365         (WebCore::TextTrack::addCue):
1366         (WebCore::TextTrack::hasCue):
1367         * html/track/TextTrack.h:
1368         (WebCore::TextTrack::startTimeVariance):
1369         * html/track/TextTrackCue.cpp:
1370         (WebCore::TextTrackCue::create):
1371         (WebCore::TextTrackCue::TextTrackCue):
1372         (WebCore::TextTrackCue::setStartTime):
1373         (WebCore::TextTrackCue::setEndTime):
1374         (WebCore::TextTrackCue::hasEquivalentStartTime):
1375         * html/track/TextTrackCue.h:
1376         (WebCore::TextTrackCue::startTime):
1377         (WebCore::TextTrackCue::endTime):
1378         * html/track/TextTrackCueGeneric.cpp:
1379         (WebCore::TextTrackCueGeneric::TextTrackCueGeneric):
1380         * html/track/TextTrackCueGeneric.h:
1381         * html/track/TextTrackCueList.cpp:
1382         (WebCore::TextTrackCueList::add):
1383         * html/track/VTTCue.cpp:
1384         (WebCore::VTTCue::VTTCue):
1385         (WebCore::VTTCue::markFutureAndPastNodes):
1386         (WebCore::VTTCue::updateDisplayTree):
1387         * html/track/VTTCue.h:
1388         (WebCore::VTTCue::create):
1389         * html/track/WebVTTParser.cpp:
1390         (WebCore::WebVTTParser::WebVTTParser):
1391         (WebCore::WebVTTParser::resetCueValues):
1392         (WebCore::WebVTTParser::collectTimeStamp):
1393         (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
1394         * html/track/WebVTTParser.h:
1395         (WebCore::WebVTTCueData::startTime):
1396         (WebCore::WebVTTCueData::setStartTime):
1397         (WebCore::WebVTTCueData::endTime):
1398         (WebCore::WebVTTCueData::setEndTime):
1399         (WebCore::WebVTTCueData::WebVTTCueData): Deleted.
1400         * platform/graphics/InbandTextTrackPrivateClient.h:
1401         (WebCore::GenericCueData::startTime):
1402         (WebCore::GenericCueData::setStartTime):
1403         (WebCore::GenericCueData::endTime):
1404         (WebCore::GenericCueData::setEndTime):
1405         (WebCore::GenericCueData::GenericCueData):
1406         * platform/graphics/MediaPlayer.cpp:
1407         (WebCore::MediaPlayer::duration):
1408         (WebCore::MediaPlayer::startTime):
1409         (WebCore::MediaPlayer::initialTime):
1410         (WebCore::MediaPlayer::currentTime):
1411         (WebCore::MediaPlayer::seekWithTolerance):
1412         (WebCore::MediaPlayer::seek):
1413         (WebCore::MediaPlayer::maxTimeSeekable):
1414         (WebCore::MediaPlayer::minTimeSeekable):
1415         (WebCore::MediaPlayer::mediaTimeForTimeValue):
1416         (WebCore::MediaPlayer::totalFrameDelay):
1417         * platform/graphics/MediaPlayer.h:
1418         * platform/graphics/MediaPlayerPrivate.h:
1419         (WebCore::MediaPlayerPrivateInterface::durationMediaTime):
1420         (WebCore::MediaPlayerPrivateInterface::currentMediaTime):
1421         (WebCore::MediaPlayerPrivateInterface::seek):
1422         (WebCore::MediaPlayerPrivateInterface::seekWithTolerance):
1423         (WebCore::MediaPlayerPrivateInterface::startTime):
1424         (WebCore::MediaPlayerPrivateInterface::initialTime):
1425         (WebCore::MediaPlayerPrivateInterface::seekable):
1426         (WebCore::MediaPlayerPrivateInterface::maxMediaTimeSeekable):
1427         (WebCore::MediaPlayerPrivateInterface::minMediaTimeSeekable):
1428         (WebCore::MediaPlayerPrivateInterface::mediaTimeForTimeValue):
1429         (WebCore::MediaPlayerPrivateInterface::totalFrameDelay):
1430         (WebCore::MediaPlayerPrivateInterface::startTimeDouble): Deleted.
1431         (WebCore::MediaPlayerPrivateInterface::maxTimeSeekableDouble): Deleted.
1432         (WebCore::MediaPlayerPrivateInterface::mediaTimeForTimeValueDouble): Deleted.
1433         * platform/graphics/MediaSourcePrivateClient.h:
1434         * platform/graphics/TrackPrivateBase.h:
1435         (WebCore::TrackPrivateBase::startTimeVariance):
1436         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
1437         (WebCore::InbandMetadataTextTrackPrivateAVF::InbandMetadataTextTrackPrivateAVF):
1438         (WebCore::InbandMetadataTextTrackPrivateAVF::addDataCue):
1439         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes):
1440         (WebCore::InbandMetadataTextTrackPrivateAVF::flushPartialCues):
1441         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
1442         (WebCore::IncompleteMetaDataCue::IncompleteMetaDataCue):
1443         (WebCore::IncompleteMetaDataCue::startTime):
1444         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
1445         (WebCore::InbandTextTrackPrivateAVF::processCue):
1446         (WebCore::InbandTextTrackPrivateAVF::resetCueValues):
1447         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
1448         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1449         (WebCore::MediaPlayerPrivateAVFoundation::MediaPlayerPrivateAVFoundation):
1450         (WebCore::MediaPlayerPrivateAVFoundation::durationMediaTime):
1451         (WebCore::MediaPlayerPrivateAVFoundation::seek):
1452         (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance):
1453         (WebCore::MediaPlayerPrivateAVFoundation::maxMediaTimeSeekable):
1454         (WebCore::MediaPlayerPrivateAVFoundation::minMediaTimeSeekable):
1455         (WebCore::MediaPlayerPrivateAVFoundation::maxTimeLoaded):
1456         (WebCore::MediaPlayerPrivateAVFoundation::didLoadingProgress):
1457         (WebCore::MediaPlayerPrivateAVFoundation::updateStates):
1458         (WebCore::MediaPlayerPrivateAVFoundation::loadedTimeRangesChanged):
1459         (WebCore::MediaPlayerPrivateAVFoundation::seekableTimeRangesChanged):
1460         (WebCore::MediaPlayerPrivateAVFoundation::timeChanged):
1461         (WebCore::MediaPlayerPrivateAVFoundation::didEnd):
1462         (WebCore::MediaPlayerPrivateAVFoundation::invalidateCachedDuration):
1463         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification):
1464         (WebCore::MediaPlayerPrivateAVFoundation::extraMemoryCost):
1465         (WebCore::MediaPlayerPrivateAVFoundation::duration): Deleted.
1466         (WebCore::MediaPlayerPrivateAVFoundation::maxTimeSeekableDouble): Deleted.
1467         (WebCore::MediaPlayerPrivateAVFoundation::minTimeSeekable): Deleted.
1468         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1469         (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification):
1470         (WebCore::MediaPlayerPrivateAVFoundation::Notification::time):
1471         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1472         (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration):
1473         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime):
1474         (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
1475         (WebCore::MediaPlayerPrivateAVFoundationCF::platformDuration):
1476         (WebCore::MediaPlayerPrivateAVFoundationCF::currentTime):
1477         (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
1478         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
1479         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
1480         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
1481         (WebCore::MediaPlayerPrivateAVFoundationCF::mediaTimeForTimeValue): Deleted.
1482         (WebCore::AVFWrapper::seekToTime): Deleted.
1483         (WebCore::LegibleOutputData::LegibleOutputData): Deleted.
1484         (WebCore::AVFWrapper::createImageForTimeInRect): Deleted.
1485         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMinTimeSeekable):
1486         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeSeekable):
1487         (WebCore::MediaPlayerPrivateAVFoundationCF::platformMaxTimeLoaded):
1488         (WebCore::MediaPlayerPrivateAVFoundationCF::mediaTimeForTimeValue): Deleted.
1489         (WebCore::AVFWrapper::seekToTime): Deleted.
1490         (WebCore::LegibleOutputData::LegibleOutputData): Deleted.
1491         (WebCore::AVFWrapper::createImageForTimeInRect): Deleted.
1492         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1493         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1494         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
1495         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
1496         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
1497         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentMediaTime):
1498         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):
1499         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMinTimeSeekable):
1500         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable):
1501         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeLoaded):
1502         (WebCore::MediaPlayerPrivateAVFoundationObjC::mediaTimeForTimeValue):
1503         (WebCore::MediaPlayerPrivateAVFoundationObjC::processCue):
1504         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
1505         (WebCore::MediaPlayerPrivateAVFoundationObjC::durationDidChange):
1506         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
1507         (-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
1508         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime): Deleted.
1509         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1510         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1511         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationMediaTime):
1512         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTime):
1513         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::initialTime):
1514         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekWithTolerance):
1515         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekInternal):
1516         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
1517         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxMediaTimeSeekable):
1518         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minMediaTimeSeekable):
1519         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::totalFrameDelay):
1520         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::durationDouble): Deleted.
1521         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::currentTimeDouble): Deleted.
1522         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::startTimeDouble): Deleted.
1523         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::maxTimeSeekableDouble): Deleted.
1524         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::minTimeSeekable): Deleted.
1525         * platform/graphics/avfoundation/objc/OutOfBandTextTrackPrivateAVF.h:
1526         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1527         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
1528         (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue):
1529         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
1530         (WebCore::InbandMetadataTextTrackPrivateGStreamer::addDataCue):
1531         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1532         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
1533         (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
1534         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
1535         (WebCore::MediaPlayerPrivateGStreamer::processTableOfContentsEntry):
1536         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1537         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1538         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1539         (WebCore::maxValueForTimeRanges):
1540         (WebCore::MediaPlayerPrivateQTKit::MediaPlayerPrivateQTKit):
1541         (WebCore::MediaPlayerPrivateQTKit::durationMediaTime):
1542         (WebCore::MediaPlayerPrivateQTKit::currentMediaTime):
1543         (WebCore::MediaPlayerPrivateQTKit::seek):
1544         (WebCore::MediaPlayerPrivateQTKit::doSeek):
1545         (WebCore::MediaPlayerPrivateQTKit::cancelSeek):
1546         (WebCore::MediaPlayerPrivateQTKit::seekTimerFired):
1547         (WebCore::MediaPlayerPrivateQTKit::seeking):
1548         (WebCore::MediaPlayerPrivateQTKit::setPreservesPitch):
1549         (WebCore::MediaPlayerPrivateQTKit::buffered):
1550         (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeSeekable):
1551         (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeLoaded):
1552         (WebCore::MediaPlayerPrivateQTKit::didLoadingProgress):
1553         (WebCore::MediaPlayerPrivateQTKit::updateStates):
1554         (WebCore::MediaPlayerPrivateQTKit::timeChanged):
1555         (WebCore::MediaPlayerPrivateQTKit::didEnd):
1556         (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeSeekable):
1557         (WebCore::MediaPlayerPrivateQTKit::maxMediaTimeLoaded):
1558         (WebCore::MediaPlayerPrivateQTKit::createQTTime): Deleted.
1559         (WebCore::MediaPlayerPrivateQTKit::duration): Deleted.
1560         (WebCore::MediaPlayerPrivateQTKit::currentTime): Deleted.
1561         (WebCore::MediaPlayerPrivateQTKit::maxTimeSeekable): Deleted.
1562         (WebCore::MediaPlayerPrivateQTKit::maxTimeLoaded): Deleted.
1563         (WebCore::MediaPlayerPrivateQTKit::mediaTimeForTimeValue): Deleted.
1564         * platform/mac/PlatformClockCM.mm:
1565         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1566         (WebCore::MockMediaPlayerMediaSource::maxMediaTimeSeekable):
1567         (WebCore::MockMediaPlayerMediaSource::currentMediaTime):
1568         (WebCore::MockMediaPlayerMediaSource::durationMediaTime):
1569         (WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
1570         (WebCore::MockMediaPlayerMediaSource::totalFrameDelay):
1571         (WebCore::MockMediaPlayerMediaSource::maxTimeSeekableDouble): Deleted.
1572         (WebCore::MockMediaPlayerMediaSource::currentTimeDouble): Deleted.
1573         (WebCore::MockMediaPlayerMediaSource::durationDouble): Deleted.
1574         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
1575         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
1576         (WebCore::MockMediaSourcePrivate::MockMediaSourcePrivate):
1577         * platform/mock/mediasource/MockMediaSourcePrivate.h:
1578         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
1579         (WebCore::MockSourceBufferPrivate::enqueueSample):
1580
1581 2014-09-05  Antti Koivisto  <antti@apple.com>
1582
1583         REGRESSION(r173272): Two blob tests failing on WK1
1584         https://bugs.webkit.org/show_bug.cgi?id=136573
1585
1586         Reviewed by Alexey Proskuryakov.
1587
1588         http/tests/fileapi/blob-url-in-subframe.html
1589         http/tests/security/mixedContent/blob-url-in-iframe.html
1590
1591         * platform/network/BlobResourceHandle.cpp:
1592         (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
1593
1594             No need to set this twice.
1595
1596         * platform/network/mac/ResourceResponseMac.mm:
1597         (WebCore::ResourceResponse::initNSURLResponse):
1598
1599             Also test that it is an HTTP URL before using NSHTTPURLResponse. Blobs create non-HTTP URLs with status codes.
1600             Pass the accidentally lost expected content length.
1601
1602 2014-09-05  Zalan Bujtas  <zalan@apple.com>
1603
1604         Move computeInlinePreferredLogicalWidths() from RenderBlock to RenderBlockFlow
1605         https://bugs.webkit.org/show_bug.cgi?id=136461
1606
1607         Reviewed by Darin Adler.
1608
1609         This patch enables us to go from const_cast<RenderBlockFlow*>(this)->computeInlinePreferredLogicalWidths()
1610         to computeInlinePreferredLogicalWidths().
1611
1612         Covered by existing tests.
1613
1614         * rendering/RenderBlock.cpp:
1615         (WebCore::InlineMinMaxIterator::endOfInline): Deleted.
1616         (WebCore::InlineMinMaxIterator::next): Deleted.
1617         (WebCore::getBPMWidth): Deleted.
1618         (WebCore::getBorderPaddingMargin): Deleted.
1619         (WebCore::stripTrailingSpace): Deleted.
1620         (WebCore::preferredWidth): Deleted.
1621         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths): Deleted.
1622         * rendering/RenderBlock.h:
1623         * rendering/RenderBlockFlow.cpp:
1624         (WebCore::RenderBlockFlow::computeIntrinsicLogicalWidths):
1625         (WebCore::InlineMinMaxIterator::initial): The (parent == current) condition was used as 'initial' state before.
1626         and in order to make computeInlinePreferredLogicalWidths const, InlineMinMaxIterator() needs to take const RenderObject*.
1627         (WebCore::InlineMinMaxIterator::next):
1628         (WebCore::getBPMWidth):
1629         (WebCore::getBorderPaddingMargin):
1630         (WebCore::stripTrailingSpace):
1631         (WebCore::preferredWidth):
1632         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
1633         * rendering/RenderBlockFlow.h:
1634
1635 2014-09-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1636
1637         Unreviewed, build fix for EFL and GTK ports since r173272.
1638
1639         * platform/network/soup/ResourceResponseSoup.cpp:
1640         (WebCore::ResourceResponse::updateFromSoupMessageHeaders):
1641
1642 2014-09-04  Pratik Solanki  <psolanki@apple.com>
1643
1644         Unreviewed. Speculative build fix. Add platformSuggestedFilename() to all the ResourceResponse header files.
1645
1646         * platform/network/curl/ResourceResponse.h:
1647         (WebCore::ResourceResponse::platformSuggestedFilename):
1648         * platform/network/soup/ResourceResponse.h:
1649         * platform/network/win/ResourceResponse.h:
1650         (WebCore::ResourceResponse::platformSuggestedFilename):
1651
1652 2014-09-04  Pratik Solanki  <psolanki@apple.com>
1653
1654         Unreviewed. Another speculative build fix after r173272. Add a stub implementation for
1655         ResourceResponse::platformSuggestedFilename(). Filed bug 136562 for proper fix.
1656
1657         * platform/network/soup/ResourceResponseSoup.cpp:
1658         (ResourceResponse::platformSuggestedFilename):
1659
1660 2014-09-04  Pratik Solanki  <psolanki@apple.com>
1661
1662         Unreviewed. Speculative EFL and GTK build fix after r173272. Remove the filename argument
1663         from the various ResourceResponse constructors.
1664
1665         * platform/network/curl/ResourceResponse.h:
1666         (WebCore::ResourceResponse::ResourceResponse):
1667         * platform/network/soup/ResourceResponse.h:
1668         (WebCore::ResourceResponse::ResourceResponse):
1669         * platform/network/win/ResourceResponse.h:
1670         (WebCore::ResourceResponse::ResourceResponse):
1671
1672 2014-09-04  Simon Fraser  <simon.fraser@apple.com>
1673
1674         border-radius should not force layer backing store
1675         https://bugs.webkit.org/show_bug.cgi?id=136555
1676
1677         Reviewed by Dean Jackson.
1678         
1679         Border-radius is not a reason to allocate backing store; it's not relevant unless
1680         we also have a border or background, and hasBoxDecorations() already checks for that.
1681         
1682         With that gone, we can now use renderer.hasBoxDecorations() (which also checks for
1683         a background), but it doesn't check for outlines, so do that in addition.
1684
1685         Test: compositing/backing/border-radius-no-backing.html
1686
1687         * rendering/RenderLayer.cpp:
1688         (WebCore::RenderLayer::calculateClipRects):
1689
1690 2014-09-04  Simon Fraser  <simon.fraser@apple.com>
1691
1692         CSS filter on a compositing layer should not cause unncessary backing store allocation
1693         https://bugs.webkit.org/show_bug.cgi?id=136557
1694
1695         Reviewed by Dean Jackson.
1696         
1697         Remove the style.hasFilter() check from hasBoxDecorations(), since filters aren't
1698         a box decoration. This allows creation of simple container layers with composited filters.
1699
1700         Test: compositing/backing/filter-no-backing.html
1701
1702         * rendering/RenderLayer.cpp:
1703         (WebCore::RenderLayer::calculateClipRects):
1704
1705 2014-09-04  Simon Fraser  <simon.fraser@apple.com>
1706
1707         Improve the logic for compositing backing store avoidance
1708         https://bugs.webkit.org/show_bug.cgi?id=136556
1709
1710         Reviewed by Dean Jackson.
1711         
1712         Avoid backing store allocation in more cases by improving the logic that detects
1713         whether a RenderLayer has any painted, non-layer descendent renderers.
1714         
1715         Rename RenderLayer::hasNonEmptyChildRenderers() to hasPaintingNonLayerDescendants(),
1716         and make it recur 3 levels deep, walking child lists of up to 20 siblings looking
1717         for renderers that paint anything. Any renderer with box decorations paints;
1718         replaced elements paint, and non-whitespace text nodes paint. We can avoid
1719         making backing store when whitespace nodes are present only when user-select is none,
1720         since we have to ensure that there's backing store to paint the selection into.
1721
1722         Tests: compositing/backing/inline-block-no-backing.html
1723                compositing/backing/whitespace-nodes-no-backing.html
1724
1725         * rendering/RenderLayer.cpp:
1726         (WebCore::RenderLayer::hasNonEmptyChildRenderers): Call the recursive hasPaintingNonLayerDescendants().
1727         (WebCore::RenderLayer::hasBoxDecorationsOrBackground):
1728         (WebCore::RenderLayer::isVisuallyNonEmpty): Do the cheap tests first. Use isRenderReplaced()
1729         rather than isReplaced(), since the latter includes inline-blocks.
1730         * rendering/RenderLayerBacking.cpp:
1731         (WebCore::RenderLayerBacking::updateConfiguration): Don't run the isSimpleContainerCompositingLayer()
1732         logic in the root layer, since it always wants backing store.
1733         (WebCore::RenderLayerBacking::updateAfterDescendents): Ditto.
1734         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): isReplaced() includes
1735         inline-block, so use isRenderReplaced() instead.
1736
1737 2014-09-04  Daniel Bates  <dabates@apple.com>
1738
1739         [iOS] Fix the iOS build after <http://trac.webkit.org/changeset/173258>
1740         (https://bugs.webkit.org/show_bug.cgi?id=136494)
1741
1742         Use ENABLE_TOUCH_EVENT instead of ENABLE(TOUCH_EVENT) as the latter isn't available
1743         to some clients of this private header.
1744
1745         * platform/ios/wak/WAKResponder.h:
1746
1747 2014-09-04  Roger Fong  <roger_fong@apple.com>
1748
1749         Increase number of maximum active WebGL contexts.
1750         https://bugs.webkit.org/show_bug.cgi?id=136551.
1751         <rdar://problem/18236425>
1752
1753         Reviewed by Brent Fulgham.
1754
1755         Test covered by Khronos conformance test:
1756         webgl/1.0.2/conformance/context/context-creation-and-destruction.html
1757
1758         * platform/graphics/mac/GraphicsContext3DMac.mm:
1759
1760 2014-09-04  Roger Fong  <roger_fong@apple.com>
1761
1762         Clicking on a select element should never hide the popup menu.
1763         https://bugs.webkit.org/show_bug.cgi?id=136548.
1764         <rdar://problem/10215926>
1765
1766         Reviewed by Simon Fraser.
1767
1768         * html/HTMLSelectElement.cpp:
1769         (WebCore::HTMLSelectElement::menuListDefaultEventHandler):
1770         Never call hidePopup as a result of a click on a select element.
1771         The only way you can properly hide a popup is to click again or lose focus on the popup itself.
1772
1773 2014-09-04  Enrica Casucci  <enrica@apple.com>
1774
1775         Remove PLATFORM(IOS) from WebCore/editing (Part 2).
1776         https://bugs.webkit.org/show_bug.cgi?id=136474
1777
1778         Reviewed by Tim Horton.
1779
1780         Removing some more PLATFORM(IOS) from the editing code.
1781         Most of these changes are fixes that were made for IOS but never merged
1782         to OpenSource.
1783
1784         * editing/ApplyStyleCommand.cpp:
1785         (WebCore::ApplyStyleCommand::applyBlockStyle):
1786         * editing/ReplaceSelectionCommand.cpp:
1787         (WebCore::ReplaceSelectionCommand::doApply):
1788         * editing/VisibleSelection.cpp:
1789         (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
1790         (WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
1791         * editing/VisibleUnits.cpp:
1792         (WebCore::startOfDocument):
1793         (WebCore::endOfDocument):
1794         * editing/ios/EditorIOS.mm: No need for platform guard, this file is not built for Mac.
1795
1796 2014-09-03  Andy Estes  <aestes@apple.com>
1797
1798         [Cocoa] Some WebKitLegacy headers migrated from WebCore incorrectly contain WEBCORE_EXPORT
1799         https://bugs.webkit.org/show_bug.cgi?id=136521
1800
1801         Reviewed by Anders Carlsson.
1802
1803         * platform/ios/wak/WebCoreThread.h: Stopped defining WEBCORE_EXPORT.
1804
1805 2014-09-03  David Hyatt  <hyatt@apple.com>
1806
1807         Initial letters should clear one another.
1808         https://bugs.webkit.org/show_bug.cgi?id=136514
1809
1810         Reviewed by Simon Fraser.
1811
1812         Added fast/css-generated-content/initial-letter-clearance.html.
1813
1814         * rendering/RenderBlockFlow.cpp:
1815         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
1816         Compute the required clearance and add it both to the block's logical height
1817         and to the logical top offset of the float.
1818
1819         (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom):
1820         * rendering/RenderBlockFlow.h:
1821         A new method for determining the lowest floating initial letter.
1822
1823 2014-09-04  Joseph Pecoraro  <pecoraro@apple.com>
1824
1825         Use WTFString::find(char) in more places
1826         https://bugs.webkit.org/show_bug.cgi?id=136541
1827
1828         Reviewed by Daniel Bates.
1829
1830         * Modules/plugins/YouTubePluginReplacement.cpp:
1831         (WebCore::queryKeysAndValues):
1832         * html/HTMLEmbedElement.cpp:
1833         (WebCore::HTMLEmbedElement::parseAttribute):
1834         * html/HTMLObjectElement.cpp:
1835         (WebCore::HTMLObjectElement::parametersForPlugin):
1836         * html/parser/XSSAuditor.cpp:
1837         (WebCore::XSSAuditor::decodedSnippetForAttribute):
1838         * page/UserContentURLPattern.cpp:
1839         (WebCore::UserContentURLPattern::parse):
1840
1841 2014-09-04  Antti Koivisto  <antti@apple.com>
1842
1843         Try to fix iOS build.
1844
1845         * loader/FrameLoader.cpp:
1846         (WebCore::FrameLoader::initForSynthesizedDocument):
1847
1848 2014-09-04  Maciej Stachowiak  <mjs@apple.com>
1849
1850         Remove WebCoreSystemInterface glue for otherwise unused WKSI calls
1851         https://bugs.webkit.org/show_bug.cgi?id=136527
1852
1853         Reviewed by Alexey Proskuryakov.
1854
1855         * WebCore.exp.in:
1856         * WebCore.order:
1857         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1858         * platform/mac/WebCoreSystemInterface.h:
1859         * platform/mac/WebCoreSystemInterface.mm:
1860
1861 2014-09-04  Beth Dakin  <bdakin@apple.com>
1862
1863         REGRESSION (r172832): Poor 2-finger scrolling performance at theverge.com articles 
1864         (all tiles repaint)
1865         https://bugs.webkit.org/show_bug.cgi?id=136433
1866         -and corresponding-
1867         rdar://problem/18193942
1868
1869         Reviewed by Tim Horton.
1870
1871         We should ensure that we are only setting scroll elasticity for layers that return 
1872         true for scrollsOverflow(). When overflow:scroll is set on the root element, we 
1873         wound up setting the ScrollElasticity for the root, which messed up with the 
1874         special way that the root is meant to scroll. Even though overflow:scroll has been 
1875         set on the root, scrollsOverflow() is still false because we knew not to set 
1876         hasOverflowClip() since it’s the root, which is why this check works.  
1877         * rendering/RenderLayer.cpp:
1878         (WebCore::RenderLayer::setHasHorizontalScrollbar):
1879         (WebCore::RenderLayer::setHasVerticalScrollbar):
1880
1881         Really, we should have never even called RenderLayer::setHasVerticalScrollbar or 
1882         RenderLayer::setHasHorizontalScrollbar since it’s wrong to be creating a scrollbar 
1883         on RenderLayer for the root. We should make sure, in addition to the other 
1884         requirements consulted, that the renderer has an overflow clip before we create 
1885         the scrollbars.
1886         (WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
1887
1888 2014-09-04  Antti Koivisto  <antti@apple.com>
1889
1890         Remove ResourceResponse::m_suggestedFilename
1891         https://bugs.webkit.org/show_bug.cgi?id=136534
1892
1893         Reviewed by Alexey Proskuryakov.
1894
1895         This will simplify things.
1896
1897         * WebCore.exp.in:
1898         * loader/DocumentLoader.cpp:
1899         (WebCore::DocumentLoader::handleSubstituteDataLoadNow):
1900         (WebCore::DocumentLoader::maybeLoadEmpty):
1901         * loader/FrameLoader.cpp:
1902         (WebCore::FrameLoader::willLoadMediaElementURL):
1903         * loader/appcache/ApplicationCacheStorage.cpp:
1904         (WebCore::ApplicationCacheStorage::loadCache):
1905         * loader/archive/ArchiveResource.cpp:
1906         (WebCore::ArchiveResource::create):
1907         * platform/network/BlobResourceHandle.cpp:
1908         (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
1909         (WebCore::BlobResourceHandle::notifyResponseOnError):
1910         * platform/network/ResourceResponseBase.cpp:
1911         (WebCore::ResourceResponseBase::ResourceResponseBase):
1912         (WebCore::ResourceResponseBase::adopt):
1913         (WebCore::ResourceResponseBase::copyData):
1914         (WebCore::ResourceResponseBase::suggestedFilename):
1915         (WebCore::ResourceResponseBase::httpStatusText):
1916         (WebCore::ResourceResponseBase::setHTTPStatusText):
1917         (WebCore::ResourceResponseBase::httpHeaderField):
1918         (WebCore::ResourceResponseBase::setHTTPHeaderField):
1919         (WebCore::ResourceResponseBase::addHTTPHeaderField):
1920         (WebCore::ResourceResponseBase::httpHeaderFields):
1921         (WebCore::ResourceResponseBase::isAttachment):
1922         (WebCore::ResourceResponseBase::wasCached):
1923         (WebCore::ResourceResponseBase::connectionReused):
1924         (WebCore::ResourceResponseBase::setConnectionReused):
1925         (WebCore::ResourceResponseBase::connectionID):
1926         (WebCore::ResourceResponseBase::setConnectionID):
1927
1928             Remove AllFields initialization. It was only used to get m_suggestedFilename.
1929             Rename CommonAndUncommonFields to AllFields
1930
1931         (WebCore::ResourceResponseBase::setSuggestedFilename): Deleted.
1932
1933             No more setter.
1934
1935         * platform/network/ResourceResponseBase.h:
1936         (WebCore::ResourceResponseBase::platformSuggestedFileName):
1937
1938             Get the suggested filename from the platform class on-demand.
1939
1940         * platform/network/cf/ResourceResponse.h:
1941         (WebCore::ResourceResponse::ResourceResponse):
1942
1943             Remove never-used file name constructor parameter.
1944
1945         * platform/network/cf/ResourceResponseCFNet.cpp:
1946         (WebCore::ResourceResponse::platformLazyInit):
1947         * platform/network/mac/ResourceResponseMac.mm:
1948         (WebCore::ResourceResponse::initNSURLResponse):
1949
1950             Synthesize HTTP response properly so it can hold Content-Disposition for file name (and other headers).
1951
1952         (WebCore::ResourceResponse::platformLazyInit):
1953
1954             Don't pull the suggested filename anymore.
1955
1956         (WebCore::ResourceResponse::platformSuggestedFilename):
1957
1958             Get the suggested name from the (possibly synthetic) NSURLRequest.
1959
1960 2014-09-04  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
1961
1962         Remove CSS_FILTERS flag
1963         https://bugs.webkit.org/show_bug.cgi?id=136529
1964
1965         Reviewed by Dirk Schulze.
1966
1967         No new tests, no behaviour changed.
1968
1969         * Configurations/FeatureDefines.xcconfig:
1970         * DerivedSources.cpp:
1971         * WebCore.exp.in:
1972         * bindings/js/JSCSSValueCustom.cpp:
1973         (WebCore::toJS):
1974         * bindings/objc/DOMCSS.mm:
1975         (kitClass):
1976         * css/CSSComputedStyleDeclaration.cpp:
1977         (WebCore::ComputedStyleExtractor::valueForFilter):
1978         (WebCore::isLayoutDependent):
1979         (WebCore::ComputedStyleExtractor::propertyValue):
1980         * css/CSSComputedStyleDeclaration.h:
1981         * css/CSSFilterImageValue.cpp:
1982         * css/CSSFilterImageValue.h:
1983         * css/CSSImageGeneratorValue.cpp:
1984         (WebCore::CSSImageGeneratorValue::image):
1985         (WebCore::CSSImageGeneratorValue::isFixedSize):
1986         (WebCore::CSSImageGeneratorValue::fixedSize):
1987         (WebCore::CSSImageGeneratorValue::isPending):
1988         (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
1989         (WebCore::CSSImageGeneratorValue::loadSubimages):
1990         * css/CSSParser.cpp:
1991         (WebCore::CSSParser::parseValue):
1992         (WebCore::CSSParser::parseGeneratedImage):
1993         (WebCore::CSSParser::parseFilterImage):
1994         (WebCore::CSSParser::parseFilter):
1995         * css/CSSParser.h:
1996         * css/CSSPropertyNames.in:
1997         * css/CSSValue.cpp:
1998         (WebCore::CSSValue::hasFailedOrCanceledSubresources):
1999         (WebCore::CSSValue::equals):
2000         (WebCore::CSSValue::cssText):
2001         (WebCore::CSSValue::destroy):
2002         (WebCore::CSSValue::cloneForCSSOM):
2003         * css/CSSValue.h:
2004         * css/StyleResolver.cpp:
2005         (WebCore::StyleResolver::State::clear):
2006         (WebCore::StyleResolver::applyProperty):
2007         (WebCore::StyleResolver::generatedOrPendingFromValue):
2008         (WebCore::StyleResolver::loadPendingResources):
2009         * css/StyleResolver.h:
2010         * css/WebKitCSSFilterValue.cpp:
2011         * css/WebKitCSSFilterValue.h:
2012         * css/WebKitCSSFilterValue.idl:
2013         * loader/cache/CachedSVGDocumentReference.cpp:
2014         * loader/cache/CachedSVGDocumentReference.h:
2015         * page/FrameView.cpp:
2016         (WebCore::FrameView::scrollContentsFastPath):
2017         * page/animation/AnimationBase.cpp:
2018         (WebCore::AnimationBase::AnimationBase):
2019         * page/animation/AnimationBase.h:
2020         * page/animation/CSSPropertyAnimation.cpp:
2021         (WebCore::blendFilter):
2022         (WebCore::blendFunc):
2023         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2024         * page/animation/ImplicitAnimation.cpp:
2025         (WebCore::ImplicitAnimation::reset):
2026         (WebCore::ImplicitAnimation::checkForMatchingFilterFunctionLists):
2027         * page/animation/ImplicitAnimation.h:
2028         * page/animation/KeyframeAnimation.cpp:
2029         (WebCore::KeyframeAnimation::KeyframeAnimation):
2030         (WebCore::KeyframeAnimation::checkForMatchingFilterFunctionLists):
2031         * page/animation/KeyframeAnimation.h:
2032         * platform/graphics/GraphicsLayer.cpp:
2033         (WebCore::GraphicsLayer::validateFilterOperations):
2034         * platform/graphics/GraphicsLayer.h:
2035         * platform/graphics/GraphicsLayerAnimation.cpp:
2036         (WebCore::applyFilterAnimation):
2037         (WebCore::GraphicsLayerAnimation::applyInternal):
2038         * platform/graphics/GraphicsLayerAnimation.h:
2039         * platform/graphics/IntRectExtent.h:
2040         * platform/graphics/ca/GraphicsLayerCA.cpp:
2041         (WebCore::propertyIdToString):
2042         (WebCore::supportsAcceleratedFilterAnimations):
2043         (WebCore::GraphicsLayerCA::filtersCanBeComposited):
2044         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
2045         (WebCore::GraphicsLayerCA::setFilters):
2046         (WebCore::GraphicsLayerCA::addAnimation):
2047         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2048         (WebCore::GraphicsLayerCA::updateFilters):
2049         (WebCore::GraphicsLayerCA::ensureStructuralLayer):
2050         (WebCore::GraphicsLayerCA::createFilterAnimationsFromKeyframes):
2051         (WebCore::GraphicsLayerCA::setFilterAnimationKeyframes):
2052         * platform/graphics/ca/GraphicsLayerCA.h:
2053         * platform/graphics/ca/PlatformCAAnimation.h:
2054         * platform/graphics/ca/PlatformCAFilters.h:
2055         * platform/graphics/ca/PlatformCALayer.h:
2056         * platform/graphics/ca/mac/PlatformCAAnimationMac.h:
2057         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
2058         (PlatformCAAnimationMac::setFromValue):
2059         (PlatformCAAnimationMac::setToValue):
2060         (PlatformCAAnimationMac::setValues):
2061         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
2062         (PlatformCAFilters::animatedFilterPropertyName):
2063         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2064         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2065         (PlatformCALayerMac::clone):
2066         (PlatformCALayerMac::filtersCanBeComposited):
2067         * platform/graphics/ca/win/PlatformCAAnimationWin.cpp:
2068         (PlatformCAAnimationWin::setFromValue):
2069         (PlatformCAAnimationWin::setToValue):
2070         (PlatformCAAnimationWin::setValues):
2071         * platform/graphics/ca/win/PlatformCAAnimationWin.h:
2072         * platform/graphics/ca/win/PlatformCAFiltersWin.cpp:
2073         (PlatformCAFilters::animatedFilterPropertyName):
2074         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
2075         (PlatformCALayerWin::clone):
2076         * platform/graphics/ca/win/PlatformCALayerWin.h:
2077         * platform/graphics/filters/FilterOperation.cpp:
2078         * platform/graphics/filters/FilterOperation.h:
2079         * platform/graphics/filters/FilterOperations.cpp:
2080         * platform/graphics/filters/FilterOperations.h:
2081         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2082         (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
2083         (WebCore::GraphicsLayerTextureMapper::setFilters):
2084         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2085         * platform/graphics/texmap/TextureMapper.h:
2086         * platform/graphics/texmap/TextureMapperGL.cpp:
2087         (WebCore::TextureMapperGLData::TextureMapperGLData):
2088         (WebCore::prepareFilterProgram):
2089         (WebCore::TextureMapperGL::drawTexture):
2090         (WebCore::BitmapTextureGL::applyFilters):
2091         * platform/graphics/texmap/TextureMapperGL.h:
2092         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
2093         (WebCore::BitmapTextureImageBuffer::applyFilters):
2094         * platform/graphics/texmap/TextureMapperImageBuffer.h:
2095         * platform/graphics/texmap/TextureMapperLayer.cpp:
2096         (WebCore::TextureMapperLayer::setAnimatedFilters):
2097         (WebCore::TextureMapperLayer::computeOverlapRegions):
2098         (WebCore::TextureMapperLayer::paintIntoSurface):
2099         (WebCore::TextureMapperLayer::setFilters):
2100         (WebCore::TextureMapperLayer::syncAnimations):
2101         * platform/graphics/texmap/TextureMapperLayer.h:
2102         (WebCore::TextureMapperLayer::hasFilters):
2103         * platform/graphics/texmap/TextureMapperShaderProgram.h:
2104         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2105         (WebCore::CoordinatedGraphicsLayer::didChangeFilters):
2106         (WebCore::CoordinatedGraphicsLayer::setFilters):
2107         (WebCore::CoordinatedGraphicsLayer::syncFilters):
2108         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
2109         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2110         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
2111         (WebCore::CoordinatedGraphicsScene::setLayerFiltersIfNeeded):
2112         (WebCore::CoordinatedGraphicsScene::setLayerState):
2113         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2114         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
2115         * rendering/FilterEffectRenderer.cpp:
2116         * rendering/FilterEffectRenderer.h:
2117         * rendering/RenderElement.cpp:
2118         (WebCore::RenderElement::adjustStyleDifference):
2119         * rendering/RenderElement.h:
2120         (WebCore::RenderElement::hasFilter): Deleted.
2121         * rendering/RenderLayer.cpp:
2122         (WebCore::RenderLayer::RenderLayer):
2123         (WebCore::RenderLayer::~RenderLayer):
2124         (WebCore::transparencyClipBox):
2125         (WebCore::RenderLayer::paintLayerContents):
2126         (WebCore::RenderLayer::calculateClipRects):
2127         * rendering/RenderLayer.h:
2128         * rendering/RenderLayerBacking.cpp:
2129         (WebCore::RenderLayerBacking::RenderLayerBacking):
2130         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2131         (WebCore::RenderLayerBacking::updateFilters):
2132         (WebCore::RenderLayerBacking::updateGeometry):
2133         (WebCore::RenderLayerBacking::startAnimation):
2134         (WebCore::RenderLayerBacking::startTransition):
2135         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
2136         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
2137         * rendering/RenderLayerBacking.h:
2138         * rendering/RenderLayerCompositor.cpp:
2139         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
2140         (WebCore::RenderLayerCompositor::requiresCompositingForFilters):
2141         * rendering/RenderLayerFilterInfo.cpp:
2142         * rendering/RenderLayerFilterInfo.h:
2143         * rendering/RenderLayerModelObject.cpp:
2144         (WebCore::RenderLayerModelObject::styleWillChange):
2145         * rendering/RenderObject.cpp:
2146         (WebCore::RenderObject::containerForRepaint):
2147         (WebCore::RenderObject::repaintUsingContainer):
2148         * rendering/RenderView.cpp:
2149         (WebCore::RenderView::RenderView):
2150         * rendering/RenderView.h:
2151         * rendering/style/RenderStyle.cpp:
2152         (WebCore::RenderStyle::changeRequiresLayout):
2153         (WebCore::RenderStyle::changeRequiresLayerRepaint):
2154         * rendering/style/RenderStyle.h:
2155         * rendering/style/StyleFilterData.cpp:
2156         * rendering/style/StyleFilterData.h:
2157         * rendering/style/StyleRareNonInheritedData.cpp:
2158         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2159         (WebCore::StyleRareNonInheritedData::operator==):
2160         (WebCore::StyleRareNonInheritedData::hasFilters):
2161         * rendering/style/StyleRareNonInheritedData.h:
2162         * rendering/svg/RenderSVGResourceContainer.cpp:
2163         (WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation):
2164
2165 2014-09-04  Pratik Solanki  <psolanki@apple.com>
2166
2167         Remove iOS specific disk image cache
2168         https://bugs.webkit.org/show_bug.cgi?id=136517
2169
2170         Reviewed by Antti Koivisto.
2171
2172         Disk image cache code unnecessarily complicates SharedBuffer implementation. We can remove
2173         this now since we don't enable it in WebKit2 on iOS.
2174
2175         * WebCore.exp.in:
2176         * WebCore.xcodeproj/project.pbxproj:
2177         * loader/ResourceBuffer.cpp:
2178         (WebCore::ResourceBuffer::isUsingDiskImageCache): Deleted.
2179         * loader/ResourceBuffer.h:
2180         * loader/cache/CachedImage.cpp:
2181         (WebCore::CachedImage::canUseDiskImageCache): Deleted.
2182         (WebCore::CachedImage::useDiskImageCache): Deleted.
2183         * loader/cache/CachedImage.h:
2184         * loader/cache/CachedResource.cpp:
2185         (WebCore::CachedResource::isUsingDiskImageCache): Deleted.
2186         * loader/cache/CachedResource.h:
2187         (WebCore::CachedResource::canUseDiskImageCache): Deleted.
2188         (WebCore::CachedResource::useDiskImageCache): Deleted.
2189         * loader/cache/MemoryCache.cpp:
2190         (WebCore::MemoryCache::TypeStatistic::addResource):
2191         (WebCore::MemoryCache::dumpStats):
2192         (WebCore::MemoryCache::dumpLRULists):
2193         (WebCore::MemoryCache::flushCachedImagesToDisk): Deleted.
2194         * loader/cache/MemoryCache.h:
2195         (WebCore::MemoryCache::TypeStatistic::TypeStatistic):
2196         * loader/ios/DiskImageCacheClientIOS.h: Removed.
2197         * loader/ios/DiskImageCacheIOS.h: Removed.
2198         * loader/ios/DiskImageCacheIOS.mm: Removed.
2199         * platform/Logging.h:
2200         * platform/SharedBuffer.cpp:
2201         (WebCore::SharedBuffer::SharedBuffer):
2202         (WebCore::SharedBuffer::~SharedBuffer):
2203         (WebCore::SharedBuffer::data):
2204         (WebCore::SharedBuffer::append):
2205         (WebCore::SharedBuffer::buffer):
2206         (WebCore::SharedBuffer::getSomeData):
2207         (WebCore::SharedBuffer::isAllowedToBeMemoryMapped): Deleted.
2208         (WebCore::SharedBuffer::allowToBeMemoryMapped): Deleted.
2209         (WebCore::SharedBuffer::failedMemoryMap): Deleted.
2210         (WebCore::SharedBuffer::markAsMemoryMapped): Deleted.
2211         (WebCore::SharedBuffer::memoryMappedNotificationCallbackData): Deleted.
2212         (WebCore::SharedBuffer::memoryMappedNotificationCallback): Deleted.
2213         (WebCore::SharedBuffer::setMemoryMappedNotificationCallback): Deleted.
2214         * platform/SharedBuffer.h:
2215         (WebCore::SharedBuffer::isMemoryMapped): Deleted.
2216         * platform/cf/SharedBufferCF.cpp:
2217         (WebCore::SharedBuffer::SharedBuffer):
2218         * platform/mac/SharedBufferMac.mm:
2219         (-[WebCoreSharedBufferData length]):
2220         (-[WebCoreSharedBufferData bytes]):
2221         (WebCore::SharedBuffer::createCFData):
2222         (-[WebCoreSharedBufferData initWithMemoryMappedSharedBuffer:]): Deleted.
2223
2224 2014-09-04  Brian J. Burg  <burg@cs.washington.edu>
2225
2226         LegacyProfiler: ProfileNodes should be used more like structs
2227         https://bugs.webkit.org/show_bug.cgi?id=136381
2228
2229         Reviewed by Timothy Hatcher.
2230
2231         * inspector/ScriptProfileNode.idl: Remove an unused property.
2232
2233 2014-09-04  Renato Nagy  <rnagy@inf.u-szeged.hu>
2234
2235         Remove Qt cruft: MIMESniffing.cpp and MIMESniffing.h
2236         https://bugs.webkit.org/show_bug.cgi?id=136528
2237
2238         Reviewed by Alexey Proskuryakov.
2239
2240         * platform/network/MIMESniffing.cpp: Removed.
2241         * platform/network/MIMESniffing.h: Removed.
2242
2243 2014-09-04  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2244
2245         Introduce CSS_BASIC_SHAPES_TYPE_CASTS, and use it
2246         https://bugs.webkit.org/show_bug.cgi?id=136403
2247
2248         Reviewed by Daniel Bates.
2249
2250         toCSSBasicShapeFoo() will help to detect wrong type casting. So this patch generates it, and use it
2251         instead of static_cast<const CSSBasicShapeFoo*>().
2252
2253         No new tests no behavior changes.
2254
2255         * css/BasicShapeFunctions.cpp:
2256         (WebCore::basicShapeForValue):
2257         * css/CSSBasicShapes.cpp:
2258         (WebCore::CSSBasicShapeCircle::equals):
2259         (WebCore::CSSBasicShapeEllipse::equals):
2260         (WebCore::CSSBasicShapePolygon::equals):
2261         (WebCore::CSSBasicShapeInset::equals):
2262         * css/CSSBasicShapes.h:
2263
2264 2014-09-04  Daniel Bates  <dabates@apple.com>
2265
2266         [iOS] Make iOS build when ENABLE_TOUCH_EVENT and ENABLE_IOS_TOUCH_EVENTS disabled
2267         https://bugs.webkit.org/show_bug.cgi?id=136494
2268
2269         Reviewed by Andy Estes.
2270
2271         * WebCore.exp.in: Add ENABLE(IOS_TOUCH_EVENTS) and ENABLE(TOUCH_EVENTS) guards. Also, sort this file using
2272         the script Tools/Scripts/sort-export-file.
2273         * bindings/js/JSDocumentCustom.cpp: Add ENABLE(TOUCH_EVENTS)-guard around headers JSTouch.h and JSTouchList.h.
2274         * page/ios/WebEventRegion.mm: Substitute ENABLE(IOS_TOUCH_EVENTS) for ENABLE(TOUCH_EVENTS) since this
2275         code is specific to the iOS touch machinery.
2276         * page/scrolling/ScrollingCoordinator.cpp: Add ENABLE(IOS_TOUCH_EVENTS) and ENABLE(TOUCH_EVENTS) guards. 
2277         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion): Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS).
2278         * platform/ios/ScrollAnimatorIOS.h: Add ENABLE(TOUCH_EVENTS) guard.
2279         * platform/ios/ScrollAnimatorIOS.mm:
2280         (WebCore::ScrollAnimatorIOS::ScrollAnimatorIOS): Ditto.
2281         * platform/ios/wak/WAKResponder.h: Ditto.
2282         * rendering/RenderLayer.cpp:
2283         (WebCore::RenderLayer::RenderLayer): Add ENABLE(IOS_TOUCH_EVENTS) guard.
2284         (WebCore::RenderLayer::~RenderLayer): Substitute ENABLE(IOS_TOUCH_EVENTS) for PLATFORM(IOS) since this
2285         code is specific to the iOS touch machinery.
2286         * rendering/RenderLayer.h: Add ENABLE(IOS_TOUCH_EVENTS) guard.
2287
2288 2014-09-04  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2289
2290         REGRESSION(r173240) [GTK] Debug build broken.
2291
2292         Unreviewed build fix after r173240.
2293
2294         * dom/EventListenerMap.h: Add missing include.
2295
2296 2014-09-04  Dan Bernstein  <mitz@apple.com>
2297
2298         Get rid of HIGH_DPI_CANVAS leftovers
2299         https://bugs.webkit.org/show_bug.cgi?id=136491
2300
2301         Reviewed by Benjamin Poulain.
2302
2303         * html/HTMLCanvasElement.cpp:
2304         (WebCore::HTMLCanvasElement::HTMLCanvasElement): Removed m_deviceScaleFactor initializer.
2305         (WebCore::HTMLCanvasElement::reset): Removed checking if the scale factor has changed and
2306         updating m_deviceScaleFactor.
2307         (WebCore::HTMLCanvasElement::convertLogicalToDevice): Removed scaling by the device scale
2308         factor.
2309         (WebCore::HTMLCanvasElement::convertDeviceToLogical): Ditto.
2310         (WebCore::HTMLCanvasElement::createImageBuffer): Replaced m_deviceScaleFactor with a literal
2311         1.
2312         (WebCore::HTMLCanvasElement::targetDeviceScaleFactor): Deleted.
2313         * html/HTMLCanvasElement.h: Removed m_deviceScaleFactor member variable and its getter.
2314
2315         * html/canvas/CanvasRenderingContext2D.cpp:
2316         (WebCore::CanvasRenderingContext2D::putImageData): Removed scaling by the device scale
2317         factor.
2318         * html/canvas/CanvasRenderingContext2D.h:
2319         (WebCore::CanvasRenderingContext2D::webkitBackingStorePixelRatio): Changed to return 1.
2320
2321         * html/canvas/WebGLRenderingContext.cpp:
2322         (WebCore::WebGLRenderingContext::texImage2D): Replaced deviceScaleFactor() with 1.
2323         (WebCore::WebGLRenderingContext::texSubImage2D): Ditto.
2324
2325 2014-09-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2326
2327         XMLHttpRequest always defaults Content-Type to application/xml, while it should depend on data type
2328         https://bugs.webkit.org/show_bug.cgi?id=11049
2329
2330         Reviewed by Darin Adler.
2331
2332         Updated default mime type when sending text (changed from application/xml to text/plain;charset=UTF-8)
2333         Updated default mime type when sending document (set to application/xml;charset=UTF-8 for XML documents and text/html;charset=UTF-8 for HTML documents)
2334
2335         Test: http/tests/xmlhttprequest/post-content-type-document.html
2336
2337         * xml/XMLHttpRequest.cpp:
2338         (WebCore::XMLHttpRequest::send): updating default Content-Type valuess.
2339
2340 2014-09-02  Brian J. Burg  <burg@cs.washington.edu>
2341
2342         Web Inspector: fix prefixes for subclasses of JSC::ConsoleClient
2343         https://bugs.webkit.org/show_bug.cgi?id=136476
2344
2345         Reviewed by Timothy Hatcher.
2346
2347         No new tests. No behavior changed.
2348
2349         * CMakeLists.txt:
2350         * WebCore.exp.in:
2351         * WebCore.order:
2352         * WebCore.vcxproj/WebCore.vcxproj:
2353         * WebCore.vcxproj/WebCore.vcxproj.filters:
2354         * WebCore.xcodeproj/project.pbxproj:
2355         * bindings/js/JSCustomXPathNSResolver.cpp:
2356         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2357         * bindings/js/ScriptCachedFrameData.cpp:
2358         (WebCore::ScriptCachedFrameData::restore):
2359         * bindings/js/ScriptController.cpp:
2360         (WebCore::ScriptController::clearWindowShell):
2361         (WebCore::ScriptController::initScript):
2362         * css/CSSParser.cpp:
2363         (WebCore::CSSParser::logError):
2364         * dom/Document.cpp:
2365         (WebCore::Document::addConsoleMessage):
2366         (WebCore::Document::addMessage):
2367         * inspector/PageDebuggerAgent.cpp:
2368         (WebCore::PageDebuggerAgent::muteConsole):
2369         (WebCore::PageDebuggerAgent::unmuteConsole):
2370         (WebCore::PageDebuggerAgent::breakpointActionLog):
2371         * inspector/PageRuntimeAgent.cpp:
2372         (WebCore::PageRuntimeAgent::muteConsole):
2373         (WebCore::PageRuntimeAgent::unmuteConsole):
2374         * page/DOMWindow.cpp:
2375         (WebCore::DOMWindow::console):
2376         (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
2377         (WebCore::DOMWindow::close):
2378         (WebCore::DOMWindow::printErrorMessage):
2379         (WebCore::DOMWindow::pageConsole): Deleted.
2380         * page/DOMWindow.h:
2381         * page/Page.cpp:
2382         (WebCore::Page::Page):
2383         * page/Page.h:
2384         * page/PageConsoleClient.cpp: Renamed from Source/WebCore/page/PageConsole.cpp.
2385         * page/PageConsoleClient.h: Renamed from Source/WebCore/page/PageConsole.h.
2386         * testing/Internals.cpp:
2387         (WebCore::Internals::consoleProfiles):
2388         * testing/Internals.h:
2389         * xml/XSLStyleSheetLibxslt.cpp:
2390         (WebCore::XSLStyleSheet::parseString):
2391         * xml/XSLTProcessorLibxslt.cpp:
2392         (WebCore::XSLTProcessor::parseErrorFunc):
2393         (WebCore::docLoaderFunc):
2394
2395 2014-09-03  Maciej Stachowiak  <mjs@apple.com>
2396
2397         Fix a few leftovers from removing MIME-related WKSI usage
2398         https://bugs.webkit.org/show_bug.cgi?id=136513
2399
2400         Reviewed by Alexey Proskuryakov.
2401
2402         * WebCore.exp.in:
2403         * WebCore.order:
2404         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2405         * platform/mac/WebCoreSystemInterface.mm:
2406
2407 2014-09-03  Myles C. Maxfield  <mmaxfield@apple.com>
2408
2409         Text caret changes to color of text in Mail and Notes
2410         https://bugs.webkit.org/show_bug.cgi?id=135904
2411
2412         Reviewed by Simon Fraser.
2413
2414         Consult with the background color of spans inside editable divs to determine what color
2415         the caret should be.
2416
2417         Test: editing/caret/color-span-inside-editable.html
2418
2419         * editing/FrameSelection.cpp:
2420         (WebCore::CaretBase::paintCaret):
2421
2422 2014-09-03  Tim Horton  <timothy_horton@apple.com>
2423
2424         Fix the iOS build after r173230
2425
2426         * WebCore.exp.in:
2427
2428 2014-09-03  Myles C. Maxfield  <mmaxfield@apple.com>
2429
2430         Remove unnecessary function from TextPainter
2431         https://bugs.webkit.org/show_bug.cgi?id=136497
2432
2433         Reviewed by Simon Fraser.
2434
2435         Function is never called.
2436
2437         No new tests because there is no behavior change.
2438
2439         * rendering/TextPainter.cpp:
2440         (WebCore::TextPainter::paintTextInContext): Deleted.
2441         * rendering/TextPainter.h:
2442
2443 2014-09-03  Anders Carlsson  <andersca@apple.com>
2444
2445         Don't use DEPRECATED_DEFINE_STATIC_LOCAL for mutexes
2446         https://bugs.webkit.org/show_bug.cgi?id=136510
2447
2448         Reviewed by Andreas Kling.
2449
2450         Mutexes are intended to be used from multiple threads, and DEPRECATED_DEFINE_STATIC_LOCAL is not thread safe.
2451
2452         * bindings/objc/DOMInternal.mm:
2453         (wrapperCacheLock):
2454         (getDOMWrapper):
2455         (addDOMWrapper):
2456         (removeDOMWrapper):
2457         Use LazyNeverDestroyed + std::call_once, and switch the mutex over to an std::mutex.
2458
2459         * dom/EventListenerMap.cpp:
2460         (WebCore::EventListenerMap::assertNoActiveIterators):
2461         (WebCore::EventListenerIterator::EventListenerIterator):
2462         (WebCore::EventListenerIterator::~EventListenerIterator):
2463         (WebCore::activeIteratorCountMutex):
2464         (WebCore::EventListenerMap::EventListenerMap): Deleted.
2465         * dom/EventListenerMap.h:
2466         Use an std::atomic<int> instead of a mutex here.
2467
2468 2014-09-03  Enrica Casucci  <enrica@apple.com>
2469
2470         Remove PLATFORM(IOS) from WebCore/editing (Part 1).
2471         https://bugs.webkit.org/show_bug.cgi?id=136474
2472
2473         Reviewed by Tim Horton.
2474
2475         This is the first part of the work to remove PLATFORM(IOS) everywhere
2476         in the editing code.
2477
2478         * dom/Range.cpp:
2479         (WebCore::Range::create): Adding create function that takes VisiblePosition.
2480         * dom/Range.h:
2481         * editing/CompositeEditCommand.cpp:
2482         (WebCore::CompositeEditCommand::apply):
2483         (WebCore::CompositeEditCommand::inputText):
2484         * editing/CompositeEditCommand.h:
2485         * editing/DeleteButton.h: No need for the platform guard since it is already under
2486         DELETION_UI
2487         * editing/DeleteButtonController.cpp:
2488         (WebCore::DeleteButtonController::enable):
2489         (WebCore::DeleteButtonController::disable):
2490         * editing/EditAction.h:
2491         * editing/EditCommand.h:
2492         (WebCore::EditCommand::isInsertTextCommand):
2493         * editing/Editor.cpp:
2494         (WebCore::ClearTextCommand::CreateAndApply):
2495         * editing/Editor.h:
2496         * editing/EditorCommand.cpp:
2497         (WebCore::executeClearText):
2498         (WebCore::enabledCopy):
2499         (WebCore::enabledCut):
2500         (WebCore::enabledClearText):
2501         (WebCore::createCommandMap):
2502         * editing/FrameSelection.cpp:
2503         (WebCore::FrameSelection::modifyExtendingRight):
2504         (WebCore::FrameSelection::modifyExtendingForward):
2505         (WebCore::FrameSelection::modifyMovingRight):
2506         (WebCore::FrameSelection::modifyMovingForward):
2507         (WebCore::FrameSelection::modifyExtendingLeft):
2508         (WebCore::FrameSelection::modifyExtendingBackward):
2509         (WebCore::FrameSelection::modifyMovingLeft):
2510         (WebCore::FrameSelection::modifyMovingBackward):
2511         * editing/InsertTextCommand.h:
2512         * editing/TextCheckingHelper.cpp:
2513         * editing/TextGranularity.h:
2514         * editing/VisiblePosition.h:
2515         (WebCore::operator>=):
2516         * editing/VisibleSelection.cpp:
2517         (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
2518         * editing/VisibleUnits.cpp:
2519         * editing/VisibleUnits.h:
2520
2521 2014-09-03  Anders Carlsson  <andersca@apple.com>
2522
2523         Get rid of some uses of OwnPtr
2524         https://bugs.webkit.org/show_bug.cgi?id=136503
2525
2526         Reviewed by Sam Weinig.
2527
2528         * dom/ElementRareData.cpp:
2529         * dom/ElementRareData.h:
2530         (WebCore::ElementRareData::create): Deleted.
2531         * dom/MutationObserverRegistration.cpp:
2532         (WebCore::MutationObserverRegistration::create): Deleted.
2533         * dom/MutationObserverRegistration.h:
2534         * dom/Node.cpp:
2535         (WebCore::Node::materializeRareData):
2536         (WebCore::Node::didMoveToNewDocument):
2537         (WebCore::eventTargetDataMap):
2538         (WebCore::Node::eventTargetData):
2539         (WebCore::Node::ensureEventTargetData):
2540         (WebCore::Node::mutationObserverRegistry):
2541         (WebCore::Node::registerMutationObserver):
2542         (WebCore::Node::unregisterMutationObserver):
2543         (WebCore::Node::notifyMutationObserversNodeWillDetach):
2544         * dom/Node.h:
2545         * dom/NodeRareData.h:
2546         (WebCore::NodeListsNodeData::NodeListsNodeData):
2547         (WebCore::NodeRareData::NodeRareData):
2548         (WebCore::NodeRareData::clearNodeLists):
2549         (WebCore::NodeRareData::ensureNodeLists):
2550         (WebCore::NodeRareData::ensureMutationObserverData):
2551         (WebCore::NodeListsNodeData::create): Deleted.
2552         (WebCore::NodeMutationObserverData::create): Deleted.
2553         (WebCore::NodeRareData::create): Deleted.
2554
2555 2014-09-02  Maciej Stachowiak  <mjs@apple.com>
2556
2557         Clean up naming for and slightly refactor legacy video fullscreen support
2558         https://bugs.webkit.org/show_bug.cgi?id=136446
2559
2560         Reviewed by Jer Noble.
2561
2562         Key changes:
2563         supportsFullscreenForNode(Node*) --> supportsVideoFullscreen()
2564         enterFullscreenForNode(Node*) --> enterVideoFullscreenForVideoElement(HTMLVideoElement*)
2565         exitFullscreenForNode(Node*) --> exitVideoFullscreen()
2566         
2567         The old versions had unnecessary parameters, did not clearly distinguish their purpose
2568         from enterFullscreenForElement and friends, and wrongly claimed generality to all Nodes.
2569         Also changed many other places to use HTMLVideoElement* instead of Node* or 
2570         HTMLMediaElement* when they were in fact only used for video elements and would only
2571         work for such.
2572
2573         The implications of this include a bunch of renaming in some iOS fullscreen code.
2574
2575         * html/HTMLMediaElement.cpp:
2576         (WebCore::HTMLMediaElement::HTMLMediaElement): Rename m_isFullscreen flag to 
2577         m_isInVideoFullscreen, since it only covers the case of legacy video fullscreen,
2578         not element fullscreen.
2579         (WebCore::HTMLMediaElement::stop): ditto
2580         (WebCore::HTMLMediaElement::requiresTextTrackRepresentation): ditto
2581         (WebCore::HTMLMediaElement::isFullscreen): ditto
2582         (WebCore::HTMLMediaElement::enterFullscreen): Rename m_isFullscreen flag to
2583         m_isInVideoFullscreen. Hoist video element check here from all supportsFullscrenForNode
2584         clients. Adjust for relevant ChromeClient refactorings.
2585         (WebCore::HTMLMediaElement::enterFullscreen): ditto above
2586         * html/HTMLMediaElement.h:
2587         * html/HTMLVideoElement.cpp:
2588         (WebCore::HTMLVideoElement::supportsFullscreen): Adjust for relevant ChromeClient 
2589         refactorings.
2590         * page/ChromeClient.h:
2591         (WebCore::ChromeClient::supportsVideoFullscreen): Renamed from 
2592         supportsFullscreenForNode, and removed Node* parameter.
2593         (WebCore::ChromeClient::enterVideoFullscreenForVideoElement): Renamed from
2594         enterFulscreenForNode and changed Node* parameter to HTMLVideoElement*.
2595         (WebCore::ChromeClient::exitVideoFullscreen): Renamed from 
2596         exitFullscreenForNode, and removed Node* parameter.
2597         * platform/ios/WebVideoFullscreenControllerAVKit.h:
2598         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2599         (-[WebVideoFullscreenController videoElement]): Renamed from mediaElement;
2600         return a video element and not just a media element.
2601         (-[WebVideoFullscreenController dealloc]): Renamed _mediaElement data member
2602         to _videoElement and changed type accordingly.
2603         (-[WebVideoFullscreenController setVideoElement:]): Renamed from setMediaElement:
2604         and adjust parameter type accordingly.
2605         (-[WebVideoFullscreenController enterFullscreen:]): Video elements, not media
2606         elements.
2607         (-[WebVideoFullscreenController exitFullscreen]): ditto
2608         (-[WebVideoFullscreenController didCleanupFullscreen]): ditto
2609         * platform/ios/WebVideoFullscreenInterface.h:
2610         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Remove gratuitous HTMLMEdiaElement.h include
2611         and fix declarations accordingly.
2612         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Include WTFString.h
2613         * platform/ios/WebVideoFullscreenModelVideoElement.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.h.
2614         * platform/ios/WebVideoFullscreenModelVideoElement.mm: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelMediaElement.mm.
2615         (WebVideoFullscreenModelVideoElement) Renamed from WebVideoFullscreenModelMediaElement
2616         (WebVideoFullscreenModelVideoElement::setVideoElement): Renamed from setMediaElement and
2617         change param type accordingly. Also no need to check for actual videoness of the element.
2618         (WebVideoFullscreenModelVideoElement::updateForEventName): Rename data member from m_mediaElement
2619         to m_videoElement and change type accordingly.
2620         (WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer): ditto
2621         (WebVideoFullscreenModelVideoElement::play): ditto
2622         (WebVideoFullscreenModelVideoElement::pause): ditto
2623         (WebVideoFullscreenModelVideoElement::togglePlayState): ditto
2624         (WebVideoFullscreenModelVideoElement::beginScrubbing): ditto
2625         (WebVideoFullscreenModelVideoElement::endScrubbing): ditto
2626         (WebVideoFullscreenModelVideoElement::seekToTime): ditto
2627         (WebVideoFullscreenModelVideoElement::fastSeek): ditto
2628         (WebVideoFullscreenModelVideoElement::beginScanningForward): ditto
2629         (WebVideoFullscreenModelVideoElement::beginScanningBackward): ditto
2630         (WebVideoFullscreenModelVideoElement::endScanning): ditto
2631         (WebVideoFullscreenModelVideoElement::requestExitFullscreen): ditto
2632         (WebVideoFullscreenModelVideoElement::setVideoLayerFrame): ditto
2633         (WebVideoFullscreenModelVideoElement::setVideoLayerGravity): ditto
2634         (WebVideoFullscreenModelVideoElement::updateLegibleOptions): ditto
2635         * platform/mac/WebVideoFullscreenController.h:
2636         * platform/mac/WebVideoFullscreenController.mm:
2637         (-[WebVideoFullscreenController videoElement]): Renamed from mediaElement
2638         and update return type accordingly.
2639         (-[WebVideoFullscreenController setVideoElement:]): Renamed from 
2640         setMediaElement and update return type accordingly.
2641         (-[WebVideoFullscreenController videoElementRect]): Renamed
2642         from mediaElementRect.
2643         (-[WebVideoFullscreenController enterFullscreen:]): Update for
2644         rename.
2645         (-[WebVideoFullscreenController exitFullscreen]): ditto
2646         (-[WebVideoFullscreenController updatePowerAssertions]): Rename
2647         member from _mediaElement to _videoElement
2648         (-[WebVideoFullscreenController _requestExit]): ditto
2649         * WebCore.exp.in: Adjust for function and class renames.
2650         * WebCore.xcodeproj/project.pbxproj: Adjust for file renames.
2651
2652 2014-09-03  Benjamin Poulain  <benjamin@webkit.org>
2653
2654         Fix style invalidation of elements with multiple siblings dependencies
2655         https://bugs.webkit.org/show_bug.cgi?id=136472
2656
2657         Reviewed by Andreas Kling.
2658
2659         Previously, style invalidation of siblings was driven by a pair of flags:
2660         -ChildrenAffectedByDirectAdjacentRules.
2661         -ChildrenAffectedByForwardPositionalRules.
2662
2663         When ChildrenAffectedByDirectAdjacentRules was set, the element after an element
2664         with "needsStyleRecalc" was also recomputed. While this work for pair of elements:
2665             a + b
2666         It does not work for more than that. For example, with
2667             a.propery + b + c
2668         When the state of <a> changes, the style of <b> was updated, which is useless. The style
2669         of <c> was untouched, which is incorrect.
2670
2671         When ChildrenAffectedByForwardPositionalRules, all elements after one with "needsStyleRecalc"
2672         were invalidated. While more correct, it caused avalanche of style recalc and was not a very
2673         useful "optimization".
2674
2675  
2676         To fix the correctness issues (e.g. "a + b + c"), I could have gone two ways:
2677         1) Invalidate the parent of a, b, c. The children would always get a correct style
2678            when their parent's style would be resolved.
2679         2) Create invalidation relations to enforce that the right siblings are invalidated.
2680
2681         I have decided for a weak version of (2). The reason is that most DOM trees are very
2682         shallow while being very wide. Invalidating the parent generally causes massive style
2683         recalculation.
2684
2685         To keep things simple for now, there is no explicit dependency list between siblings.
2686         Instead, each element has a pair of flag:
2687         1) The element's style depends on the state of a previous sibling.
2688         2) The element's state affects following siblings.
2689
2690         With the notation "<-" for (1), "->" for (2), the selector "a + b + c" create this kind
2691         of marking:
2692             a  +  b  +  c
2693             ->    ->
2694                        <-
2695
2696         When <a> is invalidated, the style resolver will go through the chain of dependent elements
2697         and invalidate any element that can be affected by a prior invalidation, here <c>.
2698
2699         Overlaps are possible. For example with the two selector, "a + b + c", "b ~ d"
2700         the marking would be
2701             a  +  b  +  c  +  d
2702             ->    ->    ->
2703                        <-    <-
2704
2705         A change in <a> would invalidate both <c> and <d>. This is overkill, but the end result
2706         is correct and it is a net improvement over the previous flags.
2707
2708
2709         As usual, the CSS JIT makes an effort at compile time to reduce tree marking. SelectorChecker
2710         marks everything as usual.
2711
2712         Tests: fast/css/direct-adjacent-style-update-optimization.html
2713                fast/css/indirect-adjacent-style-update-optimization.html
2714                fast/css/non-matching-adjacent-style-update.html
2715                fast/selectors/first-of-type-direct-adjacent-style-update.html
2716                fast/selectors/first-of-type-sibling-style-update.html
2717                fast/selectors/id-direct-adjacent-style-update.html
2718                fast/selectors/id-sibling-style-update.html
2719                fast/selectors/nth-child-as-first-simple-selector-style-update.html
2720                fast/selectors/nth-child-direct-adjacent-style-update.html
2721                fast/selectors/nth-child-style-update.html
2722
2723         * css/SelectorChecker.cpp:
2724         (WebCore::isFirstOfType):
2725         (WebCore::countElementsBefore):
2726         (WebCore::countElementsOfTypeBefore):
2727         Counting selectors are not unlike adjacent combinators, they are handled the exact same way.
2728         For example a :nth-child(4) would generate somewhat similar marking as
2729             :first-child + * + * + *
2730
2731         Everything prior to the element with the counter affects the style of the element.
2732
2733         (WebCore::hasScrollbarPseudoElement):
2734         The assertion was incorrect. You can get an scrollbar pseudo ID on an element without scrollbar.
2735         It will never match, but such case is possible.
2736
2737         (WebCore::SelectorChecker::matchRecursively):
2738         (WebCore::SelectorChecker::checkOne):
2739         * css/StyleResolver.cpp:
2740         (WebCore::StyleResolver::canShareStyleWithElement):
2741         Previously, any subtree affected by sibling selectors were unshareable. That was done by checking
2742         for Element::hasFlagsSetDuringStylingOfChildren().
2743
2744         Now that sibling relation are local, they no longer prevent sharing of all children. Instead, we can
2745         test locally for subgroup with sibling relations.
2746
2747         * cssjit/SelectorCompiler.cpp:
2748         (WebCore::SelectorCompiler::isAdjacentRelation):
2749         (WebCore::SelectorCompiler::shouldMarkStyleIsAffectedByPreviousSibling):
2750         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
2751         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateDirectAdjacentTreeWalker):
2752         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateIndirectAdjacentTreeWalker):
2753         (WebCore::SelectorCompiler::SelectorCodeGenerator::markElementIfResolvingStyle):
2754         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthChild):
2755         (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle): Deleted.
2756         * dom/Document.cpp:
2757         (WebCore::nodeOrItsAncestorNeedsStyleRecalc):
2758         * dom/Element.cpp:
2759         (WebCore::checkForSiblingStyleChanges):
2760         (WebCore::Element::hasFlagsSetDuringStylingOfChildren):
2761         (WebCore::Element::setChildrenAffectedByForwardPositionalRules): Deleted.
2762         (WebCore::Element::rareDataChildrenAffectedByForwardPositionalRules): Deleted.
2763         * dom/Element.h:
2764         (WebCore::Element::affectsNextSiblingElementStyle):
2765         (WebCore::Element::setAffectsNextSiblingElementStyle):
2766         (WebCore::Element::setStyleIsAffectedByPreviousSibling):
2767         (WebCore::Element::childrenAffectedByPositionalRules): Deleted.
2768         (WebCore::Element::childrenAffectedByDirectAdjacentRules): Deleted.
2769         (WebCore::Element::childrenAffectedByForwardPositionalRules): Deleted.
2770         (WebCore::Element::setChildrenAffectedByDirectAdjacentRules): Deleted.
2771         (WebCore::Element::setChildrenAffectedByForwardPositionalRules): Deleted.
2772         * dom/ElementRareData.h:
2773         (WebCore::ElementRareData::ElementRareData):
2774         (WebCore::ElementRareData::resetDynamicRestyleObservations):
2775         (WebCore::ElementRareData::childrenAffectedByForwardPositionalRules): Deleted.
2776         (WebCore::ElementRareData::setChildrenAffectedByForwardPositionalRules): Deleted.
2777         * dom/Node.h:
2778         (WebCore::Node::styleIsAffectedByPreviousSibling):
2779         (WebCore::Node::flagAffectsNextSiblingElementStyle):
2780         (WebCore::Node::flagStyleIsAffectedByPreviousSibling):
2781         (WebCore::Node::flagChildrenAffectedByDirectAdjacentRulesFlag): Deleted.
2782         * html/HTMLElement.h:
2783         (WebCore::HTMLElement::isHTMLUnknownElement):
2784         * html/HTMLUnknownElement.h:
2785         * style/StyleResolveTree.cpp:
2786         (WebCore::Style::resetStyleForNonRenderedDescendants):
2787         (WebCore::Style::resolveTree):
2788
2789 2014-09-03  Simon Fraser  <simon.fraser@apple.com>
2790
2791         Dump SimpleLineLayout info in showRenderTree() output
2792         https://bugs.webkit.org/show_bug.cgi?id=136489
2793
2794         Reviewed by Zalan Bujtas.
2795         
2796         Include info about SimpleLineLayout to showRenderTree() output.
2797         
2798         Also show RenderText length, and truncate the RenderText contents
2799         to 80 chars (since the string is replicated in inline boxes or simple line layout output).
2800
2801         * rendering/RenderBlockFlow.cpp:
2802         (WebCore::RenderBlockFlow::showLineTreeAndMark):
2803         * rendering/RenderObject.cpp:
2804         (WebCore::RenderObject::showRenderObject):
2805         * rendering/SimpleLineLayoutFunctions.cpp:
2806         (WebCore::SimpleLineLayout::printPrefix):
2807         (WebCore::SimpleLineLayout::showLineTreeForFlow):
2808         * rendering/SimpleLineLayoutFunctions.h:
2809
2810 2014-09-03  Tim Horton  <timothy_horton@apple.com>
2811
2812         iOS build fix after r173217 
2813
2814         * platform/graphics/ios/FontServicesIOS.h:
2815         (WebCore::FontServicesIOS::capHeight):
2816         * platform/graphics/ios/FontServicesIOS.mm:
2817         (WebCore::FontServicesIOS::FontServicesIOS):
2818         This fixes the build, but I don't know if it's completely correct.
2819
2820 2014-09-03  Anders Carlsson  <andersca@apple.com>
2821
2822         Get rid of DOMImplementationFront
2823         https://bugs.webkit.org/show_bug.cgi?id=136495
2824
2825         Reviewed by Andreas Kling.
2826
2827         DOMImplementationFront was used in a workaround for a GCC bug, and since we're building with clang
2828         on Mac this is no longer an issue.
2829
2830         * WebCore.xcodeproj/project.pbxproj:
2831         * bindings/objc/DOMImplementationFront.cpp: Removed.
2832         * bindings/objc/DOMImplementationFront.h: Removed.
2833         Remove files.
2834
2835         * bindings/objc/DOMUtility.mm:
2836         (JSC::createDOMWrapper):
2837         Remove call to implementationFront.
2838
2839         * bindings/scripts/CodeGeneratorObjC.pm:
2840         (GetImplClassName):
2841         Remove DOMImplementation special case
2842
2843         (AddIncludesForType):
2844         Ditto.
2845
2846         (GenerateHeader):
2847         Use the class header name in the #import in the internal header.
2848
2849         (GenerateImplementation):
2850         Remove DOMImplementation special case.
2851
2852 2014-09-03  Brent Fulgham  <bfulgham@apple.com>
2853
2854         [Win] Improper release of unretained AVCFAssetResourceLoaderRef
2855         https://bugs.webkit.org/show_bug.cgi?id=136493
2856         <rdar://problem/18112559>
2857
2858         Reviewed by Eric Carlson.
2859
2860         Don't bother wrapping the return value of AVCFURLAssetGetResourceLoader in a
2861         RetainPtr. We don't hold onto this value or want to control its lifetime; we just
2862         want to pass it to the AVCFAssetResourceLoaderSetCallbacks function.
2863
2864         Use of the RetainPtr created a double-release and crash.
2865
2866         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2867         (WebCore::AVFWrapper::createAssetForURL): 
2868
2869 2014-09-03  David Hyatt  <hyatt@apple.com>
2870
2871         Add support for the initial-letter CSS property to first-letter
2872         https://bugs.webkit.org/show_bug.cgi?id=136484
2873
2874         Reviewed by Dean Jackson.
2875         
2876         New tests in fast/css-generated-content/initial-letter-*.html
2877
2878         This patch add support for the CSS initial-letter property, enabling
2879         better drop caps support in WebKit. Letters size to a specified number of
2880         paragraph lines, and align to the cap-height of the first line and the baseline
2881         of the last line.
2882
2883         * css/CSSComputedStyleDeclaration.cpp:
2884         (WebCore::ComputedStyleExtractor::propertyValue):
2885         Add -webkit-initial-letter to the list.
2886
2887         * css/CSSLineBoxContainValue.cpp:
2888         (WebCore::CSSLineBoxContainValue::customCSSText):
2889         * css/CSSLineBoxContainValue.h:
2890         Add support for a new value of line-box-contain, initial-letter, that causes
2891         lines to use cap-height above the baseline and the glyph bounds below the
2892         baseline.
2893
2894         * css/CSSParser.cpp:
2895         (WebCore::CSSParser::parseValue):
2896         Add support for parsing of initial-letter.
2897
2898         (WebCore::CSSParser::parseLineBoxContain):
2899         Add the new line-box-contain value for first-letters with initial-letter set.
2900
2901         * css/CSSPropertyNames.in:
2902         Add the new initial-letter property.
2903
2904         * css/CSSValueKeywords.in:
2905         Add the new initial-letter line-box-contain value.
2906
2907         * css/StyleResolver.cpp:
2908         (WebCore::StyleResolver::applyProperty):
2909         Map initial-letter into the RenderStyle.
2910
2911         * platform/graphics/FontMetrics.h:
2912         (WebCore::FontMetrics::hasCapHeight):
2913         (WebCore::FontMetrics::floatCapHeight):
2914         (WebCore::FontMetrics::setCapHeight):
2915         (WebCore::FontMetrics::capHeight):
2916         * platform/graphics/ios/SimpleFontDataIOS.mm:
2917         (WebCore::SimpleFontData::platformInit):
2918         * platform/graphics/mac/SimpleFontDataMac.mm:
2919         (WebCore::SimpleFontData::platformInit):
2920         Add support for cap-height to the font system. iOS and Mac have been patched.
2921         Other platforms will need to add support for cap-height to get this feature.
2922         hasCapHeight() will return false for unsupported platforms for graceful
2923         degradation.
2924
2925         * rendering/RenderBlock.cpp:
2926         (WebCore::styleForFirstLetter):
2927         Modified to check for initialLetterDrop/Height and to adjust the style
2928         accordingly (e.g., to apply float when needed).
2929
2930         * rendering/RenderBlockFlow.cpp:
2931         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
2932         Code to adjust the float's position and margin to do cap-height alignment
2933         and sunken letters.
2934
2935         * rendering/RenderBlockFlow.h:
2936         Remove the const from computeLogicalLocationForFloat, since the margin of the
2937         float can now be modified dynamically for sunken first-letters.
2938
2939         * rendering/RootInlineBox.cpp:
2940         (WebCore::RootInlineBox::ascentAndDescentForBox):
2941         Add support for initial-letter line-box-contain value.
2942
2943         * rendering/RootInlineBox.h:
2944         Add the includeInitialLetterForBox method to support the new line-box-contain value.
2945
2946         * rendering/style/RenderStyle.cpp:
2947         (WebCore::RenderStyle::changeRequiresLayout):
2948         * rendering/style/RenderStyle.h:
2949         * rendering/style/StyleRareNonInheritedData.cpp:
2950         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2951         (WebCore::StyleRareNonInheritedData::operator==):
2952         * rendering/style/StyleRareNonInheritedData.h:
2953         Normal maintenance stuff for addition of a new CSS property (making sure it is diffed
2954         properly for layout changes and copied on assignment, etc.)
2955
2956 2014-09-03  Brent Fulgham  <bfulgham@apple.com>
2957
2958         [Win] Prevent double-release on AVCFURLAssetRef
2959         https://bugs.webkit.org/show_bug.cgi?id=136492
2960         <rdar://problem/18206746>
2961
2962         Reviewed by Eric Carlson.
2963
2964         The AVFWrapper::setAsset method needs to retain the passed argument, since it
2965         originates from AVCFPlayerItemGetAsset, which does not increment the
2966         reference count of its return value as expected by Cocoa Get/Create/Copy
2967         semantics.
2968
2969         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2970         (WebCore::AVFWrapper::setAsset): Retain the passed argument.
2971
2972 2014-09-03  Dan Bernstein  <mitz@apple.com>
2973
2974         Get rid of HIGH_DPI_CANVAS leftovers
2975         https://bugs.webkit.org/show_bug.cgi?id=136491
2976
2977         Reviewed by Benjamin Poulain.
2978
2979         * Configurations/FeatureDefines.xcconfig: Removed definition of ENABLE_HIGH_DPI_CANVAS
2980         and removed it from FEATURE_DEFINES.
2981         * html/HTMLCanvasElement.cpp:
2982         (WebCore::HTMLCanvasElement::targetDeviceScaleFactor): Removed #if ENABLE(HIGH_DPI_CANVAS)
2983         code.
2984
2985 2014-09-03  Joseph Pecoraro  <pecoraro@apple.com>
2986
2987         Use StringBuilder append(char) and appendLiteral in more places
2988         https://bugs.webkit.org/show_bug.cgi?id=136470
2989
2990         Reviewed by Andreas Kling.
2991
2992         * Modules/indexeddb/IDBKeyData.cpp:
2993         (WebCore::IDBKeyData::loggingString):
2994         * Modules/websockets/WebSocket.cpp:
2995         (WebCore::encodeProtocolString):
2996         * Modules/websockets/WebSocketExtensionDispatcher.cpp:
2997         (WebCore::WebSocketExtensionDispatcher::createHeaderValue):
2998         (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
2999         * Modules/websockets/WebSocketHandshake.cpp:
3000         (WebCore::WebSocketHandshake::clientLocation):
3001         (WebCore::WebSocketHandshake::clientHandshakeMessage):
3002         * css/CSSCalculationValue.cpp:
3003         (WebCore::buildCssText):
3004         * css/CSSComputedStyleDeclaration.cpp:
3005         (WebCore::CSSComputedStyleDeclaration::cssText):
3006         * css/CSSMediaRule.cpp:
3007         (WebCore::CSSMediaRule::cssText):
3008         * css/CSSSelectorList.cpp:
3009         (WebCore::CSSSelectorList::selectorsText):
3010         * css/CSSSupportsRule.cpp:
3011         (WebCore::CSSSupportsRule::cssText):
3012         * css/MediaQuery.cpp:
3013         (WebCore::MediaQuery::serialize):
3014         * editing/MarkupAccumulator.cpp:
3015         (WebCore::MarkupAccumulator::generateUniquePrefix):
3016         * editing/markup.cpp:
3017         (WebCore::urlToMarkup):
3018         * fileapi/FileReaderLoader.cpp:
3019         (WebCore::FileReaderLoader::convertToDataURL):
3020         * html/EmailInputType.cpp:
3021         (WebCore::EmailInputType::sanitizeValue):
3022         * html/FormController.cpp:
3023         (WebCore::recordFormStructure):
3024         * html/parser/XSSAuditorDelegate.cpp:
3025         (WebCore::buildConsoleError):
3026         * html/track/WebVTTParser.cpp:
3027         (WebCore::WebVTTParser::collectCueText):
3028         * mathml/MathMLMencloseElement.cpp:
3029         (WebCore::MathMLMencloseElement::longDivLeftPadding):
3030         * page/PageSerializer.cpp:
3031         (WebCore::SerializerMarkupAccumulator::appendElement):
3032         * page/SecurityOrigin.cpp:
3033         (WebCore::SecurityOrigin::toRawString):
3034         * page/scrolling/ScrollingCoordinator.cpp:
3035         (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
3036         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3037         (WebCore::logThreadedScrollingMode):
3038         * platform/PODInterval.h:
3039         (WebCore::PODInterval::toString):
3040         * platform/PODRedBlackTree.h:
3041         (WebCore::PODRedBlackTree::dumpFromNode):
3042         * platform/UUID.cpp:
3043         (WebCore::createCanonicalUUIDString):
3044         * platform/network/ProxyServer.cpp:
3045         (WebCore::appendProxyServerString):
3046         (WebCore::toString):
3047         * platform/text/DateTimeFormat.cpp:
3048         (WebCore::DateTimeFormat::quoteAndAppendLiteral):
3049         * platform/text/PlatformLocale.cpp:
3050         (WebCore::DateTimeStringBuilder::zeroPadString):
3051         (WebCore::Locale::convertFromLocalizedNumber):
3052         * platform/text/TextStream.cpp:
3053         (WebCore::TextStream::operator<<):
3054         * rendering/RenderListMarker.cpp:
3055         (WebCore::listMarkerText):
3056         * testing/Internals.cpp:
3057         (WebCore::Internals::parserMetaData):
3058         (WebCore::Internals::getCurrentCursorInfo):
3059
3060 2014-09-03  Bear Travis  <betravis@adobe.com>
3061
3062         [CSS Font Loading] Enable Page Caching
3063         https://bugs.webkit.org/show_bug.cgi?id=136044
3064
3065         Reviewed by Andreas Kling.
3066
3067         Modifying FontLoader to track fonts loaded via the loadFont
3068         method as well as via CSS rules. Fonts loaded via loadFont are
3069         tracked in m_numLoadingFromJS, while fonts loaded via CSS rules
3070         are tracked in m_numLoadingFromCSS. The page is cacheable when no
3071         fonts are currently loading.
3072
3073         Added fast/css/fontloader-page-cache.html
3074
3075         * css/FontLoader.cpp:
3076         (WebCore::LoadFontCallback::create): Modified to take and store
3077         the number of fonts it will be loading.
3078         (WebCore::LoadFontCallback::createFromParams): Ditto.
3079         (WebCore::LoadFontCallback::familyCount): Getter for number of
3080         fonts loaded via this callback.
3081         (WebCore::LoadFontCallback::LoadFontCallback):
3082         (WebCore::LoadFontCallback::notifyLoaded): Callback the FontLoader
3083         to let it update its count when all the fonts have finished loading.
3084         (WebCore::FontLoader::loadFontDone): Ditto.
3085         (WebCore::FontLoader::FontLoader):
3086         (WebCore::FontLoader::beginFontLoading): Track the number of fonts
3087         loading.
3088         (WebCore::FontLoader::fontLoaded): Ditto.
3089         (WebCore::FontLoader::loadError): Ditto.
3090         (WebCore::FontLoader::loadFont):
3091         * css/FontLoader.h:
3092         (WebCore::FontLoader::loading):
3093
3094 2014-08-29  Gavin Barraclough  <barraclough@apple.com>
3095
3096         Simplify DOMTimer::adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
3097         https://bugs.webkit.org/show_bug.cgi?id=136402
3098
3099         Reviewed by Andreas Kling.
3100
3101         When the minimum DOM timer interval changes, the Page updates all DOMTimers accordingly.
3102         Updating the fire/repeat interval on TimerBase requires a delta, but in
3103         DOMTimer::adjustMinimumTimerInterval we have the new requested interval. In the case of
3104         timers we can get the current interval to calculate the delta by calling repeatInterval(),
3105         but in the case of one-shot timers neither TimerBase nor DOMTimer have store the interval
3106         that was actually set for the timer (DOMTimer knows the original, unadjusted timer, but
3107         not the actual interval). The way this currently works is that when the minimum interval
3108         changes, Page calls adjustMinimumTimerInterval providing the previous minimum. If the
3109         timer is one-shot, then adjustMinimumTimerInterval will use this to compute the delta
3110         based on what the interval would have been.
3111
3112         We can simplify & unify with the code to throttle interval timers when the nesting
3113         threshold is hit, by instead tracking the current timer interval as a member on DOMTimer &
3114         using this to compute the delta in all cases.
3115
3116         * dom/ScriptExecutionContext.cpp:
3117         (WebCore::ScriptExecutionContext::adjustMinimumTimerInterval):
3118             - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
3119         * page/DOMTimer.cpp:
3120         (WebCore::DOMTimer::DOMTimer):
3121             initialize m_currentTimerInterval
3122         (WebCore::DOMTimer::fired):
3123             - when the nesting level changes (potentially triggering throttling) just call updateTimerIntervalIfNecessary
3124         (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
3125             - compute delta based on m_currentTimerInterval
3126         (WebCore::DOMTimer::intervalClampedToMinimum):
3127             - this now always takes m_originalInterval and scriptExecutionContext()->minimumTimerInterval()
3128               as its inputs, so remove arguments.
3129         (WebCore::DOMTimer::adjustMinimumTimerInterval): Deleted.
3130             - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary
3131         * page/DOMTimer.h:
3132             - adjustMinimumTimerInterval -> updateTimerIntervalIfNecessary, added m_currentTimerInterval
3133
3134 2014-09-03  Daniel Bates  <dabates@apple.com>
3135
3136         [XSLT] Make WebKit build when XSLT is disabled
3137         https://bugs.webkit.org/show_bug.cgi?id=136471
3138
3139         Reviewed by Simon Fraser.
3140
3141         Fixes a Clang compiler warning that file-static function WebCore::hasNoStyleInformation is unused.
3142         This function is only called from ENABLE(XSLT)-guarded code. So, add a ENABLE(XSLT)-guard around
3143         WebCore::hasNoStyleInformation().
3144
3145         * xml/parser/XMLDocumentParserLibxml2.cpp:
3146         (WebCore::hasNoStyleInformation):
3147
3148 2014-09-02  Brian J. Burg  <burg@cs.washington.edu>
3149
3150         LegacyProfiler: remove redundant ProfileNode members and other cleanup
3151         https://bugs.webkit.org/show_bug.cgi?id=136380
3152
3153         Reviewed by Timothy Hatcher.
3154
3155         Remove Profile.idleTime, rename head to rootNode, and remove ProfileNode members.
3156
3157         Covered by existing tests.
3158
3159         * inspector/ScriptProfile.idl:
3160         * inspector/ScriptProfileNode.idl:
3161         * inspector/TimelineRecordFactory.cpp:
3162
3163 2014-09-02  Brian J. Burg  <burg@cs.washington.edu>
3164
3165         Web Inspector: remove ProfilerAgent and legacy profiler files in the frontend
3166         https://bugs.webkit.org/show_bug.cgi?id=136462
3167
3168         Reviewed by Timothy Hatcher.
3169
3170         It's not used by the frontend anymore.
3171
3172         No new tests, no behavior changed.
3173
3174         * CMakeLists.txt:
3175         * ForwardingHeaders/inspector/agents/InspectorProfilerAgent.h: Removed.
3176         * WebCore.order:
3177         * WebCore.vcxproj/WebCore.vcxproj:
3178         * WebCore.vcxproj/WebCore.vcxproj.filters:
3179         * WebCore.xcodeproj/project.pbxproj:
3180         * inspector/InspectorAllInOne.cpp:
3181         * inspector/InspectorController.cpp:
3182         (WebCore::InspectorController::InspectorController):
3183         * inspector/InspectorController.h:
3184         * inspector/InspectorInstrumentation.cpp:
3185         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
3186         * inspector/InstrumentingAgents.cpp:
3187         (WebCore::InstrumentingAgents::InstrumentingAgents):
3188         (WebCore::InstrumentingAgents::reset):
3189         * inspector/InstrumentingAgents.h:
3190         (WebCore::InstrumentingAgents::inspectorProfilerAgent): Deleted.
3191         (WebCore::InstrumentingAgents::setInspectorProfilerAgent): Deleted.
3192         * inspector/PageProfilerAgent.cpp: Removed.
3193         * inspector/PageProfilerAgent.h: Removed.
3194         * inspector/TimelineRecordFactory.cpp: Moved these builders to their only callsite.
3195         (WebCore::buildInspectorObject):
3196         (WebCore::buildProfileInspectorObject):
3197         (WebCore::TimelineRecordFactory::appendProfile):
3198         * inspector/WebProfilerAgent.cpp: Removed.
3199         * inspector/WebProfilerAgent.h: Removed.
3200         * inspector/WorkerInspectorController.cpp:
3201         (WebCore::WorkerInspectorController::WorkerInspectorController):
3202         * inspector/WorkerProfilerAgent.cpp: Removed.
3203         * inspector/WorkerProfilerAgent.h: Removed.
3204         * inspector/protocol/Timeline.json:
3205
3206 2014-09-02  Jer Noble  <jer.noble@apple.com>
3207
3208         [EME][Mac] Refactor CDMPrivateMediaSourceAVFObjC to allow sessions to be created without being attached to an AVStreamDataParser.
3209         https://bugs.webkit.org/show_bug.cgi?id=136016
3210
3211         Reviewed by Eric Carlson.
3212
3213         The CDMPrivateMediaPlayer class will delegate creation of CDMSession instances to the current MediaPlayer. This
3214         of course requires the MediaKeys object owning the CDM to be attached to a HTMLMediaElement, and specifically to
3215         one with a valid src attribute or source node which has sucessfully begun loading. For certain CDM operations,
3216         it would be better if a given MediaKeys could create a session without actually being connected to a
3217         HTMLMediaElement (yet).
3218
3219         To facilitate this for CDMSessionPrivateMediaSourceAVFObjC, add a new class, CDMPrivateMediaSourceAVFObjC, which
3220         is the primary factory for CDMSessionPrivateMediaSOurceAVFObjC. Disclaim responsibility for creating these sessions
3221         in MediaPlayerPrivateMediaSourceAVFObjC by not passing the "supportsKeySystem" method when registering itself.
3222
3223         Add methods to CDMSessionPrivateMediaSourceAVFObjC to allow SourceBuffers to be added and removed from the session,
3224         to support adding the session to the HTMLMediaElement after the session has been created.
3225
3226         Since MediaPlayerPrivate instance and  CDMSession instances must be able to communicate with one another, add a type()
3227         enum and virtual method to allow CDMSession instnaces to be distinguisted from (and casted to) one another.
3228
3229         * Modules/encryptedmedia/CDM.cpp:
3230         (WebCore::installedCDMFactories): Register CDMPrivateMediaSourceAVFObjC.
3231         (WebCore::CDM::createSession): Notify the MediaPlayer of the new CDMSession.
3232         * Modules/encryptedmedia/MediaKeySession.h:
3233         * Modules/encryptedmedia/MediaKeys.cpp:
3234         (WebCore::MediaKeys::setMediaElement): Notify the HTMLMediaElement of any existing sessions.
3235         * WebCore.xcodeproj/project.pbxproj:
3236         * platform/graphics/CDMSession.h:
3237         (WebCore::CDMSession::type): Added.
3238         * platform/graphics/MediaPlayer.cpp:
3239         (WebCore::MediaPlayer::setCDMSession): Pass through to the MediaPlayerPrivate.
3240         * platform/graphics/MediaPlayer.h:
3241         * platform/graphics/MediaPlayerPrivate.h:
3242         (WebCore::MediaPlayerPrivateInterface::setCDMSession): Added. Default no-op.
3243         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h: Added.
3244         (WebCore::CDMPrivateMediaSourceAVFObjC::CDMPrivateMediaSourceAVFObjC): Simple constructor.
3245         (WebCore::CDMPrivateMediaSourceAVFObjC::~CDMPrivateMediaSourceAVFObjC): Simple destructor.
3246         (WebCore::CDMPrivateMediaSourceAVFObjC::create): Simple factory.
3247         (WebCore::CDMPrivateMediaSourceAVFObjC::cdm): Simple accessor.
3248         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: 
3249         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystem): Moved from MediaPlayerPrivateMediaSourceAVFObjC.
3250         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystemAndMimeType): Ditto.
3251         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType): Ditto.
3252         (WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Returns new CDMSessionMediaSourceAVFObjC.
3253         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
3254         (WebCore::CDMSessionAVFoundationObjC::type): Added.
3255         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
3256         (WebCore::CDMSessionMediaSourceAVFObjC::type): Added.
3257         (WebCore::toCDMSessionMediaSourceAVFObjC): Throw assertion if type() is not correct.
3258         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
3259         (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC): Removed m_parent ivar.
3260         (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Ditto.
3261         (WebCore::CDMSessionMediaSourceAVFObjC::update): Determing which SourceBuffer is protected.
3262         (WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): Added.
3263         (WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Added.
3264         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3265         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3266         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
3267         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine): Remove supportsKeyType parameter.
3268         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): Remove keyType check.
3269         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession): Tell the CDMSession about outstanding SourceBuffers.
3270         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
3271         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
3272
3273 2014-09-02  Daniel Bates  <dabates@apple.com>
3274
3275         [Win] Attempt to fix the Windows build after <http://trac.webkit.org/changeset/173192>
3276         (https://bugs.webkit.org/show_bug.cgi?id=136467)
3277
3278         Declare ResourceHandleClient::connectionProperties() when building for iOS or when USE(CFNETWORK).
3279
3280         * platform/network/ResourceHandleClient.h:
3281
3282 2014-09-02  Daniel Bates  <dabates@apple.com>
3283
3284         [iOS] Support using Foundation networking code
3285         https://bugs.webkit.org/show_bug.cgi?id=136467
3286
3287         Reviewed by Pratik Solanki.
3288
3289         We should support building iOS WebKit with the Foundation networking code
3290         (i.e. !USE(CFNETWORK)).
3291
3292         Additionally, disable USE(CFNETWORK) and use the Foundation networking code
3293         by default when building iOS WebKit without the Apple Internal SDK.
3294
3295         * Configurations/WebCore.xcconfig: Remove file WebCoreURLResponse.mm from the list of excluded files
3296         so that we compile an implementation for function WebCore::synthesizeRedirectResponseIfNecessary when
3297         building without USE(CFNETWORK).
3298         * WebCore.exp.in: Add symbols for WebCore::synthesizeRedirectResponseIfNecessary() and WebCore::ResourceHandleClient::willCacheResponseAsync().
3299         * WebCore.xcodeproj/project.pbxproj: Add new files CFNetworkConnectionCacheSPI.h and CFURLRequestSPI.h.
3300         Also move group platform/spi such that it appears in alphabetical order in the platform group.
3301         * platform/cf/URLCF.cpp: Remove unnecessary header <CoreFoundation/CFPriv.h>.
3302         * platform/network/ResourceHandle.h: Declare iOS-specific variant of ResourceHandle::createNSURLConnection().
3303         * platform/network/ResourceHandleClient.h: Always include header <wtf/RetainPtr.h> when building for iOS.
3304         (WebCore::ResourceHandleClient::connectionProperties): Add PLATFORM(IOS)-guard around declaration.
3305         * platform/network/cf/ResourceRequestCFNet.cpp: Substitute header CFNetworkConnectionCacheSPI.h for
3306         <CFNetwork/CFNetworkConnectionCachePriv.h>.
3307         * platform/network/mac/CredentialStorageMac.mm:
3308         (WebCore::CredentialStorage::saveToPersistentStorage): Use Credential::nsCredential() and ProtectionSpace::nsSpace()
3309         instead of WebCore::mac(const {Credential, ProtectionSpace}&) as the latter were removed in <http://trac.webkit.org/changeset/171801>
3310         and <http://trac.webkit.org/changeset/171540>, respectively.
3311         * platform/network/mac/ResourceErrorMac.mm: Add USE(CFNETWORK)-guard around <CFNetwork/CFSocketStreamPriv.h>.
3312         * platform/network/mac/ResourceHandleMac.mm: Substitute header CFURLRequestSPI.h for <CFNetwork/CFURLRequest.h>.
3313         (WebCore::ResourceHandle::start): Modified to use ResourceHandle::makeDelegate() instead of d->m_proxy, which 
3314         was removed in <http://trac.webkit.org/changeset/147476>.
3315         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Ditto.
3316         * platform/network/mac/WebCoreURLResponse.mm:
3317         (WebCore::synthesizeRedirectResponseIfNecessary): Add !USE(CFNETWORK)- and PLATFORM(IOS)- guards.
3318         * platform/spi/cf/CFNetworkConnectionCacheSPI.h: Added.
3319         * platform/spi/cf/CFURLRequestSPI.h: Added.
3320
3321 2014-09-02  Myles C. Maxfield  <mmaxfield@apple.com>
3322
3323         Use references in public EventSender functions
3324         https://bugs.webkit.org/show_bug.cgi?id=136463
3325
3326         Reviewed by Dan Bates.
3327
3328         Passing nullptr to EventSender shouldn't be allowed.
3329
3330         No new tests because there is no behavior change.
3331
3332         * dom/EventSender.h:
3333         (WebCore::EventSender::hasPendingEvents):
3334         (WebCore::EventSender<T>::dispatchEventSoon):
3335         (WebCore::EventSender<T>::cancelEvent):
3336         (WebCore::EventSender<T>::dispatchPendingEvents):
3337         * html/HTMLLinkElement.cpp:
3338         (WebCore::HTMLLinkElement::~HTMLLinkElement):
3339         (WebCore::HTMLLinkElement::notifyLoadedSheetAndAllCriticalSubresources):
3340         * html/HTMLStyleElement.cpp:
3341         (WebCore::HTMLStyleElement::~HTMLStyleElement):
3342         (WebCore::HTMLStyleElement::notifyLoadedSheetAndAllCriticalSubresources):
3343         * loader/ImageLoader.cpp:
3344         (WebCore::ImageLoader::~ImageLoader):
3345         (WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent):
3346         (WebCore::ImageLoader::updateFromElement):
3347         (WebCore::ImageLoader::notifyFinished):
3348         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
3349
3350 2014-09-02  Daniel Bates  <dabates@apple.com>
3351
3352         [iOS] Exclude touch and gesture files when building without ENABLE_TOUCH_EVENTS
3353         and ENABLE_IOS_GESTURE_EVENTS, respectively
3354         https://bugs.webkit.org/show_bug.cgi?id=136456
3355
3356         Reviewed by Andy Estes.
3357
3358         It's sufficient to exclude the touch and gesture files when building without
3359         ENABLE_TOUCH_EVENTS and ENABLE_IOS_GESTURE_EVENTS, respectively. Currently we
3360         exclude these files when building without the Apple Internal SDK, which is
3361         heavy handed.
3362
3363         * Configurations/WebCore.xcconfig:
3364
3365 2014-09-02  Simon Fraser  <simon.fraser@apple.com>
3366
3367         Fix an assertion sometimes seen under RenderLayerCompositor::detachRootLayer()
3368         https://bugs.webkit.org/show_bug.cgi?id=136464
3369
3370         Reviewed by Tim Horton.
3371
3372         Don't try to call RenderLayer::isVisuallyNonEmpty() under RenderLayerCompositor::detachRootLayer()
3373         when layout might be stale; there's not point trying to update the backing store state
3374         when detaching, only when attaching.
3375
3376         * rendering/RenderLayerCompositor.cpp:
3377         (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
3378
3379 2014-09-02  Simon Fraser  <simon.fraser@apple.com>
3380
3381         Avoid backing store allocation with some combinations of replaced elements, masking and visibility:hidden
3382         https://bugs.webkit.org/show_bug.cgi?id=136400
3383
3384         Reviewed by Tim Horton.
3385         
3386         RenderLayer::isVisuallyNonEmpty() would return true for replaced elements (e.g. images)
3387         with visibility:hidden, and for layers with a mask, and both would cause additional
3388         backing store in some cases.
3389         
3390         We can move the hasVisibleContent() to the top of the function, since visibility:hidden
3391         will always hide any content of this layer. The hasMask() check can also be removed;
3392         a mask can only mask content that is already visible; it never contributes additional
3393         pixels.
3394
3395         Tests: compositing/backing/masked-child-no-backing.html
3396                compositing/backing/replaced-child-no-backing.html
3397
3398         * rendering/RenderLayer.cpp:
3399         (WebCore::RenderLayer::calculateClipRects):
3400
3401 2014-09-02  Joseph Pecoraro  <pecoraro@apple.com>
3402
3403         Use jsNontrivialString for strings we know are more than a single character
3404         https://bugs.webkit.org/show_bug.cgi?id=136393
3405
3406         Reviewed by Geoffrey Garen.
3407
3408         * bindings/js/JSCryptoKeySerializationJWK.cpp:
3409         (WebCore::addUsagesToJSON):
3410
3411 2014-09-02  Alex Christensen  <achristensen@webkit.org>
3412
3413         Fix bindings tests after r173176.
3414         https://bugs.webkit.org/show_bug.cgi?id=136460
3415
3416         Reviewed by Simon Fraser.
3417
3418         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: