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