1bb96fb17da93e85beaa207e1311cfbf7cd8b35c
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-03-25  Michael Saboff  <msaboff@apple.com>
2
3         Unreviewed, rolling out r166070.
4
5         Rollout r166070 due to 2% performance loss in page load times
6
7         Reverted changeset:
8
9         "Change CodeGeneratorJS.pm special cases for "DOMWindow" to be
10         general purpose"
11         https://bugs.webkit.org/show_bug.cgi?id=130553
12         http://trac.webkit.org/changeset/166070
13
14 2014-03-25  Michael Saboff  <msaboff@apple.com>
15
16         Unreviewed, rolling out r166126.
17
18         Rollout r166126 in prepartion to roll out prerequisite r166070
19
20         Reverted changeset:
21
22         "toThis() on a JSWorkerGlobalScope should return a JSProxy and
23         not undefined"
24         https://bugs.webkit.org/show_bug.cgi?id=130554
25         http://trac.webkit.org/changeset/166126
26
27 2014-03-25  Jer Noble  <jer.noble@apple.com>
28
29         [iOS] Playing video does not disable display sleep.
30         https://bugs.webkit.org/show_bug.cgi?id=130729
31
32         Reviewed by Eric Carlson.
33
34         DisplaySleepDisabler was broken by r161589, which replaced the iOS implementation with
35         an empty one. Make a platform independent version with a Cocoa-platform subclass. Update
36         the APIs to non-deprecated ones.
37
38         * platform/DisplaySleepDisabler.cpp: Added.
39         (WebCore::DisplaySleepDisabler::create):
40         * platform/DisplaySleepDisabler.h: Added.
41         (WebCore::DisplaySleepDisabler::~DisplaySleepDisabler):
42         (WebCore::DisplaySleepDisabler::DisplaySleepDisabler):
43         * platform/cocoa/DisplaySleepDisablerCocoa.cpp: Renamed from Source/WebCore/platform/mac/DisplaySleepDisabler.cpp.
44         (WebCore::DisplaySleepDisabler::create):
45         (WebCore::DisplaySleepDisablerCocoa::DisplaySleepDisablerCocoa):
46         (WebCore::DisplaySleepDisablerCocoa::~DisplaySleepDisablerCocoa):
47         * platform/cocoa/DisplaySleepDisablerCocoa.h: Renamed from Source/WebCore/platform/mac/DisplaySleepDisabler.h.
48
49         Update m_sleepDisabler to be a std::unique_ptr, and unprotect the definition of methods which use it.
50         * html/HTMLMediaElement.cpp:
51         (WebCore::HTMLMediaElement::updateSleepDisabling):
52         (WebCore::HTMLMediaElement::shouldDisableSleep):
53         * html/HTMLMediaElement.h:
54
55         Add the new and renamed files to the project:
56         * CMakeLists.txt:
57         * GNUmakefile.list.am:
58         * WebCore.xcodeproj/project.pbxproj:
59
60 2014-03-25  Dirk Schulze  <krit@webkit.org>
61
62         Implement ImageData constructors and WebWorkers exposure
63         https://bugs.webkit.org/show_bug.cgi?id=130668
64
65         Reviewed by Dean Jackson.
66
67         Add new constructors for ImageData.
68
69         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#pixel-manipulation
70
71         Test: fast/canvas/canvas-imageData.html
72
73         * html/ImageData.cpp: 
74         (WebCore::ImageData::create):
75         * html/ImageData.h:
76         * html/ImageData.idl:
77
78 2014-03-25  Myles C. Maxfield  <mmaxfield@apple.com>
79
80         InlineIterator position (unsigned int) variable can wrap around
81         https://bugs.webkit.org/show_bug.cgi?id=130540
82
83         Reviewed by Simon Fraser.
84
85         We trigger an ASSERT that occurs when we are ignoring spaces (to collapse them
86         into a single whitespace mark) but then encounter a line break. Because we don't ignore
87         the first space (but do ignore subsequent spaces), when we hit a newline in an RTL context
88         we want to ignore that first space as well (so as not to push the text away from the right
89         edge). We do this by decrementing the InlineIterator pointing to this first space, so all
90         the spaces get ignored. However, if that space is the first character in a Text node, the
91         decrement will try to go past the beginning of the node, and trigger an ASSERT.
92
93         This design is not great. At some point we should rework it to more elegantly handle
94         collapsing whitespace in both RTL and LTR writing modes.
95
96         This patch adds an ASSERT earlier in this codepath to catch potential problems earlier.
97         It also pulls our sentinel value out into a separate boolean to make it more clear what is
98         going on.
99
100         Test: fast/text/whitespace-only-text-in-rtl.html
101
102         * rendering/InlineIterator.h:
103         (WebCore::InlineIterator::moveTo): Use the set***() calls
104         (WebCore::InlineIterator::setOffset): ASSERT early that our math hasn't wrapped
105         * rendering/RenderBlockLineLayout.cpp:
106         (WebCore::RenderBlockFlow::appendRunsForObject): Use new boolean value
107         * rendering/line/BreakingContextInlineHeaders.h:
108         (WebCore::BreakingContext::handleText): Guard against wraps
109         (WebCore::checkMidpoints): Use new boolean value
110         * rendering/line/TrailingObjects.cpp:
111         (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes): Use new boolean value
112
113 2014-03-25  Martin Robinson  <mrobinson@igalia.com>
114
115         [GTK] Remove the autotools build
116         https://bugs.webkit.org/show_bug.cgi?id=130717
117
118         Reviewed by Anders Carlsson.
119
120         * GNUmakefile.am: Removed.
121         * bindings/gobject/GNUmakefile.am: Removed.
122         * config.h: Removed references to autotools configure file.
123
124 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
125
126         Prevent 'removetrack' events from firing when all inband text tracks are removed.
127         https://bugs.webkit.org/show_bug.cgi?id=130704
128
129         Reviewed by Eric Carlson.
130
131         Test: media/track/track-remove-track.html
132
133         Based on the Blink change (patch by acolwell@chromium.org):
134         https://codereview.chromium.org/177243018/
135
136         * html/HTMLMediaElement.cpp:
137         (WebCore::HTMLMediaElement::prepareForLoad): Reorder steps to match W3C specification.
138         (WebCore::HTMLMediaElement::noneSupported): Forget tracks as required by specification.
139         (WebCore::HTMLMediaElement::mediaLoadingFailed): Forget tracks as required by specification.
140         (WebCore::HTMLMediaElement::removeTextTrack): Only request the 'removetracks' event if
141         requested by caller.
142         (WebCore::HTMLMediaElement::removeAllInbandTracks): Renamed to 'forgetResourceSpecificTracks'
143         (WebCore::HTMLMediaElement::noneSupported): Specify that we want the 'removetracks' event
144         fired for this use case.
145         (WebCore::HTMLMediaElement::prepareForLoad): Switch to new 'forgetResourceSpecificTracks' name.
146         * html/HTMLMediaElement.h:
147         * html/track/TextTrackList.cpp:
148         (TextTrackList::remove): Only fire the 'removetrack' event if the caller requests it.
149         * html/track/TextTrackList.h: Add default argument to fire the 'removetrack' event
150         when removing a track.
151         * html/track/TrackListBase.cpp:
152         (TrackListBase::remove): Only fire the 'removetrack' event if the caller requests it.
153         * html/track/TrackListBase.h: Add default argument to fire the 'removetrack' event.
154
155 2014-03-25  David Kilzer  <ddkilzer@apple.com>
156
157         Hold a reference to firstSuccessfulSubmitButton in HTMLFormElement::submit
158         <http://webkit.org/b/130713>
159         <rdar://problem/15661876>
160
161         Reviewed by Darin Adler.
162
163         Merged from Blink (patch by Ian Beer):
164         http://crbug.com/303657
165         https://src.chromium.org/viewvc/blink?view=rev&revision=158938
166
167         Test: fast/forms/form-submission-crash-successful-submit-button.html
168
169         * html/HTMLFormElement.cpp:
170         (WebCore::HTMLFormElement::submit):
171
172 2014-03-25  Gabor Rapcsanyi  <rgabor@webkit.org>
173
174         [ARM64] GNU assembler fails in TransformationMatrix::multiply
175         https://bugs.webkit.org/show_bug.cgi?id=130454
176
177         Reviewed by Zoltan Herczeg.
178
179         Change the NEON intstructions to the proper style.
180
181         * platform/graphics/transforms/TransformationMatrix.cpp:
182         (WebCore::TransformationMatrix::multiply):
183
184 2014-03-20  Sergio Villar Senin  <svillar@igalia.com>
185
186         [CSS Grid Layout] Vertical rectangles not considered as valid grid areas
187         https://bugs.webkit.org/show_bug.cgi?id=130513
188
189         Reviewed by Andreas Kling.
190
191         Grid areas sized as vertical rectangles were incorrectly
192         considered as invalid by the parser. That's because the condition
193         checking that each new row was adjacent to the previous one was
194         using the first row of the currently parsed grid area instead of
195         the last one.
196
197         Test: fast/css-grid-layout/grid-template-areas-get-set.html
198
199         * css/CSSParser.cpp:
200         (WebCore::CSSParser::parseGridTemplateAreas):
201
202 2014-03-25  Xabier Rodriguez Calvar  <calvaris@igalia.com>
203
204         [GTK] Volume slider shows below the panel with videos in certain cases
205         https://bugs.webkit.org/show_bug.cgi?id=130608
206
207         Reviewed by Jer Noble.
208
209         We need to delay the moment we check if the volume slider shows up
210         or down. If the video was not visible, the offsets were 0 and it
211         was forced to be shown below the panel.
212
213         Test: media/video-initially-hidden-volume-slider-up.html
214
215         * Modules/mediacontrols/mediaControlsApple.js:
216         (Controller.prototype.createControls): Moved volumebox pseudo from
217         the subclass. The test checks for it and it would fail in Mac.
218         * Modules/mediacontrols/mediaControlsGtk.js:
219         (ControllerGtk.prototype.createControls): Moved volumebox pseudo
220         to the superclass.
221         (ControllerGtk.prototype.handleMuteButtonMouseOver): Check if
222         volume slider should show up or down.
223         (ControllerGtk.prototype.updateReadyState): Removed check for
224         volume slider direction.
225
226 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
227
228         [Win] Enable WebVTT Regions on Windows.
229         https://bugs.webkit.org/show_bug.cgi?id=130680
230
231         Reviewed by Eric Carlson.
232
233         * DerivedSources.cpp: Add new build components.
234         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
235         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
236
237 2014-03-24  Simon Fraser  <simon.fraser@apple.com>
238
239         Remove some unnecessary includes from PlatformCALayerClient.h
240         https://bugs.webkit.org/show_bug.cgi?id=130703
241
242         Reviewed by Andreas Kling.
243         
244         No need for all these #includes.
245
246         * platform/graphics/ca/PlatformCALayerClient.h:
247
248 2014-03-24  Adenilson Cavalcanti  <cavalcantii@gmail.com>
249
250         [core] FEGaussianBlur: use IntSize to simplify member function interface
251         https://bugs.webkit.org/show_bug.cgi?id=130695
252
253         Reviewed by Dean Jackson.
254
255         By returning an IntSize to store the calculated kernel size values
256         it is possible to have less function parameters. This patch also
257         streamlines a bit the code in calculateUnscaledKernelSize.
258
259         No new tests, no change in behavior.
260
261         * platform/graphics/filters/FEDropShadow.cpp:
262         (WebCore::FEDropShadow::determineAbsolutePaintRect):
263         * platform/graphics/filters/FEGaussianBlur.cpp:
264         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
265         (WebCore::FEGaussianBlur::calculateKernelSize):
266         (WebCore::FEGaussianBlur::determineAbsolutePaintRect):
267         (WebCore::FEGaussianBlur::platformApplySoftware):
268         * platform/graphics/filters/FEGaussianBlur.h:
269         (if): Deleted.
270         * platform/graphics/filters/FilterOperations.cpp:
271         (WebCore::outsetSizeForBlur):
272
273 2014-03-24  Brian Burg  <bburg@apple.com>
274
275         Web Replay: capture and replay keyboard events
276         https://bugs.webkit.org/show_bug.cgi?id=130314
277
278         Reviewed by Joseph Pecoraro.
279
280         Upstream support for capturing and replaying non-IME keyboard input.
281         This works similarly to mouse events. It introduces optional fields and
282         macros to encode/decode them.
283
284         Test: ManualTests/inspector/replay-keyboard-events.html
285
286         * replay/ReplayInputDispatchMethods.cpp:
287         (WebCore::HandleKeyPress::dispatch):
288         * replay/SerializationMethods.cpp:
289         (JSC::EncodingTraits<NondeterministicInputBase>::encodeValue):
290         (JSC::EncodingTraits<NondeterministicInputBase>::decodeValue): Switch existing
291         encode/decode calls to use the shortening macros.
292         (JSC::EncodingTraits<KeypressCommand>::encodeValue): Added.
293         (JSC::EncodingTraits<KeypressCommand>::decodeValue): Added.
294         (JSC::PlatformKeyboardEventAppKit::PlatformKeyboardEventAppKit): Subclass
295         PlatformKeyboardEvent so that we can set AppKit-specific members not
296         initialized through the main constructors.
297         (JSC::EncodingTraits<PlatformKeyboardEvent>::encodeValue): Added.
298         (JSC::EncodingTraits<PlatformKeyboardEvent>::decodeValue): Added.
299         * replay/SerializationMethods.h:
300         * replay/UserInputBridge.cpp:
301         (WebCore::UserInputBridge::UserInputBridge): initialize m_state inside a guard.
302         (WebCore::UserInputBridge::handleKeyEvent): fill in the implementation.
303         * replay/WebInputs.json:
304
305 2014-03-24  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
306
307         Optimizing string construction for type error in JSNavigatorCustom.cpp
308         https://bugs.webkit.org/show_bug.cgi?id=130683
309
310         Reviewed by Eric Carlson.
311
312         * bindings/js/JSNavigatorCustom.cpp:
313         (WebCore::JSNavigator::webkitGetUserMedia):
314
315 2014-03-24  Beth Dakin  <bdakin@apple.com>
316
317         Legacy-style scrollbars constantly redraw after scrolling
318         https://bugs.webkit.org/show_bug.cgi?id=130699
319
320         Reviewed by Simon Fraser.
321
322         The constant re-draw was happening because we were never calling [ScrollbarPainter 
323         setUsePresentationValue:NO]. This is a silly bug where were should have been 
324         looking at PlatformWheelEvent::momentumPhase() instead of 
325         PlatformWheelEvent::phase()
326
327         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
328         (WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):
329
330 2014-03-24  Daniel Bates  <dabates@apple.com>
331
332         XSS Auditor doesn't block <script> injected before an existing <script>
333         https://bugs.webkit.org/show_bug.cgi?id=130475
334
335         Merged from Blink (patch by Tom Sepez):
336         https://src.chromium.org/viewvc/blink?view=rev&revision=169697
337
338         Tests: http/tests/security/xssAuditor/script-tag-expression-follows.html
339                http/tests/security/xssAuditor/script-tag-near-start.html
340
341         * html/parser/XSSAuditor.cpp:
342         (WebCore::startsHTMLCommentAt):
343         (WebCore::startsSingleLineCommentAt):
344         (WebCore::startsMultiLineCommentAt):
345         (WebCore::startsOpeningScriptTagAt):
346         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
347
348 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
349
350         Activate WebVTT Tests Once Merging is Complete
351         https://bugs.webkit.org/show_bug.cgi?id=130420
352
353         Reviewed by Eric Carlson.
354
355         * Configurations/FeatureDefines.xcconfig: Turn on ENABLE(WEBVTT_REGIONS)
356
357 2014-03-24  Anders Carlsson  <andersca@apple.com>
358
359         Re-fix the build.
360
361         * WebCore.exp.in:
362
363 2014-03-24  Anders Carlsson  <andersca@apple.com>
364
365         Fix build.
366
367         * WebCore.exp.in:
368         Move a CFNetwork only symbol inside the USE(CFNETWORK) section.
369
370 2014-03-24  Chris Fleizach  <cfleizach@apple.com>
371
372         Regression: AX: Don't expose role or notifications for invalid menus
373         https://bugs.webkit.org/show_bug.cgi?id=129814
374
375         Reviewed by Mario Sanchez Prada.
376
377         If a role=menu has no menuitem children, it should not be a menu.
378         This was a bit tricky to implement since we need to update the role after the children are created,
379         but it means we have to be a bit more aggressive about when to updateChildren, so that the role
380         is known to be valid.
381
382         Test: platform/mac/accessibility/invalid-menu-role-does-not-send-notification.html
383
384         * accessibility/AXObjectCache.cpp:
385         (WebCore::AXObjectCache::notificationPostTimerFired):
386         * accessibility/AccessibilityRenderObject.cpp:
387         (WebCore::AccessibilityRenderObject::updateRoleAfterChildrenCreation):
388         (WebCore::AccessibilityRenderObject::addChildren):
389         * accessibility/AccessibilityRenderObject.h:
390         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
391         (-[WebAccessibilityObjectWrapperBase updateObjectBackingStore]):
392
393 2014-03-24  Andy Estes  <aestes@apple.com>
394
395         [iOS] Download support by CFURLDownloadRef under USE(CFNETWORK).
396         https://bugs.webkit.org/show_bug.cgi?id=129322
397
398         Reviewed by Anders Carlsson.
399
400         * platform/network/ResourceHandle.h:
401         * platform/network/cf/ResourceHandleCFNet.cpp:
402         (WebCore::ResourceHandle::releaseConnectionForDownload): Changed to
403         return a RetainPtr that adopts the connection's retain count.
404
405 2014-03-24  Enrica Casucci  <enrica@apple.com>
406
407         Update Hindi fallback font.
408         https://bugs.webkit.org/show_bug.cgi?id=130690
409         <rdar://problem/16391601>
410
411         Reviewed by Sam Weinig.
412
413         Using the new available font for Hindi in the fallback list.
414
415         * platform/graphics/ios/FontCacheIOS.mm:
416         (WebCore::FontCache::systemFallbackForCharacters):
417
418 2014-03-24  Brent Fulgham  <bfulgham@apple.com>
419
420         Merge Minor WebVTT Cleanups from Blink
421         https://bugs.webkit.org/show_bug.cgi?id=130681
422
423         Reviewed by Eric Carlson.
424
425         Merged from Blink (patch by philipj@opera.com):
426         https://chromium.googlesource.com/chromium/blink/+/693eb5e2933dca0eab5bbd604e9f3406fe9fd1ab
427         http://crbug.com/52593009
428         https://chromium.googlesource.com/chromium/blink/+/40b3602feab34e9be829fd742b6ad6ded322a09f
429         http://crbug.com/104243003
430
431         * html/track/TextTrack.cpp:
432         (WebCore::TextTrack::setMode):
433         * html/track/TextTrack.idl:
434         * html/track/TextTrackCue.h:
435         * html/track/VTTCue.cpp:
436         (WebCore::VTTCue::VTTCue):
437         * html/track/VTTCue.h:
438
439 2014-03-24  Commit Queue  <commit-queue@webkit.org>
440
441         Unreviewed, rolling out r166169.
442         https://bugs.webkit.org/show_bug.cgi?id=130682
443
444         This patch broke tests on Apple Mavericks (Requested by fredw
445         on #webkit).
446
447         Reverted changeset:
448
449         "Operator stretching: expose a math data API"
450         https://bugs.webkit.org/show_bug.cgi?id=130572
451         http://trac.webkit.org/changeset/166169
452
453 2014-03-24  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
454
455         ENABLE(CSS_GRID_LAYOUT) guard for CSSGridLineNamesValue
456         https://bugs.webkit.org/show_bug.cgi?id=130669
457
458         Reviewed by Sergio Villar Senin.
459
460         No new tests. No new functionality.
461
462         * css/CSSGridLineNamesValue.cpp:
463         * css/CSSGridLineNamesValue.h:
464
465 2014-03-24  Chris Fleizach  <cfleizach@apple.com>
466
467         <hr> should expose AXRole/AXSubrole, etc
468         https://bugs.webkit.org/show_bug.cgi?id=109015
469
470         Reviewed by Mario Sanchez Prada.
471
472         Expose the <hr> element to Mac and iOS through the accessibility interface.
473
474         Test: platform/mac/accessibility/hr-element.html
475
476         * English.lproj/Localizable.strings:
477         * accessibility/AccessibilityNodeObject.cpp:
478         (WebCore::AccessibilityNodeObject::isEnabled):
479         * accessibility/AccessibilityObject.cpp:
480         (WebCore::AccessibilityObject::computedRoleString):
481         * accessibility/AccessibilityRenderObject.cpp:
482         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
483         * accessibility/atk/AccessibilityObjectAtk.cpp:
484         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
485         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
486         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
487         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
488         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
489         (createAccessibilityRoleMap):
490         (-[WebAccessibilityObjectWrapper subrole]):
491         (-[WebAccessibilityObjectWrapper roleDescription]):
492         * platform/LocalizedStrings.cpp:
493         (WebCore::AXHorizontalRuleDescriptionText):
494         * platform/LocalizedStrings.h:
495
496 2014-03-24  Antti Koivisto  <antti@apple.com>
497
498         Invalidate sibling text node style when needed instead of attaching synchronously
499         https://bugs.webkit.org/show_bug.cgi?id=130590
500
501         Reviewed by Andreas Kling.
502         
503         Make things simpler.
504
505         * style/StyleResolveTree.cpp:
506         (WebCore::Style::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
507         
508             Just invalidate instead of calling attach directly.
509             Rename to match.
510
511         (WebCore::Style::textRendererIsNeeded):
512         (WebCore::Style::createTextRendererIfNeeded):
513         
514             Move all testing to textRendererIsNeeded.
515
516         (WebCore::Style::updateTextRendererAfterContentChange):
517         
518             Call resolveTextNode instead of re-implementing the same thing.
519
520         (WebCore::Style::resolveLocal):
521         (WebCore::Style::resolveTextNode):
522         
523             Avoid unnecessary reattaching.
524             Rename for consistency.
525
526         (WebCore::Style::resolveShadowTree):
527         (WebCore::Style::resolveTree):
528         
529 2014-03-24  Zsolt Borbely  <zsborbely.u-szeged@partner.samsung.com>
530
531         Fix !ENABLE(VIDEO) build
532         https://bugs.webkit.org/show_bug.cgi?id=130671
533
534         Reviewed by Eric Carlson.
535
536         Add missing ENABLE(VIDEO) guards because many functions use
537         the newly guarded functions.
538
539         * testing/Internals.cpp:
540         * testing/Internals.h:
541         * testing/Internals.idl:
542
543 2014-03-24  Antti Koivisto  <antti@apple.com>
544
545         Text autosizing does not determine line count correctly for simple line layout
546         https://bugs.webkit.org/show_bug.cgi?id=130673
547
548         Reviewed by Daniel Bates.
549         
550         We don't count lines correctly in simple line layout case.
551
552         * page/Frame.cpp:
553         (WebCore::Frame::textAutosizingWidth):
554         (WebCore::Frame::setTextAutosizingWidth):
555         * page/ios/FrameIOS.mm:
556         (WebCore::Frame::textAutosizingWidth): Deleted.
557         (WebCore::Frame::setTextAutosizingWidth): Deleted.
558         
559             Move to Frame.cpp to make enabling on non-iOS build easier.
560
561         * rendering/RenderBlockFlow.cpp:
562         (WebCore::RenderBlockFlow::lineCount):
563         
564             Handle simple line layout case.
565
566         (WebCore::RenderBlockFlow::lineCountForTextAutosizing):
567             
568             Call lineCount() if children are inline.
569             Rename for clarity.
570
571         (WebCore::RenderBlockFlow::adjustComputedFontSizes):
572         (WebCore::RenderBlockFlow::immediateLineCount): Deleted.
573         * rendering/RenderBlockFlow.h:
574
575 2014-03-24  Frédéric Wang  <fred.wang@free.fr>
576
577         [regression] background colors do not apply to <mo> elements.
578         https://bugs.webkit.org/show_bug.cgi?id=130470.
579
580         Test: mathml/presentation/tokenElements-background-color.html
581
582         * rendering/mathml/RenderMathMLOperator.cpp:
583         (WebCore::RenderMathMLOperator::paint): always call the parent painting to draw the background.
584         (WebCore::RenderMathMLOperator::paintChildren): move the special case for invisible operator here.
585
586 2014-03-24  Frédéric Wang  <fred.wang@free.fr>
587
588         Operator stretching: expose a math data API
589         https://bugs.webkit.org/show_bug.cgi?id=130572
590
591         Reviewed by Chris Fleizach.
592
593         We expose a new SimpleFontData API to give access to the data from the
594         OpenType MATH table using a font cache. The class OpenTypeMathData will
595         be implemented in bug 130324. On Darwin platform, we also implement the
596         missing FontPlatformData::openTypeTable function which will be necessary
597         to load the OpenType MATH table. The changes are intended to be used
598         for MathML operator stretching (bug 130322) so tests are not added yet.
599
600         * CMakeLists.txt: add new OpenTypeMathData files.
601         * GNUmakefile.list.am: ditto.
602         * WebCore.vcxproj/WebCore.vcxproj: ditto.
603         * WebCore.vcxproj/WebCore.vcxproj.filters: ditto.
604         * WebCore.xcodeproj/project.pbxproj: ditto.
605         * platform/graphics/FontCache.cpp: We add a FontCache::getMathData function to implement a cache for the math data.
606         We make the math and vertical data share the same key for the cache.
607         (WebCore::fontMathDataCacheInstance):
608         (WebCore::FontCache::getMathData):
609         (WebCore::fontVerticalDataCacheInstance):
610         * platform/graphics/FontCache.h: We declare FontCache::getMathData and FontFileKey on all platforms.
611         * platform/graphics/FontPlatformData.cpp:
612         (WebCore::FontPlatformData::openTypeTable): We implement openTypeTable() on Darwin platform.
613         * platform/graphics/FontPlatformData.h: We expose openTypeTable() on Darwin platform.
614         * platform/graphics/SimpleFontData.cpp: We initialize m_mathData from the font cache.
615         (WebCore::SimpleFontData::SimpleFontData):
616         * platform/graphics/SimpleFontData.h: We expose a mathData() function to access the MATH data.
617         * platform/graphics/opentype/OpenTypeMathData.cpp: Added. This is a new class that will be used to parse the data from the OpenType MATH table.
618         (WebCore::OpenTypeMathData::OpenTypeMathData):
619         * platform/graphics/opentype/OpenTypeMathData.h: Added.
620         (WebCore::OpenTypeMathData::create):
621         (WebCore::OpenTypeMathData::hasMathData):
622
623 2014-03-24  Jon Lee  <jonlee@apple.com>
624
625         Build fixes.
626
627         Unreviewed.
628
629         * editing/ios/EditorIOS.mm:
630         (WebCore::Editor::writeSelectionToPasteboard): Convert to reference.
631
632 2014-03-24  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
633
634         ENABLE(VIDEO_TRACK) guard for CSSParserSelector::parsePseudoCueFunctionSelector
635         https://bugs.webkit.org/show_bug.cgi?id=130666
636
637         Reviewed by Andreas Kling.
638
639         No new tests. No new functionality.
640
641         * css/CSSParserValues.cpp:
642         (WebCore::CSSParserSelector::parsePseudoCueFunctionSelector): Deleted.
643
644 2014-03-24  Javier Fernandez  <jfernandez@igalia.com>
645
646         [CSS Grid Layout] Update named <grid-line> syntax to the last version of the specs
647         https://bugs.webkit.org/show_bug.cgi?id=129041
648
649         Reviewed by Sergio Villar Senin.
650
651         From Blink r162555 by <svillar@igalia.com>
652
653         Names for grid lines are now specified as a list of whitespace separated
654         idents enclosed in parentheses instead of as a list of strings.
655
656         Updated tests to match the new <grid-line> syntax.
657
658         * CMakeLists.txt:
659         * GNUmakefile.list.am:
660         * WebCore.xcodeproj/project.pbxproj: Added info of the new file for the CSSGridLineNamesValue class.
661         * css/CSSComputedStyleDeclaration.cpp:
662         (WebCore::addValuesForNamedGridLinesAtIndex): The named <grid-line> value is now a list.
663         * css/CSSGrammar.y.in: New syntax for named <grid-line>.
664         * css/CSSGridLineNamesValue.cpp: Added.
665         (WebCore::CSSGridLineNamesValue::customCSSText): String representation of the named <grid-line> as a list of Strings.
666         (WebCore::CSSGridLineNamesValue::CSSGridLineNamesValue): Constructor.
667         (WebCore::CSSGridLineNamesValue::cloneForCSSOM): Ref counted cloning function.
668         * css/CSSGridLineNamesValue.h: Added.
669         (WebCore::CSSGridLineNamesValue::create): Ref counted constructor.
670         * css/CSSParser.cpp:
671         (WebCore::CSSParser::parseGridLineNames): It replaces the old parseGrdTrackNames.
672         (WebCore::CSSParser::parseGridTrackList): Using the new named <grid-line> syntax.
673         (WebCore::CSSParser::parseGridTrackRepeatFunction): Using the new named <grid-line> syntax.
674         * css/CSSParser.h:
675         * css/CSSParserValues.cpp:
676         (WebCore::destroy): Handling the case of CSSValue being CSSValueList intances.
677         (WebCore::CSSParserValue::createCSSValue): Handling the case of CSSValue being CSSValueList intances.
678         * css/CSSParserValues.h:
679         (WebCore::CSSParserValue::setFromValueList): Adds the named <grid-line> list to the CSSParserValueList instance.
680         * css/CSSValue.cpp:
681         (WebCore::CSSValue::equals): Handling the case of the new CSSGridLineNamesValue class.
682         (WebCore::CSSValue::cssText): Handling the case of the new CSSGridLineNamesValue class.
683         (WebCore::CSSValue::destroy): Handling the case of the new CSSGridLineNamesValue class.
684         * css/CSSValue.h:
685         (WebCore::CSSValue::isGridLineNamesValue): Type cast check for the new CSSGridLineNamesValue class.
686         * css/StyleResolver.cpp:
687         (WebCore::createGridTrackList): Using the new named <grid-line> syntax.
688
689 2014-03-23  Sam Weinig  <sam@webkit.org>
690
691         Convert WebHTMLConverter to C++
692         https://bugs.webkit.org/show_bug.cgi?id=130655
693
694         Reviewed by Andreas Kling.
695
696         - Mechanically converts the Objective-C class WebHTMLConverter, to the C++ HTMLConverter (lots of cleanup to follow).
697         - Removes unused members
698             - _standardFontFamily (never assigned to)
699             - _textSizeMultiplier (always exactly 1)
700             - _webViewTextSizeMultiplier (always exactly 0)
701             - _defaultFontSize (always exactly 12, changed to be constant)
702             - _minimumFontSize (always exactly 1, changed to be constant)
703             - _colorsForNodes (never assigned to)
704             - _indexingLimit (always exactly 0)
705             - _thumbnailLimit (always exactly 0)
706             - _flags.isIndexing (always false)
707             - _flags.isTesting (always false)
708
709         * editing/cocoa/HTMLConverter.mm:
710         (HTMLConverter::convert):
711         (HTMLConverter::HTMLConverter):
712         (HTMLConverter::~HTMLConverter):
713         (defaultParagraphStyle):
714         (_childrenForNode):
715         (HTMLConverter::_stringForNode):
716         (HTMLConverter::_getFloat):
717         (_webKitBundle):
718         (HTMLConverter::_elementIsBlockLevel):
719         (HTMLConverter::_elementHasOwnBackgroundColor):
720         (HTMLConverter::_blockLevelElementForNode):
721         (HTMLConverter::_colorForNode):
722         (HTMLConverter::_computedAttributesForElement):
723         (HTMLConverter::_attributesForElement):
724         (HTMLConverter::_newParagraphForElement):
725         (HTMLConverter::_newLineForElement):
726         (HTMLConverter::_newTabForElement):
727         (_WebMessageDocumentClass):
728         (HTMLConverter::_addAttachmentForElement):
729         (HTMLConverter::_addQuoteForElement):
730         (HTMLConverter::_addValue):
731         (HTMLConverter::_fillInBlock):
732         (HTMLConverter::_processMetaElementWithName):
733         (HTMLConverter::_processHeadElement):
734         (HTMLConverter::_enterElement):
735         (HTMLConverter::_addTableForElement):
736         (HTMLConverter::_addTableCellForElement):
737         (HTMLConverter::_processElement):
738         (HTMLConverter::_addMarkersToList):
739         (HTMLConverter::_exitElement):
740         (HTMLConverter::_processText):
741         (HTMLConverter::_traverseNode):
742         (HTMLConverter::_traverseFooterNode):
743         (HTMLConverter::_adjustTrailingNewline):
744         (HTMLConverter::_loadFromDOMRange):
745         (fileWrapperForURL):
746         (fileWrapperForElement):
747         (WebCore::attributedStringFromRange):
748         (WebCore::editingAttributedStringFromRange):
749
750 2014-03-23  Jinwoo Song  <jinwoo7.song@samsung.com>
751
752         Remove Dead Stores from editing directory
753         https://bugs.webkit.org/show_bug.cgi?id=130634
754
755         Reviewed by Darin Adler.
756
757         Remove Dead Stores from editing directory which assigning a value to a variable
758         and never reading that value.
759
760         * editing/ApplyStyleCommand.cpp:
761         (WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
762         * editing/markup.cpp:
763         (WebCore::createMarkupInternal):
764
765 2014-03-23  Hyowon Kim  <hw1008.kim@samsung.com>
766
767         Move all EFL typedefs into EflTypedefs.h.
768         https://bugs.webkit.org/show_bug.cgi?id=130511
769
770         Reviewed by Gyuyoung Kim.
771
772         * platform/FileSystem.h: Remove EFL typedefs.
773         * platform/Widget.h: Ditto.
774         * platform/efl/EflScreenUtilities.h: Ditto.
775         * platform/graphics/Icon.h: Ditto.
776         * platform/graphics/Image.h: Ditto.
777         * platform/graphics/IntPoint.h: Ditto.
778         * platform/graphics/IntRect.h: Ditto.
779         * platform/network/NetworkStateNotifier.h: Ditto.
780
781 2014-03-23  Sam Weinig  <sam@webkit.org>
782
783         Move HTMLConverter from platform/mac to editing/cocoa.
784
785         Rubber-stamped by Darin Adler.
786
787         * WebCore.xcodeproj/project.pbxproj:
788         * editing/cocoa: Added.
789         * editing/cocoa/HTMLConverter.h: Copied from platform/mac/HTMLConverter.h.
790         * editing/cocoa/HTMLConverter.mm: Copied from platform/mac/HTMLConverter.mm.
791         * platform/mac/HTMLConverter.h: Removed.
792         * platform/mac/HTMLConverter.mm: Removed.
793
794 2014-03-23  Sam Weinig  <sam@webkit.org>
795
796         Simplify the HTMLConverter interface (Part 2)
797         https://bugs.webkit.org/show_bug.cgi?id=130654
798
799         Reviewed by Darin Adler.
800
801         Switch HTMLConverter from using an Objective-C interface to C functions.
802
803         * WebCore.exp.in:
804         * editing/ios/EditorIOS.mm:
805         (WebCore::Editor::writeSelectionToPasteboard):
806         * editing/mac/EditorMac.mm:
807         (WebCore::Editor::dataSelectionForPasteboard):
808         (WebCore::Editor::writeSelectionToPasteboard):
809         * platform/ios/PasteboardIOS.mm:
810         * platform/mac/HTMLConverter.h:
811         * platform/mac/HTMLConverter.mm:
812         (WebCore::attributedStringFromRange):
813         (WebCore::editingAttributedStringFromRange):
814         * platform/mac/PasteboardMac.mm:
815
816 2014-03-23  Darin Adler  <darin@apple.com>
817
818         Remove code in HTMLObjectElement attribute parsing that forces style resolution and layout
819         https://bugs.webkit.org/show_bug.cgi?id=130653
820
821         Reviewed by Antti Koivisto.
822
823         * dom/ContainerNode.cpp: Moved the post-attach callback code from here to
824         StyleResolveTree.h/cpp.
825         * dom/ContainerNode.h: Ditto.
826
827         * dom/Document.cpp:
828         (WebCore::Document::recalcStyle): Use Style::PostResolutionCallbackDisabler instead of
829         PostAttachCallbackDisabler.
830
831         * dom/Element.h: Moved the post-attach callback code from here to StyleResolveTree.h/cpp.
832
833         * html/HTMLEmbedElement.cpp:
834         (WebCore::HTMLEmbedElement::parseAttribute): Simplified the code for typeAttr, turning
835         it into a 1-liner. Added a FIXME in codeAttr about the fact that it does not have the
836         code to trigger image loads. Changed srcAttr to call updateImageLoaderWithNewURLSoon to
837         do the image loading logic.
838
839         * html/HTMLFormControlElement.cpp:
840         (WebCore::HTMLFormControlElement::didAttachRenderers): Updated to use
841         Style::queuePostResolutionCallback and use a lambda instead of a function.
842         (WebCore::HTMLFormControlElement::didRecalcStyle): Ditto. Also added RefPtr instead
843         of just using wishful thinking to keep the object alive.
844         * html/HTMLFrameOwnerElement.cpp:
845         (WebCore::HTMLFrameOwnerElement::scheduleSetNeedsStyleRecalc): Ditto.
846
847         * html/HTMLObjectElement.cpp:
848         (WebCore::HTMLObjectElement::parseAttribute):: Simplified the code for typeAttr, turning
849         it into a 1-liner. Changed dataAttr to use updateImageLoaderWithNewURLSoon(). Also made
850         it call setNeedsWidgetUpdate(true) unconditionally after checking carefully to see that's
851         harmless if there is no renderer. Changed classidAttr to call setNeedsWidgetUpdate(true)
852         unconditionally and not set m_classId.
853         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk): Use fastGetAttribute
854         instead of classId and descendantsOfType instead of getElementsByTagName.
855         (WebCore::HTMLObjectElement::hasValidClassId): Use fastGetAttribute instead of classId.
856         (WebCore::HTMLObjectElement::renderFallbackContent): Use imageLoader instead of m_imageLoader.
857
858         * html/HTMLObjectElement.h: Removed classId, since there is no reason to cache that
859         attribute in a data member. Rearranged header, making more private, and fixing some typos,
860         and doing a "using" instead of a function to disambiguate the inherited form functions.
861
862         * html/HTMLPlugInImageElement.cpp:
863         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Initialize m_needsImageReload.
864         (WebCore::HTMLPlugInImageElement::createElementRenderer): Fixed some code that assumed the
865         first child of the shadow root is guaranteed to be an element.
866         (WebCore::HTMLPlugInImageElement::didRecalcStyle): Added. Calls the new
867         scheduleUpdateForAfterStyleResolution function.
868         (WebCore::HTMLPlugInImageElement::didAttachRenderers): Moved all the logic from this
869         function into scheduleUpdateForAfterStyleResolution. Also added a call through to the base
870         class; cleaner even though it's just an assertion.
871         (WebCore::HTMLPlugInImageElement::scheduleUpdateForAfterStyleResolution): Added.
872         Schedules a call to updateAfterStyleResolution when needed.
873         (WebCore::HTMLPlugInImageElement::updateAfterStyleResolution): Added.
874         Combines updateWidgetIfNecessary and startLoadingImage, and also deals with the new
875         m_needsImageReload boolean in cases where no actual loading is done.
876         (WebCore::HTMLPlugInImageElement::removedFrom): Added. Do not delay the load event of
877         document once this element is removed, clears m_needsImageReload.
878         (WebCore::HTMLPlugInImageElement::didMoveToNewDocument): Removed null check on oldDocument,
879         since m_needsDocumentActivationCallbacks can't be true if the old document was null.
880         (WebCore::is100Percent): Added helper to make function below more readable.
881         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Restructured the code a
882         bit. The part that attracted my attention was the local variable of type RenderBox, which
883         was named renderEmbeddedObject. Turns out the caller guarantees to only call this if there
884         is a renderer of type RenderEmbeddedObject, so depend on that.
885         (WebCore::HTMLPlugInImageElement::setNeedsImageReload): Added. When called with true, sets
886         the flag and triggers a style recalculation, and lets updateAfterStyleResolution do the rest.
887         When called with false, reverses the effects and stops delaying the load event.
888
889         * html/HTMLPlugInImageElement.h: Trimmed includes a bit. Made more members private.
890         Marked more function members final. Made a protected imageLoader function so that
891         m_imageLoader can be private. Added new protected function updateImageLoaderWithNewURLSoon,
892         as well as other new private functions. Made m_imageLoader be std::unique_ptr instead of
893         OwnPtr, and added m_needsImageReload.
894
895         * style/StyleResolveTree.cpp:
896         (WebCore::Style::needsPseudoElement): Fixed spelling error in the name of this function.
897         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded): Updated for name change.
898         (WebCore::Style::attachRenderTree): Update for new name of PostResolutionCallbackDisabler.
899         (WebCore::Style::updateBeforeOrAfterPseudoElement): Updated for name change.
900         (WebCore::Style::postResolutionCallbackQueue): Added.
901         (WebCore::Style::queuePostResolutionCallback): Added.
902         (WebCore::Style::suspendMemoryCacheClientCalls): Added. This is a side effect of the original
903         PostAttachCallbackDisabler that is now done in a cleaner way, using the callback queue, instead
904         of as a special case. It should not work for multiple documents across multiple pages instead of
905         only the outermost one.
906         (WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler): Added.
907         Calls suspendMemoryCacheClientCalls, but a FIXME tries to point out why that isn't so great.
908         (WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler): Added.
909         (WebCore::Style::postResolutionCallbacksAreSuspended): Added.
910
911         * style/StyleResolveTree.h: Added queuePostResolutionCallback and
912         postResolutionCallbacksAreSuspended. Also added PostResolutionCallbackDisabler, which should
913         eventually become a private implementation detail.
914
915 2014-03-23  Sam Weinig  <sam@webkit.org>
916
917         Simplify the HTMLConverter interface (Part 1)
918         https://bugs.webkit.org/show_bug.cgi?id=130654
919
920         Reviewed by Dan Bernstein.
921
922         Convert WebHTMLConverter's interface to only use class methods as the first
923         step of simplifying the interface. 
924
925         * editing/ios/EditorIOS.mm:
926         (WebCore::attributedStringForRange):
927         * editing/mac/EditorMac.mm:
928         (WebCore::attributedStringForRange):
929         * platform/mac/HTMLConverter.h:
930         * platform/mac/HTMLConverter.mm:
931         (+[WebHTMLConverter attributedStringFromRange:]):
932
933 2014-03-23  James Craig  <jcraig@apple.com>
934
935         Web Inspector: AXI: add other ARIA one-to-many relationships: owns, flowto, controls.
936         https://bugs.webkit.org/show_bug.cgi?id=130635
937
938         Reviewed by Timothy Hatcher.
939
940         Support for @aria-owns, @aria-controls, and @aria-flowto.
941
942         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
943
944         * inspector/InspectorDOMAgent.cpp:
945         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
946         * inspector/protocol/DOM.json:
947
948 2014-03-23  Simon Fraser  <simon.fraser@apple.com>
949
950         Clean up #includes by geometry classes
951         https://bugs.webkit.org/show_bug.cgi?id=130645
952
953         Reviewed by Andreas Kling.
954
955         Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
956         classes brings in a lot of additional headers. Fix by adding a new
957         GeometryUtilities file so that the basic files don't need Vector,
958         and including GeometryUtilities.h where necessary.
959         
960         Also forward declare PrintStream.h and only bring in the header
961         in implementation files.
962
963         * CMakeLists.txt:
964         * GNUmakefile.list.am:
965         * WebCore.vcxproj/WebCore.vcxproj:
966         * WebCore.vcxproj/WebCore.vcxproj.filters:
967         * WebCore.xcodeproj/project.pbxproj:
968         * css/CSSToStyleMap.h:
969         * html/HTMLCanvasElement.cpp:
970         * platform/cairo/WidgetBackingStoreCairo.h:
971         * platform/graphics/FloatPoint.cpp:
972         * platform/graphics/FloatPoint.h:
973         * platform/graphics/FloatRect.cpp:
974         * platform/graphics/FloatRect.h:
975         * platform/graphics/FloatSize.cpp:
976         * platform/graphics/FloatSize.h:
977         * platform/graphics/GeometryUtilities.cpp: Added.
978         (WebCore::findSlope):
979         (WebCore::findIntersection):
980         (WebCore::unionRect):
981         (WebCore::mapRect):
982         * platform/graphics/GeometryUtilities.h: Copied from Source/WebCore/platform/graphics/TextTrackRepresentation.h.
983         * platform/graphics/IntPoint.h:
984         * platform/graphics/IntRect.cpp:
985         * platform/graphics/IntRect.h:
986         * platform/graphics/IntSize.h:
987         * platform/graphics/TextTrackRepresentation.h:
988         * platform/graphics/Tile.h:
989         * platform/graphics/texmap/coordinated/UpdateAtlas.h:
990         * platform/gtk/WidgetBackingStoreGtkX11.h:
991         * rendering/RenderBoxModelObject.cpp:
992         * rendering/RenderImage.cpp:
993         * rendering/RenderObject.cpp:
994
995 2014-03-23  Simon Fraser  <simon.fraser@apple.com>
996
997         Clean up #includes by geometry classes
998         https://bugs.webkit.org/show_bug.cgi?id=130645
999
1000         Reviewed by Andreas Kling.
1001
1002         Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
1003         classes brings in a lot of additional headers. Fix by adding a new
1004         GeometryUtilities file so that the basic files don't need Vector,
1005         and including GeometryUtilities.h where necessary.
1006         
1007         Also forward declare PrintStream.h and only bring in the header
1008         in implementation files.
1009
1010         * CMakeLists.txt:
1011         * GNUmakefile.list.am:
1012         * WebCore.vcxproj/WebCore.vcxproj:
1013         * WebCore.vcxproj/WebCore.vcxproj.filters:
1014         * WebCore.xcodeproj/project.pbxproj:
1015         * css/CSSToStyleMap.h:
1016         * html/HTMLCanvasElement.cpp:
1017         * platform/cairo/WidgetBackingStoreCairo.h:
1018         * platform/graphics/FloatPoint.cpp:
1019         * platform/graphics/FloatPoint.h:
1020         * platform/graphics/FloatRect.cpp:
1021         * platform/graphics/FloatRect.h:
1022         * platform/graphics/FloatSize.cpp:
1023         * platform/graphics/FloatSize.h:
1024         * platform/graphics/GeometryUtilities.cpp: Added.
1025         (WebCore::findSlope):
1026         (WebCore::findIntersection):
1027         (WebCore::unionRect):
1028         (WebCore::mapRect):
1029         * platform/graphics/GeometryUtilities.h: Copied from Source/WebCore/platform/graphics/TextTrackRepresentation.h.
1030         * platform/graphics/IntPoint.h:
1031         * platform/graphics/IntRect.cpp:
1032         * platform/graphics/IntRect.h:
1033         * platform/graphics/IntSize.h:
1034         * platform/graphics/TextTrackRepresentation.h:
1035         * platform/graphics/Tile.h:
1036         * platform/gtk/WidgetBackingStoreGtkX11.h:
1037         * rendering/RenderBoxModelObject.cpp:
1038         * rendering/RenderImage.cpp:
1039         * rendering/RenderObject.cpp:
1040
1041 2014-03-22  Chang Shu  <cshu@webkit.org>
1042
1043         Replace deprecatedIsCollapsibleWhitespace with RenderStyle::isCollapsibleWhiteSpace in TextIterator.
1044         https://bugs.webkit.org/show_bug.cgi?id=130612.
1045
1046         Reviewed by Darin Adler.
1047
1048         Some layout tests are affected by this change but the new behavior should be correct.
1049
1050         * editing/TextIterator.cpp:
1051         (WebCore::TextIterator::handleTextNode):
1052         (WebCore::TextIterator::handleTextBox):
1053
1054 2014-03-22  Sam Weinig  <sam@webkit.org>
1055
1056         Switch HTMLConverter to use CSSPropertyIDs to refer to CSS properties
1057         https://bugs.webkit.org/show_bug.cgi?id=130639
1058
1059         Reviewed by Darin Adler.
1060
1061         This is a ~15% speedup on PerformanceTests/Interactive/CopyAll.html.
1062
1063         - Removes gratuitous lookup of CSS properties that are known at compile time.
1064         - Removes attempted use of non-supported CSS properties (font-effect and horizontal-align) 
1065           that will alway yield the same results.
1066         - Fix some obvious typos where the author thought they were testing for fontKerning or fontLigatures
1067           but instead used the non-existent font-effect.
1068
1069         * platform/mac/HTMLConverter.mm:
1070         (HTMLConverterCaches::computedStylePropertyForElement):
1071         (HTMLConverterCaches::inlineStylePropertyForElement):
1072         (HTMLConverterCaches::propertyValueForNode):
1073         (-[WebHTMLConverter _stringForNode:property:]):
1074         (HTMLConverterCaches::floatPropertyValueForNode):
1075         (-[WebHTMLConverter _getFloat:forNode:property:]):
1076         (HTMLConverterCaches::isBlockElement):
1077         (HTMLConverterCaches::elementHasOwnBackgroundColor):
1078         (HTMLConverterCaches::colorPropertyValueForNode):
1079         (-[WebHTMLConverter _colorForNode:property:]):
1080         (-[WebHTMLConverter _computedAttributesForElement:]):
1081         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
1082         (-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
1083         (-[WebHTMLConverter _addTableForElement:]):
1084         (-[WebHTMLConverter _addTableCellForElement:]):
1085         (-[WebHTMLConverter _processElement:tag:display:depth:]):
1086         (-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
1087         (-[WebHTMLConverter _processText:]):
1088         (-[WebHTMLConverter _traverseNode:depth:embedded:]):
1089
1090 2014-03-22  Andreas Kling  <akling@apple.com>
1091
1092         Fix debug build.
1093
1094         * bindings/js/JSDOMBinding.h:
1095         (WebCore::createWrapper):
1096
1097 2014-03-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1098
1099         Add *final* keyword to NavigatorContentUtils class
1100         https://bugs.webkit.org/show_bug.cgi?id=130636
1101
1102         Reviewed by Darin Adler.
1103
1104         NavigatorContentUtils won't be used as a base class. So, added final keyword.
1105
1106         No new tests, no behavior changes.
1107
1108         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
1109
1110 2014-03-22  Andreas Kling  <akling@apple.com>
1111
1112         CREATE_DOM_WRAPPER doesn't need the ExecState.
1113         <https://webkit.org/b/130648>
1114
1115         Remove the ExecState parameter from CREATE_DOM_WRAPPER and get all
1116         that we need from the global object instead.
1117
1118         toJS() and toJSNewlyCreated() still take an ExecState, that needs
1119         to be dealt with separately since some of them have scary looking
1120         currentWorld() checks.
1121
1122         Reviewed by Darin Adler.
1123
1124         * bindings/js/JSAudioContextCustom.cpp:
1125         (WebCore::JSAudioContextConstructor::constructJSAudioContext):
1126         * bindings/js/JSBlobCustom.cpp:
1127         (WebCore::toJS):
1128         (WebCore::JSBlobConstructor::constructJSBlob):
1129         * bindings/js/JSCDATASectionCustom.cpp:
1130         (WebCore::toJSNewlyCreated):
1131         * bindings/js/JSCSSRuleCustom.cpp:
1132         (WebCore::toJS):
1133         * bindings/js/JSCSSValueCustom.cpp:
1134         (WebCore::toJS):
1135         * bindings/js/JSCanvasRenderingContextCustom.cpp:
1136         (WebCore::toJS):
1137         * bindings/js/JSDOMBinding.h:
1138         (WebCore::createWrapper):
1139         (WebCore::wrap):
1140         (WebCore::createNewWrapper):
1141         * bindings/js/JSDocumentCustom.cpp:
1142         (WebCore::toJS):
1143         * bindings/js/JSElementCustom.cpp:
1144         (WebCore::toJSNewlyCreated):
1145         * bindings/js/JSEventCustom.cpp:
1146         (WebCore::toJS):
1147         * bindings/js/JSHTMLCollectionCustom.cpp:
1148         (WebCore::toJS):
1149         * bindings/js/JSHTMLTemplateElementCustom.cpp:
1150         (WebCore::JSHTMLTemplateElement::content):
1151         * bindings/js/JSIDBAnyCustom.cpp:
1152         (WebCore::toJS):
1153         * bindings/js/JSImageDataCustom.cpp:
1154         (WebCore::toJS):
1155         * bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
1156         (WebCore::toJS):
1157         * bindings/js/JSNodeCustom.cpp:
1158         (WebCore::createWrapperInline):
1159         * bindings/js/JSPerformanceEntryCustom.cpp:
1160         (WebCore::toJS):
1161         * bindings/js/JSRTCIceCandidateCustom.cpp:
1162         (WebCore::JSRTCIceCandidateConstructor::constructJSRTCIceCandidate):
1163         * bindings/js/JSRTCPeerConnectionCustom.cpp:
1164         (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
1165         * bindings/js/JSRTCSessionDescriptionCustom.cpp:
1166         (WebCore::JSRTCSessionDescriptionConstructor::constructJSRTCSessionDescription):
1167         * bindings/js/JSSVGPathSegCustom.cpp:
1168         (WebCore::toJS):
1169         * bindings/js/JSStyleSheetCustom.cpp:
1170         (WebCore::toJS):
1171         * bindings/js/JSTextCustom.cpp:
1172         (WebCore::toJSNewlyCreated):
1173         * bindings/js/JSTextTrackCueCustom.cpp:
1174         (WebCore::toJS):
1175         * bindings/js/JSTouchCustom.cpp:
1176         (WebCore::toJSNewlyCreated):
1177         * bindings/js/JSTouchListCustom.cpp:
1178         (WebCore::toJSNewlyCreated):
1179         * bindings/js/JSTrackCustom.cpp:
1180         (WebCore::toJS):
1181         * bindings/scripts/CodeGeneratorJS.pm:
1182         (GenerateImplementation):
1183         * dom/make_names.pl:
1184         (printWrapperFunctions):
1185         (printWrapperFactoryCppFile):
1186         (printWrapperFactoryHeaderFile):
1187
1188 2014-03-22  Michael Saboff  <msaboff@apple.com>
1189
1190         toThis() on a JSWorkerGlobalScope should return a JSProxy and not undefined
1191         https://bugs.webkit.org/show_bug.cgi?id=130554
1192
1193         Reviewed by Geoffrey Garen.
1194
1195         Fixed toThis() on WorkerGlobalScope to return a JSProxy instead of the JSGlobalObject.
1196         Added cast from JSProxy->target() if the jsCast<>() to the native object fails
1197         in toJSDedicatedWorkerGlobalScope() and toJSSharedWorkerGlobalScope().
1198         The original cast is needed for access to the local side of the worker, while the JSProxy
1199         cast is used on the remote side of a worker.
1200
1201         Test: fast/workers/worker-strict.html
1202
1203         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1204         (WebCore::toJSDedicatedWorkerGlobalScope):
1205         (WebCore::toJSSharedWorkerGlobalScope):
1206
1207         * bindings/js/WorkerScriptController.cpp:
1208         (WebCore::WorkerScriptController::evaluate): Changed to pass in the JSProxy and not
1209         the WorkerGlobalScope object as the this object to script evaluation.
1210
1211         * workers/DedicatedWorkerGlobalScope.idl:
1212         * workers/SharedWorkerGlobalScope.idl:
1213         * workers/WorkerGlobalScope.idl:
1214         Added the new CustomProxyToJSObject attribute so we'll call to<{nativeClass}>() for
1215         getting the object to use for global evaluation.
1216
1217 2014-03-22  Simon Fraser  <simon.fraser@apple.com>
1218
1219         Some #include hygiene in Node/Element etc
1220         https://bugs.webkit.org/show_bug.cgi?id=130642
1221
1222         Reviewed by Geoffrey Garen.
1223
1224         Clean up various #includes.
1225
1226         * accessibility/AccessibilityObject.h:
1227         * bindings/js/WebCoreTypedArrayController.h:
1228         * dom/Element.h:
1229         * dom/EventListenerMap.h:
1230         * dom/EventTarget.h:
1231         * dom/Node.h:
1232         * rendering/RenderObject.h:
1233         * rendering/svg/RenderSVGRoot.h:
1234
1235 2014-03-22  Simon Fraser  <simon.fraser@apple.com>
1236
1237         FloatRect.h on iOS should not suck in a system header
1238         https://bugs.webkit.org/show_bug.cgi?id=130641
1239
1240         Reviewed by Geoff Garen.
1241
1242         Don't pull in <CoreGraphics/CGGeometry.h> from FloatRect.h.
1243
1244         * platform/graphics/FloatRect.h:
1245
1246 2014-03-22  Dan Bernstein  <mitz@apple.com>
1247
1248         Fixed the iOS build.
1249
1250         Reviewed by Darin Adler.
1251
1252         * page/ios/FrameIOS.mm:
1253         (WebCore::Frame::interpretationsForCurrentRoot):
1254
1255 2014-03-22  Darin Adler  <darin@apple.com>
1256
1257         Remove String::deprecatedCharacters
1258         https://bugs.webkit.org/show_bug.cgi?id=126854
1259
1260         Reviewed by Sam Weinig.
1261
1262         * bindings/scripts/StaticString.pm:
1263         (GenerateStrings): Remove the code to generate the null m_copyData16 pointer.
1264
1265         * editing/TextIterator.cpp:
1266         (WebCore::SearchBuffer::prependContext): Changed to use the new append function in
1267         StringView.h and removed the one defined locally here.
1268
1269         * editing/VisibleUnits.cpp:
1270         (WebCore::wordBreakIteratorForMinOffsetBoundary): Use the new append function
1271         in StringView.h instead of using deprecatedCharacters.
1272         (WebCore::wordBreakIteratorForMaxOffsetBoundary): Ditto.
1273         Removed an append function defined locally here and use the one in StringView.h.
1274
1275         * editing/htmlediting.cpp:
1276         (WebCore::stringWithRebalancedWhitespace): Use StringView::getCharactersWithUpconvert.
1277
1278         * html/parser/HTMLToken.h:
1279         (WebCore::HTMLToken::appendToAttributeValue): Changed to take a StringView instead
1280         of a const String&.
1281
1282         * loader/appcache/ManifestParser.cpp:
1283         (WebCore::parseManifest): Use StringView and StringView::upconvertedCharacters.
1284
1285         * page/EventSource.cpp:
1286         (WebCore::EventSource::didReceiveData): Use the new append overload from StringView.h.
1287         Also added a comment about incorrect use of the decode function.
1288
1289         * page/ios/FrameIOS.mm:
1290         (WebCore::Frame::interpretationsForCurrentRoot): Use the new StringView append function.
1291         Also use simpler new-style for loops.
1292
1293         * platform/LinkHash.cpp:
1294         (WebCore::visitedURLInline): Use the new append function and StringView::substring.
1295         (WebCore::visitedLinkHash): Use upconvertedCharacters for the non-8-bit case.
1296
1297         * platform/URL.cpp:
1298         (WebCore::findFirstOf): Chagned to take a StringView.
1299         (WebCore::containsOnlyASCII): Added. Works on StringView. Could move to a WTF header in
1300         the future if it's needed elsewhere.
1301         (WebCore::protocolIs): Added. Works on StringView. Could put in URL.h if needed elsewhere,
1302         or consider replacing the one that takes const String& with just this one.
1303         (WebCore::appendEncodedHostname): Changed to take a StringView and use
1304         StringView::upconvertedCharacters.
1305         (WebCore::findHostnamesInMailToURL): Changed to take a StringView.
1306         (WebCore::findHostnameInHierarchicalURL): Ditto.
1307         (WebCore::encodeHostnames): Ditto.
1308         (WebCore::encodeRelativeString): Ditto.
1309
1310         * platform/graphics/StringTruncator.cpp:
1311         (WebCore::StringTruncator::width): Use StringView::upconvertedCharacters.
1312
1313         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
1314         (WebCore::HarfBuzzShaper::setFontFeatures): Use indexing directly on the string instead
1315         of on a UChar*.
1316         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Use StringView::upconvertedCharacters.
1317
1318         * platform/text/TextCodecICU.cpp:
1319         (WebCore::TextCodecICU::encode): Use a Vector<UChar> rather than a String to copy and
1320         replace the backslashes with yen signs. Also optimize case where there are no backslashes.
1321
1322         * rendering/RenderListMarker.cpp:
1323         (WebCore::RenderListMarker::paint): Use TextRun::setText(StringView).
1324
1325         * rendering/RenderText.cpp:
1326         (WebCore::maxWordFragmentWidth): Pass a String to RenderBlock::constructTextRun instead of
1327         calling StringBuilder::deprecatedCharacters.
1328
1329         * rendering/RenderText.h: Removed deprecatedCharacters function.
1330
1331         * rendering/line/BreakingContextInlineHeaders.h: Added now-needed header include.
1332
1333         * rendering/svg/SVGInlineTextBox.cpp:
1334         (WebCore::SVGInlineTextBox::constructTextRun): Use StringView version of TextRun constructor.
1335
1336         * rendering/svg/SVGTextMetrics.cpp:
1337         (WebCore::SVGTextMetrics::SVGTextMetrics): Take references instead of pointers.
1338         (WebCore::SVGTextMetrics::constructTextRun): Take references instead of pointers, and don't
1339         take a character pointer any more. Instead, extract the text and use the StringView version of
1340         the TextRun constructor.
1341         (WebCore::SVGTextMetrics::measureCharacterRange): Take references instead of pointers and
1342         update for above changes.
1343         * rendering/svg/SVGTextMetrics.h: Updated for changes above. Also tweaked style a bit.
1344
1345         * rendering/svg/SVGTextMetricsBuilder.cpp:
1346         (WebCore::SVGTextMetricsBuilder::advanceSimpleText): Updated for SVGTextMetrics changes.
1347         (WebCore::SVGTextMetricsBuilder::advanceComplexText): Ditto.
1348         (WebCore::SVGTextMetricsBuilder::initializeMeasurementWithTextRenderer): Ditto.
1349         (WebCore::SVGTextMetricsBuilder::measureTextRenderer): Change code to store a character
1350         for lastCharacter rather than storing a pointer to a character. Stop using TextRun::data16.
1351
1352         * rendering/svg/SVGTextQuery.cpp:
1353         (WebCore::SVGTextQuery::subStringLengthCallback): Updated for SVGTextMetrics changes.
1354         (WebCore::SVGTextQuery::startPositionOfCharacterCallback): Ditto.
1355         (WebCore::SVGTextQuery::endPositionOfCharacterCallback): Ditto.
1356         (WebCore::calculateGlyphBoundaries): Ditto.
1357
1358         * xml/XPathFunctions.cpp:
1359         (WebCore::XPath::atomicSubstring): Added.
1360         (WebCore::XPath::FunId::evaluate): Tweaked a bit to use a new style for loop.
1361         Use the atomicSubstring function to avoid making a temporary String just to make an AtomicString.
1362         That function also uses characters8/16 rather than depreccatedCharacters.
1363
1364         * xml/XPathNodeSet.h: Added begin and end so this collection can be iterated with new style for loop.
1365
1366         * xml/parser/XMLDocumentParserLibxml2.cpp:
1367         (WebCore::XMLDocumentParser::doWrite): Use StringView::upconvertedCharacters.
1368         (WebCore::parseAttributes): Ditto.
1369
1370 2014-03-22  Commit Queue  <commit-queue@webkit.org>
1371
1372         Unreviewed, rolling out r166118.
1373         https://bugs.webkit.org/show_bug.cgi?id=130640
1374
1375         Crashing things (Requested by weinig on #webkit).
1376
1377         Reverted changeset:
1378
1379         "Switch HTMLConverter to use CSSPropertyIDs to refer to CSS
1380         properties"
1381         https://bugs.webkit.org/show_bug.cgi?id=130639
1382         http://trac.webkit.org/changeset/166118
1383
1384 2014-03-22  Sam Weinig  <sam@webkit.org>
1385
1386         Switch HTMLConverter to use CSSPropertyIDs to refer to CSS properties
1387         https://bugs.webkit.org/show_bug.cgi?id=130639
1388
1389         Reviewed by Simon Fraser.
1390
1391         This is a ~15% speedup on PerformanceTests/Interactive/CopyAll.html.
1392
1393         - Removes gratuitous lookup of CSS properties that are known at compile time.
1394         - Removes attempted use of non-supported CSS properties (font-effect and horizontal-align) 
1395           that will alway yield the same results.
1396         - Fix some obvious typos where the author thought they were testing for fontKerning or fontLigatures
1397           but instead used the non-existent font-effect.
1398
1399         * platform/mac/HTMLConverter.mm:
1400         (HTMLConverterCaches::computedStylePropertyForElement):
1401         (HTMLConverterCaches::inlineStylePropertyForElement):
1402         (HTMLConverterCaches::propertyValueForNode):
1403         (-[WebHTMLConverter _stringForNode:property:]):
1404         (HTMLConverterCaches::floatPropertyValueForNode):
1405         (-[WebHTMLConverter _getFloat:forNode:property:]):
1406         (HTMLConverterCaches::isBlockElement):
1407         (HTMLConverterCaches::elementHasOwnBackgroundColor):
1408         (HTMLConverterCaches::colorPropertyValueForNode):
1409         (-[WebHTMLConverter _colorForNode:property:]):
1410         (-[WebHTMLConverter _computedAttributesForElement:]):
1411         (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
1412         (-[WebHTMLConverter _fillInBlock:forElement:backgroundColor:extraMargin:extraPadding:isTable:]):
1413         (-[WebHTMLConverter _addTableForElement:]):
1414         (-[WebHTMLConverter _addTableCellForElement:]):
1415         (-[WebHTMLConverter _processElement:tag:display:depth:]):
1416         (-[WebHTMLConverter _exitElement:tag:display:depth:startIndex:]):
1417         (-[WebHTMLConverter _processText:]):
1418         (-[WebHTMLConverter _traverseNode:depth:embedded:]):
1419
1420 2014-03-21  Simon Fraser  <simon.fraser@apple.com>
1421
1422         Don't flush compositing layers within FrameView::willPaintContents()
1423         https://bugs.webkit.org/show_bug.cgi?id=130627
1424         <rdar://problem/16368869>
1425
1426         Reviewed by Sam Weinig.
1427
1428         Remove the call to flushCompositingStateForThisFrame() here. We should
1429         have always flushed before painting via other mechanisms in WebKit2 and WebKit2.
1430         Flushing during painting is actually harmful, since we could be inside
1431         a CA commit already, and creating or destroying layers via flushing is bad.
1432
1433         * page/FrameView.cpp:
1434         (WebCore::FrameView::willPaintContents):
1435
1436 2014-03-22  Martin Hodovan  <mhodovan@inf.u-szeged.hu>
1437
1438         ASSERTION FAILED: std::isfinite(num) in WebCore::CSSPrimitiveValue::CSSPrimitiveValue
1439         https://bugs.webkit.org/show_bug.cgi?id=127361
1440
1441         Huge numbers represented by the 'INF' value can not be used
1442         in CSS rules, so they make the assert fail. We have to make
1443         sure that the parsed property value is finite, otherwise
1444         the property will be dropped.
1445
1446         Test: fast/css/infinite-floating-value.html
1447
1448         * css/CSSValuePool.cpp:
1449         (WebCore::CSSValuePool::createValue):
1450
1451 2014-03-21  Zalan Bujtas  <zalan@apple.com>
1452
1453         Remove redundant friending from class Image.
1454         https://bugs.webkit.org/show_bug.cgi?id=130628
1455
1456         Reviewed by Simon Fraser.
1457
1458         Those friend classes are subclasses. No need to make them friend of their parent class.
1459
1460         No change in functionality.
1461
1462         * platform/graphics/Image.h:
1463
1464 2014-03-21  Benjamin Poulain  <bpoulain@apple.com>
1465
1466         [iOS][WK2] Reduce the tiling coverage to the current rect and 1 tile size ahead
1467         https://bugs.webkit.org/show_bug.cgi?id=130555
1468
1469         Reviewed by Simon Fraser.
1470
1471         * WebCore.exp.in:
1472         * platform/ScrollView.h:
1473         * platform/graphics/ca/mac/TileController.mm:
1474         (WebCore::TileController::computeTileCoverageRect):
1475         * platform/ios/ScrollViewIOS.mm:
1476         (WebCore::ScrollView::setScrollVelocityInformation):
1477         (WebCore::ScrollView::computeCoverageRect):
1478         * rendering/RenderLayerCompositor.cpp:
1479         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
1480
1481 2014-03-21  Eric Carlson  <eric.carlson@apple.com>
1482
1483         [iOS] clean up fullscreen player controller when exiting fullscreen
1484         https://bugs.webkit.org/show_bug.cgi?id=130621
1485
1486         Reviewed by Jer Noble.
1487
1488         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1489         (-[WebAVVideoLayer setBounds:]): Do nothing if _avPlayerController is nil.
1490         (-[WebAVVideoLayer setVideoLayerGravity:]): Ditto.
1491         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Set m_playerViewController delegate
1492             and player controller to nil.
1493
1494 2014-03-21  Eric Carlson  <eric.carlson@apple.com>
1495
1496         [iOS] remote command callbacks must happen on the WebThread
1497         https://bugs.webkit.org/show_bug.cgi?id=130618
1498
1499         Reviewed by Jer Noble.
1500
1501         * platform/ios/RemoteCommandListenerIOS.h:
1502         (WebCore::RemoteCommandListenerIOS::createWeakPtr):
1503         * platform/ios/RemoteCommandListenerIOS.mm:
1504         (WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS): Dispatch commands to the
1505             main thread before making listener callbacks.
1506
1507 2014-03-21  Zalan Bujtas  <zalan@apple.com>
1508
1509         Subpixel rendering: Make <img> positioning subpixel aware.
1510         https://bugs.webkit.org/show_bug.cgi?id=130596
1511
1512         Reviewed by Simon Fraser.
1513
1514         Change <img> positioning from integral to device pixel. It enables us
1515         to paint hairline borders around <img> properly.
1516         This patch changes the behavior of broken image representation from constant 1 CSS px border
1517         to a dynamic 1 device px.
1518
1519         Test: fast/images/hidpi-image-position-on-device-pixels.html
1520
1521         * WebCore.exp.in:
1522         * platform/graphics/GraphicsContext.cpp:
1523         (WebCore::GraphicsContext::drawImage):
1524         * platform/graphics/GraphicsContext.h:
1525         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1526         (WebCore::GraphicsContext::drawRect):
1527         * platform/graphics/cg/GraphicsContextCG.cpp:
1528         (WebCore::GraphicsContext::drawRect):
1529         * platform/graphics/wince/GraphicsContextWinCE.cpp:
1530         (WebCore::GraphicsContext::drawRect):
1531         * rendering/RenderImage.cpp:
1532         (WebCore::RenderImage::paintReplaced):
1533         (WebCore::RenderImage::paintIntoRect):
1534         * rendering/RenderImage.h:
1535         * rendering/RenderLayer.cpp:
1536         (WebCore::RenderLayer::drawPlatformResizerImage):
1537
1538 2014-03-21  Brent Fulgham  <bfulgham@apple.com>
1539
1540         Merge VTTScanner Code from Blink
1541         https://bugs.webkit.org/show_bug.cgi?id=130616
1542
1543         Reviewed by Eric Carlson.
1544
1545         Merged from Blink (patch by fs@opera.com):
1546         https://chromium.googlesource.com/chromium/blink/+/f1ceb058d574a1174b524c57f67350510a942071
1547         http://crbug.com/75273002
1548         https://chromium.googlesource.com/chromium/blink/+/3e2c67969486e86347b328c72c67cacabfe6f4a1
1549         http://crbug.com/134173002
1550         https://chromium.googlesource.com/chromium/blink/+/5962b7bbb001838f3fc7f24817637528b86bfd9b
1551         http://crbug.com/134153002
1552         https://chromium.googlesource.com/chromium/blink/+/6c81f51438013edca920a19fc6a31026fc562af2
1553         http://crbug.com/137033002
1554         https://chromium.googlesource.com/chromium/blink/+/fa286dca17a291da3ae8be80111e2264de6d5cfd
1555         http://crbug.com/140503004
1556         https://chromium.googlesource.com/chromium/blink/+/8f33b63aabcce7dd21dd15288d45c4eb37c02001
1557         http://crbug.com/139343006
1558         https://chromium.googlesource.com/chromium/blink/+/1872b54b908fac525f1ad9d6f15174b11e27c8af
1559         http://crbug.com/143983002
1560         https://chromium.googlesource.com/chromium/blink/+/e6494b3359e2077bd8772d86ab1fb709acf4c398
1561         http://crbug.com/144893002
1562  
1563         * CMakeLists.txt:
1564         * GNUmakefile.list.am:
1565         * WebCore.vcxproj/WebCore.vcxproj:
1566         * WebCore.vcxproj/WebCore.vcxproj.filters:
1567         * WebCore.xcodeproj/project.pbxproj:
1568         * html/track/ParsingUtilities.h: Added.
1569         (skipExactly):
1570         (skipUntil):
1571         (skipWhile):
1572         * html/track/VTTCue.cpp:
1573         (WebCore::VTTCue::markFutureAndPastNodes):
1574         (WebCore::VTTCue::settingName):
1575         (WebCore::scanPercentage):
1576         (WebCore::VTTCue::setCueSettings):
1577         * html/track/VTTCue.h:
1578         * html/track/VTTRegion.cpp:
1579         (WebCore::VTTRegion::setRegionSettings):
1580         (WebCore::VTTRegion::scanSettingName):
1581         (WebCore::parsedEntireRun):
1582         (WebCore::VTTRegion::parseSettingValue):
1583         * html/track/VTTRegion.h:
1584         * html/track/VTTScanner.cpp: Added.
1585         (WebCore::VTTScanner::VTTScanner):
1586         (WebCore::VTTScanner::scan):
1587         (WebCore::VTTScanner::scanRun):
1588         (WebCore::VTTScanner::skipRun):
1589         (WebCore::VTTScanner::extractString):
1590         (WebCore::VTTScanner::restOfInputAsString):
1591         (WebCore::VTTScanner::scanDigits):
1592         (WebCore::VTTScanner::scanFloat):
1593         * html/track/VTTScanner.h: Added.
1594         (WebCore::VTTScanner::Run::Run):
1595         (WebCore::VTTScanner::Run::start):
1596         (WebCore::VTTScanner::Run::end):
1597         (WebCore::VTTScanner::Run::isEmpty):
1598         (WebCore::VTTScanner::isAt):
1599         (WebCore::VTTScanner::isAtEnd):
1600         (WebCore::VTTScanner::match):
1601         (WebCore::VTTScanner::position):
1602         (WebCore::VTTScanner::end):
1603         (WebCore::VTTScanner::LCharPredicateAdapter):
1604         (WebCore::VTTScanner::Run::length):
1605         (WebCore::VTTScanner::scan):
1606         (WebCore::VTTScanner::skipWhile):
1607         (WebCore::VTTScanner::skipUntil):
1608         (WebCore::VTTScanner::collectWhile):
1609         (WebCore::VTTScanner::collectUntil):
1610         (WebCore::VTTScanner::seekTo):
1611         (WebCore::VTTScanner::currentChar):
1612         (WebCore::VTTScanner::advance):
1613         * html/track/WebVTTParser.cpp:
1614         (WebCore::WebVTTParser::parseFloatPercentageValue):
1615         (WebCore::WebVTTParser::parseFloatPercentageValuePair):
1616         (WebCore::WebVTTParser::collectTimingsAndSettings):
1617         (WebCore::WebVTTParser::collectTimeStamp):
1618         (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
1619         * html/track/WebVTTParser.h:
1620
1621 2014-03-21  Benjamin Poulain  <bpoulain@apple.com>
1622
1623         Pseudo type cleanup part 2: split pseudo elements parsing
1624         https://bugs.webkit.org/show_bug.cgi?id=130370
1625
1626         Reviewed by Andreas Kling.
1627
1628         With this patch, pseudo elements are handled separately. The only thing left in
1629         the old path is compatibility pseudo elements and pseudo classes.
1630
1631         The list of special pseudo elements is now separated and is stored in SelectorPseudoElementTypeMap.in.
1632         The script makeSelectorPseudoElementsMap.py takes that list to make the pseudo elements hash table.
1633
1634         The other pseudo elements are the prefixed ones, they are filtered in CSSSelector::parsePseudoElementType().
1635
1636         All the non-compatibility selectors are removed from SelectorPseudoTypeMap.in. CSSParserSelector::setPseudoTypeValue()
1637         is updated accordingly. The next step will be to clean that part.
1638
1639         * CMakeLists.txt:
1640         * DerivedSources.make:
1641         * GNUmakefile.list.am:
1642         * WebCore.vcxproj/WebCore.vcxproj:
1643         * WebCore.vcxproj/WebCore.vcxproj.filters:
1644         * WebCore.xcodeproj/project.pbxproj:
1645         * css/CSSComputedStyleDeclaration.cpp:
1646         (WebCore::CSSComputedStyleDeclaration::CSSComputedStyleDeclaration):
1647         * css/CSSGrammar.y.in:
1648         * css/CSSParserValues.cpp:
1649         (WebCore::CSSParserSelector::parsePseudoElementSelector):
1650         (WebCore::CSSParserSelector::parsePseudoCueFunctionSelector):
1651         (WebCore::CSSParserSelector::setPseudoTypeValue):
1652         * css/CSSParserValues.h:
1653         * css/CSSSelector.cpp:
1654         (WebCore::CSSSelector::parsePseudoElementType):
1655         * css/CSSSelector.h:
1656         * css/SelectorPseudoElementTypeMap.in: Added.
1657         * css/SelectorPseudoTypeMap.h:
1658         * css/SelectorPseudoTypeMap.in:
1659         * css/html.css:
1660         (q::before):
1661         (q::after):
1662         * css/makeSelectorPseudoElementsMap.py: Added.
1663         (enumerablePseudoType):
1664         (expand_ifdef_condition):
1665         * page/DOMWindow.cpp:
1666         (WebCore::DOMWindow::getMatchedCSSRules):
1667
1668 2014-03-20  Andreas Kling  <akling@apple.com>
1669
1670         Less inclusion of JSCInlines.h.
1671         <https://webkit.org/b/130545>
1672
1673         Stop including JSCInlines.h from JSDOMGlobalObject.h!
1674
1675         Reviewed by Simon Fraser.
1676
1677         * ForwardingHeaders/runtime/IdentifierInlines.h: Added.
1678         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1679         * bindings/js/JSCommandLineAPIHostCustom.cpp:
1680         * bindings/js/JSDOMGlobalObject.h:
1681         * bindings/js/JSDOMStringMapCustom.cpp:
1682         * bindings/js/JSHTMLAllCollectionCustom.cpp:
1683         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp:
1684         * bindings/js/JSLazyEventListener.cpp:
1685         * bindings/js/JSSQLResultSetRowListCustom.cpp:
1686         * bindings/js/JSStorageCustom.cpp:
1687         * bindings/js/ScriptGlobalObject.cpp:
1688         * dom/NodeIterator.cpp:
1689         * dom/TreeWalker.cpp:
1690         * testing/Internals.cpp:
1691         * testing/js/WebCoreTestSupport.cpp:
1692
1693 2014-03-21  Oliver Hunt  <oliver@apple.com>
1694
1695         Fix a crash when assigning an object to document.location
1696         https://bugs.webkit.org/show_bug.cgi?id=130213
1697
1698         Reviewed by Geoffrey Garen.
1699
1700         Convert location to string before we make use the document.
1701         This prevents us from attempting to navigate a frame that
1702         has already been removed.
1703
1704         Test: fast/dom/navigation-with-sideeffects-crash.html
1705
1706         * bindings/js/JSDocumentCustom.cpp:
1707         (WebCore::JSDocument::location):
1708         (WebCore::JSDocument::setLocation):
1709
1710 2014-03-21  Brian Burg  <bburg@apple.com>
1711
1712         Web Replay: replay controller is improperly setting user input bridge state
1713         https://bugs.webkit.org/show_bug.cgi?id=130606
1714
1715         Reviewed by Timothy Hatcher.
1716
1717         The user input bridge was being set based on the old session state,
1718         rather than the new session state.
1719
1720         * replay/ReplayController.cpp:
1721         (WebCore::ReplayController::setSessionState):
1722
1723 2014-03-21  James Craig  <jcraig@apple.com>
1724
1725         Web Inspector: AXI: Expose Accessibility Tree children of the selected node
1726         https://bugs.webkit.org/show_bug.cgi?id=130264
1727
1728         Reviewed by Timothy Hatcher.
1729
1730         Test: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
1731
1732         Expose the accessibility tree children (different from DOM children) of the
1733         current node in the accessibility node inspector.
1734
1735         * inspector/InspectorDOMAgent.cpp: 
1736         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
1737         * inspector/InspectorDOMAgent.h:
1738         * inspector/protocol/DOM.json:
1739
1740 2014-03-21  Alex Christensen  <achristensen@webkit.org>
1741
1742         [Win] Compile fixes with video not enabled.
1743         https://bugs.webkit.org/show_bug.cgi?id=130597
1744
1745         Reviewed by Darin Adler.
1746
1747         * DerivedSources.make:
1748         Only generate UserAgentScripts.h if needed.
1749         * platform/audio/MediaSession.cpp:
1750         * platform/audio/MediaSessionManager.cpp:
1751         Only compile if video is enabled.
1752
1753 2014-03-21  Adenilson Cavalcanti  <cavalcantii@gmail.com>
1754
1755         Optimize FEGaussian blur
1756         https://bugs.webkit.org/show_bug.cgi?id=50881
1757
1758         Reviewed by Dirk Schulze.
1759
1760         Currently boxBlur() will calculate the filter for each channel in
1761         a loop and also uses Uint8ClampedArray::set() to write the
1762         resulting pixels into destination array.
1763
1764         Using Uint8ClampedArray::set() requires lots of unnecessary type
1765         conversions, not to mention other function calls. This patch
1766         updates the original written by Simon Fraser to apply cleanly to current
1767         trunk.
1768
1769         It also implements code to handle EdgeModes and finally avoids use
1770         of ::set() in the newly added boxBlurAlphaOnly()
1771         function. Assignment of calculated pixel values rely on pointers.
1772
1773         No new tests, no change on behavior.
1774
1775         * platform/graphics/filters/FEGaussianBlur.cpp:
1776         (WebCore::boxBlurAlphaOnly): Specialized version for alpha only cases.
1777         (WebCore::boxBlur):
1778
1779 2014-03-21  Simon Fraser  <simon.fraser@apple.com>
1780
1781         unobscuredContentRect() should have the same signature on iOS and other platforms,
1782         and should not recurse on iOS.
1783         https://bugs.webkit.org/show_bug.cgi?id=130604
1784         <rdar://problem/16392587>
1785
1786         Reviewed by Tim Horton and Beth Dakin.
1787
1788         Having different signatures on different platforms is a recipe for
1789         build breakage. Give the iOS unobscuredContentRect() an unused 
1790         VisibleContentRectIncludesScrollbars parameter.
1791         
1792         Also avoid recursion via unobscuredContentRect() calling visibleContentRectInternal().
1793
1794         * WebCore.exp.in:
1795         * platform/ScrollView.cpp:
1796         (WebCore::ScrollView::unobscuredContentRect):
1797         (WebCore::ScrollView::unobscuredContentRectInternal):
1798         (WebCore::ScrollView::visibleContentRectInternal):
1799         * platform/ScrollView.h:
1800         (WebCore::ScrollView::unobscuredContentRectIncludingScrollbars):
1801         * platform/ios/ScrollViewIOS.mm:
1802         (WebCore::ScrollView::unobscuredContentRect):
1803
1804 2014-03-21  Brent Fulgham  <bfulgham@apple.com>
1805
1806         Handle recovery on "timestamp-looking" lines in the WebVTT parser
1807         https://bugs.webkit.org/show_bug.cgi?id=130610
1808
1809         Reviewed by Eric Carlson.
1810
1811         Merged from Blink (patch by fs@opera.com):
1812         https://chromium.googlesource.com/chromium/blink/+/b669a380efbffe25f3b154b026b57b9822ce08e2
1813         http://crbug.com/75273002
1814
1815         Tests: media/track/track-webvtt-tc031-cue-recovery.html
1816                media/track/track-webvtt-tc032-degenerate-cues.html
1817
1818         * html/track/WebVTTParser.cpp:
1819         (WebCore::WebVTTParser::parse):
1820         (WebCore::WebVTTParser::collectCueText):
1821         (WebCore::WebVTTParser::recoverCue):
1822         (WebCore::WebVTTParser::ignoreBadCue):
1823         * html/track/WebVTTParser.h:
1824
1825 2014-03-21  Andreas Kling  <akling@apple.com>
1826
1827         Remove unused RenderView::repaintRectangleInViewAndCompositedLayers().
1828         <https://webkit.org/b/130605>
1829
1830         Reviewed by Antti Koivisto.
1831
1832         * rendering/RenderView.cpp:
1833         * rendering/RenderView.h:
1834
1835 2014-03-21  David Hyatt  <hyatt@apple.com>
1836
1837         Crash in RenderBlock::addChildIgnoringAnonymousColumnBlocks.
1838         https://bugs.webkit.org/show_bug.cgi?id=129948
1839         <rdar://problem/16074072>
1840         
1841         Reviewed by Simon Fraser.
1842
1843         When the marker was placed for multi-column list items, it was being inserted
1844         into the list item itself. Even though the add code in RenderBlock did the right
1845         thing and put the marker inside the multi-column flow thread, the list item code
1846         passed in a beforeChild that was computed using the incorrect parent. This resulted
1847         in the flow thread being used both as the parent of the marker and the sibling of
1848         the marker.
1849         
1850         The fix is to add some code to RenderListItem to make sure it uses the multi-column
1851         flow thread if it exists both as the parent of the marker and as the basis for the
1852         computation of the sibling that the marker should be placed in front of.
1853
1854         Added fast/multicol/multicol-li-crash.html
1855
1856         * rendering/RenderListItem.cpp:
1857         (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
1858
1859 2014-03-20  Andreas Kling  <akling@apple.com>
1860
1861         Stop pulling in JSCInlines.h all over the place.
1862         <https://webkit.org/b/130105>
1863
1864         JSDOMBinding.h is included by everyone and their uncle, so try to
1865         cut down on the amount of JSC *Inlines.h it includes.
1866
1867         Reviewed by Geoff Garen.
1868
1869         * ForwardingHeaders/heap/SlotVisitorInlines.h: Added.
1870         * ForwardingHeaders/runtime/JSCJSValueInlines.h: Added.
1871         * ForwardingHeaders/runtime/JSCellInlines.h: Added.
1872         * ForwardingHeaders/runtime/StructureInlines.h: Added.
1873         * bindings/js/JSDOMBinding.h:
1874
1875 2014-03-21  David Kilzer  <ddkilzer@apple.com>
1876
1877         WindowFeatures.{x|y|width|height} are not initialized
1878         <http://webkit.org/b/130547>
1879         <rdar://problem/16383151>
1880
1881         Reviewed by Darin Adler.
1882
1883         Based on a Blink patch in CRBug 342591 by zhaoqin.
1884
1885         * page/WindowFeatures.cpp:
1886         (WebCore::WindowFeatures::WindowFeatures):
1887         - Initialize x, y, width, height in String constructor.
1888         - Move 'resizeable' variable to short-hand initialization since
1889           it is true in both cases.
1890         - Use String::isEmpty() instead of checking its length.
1891         * page/WindowFeatures.h:
1892         (WebCore::WindowFeatures::WindowFeatures): Initialize x, y,
1893         width, height in no-argument constructor.
1894
1895 2014-03-21  Sergio Villar Senin  <svillar@igalia.com>
1896
1897         Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T> in bridge/
1898         https://bugs.webkit.org/show_bug.cgi?id=130601
1899
1900         Reviewed by Darin Adler.
1901
1902         * bridge/IdentifierRep.cpp:
1903         (WebCore::identifierSet):
1904         (WebCore::intIdentifierMap):
1905         (WebCore::stringIdentifierMap):
1906         * bridge/NP_jsobject.cpp:
1907         (objectMap):
1908         * bridge/runtime_root.cpp:
1909         (JSC::Bindings::rootObjectSet): Return a reference instead of
1910         a pointer.
1911         (JSC::Bindings::findProtectingRootObject):
1912         (JSC::Bindings::findRootObject):
1913         (JSC::Bindings::RootObject::RootObject):
1914         (JSC::Bindings::RootObject::invalidate):
1915
1916 2014-03-21  Michael Saboff  <msaboff@apple.com>
1917
1918         Change CodeGeneratorJS.pm special cases for "DOMWindow" to be general purpose
1919         https://bugs.webkit.org/show_bug.cgi?id=130553
1920
1921         Reviewed by Geoffrey Garen.
1922
1923         Eliminated 'if ($interfaceName eq "DOMWindow") {' sections in CodeGeneratorJS where
1924         it was used to do DOMWindow specific casting to a JSObject, either a JSDOMWindow* or
1925         a JSDOMWindowShell*.  Instead the code generator will use the existing 
1926         JSDOMWindow* toJSDOMWindow(JSValue value) function based on a newly added attribute
1927         "CustomProxyToJSObject".  That attribute will emit a call to the function
1928         ${className}* to${className}(JSValue).
1929
1930         This is being done to clean up the code generator and for a subsequent patch that
1931         will use a similar custom to{className} function for workers,
1932         JSDedicatedWorkerGlobalScope* toJSDedicatedWorkerGlobalScope(JSValue).
1933
1934         Changes covered by existing tests.
1935
1936         * bindings/scripts/CodeGeneratorJS.pm:
1937         (GenerateImplementation):
1938         * bindings/scripts/IDLAttributes.txt:
1939         * page/DOMWindow.idl:
1940
1941 2014-03-21  Krzysztof Czech  <k.czech@samsung.com>
1942
1943         AX: Replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed
1944         https://bugs.webkit.org/show_bug.cgi?id=130594
1945
1946         Reviewed by Chris Fleizach.
1947
1948         Use static NeverDestroyed<T> in new code.
1949
1950         * accessibility/AccessibilityMediaControls.cpp:
1951         (WebCore::AccessibilityMediaControl::controlTypeName):
1952         (WebCore::AccessibilityMediaControl::title):
1953         (WebCore::AccessibilityMediaControlsContainer::elementTypeName):
1954         (WebCore::AccessibilityMediaTimeline::helpText):
1955         (WebCore::AccessibilityMediaTimeDisplay::accessibilityDescription):
1956         * accessibility/AccessibilityObject.cpp:
1957         (WebCore::AccessibilityObject::actionVerb):
1958         * accessibility/AccessibilityRenderObject.cpp:
1959         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
1960         (WebCore::AccessibilityRenderObject::ariaLiveRegionStatus):
1961         (WebCore::AccessibilityRenderObject::ariaLiveRegionRelevant):
1962         (WebCore::AccessibilityRenderObject::actionVerb):
1963         * accessibility/atk/AXObjectCacheAtk.cpp:
1964         (WebCore::notifyChildrenSelectionChange):
1965
1966 2014-03-20  Brent Fulgham  <bfulgham@apple.com>
1967
1968         Merge WebVTT Tokenizer Updates
1969         https://bugs.webkit.org/show_bug.cgi?id=130565
1970
1971         Reviewed by Eric Carlson.
1972
1973         Merged from Blink (patch by fs@opera.com):
1974         https://chromium.googlesource.com/chromium/blink/+/923db263aa65d6efd71c5b55708ad7eea6b23f53
1975         http://crbug.com/73813002
1976         https://chromium.googlesource.com/chromium/blink/+/48375b1d56b2d8850ae93a6c6fb01c69fae82c75
1977         http://crbug.com/77553004
1978         https://chromium.googlesource.com/chromium/blink/+/98d4fc4f5cb716a31d11907120b10538d4ba0f09
1979         http://crbug.com/78833002
1980         https://chromium.googlesource.com/chromium/blink/+/0e53d4f9f140e979b7f32de495551684bc7f4cd2
1981         http://crbug.com/81113003
1982         https://chromium.googlesource.com/chromium/blink/+/730ef1e7f9a1919964f7e74e7ccb2f343e10a148
1983         http://crbug.com/97103002
1984         https://chromium.googlesource.com/chromium/blink/+/c373ee914ffabeaf833939129538251d8f2f4eca
1985         http://crbug.com/98763004
1986         https://chromium.googlesource.com/chromium/blink/+/4ddb4d57948228fa05e49e06bd58a1179c09f212
1987         http://crbug.com/118263002
1988  
1989         * html/track/VTTCue.cpp:
1990         (WebCore::scanPercentage):
1991         (WebCore::VTTCue::setCueSettings):
1992         * html/track/WebVTTParser.cpp:
1993         (WebCore::WebVTTTreeBuilder::buildFromString):
1994         (WebCore::WebVTTTreeBuilder::constructTreeFromToken):
1995         * html/track/WebVTTToken.h:
1996         (WebCore::WebVTTToken::WebVTTToken):
1997         (WebCore::WebVTTToken::StringToken):
1998         (WebCore::WebVTTToken::StartTag):
1999         (WebCore::WebVTTToken::EndTag):
2000         (WebCore::WebVTTToken::TimestampTag):
2001         (WebCore::WebVTTToken::type):
2002         (WebCore::WebVTTToken::name):
2003         (WebCore::WebVTTToken::characters):
2004         (WebCore::WebVTTToken::classes):
2005         (WebCore::WebVTTToken::annotation):
2006         * html/track/WebVTTTokenizer.cpp:
2007         (WebCore::addNewClass):
2008         (WebCore::emitToken):
2009         (WebCore::advanceAndEmitToken):
2010         (WebCore::WebVTTTokenizer::WebVTTTokenizer):
2011         (WebCore::WebVTTTokenizer::nextToken):
2012         * html/track/WebVTTTokenizer.h:
2013         (WebCore::WebVTTTokenizer::shouldSkipNullCharacters):
2014
2015 2014-03-21  Frédéric Wang  <fred.wang@free.fr>
2016
2017         Bug 130345 - Refine childShouldCreateRenderer for MathML elements
2018         https://bugs.webkit.org/show_bug.cgi?id=130345
2019
2020         Reviewed by Chris Fleizach.
2021
2022         This is a follow-up of bug 124128. We add more restrictions on foreign
2023         content of MathML elements.
2024
2025         Tests: mathml/presentation/annotation-children.html
2026                mathml/presentation/foreign-element-in-token.html
2027
2028         * mathml/MathMLElement.cpp:
2029         (WebCore::MathMLElement::isPresentationMathML): fix line wrapping
2030         (WebCore::MathMLElement::isPhrasingContent):
2031         - move the function from MathMLSelectElement.cpp
2032         - add the constraint "is descendant of a map element" for area.
2033         (WebCore::MathMLElement::isFlowContent): new function to test flow content.
2034         (WebCore::MathMLElement::childShouldCreateRenderer):
2035         - remove annotation since it is now tested in MathMLTextElement
2036         - refine testing of annotation-xml
2037         - do not create renderer for text content in MathML. Such content is only allowed inside token elements.
2038         * mathml/MathMLElement.h: Declare isPhrasingContent and isFlowContent.
2039         * mathml/MathMLSelectElement.cpp: Add new function to test MathML/SVG/HTML encodings.
2040         (WebCore::MathMLSelectElement::isMathMLEncoding):
2041         (WebCore::MathMLSelectElement::isSVGEncoding):
2042         (WebCore::MathMLSelectElement::isHTMLEncoding):
2043         (WebCore::MathMLSelectElement::getSelectedSemanticsChild): use the new functions.
2044         * mathml/MathMLSelectElement.h: Declare the new public functions.
2045         * mathml/MathMLTextElement.cpp: remove the isPhrasingContent function.
2046         (WebCore::MathMLTextElement::childShouldCreateRenderer): Just in case, use the generic StyledElement::childShouldCreateRenderer.
2047
2048 2014-03-21  Darin Adler  <darin@apple.com>
2049
2050         Stop using deprecatedCharacters in WebCore/platform/win
2051         https://bugs.webkit.org/show_bug.cgi?id=130515
2052
2053         Reviewed by Brent Fulgham.
2054
2055         * platform/graphics/TextRun.h:
2056         (WebCore::TextRun::TextRun): Add a constructor that takes a StringView.
2057         Later, we might want to exclusively use the StringView version and remove
2058         some of the others.
2059         (WebCore::TextRun::setText): Add a version of this function that takes a StringView.
2060
2061         * platform/graphics/win/FontCacheWin.cpp:
2062         (WebCore::FontCache::systemFallbackForCharacters): Use StringView::getCharactersWithUpconvert.
2063         (WebCore::createGDIFont): Ditto.
2064         (WebCore::FontCache::getTraitsInFamily): Ditto.
2065         * platform/win/BString.cpp:
2066         (WebCore::BString::BString): Use StringView::upconvertedCharacters.
2067         * platform/win/ClipboardUtilitiesWin.cpp:
2068         (WebCore::createGlobalData): Use StringView::getCharactersWithUpconvert.
2069         * platform/win/FileSystemWin.cpp:
2070         (WebCore::pathByAppendingComponent): Use StringBuilder and StringView::getCharactersWithUpconvert.
2071         (WebCore::fileSystemRepresentation): Use StringView::upconvertedCharacters.
2072         * platform/win/PasteboardWin.cpp:
2073         (WebCore::filesystemPathFromUrlOrTitle): Use StringView::getCharactersWithUpconvert.
2074         (WebCore::Pasteboard::writeURLToDataObject): Ditto.
2075         (WebCore::createGlobalImageFileDescriptor): Ditto.
2076
2077         * platform/win/PopupMenuWin.cpp:
2078         (WebCore::PopupMenuWin::calculatePositionAndSize): Use the new TextRun constructor.
2079         * platform/win/WebCoreTextRenderer.cpp:
2080         (WebCore::doDrawTextAtPoint): Ditto.
2081
2082 2014-03-21  Zalan Bujtas  <zalan@apple.com>
2083
2084         Subpixel rendering: RenderBox is positioned off by one when non-compositing transform is present.
2085         https://bugs.webkit.org/show_bug.cgi?id=130430
2086
2087         Reviewed by Simon Fraser.
2088
2089         div {
2090             position: absolute;
2091              top: 10.25px;
2092              left: 10.25px;
2093          }
2094
2095          The <div> with (10.25px, 10.25px) is painted to (10.5px, 10.5px) after device pixel snapping on 2x display.
2096          Moving <div> to its own RenderLayer should not change the painting position.
2097
2098          div {
2099              position: absolute;
2100              top: 10.25px;
2101              left: 10.25px;
2102              -webkit-transform: rotate(0deg);
2103          }
2104
2105         When we paint the RenderLayer's content, the graphics context is translated by the rounded value of
2106         renderer's offset from parent.
2107
2108             (10.25px,10.25px) -> rounded to (10.5px,10.5px).
2109
2110         When the translate moves the graphics context's origin over the renderer's top-left position,
2111         the renderer's relative top-left coordinates end up being negative.
2112
2113             Graphics context translated by (10.5px,10.5px) -> pushes renderer's relative top-left coords to (-0.25px,-0.25px)
2114
2115         When we round (pixel snap) these negative coordinates, half-way values get translated to the wrong direction.
2116
2117         (relative coords (-0.25px,-0.25px) -> pixel snapped to (-0.5px,-0.5px) -> final absolute(painting) coords (10px,10px))
2118
2119         This patch changes the rounding to flooring to ensure that the relative top-left position never gets negative as the result
2120         of subpixel shifting.
2121
2122         Tests: compositing/hidpi-box-positioned-off-by-one-when-non-compositing-transform-is-present.html
2123                fast/layers/hidpi-box-positioned-off-by-one-when-transform-is-present.html
2124
2125         * css/CSSComputedStyleDeclaration.cpp:
2126         (WebCore::computedTransform):
2127         * rendering/RenderLayer.cpp:
2128         (WebCore::RenderLayer::updateTransform):
2129         (WebCore::RenderLayer::currentTransform):
2130         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2131         * rendering/RenderLayerBacking.cpp:
2132         (WebCore::RenderLayerBacking::updateTransform):
2133         * rendering/style/RenderStyle.cpp:
2134         * rendering/style/RenderStyle.h:
2135         * svg/SVGTextElement.cpp:
2136         (WebCore::SVGTextElement::animatedLocalTransform):
2137
2138 2014-03-21  Pratik Solanki  <psolanki@apple.com>
2139
2140         Unreviewed. iOS build fix after r166046.
2141
2142         * WebCore.exp.in:
2143
2144 2014-03-21  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
2145
2146         Fix the !ENABLE(FILTERS) build
2147         https://bugs.webkit.org/show_bug.cgi?id=130394
2148
2149         Reviewed by Gyuyoung Kim.
2150
2151         Add missing includes in rendering to fix compile errors, and include JSC headers to ImageBuffer.h to fix linker errors.
2152
2153         * platform/graphics/ImageBuffer.h:
2154         * rendering/svg/RenderSVGImage.cpp:
2155         * rendering/svg/RenderSVGRoot.cpp:
2156
2157 2014-03-21  Commit Queue  <commit-queue@webkit.org>
2158
2159         Unreviewed, rolling out r166052.
2160         https://bugs.webkit.org/show_bug.cgi?id=130571
2161
2162         It broke EFL build (Requested by KaL on #webkit).
2163
2164         Reverted changeset:
2165
2166         "[GTK] Use GMainLoopSource for idle and timeout sources in
2167         WebCore"
2168         https://bugs.webkit.org/show_bug.cgi?id=130078
2169         http://trac.webkit.org/changeset/166052
2170
2171 2014-03-21  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2172
2173         Add *explicit* keyword to avoid implicit type conversion
2174         https://bugs.webkit.org/show_bug.cgi?id=130568
2175
2176         Reviewed by Antti Koivisto.
2177
2178         Constructors of RemoteFontFaceSource, SVGDocumentExtensions, XMLDocumentParserScope,
2179         and WorkerScriptDebugServer need to use *explicit* keyword because they have an argument.
2180         Besides removed a meaningless argument name.
2181
2182         * svg/SVGDocumentExtensions.h:
2183         * xml/parser/XMLDocumentParserScope.h:
2184
2185 2014-03-20  Sergio Villar Senin  <svillar@igalia.com>
2186
2187         Modules: replace DEPRECATED_DEFINE_STATIC_LOCAL by static NeverDestroyed<T>
2188         https://bugs.webkit.org/show_bug.cgi?id=130407
2189
2190         Reviewed by Darin Adler.
2191
2192         * Modules/encryptedmedia/CDM.cpp:
2193         (WebCore::installedCDMFactories):
2194         * Modules/mediasource/MediaSourceRegistry.cpp:
2195         (WebCore::MediaSourceRegistry::registry):
2196         * Modules/mediasource/MediaSourceRegistry.h:
2197         * Modules/mediastream/MediaStreamRegistry.cpp:
2198         (WebCore::MediaStreamRegistry::registry):
2199
2200 2014-03-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2201
2202         [GTK] Use GMainLoopSource for idle and timeout sources in WebCore
2203         https://bugs.webkit.org/show_bug.cgi?id=130078
2204
2205         Reviewed by Philippe Normand.
2206
2207         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
2208         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
2209         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
2210         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2211         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2212         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2213         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2214         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2215         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
2216         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
2217         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
2218         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2219         * platform/gtk/GtkDragAndDropHelper.cpp:
2220         * platform/gtk/SharedTimerGtk.cpp:
2221
2222 2014-03-21  Andreas Kling  <akling@apple.com>
2223
2224         HTMLFrameOwnerElement should obey the SubframeLoadingDisabler when creating subframes
2225         <rdar://problem/15675780>
2226
2227         Merge Blink r156744 by Adam Klein.
2228
2229         Test: fast/frames/set-iframe-src-in-pagehide-crash.html
2230
2231         * loader/SubframeLoader.cpp:
2232         (WebCore::SubframeLoader::loadSubframe):
2233
2234 2014-03-21  Darin Adler  <darin@apple.com>
2235
2236         Improve idiom used for string building in a few places
2237         https://bugs.webkit.org/show_bug.cgi?id=130561
2238
2239         Reviewed by Andreas Kling.
2240
2241         * Modules/indexeddb/IDBKeyData.cpp:
2242         (WebCore::IDBKeyData::loggingString): Use a StringBuilder, and get rid of
2243         an an unnecessary additional string allocation.
2244
2245         * Modules/websockets/ThreadableWebSocketChannel.cpp:
2246         (WebCore::ThreadableWebSocketChannel::create): Use StringBuilder.
2247
2248         * html/FTPDirectoryDocument.cpp:
2249         (WebCore::FTPDirectoryDocumentParser::createTDForFilename): Do a more efficient
2250         string concatenation.
2251         * html/ValidationMessage.cpp:
2252         (WebCore::ValidationMessage::updateValidationMessage): Ditto.
2253
2254         * inspector/InspectorApplicationCacheAgent.cpp:
2255         (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCacheResource):
2256         Use a StringBuilder.
2257
2258         * inspector/InspectorStyleSheet.cpp: 
2259         (WebCore::InspectorStyle::shorthandValue): Use a StringBuilder.
2260
2261         * inspector/InspectorStyleTextEditor.cpp:
2262         (WebCore::InspectorStyleTextEditor::insertProperty): Use a more efficient idiom
2263         for string concatenation.
2264         (WebCore::InspectorStyleTextEditor::internalReplaceProperty): Ditto.
2265         * loader/FormSubmission.cpp:
2266         (WebCore::appendMailtoPostFormDataToURL): Ditto.
2267
2268         * page/Frame.cpp:
2269         (WebCore::createRegExpForLabels): Use a StringBuilder.
2270
2271         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2272         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Use a more efficient
2273         idiom for string concatenation.
2274
2275         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2276         (WebCore::GraphicsContext3D::getUnmangledInfoLog): Use a StringBuilder.
2277
2278         * platform/network/MIMEHeader.cpp:
2279         (WebCore::MIMEHeader::parseHeader): Use a more efficient idiom for string
2280         concatenation.
2281         * platform/network/ResourceResponseBase.cpp:
2282         (WebCore::ResourceResponseBase::addHTTPHeaderField): Ditto.
2283         * rendering/RenderLayerCompositor.cpp:
2284         (WebCore::RenderLayerCompositor::layerTreeAsText): Ditto.
2285
2286         * rendering/RenderText.cpp:
2287         (WebCore::RenderText::secureText): Create a new string with the substring
2288         function rather than with the append function.
2289
2290         * xml/XMLHttpRequest.cpp:
2291         (WebCore::XMLHttpRequest::setRequestHeaderInternal): Use a more efficient idiom
2292         for string concatenation.
2293
2294 2014-03-21  Darin Adler  <darin@apple.com>
2295
2296         Add a combined decodeAndFlush to TextResourceDecoder
2297         https://bugs.webkit.org/show_bug.cgi?id=130560
2298
2299         Reviewed by Andreas Kling.
2300
2301         * WebCore.exp.in: Added new symbol for decodeAndFlush. Also re-did
2302         the geometry types #if so it would sort more logically.
2303
2304         * fileapi/FileReaderLoader.cpp:
2305         (WebCore::FileReaderLoader::convertToText): Use decodeAndFlush.
2306         * inspector/InspectorPageAgent.cpp:
2307         (WebCore::InspectorPageAgent::cachedResourceContent): Ditto.
2308         * inspector/NetworkResourcesData.cpp:
2309         (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent): Ditto.
2310
2311         * loader/TextResourceDecoder.cpp:
2312         (WebCore::TextResourceDecoder::decodeAndFlush): Added.
2313         * loader/TextResourceDecoder.h: Ditto.
2314
2315         * loader/appcache/ManifestParser.cpp:
2316         (WebCore::parseManifest): Use decodeAndFlush.
2317         * loader/cache/CachedCSSStyleSheet.cpp:
2318         (WebCore::CachedCSSStyleSheet::sheetText): Ditto.
2319         (WebCore::CachedCSSStyleSheet::finishLoading): Ditto.
2320
2321         * loader/cache/CachedFont.cpp:
2322         (WebCore::CachedFont::ensureSVGFontData): Use decodeAndFlush. Also use nullptr.
2323         (WebCore::CachedFont::getSVGFontById): Use descendantsOfType<SVGFontElement>
2324         instead of using a NodeList. Much more efficient!
2325
2326         * loader/cache/CachedSVGDocument.cpp:
2327         (WebCore::CachedSVGDocument::finishLoading): Use decodeAndFlush.
2328         * loader/cache/CachedScript.cpp:
2329         (WebCore::CachedScript::script): Ditto.
2330         * loader/cache/CachedXSLStyleSheet.cpp:
2331         (WebCore::CachedXSLStyleSheet::finishLoading): Ditto.
2332         * page/Page.cpp:
2333         (WebCore::Page::userStyleSheet): Ditto.
2334
2335 2014-03-20  Darin Adler  <darin@apple.com>
2336
2337         Remove a couple of unused functions from CSSOMUtils
2338         https://bugs.webkit.org/show_bug.cgi?id=130558
2339
2340         Reviewed by Andreas Kling.
2341
2342         * css/CSSOMUtils.cpp: Remove String overloads. Callers all use the StringBuilder
2343         ones, which is good since that is a more efficient idiom.
2344         * css/CSSOMUtils.h: Ditto.
2345
2346 2014-03-20  Pratik Solanki  <psolanki@apple.com>
2347
2348         Unreviewed. iOS build fix after r166017, r166032.
2349
2350         * platform/ScrollView.cpp:
2351         (WebCore::ScrollView::visibleContentRectInternal):
2352
2353 2014-03-20  Hyowon Kim  <hw1008.kim@samsung.com>
2354
2355         Move to using std::unique_ptr for EFL objects.
2356         https://bugs.webkit.org/show_bug.cgi?id=129853
2357
2358         Reviewed by Gyuyoung Kim.
2359
2360         EflUniquePtr is a template alias of std::unique_ptr
2361         with a custom deleter for each Efl Objects, which is motivated by GUniquePtr.
2362         This patch replaces uses of OwnPtr and PassOwnPtr for Efl objects with EflUniquePtr.
2363
2364         No new tests. No new functionality.
2365
2366         * platform/efl/EflScreenUtilities.h:
2367         * platform/efl/RenderThemeEfl.cpp:
2368         (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
2369         (WebCore::RenderThemeEfl::loadTheme):
2370         * platform/efl/RenderThemeEfl.h:
2371         * platform/graphics/Icon.h:
2372         * platform/graphics/efl/EvasGLContext.h:
2373         (WebCore::EvasGLContext::create):
2374         * platform/graphics/efl/EvasGLSurface.h:
2375         (WebCore::EvasGLSurface::create):
2376
2377 2014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2378
2379         [EFL][GTK] Get CMake to find Freetype2 properly
2380         https://bugs.webkit.org/show_bug.cgi?id=130150
2381
2382         Reviewed by Martin Robinson.
2383
2384         Newer versions of CMake are not able to find Freetype2 correctly.
2385         FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
2386         freetype2 repo, because a completely different version number is found in freetype2.pc.
2387
2388         * PlatformEfl.cmake:
2389         * PlatformGTK.cmake:
2390
2391 2014-03-20  Martin Robinson  <mrobinson@igalia.com>
2392
2393         [GTK] Suppress errors about using gdk_threads_enter gdk_threads_leave
2394         https://bugs.webkit.org/show_bug.cgi?id=130517
2395
2396         Reviewed by Sergio Villar Senin.
2397
2398         * plugins/gtk/gtk2xtbin.c: Use GCC suppression to suppress errors about deprecations.
2399
2400 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
2401
2402         Cleanup in aisle r166017.
2403         
2404         visibleContentRectInternal() was dropping the scrollbar
2405         inclusiveness on the floor, and we need to reset the top inset
2406         between tests.
2407
2408         * platform/ScrollView.cpp:
2409         (WebCore::ScrollView::visibleContentRectInternal):
2410         * testing/Internals.cpp:
2411         (WebCore::Internals::resetToConsistentState):
2412
2413 2014-03-20  Enrica Casucci  <enrica@apple.com>
2414
2415         Build fix.
2416
2417         Removing unused variable.
2418         
2419         * page/FrameView.cpp:
2420         (WebCore::FrameView::didPaintContents):
2421
2422 2014-03-20  Brent Fulgham  <bfulgham@apple.com>
2423
2424         Rename TextTrackRegion/TextTrackRegionList to VTTRegion/VTTRegionList
2425         https://bugs.webkit.org/show_bug.cgi?id=130543
2426
2427         Reviewed by Dean Jackson.
2428
2429         Merged from Blink (patch by philipj@opera.com):
2430         https://chromium.googlesource.com/chromium/blink/+/69ee6d3399d64163e4936ac1bde222036c54c4b8
2431         http://crbug.com/55653003
2432
2433         Tests: media/track/regions-webvtt/vtt-region-constructor.html
2434                media/track/regions-webvtt/vtt-region-display.html
2435                media/track/regions-webvtt/vtt-region-dom-layout.html
2436                media/track/regions-webvtt/vtt-region-list.html
2437                media/track/regions-webvtt/vtt-region-parser.html
2438
2439         * Configurations/FeatureDefines.xcconfig:
2440         * DerivedSources.make:
2441         * WebCore.xcodeproj/project.pbxproj:
2442         * html/shadow/MediaControlElements.cpp:
2443         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
2444         * html/track/LoadableTextTrack.cpp:
2445         (WebCore::LoadableTextTrack::newRegionsAvailable):
2446         * html/track/TextTrack.cpp:
2447         (WebCore::TextTrack::ensureVTTRegionList):
2448         (WebCore::TextTrack::regions):
2449         (WebCore::TextTrack::addRegion):
2450         (WebCore::TextTrack::removeRegion):
2451         * html/track/TextTrack.h:
2452         * html/track/TextTrack.idl:
2453         * html/track/TextTrackCue.cpp:
2454         * html/track/TextTrackRegion.cpp: Removed.
2455         * html/track/TextTrackRegion.h: Removed.
2456         * html/track/TextTrackRegion.idl: Removed.
2457         * html/track/TextTrackRegionList.cpp: Removed.
2458         * html/track/TextTrackRegionList.h: Removed.
2459         * html/track/TextTrackRegionList.idl: Removed.
2460         * html/track/VTTCue.cpp:
2461         (WebCore::VTTCue::removeDisplayTree):
2462         * html/track/VTTRegion.cpp: Copied from Source/WebCore/html/track/TextTrackRegion.cpp.
2463         (WebCore::VTTRegion::VTTRegion):
2464         (WebCore::VTTRegion::~VTTRegion):
2465         (WebCore::VTTRegion::setTrack):
2466         (WebCore::VTTRegion::setId):
2467         (WebCore::VTTRegion::setWidth):
2468         (WebCore::VTTRegion::setHeight):
2469         (WebCore::VTTRegion::setRegionAnchorX):
2470         (WebCore::VTTRegion::setRegionAnchorY):
2471         (WebCore::VTTRegion::setViewportAnchorX):
2472         (WebCore::VTTRegion::setViewportAnchorY):
2473         (WebCore::VTTRegion::scroll):
2474         (WebCore::VTTRegion::setScroll):
2475         (WebCore::VTTRegion::updateParametersFromRegion):
2476         (WebCore::VTTRegion::setRegionSettings):
2477         (WebCore::VTTRegion::getSettingFromString):
2478         (WebCore::VTTRegion::parseSettingValue):
2479         (WebCore::VTTRegion::parseSetting):
2480         (WebCore::VTTRegion::textTrackCueContainerScrollingClass):
2481         (WebCore::VTTRegion::textTrackCueContainerShadowPseudoId):
2482         (WebCore::VTTRegion::textTrackRegionShadowPseudoId):
2483         (WebCore::VTTRegion::appendTextTrackCueBox):
2484         (WebCore::VTTRegion::displayLastTextTrackCueBox):
2485         (WebCore::VTTRegion::willRemoveTextTrackCueBox):
2486         (WebCore::VTTRegion::getDisplayTree):
2487         (WebCore::VTTRegion::prepareRegionDisplayTree):
2488         (WebCore::VTTRegion::startTimer):
2489         (WebCore::VTTRegion::stopTimer):
2490         (WebCore::VTTRegion::scrollTimerFired):
2491         * html/track/VTTRegion.h: Copied from Source/WebCore/html/track/TextTrackRegion.h.
2492         (WebCore::VTTRegion::create):
2493         * html/track/VTTRegion.idl: Copied from Source/WebCore/html/track/TextTrackRegion.idl.
2494         * html/track/VTTRegionList.cpp: Copied from Source/WebCore/html/track/TextTrackRegionList.cpp.
2495         (WebCore::VTTRegionList::VTTRegionList):
2496         (WebCore::VTTRegionList::length):
2497         (WebCore::VTTRegionList::item):
2498         (WebCore::VTTRegionList::getRegionById):
2499         (WebCore::VTTRegionList::add):
2500         (WebCore::VTTRegionList::remove):
2501         (WebCore::VTTRegionList::clear):
2502         * html/track/VTTRegionList.h: Copied from Source/WebCore/html/track/TextTrackRegionList.h.
2503         (WebCore::VTTRegionList::create):
2504         (WebCore::VTTRegionList::~VTTRegionList):
2505         * html/track/VTTRegionList.idl: Copied from Source/WebCore/html/track/TextTrackRegionList.idl.
2506         * html/track/WebVTTParser.cpp:
2507         (WebCore::WebVTTParser::parseFloatPercentageValue):
2508         (WebCore::WebVTTParser::getNewRegions):
2509         (WebCore::WebVTTParser::createNewRegion):
2510         * html/track/WebVTTParser.h:
2511         * loader/TextTrackLoader.cpp:
2512         (WebCore::TextTrackLoader::getNewRegions):
2513         * loader/TextTrackLoader.h:
2514
2515 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
2516
2517         Fix the iOS build.
2518
2519         * page/FrameView.cpp:
2520         (WebCore::FrameView::willPaintContents):
2521         (WebCore::FrameView::didPaintContents):
2522
2523 2014-03-20  Hans Muller  <hmuller@adobe.com>
2524
2525         [CSS Shapes] clamp RasterShape shapeMargin to reference box size
2526         https://bugs.webkit.org/show_bug.cgi?id=130350
2527
2528         Reviewed by Dean Jackson.
2529
2530         Corrected the way the maximum shape-margin value was computed for image valued
2531         shapes. The limiting case is an image with just one above threshold pixel. The
2532         largest possible value for shapeMargin is the radius of a circle that encloses
2533         the size of the shape-outside element's margin-box, since the shape-outside's
2534         boundary is clipped to the margin-box. The radius is just sqrt(2) * the margin-box's
2535         largest dimension.
2536
2537         Also cleaned up up a few poorly named parameters.
2538
2539         Test: fast/shapes/shape-outside-floats/shape-outside-one-pixel.html
2540
2541         * rendering/shapes/RasterShape.cpp:
2542         (WebCore::RasterShape::marginIntervals):
2543         * rendering/shapes/RasterShape.h:
2544         (WebCore::RasterShape::RasterShape):
2545         * rendering/shapes/Shape.h:
2546
2547 2014-03-20  Beth Dakin  <bdakin@apple.com>
2548
2549         Build fix.
2550
2551         * page/FrameView.cpp:
2552         (WebCore::FrameView::paintContents):
2553
2554 2014-03-20  Beth Dakin  <bdakin@apple.com>
2555
2556         Implement contentInset for Mac WebKit2
2557         https://bugs.webkit.org/show_bug.cgi?id=130273
2558
2559         Reviewed by Simon Fraser.
2560
2561         This patch adds support for topContentInset(). If a page has a topContentInset(), 
2562         the root layer’s position is adjusted to account for the inset. It is assumed that 
2563         the area accounted for by the inset is visible but obscured, so scrollbars need to 
2564         be moved so that they only cover the non-obscured area, and most parts of WebCore 
2565         that wonder about visibleContentSize only care about the unobscured area, so this 
2566         patch makes that visibleContentRect return the unobscuredRect. Finally since this 
2567         is achieved by moving a layer’s position, the topContentInset() also needs to be 
2568         factored into various functions that are used to convert between coordinate 
2569         spaces. 
2570
2571         Return Page::topContentInset() if this is the main frame.
2572         * page/FrameView.cpp:
2573         (WebCore::FrameView::topContentInset):
2574         * page/FrameView.h:
2575
2576         Cache the inset on Page.
2577         * page/Page.cpp:
2578         (WebCore::Page::Page):
2579         * page/Page.h:
2580         (WebCore::Page::topContentInset):
2581         (WebCore::Page::setTopContentInset):
2582
2583         unobscuredContentRect() used to unconditionally return visibleContentRect() on 
2584         non-iOS platforms. Now that it is possible for some technically visible content to 
2585         be obscured, this code needed to be re-worked a bit to make some more sense. 
2586         visibleContentRect() now represents that visible content that is completely 
2587         unobscured, so it should call into unobscuredContentRect() rather than the other 
2588         way around.
2589         * platform/ScrollView.cpp:
2590         (WebCore::ScrollView::unobscuredContentRect):
2591
2592         unscaledTotalVisibleContentSize() includes the size of all content that might be 
2593         visible. Some of this content might be obscured.
2594         (WebCore::ScrollView::unscaledTotalVisibleContentSize):
2595
2596         Most of the time, we only care about the content that is FULLY visible. That is 
2597         what you get from unscaledUnobscuredVisibleContentSize().
2598         (WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):
2599
2600         Use the unobscured size for these computations.
2601         (WebCore::ScrollView::visibleContentRectInternal):
2602         (WebCore::ScrollView::layoutSize):
2603
2604         Factor in the topContentInset().
2605         (WebCore::ScrollView::scrollOffsetRelativeToDocument):
2606         (WebCore::ScrollView::scrollPositionRelativeToDocument):
2607
2608         The scrollbars should be positioned to cover the non-obscured content only. 
2609         (WebCore::ScrollView::updateScrollbars):
2610
2611         Again, factor the topContentInset() into these conversions since the root layer’s 
2612         position has been adjusted to account for it.
2613         (WebCore::ScrollView::contentsToRootView):
2614         (WebCore::ScrollView::contentsToWindow):
2615
2616          Just like the scrollbars, the scroll corner must be moved the account for the 
2617         inset.
2618         (WebCore::ScrollView::scrollCornerRect):
2619         * platform/ScrollView.h:
2620         (WebCore::ScrollView::topContentInset):
2621
2622         RenderLayerCompositor cares about unscaledTotalVisibleContentSize(). It does not 
2623         care if some of that content is obscured.
2624         * rendering/RenderLayerCompositor.cpp:
2625         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
2626
2627         Move the root layer’s position based on the contentInset.
2628         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
2629         (WebCore::RenderLayerCompositor::ensureRootLayer):
2630
2631         Allow setting contentInset via Internals for testing purposes.
2632         * testing/Internals.cpp:
2633         (WebCore::Internals::setTopContentInset):
2634         * testing/Internals.h:
2635         * testing/Internals.idl:
2636
2637 2014-03-20  Laszlo Vidacs  <lvidacs.u-szeged@partner.samsung.com>
2638
2639         Optimize RenderTable::colToEffCol() for tables without colspans
2640         https://bugs.webkit.org/show_bug.cgi?id=129298
2641
2642         Reviewed by Simon Fraser.
2643
2644         Create an alternative fast path to RenderTable colToEffCol() and effColToCol()
2645         when there is no colspan or colspan does not exceed the width of table.
2646         Blink merge https://codereview.chromium.org/154243002 by rhogan
2647
2648         * rendering/RenderTable.cpp:
2649         (WebCore::RenderTable::RenderTable):
2650         (WebCore::RenderTable::appendColumn):
2651         (WebCore::RenderTable::recalcSections):
2652         * rendering/RenderTable.h:
2653         (WebCore::RenderTable::colToEffCol):
2654         (WebCore::RenderTable::effColToCol):
2655         (WebCore::RenderTable::hasCellColspanThatDeterminesTableWidth):
2656
2657 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
2658
2659         FrameView::paintContents() is not called for composited content
2660         https://bugs.webkit.org/show_bug.cgi?id=130541
2661
2662         Reviewed by Beth Dakin.
2663
2664         FrameView::paintContents() is not called for frames that have
2665         composited contents, yet it contains code that is expected
2666         to run for all Frames.
2667         
2668         Fix by factoring into will/didPaintContents(), and calling
2669         the will/did functions from RenderLayerBacking::paintIntoLayer().
2670         
2671         Also add a SetLayoutNeededForbiddenScope check for composited-layer
2672         painting.
2673
2674         * page/FrameView.cpp:
2675         (WebCore::FrameView::updateControlTints):
2676         (WebCore::FrameView::willPaintContents):
2677         (WebCore::FrameView::didPaintContents):
2678         (WebCore::FrameView::paintContents):
2679         * page/FrameView.h:
2680         * rendering/RenderLayerBacking.cpp:
2681         (WebCore::RenderLayerBacking::paintIntoLayer):
2682
2683 2014-03-20  Tim Horton  <timothy_horton@apple.com>
2684
2685         Fix the Mountain Lion build.
2686
2687         * platform/graphics/cocoa/IOSurface.mm:
2688         (IOSurface::setIsPurgeable):
2689
2690 2014-03-20  Brian Burg  <bburg@apple.com>
2691
2692         Web Replay: capture and replay mouse events
2693         https://bugs.webkit.org/show_bug.cgi?id=129395
2694
2695         Reviewed by Joseph Pecoraro.
2696
2697         Add support for capturing and replaying mouse inputs that come from WebKit2.
2698         Hook up the UserInputBridge to session state changes in the ReplayController so
2699         that the bridge knows when to capture or deny mouse inputs.
2700
2701         Test: ManualTests/inspector/replay-mouse-events.html
2702
2703         * platform/PlatformEvent.h: Give explicit storage types to Modifiers and Type enums
2704         so they can be forward-declared.
2705         * platform/PlatformMouseEvent.h: Give an explicit storage type to enum MouseButton.
2706         Add operator== and operator!= for MouseButton to work around an MSVC bug.
2707
2708         * replay/ReplayController.cpp: Perform session state changes in a helper function, and
2709         at the same time change the state of the page's user input bridge.
2710         (WebCore::ReplayController::setSessionState):
2711         (WebCore::ReplayController::startCapturing):
2712         (WebCore::ReplayController::stopCapturing):
2713         (WebCore::ReplayController::startPlayback):
2714         (WebCore::ReplayController::cancelPlayback):
2715
2716         * replay/ReplayInputDispatchMethods.cpp: Add dispatch methods for new inputs.
2717         (WebCore::HandleMouseMove::dispatch):
2718         (WebCore::HandleMousePress::dispatch):
2719         (WebCore::HandleMouseRelease::dispatch):
2720
2721         * replay/SerializationMethods.cpp: Add helper macros so that encode/decode methods look
2722         symmetric with one data member per line. This helps reduce unintentional inconsistencies.
2723         (JSC::EncodingTraits<PlatformMouseEvent>::encodeValue): Added.
2724         (JSC::EncodingTraits<PlatformMouseEvent>::decodeValue): Added.
2725         * replay/SerializationMethods.h:
2726
2727         * replay/UserInputBridge.cpp: Fill in the bridge method implementations for mouse
2728         events, adding helpers and macros as necessary to reduce boilerplate.
2729         (WebCore::UserInputBridge::activeCursor): Added.
2730         (WebCore::UserInputBridge::handleMousePressEvent):
2731         (WebCore::UserInputBridge::handleMouseReleaseEvent):
2732         (WebCore::UserInputBridge::handleMouseMoveEvent):
2733         (WebCore::UserInputBridge::handleMouseMoveOnScrollbarEvent):
2734
2735         * replay/UserInputBridge.h: Add a bridge state enum along with getters and setters.
2736         The enum value controls whether the bridge should capture commands, deny non-synthetic
2737         commands (from the user), or allow anything to pass (the default).
2738         (WebCore::UserInputBridge::setState): Added.
2739         (WebCore::UserInputBridge::state): Added.
2740
2741         * replay/WebInputs.json: Add inputs HandleMouseMove, HandleMousePress, HandleMouseRelease.
2742         Add enum definitions for PlatformEvent::Type, PlatformEvent::Modifiers, and PlatformMouseEvent::MouseButton.
2743         Alphabetize the existing data type definitions.
2744
2745 2014-03-20  Tim Horton  <timothy_horton@apple.com>
2746
2747         Add WebCore::IOSurface wrapper
2748         https://bugs.webkit.org/show_bug.cgi?id=130529
2749
2750         Reviewed by Simon Fraser.
2751
2752         * WebCore.exp.in:
2753         * WebCore.xcodeproj/project.pbxproj:
2754         * platform/graphics/cg/ColorCG.cpp:
2755         * platform/graphics/cg/GraphicsContextCG.h:
2756         (WebCore::cachedCGColorSpace):
2757         Move cachedCGColorSpace out so that other clients of GraphicsContextCG
2758         can use its mapping from WebCore::ColorSpace -> CGColorSpaceRef.
2759
2760         * platform/graphics/cg/ImageBufferBackingStoreCache.cpp:
2761         * platform/graphics/cg/ImageBufferCG.cpp:
2762         Add FIXMEs for ImageBuffer to adopt WebCore::IOSurface.
2763
2764         * platform/graphics/cocoa/IOSurface.h: Added.
2765         * platform/graphics/cocoa/IOSurface.mm: Added.
2766         (IOSurface::create):
2767         (IOSurface::createFromMachPort):
2768         (IOSurface::createFromSurface):
2769         (IOSurface::IOSurface):
2770         (IOSurface::maximumSize):
2771         (IOSurface::createMachPort):
2772         (IOSurface::createImage):
2773         (IOSurface::ensurePlatformContext):
2774         (IOSurface::ensureGraphicsContext):
2775         (IOSurface::state):
2776         (IOSurface::isPurgeable):
2777         (IOSurface::setIsPurgeable):
2778         (IOSurface::inUse):
2779         Add WebCore::IOSurface.
2780
2781 2014-03-20  Pratik Solanki  <psolanki@apple.com>
2782
2783         iOS build fix after r165992.
2784
2785         * generate-export-file:
2786         (preprocessorMacros):
2787
2788 2014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
2789
2790         [WebRTC] Moving RTCConfiguration and RTCIceServer to Modules/mediastream
2791         https://bugs.webkit.org/show_bug.cgi?id=130434
2792
2793         Reviewed by Eric Carlson.
2794
2795         Those classes are defined in WebRTC spec, so they should not be in platform layer.
2796         Adding a platform implementation to be passed to handler classes.
2797
2798         * Modules/mediastream/RTCConfiguration.h: Copied from Source/WebCore/platform/mediastream/RTCConfiguration.h.
2799         * Modules/mediastream/RTCIceServer.h: Copied from Source/WebCore/platform/mediastream/RTCIceServer.h.
2800         * Modules/mediastream/RTCPeerConnection.cpp:
2801         (WebCore::RTCPeerConnection::RTCPeerConnection):
2802         (WebCore::RTCPeerConnection::updateIce):
2803         * WebCore.xcodeproj/project.pbxproj:
2804         * platform/mediastream/RTCConfigurationPrivate.h: Added.
2805         * platform/mediastream/RTCIceServerPrivate.h: Added.
2806         * platform/mediastream/RTCPeerConnectionHandler.h:
2807         * platform/mock/RTCPeerConnectionHandlerMock.cpp:
2808         (WebCore::RTCPeerConnectionHandlerMock::initialize):
2809         (WebCore::RTCPeerConnectionHandlerMock::updateIce):
2810         * platform/mock/RTCPeerConnectionHandlerMock.h:
2811
2812 2014-03-20  Alex Christensen  <achristensen@webkit.org>
2813
2814         [WinCairo] Unreviewed speculative build after my r165996.
2815
2816         * platform/network/soup/AuthenticationChallengeSoup.cpp:
2817         * platform/network/soup/CertificateInfo.cpp:
2818         * platform/network/soup/CookieJarSoup.cpp:
2819         * platform/network/soup/ResourceRequestSoup.cpp:
2820         * platform/network/soup/ResourceResponseSoup.cpp:
2821         * platform/network/soup/SynchronousLoaderClientSoup.cpp:
2822
2823 2014-03-20  Brent Fulgham  <bfulgham@apple.com>
2824
2825         Add a flushing mechanism for the WebVTTParser
2826         https://bugs.webkit.org/show_bug.cgi?id=130532
2827
2828         Reviewed by Eric Carlson.
2829
2830         Merged from Blink (patch by vcarbune@chromium.org):
2831         https://chromium.googlesource.com/chromium/blink/+/1ac2b3081492ab8661429230004013a9a3623f0f
2832         http://crbug.com/54203003
2833         https://chromium.googlesource.com/chromium/blink/+/24343d32bc36d20d59ef3e10040faddde65929e6
2834         http://crbug.com/59453002
2835         https://chromium.googlesource.com/chromium/blink/+/ef2793f1d9d207389589ecf9a136ea5c7170b4af
2836         http://crbug.com/75233002
2837         https://chromium.googlesource.com/chromium/blink/+/a29f2f8324abcd4826b41e7dc34373dee2ec57a9
2838         http://crbug.com/52713005
2839         https://chromium.googlesource.com/chromium/blink/+/7ce003c8d47b39f116f1f2a592a5dfb4a9e77228
2840         http://crbug.com/64303004
2841         https://chromium.googlesource.com/chromium/blink/+/18f896b3498478311e880f782813d5dfc8c0c7d1
2842         http://crbug.com/96933004
2843         https://chromium.googlesource.com/chromium/blink/+/8670e8ecb13254a651f5493ec83f4484d18c154e
2844         http://crbug.com/98783005
2845         https://chromium.googlesource.com/chromium/blink/+/4ac55780a6af3d76e0159c1d145330964ad56647
2846         http://crbug.com/104713002
2847
2848         Tests: http/tests/media/track/track-webvtt-slow-loading-2.html
2849                http/tests/media/track/track-webvtt-slow-loading.html
2850
2851         * CMakeLists.txt:
2852         * GNUmakefile.list.am:
2853         * WebCore.vcxproj/WebCore.vcxproj:
2854         * WebCore.vcxproj/WebCore.vcxproj.filters:
2855         * WebCore.xcodeproj/project.pbxproj:
2856         * html/track/BufferedLineReader.cpp: Added.
2857         * html/track/BufferedLineReader.h: Added.
2858         * html/track/TextTrackRegion.cpp:
2859         * html/track/VTTCue.cpp:
2860         * html/track/WebVTTParser.cpp:
2861         * html/track/WebVTTParser.h:
2862         * loader/TextTrackLoader.cpp:
2863
2864 2014-03-20  Alex Christensen  <achristensen@webkit.org>
2865
2866         Preparation for using Soup on Windows.
2867         https://bugs.webkit.org/show_bug.cgi?id=130472
2868
2869         Reviewed by Brent Fulgham.
2870
2871         * WebCore.vcxproj/WebCore.vcxproj:
2872         * WebCore.vcxproj/WebCore.vcxproj.filters:
2873         Added Soup source to build on WinCairo.
2874         * platform/network/curl/CookieJarCurl.cpp:
2875         * platform/network/curl/CredentialStorageCurl.cpp:
2876         * platform/network/curl/CurlCacheEntry.cpp:
2877         * platform/network/curl/CurlCacheManager.cpp:
2878         * platform/network/curl/CurlDownload.cpp:
2879         * platform/network/curl/DNSCurl.cpp:
2880         * platform/network/curl/FormDataStreamCurl.cpp:
2881         * platform/network/curl/MultipartHandle.cpp:
2882         * platform/network/curl/ProxyServerCurl.cpp:
2883         * platform/network/curl/ResourceHandleCurl.cpp:
2884         * platform/network/curl/ResourceHandleManager.cpp:
2885         * platform/network/curl/SSLHandle.cpp:
2886         * platform/network/curl/SocketStreamHandleCurl.cpp:
2887         Protected with USE(CURL) to avoid duplicate symbols when linking.
2888         * platform/network/soup/AuthenticationChallengeSoup.cpp:
2889         * platform/network/soup/CertificateInfo.cpp:
2890         * platform/network/soup/CookieJarSoup.cpp:
2891         * platform/network/soup/CookieStorageSoup.cpp:
2892         * platform/network/soup/CredentialStorageSoup.cpp:
2893         * platform/network/soup/DNSSoup.cpp:
2894         * platform/network/soup/NetworkStorageSessionSoup.cpp:
2895         * platform/network/soup/ProxyResolverSoup.cpp:
2896         * platform/network/soup/ProxyServerSoup.cpp:
2897         * platform/network/soup/ResourceErrorSoup.cpp:
2898         * platform/network/soup/ResourceHandleSoup.cpp:
2899         * platform/network/soup/ResourceRequestSoup.cpp:
2900         * platform/network/soup/ResourceResponseSoup.cpp:
2901         * platform/network/soup/SocketStreamHandleSoup.cpp:
2902         * platform/network/soup/SoupNetworkSession.cpp:
2903         * platform/network/soup/SynchronousLoaderClientSoup.cpp:
2904         Protected with USE(CURL) to avoid duplicate symbols when linking.
2905
2906 2014-03-20  Pratik Solanki  <psolanki@apple.com>
2907
2908         iOS build fix after r165979.
2909
2910         * generate-export-file:
2911         (preprocessorMacros):
2912
2913 2014-03-20  David Hyatt  <hyatt@apple.com>
2914
2915         [New Multicolumn] getClientRects returns wrong rectangle
2916         https://bugs.webkit.org/show_bug.cgi?id=128614
2917
2918         Reviewed by Sam Weinig.
2919
2920         Added fast/multicol/newmulticol/client-rects.html and beefed up existing
2921         fast/multicol/client-rects.html to use more writing modes.
2922
2923         * rendering/LayoutState.h:
2924         Removed unused function.
2925
2926         * rendering/RenderFlowThread.h:
2927         Make mapFlowToRegion virtual so that RenderMultiColumnFlowThread can
2928         override it.
2929
2930         * rendering/RenderMultiColumnFlowThread.cpp:
2931         (WebCore::RenderMultiColumnFlowThread::mapFromFlowToRegion):
2932         * rendering/RenderMultiColumnFlowThread.h:
2933         Implement mapFlowToRegion to correctly translate a flow thread position
2934         into a column offset within a region.
2935
2936         * rendering/RenderMultiColumnSet.cpp:
2937         (WebCore::RenderMultiColumnSet::columnTranslationForOffset):
2938         (WebCore::RenderMultiColumnSet::adjustRegionBoundsFromFlowThreadPortionRect):
2939         * rendering/RenderMultiColumnSet.h:
2940         Refactored some code to make a columnTranslationForOffset helper that
2941         can be used by RenderMultiColumnFlowThread.
2942
2943 2014-03-20  Daniel Bates  <dabates@apple.com>
2944
2945         Preserve original document URL for XSSAuditor reports
2946
2947         Merged from Blink (patch by Tom Sepez):
2948         https://src.chromium.org/viewvc/blink?view=rev&revision=158406
2949
2950         Test: http/tests/security/xssAuditor/report-script-tag-replace-state.html
2951
2952         * html/parser/XSSAuditor.cpp:
2953         (WebCore::XSSAuditor::filterToken):
2954         * html/parser/XSSAuditorDelegate.cpp:
2955         (WebCore::buildConsoleError):
2956         (WebCore::XSSAuditorDelegate::generateViolationReport):
2957         (WebCore::XSSAuditorDelegate::didBlockScript):
2958         * html/parser/XSSAuditorDelegate.h:
2959         (WebCore::XSSInfo::XSSInfo):
2960
2961 2014-03-20  Daniel Bates  <dabates@apple.com>
2962
2963         XSSAuditor bypass with frameset tags
2964
2965         Merged from Blink (patch by Tom Sepez):
2966         https://src.chromium.org/viewvc/blink?view=rev&revision=157794
2967
2968         Test: http/tests/security/xssAuditor/frameset-injection.html
2969
2970         * html/parser/XSSAuditor.cpp:
2971         (WebCore::XSSAuditor::filterStartToken):
2972         (WebCore::XSSAuditor::filterFrameToken):
2973         * html/parser/XSSAuditor.h:
2974
2975 2014-03-20  Brian Burg  <bburg@apple.com>
2976
2977         Web Replay: fix some oversights in the replay backend
2978         https://bugs.webkit.org/show_bug.cgi?id=130435
2979
2980         Reviewed by Andreas Kling.
2981
2982         This functionality will be covered by tests in https://webkit.org/b/130145.
2983
2984         * inspector/InspectorInstrumentation.cpp:
2985         (WebCore::InspectorInstrumentation::playbackFinishedImpl):
2986         * inspector/InspectorInstrumentation.h:
2987         (WebCore::InspectorInstrumentation::playbackFinished):
2988         * inspector/InspectorReplayAgent.cpp:
2989         (WebCore::buildInspectorObjectForSegment):
2990         (WebCore::InspectorReplayAgent::playbackFinished):
2991         * inspector/InspectorReplayAgent.h: Add a playbackFinished event to Inspector
2992         instrumentation. This is fired by ReplayController when playback is cancelled or 
2993         playback of the final segment has completed.
2994
2995         * replay/EventLoopInputDispatcher.cpp:
2996         (WebCore::EventLoopInputDispatcher::dispatchInputSoon): Fix wrong cast.
2997         (WebCore::EventLoopInputDispatcher::dispatchInput): Ensure that m_dispatching is
2998         false when m_running is false.
2999         * replay/EventLoopInputDispatcher.h: Distinguish 'dispaching' and 'running' in comments.
3000         (WebCore::EventLoopInputDispatcher::isRunning): Added.
3001
3002         * replay/FunctorInputCursor.h: Since the base class InputCursor is RefCounted, the
3003         Functor subclass cannot be put into a unique_ptr. Add create() method instead.
3004
3005         * replay/ReplayController.cpp:
3006         (WebCore::ReplayController::loadSegmentAtIndex): Renamed from loadSegment(). Callers
3007         now pass in the desired segment index rather than the segment itself. The index is
3008         necessary to properly reset m_position after the segment is loaded.
3009
3010         (WebCore::ReplayController::startPlayback): Set the dispatcher's speed before run().
3011         (WebCore::ReplayController::pausePlayback): Only pause the dispatcher if it's running.
3012         (WebCore::ReplayController::cancelPlayback): Add playbackFinished instrumentation.
3013         (WebCore::ReplayController::replayToPosition):
3014         (WebCore::ReplayController::didDispatchFinalInput): If there are no more segments to load,
3015         manually adjust the final m_position and defer to cancelPlayback to unload the segment.
3016         * replay/ReplayController.h:
3017         * replay/ReplaySessionSegment.cpp:
3018         (WebCore::ReplaySessionSegment::createFunctorCursor):
3019         * replay/ReplaySessionSegment.h:
3020
3021 2014-03-20  Pratik Solanki  <psolanki@apple.com>
3022
3023         [iOS] Get code to compile on older iOS versions
3024         https://bugs.webkit.org/show_bug.cgi?id=130142
3025         <rdar://problem/16302908>
3026
3027         Reviewed by Darin Adler.
3028
3029         * WebCore.exp.in:
3030         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
3031         (-[WebVideoFullscreenController WebCore::]):
3032         (-[WebVideoFullscreenController enterFullscreen:]):
3033         (-[WebVideoFullscreenController exitFullscreen]):
3034         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
3035         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3036         * platform/mac/HTMLConverter.mm:
3037         (_dateForString):
3038         * platform/network/cf/CookieJarCFNet.cpp:
3039         (WebCore::copyCookiesForURLWithFirstPartyURL):
3040         * platform/text/ios/LocalizedDateCache.mm:
3041         (WebCore::LocalizedDateCache::calculateMaximumWidth):
3042         * platform/text/mac/LocaleMac.mm:
3043         (WebCore::LocaleMac::LocaleMac):
3044
3045 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
3046
3047         Followup build fix: AnimationBase.h needs to be private because
3048         it's included by AnimationController.h.
3049
3050         * WebCore.xcodeproj/project.pbxproj:
3051
3052 2014-03-20  Simon Fraser  <simon.fraser@apple.com>
3053
3054         A completed fill-forwards animation should not disable overlap testing
3055         https://bugs.webkit.org/show_bug.cgi?id=130522
3056         <rdar://problem/15862395>
3057
3058         Reviewed by Dean Jackson.
3059         
3060         Previously, if -webkit-transform was being keyframe-animated, and the
3061         animation had fill-forwards, then we would continue to think that the
3062         animation is running and turn off compositing overlap testing. This
3063         caused some sites to keep too much backing store around.
3064         
3065         Fix by having isRunning{Accelerated}AnimationOnRenderer take some flags
3066         so that more specific questions about the running state can be asked.
3067         For layer creation, keep using the same criteria as before (for now)
3068         which includes paused and fill-forwards animations. For overlap testing,
3069         don't include the fill-forwards test.
3070
3071         Tests: compositing/animation/filling-animation-overlap-at-end.html
3072                compositing/animation/filling-animation-overlap.html
3073                compositing/animation/layer-for-filling-animation.html
3074
3075         * page/animation/AnimationBase.h:
3076         (WebCore::AnimationBase::fillingForwards):
3077         (WebCore::AnimationBase::inPausedState):
3078         (WebCore::AnimationBase::isAnimatingProperty):
3079         * page/animation/AnimationController.cpp:
3080         (WebCore::AnimationControllerPrivate::isRunningAnimationOnRenderer):
3081         (WebCore::AnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer):
3082         (WebCore::AnimationController::isRunningAnimationOnRenderer):
3083         (WebCore::AnimationController::isRunningAcceleratedAnimationOnRenderer):
3084         * page/animation/AnimationController.h:
3085         * page/animation/AnimationControllerPrivate.h:
3086         * page/animation/CompositeAnimation.cpp:
3087         (WebCore::CompositeAnimation::isAnimatingProperty):
3088         * page/animation/CompositeAnimation.h:
3089         * rendering/RenderLayerBacking.cpp:
3090         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3091         * rendering/RenderLayerCompositor.cpp:
3092         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
3093         (WebCore::RenderLayerCompositor::isRunningAcceleratedTransformAnimation):
3094
3095 2014-03-20  Dirk Schulze  <krit@webkit.org>
3096
3097         Canvas methods clip/fill/stroke should not except 0 argument
3098         https://bugs.webkit.org/show_bug.cgi?id=130497
3099
3100         Reviewed by Dean Jackson.
3101
3102         Do not allow nullable argument for fill/stroke/clip.
3103
3104         No new tests. Updated existing tests.
3105
3106         * html/canvas/CanvasRenderingContext2D.idl:
3107
3108 2014-03-20  Eric Carlson  <eric.carlson@apple.com>
3109
3110         [iOS] Support MediaDocument when building with PLUGIN_PROXY_FOR_VIDEO
3111         https://bugs.webkit.org/show_bug.cgi?id=130520
3112
3113         Reviewed by Jer Noble.
3114
3115         * dom/DOMImplementation.cpp:
3116         (WebCore::DOMImplementation::createDocument): Check the isVideoPluginProxyEnabled setting 
3117             when building with ENABLE_PLUGIN_PROXY_FOR_VIDEO.
3118
3119 2014-03-20  Mihai Tica  <mitica@adobe.com>
3120
3121         [CSS Blending] Blending operation is not isolated when setting z-index on parent from javascript
3122         https://bugs.webkit.org/show_bug.cgi?id=129307
3123
3124         Reviewed by Dean Jackson.
3125
3126         Reimplement the logic behind isolating blend modes. The blending operation should be limited to the
3127         contents of the parent stacking context. The proposed solution implies adding logic in updateDescendantDependentFlags,
3128         to track child elements that have blending and create a transparency layer that triggers isolation.
3129
3130         Tests: css3/compositing/blend-mode-background.html
3131                fast/repaint/blend-mode-isolate-stacking-context.html
3132
3133         * rendering/RenderLayer.cpp:
3134         (WebCore::RenderLayer::RenderLayer): Remove old members, add new members to constructor.
3135         (WebCore::RenderLayer::updateBlendMode): Update parent stacking context isolation on blend mode change.
3136         (WebCore::RenderLayer::updateNonCompositedParentStackingContextHasBlendedChild):
3137         - Set m_hasBlendedElementInChildStackingContext for the non composited parent stacking context.
3138         (WebCore::RenderLayer::dirtyAncestorParentStackingContextHasBlendedElement):
3139         - Set flag so isolation should be considered in updateDescendantDependentFlags.
3140         (WebCore::RenderLayer::nonCompositedParentStackingContextHasBlendedChild):
3141         - Return whether the non composited parent stacking context isolates blending.
3142         (WebCore::RenderLayer::updateDescendantDependentFlags): Add logic for isolating blending.
3143         (WebCore::RenderLayer::addChild): Call to updateNonCompositedParentStackingContextHasBlendedChild if needed.
3144         (WebCore::RenderLayer::removeChild): Call to dirtyAncestorParentStackingContextHasBlendedElement if needed.
3145         (WebCore::RenderLayer::updateStackingContextsAfterStyleChange): Update isolation when a stacking context was set or unset.
3146         (WebCore::RenderLayer::styleChanged): Removed oldStyle parameter from updateBlendMode call.
3147          Update parent stacking context isolation on blend mode change.
3148         * rendering/RenderLayer.h:
3149         - Add members, getters and setters for tracking whether the element has a blended child:
3150             - m_hasBlendedElementInChildStackingContext
3151             - m_hasBlendedElementInChildStackingContextStatusDirty
3152         - Removed m_updateParentStackingContextShouldIsolateBlendingDirty (replaced with m_hasBlendedElementInChildStackingContextStatusDirty)
3153         - Removed m_isolatesBlending (replaced with m_hasBlendedElementInChildStackingContext)
3154         - Updated the isolatesBlending method to return true only when the element is a stacking context and has a blended child.
3155         * rendering/RenderLayerCompositor.cpp:
3156         (WebCore::RenderLayerCompositor::computeCompositingRequirements): Removed layer.updateParentStackingContextShouldIsolateBlending call.
3157
3158 2014-03-20  Martin Robinson  <mrobinson@igalia.com>
3159
3160         [GTK] [CMake] Do not compile ProxyResolverSoup.cpp
3161         https://bugs.webkit.org/show_bug.cgi?id=130516
3162
3163         Reviewed by Sergio Villar Senin.
3164
3165         * PlatformGTK.cmake: Remove the file from the source list.
3166
3167 2014-03-20  Commit Queue  <commit-queue@webkit.org>
3168
3169         Unreviewed, rolling out r165962.
3170         https://bugs.webkit.org/show_bug.cgi?id=130512
3171
3172         It broke the build (Requested by Ossy on #webkit).
3173
3174         Reverted changeset:
3175
3176         "[EFL][GTK] Get CMake to find Freetype2 properly"
3177         https://bugs.webkit.org/show_bug.cgi?id=130150
3178         http://trac.webkit.org/changeset/165962
3179
3180 2014-03-20  Lorenzo Tilve  <ltilve@igalia.com>
3181
3182         "input" event is not fired when changing a select element's value
3183         https://bugs.webkit.org/show_bug.cgi?id=117526
3184
3185         Reviewed by Antti Koivisto.
3186
3187         Add a call to dispatch input event when listbox or menulist
3188         values are modified.
3189
3190         According to the spec: "When the user agent is to send select update
3191         notifications, queue a task to first fire a simple even that bubbles
3192         named input at the select element, and then fire a simple event that
3193         bubbles named change at the select element, using the user interaction
3194         task source as the task source."
3195
3196         Tests: fast/forms/select/listbox-oninput-fired.html
3197                fast/forms/select/menulist-oninput-fired.html
3198
3199         * html/HTMLSelectElement.cpp:
3200         (WebCore::HTMLSelectElement::listBoxOnChange):
3201         (WebCore::HTMLSelectElement::dispatchChangeEventForMenuList):
3202
3203 2014-03-20  Radu Stavila  <stavila@adobe.com>
3204
3205         [CSS Regions] The height of a scrollable element flowed inside a scrollable region is not computed correctly
3206         https://bugs.webkit.org/show_bug.cgi?id=129487
3207
3208         Reviewed by Andrei Bucur.
3209
3210         When propagating the layout overflow from the flowed element up to the flow thread itself,
3211         the region's logical bottom padding and the element's logical bottom margin must be taken into consideration.
3212         However, if the flowed element has overflow, the overflow will be painted over the region's padding
3213         and the element's margin, in order to be compatible with the non-regions case.
3214         More info can be found here: http://lists.w3.org/Archives/Public/www-style/2014Jan/0089.html
3215
3216         Tests: fast/regions/scrollable-region-content-size-horiz-bt.html
3217                fast/regions/scrollable-region-content-size-no-overflow-horiz-bt.html
3218                fast/regions/scrollable-region-content-size-no-overflow-vert-rl.html
3219                fast/regions/scrollable-region-content-size-no-overflow.html
3220                fast/regions/scrollable-region-content-size-relative.html
3221                fast/regions/scrollable-region-content-size-vert-rl.html
3222                fast/regions/scrollable-region-content-size-vertical-lr.html
3223                fast/regions/scrollable-region-content-size.html
3224                fast/regions/scrollable-region-scrollable-content.html
3225
3226         * rendering/RenderFlowThread.cpp:
3227         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
3228         * rendering/RenderRegion.cpp:
3229         (WebCore::RenderRegion::rectFlowPortionForBox):
3230
3231 2014-03-20  Zalan Bujtas  <zalan@apple.com>
3232
3233         Subpixel rendering: Nested layers with subpixel accumulation paint to wrong position.
3234         https://bugs.webkit.org/show_bug.cgi?id=130153
3235
3236         Reviewed by Simon Fraser.
3237
3238         Subpixels (fractional device pixels here) can accumulate through nested layers. Subpixels
3239         need to be propagated through the layer tree so that painting coordinates match layout coordinates.
3240
3241         Subpixel accumulation through nesting (absolute positioning, 2x display):
3242         non-compositing case:
3243         (nested boxes)  (layout pos) (norm.paint pos) (translate accumulation, subpixel accumulation, final paint pos)
3244         div -> top: 1.3px   1.3px     1.5px      1.5px 0.2px -> snapped 0.0px -> 1.5px
3245          div -> top: 1.3px   2.6px     2.5px      3.0px 0.4px -> snapped 0.5px -> 2.5px
3246           div -> top: 1.3px   3.9px     4.0px      4.5px 0.6px -> snapped 0.5px -> 4.0px
3247            div -> top: 1.3px   5.2px     5.0px      6.0px 0.8px -> snapped 1.0px -> 5.0px
3248
3249         compositing case:
3250         (nested boxes)  (layout pos) (norm.paint pos) (device pixel offset + fractional offset, final pos)
3251         div -> top: 1.3px   1.3px      1.5px      1.0px + 0.3px -> snapped -> 1.5px
3252          div -> top: 1.3px   2.6px      2.5px      2.5px + 0.1px -> snapped -> 2.5px
3253           div -> top: 1.3px   3.9px      4.0px      3.5px + 0.4px -> snapped -> 4.0px
3254            div -> top: 1.3px   5.2px      5.0px      5.0px + 0.2px -> snapped -> 5.0px
3255
3256         Tests: compositing/hidpi-nested-compositing-layers-with-subpixel-accumulation.html
3257                fast/layers/hidpi-nested-layers-with-subpixel-accumulation.html
3258
3259         * rendering/RenderLayer.cpp:
3260         (WebCore::RenderLayer::paintLayerByApplyingTransform):
3261         * rendering/RenderLayerBacking.cpp:
3262         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3263         * rendering/RenderLayerBacking.h:
3264         (WebCore::RenderLayerBacking::devicePixelFractionFromRenderer):
3265
3266 2014-03-20  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3267
3268         [EFL][GTK] Get CMake to find Freetype2 properly
3269         https://bugs.webkit.org/show_bug.cgi?id=130150
3270
3271         Reviewed by Csaba Osztrogonác.
3272
3273         Newer versions of CMake are not able to find Freetype2 correctly.
3274         FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
3275         freetype2 repo, because a completely different version number is found in freetype2.pc.
3276
3277         * PlatformEfl.cmake:
3278         * PlatformGTK.cmake:
3279
3280 2014-03-20  Peter Molnar  <pmolnar.u-szeged@partner.samsung.com>
3281
3282         Refactor checking log channel state in MediaPlayerPrivateGStreamerBase.
3283         https://bugs.webkit.org/show_bug.cgi?id=130241
3284
3285         Reviewed by Philippe Normand.
3286
3287         The channel was passed around only to check its state. Cleaned this up
3288         by adding a method to check whether a log channel is enabled.
3289
3290         * platform/Logging.cpp:
3291         (WebCore::isLogChannelEnabled):
3292         * platform/Logging.h:
3293         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3294         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):
3295
3296 2014-03-20  Lorenzo Tilve  <ltilve@igalia.com>
3297
3298         Dispatch input event for Range element keyboard event
3299         https://bugs.webkit.org/show_bug.cgi?id=129929
3300
3301         Reviewed by Kent Tamura.
3302
3303         For any value update, dispatch both input and change event.
3304         Also removes extra dispatch change event, as event is dispatched
3305         from TextFieldInputType:setValue.
3306
3307         Merged from Blink (patch by Habib Virji):
3308         https://src.chromium.org/viewvc/blink?revision=168558&view=revision
3309
3310         Test: fast/forms/range/range-keyboard-oninput-event.html
3311
3312         * html/RangeInputType.cpp:
3313         (WebCore::RangeInputType::handleKeydownEvent):
3314
3315 2014-03-20  Jinwoo Song  <jinwoo7.song@samsung.com>
3316
3317         Refine BatteryStatus module
3318         https://bugs.webkit.org/show_bug.cgi?id=130495
3319
3320         Reviewed by Andreas Kling.
3321
3322         Small refinements:
3323          - Return PassRef instead of PassRefPtr in create method
3324          - Switched to nullptr instead of 0 where appropriate.
3325          - Removed unused function and header file.
3326          - Removed unnecessary empty lines.
3327
3328         * Modules/battery/BatteryController.h:
3329         * Modules/battery/BatteryManager.cpp:
3330         (WebCore::BatteryManager::create): Make return passRef.
3331         * Modules/battery/BatteryManager.h:
3332         (WebCore::BatteryManager::batteryControllerDestroyed): Use nullptr.
3333         * Modules/battery/BatteryStatus.cpp:
3334         (WebCore::BatteryStatus::create): Make return passRef.
3335         * Modules/battery/BatteryStatus.h:
3336         * Modules/battery/NavigatorBattery.cpp:
3337         (WebCore::NavigatorBattery::webkitBattery): Remove batteryManager().
3338         * Modules/battery/NavigatorBattery.h:
3339
3340 2014-03-19  Pratik Solanki  <psolanki@apple.com>
3341
3342         [iOS] Get code to compile on older iOS versions
3343         https://bugs.webkit.org/show_bug.cgi?id=130142
3344         <rdar://problem/16302908>
3345
3346         Reviewed by Darin Adler.
3347
3348         * WebCore.exp.in:
3349         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
3350         (-[WebVideoFullscreenController WebCore::]):
3351         (-[WebVideoFullscreenController enterFullscreen:]):
3352         (-[WebVideoFullscreenController exitFullscreen]):
3353         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
3354         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3355         * platform/mac/HTMLConverter.mm:
3356         (_dateForString):
3357         * platform/network/cf/CookieJarCFNet.cpp:
3358         (WebCore::copyCookiesForURLWithFirstPartyURL):
3359         * platform/text/ios/LocalizedDateCache.mm:
3360         (WebCore::LocalizedDateCache::calculateMaximumWidth):
3361         * platform/text/mac/LocaleMac.mm:
3362         (WebCore::LocaleMac::LocaleMac):
3363
3364 2014-03-19  Byungseon Shin  <sun.shin@lge.com>
3365
3366         Fix "WEBKIT_WEBGL_compressed_texture_pvrtc" extension support
3367         https://bugs.webkit.org/show_bug.cgi?id=130292
3368
3369         Reviewed by Dean Jackson.
3370
3371         WebGLRenderingContext::getExtension was not returning WEBGL_compressed_texture_pvrtc extension.
3372
3373         * html/canvas/WebGLRenderingContext.cpp:
3374         (WebCore::WebGLRenderingContext::getExtension):
3375
3376 2014-03-19  Brent Fulgham  <bfulgham@apple.com>
3377
3378         Merge Misc. WebVTT Updates from Blink.
3379         https://bugs.webkit.org/show_bug.cgi?id=130491
3380
3381         Reviewed by Eric Carlson.
3382
3383         Test: media/track/track-webvtt-tc030-interspersed-non-cue.html
3384
3385         Merged from Blink (patch by vcarbune@chromium.org):
3386         https://chromium.googlesource.com/chromium/blink/+/fb62b2b54944bd19026192c049a1db250756fc12
3387         http://crbug.com/40323003
3388         https://chromium.googlesource.com/chromium/blink/+/29176fb0b394a97e85f4dabc07e18329f3ceae41
3389         http://crbug.com/54463002
3390         https://chromium.googlesource.com/chromium/blink/+/29476f839a08cb17c5a3fc713f7e454e7cea9c60
3391         http://crbug.com/55853002
3392         https://chromium.googlesource.com/chromium/blink/+/ba2378ef873e786cf2937034e012669cdd37dfe8
3393         http://crbug.com/65343003
3394         https://chromium.googlesource.com/chromium/blink/+/1915b9aa1bba45aebf28531b40ae627ecf9a3d59
3395         http://crbug.com/62833005
3396         https://chromium.googlesource.com/chromium/blink/+/ea46dbd0f1f29779a1cd4f59b19361b803f09a9b
3397         http://crbug.com/64273013
3398         https://chromium.googlesource.com/chromium/blink/+/9eb4bb6b627357bb94d66386a4123ec004cccfc4
3399         http://crbug.com/101513002
3400         https://chromium.googlesource.com/chromium/blink/+/192a843b32eafb77bf92c50ec50d334ba935028a
3401         http://crbug.com/102403002
3402         https://chromium.googlesource.com/chromium/blink/+/15f9efcc952fcf73184e28fb9db79633c1fa6653
3403         http://crbug.com/104443002
3404         https://chromium.googlesource.com/chromium/blink/+/74fd66b451a464683f7cb748855b1740a54b2c16
3405         http://crbug.com/75243004
3406
3407         * html/track/TextTrackRegion.cpp:
3408         (WebCore::TextTrackRegion::parseSettingValue):
3409         * html/track/VTTCue.cpp:
3410         (WebCore::VTTCue::markFutureAndPastNodes):
3411         (WebCore::VTTCue::setCueSettings):
3412         * html/track/WebVTTParser.cpp:
3413         (WebCore::scanDigits):
3414         (WebCore::WebVTTParser::collectDigitsToInt):
3415         (WebCore::WebVTTParser::parseFloatPercentageValue):
3416         (WebCore::WebVTTParser::parseBytes):
3417         (WebCore::WebVTTParser::collectMetadataHeader):
3418         (WebCore::WebVTTParser::collectTimingsAndSettings):
3419         (WebCore::WebVTTParser::createDocumentFragmentFromCueText):
3420         (WebCore::WebVTTParser::createNewCue):
3421         (WebCore::WebVTTParser::createNewRegion):
3422         (WebCore::WebVTTParser::collectTimeStamp):
3423         (WebCore::tokenToNodeType):
3424         (WebCore::WebVTTParser::constructTreeFromToken):
3425         * html/track/WebVTTParser.h:
3426         * html/track/WebVTTToken.h:
3427         (WebCore::WebVTTToken::name):
3428         (WebCore::WebVTTToken::characters):
3429         (WebCore::WebVTTToken::appendToCharacter):
3430         (WebCore::WebVTTToken::addNewClass):
3431         (WebCore::WebVTTToken::classes):
3432         (WebCore::WebVTTToken::addNewAnnotation):
3433         (WebCore::WebVTTToken::annotation):
3434         * html/track/WebVTTTokenizer.cpp:
3435         (WebCore::equalLiteral):
3436         (WebCore::WebVTTTokenizer::WebVTTTokenizer):
3437         (WebCore::WebVTTTokenizer::nextToken):
3438         * html/track/WebVTTTokenizer.h:
3439
3440 2014-03-19  Mark Hahnenberg  <mhahnenberg@apple.com>
3441
3442         GC timer should intelligently choose between EdenCollections and FullCollections
3443         https://bugs.webkit.org/show_bug.cgi?id=128261
3444
3445         Reviewed by Geoffrey Garen.
3446
3447         No new tests.
3448
3449         Updated WebSafeGCActivityCallbacks for both Eden and Full timers.
3450
3451         * bindings/js/JSDOMWindowBase.cpp:
3452         (WebCore::JSDOMWindowBase::commonVM):
3453         * platform/ios/WebSafeGCActivityCallbackIOS.h:
3454
3455 2014-03-19  Andy Estes  <aestes@apple.com>
3456
3457         Fix the iOS build after r165917.
3458
3459         * platform/ios/WebCoreSystemInterfaceIOS.mm:
3460
3461 2014-03-19  Commit Queue  <commit-queue@webkit.org>
3462
3463         Unreviewed, rolling out r165926.
3464         https://bugs.webkit.org/show_bug.cgi?id=130488
3465
3466         broke the iOS build (Requested by estes on #webkit).
3467
3468         Reverted changeset:
3469
3470         "GC timer should intelligently choose between EdenCollections
3471         and FullCollections"
3472         https://bugs.webkit.org/show_bug.cgi?id=128261
3473         http://trac.webkit.org/changeset/165926
3474
3475 2014-03-19  Commit Queue  <commit-queue@webkit.org>
3476
3477         Unreviewed, rolling out r165929.
3478         https://bugs.webkit.org/show_bug.cgi?id=130487
3479
3480         in order to roll out r165926 (Requested by estes on #webkit).
3481
3482         Reverted changeset:
3483
3484         http://trac.webkit.org/changeset/165929
3485
3486 2014-03-19  Mark Hahnenberg  <mhahnenberg@apple.com>
3487
3488         Build fix for iOS after r165926
3489
3490         * bindings/js/JSDOMWindowBase.cpp:
3491         (WebCore::JSDOMWindowBase::commonVM):
3492         * platform/ios/WebSafeGCActivityCallbackIOS.h:
3493
3494 2014-03-19  Eric Carlson  <eric.carlson@apple.com>
3495
3496         Allow media engine to update HTMLMediaElement state when playing to external device
3497         https://bugs.webkit.org/show_bug.cgi?id=130480
3498
3499         Reviewed by Jer Noble.
3500
3501         * html/HTMLMediaElement.h: Add mediaPlayerHandlePlaybackCommand.
3502
3503         * platform/graphics/MediaPlayer.cpp:
3504         (WebCore::MediaPlayer::handlePlaybackCommand): New.
3505         * platform/graphics/MediaPlayer.h:
3506         (WebCore::MediaPlayerClient::mediaPlayerHandlePlaybackCommand):
3507
3508         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3509         (WebCore::MediaPlayerPrivateAVFoundation::rateChanged): Send Play and Pause commands when
3510             playing to an external device.
3511
3512 2014-03-19  Dirk Schulze  <krit@webkit.org>
3513
3514         Implement isPointInPath and isPointInStroke with Path2D argument
3515         https://bugs.webkit.org/show_bug.cgi?id=130473
3516
3517         Reviewed by Dean Jackson.
3518
3519         Implement isPointInPath and isPointInStroke for 2D Canvas contxts
3520         with Path2D argument.
3521
3522
3523         Tests: fast/canvas/canvas-path-isPointInPath.html
3524                fast/canvas/canvas-path-isPointInStroke.html
3525
3526         * html/canvas/CanvasRenderingContext2D.cpp:
3527         (WebCore::CanvasRenderingContext2D::isPointInPath):
3528         (WebCore::CanvasRenderingContext2D::isPointInStroke):
3529         (WebCore::CanvasRenderingContext2D::isPointInPathInternal):
3530         (WebCore::CanvasRenderingContext2D::isPointInStrokeInternal):
3531         * html/canvas/CanvasRenderingContext2D.h:
3532         * html/canvas/CanvasRenderingContext2D.idl:
3533
3534 2014-03-13  Mark Hahnenberg  <mhahnenberg@apple.com>
3535
3536         GC timer should intelligently choose between EdenCollections and FullCollections
3537         https://bugs.webkit.org/show_bug.cgi?id=128261
3538
3539         Reviewed by Geoffrey Garen.
3540
3541         No new tests.
3542
3543         * platform/ios/WebSafeGCActivityCallbackIOS.h: Update WebSafeGCActivityCallback
3544         appropriately for the introduction of another type of GCActivityCallback.
3545
3546 <<<<<<< .mine
3547 2014-03-18  Mark Hahnenberg  <mhahnenberg@apple.com>
3548
3549         GC timer should intelligently choose between EdenCollections and FullCollections
3550         https://bugs.webkit.org/show_bug.cgi?id=128261
3551
3552         Reviewed by Geoffrey Garen.
3553
3554         No new tests.
3555
3556         Updated WebSafeGCActivityCallbacks for both Eden and Full timers.
3557
3558         * platform/ios/WebSafeGCActivityCallbackIOS.h:
3559
3560 2014-03-19  Antti Koivisto  <antti@apple.com>
3561
3562         Crash with long selector list
3563         https://bugs.webkit.org/show_bug.cgi?id=123006
3564
3565         Reviewed by Andreas Kling.
3566
3567         Test: fast/css/long-selector-list-crash.html
3568
3569         * css/CSSSelectorList.cpp:
3570         (WebCore::CSSSelectorList::CSSSelectorList):
3571         (WebCore::CSSSelectorList::adoptSelectorVector):
3572         (WebCore::CSSSelectorList::operator=):
3573         * css/StyleRule.cpp:
3574         (WebCore::StyleRule::create):
3575
3576             Add a bunch of asserts.
3577
3578         (WebCore::StyleRule::splitIntoMultipleRulesWithMaximumSelectorComponentCount):
3579         
3580             This could produce a zero-length selector list.
3581
3582 2014-03-19  Andreas Kling  <akling@apple.com>
3583
3584         Rebaseline bindings tests.
3585
3586         * bindings/scripts/test/JS/*:
3587
3588 2014-03-04  Jer Noble  <jer.noble@apple.com>
3589
3590         [iOS][MediaControls] Reverse-pinching using the built-in controls should enter full screen
3591         https://bugs.webkit.org/show_bug.cgi?id=129707
3592
3593         Reviewed by Eric Carlson.
3594
3595         The default controls on iOS should respond to a pinch gesture by entering fullscreen. Add a gesture
3596         event listener, and enter full screen if the user does a quick (>2 velocity) reverse (>1.25 scale) pinch.
3597
3598         * Modules/mediacontrols/mediaControlsiOS.js:
3599         (ControllerIOS.prototype.createBase):
3600         (ControllerIOS.prototype.handlePlayButtonTouchEnd):
3601         (ControllerIOS.prototype.handleBaseGestureStart):
3602         (ControllerIOS.prototype.handleBaseGestureChange):
3603         (ControllerIOS.prototype.handleBaseGestureEnd):
3604
3605 2014-03-19  Ryosuke Niwa  <rniwa@webkit.org>
3606
3607         REGRESSION(r156316): Scrollbar on a large document is broken
3608         https://bugs.webkit.org/show_bug.cgi?id=130474
3609         <rdar://problem/16371523>
3610
3611         Reviewed by Anders Carlsson.
3612
3613         The bug was caused by updateArrowPlacement() doing the work even though Scrollbar Overlay API is available.
3614         Prior to r156316, this function exited early:
3615         http://trac.webkit.org/browser/trunk/Source/WebCore/platform/mac/ScrollbarThemeMac.mm?rev=156315#L147
3616
3617         Fixed the bug by deleting updateArrowPlacement() entirely.
3618
3619         * platform/mac/ScrollbarThemeMac.mm:
3620         (WebCore::ScrollbarThemeMac::preferencesChanged):
3621
3622 2014-03-19  Jer Noble  <jer.noble@apple.com>
3623
3624         [Mac][EME] Query whether decoder support exists before creating a new MediaKeys object.
3625         https://bugs.webkit.org/show_bug.cgi?id=130459
3626
3627         Reviewed by Eric Carlson.
3628
3629         * WebCore.exp.in: Export the new WCSI method.
3630         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3631         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsKeySystem): Bail early if we have no decoder support.
3632         * platform/mac/WebCoreSystemInterface.h: Provide a WCSI wrapper for WKSI.
3633         * platform/mac/WebCoreSystemInterface.mm: Ditto.
3634
3635 2014-03-19  Eric Carlson  <eric.carlson@apple.com>
3636
3637         Make Remote Control commands testable
3638         https://bugs.webkit.org/show_bug.cgi?id=130358
3639
3640         Reviewed by Jer Noble.
3641
3642         Test: media/video-remote-control-playpause.html
3643
3644         * html/HTMLMediaElement.cpp:
3645         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Call session->clientWillPausePlayback.
3646         (WebCore::HTMLMediaElement::didReceiveRemoteControlCommand): Log the command.
3647
3648         * platform/audio/MediaSession.cpp:
3649         (WebCore::MediaSessionClient::mediaSessionTitle): Move from header file.
3650         (WebCore::MediaSessionClient::mediaSessionDuration): Ditto.
3651         (WebCore::MediaSessionClient::mediaSessionCurrentTime): Ditto.
3652         * platform/audio/MediaSession.h:
3653
3654         * platform/audio/MediaSessionManager.cpp:
3655         (WebCore::MediaSessionManager::MediaSessionManager): Get rid of m_activeSession.
3656         (WebCore::MediaSessionManager::removeSession): No need to clear m_activeSession because 
3657             we use the m_sessions vector.
3658         (WebCore::MediaSessionManager::sessionWillBeginPlayback): setCurrentSession takes a 
3659             MediaSession&.
3660         (WebCore::MediaSessionManager::sessionWillEndPlayback): Keep m_sessions sorted so playing
3661             sessions are before paused sessions.
3662         (WebCore::MediaSessionManager::setCurrentSession): Move the session that is beginning to
3663             play to the head of m_sessions.
3664         (WebCore::MediaSessionManager::currentSession): Return m_sessions[0] or nullptr.
3665         (WebCore::MediaSessionManager::didReceiveRemoteControlCommand):
3666         * platform/audio/MediaSessionManager.h:
3667
3668         * platform/audio/ios/MediaSessionManagerIOS.mm: Include MediaPlayer.h.
3669
3670         * testing/Internals.cpp:
3671         (WebCore::Internals::postRemoteControlCommand): New.
3672         * testing/Internals.h:
3673         * testing/Internals.idl:
3674
3675 2014-03-19  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3676
3677         Improving webkitGetUserMedia error handling and error messages
3678         https://bugs.webkit.org/show_bug.cgi?id=130452
3679
3680         Reviewed by Eric Carlson.
3681
3682         Checking if first argument of webkitGetUserMedia is a valid Dictionary. If not, throw an exception with a
3683         clearer message of the error.
3684
3685         Test updated.
3686
3687         * Modules/mediastream/NavigatorMediaStream.idl:
3688         * UseJSC.cmake:
3689         * bindings/js/JSNavigatorCustom.cpp: Added.
3690
3691 2014-03-19  Andreas Kling  <akling@apple.com>
3692
3693         JSC bindings should use the passed-in global object for wrapper caching.
3694         <https://webkit.org/b/130458>
3695
3696         Take a shorter path to the DOMWrapperWorld by using the passed-in
3697         global object instead of getting the lexical global from ExecState.
3698         Removed an old FIXME that no longer applies since JSObjects can
3699         always find the right global object these days.
3700
3701         Reviewed by Geoff Garen.
3702
3703         * bindings/js/JSCSSRuleCustom.cpp:
3704         (WebCore::toJS):
3705         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3706         (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
3707         * bindings/js/JSCSSValueCustom.cpp:
3708         (WebCore::toJS):
3709         * bindings/js/JSDOMBinding.h:
3710         (WebCore::createWrapper):
3711         (WebCore::wrap):
3712         (WebCore::getExistingWrapper):
3713         (WebCore::createNewWrapper):
3714         (WebCore::toJS):
3715         * bindings/js/JSDOMWindowCustom.cpp:
3716         (WebCore::JSDOMWindow::setTimeout):
3717         (WebCore::JSDOMWindow::setInterval):
3718         (WebCore::JSDOMWindow::addEventListener):
3719         (WebCore::JSDOMWindow::removeEventListener):
3720         * bindings/js/JSDocumentCustom.cpp:
3721         (WebCore::JSDocument::location):
3722         (WebCore::toJS):
3723         * bindings/js/JSElementCustom.cpp:
3724         (WebCore::toJSNewlyCreated):
3725         * bindings/js/JSEventCustom.cpp:
3726         (WebCore::toJS):
3727         * bindings/js/JSHTMLCollectionCustom.cpp:
3728         (WebCore::toJS):
3729         * bindings/js/JSHTMLTemplateElementCustom.cpp:
3730         (WebCore::JSHTMLTemplateElement::content):
3731         * bindings/js/JSImageDataCustom.cpp:
3732         (WebCore::toJS):
3733         * bindings/js/JSNodeCustom.cpp:
3734         (WebCore::createWrapperInline):
3735         * bindings/js/JSNodeCustom.h:
3736         (WebCore::toJS):
3737         * bindings/js/JSSVGPathSegCustom.cpp:
3738         (WebCore::toJS):
3739         * bindings/js/JSStyleSheetCustom.cpp:
3740         (WebCore::toJS):
3741         * bindings/js/JSTextTrackCueCustom.cpp:
3742         (WebCore::toJS):
3743         * bindings/js/JSTrackCustom.cpp:
3744         (WebCore::toJS):
3745         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
3746         (WebCore::JSWorkerGlobalScope::setTimeout):
3747         (WebCore::JSWorkerGlobalScope::setInterval):
3748         * bindings/scripts/CodeGeneratorJS.pm:
3749         (GenerateImplementation):
3750
3751 2014-03-19  Benjamin Poulain  <bpoulain@apple.com>
3752
3753         Page::setPageScaleFactor should not force the scroll view position when using delegatesScrolling()
3754         https://bugs.webkit.org/show_bug.cgi?id=130429
3755
3756         Reviewed by Simon Fraser.
3757
3758         When setting the same scale mutliple time (for example on load), Page was asking the top scrollview
3759         to scroll to the origin. This is bogus since the scroll view is driving Page::setDeviceScaleFactor,
3760         not the other way around.
3761
3762         Simon fixed the general case in http://trac.webkit.org/changeset/165652/trunk/Source/WebCore/page/Page.cpp
3763         but this branch was still scrolling content.
3764
3765         * page/Page.cpp:
3766         (WebCore::Page::setPageScaleFactor):
3767
3768 2014-03-19  Brady Eidson  <beidson@apple.com>
3769
3770         Filter out editable services from image menu for non-contenteditable images
3771         <rdar://problem/16319645> and https://bugs.webkit.org/show_bug.cgi?id=130437
3772
3773         Reviewed by Tim Horton.
3774
3775         * WebCore.exp.in:
3776
3777 2014-03-19  Dirk Schulze  <krit@webkit.org>
3778
3779         Implement method addPath for Path2D
3780         https://bugs.webkit.org/show_bug.cgi?id=130461
3781
3782         Reviewed by Dean Jackson.
3783
3784         Add support for the Path2D method addPath. The method allows
3785         to append and existing Path2D object to another one. It can be
3786         combined with a transformation matrix SVGMatrix.
3787
3788         Test: fast/canvas/canvas-path-addPath.html
3789
3790         * html/canvas/DOMPath.h: Add new method addPath().
3791         (WebCore::DOMPath::addPath):
3792         * html/canvas/DOMPath.idl:
3793         * platform/graphics/Path.h: Add support for appending paths.
3794         * platform/graphics/cairo/PathCairo.cpp:
3795         (WebCore::Path::addPath):
3796         * platform/graphics/cg/PathCG.cpp:
3797         (WebCore::Path::addPath):
3798         * platform/graphics/wince/PathWinCE.cpp:
3799         (WebCore::Path::addPath):
3800
3801 2014-03-19  Yongjun Zhang  <yongjun_zhang@apple.com>
3802
3803         [iOS] WebKit2 Quicklook.
3804         https://bugs.webkit.org/show_bug.cgi?id=130360
3805
3806         Reviewed by Tim Horton.
3807
3808         Since ResourceLoaders using WebKit2 network process don't have ResourceHandle any more, we
3809         need to make it possible to create QuickLookHandle from ResourceLoader.
3810
3811         * WebCore.exp.in: Make some QuickLookHandle methods visible from WebKit2.
3812         * loader/ResourceLoader.h: Add m_quickLookHandle data member to ResourceLoader.
3813         (WebCore::ResourceLoader::quickLookHandle):
3814         (WebCore::ResourceLoader::setQuickLookHandle):
3815         * platform/network/ios/QuickLook.h: Add a new method to create QuickLookHandle from ResourceLoader.
3816         * platform/network/ios/QuickLook.mm:
3817         (WebCore::QuickLookHandle::create):
3818
3819 2014-03-19  Brent Fulgham  <bfulgham@apple.com>
3820
3821         Fix cue rendering test and include support for left/right alignment
3822         https://bugs.webkit.org/show_bug.cgi?id=130406
3823
3824         Reviewed by Eric Carlson.
3825
3826         Merged from Blink (patch by vcarbune@chromium.org):
3827         https://chromium.googlesource.com/chromium/blink/+/e695703cb603421c741e59a557a7989113c13b94
3828         http://crbug.com/25155003
3829
3830         No new tests. Covered by media/track/track-cue-rendering-snap-to-lines-not-set.html.
3831
3832         * html/track/VTTCue.cpp:
3833         (WebCore::leftKeyword): Added.
3834         (WebCore::rightKeyword): Added.
3835         (WebCore::VTTCueBox::applyCSSProperties): Added.
3836         (WebCore::VTTCue::VTTCue):
3837         (WebCore::VTTCue::align): Handle left/right alignment.
3838         (WebCore::VTTCue::setAlign): Ditto.
3839         (WebCore::VTTCue::calculateDisplayParameters): Refactored and revised for left/right tokens.
3840         (WebCore::VTTCue::setCueSettings): Ditto.
3841         (WebCore::VTTCue::getCSSAlignment): Added.
3842         (WebCore::VTTCue::getCSSWritingMode): Added.
3843         * html/track/VTTCue.h:
3844
3845 2014-03-18  Anders Carlsson  <andersca@apple.com>
3846
3847         Add new functionality that will be required by the history item decoding
3848         https://bugs.webkit.org/show_bug.cgi?id=130433
3849
3850         Reviewed by Sam Weinig.
3851
3852         * platform/KeyedCoding.h:
3853         (WebCore::KeyedDecoder::decodeConditionalObject):
3854
3855 2014-03-19  Tim Horton  <timothy_horton@apple.com>
3856
3857         Fix the iOS build.
3858
3859         * html/BaseDateAndTimeInputType.cpp:
3860         (WebCore::BaseDateAndTimeInputType::parseToDateComponents):
3861         Missing a StringView().
3862
3863 2014-03-19  Antti Koivisto  <antti@apple.com>
3864
3865         Tighten ElementRuleCollector::m_matchedRuleList typing
3866         https://bugs.webkit.org/show_bug.cgi?id=130446
3867
3868         Reviewed by Anders Carlsson.
3869
3870         StyleRuleBase -> StyleRule.
3871
3872         * css/ElementRuleCollector.cpp:
3873         (WebCore::ElementRuleCollector::matchedRuleList):
3874         * css/ElementRuleCollector.h:
3875         * css/StyleResolver.cpp:
3876         (WebCore::StyleResolver::styleRulesForElement):
3877         (WebCore::StyleResolver::pseudoStyleRulesForElement):
3878         * css/StyleResolver.h:
3879         * editing/EditingStyle.cpp:
3880         (WebCore::styleFromMatchedRulesForElement):
3881         * inspector/InspectorCSSAgent.cpp:
3882         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
3883         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
3884         * inspector/InspectorCSSAgent.h:
3885         * page/DOMWindow.cpp:
3886         (WebCore::DOMWindow::getMatchedCSSRules):
3887
3888 2014-03-19  Mihnea Ovidenie  <mihnea@adobe.com>
3889
3890         [CSSRegions] An unsplittable box is always displayed in a single region
3891         https://bugs.webkit.org/show_bug.cgi?id=130451
3892
3893         Reviewed by Andrei Bucur.
3894
3895         Add an ASSERT stating that an unsplittable box region range always contains 1 region.
3896         No new functionality, no new tests.
3897
3898         * rendering/RenderFlowThread.cpp:
3899         (WebCore::RenderFlowThread::getRegionRangeForBox):
3900
3901 2014-03-19  Zalan Bujtas  <zalan@apple.com>
3902
3903         Subpixel rendering: Transform origin is miscalculated when RenderLayer's
3904         offsetfromRenderer has device pixel fraction value.
3905         https://bugs.webkit.org/show_bug.cgi?id=129859
3906
3907         Reviewed by Simon Fraser.
3908
3909         We need to calculate the transformed origin using the painting coordinates to produce
3910         pixel precise result.
3911
3912         * rendering/RenderLayerBacking.cpp:
3913         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3914         (WebCore::RenderLayerBacking::computeTransformOriginForPainting):
3915         * rendering/RenderLayerBacking.h:
3916
3917 2014-03-19  Claudio Saavedra  <csaavedra@igalia.com>
3918
3919         [GStreamer] Clean timeout source ids
3920         https://bugs.webkit.org/show_bug.cgi?id=130450
3921
3922         Reviewed by Philippe Normand.
3923
3924         Sources IDs need to be cleaned up if the callback removes the
3925         source, otherwise we'll be attempting to remove an empty source at
3926         some point.
3927
3928         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
3929         (webKitMediaVideoSrcStart): Clean the source id.
3930         (webKitMediaAudioSrcStart): Ditto.
3931         (webKitMediaVideoSrcSeekMainCb): Ditto.
3932         (webKitMediaAudioSrcSeekMainCb): Ditto.
3933
3934 2014-03-19  Mihnea Ovidenie  <mihnea@adobe.com>
3935
3936         [CSSRegions] Compute region ranges for children of inline blocks
3937         https://bugs.webkit.org/show_bug.cgi?id=130392
3938
3939         Reviewed by Andrei Bucur.
3940
3941         Extend the region ranges computation for children of inline blocks.
3942         When we cannot retrieve the region range for a box using cached information,
3943         either from region range map or from the region cached on the RootInlineBox,
3944         try to find the top most unsplittable box up to the flow thread boundary.
3945         If we find such unsplittable box and the box has a region range, then return
3946         this range.
3947
3948         Before this patch, method getRegionRangeForBox did not return true/false
3949         if it was able to retrieve the range and the caller checked the returned
3950         region values. I modified the method to return true if we were able to compute
3951         the range.
3952
3953         Tests: fast/regions/inline-block-inline-children-flowed-in-regions.html
3954                fast/regions/inline-blocks-dyn-enlarged-regions.html
3955                fast/regions/inline-blocks-dyn-shrunk-regions.html
3956                fast/regions/inline-blocks-in-two-regions.html
3957
3958         * inspector/InspectorOverlay.cpp:
3959         (WebCore::buildObjectForRendererFragments):
3960         * rendering/RenderBlock.cpp:
3961         (WebCore::RenderBlock::updateRegionRangeForBoxChild):
3962         * rendering/RenderBlockFlow.cpp:
3963         (WebCore::RenderBlockFlow::hasNextPage):
3964         * rendering/RenderBox.cpp:
3965         (WebCore::RenderBox::clampToStartAndEndRegions):
3966         (WebCore::RenderBox::borderBoxRectInRegion):
3967         (WebCore::RenderBox::computeRectForRepaint):
3968         (WebCore::RenderBox::layoutOverflowRectForPropagation):
3969         * rendering/RenderBoxModelObject.cpp:
3970         (WebCore::RenderBoxModelObject::mapAbsoluteToLocalPoint):
3971         * rendering/RenderFlowThread.cpp:
3972         (WebCore::RenderFlowThread::regionForCompositedLayer):
3973         (WebCore::RenderFlowThread::adjustedPositionRelativeToOffsetParent):
3974         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
3975         (WebCore::RenderFlowThread::logicalWidthChangedInRegionsForBlock):
3976         (WebCore::RenderFlowThread::getRegionRangeForBoxFromCachedInfo):
3977         (WebCore::RenderFlowThread::getRegionRangeForBox):
3978         (WebCore::RenderFlowThread::objectShouldPaintInFlowRegion):
3979         (WebCore::RenderFlowThread::objectInFlowRegion):
3980         (WebCore::RenderFlowThread::addRegionsVisualEffectOverflow):
3981         (WebCore::RenderFlowThread::addRegionsVisualOverflowFromTheme):
3982         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
3983         (WebCore::RenderFlowThread::addRegionsLayoutOverflow):
3984         (WebCore::RenderFlowThread::addRegionsVisualOverflow):
3985         (WebCore::RenderFlowThread::clearRegionsOverflow):
3986         * rendering/RenderFlowThread.h:
3987         * rendering/RenderNamedFlowThread.cpp:
3988         (WebCore::RenderNamedFlowThread::fragmentFromAbsolutePointAndBox):
3989         * rendering/RenderObject.cpp:
3990         (WebCore::RenderObject::locateFlowThreadContainingBlock):
3991         Make sure we return the right render flow thread in the case of
3992         region-based multicolumn inside named flows.
3993         * rendering/RenderRegion.cpp:
3994         (WebCore::RenderRegion::rectFlowPortionForBox):
3995
3996 2014-03-19  Krzysztof Wolanski  <k.wolanski@samsung.com>
3997
3998         [EFL] vibration/cancelVibration-during-pattern-vibrating.html is failing after r165598
3999         https://bugs.webkit.org/show_bug.cgi?id=130333
4000
4001         Reviewed by Gyuyoung Kim.
4002
4003         Added setting m_state when calling Vibration::vibrate. It was missing after
4004         refactoring Vibration (r165598).
4005
4006         * Modules/vibration/Vibration.cpp:
4007         (WebCore::Vibration::vibrate):
4008
4009 2014-03-19  Sam Weinig  <sam@webkit.org>
4010
4011         Rewrite WebHTMLConverter::_colorForNode in C++
4012         https://bugs.webkit.org/show_bug.cgi?id=130443
4013
4014         Reviewed by Andreas Kling.
4015
4016         * platform/mac/HTMLConverter.mm:
4017         (_platformColor):
4018         Rename from _colorForRGBColor and simplify to just do the platform conversion.
4019
4020         (normalizedColor):
4021         Extract normalization out of _colorForRGBColor and remove cases that are impossible to hit
4022         due to us only ever using the device color space.
4023
4024         (HTMLConverterCaches::colorPropertyValueForNode):
4025         (-[WebHTMLConverter _colorForNode:property:]):
4026         Convert to C++.
4027
4028         (-[WebHTMLConverter dealloc]):
4029         (-[WebHTMLConverter init]):
4030         Remove caches, we already cache in ColorMac.
4031
4032 2014-03-18  Andrei Bucur  <abucur@adobe.com>
4033
4034         [CSS Regions] Strange layout for content with region breaks
4035         https://bugs.webkit.org/show_bug.cgi?id=121318
4036
4037         Reviewed by Mihnea Ovidenie.
4038
4039         When break-inside: avoid is used on an element, the implementation tries to
4040         force it inside a single fragmentation container even though the descendants
4041         of the element specify forced breaks. This leads to unexpected results and
4042         unstable layout.
4043
4044         The change extends the definition of unsplittable elements for flow threads
4045         using the same conditions found inside RenderBlockFlow::adjustForUnsplittableChild.
4046         This change forces elements that require break avoidance to have a single region
4047         in the region range. As a result, forced breaks have no effect inside them.
4048
4049         It should be noted this may not the behavior defined by the CSS3 Fragmentation spec.
4050         From my understanding of the text, forced breaks override any avoidance specified
4051         by ancestor elements. However, implementing this is a larger change that will require
4052         a fundamental new approach in handling break avoidance. This patch just brings
4053         consistency to the API.
4054
4055         Test: fast/regions/forced-break-inside-avoid-break.html
4056
4057         * rendering/RenderBlock.cpp:
4058         (WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation):
4059         (WebCore::RenderBlock::computeRegionRangeForBoxChild):
4060         (WebCore::RenderBlock::estimateRegionRangeForBoxChild):
4061         * rendering/RenderBlock.h:
4062         * rendering/RenderBlockFlow.cpp:
4063         (WebCore::RenderBlockFlow::adjustForUnsplittableChild): Move the avoidance conditions inside
4064         a helper method RenderBlock::childBoxIsUnsplittableForFragmentation.
4065
4066 2014-03-18  Samuel White  <samuel_white@apple.com>
4067
4068         AX: Not able to use arrow keys to read text with VoiceOver before selection is set someplace (anyplace).
4069         https://bugs.webkit.org/show_bug.cgi?id=130250
4070
4071         Reviewed by Chris Fleizach.
4072
4073         If initial selection isn't set when we handle selection movement for accessibility, we need to set it. If we don't, using arrow
4074         keys to read text with VoiceOver doesn't work as expected. Things will only start working after the user holds shift and arrows
4075         around to select any arbitrary thing to force selection to get set. This logic handles that special case more gracefully.
4076
4077         Test: platform/mac/accessibility/selection-initial.html
4078
4079         * page/EventHandler.cpp:
4080         (WebCore::handleKeyboardSelectionMovement):
4081