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