Improve the offsetWidth/Height layout optimization
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-03-25  David Hyatt  <hyatt@apple.com>
2
3         Improve the offsetWidth/Height layout optimization
4         https://bugs.webkit.org/show_bug.cgi?id=143008
5
6         Reviewed by Zalan Bujtas.
7
8         * dom/Document.cpp:
9         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
10         * dom/Document.h:
11         Change Element* to Element&. Clean up the dimension bits to use shifting. Remove both the inline and
12         the positioning restrictions on the optimization check.
13
14         * dom/Element.cpp:
15         (WebCore::Element::offsetWidth):
16         (WebCore::Element::offsetHeight):
17         Change to use Element& instead of Element*.
18
19         (WebCore::Element::clientWidth):
20         (WebCore::Element::clientHeight):
21         (WebCore::Element::scrollWidth):
22         (WebCore::Element::scrollHeight):
23         Turn on the optimization for clientWidth/Height and scrollWidth/Height.
24
25 2015-03-26  Brady Eidson  <beidson@apple.com>
26
27         Apply ContentExtension actions after redirects.
28         <rdar://problem/20062613> and https://bugs.webkit.org/show_bug.cgi?id=143055
29
30         Reviewed by Alex Christensen.
31
32         Tests: http/tests/contentextensions/loading/main-resource-redirect-blocked.php
33                http/tests/contentextensions/subresource-redirect-blocked.html
34
35         This patch moves the "run a URL against the content extension" code from CachedResourceLoader to
36         the ContentExtensionsBackend.
37
38         That allows it to be shared between the CachedResourceLoader where loads are initiated and 
39         ResourceLoader where redirects are handled.
40
41         * contentextensions/ContentExtension.cpp:
42         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
43
44         * contentextensions/ContentExtensionsBackend.cpp:
45         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
46         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
47         * contentextensions/ContentExtensionsBackend.h:
48
49         * loader/NetscapePlugInStreamLoader.cpp:
50         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
51
52         * loader/ResourceLoadInfo.h:
53
54         * loader/ResourceLoader.cpp:
55         (WebCore::ResourceLoader::ResourceLoader):
56         (WebCore::ResourceLoader::willSendRequest):
57         * loader/ResourceLoader.h:
58
59         * loader/SubresourceLoader.cpp:
60         (WebCore::SubresourceLoader::SubresourceLoader):
61
62         * loader/cache/CachedResourceLoader.cpp:
63         (WebCore::CachedResourceLoader::requestResource):
64
65         * page/UserContentController.cpp:
66         (WebCore::UserContentController::processContentExtensionRulesForLoad):
67         (WebCore::UserContentController::actionsForResourceLoad): Deleted.
68         (WebCore::UserContentController::globalDisplayNoneStyleSheet): Deleted.
69         (WebCore::UserContentController::displayNoneCSSRule): Deleted.
70         * page/UserContentController.h:
71
72 2015-03-26  Myles C. Maxfield  <mmaxfield@apple.com>
73
74         Crash when laying out (char)0
75         https://bugs.webkit.org/show_bug.cgi?id=143103
76
77         Reviewed by Dean Jackson.
78
79         We currently cache a character -> Font mapping in a HashMap.
80         However, keys in Hashmaps can't be 0. This patch simply skips
81         the cache in this case.
82
83         No new tests, for now. I'm having trouble creating a test because
84         the site that causes this bug generates their page using script,
85         and the script is all minified, and difficult to understand. I
86         will contact the owner of the site and ask for and unminified
87         version of their sources. However, I don't want to that to block
88         this tiny fix from going in.
89
90         * platform/graphics/Font.cpp:
91         (WebCore::Font::systemFallbackFontForCharacter):
92
93 2015-03-26  Jer Noble  <jer.noble@apple.com>
94
95         [Mac][EME] Crash at com.apple.WebCore: WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys + 177
96         https://bugs.webkit.org/show_bug.cgi?id=143080
97
98         Reviewed by Eric Carlson.
99
100         Null-check m_certificate before dereferencing.
101
102         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
103         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
104
105 2015-03-26  Chris Fleizach  <cfleizach@apple.com>
106
107         AX: [role="button"][aria-pressed] should be exposed as AXCheckbox:AXToggleButton, with role description of "toggle button"
108         https://bugs.webkit.org/show_bug.cgi?id=115298
109
110         Reviewed by Mario Sanchez Prada.
111
112         A role=button + aria-pressed object should be exposed as AXCheckbox on Mac now. It should also convert the
113         aria-pressed state into a 0, 1, 2 number value for the Mac.
114
115         Test: platform/mac/accessibility/aria-pressed-button-attributes.html
116
117         * accessibility/AccessibilityObject.cpp:
118         (WebCore::AccessibilityObject::checkboxOrRadioValue):
119         * accessibility/AccessibilityObject.h:
120         (WebCore::AccessibilityObject::isToggleButton):
121         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
122         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
123         (createAccessibilityRoleMap):
124         (-[WebAccessibilityObjectWrapper subrole]):
125         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
126
127 2015-03-25  Dean Jackson  <dino@apple.com>
128
129         CSS blend modes do not parse when in the shadow tree
130         https://bugs.webkit.org/show_bug.cgi?id=143067
131         <rdar://problem/20302662>
132
133         Reviewed by Anders Carlson.
134
135         The media controls style sheets are injected as UA stylesheets
136         when we come across a <video> or <audio> element. These stylesheets
137         have a different parsing context than the document stylesheets -
138         one that uses the default constructor, which initializes some
139         features like cssCompositingEnabled to false without checking
140         the runtime state.
141
142         The easy fix is to use the global state to initialize the context.
143
144         Unfortunately we can't test this since it only occurs in the shadow
145         tree.
146
147         * css/CSSParser.cpp:
148         (WebCore::CSSParserContext::CSSParserContext): Check the state
149         of RuntimeEnabledFeatures to initialize CSS Regions and
150         CSS Compositing (Blending).
151
152 2015-03-25  Chris Fleizach  <cfleizach@apple.com>
153
154         AX: table cells that use display:block render the table inaccessible to VoiceOver
155         https://bugs.webkit.org/show_bug.cgi?id=143007
156
157         Reviewed by Mario Sanchez Prada.
158
159         When display:block is used on a table cell, it was being ignored because it was anonymous.
160         This is still a valid scenario however if it's still inside of a valid table.
161
162         Test: accessibility/table-cell-display-block.html
163
164         * accessibility/AccessibilityTableCell.cpp:
165         (WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored):
166
167 2015-03-25  Tim Horton  <timothy_horton@apple.com>
168
169         Add a preference to prevent "user-scalable=no" from having any effect
170         https://bugs.webkit.org/show_bug.cgi?id=143032
171
172         Reviewed by Sam Weinig.
173
174         * page/ViewportConfiguration.cpp:
175         (WebCore::ViewportConfiguration::ViewportConfiguration):
176         (WebCore::ViewportConfiguration::allowsUserScaling):
177         * page/ViewportConfiguration.h:
178         (WebCore::ViewportConfiguration::setForceAlwaysUserScalable):
179         If forceAlwaysUserScalable is set to true, force "user-scalable=yes".
180
181 2015-03-25  Dan Bernstein  <mitz@apple.com>
182
183         Another attempt to get the iOS EWS building again.
184
185         * WebCore.xcodeproj/project.pbxproj:
186
187 2015-03-25  Alex Christensen  <achristensen@webkit.org>
188
189         Add case-insensitive checks to DFA bytecode.
190         https://bugs.webkit.org/show_bug.cgi?id=142977
191
192         Reviewed by Benjamin Poulain.
193
194         * contentextensions/DFABytecode.h:
195         (WebCore::ContentExtensions::instructionSizeWithArguments):
196         * contentextensions/DFABytecodeCompiler.cpp:
197         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
198         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
199         Add case-insensitive bytecode.
200         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
201         Check to see if case-insensitive bytecodes can be used.
202         (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
203         * contentextensions/DFABytecodeCompiler.h:
204         (WebCore::ContentExtensions::DFABytecodeCompiler::Range::Range):
205         Added Range structure to be able to count the ranges in a future patch deciding if we want to use jump tables.
206         * contentextensions/DFABytecodeInterpreter.cpp:
207         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
208         Interpret case-insensitive bytecodes.
209
210 2015-03-25  Sam Weinig  <sam@webkit.org>
211
212         Address additional review feedback from https://bugs.webkit.org/show_bug.cgi?id=143059.
213
214         * contentextensions/ContentExtensionCompiler.cpp:
215         (WebCore::ContentExtensions::compileRuleList):
216         * contentextensions/ContentExtensionCompiler.h:
217         * contentextensions/ContentExtensionParser.cpp:
218         (WebCore::ContentExtensions::getTypeFlags):
219
220 2015-03-25  Sam Weinig  <sam@webkit.org>
221
222         [Content Extensions] Convert content extension compiling to return error codes and write its output using a client
223         https://bugs.webkit.org/show_bug.cgi?id=143059
224
225         Reviewed by Alex Christensen.
226
227         * WebCore.xcodeproj/project.pbxproj:
228         Add ContentExtensionError.h/cpp.
229
230         * contentextensions/ContentExtensionError.cpp: Added.
231         (WebCore::ContentExtensions::contentExtensionErrorCategory):
232         * contentextensions/ContentExtensionError.h: Added.
233         (WebCore::ContentExtensions::make_error_code):
234         Add ContentExtensionError enum and std::error_code adaptor.
235
236         * contentextensions/ContentExtensionCompiler.h:
237         Instead of returning CompiledContentExtensionData, use a client interface
238         to pass data. Eventually, this should be turned into a direct streaming 
239         interface so we can write directly to a file.
240
241         * contentextensions/ContentExtensionCompiler.cpp:
242         (WebCore::ContentExtensions::compileRuleList):
243         * contentextensions/ContentExtensionParser.cpp:
244         (WebCore::ContentExtensions::getTypeFlags):
245         (WebCore::ContentExtensions::loadTrigger):
246         (WebCore::ContentExtensions::loadAction):
247         (WebCore::ContentExtensions::loadRule):
248         (WebCore::ContentExtensions::loadEncodedRules):
249         (WebCore::ContentExtensions::parseRuleList):
250         * contentextensions/ContentExtensionParser.h:
251         Convert to return an error.
252
253 2015-03-25  Beth Dakin  <bdakin@apple.com>
254
255         REGRESSION (r181660): Safari navigates to link after a starting and canceling a 
256         force preview
257         https://bugs.webkit.org/show_bug.cgi?id=143057
258         -and corresponding-
259         rdar://problem/20251436
260
261         Reviewed by Tim Horton.
262
263         This patch adds a value for ActionUpdated to the ImmediateActionStage enum. Now if 
264         m_immediateActionStage indicates that an immediate action has either begun or 
265         completed then we can have the same behavior.
266         * page/EventHandler.cpp:
267         (WebCore::EventHandler::handleMouseReleaseEvent):
268         * page/EventHandler.h:
269
270 2015-03-25  Dean Jackson  <dino@apple.com>
271
272         MediaControls: Use font with fixed number width
273         https://bugs.webkit.org/show_bug.cgi?id=143018
274         <rdar://problem/20245415>
275
276         Reviewed by Eric Carlson.
277
278         Add a new font-family, specific to Apple platforms,
279         called -apple-system-font-monospaced-numbers. This is
280         a special variant of the system font which uses monospaced
281         forms for the number glyphs - allowing a time reading that
282         doesn't bounce around as the time changes.
283
284         * Modules/mediacontrols/mediaControlsApple.css: Media controls should
285         use the new font.
286         (audio::-webkit-media-controls-time-remaining-display):
287         * Modules/mediacontrols/mediaControlsiOS.css:
288         (audio::-webkit-media-controls-time-remaining-display):
289
290         * platform/graphics/ios/FontCacheIOS.mm: Request a new CTFontRef with
291         the appropriate attributes.
292         (WebCore::createCTFontWithFamilyNameAndWeight):
293         * platform/graphics/mac/FontCacheMac.mm: Ditto, but NSFont.
294         (WebCore::fontWithFamily):
295         * platform/spi/cocoa/CoreTextSPI.h: Expose the constants for
296         the new form so that the public SDK can build.
297
298 2015-03-25  Alex Christensen  <achristensen@webkit.org>
299
300         [Content Extensions] Add multi-DFA compiling and interpreting.
301         https://bugs.webkit.org/show_bug.cgi?id=143010
302
303         Reviewed by Benjamin Poulain.
304
305         * contentextensions/ContentExtensionCompiler.cpp:
306         (WebCore::ContentExtensions::compileRuleList):
307         Compile multiple NFAs to DFAs.
308         * contentextensions/ContentExtensionsBackend.cpp:
309         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
310         Fixed a bug when there are no non-universal actions.
311         We still need to report that no ignore-previous-rules was hit to apply the
312         universal actions which are now accessed through DFABytecodeInterpreter::actionsFromDFARoot
313         and skipped in DFABytecodeInterpreter::interpret.
314         * contentextensions/DFABytecodeCompiler.cpp:
315         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
316         Add a header for each DFA.
317         * contentextensions/DFABytecodeInterpreter.cpp:
318         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
319         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
320         Interpret as many DFAs as there are in the bytecode.
321
322 2015-03-25  Per Arne Vollan  <peavo@outlook.com>
323
324         [Win] Illegal character in project file.
325         https://bugs.webkit.org/show_bug.cgi?id=143051
326
327         Reviewed by Brent Fulgham.
328
329         There is an illegal character in the WebCore project filter.
330         WebCore files are shown unfiltered.
331
332         * WebCore.vcxproj/WebCore.vcxproj.filters:
333
334 2015-03-25  David Hyatt  <hyatt@apple.com>
335
336         Add a pref to enable the new block-inside-inline model
337         https://bugs.webkit.org/show_bug.cgi?id=143050
338
339         Reviewed by Sam Weinig.
340
341         * page/Settings.in:
342
343 2015-03-25  Dan Bernstein  <mitz@apple.com>
344
345         iOS Simulator build fix.
346
347         * platform/spi/cocoa/IOSurfaceSPI.h:
348
349 2015-03-25  Commit Queue  <commit-queue@webkit.org>
350
351         Unreviewed, rolling out r181932.
352         https://bugs.webkit.org/show_bug.cgi?id=143041
353
354         The test fails most of the time on bots (Requested by ap on
355         #webkit).
356
357         Reverted changeset:
358
359         "[Content Extensions] Add multi-DFA compiling and
360         interpreting."
361         https://bugs.webkit.org/show_bug.cgi?id=143010
362         http://trac.webkit.org/changeset/181932
363
364 2015-03-24  Dean Jackson  <dino@apple.com>
365
366         Source/WebCore/rendering/RenderThemeMac.mm:2181:118: error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
367         https://bugs.webkit.org/show_bug.cgi?id=143039
368
369         Unreviewed build fix for newer versions of OS X.
370
371         * rendering/RenderThemeMac.mm: Define a null language parameter. This
372         seemed better than turning the clang warning off for just that
373         function.
374         (WebCore::AttachmentLayout::layOutTitle):
375         (WebCore::AttachmentLayout::layOutSubtitle):
376
377 2015-03-24  Dan Bernstein  <mitz@apple.com>
378
379         Another attempt to fix the build.
380
381         * WebCore.xcodeproj/project.pbxproj:
382         * platform/spi/cocoa/QuartzCoreSPI.h:
383
384 2015-03-24  Alex Christensen  <achristensen@webkit.org>
385
386         [Content Extensions] Add multi-DFA compiling and interpreting.
387         https://bugs.webkit.org/show_bug.cgi?id=143010
388
389         Reviewed by Benjamin Poulain.
390
391         * contentextensions/ContentExtensionCompiler.cpp:
392         (WebCore::ContentExtensions::compileRuleList):
393         Compile multiple NFAs to DFAs.
394         * contentextensions/ContentExtensionsBackend.cpp:
395         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
396         Fixed a bug when there are no non-universal actions.
397         We still need to report that no ignore-previous-rules was hit to apply the
398         universal actions which are now accessed through DFABytecodeInterpreter::actionsFromDFARoot
399         and skipped in DFABytecodeInterpreter::interpret.
400         * contentextensions/DFABytecodeCompiler.cpp:
401         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
402         Add a header for each DFA.
403         * contentextensions/DFABytecodeInterpreter.cpp:
404         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
405         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
406         Interpret as many DFAs as there are in the bytecode.
407
408 2015-03-24  Dan Bernstein  <mitz@apple.com>
409
410         Tried to fix the EWS build.
411
412         * platform/spi/cocoa/QuartzCoreSPI.h:
413
414 2015-03-24  Commit Queue  <commit-queue@webkit.org>
415
416         Unreviewed, rolling out r181898 and r181909.
417         https://bugs.webkit.org/show_bug.cgi?id=143034
418
419         Broke fast/regions/auto-size/autoheight-two-pass-layout-
420         complex-002.html (Requested by ap on #webkit).
421
422         Reverted changesets:
423
424         "Improve the offsetWidth/Height layout optimization"
425         https://bugs.webkit.org/show_bug.cgi?id=143008
426         http://trac.webkit.org/changeset/181898
427
428         "Disable layout dimensions optimization for RenderRegions"
429         https://bugs.webkit.org/show_bug.cgi?id=143017
430         http://trac.webkit.org/changeset/181909
431
432 2015-03-24  Zhuo Li  <zachli@apple.com>
433
434         Scripts running in isolated world should not subject to a page's CSP about 'eval'.
435         https://bugs.webkit.org/show_bug.cgi?id=141316.
436
437         Reviewed by Geoffrey Garen.
438
439         * bindings/js/ScriptController.cpp:
440         (WebCore::ScriptController::initScript):
441         We should not impose the main world Content Security Policy onto the isolated world.
442
443 2015-03-24  Chris Dumez  <cdumez@apple.com>
444
445         [Mac] Use .cpp file extension instead of .mm for SharedTimerCF and PowerObserverMac
446         https://bugs.webkit.org/show_bug.cgi?id=143026
447
448         Reviewed by Andy Estes.
449
450         Use .cpp file extension instead of .mm for SharedTimerCF and
451         PowerObserverMac.
452
453         * WebCore.xcodeproj/project.pbxproj:
454         * platform/cf/SharedTimerCF.cpp: Renamed from Source/WebCore/platform/cf/SharedTimerCF.mm.
455         (WebCore::timerFired):
456         Use WTF::AutodrainedPool instead of @autoreleasepool {}.
457
458         * platform/mac/PowerObserverMac.cpp: Renamed from Source/WebCore/platform/mac/PowerObserverMac.mm.
459
460 2015-03-24  Yusuke Suzuki  <utatane.tea@gmail.com>
461
462         REGRESSION (r181458): Heap use-after-free in JSSetIterator destructor
463         https://bugs.webkit.org/show_bug.cgi?id=142696
464
465         Reviewed and tweaked by Geoffrey Garen.
466
467         Use JSSetIterator/JSMapIterator to iterate over JSSet and JSMap.
468
469         * ForwardingHeaders/runtime/JSMapIterator.h: Added.
470         * ForwardingHeaders/runtime/JSSetIterator.h: Added.
471         * bindings/js/SerializedScriptValue.cpp:
472         (WebCore::CloneSerializer::serialize):
473
474 2015-03-24  Dan Bernstein  <mitz@apple.com>
475
476         Tried to fix the iOS Simulator build.
477
478         * platform/spi/cocoa/QuartzCoreSPI.h:
479
480 2015-03-24  Benjamin Poulain  <bpoulain@apple.com>
481
482         Make URL filter patterns matching consistent and add a simple canonicalization step
483         https://bugs.webkit.org/show_bug.cgi?id=142998
484
485         Reviewed by Alex Christensen.
486
487         This patch makes two changes to the url filter input:
488         -Make the matching "Search" by default, the pattern can now appear anywhere
489          in the URL by default.
490         -Make the input a little less fragile: do not explode on valid input
491          that is not formatted in a certain way.
492
493         To implement the search behavior, I simply add an implict ".*" in front of the patterns
494         when that make sense.
495
496         To make the input more solid, we do some little modification on the input:
497         -Remove duplicated ".*".
498         -Remove matching suffixes that do not bring new information.
499         -Unify all the ".*" in the same format.
500
501         Why do that here? That should be done through a graph analysis on the machine.
502
503         The reason is this is incredibly cheap compared to the graph analysis. Any state
504         removed upfront will save the handling of several hundred nodes in the deterministic
505         graph.
506
507         * contentextensions/URLFilterParser.cpp:
508         (WebCore::ContentExtensions::Term::isKnownToMatchAnyString):
509         (WebCore::ContentExtensions::Term::isUniversalTransition):
510         (WebCore::ContentExtensions::GraphBuilder::finalize):
511         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
512         (WebCore::ContentExtensions::GraphBuilder::fail):
513         (WebCore::ContentExtensions::GraphBuilder::simplifySunkTerms):
514
515 2015-03-24  Chris Dumez  <cdumez@apple.com>
516
517         Regression(r181671): Caused Timer-related crashes on iOS / WK1
518         https://bugs.webkit.org/show_bug.cgi?id=143025
519
520         Reviewed by Andy Estes.
521
522         Call CFRunLoopAddTimer() on WebThreadRunLoop() instead of
523         CFRunLoopGetCurrent() for iOS, as we did before r181671.
524
525         I inadvertently changed this in r181671 when merging the Mac
526         and iOS implementations.
527
528         No new tests, already covered by existing tests.
529
530         * platform/cf/SharedTimerCF.mm:
531         (WebCore::setSharedTimerFireInterval):
532
533 2015-03-24  Dan Bernstein  <mitz@apple.com>
534
535         WebCore part of <rdar://problem/20282863> Transforms are flattened in snapshots of on-screen WKWebViews
536         https://bugs.webkit.org/show_bug.cgi?id=143023
537
538         Reviewed by Tim Horton.
539
540         * platform/spi/cocoa/QuartzCoreSPI.h: Added the declaration of
541         CARenderServerRenderLayerWithTransform.
542
543 2015-03-24  David Hyatt  <hyatt@apple.com>
544
545         Disable layout dimensions optimization for RenderRegions
546         https://bugs.webkit.org/show_bug.cgi?id=143017
547
548         Reviewed by Dean Jackson.
549
550         * dom/Document.cpp:
551         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
552         Turn off the optimization for regions, since auto height regions can change size
553         without needing a layout.
554
555 2015-03-24  Beth Dakin  <bdakin@apple.com>
556
557         Add events related to force click gesture
558         https://bugs.webkit.org/show_bug.cgi?id=142836
559         -and corresponding-
560         rdar://problem/20210239
561
562         Reviewed by Dean Jackson.
563
564         This patch adds six new events for the force click gesture:
565
566         webkitmouseforcewillbegin -> Event is sent just before mousedown to indicate that 
567         force can be perceived if the user presses any harder. The author should prevent 
568         default on this event to both prevent the user agent’s default force click 
569         features and to receive the other 5 events.
570
571         webkitmouseforcechanged -> This event fires whenever force changes between the 
572         mousedown and mouseup. It is a new type of mouse event that includes a force 
573         variable which is a normalized number between 0 (corresponds to click) and 1 
574         (corresponds to force click). In this patch, I have only added code to send this 
575         event between mousedown and mouseforcedown, but as a followup patch, we plan to 
576         send it through mouseup.
577
578         webkitmouseforcecancelled -> If the user releases their finger from the trackpad 
579         after pressing hard enough to send webkitmouseforcewillbegin events but not hard 
580         enough to force click, this event will be sent to indicate that the user bailed 
581         out on the gesture.
582
583         webkitmouseforcedown -> The down part of the force click.
584
585         webkitmouseforceup -> The up part of the force click. This event is added in this 
586         patch, but does not yet fire. That is work for a follow-up patch.
587
588         webkitmouseforceclick -> The equivalent of the click event for the force click. 
589         Should fire just after webkitmouseforceup. This event is added in this patch, but 
590         does not yet fire. That is work for a follow-up patch.
591
592         Add new files for WebKitMouseForceEvent to build systems.
593         * DerivedSources.cpp:
594         * DerivedSources.make:
595         * WebCore.vcxproj/WebCore.vcxproj:
596         * WebCore.vcxproj/WebCore.vcxproj.filters:
597         * WebCore.xcodeproj/project.pbxproj:
598         * WebCore.xcodeproj/project.pbxproj:
599
600         Plumbing for new events.
601         * dom/Document.idl:
602
603         Code to dispatch the new events. Currently the code that calls these functions is 
604         in WebKit2.
605         * dom/Element.cpp:
606         (WebCore::Element::dispatchMouseForceWillBegin):
607         (WebCore::Element::dispatchMouseForceChanged):
608         (WebCore::Element::dispatchMouseForceDown):
609         (WebCore::Element::dispatchMouseForceUp):
610         (WebCore::Element::dispatchMouseForceClick):
611         (WebCore::Element::dispatchMouseForceCancelled):
612         * dom/Element.h:
613
614         More plumbing.
615         * dom/Element.idl:
616         * dom/EventNames.h:
617         * dom/EventNames.in:
618
619         Our new type of mouse event that includes force.
620         * dom/WebKitMouseForceEvent.cpp: Added.
621         (WebCore::WebKitMouseForceEventInit::WebKitMouseForceEventInit):
622         (WebCore::WebKitMouseForceEvent::WebKitMouseForceEvent):
623         (WebCore::WebKitMouseForceEvent::~WebKitMouseForceEvent):
624         (WebCore::WebKitMouseForceEvent::eventInterface):
625         * dom/WebKitMouseForceEvent.h: Added.
626         * dom/WebKitMouseForceEvent.idl: Added.
627
628         More plumbing.
629         * html/HTMLAttributeNames.in:
630         * html/HTMLBodyElement.cpp:
631         (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
632         * html/HTMLBodyElement.idl:
633         * html/HTMLElement.cpp:
634         (WebCore::HTMLElement::createEventHandlerNameMap):
635         * page/DOMWindow.idl:
636         * page/EventHandler.h:
637         (WebCore::EventHandler::lastMouseDownEvent):
638
639 2015-03-24  Anders Carlsson  <andersca@apple.com>
640
641         Fix designated initializer violations
642         https://bugs.webkit.org/show_bug.cgi?id=143016
643         rdar://problem/20268858
644
645         Reviewed by Dan Bernstein.
646
647         Mark -[DOMObject init] as unavailable.
648
649         * bindings/objc/DOMObject.h:
650         * bindings/objc/DOMObject.mm:
651         (-[DOMObject init]):
652
653 2015-03-24  Benjamin Poulain  <benjamin@webkit.org>
654
655         CSS Selectors Level 4: enable case-insensitive attribute matching by default
656         https://bugs.webkit.org/show_bug.cgi?id=142960
657
658         Reviewed by Andreas Kling.
659
660         All open issues have been resolved, enable the feature by default.
661
662         Test: fast/css/attribute-selector-case-insensitive.html
663
664         * css/CSSGrammar.y.in:
665
666 2015-03-24  Dean Jackson  <dino@apple.com>
667
668         MediaControls: Scrubber and Time displays have the incorrect blending
669         https://bugs.webkit.org/show_bug.cgi?id=143011
670         <rdar://problem/20245251>
671
672         Reviewed by Eric Carlson.
673
674         The scrubber in media controls should use plus-darker blending. Then
675         the scrubber itself should use a slightly transparent black (55% opacity)
676         when drawing.
677
678         * Modules/mediacontrols/mediaControlsiOS.css:
679         (audio::-webkit-media-controls-timeline): Add the blend mode.
680         * Modules/mediacontrols/mediaControlsiOS.js:
681         (ControllerIOS.prototype.drawTimelineBackground): Start drawing with
682         transparency. I changed the order of rendering to make it
683         more clear we draw the three parts in left to right order.
684
685 2015-03-24  David Hyatt  <hyatt@apple.com>
686
687         Improve the offsetWidth/Height layout optimization
688         https://bugs.webkit.org/show_bug.cgi?id=143008
689
690         Reviewed by Dean Jackson.
691
692         * dom/Document.cpp:
693         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
694         * dom/Document.h:
695         Change Element* to Element&. Clean up the dimension bits to use shifting. Remove both the inline and
696         the positioning restrictions on the optimization check.
697
698         * dom/Element.cpp:
699         (WebCore::Element::offsetWidth):
700         (WebCore::Element::offsetHeight):
701         Change to use Element& instead of Element*.
702
703         (WebCore::Element::clientWidth):
704         (WebCore::Element::clientHeight):
705         (WebCore::Element::scrollWidth):
706         (WebCore::Element::scrollHeight):
707         Turn on the optimization for clientWidth/Height and scrollWidth/Height.
708
709 2015-03-24  Yoav Weiss  <yoav@yoav.ws>
710
711         Stop image from displaying when src attribute is removed or emptied
712         https://bugs.webkit.org/show_bug.cgi?id=142677
713
714         Reviewed by Chris Dumez.
715
716         Previously, we ignored empty attribute as failed URL, and didn't update the
717         renderer when an image was removed. This patch fixes that.
718
719         Tests: fast/dom/HTMLImageElement/image-empty-src.html
720                fast/dom/HTMLImageElement/image-remove-src.html
721
722         * loader/ImageLoader.cpp:
723         (WebCore::ImageLoader::updateFromElement):
724
725 2015-03-17  Philippe Normand  <pnormand@igalia.com>
726
727         [OpenWebRTC] RealtimeMediaSourceCenter implementation
728         https://bugs.webkit.org/show_bug.cgi?id=142476
729
730         Reviewed by Eric Carlson.
731
732         The old GStreamer MediaStreamCenter is replaced by the OpenWebRTC
733         RealtimeMediaSourceCenter. It is not yet able to correctly assess
734         MediaConstraints so it selects the first audio/video sources
735         available through OpenWebRTC.
736
737         * PlatformEfl.cmake: Add new files to the build.
738         * PlatformGTK.cmake: Ditto.
739         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Removed.
740         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp: Added.
741         (WebCore::initializeOpenWebRTC): Simple function to initialize the
742         framework, it is going to be used by the PeerConnection backend as well.
743         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.h: Added.
744         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp: Added.
745         (WebCore::mediaSourcesAvailableCallback): Function invoked once
746         the media sources discovery succeeded within OpenWebRTC.
747         (WebCore::RealtimeMediaSourceCenter::platformCenter): Instantiate
748         the OpenWebRTC RealtimeMediaSourceCenter.
749         (WebCore::RealtimeMediaSourceCenterOwr::RealtimeMediaSourceCenterOwr):
750         (WebCore::RealtimeMediaSourceCenterOwr::~RealtimeMediaSourceCenterOwr):
751         (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
752         Schedule a discovery process for the capture sources.
753         (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Pick
754         the first audio/video sources and create a MediaStream accordingly.
755         (WebCore::RealtimeMediaSourceCenterOwr::getMediaStreamTrackSources):
756         Not yet implemented.
757         (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
758         Method invoked once the capture sources process succeeded. Parse
759         them and create an internal cache of RealtimeMediaSources accordingly.
760         (WebCore::RealtimeMediaSourceCenterOwr::firstSource): Utility
761         function to fetch the first source of the given type from the
762         RealtimeMediaSources cache.
763         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h: Renamed from Source/WebCore/platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h.
764         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h: Added.
765
766 2015-03-24  Csaba Osztrogonác  <ossy@webkit.org>
767
768         [EFL] Add OpenWebRTC in jhbuild
769         https://bugs.webkit.org/show_bug.cgi?id=142778
770
771         Reviewed by Gyuyoung Kim.
772
773         Original patch by Philippe Normand <pnormand@igalia.com>
774
775         * PlatformEfl.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.
776
777 2015-03-23 Yoav Weiss  <yoav@yoav.ws>
778
779         Update empty image canvas tests and fix a related bug
780         https://bugs.webkit.org/show_bug.cgi?id=142694
781
782         Reviewed by Chris Dumez.
783
784         During the work on https://bugs.webkit.org/show_bug.cgi?id=142677
785         we encountered an issue with canvas tests related to empty image handling
786         when drawn or used as a pattern. After updating these tests, an issue with
787         pattern handling was encountered.
788
789         The spec, as well as Chrome's implementation, say that when an empty image
790         is used as a pattern, createPattern should return null. See
791         https://html.spec.whatwg.org/multipage/scripting.html#fill-and-stroke-styles:check-the-usability-of-the-image-argument
792         Instead, createPattern returned an exception in this case.
793         This patch fixes that and makes sure that it returns a null when image loading hasn't started.
794
795         Tests: canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html
796                canvas/philip/tests/2d.drawImage.incomplete.nosrc.html
797                canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html
798                canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html
799                canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html
800
801         * html/canvas/CanvasRenderingContext2D.cpp:
802         (WebCore::CanvasRenderingContext2D::createPattern): Return "null" if image is not fully decodeable.
803
804 2015-03-23  Alex Christensen  <achristensen@webkit.org>
805
806         Fix api tests after r181876.
807
808         * contentextensions/ContentExtensionsBackend.cpp:
809         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
810         Always append a CSSDisplayNoneStyleSheet action if no ignore-previous-rules is seen.
811         * loader/cache/CachedResourceLoader.cpp:
812         (WebCore::CachedResourceLoader::requestResource):
813         Changed an assertion to a null check.
814
815 2015-03-23  Dean Jackson  <dino@apple.com>
816
817         Timelines are sharing the same canvas background
818         https://bugs.webkit.org/show_bug.cgi?id=142994
819         <rdar://problem/20209466>
820
821         Reviewed by Brent Fulgham.
822
823         Since each MediaControl lives in an isolated world, we
824         can't rely on a global variable to provide a unique
825         identifier for a named canvas. The fix is to expose
826         WebCore's UUID generator, and have each canvas use
827         that for a name.
828
829         * Modules/mediacontrols/MediaControlsHost.cpp:
830         (WebCore::MediaControlsHost::generateUUID): New method on the
831         MediaControlsHost that generates a UUID.
832         * Modules/mediacontrols/MediaControlsHost.h:
833         * Modules/mediacontrols/MediaControlsHost.idl:
834
835         * Modules/mediacontrols/mediaControlsApple.js: Remove the global
836         variable unique ID that wasn't working, and instead get
837         an ID from the MediaControlsHost.
838         (Controller.prototype.createControls):
839         * Modules/mediacontrols/mediaControlsiOS.js:
840         (ControllerIOS):
841
842 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
843
844         Scroll latching logic can get stuck in 'scrollable="no"' iframes
845         https://bugs.webkit.org/show_bug.cgi?id=142789
846         <rdar://problem/20129494>
847
848         Reviewed by Dean Jackson.
849
850         Clean up the EventHandler and latching code as follows:
851         (1) Do not handle iframe elements as part of the normal latching logic. Instead, iframes should
852             be evaluated during the 'platformCompleteWheelEvent' phase of processing as top-level scrolling
853             frames.
854         (2) Get rid of the ill-conceived notation that we should process non-mainframe and main-frame frames
855             different.
856         (3) Modify code to reflect that the scroll latching code really deals with overflow scrolling. Consequently,
857             the 'findEnclosingScrollableContainer' was renamed to 'findEnclosingOverflowScroll' and does not
858             treat iframe as a suitable target.
859         (4) Do not create a latching state object when the container being evaluated is already scrolled to the
860             extreme position in the direction of the mouse gesture. In this case, we want the enclosing frame
861             to be the latching target.
862         (5) Do not treat the state where the mouse wheel gesture has ended manual scrolling, but has not ended
863             momentum scrolling, as an appropriate time to select a latching target.
864
865         * page/EventHandler.cpp:
866         (WebCore::EventHandler::platformCompleteWheelEvent): Modify signature to remove unneeded argument.
867         (WebCore::EventHandler::handleWheelEvent): Modify call to 'platformCompleteWheelEvent' to remove unused argument.
868         * page/EventHandler.h:
869         * page/mac/EventHandlerMac.mm:
870         (WebCore::findEnclosingOverflowScroll): Renamed from 'findEnclosingScrollableContainer' and revised per the
871         notes above.
872         (WebCore::EventHandler::platformPrepareForWheelEvents): Remove mainFrame vs. non-mainFrame code paths and
873         consolidate logic.
874         (WebCore::EventHandler::platformCompleteWheelEvent): Remove unused argument. The wheel event target is no
875         longer needed here, now that iframes are not processed by this code.
876         (WebCore::findEnclosingScrollableContainer): Deleted.
877         * page/scrolling/ScrollLatchingState.cpp:
878         (WebCore::ScrollLatchingState::setPreviousWheelScrolledElement:) Switch to move operator for passing
879         a temporary RefPtr to the the function.
880         * page/scrolling/ScrollLatchingState.h:
881         * platform/PlatformWheelEvent.h:
882         (WebCore::PlatformWheelEvent::useLatchedEventElement): Recognize 'phase=ended, momentum=none' as a state
883         that should not cause latching state to be revised.
884
885 2015-03-23  Anders Carlsson  <andersca@apple.com>
886
887         Try to fix the iOS build.
888
889         * platform/network/mac/CookieJarMac.mm:
890
891 2015-03-23  Brady Eidson  <beidson@apple.com>
892
893         Content extensions should apply css selectors
894         https://bugs.webkit.org/show_bug.cgi?id=142604
895
896         Reviewed by Alex Christensen.
897
898         Tests: http/tests/contentextensions/css-display-none.html
899
900         * WebCore.xcodeproj/project.pbxproj:
901
902         * contentextensions/ContentExtension.cpp:
903         (WebCore::ContentExtensions::ContentExtension::create):
904         (WebCore::ContentExtensions::ContentExtension::ContentExtension):
905         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
906         * contentextensions/ContentExtension.h:
907         (WebCore::ContentExtensions::ContentExtension::identifier):
908         (WebCore::ContentExtensions::ContentExtension::compiledExtension):
909
910         * contentextensions/ContentExtensionsBackend.cpp:
911         (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
912         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
913         (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
914         * contentextensions/ContentExtensionsBackend.h:
915
916         * contentextensions/DFABytecodeInterpreter.cpp:
917         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
918
919         * dom/DocumentStyleSheetCollection.cpp:
920         (WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet):
921         * dom/DocumentStyleSheetCollection.h:
922
923         * loader/DocumentLoader.cpp:
924         (WebCore::DocumentLoader::commitData):
925         (WebCore::DocumentLoader::startLoadingMainResource):
926         (WebCore::DocumentLoader::addPendingContentExtensionSheet):
927         * loader/DocumentLoader.h:
928
929         * loader/cache/CachedResourceLoader.cpp:
930         (WebCore::CachedResourceLoader::requestResource):
931
932         * loader/cache/CachedResourceRequest.cpp:
933         (WebCore::CachedResourceRequest::setInitiator):
934         * loader/cache/CachedResourceRequest.h:
935         (WebCore::CachedResourceRequest::initiatingDocumentLoader):
936
937         * page/UserContentController.cpp:
938         (WebCore::UserContentController::globalDisplayNoneStyleSheet):
939         (WebCore::UserContentController::displayNoneCSSRule):
940         * page/UserContentController.h:
941
942 2015-03-23  Anders Carlsson  <andersca@apple.com>
943
944         -[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:] doesn't remove cookies
945         https://bugs.webkit.org/show_bug.cgi?id=142990
946         rdar://problem/20241645
947
948         Reviewed by Andreas Kling.
949
950         Use the Mac version of deleteAllCookiesModifiedSince on iOS as well.
951
952         * platform/network/cf/CookieJarCFNet.cpp:
953         * platform/network/mac/CookieJarMac.mm:
954
955 2015-03-23  Conrad Shultz  <conrad_shultz@apple.com>
956
957         Replace uses of kCTFontSystemFontType
958         https://bugs.webkit.org/show_bug.cgi?id=142984
959
960         Reviewed by Tim Horton.
961
962         * rendering/RenderThemeMac.mm:
963         (WebCore::AttachmentLayout::layOutTitle):
964         (WebCore::AttachmentLayout::layOutSubtitle):
965
966 2015-03-23  Dean Jackson  <dino@apple.com>
967
968         kCTFontSystemFontType is deprecated in CoreText
969         https://bugs.webkit.org/show_bug.cgi?id=142981
970         <rdar://problem/20261171>
971
972         Reviewed by Beth Dakin.
973
974         Update to the non-deprecated version.
975
976         * rendering/RenderThemeIOS.mm: kCTFontSystemFontType -> kCTFontUIFontSystem
977         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
978
979 2015-03-23  Eric Carlson  <eric.carlson@apple.com>
980
981         [Mac] Enable fullscreen for MSE-based videos
982         https://bugs.webkit.org/show_bug.cgi?id=142971
983
984         Reviewed by Jer Noble.
985
986         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
987         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Return true;
988
989 2015-03-23  Alex Christensen  <achristensen@webkit.org>
990
991         [MediaFoundation] Implement seek.
992         https://bugs.webkit.org/show_bug.cgi?id=142594
993
994         Reviewed by Darin Adler.
995
996         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
997         (WebCore::MediaPlayerPrivateMediaFoundation::seeking):
998         (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
999         (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
1000         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1001
1002 2015-03-23  Dan Bernstein  <mitz@apple.com>
1003
1004         Fixed the build.
1005
1006         * platform/graphics/cocoa/FontCocoa.mm:
1007         (WebCore::Font::platformBoundsForGlyph): Switched to non-deprecated CTFontOrientation values.
1008         (WebCore::Font::platformWidthForGlyph): Ditto.
1009
1010 2015-03-23  Jer Noble  <jer.noble@apple.com>
1011
1012         [iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
1013         https://bugs.webkit.org/show_bug.cgi?id=142970
1014
1015         Reviewed by Eric Carlson.
1016
1017         Return early after synchronously calling to the main thread to allocate the volume
1018         view, to avoid re-allocating the volume view again on the web thread.
1019
1020         * platform/audio/ios/MediaSessionManagerIOS.mm:
1021         (-[WebMediaSessionHelper allocateVolumeView]):
1022
1023 2015-03-23  Tim Horton  <timothy_horton@apple.com>
1024
1025         Add a share item to the link action menu
1026         https://bugs.webkit.org/show_bug.cgi?id=142961
1027         <rdar://problem/19198374>
1028
1029         Reviewed by Beth Dakin.
1030
1031         * English.lproj/Localizable.strings:
1032         Remove some now-unused strings.
1033
1034         * platform/spi/mac/NSMenuSPI.h:
1035         Add some SPI.
1036
1037 2015-03-23  David Kilzer  <ddkilzer@apple.com>
1038
1039         [iOS] Build fix: CoreText deprecated kCTFontSystemFontType
1040
1041         Fix tracked by:  <rdar://problem/20261171>
1042
1043         * rendering/RenderThemeIOS.mm:
1044         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
1045         Add clang pragmas.
1046
1047 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
1048
1049         Unreviewed test fix.
1050
1051         * css/CSSParser.cpp:
1052         (WebCore::CSSParser::parseScrollSnapDestination): Remove new assertion.
1053
1054 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
1055
1056         scroll-snap-destination and scroll-snap-coordinate do not seem to work together properly
1057         https://bugs.webkit.org/show_bug.cgi?id=142552
1058         <rdar://problem/20114743>
1059
1060         Reviewed by Dean Jackson.
1061
1062         Revise the snap point logic as follows:
1063         (1) Put the snap point destination handling in a helper function to make the rest of the code
1064             easier to read.
1065         (2) Make sure we always have a left-hand snap point (i.e., position 0), but don't add multiple
1066             left-hand snap points.
1067         (3) Create a helper function to determine if we should be working with the scroll snap 'elements'
1068             behavior. We want to use this for scroll-snap-destination/scroll-snap-coordinate markup.
1069         (4) Create per-element snap point offsets when using scroll-snap-destination/scroll-snap-coordinate.
1070
1071         * css/CSSParser.cpp:
1072         (WebCore::CSSParser::parseScrollSnapDestination): Add assertion to try to catch bad parser state.
1073         * page/scrolling/AxisScrollSnapOffsets.cpp:
1074         (WebCore::destinationOffsetForViewSize): Added helper function to consolidate logic for handling
1075         destination coordinates.
1076         (WebCore::updateFromStyle): Make sure a left-hand snap point is always provided.
1077         (WebCore::styleUsesElements): Added helper function.
1078         (WebCore::updateSnapOffsetsForScrollableArea): Revise logic to generate 'per-element' snap point
1079         offsets.
1080
1081 2015-03-23  Yoav Weiss  <yoav@yoav.ws>
1082
1083         Refactor ImageLoader's setting of CachedImage
1084         https://bugs.webkit.org/show_bug.cgi?id=142825
1085
1086         Reviewed by Chris Dumez.
1087
1088         No new tests, since there's no functional change.
1089
1090         setImage and setImageWithoutConsideringPendingLoadEvent were not called with new
1091         CachedImages and were not used as originally intended. That resulted in some dead code,
1092         and confusion when going over the code.
1093         This patch renames these methods into equivalent clearImage* methods, and deletes resulting dead code.
1094
1095         * html/HTMLObjectElement.cpp:
1096         (WebCore::HTMLObjectElement::renderFallbackContent): Changed setImage call to clearImage.
1097         * loader/ImageLoader.cpp:
1098         (WebCore::ImageLoader::clearImage):
1099         (WebCore::ImageLoader::clearImageWithoutConsideringPendingLoadEvent):
1100         (WebCore::ImageLoader::notifyFinished):
1101         (WebCore::ImageLoader::elementDidMoveToNewDocument):
1102         (WebCore::ImageLoader::setImage): Deleted.
1103         (WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent): Deleted.
1104         * loader/ImageLoader.h:
1105
1106 2015-03-22  Benjamin Poulain  <benjamin@webkit.org>
1107
1108         CSS Selectors: fix attribute case-insensitive matching of Contain and List
1109         https://bugs.webkit.org/show_bug.cgi?id=142932
1110
1111         Reviewed by Darin Adler.
1112
1113         Fix the last two attribute selectors that were using full case-insensitive
1114         match:
1115             -Contain ([foo*=bar]).
1116             -List (foo~=bar]).
1117
1118         Tests: fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html
1119                fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html
1120
1121         * css/SelectorChecker.cpp:
1122         (WebCore::attributeValueMatches):
1123         * cssjit/SelectorCompiler.cpp:
1124         (WebCore::SelectorCompiler::attributeValueContains):
1125         (WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
1126
1127 2015-03-22  Benjamin Poulain  <bpoulain@apple.com>
1128
1129         Detect when url filter pattern with groups match the empty string
1130         https://bugs.webkit.org/show_bug.cgi?id=142930
1131
1132         Reviewed by Sam Weinig.
1133
1134         The previous test was only accounting for simple atoms. This patch extends
1135         it to groups.
1136
1137         * contentextensions/URLFilterParser.cpp:
1138         (WebCore::ContentExtensions::Term::quantify):
1139         (WebCore::ContentExtensions::Term::matchesAtLeastOneCharacter):
1140         (WebCore::ContentExtensions::GraphBuilder::finalize):
1141         (WebCore::ContentExtensions::Term::quantifier): Deleted.
1142
1143 2015-03-22  Eric Carlson  <eric.carlson@apple.com>
1144
1145         [Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1
1146         https://bugs.webkit.org/show_bug.cgi?id=142940
1147
1148         Reviewed by Sam Weinig.
1149
1150         * dom/Document.cpp:
1151         (WebCore::Document::didChoosePlaybackTarget): const-ify the didChoosePlaybackTarget argument.
1152         * dom/Document.h:
1153
1154         * html/HTMLMediaSession.cpp:
1155         (WebCore::HTMLMediaSession::didChoosePlaybackTarget): Ditto.
1156         * html/HTMLMediaSession.h:
1157
1158         * page/Page.cpp:
1159         (WebCore::Page::didChoosePlaybackTarget):  Ditto.
1160         * page/Page.h:
1161
1162         * platform/audio/MediaSession.h:
1163         * platform/graphics/MediaPlaybackTargetPickerClient.h:
1164         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: 
1165         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):  Ditto.
1166
1167 2015-03-22  Anders Carlsson  <andersca@apple.com>
1168
1169         _WKWebsiteDataStore should clear WebSQL databases
1170         https://bugs.webkit.org/show_bug.cgi?id=142947
1171
1172         Reviewed by Sam Weinig.
1173
1174         * Modules/webdatabase/DatabaseTracker.cpp:
1175         (WebCore::DatabaseTracker::trackerWithDatabasePath):
1176         Add a hack so we can get at a tracker from the UI process.
1177
1178         (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
1179         New function that deletes all databases modified after a given time.
1180
1181         * Modules/webdatabase/DatabaseTracker.h:
1182         Add new members and export the ones we want to call from WebKit2.
1183
1184         * Modules/webdatabase/OriginLock.h:
1185         Export the destructor.
1186
1187 2015-03-21  Dean Jackson  <dino@apple.com>
1188
1189         Remove the prefix for CSS Transforms
1190         https://bugs.webkit.org/show_bug.cgi?id=142927
1191         <rdar://problem/11568151>
1192
1193         Reviewed by Simon Fraser.
1194
1195         Support the bare form of:
1196         - transform
1197         - transform-style
1198         - transform-origin
1199         - perspective
1200         - perspective-origin
1201
1202         For transform-style, we also still differentiate the prefixed property
1203         because we may want to use that as an indicator of legacy content.
1204
1205         This is mostly a find and replace, but with some related naming
1206         changes. The DOM interface for WebKitCSSTransformValue remains
1207         unchanged.
1208
1209         Tests: transforms/2d/transform-2d-prefixed.html
1210                transforms/3d/general/prefixed-3dtransform-values.html
1211
1212         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1213         (WebCore::propertyChangeMayRepaintNonDescendants):
1214         * css/CSSComputedStyleDeclaration.cpp:
1215         (WebCore::isLayoutDependent):
1216         (WebCore::ComputedStyleExtractor::propertyValue):
1217         * css/CSSParser.cpp:
1218         (WebCore::isValidKeywordPropertyAndValue):
1219         (WebCore::isKeywordPropertyID):
1220         (WebCore::parseTranslateTransformValue):
1221         (WebCore::CSSParser::parseValue):
1222         (WebCore::CSSParser::parseTransformOrigin):
1223         (WebCore::CSSParser::parsePerspectiveOrigin):
1224         * css/CSSPropertyNames.in:
1225         * css/StyleProperties.cpp:
1226         (WebCore::StyleProperties::getPropertyValue):
1227         (WebCore::StyleProperties::asText):
1228         * css/WebKitCSSMatrix.cpp:
1229         (WebCore::WebKitCSSMatrix::setMatrixValue):
1230         * html/track/VTTCue.cpp:
1231         (WebCore::VTTCueBox::applyCSSProperties):
1232         * page/animation/AnimationController.cpp:
1233         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
1234         * page/animation/CSSPropertyAnimation.cpp:
1235         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
1236         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
1237         * page/animation/CompositeAnimation.cpp:
1238         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
1239         * page/animation/ImplicitAnimation.cpp:
1240         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
1241         * page/animation/KeyframeAnimation.cpp:
1242         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
1243         (WebCore::KeyframeAnimation::validateTransformFunctionList):
1244         * platform/graphics/GraphicsLayer.cpp:
1245         (WebCore::GraphicsLayer::validateTransformOperations):
1246         * platform/graphics/GraphicsLayerClient.h:
1247         * platform/graphics/ca/GraphicsLayerCA.cpp:
1248         (WebCore::propertyIdToString):
1249         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
1250         (WebCore::GraphicsLayerCA::addAnimation):
1251         (WebCore::GraphicsLayerCA::isRunningTransformAnimation):
1252         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
1253         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
1254         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1255         (WebCore::GraphicsLayerTextureMapper::addAnimation):
1256         * platform/graphics/texmap/TextureMapperAnimation.cpp:
1257         (WebCore::TextureMapperAnimation::applyInternal):
1258         * platform/graphics/texmap/TextureMapperLayer.cpp:
1259         (WebCore::TextureMapperLayer::syncAnimations):
1260         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1261         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
1262         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
1263         (WebCore::CoordinatedGraphicsLayer::addAnimation):
1264         * rendering/RenderLayerBacking.cpp:
1265         (WebCore::RenderLayerBacking::updateGeometry):
1266         (WebCore::RenderLayerBacking::startAnimation):
1267         (WebCore::RenderLayerBacking::startTransition):
1268         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
1269         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
1270         * rendering/RenderLayerCompositor.cpp:
1271         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
1272         (WebCore::RenderLayerCompositor::isRunningTransformAnimation):
1273         * svg/SVGElement.cpp:
1274         (WebCore::populateAttributeNameToCSSPropertyIDMap):
1275
1276 2015-03-21  Commit Queue  <commit-queue@webkit.org>
1277
1278         Unreviewed, rolling out r181824.
1279         https://bugs.webkit.org/show_bug.cgi?id=142935
1280
1281         Broke Windows build (Requested by ap on #webkit).
1282
1283         Reverted changeset:
1284
1285         "Remove the prefix for CSS Transforms"
1286         https://bugs.webkit.org/show_bug.cgi?id=142927
1287         http://trac.webkit.org/changeset/181824
1288
1289 2015-03-20  Dean Jackson  <dino@apple.com>
1290
1291         Remove the prefix for CSS Transforms
1292         https://bugs.webkit.org/show_bug.cgi?id=142927
1293         <rdar://problem/11568151>
1294
1295         Reviewed by Simon Fraser.
1296
1297         Support the bare form of:
1298         - transform
1299         - transform-style
1300         - transform-origin
1301         - perspective
1302         - perspective-origin
1303
1304         For transform-style, we also still differentiate the prefixed property
1305         because we may want to use that as an indicator of legacy content.
1306
1307         This is mostly a find and replace, but with some related naming
1308         changes. The DOM interface for WebKitCSSTransformValue remains
1309         unchanged.
1310
1311         Tests: transforms/2d/transform-2d-prefixed.html
1312                transforms/3d/general/prefixed-3dtransform-values.html
1313
1314         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1315         (WebCore::propertyChangeMayRepaintNonDescendants):
1316         * css/CSSComputedStyleDeclaration.cpp:
1317         (WebCore::isLayoutDependent):
1318         (WebCore::ComputedStyleExtractor::propertyValue):
1319         * css/CSSParser.cpp:
1320         (WebCore::isValidKeywordPropertyAndValue):
1321         (WebCore::isKeywordPropertyID):
1322         (WebCore::parseTranslateTransformValue):
1323         (WebCore::CSSParser::parseValue):
1324         (WebCore::CSSParser::parseTransformOrigin):
1325         (WebCore::CSSParser::parsePerspectiveOrigin):
1326         * css/CSSPropertyNames.in:
1327         * css/StyleProperties.cpp:
1328         (WebCore::StyleProperties::getPropertyValue):
1329         (WebCore::StyleProperties::asText):
1330         * css/WebKitCSSMatrix.cpp:
1331         (WebCore::WebKitCSSMatrix::setMatrixValue):
1332         * html/track/VTTCue.cpp:
1333         (WebCore::VTTCueBox::applyCSSProperties):
1334         * page/animation/AnimationController.cpp:
1335         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
1336         * page/animation/CSSPropertyAnimation.cpp:
1337         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
1338         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
1339         * page/animation/CompositeAnimation.cpp:
1340         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
1341         * page/animation/ImplicitAnimation.cpp:
1342         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
1343         * page/animation/KeyframeAnimation.cpp:
1344         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
1345         (WebCore::KeyframeAnimation::validateTransformFunctionList):
1346         * platform/graphics/GraphicsLayer.cpp:
1347         (WebCore::GraphicsLayer::validateTransformOperations):
1348         * platform/graphics/GraphicsLayerClient.h:
1349         * platform/graphics/ca/GraphicsLayerCA.cpp:
1350         (WebCore::propertyIdToString):
1351         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
1352         (WebCore::GraphicsLayerCA::addAnimation):
1353         (WebCore::GraphicsLayerCA::isRunningTransformAnimation):
1354         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
1355         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
1356         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1357         (WebCore::GraphicsLayerTextureMapper::addAnimation):
1358         * platform/graphics/texmap/TextureMapperAnimation.cpp:
1359         (WebCore::TextureMapperAnimation::applyInternal):
1360         * platform/graphics/texmap/TextureMapperLayer.cpp:
1361         (WebCore::TextureMapperLayer::syncAnimations):
1362         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1363         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
1364         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
1365         (WebCore::CoordinatedGraphicsLayer::addAnimation):
1366         * rendering/RenderLayerBacking.cpp:
1367         (WebCore::RenderLayerBacking::updateGeometry):
1368         (WebCore::RenderLayerBacking::startAnimation):
1369         (WebCore::RenderLayerBacking::startTransition):
1370         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
1371         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
1372         * rendering/RenderLayerCompositor.cpp:
1373         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
1374         (WebCore::RenderLayerCompositor::isRunningTransformAnimation):
1375         * svg/SVGElement.cpp:
1376         (WebCore::populateAttributeNameToCSSPropertyIDMap):
1377
1378 2015-03-20  Yusuke Suzuki  <utatane.tea@gmail.com>
1379
1380         REGRESSION (r179429): Potential Use after free in JavaScriptCore`WTF::StringImpl::ref + 83
1381         https://bugs.webkit.org/show_bug.cgi?id=142410
1382
1383         Reviewed by Geoffrey Garen.
1384
1385         The same issues are found in the existing code; PropertyName does not have ownership.
1386         This patch rewrite the point that should have ownership to Identifier.
1387
1388         * bindings/js/JSDOMWindowCustom.cpp:
1389         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
1390         (WebCore::JSDOMWindow::putByIndex):
1391         * bindings/js/ReadableStreamJSSource.cpp:
1392         (WebCore::getInternalSlotFromObject):
1393         * bindings/scripts/CodeGeneratorJS.pm:
1394         (GenerateImplementation):
1395         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
1396         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
1397         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1398         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
1399         * bindings/scripts/test/JS/JSTestInterface.cpp:
1400         (WebCore::JSTestInterface::putByIndex):
1401
1402 2015-03-20  Simon Fraser  <simon.fraser@apple.com>
1403
1404         Log the slow-scrolling reasons (if any) on first commit of a ScrollingTreeFrameScrollingNodeMac
1405         https://bugs.webkit.org/show_bug.cgi?id=142917
1406
1407         Reviewed by Beth Dakin.
1408         
1409         The scrollperf test would fail to detect transitions between slow and fast scrolling
1410         for new pages, because there was no logging when slow-scrolling scrolling tree was
1411         torn down, and a new fast-scrolling tree constructed.
1412         
1413         Fix by always logging the slow-scrolling reasons in the first update of the
1414         ScrollingTreeFrameScrollingNodeMac, even when the slow-scrolling reasons haven't
1415         changed.
1416
1417         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1418         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1419         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
1420         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
1421
1422 2015-03-19  Geoffrey Garen  <ggaren@apple.com>
1423
1424         Function.prototype.toString should not decompile the AST
1425         https://bugs.webkit.org/show_bug.cgi?id=142853
1426
1427         Reviewed by Sam Weinig.
1428
1429         * bindings/js/JSLazyEventListener.cpp:
1430         (WebCore::JSLazyEventListener::initializeJSFunction): Adjust the line
1431         number of attribute event listeners to account for the leading newline
1432         now added by JavaScriptCore.
1433
1434         This solution is not perfect, but there are a lot of pre-existing problems
1435         with line and column reporting for attribute event listeners, and this
1436         preserves existing behavior with reasonable reliability.
1437
1438 2015-03-20  Alex Christensen  <achristensen@webkit.org>
1439
1440         Progress towards CMake on Mac.
1441         https://bugs.webkit.org/show_bug.cgi?id=136003
1442
1443         Reviewed by Chris Dumez.
1444
1445         * PlatformMac.cmake:
1446         Added some directories to create forwarding headers from.
1447         Generate ObjC bindings.
1448
1449 2015-03-20  Per Arne Vollan  <peavo@outlook.com>
1450
1451         [WinCairo] Crash when leaving page while video is playing.
1452         https://bugs.webkit.org/show_bug.cgi?id=142578
1453
1454         Reviewed by Alex Christensen.
1455
1456         This can happen when there is an asynchronous event invoked from a video worker
1457         thread, accessing the media player object after it has been deleted.
1458         This is solved by resetting the media player pointer in the event object,
1459         when the media player is deleted.
1460
1461         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1462         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
1463         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
1464         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
1465         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
1466         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AsyncCallback):
1467         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::~AsyncCallback):
1468         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
1469         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
1470         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1471         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::MediaPlayerListener):
1472         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::~MediaPlayerListener):
1473         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::onMediaPlayerDeleted):
1474
1475 2015-03-20  Chris Dumez  <cdumez@apple.com>
1476
1477         Regression(r181782): Caused WebKit2.RestoreSessionStateContainingFormData API test to crash
1478         https://bugs.webkit.org/show_bug.cgi?id=142911
1479
1480         Reviewed by Antti Koivisto.
1481
1482         Drop the isBackForwardLoadType(m_loadType) assertion in
1483         FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad(). This assertion
1484         used to hold true when goToBackForwardItem() was only called with
1485         history navigation load types. However, after r181782, we use a Standard
1486         load in the cases where we do not wish to display stale content (e.g.
1487         restoring session state).
1488
1489         The assertion comment says "We only use cache-only loads to avoid
1490         resubmitting forms". However, we then call loadDifferentDocumentItem()
1491         which already takes care of using the ReturnCacheDataElseLoad cache
1492         policy as the HistoryItem has form data and we pass
1493         MayNotAttemptCacheOnlyLoadForFormSubmissionItem as parameter.
1494
1495         No new tests, covered by WebKit2.RestoreSessionStateContainingFormData
1496         API test.
1497
1498         * loader/FrameLoader.cpp:
1499         (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
1500
1501 2015-03-20  Andy Estes  <aestes@apple.com>
1502
1503         [Content Filtering] Adopt NEFilterSource unblock handling
1504         https://bugs.webkit.org/show_bug.cgi?id=142904
1505
1506         Reviewed by Andreas Kling.
1507
1508         * platform/cocoa/NetworkExtensionContentFilter.mm:
1509         (WebCore::NetworkExtensionContentFilter::unblockHandler):
1510         Returned an unblock handler that calls -[NEFilterSource remediateWithDecisionHandler:].
1511         * platform/cocoa/ParentalControlsContentFilter.mm:
1512         (WebCore::ParentalControlsContentFilter::unblockHandler): Used ASCIILiteral.
1513
1514 2015-03-19  Andy Estes  <aestes@apple.com>
1515
1516         [Content Filtering] Add tests for unblock requests
1517         https://bugs.webkit.org/show_bug.cgi?id=142900
1518
1519         Reviewed by Andreas Kling.
1520
1521         Currently the iOS Parental Controls content filter has a mechanism for requesting that a page be unblocked.
1522         WebKit implements this by listening for navigations originating from the filter's error page to a special URL,
1523         and requesting the page be unblocked via platform API, which might cause UI to be displayed. If the unblock is
1524         successful then we schedule a reload of the frame in order to display the unblocked document.
1525
1526         NetworkExtension also supports unblock requests, so in preparation for adopting its API, this patch allows
1527         content filters to specify their own unblock request method, teaches MockContentFilter to provide such a method,
1528         and writes tests to cover both allowed and denied unblock requests.
1529
1530         The content filter that blocks a load creates a ContentFilterUnblockHandler, passing it a lambda that is executed
1531         when a navigation matches the filter's special unblock URL. Filters can also specify that a script be executed in
1532         the context of its error page if the unblock is denied.
1533
1534         All platform content filters can handle unblock requests like this with the exception of iOS Parental Controls in WebKit2.
1535         Since UI can be displayed by the system in this case, the request must be made from within the UI process. Therefore the
1536         existing method is retained of serializing a WebFilterEvaluator and intercepting navigation policy calls in the UI process.
1537
1538         Tests: contentfiltering/allow-after-unblock-request.html
1539                contentfiltering/block-after-unblock-request.html
1540
1541         * bindings/js/JSMockContentFilterSettingsCustom.cpp:
1542         (WebCore::JSMockContentFilterSettings::decisionPoint): Added some using statements for clarity.
1543         (WebCore::JSMockContentFilterSettings::setDecisionPoint): Ditto.
1544         (WebCore::toJSValue): Returns a JSValue from a Decision.
1545         (WebCore::toDecision): Returns a Decision from a JSValue.
1546         (WebCore::JSMockContentFilterSettings::decision): Used toJSValue.
1547         (WebCore::JSMockContentFilterSettings::setDecision): Used toDecision.
1548         (WebCore::JSMockContentFilterSettings::unblockRequestDecision): Used toJSValue.
1549         (WebCore::JSMockContentFilterSettings::setUnblockRequestDecision): Used toDecision.
1550         * loader/ContentFilter.cpp:
1551         (WebCore::ContentFilter::createIfNeeded): Passed a reference to the owning DocumentLoader.
1552         (WebCore::ContentFilter::ContentFilter): Ditto.
1553         (WebCore::ContentFilter::unblockHandler): If the unblockHandler requests that a script be executed when an
1554         unblock request is denied, create a wrapper unblockHandler that executes that script in m_documentLoader's frame.
1555         * loader/ContentFilter.h:
1556         * loader/DocumentLoader.cpp:
1557         (WebCore::DocumentLoader::responseReceived): Passed this to ContentFilter::createIfNeeded.
1558         * loader/FrameLoader.cpp:
1559         (WebCore::FrameLoader::prepareForLoadStart): Called PolicyChecker::prepareForLoadStart.
1560         * loader/PolicyChecker.cpp:
1561         (WebCore::PolicyChecker::prepareForLoadStart): Reset m_contentFilterUnblockHandler.
1562         (WebCore::PolicyChecker::checkNavigationPolicy): Moved logic to here from WebKit1's WebFrameLoaderClient.
1563         Placing it here allows it to be shared between WebKit1 and WebKit2 (when the unblock handler does not need to
1564         be called in the UI process).
1565         * loader/PolicyChecker.h:
1566         (WebCore::PolicyChecker::setContentFilterUnblockHandler): Added.
1567         * page/Frame.h: Made Frame ThreadSafeRefCounted, since RefPtr<Frames> are captured in lambdas that can be
1568         copied by background threads managed by the underlying platform.
1569         * platform/ContentFilterUnblockHandler.h:
1570         (WebCore::ContentFilterUnblockHandler::unblockURLScheme): Returned the Apple content filter scheme.
1571         (WebCore::ContentFilterUnblockHandler::unblockURLHost): Returned the unblock URL host.
1572         (WebCore::ContentFilterUnblockHandler::clear): Deleted.
1573         * platform/PlatformContentFilter.h:
1574         (WebCore::PlatformContentFilter::unblockRequestDeniedScript): Returned the unblock request denied script.
1575         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
1576         (WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler): Added a constructor that takes an
1577         unblockURLHost and a UnblockRequesterFunction. Added an alternate constructor for iOS Parental Controls on
1578         WebKit2 that takes an unblockURLHost and a WebFilterEvaluator.
1579         (WebCore::ContentFilterUnblockHandler::needsUIProcess): Returned true if m_webFilterEvaluator is non-null.
1580         (WebCore::ContentFilterUnblockHandler::encode): Encoded m_unblockURLHost in addition to m_webFilterEvaluator.
1581         (WebCore::ContentFilterUnblockHandler::decode): Decoded m_unblockURLHost in addition to m_webFilterEvaluator.
1582         (WebCore::ContentFilterUnblockHandler::canHandleRequest): Returned true if there is a either a m_unblockRequester
1583         or a m_webFilterEvaluator and the request's host and scheme match those of the unblock request URL.
1584         (WebCore::dispatchToMainThread): Added a helper to dispatch a block to the main thread. Then if the web thread
1585         is enabled on iOS, dispatch it there.
1586         (WebCore::ContentFilterUnblockHandler::requestUnblockAsync): Renamed from handleUnblockRequestAndDispatchIfSuccessful.
1587         Requested an unblock using either m_unblockRequester or m_webFilterEvaluator, then called decisionHandler with the response.
1588         (WebCore::scheme): Moved to ContentFilterUnblockHandler::unblockURLScheme.
1589         (WebCore::ContentFilterUnblockHandler::handleUnblockRequestAndDispatchIfSuccessful): Renamed to requestUnblockAsync.
1590         * platform/cocoa/ParentalControlsContentFilter.mm:
1591         (WebCore::ParentalControlsContentFilter::unblockHandler): Returned an unblock handler using the WebFilterEvaluator constructor.
1592         * testing/MockContentFilter.cpp: Added using statments for clarity.
1593         (WebCore::settings): Added a helper to get MockContentFilterSettings::singleton().
1594         (WebCore::MockContentFilter::canHandleResponse): Used the helper.
1595         (WebCore::MockContentFilter::MockContentFilter): Took advantage of the using statements.
1596         (WebCore::MockContentFilter::addData): Ditto.
1597         (WebCore::MockContentFilter::finishedAddingData): Ditto.
1598         (WebCore::MockContentFilter::unblockHandler): Returned a ContentFilterUnblockHandler that checks settings() for its decision.
1599         (WebCore::MockContentFilter::unblockRequestDeniedScript): Returned the script to execute in MockContentFilter's
1600         error page when an unblock request is denied.
1601         (WebCore::MockContentFilter::maybeDetermineStatus): Took advantage of settings() and using statements.
1602         * testing/MockContentFilterSettings.cpp:
1603         (WebCore::MockContentFilterSettings::unblockRequestURL): Constructed a static unblock URL and returned it.
1604         * testing/MockContentFilterSettings.h:
1605         (WebCore::MockContentFilterSettings::unblockURLHost): Returned the filter's unblock URL host.
1606         (WebCore::MockContentFilterSettings::unblockRequestDecision): Returns the decision to make for an unblock request.
1607         (WebCore::MockContentFilterSettings::setUnblockRequestDecision): Sets the decision to make for an unblock request.
1608         * testing/MockContentFilterSettings.idl: Added the unblockRequestDecision and unblockRequestURL attributes.
1609
1610 2015-03-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1611
1612         [GTK] Crash due to empty drag image during drag-and-drop
1613         https://bugs.webkit.org/show_bug.cgi?id=142671
1614
1615         Reviewed by Philippe Normand.
1616
1617         Return early from ImageBuffer constructor if an empty size is
1618         given. This is a speculative fix for a crash while starting a drag
1619         and drop operation, that I haven't been able to reproduce.
1620
1621         * platform/graphics/cairo/ImageBufferCairo.cpp:
1622         (WebCore::ImageBuffer::ImageBuffer):
1623
1624 2015-03-19  Chris Dumez  <cdumez@apple.com>
1625
1626         [WK2] We should allow stale content when restoring a killed / crashed WebProcess
1627         https://bugs.webkit.org/show_bug.cgi?id=142893
1628         <rdar://problem/19633737>
1629         <rdar://problem/19869257>
1630
1631         Reviewed by Antti Koivisto.
1632
1633         Always use ReturnCacheDataElseLoad cache policy for history navigations.
1634         Previously, we would use the default protocol cache policy for history
1635         navigations if m_stateMachine.committedFirstRealDocumentLoad() returned
1636         false so that we do not display stale content when restoring the session
1637         state of Safari statup (rdar://problem/8131355). This is now handled
1638         before reaching this method by no longer using "IndexedBackForward"
1639         FrameLoadType when restoring session tabs, and using "Standard" load
1640         type instead.
1641
1642         * loader/FrameLoader.cpp:
1643         (WebCore::FrameLoader::loadDifferentDocumentItem):
1644
1645 2015-03-19  Andy Estes  <aestes@apple.com>
1646
1647         [Content Filtering] Move ContentFilter to from platform/ to loader/
1648         https://bugs.webkit.org/show_bug.cgi?id=142897
1649
1650         Reviewed by Dan Bernstein.
1651
1652         ContentFilterCollection never contained any platform code, so it doesn't make sense for it to be in platform.
1653         Move it to loader/, since ContentFilters are owned by DocumentLoaders, and just call it ContentFilter. Extract
1654         the abstract part of ContentFilter into a new base class called PlatformContentFilter that each of the
1655         individual filters inherit from.
1656
1657         * WebCore.xcodeproj/project.pbxproj:
1658         * loader/ContentFilter.cpp: Renamed from Source/WebCore/platform/ContentFilter.cpp.
1659         (WebCore::ContentFilter::types): Moved from ContentFilterCollection.
1660         (WebCore::ContentFilter::createIfNeeded): Ditto.
1661         (WebCore::ContentFilter::ContentFilter): Ditto.
1662         (WebCore::ContentFilter::addData): Ditto.
1663         (WebCore::ContentFilter::finishedAddingData): Ditto.
1664         (WebCore::ContentFilter::needsMoreData): Ditto.
1665         (WebCore::ContentFilter::didBlockData): Ditto.
1666         (WebCore::ContentFilter::getReplacementData): Ditto.
1667         (WebCore::ContentFilter::unblockHandler): Ditto.
1668         * loader/ContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
1669         (WebCore::ContentFilter::type): Replaced a use of ContentFilterCollection.
1670         * platform/PlatformContentFilter.h: Renamed from Source/WebCore/platform/ContentFilter.h.
1671         * platform/cocoa/NetworkExtensionContentFilter.h: Inherited from PlatformContentFilter.
1672         * platform/cocoa/ParentalControlsContentFilter.h: Ditto.
1673         * testing/MockContentFilter.h: Ditto.
1674
1675 2015-03-19  Dean Jackson  <dino@apple.com>
1676
1677         CSS Animations with triggers should map scroll position to duration
1678         https://bugs.webkit.org/show_bug.cgi?id=142870
1679         <rdar://problem/20227244>
1680
1681         Reviewed by Simon Fraser.
1682
1683         Expose a prototype implementation of what will eventually be called
1684         animation-timebase, mapping the scroll location to the duration of an
1685         animation. This only applies if the animation has a start and end
1686         trigger.
1687
1688         Test: animations/trigger-container-scroll-boundaries.html
1689
1690         * css/CSSComputedStyleDeclaration.cpp:
1691         (WebCore::createAnimationTriggerValue): Change to downcast.
1692
1693         * css/CSSToStyleMap.cpp:
1694         (WebCore::CSSToStyleMap::mapAnimationTrigger): Fix a bug where I wasn't
1695         telling the ScrollAnimationTrigger object whether or not it had
1696         an end value. This wasn't visible before because we were not using
1697         the end value.
1698
1699         * page/animation/AnimationBase.cpp:
1700         (WebCore::AnimationBase::fireAnimationEventsIfNeeded): Add a comment and
1701         change to using a downcast.
1702         (WebCore::AnimationBase::timeToNextService): Change to downcast.
1703         (WebCore::AnimationBase::freezeAtTime): Whitespace cleanup.
1704         (WebCore::AnimationBase::getElapsedTime): Calculate the elapsedTime based
1705         on the scroll position relative to the start and end trigger spots.
1706
1707         * page/animation/AnimationController.cpp:
1708         (WebCore::AnimationControllerPrivate::updateAnimations): Since this
1709         can potentially call into beginAnimationUpdateTime, it should have
1710         an update blocker. This fixes the assert we were seeing in tests.
1711         (WebCore::AnimationControllerPrivate::scrollWasUpdated): Keep track of the scroll
1712         position so we don't need to ask for it all the time.
1713         * page/animation/AnimationControllerPrivate.h:
1714         (WebCore::AnimationControllerPrivate::scrollPosition): New accessor.
1715
1716         * platform/animation/AnimationTrigger.h: Add downcast macros.
1717         (WebCore::ScrollAnimationTrigger::create): Calculate hasEndValue from the passed
1718         parameters rather than a separate value.
1719         (WebCore::ScrollAnimationTrigger::hasEndValue):
1720         (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
1721         (WebCore::ScrollAnimationTrigger::setHasEndValue): Deleted.
1722
1723         * platform/graphics/ca/GraphicsLayerCA.cpp:
1724         (WebCore::GraphicsLayerCA::animationCanBeAccelerated): If we have an
1725         animation of this sort, we can't use a CAAnimation.
1726
1727 2015-03-19  Eric Carlson  <eric.carlson@apple.com>
1728
1729         [Mac] Move MediaPlaybackTargetPicker
1730         https://bugs.webkit.org/show_bug.cgi?id=142889
1731
1732         Move WebMediaPlaybackTargetPickerProxy from WK2 and rename as MediaPlaybackTargetPicker so it
1733         can be used by both WK2 and WK1.
1734
1735         Reviewed by Tim Horton.
1736
1737         * WebCore.xcodeproj/project.pbxproj:
1738         * platform/graphics/MediaPlaybackTargetPicker.cpp: Copied from Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.cpp.
1739         * platform/graphics/MediaPlaybackTargetPicker.h: Copied from Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.h.
1740         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h: Copied from Source/WebKit2/UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h.
1741         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: Copied from Source/WebKit2/UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm.
1742
1743 2015-03-19  Enrica Casucci  <enrica@apple.com>
1744
1745         REGRESSION (r109593): Clicking after last inline element could cause a crash.
1746         https://bugs.webkit.org/show_bug.cgi?id=142880
1747         rdar://problem/17222294
1748
1749         Reviewed by Ryosuke Niwa.
1750
1751         Test: editing/selection/click-after-last-inline-crash.html
1752
1753         * rendering/RootInlineBox.cpp:
1754         (WebCore::RootInlineBox::closestLeafChildForLogicalLeftPosition):
1755
1756 2015-03-19  Enrica Casucci  <enrica@apple.com>
1757
1758         One more build fix after r181760.
1759
1760         * page/EventHandler.cpp:
1761         (WebCore::EventHandler::handleDrag):
1762
1763 2015-03-19  Jessie Berlin  <jberlin@webkit.org>
1764
1765         Build fix after r181760.
1766
1767         * rendering/RenderAttachment.h:
1768
1769 2015-03-19  Jer Noble  <jer.noble@apple.com>
1770
1771         [WK2][Mac] Fullscreen animations with mismatched aspect ratios are "squished".
1772         https://bugs.webkit.org/show_bug.cgi?id=142132
1773
1774         Reviewed by Tim Horton.
1775
1776         Add a new utility method to calculate a rect with a specific aspect ratio wrapping a smaller one.
1777
1778         * platform/graphics/GeometryUtilities.cpp:
1779         (WebCore::smallestRectWithAspectRatioAroundRect):
1780         * platform/graphics/GeometryUtilities.h:
1781
1782 2015-03-19  Chris Dumez  <cdumez@apple.com>
1783
1784         Get rid of "CachePolicyCache" cache policy
1785         https://bugs.webkit.org/show_bug.cgi?id=142881
1786
1787         Reviewed by Antti Koivisto.
1788
1789         Get rid of "CachePolicyCache" cache policy as it is unused.
1790
1791         * loader/cache/CachePolicy.h:
1792         * loader/cache/CachedResource.cpp:
1793         (WebCore::CachedResource::mustRevalidateDueToCacheHeaders):
1794         * page/DiagnosticLoggingKeys.cpp:
1795         (WebCore::DiagnosticLoggingKeys::mustRevalidateIsExpiredKey): Deleted.
1796         * page/DiagnosticLoggingKeys.h:
1797
1798 2015-03-19  Alex Christensen  <achristensen@webkit.org>
1799
1800         [Content Extensions] Test regular expression parse failures.
1801         https://bugs.webkit.org/show_bug.cgi?id=142872
1802
1803         Reviewed by Benjamin Poulain.
1804
1805         * contentextensions/URLFilterParser.cpp:
1806         (WebCore::ContentExtensions::GraphBuilder::finalize):
1807         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
1808         (WebCore::ContentExtensions::URLFilterParser::addPattern):
1809         (WebCore::ContentExtensions::URLFilterParser::statusString):
1810         * contentextensions/URLFilterParser.h:
1811         Changed failures that can never happen to assertions.
1812
1813 2015-03-19  Enrica Casucci  <enrica@apple.com>
1814
1815         Release build fix after https://trac.webkit.org/r181760.
1816
1817         Unreviewed.
1818
1819         * page/EventHandler.cpp:
1820         (WebCore::EventHandler::handleDrag):
1821
1822 2015-03-19  Enrica Casucci  <enrica@apple.com>
1823
1824         <attachment> should put URLs on the pasteboard so that Finder can accept drops.
1825         https://bugs.webkit.org/show_bug.cgi?id=142801
1826         rdar://problem/19982527
1827
1828         Reviewed by Tim Horton.
1829
1830         Test: editing/pasteboard/drag-and-drop-attachment-contenteditable.html
1831
1832         This patch adds all the necessary support to write attachment elements into
1833         the pasteboard, including the promised type.
1834
1835         * WebCore.xcodeproj/project.pbxproj:
1836         * page/DragActions.h:
1837         * page/DragClient.h:
1838         (WebCore::DragClient::declareAndWriteAttachment):
1839         * page/DragController.cpp:
1840         (WebCore::DragController::draggableElement):
1841         (WebCore::DragController::startDrag):
1842         * page/DragController.h:
1843         (WebCore::DragController::draggingAttachmentURL):
1844         * page/EventHandler.cpp:
1845         (WebCore::EventHandler::dragHysteresisExceeded):
1846         (WebCore::EventHandler::handleDrag):
1847         * page/mac/DragControllerMac.mm:
1848         (WebCore::DragController::declareAndWriteAttachment):
1849         * page/win/DragControllerWin.cpp:
1850         (WebCore::DragController::declareAndWriteAttachment):
1851         * platform/URL.cpp:
1852         (WebCore::URL::fileURLWithFileSystemPath):
1853         * platform/URL.h:
1854         * rendering/HitTestResult.cpp:
1855         (WebCore::HitTestResult::absoluteAttachmentURL):
1856         * rendering/HitTestResult.h:
1857
1858 2015-03-19  Chris Dumez  <cdumez@apple.com>
1859
1860         Unreviewed, fix linking error after r181753.
1861
1862         Drop WEBCORE_EXPORT for Settings::minimumDOMTimerInterval() as it is
1863         now inlined.
1864
1865         * page/Settings.h:
1866         (WebCore::Settings::minimumDOMTimerInterval):
1867
1868 2015-03-19  Brady Eidson  <beidson@apple.com>
1869
1870         Part of content extensions should apply css selectors
1871         https://bugs.webkit.org/show_bug.cgi?id=142604
1872
1873         Reviewed by Alex Christensen.
1874
1875         Add a new action for applying the cached global stylesheet.
1876
1877         * contentextensions/CompiledContentExtension.cpp:
1878         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
1879
1880         * contentextensions/ContentExtensionActions.h:
1881
1882         * contentextensions/ContentExtensionCompiler.cpp:
1883         (WebCore::ContentExtensions::serializeActions):
1884
1885         * contentextensions/ContentExtensionParser.cpp:
1886         (WebCore::ContentExtensions::loadAction):
1887
1888         * contentextensions/ContentExtensionRule.cpp:
1889         (WebCore::ContentExtensions::Action::deserialize):
1890         * contentextensions/ContentExtensionRule.h:
1891         (WebCore::ContentExtensions::Action::Action):
1892         (WebCore::ContentExtensions::Action::operator==):
1893         (WebCore::ContentExtensions::Action::stringArgument):
1894         (WebCore::ContentExtensions::Action::cssSelector): Deleted.
1895
1896         * contentextensions/ContentExtensionsBackend.cpp:
1897         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1898
1899         * loader/cache/CachedResourceLoader.cpp:
1900         (WebCore::CachedResourceLoader::requestResource):
1901
1902 2015-03-19  Chris Dumez  <cdumez@apple.com>
1903
1904         Clean up DOMTimer related settings
1905         https://bugs.webkit.org/show_bug.cgi?id=142837
1906
1907         Reviewed by Darin Adler.
1908
1909         Clean up DOMTimer related settings:
1910         - Make default minimum timer interval 4ms instead of 10ms as all ports
1911           were setting it to 4ms and the specifications says 4ms.
1912         - Get rid of setters for default DOMTimer interval values as they are
1913           not set anymore.
1914         - Move default DOMTimer interval values from Settings to DOMTimer as
1915           those are global (not per-page) and not really settings.
1916         - Stop using abbreviations in the names (e.g. min -> minimum).
1917         - Move DOMTimer settings members from Page to Settings. There is no
1918           reason for those to be stored on the Page. The getters were private
1919           so call-sites had to go via Settings anyway. Also, call-sites already
1920           had to do a null check on the page to get the settings. It seems
1921           unfortunate for the settings to do another null-check on the page for
1922           retrieving the setting value from the page.
1923         - Inline the DOMTimer settings getters as these are trivial.
1924
1925         * dom/Document.cpp:
1926         (WebCore::Document::minimumTimerInterval):
1927         (WebCore::Document::timerAlignmentInterval):
1928         * dom/ScriptExecutionContext.cpp:
1929         (WebCore::ScriptExecutionContext::minimumTimerInterval):
1930         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
1931         * page/DOMTimer.h:
1932         * page/Page.cpp:
1933         (WebCore::Page::Page):
1934         (WebCore::Page::setTimerThrottlingEnabled):
1935         (WebCore::Page::setMinimumTimerInterval): Deleted.
1936         (WebCore::Page::minimumTimerInterval): Deleted.
1937         * page/Page.h:
1938         (WebCore::Page::timerAlignmentInterval): Deleted.
1939         * page/Settings.cpp:
1940         (WebCore::Settings::Settings):
1941         (WebCore::Settings::setMinimumDOMTimerInterval):
1942         (WebCore::Settings::setDOMTimerAlignmentInterval):
1943         (WebCore::Settings::setHiddenPageDOMTimerAlignmentInterval): Deleted.
1944         (WebCore::Settings::hiddenPageDOMTimerAlignmentInterval): Deleted.
1945         (WebCore::Settings::setDefaultMinDOMTimerInterval): Deleted.
1946         (WebCore::Settings::defaultMinDOMTimerInterval): Deleted.
1947         (WebCore::Settings::setMinDOMTimerInterval): Deleted.
1948         (WebCore::Settings::minDOMTimerInterval): Deleted.
1949         (WebCore::Settings::setDefaultDOMTimerAlignmentInterval): Deleted.
1950         (WebCore::Settings::defaultDOMTimerAlignmentInterval): Deleted.
1951         (WebCore::Settings::domTimerAlignmentInterval): Deleted.
1952         * page/Settings.h:
1953         (WebCore::Settings::minimumDOMTimerInterval):
1954         (WebCore::Settings::domTimerAlignmentInterval):
1955         * testing/InternalSettings.cpp:
1956         (WebCore::InternalSettings::Backup::Backup):
1957         (WebCore::InternalSettings::Backup::restoreTo):
1958         (WebCore::InternalSettings::setMinimumTimerInterval):
1959
1960 2015-03-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1961
1962         [GTK] Scrollbars look bad with GTK+ 3.16
1963         https://bugs.webkit.org/show_bug.cgi?id=140800
1964
1965         Reviewed by Sergio Villar Senin.
1966
1967         Take margin into account when rendering scrollbars. This fixes the
1968         huge scrollbars rendered with GTK+ 3.16. We don't need to check
1969         the GTK+ version because in previous versions the marging were 0,
1970         so the same code just works.
1971
1972         * platform/gtk/ScrollbarThemeGtk.cpp:
1973         (WebCore::adjustRectAccordingToMargin):
1974         (WebCore::ScrollbarThemeGtk::paintTrackBackground):
1975         (WebCore::ScrollbarThemeGtk::paintThumb):
1976
1977 2015-03-19  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1978
1979         [Streams API] Update ReadableStream API according new version of the specification
1980         https://bugs.webkit.org/show_bug.cgi?id=142822
1981
1982         Reviewed by Benjamin Poulain.
1983
1984         This patch updates the IDL of ReadableStream according the new version of the spec, which splits functionality between ReadableStream and ReadableStreamReader.
1985         In particular, this patch removes read(), ready, closed and state from ReadableStream and it adds the getReader method.
1986
1987         Covered by updated readablestream-constructor.html test.
1988
1989         * Modules/streams/ReadableStream.cpp:
1990         (WebCore::ReadableStream::ReadableStream):
1991         (WebCore::ReadableStream::state): Deleted.
1992         (WebCore::ReadableStream::closed): Deleted.
1993         (WebCore::ReadableStream::ready): Deleted.
1994         * Modules/streams/ReadableStream.h:
1995         (WebCore::ReadableStream::internalState): Added to make mac build system happy, to be used by ReadableStreamReader.
1996         * Modules/streams/ReadableStream.idl:
1997         * bindings/js/JSReadableStreamCustom.cpp:
1998         (WebCore::JSReadableStream::cancel):
1999         (WebCore::JSReadableStream::getReader):
2000         (WebCore::JSReadableStream::read): Deleted.
2001         (WebCore::getOrCreatePromiseDeferredFromObject): Deleted.
2002         (WebCore::readyPromiseSlotName): Deleted.
2003         (WebCore::JSReadableStream::ready): Deleted.
2004         (WebCore::closedPromiseSlotName): Deleted.
2005         (WebCore::JSReadableStream::closed): Deleted.
2006
2007 2015-03-18  Manuel Rego Casasnovas  <rego@igalia.com>
2008
2009         Unreviewed. GTK build fix after r181720.
2010
2011         * rendering/RenderImage.cpp:
2012         (WebCore::RenderImage::styleDidChange):
2013
2014 2015-03-18  Antti Koivisto  <antti@apple.com>
2015
2016         Test disk cache behavior when using back navigation cache policy
2017         https://bugs.webkit.org/show_bug.cgi?id=142848
2018
2019         Reviewed by Chris Dumez.
2020
2021         Add a way to override the normal cache policy so we can test reload behavior of cache without actually reloading.
2022
2023         Test: http/tests/cache/disk-cache-validation-back-navigation-policy.html
2024
2025         * loader/FrameLoader.cpp:
2026         (WebCore::FrameLoader::addExtraFieldsToRequest):
2027         * loader/FrameLoader.h:
2028         (WebCore::FrameLoader::setOverrideCachePolicyForTesting):
2029         * testing/Internals.cpp:
2030         (WebCore::Internals::setOverrideCachePolicy):
2031         * testing/Internals.h:
2032         * testing/Internals.idl:
2033
2034 2015-03-18  Yusuke Suzuki  <utatane.tea@gmail.com>
2035
2036         TextFragment#start() is always >= 0 since its type is unsigned
2037         https://bugs.webkit.org/show_bug.cgi?id=142860
2038
2039         Reviewed by Andreas Kling.
2040
2041         Since TextFragment::m_start is unsigned, the result of
2042         TextFragment::start() is always >= 0 and assertion is not effective.
2043         This patch removes this assertion to suppress warnings.
2044
2045         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2046         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
2047
2048 2015-03-18  Alex Christensen  <achristensen@webkit.org>
2049
2050         [ContentExtensions] Prepare for compiling stylesheets of selectors to be used on every page.
2051         https://bugs.webkit.org/show_bug.cgi?id=142799
2052
2053         Reviewed by Brady Eidson.
2054
2055         * WebCore.xcodeproj/project.pbxproj:
2056         Make private headers to use with API tests.
2057         * contentextensions/CompiledContentExtension.cpp:
2058         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
2059         * contentextensions/CompiledContentExtension.h:
2060         Added method to get only the selectors from the root of the DFA, which apply to all URLs.
2061         * contentextensions/ContentExtensionCompiler.cpp:
2062         (WebCore::ContentExtensions::compileRuleList):
2063         Added checking if the trigger will match everything.
2064         These actions can be put directly on the root of the DFA without adding extra epsilon transitions to the NFA.
2065         * contentextensions/DFA.h:
2066         (WebCore::ContentExtensions::DFA::nodeAt):
2067         * contentextensions/DFABytecodeInterpreter.cpp:
2068         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
2069         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2070         * contentextensions/DFABytecodeInterpreter.h:
2071         * contentextensions/NFA.h:
2072         * contentextensions/URLFilterParser.cpp:
2073         (WebCore::ContentExtensions::Term::quantifier):
2074         Sink terms to a vector then add nodes to NFA when finalizing after checking for regexes that match everything.
2075         (WebCore::ContentExtensions::GraphBuilder::GraphBuilder):
2076         (WebCore::ContentExtensions::GraphBuilder::finalize):
2077         (WebCore::ContentExtensions::GraphBuilder::parseStatus):
2078         (WebCore::ContentExtensions::GraphBuilder::atomPatternCharacter):
2079         (WebCore::ContentExtensions::GraphBuilder::atomBuiltInCharacterClass):
2080         (WebCore::ContentExtensions::GraphBuilder::quantifyAtom):
2081         (WebCore::ContentExtensions::GraphBuilder::atomBackReference):
2082         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
2083         (WebCore::ContentExtensions::GraphBuilder::assertionWordBoundary):
2084         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassAtom):
2085         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassRange):
2086         (WebCore::ContentExtensions::GraphBuilder::atomCharacterClassBuiltIn):
2087         (WebCore::ContentExtensions::GraphBuilder::atomParentheticalAssertionBegin):
2088         (WebCore::ContentExtensions::GraphBuilder::disjunction):
2089         (WebCore::ContentExtensions::GraphBuilder::hasError):
2090         (WebCore::ContentExtensions::GraphBuilder::fail):
2091         (WebCore::ContentExtensions::GraphBuilder::sinkFloatingTermIfNecessary):
2092         (WebCore::ContentExtensions::URLFilterParser::addPattern):
2093         (WebCore::ContentExtensions::URLFilterParser::statusString):
2094         (WebCore::ContentExtensions::GraphBuilder::errorMessage): Deleted.
2095         * contentextensions/URLFilterParser.h:
2096         Use an enum instead of strings for the status to avoid checking strings when we have a regex that matches everything.
2097
2098 2015-03-18  Yusuke Suzuki  <utatane.tea@gmail.com>
2099
2100         Fix build failure due to FALLTHROUGH in unreachable code
2101         https://bugs.webkit.org/show_bug.cgi?id=142703
2102
2103         Reviewed by Benjamin Poulain.
2104
2105         FALLTHROUGH should not exist in unreachable code marked by
2106         ASSERT_NOT_REACHABLE.
2107
2108         When !ENABLE(CSS_SELECTOR_JIT) and Debug mode is enabled,
2109         both ASSERT_NOT_REACHED and FALLTHROUGH are instantiated
2110         and it cause build failure.
2111
2112         Here, since CompiledSingle/CompiledSingleWithRootFilter are
2113         not set when !ENABLE(CSS_SELECTOR_JIT). So dropping FALLTHROUGH
2114         and leave ASSERT_NOT_REACHED.
2115         And since ASSERT_NOT_ReACHED is stripped when Release build,
2116         I've inserted FALLTHROUGH() if ASSERT_DISABLED.
2117         This fix is the same to r162906.
2118
2119         * dom/SelectorQuery.cpp:
2120         (WebCore::SelectorDataList::execute):
2121
2122 2015-03-18  Said Abou-Hallawa  <sabouhallawa@apple.com>
2123
2124         Switching between two SVG images with no intrinsic sizes causes them to get the default SVG size instead of the container size.
2125         https://bugs.webkit.org/show_bug.cgi?id=142805.
2126
2127         Reviewed by Darin Adler.
2128         
2129         The bug happens due to wrong logic in RenderImage::imageDimensionsChanged().
2130         This function decides to setNeedsLayout() if the intrinsic size of the image
2131         changes. If the size does not change, it only repaints the image rectangle.
2132         When switching the src of the an image between two SVG images and both of
2133         them have no intrinsic size, we do not updateInnerContentRect() and this
2134         means an SVGImageForContainer is not going to be created for this image.
2135         When the image is drawn, it is drawn directly from the SVGImage. And this
2136         means the drawing has to be scaled by container_size / SVG_default_intrinsic_size
2137         
2138         After figuring out that I need to updateInnerContentRect() to fix this bug,
2139         I found out Blink has already changed this code to do the same thing. But 
2140         they also did more clean-up in this function. Here is the link
2141         https://codereview.chromium.org/114323004. I think their change seems correct
2142         although they did not say what exactly they were trying to fix.
2143         
2144         The plan for repaintOrMarkForLayout(), which is the new name of this function,
2145         is the following:
2146             -- setNeedLayout() if the intrinsic size changes and it affects the size
2147                of the image.
2148             -- updateInnerContentRect() if the intrinsic size did not change but the
2149                image has exiting layout.
2150             -- repaint the image rectangle if layout is not needed.
2151             
2152         This change also removes the call to computeLogicalWidthInRegion(), which is
2153         almost running a layout for the image. This call figures out whether the image
2154         needs to setNeedsLayout(). This call is unnecessary; the image needs to run a
2155         layout if the intrinsic size has changed and it affects the size of the image.
2156                     
2157         Test: svg/as-image/svg-no-intrinsic-size-switching.html
2158
2159         * rendering/RenderImage.cpp:
2160         (WebCore::RenderImage::styleDidChange): Change the function call.
2161         (WebCore::RenderImage::imageChanged): Rename local variable and change the
2162         function call.
2163         
2164         (WebCore::RenderImage::updateIntrinsicSizeIfNeeded): Simplify this function.
2165         Call setIntrinsicSize() with the new size unless the image is in error state.
2166         
2167         (WebCore::RenderImage::repaintOrMarkForLayout): This a better name for this
2168         function since it is called even if the intrinsic size was not changed.
2169         (WebCore::RenderImage::imageDimensionsChanged): Deleted.
2170         
2171         * rendering/RenderImage.h: Rename imageDimensionsChanged() and change the 
2172         updateIntrinsicSizeIfNeeded() to return void.
2173         
2174         * rendering/svg/RenderSVGForeignObject.cpp:
2175         (WebCore::RenderSVGForeignObject::paint): Code cleanup. This function can
2176         only handle the paint phases PaintPhaseForeground and PaintPhaseSelection.
2177         Use this information to simplify the logic and order of painting there.
2178
2179 2015-03-18  Jeremy Jones  <jeremyj@apple.com>
2180
2181         Fix typo in playerViewControllerWillCancelOptimizedFullscree.
2182         https://bugs.webkit.org/show_bug.cgi?id=142745
2183
2184         Reviewed by Darin Adler.
2185
2186         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2187         (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscreen:]):
2188         (-[WebAVPlayerController playerViewControllerWillCancelOptimizedFullscree:]): Deleted.
2189
2190 2015-03-18  Simon Fraser  <simon.fraser@apple.com>
2191
2192         Avoid repaints when changing transform on an element with multiple background images
2193         https://bugs.webkit.org/show_bug.cgi?id=142841
2194
2195         Reviewed by Zalan Bujtas.
2196         
2197         Replace the cheap test for changed images in RenderElement::updateFillImages()
2198         with an exhaustive test that walks the entire list of background images,
2199         since any ensuing repaint is way more expensive than a slightly more expensive check here.
2200         
2201         Test: fast/repaint/multiple-backgrounds-style-change.html
2202
2203         * rendering/RenderElement.cpp:
2204         (WebCore::RenderElement::updateFillImages):
2205         * rendering/style/FillLayer.cpp:
2206         (WebCore::layerImagesIdentical): See if both images are the same (either none
2207         or both mask images, and same image pointer).
2208         (WebCore::FillLayer::imagesIdentical): Walk the two FillLayer lists, checking the images
2209         on each one. Returns false if we reach the end of one list before the other, or the images
2210         are different.
2211         * rendering/style/FillLayer.h: New static function; static because
2212         it compares two FillLayer lists, and I think that makes more sense than
2213         a member function.
2214
2215 2015-03-18  Anders Carlsson  <andersca@apple.com>
2216
2217         Pass cookies by reference in CookieHash functions
2218         https://bugs.webkit.org/show_bug.cgi?id=142839
2219
2220         Reviewed by Sam Weinig.
2221
2222         * platform/Cookie.h:
2223         (WebCore::CookieHash::hash):
2224         (WebCore::CookieHash::equal):
2225
2226 2015-03-18  Tim Horton  <timothy_horton@apple.com>
2227
2228         Temporarily fix the !ENABLE(CSS_SELECTOR_JIT) and assertions-enabled build
2229
2230         * dom/SelectorQuery.cpp:
2231         (WebCore::SelectorDataList::execute):
2232
2233 2015-03-18  Myles C. Maxfield  <mmaxfield@apple.com>
2234
2235         Call CTFontSetRenderingParameters before rendering text
2236         https://bugs.webkit.org/show_bug.cgi?id=142816
2237
2238         Reviewed by Darin Adler.
2239
2240         No new tests.
2241
2242         * platform/graphics/cocoa/FontCascadeCocoa.mm:
2243         (WebCore::showGlyphsWithAdvances):
2244         * platform/spi/cocoa/CoreTextSPI.h:
2245
2246 2015-03-18  Chris Dumez  <cdumez@apple.com>
2247
2248         [WK2] Log the number of network cache requests that we have never seen before
2249         https://bugs.webkit.org/show_bug.cgi?id=142828
2250         <rdar://problem/19632130>
2251
2252         Reviewed by Antti Koivisto.
2253
2254         Add diagnostic logging key for network cache efficacy logging.
2255
2256         * page/DiagnosticLoggingKeys.cpp:
2257         (WebCore::DiagnosticLoggingKeys::neverSeenBeforeKey):
2258         (WebCore::DiagnosticLoggingKeys::requestKey):
2259         * page/DiagnosticLoggingKeys.h:
2260
2261 2015-03-18  Yusuke Suzuki  <utatane.tea@gmail.com>
2262
2263         Use filterRootId in SelectorQuery even if CSS JIT is not enabled
2264         https://bugs.webkit.org/show_bug.cgi?id=142703
2265
2266         Reviewed by Benjamin Poulain.
2267
2268         filterRootId pruning path is not inherently related to CSS JIT.
2269         This patch enables filterRootId even in the environment
2270         where CSS JIT is not enabled.
2271
2272         * dom/SelectorQuery.cpp:
2273         (WebCore::filterRootById):
2274         (WebCore::SelectorDataList::executeSingleSelectorData):
2275         (WebCore::SelectorDataList::execute):
2276         * dom/SelectorQuery.h:
2277
2278 2015-03-18  Zalan Bujtas  <zalan@apple.com>
2279
2280         Simple line layout: Use Vector<>::const_iterator instead of custom FlowContents::Iterator.
2281         https://bugs.webkit.org/show_bug.cgi?id=142809
2282
2283         Reviewed by Antti Koivisto.
2284
2285         FlowContents::Iterator simply iterates on a vector<>. No need to custom implement it.
2286
2287         No change in functionality.
2288
2289         * rendering/SimpleLineLayoutFlowContents.h:
2290         (WebCore::SimpleLineLayout::FlowContents::begin):
2291         (WebCore::SimpleLineLayout::FlowContents::end):
2292         (WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator): Deleted.
2293         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator++): Deleted.
2294         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator--): Deleted.
2295         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator==): Deleted.
2296         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=): Deleted.
2297         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*): Deleted.
2298         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->): Deleted.
2299         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2300         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
2301
2302 2015-03-18  Zalan Bujtas  <zalan@apple.com>
2303
2304         Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
2305         https://bugs.webkit.org/show_bug.cgi?id=142785
2306
2307         Reviewed by Antti Koivisto.
2308
2309         This is in transition to support <br>. A particular position could point to multiple
2310         segments when <br> is directly followed by text.
2311
2312         No change in functionality.
2313
2314         * rendering/SimpleLineLayoutFlowContents.cpp:
2315         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):
2316         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow): Deleted.
2317         * rendering/SimpleLineLayoutFlowContents.h:
2318         (WebCore::SimpleLineLayout::FlowContents::segmentForRun):
2319         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition): Deleted.
2320         (WebCore::SimpleLineLayout::FlowContents::segmentForPosition): Deleted.
2321         * rendering/SimpleLineLayoutResolver.cpp:
2322         (WebCore::SimpleLineLayout::RunResolver::Run::text):
2323
2324 2015-03-17  Simon Fraser  <simon.fraser@apple.com>
2325
2326         Skip trying to paint overlay scrollbars when there are none or they are clipped out
2327         https://bugs.webkit.org/show_bug.cgi?id=142811
2328         rdar://problem/20200725
2329
2330         Reviewed by Darin Adler.
2331
2332         In some content with lots of layers and overflow:scroll, we could spend 20% of
2333         the time under paintOverflowControlsForFragments() setting up an (empty) clip,
2334         and then trying to draw scrollbars that we don't have.
2335         
2336         Avoid calling paintOverflowControlsForFragments() if there are no scrollbars,
2337         and don't both setting up an empty clip just to paint nothing.
2338
2339         * rendering/RenderLayer.cpp:
2340         (WebCore::RenderLayer::paintLayerContents):
2341         (WebCore::RenderLayer::paintOverflowControlsForFragments):
2342
2343 2015-03-18  Per Arne Vollan  <peavo@outlook.com>
2344
2345         [WinCairo] Unreviewed build fix after r181665.
2346
2347         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2348         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
2349
2350 2015-03-18  Joseph Pecoraro  <pecoraro@apple.com>
2351
2352         Remove unused "preprocessor" parameter to sub-CodeGenerators
2353         https://bugs.webkit.org/show_bug.cgi?id=142793
2354
2355         Reviewed by Darin Adler.
2356
2357         * bindings/scripts/CodeGenerator.pm:
2358         (ProcessDocument):
2359         (FileNamePrefix):
2360         * bindings/scripts/CodeGeneratorObjC.pm:
2361
2362 2015-03-18  Zalan Bujtas  <zalan@apple.com>
2363
2364         Simple line layout: Split fragments on renderer boundary on the fly.
2365         https://bugs.webkit.org/show_bug.cgi?id=142579
2366
2367         Reviewed by Antti Koivisto.
2368
2369         Fragment splitting at renderers' boundary at the end of the line is no longer needed.
2370         This patch ensures that TextFragmentIterator::nextTextFragment() does not concatenate
2371         fragments across renderer boundary.
2372
2373         Test: fast/text/simple-line-with-multiple-renderers.html
2374
2375         * rendering/SimpleLineLayout.cpp:
2376         (WebCore::SimpleLineLayout::revertRuns):
2377         (WebCore::SimpleLineLayout::LineState::isEmpty):
2378         (WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded): Check if fragments need a new run and
2379         whether neighboring fragments need collapsing.
2380         (WebCore::SimpleLineLayout::LineState::revertUncommitted): Revert fragments over multiple renderers if they form
2381         a fragment continuation.
2382         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
2383         (WebCore::SimpleLineLayout::forceFragmentToLine): Ensure that if a fragment has continuation across multiple renderers,
2384         they all get added to the current line.
2385         (WebCore::SimpleLineLayout::createLineRuns):
2386         (WebCore::SimpleLineLayout::LineState::appendFragment): Deleted.
2387         (WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator): Deleted.
2388         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator++): Deleted.
2389         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=): Deleted.
2390         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator*): Deleted.
2391         (WebCore::SimpleLineLayout::begin): Deleted.
2392         (WebCore::SimpleLineLayout::end): Deleted.
2393         (WebCore::SimpleLineLayout::preWrap): Deleted.
2394         (WebCore::SimpleLineLayout::removeTrailingWhitespace): Deleted.
2395         (WebCore::SimpleLineLayout::updateLineConstrains): Deleted.
2396         (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Deleted.
2397         (WebCore::SimpleLineLayout::createTextRuns): Deleted.
2398         (WebCore::SimpleLineLayout::create): Deleted.
2399         (WebCore::SimpleLineLayout::Layout::create): Deleted.
2400         * rendering/SimpleLineLayoutFlowContents.h:
2401         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator+):
2402         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*):
2403         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->):
2404         * rendering/SimpleLineLayoutFunctions.cpp:
2405         (WebCore::SimpleLineLayout::paintFlow): Unrelated fix on non-collapsed tab position.
2406         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2407         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
2408         (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
2409         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
2410         (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
2411         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
2412         * rendering/SimpleLineLayoutTextFragmentIterator.h:
2413         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
2414         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::overlapsToNextRenderer):
2415         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isCollapsible):
2416         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
2417         (WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak):
2418         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.
2419
2420 2015-03-18  Manuel Rego Casasnovas  <rego@igalia.com>
2421
2422         Flex and grid items should be painted as inline-blocks
2423         https://bugs.webkit.org/show_bug.cgi?id=142266
2424
2425         Reviewed by Darin Adler.
2426
2427         Based on Blink r157004 by <cbiesinger@chromium.org>.
2428         https://src.chromium.org/viewvc/blink?revision=157004&view=revision
2429
2430         Both flexbox and grid specs define that the painting order of flex/grid
2431         items is the same as inline blocks. See
2432         http://dev.w3.org/csswg/css-flexbox/#painting and
2433         http://dev.w3.org/csswg/css-grid/#z-order.
2434
2435         Extracted inline blocks painting code from InlineElementBox and moved to
2436         a helper method that will be reused for flexboxes and grids.
2437
2438         Tests: css3/flexbox/flex-item-text-background-not-interleaved.html
2439                fast/css-grid-layout/grid-item-text-background-not-interleaved.html
2440
2441         * rendering/InlineElementBox.cpp:
2442         (WebCore::InlineElementBox::paint): Move code to
2443         RenderElement::paintAsInlineBlock().
2444         * rendering/RenderBlock.cpp:
2445         (WebCore::RenderBlock::paintChild): Add new argument to paint children
2446         as inline blocks.
2447         * rendering/RenderBlock.h: Define PaintType enmu and modify paintChild()
2448         signature to add the new argument.
2449         * rendering/RenderElement.cpp:
2450         (WebCore::paintPhase): Paint element in a phase.
2451         (WebCore::RenderElement::paintAsInlineBlock): Code extracted from
2452         InlineElementBox::paint().
2453         * rendering/RenderElement.h: Add new method signature.
2454         * rendering/RenderFlexibleBox.cpp:
2455         (WebCore::RenderFlexibleBox::paintChildren): Call
2456         RenderBlock::paintChild() with the new argument.
2457         * rendering/RenderGrid.cpp:
2458         (WebCore::RenderGrid::paintChildren): Ditto.
2459
2460 2015-03-18  Chris Dumez  <cdumez@apple.com>
2461
2462         [WK2] Log total number of network cache queries using diagnostic logging
2463         https://bugs.webkit.org/show_bug.cgi?id=142803
2464         <rdar://problem/19632130>
2465
2466         Reviewed by Antti Koivisto.
2467
2468         Add diagnostic logging key needed for network efficacy logging.
2469
2470         * page/DiagnosticLoggingKeys.cpp:
2471         (WebCore::DiagnosticLoggingKeys::retrievalRequestKey):
2472         * page/DiagnosticLoggingKeys.h:
2473
2474 2015-03-18  Tim Horton  <timothy_horton@apple.com>
2475
2476         Fix the build after r181660
2477
2478         * page/EventHandler.cpp:
2479         (WebCore::EventHandler::setImmediateActionStage):
2480         * page/EventHandler.h:
2481         (WebCore::EventHandler::setImmediateActionStage):
2482         Un-inline setImmediateActionStage, because it is exported to WebCore, and
2483         exporting inline thing causes random weak symbol errors on some platforms.
2484
2485 2015-03-17  Conrad Shultz  <conrad_shultz@apple.com>
2486
2487         Ignore some deprecation warnings
2488         https://bugs.webkit.org/show_bug.cgi?id=142813
2489
2490         Reviewed by Mark Rowe.
2491
2492         Fixing the deprecations is tracked by: <rdar://problem/20201450>
2493
2494         * editing/cocoa/HTMLConverter.mm:
2495         (HTMLConverter::_processElement):
2496
2497 2015-03-17  Commit Queue  <commit-queue@webkit.org>
2498
2499         Unreviewed, rolling out r181667, r181682, and r181683.
2500         https://bugs.webkit.org/show_bug.cgi?id=142812
2501
2502         Broke multiple tests with ASan, plus dependent commits
2503         (Requested by ap on #webkit).
2504
2505         Reverted changesets:
2506
2507         "Simple line layout: Split fragments on renderer boundary on
2508         the fly."
2509         https://bugs.webkit.org/show_bug.cgi?id=142579
2510         http://trac.webkit.org/changeset/181667
2511
2512         "Simple line layout: Change FlowContents::segmentForPosition()
2513         to segmentForRun()."
2514         https://bugs.webkit.org/show_bug.cgi?id=142785
2515         http://trac.webkit.org/changeset/181682
2516
2517         "Simple line layout: Use Vector<>::const_iterator instead of
2518         custom FlowContents::Iterator."
2519         https://bugs.webkit.org/show_bug.cgi?id=142809
2520         http://trac.webkit.org/changeset/181683
2521
2522 2015-03-17  Zalan Bujtas  <zalan@apple.com>
2523
2524         Simple line layout: Use Vector<>::const_iterator instead of custom FlowContents::Iterator.
2525         https://bugs.webkit.org/show_bug.cgi?id=142809
2526
2527         Reviewed by Antti Koivisto.
2528
2529         FlowContents::Iterator simply iterates on a vector<>. No need to custom implement it.
2530
2531         No change in functionality.
2532
2533         * rendering/SimpleLineLayoutFlowContents.h:
2534         (WebCore::SimpleLineLayout::FlowContents::begin):
2535         (WebCore::SimpleLineLayout::FlowContents::end):
2536         (WebCore::SimpleLineLayout::FlowContents::Iterator::Iterator): Deleted.
2537         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator++): Deleted.
2538         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator--): Deleted.
2539         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator==): Deleted.
2540         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator!=): Deleted.
2541         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*): Deleted.
2542         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->): Deleted.
2543         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2544         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
2545
2546 2015-03-17  Zalan Bujtas  <zalan@apple.com>
2547
2548         Simple line layout: Change FlowContents::segmentForPosition() to segmentForRun().
2549         https://bugs.webkit.org/show_bug.cgi?id=142785
2550
2551         Reviewed by Antti Koivisto.
2552
2553         This is in transition to support <br>. A particular position could point to multiple
2554         segments when <br> is directly followed by text.
2555
2556         No change in functionality.
2557
2558         * rendering/SimpleLineLayoutFlowContents.cpp:
2559         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):
2560         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPositionSlow): Deleted.
2561         * rendering/SimpleLineLayoutFlowContents.h:
2562         (WebCore::SimpleLineLayout::FlowContents::segmentForRun):
2563         (WebCore::SimpleLineLayout::FlowContents::segmentIndexForPosition): Deleted.
2564         (WebCore::SimpleLineLayout::FlowContents::segmentForPosition): Deleted.
2565         * rendering/SimpleLineLayoutResolver.cpp:
2566         (WebCore::SimpleLineLayout::RunResolver::Run::text):
2567
2568 2015-03-17  Chris Dumez  <cdumez@apple.com>
2569
2570         [Mac][iOS] setSharedTimerFireInterval() / stopSharedTimer() are expensive
2571         https://bugs.webkit.org/show_bug.cgi?id=142752
2572         <rdar://problem/20176731>
2573
2574         Reviewed by Antti Koivisto.
2575
2576         setSharedTimerFireInterval() / stopSharedTimer() are expensive on Mac
2577         and iOS on pages using a lot of timers.
2578
2579         For example, on bing.com / iOS, ~15.4% of the CPU time is spent in
2580         setSharedTimerFireInterval() and ~14.7% of the CPU time is spent in
2581         stopSharedTimer(). The expensive calls are CFRunLoopAddTimer (11.4%),
2582         CFRunLoopTimerInvalidate (14.1%), CFRunLoopTimerCreate (3.3%).
2583
2584         The issue is that we keep creating, adding to run loop modes, and then
2585         destroying the sharedTimer for each firing event. This is very
2586         expensive. In such case, the CFRunLoopTimerRef documentation advises to
2587         """
2588         ... create a repeating timer with an initial firing time in the distant
2589         future (or the initial firing time) and a very large repeat interval—on
2590         the order of decades or more—and add it to all the necessary run loop
2591         modes. Then, when you know when the timer should fire next, you reset
2592         the firing time with CFRunLoopTimerSetNextFireDate, perhaps from the
2593         timer’s own callback function. This technique effectively produces a
2594         reusable, asynchronous timer.
2595         """ [1].
2596
2597         Doing so greatly decreases CPU time spend in:
2598         - setSharedTimerFireInterval(): 15.4% -> 4.6%
2599         - stopSharedTimer(): 14.6% -> 8.6%
2600
2601         Overall CPU time spent on bing.com in timerFired() goes down from
2602         ~61.2% to ~49.5%.
2603
2604         This patch also refactors the SharedTimer code to share as much as
2605         possible between Mac and iOS.
2606
2607         This patch is based in part on the following patch:
2608         http://trac.webkit.org/changeset/143210
2609
2610         [1] https://developer.apple.com/library/prerelease/ios/documentation/CoreFoundation/Reference/CFRunLoopTimerRef/index.html#//apple_ref/c/func/CFRunLoopTimerSetNextFireDate
2611
2612         * WebCore.xcodeproj/project.pbxproj:
2613         * platform/SharedTimer.h:
2614         (WebCore::SharedTimer::invalidate):
2615         (WebCore::MainThreadSharedTimer::setFiredFunction): Deleted.
2616         (WebCore::MainThreadSharedTimer::setFireInterval): Deleted.
2617         (WebCore::MainThreadSharedTimer::stop): Deleted.
2618         * platform/ThreadTimers.cpp:
2619         (WebCore::ThreadTimers::fireTimersInNestedEventLoop):
2620         * platform/cf/SharedTimerCF.mm: Added.
2621         (WebCore::applicationDidBecomeActive):
2622         (WebCore::setupPowerObserver):
2623         (WebCore::setSharedTimerFiredFunction):
2624         (WebCore::timerFired):
2625         (WebCore::restartSharedTimer):
2626         (WebCore::invalidateSharedTimer):
2627         (WebCore::setSharedTimerFireInterval):
2628         (WebCore::stopSharedTimer):
2629         * platform/efl/SharedTimerEfl.cpp:
2630         (WebCore::invalidateSharedTimer):
2631         * platform/gtk/SharedTimerGtk.cpp:
2632         (WebCore::invalidateSharedTimer):
2633         * platform/ios/SharedTimerIOS.mm: Removed.
2634         * platform/mac/PowerObserverMac.h: Copied from Source/WebCore/platform/efl/SharedTimerEfl.cpp.
2635         * platform/mac/PowerObserverMac.mm: Renamed from Source/WebCore/platform/mac/SharedTimerMac.mm.
2636         (WebCore::PowerObserver::PowerObserver):
2637         (WebCore::PowerObserver::~PowerObserver):
2638         (WebCore::PowerObserver::didReceiveSystemPowerNotification):
2639         * platform/win/SharedTimerWin.cpp:
2640         (WebCore::removeSharedTimer):
2641
2642 2015-03-17  Tim Horton  <timothy_horton@apple.com>
2643
2644         Cannot invoke action menus anymore
2645         https://bugs.webkit.org/show_bug.cgi?id=142797
2646         <rdar://problem/20032670>
2647
2648         Reviewed by Beth Dakin.
2649
2650         * platform/spi/mac/NSMenuSPI.h:
2651         Add additional NSMenu SPI.
2652
2653 2015-03-17  Zalan Bujtas  <zalan@apple.com>
2654
2655         Simple line layout: Split fragments on renderer boundary on the fly.
2656         https://bugs.webkit.org/show_bug.cgi?id=142579
2657
2658         Reviewed by Antti Koivisto.
2659
2660         Fragment splitting at renderers' boundary at the end of the line is no longer needed.
2661         This patch ensures that TextFragmentIterator::nextTextFragment() does not concatenate
2662         fragments across renderer boundary.
2663
2664         Test: fast/text/simple-line-with-multiple-renderers.html
2665
2666         * rendering/SimpleLineLayout.cpp:
2667         (WebCore::SimpleLineLayout::revertRuns):
2668         (WebCore::SimpleLineLayout::LineState::isEmpty):
2669         (WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded): Check if fragments need a new run and
2670         whether neighboring fragments need collapsing.
2671         (WebCore::SimpleLineLayout::LineState::revertUncommitted): Revert fragments over multiple renderers if they form
2672         a fragment continuation.
2673         (WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace):
2674         (WebCore::SimpleLineLayout::forceFragmentToLine): Ensure that if a fragment has continuation across multiple renderers,
2675         they all get added to the current line.
2676         (WebCore::SimpleLineLayout::createLineRuns):
2677         (WebCore::SimpleLineLayout::LineState::appendFragment): Deleted.
2678         (WebCore::SimpleLineLayout::FragmentForwardIterator::FragmentForwardIterator): Deleted.
2679         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator++): Deleted.
2680         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator!=): Deleted.
2681         (WebCore::SimpleLineLayout::FragmentForwardIterator::operator*): Deleted.
2682         (WebCore::SimpleLineLayout::begin): Deleted.
2683         (WebCore::SimpleLineLayout::end): Deleted.
2684         (WebCore::SimpleLineLayout::preWrap): Deleted.
2685         (WebCore::SimpleLineLayout::removeTrailingWhitespace): Deleted.
2686         (WebCore::SimpleLineLayout::updateLineConstrains): Deleted.
2687         (WebCore::SimpleLineLayout::splitRunsAtRendererBoundary): Deleted.
2688         (WebCore::SimpleLineLayout::createTextRuns): Deleted.
2689         (WebCore::SimpleLineLayout::create): Deleted.
2690         (WebCore::SimpleLineLayout::Layout::create): Deleted.
2691         * rendering/SimpleLineLayoutFlowContents.h:
2692         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator+):
2693         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator*):
2694         (WebCore::SimpleLineLayout::FlowContents::Iterator::operator->):
2695         * rendering/SimpleLineLayoutFunctions.cpp:
2696         (WebCore::SimpleLineLayout::paintFlow): Unrelated fix on non-collapsed tab position.
2697         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2698         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator):
2699         (WebCore::SimpleLineLayout::TextFragmentIterator::nextTextFragment):
2700         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment):
2701         (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
2702         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
2703         * rendering/SimpleLineLayoutTextFragmentIterator.h:
2704         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::TextFragment):
2705         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::overlapsToNextRenderer):
2706         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::isCollapsible):
2707         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::operator==):
2708         (WebCore::SimpleLineLayout::TextFragmentIterator::isLineBreak):
2709         (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragment::split): Deleted.
2710
2711 2015-03-17  Jeremy Jones  <jeremyj@apple.com>
2712
2713         When tab hides, pause fullscreen and exit normally.
2714         https://bugs.webkit.org/show_bug.cgi?id=142685
2715
2716         Reviewed by Eric Carlson.
2717
2718         Pause fullscreen playback when switching tabs. Exit fullscreen is not necessary and even prevents
2719         the normal flow of teardown. This allows the normal exit fullscreen call to succeed and call its callback.
2720
2721         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2722         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
2723
2724 2015-03-17  Per Arne Vollan  <peavo@outlook.com>
2725
2726         [WinCairo] Video position is incorrect when located inside a frame.
2727         https://bugs.webkit.org/show_bug.cgi?id=142784
2728
2729         Reviewed by Brent Fulgham.
2730
2731         We need to take the enclosing frame's position into account, when finding the video position.
2732
2733         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2734         (WebCore::MediaPlayerPrivateMediaFoundation::setSize):
2735
2736 2015-03-17  Benjamin Poulain  <bpoulain@apple.com>
2737
2738         Compile character ranges targeting the same state as range check in the bytecode
2739         https://bugs.webkit.org/show_bug.cgi?id=142759
2740
2741         Reviewed by Alex Christensen.
2742
2743         Previously, character ranges would be compiled as many individual character checks.
2744         For example, a transition on "[a-z]" would do 26 character checks + jump, which leads
2745         to enormous matchines.
2746
2747         With this patch, we find the ranges at lowering time and generate a single instruction
2748         for them: "CheckValueRange". This helps making the machine denser when the input
2749         use character sets.
2750
2751         The second part of this patch goes further in the case where the transitions out of
2752         a state cover the entire alphabet. In that case, we create a fallback transition
2753         on the fly and remove all the ranges made useless.
2754         That case is common when ranges are used with inverse character set (e.g. [^a]+a).
2755
2756         * contentextensions/DFABytecode.h:
2757         (WebCore::ContentExtensions::instructionSizeWithArguments):
2758         * contentextensions/DFABytecodeCompiler.cpp:
2759         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
2760         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
2761         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
2762         (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
2763         * contentextensions/DFABytecodeCompiler.h:
2764         Extend the compiler to detect ranges and lower them as CheckValueRange.
2765
2766         * contentextensions/DFABytecodeInterpreter.cpp:
2767         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2768         Range checks in the interpreter.
2769
2770         * contentextensions/NFA.cpp:
2771         (WebCore::ContentExtensions::NFA::setFinal):
2772         This assertion does not make sense with the current codebase. Actions are "compressed",
2773         it is possible to have two patterns with the same action.
2774
2775         * contentextensions/NFAToDFA.cpp:
2776         (WebCore::ContentExtensions::simplifyTransitions):
2777         A very simple DFA optimization function: it only reduce the strength of ranges.
2778
2779         (WebCore::ContentExtensions::NFAToDFA::convert):
2780
2781 2015-03-17  Jer Noble  <jer.noble@apple.com>
2782
2783         REGRESSION (r181423): Crash @ generatedcontent.org at com.apple.WebCore: WebCore::MediaPlayer::maximumDurationToCacheMediaTime const + 4
2784         https://bugs.webkit.org/show_bug.cgi?id=142787
2785
2786         Reviewed by Eric Carlson.
2787
2788         Null check m_player before derefencing.
2789
2790         * html/HTMLMediaElement.cpp:
2791         (WebCore::HTMLMediaElement::parseAttribute):
2792
2793 2015-03-17  Beth Dakin  <bdakin@apple.com>
2794
2795         DOM mouse events have weird timing for force clickable elements in Safari 8.0.3 on 
2796         10.10.2
2797         https://bugs.webkit.org/show_bug.cgi?id=142700
2798         -and corresponding-
2799         rdar://problem/20165168
2800
2801         Reviewed by Tim Horton.
2802
2803         This patch adds a new enum and member variable so that EventHandler can keep track 
2804         of the current immediate action state.
2805         * page/EventHandler.cpp:
2806         (WebCore::EventHandler::EventHandler):
2807
2808         A new mouse press even is starting. We can re-set m_immediateActionStage to none 
2809         unless a Hit Test has already been performed.
2810         (WebCore::EventHandler::handleMousePressEvent):
2811
2812         If an immediate action was completed, then send mouse to the DOM and return early. 
2813         This will prevent us from doing our own normal mouseup behaviors such as 
2814         navigating to a link that was clicked — we only want to do that if the click was 
2815         not used to perform an immediate action.
2816         (WebCore::EventHandler::handleMouseReleaseEvent):
2817         * page/EventHandler.h:
2818         (WebCore::EventHandler::setImmediateActionStage):
2819
2820 2015-03-17  Joseph Pecoraro  <pecoraro@apple.com>
2821
2822         Use a better parameter name for Document.getElementsByClassName
2823         https://bugs.webkit.org/show_bug.cgi?id=142771
2824
2825         Reviewed by Chris Dumez.
2826
2827         * bindings/objc/PublicDOMInterfaces.h:
2828         * dom/Document.idl:
2829
2830 2015-03-17  Timothy Horton  <timothy_horton@apple.com>
2831
2832         Reproducible null deref under ScriptedAnimationController::createDisplayRefreshMonitor
2833         https://bugs.webkit.org/show_bug.cgi?id=142776
2834         <rdar://problem/18921338>
2835
2836         Reviewed by Alexey Proskuryakov.
2837
2838         Test: fast/animation/request-animation-frame-unparented-iframe-crash.html
2839
2840         In some cases (like the new test), we can end up trying to start
2841         requestAnimationFrame on a Document that has no Page. Most paths null-checked
2842         the Page and did the right thing, but one failed to do so. In addition,
2843         the current fallback (when Page is null) can result in us constructing
2844         the wrong kind of DisplayRefreshMonitor, which could lead to trouble
2845         down the road when it's reused. Instead, just completely avoid making a
2846         DisplayRefreshMonitor in the null-page case.
2847
2848         * dom/ScriptedAnimationController.cpp:
2849         (WebCore::ScriptedAnimationController::createDisplayRefreshMonitor):
2850         If the page is null, bail.
2851
2852         * dom/ScriptedAnimationController.h:
2853         * platform/graphics/DisplayRefreshMonitor.cpp:
2854         (WebCore::DisplayRefreshMonitor::create):
2855         Use Optional<> to make it easy to distinguish between ChromeClient
2856         being unreachable (because we don't have a Page for some reason) and
2857         ChromeClient declaring that it doesn't want to override the type of
2858         DisplayRefreshMonitor that is created.
2859
2860         If ChromeClient was unreachable for some reason, we'll get back an engaged
2861         nullptr and return it (instead of creating a DisplayRefreshMonitor based
2862         on the platform). This avoids creating the wrong type of DisplayRefreshMonitor
2863         in the rare case where we can't reach the ChromeClient (e.g. a freshly unparented
2864         IFrame).
2865
2866         If instead the client returns a disengaged Nullopt, we'll interpret that as
2867         "construct the default type", which falls back on the platform #ifdefs to
2868         decide what to make.
2869
2870         * platform/graphics/DisplayRefreshMonitorManager.cpp:
2871         (WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):
2872         (WebCore::DisplayRefreshMonitorManager::scheduleAnimation):
2873         Silently handle the case where we failed to make a DisplayRefreshMonitor.
2874
2875         * platform/graphics/DisplayRefreshMonitor.h:
2876         * platform/graphics/DisplayRefreshMonitorClient.h:
2877         * platform/graphics/GraphicsLayerUpdater.cpp:
2878         (WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor):
2879         * platform/graphics/GraphicsLayerUpdater.h:
2880         * rendering/RenderLayerCompositor.cpp:
2881         (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor):
2882         * rendering/RenderLayerCompositor.h:
2883         Adjust to the new signature of createDisplayRefreshMonitor, and return
2884         an engaged (nullptr) Optional if we can't get to ChromeClient for any reason.
2885
2886         * page/ChromeClient.h:
2887         Return Nullopt (indicating a lack of override) by default.
2888
2889 2015-03-17  Dean Jackson  <dino@apple.com>
2890
2891         Implement Scroll Container Animation Triggers
2892         https://bugs.webkit.org/show_bug.cgi?id=142732
2893
2894         Attempt to fix the build.
2895
2896         * css/CSSComputedStyleDeclaration.cpp: Add an #if ENABLE guard.
2897
2898 2015-03-17  Dean Jackson  <dino@apple.com>
2899
2900         Implement Scroll Container Animation Triggers
2901         https://bugs.webkit.org/show_bug.cgi?id=142732
2902
2903         Reviewed by Simon Fraser.
2904
2905         Test: animations/trigger-container-scroll-simple.html
2906
2907         Basic implementation of container-scroll. It only checks
2908         the page scroll position for trigger values (not the scrolling
2909         container in an overflow).
2910
2911         * css/CSSComputedStyleDeclaration.cpp: Add CSSPropertyWebkitAnimationTrigger
2912         so that this property will appear in the inspector.
2913
2914         * page/FrameView.cpp:
2915         (WebCore::FrameView::sendScrollEvent): If the page has scrolled, let the animation
2916         controller know about it.
2917
2918         * page/animation/AnimationBase.cpp:
2919         (WebCore::AnimationBase::updateStateMachine): Whitespace fix.
2920         (WebCore::AnimationBase::fireAnimationEventsIfNeeded): If there is a trigger,
2921         and the scroll position is past it, then tell the state machine that
2922         we should start.
2923         (WebCore::AnimationBase::timeToNextService): Use the scroll position as
2924         an input to the update timer if a trigger is involved.
2925
2926         * page/animation/AnimationController.cpp:
2927         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation): Add whitespace.
2928         (WebCore::AnimationControllerPrivate::scrollWasUpdated): Call updateAnimations.
2929         (WebCore::AnimationController::scrollWasUpdated): Call into AnimationControllerPrivate.
2930         * page/animation/AnimationController.h:
2931         * page/animation/AnimationControllerPrivate.h:
2932
2933         * page/animation/CompositeAnimation.cpp: Keep a record of whether we have a scroll
2934         triggered animation.
2935         (WebCore::CompositeAnimation::CompositeAnimation):
2936         (WebCore::CompositeAnimation::updateKeyframeAnimations):
2937         * page/animation/CompositeAnimation.h:
2938         (WebCore::CompositeAnimation::hasScrollTriggeredAnimation):
2939         * platform/animation/Animation.cpp:
2940         (WebCore::Animation::operator=):
2941
2942 2015-03-17  Simon Fraser  <simon.fraser@apple.com>
2943
2944         Move some code from LogicalSelectionOffsetCaches into RenderElement
2945         https://bugs.webkit.org/show_bug.cgi?id=142758
2946
2947         Reviewed by Myles C. Maxfield.
2948
2949         LogicalSelectionOffsetCaches had some useful code regarding containing blocks etc
2950         that should be used in more places, so move it into RenderElement.
2951         
2952         No behavior change.
2953
2954         * rendering/LogicalSelectionOffsetCaches.h:
2955         (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
2956         (WebCore::isContainingBlockCandidateForAbsolutelyPositionedObject): Deleted.
2957         (WebCore::isNonRenderBlockInline): Deleted.
2958         (WebCore::containingBlockForFixedPosition): Deleted.
2959         (WebCore::containingBlockForAbsolutePosition): Deleted.
2960         (WebCore::containingBlockForObjectInFlow): Deleted.
2961         * rendering/RenderBlock.cpp: No need to initialize static data.
2962         (WebCore::RenderBlock::positionedObjects): nullptr
2963         * rendering/RenderElement.cpp:
2964         (WebCore::RenderElement::containingBlockForFixedPosition):
2965         (WebCore::RenderElement::containingBlockForAbsolutePosition):
2966         (WebCore::isNonRenderBlockInline):
2967         (WebCore::RenderElement::containingBlockForObjectInFlow):
2968         * rendering/RenderElement.h:
2969         (WebCore::RenderElement::canContainAbsolutelyPositionedObjects):
2970         * rendering/RenderLayer.cpp:
2971         (WebCore::isContainerForPositioned):
2972         * rendering/RenderObject.cpp:
2973         (WebCore::RenderObject::containingBlock):
2974
2975 2015-03-17  Alex Christensen  <achristensen@webkit.org>
2976
2977         [WinCairo] Unreviewed build fix after r181640.
2978
2979         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2980         Tell Windows how to find ShaderLang.h.
2981
2982 2015-03-17  Chris Dumez  <cdumez@apple.com>
2983
2984         'pageLoaded' diagnostic logging is too verbose
2985         https://bugs.webkit.org/show_bug.cgi?id=142727
2986         <rdar://problem/18937048>
2987
2988         Reviewed by Eric Carlson.
2989
2990         Make 'pageLoaded' diagnostic logging less verbose:
2991         - Log once per main frame instead of once for subframe
2992         - Apply sampling
2993
2994         * loader/FrameLoader.cpp:
2995         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2996
2997 2015-03-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2998
2999         [GTK] Wrong transfer annotations used in GObject DOM bindings
3000         https://bugs.webkit.org/show_bug.cgi?id=142780
3001
3002         Reviewed by Gustavo Noronha Silva.
3003
3004         We are using transfer none for all methods returning a GObject DOM
3005         Object. That's not true. Only objects derived from Node are
3006         automatically released by the DOM object cache and can be transfer
3007         none. All other objects are added to the cache only to avoid
3008         creating the same wrapper twice for the same core object, but
3009         caller should release the returned reference.
3010
3011         * bindings/gobject/WebKitDOMCustomUnstable.h:
3012         * bindings/scripts/CodeGeneratorGObject.pm:
3013         (GetTransferTypeForReturnType):
3014         (GenerateFunction):
3015
3016 2015-03-17  Carlos Garcia Campos  <cgarcia@igalia.com>
3017
3018         [GTK] WebKitDOM objects leaking
3019         https://bugs.webkit.org/show_bug.cgi?id=118788
3020
3021         Reviewed by Darin Adler and Sergio Villar Senin.
3022
3023         Use a DOMwindowObserver class, derived from DOMWindowProperty to
3024         be notified when the window object is detached from the frame to
3025         clear the DOM objects associated to that frame in that case too.
3026
3027         * bindings/gobject/DOMObjectCache.cpp:
3028
3029 2015-03-17  Zan Dobersek  <zdobersek@igalia.com>
3030
3031         [CMake] Use a forwarding header for ANGLE's ShaderLang.h to avoid picking up ANGLE's EGL headers
3032         https://bugs.webkit.org/show_bug.cgi?id=142530
3033
3034         Reviewed by Darin Adler.
3035
3036         Include the ANGLE's ShaderLang.h through the new forwarding header. This allows
3037         us to not list Source/ThirdParty/ANGLE/include in the list of inclusion directories
3038         and thus avoid ANGLE's EGL and GLES2/GLES3 headers, defaulting to the system-provided
3039         headers instead.
3040
3041         Source/ThirdParty/ANGLE/include/KHR is still used because ANGLE's khrplatform.h is
3042         required by the ShaderLang.h header. Source/ThirdParty/ANGLE/src is not used for the
3043         whole WebCore library anymore, only the ANGLESupport library.
3044
3045         * CMakeLists.txt:
3046         * platform/graphics/ANGLEWebKitBridge.h:
3047         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
3048
3049 2015-03-17  Matt Baker  <mattbaker@apple.com>
3050
3051         Web Inspector: Show rendering frames (and FPS) in Layout and Rendering timeline
3052         https://bugs.webkit.org/show_bug.cgi?id=142029
3053
3054         Reviewed by Timothy Hatcher.
3055
3056         Add new functionality to the Inspector timelines backend to add runloop data to timeline recordings.
3057
3058         * inspector/InspectorTimelineAgent.cpp:
3059         (WebCore::currentRunLoop):
3060         (WebCore::InspectorTimelineAgent::internalStart):
3061         (WebCore::InspectorTimelineAgent::internalStop):
3062         (WebCore::toProtocol):
3063         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
3064         Install observers for the begining and end of the runloop when recording begins. All other
3065         instrumented timeline events get added as children of the current runloop record, which is
3066         sent to the frontend once the runloop completes.
3067
3068         * inspector/InspectorTimelineAgent.h:
3069
3070         * platform/cf/RunLoopObserver.cpp:
3071         (WebCore::RunLoopObserver::schedule):
3072         Wrapper changed to allow observing arbitrary runloop activities.
3073
3074         * platform/cf/RunLoopObserver.h:
3075
3076 2015-03-17  Philippe Normand  <pnormand@igalia.com>
3077
3078         [GTK] basic OpenWebRTC build support
3079         https://bugs.webkit.org/show_bug.cgi?id=142393
3080
3081         Reviewed by Carlos Garcia Campos.
3082
3083         * PlatformGTK.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.
3084
3085 2015-03-17  Joseph Pecoraro  <pecoraro@apple.com>
3086
3087         Remove never used "useLayerOnTop" bindings generator argument
3088         https://bugs.webkit.org/show_bug.cgi?id=142773
3089
3090         Reviewed by Darin Adler.
3091
3092         * bindings/scripts/CodeGenerator.pm:
3093         * bindings/scripts/CodeGeneratorJS.pm:
3094         * bindings/scripts/CodeGeneratorObjC.pm:
3095         * bindings/scripts/generate-bindings.pl:
3096
3097 2015-03-16  Ryosuke Niwa  <rniwa@webkit.org>
3098
3099         Enable ES6 classes by default
3100         https://bugs.webkit.org/show_bug.cgi?id=142774
3101
3102         Reviewed by Gavin Barraclough.
3103
3104         * Configurations/FeatureDefines.xcconfig:
3105
3106 2015-03-16  Simon Fraser  <simon.fraser@apple.com>
3107
3108         Update the debug overlays after layout
3109         https://bugs.webkit.org/show_bug.cgi?id=142768
3110
3111         Reviewed by Zalan Bujtas.
3112
3113         The debug overlays need to be updated after layout, in case elements with wheel event handlers
3114         moved around.
3115         
3116         DebugPageOverlays::didLayout() is cheap if there are no overlays.
3117         
3118         Call DebugPageOverlays::didLayout() for all frames, not just the main frame, since subframes can contribute
3119         to the main frame's event handler region.
3120
3121         * page/DebugPageOverlays.cpp:
3122         (WebCore::DebugPageOverlays::regionChanged):
3123         * page/DebugPageOverlays.h:
3124         (WebCore::DebugPageOverlays::didLayout):
3125         (WebCore::DebugPageOverlays::didChangeEventHandlers):
3126         * page/FrameView.cpp:
3127         (WebCore::FrameView::layout):
3128
3129 2015-03-16  Jon Lee  <jonlee@apple.com>
3130
3131         Unreviewed fix for crash after r181608.
3132
3133         * WebCore.xcodeproj/project.pbxproj: Include it in the WebCore framework.
3134
3135 2015-03-16  Simon Fraser  <simon.fraser@apple.com>
3136
3137         Generalize the Document code that maintains a set of nodes with event handlers
3138         https://bugs.webkit.org/show_bug.cgi?id=142762
3139
3140         Reviewed by Zalan Bujtas, Darin Adler.
3141
3142         Document.h defines a TouchEventTargetSet type, which will in future be used for
3143         other event types too (wheel events), so rename it to EventTargetSet.
3144         
3145         Take didRemoveEventTargetNode() outside the TOUCH_EVENTS #ifdef, and change it
3146         to take a reference.
3147
3148         * dom/Document.cpp:
3149         (WebCore::Document::prepareForDestruction): References
3150         (WebCore::Document::didAddTouchEventHandler): Ditto.
3151         (WebCore::Document::didRemoveEventTargetNode): Ditto.
3152         * dom/Document.h:
3153         (WebCore::Document::touchEventTargets): No-one calls this; just remove the non
3154         #ideffed one.
3155         * html/HTMLInputElement.cpp:
3156         (WebCore::HTMLInputElement::~HTMLInputElement): Pass a ref.
3157         (WebCore::HTMLInputElement::didMoveToNewDocument): Pass a ref.
3158         * page/DOMWindow.cpp:
3159         (WebCore::DOMWindow::removeAllEventListeners): Pass a ref.
3160
3161 2015-03-16  Joseph Pecoraro  <pecoraro@apple.com>
3162
3163         Web Inspector: Object Previews in Indexed DB tables
3164         https://bugs.webkit.org/show_bug.cgi?id=140813
3165
3166         Reviewed by Timothy Hatcher.
3167
3168         * inspector/InspectorIndexedDBAgent.cpp:
3169         Include previews with object store objects.
3170
3171 2015-03-16  Jer Noble  <jer.noble@apple.com>
3172
3173         [Mac] Update missing image UI
3174         https://bugs.webkit.org/show_bug.cgi?id=142592
3175
3176         Reviewed by Darin Adler.
3177
3178         Update the broken image glyphs with new art (including a 3x image).
3179
3180         Test: fast/hidpi/broken-image-icon-very-hidpi.html
3181
3182         * Resources/missingImage.png:
3183         * Resources/missingImage@2x.png:
3184         * Resources/missingImage@3x.png: Added.
3185         * WebCore.xcodeproj/project.pbxproj:
3186         * loader/cache/CachedImage.cpp:
3187         (WebCore::CachedImage::brokenImage):
3188
3189 2015-03-16  Dean Jackson  <dino@apple.com>
3190
3191         Parsing and Style Resolution of Container-based Animation Triggers
3192         https://bugs.webkit.org/show_bug.cgi?id=142687
3193         <rdar://problem/20170007>
3194
3195         Reviewed by Simon Fraser.
3196
3197         Take 2 after the previous patch was rolled out.
3198
3199         This is the beginning of a prototype implementation of
3200         CSS Animation Triggers, as described by
3201         https://lists.w3.org/Archives/Public/www-style/2014Sep/0135.html
3202
3203         In this patch we parse and resolve the value of a new
3204         CSS property "-webkit-animation-trigger". At the moment it
3205         only accepts one function value "container-scroll", which
3206         will trigger the animation at an absolute position within
3207         an element's scrolling container. We expect the syntax to
3208         change in the near future, as the spec is written.
3209
3210         Tests: animations/trigger-computed-style.html
3211                animations/trigger-parsing.html
3212
3213         * WebCore.xcodeproj/project.pbxproj: Add the new files.
3214
3215         * css/CSSAnimationTriggerScrollValue.cpp: Added.
3216         (WebCore::CSSAnimationTriggerScrollValue::customCSSText): Output text for computed style.
3217         (WebCore::CSSAnimationTriggerScrollValue::equals): Compare two values.
3218         * css/CSSAnimationTriggerScrollValue.h: Added. This holds the CSS side of the
3219         scroll trigger. This name may change in the future to better represent the
3220         type of trigger, but it is good enough for now.
3221         (WebCore::CSSAnimationTriggerScrollValue::create):
3222         (WebCore::CSSAnimationTriggerScrollValue::startValue):
3223         (WebCore::CSSAnimationTriggerScrollValue::endValue):
3224         (WebCore::CSSAnimationTriggerScrollValue::CSSAnimationTriggerScrollValue):
3225
3226         * css/CSSComputedStyleDeclaration.cpp:
3227         (WebCore::createAnimationTriggerValue): Maps an AnimationTrigger into a CSSValue.
3228         (WebCore::getAnimationTriggerValue): Gets the current computed style.
3229         (WebCore::ComputedStyleExtractor::propertyValue):
3230
3231         * css/CSSParser.cpp:
3232         (WebCore::CSSParser::parseValue):
3233         (WebCore::CSSParser::parseAnimationTrigger): Parse the "container-scroll" function
3234         and record the value as a CSSAnimationTriggerScrollValue.
3235         (WebCore::CSSParser::parseAnimationProperty): Handle the new property.
3236         * css/CSSParser.h:
3237
3238         * css/CSSPropertyNames.in: Add "-webkit-animation-trigger".
3239
3240         * css/CSSToStyleMap.cpp:
3241         (WebCore::CSSToStyleMap::mapAnimationTrigger): Map a CSSValue into a trigger value on
3242         an Animation object.
3243         * css/CSSToStyleMap.h:
3244
3245         * css/CSSValue.cpp: Handle the new CSSValue type.
3246         (WebCore::CSSValue::equals):
3247         (WebCore::CSSValue::cssText):
3248         (WebCore::CSSValue::destroy):
3249         * css/CSSValue.h:
3250         (WebCore::CSSValue::isAnimationTriggerScrollValue):
3251
3252         * platform/animation/Animation.cpp: Make sure to initialise m_trigger and m_triggerSet,
3253         and use them in the operator==.
3254         * platform/animation/Animation.h: Add AnimationTrigger as a new field.
3255         (WebCore::Animation::isTriggerSet):
3256         (WebCore::Animation::isEmpty):
3257
3258         * platform/animation/AnimationTrigger.h: Added. New base class and subclasses for
3259         "auto" and the scrolling trigger.
3260         (WebCore::AnimationTrigger::~AnimationTrigger):
3261         (WebCore::AnimationTrigger::type):
3262         (WebCore::AnimationTrigger::isAutoAnimationTrigger):
3263         (WebCore::AnimationTrigger::isScrollAnimationTrigger):
3264         (WebCore::AnimationTrigger::AnimationTrigger):
3265         (WebCore::AutoAnimationTrigger::create):
3266         (WebCore::AutoAnimationTrigger::~AutoAnimationTrigger):
3267         (WebCore::AutoAnimationTrigger::AutoAnimationTrigger):
3268         (WebCore::ScrollAnimationTrigger::create):
3269         (WebCore::ScrollAnimationTrigger::~ScrollAnimationTrigger):
3270         (WebCore::ScrollAnimationTrigger::startValue):
3271         (WebCore::ScrollAnimationTrigger::setStartValue):
3272         (WebCore::ScrollAnimationTrigger::endValue):
3273         (WebCore::ScrollAnimationTrigger::setEndValue):
3274         (WebCore::ScrollAnimationTrigger::hasEndValue):
3275         (WebCore::ScrollAnimationTrigger::setHasEndValue):
3276         (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
3277
3278 2015-03-16  Alex Christensen  <achristensen@webkit.org>
3279
3280         Progress towards CMake on Mac
3281         https://bugs.webkit.org/show_bug.cgi?id=142747
3282
3283         Reviewed by Chris Dumez.
3284
3285         * CMakeLists.txt:
3286         * PlatformMac.cmake:
3287         Added more directories, interfaces, and forwarding headers.
3288         Temporarily disabled the generating of ObjC bindings in CMake builds.
3289         * platform/mac/PasteboardMac.mm:
3290         Removed unused include.
3291
3292 2015-03-16  Joanmarie Diggs  <jdiggs@igalia.com>
3293
3294         AX: Crash viewing http://www.last.fm/
3295         https://bugs.webkit.org/show_bug.cgi?id=142309
3296
3297         Reviewed by Chris Fleizach.
3298
3299         The crash occurs when a not-yet-rendered object emits a children-changed
3300         signal. If an assistive technology is listening, AT-SPI2 will attempt to
3301         create and cache the state set for the child being added and the creation
3302         of the state set assumes a rendered object.
3303
3304         Test: platform/gtk/accessibility/no-notification-for-unrendered-iframe-children.html
3305
3306         * accessibility/atk/AXObjectCacheAtk.cpp:
3307         (WebCore::AXObjectCache::attachWrapper):
3308
3309 2015-03-16  Commit Queue  <commit-queue@webkit.org>
3310
3311         Unreviewed, rolling out r181492.
3312         https://bugs.webkit.org/show_bug.cgi?id=142756
3313
3314         May have regressed PLT (Requested by anttik on #webkit).
3315
3316         Reverted changeset:
3317
3318         "Cache glyph widths to GlyphPages"
3319         https://bugs.webkit.org/show_bug.cgi?id=142028
3320         http://trac.webkit.org/changeset/181492
3321
3322 2015-03-16  Roger Fong  <roger_fong@apple.com>
3323
3324         [WebGL2] Instancing draw calls.
3325         https://bugs.webkit.org/show_bug.cgi?id=126939.
3326         <rdar://problem/15002379>
3327
3328         Reviewed by Dean Jackson.
3329
3330         Tested by a modified version of the 1.0.3 conformance tests:
3331         conformance/extensions/angle-instanced-arrays.html
3332         conformance/extensions/angle-instanced-arrays-out-of-bounds.html
3333
3334         These tests will be landed along with other modified extension conformance tests
3335         once approval from Khronos is received.
3336
3337         * html/canvas/WebGL2RenderingContext.cpp:
3338         (WebCore::WebGL2RenderingContext::clear): Generate error if clearing an integer color buffer.
3339         (WebCore::WebGL2RenderingContext::vertexAttribDivisor): Call method from base class.
3340         (WebCore::WebGL2RenderingContext::drawArraysInstanced): Ditto.
3341         (WebCore::WebGL2RenderingContext::drawElementsInstanced): Ditto.
3342         (WebCore::WebGL2RenderingContext::isIntegerFormat): Ditto.
3343         (WebCore::WebGL2RenderingContext::validateDrawElements): Deleted. Move back to base class.
3344         * html/canvas/WebGL2RenderingContext.h:
3345         * html/canvas/WebGL2RenderingContext.idl: Add a missing enum.
3346         * html/canvas/WebGLRenderingContext.cpp:
3347         (WebCore::WebGLRenderingContext::clear): Copied from WebGLRenderingContextBase.
3348         (WebCore::WebGLRenderingContext::validateDrawElements): Deleted. Move back to base class.
3349         * html/canvas/WebGLRenderingContext.h:
3350         * html/canvas/WebGLRenderingContextBase.cpp: 
3351         (WebCore::WebGLRenderingContextBase::clear): Deleted. Moved to WebGLRenderingContext.
3352         (WebCore::WebGLRenderingContextBase::getVertexAttrib): Check for WebGL2 context.
3353         (WebCore::WebGLRenderingContext::validateDrawElements): Ditto.
3354         * html/canvas/WebGLRenderingContextBase.h:
3355
3356 2015-03-16  Commit Queue  <commit-queue@webkit.org>
3357
3358         Unreviewed, rolling out r181572.
3359         https://bugs.webkit.org/show_bug.cgi?id=142755
3360
3361         Caused weird test failures in transitions and animations
3362         (Requested by dino on #webkit).
3363
3364         Reverted changeset:
3365
3366         "Parsing and Style Resolution of Container-based Animation
3367         Triggers"
3368         https://bugs.webkit.org/show_bug.cgi?id=142687
3369         http://trac.webkit.org/changeset/181572
3370
3371 2015-03-16  Yoav Weiss  <yoav@yoav.ws>
3372
3373         Remove setCachedImage from HTMLImageElement since it is not used
3374         https://bugs.webkit.org/show_bug.cgi?id=142740
3375
3376         Reviewed by Chris Dumez.
3377
3378         No new tests since this patch is just removing dead code.
3379
3380         HTMLImageElement::setCachedImage is not being called by anyone.
3381         This patch removes it, since it's dead code.
3382
3383         * html/HTMLImageElement.h:
3384         (WebCore::HTMLImageElement::setCachedImage): Deleted.
3385
3386 2015-03-16  Brent Fulgham  <bfulgham@apple.com>
3387
3388         WebKit1 Clients Are Not Reliably Repainted
3389         https://bugs.webkit.org/show_bug.cgi?id=142750
3390         <rdar://problem/20042453>
3391
3392         Reviewed by Simon Fraser.
3393
3394         * page/FrameView.cpp:
3395         (WebCore::FrameView::paintContents): Move "Red Rect" debug painting before
3396         the early return so we can see when this happening in debug builds.
3397         * page/FrameView.h:
3398         (WebCore::FrameView::inPaintableState): Added.
3399
3400 2015-03-16  Chris Dumez  <cdumez@apple.com>
3401
3402         Make DatabaseContext suspendable if there is no pending database activity
3403         https://bugs.webkit.org/show_bug.cgi?id=142716
3404         <rdar://problem/19923085>
3405
3406         Reviewed by Andreas Kling.
3407
3408         Make DatabaseContext suspendable if there is no pending database
3409         activity, i.e:
3410         - No pending Database creation JS callback
3411         - No pending transaction(s)
3412
3413         Suspending is safe in this case because we are not going to interrupt
3414         any database activity, nor fire any JS event.
3415
3416         This greatly increases the likelihood of pages using websql to enter
3417         the PageCache.
3418
3419         Tests: fast/history/page-cache-webdatabase-no-transaction-db.html
3420                fast/history/page-cache-webdatabase-pending-transaction.html
3421
3422         * Modules/webdatabase/Database.cpp:
3423         (WebCore::Database::hasPendingTransaction):
3424         * Modules/webdatabase/Database.h:
3425         * Modules/webdatabase/DatabaseContext.cpp:
3426         (WebCore::DatabaseContext::canSuspend):
3427         * Modules/webdatabase/DatabaseManager.cpp:
3428         (WebCore::DatabaseManager::openDatabase):
3429         * Modules/webdatabase/DatabaseThread.cpp:
3430         (WebCore::DatabaseThread::hasPendingDatabaseActivity):
3431         * Modules/webdatabase/DatabaseThread.h:
3432
3433 2015-03-16  Brady Eidson  <beidson@apple.com>
3434
3435         Addressing additional review feedback after http://trac.webkit.org/changeset/181565
3436         https://bugs.webkit.org/show_bug.cgi?id=142733
3437
3438         Reviewed by Darin Adler.
3439
3440         * loader/icon/IconController.cpp:
3441         (WebCore::IconController::startLoader): Null check page()
3442
3443 2015-03-16  Roger Fong  <roger_fong@apple.com>
3444
3445         [Win] Unreviewed build fix attempt after r181571.
3446
3447         *