[CSS Grid Layout] Fix positioning grid items using named grid lines/areas
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-02-27  Sergio Villar Senin  <svillar@igalia.com>
2
3         [CSS Grid Layout] Fix positioning grid items using named grid lines/areas
4         https://bugs.webkit.org/show_bug.cgi?id=129372
5
6         Reviewed by Darin Adler.
7
8         Our code was assuming that a <custom-ident> in
9         -webkit-grid-{column|row}-{start|end} and
10         -webkit-grid-{column|row} was always a grid area name. That's
11         wrong because the <custom-ident> could be also a explicitly named
12         grid line or the an implicitly named grid line created by a grid
13         area definition.
14
15         The style resolution code was not correct either. This patch fixes
16         it so it now matches the spec, which means that:
17         - first we try to match any existing grid area.
18         - then if there is a named grid line with the name
19         <custom-ident>-{start|end} for -webkit-grid-{column|row}-{start|end}
20         defined before the grid area then we use it instead of the grid
21         area.
22         - otherwise if there is a named grid line we resolve to the first such line.
23         - otherwise we treat it as 'auto'.
24
25         Fixing this uncovered a bug in GridPosition, we were not using the
26         name of the stored grid area to check if two GridPositions were
27         the same.
28
29         Tests: fast/css-grid-layout/grid-item-position-changed-dynamic.html
30                fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html
31
32         * css/StyleResolver.cpp:
33         (WebCore::gridLineDefinedBeforeGridArea): New function to check if
34         a given named grid line was defined before an implicit named grid
35         line created by a grid area definition.
36         (WebCore::StyleResolver::adjustNamedGridItemPosition): New
37         function that adjusts the position of a GridPosition parsed as a
38         grid area.
39         (WebCore::StyleResolver::adjustGridItemPosition): Use the new
40         function adjustNamedGridItemPosition to adjust the positions of
41         named grid lines.
42         * css/StyleResolver.h:
43         * rendering/RenderGrid.cpp:
44         (WebCore::RenderGrid::resolveNamedGridLinePositionFromStyle): Use GridPosition:: namespace.
45         (WebCore::RenderGrid::resolveGridPositionFromStyle): Ditto.
46         (WebCore::RenderGrid::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition): Ditto.
47         * rendering/RenderGrid.h:
48         * rendering/style/GridPosition.h:
49         (WebCore::GridPosition::adjustGridPositionForRowEndColumnEndSide): Moved from RenderGrid.cpp.
50         (WebCore::GridPosition::adjustGridPositionForSide): Ditto.
51         (WebCore::GridPosition::operator==): Use the named grid line to check equality.
52
53 2014-02-28  Zoltan Horvath  <zoltan@webkit.org>
54
55         [CSS Shapes] Update line segments for ShapeInside only if the new line is wide enough
56         https://bugs.webkit.org/show_bug.cgi?id=129461
57
58         Reviewed by David Hyatt.
59
60         Shape-inside can make a line only narrower than the original line width, thus we don't need
61         to update the line/shape segments in fitBelowFloats for every single line inside shape-inside.
62         This patch adds a helper function, which updates the line segments, furthermore it updates the
63         line segments only when the content would fit without the shape.
64
65         No new tests, no behavior change.
66
67         * rendering/line/BreakingContextInlineHeaders.h: Use new helper.
68         (WebCore::updateSegmentsForShapes):
69         * rendering/line/LineWidth.cpp: Use new helper.
70         (WebCore::LineWidth::updateLineSegment): Add new helper.
71         (WebCore::LineWidth::fitBelowFloats):
72
73 2014-02-28  Mario Sanchez Prada  <mario.prada@samsung.com>
74
75         paragraphs with different directionality in textarea with unicode-bidi: plaintext are aligned the same
76         https://bugs.webkit.org/show_bug.cgi?id=71194
77
78         Reviewed by David Hyatt.
79
80         Merged from Blink r157263 by <igor.o@sisa.samsung.com>
81         <https://src.chromium.org/viewvc/blink?revision=157263&view=revision>
82
83         In the css3-text spec (http://www.w3.org/TR/css3-text/#bidi-linebox):
84
85         The start and end edges of a line box are determined by the inline
86         base direction of the line box. In most cases, this is given by
87         its containing block's computed ‘direction’. However if its
88         containing block has ‘unicode-bidi: plaintext’, the inline base
89         direction the line box must be determined by the base direction of
90         the bidi paragraph to which it belongs: that is, the bidi
91         paragraph for which the line box holds content.
92
93         This patch just implements the behavior described above modifying
94         updateLogicalWidthForAlignment and setting the bidi level of the
95         RootInlineBox.
96
97         * rendering/RenderBlockFlow.h:
98         * rendering/RenderBlockLineLayout.cpp:
99         (WebCore::RenderBlockFlow::updateLogicalWidthForAlignment):
100         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
101         (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns):
102         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
103         (WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
104         (WebCore::RenderBlockFlow::checkLinesForTextOverflow):
105         (WebCore::RenderBlockFlow::startAlignedOffsetForLine):
106
107 2014-02-28  Jochen Eisinger  <jochen@chromium.org>
108
109         Update meta-referrer behavior for invalid policies
110         https://bugs.webkit.org/show_bug.cgi?id=129475
111
112         This patch aligns the behavior with the CSP 1.1 referrer directive,
113         where the fallback for an invalid value is the "never" policy.
114
115         Original patch from Mike West: https://src.chromium.org/viewvc/blink?view=rev&revision=165627
116
117         Reviewed by Alexey Proskuryakov.
118
119         Test: http/tests/security/referrer-policy-invalid.html
120
121         * dom/Document.cpp:
122         (WebCore::Document::processReferrerPolicy):
123
124 2014-02-28  Daniel Bates  <dabates@apple.com>
125
126         SubresourceLoader::didFinishLoading() should not assert when a decode error occurs
127         https://bugs.webkit.org/show_bug.cgi?id=127029
128
129         Reviewed by Darin Adler.
130
131         SubresourceLoader::didFinishLoading() can be called for a resource (e.g. an image) that
132         failed to be decoded or, in the case of an image, whose estimated decoded size exceeds
133         the maximum decoded size (Settings::maximumDecodedImageSize()).
134
135         Test: fast/images/decoded-size-exceeds-max-decoded-size.html
136
137         * loader/SubresourceLoader.cpp:
138         (WebCore::SubresourceLoader::didFinishLoading):
139
140 2014-02-28  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
141
142         ASSERTION FAILED: roundedIntPoint(rendererMappedResult) == roundedIntPoint(result) in WebCore::RenderGeometryMap::mapToContainer
143         https://bugs.webkit.org/show_bug.cgi?id=119626
144
145         SVGRenderSupport::mapLocalToContainer() was trying to apply transforms
146         in the incorrect order. Specifically, it would attempt to apply its
147         localToParentTransform before its localToBorderBoxTransform. This
148         was causing an ASSERT to fail when the computed transforms didn't
149         match up to those computed by RenderGeometryMap.
150
151         Backported from Blink: https://codereview.chromium.org/143363004
152
153         Reviewed by Simon Fraser.
154
155         Test: svg/transforms/svg-geometry-crash.html
156
157         * rendering/svg/SVGRenderSupport.cpp:
158         (WebCore::SVGRenderSupport::mapLocalToContainer):
159
160 2014-02-28  Mihnea Ovidenie  <mihnea@adobe.com>
161
162         [CSSRegions] ASSERTION FAILED: !m_regionsInvalidated in RenderFlowThread::regionAtBlockOffset
163         https://bugs.webkit.org/show_bug.cgi?id=129371
164
165         Reviewed by Andrei Bucur.
166
167         regionAtBlockOffset method is meant to be used after the flow thread validated
168         its region chain, otherwise we cannot rely on regionAtBlockOffset to determine correctly
169         the target region based on the offset in flow thread coordinates.
170
171         When the video element is collected in a named flow and displayed in a region, we ensure
172         that the region's decorations are taken into account to properly position the video.
173         However, we have to do that only if the named flow regions are validated.
174
175         I changed the method cachedRegionForCompositedLayer to check only the "cached" region
176         for a layer and not update the layer to region mappings before returning the region.
177         Because method cachedRegionForCompositedLayer does not update the region - layer mappings,
178         the code does not call regionAtBlockOffset in situations where the region chain is not validated yet.
179
180         Test: compositing/regions/video-in-overflow-region.html
181
182         * rendering/RenderFlowThread.cpp:
183         (WebCore::RenderFlowThread::getLayerListForRegion): Make it a getter that relies on
184         cached information and refrain from updating the mappings. Make it const too.
185         (WebCore::RenderFlowThread::cachedRegionForCompositedLayer):
186         * rendering/RenderFlowThread.h:
187
188 2014-02-28  Xabier Rodriguez Calvar  <calvaris@igalia.com>
189
190         [GTK] Finetune captions menu as per design team
191         https://bugs.webkit.org/show_bug.cgi?id=129432
192
193         Reviewed by Eric Carlson.
194
195         Some design fine tuning of the captions dialog was required.
196         
197         No new tests, current suffice.
198
199         * Modules/mediacontrols/mediaControlsApple.js:
200         Added out class.
201         * Modules/mediacontrols/mediaControlsGtk.js:
202         (ControllerGtk.prototype.buildCaptionMenu): Setting out class when
203         menu is going to show overlap the panel right border.
204         * css/mediaControlsGtk.css:
205         (video::-webkit-media-controls-closed-captions-container.out):
206         Setting all borders to 5px;
207         (video::-webkit-media-controls-closed-captions-container h3):
208         Reduced font size and increasing top padding.
209         (video::-webkit-media-controls-closed-captions-container ul):
210         Increased top padding.
211
212 2014-02-27  Ryosuke Niwa  <rniwa@webkit.org>
213
214         Element::attributeChanged shouldn't do any work when attribute value didn't change
215         https://bugs.webkit.org/show_bug.cgi?id=129467
216
217         Reviewed by Geoffrey Garen.
218
219         Exit early in childrenChanged when the attribute value didn't change.
220
221         * dom/Attr.cpp:
222         (WebCore::Attr::setValue):
223         (WebCore::Attr::childrenChanged):
224         * dom/Element.cpp:
225         (WebCore::Element::setAttributeInternal):
226         (WebCore::Element::attributeChanged):
227         (WebCore::Element::parserSetAttributes):
228         (WebCore::Element::removeAttributeInternal):
229         (WebCore::Element::didAddAttribute):
230         (WebCore::Element::didModifyAttribute):
231         (WebCore::Element::didRemoveAttribute):
232         (WebCore::Element::cloneAttributesFromElement):
233         * dom/Element.h:
234         * dom/StyledElement.cpp:
235         (WebCore::StyledElement::attributeChanged):
236         * dom/StyledElement.h:
237         * html/HTMLInputElement.cpp:
238         (WebCore::HTMLInputElement::updateType):
239         * mathml/MathMLElement.cpp:
240         (WebCore::MathMLElement::attributeChanged):
241         * mathml/MathMLElement.h:
242         * mathml/MathMLSelectElement.cpp:
243         (WebCore::MathMLSelectElement::attributeChanged):
244         * mathml/MathMLSelectElement.h:
245         * svg/SVGElement.cpp:
246         (WebCore::SVGElement::attributeChanged):
247         * svg/SVGElement.h:
248
249 2014-02-27  Jinwoo Song  <jinwoo7.song@samsung.com>
250
251         [EFL] Remove duplicated keyboard string key from keyMap
252         https://bugs.webkit.org/show_bug.cgi?id=129469
253
254         Reviewed by Gyuyoung Kim.
255
256         "Down" key is duplicated in keyMap().
257
258         * platform/efl/EflKeyboardUtilities.cpp:
259         (WebCore::createKeyMap):
260
261 2014-02-27  Benjamin Poulain  <benjamin@webkit.org>
262
263         Unify the three call sites of SelectorQueryCache
264         https://bugs.webkit.org/show_bug.cgi?id=129249
265
266         Reviewed by Andreas Kling.
267
268         The three call sites of SelectorQueryCache were doing the exact same thing.
269         That code is mvoed to a new function Document::selectorQueryForString().
270
271         Also use String instead of AtomicString for querySelector() and querySelectorAll().
272         This prevent the call sites from creating AtomicString just for the time of the call.
273         This causes a tiny slow down on microbenchmarks that continuously query the same string
274         but has no negative impact on realistic/good test cases (and the bindings are simplified).
275
276         * dom/ContainerNode.cpp:
277         (WebCore::ContainerNode::querySelector):
278         (WebCore::ContainerNode::querySelectorAll):
279         * dom/ContainerNode.h:
280         * dom/Document.cpp:
281         (WebCore::Document::selectorQueryForString):
282         * dom/Document.h:
283         * dom/Element.cpp:
284         (WebCore::Element::webkitMatchesSelector):
285         * dom/SelectorQuery.cpp:
286         (WebCore::SelectorQueryCache::add):
287         * dom/SelectorQuery.h:
288
289 2014-02-27  Ryosuke Niwa  <rniwa@webkit.org>
290
291         JSC ignores the extra memory cost of HTMLCollection after a major GC
292         https://bugs.webkit.org/show_bug.cgi?id=129450
293
294         Reviewed by Andreas Kling.
295
296         Report the extra memory cost of HTMLCollection to JSC.
297
298         Unfortunately, the existing mechanism to report the extra memory cost in toJS is insufficient for
299         HTMLCollection since collection caches are populated later when HTMLCollection is accessed. Also,
300         the extra memory cost reported by Heap::reportExtraMemoryCost will be thrown away after a major GC.
301
302         To work around this limitation, added a visitor.reportExtraMemoryUsage call inside visitChildren
303         for interfaces with a newly added ReportExtraMemoryCost IDL extension flag to report the extra cost.
304
305         Since we may need to generate visitChildren when this flag is set, we can't automatically detect
306         and generate calls using C++ template as done in r148648.
307
308         * CMakeLists.txt:
309         * GNUmakefile.list.am:
310         * Modules/webaudio/AudioBuffer.idl:
311         * WebCore.vcxproj/WebCore.vcxproj:
312         * WebCore.xcodeproj/project.pbxproj:
313         * bindings/js/JSDOMBinding.h:
314         * bindings/scripts/CodeGeneratorJS.pm:
315         (InstanceNeedsVisitChildren):
316         (GenerateHeader):
317         (GenerateImplementation):
318         * bindings/scripts/IDLAttributes.txt:
319         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
320         (WebCore::toJS):
321         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
322         (WebCore::toJS):
323         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
324         (WebCore::toJS):
325         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
326         (WebCore::toJS):
327         * bindings/scripts/test/JS/JSTestException.cpp:
328         (WebCore::toJS):
329         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
330         (WebCore::toJS):
331         * bindings/scripts/test/JS/JSTestInterface.cpp:
332         (WebCore::toJS):
333         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
334         (WebCore::toJS):
335         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
336         (WebCore::toJS):
337         * bindings/scripts/test/JS/JSTestObj.cpp:
338         (WebCore::toJS):
339         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
340         (WebCore::toJS):
341         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
342         (WebCore::toJS):
343         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
344         (WebCore::toJS):
345         * bindings/scripts/test/JS/JSattribute.cpp:
346         (WebCore::toJS):
347         * bindings/scripts/test/JS/JSreadonly.cpp:
348         (WebCore::toJS):
349         * dom/ChildNodeList.h:
350         * dom/CollectionIndexCache.cpp: Added.
351         (WebCore::reportExtraMemoryCostForCollectionIndexCache):
352         * dom/CollectionIndexCache.h:
353         (WebCore::CollectionIndexCache::memoryCost):
354         (WebCore::NodeType>::CollectionIndexCache):
355         (WebCore::NodeType>::nodeCount):
356         (WebCore::NodeType>::computeNodeCountUpdatingListCache):
357         (WebCore::NodeType>::nodeAt):
358         (WebCore::NodeType>::invalidate):
359         * dom/DOMAllInOne.cpp:
360         * dom/LiveNodeList.cpp:
361         (WebCore::LiveNodeList::memoryCost):
362         * dom/LiveNodeList.h:
363         * dom/NodeList.h:
364         (WebCore::NodeList::memoryCost):
365         * dom/NodeList.idl:
366         * html/HTMLCollection.cpp:
367         (WebCore::HTMLCollection::updateNamedElementCache):
368         * html/HTMLCollection.h:
369         (WebCore::CollectionNamedElementCache::didPopulate):
370         (WebCore::CollectionNamedElementCache::memoryCost):
371         (WebCore::CollectionNamedElementCache::find):
372         (WebCore::HTMLCollection::memoryCost):
373         * html/HTMLCollection.idl:
374         * html/HTMLFormControlsCollection.cpp:
375         (WebCore::HTMLFormControlsCollection::updateNamedElementCache):
376
377 2014-02-27  Benjamin Poulain  <benjamin@webkit.org>
378
379         Compile attribute value matching
380         https://bugs.webkit.org/show_bug.cgi?id=129228
381
382         Reviewed by Geoffrey Garen.
383
384         Add support for compiling value matching when matching attributes in Selector.
385         This patch only adds exact matching, the other cases will follow.
386
387         There is a little infrastructure changes since FunctionCall now needs to support
388         calls taking 2 arguments. The fun begins when the arguments are not in the right
389         registers and need to be moved to the right place. Otherwise the code is straightforward.
390
391         In SelectorCompiler, it is necessary to handle two different cases of matching: case sensitive
392         and case insensitive. The choice is done in part at compilation time by asking HTMLDocument
393         if the name filter can include case insensitive attribute. The other part is done at runtime
394         by querying the element for its type and document.
395
396         Test: fast/selectors/case-insensitive-value-matching.html
397
398         * css/SelectorChecker.cpp:
399         (WebCore::attributeValueMatches): Null values matching should never happen, when an attribute
400         has no value, its value is empty.
401
402         * cssjit/FunctionCall.h:
403         (WebCore::FunctionCall::FunctionCall):
404         Add support for calls with two arguments.
405         (WebCore::FunctionCall::setOneArgument):
406         (WebCore::FunctionCall::setTwoArguments):
407         (WebCore::FunctionCall::swapArguments):
408         Here we need to swap two registers, but we cannot allocate a new register (because the context
409         of the function call may have taken all the available registers already).
410
411         On x86, the solution is simple, we can swap the two registers without side effects.
412
413         On other platforms, it is a little more complex. If there is any available register, we can just
414         use it as a temporary to make the swap.
415         If there are no available registers, we know that all the registers are taken. Since swapArguments()
416         was called after pushing all the arguments on the stack, we can safely trash the value of any of those.
417         We take the first available register that is not a function argument and use it as a temporary.
418
419         (WebCore::FunctionCall::prepareAndCall):
420         This is the fun part, we have two registers where the values must go before the function call. The values
421         can be in any combination of the allocated registers. The code here needs to move the two values to
422         their target register while avoiding conflicts.
423
424         * cssjit/SelectorCompiler.cpp:
425         (WebCore::SelectorCompiler::AttributeMatchingInfo::AttributeMatchingInfo):
426         (WebCore::SelectorCompiler::AttributeMatchingInfo::canDefaultToCaseSensitiveValueMatch):
427         (WebCore::SelectorCompiler::AttributeMatchingInfo::selector):
428         The value of HTMLDocument::isCaseSensitiveAttribute is needed at compilation time to compute the number
429         of required registers. As a result, we need to keep it along in the selector fragment.
430
431         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
432         (WebCore::SelectorCompiler::attributeNameTestingRequiresNamespaceRegister):
433         (WebCore::SelectorCompiler::attributeValueTestingRequiresExtraRegister):
434         (WebCore::SelectorCompiler::minimumRegisterRequirements):
435         (WebCore::SelectorCompiler::SelectorCodeGenerator::markParentElementIfResolvingStyle):
436         (WebCore::SelectorCompiler::canMatchStyleAttribute):
437         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeStyleAttribute):
438         (WebCore::SelectorCompiler::canMatchAnimatableSVGAttribute):
439         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSynchronizeAllAnimatedSVGAttribute):
440         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
441         The matching code is moved in a local scope. This is done to recover the register of qualifiedNameImpl
442         before doing any value matching. That register can then be used to store the expected value when matching
443         an attribute value.
444         It is unfortunate there is so much register pressure in this part.
445
446         Value matching is done outside the loop. The idea is to keep the loop really small since in the vast majority
447         of cases, name matching fails.
448         If the value matching fails, we jump back into the tight loop.
449
450         This is not ideal in all situation. For example trivial name matching with trivial value matching should
451         be done in loop. There is a FIXME to improve those cases later.
452
453         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
454         (WebCore::SelectorCompiler::testIsHTMLClassOnDocument):
455         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
456         In the case sensitive branch, things are really simple. We have to AtomicStringImpl pointers, if they
457         don't match, it is a failure.
458
459         The case sensitive branch start by comparing the pointers in case the values are equal. This is a common
460         case and it simplifies the cases for SVG, XHTML, etc.
461         If the two values are not equal, we must first find if the context requires case insensitive comparison
462         (HTMLElement in HTMLDocument). If the conditions require case insensitive matching, we then fall back
463         to a function call.
464
465         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementFunctionCallTest):
466         * dom/Attribute.h:
467         (WebCore::Attribute::valueMemoryOffset):
468         * dom/Document.h:
469         (WebCore::Document::documentClassesMemoryOffset):
470         (WebCore::Document::isHTMLDocumentClassFlag):
471         * dom/Node.h:
472         (WebCore::Node::treeScopeMemoryOffset):
473         * dom/TreeScope.h:
474         (WebCore::TreeScope::documentScopeMemoryOffset):
475
476 2014-02-27  Ryuan Choi  <ryuan.choi@samsung.com>
477
478         Build break when disabled CSS_GRID_LAYOUT
479         https://bugs.webkit.org/show_bug.cgi?id=129459
480
481         Reviewed by Gyuyoung Kim.
482
483         * css/CSSValue.h: Added guards of CSS_GRID_LAYOUT for GridTemplateAreasClass.
484
485 2014-02-17  Myles C. Maxfield  <mmaxfield@apple.com>
486
487         text-decoration-skip: ink does not skip over SVG fonts
488         https://bugs.webkit.org/show_bug.cgi?id=128936
489
490         Reviewed by Darin Adler.
491
492         When drawing glyphs in an SVG font, the glyphs are converted to paths and then filled. This patch moves
493         the glyph -> path conversion into a helper class, GlyphToPathTranslator, and creates an implementation
494         for the SVG drawing code. Once this helper class is created, it can be used to trace paths in order
495         to make underlines skip over SVG glyphs. This helper class also has an implementation for non-SVG glyphs,
496         which allows for the glyph tracing code to be paramaterized over the implementation of the helper class
497         rather than if the FontData itself is SVG or not.
498
499         Tests: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-ink-svg.html
500
501         * platform/graphics/Font.h:
502         (WebCore::GlyphToPathTranslator::~GlyphToPathTranslator): Virtual implementation of helper class
503         * platform/graphics/cg/PathCG.cpp:
504         (WebCore::Path::Path): Created constructor that takes a RefPtr<CGMutablePathRef>
505         * platform/graphics/Path.h:
506         * platform/graphics/TextRun.h: Give RenderingContext a factory function to create the helper class
507         instance
508         * platform/graphics/mac/FontMac.mm: Implementation of helper class used for skipping underlines on
509         regular (CoreText) glyphs
510         (WebCore::MacGlyphToPathTranslator::MacGlyphToPathTranslator):
511         (WebCore::MacGlyphToPathTranslator::moveToNextValidGlyph):
512         (WebCore::MacGlyphToPathTranslator::incrementIndex):
513         (WebCore::Font::dashesForIntersectionsWithRect): Call the relevant factory function, and use it
514         to successively generate Paths
515         * rendering/svg/SVGTextRunRenderingContext.cpp: Implementation of helper class used for SVG fonts
516         (WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator):
517         (WebCore::SVGGlyphToPathTranslator::moveToNextValidGlyph):
518         (WebCore::SVGGlyphToPathTranslator::incrementIndex):
519         (WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator):
520         (WebCore::SVGTextRunRenderingContext::drawSVGGlyphs): Use the above implementation
521         * rendering/svg/SVGTextRunRenderingContext.h: Factory function declaration
522
523 2014-02-27  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
524
525         [WebRTC] Removing MediaConstraints argument from RTCPeerConnection addStream, updateIce methods and constructor
526         https://bugs.webkit.org/show_bug.cgi?id=129449
527
528         Reviewed by Eric Carlson.
529
530         According to WebRTC editor's draft, MediaConstraints will no longer be an argument of those methods and
531         constructor.
532
533         Existing tests were updated.
534
535         * Modules/mediastream/RTCPeerConnection.cpp:
536         (WebCore::RTCPeerConnection::create):
537         (WebCore::RTCPeerConnection::RTCPeerConnection):
538         (WebCore::RTCPeerConnection::updateIce):
539         (WebCore::RTCPeerConnection::addStream):
540         * Modules/mediastream/RTCPeerConnection.h:
541         * Modules/mediastream/RTCPeerConnection.idl:
542         * bindings/js/JSRTCPeerConnectionCustom.cpp:
543         (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
544         * platform/mediastream/RTCPeerConnectionHandler.h:
545         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
546         (WebCore::RTCPeerConnectionHandlerMock::initialize):
547         (WebCore::RTCPeerConnectionHandlerMock::updateIce):
548         (WebCore::RTCPeerConnectionHandlerMock::addStream):
549         * platform/mock/RTCPeerConnectionHandlerMock.h:
550
551 2014-02-27  Radu Stavila  <stavila@adobe.com>
552
553         [CSS Regions] Move named-flow specific method decorationsClipRectForBoxInRegion to RenderNamedFlowThread
554         https://bugs.webkit.org/show_bug.cgi?id=129428
555
556         Reviewed by Andreas Kling.
557
558         Since the decorationsClipRectForBoxInRegion method is a named flow specific method, it makes
559         sense to be in the named flow specific class, RenderNamedFlowThread, instead of the more
560         generic RenderFlowThread.
561
562         No new tests required. No new functionality.
563
564         * rendering/RenderBlock.cpp:
565         (WebCore::RenderBlock::paintObject):
566         * rendering/RenderFlowThread.cpp:
567         * rendering/RenderFlowThread.h:
568         * rendering/RenderNamedFlowThread.cpp:
569         (WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
570         * rendering/RenderNamedFlowThread.h:
571
572 2014-02-27  Zoltan Horvath  <zoltan@webkit.org>
573
574         Avoid calling logicalLeftOffsetForLine 2 times in LineWidth::fitBelowFloats
575         https://bugs.webkit.org/show_bug.cgi?id=129433
576
577         Reviewed by Darin Adler.
578
579         This change updates fitBelowFloats and its helpers to call RenderBlock::logicalLeftOffsetForLine only once.
580
581         No new tests, no behavior change.
582
583         * rendering/line/LineWidth.cpp:
584         (WebCore::availableWidthAtOffset):
585         (WebCore::LineWidth::updateLineDimension):
586         (WebCore::LineWidth::wrapNextToShapeOutside):
587         (WebCore::LineWidth::fitBelowFloats):
588         * rendering/line/LineWidth.h:
589
590 2014-02-27  Andreas Kling  <akling@apple.com>
591
592         Micro-optimize elementAffectsDirectionality().
593         <https://webkit.org/b/129444>
594
595         Tweak this function to skip an unnecessary bit check and use
596         fastHasAttribute() instead of hasAttribute() for looking up dirAttr.
597
598         ~1% speedup on DYEB/AngularJS.
599
600         Reviewed by Ryosuke Niwa.
601
602         * html/HTMLElement.cpp:
603         (WebCore::elementAffectsDirectionality):
604
605 2014-02-27  Brian Burg  <bburg@apple.com>
606
607         Web Inspector: model tests should use a special Test.html inspector page
608         https://bugs.webkit.org/show_bug.cgi?id=129190
609
610         Reviewed by Timothy Hatcher.
611
612         Convert InspectorController::isUnderTest() into a flag, and expose an
613         Internals method so it can be set by the test before opening the inspector.
614
615         Test: inspector/test-harness-trivially-works.html
616
617         * inspector/InspectorController.cpp:
618         (WebCore::InspectorController::evaluateForTestInFrontend):
619         * inspector/InspectorController.h:
620         * testing/Internals.cpp:
621         (WebCore::Internals::setInspectorIsUnderTest): Added.
622         * testing/Internals.h:
623         * testing/Internals.idl:
624
625 2014-02-27  Joseph Pecoraro  <pecoraro@apple.com>
626
627         Unreviewed build fix after r164824.
628
629         Accidentally re-added some code that was removed.
630
631         * page/ContentSecurityPolicy.cpp:
632
633 2014-02-26  Alex Christensen  <achristensen@webkit.org>
634
635         Compile fix when not using TEXTURE_MAPPER_GL.
636         https://bugs.webkit.org/show_bug.cgi?id=129417
637
638         Reviewed by Darin Adler.
639
640         * platform/graphics/texmap/TextureMapperGL.cpp:
641         Protect platformCreateAccelerated with USE(TEXTURE_MAPPER_GL).
642
643 2014-02-27  Joseph Pecoraro  <pecoraro@apple.com>
644
645         Web Inspector: JSContext inspection should report exceptions in the console
646         https://bugs.webkit.org/show_bug.cgi?id=128776
647
648         Reviewed by Timothy Hatcher.
649
650         Include some clean up of ConsoleMessage and ScriptCallStack construction.
651
652         Covered by existing tests.
653
654         * bindings/js/JSDOMBinding.cpp:
655         (WebCore::reportException):
656         Simplify code now that createStackTraceFromException handles it.
657
658         * page/ContentSecurityPolicy.cpp:
659         (WebCore::gatherSecurityPolicyViolationEventData):
660         (WebCore::ContentSecurityPolicy::reportViolation):
661         ScriptCallStack can give us the first non-native callframe.
662
663         * inspector/InspectorResourceAgent.cpp:
664         (WebCore::InspectorResourceAgent::buildInitiatorObject):
665         * inspector/PageDebuggerAgent.cpp:
666         (WebCore::PageDebuggerAgent::breakpointActionLog):
667         * inspector/TimelineRecordFactory.cpp:
668         (WebCore::TimelineRecordFactory::createGenericRecord):
669         * page/Console.cpp:
670         (WebCore::internalAddMessage):
671         (WebCore::Console::profile):
672         (WebCore::Console::profileEnd):
673         (WebCore::Console::timeEnd):
674         * page/ContentSecurityPolicy.cpp:
675         (WebCore::gatherSecurityPolicyViolationEventData):
676         (WebCore::ContentSecurityPolicy::reportViolation):
677         * page/DOMWindow.cpp:
678         (WebCore::DOMWindow::postMessage):
679
680 2014-02-27  Andreas Kling  <akling@apple.com>
681
682         Remove FeatureObserver.
683         <https://webkit.org/b/129439>
684
685         This code was only used by the Chromium port and nobody else is
686         making use of it.
687
688         Reviewed by Anders Carlsson.
689
690         * CMakeLists.txt:
691         * GNUmakefile.list.am:
692         * WebCore.vcxproj/WebCore.vcxproj:
693         * WebCore.vcxproj/WebCore.vcxproj.filters:
694         * WebCore.xcodeproj/project.pbxproj:
695         * dom/EventTarget.cpp:
696         (WebCore::EventTarget::fireEventListeners):
697         * dom/EventTarget.h:
698         * html/ColorInputType.cpp:
699         * html/ColorInputType.h:
700         * html/DateInputType.cpp:
701         * html/DateInputType.h:
702         * html/DateTimeInputType.cpp:
703         * html/DateTimeInputType.h:
704         * html/DateTimeLocalInputType.cpp:
705         * html/DateTimeLocalInputType.h:
706         * html/EmailInputType.cpp:
707         * html/EmailInputType.h:
708         * html/HTMLDataListElement.cpp:
709         (WebCore::HTMLDataListElement::create):
710         * html/HTMLFormControlElement.cpp:
711         (WebCore::HTMLFormControlElement::parseAttribute):
712         * html/HTMLInputElement.cpp:
713         (WebCore::HTMLInputElement::parseAttribute):
714         * html/HTMLTextFormControlElement.cpp:
715         (WebCore::HTMLTextFormControlElement::parseAttribute):
716         * html/InputType.cpp:
717         * html/InputType.h:
718         * html/MonthInputType.cpp:
719         * html/MonthInputType.h:
720         * html/NumberInputType.cpp:
721         * html/NumberInputType.h:
722         * html/RangeInputType.cpp:
723         * html/RangeInputType.h:
724         * html/SearchInputType.cpp:
725         * html/SearchInputType.h:
726         * html/TelephoneInputType.cpp:
727         * html/TelephoneInputType.h:
728         * html/TextInputType.cpp:
729         * html/TextInputType.h:
730         * html/TimeInputType.cpp:
731         * html/TimeInputType.h:
732         * html/URLInputType.cpp:
733         * html/URLInputType.h:
734         * html/WeekInputType.cpp:
735         * html/WeekInputType.h:
736         * loader/DocumentLoader.cpp:
737         (WebCore::DocumentLoader::responseReceived):
738         * loader/FrameLoader.cpp:
739         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
740         (WebCore::FrameLoader::dispatchDidCommitLoad):
741         * page/ContentSecurityPolicy.cpp:
742         (WebCore::ContentSecurityPolicy::didReceiveHeader):
743         * page/EventHandler.cpp:
744         (WebCore::EventHandler::selectCursor):
745         * page/FeatureObserver.cpp: Removed.
746         * page/FeatureObserver.h: Removed.
747         * page/Page.h:
748         * rendering/RenderDeprecatedFlexibleBox.cpp:
749         (WebCore::RenderDeprecatedFlexibleBox::RenderDeprecatedFlexibleBox):
750         * rendering/RenderLayer.cpp:
751         (WebCore::RenderLayer::calculateClipRects):
752         * workers/SharedWorker.cpp:
753         (WebCore::SharedWorker::create):
754         * workers/Worker.cpp:
755         (WebCore::Worker::create):
756
757 2014-02-27  Chris Fleizach  <cfleizach@apple.com>
758
759         speechSynthesis.speak of a zero length utterance kills future speech
760         https://bugs.webkit.org/show_bug.cgi?id=129403
761
762         Reviewed by Mario Sanchez Prada.
763
764         Empty length strings may choke a synthesizer and result in didFinishSpeaking not being called. 
765         The WebKit code should be proactive about screening out empty length strings.
766
767         Test: platform/mac/fast/speechsynthesis/speech-synthesis-speak-empty-string.html
768
769         * Modules/speech/SpeechSynthesis.cpp:
770         (WebCore::SpeechSynthesis::startSpeakingImmediately):
771
772 2014-02-27  Commit Queue  <commit-queue@webkit.org>
773
774         Unreviewed, rolling out r164783.
775         http://trac.webkit.org/changeset/164783
776         https://bugs.webkit.org/show_bug.cgi?id=129425
777
778         Broke number of multicol tests (Requested by anttik on
779         #webkit).
780
781         * rendering/RenderBlock.cpp:
782         (WebCore::RenderBlock::containingColumnsBlock):
783
784 2014-02-27  Antoine Quint  <graouts@webkit.org>
785
786         Respect SVG fragment identifiers in <img> src attribute
787         https://bugs.webkit.org/show_bug.cgi?id=129387
788
789         Reviewed by Antti Koivisto.
790
791         Test: svg/css/svg-resource-fragment-identifier-img-src.html
792
793         When providing an SVG image for a given renderer, check that the URL used to load
794         that image is taken into account in case it featured a fragment identifier, ensuring
795         that the CSS :target pseudo-class is correctly handled for SVG resources. This patch
796         is specific to <img> elements, specific support will also need to be added for various
797         CSS properties that support SVG images.
798
799         * svg/graphics/SVGImageCache.cpp:
800         (WebCore::SVGImageCache::imageForRenderer):
801         Check if the provided renderer is attached to an <img> element and, if so, pass the
802         resolved <img> source URL, taking into account srcset, to the SVGImageForContainer.
803
804         * svg/graphics/SVGImageForContainer.cpp:
805         (WebCore::SVGImageForContainer::setURL):
806         Trigger the FrameView machinery to ensure that the :target pseudo-class is respected
807         should the provided URL feature a fragment identifier.
808
809         * svg/graphics/SVGImageForContainer.h:
810         Declare the new setURL() method.
811
812 2014-02-27  Krzysztof Czech  <k.czech@samsung.com>
813
814         [ATK] Fix style errors in enum members
815         https://bugs.webkit.org/show_bug.cgi?id=129421
816
817         Reviewed by Mario Sanchez Prada.
818
819         No new tests. No new functionality.
820
821         Enum members should use InterCaps with an initial capital letter.
822
823         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
824         (getInterfaceMaskFromObject):
825
826 2014-02-27  Mihai Tica  <mitica@adobe.com>
827
828         [CSS Blending] Parse and implement the -webkit-isolation CSS property.
829
830         https://bugs.webkit.org/show_bug.cgi?id=128958
831
832         Reviewed by Dirk Schulze.
833
834         Parse and implement -webkit-isolation, part of the CSS Blending and Compositing spec.
835         This patch adds functionality for HTML and SVG.
836         -webkit-isolation: isolate restricts any child elements from blending with any of the content outside the isolated parent element.
837
838         Tests: css3/compositing/isolation-isolate-blended-child.html
839                css3/compositing/isolation-parsing.html
840                css3/compositing/svg-isolation-default.html
841                css3/compositing/svg-isolation-isolated-group.html
842                css3/compositing/svg-isolation-simple.html
843
844         * css/CSSComputedStyleDeclaration.cpp:
845         (WebCore::ComputedStyleExtractor::propertyValue):
846         * css/CSSParser.cpp:
847         (WebCore::isValidKeywordPropertyAndValue):
848         (WebCore::isKeywordPropertyID):
849         (WebCore::CSSParser::parseValue):
850         * css/CSSPrimitiveValueMappings.h:
851         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
852         (WebCore::CSSPrimitiveValue::operator Isolation):
853         * css/CSSPropertyNames.in: Add -webkit-isolation.
854         * css/CSSValueKeywords.in: Add the isolate value.
855         * css/DeprecatedStyleBuilder.cpp:
856         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
857         * css/StyleResolver.cpp:
858         (WebCore::StyleResolver::adjustRenderStyle): Explicitly set isolation:isolate to create a stacking context.
859         * rendering/style/RenderStyle.cpp:
860         (WebCore::RenderStyle::changeRequiresLayerRepaint): Changing isolation should trigger a repaint.
861         * rendering/style/RenderStyle.h: Setters and getters for isolation.
862         * rendering/style/RenderStyleConstants.h: Add Isolation enum.
863         * rendering/style/StyleRareNonInheritedData.cpp: Add m_isolation.
864         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
865         (WebCore::StyleRareNonInheritedData::operator==):
866         * rendering/style/StyleRareNonInheritedData.h:
867         * rendering/svg/SVGRenderingContext.cpp:
868         (WebCore::SVGRenderingContext::prepareToRenderSVGContent): If isolated, paint in a transparency layer.
869
870 2014-02-27  Krzysztof Czech  <k.czech@samsung.com>
871
872         [ATK] Utilize AtkTableCell to expose directly AccessibilityTableCell to AT
873         https://bugs.webkit.org/show_bug.cgi?id=129250
874
875         Reviewed by Mario Sanchez Prada.
876
877         Test: accessibility/table-scope.html
878
879         Exposing AtkTableCell to AT. Implementing possibility to get column headers and row headers
880         as an array of cells.
881
882         * GNUmakefile.list.am:
883         * PlatformEfl.cmake:
884         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp: Added.
885         (convertToGPtrArray):
886         (core):
887         (webkitAccessibleTableCellGetColumnHeaderCells):
888         (webkitAccessibleTableCellGetRowHeaderCells):
889         (webkitAccessibleTableCellInterfaceInit):
890         * accessibility/atk/WebKitAccessibleInterfaceTableCell.h: Added.
891         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
892         (getInterfaceMaskFromObject):
893
894 2014-02-27  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
895
896         Improving containing column block determination
897         https://bugs.webkit.org/show_bug.cgi?id=125449
898
899         Reviewed by Darin Adler.
900
901         Making sure that the containing column block of any elements
902         can not be oneself.
903
904         Test: fast/css/crash-on-column-splitting.html
905
906         * rendering/RenderBlock.cpp:
907         (WebCore::RenderBlock::containingColumnsBlock):
908         (WebCore::RenderBlock::splitFlow):
909
910 2014-02-27  Xabier Rodriguez Calvar  <calvaris@igalia.com>
911
912         [GTK] Improve JavaScript multimedia controls
913         https://bugs.webkit.org/show_bug.cgi?id=129044
914
915         Reviewed by Jer Noble.
916
917         After webkit.org/b/123097 a follow up was needed to improve
918         accessibily and some other cosmetic problems, like cleaner CSS and
919         new missing baselines.
920
921         No new tests because of no new functionality.
922
923         * Modules/mediacontrols/mediaControlsApple.js:
924         Added hiding class name.
925         * Modules/mediacontrols/mediaControlsGtk.js:
926         (ControllerGtk.prototype.createControls): Set remaining time as
927         hidden by default and turned volumebox hidden into hiding.
928         (ControllerGtk.prototype.updateTime): Simplified the hiding and
929         showing by removing the show class and using hidden only.
930         (ControllerGtk.prototype.handleMuteButtonMouseOver):
931         (ControllerGtk.prototype.handleVolumeBoxMouseOut): Turned hidden
932         into hiding.
933         (ControllerGtk.prototype.updateReadyState): Changed coding style
934         and added down class for the panel too.
935         (ControllerGtk.prototype.updatePlaying): Change for coding style
936         coherence.
937         (ControllerGtk.prototype.handleCaptionButtonClicked): Call
938         handleCaptionButtonShowMenu.
939         (ControllerGtk.prototype.handleCaptionButtonMouseOver): Call
940         handleCaptionButtonShowMenu.
941         (ControllerGtk.prototype.handleCaptionButtonShowMenu): Created
942         with the former behavior of handleCaptionButtonMouseOver.
943         * css/mediaControlsGtk.css:
944         (.hidden): Set display none for all objects with hidden class.
945         (audio::-webkit-media-controls-panel *:focus):
946         (audio::-webkit-media-controls-panel.down *:focus): Added gradient
947         for the active and focus status.
948         (audio::-webkit-media-controls-time-remaining-display)
949         (video::-webkit-media-controls-time-remaining-display): Set
950         display block.
951         (audio::-webkit-media-controls-volume-slider-container)
952         (video::-webkit-media-controls-volume-slider-container): Set
953         display flex.
954         (video::-webkit-media-controls-volume-slider-container.hiding):
955         Changed from hidden.
956         (video::-webkit-media-controls-panel .hiding.down): Changed from
957         hidden.
958         * platform/gtk/RenderThemeGtk.cpp:
959         (WebCore::RenderThemeGtk::paintMediaButton): Returning true to
960         allow CSS painting the gradient.
961
962 2014-02-27  Zan Dobersek  <zdobersek@igalia.com>
963
964         Unreviewed. Fixing the GTK build fix after r164757.
965
966         * platform/network/NetworkStateNotifier.cpp: r164757 introduced a layering violation by including
967         the Settings.h header. The use of that class is guarded by PLATFORM(IOS), so the header inclusion
968         should be guarded as well.
969
970 2014-02-26  Ryosuke Niwa  <rniwa@webkit.org>
971
972         Extract named items caches in HTMLCollection as a class
973         https://bugs.webkit.org/show_bug.cgi?id=129365
974
975         Reviewed by Antti Koivisto.
976
977         Extracted CollectionNamedElementCache, like CollectionIndexCache, out of HTMLCollection.
978         We can move more named item related functions into this class in the future.
979
980         HTMLCollection's member variables m_isNameCacheValid, m_idCache, and m_nameCache were replaced by
981         a single unique_ptr that holds an instance of CollectionNamedElementCache since this object rarely
982         exists in most HTMLCollections.
983
984         Also removed m_isItemRefElementsCacheValid since it was only used by Microdata API removed in r153772
985         and renamed a whole bunch of member functions and variables for consistency.
986
987         * dom/Document.cpp:
988         (WebCore::Document::collectionCachedIdNameMap):
989         (WebCore::Document::collectionWillClearIdNameMap):
990         * dom/Document.h:
991         * dom/NodeRareData.h:
992         (WebCore::NodeListsNodeData::adoptDocument):
993         * html/HTMLAllCollection.cpp:
994         (WebCore::HTMLAllCollection::namedItemWithIndex):
995         * html/HTMLCollection.cpp:
996         (WebCore::HTMLCollection::HTMLCollection):
997         (WebCore::HTMLCollection::~HTMLCollection):
998         (WebCore::HTMLCollection::invalidateCache):
999         (WebCore::HTMLCollection::invalidateNamedElementCache): Renamed from invalidateIdNameCacheMaps.
1000         (WebCore::HTMLCollection::namedItem):
1001         (WebCore::HTMLCollection::updateNamedElementCache): Renamed from updateNameCache.
1002         (WebCore::HTMLCollection::namedItems):
1003
1004         * html/HTMLCollection.h:
1005         (WebCore::CollectionNamedElementCache::findElementsWithId): Renamed from HTMLCollection::idCache.
1006         (WebCore::CollectionNamedElementCache::findElementsWithName): Renamed from HTMLCollection::nameCache.
1007         (WebCore::CollectionNamedElementCache::appendIdCache): Moved from HTMLCollection.
1008         (WebCore::CollectionNamedElementCache::appendNameCache): Ditto.
1009         (WebCore::CollectionNamedElementCache::find): Ditto.
1010         (WebCore::CollectionNamedElementCache::append): Ditto.
1011
1012         (WebCore::HTMLCollection::invalidateCache):
1013         (WebCore::HTMLCollection::hasNamedElementCache): Renamed from hasIdNameCache.
1014         (WebCore::HTMLCollection::createNameItemCache): Added.
1015         (WebCore::HTMLCollection::namedItemCaches): Added.
1016
1017         * html/HTMLFormControlsCollection.cpp:
1018         (WebCore::HTMLFormControlsCollection::updateNamedElementCache):
1019         * html/HTMLFormControlsCollection.h:
1020
1021 2014-02-26  Ryosuke Niwa  <rniwa@webkit.org>
1022
1023         Indenting an indented image element resulted in an extra indentation
1024         https://bugs.webkit.org/show_bug.cgi?id=129201
1025
1026         Reviewed by Enrica Casucci.
1027
1028         The bug was caused by endOfParagraph returning a position at the beginning of a block when the position
1029         passed into the function was at the beginning of the block. Consider the following DOM:
1030         <blockquote><img></blockquote>
1031
1032         When endOfParagraph is called on (blockquote, 0), the condition r->isBR() || isBlock(n) in endOfParagraph
1033         matches immediately on startNode and it returns (blockquote, 0) again.
1034
1035         This resulted in moveParagraphWithClones invoked by indentIntoBlockquote to erroneously clone the inner
1036         blockquote. Worked around this bug in ApplyBlockElementCommand::formatSelection by checking this specific
1037         condition and moving the position to the end of the block. Unfortunately, a lot of existing code depends
1038         on the current behavior of endOfParagraph so fixing the function itself was not possible.
1039
1040         There was another bug in indentIntoBlockquote to incorrectly insert a new blockquote into the existing
1041         blockquote due to the code introduced in r99594 to avoid inserting before the root editable element.
1042         Since this happens only if outerBlock is the root editable element, which is nodeToSplitTo or an ancestor
1043         of nodeToSplitTo, explicitly look for this condition.
1044
1045         Test: editing/execCommand/indent-img-twice.html
1046
1047         * editing/ApplyBlockElementCommand.cpp:
1048         (WebCore::ApplyBlockElementCommand::formatSelection):
1049         (WebCore::isNewLineAtPosition):
1050         * editing/IndentOutdentCommand.cpp:
1051         (WebCore::IndentOutdentCommand::indentIntoBlockquote):
1052         * editing/VisibleUnits.cpp:
1053         (WebCore::endOfParagraph): Added a FIXME.
1054
1055 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
1056
1057         Fix two assertions/crashes in compositing code
1058         https://bugs.webkit.org/show_bug.cgi?id=129414
1059
1060         Reviewed by Dean Jackson.
1061
1062         Fix two issues introduced in r164759.
1063
1064         * rendering/RenderLayerCompositor.cpp:
1065         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers): Don't call
1066         ourselves recursively!
1067         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer): We call this
1068         function unconditionally on layer teardown, so this assertion is bogus.
1069
1070 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
1071
1072         Fix the build with some compiler configurations.
1073
1074         * platform/mac/ScrollAnimatorMac.mm:
1075         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1076         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
1077         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
1078
1079 2014-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
1080
1081         Ranges given to createMarkupInternal might not be canonicalized
1082         https://bugs.webkit.org/show_bug.cgi?id=129408
1083
1084         Reviewed by Ryosuke Niwa.
1085
1086         When WebKit clients (such as Mail) call WKWebArchiveCreateFromRange() with a range,
1087         that range is not necessarily canonicalized. Therefore, comparing it for equality
1088         with a canonicalized range might return a false negative. Instead, we should compare
1089         canonicalized ranges.
1090
1091         No new tests because this codepath will only be reached via SPI.
1092
1093         * editing/markup.cpp:
1094         (WebCore::createMarkupInternal):
1095
1096 2014-02-26  Enrica Casucci  <enrica@apple.com>
1097
1098         [iOS WebKit2] Form controls handling: implement date and time controls.
1099         https://bugs.webkit.org/show_bug.cgi?id=129344
1100
1101         Reviewed by Simon Fraser and Joseph Pecoraro.
1102
1103         Adding one localizable string.
1104
1105         * English.lproj/Localizable.strings:
1106
1107 2014-02-26  Simon Fraser  <simon.fraser@apple.com>
1108
1109         Prepare for overflow scrolling nodes in the scrolling tree
1110         https://bugs.webkit.org/show_bug.cgi?id=129398
1111
1112         Reviewed by Tim Horton.
1113
1114         Lay some groundwork for overflow:scrolling nodes in the scrolling tree.
1115         Change terminology to refer to "scroll-coordinatored" layers now, not just viewport-constrained
1116         layers.
1117         
1118         A given layer can be both viewport-constrained and overflow-scrolling (e.g. position:fixed,
1119         overflow:scroll), so handle that in RenderLayerBacking, and use some "reason" flags
1120         in RenderLayerCompositor.
1121
1122         * page/FrameView.cpp:
1123         (WebCore::FrameView::scrollLayerID): Rename
1124         * page/scrolling/ScrollingStateTree.cpp:
1125         (WebCore::ScrollingStateTree::attachNode): Remove invalid assertion.
1126         * rendering/RenderLayerBacking.cpp:
1127         (WebCore::RenderLayerBacking::RenderLayerBacking):
1128         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1129         (WebCore::RenderLayerBacking::updateScrollingLayers): Simplify the logic with
1130         an early return.
1131         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
1132         Allow a layer to play both viewport-constrained and scrolling roles
1133         in the scrolling tree.
1134         * rendering/RenderLayerBacking.h:
1135         (WebCore::RenderLayerBacking::viewportConstrainedNodeID):
1136         (WebCore::RenderLayerBacking::setViewportConstrainedNodeID):
1137         (WebCore::RenderLayerBacking::scrollingNodeID):
1138         (WebCore::RenderLayerBacking::setScrollingNodeID):
1139         (WebCore::RenderLayerBacking::scrollingNodeIDForChildren):
1140         * rendering/RenderLayerCompositor.cpp:
1141         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1142         (WebCore::RenderLayerCompositor::didFlushChangesForLayer):
1143         (WebCore::RenderLayerCompositor::updateBacking):
1144         (WebCore::RenderLayerCompositor::layerWillBeRemoved):
1145         (WebCore::RenderLayerCompositor::fixedRootBackgroundLayerChanged):
1146         (WebCore::RenderLayerCompositor::clearBackingForLayerIncludingDescendants):
1147         (WebCore::RenderLayerCompositor::requiresCompositingLayer):
1148         (WebCore::RenderLayerCompositor::requiresOwnBackingStore):
1149         (WebCore::RenderLayerCompositor::reasonsForCompositing):
1150         (WebCore::RenderLayerCompositor::requiresCompositingForScrolling):
1151         (WebCore::isViewportConstrainedFixedOrStickyLayer):
1152         (WebCore::isMainFrameScrollingOrOverflowScrolling):
1153         (WebCore::RenderLayerCompositor::rootLayerAttachmentChanged):
1154         (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
1155         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
1156         (WebCore::nearestScrollCoordinatedAncestor):
1157         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
1158         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
1159         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
1160         (WebCore::RenderLayerCompositor::willRemoveScrollingLayer):
1161         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
1162         * rendering/RenderLayerCompositor.h:
1163
1164 2014-02-26  Andy Estes  <aestes@apple.com>
1165
1166         [iOS] Support network state notification using CPNetworkObserver
1167         https://bugs.webkit.org/show_bug.cgi?id=129358
1168
1169         Reviewed by Dan Bernstein.
1170
1171         Add iOS support for navigator.onLine and online/offline events. Since
1172         it can be expensive to query CPNetworkObserver, wait to do so until
1173         someone calls NetworkStateObserver::onLine() or
1174         NetworkStateObserver::addNetworkStateChangeListener(). For clients that
1175         don't wish to observe network reachability at all, add a global opt-out.
1176         These clients will only pay the cost of CPNetworkObserver if they load
1177         a page that explicitly accesses navigator.onLine.
1178
1179         No new tests. Covered by existing tests.
1180
1181         * WebCore.exp.in: Stopped exporting NetworkStateNotifier::setIsOnLine()
1182         and started exporting Settings::gShouldOptOutOfNetworkStateObservation.
1183         * WebCore.xcodeproj/project.pbxproj: Renamed NetworkStateNotifierIOS.cpp
1184         to NetworkStateNotifierIOS.mm.
1185         * page/Settings.cpp: Defaulted gShouldOptOutOfNetworkStateObservation
1186         to false.
1187         * page/Settings.h:
1188         (WebCore::Settings::setShouldOptOutOfNetworkStateObservation):
1189         (WebCore::Settings::shouldOptOutOfNetworkStateObservation):
1190         * platform/network/NetworkStateNotifier.cpp:
1191         (WebCore::NetworkStateNotifier::addNetworkStateChangeListener): Ignored
1192         the listener if Settings::shouldOptOutOfNetworkStateObservation().
1193         Called registerObserverIfNecessary() and added the listener otherwise.
1194         (WebCore::NetworkStateNotifier::notifyNetworkStateChange): Const qualified.
1195         * platform/network/NetworkStateNotifier.h
1196         (NetworkStateNotifier::onLine):
1197         * platform/network/ios/NetworkStateNotifierIOS.cpp: Removed.
1198         * platform/network/ios/NetworkStateNotifierIOS.mm: Added.
1199         (-[NetworkStateObserver initWithNotifier:WebCore::]): Registered self
1200         as a network reachable observer on CPNetworkObserver.
1201         (-[NetworkStateObserver dealloc]): Removed self as a network reachable
1202         observer.
1203         (-[NetworkStateObserver networkStateChanged:]): Called setOnLine() on
1204         the web thread, passing the reachability value from the notification.
1205         (WebCore::NetworkStateNotifier::NetworkStateNotifier):
1206         (WebCore::NetworkStateNotifier::~NetworkStateNotifier): Cleared
1207         m_observer's pointer back to us.
1208         (WebCore::NetworkStateNotifier::registerObserverIfNecessary): Initialized
1209         m_observer if necessary.
1210         (WebCore::NetworkStateNotifier::onLine): Called
1211         registerObserverIfNecessary() and set an initial value for m_isOnLine
1212         if m_isOnLineInitialized is false. Returned m_isOnLine.
1213         (WebCore::setOnLine): Set m_isOnLine and called
1214         notifyNetworkStateChange() if needed. Unconditionally set
1215         m_isOnLineInitialized to true.
1216
1217 2014-02-26  Brian Burg  <bburg@apple.com>
1218
1219         Unreviewed build fix for !ENABLE(CONTEXT_MENUS).
1220
1221         I forgot to add guards to handleContextMenuEvent().
1222
1223         * replay/UserInputBridge.cpp:
1224         * replay/UserInputBridge.h:
1225
1226 2014-02-26  Dean Jackson  <dino@apple.com>
1227
1228         [WebGL] Only skip context error retrieval if a pending context
1229         https://bugs.webkit.org/show_bug.cgi?id=129397
1230
1231         Reviewed by Tim Horton.
1232
1233         A lost context should still ask the GC3D what the error is. Only
1234         a pending context should return early.
1235
1236         * html/canvas/WebGLRenderingContext.cpp:
1237         (WebCore::WebGLRenderingContext::getError):
1238
1239 2014-02-26  Brian Burg  <bburg@apple.com>
1240
1241         Web Replay: route through UserInputBridge when delivering user inputs to WebCore
1242         https://bugs.webkit.org/show_bug.cgi?id=128150
1243
1244         Reviewed by Timothy Hatcher.
1245
1246         Add an UserInputBridge instance to each Page. WebKit2 routes a page's user inputs through
1247         the WebCore page's user input bridge so that the inputs can be selectively captured, filtered,
1248         and replayed using instrumentation inside the UserInputBridge.
1249
1250         For now, the routing methods of UserInputBridge have no replay-specific code paths, and just
1251         put the input delivery code inside WebCore rather than its external clients. Replay-specific
1252         code paths will be added once https://bugs.webkit.org/show_bug.cgi?id=128782 is fixed. However,
1253         once complete the code will work as follows:
1254
1255         - When neither capturing or replaying, behavior is unchanged.
1256
1257         - When capturing user inputs, each external input is saved into a replay log as it crosses
1258         the bridge from outside WebCore.
1259
1260         - When replaying, the bridge closes and user inputs from WebKit2 are not accepted. Instead,
1261         the saved inputs from the replay log are re-dispatched as if they had crossed the bridge.
1262
1263         * CMakeLists.txt:
1264         * GNUmakefile.am:
1265         * GNUmakefile.list.am:
1266         * WebCore.exp.in: Add symbols for input routing methods.
1267         * WebCore.vcxproj/WebCore.vcxproj:
1268         * WebCore.vcxproj/WebCore.vcxproj.filters:
1269         * WebCore.xcodeproj/project.pbxproj:
1270         * page/Page.cpp:
1271         (WebCore::Page::Page): Initialize the owned UserInputBridge in the Page constructor.
1272         * page/Page.h:
1273         (WebCore::Page::inputBridge): Added a by-reference getter.
1274         * replay/UserInputBridge.cpp: Added.
1275         (WebCore::UserInputBridge::UserInputBridge):
1276         (WebCore::UserInputBridge::~UserInputBridge):
1277         (WebCore::UserInputBridge::handleContextMenuEvent):
1278         (WebCore::UserInputBridge::handleMousePressEvent):
1279         (WebCore::UserInputBridge::handleMouseReleaseEvent):
1280         (WebCore::UserInputBridge::handleMouseMoveEvent):
1281         (WebCore::UserInputBridge::handleMouseMoveOnScrollbarEvent):
1282         (WebCore::UserInputBridge::handleKeyEvent):
1283         (WebCore::UserInputBridge::handleAccessKeyEvent):
1284         (WebCore::UserInputBridge::handleWheelEvent):
1285         (WebCore::UserInputBridge::focusSetActive):
1286         (WebCore::UserInputBridge::focusSetFocused):
1287         (WebCore::UserInputBridge::scrollRecursively):
1288         (WebCore::UserInputBridge::logicalScrollRecursively):
1289         (WebCore::UserInputBridge::loadRequest):
1290         (WebCore::UserInputBridge::reloadFrame):
1291         (WebCore::UserInputBridge::stopLoadingFrame):
1292         (WebCore::UserInputBridge::tryClosePage):
1293         * replay/UserInputBridge.h: Added.
1294
1295 2014-02-26  Dean Jackson  <dino@apple.com>
1296
1297         [WebGL] Protect more WebGL entry points for pending contexts
1298         https://bugs.webkit.org/show_bug.cgi?id=129386
1299
1300         Reviewed by Tim Horton.
1301
1302         There are entry points into a WebGLRenderingContext that don't
1303         come from the web-exposed API directly, such as drawImage with
1304         the WebGL canvas. Protect these by returning early if we're
1305         a pending context.
1306
1307         Also a bunch of drive-by 0 -> nullptr changes.
1308
1309         * html/canvas/WebGLRenderingContext.cpp:
1310         (WebCore::WebGLRenderingContext::markLayerComposited):
1311         (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
1312         (WebCore::WebGLRenderingContext::paintRenderingResultsToImageData):
1313         (WebCore::WebGLRenderingContext::reshape):
1314         (WebCore::WebGLRenderingContext::createBuffer):
1315         (WebCore::WebGLRenderingContext::createFramebuffer):
1316         (WebCore::WebGLRenderingContext::createTexture):
1317         (WebCore::WebGLRenderingContext::createProgram):
1318         (WebCore::WebGLRenderingContext::createRenderbuffer):
1319         (WebCore::WebGLRenderingContext::createShader):
1320         (WebCore::WebGLRenderingContext::getActiveAttrib):
1321         (WebCore::WebGLRenderingContext::getActiveUniform):
1322         (WebCore::WebGLRenderingContext::getContextAttributes):
1323         (WebCore::WebGLRenderingContext::getError):
1324         (WebCore::WebGLRenderingContext::getExtension):
1325         (WebCore::WebGLRenderingContext::getShaderPrecisionFormat):
1326         (WebCore::WebGLRenderingContext::getUniformLocation):
1327         (WebCore::WebGLRenderingContext::drawImageIntoBuffer):
1328         (WebCore::WebGLRenderingContext::videoFrameToImage):
1329         (WebCore::WebGLRenderingContext::validateBufferDataParameters):
1330         (WebCore::WebGLRenderingContext::LRUImageBufferCache::imageBuffer):
1331
1332 2014-02-26  Bem Jones-Bey  <bjonesbe@adobe.com>
1333
1334         [CSS Shapes] inset and inset-rectangle trigger assert with replaced element and large percentage dimension
1335         https://bugs.webkit.org/show_bug.cgi?id=129060
1336
1337         Reviewed by Simon Fraser.
1338
1339         A bounds check was omitted when computing the width and height for inset
1340         rectangles, making it possible for the width or height to end up being
1341         negative. This patch adds in that check for both. It seems that only
1342         replaced elements like iframe and img trigger this problem.
1343
1344         Tests: fast/shapes/shape-outside-floats/shape-outside-floats-img-inset-negative-width-crash.html
1345                fast/shapes/shape-outside-floats/shape-outside-floats-img-inset-rectangle-negative-width-crash.html
1346
1347         * rendering/shapes/Shape.cpp:
1348         (WebCore::Shape::createShape):
1349
1350 2014-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
1351
1352         Underlines are too thick when zoomed in
1353         https://bugs.webkit.org/show_bug.cgi?id=129352
1354
1355         Reviewed by Dean Jackson.
1356
1357         The input to the underline drawing code is in user-space, not device-space.
1358         The underlines were getting scaled twice, once in InlineTextBox and the other
1359         in GraphicsContext.
1360
1361         Test: fast/css3-text/css3-text-decoration/text-decoration-scaled.html
1362
1363         * rendering/InlineTextBox.cpp:
1364         (WebCore::InlineTextBox::paintDecoration):
1365
1366 2014-02-26  Andreas Kling  <akling@apple.com>
1367
1368         Remove unused InspectorCounters.
1369         <https://webkit.org/b/129367>
1370
1371         The InspectorCounters code was only used to implement two layout test
1372         APIs (window.internals.numberOfLive{Nodes,Documents}) yet it had hooks
1373         in crazy places like Node construction and destruction.
1374
1375         Rewrote the internals APIs to iterate over all live Documents instead,
1376         totaling up their referencing Node count. Added a process-global
1377         Document::allDocuments() HashSet to make this whole thing possible.
1378
1379         Reviewed by Sam Weinig.
1380
1381         * CMakeLists.txt:
1382         * GNUmakefile.list.am:
1383         * WebCore.exp.in:
1384         * WebCore.vcxproj/WebCore.vcxproj:
1385         * WebCore.vcxproj/WebCore.vcxproj.filters:
1386         * WebCore.xcodeproj/project.pbxproj:
1387         * bindings/js/JSEventListener.cpp:
1388         * dom/Document.cpp:
1389         (WebCore::Document::allDocuments):
1390         (WebCore::Document::Document):
1391         (WebCore::Document::~Document):
1392         * dom/Document.h:
1393         (WebCore::Node::Node):
1394         * dom/Node.cpp:
1395         (WebCore::Node::~Node):
1396         * inspector/InspectorAllInOne.cpp:
1397         * inspector/InspectorCounters.cpp: Removed.
1398         * inspector/InspectorCounters.h: Removed.
1399         * inspector/InspectorTimelineAgent.cpp:
1400         (WebCore::InspectorTimelineAgent::start):
1401         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
1402         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
1403         * inspector/InspectorTimelineAgent.h:
1404         * inspector/protocol/Timeline.json:
1405         * platform/ThreadGlobalData.cpp:
1406         * testing/Internals.cpp:
1407         (WebCore::Internals::numberOfLiveNodes):
1408         (WebCore::Internals::numberOfLiveDocuments):
1409         * testing/Internals.h:
1410         * testing/Internals.idl:
1411
1412 2014-02-26  Joseph Pecoraro  <pecoraro@apple.com>
1413
1414         Web Inspector: Remove console.profiles from window.console API
1415         https://bugs.webkit.org/show_bug.cgi?id=116883
1416
1417         Reviewed by Timothy Hatcher.
1418
1419         console.profiles has been removed or never implemented by other
1420         browsers. We should remove it as well. However, since tests
1421         rely on it, keep it as window.internals.consoleProfiles.
1422
1423         * WebCore.exp.in:
1424         * page/Console.idl:
1425         * testing/Internals.cpp:
1426         (WebCore::Internals::consoleProfiles):
1427         * testing/Internals.h:
1428         * testing/Internals.idl:
1429
1430 2014-02-26  Martin Hock  <mhock@apple.com>
1431
1432         Create SessionID value-style class for session IDs.
1433         https://bugs.webkit.org/show_bug.cgi?id=129141
1434
1435         Reviewed by Sam Weinig.
1436
1437         * GNUmakefile.list.am:
1438         * WebCore.exp.in:
1439         * WebCore.xcodeproj/project.pbxproj:
1440         * page/Page.cpp: Add SessionID member.
1441         (WebCore::Page::Page):
1442         (WebCore::Page::sessionID): Retrieve sessionID or use settings if not set.
1443         * page/Page.h:
1444         (WebCore::Page::isSessionIDSet):
1445         (WebCore::Page::setSessionID):
1446         * page/SessionID.h: Session ID class consisting solely of its uint64_t session ID.
1447         (WebCore::SessionID::SessionID):
1448         (WebCore::SessionID::isValid): Not empty.
1449         (WebCore::SessionID::isEphemeral):
1450         (WebCore::SessionID::sessionID):
1451         (WebCore::SessionID::operator==): Value-based equality.
1452         (WebCore::SessionID::operator!=):
1453         (WebCore::SessionID::emptySessionID): Zero value also used for HashTraits emptyValue.
1454         (WebCore::SessionID::defaultSessionID):
1455         (WebCore::SessionID::legacyPrivateSessionID):
1456         * page/SessionIDHash.h:
1457         (WTF::SessionIDHash::hash): Just the casted session ID (low order bytes)
1458         (WTF::SessionIDHash::equal):
1459         (WTF::HashTraits<WebCore::SessionID>::emptyValue): Equal to emptySessionID.
1460         (WTF::HashTraits<WebCore::SessionID>::constructDeletedValue): -1 value.
1461         (WTF::HashTraits<WebCore::SessionID>::isDeletedValue):
1462
1463 2014-02-26  Eric Carlson  <eric.carlson@apple.com>
1464
1465         Fix builds that don't define IMAGE_CONTROLS.
1466
1467         * page/ContextMenuContext.cpp:
1468         (WebCore::ContextMenuContext::ContextMenuContext):
1469
1470 2014-02-26  Eric Carlson  <eric.carlson@apple.com>
1471
1472         Build fix for OS X after r164720.
1473
1474         * page/ContextMenuContext.cpp:
1475
1476 2014-02-26  Brady Eidson  <beidson@apple.com>
1477
1478         Pipe experimental image controls menu up to WebKit2
1479         https://bugs.webkit.org/show_bug.cgi?id=129339
1480
1481         Reviewed by Simon Fraser.
1482
1483         Handle events for the image control, starting down the context menu code path if appropriate:
1484         * html/shadow/mac/ImageControlsRootElementMac.cpp:
1485         (WebCore::ImageControlsRootElementMac::defaultEventHandler):
1486         * html/shadow/mac/ImageControlsRootElementMac.h:
1487
1488         Add a class to hold a HitTestResult and addition info about the current ContextMenu invocation:
1489         * page/ContextMenuContext.cpp: Added.
1490         (WebCore::ContextMenuContext::ContextMenuContext):
1491         * page/ContextMenuContext.h: Added.
1492         (WebCore::ContextMenuContext::hitTestResult):
1493         (WebCore::ContextMenuContext::isImageControl):
1494
1495         Update ContextMenuController to work with ContextMenuContext instead of HitTestResult directly:
1496         * page/ContextMenuController.cpp:
1497         (WebCore::ContextMenuController::showContextMenu):
1498         (WebCore::ContextMenuController::createContextMenu):
1499         (WebCore::ContextMenuController::contextMenuItemSelected):
1500         (WebCore::ContextMenuController::populate):
1501         (WebCore::ContextMenuController::addInspectElementItem):
1502         (WebCore::ContextMenuController::checkOrEnableIfNeeded):
1503         (WebCore::ContextMenuController::showImageControlsMenu):
1504         * page/ContextMenuController.h:
1505         (WebCore::ContextMenuController::contextMenu):
1506         (WebCore::ContextMenuController::setContextMenuContext):
1507         (WebCore::ContextMenuController::context):
1508         (WebCore::ContextMenuController::hitTestResult):
1509
1510         * CMakeLists.txt:
1511         * GNUmakefile.list.am:
1512         * WebCore.vcxproj/WebCore.vcxproj:
1513         * WebCore.xcodeproj/project.pbxproj:
1514
1515 2014-02-26  Zan Dobersek  <zdobersek@igalia.com>
1516
1517         REGRESSION(r162947): Document::topDocument() returns an incorrect reference for cached Documents
1518         https://bugs.webkit.org/show_bug.cgi?id=128175
1519
1520         Reviewed by Antti Koivisto.
1521
1522         * dom/Document.cpp:
1523         (WebCore::Document::topDocument): Fall back to pre-r162947 way of determining the top document
1524         when the Document is in page cache or is in the middle of having its render tree destroyed.
1525         In the first case, the determined top document is actually the document currently loaded in the
1526         Frame to which the cached document is still connected, which is obviously not desired. In the
1527         second case the top document is similarly incorrectly deduced, leading to non-deletion of the
1528         proper top document's AXObjectCache. Because of this AccessibilityRenderObjects are not detached
1529         which results in assertions in RenderObject destructor where the objects are found to be still
1530         flagged as in use by the AX cache.
1531
1532 2014-02-26  Mihnea Ovidenie  <mihnea@adobe.com>
1533
1534         [CSSRegions] Remove unused method RenderFlowThread::updateLayerToRegionMappings()
1535         https://bugs.webkit.org/show_bug.cgi?id=129368
1536
1537         Reviewed by Andrei Bucur.
1538
1539         Remove unused code, no new tests.
1540
1541         * rendering/RenderFlowThread.h:
1542
1543 2014-02-26  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1544
1545         [GTK] Regression when showing the captions menu
1546         https://bugs.webkit.org/show_bug.cgi?id=129106
1547
1548         Reviewed by Martin Robinson.
1549
1550         In some cases, when clicking the captions button the menu was not
1551         shown.
1552
1553         Updated test: media/video-controls-captions-trackmenu.html
1554
1555         * Modules/mediacontrols/mediaControlsGtk.js:
1556         (ControllerGtk.prototype.buildCaptionMenu):
1557         (ControllerGtk.prototype.showCaptionMenu): Specify sizes in
1558         pixels.
1559
1560 2014-02-26  Ryosuke Niwa  <rniwa@webkit.org>
1561
1562         Avoid unnecessary HTML Collection invalidations for id and name attribute changes
1563         https://bugs.webkit.org/show_bug.cgi?id=129361
1564
1565         Reviewed by Benjamin Poulain.
1566
1567         Before this patch, setting id and name attributes resulted in traversing all the ancestors to invalidate
1568         HTML collections on those nodes whenever we had more than one HTMLCollection alive.
1569
1570         Avoid the traversal when HTMLCollections don't have any valid id and name map caches by making each
1571         HTMLCollection explicitly call collectionCachedIdNameMap and collectionWillClearIdNameMap when it caches
1572         or clears the id and name map.
1573
1574         Inspired by https://chromium.googlesource.com/chromium/blink/+/5b06b91b79098f7d42e480f85be32198315d2440
1575
1576         * dom/Document.cpp:
1577         (WebCore::Document::registerCollection): Takes a boolean to indicate whether collection has a valid cache
1578         for the id and name map.
1579         (WebCore::Document::unregisterCollection): Ditto.
1580         (WebCore::Document::collectionCachedIdNameMap): Added.
1581         (WebCore::Document::collectionWillClearIdNameMap): Added.
1582         * dom/Document.h:
1583
1584         * dom/NodeRareData.h:
1585         (WebCore::NodeListsNodeData::adoptDocument): Call invalidateCache on HTML collections after, not before,
1586         calling unregisterCollection and registerCollection since collections' owner nodes have already been
1587         moved to the new document here and invalidateCache uses owner node's document to call
1588         collectionWillClearIdNameMap. So calling invalidateCache before calling unregister/registerCollection
1589         would result in collectionWillClearIdNameMap getting called on a wrong document.
1590
1591         * html/HTMLCollection.cpp:
1592         (WebCore::HTMLCollection::HTMLCollection):
1593         (WebCore::HTMLCollection::~HTMLCollection):
1594         (WebCore::HTMLCollection::invalidateCache):
1595         (WebCore::HTMLCollection::invalidateIdNameCacheMaps): Added the code to uncount itself from the number
1596         of live node lists and HTML collections that need to be invalidated upon id and name attribute changes.
1597         (WebCore::HTMLCollection::updateNameCache):
1598
1599         * html/HTMLCollection.h:
1600         (WebCore::HTMLCollection::invalidateCache):
1601         (WebCore::HTMLCollection::hasIdNameCache): Renamed from hasNameCache.
1602         (WebCore::HTMLCollection::setHasIdNameCache): Renamed from setHasIdNameCache.
1603
1604         * html/HTMLFormControlsCollection.cpp:
1605         (WebCore::HTMLFormControlsCollection::updateNameCache):
1606
1607 2014-02-25  Frédéric Wang  <fred.wang@free.fr>
1608
1609         Add support for minsize/maxsize attributes.
1610         https://bugs.webkit.org/show_bug.cgi?id=122567
1611
1612         Reviewed by Chris Fleizach.
1613
1614         This change implements the minsize/maxsize attributes of the mo element.
1615         We also switch stretch sizes from int to LayoutUnit to improve accuracy.
1616
1617         Tests: mathml/presentation/stretchy-minsize-maxsize-dynamic.html
1618                mathml/presentation/stretchy-minsize-maxsize.html
1619
1620         * rendering/mathml/RenderMathMLOperator.cpp:
1621         (WebCore::RenderMathMLOperator::SetOperatorProperties):
1622         (WebCore::RenderMathMLOperator::stretchTo):
1623         * rendering/mathml/RenderMathMLOperator.h:
1624         * rendering/mathml/RenderMathMLRow.cpp:
1625         (WebCore::RenderMathMLRow::layout):
1626
1627 2014-02-25  Mihnea Ovidenie  <mihnea@adobe.com>
1628
1629         [CSSRegions] Small clean-up of flow threads accelerated compositing code
1630         https://bugs.webkit.org/show_bug.cgi?id=129312
1631
1632         Reviewed by Andrei Bucur.
1633
1634         Some clean-up for the code used for regions in accelerated compositing functionality:
1635         1. Rename updateRenderFlowThreadLayersIfNeeded -> updateFlowThreadsLayerToRegionMappingsIfNeeded
1636         as the function updates the mapping between the flow threads layers and their corresponding regions
1637         2. Remove RenderLayerCompositor::updateRenderFlowThreadLayersIfNeeded and move the code in place
1638         at call site since the function body does not require a dedicated function.
1639
1640         No new functionality, no new tests.
1641
1642         * rendering/FlowThreadController.cpp:
1643         (WebCore::FlowThreadController::updateFlowThreadsLayerToRegionMappingsIfNeeded):
1644         Now that the regions are always layers, we do not need to iterate backwards.
1645         * rendering/FlowThreadController.h:
1646         * rendering/RenderLayerCompositor.cpp:
1647         (WebCore::RenderLayerCompositor::updateCompositingLayers):
1648         * rendering/RenderLayerCompositor.h:
1649
1650 2014-02-25  Zalan Bujtas  <zalan@apple.com>
1651
1652         Subpixel rendering: Ensure consistent border painting width.
1653         https://bugs.webkit.org/show_bug.cgi?id=129259
1654
1655         Reviewed by Simon Fraser.
1656
1657         Border edges are painted as (semi)independent rectangles. When snapping an edge rectangle
1658         to device pixels, its painted dimensions depend on its size and its fractional position.
1659         Specific combination of position and border width can result in painting edges sized differently.
1660         Using device snapped border width to calculate inner/outer rectangles helps to maintain
1661         uniform border width.
1662
1663         Currently not testable.
1664
1665         * rendering/RenderBoxModelObject.cpp:
1666         (WebCore::BorderEdge::BorderEdge):
1667         (WebCore::BorderEdge::shouldRender):
1668         (WebCore::BorderEdge::presentButInvisible):
1669         (WebCore::BorderEdge::widthForPainting):
1670         (WebCore::BorderEdge::getDoubleBorderStripeWidths):
1671         (WebCore::RenderBoxModelObject::paintOneBorderSide):
1672         (WebCore::calculateSideRect):
1673         (WebCore::RenderBoxModelObject::paintBorderSides):
1674         (WebCore::RenderBoxModelObject::paintBorder):
1675         (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
1676         (WebCore::calculateSideRectIncludingInner):
1677
1678 2014-02-25  Zalan Bujtas  <zalan@apple.com>
1679
1680         Subpixel layout: Remove explicit static_cast<LayoutUnit> conversions.
1681         https://bugs.webkit.org/show_bug.cgi?id=129359
1682
1683         Reviewed by Simon Fraser.
1684
1685         No testable change in behavior.
1686
1687         * css/LengthFunctions.cpp:
1688         (WebCore::minimumValueForLength):
1689         * page/FrameView.cpp:
1690         (WebCore::FrameView::forceLayoutForPagination):
1691         * rendering/InlineFlowBox.cpp:
1692         (WebCore::InlineFlowBox::paintFillLayer):
1693         * rendering/InlineFlowBox.h:
1694         (WebCore::InlineFlowBox::logicalLeftVisualOverflow):
1695         (WebCore::InlineFlowBox::logicalRightVisualOverflow):
1696         * rendering/InlineTextBox.cpp:
1697         (WebCore::InlineTextBox::isSelected):
1698         * rendering/RenderBlock.cpp:
1699         (WebCore::RenderBlock::computeColumnCountAndWidth):
1700         (WebCore::getBPMWidth):
1701         * rendering/RenderBlockFlow.cpp:
1702         (WebCore::RenderBlockFlow::adjustForBorderFit):
1703         * rendering/RenderDeprecatedFlexibleBox.cpp:
1704         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
1705         * rendering/RenderFieldset.cpp:
1706         (WebCore::RenderFieldset::paintBoxDecorations):
1707         * rendering/RenderTable.h:
1708         (WebCore::RenderTable::borderSpacingInRowDirection):
1709         * rendering/RenderTextControlMultiLine.cpp:
1710         (WebCore::RenderTextControlMultiLine::preferredContentLogicalWidth):
1711         * rendering/RenderTextControlSingleLine.cpp:
1712         (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth):
1713         * rendering/RootInlineBox.cpp:
1714         (WebCore::RootInlineBox::beforeAnnotationsAdjustment):
1715         (WebCore::RootInlineBox::ascentAndDescentForBox):
1716         * rendering/svg/RenderSVGRoot.cpp:
1717         (WebCore::resolveLengthAttributeForSVG):
1718
1719 2014-02-25  Anders Carlsson  <andersca@apple.com>
1720
1721         Build fixes.
1722
1723         * CMakeLists.txt:
1724         * GNUmakefile.list.am:
1725         * WebCore.vcxproj/WebCore.vcxproj:
1726         * WebCore.vcxproj/WebCore.vcxproj.filters:
1727
1728 2014-02-25  Benjamin Poulain  <bpoulain@apple.com>
1729
1730         Build fix for OS X after r164690
1731
1732         * WebCore.exp.in:
1733
1734 2014-02-25  Anders Carlsson  <andersca@apple.com>
1735
1736         Rename WebCore::VisitedLinkProvider to WebCore::VisitedLinkStore
1737         https://bugs.webkit.org/show_bug.cgi?id=129357
1738
1739         Reviewed by Sam Weinig.
1740
1741         * WebCore.exp.in:
1742         * WebCore.xcodeproj/project.pbxproj:
1743         * dom/VisitedLinkState.cpp:
1744         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
1745         * loader/HistoryController.cpp:
1746         (WebCore::addVisitedLink):
1747         * page/DefaultVisitedLinkStore.cpp: Renamed from Source/WebCore/page/DefaultVisitedLinkProvider.cpp.
1748         (WebCore::DefaultVisitedLinkStore::create):
1749         (WebCore::DefaultVisitedLinkStore::DefaultVisitedLinkStore):
1750         (WebCore::DefaultVisitedLinkStore::~DefaultVisitedLinkStore):
1751         (WebCore::DefaultVisitedLinkStore::isLinkVisited):
1752         (WebCore::DefaultVisitedLinkStore::addVisitedLink):
1753         * page/DefaultVisitedLinkStore.h: Renamed from Source/WebCore/page/DefaultVisitedLinkProvider.h.
1754         * page/Page.cpp:
1755         (WebCore::Page::Page):
1756         (WebCore::Page::visitedLinkStore):
1757         * page/Page.h:
1758         * page/PageGroup.cpp:
1759         (WebCore::PageGroup::visitedLinkStore):
1760         * page/PageGroup.h:
1761         * page/VisitedLinkStore.cpp: Renamed from Source/WebCore/page/VisitedLinkProvider.cpp.
1762         (WebCore::VisitedLinkStore::VisitedLinkStore):
1763         (WebCore::VisitedLinkStore::~VisitedLinkStore):
1764         * page/VisitedLinkStore.h: Renamed from Source/WebCore/page/VisitedLinkProvider.h.
1765
1766 2014-02-25  Enrica Casucci  <enrica@apple.com>
1767
1768         [WebKit2] Form controls handling.
1769         https://bugs.webkit.org/show_bug.cgi?id=129344
1770         <rdar://problem/16053643>
1771
1772         Reviewed by Simon Fraser and Joseph Pecoraro.
1773
1774         Adding some exports.
1775         
1776         * WebCore.exp.in:
1777
1778 2014-02-25  Samuel White  <samuel_white@apple.com>
1779
1780         Add accessibility search predicate support for AXOutlines
1781         https://bugs.webkit.org/show_bug.cgi?id=123748
1782
1783         Reviewed by Chris Fleizach.
1784
1785         Added new AXOutlineSearchKey to support finding elements with aria role=tree.
1786
1787         No new tests, updated existing search-predicate.html test to cover AXOutlineSearchKey.
1788
1789         * accessibility/AccessibilityObject.cpp:
1790         (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
1791         * accessibility/AccessibilityObject.h:
1792         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1793         (createAccessibilitySearchKeyMap):
1794
1795 2014-02-25  Mark Lam  <mark.lam@apple.com>
1796
1797         Need to initialize VM stack data even when the VM is on an exclusive thread.
1798         <https://webkit.org/b/129265>
1799
1800         Not reviewed.
1801
1802         No new tests.
1803
1804         Relanding r164627 now that <https://webkit.org/b/129341> is fixed.
1805
1806         * bindings/js/JSDOMBinding.cpp:
1807         (WebCore::reportException):
1808         * bindings/js/JSDOMWindowBase.cpp:
1809         (WebCore::JSDOMWindowBase::commonVM):
1810
1811 2014-02-25  Mark Lam  <mark.lam@apple.com>
1812
1813         JSDOMPromise methods should acquire VM lock before calling into JS.
1814         <https://webkit.org/b/129341>
1815
1816         Reviewed by Geoffrey Garen.
1817
1818         No new tests.
1819
1820         * bindings/js/JSDOMPromise.h:
1821         (WebCore::DeferredWrapper::resolve):
1822         (WebCore::DeferredWrapper::reject):
1823         (WebCore::DeferredWrapper::resolve<String>):
1824         (WebCore::DeferredWrapper::resolve<bool>):
1825         (WebCore::char>>):
1826         (WebCore::DeferredWrapper::reject<String>):
1827
1828 2014-02-25  Anders Carlsson  <andersca@apple.com>
1829
1830         Simplify visited link style invalidation
1831         https://bugs.webkit.org/show_bug.cgi?id=129340
1832
1833         Reviewed by Dan Bernstein.
1834
1835         Get rid of the static Page::allVisitedStateChanged and Page::visitedStateChanged
1836         member functions and add functions to invalidate all styles on a single page or the style
1837         for a single link hash on a single page.
1838
1839         * WebCore.exp.in:
1840         * page/Page.cpp:
1841         (WebCore::Page::invalidateStylesForAllLinks):
1842         (WebCore::Page::invalidateStylesForLink):
1843         * page/Page.h:
1844         * page/PageGroup.cpp:
1845         (WebCore::PageGroup::addVisitedLink):
1846         (WebCore::PageGroup::removeVisitedLink):
1847         (WebCore::PageGroup::removeVisitedLinks):
1848
1849 2014-02-25  Andreas Kling  <akling@apple.com>
1850
1851         Remove unused ThreadSpecificInspectorCounters.
1852         <https://webkit.org/b/129337>
1853
1854         We were keeping count of all the JS event listeners in every thread
1855         to support an old Chromium feature that's no longer relevant.
1856
1857         Removing this gets rid of expensive thread-local storage lookups.
1858
1859         Reviewed by Anders Carlsson.
1860
1861         * bindings/js/JSEventListener.cpp:
1862         (WebCore::JSEventListener::JSEventListener):
1863         (WebCore::JSEventListener::~JSEventListener):
1864         * inspector/InspectorCounters.cpp:
1865         * inspector/InspectorCounters.h:
1866         * inspector/InspectorTimelineAgent.cpp:
1867         (WebCore::InspectorTimelineAgent::setDOMCounters):
1868         * inspector/protocol/Timeline.json:
1869         * platform/ThreadGlobalData.cpp:
1870         (WebCore::ThreadGlobalData::ThreadGlobalData):
1871         (WebCore::ThreadGlobalData::destroy):
1872         * platform/ThreadGlobalData.h:
1873
1874 2014-02-25  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
1875
1876         display:table with padding and/or borders in border-box calculates height incorrectly
1877         https://bugs.webkit.org/show_bug.cgi?id=126576
1878
1879         Reviewed by David Hyatt.
1880
1881         Based on blink issue https://codereview.chromium.org/25206002/
1882
1883         Tests: fast/box-sizing/css-table-collapse.html
1884                fast/box-sizing/css-table-no-collapse.html
1885                fast/box-sizing/table-collapse.html
1886                fast/box-sizing/table-no-collapse.html
1887
1888         * rendering/RenderBox.cpp:
1889         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1890
1891 2014-02-25  Anders Carlsson  <andersca@apple.com>
1892
1893         Get rid of VisitedLinkStrategy
1894         https://bugs.webkit.org/show_bug.cgi?id=129324
1895
1896         Reviewed by Dan Bernstein.
1897
1898         * GNUmakefile.list.am:
1899         * WebCore.vcxproj/WebCore.vcxproj:
1900         * WebCore.vcxproj/WebCore.vcxproj.filters:
1901         * WebCore.xcodeproj/project.pbxproj:
1902         * platform/PlatformStrategies.h:
1903         (WebCore::PlatformStrategies::PlatformStrategies):
1904         * platform/VisitedLinkStrategy.h: Removed.
1905
1906 2014-02-25  Alexey Proskuryakov  <ap@apple.com>
1907
1908         Rolling out http://trac.webkit.org/changeset/164611, because it broke
1909         WebKit2.PrivateBrowsingPushStateNoHistoryCallback API test
1910
1911         The change was for:
1912
1913         https://bugs.webkit.org/show_bug.cgi?id=129141
1914         Create SessionID class
1915
1916 2014-02-25  Commit Queue  <commit-queue@webkit.org>
1917
1918         Unreviewed, rolling out r164627.
1919         http://trac.webkit.org/changeset/164627
1920         https://bugs.webkit.org/show_bug.cgi?id=129325
1921
1922         Broke SubtleCrypto tests (Requested by ap on #webkit).
1923
1924         * bindings/js/JSDOMBinding.cpp:
1925         (WebCore::reportException):
1926         * bindings/js/JSDOMWindowBase.cpp:
1927         (WebCore::JSDOMWindowBase::commonVM):
1928
1929 2014-02-25  Anders Carlsson  <andersca@apple.com>
1930
1931         DefaultVisitedLinkProvider can just call into the page group directly
1932         https://bugs.webkit.org/show_bug.cgi?id=129320
1933
1934         Reviewed by Andreas Kling.
1935
1936         * page/DefaultVisitedLinkProvider.cpp:
1937         (WebCore::DefaultVisitedLinkProvider::isLinkVisited):
1938         (WebCore::DefaultVisitedLinkProvider::addVisitedLink):
1939
1940 2014-02-25  Commit Queue  <commit-queue@webkit.org>
1941
1942         Unreviewed, rolling out r164638.
1943         http://trac.webkit.org/changeset/164638
1944         https://bugs.webkit.org/show_bug.cgi?id=129321
1945
1946         Broke Windows build. (Requested by bfulgham on #webkit).
1947
1948         * dom/ContainerNode.h:
1949         (WebCore::ChildNodesLazySnapshot::takeSnapshot):
1950         (WebCore::ChildNodesLazySnapshot::hasSnapshot):
1951         * dom/Element.cpp:
1952         (WebCore::ensureAttrNodeListForElement):
1953         (WebCore::Element::attributes):
1954         * dom/ElementIteratorAssertions.h:
1955         (WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
1956         * dom/ElementRareData.h:
1957         (WebCore::ElementRareData::create):
1958         (WebCore::ElementRareData::setAttributeMap):
1959         * dom/MutationObserverRegistration.cpp:
1960         (WebCore::MutationObserverRegistration::create):
1961         (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
1962         (WebCore::MutationObserverRegistration::clearTransientRegistrations):
1963         (WebCore::MutationObserverRegistration::addRegistrationNodesToSet):
1964         * dom/MutationObserverRegistration.h:
1965         * dom/NamedNodeMap.h:
1966         (WebCore::NamedNodeMap::create):
1967         (WebCore::NamedNodeMap::NamedNodeMap):
1968         * dom/Node.cpp:
1969         (WebCore::Node::ensureRareData):
1970         (WebCore::Node::didMoveToNewDocument):
1971         (WebCore::Node::ensureEventTargetData):
1972         (WebCore::Node::mutationObserverRegistry):
1973         (WebCore::Node::registerMutationObserver):
1974         (WebCore::Node::unregisterMutationObserver):
1975         (WebCore::Node::notifyMutationObserversNodeWillDetach):
1976         * dom/Node.h:
1977         * dom/NodeRareData.h:
1978         (WebCore::NodeListsNodeData::create):
1979         (WebCore::NodeListsNodeData::NodeListsNodeData):
1980         (WebCore::NodeMutationObserverData::create):
1981         (WebCore::NodeMutationObserverData::NodeMutationObserverData):
1982         (WebCore::NodeRareData::create):
1983         (WebCore::NodeRareData::clearNodeLists):
1984         (WebCore::NodeRareData::ensureNodeLists):
1985         (WebCore::NodeRareData::ensureMutationObserverData):
1986         (WebCore::NodeRareData::NodeRareData):
1987         * dom/StyledElement.cpp:
1988         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
1989
1990 2014-02-25  Eric Carlson  <eric.carlson@apple.com>
1991
1992         [iOS] Show status image when playing video to external device
1993         https://bugs.webkit.org/show_bug.cgi?id=129277
1994
1995         Reviewed by Jer Noble.
1996
1997         * Modules/mediacontrols/mediaControlsApple.js:
1998         (Controller.prototype.handleEvent): Restructure the code so it is possible to handle events
1999             that target the video element which aren't in the HandledVideoEvents array.
2000
2001         * Modules/mediacontrols/mediaControlsiOS.js:
2002         (ControllerIOS.prototype.currentPlaybackTargetIsWireless): webkitCurrentPlaybackTargetIsWireless
2003             is an attribute, not a function.
2004         (ControllerIOS.prototype.updateWirelessPlaybackStatus): Fix style.
2005         (ControllerIOS.prototype.updateWirelessTargetAvailable): Ditto.
2006         (ControllerIOS.prototype.updateProgress): Ditto.
2007         (ControllerIOS.prototype.handleWrapperTouchStart): Show the controls if the wireless status
2008             display is touched.
2009         (ControllerIOS.prototype.handleFullscreenButtonClicked): Fix style
2010         (ControllerIOS.prototype.handleWirelessPlaybackChange): Ditto.
2011         (ControllerIOS.prototype.handleWirelessTargetAvailableChange):
2012         (ControllerIOS.prototype.handleWirelessPickerButtonClicked): Ditto. Stop even propagation.
2013
2014         Move "playback target" logic into HTMLMediaSession.
2015         * html/HTMLMediaElement.cpp:
2016         (WebCore::HTMLMediaElement::~HTMLMediaElement): Call media session.
2017         (WebCore::HTMLMediaElement::loadResource): Tell media session to apply media player
2018             restrictions now that it has a url.
2019         (WebCore::HTMLMediaElement::invalidateCachedTime): Only log when cached time is not 
2020             already invalie.
2021         (WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker): Call media session.
2022         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless): Ditto.
2023         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Ditto.
2024         (WebCore::HTMLMediaElement::addEventListener): Ditto.
2025         (WebCore::HTMLMediaElement::removeEventListen): Ditto.
2026         (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): Ditto.
2027         (WebCore::HTMLMediaElement::createMediaPlayer): Ditto.
2028
2029         * html/HTMLMediaSession.cpp:
2030         (WebCore::restrictionName): Log new WirelessVideoPlaybackDisabled restriction.
2031         (WebCore::HTMLMediaSession::showingPlaybackTargetPickerPermitted): Return false if there
2032             is no page, or if wireless playback is disabled.
2033         (WebCore::HTMLMediaSession::currentPlaybackTargetIsWireless): New, logic from HTMLMediaElement.
2034         (WebCore::HTMLMediaSession::showPlaybackTargetPicker): Ditto.
2035         (WebCore::HTMLMediaSession::hasWirelessPlaybackTargets): Ditto.
2036         (WebCore::HTMLMediaSession::wirelessVideoPlaybackDisabled): Ditto.
2037         (WebCore::HTMLMediaSession::setWirelessVideoPlaybackDisabled): Ditto.
2038         (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners): Ditto.
2039         (WebCore::HTMLMediaSession::applyMediaPlayerRestrictions): New, apply media player specific
2040             restriction.
2041         * html/HTMLMediaSession.h:
2042
2043         Move "playback target" logic into HTMLMediaSession.
2044         * html/HTMLVideoElement.cpp:
2045         (WebCore::HTMLVideoElement::parseAttribute): Call media session.
2046         (WebCore::HTMLVideoElement::webkitWirelessVideoPlaybackDisabled): Call media session.
2047
2048         * platform/audio/MediaSessionManager.h:
2049         (WebCore::MediaSessionManager::showPlaybackTargetPicker): New method, does nothing in base class.
2050
2051         * platform/audio/ios/MediaSessionManagerIOS.h:
2052         * platform/audio/ios/MediaSessionManagerIOS.mm:
2053         (WebCore::MediaSessionManageriOS::showPlaybackTargetPicker): Add non-functional stub.
2054
2055         Implement wireless playback control and status API.
2056         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2057         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Dispatch TargetIsWirelessChanged.
2058         (WebCore::MediaPlayerPrivateAVFoundation::playbackTargetIsWirelessChanged): Pass through to
2059             media element.
2060         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2061
2062         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2063         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2064         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Initialize
2065             m_allowsWirelessVideoPlayback.
2066         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Remove "externalPlaybackActive" observer.
2067         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer): Fix broken logging.
2068         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Add "externalPlaybackActive" observer,
2069             set initial wireless playback.
2070         (WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer):  Fix broken logging.
2071         (WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack): Ditto.
2072         (WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless): New.
2073         (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled): New.
2074         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled): New.
2075         (WebCore::MediaPlayerPrivateAVFoundationObjC::playbackTargetIsWirelessDidChange): New.
2076         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Deal with 
2077             externalPlaybackActive.
2078
2079 2014-02-24  Brent Fulgham  <bfulgham@apple.com>
2080
2081         [Win] Gracefully recover from missing 'naturalSize' parameter for media
2082         https://bugs.webkit.org/show_bug.cgi?id=129278
2083
2084         Reviewed by Eric Carlson.
2085
2086         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h: Add declaration for
2087         missing function call.
2088         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2089         (WebCore::MediaPlayerPrivateAVFoundationCF::assetStatus): Don't treat missing 'naturalSize'
2090         as a fatal error.
2091         (WebCore::MediaPlayerPrivateAVFoundationCF::tracksChanged): Handle case of asset track
2092         not being available yet. 
2093         (WebCore::MediaPlayerPrivateAVFoundationCF::sizeChanged): If the 'naturalSize' is empty,
2094         use the Player Item's 'presentationSize' instead.
2095         (WebCore::AVFWrapper::processNotification): Add missing handler for duration changed.
2096
2097 2014-02-25  Sergio Villar Senin  <svillar@igalia.com>
2098
2099         [CSS Grid Layout] Add ENABLE flag
2100         https://bugs.webkit.org/show_bug.cgi?id=129153
2101
2102         Reviewed by Simon Fraser.
2103
2104         Added ENABLE_CSS_GRID_LAYOUT feature flag.
2105
2106         * Configurations/FeatureDefines.xcconfig:
2107         * css/CSSComputedStyleDeclaration.cpp:
2108         (WebCore::isLayoutDependent):
2109         (WebCore::ComputedStyleExtractor::propertyValue):
2110         * css/CSSGridTemplateAreasValue.cpp:
2111         * css/CSSGridTemplateAreasValue.h:
2112         * css/CSSParser.cpp:
2113         (WebCore::CSSParserContext::CSSParserContext):
2114         (WebCore::operator==):
2115         (WebCore::isValidKeywordPropertyAndValue):
2116         (WebCore::isKeywordPropertyID):
2117         (WebCore::CSSParser::parseValue):
2118         * css/CSSParser.h:
2119         * css/CSSParserMode.h:
2120         * css/CSSPrimitiveValueMappings.h:
2121         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2122         * css/CSSPropertyNames.in:
2123         * css/CSSValue.cpp:
2124         (WebCore::CSSValue::equals):
2125         (WebCore::CSSValue::cssText):
2126         (WebCore::CSSValue::destroy):
2127         * css/DeprecatedStyleBuilder.cpp:
2128         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2129         * css/StyleProperties.cpp:
2130         (WebCore::StyleProperties::getPropertyValue):
2131         * css/StylePropertyShorthand.cpp:
2132         (WebCore::shorthandForProperty):
2133         (WebCore::matchingShorthandsForLonghand):
2134         * css/StyleResolver.cpp:
2135         (WebCore::equivalentBlockDisplay):
2136         (WebCore::StyleResolver::adjustRenderStyle):
2137         (WebCore::StyleResolver::applyProperty):
2138         * css/StyleResolver.h:
2139         * dom/Document.cpp:
2140         * dom/Document.h:
2141         * rendering/RenderElement.cpp:
2142         (WebCore::RenderElement::createFor):
2143         * rendering/RenderGrid.cpp:
2144         * rendering/RenderGrid.h:
2145         * rendering/style/GridCoordinate.h:
2146         * rendering/style/GridLength.h:
2147         * rendering/style/GridPosition.h:
2148         * rendering/style/GridTrackSize.h:
2149         * rendering/style/RenderStyle.cpp:
2150         (WebCore::RenderStyle::changeRequiresLayout):
2151         * rendering/style/RenderStyle.h:
2152         * rendering/style/RenderStyleConstants.h:
2153         * rendering/style/StyleAllInOne.cpp:
2154         * rendering/style/StyleGridData.cpp:
2155         * rendering/style/StyleGridData.h:
2156         * rendering/style/StyleGridItemData.cpp:
2157         * rendering/style/StyleGridItemData.h:
2158         * rendering/style/StyleRareNonInheritedData.cpp:
2159         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2160         (WebCore::StyleRareNonInheritedData::operator==):
2161         * rendering/style/StyleRareNonInheritedData.h:
2162
2163 2014-02-25  Jer Noble  <jer.noble@apple.com>
2164
2165         [EME][Mac] Fix a few issues in CDMSessionMediaSourceAVFObjC.
2166         https://bugs.webkit.org/show_bug.cgi?id=129310
2167
2168         Reviewed by Eric Carlson.
2169
2170         Only send a 'keyerror' event if an actual error code was returned, not just
2171         when no key was added:
2172         * Modules/encryptedmedia/MediaKeySession.cpp:
2173         (WebCore::MediaKeySession::addKeyTimerFired):
2174
2175         The 'length' parameter to a typed ArrayBufferView is the number of entries
2176         in the array, not the byte length:
2177         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2178         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
2179
2180         The return value of streamingContentKeyRequestDataForApp:contentIdentifier:trackId:options:error
2181         is autoreleased; do not wrap it in an adoptNS:
2182         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2183         (WebCore::CDMSessionMediaSourceAVFObjC::update):
2184
2185 2014-02-25  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2186
2187         [MediaStream] Adding mock implementation of UserMediaClient
2188         https://bugs.webkit.org/show_bug.cgi?id=129274
2189
2190         Reviewed by Eric Carlson.
2191
2192         * platform/mock/UserMediaClientMock.h: Added.
2193         (WebCore::UserMediaClientRequestNotifier::UserMediaClientRequestNotifier):
2194         * testing/Internals.cpp:
2195         (WebCore::Internals::Internals):
2196
2197 2014-02-25  Ryosuke Niwa  <rniwa@webkit.org>
2198
2199         Tighten bitfields in live NodeLists and HTMLCollections
2200         https://bugs.webkit.org/show_bug.cgi?id=129300
2201
2202         Reviewed by Geoffrey Garen.
2203
2204         Reduce the number of bits used for m_rootType and m_type in LiveNodeList.
2205         Also use enum class for LiveNodeList types. We keep "Type" suffix not to
2206         confuse old-ish compilers.
2207
2208         * dom/ClassNodeList.cpp:
2209         (WebCore::ClassNodeList::ClassNodeList):
2210         * dom/ContainerNode.cpp:
2211         (WebCore::ContainerNode::getElementsByTagName):
2212         (WebCore::ContainerNode::getElementsByName):
2213         (WebCore::ContainerNode::getElementsByClassName):
2214         (WebCore::ContainerNode::radioNodeList):
2215         * dom/LiveNodeList.cpp:
2216         (WebCore::LiveNodeList::collectionFirst):
2217         (WebCore::LiveNodeList::collectionTraverseForward):
2218         * dom/LiveNodeList.h:
2219         (WebCore::LiveNodeList::LiveNodeList):
2220         * dom/NameNodeList.cpp:
2221         (WebCore::NameNodeList::NameNodeList):
2222         * dom/NameNodeList.h:
2223         (WebCore::NameNodeList::create):
2224         * dom/NodeRareData.h:
2225         (WebCore::NodeListsNodeData::namedNodeListKey):
2226         * dom/TagNodeList.cpp:
2227         (WebCore::HTMLTagNodeList::HTMLTagNodeList):
2228         * dom/TagNodeList.h:
2229         (WebCore::TagNodeList::create):
2230         (WebCore::HTMLTagNodeList::create):
2231         * html/HTMLCollection.h:
2232         * html/LabelableElement.cpp:
2233         (WebCore::LabelableElement::labels):
2234         * html/LabelsNodeList.cpp:
2235         (WebCore::LabelsNodeList::LabelsNodeList):
2236         * html/LabelsNodeList.h:
2237         * html/RadioNodeList.cpp:
2238         (WebCore::RadioNodeList::RadioNodeList):
2239         * html/RadioNodeList.h:
2240         (WebCore::RadioNodeList::create):
2241
2242 2014-02-24  Anders Carlsson  <andersca@apple.com>
2243
2244         Make it possible to set the visited link provider on a per page basis
2245         https://bugs.webkit.org/show_bug.cgi?id=129288
2246
2247         Reviewed by Andreas Kling.
2248
2249         * WebCore.exp.in:
2250         Export symbols needed by WebKit2.
2251
2252         * WebCore.xcodeproj/project.pbxproj:
2253         Make VisitedLinkProvider a private header.
2254
2255         * page/Page.cpp:
2256         (WebCore::Page::Page):
2257         Take the visited link provider from the PageClients object.
2258
2259         (WebCore::Page::visitedLinkProvider):
2260         If the page has a visited link provider set, return it.
2261
2262         * page/Page.h:
2263         Add VisitedLinkProvider to Page and PageClients.
2264
2265 2014-02-25  Morten Stenshorne  <mstensho@opera.com>
2266
2267         [New Multicolumn] -webkit-column-break-inside:avoid doesn't work
2268         https://bugs.webkit.org/show_bug.cgi?id=129299
2269
2270         Reviewed by Andrei Bucur.
2271
2272         adjustForUnsplittableChild() simply forgot to check whether we
2273         were inside flow thread based multicol.
2274
2275         Test: fast/multicol/newmulticol/avoid-column-break-inside.html
2276
2277         * rendering/RenderBlockFlow.cpp:
2278         (WebCore::RenderBlockFlow::adjustForUnsplittableChild):
2279
2280 2014-02-25  Mihnea Ovidenie  <mihnea@adobe.com>
2281
2282         [CSSRegions] Remove unused function RenderFlowThread::regionForCompositedLayer
2283         https://bugs.webkit.org/show_bug.cgi?id=129303
2284
2285         Reviewed by Andrei Bucur.
2286
2287         Cleanup, no funtionality change, no new tests.
2288
2289         * rendering/RenderFlowThread.h:
2290
2291 2014-02-25  Mihai Tica  <mitica@adobe.com>
2292
2293         [CSS Blending] -webkit-mix-blend-mode should force transform-style: flat.
2294         https://bugs.webkit.org/show_bug.cgi?id=126158
2295
2296         Reviewed by Mihnea Ovidenie.
2297
2298         As stated in the http://www.w3.org/TR/css3-transforms/#propdef-transform-style, an element with blending
2299         should force transform-style: flat.
2300
2301         Test: css3/compositing/blend-mode-transform-style.html
2302
2303         * css/StyleResolver.cpp:
2304         (WebCore::StyleResolver::adjustRenderStyle): If blending is detected, set transform-style to flat.
2305
2306 2014-02-25  Zan Dobersek  <zdobersek@igalia.com>
2307
2308         Move to using std::unique_ptr for Element, Node and related classes
2309         https://bugs.webkit.org/show_bug.cgi?id=129058
2310
2311         Reviewed by Anders Carlsson.
2312
2313         Replace uses of OwnPtr and PassOwnPtr in Element, Node and the related
2314         classes with std::unique_ptr and move semantics.
2315
2316         * dom/ContainerNode.h:
2317         (WebCore::ChildNodesLazySnapshot::takeSnapshot):
2318         (WebCore::ChildNodesLazySnapshot::hasSnapshot):
2319         * dom/Element.cpp:
2320         (WebCore::ensureAttrNodeListForElement):
2321         (WebCore::Element::attributes):
2322         * dom/ElementIteratorAssertions.h:
2323         (WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
2324         * dom/ElementRareData.h:
2325         (WebCore::ElementRareData::setAttributeMap):
2326         * dom/MutationObserverRegistration.cpp:
2327         (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
2328         (WebCore::MutationObserverRegistration::clearTransientRegistrations):
2329         (WebCore::MutationObserverRegistration::addRegistrationNodesToSet):
2330         * dom/MutationObserverRegistration.h:
2331         * dom/NamedNodeMap.h:
2332         (WebCore::NamedNodeMap::NamedNodeMap):
2333         * dom/Node.cpp:
2334         (WebCore::Node::ensureRareData):
2335         (WebCore::Node::didMoveToNewDocument):
2336         (WebCore::Node::ensureEventTargetData):
2337         (WebCore::Node::mutationObserverRegistry):
2338         (WebCore::Node::registerMutationObserver):
2339         (WebCore::Node::unregisterMutationObserver):
2340         (WebCore::Node::notifyMutationObserversNodeWillDetach):
2341         * dom/Node.h:
2342         * dom/NodeRareData.h:
2343         (WebCore::NodeListsNodeData::NodeListsNodeData):
2344         (WebCore::NodeRareData::NodeRareData):
2345         (WebCore::NodeRareData::clearNodeLists):
2346         (WebCore::NodeRareData::ensureNodeLists):
2347         (WebCore::NodeRareData::ensureMutationObserverData):
2348         * dom/StyledElement.cpp:
2349         (WebCore::StyledElement::rebuildPresentationAttributeStyle):
2350
2351 2014-02-25  Andreas Kling  <akling@apple.com>
2352
2353         Prune dead code for Web Inspector memory instrumentation.
2354         <https://webkit.org/b/129286>
2355
2356         This was leftover code from Chromium's inspector. It's not used by
2357         today's WebKit inspector.
2358
2359         Reviewed by Sam Weinig.
2360
2361         * CMakeLists.txt:
2362         * DerivedSources.make:
2363         * GNUmakefile.am:
2364         * GNUmakefile.list.am:
2365         * WebCore.vcxproj/WebCore.vcxproj:
2366         * WebCore.vcxproj/WebCore.vcxproj.filters:
2367         * WebCore.xcodeproj/project.pbxproj:
2368         * inspector/InspectorAllInOne.cpp:
2369         * inspector/InspectorController.cpp:
2370         (WebCore::InspectorController::InspectorController):
2371         * inspector/InspectorController.h:
2372         * inspector/InspectorMemoryAgent.cpp: Removed.
2373         * inspector/InspectorMemoryAgent.h: Removed.
2374         * inspector/InspectorTimelineAgent.cpp:
2375         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
2376         * inspector/InspectorTimelineAgent.h:
2377         * inspector/WorkerInspectorController.cpp:
2378         (WebCore::WorkerInspectorController::WorkerInspectorController):
2379         * inspector/protocol/Memory.json: Removed.
2380
2381 2014-02-24  Chris Fleizach  <cfleizach@apple.com>
2382
2383         AX: Support abbr, acronym
2384         https://bugs.webkit.org/show_bug.cgi?id=128860
2385
2386         Reviewed by Mario Sanchez Prada.
2387
2388         Expose the data in <abbr>, <acronym> and <th abbr=""> as an 
2389         alternateTextValue() parameter.
2390
2391         Test: platform/mac/accessibility/abbr-acronym-tags.html
2392
2393         * accessibility/AccessibilityObject.cpp:
2394         (WebCore::AccessibilityObject::hasTagName):
2395         * accessibility/AccessibilityObject.h:
2396         (WebCore::AccessibilityObject::alternateTextValue):
2397         (WebCore::AccessibilityObject::supportsAlternateTextValue):
2398         * accessibility/AccessibilityRenderObject.cpp:
2399         (WebCore::AccessibilityRenderObject::alternateTextValue):
2400         (WebCore::AccessibilityRenderObject::supportsAlternateTextValue):
2401         * accessibility/AccessibilityRenderObject.h:
2402         * accessibility/AccessibilityTableCell.cpp:
2403         (WebCore::AccessibilityTableCell::alternateTextValue):
2404         (WebCore::AccessibilityTableCell::supportsAlternateTextValue):
2405         * accessibility/AccessibilityTableCell.h:
2406         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2407         (AXAttributeStringSetAlternateTextValue):
2408         (AXAttributedStringAppendText):
2409         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2410         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2411
2412 2014-02-24  Martin Robinson  <mrobinson@igalia.com>
2413
2414         [GTK] generate-gtkdoc should not generate documentation for source files for unbuilt source files
2415         https://bugs.webkit.org/show_bug.cgi?id=128417
2416
2417         Reviewed by Carlos Garcia Campos.
2418
2419         * bindings/gobject/GNUmakefile.am: Generate a config file for webkitdom documentation generation.
2420
2421 2014-02-24  Mark Lam  <mark.lam@apple.com>
2422
2423         Need to initialize VM stack data even when the VM is on an exclusive thread.
2424         <https://webkit.org/b/129265>
2425
2426         Reviewed by Geoffrey Garen.
2427
2428         No new tests.
2429
2430         * bindings/js/JSDOMBinding.cpp:
2431         (WebCore::reportException):
2432         - Added an assertion to ensure that we are holding the JSLock.
2433         * bindings/js/JSDOMWindowBase.cpp:
2434         (WebCore::JSDOMWindowBase::commonVM):
2435         - Updated to use the new VM::setExclusiveThread().
2436
2437 2014-02-24  Anders Carlsson  <andersca@apple.com>
2438
2439         Add a DefaultVisitedLinkProvider and route visited link actions through it
2440         https://bugs.webkit.org/show_bug.cgi?id=129285
2441
2442         Reviewed by Dan Bernstein.
2443
2444         DefaultVisitedLinkProvider currently just forwards everything to the visited link strategy,
2445         but will soon take over the responsibilities of visited link handling from PageGroup.
2446         
2447         * CMakeLists.txt:
2448         * GNUmakefile.list.am:
2449         * WebCore.vcxproj/WebCore.vcxproj:
2450         * WebCore.vcxproj/WebCore.vcxproj.filters:
2451         * WebCore.xcodeproj/project.pbxproj:
2452         * dom/VisitedLinkState.cpp:
2453         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
2454         * loader/HistoryController.cpp:
2455         (WebCore::addVisitedLink):
2456         (WebCore::HistoryController::updateForStandardLoad):
2457         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
2458         (WebCore::HistoryController::updateForClientRedirect):
2459         (WebCore::HistoryController::updateForSameDocumentNavigation):
2460         (WebCore::HistoryController::pushState):
2461         (WebCore::HistoryController::replaceState):
2462         * page/DefaultVisitedLinkProvider.cpp: Copied from Source/WebCore/page/VisitedLinkProvider.h.
2463         (WebCore::DefaultVisitedLinkProvider::create):
2464         (WebCore::DefaultVisitedLinkProvider::DefaultVisitedLinkProvider):
2465         (WebCore::DefaultVisitedLinkProvider::~DefaultVisitedLinkProvider):
2466         (WebCore::DefaultVisitedLinkProvider::isLinkVisited):
2467         (WebCore::DefaultVisitedLinkProvider::addVisitedLink):
2468         * page/DefaultVisitedLinkProvider.h: Copied from Source/WebCore/page/VisitedLinkProvider.h.
2469         * page/Page.cpp:
2470         (WebCore::Page::visitedLinkProvider):
2471         * page/Page.h:
2472         * page/PageGroup.cpp:
2473         (WebCore::PageGroup::PageGroup):
2474         (WebCore::PageGroup::visitedLinkProvider):
2475         * page/PageGroup.h:
2476         * page/VisitedLinkProvider.h:
2477
2478 2014-02-24  Jeremy Jones  <jeremyj@apple.com>
2479
2480         WK2 AVKit fullscreen doesn't display video.
2481         https://bugs.webkit.org/show_bug.cgi?id=128564
2482
2483         Reviewed by Simon Fraser.
2484
2485         * WebCore.exp.in:
2486         Export WebCore::PlatformCALayer::platformCALayer()
2487
2488         * platform/ios/WebVideoFullscreenInterface.h:
2489         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2490         Remove SetVideoLayerID(). 
2491
2492         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2493         (WebVideoFullscreenInterfaceAVKit::setVideoLayer):
2494         Wrap make video layer look like an AVAVPlayerLayer with WebAVPlayerLayer
2495
2496         * platform/ios/WebVideoFullscreenModelMediaElement.mm:
2497         (WebVideoFullscreenModelMediaElement::setMediaElement):
2498         Pass along the videoLayer before borrowing it so the interface will be ready to
2499         catch the transaction that removes it.
2500
2501 2014-02-24  Samuel White  <samuel_white@apple.com>
2502
2503         AX: AccessibilityObject::findMatchingObjects should never include 'this' in results.
2504         https://bugs.webkit.org/show_bug.cgi?id=129243
2505
2506         Reviewed by Chris Fleizach.
2507
2508         Fix removes the container object from the search results when searching backwards. This
2509         makes backwards & forwards search results consistent with each other.
2510
2511         Test: platform/mac/accessibility/search-predicate-container-not-included.html
2512
2513         * accessibility/AccessibilityObject.cpp:
2514         (WebCore::AccessibilityObject::findMatchingObjects):
2515
2516 2014-02-24  Samuel White  <samuel_white@apple.com>
2517
2518         AX: findMatchingObjects backwards start position inconsistent with forwards start position when startObject == nullptr.
2519         https://bugs.webkit.org/show_bug.cgi?id=129266
2520
2521         Reviewed by Chris Fleizach.
2522
2523         When searching forward with no start object, the first thing considered is the first child of
2524         the container. However, when searching backwards with no start object nothing in the container
2525         is considered; this basically negates the search. This patch makes backwards searching without
2526         a start object start from the last child of the container to match forward search expectations.
2527
2528         Test: platform/mac/accessibility/search-predicate-start-not-specified.html
2529
2530         * accessibility/AccessibilityObject.cpp:
2531         (WebCore::AccessibilityObject::findMatchingObjects):
2532
2533 2014-02-24  Andreas Kling  <akling@apple.com>
2534
2535         Prune dead code for Web Inspector canvas instrumentation.
2536         <https://webkit.org/b/129269>
2537
2538         This was leftover code from Chromium's inspector. It's not used by
2539         today's WebKit inspector.
2540
2541         Reviewed by Timothy Hatcher.
2542
2543         * CMakeLists.txt:
2544         * DerivedSources.make:
2545         * GNUmakefile.am:
2546         * GNUmakefile.list.am:
2547         * WebCore.vcxproj/WebCore.vcxproj:
2548         * WebCore.vcxproj/WebCore.vcxproj.filters:
2549         * WebCore.xcodeproj/project.pbxproj:
2550         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2551         (WebCore::JSHTMLCanvasElement::getContext):
2552         * inspector/InjectedScriptCanvasModule.cpp: Removed.
2553         * inspector/InjectedScriptCanvasModule.h: Removed.
2554         * inspector/InspectorAllInOne.cpp:
2555         * inspector/InspectorCanvasAgent.cpp: Removed.
2556         * inspector/InspectorCanvasAgent.h: Removed.
2557         * inspector/InspectorCanvasInstrumentation.h: Removed.
2558         * inspector/InspectorController.cpp:
2559         (WebCore::InspectorController::InspectorController):
2560         (WebCore::InspectorController::didBeginFrame):
2561         * inspector/InspectorInstrumentation.cpp:
2562         (WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
2563         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
2564         * inspector/InspectorInstrumentation.h:
2565         * inspector/InstrumentingAgents.cpp:
2566         (WebCore::InstrumentingAgents::InstrumentingAgents):
2567         (WebCore::InstrumentingAgents::reset):
2568         * inspector/InstrumentingAgents.h:
2569
2570 2014-02-24  Zoltan Horvath  <zoltan@webkit.org>
2571
2572         [CSS Shapes] Adjust lineTop position to the next available wrapping location at shape-outsides
2573         https://bugs.webkit.org/show_bug.cgi?id=128693
2574
2575         Reviewed by David Hyatt.
2576
2577         When we don't have space next to the floating container, but we have space inside the floating-container next
2578         to the defined shape-outside, we should wrap around the shape-outside. This patch fixes the behavior both for
2579         cases when there is no space to fit at the first line, and for the additional lines cases.
2580
2581         Test: fast/shapes/shape-outside-floats/shape-outside-floats-linetop-adjustment.html
2582
2583         * rendering/line/BreakingContextInlineHeaders.h:
2584         (WebCore::BreakingContext::handleText):
2585         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
2586         * rendering/line/LineWidth.cpp:
2587         (WebCore::availableWidthAtOffset):
2588         (WebCore::LineWidth::updateLineDimension): Added new helper.
2589         (WebCore::isWholeLineFit): Added new helper.
2590         (WebCore::LineWidth::wrapNextToShapeOutside): Added new helper.
2591         (WebCore::LineWidth::fitBelowFloats): Add optional parameter for the function.
2592         * rendering/line/LineWidth.h:
2593
2594 2014-02-24  Martin Hock  <mhock@apple.com>
2595
2596         Create SessionID value-style class for session IDs.
2597         https://bugs.webkit.org/show_bug.cgi?id=129141
2598
2599         Reviewed by Brady Eidson.
2600
2601         * GNUmakefile.list.am:
2602         * WebCore.exp.in:
2603         * WebCore.xcodeproj/project.pbxproj:
2604         * page/Page.cpp: Add SessionID member.
2605         (WebCore::Page::Page):
2606         (WebCore::Page::sessionID): Retrieve sessionID or use settings if not set.
2607         * page/Page.h:
2608         (WebCore::Page::setSessionID):
2609         * page/SessionID.h: Session ID class consisting solely of its uint64_t session ID.
2610         (WebCore::SessionID::SessionID):
2611         (WebCore::SessionID::isValid): Not empty.
2612         (WebCore::SessionID::isEphemeral):
2613         (WebCore::SessionID::sessionID):
2614         (WebCore::SessionID::operator==): Value-based equality.
2615         (WebCore::SessionID::operator!=):
2616         (WebCore::SessionID::emptySessionID): Zero value also used for HashTraits emptyValue.
2617         (WebCore::SessionID::defaultSessionID):
2618         (WebCore::SessionID::legacyPrivateSessionID):
2619         * page/SessionIDHash.h:
2620         (WTF::SessionIDHash::hash): Just the casted session ID (low order bytes)
2621         (WTF::SessionIDHash::equal):
2622         (WTF::HashTraits<WebCore::SessionID>::emptyValue): Equal to emptySessionID.
2623         (WTF::HashTraits<WebCore::SessionID>::constructDeletedValue): -1 value.
2624         (WTF::HashTraits<WebCore::SessionID>::isDeletedValue):
2625
2626 2014-02-24  Javier Fernandez  <jfernandez@igalia.com>
2627
2628         [CSS Grid Layout] handle undefined RemainingSpace in computeUsedBreadthOfGridTracks algorithm
2629         https://bugs.webkit.org/show_bug.cgi?id=128372
2630
2631         Reviewed by David Hyatt.
2632
2633         From Blink r165692 by <svillar@igalia.com>
2634
2635         The spec defines a different code path for the computeUsedBreadthOfGridTracks algorithm
2636         http://dev.w3.org/csswg/css-grid/#function-ComputeUsedBreadthOfGridTracks.
2637
2638         Basically the track breadth is different when the available size is undefined and thus,
2639         cannot be taken into account during the computations.
2640         The available size is undefined whenever the height is auto or the grid element has a
2641         shrink-to-fit behavior.
2642
2643         It was also renamed the function to match the specs so the function name starts with
2644         'compute' instead of 'computed'.
2645
2646         No new tests, but added new cases to some of them.
2647
2648         * rendering/RenderGrid.cpp:
2649         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
2650         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2651         (WebCore::gridElementIsShrinkToFit):
2652         (WebCore::RenderGrid::computeNormalizedFractionBreadth):
2653         (WebCore::RenderGrid::layoutGridItems):
2654         * rendering/RenderGrid.h:
2655
2656 2014-02-24  Roger Fong  <roger_fong@apple.com>
2657
2658         [Windows] Unreviewed pre-emptive build fix.
2659
2660         * WebCore.vcxproj/WebCoreCommon.props: Add replay directory to include path.
2661
2662 2014-02-24  Brady Eidson  <beidson@apple.com>
2663
2664         Break out ImageControls style into an external stylesheet
2665         https://bugs.webkit.org/show_bug.cgi?id=129273
2666
2667         Reviewed by Jer Noble.
2668
2669         * DerivedSources.make:
2670         * WebCore.xcodeproj/project.pbxproj:
2671
2672         * css/CSSDefaultStyleSheets.cpp:
2673         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
2674         * css/CSSDefaultStyleSheets.h:
2675
2676         * html/shadow/mac/ImageControlsRootElementMac.cpp:
2677         (WebCore::ImageControlsRootElementMac::maybeCreate):
2678
2679         * html/shadow/mac/imageControlsMac.css:
2680         (.x-webkit-imagemenu):
2681         (.x-webkit-imagemenu:hover):
2682
2683         * rendering/RenderTheme.h:
2684         (WebCore::RenderTheme::mediaControlsScript):
2685         (WebCore::RenderTheme::imageControlsStyleSheet):
2686         * rendering/RenderThemeMac.h:
2687         * rendering/RenderThemeMac.mm:
2688         (WebCore::RenderThemeMac::imageControlsStyleSheet):
2689
2690 2014-02-24  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2691
2692         [WebRTC] Validating RTCConfiguration according to the spec
2693         https://bugs.webkit.org/show_bug.cgi?id=129182
2694
2695         Reviewed by Eric Carlson.
2696
2697         Spec states that:
2698             - iceServers should not be an empty list
2699             - the entry in the configuration dictionary is "urls", instead of "url"
2700             - urls can be either a list or a string
2701         Fixing all that in RTCConfiguration validation when creating a RTCPeerConnection
2702
2703         Existing tests were updated.
2704
2705         * Modules/mediastream/RTCPeerConnection.cpp:
2706         (WebCore::appendIceServer): Added.
2707         (WebCore::processIceServer): Added.
2708         (WebCore::RTCPeerConnection::parseConfiguration):
2709
2710 2014-02-24  Radu Stavila  <stavila@adobe.com>
2711
2712         [CSS Regions] Relative positioned elements overflowing the region do not get painted into the next tile
2713         https://bugs.webkit.org/show_bug.cgi?id=129254
2714
2715         Reviewed by Antti Koivisto.
2716
2717         The painting of the region's layer should not be aborted so early if the region's fragment shouldn't be painted
2718         because that would prevent all the layer's children from being painted.
2719
2720         Another problem this patch addresses is that clipping should also be performed when the clip rect is empty,
2721         which is what happens when painting in a tile in which the flowed element would normally be painted
2722         if it wasn't clipped by the region.
2723
2724         Test: fast/regions/content-relative-next-tile.html
2725
2726         * rendering/RenderLayer.cpp:
2727         (WebCore::RenderLayer::paintFlowThreadIfRegionForFragments):
2728
2729 2014-02-24  Renata Hodovan  <rhodovan.u-szeged@partner.samsung.com>
2730         
2731         Get rid of the unused 'immediate' parameters from repaint related functions
2732         https://bugs.webkit.org/show_bug.cgi?id=129111
2733
2734         Reviewed by Simon Fraser.
2735
2736         Removing the 'immediate' parameters from repaint related functions - accoring
2737         to the FIXME in RenderView::repaintViewRectangle() - since they have no effect.
2738
2739         No new tests are necessary because there is no behavior change
2740
2741         * dom/Element.cpp:
2742         (WebCore::Element::setActive):
2743         * loader/EmptyClients.h:
2744         * page/Chrome.cpp:
2745         (WebCore::Chrome::invalidateRootView):
2746         (WebCore::Chrome::invalidateContentsAndRootView):
2747         (WebCore::Chrome::invalidateContentsForSlowScroll):
2748         * page/Chrome.h:
2749         * page/ChromeClient.h:
2750         * page/Frame.cpp:
2751         (WebCore::Frame::tiledBackingStorePaintEnd):
2752         * page/FrameView.cpp:
2753         (WebCore::FrameView::invalidateRect):
2754         (WebCore::FrameView::scrollContentsFastPath):
2755         (WebCore::FrameView::repaintContentRectangle):
2756         (WebCore::FrameView::shouldUpdate):
2757         * page/FrameView.h:
2758         * platform/HostWindow.h:
2759         * platform/ScrollView.cpp:
2760         (WebCore::ScrollView::scrollContents):
2761         (WebCore::ScrollView::scrollContentsSlowPath):
2762         (WebCore::ScrollView::repaintContentRectangle):
2763         (WebCore::ScrollView::updateOverhangAreas):
2764         (WebCore::ScrollView::addPanScrollIcon):
2765         (WebCore::ScrollView::removePanScrollIcon):
2766         (WebCore::ScrollView::platformRepaintContentRectangle):
2767         * platform/ScrollView.h:
2768         * rendering/RenderBox.cpp:
2769         (WebCore::RenderBox::repaintLayerRectsForImage):
2770         * rendering/RenderFlowThread.cpp:
2771         (WebCore::RenderFlowThread::repaintRectangleInRegions):
2772         * rendering/RenderFlowThread.h:
2773         * rendering/RenderLayer.cpp:
2774         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
2775         * rendering/RenderLayer.h:
2776         * rendering/RenderMultiColumnSet.cpp:
2777         (WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
2778         * rendering/RenderMultiColumnSet.h:
2779         * rendering/RenderObject.cpp:
2780         (WebCore::RenderObject::repaintUsingContainer):
2781         (WebCore::RenderObject::repaint):
2782         (WebCore::RenderObject::repaintRectangle):
2783         (WebCore::RenderObject::repaintSlowRepaintObject):
2784         * rendering/RenderObject.h:
2785         * rendering/RenderRegion.cpp:
2786         (WebCore::RenderRegion::repaintFlowThreadContent):
2787         (WebCore::RenderRegion::repaintFlowThreadContentRectangle):
2788         * rendering/RenderRegion.h:
2789         * rendering/RenderView.cpp:
2790         (WebCore::RenderView::repaintViewRectangle):
2791         (WebCore::RenderView::flushAccumulatedRepaintRegion):
2792         (WebCore::RenderView::repaintRectangleInViewAndCompositedLayers):
2793         * rendering/RenderView.h:
2794         * svg/graphics/SVGImageChromeClient.h:
2795
2796 2014-02-24  Tamas Gergely  <tgergely.u-szeged@partner.samsung.com>
2797
2798         Code cleanup: remove leftover ENABLE(WORKERS) macros and support.
2799         https://bugs.webkit.org/show_bug.cgi?id=129255
2800
2801         Reviewed by Csaba Osztrogonác.
2802
2803         ENABLE_WORKERS macro was removed in r159679, but r161589 added back some occurrences.
2804         Support is now also removed from xcconfig files.
2805
2806         No new tests needed.
2807
2808         * Configurations/FeatureDefines.xcconfig:
2809         * platform/ThreadGlobalData.cpp:
2810         * platform/ThreadGlobalData.h:
2811         * platform/Timer.h:
2812         (WebCore::TimerBase::isActive):
2813         * platform/ios/wak/WebCoreThread.mm:
2814         (RunWebThread):
2815         (StartWebThread):
2816
2817 2014-02-24  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
2818
2819         [CMake] Get rid of "FIXME: The Blackberry port ..." from WebCore/CmakeLists.txt
2820         https://bugs.webkit.org/show_bug.cgi?id=129152
2821
2822         Reviewed by Gyuyoung Kim.
2823
2824         * CMakeLists.txt:
2825
2826 2014-02-24  David Kilzer  <ddkilzer@apple.com>
2827
2828         Remove redundant setting in FeatureDefines.xcconfig
2829
2830         * Configurations/FeatureDefines.xcconfig:
2831
2832 2014-02-24  Mihai Tica  <mitica@adobe.com>
2833
2834         [CSS Blending] An element having -webkit-mix-blend-mode should only blend with the contents of the parent stacking context
2835         https://bugs.webkit.org/show_bug.cgi?id=129154
2836
2837         Reviewed by Dean Jackson.
2838
2839         The blending operation of an element having -webkit-mix-blend-mode should be restricted to the parent stacking context.
2840         This change isolates blending, preventing it from blending with other underlying elements besides the parent stacking context.
2841
2842         Tests: css3/compositing/blend-mode-isolated-group-1.html
2843                css3/compositing/blend-mode-isolated-group-2.html
2844                css3/compositing/blend-mode-isolated-group-3.html
2845
2846         * rendering/RenderLayer.cpp:
2847         (WebCore::RenderLayer::RenderLayer): Initialize added members to false.
2848         (WebCore::RenderLayer::updateBlendMode): Check if a blend mode was set or unset. If so, set the m_updateParentStackingContextShouldIsolateBlendingDirty to true.
2849         (WebCore::RenderLayer::updateParentStackingContextShouldIsolateBlending): Traverse to the parent stacking context and update the
2850         m_isolatesBlending member accordingly.
2851         * rendering/RenderLayer.h:
2852         - Add isolatesBlending() as a condition for creating a transparency layer in the paintsWithTransparency method.
2853         - Add m_updateParentStackingContextShouldIsolateBlendingDirty member.
2854         - Add m_isolatesBlending member and getter.
2855         * rendering/RenderLayerCompositor.cpp:
2856         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Call updateParentStackingContextShouldIsolateBlending. 
2857
2858 2014-02-24  Krzysztof Czech  <k.czech@samsung.com>
2859
2860         [ATK] Wrong selected element at a given index in a list box.
2861         https://bugs.webkit.org/show_bug.cgi?id=129039
2862
2863         Reviewed by Chris Fleizach.
2864
2865         Test: accessibility/select-element-at-index.html
2866
2867         The selected element at a given index was wrong. One should be considered among the
2868         all children of a list box, not only selected ones.
2869
2870         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
2871         (core):
2872         (listObjectForSelection):
2873         (optionFromList):
2874         (optionFromSelection):
2875         (webkitAccessibleSelectionRefSelection):
2876
2877 2014-02-23  Dean Jackson  <dino@apple.com>
2878
2879         [WebGL] Allow ANGLE to initialize unused varyings
2880         https://bugs.webkit.org/show_bug.cgi?id=129240
2881         <rdar://problem/15203342>
2882
2883         Reviewed by Sam Weinig.
2884
2885         Covered by: conformance/glsl/misc/shaders-with-varyings.html
2886
2887         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2888         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
2889         Add SH_INIT_VARYINGS_WITHOUT_STATIC_USE to compiler flags.
2890
2891 2014-02-23  Sam Weinig  <sam@webkit.org>
2892
2893         Update FeatureDefines.xcconfig
2894
2895         Rubber-stamped by Anders Carlsson.
2896
2897         * Configurations/FeatureDefines.xcconfig:
2898
2899 2014-02-23  Dean Jackson  <dino@apple.com>
2900
2901         Sort the project file with sort-Xcode-project-file.
2902
2903         Rubber-stamped by Sam Weinig.
2904
2905         * WebCore.xcodeproj/project.pbxproj:
2906
2907 2014-02-23  Sam Weinig  <sam@webkit.org>
2908
2909         Fix incorrectly commented out code.
2910
2911         * platform/TelephoneNumberDetector.h:
2912
2913 2014-02-23  Sam Weinig  <sam@webkit.org>
2914
2915         Extract platform specific parts of telephone number detection 
2916         https://bugs.webkit.org/show_bug.cgi?id=129238
2917
2918         Reviewed by Dean Jackson.
2919
2920         * WebCore.xcodeproj/project.pbxproj:
2921         Add new files.
2922
2923         * html/parser/HTMLTreeBuilder.cpp:
2924         (WebCore::HTMLTreeBuilder::linkifyPhoneNumbers):
2925         (WebCore::HTMLTreeBuilder::processCharacterBufferForInBody):
2926         * platform/TelephoneNumberDetector.h: Added.
2927         * platform/cocoa/TelephoneNumberDetectorCocoa.cpp: Added.
2928         (WebCore::TelephoneNumberDetector::phoneNumbersScanner):
2929         (WebCore::TelephoneNumberDetector::isSupported):
2930         (WebCore::TelephoneNumberDetector::find):
2931         Move code to TelephoneNumberDetector.
2932
2933 2014-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2934
2935         Change a url parameter type with URL in NavigatorContentUtils
2936         https://bugs.webkit.org/show_bug.cgi?id=129202
2937
2938         Reviewed by Sam Weinig.
2939
2940         It would be good if we use *URL* for url parameters instead of using String.
2941
2942         Merge from blink. https://src.chromium.org/viewvc/blink?view=rev&revision=165458.
2943
2944         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
2945         (WebCore::verifyCustomHandlerURL):
2946         (WebCore::NavigatorContentUtils::registerProtocolHandler):
2947         (WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
2948         (WebCore::NavigatorContentUtils::unregisterProtocolHandler):
2949         * Modules/navigatorcontentutils/NavigatorContentUtilsClient.h:
2950
2951 2014-02-23  Dean Jackson  <dino@apple.com>
2952
2953         Update ANGLE to 836bd2176e5607b14846cf1fbc5932dbc91318f4
2954         https://bugs.webkit.org/show_bug.cgi?id=129232
2955
2956         Reviewed by Brent Fulgham.
2957
2958         New files added, derived sources compiled directly, and generated
2959         steps removed for both EFL and GTK, with much-needed help from
2960         Sergio Correia.
2961
2962         * CMakeLists.txt:
2963         * GNUMakefile.am:
2964
2965 2014-02-23  Sam Weinig  <sam@webkit.org>
2966
2967         Move RenderMathMLMenclose.h/cpp to the right place in the Xcode project and sort.
2968
2969         Rubber-stamped by Anders Carlsson.
2970
2971         * WebCore.xcodeproj/project.pbxproj:
2972
2973 2014-02-23  Sam Weinig  <sam@webkit.org>
2974
2975         Move telephone number detection behind its own ENABLE macro
2976         https://bugs.webkit.org/show_bug.cgi?id=129236
2977
2978         Reviewed by Dean Jackson.
2979
2980         * Configurations/FeatureDefines.xcconfig:
2981         Add ENABLE_TELEPHONE_NUMBER_DETECTION.
2982
2983         * dom/Document.cpp:
2984         (WebCore::Document::Document):
2985         * dom/Document.h:
2986         * html/parser/HTMLConstructionSite.h:
2987         * html/parser/HTMLTreeBuilder.cpp:
2988         (WebCore::HTMLTreeBuilder::processCharacterBufferForInBody):
2989         * html/parser/HTMLTreeBuilder.h:
2990         Use ENABLE(TELEPHONE_NUMBER_DETECTION).
2991
2992         * platform/mac/SoftLinking.h:
2993         Remove PLATOFORM(IOS) from SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL, it is not iOS specific.
2994
2995 2014-02-23  Zalan Bujtas  <zalan@apple.com>
2996
2997         Subpixel rendering: Fix bleed avoidance subpixel calculation.
2998         https://bugs.webkit.org/show_bug.cgi?id=129225
2999
3000         Reviewed by Simon Fraser.
3001         
3002         static_cast<LayoutUnit>(int value) only produces the desired result when subpixel is off.
3003
3004         Currently not testable.
3005
3006         * rendering/RenderBoxModelObject.cpp:
3007         (WebCore::RenderBoxModelObject::getBackgroundRoundedRect):
3008         (WebCore::shrinkRectByOneDevicePixel):
3009         (WebCore::RenderBoxModelObject::borderInnerRectAdjustedForBleedAvoidance):
3010         (WebCore::RenderBoxModelObject::backgroundRoundedRectAdjustedForBleedAvoidance):
3011         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3012         * rendering/RenderBoxModelObject.h:
3013
3014 2014-02-23  Zalan Bujtas  <zalan@apple.com>
3015
3016         Subpixel rendering: Add devicepixel based computation to BorderEdge class.
3017         https://bugs.webkit.org/show_bug.cgi?id=129224
3018
3019         Reviewed by Simon Fraser.
3020
3021         To produce correct width (and type) results, BorderEdge class needs to take device pixel ratio into account.
3022
3023         Currently not testable.
3024
3025         * rendering/RenderBoxModelObject.cpp:
3026         (WebCore::BorderEdge::BorderEdge):
3027         (WebCore::BorderEdge::obscuresBackgroundEdge):
3028         (WebCore::BorderEdge::getDoubleBorderStripeWidths): this does not always produce the same
3029         result as before, but the sum of inner and outer is not different.
3030         (WebCore::BorderEdge::borderWidthInDevicePixel):
3031         (WebCore::RenderBoxModelObject::getBorderEdgeInfo):
3032
3033 2014-02-22  Dan Bernstein  <mitz@apple.com>
3034
3035         REGRESSION (r164507): Crash beneath JSGlobalObjectInspectorController::reportAPIException at facebook.com, twitter.com, youtube.com
3036         https://bugs.webkit.org/show_bug.cgi?id=129227
3037
3038         Reviewed by Eric Carlson.
3039
3040         Reverted r164507.
3041
3042         * bindings/js/JSDOMBinding.cpp:
3043         (WebCore::reportException):
3044         * inspector/InspectorResourceAgent.cpp:
3045         (WebCore::InspectorResourceAgent::buildInitiatorObject):
3046         * inspector/PageDebuggerAgent.cpp:
3047         (WebCore::PageDebuggerAgent::breakpointActionLog):
3048         * inspector/TimelineRecordFactory.cpp:
3049         (WebCore::TimelineRecordFactory::createGenericRecord):
3050         * page/Console.cpp:
3051         (WebCore::internalAddMessage):
3052         (WebCore::Console::profile):
3053         (WebCore::Console::profileEnd):
3054         (WebCore::Console::timeEnd):
3055         * page/ContentSecurityPolicy.cpp:
3056         (WebCore::gatherSecurityPolicyViolationEventData):
3057         (WebCore::ContentSecurityPolicy::reportViolation):
3058         * page/DOMWindow.cpp:
3059         (WebCore::DOMWindow::postMessage):
3060
3061 2014-02-22  Joseph Pecoraro  <pecoraro@apple.com>
3062
3063         Remove some unreachable code (-Wunreachable-code)
3064         https://bugs.webkit.org/show_bug.cgi?id=129220
3065
3066         Reviewed by Eric Carlson.
3067
3068         * html/parser/HTMLTreeBuilder.cpp:
3069         (WebCore::HTMLTreeBuilder::processCharacterBuffer):
3070         (WebCore::HTMLTreeBuilder::processEndTag):
3071         The only tricky case. Here there was a break inside the
3072         #if, but not the #else, and a break after the #endif.
3073         Remove the break inside the #if, and always use the
3074         break after the #endif.
3075
3076         * Modules/indexeddb/IDBTransaction.cpp:
3077         (WebCore::IDBTransaction::modeToString):
3078         * bindings/js/JSTrackCustom.cpp:
3079         (WebCore::toJS):
3080         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3081         (WebCore::functionForUniform):
3082         * css/SelectorChecker.cpp:
3083         (WebCore::SelectorChecker::checkOne):
3084         * html/HTMLMediaElement.cpp:
3085         (WebCore::HTMLMediaElement::parseAttribute):
3086         * page/CaptionUserPreferencesMediaAF.cpp:
3087         (WebCore::CaptionUserPreferencesMediaAF::captionDisplayMode):
3088
3089 2014-02-22  Dean Jackson  <dino@apple.com>
3090
3091         Letterpress effect disabled for synthetic italic
3092         https://bugs.webkit.org/show_bug.cgi?id=129218
3093         <rdar://problem/15997846>
3094
3095         Reviewed by Dan Bernstein.
3096
3097         There was no need to guard against synthetic italics and letterpress.
3098
3099         * platform/graphics/mac/FontMac.mm:
3100         (WebCore::Font::drawGlyphs): Remove !useLetterpressEffect from conditional.
3101
3102 2014-02-21  Sam Weinig  <sam@webkit.org>
3103
3104         Expose phase and momentum phase as SPI on DOMWheelEvent
3105         <rdar://problem/16110871>
3106         https://bugs.webkit.org/show_bug.cgi?id=129184
3107
3108         Reviewed by Anders Carlsson.
3109
3110         * WebCore.exp.in:
3111         Export core(DOMWheelEvent).
3112
3113         * WebCore.xcodeproj/project.pbxproj:
3114         Make DOMWheelEventInternal.h available in WebKit.
3115
3116         * dom/Element.cpp:
3117         (WebCore::Element::dispatchWheelEvent):
3118         * dom/WheelEvent.cpp:
3119         (WebCore::determineDeltaMode):
3120         (WebCore::WheelEvent::WheelEvent):
3121         (WebCore::WheelEvent::initWheelEvent):
3122         (WebCore::WheelEvent::initWebKitWheelEvent):
3123         Move PlatformWheelEvent -> DOMWheelEvent conversion to DOMWheelEvent.
3124
3125         * dom/WheelEvent.h:
3126         (WebCore::WheelEvent::create):
3127         (WebCore::WheelEvent::phase):
3128         (WebCore::WheelEvent::momentumPhase):
3129         Store phase and momentumPhase on the WheelEvent.
3130
3131 2014-02-22  Alexey Proskuryakov  <ap@apple.com>
3132
3133         Rename JWK key_ops values from wrap/unwrap to wrapKey/unwrapKey
3134         https://bugs.webkit.org/show_bug.cgi?id=129121
3135
3136         Reviewed by Sam Weinig.
3137
3138         * bindings/js/JSCryptoKeySerializationJWK.cpp:
3139         (WebCore::JSCryptoKeySerializationJWK::reconcileUsages): Updated to newer names.
3140         (WebCore::addUsagesToJSON): Ditto.
3141         (WebCore::JSCryptoKeySerializationJWK::serialize): rsa-oaep-key-manipulation test
3142         started ot fail, because RSA-OAEP with 2048 bit key and sha-1 can only encrypt
3143         214 bytes, and the new longer names made JSON serialization slightly longer.
3144         Compensate by not doing any indentation in JSON.
3145
3146 2014-02-22  Frédéric Wang  <fred.wang@free.fr>
3147
3148         Only skip stretchy operators when determining the stretch height.
3149         https://bugs.webkit.org/show_bug.cgi?id=126842
3150
3151         Reviewed by Chris Fleizach.
3152
3153         The MathML code only takes into account non-mo children for the computation of the stretch size. This change includes non-stretchy mo in that computation. A new test is added into mathml/presentation/stretchy-depth-height.html.
3154
3155         * rendering/mathml/RenderMathMLRow.cpp:
3156         (WebCore::RenderMathMLRow::layout):
3157
3158 2014-02-22  Frédéric Wang  <fred.wang@free.fr>
3159
3160         Implement asymmetric/symmetric stretching of vertical operators.
3161         https://bugs.webkit.org/show_bug.cgi?id=124827.
3162
3163         Reviewed by Chris Fleizach.
3164
3165         The MathML code stretches vertical operators asymmetrically by default. This patch takes into account the symmetric attribute or the symmetric property of the operator dictionary to stretch operators symmetrically.
3166
3167         Test: mathml/presentation/stretchy-depth-height-symmetric.html
3168
3169         * rendering/mathml/RenderMathMLOperator.cpp:
3170         (WebCore::RenderMathMLOperator::stretchTo):
3171         (WebCore::RenderMathMLOperator::updateFromElement):
3172         (WebCore::RenderMathMLOperator::updateStyle):
3173
3174 2014-02-22  Frédéric Wang  <fred.wang@free.fr>
3175
3176         Bug 119043 - Large stretch size error for MathML operators.
3177         https://bugs.webkit.org/show_bug.cgi?id=119043
3178
3179         Reviewed by Chris Fleizach.
3180
3181         The MathML code used some arbitrary gOperatorExpansion factor for the
3182         stretch size and 2/3 1/2 constants for the baseline. This change tries
3183         to consider height/depth of siblings of the stretchy operator so that
3184         the stretchy operator now matches its target.
3185
3186         Test: mathml/presentation/stretchy-depth-height.html
3187
3188         * rendering/RenderObject.h:
3189         (WebCore::RenderObject::isRenderMathMLTable):
3190         * rendering/mathml/RenderMathMLBlock.h:
3191         * rendering/mathml/RenderMathMLOperator.cpp:
3192         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
3193         (WebCore::RenderMathMLOperator::stretchTo):
3194         (WebCore::RenderMathMLOperator::findAcceptableStretchyCharacter):
3195         (WebCore::RenderMathMLOperator::updateStyle):
3196         (WebCore::RenderMathMLOperator::firstLineBaseline):
3197         (WebCore::RenderMathMLOperator::computeLogicalHeight):
3198         * rendering/mathml/RenderMathMLOperator.h:
3199         * rendering/mathml/RenderMathMLRow.cpp:
3200         (WebCore::RenderMathMLRow::layout):
3201
3202 2014-02-22  Frédéric Wang  <fred.wang@free.fr>
3203
3204         Unreviewed, rolling out r164534.
3205         http://trac.webkit.org/changeset/164534
3206         https://bugs.webkit.org/show_bug.cgi?id=119043
3207
3208         missing tests
3209
3210         * rendering/RenderObject.h:
3211         * rendering/mathml/RenderMathMLBlock.h:
3212         * rendering/mathml/RenderMathMLOperator.cpp:
3213         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
3214         (WebCore::RenderMathMLOperator::expandedStretchHeight):
3215         (WebCore::RenderMathMLOperator::stretchToHeight):
3216         (WebCore::RenderMathMLOperator::findAcceptableStretchyCharacter):
3217         (WebCore::RenderMathMLOperator::updateStyle):
3218         (WebCore::RenderMathMLOperator::firstLineBaseline):
3219         (WebCore::RenderMathMLOperator::computeLogicalHeight):
3220         * rendering/mathml/RenderMathMLOperator.h:
3221         * rendering/mathml/RenderMathMLRow.cpp:
3222         (WebCore::RenderMathMLRow::layout):
3223
3224 2014-02-22  Frédéric Wang  <fred.wang@free.fr>
3225
3226         Bug 119043 - Large stretch size error for MathML operators.
3227         https://bugs.webkit.org/show_bug.cgi?id=119043
3228
3229         Reviewed by Chris Fleizach.
3230
3231         The MathML code used some arbitrary gOperatorExpansion factor for the
3232         stretch size and 2/3 1/2 constants for the baseline. This change tries
3233         to consider height/depth of siblings of the stretchy operator so that
3234         the stretchy operator now matches its target.
3235
3236         Test: mathml/presentation/stretchy-depth-height.html
3237
3238         * rendering/RenderObject.h:
3239         (WebCore::RenderObject::isRenderMathMLTable):
3240         * rendering/mathml/RenderMathMLBlock.h:
3241         * rendering/mathml/RenderMathMLOperator.cpp:
3242         (WebCore::RenderMathMLOperator::RenderMathMLOperator):
3243         (WebCore::RenderMathMLOperator::stretchTo):
3244         (WebCore::RenderMathMLOperator::findAcceptableStretchyCharacter):
3245         (WebCore::RenderMathMLOperator::updateStyle):
3246         (WebCore::RenderMathMLOperator::firstLineBaseline):
3247         (WebCore::RenderMathMLOperator::computeLogicalHeight):
3248         * rendering/mathml/RenderMathMLOperator.h:
3249         * rendering/mathml/RenderMathMLRow.cpp:
3250         (WebCore::RenderMathMLRow::layout):
3251
3252 2014-02-21  Zalan Bujtas  <zalan@apple.com>
3253
3254         REGRESSION(r164412): Pixel cracks when zooming in to any web content.
3255         https://bugs.webkit.org/show_bug.cgi?id=129195
3256
3257         Reviewed by Simon Fraser.
3258
3259         Integral clipping of the repaint rect was prematurely removed in RenderLayerBacking::paintContents().
3260         Repaint rects needs a uniform, device pixel precise clipping across the painting flow including RenderLayer,
3261         RenderView and TileController.
3262
3263         * rendering/RenderLayerBacking.cpp:
3264         (WebCore::RenderLayerBacking::paintContents):
3265         (WebCore::RenderLayerBacking::compositedBoundsIncludingMargin):
3266
3267 2014-02-21  Jer Noble  <jer.noble@apple.com>
3268
3269         Unreviewed Mac build fix after r164529.
3270
3271         Replace the string-to-array algorithm with a archictecture-independant
3272         one.
3273
3274         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
3275         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest):
3276
3277 2014-02-21  Jer Noble  <jer.noble@apple.com>
3278
3279         [EME] Add a CDMSession for MediaPlayerPrivateMediaSourceAVFObjC
3280         https://bugs.webkit.org/show_bug.cgi?id=129166
3281
3282         Reviewed by Eric Carlson.
3283
3284         Add a new CDMSession, cerated by MediaPlayerPrivateMediaSourceAVFObjC allowing
3285         media-source-backed media elements to play protected content.
3286
3287         Add a new CDMSessionMediaSourceAVFObjC class:
3288         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: Added.
3289         (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC):
3290         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm: Added.
3291         (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
3292         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyRequest): Do not actually generate a
3293             key request until the certificate data has been added via update();
3294         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): No-op.
3295         (WebCore::CDMSessionMediaSourceAVFObjC::update): If no certificate data has yet been
3296             added, assume the incoming message contains it.
3297
3298         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3299         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3300         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine): Add supportsKeySystem.
3301         (WebCore::keySystemIsSupported): Use "com.apple.fps.2_0" to distinguish from the not-media-source scheme.
3302         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): Check the keySystem type.
3303         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsKeySystem): Added.
3304         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::createSession): Added, pass through to MediaSourcePrivate.
3305         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
3306         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
3307         (WebCore::MediaSourcePrivateAVFObjC::createSession): Added.
3308         (WebCore::MediaSourcePrivateAVFObjC::sourceBufferKeyNeeded): Pass through to MediaPlayer.
3309         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
3310         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3311         (-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]):
3312             Added, pass through to SourceBufferPrivate.
3313         (WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
3314         (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID): Remember
3315             which track is requesting the key, and pass the request to MediaSourcePrivate.
3316
3317         Add new files to the project.
3318         * WebCore.xcodeproj/project.pbxproj:
3319
3320 2014-02-21  Alexey Proskuryakov  <ap@apple.com>
3321
3322         CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify contains seemingly accidental unreachable code
3323         https://bugs.webkit.org/show_bug.cgi?id=129193
3324
3325         Reviewed by Joseph Pecoraro.
3326
3327         * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
3328         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify): Fix the accidental code.
3329
3330 2014-02-21  Brent Fulgham  <bfulgham@apple.com>
3331
3332         Extend media support for WebVTT sources
3333         https://bugs.webkit.org/show_bug.cgi?id=129156
3334
3335         Reviewed by Eric Carlson.
3336
3337         * Configurations/FeatureDefines.xcconfig: Add new feature define for AVF_CAPTIONS
3338         * html/HTMLMediaElement.cpp:
3339         (WebCore::HTMLMediaElement::outOfBandTrackSources): Added.
3340         * html/HTMLMediaElement.h:
3341         * platform/graphics/MediaPlayer.cpp:
3342         (WebCore::MediaPlayer::outOfBandTrackSources): Added.
3343         * platform/graphics/MediaPlayer.h:
3344         (WebCore::MediaPlayerClient::outOfBandTrackSources): Added.
3345         * platform/graphics/PlatformTextTrack.h:
3346         (WebCore::PlatformTextTrack::create): Update for new constructor signature.
3347         (WebCore::PlatformTextTrack::createOutOfBand): Added.
3348         (WebCore::PlatformTextTrack::url): Added.
3349         (WebCore::PlatformTextTrack::isDefault): Added.
3350         (WebCore::PlatformTextTrack::PlatformTextTrack): Revised to take new URL and
3351         'isDefault' arguments.
3352         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3353         (WebCore::mediaDescriptionForKind): Added.
3354         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Tell AVFoundation about any
3355         WebVTT tracks supplied by the web page.
3356         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMediaSelectionOptions): Filter out any out-of-band
3357         WebVTT tracks returned by the media engine to avoid double-counting tracks.
3358
3359 2014-02-21  Ryosuke Niwa  <rniwa@webkit.org>
3360
3361         Inner text element should not use -webkit-user-modify
3362         https://bugs.webkit.org/show_bug.cgi?id=129035
3363
3364         Reviewed by Andreas Kling.
3365
3366         To eliminate the internal use of -webkit-user-modify, use contenteditable attribute in the inner text elements
3367         instead of manually inspecting disabled-ness and readonly-ness in RenderTextControl.
3368
3369         Unfortunately, we still have to manually set UserModify value in RenderTextControl::adjustInnerTextStyle since
3370         RenderTextControl::styleDidChange creates RenderStyle for its inner text from scratch via createInnerTextStyle.    
3371
3372         * html/HTMLFieldSetElement.cpp:
3373         (WebCore::HTMLFieldSetElement::disabledStateChanged): Don't use childrenOfType iterator which asserts that DOM
3374         isn't mutated during the traversal since we now set contenteditable attribute inside disabledStateChanged via
3375         updateFromControlElementsAncestorDisabledStateUnder.
3376
3377         * html/HTMLFormControlElement.cpp:
3378         (WebCore::HTMLFormControlElement::parseAttribute): Extracted readOnlyAttributeChanged out of this function so
3379         that HTMLTextFormControl could override it to call updateInnerTextElementEditability.
3380         (WebCore::HTMLFormControlElement::readOnlyAttributeChanged): Ditto.
3381         * html/HTMLFormControlElement.h:
3382
3383         * html/HTMLInputElement.cpp:
3384         (WebCore::HTMLInputElement::didAddUserAgentShadowRoot): Call updateInnerTextElementEditability after creating
3385         shadow DOM for the current input type.
3386         (WebCore::HTMLInputElement::updateType): Ditto.
3387         (WebCore::HTMLInputElement::parseAttribute): Ditto.
3388
3389         * html/HTMLTextAreaElement.cpp:
3390         (WebCore::HTMLTextAreaElement::didAddUserAgentShadowRoot): Call updateInnerTextElementEditability.
3391
3392         * html/HTMLTextFormControlElement.cpp:
3393         (WebCore::HTMLTextFormControlElement::disabledStateChanged): Added to update contenteditable attribute since
3394         the editability of the inner text element depends on disabled-ness of the element.
3395         (WebCore::HTMLTextFormControlElement::readOnlyAttributeChanged): Ditto for the readonly-ness of the element.
3396         (WebCore::HTMLTextFormControlElement::updateInnerTextElementEditability): Added.
3397         * html/HTMLTextFormControlElement.h:
3398
3399         * rendering/RenderTextControl.cpp:
3400         (WebCore::RenderTextControl::adjustInnerTextStyle): Use the inner text element's presentationAttributeStyle() to
3401         compute the appropriate EUserModify value instead of hard-coding it here.
3402         * rendering/RenderTextControl.h:
3403
3404 2014-02-21  ChangSeok Oh  <changseok.oh@collabora.com>
3405
3406         [GTK] Support WEBGL_draw_buffers extension.
3407         https://bugs.webkit.org/show_bug.cgi?id=129143
3408
3409         Reviewed by Dean Jackson.
3410
3411         Support the WEBGL_draw_buffers WebGL extension for gtk port. Relevant opengl APIs
3412         are exposed for WebGLRenderingContext to access them properly.
3413
3414         Covered by fast/canvas/webgl/webgl-draw-buffers.html
3415
3416         * platform/graphics/OpenGLShims.cpp:
3417         (WebCore::initializeOpenGLShims):
3418         * platform/graphics/OpenGLShims.h:
3419         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3420         (WebCore::Extensions3DOpenGL::supportsExtension):
3421         (WebCore::Extensions3DOpenGL::drawBuffersEXT):
3422
3423 2014-02-21  ChangSeok Oh  <changseok.oh@collabora.com>
3424
3425         Mac port uses ANGLE_instanced_arrays related apis through those in GraphicsContext3DCommon.cpp
3426         https://bugs.webkit.org/show_bug.cgi?id=128803
3427
3428         Reviewed by Dean Jackson.
3429
3430         Merge mac port implementation of ANGLE_instanced_arrays into common code.
3431
3432         No new tests, no functionality changed.
3433
3434         * platform/graphics/mac/GraphicsContext3DMac.mm:
3435         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3436         (WebCore::Extensions3DOpenGL::drawArraysInstanced):
3437         (WebCore::Extensions3DOpenGL::drawElementsInstanced):
3438         (WebCore::Extensions3DOpenGL::vertexAttribDivisor):
3439         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3440         (WebCore::GraphicsContext3D::vertexAttribDivisor):
3441
3442 2014-02-21  Myles C. Maxfield  <mmaxfield@apple.com>
3443
3444         After copy and paste, cursor may appear to be above the bottom of content
3445         https://bugs.webkit.org/show_bug.cgi?id=129167
3446
3447         Reviewed by Ryosuke Niwa.
3448
3449         Adding a clear:both to the end of content.
3450
3451         I can't handle the case of the cursor appearing above the bottom of
3452         absolutely positioned divs (of the case of floats inside absolutely
3453         positioned divs) because you can't know where the bottom of a div
3454         will end up being rendered (it is affected by things like browser
3455         window width and text size settings). Therefore, the only case I
3456         can handle is the case where there is a floating div in the same
3457         level as the document itself.
3458
3459         Test: editing/pasteboard/copy-paste-inserts-clearing-div.html
3460
3461         * editing/EditingStyle.cpp:
3462         (WebCore::EditingStyle::isFloating):
3463         * editing/EditingStyle.h:
3464         * editing/markup.cpp: