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