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