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