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