7c03c6587cb0ba5ba5ab31278bbd3a1a9411fec8
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-11-20  Mark Lam  <mark.lam@apple.com>
2
3         Introducing VMEntryScope to update the VM stack limit.
4         https://bugs.webkit.org/show_bug.cgi?id=124634.
5
6         Reviewed by Geoffrey Garen.
7
8         No new tests.
9
10         Renamed dynamicGlobalObject() to vmEntryGlobalObject().
11         Replaced uses of DynamicGlobalObjectScope with VMEntryScope.
12
13         * ForwardingHeaders/runtime/VMEntryScope.h: Added.
14         * WebCore.vcxproj/WebCore.vcxproj:
15         * WebCore.vcxproj/WebCore.vcxproj.filters:
16         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
17         (WebCore::JSCryptoAlgorithmBuilder::add):
18         * bindings/js/JSCustomXPathNSResolver.cpp:
19         (WebCore::JSCustomXPathNSResolver::create):
20         * bindings/js/JSDOMBinding.cpp:
21         (WebCore::firstDOMWindow):
22         * bindings/js/JSErrorHandler.cpp:
23         (WebCore::JSErrorHandler::handleEvent):
24         * bindings/js/JSEventListener.cpp:
25         (WebCore::JSEventListener::handleEvent):
26         * bindings/js/JavaScriptCallFrame.h:
27         (WebCore::JavaScriptCallFrame::vmEntryGlobalObject):
28         * bindings/js/PageScriptDebugServer.cpp:
29         (WebCore::PageScriptDebugServer::recompileAllJSFunctions):
30         * bindings/js/ScriptDebugServer.cpp:
31         (WebCore::ScriptDebugServer::evaluateBreakpointAction):
32         (WebCore::ScriptDebugServer::handlePause):
33         * bindings/js/WorkerScriptDebugServer.cpp:
34         (WebCore::WorkerScriptDebugServer::recompileAllJSFunctions):
35         * bindings/objc/WebScriptObject.mm:
36         (WebCore::addExceptionToConsole):
37         * bridge/c/c_utility.cpp:
38         (JSC::Bindings::convertValueToNPVariant):
39         * bridge/objc/objc_instance.mm:
40         (ObjcInstance::moveGlobalExceptionToExecState):
41         * bridge/objc/objc_runtime.mm:
42         (JSC::Bindings::convertValueToObjcObject):
43         * bridge/objc/objc_utility.mm:
44         (JSC::Bindings::convertValueToObjcValue):
45
46 2013-11-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
47
48         Generate toHTMLFooElement() to clean up static_cast<>
49         https://bugs.webkit.org/show_bug.cgi?id=124571
50
51         Reviewed by Ryosuke Niwa.
52
53         Though there are a lot of clean up commits before, there are still
54         use of static_cast<HTMLFooElement*>. To clean up them, we need to generate
55         toHTMLDetails|Meta|Summary|TableCaptionElement().
56
57         Additionally, other static_cast<> are removed as well.
58
59         No new tests, no behavior changes.
60
61         * html/HTMLDetailsElement.h:
62         * html/HTMLMediaElement.cpp:
63         (HTMLMediaElement::selectNextSourceChild):
64         * html/HTMLMetaElement.h:
65         * html/HTMLObjectElement.cpp:
66         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
67         * html/HTMLOptionElement.cpp:
68         (WebCore::HTMLOptionElement::isDisabledFormControl):
69         * html/HTMLPlugInImageElement.cpp:
70         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
71         * html/HTMLSummaryElement.cpp:
72         (WebCore::HTMLSummaryElement::detailsElement):
73         * html/HTMLSummaryElement.h:
74         * html/HTMLTableCaptionElement.h:
75         * html/HTMLTableElement.cpp:
76         (WebCore::HTMLTableElement::caption):
77         * html/HTMLTagNames.in:
78         * html/MediaDocument.cpp:
79         (WebCore::MediaDocumentParser::createDocumentStructure):
80         * html/shadow/DetailsMarkerControl.cpp:
81         (WebCore::DetailsMarkerControl::summaryElement):
82         * loader/FrameLoader.cpp:
83         (WebCore::FrameLoader::handleFallbackContent):
84         * loader/ImageLoader.cpp:
85         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
86         * page/DragController.cpp:
87         (WebCore::DragController::canProcessDrag):
88         * page/Frame.cpp:
89         (WebCore::Frame::searchForLabelsBeforeElement):
90         * page/SpatialNavigation.cpp:
91         (WebCore::frameOwnerElement):
92
93 2013-11-20  Ryosuke Niwa  <rniwa@webkit.org>
94
95         Clear TemplateContentDocumentFragment::m_host when HTMLTemplateElement is destroyed
96         https://bugs.webkit.org/show_bug.cgi?id=122806
97
98         Reviewed by Antti Koivisto.
99
100         Merge https://chromium.googlesource.com/chromium/blink/+/858ed5f6341de9d900768c1f4668fcfce870c52e
101
102         The document fragment of a template element outlives the element itself.
103         Clear the host property on the document fragment when that happens.
104
105         Test: fast/dom/HTMLTemplateElement/content-outlives-template-crash.html
106
107         * dom/TemplateContentDocumentFragment.h:
108         * html/HTMLTemplateElement.cpp:
109         (WebCore::HTMLTemplateElement::~HTMLTemplateElement):
110         * html/HTMLTemplateElement.h:
111
112 2013-11-20  Chris Fleizach  <cfleizach@apple.com>
113
114         AX: Implement CSS -webkit-alt property (text alternative for generated content pseudo-elements ::before and ::after)
115         https://bugs.webkit.org/show_bug.cgi?id=120188
116
117         Reviewed by Dean Jackson.
118
119         Add a -webkit-alt CSS property that can be used to label Image content or Text content for accessibility clients.
120
121         To accomplish this, it sets the string in the RenderStyle. Then when the ContentData creates an anonymous renderer,
122         it sets that string on the TextFragment or RenderImage, which can be queried by accessibility code.
123
124         Test: platform/mac/accessibility/webkit-alt-for-css-content.html
125
126         * accessibility/AccessibilityNodeObject.cpp:
127         (WebCore::AccessibilityNodeObject::alternativeText):
128         * accessibility/AccessibilityRenderObject.cpp:
129         (WebCore::AccessibilityRenderObject::textUnderElement):
130         (WebCore::objectInclusionFromAltText):
131         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
132         * css/CSSComputedStyleDeclaration.cpp:
133         (WebCore::altTextToCSSValue):
134         (WebCore::ComputedStyleExtractor::propertyValue):
135         * css/CSSParser.cpp:
136         (WebCore::CSSParser::parseValue):
137         (WebCore::CSSParser::parseAlt):
138         * css/CSSParser.h:
139         * css/CSSPropertyNames.in:
140         * css/StyleResolver.cpp:
141         (WebCore::StyleResolver::applyProperty):
142         * rendering/RenderImage.h:
143         (WebCore::RenderImage::altText):
144         (WebCore::RenderImage::setAltText):
145         * rendering/RenderTextFragment.h:
146         * rendering/style/ContentData.cpp:
147         (WebCore::ImageContentData::createRenderer):
148         (WebCore::TextContentData::createRenderer):
149         * rendering/style/ContentData.h:
150         (WebCore::ContentData::setAltText):
151         (WebCore::ContentData::altText):
152         * rendering/style/RenderStyle.cpp:
153         (WebCore::RenderStyle::setContent):
154         (WebCore::RenderStyle::setContentAltText):
155         (WebCore::RenderStyle::contentAltText):
156         * rendering/style/RenderStyle.h:
157         * rendering/style/StyleRareNonInheritedData.h:
158
159 2013-11-20  Roger Fong  <roger_fong@apple.com>
160
161         Use compile flag SH_UNFOLD_SHORT_CIRCUIT when compiling shaders.
162         https://bugs.webkit.org/show_bug.cgi?id=124684.
163
164         Reviewed by Brent Fulgham.
165
166         Existing test webgl/1.0.2/conformance/glsl/misc/shader-with-short-circuiting-operators.html
167
168         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
169         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
170
171 2013-11-20  Robert Sipka  <sipka@inf.u-szeged.hu>
172
173         [curl] Improve detecting and handling of SSL related errors
174         https://bugs.webkit.org/show_bug.cgi?id=119436
175
176         Reviewed by Brent Fulgham.
177
178         Set the exact SSL verification error on CURL
179         and store the enabled domain with certificate.
180
181         * WebCore.vcxproj/WebCore.vcxproj:
182         * WebCore.vcxproj/WebCore.vcxproj.filters:
183         * platform/network/ResourceHandle.h:
184         * platform/network/ResourceHandleInternal.h:
185         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
186         * platform/network/curl/ResourceError.h:
187         (WebCore::ResourceError::ResourceError):
188         (WebCore::ResourceError::sslErrors):
189         (WebCore::ResourceError::setSSLErrors):
190         * platform/network/curl/ResourceHandleCurl.cpp:
191         (WebCore::ResourceHandle::setHostAllowsAnyHTTPSCertificate):
192         * platform/network/curl/ResourceHandleManager.cpp:
193         (WebCore::ResourceHandleManager::downloadTimerCallback):
194         (WebCore::ResourceHandleManager::initializeHandle):
195         * platform/network/curl/SSLHandle.cpp: Added.
196         (WebCore::allowsAnyHTTPSCertificateHosts):
197         (WebCore::sslIgnoreHTTPSCertificate):
198         (WebCore::sslCertificateFlag):
199         (WebCore::pemData):
200         (WebCore::certVerifyCallback):
201         (WebCore::sslctxfun):
202         (WebCore::setSSLVerifyOptions):
203         * platform/network/curl/SSLHandle.h: Added.
204
205 2013-11-20  Bem Jones-Bey  <bjonesbe@adobe.com>
206
207         [css shapes] Parse new circle shape syntax
208         https://bugs.webkit.org/show_bug.cgi?id=124618
209
210         Reviewed by Antti Koivisto.
211
212         Implement parsing of the new cicle shape syntax. The implementation of
213         the old syntax has been move aside as deprecated, and will be removed
214         once the new syntax is stable.
215
216         Updated existing parsing tests to cover this.
217
218         * css/BasicShapeFunctions.cpp:
219         (WebCore::valueForCenterCoordinate): Create a CSSPrimitiveValue from a
220             BasicShapeCenterCoordinate.
221         (WebCore::valueForBasicShape): Convert new basic shape and rename old
222             one.
223         (WebCore::convertToCenterCoordinate): Create a
224             BasicShapeCenterCoordinate from a CSSPrimitiveValue.
225         (WebCore::basicShapeForValue): Convert new shape value and rename old
226             one.
227         * css/CSSBasicShapes.cpp:
228         (WebCore::buildCircleString): Build a new circle string.
229         (WebCore::CSSBasicShapeCircle::cssText): Serialize the new circle
230             shape.
231         (WebCore::CSSBasicShapeCircle::equals): Compare new circle shapes.
232         (WebCore::CSSBasicShapeCircle::serializeResolvingVariables):
233         * css/CSSBasicShapes.h:
234         (WebCore::CSSBasicShapeCircle::CSSBasicShapeCircle): Add class for new
235             circle shape.
236         (WebCore::CSSDeprecatedBasicShapeCircle::create): Renamed to move out
237             of the way of the new circle implementation.
238         (WebCore::CSSDeprecatedBasicShapeCircle::centerX): Ditto.
239         (WebCore::CSSDeprecatedBasicShapeCircle::centerY): Ditto.
240         (WebCore::CSSDeprecatedBasicShapeCircle::radius): Ditto.
241         (WebCore::CSSDeprecatedBasicShapeCircle::setCenterX): Ditto.
242         (WebCore::CSSDeprecatedBasicShapeCircle::setCenterY): Ditto.
243         (WebCore::CSSDeprecatedBasicShapeCircle::setRadius): Ditto.
244         (WebCore::CSSDeprecatedBasicShapeCircle::CSSDeprecatedBasicShapeCircle): Ditto.
245         * css/CSSParser.cpp:
246         (WebCore::CSSParser::parseShapeRadius): Parse the radius for the new
247             circle syntax. Will also be used by the new ellipse syntax.
248         (WebCore::CSSParser::parseBasicShapeCircle): Parse the new circle
249             syntax.
250         (WebCore::CSSParser::parseDeprecatedBasicShapeCircle): Rename to make
251             way for the new implementation.
252         (WebCore::isDeprecatedBasicShape): Check if we have a new circle or an
253             old circle.
254         (WebCore::CSSParser::parseBasicShape): Update to parse the new circle
255             syntax.
256         * css/CSSParser.h:
257         * css/CSSValueKeywords.in: Add support for the new circle keywords.
258         * rendering/shapes/Shape.cpp:
259         (WebCore::Shape::createShape): 
260         * rendering/style/BasicShapes.cpp: Deprecate old circle and add stub
261             for layout code.
262         (WebCore::DeprecatedBasicShapeCircle::path): Rename to make way for
263             the new implementation.
264         (WebCore::DeprecatedBasicShapeCircle::blend): Rename to make way for
265             the new implementation.
266         (WebCore::BasicShapeCircle::path): Create path for new circle shape.
267         (WebCore::BasicShapeCircle::blend): Interpolate the new circle shape.
268         * rendering/style/BasicShapes.h:
269         (WebCore::BasicShapeCenterCoordinate::BasicShapeCenterCoordinate):
270             Represent an x or y coordinate for the center of a new circle,
271             since it can be either a keyword along with an offset that cannot
272             be resolved until layout time or an ordinary Length. This will
273             also be used by the new ellipse implementation.
274         (WebCore::BasicShapeCenterCoordinate::keyword):
275         (WebCore::BasicShapeCenterCoordinate::length):
276         (WebCore::BasicShapeCenterCoordinate::blend): Interpolate.
277         (WebCore::BasicShapeRadius::BasicShapeRadius): Represent the radius of
278             a new circle shape since it can either be a straightforward Length or
279             a keyword that cannot be resolved until layout time.
280         (WebCore::BasicShapeRadius::value):
281         (WebCore::BasicShapeRadius::type):
282         (WebCore::BasicShapeRadius::blend): Interpolate.
283         (WebCore::BasicShapeCircle::centerX):
284         (WebCore::BasicShapeCircle::centerY):
285         (WebCore::BasicShapeCircle::radius):
286         (WebCore::BasicShapeCircle::setCenterX):
287         (WebCore::BasicShapeCircle::setCenterY):
288         (WebCore::BasicShapeCircle::setRadius):
289         (WebCore::BasicShapeCircle::BasicShapeCircle): New circle class.
290         (WebCore::DeprecatedBasicShapeCircle::create): Rename to make room for
291             new circle implementation.
292         (WebCore::DeprecatedBasicShapeCircle::DeprecatedBasicShapeCircle): Ditto.
293
294 2013-11-20  Hans Muller  <hmuller@adobe.com>
295
296         [CSS Shapes] Add BoxShape and FloatRoundingRect classes
297         https://bugs.webkit.org/show_bug.cgi?id=124368
298
299         Reviewed by Dean Jackson.
300
301         Added the BoxShape class. It's now used to represent shape-outside box
302         values: [margin/border/padding/content]-box. BoxShape depends on a new
303         FloatRoundedRect class, which is a float analog of the existing (int)
304         RoundedRect class. The FloatRoundedRect class contains the same basic
305         methods and accessors as BorderRect and adds a set of four methods,
306         for example topLeftCorner(), that return a FloatRect that represents the
307         bounds of one elliptical corner. I also added a method, xInterceptsAtY()
308         that returns two X coordinates of the intersection between a horizontal
309         line and the rounded rectangle.
310
311         No new tests, this is just an internal refactoring.
312
313         * CMakeLists.txt:
314         * GNUmakefile.list.am:
315         * WebCore.vcxproj/WebCore.vcxproj:
316         * WebCore.vcxproj/WebCore.vcxproj.filters:
317         * WebCore.xcodeproj/project.pbxproj:
318         * platform/graphics/FloatRoundedRect.cpp: Added.
319         (WebCore::FloatRoundedRect::FloatRoundedRect):
320         (WebCore::FloatRoundedRect::Radii::isZero):
321         (WebCore::FloatRoundedRect::Radii::scale):
322         (WebCore::FloatRoundedRect::Radii::expand):
323         (WebCore::cornerRectIntercept):
324         (WebCore::FloatRoundedRect::xInterceptsAtY):
325         * platform/graphics/FloatRoundedRect.h: Added.
326         (WebCore::FloatRoundedRect::Radii::Radii):
327         (WebCore::FloatRoundedRect::Radii::setTopLeft):
328         (WebCore::FloatRoundedRect::Radii::setTopRight):
329         (WebCore::FloatRoundedRect::Radii::setBottomLeft):
330         (WebCore::FloatRoundedRect::Radii::setBottomRight):
331         (WebCore::FloatRoundedRect::Radii::topLeft):
332         (WebCore::FloatRoundedRect::Radii::topRight):
333         (WebCore::FloatRoundedRect::Radii::bottomLeft):
334         (WebCore::FloatRoundedRect::Radii::bottomRight):
335         (WebCore::FloatRoundedRect::Radii::expand):
336         (WebCore::FloatRoundedRect::Radii::shrink):
337         (WebCore::FloatRoundedRect::rect):
338         (WebCore::FloatRoundedRect::radii):
339         (WebCore::FloatRoundedRect::isRounded):
340         (WebCore::FloatRoundedRect::isEmpty):
341         (WebCore::FloatRoundedRect::setRect):
342         (WebCore::FloatRoundedRect::setRadii):
343         (WebCore::FloatRoundedRect::move):
344         (WebCore::FloatRoundedRect::inflate):
345         (WebCore::FloatRoundedRect::expandRadii):
346         (WebCore::FloatRoundedRect::shrinkRadii):
347         (WebCore::FloatRoundedRect::topLeftCorner):
348         (WebCore::FloatRoundedRect::topRightCorner):
349         (WebCore::FloatRoundedRect::bottomLeftCorner):
350         (WebCore::FloatRoundedRect::bottomRightCorner):
351         (WebCore::operator==):
352         * rendering/shapes/BoxShape.cpp: Added.
353         (WebCore::BoxShape::BoxShape):
354         (WebCore::BoxShape::getExcludedIntervals):
355         (WebCore::BoxShape::getIncludedIntervals):
356         (WebCore::BoxShape::firstIncludedIntervalLogicalTop):
357         * rendering/shapes/BoxShape.h: Added.
358         * rendering/shapes/Shape.cpp:
359         (WebCore::createBoxShape):
360         (WebCore::Shape::createShape):
361
362 2013-11-20  Antti Koivisto  <antti@apple.com>
363
364         Simple line layout should support floats
365         https://bugs.webkit.org/show_bug.cgi?id=124666
366
367         Reviewed by Dave Hyatt.
368
369         Tests: fast/text/simple-lines-float-compare.html
370                fast/text/simple-lines-float.html
371
372         * rendering/line/LineWidth.h:
373         (WebCore::LineWidth::logicalLeftOffset):
374         
375             Expose the left offset so we don't need to recompute it.
376
377         * rendering/SimpleLineLayout.cpp:
378         (WebCore::SimpleLineLayout::canUseFor):
379         (WebCore::SimpleLineLayout::computeLineLeft):
380         
381             Include the left offset from floats.
382
383         (WebCore::SimpleLineLayout::createTextRuns):
384         
385             Keep the flow height updated during the loop as LineWidth reads the current position from there.
386
387         * rendering/SimpleLineLayoutResolver.h:
388         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
389         (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
390         (WebCore::SimpleLineLayout::RunResolver::RunResolver):
391         (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
392         
393             We now bake the border and the padding to the line left offset. No need to add it during resolve.
394
395 2013-11-20  Alexey Proskuryakov  <ap@apple.com>
396
397         Use std::function callbacks in CryptoAlgorithm instead of JS promises
398         https://bugs.webkit.org/show_bug.cgi?id=124673
399
400         Reviewed by Anders Carlsson.
401
402         To implement key wrapping/unwrapping, we'll need to chain existing operations.
403         It's much easier to do with C++ callbacks than with functions fulfilling JS
404         promises directly.
405
406         Also, this will decouple CryptoAlgorithm from JS, which is nice.
407
408         SubtleCrypto IDL says that all functions return Promise<any>, but in reality,
409         there is very little polymorphism, the only function whose return type depends
410         on algorithm is generateKey (it can create a Key or a KeyPair).
411
412         * bindings/js/JSDOMPromise.cpp:
413         (WebCore::PromiseWrapper::PromiseWrapper):
414         (WebCore::PromiseWrapper::operator=):
415         * bindings/js/JSDOMPromise.h:
416         Made it copyable, as each crypto function wraps the promise in success and failure
417         functional objects now.
418
419         * bindings/js/JSSubtleCryptoCustom.cpp:
420         (WebCore::JSSubtleCrypto::encrypt):
421         (WebCore::JSSubtleCrypto::decrypt):
422         (WebCore::JSSubtleCrypto::sign):
423         (WebCore::JSSubtleCrypto::verify):
424         (WebCore::JSSubtleCrypto::digest):
425         (WebCore::JSSubtleCrypto::generateKey):
426         (WebCore::JSSubtleCrypto::importKey):
427         (WebCore::JSSubtleCrypto::exportKey):
428         * crypto/CryptoAlgorithm.cpp:
429         (WebCore::CryptoAlgorithm::encrypt):
430         (WebCore::CryptoAlgorithm::decrypt):
431         (WebCore::CryptoAlgorithm::sign):
432         (WebCore::CryptoAlgorithm::verify):
433         (WebCore::CryptoAlgorithm::digest):
434         (WebCore::CryptoAlgorithm::generateKey):
435         (WebCore::CryptoAlgorithm::deriveKey):
436         (WebCore::CryptoAlgorithm::deriveBits):
437         (WebCore::CryptoAlgorithm::importKey):
438         * crypto/CryptoAlgorithm.h:
439         * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
440         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
441         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
442         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
443         (WebCore::CryptoAlgorithmAES_CBC::generateKey):
444         (WebCore::CryptoAlgorithmAES_CBC::importKey):
445         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
446         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
447         (WebCore::CryptoAlgorithmHMAC::generateKey):
448         (WebCore::CryptoAlgorithmHMAC::importKey):
449         * crypto/algorithms/CryptoAlgorithmHMAC.h:
450         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
451         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
452         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
453         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
454         * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
455         (WebCore::CryptoAlgorithmSHA1::digest):
456         * crypto/algorithms/CryptoAlgorithmSHA1.h:
457         * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
458         (WebCore::CryptoAlgorithmSHA224::digest):
459         * crypto/algorithms/CryptoAlgorithmSHA224.h:
460         * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
461         (WebCore::CryptoAlgorithmSHA256::digest):
462         * crypto/algorithms/CryptoAlgorithmSHA256.h:
463         * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
464         (WebCore::CryptoAlgorithmSHA384::digest):
465         * crypto/algorithms/CryptoAlgorithmSHA384.h:
466         * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
467         (WebCore::CryptoAlgorithmSHA512::digest):
468         * crypto/algorithms/CryptoAlgorithmSHA512.h:
469         * crypto/keys/CryptoKeyRSA.h:
470         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
471         (WebCore::transformAES_CBC):
472         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
473         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
474         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
475         (WebCore::CryptoAlgorithmHMAC::sign):
476         (WebCore::CryptoAlgorithmHMAC::verify):
477         * crypto/mac/CryptoKeyRSAMac.cpp:
478         (WebCore::CryptoKeyRSA::generatePair):
479
480 2013-11-20  Robert Hogan  <robert@webkit.org>
481
482         REGRESSION(r127163): Respect clearance set on ancestors when placing floats
483         https://bugs.webkit.org/show_bug.cgi?id=119979
484
485         Reviewed by David Hyatt.
486
487         Refactor the way self-collapsing blocks with clearance are positioned so that they
488         get the correct logical-top position during margin-collapsing.
489
490         Test: fast/block/margin-collapse/self-collapsing-block-with-float-descendants.html
491
492         * rendering/RenderBlockFlow.cpp:
493         (WebCore::RenderBlockFlow::clearFloats):
494         (WebCore::RenderBlockFlow::marginOffsetForSelfCollapsingBlock):
495         (WebCore::RenderBlockFlow::collapseMargins):
496         (WebCore::RenderBlockFlow::clearFloatsIfNeeded):
497         (WebCore::RenderBlockFlow::handleAfterSideOfBlock):
498         * rendering/RenderBlockFlow.h:
499
500 2013-11-20  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
501
502         [GTK] Remove Chromium as user agent and claim to be Safari in OS X
503         https://bugs.webkit.org/show_bug.cgi?id=124229
504
505         Reviewed by Martin Robinson.
506
507         http://www.duolingo.com/ doesn't get render correctly because it uses
508         Chrome/Chromium specific variables, added after it was forked. Because
509         of this, it is necessary to remove the Chrome/Chromium identification
510         in the user agent. Also, from now on, by default, The GTK+ port will
511         claim to be Safari in OS X to avoid loading wrong resources.
512
513         * platform/gtk/UserAgentGtk.cpp:
514         (WebCore::standardUserAgent):
515
516 2013-11-20  Commit Queue  <commit-queue@webkit.org>
517
518         Unreviewed, rolling out r159551.
519         http://trac.webkit.org/changeset/159551
520         https://bugs.webkit.org/show_bug.cgi?id=124669
521
522         made many tests asserts (Requested by anttik on #webkit).
523
524         * html/HTMLDetailsElement.h:
525         * html/HTMLMediaElement.cpp:
526         (HTMLMediaElement::selectNextSourceChild):
527         * html/HTMLMetaElement.h:
528         * html/HTMLObjectElement.cpp:
529         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
530         * html/HTMLOptionElement.cpp:
531         (WebCore::HTMLOptionElement::isDisabledFormControl):
532         * html/HTMLPlugInImageElement.cpp:
533         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
534         * html/HTMLSummaryElement.cpp:
535         (WebCore::HTMLSummaryElement::detailsElement):
536         * html/HTMLSummaryElement.h:
537         * html/HTMLTableCaptionElement.h:
538         * html/HTMLTableElement.cpp:
539         (WebCore::HTMLTableElement::caption):
540         (WebCore::HTMLTableElement::tHead):
541         (WebCore::HTMLTableElement::tFoot):
542         (WebCore::HTMLTableElement::lastBody):
543         * html/HTMLTableRowElement.cpp:
544         (WebCore::HTMLTableRowElement::rowIndex):
545         * html/HTMLTableSectionElement.h:
546         * html/HTMLTagNames.in:
547         * html/MediaDocument.cpp:
548         (WebCore::MediaDocumentParser::createDocumentStructure):
549         * html/shadow/DetailsMarkerControl.cpp:
550         (WebCore::DetailsMarkerControl::summaryElement):
551         * loader/FrameLoader.cpp:
552         (WebCore::FrameLoader::handleFallbackContent):
553         * loader/ImageLoader.cpp:
554         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
555         * page/DragController.cpp:
556         (WebCore::DragController::canProcessDrag):
557         * page/Frame.cpp:
558         (WebCore::Frame::searchForLabelsBeforeElement):
559         * page/SpatialNavigation.cpp:
560         (WebCore::frameOwnerElement):
561
562 2013-11-20  Zoltan Horvath  <zoltan@webkit.org>
563
564         Move LineWidth.{h,cpp} into rendering/line
565         <https://webkit.org/b/124448>
566
567         Reviewed by David Hyatt.
568
569         In r159354 I introduced line directory. Now it's time to move the helper classes of RenderBlockLineLayout into 'line' subdirectory.
570
571         No new tests, no behavior change.
572
573         * CMakeLists.txt:
574         * GNUmakefile.list.am:
575         * WebCore.vcxproj/WebCore.vcxproj:
576         * WebCore.vcxproj/WebCore.vcxproj.filters:
577         * WebCore.xcodeproj/project.pbxproj:
578         * rendering/line/LineWidth.cpp: Renamed from Source/WebCore/rendering/LineWidth.cpp.
579         (WebCore::LineWidth::LineWidth):
580         (WebCore::LineWidth::fitsOnLine):
581         (WebCore::LineWidth::fitsOnLineIncludingExtraWidth):
582         (WebCore::LineWidth::fitsOnLineExcludingTrailingWhitespace):
583         (WebCore::LineWidth::updateAvailableWidth):
584         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded):
585         (WebCore::LineWidth::commit):
586         (WebCore::LineWidth::applyOverhang):
587         (WebCore::LineWidth::fitBelowFloats):
588         (WebCore::LineWidth::setTrailingWhitespaceWidth):
589         (WebCore::LineWidth::updateCurrentShapeSegment):
590         (WebCore::LineWidth::computeAvailableWidthFromLeftAndRight):
591         (WebCore::LineWidth::fitsOnLineExcludingTrailingCollapsedWhitespace):
592         * rendering/line/LineWidth.h: Renamed from Source/WebCore/rendering/LineWidth.h.
593         (WebCore::LineWidth::currentWidth):
594         (WebCore::LineWidth::uncommittedWidth):
595         (WebCore::LineWidth::committedWidth):
596         (WebCore::LineWidth::availableWidth):
597         (WebCore::LineWidth::addUncommittedWidth):
598         (WebCore::LineWidth::shouldIndentText):
599
600 2013-11-20  Brady Eidson  <beidson@apple.com>
601
602         Alphabetization followup to r159567
603
604         Reviewed by style-bot  :(
605
606         * Modules/indexeddb/IDBDatabaseBackend.h:
607         * Modules/indexeddb/IDBIndex.h:
608         * Modules/indexeddb/IDBObjectStore.h:
609         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
610         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
611         * inspector/InspectorIndexedDBAgent.cpp:
612
613 2013-11-20  Brady Eidson  <beidson@apple.com>
614
615         Rename IDBMetadata.h to IDBDatabaseMetadata.h
616         https://bugs.webkit.org/show_bug.cgi?id=124668
617
618         Reviewed by Dean Jackson.
619
620         * GNUmakefile.list.am:
621         * WebCore.xcodeproj/project.pbxproj:
622
623         * Modules/indexeddb/IDBDatabase.h:
624         * Modules/indexeddb/IDBDatabaseBackend.h:
625
626         * Modules/indexeddb/IDBDatabaseMetadata.h: Renamed from Source/WebCore/Modules/indexeddb/IDBMetadata.h.
627         (WebCore::IDBIndexMetadata::IDBIndexMetadata):
628         (WebCore::IDBObjectStoreMetadata::IDBObjectStoreMetadata):
629         (WebCore::IDBDatabaseMetadata::IDBDatabaseMetadata):
630
631         * Modules/indexeddb/IDBIndex.h:
632         * Modules/indexeddb/IDBObjectStore.h:
633         * Modules/indexeddb/IDBServerConnection.h:
634         * Modules/indexeddb/IDBTransaction.h:
635         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
636         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
637         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h:
638         * inspector/InspectorIndexedDBAgent.cpp:
639
640 2013-11-20  Ryosuke Niwa  <rniwa@webkit.org>
641
642         Remove bogus assertions in updateNameForTreeScope and updateNameForDocument
643         https://bugs.webkit.org/show_bug.cgi?id=124639
644
645         Reviewed by Darin Adler.
646
647         Removed assertions. We can't assert that the element in a tree scope or a document
648         since these two functions are called from removedFrom.
649
650         * dom/Element.cpp:
651         (WebCore::Element::updateNameForTreeScope):
652         (WebCore::Element::updateNameForDocument):
653
654 2013-11-20  Brady Eidson  <beidson@apple.com>
655
656         Cleanup getOrEstablishIDBDatabaseMetadata and stub it out in WK2
657         https://bugs.webkit.org/show_bug.cgi?id=124635
658
659         Reviewed by Tim Horton.
660
661         getOrEstablishIDBDatabaseMetadata() should not have to take a database name parameter because the 
662         server connection should already know what database name it represents.
663
664         * Modules/indexeddb/IDBDatabaseBackend.cpp:
665         (WebCore::IDBDatabaseBackend::openInternalAsync):
666
667         * Modules/indexeddb/IDBServerConnection.h:
668         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
669         (WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
670         (WebCore::IDBServerConnectionLevelDB::getOrEstablishIDBDatabaseMetadata):
671         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
672
673         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
674         (WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
675         (WebCore::IDBFactoryBackendLevelDB::open):
676
677 2013-11-20  Andrzej Badowski  <a.badowski@samsung.com>
678
679         [EFL] <video> and <audio> should be accessible.
680         https://bugs.webkit.org/show_bug.cgi?id=124494
681
682         Reviewed by Gyuyoung Kim.
683
684         Adding descriptions of media-element controls.
685
686         * platform/efl/LocalizedStringsEfl.cpp:
687         (WebCore::localizedMediaControlElementString):
688
689 2013-11-20  Antti Koivisto  <antti@apple.com>
690
691         Don't paint simple text runs outside the paint rect
692         https://bugs.webkit.org/show_bug.cgi?id=124651
693
694         Reviewed by Anders Carlsson.
695         
696         This speeds up partial paints for long text paragraphs. 
697         Also add the same optimization for hit testing.
698
699         * rendering/SimpleLineLayoutFunctions.cpp:
700         (WebCore::SimpleLineLayout::paintFlow):
701         
702             Iterate over the run range that needs painting.
703
704         (WebCore::SimpleLineLayout::hitTestFlow):
705         
706             Iterate over the line range that needs painting.
707
708         * rendering/SimpleLineLayoutResolver.h:
709         (WebCore::SimpleLineLayout::Range::Range):
710         (WebCore::SimpleLineLayout::Range::begin):
711         (WebCore::SimpleLineLayout::Range::end):
712         
713             Add Range type.
714
715         (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):
716         (WebCore::SimpleLineLayout::RunResolver::Iterator::operator++):
717         (WebCore::SimpleLineLayout::RunResolver::Iterator::advance):
718         (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines):
719         
720             Optimize case where runCount==lineCount. In this case we can just directly jump
721             to the right run/line.
722
723         (WebCore::SimpleLineLayout::RunResolver::begin):
724         (WebCore::SimpleLineLayout::RunResolver::end):
725         (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
726         (WebCore::SimpleLineLayout::RunResolver::rangeForRect):
727         
728             Get the range corresponding to a rect. This currently cares about y coordinates only.
729
730         (WebCore::SimpleLineLayout::LineResolver::Iterator::operator++):
731         (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
732         (WebCore::SimpleLineLayout::LineResolver::rangeForRect):
733
734 2013-11-20  Antoine Quint  <graouts@apple.com>
735
736         Cannot animate "points" attribute for <svg:polygon>
737         https://bugs.webkit.org/show_bug.cgi?id=21371
738
739         Reviewed by Antti Koivisto.
740
741         Ensure we use animated list of points for SVG <polygon> and <polyline> elements
742         when we build the path used to draw them, otherwise the animated changes won't
743         be rendered and the base value will be used.
744
745         Tests: svg/animations/polygon-set.svg
746                svg/animations/polyline-set.svg
747
748         * rendering/svg/SVGPathData.cpp:
749         (WebCore::updatePathFromPolygonElement):
750         (WebCore::updatePathFromPolylineElement):
751
752 2013-11-20  Andrei Bucur  <abucur@adobe.com>
753
754         [CSSRegions] Move region styling code into RenderNamedFlowFragment
755         https://bugs.webkit.org/show_bug.cgi?id=122957
756
757         Reviewed by Mihnea Ovidenie.
758
759         The patch moves all the region styling functionality outside of RenderRegion
760         to RenderNamedFlowFragment and outside of RenderFlowThread to RenderNamedFlowThread.
761         This generates a couple of undesired casts that will be removed in later patches
762         when everything CSS Regions specific will be located inside RenderNamedFlowThread
763         and RenderNamedFlowFragment (e.g. the move of the isValid flag, the auto-height
764         code etc.).
765
766         The painting function was also moved from RenderRegion to RenderNamedFlowFragment. It
767         was only used by the CSS Regions code. The new multi-column implementation has its own
768         painting mechanism.
769
770         Tests: No changed functionality, just refactorings.
771
772         * rendering/RenderFlowThread.cpp:
773         (WebCore::RenderFlowThread::RenderFlowThread):
774         (WebCore::RenderFlowThread::removeFlowChildInfo):
775         (WebCore::RenderFlowThread::clearRenderBoxRegionInfoAndCustomStyle):
776         * rendering/RenderFlowThread.h:
777         * rendering/RenderInline.cpp:
778         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
779         * rendering/RenderNamedFlowFragment.cpp:
780         (WebCore::RenderNamedFlowFragment::RenderNamedFlowFragment):
781         (WebCore::RenderNamedFlowFragment::styleDidChange):
782         (WebCore::RenderNamedFlowFragment::checkRegionStyle):
783         (WebCore::RenderNamedFlowFragment::computeStyleInRegion):
784         (WebCore::RenderNamedFlowFragment::computeChildrenStyleInRegion):
785         (WebCore::RenderNamedFlowFragment::setObjectStyleInRegion):
786         (WebCore::RenderNamedFlowFragment::clearObjectStyleInRegion):
787         (WebCore::RenderNamedFlowFragment::setRegionObjectsRegionStyle):
788         (WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle):
789         (WebCore::shouldPaintRegionContentsInPhase):
790         (WebCore::RenderNamedFlowFragment::paintObject):
791         * rendering/RenderNamedFlowFragment.h:
792         * rendering/RenderNamedFlowThread.cpp:
793         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
794         (WebCore::RenderNamedFlowThread::checkRegionsWithStyling):
795         (WebCore::RenderNamedFlowThread::clearRenderObjectCustomStyle):
796         (WebCore::RenderNamedFlowThread::removeFlowChildInfo):
797         * rendering/RenderNamedFlowThread.h:
798         * rendering/RenderRegion.cpp:
799         (WebCore::RenderRegion::RenderRegion):
800         (WebCore::RenderRegion::styleDidChange):
801         (WebCore::RenderRegion::attachRegion):
802         * rendering/RenderRegion.h:
803         * rendering/RenderTreeAsText.cpp:
804         (WebCore::writeRenderRegionList):
805
806 2013-11-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
807
808         Generate toHTMLFooElement() to clean up static_cast<>
809         https://bugs.webkit.org/show_bug.cgi?id=124571
810
811         Reviewed by Darin Adler.
812
813         Though there are a lot of clean up commits before, there are still
814         use of static_cast<HTMLFooElement*>. To clean up them, we need to generate
815         toHTMLDetails|Meta|Summary|TableSection|TableCaptionElement().
816
817         Additionally, other static_cast<> are removed as well.
818
819         No new tests, no behavior changes.
820
821         * html/HTMLDetailsElement.h:
822         * html/HTMLMediaElement.cpp:
823         (HTMLMediaElement::selectNextSourceChild):
824         * html/HTMLMetaElement.h:
825         * html/HTMLObjectElement.cpp:
826         (WebCore::HTMLObjectElement::shouldAllowQuickTimeClassIdQuirk):
827         * html/HTMLOptionElement.cpp:
828         (WebCore::HTMLOptionElement::isDisabledFormControl):
829         * html/HTMLPlugInImageElement.cpp:
830         (WebCore::HTMLPlugInImageElement::updateWidgetCallback):
831         * html/HTMLSummaryElement.cpp:
832         (WebCore::HTMLSummaryElement::detailsElement):
833         * html/HTMLSummaryElement.h:
834         * html/HTMLTableCaptionElement.h:
835         * html/HTMLTableElement.cpp:
836         (WebCore::HTMLTableElement::caption):
837         (WebCore::HTMLTableElement::tHead):
838         (WebCore::HTMLTableElement::tFoot):
839         (WebCore::HTMLTableElement::lastBody):
840         * html/HTMLTableRowElement.cpp:
841         (WebCore::HTMLTableRowElement::rowIndex):
842         * html/HTMLTableSectionElement.h:
843         * html/HTMLTagNames.in:
844         * html/MediaDocument.cpp:
845         (WebCore::MediaDocumentParser::createDocumentStructure):
846         * html/shadow/DetailsMarkerControl.cpp:
847         (WebCore::DetailsMarkerControl::summaryElement):
848         * loader/FrameLoader.cpp:
849         (WebCore::FrameLoader::handleFallbackContent):
850         * loader/ImageLoader.cpp:
851         (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
852         * page/DragController.cpp:
853         (WebCore::DragController::canProcessDrag):
854         * page/Frame.cpp:
855         (WebCore::Frame::searchForLabelsBeforeElement):
856         * page/SpatialNavigation.cpp:
857         (WebCore::frameOwnerElement):
858
859 2013-11-19  Ryosuke Niwa  <rniwa@webkit.org>
860
861         Enable HTMLTemplateElement on Mac port
862         https://bugs.webkit.org/show_bug.cgi?id=124637
863
864         Reviewed by Tim Horton.
865
866         Enabled the feature.
867
868         * Configurations/FeatureDefines.xcconfig:
869
870 2013-11-19  Jinwoo Song  <jinwoo7.song@samsung.com>
871
872         Remove unused member function declaration in DocumentOrderedMap.h
873         https://bugs.webkit.org/show_bug.cgi?id=124629
874
875         Reviewed by Ryosuke Niwa.
876
877         checkConsistency() is not used anywhere.
878
879         * dom/DocumentOrderedMap.h:
880
881 2013-11-19  Seokju Kwon  <seokju@webkit.org>
882
883         Removal of redundant function call in Editor::insertTextWithoutSendingTextEvent
884         https://bugs.webkit.org/show_bug.cgi?id=124563
885
886         Reviewed by Brent Fulgham.
887
888         No new tests needed, no behavior change.
889
890         * editing/Editor.cpp:
891         (WebCore::Editor::insertTextWithoutSendingTextEvent):
892
893 2013-11-19  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
894
895         Fix build break after r159533.
896
897         * CMakeLists.txt: Update ANGLE files.
898
899 2013-11-19  Zhuang Zhigang  <zhuangzg@cn.fujitsu.com>
900
901         Implement spin control on WinCE port.
902         https://bugs.webkit.org/show_bug.cgi?id=123254
903
904         Reviewed by Brent Fulgham.
905
906         * rendering/RenderThemeWinCE.cpp:
907         (WebCore::RenderThemeWinCE::adjustInnerSpinButtonStyle):
908         (WebCore::RenderThemeWinCE::paintInnerSpinButton):
909         * rendering/RenderThemeWinCE.h:
910
911 2013-11-19  Roger Fong  <roger_fong@apple.com>
912
913         Update ANGLE sources.
914         https://bugs.webkit.org/show_bug.cgi?id=124615.
915
916         Reviewed by Dean Jackson.
917
918         Tests covered by Khronos WebGL conformance tests.
919
920         * platform/graphics/ANGLEWebKitBridge.cpp: Resolve a build error that resulted from updating ANGLE.
921         (WebCore::getSymbolInfo):
922         (WebCore::ANGLEWebKitBridge::compileShaderSource):
923
924 2013-11-19  Filip Pizlo  <fpizlo@apple.com>
925
926         Rename WatchpointSet::notifyWrite() should be renamed to WatchpointSet::fireAll()
927         https://bugs.webkit.org/show_bug.cgi?id=124609
928
929         Rubber stamped by Mark Lam.
930
931         No new tests because no new behavior.
932
933         * bindings/scripts/CodeGeneratorJS.pm:
934         (GenerateHeader):
935         * bindings/scripts/test/JS/JSTestEventTarget.h:
936         (WebCore::JSTestEventTarget::create):
937
938 2013-11-19  Bear Travis  <betravis@adobe.com>
939
940         [CSS Shapes] Parse [<box> || <shape>] values
941         https://bugs.webkit.org/show_bug.cgi?id=124426
942
943         Reviewed by Dirk Schulze.
944
945         Shape values can now have an optional box specifying the coordinate sytem to use
946         for sizing and positioning the shape. This patch adds the functionality to support
947         parsing these new values.
948
949         * css/BasicShapeFunctions.cpp:
950         (WebCore::valueForBox): Added function to convert between BasicShape::ReferenceBox
951         and CSSPrimitiveValue (which wraps a CSSValueID).
952         (WebCore::boxForValue): Ditto.
953         (WebCore::valueForBasicShape): Translations between CSSBasicShape and BasicShape
954         must now include the reference box.
955         (WebCore::basicShapeForValue): Ditto.
956         * css/BasicShapeFunctions.h:
957         * css/CSSBasicShapes.cpp:
958         (WebCore::buildRectangleString): Include the box in the built CSS string.
959         (WebCore::CSSBasicShapeRectangle::cssText): Ditto.
960         (WebCore::CSSBasicShapeRectangle::equals): Include the box in comparisions.
961         (WebCore::buildCircleString):
962         (WebCore::CSSBasicShapeCircle::cssText):
963         (WebCore::CSSBasicShapeCircle::equals):
964         (WebCore::buildEllipseString):
965         (WebCore::CSSBasicShapeEllipse::cssText):
966         (WebCore::CSSBasicShapeEllipse::equals):
967         (WebCore::buildPolygonString):
968         (WebCore::CSSBasicShapePolygon::cssText):
969         (WebCore::CSSBasicShapePolygon::equals):
970         (WebCore::buildInsetRectangleString):
971         (WebCore::CSSBasicShapeInsetRectangle::cssText):
972         (WebCore::CSSBasicShapeInsetRectangle::equals):
973         * css/CSSBasicShapes.h:
974         (WebCore::CSSBasicShape::box): BasicShapes now have an reference box.
975         (WebCore::CSSBasicShape::setBox): Ditto.
976         * css/CSSComputedStyleDeclaration.cpp:
977         (WebCore::ComputedStyleExtractor::propertyValue): Shape-inside can also
978         parse the box values.
979         * css/CSSParser.cpp:
980         (WebCore::CSSParser::parseValue): The shape properties use parseShapeProperty,
981         while minor adjustments were made to parseBasicShape's return type.
982         (WebCore::isBoxValue): Is the CSSValueID one of  the box values.
983         (WebCore::CSSParser::parseShapeProperty): Parse one of the shape properties
984         and return an appropriate CSSValue.
985         (WebCore::CSSParser::parseBasicShape): Return a CSSBasicShape rather than
986         adding a ShapeValue to the style.
987         * css/CSSParser.h:
988         * rendering/style/BasicShapes.h:
989         (WebCore::BasicShape::box): Add a box to BasicShape and getters/setters.
990         (WebCore::BasicShape::setBox): Ditto.
991         (WebCore::BasicShape::BasicShape): Ditto.
992
993 2013-11-19  Jer Noble  <jer.noble@apple.com>
994
995         [Mac] 9 WebGL conformance failures after r159518.
996         https://bugs.webkit.org/show_bug.cgi?id=124608
997
998         Reviewed by Dean Jackson.
999
1000         Once we removed the CIImage drawing path, there was no longer any reason to flip the
1001         CGImageRef before drawing to the provided GraphicsContext.
1002
1003         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1004         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
1005
1006 2013-11-19  Chris Fleizach  <cfleizach@apple.com>
1007
1008         Web Speech API crashes onboundary event handling with reload
1009         https://bugs.webkit.org/show_bug.cgi?id=124607
1010
1011         Reviewed by Tim Horton.
1012
1013         If the page goes away, we need to cleanup the Mac platform synthesizer object, because
1014         NSSpeechSynthesizer is retained elsewhere to handle the callbacks (so it doesn't automatically
1015         get torn down).
1016
1017         The layout tests for speech rely on a Mock synthesizer, so there is no good way to test this
1018         Mac platform specific behavior.       
1019
1020         * platform/mac/PlatformSpeechSynthesizerMac.mm:
1021         (-[WebSpeechSynthesisWrapper invalidate]):
1022         (WebCore::PlatformSpeechSynthesizer::~PlatformSpeechSynthesizer):
1023
1024 2013-11-19  Mark Lam  <mark.lam@apple.com>
1025
1026         Add tracking of endColumn for Executables.
1027         https://bugs.webkit.org/show_bug.cgi?id=124245.
1028
1029         Reviewed by Geoffrey Garen.
1030
1031         Test: js/dom/script-start-end-locations.html
1032
1033         * ForwardingHeaders/bytecode: Added.
1034         * ForwardingHeaders/bytecode/CodeBlock.h: Added.
1035         * WebCore.exp.in:
1036         * testing/Internals.cpp:
1037         (WebCore::GetCallerCodeBlockFunctor::GetCallerCodeBlockFunctor):
1038         (WebCore::GetCallerCodeBlockFunctor::operator()):
1039         (WebCore::GetCallerCodeBlockFunctor::codeBlock):
1040         (WebCore::Internals::parserMetaData):
1041         * testing/Internals.h:
1042         * testing/Internals.idl:
1043
1044 2013-11-15  Jer Noble  <jer.noble@apple.com>
1045
1046         [MSE] Support fastSeek() in MediaSource.
1047         https://bugs.webkit.org/show_bug.cgi?id=124422
1048
1049         Reviewed by Eric Carlson.
1050
1051         Test: media/media-source/media-source-fastseek.html
1052
1053         * Modules/mediasource/MediaSource.cpp:
1054         * Modules/mediasource/MediaSource.h:
1055
1056         Add support for "seek to the next fastest time" in MediaSource by
1057         returning the time of the nearest Sync sample.
1058
1059         Move the data structure logic out of SourceBuffer and into it's own
1060         class:
1061         * Modules/mediasource/SampleMap.cpp: Added.
1062         (WebCore::SampleIsLessThanMediaTimeComparator::operator()):
1063         (WebCore::SampleIsGreaterThanMediaTimeComparator::operator()):
1064         (WebCore::SampleIsRandomAccess::operator()):
1065         (WebCore::SamplePresentationTimeIsWithinRangeComparator::operator()):
1066         (WebCore::SampleMap::addSample):
1067         (WebCore::SampleMap::removeSample):
1068         (WebCore::SampleMap::findSampleContainingPresentationTime):
1069         (WebCore::SampleMap::findSampleAfterPresentationTime):
1070         (WebCore::SampleMap::findSampleWithDecodeTime):
1071         (WebCore::SampleMap::reverseFindSampleContainingPresentationTime):
1072         (WebCore::SampleMap::reverseFindSampleBeforePresentationTime):
1073         (WebCore::SampleMap::reverseFindSampleWithDecodeTime):
1074         (WebCore::SampleMap::findSyncSamplePriorToPresentationTime):
1075         (WebCore::SampleMap::findSyncSamplePriorToDecodeIterator):
1076         (WebCore::SampleMap::findSyncSampleAfterPresentationTime):
1077         (WebCore::SampleMap::findSyncSampleAfterDecodeIterator):
1078         (WebCore::SampleMap::findSamplesBetweenPresentationTimes):
1079         (WebCore::SampleMap::findDependentSamples):
1080         * Modules/mediasource/SampleMap.h: Added.
1081         (WebCore::SampleMap::presentationBegin):
1082         (WebCore::SampleMap::presentationEnd):
1083         (WebCore::SampleMap::decodeBegin):
1084         (WebCore::SampleMap::decodeEnd):
1085         (WebCore::SampleMap::reversePresentationBegin):
1086         (WebCore::SampleMap::reversePresentationEnd):
1087         (WebCore::SampleMap::reverseDecodeBegin):
1088         (WebCore::SampleMap::reverseDecodeEnd):
1089
1090         Add logic to find and return the time of the next & previous sync
1091         sample, within the threshold provided:
1092         * Modules/mediasource/SourceBuffer.cpp:
1093         (WebCore::SourceBuffer::TrackBuffer::TrackBuffer):
1094         (WebCore::SourceBuffer::sourceBufferPrivateSeekToTime):
1095         (WebCore::SourceBuffer::sourceBufferPrivateFastSeekTimeForMediaTime):
1096         (WebCore::SourceBuffer::appendBufferTimerFired):
1097         (WebCore::SourceBuffer::setActive):
1098         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
1099         (WebCore::SourceBuffer::sourceBufferPrivateDidBecomeReadyForMoreSamples):
1100         (WebCore::SourceBuffer::provideMediaData):
1101         * Modules/mediasource/SourceBuffer.h:
1102         * platform/graphics/SourceBufferPrivate.h:
1103         (WebCore::SourceBufferPrivate::setActive):
1104         * platform/graphics/SourceBufferPrivateClient.h:
1105         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateFastSeekTimeForMediaTime):
1106         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateSeekToTime):
1107
1108         Add new files to the project:
1109         * WebCore.xcodeproj/project.pbxproj:
1110
1111         Drive-by fixes in HTMLMediaElement:
1112         * html/HTMLMediaSource.h:
1113         * html/HTMLMediaElement.cpp:
1114         (HTMLMediaElement::finishSeek): Cause the MediaSource to check the ready state of all its buffers.
1115         (HTMLMediaElement::selectNextSourceChild): Pass in whether the source element has a MediaSource URL.
1116
1117         Implement the seekWithTolerance behavior in MockMediaPlayerMediaSource:
1118         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1119         (WebCore::MockMediaPlayerMediaSource::maxTimeSeekableDouble):
1120         (WebCore::MockMediaPlayerMediaSource::currentTimeDouble):
1121         (WebCore::MockMediaPlayerMediaSource::seekWithTolerance):
1122         (WebCore::MockMediaPlayerMediaSource::advanceCurrentTime):
1123         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
1124         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
1125         (WebCore::MockMediaSourcePrivate::seekToTime):
1126         * platform/mock/mediasource/MockMediaSourcePrivate.h:
1127         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
1128         (WebCore::MockMediaSample::flags):
1129         (WebCore::MockSourceBufferPrivate::setActive):
1130         (WebCore::MockSourceBufferPrivate::fastSeekTimeForMediaTime):
1131         (WebCore::MockSourceBufferPrivate::seekToTime):
1132         * platform/mock/mediasource/MockSourceBufferPrivate.h:
1133
1134 2013-11-19  Jer Noble  <jer.noble@apple.com>
1135
1136         [Mac] 10X slower than Chrome when drawing a video into a canvas
1137         https://bugs.webkit.org/show_bug.cgi?id=124599
1138
1139         Reviewed by Dean Jackson.
1140
1141         Improve performance by creating a CGImageRef which directly references the CVPixelBuffer provided
1142         by AVPlayerItemVideoOutput:
1143         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1144         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1145         (WebCore::CVPixelBufferGetBytePointerCallback):
1146         (WebCore::CVPixelBufferReleaseBytePointerCallback):
1147         (WebCore::CVPixelBufferReleaseInfoCallback):
1148         (WebCore::createImageFromPixelBuffer):
1149         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage):
1150
1151         Additionally, when asked to paint with an AVPlayerItemVideoOutput, block until the output notifies
1152         its delegate that a pixel buffer is available:
1153         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1154         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1155         (WebCore::globalPullDelegateQueue):
1156         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
1157         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
1158         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
1159         (WebCore::MediaPlayerPrivateAVFoundationObjC::nativeImageForCurrentTime):
1160         (WebCore::MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange):
1161         (WebCore::MediaPlayerPrivateAVFoundationObjC::outputMediaDataWillChange):
1162         (-[WebCoreAVFPullDelegate initWithCallback:]):
1163         (-[WebCoreAVFPullDelegate outputMediaDataWillChange:]):
1164         (-[WebCoreAVFPullDelegate outputSequenceWasFlushed:]):
1165         
1166         To further optimize video -> canvas drawing, add a method which can return a PassNativeImage to be
1167         drawn directly onto the canvas, rather than rendering into an intermediary context:
1168         * html/HTMLVideoElement.cpp:
1169         (WebCore::HTMLVideoElement::nativeImageForCurrentTime):
1170         * html/HTMLVideoElement.h:
1171         * html/canvas/CanvasRenderingContext2D.cpp:
1172         (WebCore::CanvasRenderingContext2D::drawImage):
1173         * platform/graphics/MediaPlayer.cpp:
1174         (WebCore::MediaPlayer::nativeImageForCurrentTime):
1175         * platform/graphics/MediaPlayer.h:
1176         * platform/graphics/MediaPlayerPrivate.h:
1177         (WebCore::MediaPlayerPrivateInterface::nativeImageForCurrentTime):
1178
1179 2013-11-19  Brady Eidson  <beidson@apple.com>
1180
1181         Consolidate IDBBackingStore*Interface and IDBBackingStore*LevelDB
1182         https://bugs.webkit.org/show_bug.cgi?id=124597
1183
1184         Reviewed by Alexey Proskuryakov.
1185
1186         The Interface abstraction doesn’t make sense anymore, as LevelDB will be the only implementor.
1187
1188         * Modules/indexeddb/IDBBackingStoreCursorInterface.h: Removed.
1189         * Modules/indexeddb/IDBBackingStoreInterface.h: Removed.
1190         * Modules/indexeddb/IDBBackingStoreTransactionInterface.h: Removed.
1191
1192         * Modules/indexeddb/IDBServerConnection.h:
1193
1194         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h:
1195         (WebCore::IDBBackingStoreCursorLevelDB::key):
1196         (WebCore::IDBBackingStoreCursorLevelDB::primaryKey):
1197         (WebCore::IDBBackingStoreCursorLevelDB::recordIdentifier):
1198
1199         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1200         (WebCore::IDBBackingStoreLevelDB::getOrEstablishIDBDatabaseMetadata):
1201         (WebCore::IDBBackingStoreLevelDB::updateIDBDatabaseVersion):
1202         (WebCore::IDBBackingStoreLevelDB::deleteDatabase):
1203         (WebCore::IDBBackingStoreLevelDB::createObjectStore):
1204         (WebCore::IDBBackingStoreLevelDB::deleteObjectStore):
1205         (WebCore::IDBBackingStoreLevelDB::getRecord):
1206         (WebCore::IDBBackingStoreLevelDB::putRecord):
1207         (WebCore::IDBBackingStoreLevelDB::clearObjectStore):
1208         (WebCore::IDBBackingStoreLevelDB::deleteRecord):
1209         (WebCore::IDBBackingStoreLevelDB::getKeyGeneratorCurrentNumber):
1210         (WebCore::IDBBackingStoreLevelDB::maybeUpdateKeyGeneratorCurrentNumber):
1211         (WebCore::IDBBackingStoreLevelDB::keyExistsInObjectStore):
1212         (WebCore::IDBBackingStoreLevelDB::createIndex):
1213         (WebCore::IDBBackingStoreLevelDB::deleteIndex):
1214         (WebCore::IDBBackingStoreLevelDB::putIndexDataForRecord):
1215         (WebCore::IDBBackingStoreLevelDB::findKeyInIndex):
1216         (WebCore::IDBBackingStoreLevelDB::getPrimaryKeyViaIndex):
1217         (WebCore::IDBBackingStoreLevelDB::keyExistsInIndex):
1218         (WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
1219         (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
1220         (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
1221         (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
1222         (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
1223         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
1224
1225         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
1226         (WebCore::IDBBackingStoreTransactionLevelDB::levelDBTransactionFrom):
1227
1228         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.cpp:
1229         (WebCore::IDBIndexWriterLevelDB::writeIndexKeys):
1230         (WebCore::IDBIndexWriterLevelDB::verifyIndexKeys):
1231         (WebCore::IDBIndexWriterLevelDB::addingKeyAllowed):
1232         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h:
1233
1234         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
1235         (WebCore::IDBServerConnectionLevelDB::get):
1236         (WebCore::IDBServerConnectionLevelDB::openCursor):
1237         (WebCore::IDBServerConnectionLevelDB::count):
1238         (WebCore::IDBServerConnectionLevelDB::deleteRange):
1239
1240         * WebCore.xcodeproj/project.pbxproj:
1241
1242 2013-11-19  Sergio Correia  <sergio.correia@openbossa.org>
1243
1244         Get rid of bare new in SVGAnimatedColorAnimator::constructFromString()
1245         https://bugs.webkit.org/show_bug.cgi?id=124595
1246
1247         Reviewed by Darin Adler.
1248
1249         Use std::unique_ptr instead, to manage the arguments passed to the create
1250         methods of SVGAnimatedType.
1251
1252         No new tests, covered by existing tests.
1253
1254         * svg/SVGAnimatedAngle.cpp:
1255         (WebCore::SVGAnimatedAngleAnimator::constructFromString): Replace bare
1256         pointer with std::unique_ptr.
1257         * svg/SVGAnimatedBoolean.cpp:
1258         (WebCore::SVGAnimatedBooleanAnimator::constructFromString): Ditto.
1259         * svg/SVGAnimatedColor.cpp:
1260         (WebCore::SVGAnimatedColorAnimator::constructFromString): Ditto.
1261         * svg/SVGAnimatedEnumeration.cpp:
1262         (WebCore::SVGAnimatedEnumerationAnimator::constructFromString): Ditto.
1263         * svg/SVGAnimatedInteger.cpp:
1264         (WebCore::SVGAnimatedIntegerAnimator::constructFromString): Ditto.
1265         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
1266         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::constructFromString):
1267         Ditto.
1268         * svg/SVGAnimatedLength.cpp:
1269         (WebCore::SVGAnimatedLengthAnimator::constructFromString): Ditto.
1270         * svg/SVGAnimatedLengthList.cpp:
1271         (WebCore::SVGAnimatedLengthListAnimator::constructFromString): Ditto.
1272         * svg/SVGAnimatedNumber.cpp:
1273         (WebCore::SVGAnimatedNumberAnimator::constructFromString): Ditto.
1274         * svg/SVGAnimatedNumberList.cpp:
1275         (WebCore::SVGAnimatedNumberListAnimator::constructFromString): Ditto.
1276         * svg/SVGAnimatedNumberOptionalNumber.cpp:
1277         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::constructFromString):
1278         Ditto.
1279         * svg/SVGAnimatedPointList.cpp:
1280         (WebCore::SVGAnimatedPointListAnimator::constructFromString): Ditto.
1281         * svg/SVGAnimatedPreserveAspectRatio.cpp:
1282         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::constructFromString):
1283         Ditto.
1284         * svg/SVGAnimatedRect.cpp:
1285         (WebCore::SVGAnimatedRectAnimator::constructFromString): Ditto.
1286         * svg/SVGAnimatedString.cpp:
1287         (WebCore::SVGAnimatedStringAnimator::constructFromString): Ditto.
1288         * svg/SVGAnimatedTransformList.cpp:
1289         (WebCore::SVGAnimatedTransformListAnimator::constructFromString):
1290         Ditto.
1291         * svg/SVGAnimatedType.cpp:
1292         (WebCore::SVGAnimatedType::createAngleAndEnumeration): Use
1293         std::unique_ptr instead of bare pointer as parameter.
1294         (WebCore::SVGAnimatedType::createBoolean): Ditto.
1295         (WebCore::SVGAnimatedType::createColor): Ditto.
1296         (WebCore::SVGAnimatedType::createEnumeration): Ditto.
1297         (WebCore::SVGAnimatedType::createInteger): Ditto.
1298         (WebCore::SVGAnimatedType::createIntegerOptionalInteger): Ditto.
1299         (WebCore::SVGAnimatedType::createLength): Ditto.
1300         (WebCore::SVGAnimatedType::createLengthList): Ditto.
1301         (WebCore::SVGAnimatedType::createNumber): Ditto.
1302         (WebCore::SVGAnimatedType::createNumberList): Ditto.
1303         (WebCore::SVGAnimatedType::createNumberOptionalNumber): Ditto.
1304         (WebCore::SVGAnimatedType::createPointList): Ditto.
1305         (WebCore::SVGAnimatedType::createPreserveAspectRatio): Ditto.
1306         (WebCore::SVGAnimatedType::createRect): Ditto.
1307         (WebCore::SVGAnimatedType::createString): Ditto.
1308         (WebCore::SVGAnimatedType::createTransformList): Ditto.
1309         * svg/SVGAnimatedType.h: Use std::unique_ptr as parameter in the
1310         create methods.
1311         * svg/SVGAnimatedTypeAnimator.h:
1312         (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValue): Make
1313         helper return std::unique_ptr instead of bare pointer.
1314         (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValues): Ditto.
1315
1316 2013-11-19  Hans Muller  <hmuller@adobe.com>
1317
1318         [CSS Shapes] Refactor RectangleShape
1319         https://bugs.webkit.org/show_bug.cgi?id=124416
1320
1321         Privatize and rename the FloatRoundedRect class defined in RectangleShape.h.
1322         The new class is called RectangleShape::ShapeBounds. This change enables
1323         creating a proper FloatRoundedRect analog of the existing RoundedRect class;
1324         part of adding support for box shapes, per the latest CSS spec.
1325
1326         Reviewed by Dean Jackson.
1327
1328         No new tests, just refactoring.
1329
1330         * rendering/shapes/RectangleShape.cpp:
1331         (WebCore::RectangleShape::ShapeBounds::paddingBounds):
1332         (WebCore::RectangleShape::ShapeBounds::marginBounds):
1333         (WebCore::RectangleShape::ShapeBounds::cornerInterceptForWidth):
1334         (WebCore::RectangleShape::shapePaddingBounds):
1335         (WebCore::RectangleShape::shapeMarginBounds):
1336         (WebCore::RectangleShape::getExcludedIntervals):
1337         (WebCore::RectangleShape::getIncludedIntervals):
1338         (WebCore::RectangleShape::firstIncludedIntervalLogicalTop):
1339         * rendering/shapes/RectangleShape.h:
1340         (WebCore::RectangleShape::ShapeBounds::ShapeBounds):
1341         (WebCore::RectangleShape::ShapeBounds::rx):
1342         (WebCore::RectangleShape::ShapeBounds::ry):
1343
1344 2013-11-19  Sergio Correia  <sergio.correia@openbossa.org>
1345
1346         Mark classes deriving from SVGAnimatedTypeAnimator as FINAL
1347         https://bugs.webkit.org/show_bug.cgi?id=124456
1348
1349         Reviewed by Darin Adler.
1350
1351         Also add OVERRIDE to their virtual methods appropriately and remove
1352         existing empty virtual destructors.
1353
1354         No new tests, covered by existing ones.
1355
1356         * svg/SVGAnimatedAngle.h:
1357         * svg/SVGAnimatedBoolean.h:
1358         * svg/SVGAnimatedColor.h:
1359         * svg/SVGAnimatedEnumeration.h:
1360         * svg/SVGAnimatedInteger.h:
1361         * svg/SVGAnimatedIntegerOptionalInteger.h:
1362         * svg/SVGAnimatedLength.h:
1363         * svg/SVGAnimatedLengthList.h:
1364         * svg/SVGAnimatedNumber.h:
1365         * svg/SVGAnimatedNumberList.h:
1366         * svg/SVGAnimatedNumberOptionalNumber.h:
1367         * svg/SVGAnimatedPath.h:
1368         * svg/SVGAnimatedPointList.h:
1369         * svg/SVGAnimatedPreserveAspectRatio.h:
1370         * svg/SVGAnimatedRect.h:
1371         * svg/SVGAnimatedString.h:
1372         * svg/SVGAnimatedTransformList.h:
1373
1374 2013-11-19  Brady Eidson  <beidson@apple.com>
1375
1376         Add WebIDBServerConnection and DatabaseProcessIDBConnection stubs
1377         https://bugs.webkit.org/show_bug.cgi?id=124562
1378
1379         Reviewed by Alexey Proskuryakov.
1380
1381         Export some more symbols and headers for WK2 to use.
1382
1383         * WebCore.exp.in:
1384         * WebCore.xcodeproj/project.pbxproj:
1385
1386 2013-11-19  Frédéric Wang  <fred.wang@free.fr>
1387
1388         Map the dir attribute to the CSS direction property.
1389         https://bugs.webkit.org/show_bug.cgi?id=124572.
1390
1391         Reviewed by Darin Adler.
1392
1393         Tests: mathml/presentation/direction-overall.html
1394                mathml/presentation/direction-token.html
1395                mathml/presentation/direction.html
1396
1397         * mathml/MathMLElement.cpp:
1398         (WebCore::MathMLElement::isPresentationAttribute): add dir
1399         (WebCore::MathMLElement::collectStyleForPresentationAttribute): map dir
1400         * mathml/mathattrs.in: add the dir attribute
1401         * mathml/mathtags.in: add the mstyle tag (needed to use mstyleTag)
1402
1403 2013-11-19  Sergio Correia  <sergio.correia@openbossa.org>
1404
1405         [SVG] Convert OwnPtr/PassOwnPtr to std::unique_ptr
1406         https://bugs.webkit.org/show_bug.cgi?id=124382
1407
1408         Reviewed by Darin Adler.
1409
1410         The files modified are mostly under WebCore/svg/; in a few cases, some
1411         "external" files needed changes as well.
1412
1413         No new tests, covered by existing ones.
1414
1415         * css/CSSFontFaceSource.cpp:
1416         * loader/cache/CachedImage.cpp:
1417         * loader/cache/CachedImage.h:
1418         * platform/graphics/SimpleFontData.cpp:
1419         * platform/graphics/SimpleFontData.h:
1420         * rendering/svg/RenderSVGResourceContainer.cpp:
1421         * svg/SVGAnimateElement.cpp:
1422         * svg/SVGAnimateElement.h:
1423         * svg/SVGAnimatedAngle.cpp:
1424         * svg/SVGAnimatedAngle.h:
1425         * svg/SVGAnimatedBoolean.cpp:
1426         * svg/SVGAnimatedBoolean.h:
1427         * svg/SVGAnimatedColor.cpp:
1428         * svg/SVGAnimatedColor.h:
1429         * svg/SVGAnimatedEnumeration.cpp:
1430         * svg/SVGAnimatedEnumeration.h:
1431         * svg/SVGAnimatedInteger.cpp:
1432         * svg/SVGAnimatedInteger.h:
1433         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
1434         * svg/SVGAnimatedIntegerOptionalInteger.h:
1435         * svg/SVGAnimatedLength.cpp:
1436         * svg/SVGAnimatedLength.h:
1437         * svg/SVGAnimatedLengthList.cpp:
1438         * svg/SVGAnimatedLengthList.h:
1439         * svg/SVGAnimatedNumber.cpp:
1440         * svg/SVGAnimatedNumber.h:
1441         * svg/SVGAnimatedNumberList.cpp:
1442         * svg/SVGAnimatedNumberList.h:
1443         * svg/SVGAnimatedNumberOptionalNumber.cpp:
1444         * svg/SVGAnimatedNumberOptionalNumber.h:
1445         * svg/SVGAnimatedPath.cpp:
1446         * svg/SVGAnimatedPath.h:
1447         * svg/SVGAnimatedPointList.cpp:
1448         * svg/SVGAnimatedPointList.h:
1449         * svg/SVGAnimatedPreserveAspectRatio.cpp:
1450         * svg/SVGAnimatedPreserveAspectRatio.h:
1451         * svg/SVGAnimatedRect.cpp:
1452         * svg/SVGAnimatedRect.h:
1453         * svg/SVGAnimatedString.cpp:
1454         * svg/SVGAnimatedString.h:
1455         * svg/SVGAnimatedTransformList.cpp:
1456         * svg/SVGAnimatedTransformList.h:
1457         * svg/SVGAnimatedType.cpp:
1458         * svg/SVGAnimatedType.h:
1459         * svg/SVGAnimatedTypeAnimator.cpp:
1460         * svg/SVGAnimatedTypeAnimator.h:
1461         * svg/SVGAnimatorFactory.h:
1462         * svg/SVGDocumentExtensions.cpp:
1463         * svg/SVGDocumentExtensions.h:
1464         * svg/SVGFontData.h:
1465         * svg/SVGFontElement.cpp:
1466         * svg/SVGFontElement.h:
1467         * svg/SVGGraphicsElement.cpp:
1468         * svg/SVGGraphicsElement.h:
1469         * svg/SVGPathByteStreamSource.h:
1470         * svg/SVGPathParser.h:
1471         * svg/SVGPathSegListSource.h:
1472         * svg/SVGPathStringSource.h:
1473         * svg/SVGPathUtilities.cpp:
1474         * svg/SVGPathUtilities.h:
1475         * svg/animation/SMILTimeContainer.cpp:
1476         * svg/animation/SMILTimeContainer.h:
1477         * svg/graphics/SVGImage.cpp:
1478         * svg/graphics/SVGImage.h:
1479         * svg/graphics/SVGImageCache.h:
1480         * svg/properties/SVGAttributeToPropertyMap.cpp:
1481         * svg/properties/SVGAttributeToPropertyMap.h:
1482
1483 2013-11-19  Zoltan Horvath  <zoltan@webkit.org>
1484
1485         Add LineInlineHeaders.h to WebCore.xcodeproj
1486         <https://webkit.org/b/124460>
1487
1488         Reviewed by Csaba Osztrogonác.
1489
1490         LineInlineHeaders.h (r159354) hasn't been added to WebCore.xcodeproj. This patch adds to it.
1491
1492         No new tests, no behavior change.
1493
1494         * WebCore.xcodeproj/project.pbxproj:
1495
1496 2013-11-19  Krzysztof Czech  <k.czech@samsung.com>
1497
1498         [AX] Use std::unique_ptr to manage AXComputedObjectAttributeCache
1499         https://bugs.webkit.org/show_bug.cgi?id=124404
1500
1501         Reviewed by Mario Sanchez Prada.
1502
1503         Convert OwnPtr/PassOwnPtr to std::unique_ptr.
1504
1505         * accessibility/AXObjectCache.cpp:
1506         (WebCore::AXObjectCache::startCachingComputedObjectAttributesUntilTreeMutates):
1507         (WebCore::AXObjectCache::stopCachingComputedObjectAttributes):
1508         * accessibility/AXObjectCache.h:
1509         (WebCore::AXComputedObjectAttributeCache::AXComputedObjectAttributeCache):
1510
1511 2013-11-19  Ryosuke Niwa  <rniwa@webkit.org>
1512
1513         Add more assertions with security implications in DocumentOrderedMap
1514         https://bugs.webkit.org/show_bug.cgi?id=124559
1515
1516         Reviewed by Antti Koivisto.
1517
1518         Assert that newly added elements and existing elements in the document ordered map are in the same tree scope
1519         as the document ordered map. Also exit early if we're about to add an element in a wrong document to the map.
1520         We don't exit early in get() because the damage has already been done at that point (the element may have been
1521         deleted already).
1522
1523         * dom/Document.cpp:
1524         (WebCore::Document::addImageElementByLowercasedUsemap):
1525         * dom/DocumentOrderedMap.cpp:
1526         (WebCore::DocumentOrderedMap::add): Assert that the newly added element is in the current tree scope.
1527         Also exit early if either the element is not in the tree scope or not in the right document.
1528         While this doesn't make the function completely fault safe, it'll catch when we try to add a detached node.
1529         (WebCore::DocumentOrderedMap::remove): Convert existing assertions to ones with security implication.
1530         (WebCore::DocumentOrderedMap::get): Assert with security implication that the element we're about to return
1531         is in the current tree scope. The element may have already been deleted if we ever hit these assertions.
1532         (WebCore::DocumentOrderedMap::getAllElementsById):  Convert an existing assertion to an assertion with security
1533         implication.
1534         * dom/DocumentOrderedMap.h:
1535         * dom/TreeScope.cpp:
1536         (WebCore::TreeScope::addElementById):
1537         (WebCore::TreeScope::addElementByName):
1538         (WebCore::TreeScope::addImageMap):
1539         (WebCore::TreeScope::addLabel):
1540         * html/HTMLDocument.cpp:
1541         (WebCore::HTMLDocument::addDocumentNamedItem):
1542         (WebCore::HTMLDocument::addWindowNamedItem):
1543         * html/HTMLImageElement.cpp:
1544         (WebCore::HTMLImageElement::insertedInto): Set InTreeScope flag before calling addImageElementByLowercasedUsemap.
1545         * html/HTMLMapElement.cpp:
1546         (WebCore::HTMLMapElement::insertedInto): Ditto for addImageMap.
1547
1548 2013-11-18  Commit Queue  <commit-queue@webkit.org>
1549
1550         Unreviewed, rolling out r159455.
1551         http://trac.webkit.org/changeset/159455
1552         https://bugs.webkit.org/show_bug.cgi?id=124568
1553
1554         broke two api tests (see bug 124564) (Requested by thorton on
1555         #webkit).
1556
1557         * CMakeLists.txt:
1558         * GNUmakefile.list.am:
1559         * WebCore.exp.in:
1560         * WebCore.vcxproj/WebCore.vcxproj:
1561         * WebCore.vcxproj/WebCore.vcxproj.filters:
1562         * WebCore.xcodeproj/project.pbxproj:
1563         * bindings/objc/DOM.mm:
1564         (-[DOMNode renderedImage]):
1565         (-[DOMRange renderedImageForcingBlackText:]):
1566         * dom/Clipboard.cpp:
1567         (WebCore::Clipboard::createDragImage):
1568         * dom/ClipboardMac.mm:
1569         (WebCore::Clipboard::createDragImage):
1570         * page/DragController.cpp:
1571         (WebCore::DragController::startDrag):
1572         * page/Frame.cpp:
1573         (WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
1574         (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
1575         (WebCore::Frame::nodeImage):
1576         (WebCore::Frame::dragImageForSelection):
1577         * page/Frame.h:
1578         * page/FrameSnapshotting.cpp: Removed.
1579         * page/FrameSnapshotting.h: Removed.
1580         * page/mac/FrameMac.mm: Copied from Source/WebCore/page/win/FrameWin.h.
1581         (WebCore::Frame::nodeImage):
1582         (WebCore::Frame::dragImageForSelection):
1583         * page/mac/FrameSnapshottingMac.h: Copied from Source/WebCore/page/win/FrameWin.h.
1584         * page/mac/FrameSnapshottingMac.mm: Added.
1585         (WebCore::imageFromRect):
1586         (WebCore::selectionImage):
1587         (WebCore::rangeImage):
1588         (WebCore::snapshotDragImage):
1589         * page/win/FrameWin.cpp:
1590         (WebCore::Frame::dragImageForSelection):
1591         (WebCore::Frame::nodeImage):
1592         * page/win/FrameWin.h:
1593         * platform/DragImage.cpp:
1594         (WebCore::fitDragImageToMaxSize):
1595         (WebCore::createDragImageForLink):
1596         * platform/DragImage.h:
1597
1598 2013-11-18  Mark Rowe  <mrowe@apple.com>
1599
1600         Use hw.activecpu for determining how many processes to spawn.
1601
1602         It's documented as the preferred way to determine the number of threads
1603         or processes to create in a SMP aware application.
1604
1605         Rubber-stamped by Tim Horton.
1606
1607         * WebCore.xcodeproj/project.pbxproj:
1608
1609 2013-11-18  Samuel White  <samuel_white@apple.com>
1610
1611         AX: aria-labelledby should be used in preference to aria-labeledby
1612         https://bugs.webkit.org/show_bug.cgi?id=62351
1613
1614         Reviewed by Chris Fleizach.
1615
1616         Making sure aria-labelled by overrides the incorrectly spelled aria-labeledby attribute.
1617
1618         Test: accessibility/aria-labelledby-overrides-aria-labeledby.html
1619
1620         * accessibility/AccessibilityNodeObject.cpp:
1621         (WebCore::AccessibilityNodeObject::ariaLabeledByElements):
1622
1623 2013-11-18  Zalan Bujtas  <zalan@apple.com>
1624
1625         use after free in WebCore::DocumentOrderedMap::remove / WebCore::TreeScope::removeElementById
1626         https://bugs.webkit.org/show_bug.cgi?id=121324
1627
1628         Reviewed by Ryosuke Niwa.
1629
1630         Update the document ordered map for an image element before dispatching load or error events
1631         when it's inserted into a document.
1632
1633         Test: fast/dom/modify-node-and-while-in-the-callback-too-crash.html
1634
1635         * dom/DocumentOrderedMap.cpp: defensive fix to avoid use after free issues.
1636         (WebCore::DocumentOrderedMap::remove):
1637         * html/HTMLImageElement.cpp:
1638         (WebCore::HTMLImageElement::insertedInto):
1639         * loader/ImageLoader.cpp:
1640         (WebCore::ImageLoader::updateFromElement): setting m_failedLoadURL makes
1641         repeated updateFromElement calls return early.
1642
1643 2013-11-18  Benjamin Poulain  <bpoulain@apple.com>
1644
1645         Upstream iOS's ResourceHandle implementation
1646         https://bugs.webkit.org/show_bug.cgi?id=124554
1647
1648         Reviewed by Sam Weinig.
1649
1650         * platform/network/ResourceHandle.h:
1651         (WebCore::ResourceHandle::quickLookHandle):
1652         (WebCore::ResourceHandle::setQuickLookHandle):
1653         * platform/network/ResourceHandleClient.h:
1654         (WebCore::ResourceHandleClient::connectionProperties):
1655         (WebCore::ResourceHandleClient::shouldCacheResponse):
1656         * platform/network/ResourceHandleInternal.h:
1657         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1658         * platform/network/cf/ResourceHandleCFNet.cpp:
1659         (WebCore::synthesizeRedirectResponseIfNecessary):
1660         (WebCore::willSendRequest):
1661         (WebCore::didReceiveResponse):
1662         (WebCore::didReceiveDataArray):
1663         (WebCore::didReceiveData):
1664         (WebCore::didFinishLoading):
1665         (WebCore::didFail):
1666         (WebCore::willCacheResponse):
1667         (WebCore::canRespondToProtectionSpace):
1668         (WebCore::ResourceHandle::createCFURLConnection):
1669         (WebCore::ResourceHandle::start):
1670         (WebCore::ResourceHandle::willSendRequest):
1671         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
1672         (WebCore::ResourceHandle::currentRequest):
1673         (WebCore::ResourceHandle::connectionClientCallbacks):
1674
1675 2013-11-18  Commit Queue  <commit-queue@webkit.org>
1676
1677         Unreviewed, rolling out r159430.
1678         http://trac.webkit.org/changeset/159430
1679         https://bugs.webkit.org/show_bug.cgi?id=124548
1680
1681         WebCore can know nothing about nor use files from WebKit/
1682         (Requested by thorton on #webkit).
1683
1684         * DerivedSources.make:
1685
1686 2013-11-18  Brady Eidson  <beidson@apple.com>
1687
1688         Remove IDBServerConnection's deprecatedBackingStore()
1689         https://bugs.webkit.org/show_bug.cgi?id=124547
1690
1691         Reviewed by Tim Horton.
1692
1693         It is no longer needed, as the front end no longer knows about the backing store.
1694
1695         * Modules/indexeddb/IDBServerConnection.h:
1696
1697         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
1698         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
1699
1700 2013-11-18  Samuel White  <samuel_white@apple.com>
1701
1702         AX: Add ability to fetch only visible table rows.
1703         https://bugs.webkit.org/show_bug.cgi?id=124430
1704
1705         Reviewed by Chris Fleizach.
1706
1707         Adding AccessibilityTable::visibleRows method to support AXVisibleRows attribute mac platform.
1708
1709         Test: platform/mac/accessibility/table-visible-rows.html
1710
1711         * accessibility/AccessibilityTable.cpp:
1712         (WebCore::AccessibilityTable::columnHeaders):
1713         (WebCore::AccessibilityTable::rowHeaders):
1714         (WebCore::AccessibilityTable::visibleRows):
1715         * accessibility/AccessibilityTable.h:
1716         * accessibility/AccessibilityTableRow.h:
1717         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1718         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1719
1720 2013-11-18  Simon Fraser  <simon.fraser@apple.com>
1721
1722         At some scales, opaque compositing layers have garbage pixels around the edges
1723         https://bugs.webkit.org/show_bug.cgi?id=124541
1724
1725         Reviewed by Dean Jackson.
1726         
1727         Layers get marked as having opaque contents when their background is
1728         known to paint the entire layer. However, this failed to take into
1729         account two reasons why every pixel may not get painted.
1730         
1731         First, subpixel layout can result in non-integral RenderLayer
1732         bounds, which will get rounded up to an integral GraphicsLayer
1733         size. When this happens we may not paint edge pixels.
1734         
1735         Second, at non-integral scale factors, graphics context scaling
1736         may cause us to not paint edge pixels.
1737         
1738         Fix by only marking PlatformCALayers as having opaque contents
1739         when the contentsScale of the layer is integral.
1740
1741         Not testable, because we can't guarantee to get garbage pixels
1742         in a ref test, and layer dumps show GraphicsLayer's notion of
1743         content opaqueness, not the one we set on the PlatformCALayer.
1744
1745         * platform/graphics/ca/GraphicsLayerCA.cpp:
1746         (WebCore::isIntegral):
1747         (WebCore::clampedContentsScaleForScale):
1748         (WebCore::GraphicsLayerCA::updateRootRelativeScale):
1749         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
1750         (WebCore::GraphicsLayerCA::updateContentsOpaque):
1751         (WebCore::GraphicsLayerCA::getTransformFromAnimationsWithMaxScaleImpact):
1752         Drive-by typo fix.
1753         (WebCore::GraphicsLayerCA::noteChangesForScaleSensitiveProperties):
1754         * platform/graphics/ca/GraphicsLayerCA.h:
1755         * rendering/RenderLayerBacking.cpp:
1756         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1757
1758 2013-11-18  David Hyatt  <hyatt@apple.com>
1759
1760         Add a quirk to not respect center text-align when positioning
1761
1762         <rdar://problem/15427571>
1763         https://bugs.webkit.org/show_bug.cgi?id=124522
1764
1765         Reviewed by Simon Fraser.
1766
1767         Added fast/block/legacy-text-align-position-quirk.html
1768
1769         * page/Settings.in:
1770         Add the quirk setting.
1771
1772         * rendering/RenderBlockLineLayout.cpp:
1773         (WebCore::RenderBlock::startAlignedOffsetForLine):
1774         Don't pay attention to center text-align when the quirk is set.
1775
1776 2013-11-18  Brian J. Burg  <burg@cs.washington.edu>
1777
1778         Consolidate various frame snapshot capabilities.
1779         https://bugs.webkit.org/show_bug.cgi?id=124325
1780
1781         Reviewed by Timothy Hatcher.
1782
1783         Various snapshot creation methods had duplicated code and were split
1784         between Frame, DragImage, and platform-specific implementationss.
1785         This patch puts WebCore snapshot methods into FrameSnapshotting
1786         and removes platform implementations where possible.
1787
1788         DragImage methods reuse snapshot methods where possible. Inspector
1789         will be able to take snapshots without using drag images.
1790
1791         No new tests, this is a refactoring.
1792
1793         * CMakeLists.txt:
1794         * GNUmakefile.list.am:
1795         * WebCore.exp.in:
1796         * WebCore.vcxproj/WebCore.vcxproj:
1797         * WebCore.vcxproj/WebCore.vcxproj.filters:
1798         * WebCore.xcodeproj/project.pbxproj:
1799         * bindings/objc/DOM.mm:
1800         (-[DOMNode renderedImage]):
1801         (-[DOMRange renderedImageForcingBlackText:]):
1802         * dom/Clipboard.cpp:
1803         (WebCore::Clipboard::createDragImage):
1804         * dom/ClipboardMac.mm:
1805         (WebCore::Clipboard::createDragImage):
1806         * page/DragController.cpp:
1807         (WebCore::DragController::startDrag):
1808         * page/Frame.cpp:
1809         * page/Frame.h:
1810         * page/FrameSnapshotting.cpp: Added.
1811         (WebCore::ScopedFramePaintingState::ScopedFramePaintingState):
1812         (WebCore::ScopedFramePaintingState::~ScopedFramePaintingState):
1813         (WebCore::snapshotFrameRect): Move most buffer logic to here.
1814         (WebCore::snapshotSelection): Moved from Frame.
1815         (WebCore::snapshotNode): Moved from Frame.
1816         * page/FrameSnapshotting.h: Added.
1817         * page/mac/FrameMac.mm: Removed.
1818         * page/mac/FrameSnapshottingMac.h: Removed.
1819         * page/mac/FrameSnapshottingMac.mm: Removed.
1820         * page/win/FrameWin.cpp: remove duplicate implementation.
1821         * page/win/FrameWin.h: Fix an incorrect parameter name.
1822         * platform/DragImage.cpp:
1823         (WebCore::ScopedNodeDragState::ScopedNodeDragState):
1824         (WebCore::ScopedNodeDragState::~ScopedNodeDragState):
1825         (WebCore::createDragImageFromSnapshot): Boilerplate buffer conversion.
1826         (WebCore::createDragImageForNode):
1827         (WebCore::createDragImageForSelection):
1828         (WebCore::ScopedFrameSelectionState::ScopedFrameSelectionState):
1829         (WebCore::ScopedFrameSelectionState::~ScopedFrameSelectionState):
1830         (WebCore::createDragImageForRange): Moved from Frame.
1831         (WebCore::createDragImageForImage): Moved from FrameSnapshottingMac.
1832         (WebCore::createDragImageForLink): use nullptr.
1833
1834 2013-11-18  Brendan Long  <b.long@cablelabs.com>
1835
1836         [GStreamer] Crash when using media source
1837         https://bugs.webkit.org/show_bug.cgi?id=124525
1838
1839         Reviewed by Philippe Normand.
1840
1841         No new tests because this is already covered by tests in media/media-source (which aren't enabled because the feature isn't done).
1842
1843         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
1844         (WebCore::MediaSourceGStreamer::MediaSourceGStreamer): Add missing adoptRef()
1845
1846 2013-11-18  Brady Eidson  <beidson@apple.com>
1847
1848         Remove unneeded BackingStore-related #include from IDBFactoryBackendInterface
1849
1850         Rubberstamped by Beth Dakin.
1851
1852         * Modules/indexeddb/IDBFactoryBackendInterface.h:
1853
1854 2013-11-18  Nick Diego Yamane  <nick.yamane@openbossa.org>
1855
1856         Change mediasource and mediastream modules to use nullptr
1857         https://bugs.webkit.org/show_bug.cgi?id=124530
1858
1859         Reviewed by Tim Horton.
1860
1861         No new tests needed, no behavior change.
1862
1863         * Modules/mediasource/MediaSource.cpp:
1864         * Modules/mediasource/SourceBuffer.cpp:
1865         * Modules/mediastream/MediaStream.cpp:
1866         * Modules/mediastream/RTCDTMFSender.cpp:
1867         * Modules/mediastream/RTCDataChannel.cpp:
1868         * Modules/mediastream/RTCIceCandidate.cpp:
1869         * Modules/mediastream/RTCPeerConnection.cpp:
1870         * Modules/mediastream/RTCSessionDescription.cpp:
1871         * Modules/mediastream/RTCStatsResponse.cpp:
1872         * Modules/mediastream/UserMediaRequest.cpp:
1873
1874 2013-11-18  Brady Eidson  <beidson@apple.com>
1875
1876         Move execution of IDBCursorBackendOperations to the IDBServerConnection
1877         https://bugs.webkit.org/show_bug.cgi?id=124463
1878
1879         Reviewed by Tim Horton.
1880
1881         This almost entirely removes knowledge of the backing store from the front end.
1882
1883         The primary change here is to give cursors a unique ID.
1884
1885         This way the IDBCursorBackend can reference itself by ID, while the 
1886         IDBServerConnection can handle mapping that ID to a backing store.
1887
1888         * Modules/indexeddb/IDBBackingStoreCursorInterface.h:
1889
1890         * Modules/indexeddb/IDBBackingStoreInterface.h:
1891
1892         * Modules/indexeddb/IDBCursorBackend.cpp:
1893         (WebCore::IDBCursorBackend::IDBCursorBackend):
1894         (WebCore::IDBCursorBackend::deleteFunction):
1895         (WebCore::IDBCursorBackend::prefetchReset):
1896         (WebCore::IDBCursorBackend::close):
1897         (WebCore::IDBCursorBackend::updateCursorData):
1898         (WebCore::IDBCursorBackend::clearCursorData):
1899         * Modules/indexeddb/IDBCursorBackend.h:
1900         (WebCore::IDBCursorBackend::create):
1901         (WebCore::IDBCursorBackend::key):
1902         (WebCore::IDBCursorBackend::primaryKey):
1903         (WebCore::IDBCursorBackend::value):
1904         (WebCore::IDBCursorBackend::id):
1905         (WebCore::IDBCursorBackend::transaction):
1906         (WebCore::IDBCursorBackend::setSavedCursorID):
1907
1908         * Modules/indexeddb/IDBCursorBackendOperations.cpp:
1909         (WebCore::CursorAdvanceOperation::perform):
1910         (WebCore::CursorIterationOperation::perform):
1911         (WebCore::CursorPrefetchIterationOperation::perform):
1912         * Modules/indexeddb/IDBCursorBackendOperations.h:
1913         (WebCore::CursorIterationOperation::key):
1914         (WebCore::CursorIterationOperation::callbacks):
1915         (WebCore::CursorAdvanceOperation::count):
1916         (WebCore::CursorAdvanceOperation::callbacks):
1917         (WebCore::CursorPrefetchIterationOperation::numberToFetch):
1918         (WebCore::CursorPrefetchIterationOperation::callbacks):
1919
1920         * Modules/indexeddb/IDBServerConnection.h:
1921
1922         * Modules/indexeddb/leveldb/IDBBackingStoreCursorLevelDB.h:
1923         (WebCore::IDBBackingStoreCursorLevelDB::IDBBackingStoreCursorLevelDB):
1924
1925         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1926         (WebCore::ObjectStoreKeyCursorImpl::create):
1927         (WebCore::ObjectStoreKeyCursorImpl::clone):
1928         (WebCore::ObjectStoreKeyCursorImpl::ObjectStoreKeyCursorImpl):
1929         (WebCore::ObjectStoreCursorImpl::create):
1930         (WebCore::ObjectStoreCursorImpl::clone):
1931         (WebCore::ObjectStoreCursorImpl::ObjectStoreCursorImpl):
1932         (WebCore::IDBBackingStoreLevelDB::openObjectStoreCursor):
1933         (WebCore::IDBBackingStoreLevelDB::openObjectStoreKeyCursor):
1934         (WebCore::IDBBackingStoreLevelDB::openIndexKeyCursor):
1935         (WebCore::IDBBackingStoreLevelDB::openIndexCursor):
1936         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
1937
1938         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
1939         (WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
1940         (WebCore::IDBServerConnectionLevelDB::setIndexKeys):
1941         (WebCore::IDBServerConnectionLevelDB::createObjectStore):
1942         (WebCore::IDBServerConnectionLevelDB::createIndex):
1943         (WebCore::IDBServerConnectionLevelDB::deleteIndex):
1944         (WebCore::IDBServerConnectionLevelDB::get):
1945         (WebCore::IDBServerConnectionLevelDB::put):
1946         (WebCore::IDBServerConnectionLevelDB::openCursor):
1947         (WebCore::IDBServerConnectionLevelDB::count):
1948         (WebCore::IDBServerConnectionLevelDB::deleteRange):
1949         (WebCore::IDBServerConnectionLevelDB::clearObjectStore):
1950         (WebCore::IDBServerConnectionLevelDB::deleteObjectStore):
1951         (WebCore::IDBServerConnectionLevelDB::changeDatabaseVersion):
1952         (WebCore::IDBServerConnectionLevelDB::cursorAdvance):
1953         (WebCore::IDBServerConnectionLevelDB::cursorIterate):
1954         (WebCore::IDBServerConnectionLevelDB::cursorPrefetchIteration):
1955         (WebCore::IDBServerConnectionLevelDB::cursorPrefetchReset):
1956         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
1957
1958 2013-11-17  Jer Noble  <jer.noble@apple.com>
1959
1960         [WTF] Media time should not have a constructor which accepts a single int or float.
1961         https://bugs.webkit.org/show_bug.cgi?id=124470
1962
1963         Reviewed by Eric Carlson.
1964
1965         Fix the compile error exposed by removing the default parameter in the MediaTime constructor.
1966
1967         * Modules/mediasource/SourceBuffer.cpp:
1968         (WebCore::SourceBuffer::setTimestampOffset):
1969
1970 2013-11-18  Nick Diego Yamane  <nick.yamane@openbossa.org>
1971
1972         Change webaudio to use nullptr for null pointers
1973         https://bugs.webkit.org/show_bug.cgi?id=124526
1974
1975         Reviewed by Anders Carlsson.
1976
1977         No new tests needed, no behavior change.
1978
1979         * Modules/webaudio/AudioBuffer.cpp:
1980         * Modules/webaudio/AudioContext.cpp:
1981         * Modules/webaudio/AudioNode.cpp:
1982         * Modules/webaudio/ChannelMergerNode.cpp:
1983         * Modules/webaudio/ChannelSplitterNode.cpp:
1984         * Modules/webaudio/MediaStreamAudioSource.cpp:
1985         * Modules/webaudio/OfflineAudioContext.cpp:
1986         * Modules/webaudio/PeriodicWave.cpp:
1987         * Modules/webaudio/ScriptProcessorNode.cpp:
1988
1989 2013-11-18  peavo@outlook.com  <peavo@outlook.com>
1990
1991         [Curl] Basic authentication is not reused.
1992         https://bugs.webkit.org/show_bug.cgi?id=124452
1993
1994         Reviewed by Brent Fulgham.
1995
1996         After a successful basic authentication, the credentials are not reused for later requests.
1997         In the CFNetwork port, this is solved by trying basic authentication first, if credentials exists.
1998         Also, when a 401 response is received, the first thing the CFNetwork port does, is to use
1999         m_user/m_pass as credentials in the following request if they are set.
2000         This can be done the same way for the Curl version.
2001
2002         * platform/network/curl/ResourceHandleCurl.cpp:
2003         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Try using m_user/m_pass as credentials first, if they are set.
2004         * platform/network/curl/ResourceHandleManager.cpp:
2005         (WebCore::ResourceHandleManager::applyAuthenticationToRequest): Try basic authentication first, if credentials exists.
2006
2007 2013-11-18  Mátyás Mustoha  <mmatyas@inf.u-szeged.hu>
2008
2009         [curl] Add file cache
2010         https://bugs.webkit.org/show_bug.cgi?id=123333
2011
2012         Reviewed by Brent Fulgham.
2013
2014         Implementation of on disc file cache
2015         for the curl network backend.
2016
2017         * WebCore.vcxproj/WebCore.vcxproj:
2018         * WebCore.vcxproj/WebCore.vcxproj.filters:
2019         * platform/network/curl/CurlCacheEntry.cpp: Added.
2020         (WebCore::CurlCacheEntry::CurlCacheEntry):
2021         (WebCore::CurlCacheEntry::~CurlCacheEntry):
2022         (WebCore::CurlCacheEntry::isCached):
2023         (WebCore::CurlCacheEntry::requestHeaders):
2024         (WebCore::CurlCacheEntry::saveCachedData):
2025         (WebCore::CurlCacheEntry::loadCachedData):
2026         (WebCore::CurlCacheEntry::saveResponseHeaders):
2027         (WebCore::CurlCacheEntry::loadResponseHeaders):
2028         (WebCore::CurlCacheEntry::setResponseFromCachedHeaders):
2029         (WebCore::CurlCacheEntry::didFail):
2030         (WebCore::CurlCacheEntry::didFinishLoading):
2031         (WebCore::CurlCacheEntry::generateBaseFilename):
2032         (WebCore::CurlCacheEntry::loadFileToBuffer):
2033         (WebCore::CurlCacheEntry::invalidate):
2034         (WebCore::CurlCacheEntry::parseResponseHeaders):
2035         * platform/network/curl/CurlCacheEntry.h: Added.
2036         (WebCore::CurlCacheEntry::isInMemory):
2037         * platform/network/curl/CurlCacheManager.cpp: Added.
2038         (WebCore::CurlCacheManager::getInstance):
2039         (WebCore::CurlCacheManager::CurlCacheManager):
2040         (WebCore::CurlCacheManager::~CurlCacheManager):
2041         (WebCore::CurlCacheManager::setCacheDirectory):
2042         (WebCore::CurlCacheManager::loadIndex):
2043         (WebCore::CurlCacheManager::saveIndex):
2044         (WebCore::CurlCacheManager::didReceiveResponse):
2045         (WebCore::CurlCacheManager::didFinishLoading):
2046         (WebCore::CurlCacheManager::isCached):
2047         (WebCore::CurlCacheManager::requestHeaders):
2048         (WebCore::CurlCacheManager::didReceiveData):
2049         (WebCore::CurlCacheManager::saveResponseHeaders):
2050         (WebCore::CurlCacheManager::invalidateCacheEntry):
2051         (WebCore::CurlCacheManager::didFail):
2052         (WebCore::CurlCacheManager::loadCachedData):
2053         * platform/network/curl/CurlCacheManager.h: Added.
2054         (WebCore::CurlCacheManager::getCacheDirectory):
2055         * platform/network/curl/ResourceHandleManager.cpp:
2056         (WebCore::writeCallback):
2057         (WebCore::headerCallback):
2058         (WebCore::ResourceHandleManager::downloadTimerCallback):
2059         (WebCore::ResourceHandleManager::initializeHandle):
2060
2061 2013-11-18  peavo@outlook.com  <peavo@outlook.com>
2062
2063         [Win] WebKit version in user agent string is incorrect.
2064         https://bugs.webkit.org/show_bug.cgi?id=124454
2065
2066         Reviewed by Brent Fulgham.
2067
2068         * DerivedSources.make: Generate WebKitVersion.h
2069
2070 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2071
2072         Unreviewed. Fix make distcheck.
2073
2074         * GNUmakefile.am: Add inspector json files to EXTRA_DIST and
2075         remove maketokenizer from EXTRA_DIST.
2076         * GNUmakefile.list.am: Add missing header files.
2077
2078 2013-11-18  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2079
2080         Generate toHTMLDataList|Html|EmbedElement
2081         https://bugs.webkit.org/show_bug.cgi?id=124482
2082
2083         Reviewed by Tim Horton.
2084
2085         To clean up static_cast<HTMLFoo*>, toHTMLEmbedElement, toHTMLHtmlElement, toHTMLDataListElement
2086         are generated.
2087
2088         No new tests, no behavior changes.
2089
2090         * html/HTMLDataListElement.h:
2091         * html/HTMLEmbedElement.h:
2092         * html/HTMLHtmlElement.h:
2093         * html/HTMLInputElement.cpp:
2094         (WebCore::HTMLInputElement::dataList):
2095         * html/HTMLOptionElement.cpp:
2096         (WebCore::HTMLOptionElement::ownerDataListElement):
2097         * html/HTMLTagNames.in:
2098         * html/ImageDocument.cpp:
2099         (WebCore::ImageDocument::createDocumentStructure):
2100         * html/MediaDocument.cpp:
2101         (WebCore::MediaDocumentParser::createDocumentStructure):
2102         (WebCore::MediaDocument::replaceMediaElementTimerFired):
2103         * html/PluginDocument.cpp:
2104         (WebCore::PluginDocumentParser::createDocumentStructure):
2105         * rendering/RenderTheme.cpp:
2106         (WebCore::RenderTheme::paintSliderTicks):
2107         * xml/parser/XMLDocumentParserLibxml2.cpp:
2108         (WebCore::XMLDocumentParser::startElementNs):
2109
2110 2013-11-18  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2111
2112         Clean up static_cast<HTMLFoo*> usage
2113         https://bugs.webkit.org/show_bug.cgi?id=124480
2114
2115         Reviewed by Tim Horton.
2116
2117         Though there are toHTMLFoo(), some places are still using static_cast<>.
2118         Additionally, toHTMLBodyElement() is supported from now.
2119
2120         No new tests, no behavior changes.
2121
2122         * accessibility/AccessibilityNodeObject.cpp:
2123         (WebCore::AccessibilityNodeObject::isRequired):
2124         * accessibility/AccessibilityTable.cpp:
2125         (WebCore::AccessibilityTable::isDataTable):
2126         * bindings/js/JSHTMLFrameSetElementCustom.cpp:
2127         (WebCore::JSHTMLFrameSetElement::nameGetter):
2128         * bindings/js/JSPluginElementFunctions.cpp:
2129         (WebCore::pluginInstance):
2130         * dom/Document.cpp:
2131         (WebCore::Document::openSearchDescriptionURL):
2132         (WebCore::Document::iconURLs):
2133         * dom/DocumentStyleSheetCollection.cpp:
2134         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
2135         * editing/ReplaceSelectionCommand.cpp:
2136         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
2137         * editing/ios/EditorIOS.mm:
2138         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
2139         * html/HTMLBodyElement.h:
2140         * html/HTMLDocument.cpp:
2141         (WebCore::HTMLDocument::bgColor):
2142         (WebCore::HTMLDocument::setBgColor):
2143         (WebCore::HTMLDocument::fgColor):
2144         (WebCore::HTMLDocument::setFgColor):
2145         (WebCore::HTMLDocument::alinkColor):
2146         (WebCore::HTMLDocument::setAlinkColor):
2147         (WebCore::HTMLDocument::linkColor):
2148         (WebCore::HTMLDocument::setLinkColor):
2149         (WebCore::HTMLDocument::vlinkColor):
2150         (WebCore::HTMLDocument::setVlinkColor):
2151         * html/HTMLEmbedElement.cpp:
2152         (WebCore::HTMLEmbedElement::rendererIsNeeded):
2153         * html/HTMLFormControlElement.cpp:
2154         (WebCore::HTMLFormControlElement::updateAncestorDisabledState):
2155         (WebCore::HTMLFormControlElement::enclosingFormControlElement):
2156         * html/HTMLFormElement.cpp:
2157         (WebCore::submitElementFromEvent):
2158         * html/HTMLImageLoader.cpp:
2159         (WebCore::HTMLImageLoader::notifyFinished):
2160         * html/HTMLLegendElement.cpp:
2161         (WebCore::HTMLLegendElement::virtualForm):
2162         * html/RadioNodeList.cpp:
2163         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter):
2164         * inspector/InspectorDOMAgent.cpp:
2165         (WebCore::InspectorDOMAgent::buildObjectForNode):
2166
2167 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2168
2169         Unreviewed. Update GObject DOM symbols file after r158760.
2170
2171         * bindings/gobject/webkitdom.symbols: Add
2172         webkit_dom_text_track_get_id prototype.
2173
2174 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2175
2176         REGRESSION(r158821): [GTK] API break due to removed properties in GObject DOM bindings
2177         https://bugs.webkit.org/show_bug.cgi?id=124489
2178
2179         Reviewed by Philippe Normand.
2180
2181         In r158821, several properties were changed from readonly to
2182         CustomSetter. The GObject DOM bindings currently skips any
2183         attribute having a custom getter or setter, and those properties
2184         are not generated anymore. We should add support for generating
2185         attributes having a custom getter or setter in GObject DOM
2186         bindings generator, but to fix the ABI break now we bring the old
2187         implementatiom back as custom implementation. This fixes the ABI
2188         compatibility, but not the API since the GObject properties are
2189         not generated.
2190
2191         * bindings/gobject/WebKitDOMCustom.cpp:
2192         (webkit_dom_audio_track_get_kind):
2193         (webkit_dom_audio_track_get_language):
2194         (webkit_dom_text_track_get_kind):
2195         (webkit_dom_text_track_get_language):
2196         (webkit_dom_video_track_get_kind):
2197         (webkit_dom_video_track_get_language):
2198         * bindings/gobject/WebKitDOMCustom.h:
2199         * bindings/gobject/WebKitDOMCustom.symbols:
2200
2201 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2202
2203         Unreviewed. Update GObject DOM symbols file after r158662.
2204
2205         * bindings/gobject/webkitdom.symbols: Add missing prototypes.
2206
2207 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2208
2209         Unreviewed. Update GObject DOM symbols file after r159208 and r159363.
2210
2211         * bindings/gobject/webkitdom.symbols: Add
2212         webkit_dom_html_media_element_fast_seek prototype.
2213
2214 2013-11-18  Carlos Garcia Campos  <cgarcia@igalia.com>
2215
2216         REGRESSION(r159363): [GTK] API break in webkit_dom_html_media_element_set_current_time
2217         https://bugs.webkit.org/show_bug.cgi?id=124485
2218
2219         Reviewed by Philippe Normand.
2220
2221         In r159363 currentTime attribute was changed to not raise
2222         exceptions. This breaks the API of GObject DOM bindings because we
2223         use a GError parameter for exceptions that has been removed.
2224
2225         * bindings/gobject/WebKitDOMCustom.cpp:
2226         (webkit_dom_html_media_element_set_current_time): Custom
2227         implementation that receives a GError for backwards
2228         compatibility.
2229         * bindings/gobject/WebKitDOMCustom.h:
2230         * bindings/gobject/WebKitDOMCustom.symbols: Add
2231         webkit_dom_html_media_element_set_current_time prototype.
2232         * bindings/scripts/CodeGeneratorGObject.pm:
2233         (SkipFunction): Skip
2234         webkit_dom_html_media_element_set_current_time since we are adding
2235         a custom implementation.
2236
2237 2013-11-17  Alexey Proskuryakov  <ap@apple.com>
2238
2239         Support exporting public RSASSA-PKCS1-v1_5 keys
2240         https://bugs.webkit.org/show_bug.cgi?id=124475
2241
2242         Reviewed by Sam Weinig.
2243
2244         Test: crypto/subtle/rsa-export-key.html
2245
2246         * bindings/js/JSCryptoKeySerializationJWK.h:
2247         * bindings/js/JSCryptoKeySerializationJWK.cpp:
2248         (WebCore::JSCryptoKeySerializationJWK::buildJSONForRSAComponents):
2249         (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON):
2250         (WebCore::JSCryptoKeySerializationJWK::serialize):
2251         Added said support (this part works with private keys too).
2252
2253         * crypto/keys/CryptoKeyRSA.h:
2254         * crypto/mac/CryptoKeyRSAMac.cpp:
2255         (WebCore::CryptoKeyRSA::getPublicKeyComponents): Moved the logic for getting a
2256         public key from private one here for reuse in keySizeInBits().
2257         (WebCore::CryptoKeyRSA::isRestrictedToHash):
2258         (WebCore::CryptoKeyRSA::keySizeInBits):
2259         (WebCore::CryptoKeyRSA::exportData):
2260         Exposed information necessary for JWK serialization.
2261
2262 2013-11-17  Alexey Proskuryakov  <ap@apple.com>
2263
2264         RSASSA-PKCS1-v1_5 JWK import doesn't check key size
2265         https://bugs.webkit.org/show_bug.cgi?id=124472
2266
2267         Reviewed by Sam Weinig.
2268
2269         Test: crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-small-key.html
2270
2271         * bindings/js/JSCryptoKeySerializationJWK.cpp:
2272         (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid): Added the checks.
2273         (WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents): Check key size when
2274         importing.
2275         (WebCore::JSCryptoKeySerializationJWK::serialize): Updated a comment.
2276
2277         * crypto/keys/CryptoKeySerializationRaw.cpp: (WebCore::CryptoKeySerializationRaw::serialize):
2278         Updated a comment.
2279
2280 2013-11-17  Alexey Proskuryakov  <ap@apple.com>
2281
2282         JWK crypto key export result is a DOM string instead of an array buffer
2283         https://bugs.webkit.org/show_bug.cgi?id=124473
2284
2285         Reviewed by Sam Weinig.
2286
2287         * bindings/js/JSSubtleCryptoCustom.cpp: (WebCore::JSSubtleCrypto::exportKey):
2288         Fix it.
2289
2290 2013-11-17  Sam Weinig  <sam@webkit.org>
2291
2292         LayoutStateMaintainer should use references where possible
2293         https://bugs.webkit.org/show_bug.cgi?id=124471
2294
2295         Reviewed by Dan Bernstein.
2296
2297         * page/FrameView.cpp:
2298         (WebCore::FrameView::layout):
2299         * rendering/LayoutState.cpp:
2300         (WebCore::LayoutState::LayoutState):
2301         * rendering/LayoutState.h:
2302         * rendering/RenderBlock.cpp:
2303         (WebCore::RenderBlock::simplifiedLayout):
2304         * rendering/RenderBlockFlow.cpp:
2305         (WebCore::RenderBlockFlow::layoutBlock):
2306         * rendering/RenderBox.cpp:
2307         (WebCore::RenderBox::layout):
2308         * rendering/RenderDeprecatedFlexibleBox.cpp:
2309         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
2310         * rendering/RenderEmbeddedObject.cpp:
2311         (WebCore::RenderEmbeddedObject::layout):
2312         * rendering/RenderFlexibleBox.cpp:
2313         (WebCore::RenderFlexibleBox::layoutBlock):
2314         * rendering/RenderFlowThread.cpp:
2315         (WebCore::RenderFlowThread::pushFlowThreadLayoutState):
2316         * rendering/RenderFlowThread.h:
2317         * rendering/RenderGrid.cpp:
2318         (WebCore::RenderGrid::layoutBlock):
2319         * rendering/RenderMedia.cpp:
2320         (WebCore::RenderMedia::layout):
2321         * rendering/RenderTable.cpp:
2322         (WebCore::RenderTable::layout):
2323         * rendering/RenderTableRow.cpp:
2324         (WebCore::RenderTableRow::layout):
2325         * rendering/RenderTableSection.cpp:
2326         (WebCore::RenderTableSection::calcRowLogicalHeight):
2327         (WebCore::RenderTableSection::layout):
2328         (WebCore::RenderTableSection::layoutRows):
2329         * rendering/RenderTextTrackCue.cpp:
2330         (WebCore::RenderTextTrackCue::layout):
2331         * rendering/RenderView.cpp:
2332         (WebCore::RenderView::pushLayoutState):
2333         (WebCore::RenderView::pushLayoutStateForCurrentFlowThread):
2334         * rendering/RenderView.h:
2335         (WebCore::LayoutStateMaintainer::LayoutStateMaintainer):
2336         (WebCore::LayoutStateMaintainer::push):
2337         (WebCore::LayoutStateMaintainer::pop):
2338
2339 2013-11-16  Alexey Proskuryakov  <ap@apple.com>
2340
2341         Use uint8_t vectors for WebCrypto data
2342         https://bugs.webkit.org/show_bug.cgi?id=124466
2343
2344         Reviewed by Sam Weinig.
2345
2346         Using Vector<char> for crypto key data is somewhat non-idiomatic, and it gets simply
2347         dangerous for bignums, because signed arithmetic is not appropriate for bignum digits.
2348
2349         * Modules/websockets/WebSocketHandshake.cpp:
2350         (WebCore::generateSecWebSocketKey):
2351         (WebCore::WebSocketHandshake::getExpectedWebSocketAccept):
2352         No longer need to cast data to char* here.
2353
2354         * bindings/js/JSCryptoKeySerializationJWK.cpp:
2355         * bindings/js/JSCryptoKeySerializationJWK.h:
2356         * crypto/CryptoDigest.h:
2357         * crypto/CryptoKey.h:
2358         * crypto/keys/CryptoKeyAES.cpp:
2359         * crypto/keys/CryptoKeyAES.h:
2360         * crypto/keys/CryptoKeyDataOctetSequence.h:
2361         * crypto/keys/CryptoKeyDataRSAComponents.cpp:
2362         * crypto/keys/CryptoKeyDataRSAComponents.h:
2363         * crypto/keys/CryptoKeyHMAC.cpp:
2364         * crypto/keys/CryptoKeyHMAC.h:
2365         * crypto/keys/CryptoKeyRSA.h:
2366         * crypto/keys/CryptoKeySerializationRaw.cpp:
2367         * crypto/keys/CryptoKeySerializationRaw.h:
2368         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
2369         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
2370         * crypto/mac/CryptoDigestMac.cpp:
2371         * crypto/mac/CryptoKeyMac.cpp:
2372         * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
2373         Switched to Vector<uint8_t>.
2374
2375         * crypto/mac/CryptoKeyRSAMac.cpp:
2376         (WebCore::getPublicKeyComponents): Extracted from buildAlgorithmDescription() and simplified.
2377         (WebCore::CryptoKeyRSA::create): Switched to Vector<uint8_t>.
2378         (WebCore::CryptoKeyRSA::buildAlgorithmDescription): No longer need to copy data just
2379         to change type from Vector<char> to Vector<unsigned char>.
2380         (WebCore::bigIntegerToUInt32): Ditto. No longer need to cast types when dealing with the bignum.
2381         (WebCore::CryptoKeyRSA::generatePair): Improved an error message a little.
2382
2383         * fileapi/FileReaderLoader.cpp: (WebCore::FileReaderLoader::convertToDataURL):
2384         * inspector/DOMPatchSupport.cpp: (WebCore::DOMPatchSupport::createDigest):
2385         * inspector/InspectorPageAgent.cpp: (WebCore::InspectorPageAgent::archive):
2386         * platform/graphics/cg/ImageBufferCG.cpp: (WebCore::CGImageToDataURL):
2387         No longer need to cast data to char* here.
2388
2389 2013-11-17  Antti Koivisto  <antti@apple.com>
2390
2391         REGRESSION (r158774): Iteration over element children is broken
2392         https://bugs.webkit.org/show_bug.cgi?id=124145
2393
2394         Reviewed by Anders Carlsson.
2395         
2396         Mutation during traversal invalidates the position cache. After the mid-point we start
2397         traversing backwards as it the shortest path. However backward traversal of children-only
2398         HTMLCollection was wrong and would end up going to descendants.
2399         
2400         Reduction by yannick.poirier@inverto.tv.
2401
2402         Test: fast/dom/htmlcollection-children-mutation.html
2403
2404         * html/HTMLCollection.cpp:
2405         (WebCore::HTMLCollection::collectionTraverseBackward):
2406         
2407             Traverse direct children only when m_shouldOnlyIncludeDirectChildren bit is set.
2408
2409 2013-11-17  Zoltan Horvath  <zoltan@webkit.org>
2410
2411         Move LineLayoutState.h into rendering/line
2412         <https://webkit.org/b/124458>
2413
2414         Reviewed by Mihnea Ovidenie.
2415
2416         LineLayoutState is a helper class of RenderBlockLineLayout, so I'm moving it into line subdirectory.
2417
2418         No new tests, no behavior change.
2419
2420         * GNUmakefile.list.am:
2421         * WebCore.vcxproj/WebCore.vcxproj:
2422         * WebCore.xcodeproj/project.pbxproj:
2423         * rendering/line/LineLayoutState.h: Renamed from Source/WebCore/rendering/LineLayoutState.h.
2424         (WebCore::FloatWithRect::FloatWithRect):
2425         (WebCore::LineLayoutState::LineLayoutState):
2426         (WebCore::LineLayoutState::lineInfo):
2427         (WebCore::LineLayoutState::endLineLogicalTop):
2428         (WebCore::LineLayoutState::setEndLineLogicalTop):
2429         (WebCore::LineLayoutState::endLine):
2430         (WebCore::LineLayoutState::setEndLine):
2431         (WebCore::LineLayoutState::lastFloat):
2432         (WebCore::LineLayoutState::setLastFloat):
2433         (WebCore::LineLayoutState::floats):
2434         (WebCore::LineLayoutState::floatIndex):
2435         (WebCore::LineLayoutState::setFloatIndex):
2436         (WebCore::LineLayoutState::adjustedLogicalLineTop):
2437         (WebCore::LineLayoutState::setAdjustedLogicalLineTop):
2438         (WebCore::LineLayoutState::flowThread):
2439         (WebCore::LineLayoutState::setFlowThread):
2440         (WebCore::LineLayoutState::endLineMatched):
2441         (WebCore::LineLayoutState::setEndLineMatched):
2442         (WebCore::LineLayoutState::checkForFloatsFromLastLine):
2443         (WebCore::LineLayoutState::setCheckForFloatsFromLastLine):
2444         (WebCore::LineLayoutState::markForFullLayout):
2445         (WebCore::LineLayoutState::isFullLayout):
2446         (WebCore::LineLayoutState::usesRepaintBounds):
2447         (WebCore::LineLayoutState::setRepaintRange):
2448         (WebCore::LineLayoutState::updateRepaintRangeFromBox):
2449
2450 2013-11-17  Antti Koivisto  <antti@apple.com>
2451
2452         Simple line path does not respect visibility:hidden
2453         https://bugs.webkit.org/show_bug.cgi?id=124467
2454
2455         Reviewed by Anders Carlsson.
2456
2457         Test: fast/text/text-visibility.html
2458
2459         * rendering/SimpleLineLayoutFunctions.cpp:
2460         (WebCore::SimpleLineLayout::paintFlow):
2461
2462 2013-11-16  Alexey Proskuryakov  <ap@apple.com>
2463
2464         WebCrypto no longer uses sequences of ArrayBuffers
2465         https://bugs.webkit.org/show_bug.cgi?id=124451
2466
2467         Build fix.
2468
2469         * crypto/mac/CryptoAlgorithmHMACMac.cpp: (WebCore::calculateSignature):
2470         Now that the function became shorter, clang realized that a variable was used
2471         uninitialized in an impossible code path.
2472
2473 2013-11-16  Alexey Proskuryakov  <ap@apple.com>
2474
2475         WebCrypto no longer uses sequences of ArrayBuffers
2476         https://bugs.webkit.org/show_bug.cgi?id=124451
2477
2478         Reviewed by Sam Weinig.
2479
2480         Covered by existing tests.
2481
2482         Changed all operations to take single CryptoOperationData objects.
2483
2484         * bindings/js/JSCryptoOperationData.cpp:
2485         * bindings/js/JSCryptoOperationData.h:
2486         * bindings/js/JSSubtleCryptoCustom.cpp:
2487         (WebCore::JSSubtleCrypto::encrypt):
2488         (WebCore::JSSubtleCrypto::decrypt):
2489         (WebCore::JSSubtleCrypto::sign):
2490         (WebCore::JSSubtleCrypto::verify):
2491         (WebCore::JSSubtleCrypto::digest):
2492         * crypto/CryptoAlgorithm.cpp:
2493         (WebCore::CryptoAlgorithm::encrypt):
2494         (WebCore::CryptoAlgorithm::decrypt):
2495         (WebCore::CryptoAlgorithm::sign):
2496         (WebCore::CryptoAlgorithm::verify):
2497         (WebCore::CryptoAlgorithm::digest):
2498         * crypto/CryptoAlgorithm.h:
2499         * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
2500         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
2501         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
2502         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
2503         * crypto/algorithms/CryptoAlgorithmHMAC.h:
2504         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
2505         * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
2506         (WebCore::CryptoAlgorithmSHA1::digest):
2507         * crypto/algorithms/CryptoAlgorithmSHA1.h:
2508         * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
2509         (WebCore::CryptoAlgorithmSHA224::digest):
2510         * crypto/algorithms/CryptoAlgorithmSHA224.h:
2511         * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
2512         (WebCore::CryptoAlgorithmSHA256::digest):
2513         * crypto/algorithms/CryptoAlgorithmSHA256.h:
2514         * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
2515         (WebCore::CryptoAlgorithmSHA384::digest):
2516         * crypto/algorithms/CryptoAlgorithmSHA384.h:
2517         * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
2518         (WebCore::CryptoAlgorithmSHA512::digest):
2519         * crypto/algorithms/CryptoAlgorithmSHA512.h:
2520         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
2521         (WebCore::transformAES_CBC):
2522         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
2523         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
2524         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
2525         (WebCore::calculateSignature):
2526         (WebCore::CryptoAlgorithmHMAC::sign):
2527         (WebCore::CryptoAlgorithmHMAC::verify):
2528         * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
2529
2530 2013-11-16  Zoltan Horvath  <zoltan@webkit.org>
2531
2532         Remove the include of LineWidth.h from SimpleLineLayoutFunctions.cpp
2533         <https://webkit.org/b/124449>
2534
2535         Reviewed by Antti Koivisto.
2536
2537         I removed the include of LineWidth, since SimpleLineLayoutFunctions.cpp doesn't use it.
2538
2539         No new tests, no behavior change.
2540
2541         * rendering/SimpleLineLayoutFunctions.cpp:
2542
2543 2013-11-15  Alexey Proskuryakov  <ap@apple.com>
2544
2545         Support exporting symmetric keys as JWK
2546         https://bugs.webkit.org/show_bug.cgi?id=124442
2547
2548         Reviewed by Sam Weinig.
2549
2550         Error handling is not consistent yet - some errors cause exceptions, and others
2551         result in rejected promises. This part of spec is incomplete, so I basically did
2552         what was most straightforward in each case.
2553
2554         * bindings/js/JSCryptoKeySerializationJWK.h: 
2555         * bindings/js/JSCryptoKeySerializationJWK.cpp:
2556         (WebCore::JSCryptoKeySerializationJWK::reconcileUsages): Updated a comment with a better link.
2557         (WebCore::JSCryptoKeySerializationJWK::buildJSONForOctetSequence): A helper to building JWK.
2558         (WebCore::JSCryptoKeySerializationJWK::addToJSON): Ditto.
2559         (WebCore::JSCryptoKeySerializationJWK::addBoolToJSON): Ditto.
2560         (WebCore::JSCryptoKeySerializationJWK::addJWKAlgorithmToJSON): Ditto. The code for
2561         mapping is my best guess, this all needs to be specified.
2562         (WebCore::JSCryptoKeySerializationJWK::addJWKUseToJSON): A helper to building JWK.
2563         (WebCore::JSCryptoKeySerializationJWK::serialize): Build a JSON string for the key.
2564
2565         * bindings/js/JSSubtleCryptoCustom.cpp:
2566         (WebCore::JSSubtleCrypto::importKey): Updated a comment.
2567         (WebCore::JSSubtleCrypto::exportKey): Use CryptoKeySerialization (also for raw keys,
2568         for consistency).
2569
2570         * crypto/CryptoKey.h:
2571         (WebCore::CryptoKey::algorithmIdentifier):
2572         (WebCore::CryptoKey::usagesBitmap):
2573         Exposed data needed for building JWK (it used to be only exposed in a form suitable
2574         for DOM accessors).
2575
2576         * crypto/keys/CryptoKeyHMAC.h: Ditto, added an accessor for JWK.
2577
2578         * crypto/keys/CryptoKeySerializationRaw.cpp: (WebCore::CryptoKeySerializationRaw::serialize):
2579         * crypto/keys/CryptoKeySerializationRaw.h:
2580         Moved from JSSubtleCryptoCustom.cpp for consistency.
2581
2582 2013-11-15  Brady Eidson  <beidson@apple.com>
2583
2584         Move IDBCursorBackend operations into their own files
2585         https://bugs.webkit.org/show_bug.cgi?id=124444
2586
2587         Reviewed by Tim Horton.
2588
2589         * CMakeLists.txt:
2590         * GNUmakefile.list.am:
2591         * WebCore.xcodeproj/project.pbxproj:
2592
2593         * Modules/indexeddb/IDBCursorBackend.cpp:
2594         * Modules/indexeddb/IDBCursorBackend.h:
2595         (WebCore::IDBCursorBackend::cursorType):
2596         (WebCore::IDBCursorBackend::deprecatedBackingStoreCursor):
2597         (WebCore::IDBCursorBackend::deprecatedSetBackingStoreCursor):
2598         (WebCore::IDBCursorBackend::deprecatedSetSavedBackingStoreCursor):
2599
2600         * Modules/indexeddb/IDBCursorBackendOperations.cpp: Added.
2601         (WebCore::CallOnDestruct::CallOnDestruct):
2602         (WebCore::CallOnDestruct::~CallOnDestruct):
2603         (WebCore::CursorAdvanceOperation::perform):
2604         (WebCore::CursorIterationOperation::perform):
2605         (WebCore::CursorPrefetchIterationOperation::perform):
2606         * Modules/indexeddb/IDBCursorBackendOperations.h: Added.
2607         (WebCore::CursorIterationOperation::create):
2608         (WebCore::CursorIterationOperation::CursorIterationOperation):
2609         (WebCore::CursorAdvanceOperation::create):
2610         (WebCore::CursorAdvanceOperation::CursorAdvanceOperation):
2611         (WebCore::CursorPrefetchIterationOperation::create):
2612         (WebCore::CursorPrefetchIterationOperation::CursorPrefetchIterationOperation):
2613
2614 2013-11-14  David Farler  <dfarler@apple.com>
2615
2616         Copy ASAN flag settings to WebCore and JavaScriptCore intermediate build tools
2617         https://bugs.webkit.org/show_bug.cgi?id=124362
2618
2619         Reviewed by David Kilzer.
2620
2621         No new tests needed.
2622
2623         * WebCore.xcodeproj/project.pbxproj:
2624         Use ASAN_C*FLAGS for WebCoreExportFileGenerator.
2625
2626 2013-11-15  Jer Noble  <jer.noble@apple.com>
2627
2628         [Mac][AVF] Allow video and audio tracks to be initialized with an AVAssetTrack.
2629         https://bugs.webkit.org/show_bug.cgi?id=124421
2630
2631         Reviewed by Eric Carlson.
2632
2633         Currently, VideoTrackPrivateAVFObjC and AudioTrackPrivateAVFObjC are initialized with an
2634         AVPlayerItemTrack, but most of its methods use the AVAssetTrack wrapped by the
2635         AVPlayerItemTrack. Allow these objects to be alternatively initialized with an AVAssetTrack.
2636
2637         Add factory methods taking an AVAssetTrack:
2638         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h:
2639         (WebCore::AudioTrackPrivateAVFObjC::create):
2640         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm:
2641         (WebCore::AudioTrackPrivateAVFObjC::AudioTrackPrivateAVFObjC):
2642         (WebCore::AudioTrackPrivateAVFObjC::setAssetTrack):
2643         (WebCore::AudioTrackPrivateAVFObjC::assetTrack):
2644         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp:
2645         (WebCore::VideoTrackPrivateAVFObjC::VideoTrackPrivateAVFObjC):
2646         (WebCore::VideoTrackPrivateAVFObjC::setAssetTrack):
2647         (WebCore::VideoTrackPrivateAVFObjC::assetTrack):
2648         * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h:
2649
2650         Use m_assetTrack instead of [m_playerItemTrack assetTrack]:
2651         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h:
2652         (WebCore::AVTrackPrivateAVFObjCImpl::assetTrack):
2653         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
2654         (WebCore::AVTrackPrivateAVFObjCImpl::AVTrackPrivateAVFObjCImpl):
2655         (WebCore::AVTrackPrivateAVFObjCImpl::enabled):
2656         (WebCore::AVTrackPrivateAVFObjCImpl::setEnabled):
2657         (WebCore::AVTrackPrivateAVFObjCImpl::audioKind):
2658         (WebCore::AVTrackPrivateAVFObjCImpl::videoKind):
2659         (WebCore::AVTrackPrivateAVFObjCImpl::id):
2660         (WebCore::AVTrackPrivateAVFObjCImpl::label):
2661         (WebCore::AVTrackPrivateAVFObjCImpl::language):
2662         (WebCore::AVTrackPrivateAVFObjCImpl::trackID):
2663
2664
2665 2013-11-15  Brady Eidson  <beidson@apple.com>
2666
2667         Let IDBDatabaseBackend create IDBTransactionBackend's directly
2668         https://bugs.webkit.org/show_bug.cgi?id=124438
2669
2670         Reviewed by Beth Dakin.
2671
2672         Create IDBTransactionBackends directly:
2673         * Modules/indexeddb/IDBDatabaseBackend.cpp:
2674         (WebCore::IDBDatabaseBackend::createTransaction):
2675         * Modules/indexeddb/IDBDatabaseBackend.h:
2676
2677         Remove maybeCreateTransactionBackend():
2678         * Modules/indexeddb/IDBFactoryBackendInterface.h:
2679         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2680         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2681
2682 2013-11-15  Jer Noble  <jer.noble@apple.com>
2683
2684         HTMLMediaElement should not throw an exception from setCurrentTime or fastSeek.
2685         https://bugs.webkit.org/show_bug.cgi?id=124294
2686
2687         Reviewed by Eric Carlson.
2688
2689         Update the seek logic to match the current specification. This means removing exception
2690         throwing from both the .idl and the implementation. 
2691
2692         Remove the ExceptionCode parameter from setCurrentTime and fastSeek:
2693         * html/HTMLMediaElement.cpp:
2694         (HTMLMediaElement::fastSeek):
2695         (HTMLMediaElement::seek):
2696         (HTMLMediaElement::seekWithTolerance):
2697         (HTMLMediaElement::setCurrentTime):
2698         * html/HTMLMediaElement.h:
2699         * html/HTMLMediaElement.idl:
2700         * html/MediaController.cpp:
2701         (MediaController::setCurrentTime):
2702         * html/MediaController.h:
2703         * html/MediaController.idl:
2704         * html/MediaControllerInterface.h:
2705
2706         Do not pass in an ExceptionCode placeholder when calling seek:
2707         * html/HTMLMediaElement.cpp:
2708         (HTMLMediaElement::rewind):
2709         (HTMLMediaElement::returnToRealtime):
2710         (HTMLMediaElement::finishSeek):
2711         (HTMLMediaElement::playInternal):
2712         (HTMLMediaElement::mediaPlayerTimeChanged):
2713         (HTMLMediaElement::mediaPlayerDurationChanged):
2714         (HTMLMediaElement::applyMediaFragmentURI):
2715         * html/HTMLMediaElement.h:
2716         * html/HTMLMediaElement.idl:
2717         * html/MediaController.cpp:
2718         (MediaController::bringElementUpToSpeed):
2719         * html/MediaController.h:
2720         * html/MediaController.idl:
2721         * html/MediaControllerInterface.h:
2722         * html/shadow/MediaControlElementTypes.cpp:
2723         (WebCore::MediaControlSeekButtonElement::seekTimerFired):
2724         * html/shadow/MediaControlElements.cpp:
2725         (WebCore::MediaControlRewindButtonElement::defaultEventHandler):
2726         (WebCore::MediaControlTimelineElement::defaultEventHandler):
2727         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
2728         (-[WebVideoFullscreenHUDWindowController setCurrentTime:]):
2729
2730 2013-11-15  Brady Eidson  <beidson@apple.com>
2731
2732         Remove last vestiges of IDBBackingStore* from IDBTransactionBackend.
2733         https://bugs.webkit.org/show_bug.cgi?id=124436
2734
2735         Reviewed by Tim Horton.
2736
2737         * Modules/indexeddb/IDBFactoryBackendInterface.h: Removed createCursorBackend.
2738         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp: Removed createCursorBackend.
2739         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h: Removed createCursorBackend.
2740
2741         * Modules/indexeddb/IDBCursorBackend.h:
2742
2743         * Modules/indexeddb/IDBTransactionBackend.cpp:
2744         * Modules/indexeddb/IDBTransactionBackend.h:
2745
2746         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
2747         (WebCore::IDBServerConnectionLevelDB::openCursor):
2748
2749 2013-11-15  Brady Eidson  <beidson@apple.com>
2750
2751         Make IDBIndexWriter a LevelDB specific concept
2752         https://bugs.webkit.org/show_bug.cgi?id=124434
2753
2754         Reviewed by Tim Horton.
2755
2756         This includes renaming the class and moving it into the leveldb subdirectory.
2757
2758         * CMakeLists.txt:
2759         * GNUmakefile.list.am:
2760         * WebCore.xcodeproj/project.pbxproj:
2761
2762         * Modules/indexeddb/IDBBackingStoreInterface.h:
2763         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
2764
2765         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2766         (WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
2767         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2768
2769         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBIndexWriter.cpp.
2770         (WebCore::IDBIndexWriterLevelDB::IDBIndexWriterLevelDB):
2771         (WebCore::IDBIndexWriterLevelDB::writeIndexKeys):
2772         (WebCore::IDBIndexWriterLevelDB::verifyIndexKeys):
2773         (WebCore::IDBIndexWriterLevelDB::addingKeyAllowed):
2774         * Modules/indexeddb/leveldb/IDBIndexWriterLevelDB.h: Renamed from Source/WebCore/Modules/indexeddb/IDBIndexWriter.h.
2775         (WebCore::IDBIndexWriterLevelDB::create):
2776
2777         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
2778         (WebCore::IDBServerConnectionLevelDB::setIndexKeys):
2779         (WebCore::IDBServerConnectionLevelDB::put):
2780
2781 2013-11-15  Alexandru Chiculita  <achicu@adobe.com>
2782
2783         Web Inspector: DOM.performSearch should accept a list of context nodes
2784         https://bugs.webkit.org/show_bug.cgi?id=124390
2785
2786         Reviewed by Timothy Hatcher.
2787
2788         Extracted the code in InspectorDOMAgent::performSearch into its own helper class
2789         called InspectorNodeFinder. Also added a new array parameter called "nodeIds"
2790         that can be used to limit the search results to just partial subtrees.
2791
2792         Tests: inspector-protocol/dom/dom-search-crash.html
2793                inspector-protocol/dom/dom-search-with-context.html
2794                inspector-protocol/dom/dom-search.html
2795
2796         * CMakeLists.txt:
2797         * GNUmakefile.list.am:
2798         * WebCore.vcxproj/WebCore.vcxproj:
2799         * WebCore.vcxproj/WebCore.vcxproj.filters:
2800         * WebCore.xcodeproj/project.pbxproj:
2801         * inspector/protocol/DOM.json:
2802         * inspector/InspectorAllInOne.cpp:
2803         * inspector/InspectorDOMAgent.cpp:
2804         (WebCore::InspectorDOMAgent::performSearch):
2805         * inspector/InspectorDOMAgent.h:
2806         * inspector/InspectorNodeFinder.cpp: Added.
2807         (WebCore::stripCharacters):
2808         (WebCore::InspectorNodeFinder::InspectorNodeFinder):
2809         (WebCore::InspectorNodeFinder::performSearch):
2810         (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
2811         (WebCore::InspectorNodeFinder::matchesAttribute):
2812         (WebCore::InspectorNodeFinder::matchesElement):
2813         (WebCore::InspectorNodeFinder::searchUsingXPath):
2814         (WebCore::InspectorNodeFinder::searchUsingCSSSelectors):
2815         * inspector/InspectorNodeFinder.h: Added.
2816         (WebCore::InspectorNodeFinder::results):
2817
2818 2013-11-15  Brady Eidson  <beidson@apple.com>
2819
2820         Remove IDBBackingStoreInterface.h includes that are no longer needed
2821         https://bugs.webkit.org/show_bug.cgi?id=124433
2822
2823         Reviewed by Tim Horton.
2824
2825         * Modules/indexeddb/IDBCursorBackend.cpp:
2826         * Modules/indexeddb/IDBCursorBackend.h:
2827         * Modules/indexeddb/IDBFactoryBackendInterface.h:
2828         * Modules/indexeddb/IDBTransactionBackend.h:
2829
2830 2013-11-15  Zoltan Horvath  <zoltan@webkit.org>
2831
2832         Move BreakingContext and LineBreaker into their own files
2833         <https://webkit.org/b/124336>
2834
2835         Reviewed by David Hyatt.
2836
2837         In this change I introduced 'line' subdirectory inside 'rendering', this directory will contain all the classes
2838         which have been refactored from RenderBlockLineLayout.cpp. This change contains the separation of BreakingContext,
2839         and the separation of LineBreaker classes. Since I wanted to keep the helper functions organized, I also added a
2840         new file called LineInlineHeaders.h, which contains the functions which used in LineBreaker.h and BreakingContext.h.
2841         I moved LineInfo class into line directory. It was necessary this time, since I added a cpp for it. I'll move the
2842         rest of the line layout related helper classes later. (I wanted to minimize merge conflicts.)
2843
2844         No new tests, no behavior change.
2845
2846         * CMakeLists.txt:
2847         * GNUmakefile.am:
2848         * GNUmakefile.list.am:
2849         * WebCore.vcxproj/WebCore.vcxproj:
2850         * WebCore.vcxproj/WebCoreCommon.props:
2851         * WebCore.xcodeproj/project.pbxproj:
2852         * rendering/RenderBlockLineLayout.cpp:
2853         (WebCore::createRun):
2854         * rendering/line/BreakingContextInlineHeaders.h: Added.
2855         (WebCore::WordMeasurement::WordMeasurement):
2856         (WebCore::TrailingObjects::TrailingObjects):
2857         (WebCore::TrailingObjects::setTrailingWhitespace):
2858         (WebCore::TrailingObjects::clear):
2859         (WebCore::TrailingObjects::appendBoxIfNeeded):
2860         (WebCore::deprecatedAddMidpoint):
2861         (WebCore::startIgnoringSpaces):
2862         (WebCore::stopIgnoringSpaces):
2863         (WebCore::ensureLineBoxInsideIgnoredSpaces):
2864         (WebCore::TrailingObjects::updateMidpointsForTrailingBoxes):
2865         (WebCore::BreakingContext::BreakingContext):
2866         (WebCore::BreakingContext::currentObject):
2867         (WebCore::BreakingContext::lineBreak):
2868         (WebCore::BreakingContext::lineBreakRef):
2869         (WebCore::BreakingContext::lineWidth):
2870         (WebCore::BreakingContext::atEnd):
2871         (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
2872         (WebCore::BreakingContext::commitLineBreakAtCurrentWidth):
2873         (WebCore::BreakingContext::initializeForCurrentObject):
2874         (WebCore::BreakingContext::increment):
2875         (WebCore::BreakingContext::handleBR):
2876         (WebCore::borderPaddingMarginStart):
2877         (WebCore::borderPaddingMarginEnd):
2878         (WebCore::shouldAddBorderPaddingMargin):
2879         (WebCore::previousInFlowSibling):
2880         (WebCore::inlineLogicalWidth):
2881         (WebCore::BreakingContext::handleOutOfFlowPositioned):
2882         (WebCore::BreakingContext::handleFloat):
2883         (WebCore::shouldSkipWhitespaceAfterStartObject):
2884         (WebCore::BreakingContext::handleEmptyInline):
2885         (WebCore::BreakingContext::handleReplaced):
2886         (WebCore::firstPositiveWidth):
2887         (WebCore::updateSegmentsForShapes):
2888         (WebCore::iteratorIsBeyondEndOfRenderCombineText):
2889         (WebCore::nextCharacter):
2890         (WebCore::updateCounterIfNeeded):
2891         (WebCore::measureHyphenWidth):
2892         (WebCore::textWidth):
2893         (WebCore::ensureCharacterGetsLineBox):
2894         (WebCore::tryHyphenating):
2895         (WebCore::BreakingContext::handleText):
2896         (WebCore::textBeginsWithBreakablePosition):
2897         (WebCore::BreakingContext::canBreakAtThisPosition):
2898         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
2899         (WebCore::checkMidpoints):
2900         (WebCore::BreakingContext::handleEndOfLine):
2901         * rendering/line/LineBreaker.cpp: Added.
2902         (WebCore::LineBreaker::reset):
2903         (WebCore::LineBreaker::skipTrailingWhitespace):
2904         (WebCore::LineBreaker::skipLeadingWhitespace):
2905         * rendering/line/LineBreaker.h: Added.
2906         (WebCore::LineBreaker::LineBreaker):
2907         (WebCore::LineBreaker::lineWasHyphenated):
2908         (WebCore::LineBreaker::positionedObjects):
2909         (WebCore::LineBreaker::clear):
2910         * rendering/line/LineInfo.cpp: Added.
2911         (WebCore::LineInfo::setEmpty):
2912         * rendering/line/LineInfo.h: Renamed from Source/WebCore/rendering/LineInfo.h.
2913         (WebCore::LineInfo::LineInfo):
2914         (WebCore::LineInfo::isFirstLine):
2915         (WebCore::LineInfo::isLastLine):
2916         (WebCore::LineInfo::isEmpty):
2917         (WebCore::LineInfo::previousLineBrokeCleanly):
2918         (WebCore::LineInfo::floatPaginationStrut):
2919         (WebCore::LineInfo::runsFromLeadingWhitespace):
2920         (WebCore::LineInfo::resetRunsFromLeadingWhitespace):
2921         (WebCore::LineInfo::incrementRunsFromLeadingWhitespace):
2922         (WebCore::LineInfo::setFirstLine):
2923         (WebCore::LineInfo::setLastLine):
2924         (WebCore::LineInfo::setPreviousLineBrokeCleanly):
2925         (WebCore::LineInfo::setFloatPaginationStrut):
2926         * rendering/line/LineInlineHeaders.h: Added.
2927         (WebCore::hasInlineDirectionBordersPaddingOrMargin):
2928         (WebCore::lineStyle):
2929         (WebCore::requiresLineBoxForContent):
2930         (WebCore::shouldCollapseWhiteSpace):
2931         (WebCore::skipNonBreakingSpace):
2932         (WebCore::alwaysRequiresLineBox):
2933         (WebCore::requiresLineBox):
2934         (WebCore::setStaticPositions):
2935
2936 2013-11-15  Brady Eidson  <beidson@apple.com>
2937
2938         Move execution of IDBTransactionBackendOperations to the IDBServerConnection
2939         https://bugs.webkit.org/show_bug.cgi?id=124385
2940
2941         Reviewed by Tim Horton.
2942
2943         Each IDBOperation has it’s ::perform() moved to a method on IDBServerConnection.
2944         This almost removes all knowledge of the backing stores from the front end.
2945
2946         * Modules/indexeddb/IDBDatabaseBackend.cpp:
2947         (WebCore::IDBDatabaseBackend::clearObjectStore):
2948         (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
2949         * Modules/indexeddb/IDBDatabaseBackend.h:
2950
2951         * Modules/indexeddb/IDBObjectStore.cpp:
2952         (WebCore::IDBObjectStore::clear):
2953
2954         Add methods to reflect each transaction backend operation:
2955         * Modules/indexeddb/IDBServerConnection.h:
2956
2957         Schedule certain operations with callbacks:
2958         * Modules/indexeddb/IDBTransactionBackend.cpp:
2959         (WebCore::IDBTransactionBackend::scheduleVersionChangeOperation):
2960         (WebCore::IDBTransactionBackend::schedulePutOperation):
2961         (WebCore::IDBTransactionBackend::scheduleOpenCursorOperation):
2962         (WebCore::IDBTransactionBackend::scheduleCountOperation):
2963         (WebCore::IDBTransactionBackend::scheduleDeleteRangeOperation):
2964         (WebCore::IDBTransactionBackend::scheduleClearObjectStoreOperation):
2965         * Modules/indexeddb/IDBTransactionBackend.h:
2966
2967         Make each operation’s perform() method defer to the IDBServerConnection (with a callback):
2968         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
2969         (WebCore::CreateObjectStoreOperation::perform):
2970         (WebCore::CreateIndexOperation::perform):
2971         (WebCore::CreateIndexAbortOperation::perform):
2972         (WebCore::DeleteIndexOperation::perform):
2973         (WebCore::DeleteIndexAbortOperation::perform):
2974         (WebCore::GetOperation::perform):
2975         (WebCore::PutOperation::perform):
2976         (WebCore::SetIndexesReadyOperation::perform):
2977         (WebCore::OpenCursorOperation::perform):
2978         (WebCore::CountOperation::perform):
2979         (WebCore::DeleteRangeOperation::perform):
2980         (WebCore::ClearObjectStoreOperation::perform):
2981         (WebCore::DeleteObjectStoreOperation::perform):
2982         (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
2983         (WebCore::CreateObjectStoreAbortOperation::perform):
2984
2985         Add accessors to each operation’s data members so the IDBServerConnection has everything it needs:
2986         * Modules/indexeddb/IDBTransactionBackendOperations.h:
2987         (WebCore::CreateObjectStoreOperation::objectStoreMetadata):
2988         (WebCore::DeleteObjectStoreOperation::objectStoreMetadata):
2989         (WebCore::IDBDatabaseBackend::VersionChangeOperation::create):
2990         (WebCore::IDBDatabaseBackend::VersionChangeOperation::version):
2991         (WebCore::IDBDatabaseBackend::VersionChangeOperation::callbacks):
2992         (WebCore::IDBDatabaseBackend::VersionChangeOperation::databaseCallbacks):
2993         (WebCore::IDBDatabaseBackend::VersionChangeOperation::VersionChangeOperation):
2994         (WebCore::CreateObjectStoreAbortOperation::CreateObjectStoreAbortOperation):
2995         (WebCore::CreateIndexOperation::objectStoreID):
2996         (WebCore::CreateIndexOperation::idbIndexMetadata):
2997         (WebCore::CreateIndexOperation::CreateIndexOperation):
2998         (WebCore::CreateIndexAbortOperation::CreateIndexAbortOperation):
2999         (WebCore::DeleteIndexOperation::objectStoreID):
3000         (WebCore::DeleteIndexOperation::idbIndexMetadata):
3001         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
3002         (WebCore::DeleteIndexAbortOperation::DeleteIndexAbortOperation):
3003         (WebCore::GetOperation::objectStoreID):
3004         (WebCore::GetOperation::indexID):
3005         (WebCore::GetOperation::cursorType):
3006         (WebCore::GetOperation::keyRange):
3007         (WebCore::GetOperation::callbacks):
3008         (WebCore::GetOperation::autoIncrement):
3009         (WebCore::GetOperation::keyPath):
3010         (WebCore::GetOperation::GetOperation):
3011         (WebCore::PutOperation::create):
3012         (WebCore::PutOperation::putMode):
3013         (WebCore::PutOperation::objectStore):
3014         (WebCore::PutOperation::key):
3015         (WebCore::PutOperation::indexIDs):
3016         (WebCore::PutOperation::indexKeys):
3017         (WebCore::PutOperation::callbacks):
3018         (WebCore::PutOperation::value):
3019         (WebCore::PutOperation::PutOperation):
3020         (WebCore::OpenCursorOperation::create):
3021         (WebCore::OpenCursorOperation::objectStoreID):
3022         (WebCore::OpenCursorOperation::indexID):
3023         (WebCore::OpenCursorOperation::direction):
3024         (WebCore::OpenCursorOperation::cursorType):
3025         (WebCore::OpenCursorOperation::taskType):
3026         (WebCore::OpenCursorOperation::keyRange):
3027         (WebCore::OpenCursorOperation::cursorDirection):
3028         (WebCore::OpenCursorOperation::callbacks):
3029         (WebCore::OpenCursorOperation::OpenCursorOperation):
3030         (WebCore::CountOperation::create):
3031         (WebCore::CountOperation::objectStoreID):
3032         (WebCore::CountOperation::indexID):
3033         (WebCore::CountOperation::keyRange):
3034         (WebCore::CountOperation::callbacks):
3035         (WebCore::CountOperation::CountOperation):
3036         (WebCore::DeleteRangeOperation::create):
3037         (WebCore::DeleteRangeOperation::objectStoreID):
3038         (WebCore::DeleteRangeOperation::callbacks):
3039         (WebCore::DeleteRangeOperation::keyRange):
3040         (WebCore::DeleteRangeOperation::DeleteRangeOperation):
3041         (WebCore::ClearObjectStoreOperation::create):
3042         (WebCore::ClearObjectStoreOperation::objectStoreID):
3043         (WebCore::ClearObjectStoreOperation::callbacks):
3044         (WebCore::ClearObjectStoreOperation::ClearObjectStoreOperation):
3045
3046         Implement each operation in terms of the appropriate backing store, then perform the callback:
3047         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
3048         (WebCore::IDBServerConnectionLevelDB::createObjectStore):
3049         (WebCore::IDBServerConnectionLevelDB::createIndex):
3050         (WebCore::IDBServerConnectionLevelDB::deleteIndex):
3051         (WebCore::IDBServerConnectionLevelDB::get):
3052         (WebCore::IDBServerConnectionLevelDB::put):
3053         (WebCore::IDBServerConnectionLevelDB::openCursor):
3054         (WebCore::IDBServerConnectionLevelDB::count):
3055         (WebCore::IDBServerConnectionLevelDB::deleteRange):
3056         (WebCore::IDBServerConnectionLevelDB::clearObjectStore):
3057         (WebCore::IDBServerConnectionLevelDB::deleteObjectStore):
3058         (WebCore::IDBServerConnectionLevelDB::changeDatabaseVersion):
3059         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
3060
3061         * WebCore.xcodeproj/project.pbxproj:
3062
3063 2013-11-15  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3064
3065         Modifying RTCIceCandidate object construction to match the spec
3066         https://bugs.webkit.org/show_bug.cgi?id=124369
3067
3068         Reviewed by Eric Carlson.
3069
3070         According to the spec the RTCIceCandidateInit parameter in RTCSessionDescription constructor is optional,
3071         which must not be nullable, and, if passed, must be a valid Dictionary. If the keys are not present, the string
3072         object that stores them in the RTCIceCandidate class, must be null in those cases. Also, if a key is present
3073         and its value is not valid an exception must be raised.
3074
3075         Existing test was updated.
3076
3077         * GNUmakefile.list.am:
3078         * Modules/mediastream/RTCIceCandidate.cpp:
3079         (WebCore::RTCIceCandidate::create):
3080         * Modules/mediastream/RTCIceCandidate.idl:
3081         * UseJSC.cmake:
3082         * WebCore.vcxproj/WebCore.vcxproj:
3083         * WebCore.vcxproj/WebCore.vcxproj.filters:
3084         * WebCore.xcodeproj/project.pbxproj:
3085         * bindings/js/JSRTCIceCandidateCustom.cpp: Added.
3086         (WebCore::JSRTCIceCandidateConstructor::constructJSRTCIceCandidate):
3087
3088 2013-11-15  Commit Queue  <commit-queue@webkit.org>
3089
3090         Unreviewed, rolling out r159337.
3091         http://trac.webkit.org/changeset/159337
3092         https://bugs.webkit.org/show_bug.cgi?id=124423
3093
3094         broke a bunch of fast/regions tests on EFL/GTK (Requested by
3095         philn on #webkit).
3096
3097         * rendering/InlineFlowBox.cpp:
3098         (WebCore::InlineFlowBox::setLayoutOverflow):
3099         (WebCore::InlineFlowBox::setVisualOverflow):
3100         * rendering/InlineFlowBox.h:
3101         * rendering/RenderBlock.cpp:
3102         (WebCore::RenderBlock::addOverflowFromChildren):
3103         (WebCore::RenderBlock::paint):
3104         (WebCore::RenderBlock::paintObject):
3105         (WebCore::RenderBlock::estimateRegionRangeForBoxChild):
3106         (WebCore::RenderBlock::updateRegionRangeForBoxChild):
3107         * rendering/RenderBlockFlow.cpp:
3108         (WebCore::RenderBlockFlow::hasNextPage):
3109         (WebCore::RenderBlockFlow::relayoutForPagination):
3110         * rendering/RenderBlockLineLayout.cpp:
3111         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
3112         * rendering/RenderBox.cpp:
3113         (WebCore::RenderBox::borderBoxRectInRegion):
3114         (WebCore::RenderBox::computeRectForRepaint):
3115         (WebCore::RenderBox::addLayoutOverflow):
3116         (WebCore::RenderBox::addVisualOverflow):
3117         (WebCore::RenderBox::isUnsplittableForPagination):
3118         (WebCore::RenderBox::overflowRectForPaintRejection):
3119         * rendering/RenderBox.h:
3120         * rendering/RenderBoxModelObject.cpp:
3121         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3122         * rendering/RenderBoxModelObject.h:
3123         * rendering/RenderBoxRegionInfo.h:
3124         (WebCore::RenderBoxRegionInfo::createOverflow):
3125         * rendering/RenderFlowThread.cpp:
3126         (WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
3127         (WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
3128         (WebCore::RenderFlowThread::checkRegionsWithStyling):
3129         (WebCore::RenderFlowThread::mapFromLocalToFlowThread):
3130         (WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
3131         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
3132         (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer):
3133         * rendering/RenderFlowThread.h:
3134         * rendering/RenderLayer.cpp:
3135         (WebCore::RenderLayer::updateLayerPositions):
3136         (WebCore::expandClipRectForDescendantsAndReflection):
3137         (WebCore::RenderLayer::paintLayer):
3138         (WebCore::RenderLayer::paintLayerContents):
3139         (WebCore::RenderLayer::updatePaintingInfoForFragments):
3140         (WebCore::RenderLayer::paintForegroundForFragments):
3141         (WebCore::RenderLayer::hitTest):
3142         (WebCore::RenderLayer::hitTestLayer):
3143         (WebCore::RenderLayer::calculateClipRects):
3144         (WebCore::RenderLayer::parentClipRects):
3145         (WebCore::RenderLayer::calculateRects):
3146         (WebCore::RenderLayer::intersectsDamageRect):
3147         (WebCore::RenderLayer::repaintIncludingDescendants):
3148         * rendering/RenderLayer.h:
3149         * rendering/RenderLayerCompositor.cpp:
3150         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3151         * rendering/RenderListItem.cpp:
3152         (WebCore::RenderListItem::addOverflowFromChildren):
3153         * rendering/RenderMultiColumnSet.cpp:
3154         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
3155         (WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
3156         * rendering/RenderMultiColumnSet.h:
3157         * rendering/RenderNamedFlowFragment.cpp:
3158         (WebCore::RenderNamedFlowFragment::createStyle):
3159         * rendering/RenderNamedFlowFragment.h:
3160         * rendering/RenderOverflow.h:
3161         * rendering/RenderRegion.cpp:
3162         (WebCore::RenderRegion::flowThreadPortionOverflowRect):
3163         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
3164         (WebCore::shouldPaintRegionContentsInPhase):
3165         (WebCore::RenderRegion::paintObject):
3166         (WebCore::RenderRegion::hitTestContents):
3167         (WebCore::RenderRegion::computeOverflowFromFlowThread):
3168         (WebCore::RenderRegion::repaintFlowThreadContent):
3169         (WebCore::RenderRegion::repaintFlowThreadContentRectangle):
3170         (WebCore::RenderRegion::insertedIntoTree):
3171         (WebCore::RenderRegion::ensureOverflowForBox):
3172         (WebCore::RenderRegion::rectFlowPortionForBox):
3173         (WebCore::RenderRegion::addLayoutOverflowForBox):
3174         (WebCore::RenderRegion::addVisualOverflowForBox):
3175         (WebCore::RenderRegion::layoutOverflowRectForBox):
3176         (WebCore::RenderRegion::visualOverflowRectForBox):
3177         (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
3178         * rendering/RenderRegion.h:
3179         * rendering/RenderReplaced.cpp:
3180         (WebCore::RenderReplaced::shouldPaint):
3181         * rendering/RootInlineBox.cpp:
3182         (WebCore::RootInlineBox::paint):
3183
3184 2013-11-15  Antti Koivisto  <antti@apple.com>
3185
3186         Hovering over text using simple line path should not cause switch to line boxes
3187         https://bugs.webkit.org/show_bug.cgi?id=124418
3188
3189         Reviewed by Anders Carlsson.
3190
3191         Test: fast/text/simple-lines-hover.html
3192
3193         * rendering/RenderText.cpp:
3194         (WebCore::RenderText::absoluteRects):
3195         (WebCore::RenderText::absoluteQuadsClippedToEllipsis):
3196         (WebCore::RenderText::absoluteQuads):
3197         
3198             Collect quads and rects directly from simple lines without requiring the line box switch.
3199
3200         * rendering/SimpleLineLayoutFunctions.cpp:
3201         (WebCore::SimpleLineLayout::collectTextAbsoluteRects):
3202         (WebCore::SimpleLineLayout::collectTextAbsoluteQuads):
3203         
3204             Add these.
3205
3206         * rendering/SimpleLineLayoutFunctions.h:
3207         * rendering/SimpleLineLayoutResolver.h:
3208         (WebCore::SimpleLineLayout::RunResolver::Run::start):
3209         (WebCore::SimpleLineLayout::RunResolver::Run::end):
3210         
3211             For future use.
3212
3213 2013-11-15  Radu Stavila  <stavila@adobe.com>
3214
3215         [CSS Regions] Implement visual overflow for first & last regions
3216         https://bugs.webkit.org/show_bug.cgi?id=118665
3217
3218         In order to properly propagate the visual overflow of elements flowed inside regions, 
3219         the responsiblity of painting and hit-testing content inside flow threads has been
3220         moved to the flow thread layer's level.
3221         Each region keeps the associated overflow with each box in the RenderBoxRegionInfo
3222         structure, including one for the flow thread itself. This data is used during
3223         painting and hit-testing.
3224
3225         Reviewed by David Hyatt.
3226
3227         Tests: fast/regions/overflow-first-and-last-regions-in-container-hidden.html
3228                fast/regions/overflow-first-and-last-regions.html
3229                fast/regions/overflow-nested-regions.html
3230                fast/regions/overflow-region-float.html
3231                fast/regions/overflow-region-inline.html
3232                fast/regions/overflow-region-transform.html
3233
3234         * rendering/InlineFlowBox.cpp:
3235         (WebCore::InlineFlowBox::setLayoutOverflow):
3236         (WebCore::InlineFlowBox::setVisualOverflow):
3237         * rendering/InlineFlowBox.h:
3238         * rendering/RenderBlock.cpp:
3239         (WebCore::RenderBlock::addOverflowFromChildren):
3240         (WebCore::RenderBlock::paint):
3241         (WebCore::RenderBlock::paintObject):
3242         (WebCore::RenderBlock::estimateRegionRangeForBoxChild):
3243         (WebCore::RenderBlock::updateRegionRangeForBoxChild):
3244         * rendering/RenderBlockFlow.cpp:
3245         (WebCore::RenderBlockFlow::hasNextPage):
3246         (WebCore::RenderBlockFlow::relayoutForPagination):
3247         * rendering/RenderBlockLineLayout.cpp:
3248         (WebCore::RenderBlockFlow::positionNewFloatOnLine):
3249         * rendering/RenderBox.cpp:
3250         (WebCore::RenderBox::borderBoxRectInRegion):
3251         (WebCore::RenderBox::computeRectForRepaint):
3252         (WebCore::RenderBox::addLayoutOverflow):
3253         (WebCore::RenderBox::addVisualOverflow):
3254         (WebCore::RenderBox::isUnsplittableForPagination):
3255         (WebCore::RenderBox::overflowRectForPaintRejection):
3256         * rendering/RenderBox.h:
3257         (WebCore::RenderBox::canHaveOutsideRegionRange):
3258         * rendering/RenderBoxModelObject.cpp:
3259         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
3260         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3261         * rendering/RenderBoxModelObject.h:
3262         * rendering/RenderBoxRegionInfo.h:
3263         (WebCore::RenderBoxRegionInfo::createOverflow):
3264         * rendering/RenderFlowThread.cpp:
3265         (WebCore::RenderFlowThread::objectShouldPaintInFlowRegion):
3266         (WebCore::RenderFlowThread::mapFromLocalToFlowThread):
3267         (WebCore::RenderFlowThread::mapFromFlowThreadToLocal):
3268         (WebCore::RenderFlowThread::decorationsClipRectForBoxInRegion):
3269         (WebCore::RenderFlowThread::flipForWritingModeLocalCoordinates):
3270         (WebCore::RenderFlowThread::addRegionsOverflowFromChild):
3271         (WebCore::RenderFlowThread::addRegionsVisualOverflow):
3272         (WebCore::CurrentRenderFlowThreadMaintainer::CurrentRenderFlowThreadMaintainer):
3273         * rendering/RenderFlowThread.h:
3274         * rendering/RenderLayer.cpp:
3275         (WebCore::RenderLayer::updateLayerPositions):
3276         (WebCore::expandClipRectForRegionAndReflection):
3277         (WebCore::expandClipRectForDescendantsAndReflection):
3278         (WebCore::RenderLayer::paintLayer):
3279         (WebCore::RenderLayer::paintLayerContents):
3280         (WebCore::RenderLayer::updatePaintingInfoForFragments):
3281         (WebCore::RenderLayer::paintForegroundForFragments):
3282         (WebCore::RenderLayer::hitTest):
3283         (WebCore::RenderLayer::hitTestLayer):
3284         (WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
3285         (WebCore::RenderLayer::calculateClipRects):
3286         (WebCore::RenderLayer::parentClipRects):
3287         (WebCore::RenderLayer::calculateRects):
3288         (WebCore::RenderLayer::intersectsDamageRect):
3289         (WebCore::RenderLayer::updateDescendantsLayerListsIfNeeded):
3290         (WebCore::RenderLayer::repaintIncludingDescendants):
3291         (WebCore::RenderLayer::paintNamedFlowThreadInsideRegion):
3292         (WebCore::RenderLayer::paintFlowThreadIfRegion):
3293         (WebCore::RenderLayer::hitTestFlowThreadIfRegion):
3294         * rendering/RenderLayer.h:
3295         (WebCore::ClipRect::inflateX):
3296         (WebCore::ClipRect::inflateY):
3297         (WebCore::ClipRect::inflate):
3298         * rendering/RenderLayerCompositor.cpp:
3299         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3300         * rendering/RenderListItem.cpp:
3301         (WebCore::RenderListItem::addOverflowFromChildren):
3302         * rendering/RenderMultiColumnSet.cpp:
3303         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
3304         (WebCore::RenderMultiColumnSet::repaintFlowThreadContent):
3305         * rendering/RenderMultiColumnSet.h:
3306         * rendering/RenderNamedFlowFragment.cpp:
3307         (WebCore::RenderNamedFlowFragment::createStyle):
3308         (WebCore::RenderNamedFlowFragment::namedFlowThread):
3309         * rendering/RenderNamedFlowFragment.h:
3310         * rendering/RenderOverflow.h:
3311         * rendering/RenderRegion.cpp:
3312         (WebCore::RenderRegion::flowThreadPortionOverflowRect):
3313         (WebCore::RenderRegion::flowThreadPortionLocation):
3314         (WebCore::RenderRegion::regionContainerLayer):
3315         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
3316         (WebCore::RenderRegion::computeOverflowFromFlowThread):
3317         (WebCore::RenderRegion::repaintFlowThreadContent):
3318         (WebCore::RenderRegion::repaintFlowThreadContentRectangle):
3319         (WebCore::RenderRegion::insertedIntoTree):
3320         (WebCore::RenderRegion::ensureOverflowForBox):
3321         (WebCore::RenderRegion::rectFlowPortionForBox):
3322         (WebCore::RenderRegion::addLayoutOverflowForBox):
3323         (WebCore::RenderRegion::addVisualOverflowForBox):
3324         (WebCore::RenderRegion::layoutOverflowRectForBox):
3325         (WebCore::RenderRegion::visualOverflowRectForBox):
3326         (WebCore::RenderRegion::visualOverflowRectForBoxForPropagation):
3327         * rendering/RenderRegion.h:
3328         * rendering/RenderReplaced.cpp:
3329         (WebCore::RenderReplaced::shouldPaint):
3330         * rendering/RootInlineBox.cpp:
3331         (WebCore::RootInlineBox::paint):
3332
3333 2013-11-15  Stephane Jadaud  <sjadaud@sii.fr>
3334
3335         [GStreamer] Add support for Media Source API
3336         https://bugs.webkit.org/show_bug.cgi?id=99065
3337
3338         The patch integrate a Media Source player for the GStreamer backend. The implementented architecture is:
3339         - MediaPlayerPrivateGStreamer engine is modified to support Media Source URIs (change blob:// to mediasourceblob://), in addition to the existing support for web (http/https/blob) URIs
3340         - Similar to the existing WebKitWebSrc gstreamer element that handles web URIs, a new gstreamer element named WebKitMediaSrc is implemented to handle Media Source URIs
3341         - WebKitMediaSrc registers its URI protocol handler, allowing uridecodebin to dynamically create the appropriate source element.
3342         - The WebKitMediaSrc element creates a bin with 2 appsrc: One for Audio and One for Video. Pads are dynamically linked at the reception of first video and audio buffers.
3343
3344         Reviewed by Philippe Normand.
3345
3346         Tests: Activate http/tests/media/media-source and media/media-source tests
3347
3348         * GNUmakefile.am:
3349         * GNUmakefile.list.am:
3350         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3351         (WebCore::initializeGStreamerAndRegisterWebKitElements):
3352         (WebCore::MediaPlayerPrivateGStreamer::load):
3353         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3354         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp: Added.
3355         (WebCore::MediaSourceGStreamer::open):
3356         (WebCore::MediaSourceGStreamer::MediaSourceGStreamer):
3357         (WebCore::MediaSourceGStreamer::~MediaSourceGStreamer):
3358         (WebCore::MediaSourceGStreamer::addSourceBuffer):
3359         (WebCore::MediaSourceGStreamer::setDuration):
3360         (WebCore::MediaSourceGStreamer::markEndOfStream):
3361         (WebCore::MediaSourceGStreamer::unmarkEndOfStream):
3362         * platform/graphics/gstreamer/MediaSourceGStreamer.h: Added.
3363         * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.cpp: Added.
3364         (WebCore::SourceBufferPrivateGStreamer::SourceBufferPrivateGStreamer):
3365         (WebCore::SourceBufferPrivateGStreamer::append):
3366         (WebCore::SourceBufferPrivateGStreamer::abort):
3367         (WebCore::SourceBufferPrivateGStreamer::removedFromMediaSource):
3368         * platform/graphics/gstreamer/SourceBufferPrivateGStreamer.h: Added.
3369         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp: Added.
3370         (webKitMediaSrcAddSrc):
3371         (webkit_media_src_init):
3372         (webKitMediaSrcFinalize):
3373         (webKitMediaSrcSetProperty):
3374         (webKitMediaSrcGetProperty):
3375         (webKitMediaVideoSrcStop):
3376         (webKitMediaAudioSrcStop):
3377         (webKitMediaVideoSrcStart):
3378         (webKitMediaAudioSrcStart):
3379         (webKitMediaSrcChangeState):
3380         (webKitMediaSrcQueryWithParent):
3381         (webKitMediaSrcUriGetType):
3382         (webKitMediaSrcGetProtocols):
3383         (webKitMediaSrcGetUri):
3384         (webKitMediaSrcSetUri):
3385         (webKitMediaSrcUriHandlerInit):
3386         (webKitMediaVideoSrcNeedDataMainCb):
3387         (webKitMediaAudioSrcNeedDataMainCb):
3388         (webKitMediaVideoSrcNeedDataCb):
3389         (webKitMediaAudioSrcNeedDataCb):
3390         (webKitMediaVideoSrcEnoughDataMainCb):
3391         (webKitMediaAudioSrcEnoughDataMainCb):
3392         (webKitMediaVideoSrcEnoughDataCb):
3393         (webKitMediaAudioSrcEnoughDataCb):
3394         (webKitMediaVideoSrcSeekMainCb):
3395         (webKitMediaAudioSrcSeekMainCb):
3396         (webKitMediaVideoSrcSeekDataCb):
3397         (webKitMediaAudioSrcSeekDataCb):
3398         (webKitMediaSrcSetMediaPlayer):
3399         (webKitMediaSrcSetPlayBin):
3400         (MediaSourceClientGstreamer::MediaSourceClientGstreamer):
3401         (MediaSourceClientGstreamer::~MediaSourceClientGstreamer):
3402         (MediaSourceClientGstreamer::didReceiveDuration):
3403         (MediaSourceClientGstreamer::didReceiveData):
3404         (MediaSourceClientGstreamer::didFinishLoading):
3405         (MediaSourceClientGstreamer::didFail):
3406         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.h: Added.
3407
3408 2013-11-14  Victor Costan  <costan@gmail.com>
3409
3410         XMLSerializer escapes < > & correctly inside <script> and <style> tags.
3411         https://bugs.webkit.org/show_bug.cgi?id=123914
3412
3413         Reviewed by Darin Adler.
3414
3415         Test: fast/dom/XMLSerializer-entities.html
3416
3417         * editing/MarkupAccumulator.cpp:
3418         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces): vim removed some whitespace.
3419         (WebCore::MarkupAccumulator::entityMaskForText): Fixed the returned value for <script> etc in XML.
3420
3421 2013-11-14  Bem Jones-Bey  <bjonesbe@adobe.com>
3422
3423         ASSERTION FAILED: rangesIntersect(m_renderer.pixelSnappedLogicalTopForFloat(floatingObject), m_renderer.pixelSnappedLogicalBottomForFloat(floatingObject), m_lineTop, m_lineBottom) ../../Source/WebCore/rendering/FloatingObjects.cpp(463)
3424         https://bugs.webkit.org/show_bug.cgi?id=124375
3425
3426         Reviewed by Alexandru Chiculita.
3427
3428         When moving the placed floats tree over to LayoutUnit, I forgot to
3429         update these asserts, which causes issues on ports with subpixel
3430         layout enabled. 
3431
3432         No new tests, no behavior change.
3433
3434         * rendering/FloatingObjects.cpp:
3435         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
3436         (WebCore::::collectIfNeeded):
3437
3438 2013-11-14  Victor Costan  <costan@gmail.com>
3439
3440         Clean up sequence handling in Blob constructor
3441         https://bugs.webkit.org/show_bug.cgi?id=124343
3442
3443         Reviewed by Alexey Proskuryakov.
3444
3445         Added test case to LayoutTests/fast/files/blob-constructor.html
3446
3447         * bindings/js/JSBlobCustom.cpp:
3448         (WebCore::JSBlobConstructor::constructJSBlob):
3449             Handle exceptions in sequences, eliminate double type-checking for
3450             ArrayBuffer, ArrayBufferView and Blob parts.
3451
3452 2013-11-14  Oliver Hunt  <oliver@apple.com>
3453
3454         Make CLoop easier to build, and make it work
3455         https://bugs.webkit.org/show_bug.cgi?id=124359
3456
3457         Reviewed by Geoffrey Garen.
3458
3459         Add cloop configuration info to WebCore FeatureDefines
3460         so that it's consistent with JSC
3461
3462         * Configurations/FeatureDefines.xcconfig:
3463
3464 2013-11-14  Aloisio Almeida Jr  <aloisio.almeida@openbossa.org>
3465
3466         [Cairo] Avoid extra copy when drawing images
3467         https://bugs.webkit.org/show_bug.cgi?id=124209
3468
3469         Reviewed by Martin Robinson.
3470
3471         To solve the bug #58309 a cairo subsurface is being used to limit the
3472         source image boundaries.
3473         In many cases, when a cairo subsurface is used for drawing an image,
3474         it occurs an image copy, causing performance penalty. In the case of
3475         the function PlatformContextCairo::drawSurfaceToContext, the image
3476         copy always happens.
3477         So, we should use the subsurface only when it's really necessary.
3478         In cases where we're drawing the whole image, the subsurface is
3479         unnecessary.
3480
3481         The proposed patch avoid the use of subsurfaces when sampling the whole
3482         image.
3483
3484         No new tests. It's an enhancement. Already covered by existing tests.
3485
3486         * platform/graphics/cairo/PlatformContextCairo.cpp:
3487         (WebCore::PlatformContextCairo::drawSurfaceToContext):
3488
3489 2013-11-14  Alexey Proskuryakov  <ap@apple.com>
3490
3491         Implement raw format for WebCrypto key export
3492         https://bugs.webkit.org/show_bug.cgi?id=124376
3493
3494         Reviewed by Anders Carlsson.
3495
3496         Tests: crypto/subtle/aes-export-key.html
3497                crypto/subtle/hmac-export-key.html
3498
3499         A CryptoKey just exports its native CryptoKeyData, which will also work nicely for
3500         JWK format soon. For spki and pkcs8, we'll need to figure out the best way to
3501         utilize platform library support for ASN.1, but we are not there yet.
3502
3503         * bindings/js/JSSubtleCryptoCustom.cpp:
3504         (WebCore::JSSubtleCrypto::exportKey):
3505         * crypto/CryptoKey.h:
3506         * crypto/SubtleCrypto.idl:
3507         * crypto/keys/CryptoKeyAES.cpp:
3508         (WebCore::CryptoKeyAES::exportData):
3509         * crypto/keys/CryptoKeyAES.h:
3510         * crypto/keys/CryptoKeyHMAC.cpp:
3511         (WebCore::CryptoKeyHMAC::exportData):
3512         * crypto/keys/CryptoKeyHMAC.h:
3513
3514         * crypto/keys/CryptoKeyRSA.h:
3515         * crypto/mac/CryptoKeyRSAMac.cpp:
3516         (WebCore::CryptoKeyRSA::exportData):
3517         Added a dummy implementation for RSA.
3518
3519 2013-11-14  Joseph Pecoraro  <pecoraro@apple.com>
3520
3521         Web Inspector: Simply generated domain dispatch methods for domains with few commands
3522         https://bugs.webkit.org/show_bug.cgi?id=124374
3523
3524         Reviewed by Timothy Hatcher.
3525
3526         * inspector/CodeGeneratorInspector.py:
3527         (Generator.go):
3528         (Generator.process_command):
3529         * inspector/CodeGeneratorInspectorStrings.py:
3530
3531 2013-11-14  Bear Travis  <betravis@adobe.com>
3532
3533         [CSS Shapes] Accept the new <box> value for shape-outside
3534         https://bugs.webkit.org/show_bug.cgi?id=124227
3535
3536         Reviewed by David Hyatt.
3537
3538         The shape-outside property can now be set to the box values [margin/border/padding/content]-box.
3539         This patch adds the parsing code required to accept the new values, and the layout code
3540         to create a rectangle shape that has the size and position of the appropriate box.
3541
3542         Tests: fast/shapes/shape-outside-floats/shape-outside-boxes-001.html
3543                fast/shapes/shape-outside-floats/shape-outside-boxes-002.html
3544                fast/shapes/shape-outside-floats/shape-outside-boxes-003.html
3545
3546         * css/CSSComputedStyleDeclaration.cpp:
3547         (WebCore::ComputedStyleExtractor::propertyValue): Output the new box values.
3548         * css/CSSParser.cpp:
3549         (WebCore::CSSParser::parseValue): Accept the new box values.
3550         * css/CSSValueKeywords.in: Add margin-box value.
3551         * css/DeprecatedStyleBuilder.cpp:
3552         (WebCore::ApplyPropertyShape::applyValue): Accept the new box values.
3553         * rendering/RenderBoxModelObject.h:
3554         (WebCore::RenderBoxModelObject::borderLogicalWidth): Added new utility methods to help
3555         with box sizing.
3556         (WebCore::RenderBoxModelObject::borderLogicalHeight): Ditto.
3557         (WebCore::RenderBoxModelObject::paddingLogicalWidth): Ditto.
3558         (WebCore::RenderBoxModelObject::paddingLogicalHeight): Ditto.
3559         * rendering/shapes/Shape.cpp:
3560         (WebCore::Shape::createShape): You can create a shape from a box's dimensions, rather
3561         than always using a BasicShape or RasterShape value.
3562         * rendering/shapes/Shape.h:
3563         * rendering/shapes/ShapeInfo.cpp:
3564         (WebCore::::computedShape): Create the appropriate shape based on the box values.
3565         * rendering/shapes/ShapeInfo.h:
3566         (WebCore::ShapeInfo::setShapeSize): Adjust for the box size when using a box value.
3567         (WebCore::ShapeInfo::logicalTopOffset): Ditto.
3568         (WebCore::ShapeInfo::logicalLeftOffset): Ditto.
3569         * rendering/shapes/ShapeInsideInfo.cpp:
3570         (WebCore::ShapeInsideInfo::isEnabledFor): Enable for the box values.
3571         * rendering/shapes/ShapeOutsideInfo.cpp:
3572         (WebCore::ShapeOutsideInfo::isEnabledFor): Disable for shape-inside.
3573         * rendering/style/ShapeValue.h:
3574         (WebCore::ShapeValue::createBoxValue): Create the appropriate shape value for a box.
3575         (WebCore::ShapeValue::box): Return the box value for this ShapeValue.
3576         (WebCore::ShapeValue::ShapeValue): Create a ShapeValue from a box value.
3577
3578 2013-11-14  Beth Dakin  <bdakin@apple.com>
3579
3580         Rubber-stamped by Tim Horton.
3581
3582         Post-checkin review comment! StickToViewportBounds sounds better and more accurate 
3583         than StickToWindowBounds.
3584
3585         * platform/ScrollTypes.h:
3586
3587 2013-11-13  Jer Noble  <jer.noble@apple.com>
3588
3589         Unreviewed build failure; update MediaPlayerPrivateAVFFoundationCF::seekToTime after r159208.
3590
3591         After r159208, seekToTime takes tolerance parameters.
3592
3593         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3594         (WebCore::MediaPlayerPrivateAVFoundationCF::seekToTime):
3595         (WebCore::AVFWrapper::seekToTime):
3596         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
3597
3598 2013-11-14  Beth Dakin  <bdakin@apple.com>
3599
3600         Add a new mode where fixed elements don't constrain their positions during a
3601         rubber band
3602         https://bugs.webkit.org/show_bug.cgi?id=124260
3603
3604         Reviewed by Tim Horton.
3605
3606         This patch adds a new enum called ScrollBehaviorForFixedElements, which has
3607         two values, StickToDocumentBounds or StickToWindowBounds. StickToDocumentBounds 
3608         corresponds to our current behavior, where fixed elements constrain 
3609         their positions during a rubber-band so that they stay stuck to the document.
3610         The new mode, StickToWindowBounds, will cause fixed elements to always stay
3611         fixed relative to the window.
3612
3613         scrollOffsetForFixedPosition() now takes a new parameter for the fixed behavior
3614         so that it knows whether or not to constrain the position.
3615         * page/FrameView.cpp:
3616         (WebCore::FrameView::scrollOffsetForFixedPosition):
3617         
3618         Right now, just return StickToDocumentBounds and retain existing behavior.
3619         (WebCore::FrameView::scrollBehaviorForFixedElements):
3620         * page/FrameView.h:
3621
3622         The scrolling thread needs to know about the fixed element scroll behavior,
3623         so this code makes ScrollingStateScrollingNodes keep track of that 
3624         information to pass over to the scrolling thread.
3625         * page/scrolling/ScrollingStateScrollingNode.cpp:
3626         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
3627         (WebCore::ScrollingStateScrollingNode::setScrollBehaviorForFixedElements):
3628         * page/scrolling/ScrollingStateScrollingNode.h:
3629         * page/scrolling/ScrollingTreeScrollingNode.cpp:
3630         (WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
3631         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
3632         * page/scrolling/ScrollingTreeScrollingNode.h:
3633         (WebCore::ScrollingTreeScrollingNode::scrollBehaviorForFixedElements):
3634         * page/scrolling/mac/ScrollingCoordinatorMac.h:
3635         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3636         (WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
3637         (WebCore::ScrollingCoordinatorMac::setScrollBehaviorForFixedElementsForNode):
3638         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
3639         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
3640         
3641         Here is the new enum.
3642         * platform/ScrollTypes.h:
3643         
3644         Another place where we only want to constrain scroll position if that is the
3645         mode we are in.
3646         * rendering/RenderLayerCompositor.cpp:
3647         (WebCore::RenderLayerCompositor::customPositionForVisibleRectComputation):
3648
3649 2013-11-14  Alexey Proskuryakov  <ap@apple.com>
3650
3651         [Mac] HMAC sign/verify crashes when key is empty
3652         https://bugs.webkit.org/show_bug.cgi?id=124372
3653
3654         Reviewed by Sam Weinig.
3655
3656         Test: crypto/subtle/hmac-sign-verify-empty-key.html
3657
3658         * crypto/mac/CryptoAlgorithmHMACMac.cpp: (WebCore::calculateSignature): Give it
3659         a non-null pointer then.
3660
3661 2013-11-14  Alexey Proskuryakov  <ap@apple.com>
3662
3663         Implement RSASSA-PKCS1-v1_5 sign/verify
3664         https://bugs.webkit.org/show_bug.cgi?id=124335
3665
3666         Build fix.
3667
3668         * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
3669
3670 2013-11-14  Samuel White  <samuel_white@apple.com>
3671
3672         AX: Calling NSAccessibilityColumnsAttribute and NSAccessibilityRowsAttribute simply to get column/row count can be very expensive.
3673         https://bugs.webkit.org/show_bug.cgi?id=124293
3674
3675         Reviewed by Chris Fleizach.
3676
3677         Added ability to get accessibility table column or row count without fetching all columns or rows.
3678
3679         Test: platform/mac/accessibility/table-column-and-row-count.html
3680
3681         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3682         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
3683         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3684
3685 2013-11-14  Alexey Proskuryakov  <ap@apple.com>
3686
3687         Implement RSASSA-PKCS1-v1_5 sign/verify
3688         https://bugs.webkit.org/show_bug.cgi?id=124335
3689
3690         Reviewed by Sam Weinig.
3691
3692         Test: crypto/subtle/rsassa-pkcs1-v1_5-sign-verify.html
3693
3694         * WebCore.xcodeproj/project.pbxproj: Added new files, removed Mac SHA algorithm files.
3695
3696         * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
3697         (WebCore::getCommonCryptoDigestAlgorithm):
3698         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
3699         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
3700         Implemented. These take two steps, first a digest is computed, and then it's signed.
3701
3702         * crypto/CryptoDigest.h: Added.
3703         * crypto/mac/CryptoDigestMac.cpp: Added.
3704         (WebCore::CryptoDigest::CryptoDigest):
3705         (WebCore::CryptoDigest::~CryptoDigest):
3706         (WebCore::CryptoDigest::create):
3707         (WebCore::CryptoDigest::addBytes):
3708         (WebCore::CryptoDigest::computeHash):
3709         Added a cross-platform interface and Mac implementation to compute a digest. It
3710         should be possible to use it outside WebCrypto if we need to (perhaps even merge
3711         with  WTF SHA-1 class).
3712         The Mac implementation is kind of ugly, but at least it encapsulates the ugliness.
3713
3714         * crypto/algorithms/CryptoAlgorithmSHA1.cpp: (WebCore::CryptoAlgorithmSHA1::digest):
3715         * crypto/algorithms/CryptoAlgorithmSHA224.cpp: (WebCore::CryptoAlgorithmSHA224::digest):
3716         * crypto/algorithms/CryptoAlgorithmSHA256.cpp: (WebCore::CryptoAlgorithmSHA256::digest):
3717         * crypto/algorithms/CryptoAlgorithmSHA384.cpp: (WebCore::CryptoAlgorithmSHA384::digest):
3718         * crypto/algorithms/CryptoAlgorithmSHA512.cpp: (WebCore::CryptoAlgorithmSHA512::digest):
3719         * crypto/mac/CryptoAlgorithmSHA1Mac.cpp: Removed.
3720         * crypto/mac/CryptoAlgorithmSHA224Mac.cpp: Removed.
3721         * crypto/mac/CryptoAlgorithmSHA256Mac.cpp: Removed.
3722         * crypto/mac/CryptoAlgorithmSHA384Mac.cpp: Removed.
3723         * crypto/mac/CryptoAlgorithmSHA512Mac.cpp: Removed.
3724         These are all cross-platform now.
3725
3726 2013-11-14  Hans Muller  <hmuller@adobe.com>
3727
3728         [CSS Shapes] Empty polygons with non-zero shape-padding cause an ASSERT crash
3729         https://bugs.webkit.org/show_bug.cgi?id=124324
3730
3731         Reviewed by Andreas Kling.
3732
3733         PolygonShape::shapePaddingBounds() and PolygonShape::shapeMarginBounds() no
3734         longer attempt to compute a new FloatPolygon when the original is empty, i.e.
3735         when it has less than three vertices.
3736
3737         Tests: fast/shapes/shape-inside/shape-inside-empty-polygon-crash.html
3738                fast/shapes/shape-outside-floats/shape-outside-floats-empty-polygon-crash.html
3739
3740         * rendering/shapes/PolygonShape.cpp:
3741         (WebCore::PolygonShape::shapePaddingBounds): Don't compute a padding FloatPolygon if the original polygon is empty.
3742         (WebCore::PolygonShape::shapeMarginBounds): Don't compute a margin FloatPolygon if the original polygon is empty.
3743
3744 2013-11-14  Joseph Pecoraro  <pecoraro@apple.com>
3745
3746         Web Inspector: Cleaner Backend Method Calling Code Generation
3747         https://bugs.webkit.org/show_bug.cgi?id=124333
3748
3749         Reviewed by Timothy Hatcher.
3750
3751         No change in functionality, just improved generated code.
3752
3753         * inspector/CodeGeneratorInspector.py:
3754         (Generator.process_command):
3755         * inspector/CodeGeneratorInspectorStrings.py:
3756         * inspector/InspectorBackendDispatcher.cpp:
3757         * inspector/InspectorBackendDispatcher.h:
3758
3759 2013-11-14  Seokju Kwon  <seokju@webkit.org>
3760
3761         Use [ImplementedAs=defaultStatus] for Window.defaultstatus
3762         https://bugs.webkit.org/show_bug.cgi?id=124334
3763
3764         Reviewed by Christophe Dumez.
3765
3766         No new tests, this is just refactoring.
3767
3768         Use [ImplementedAs=defaultStatus] for Window.defaultstatus
3769         and remove unnecessary code from DOMWindow.
3770         Because 'defaultstatus' is an alias of defaultStatus.
3771
3772         * page/DOMWindow.h:
3773         * page/DOMWindow.idl:
3774
3775 2013-11-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3776
3777         Generate toSVGPolyline|gonElement() to replace static_cast<>
3778         https://bugs.webkit.org/show_bug.cgi?id=124341
3779
3780         Reviewed by Andreas Kling.
3781
3782         toSVGFoo() supports more plenty helper functions. So, toSVGFoo() needs
3783         to be used instead of static_cast<>.
3784
3785         Additionally, cleanup other static_cast<> as well.
3786
3787         No new tests, no behavior changes.
3788
3789         * rendering/svg/SVGPathData.cpp:
3790         (WebCore::updatePathFromEllipseElement):
3791         (WebCore::updatePathFromLineElement):
3792         (WebCore::updatePathFromPolygonElement):
3793         (WebCore::updatePathFromPolylineElement):
3794         * svg/SVGPolygonElement.h:
3795         * svg/SVGPolylineElement.h:
3796         * svg/svgtags.in: Add *generateTypeHelpers* keyword to polygon, polyline
3797
3798 2013-11-14  Andreas Kling  <akling@apple.com>
3799
3800         FontDescription copies should share families list, not duplicate it.
3801         <https://webkit.org/b/124338>
3802
3803         Turn FontDescription::m_families into a RefCountedArray<AtomicString>
3804         instead of a Vector<AtomicString, 1>. This allows FontDescription to
3805         share the families list between copies, instead of each object having
3806         its own Vector.
3807
3808         Also, FontDescription itself shrinks by 16 bytes.
3809
3810         Reviewed by Antti Koivisto.
3811
3812 2013-11-14  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3813
3814         Introduce FILTER_TYPE_CASTS for child filter class
3815         https://bugs.webkit.org/show_bug.cgi?id=124332
3816
3817         Reviewed by Andreas Kling.
3818
3819         To use TYPE_CASTS_BASE, define FILTER_TYPE_CASTS macro. Thanks to 
3820         it, static_cast<SVGFilter*> can be replaced by toSVGFilter().
3821
3822         No new tests, no behavior changes.
3823
3824         * platform/graphics/filters/Filter.h:
3825             Add isSVGFilter() to check if casting object is SVGFilter object.
3826         (WebCore::Filter::isSVGFilter):
3827         * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
3828         (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
3829         * svg/graphics/filters/SVGFEImage.cpp:
3830         (WebCore::FEImage::determineAbsolutePaintRect):
3831         (WebCore::FEImage::platformApplySoftware):
3832         * svg/graphics/filters/SVGFilter.h:
3833
3834 2013-11-13  Victor Costan  <costan@gmail.com>
3835
3836         Blob constructor accepts a sequence (array-like object) as first arg. 
3837         https://bugs.webkit.org/show_bug.cgi?id=124175
3838
3839         Reviewed by Christophe Dumez.
3840
3841         Added test cases to fast/files/script-tests/blob-constructor.js.
3842
3843         * bindings/js/JSBlobCustom.cpp: Make the constructor work with sequences.
3844         (WebCore::JSBlobConstructor::constructJSBlob):
3845         * bindings/js/JSDOMBinding.h:
3846         (WebCore::toJSSequence): Slightly better error message when conversion fails.
3847         (WebCore::toJS): Whitespace.
3848         (WebCore::jsArray): Whitespace.
3849
3850 2013-11-13  Joseph Pecoraro  <pecoraro@apple.com>
3851
3852         Web Inspector: InspectorBackendDispatcher improvements
3853         https://bugs.webkit.org/show_bug.cgi?id=124330
3854
3855         Reviewed by Timothy Hatcher.
3856
3857         * inspector/InspectorBackendDispatcher.cpp:
3858         (WebCore::InspectorBackendDispatcher::sendResponse):
3859         (WebCore::InspectorBackendDispatcher::reportProtocolError):
3860         * inspector/InspectorBackendDispatcher.h:
3861         (WebCore::InspectorSupplementalBackendDispatcher::InspectorSupplementalBackendDispatcher):
3862
3863 2013-11-13  Joseph Pecoraro  <pecoraro@apple.com>
3864
3865         Unreviewed Windows Build Fix after r159268.
3866
3867         Missed adding InspectorBackendDispatcher.h and cpp to the Windows build.
3868
3869         * WebCore.vcxproj/WebCore.vcxproj:
3870         * WebCore.vcxproj/WebCore.vcxproj.filters:
3871
3872 2013-11-13  Joseph Pecoraro  <pecoraro@apple.com>
3873
3874         Web Inspector: Generate Individual InspectorBackendDispatchers, add base InspectorBackendDispatcher
3875         https://bugs.webkit.org/show_bug.cgi?id=124296
3876
3877         Reviewed by Timothy Hatcher.
3878
3879         No new tests, this is just refactoring without changing functionality.
3880         Set of changes made:
3881
3882           - Add inspector/InspectorBackendDispatcher.{h,cpp}. This used to be almost entirely
3883             written in the code generator strings file, but make it actual source files
3884             because there is nothing changing in the code. Also clean this up a bit.
3885           - Give the base dispatcher a list of domain dispatchers and a way to register.
3886           - Make InspectorBackendDispatcher::dispatch read the domain of incoming request
3887             and pass the request on to the domain dispatcher.
3888           - Create per-domain dispatcher classes named "InspectorFooBackendDispatcher"
3889           - Convert "InspectorBackendDispatcher::FooCommandHandler" interfaces to
3890             "InspectorFooBackendDispatcherHandler" interfaces.
3891           - Convert all "InspectorBackendDispatcherImpl::FooDomain_fooMethod" methods to
3892             "InspectorFooBackendDispatcher::fooMethod" methods. These can also remove their
3893             "if (!agent)" checks because that can never be the case anymore.
3894           - Remove InspectorBackendDispatcherImpl, now that there are base and domain dispatchers.
3895           - Add ASCIILiteral in many places in generated code where possible.
3896           - In all agents, create dispatchers in didCreateFrontendAndBackend and clear
3897             them in willDestroyFrontendAndBackend, right alongside frontend dispatchers.
3898
3899         * inspector/CodeGeneratorInspector.py:
3900         (DomainNameFixes.get_fixed_data.Res):
3901         (TypeBindings.create_type_declaration_.EnumBinding.get_code_generator.CodeGenerator.generate_type_builder):
3902         (Generator):
3903         (Generator.go):
3904         (Generator.process_command):
3905         (Generator.generate_send_method):
3906         * inspector/CodeGeneratorInspectorStrings.py:
3907         (void):
3908         (HashMap):
3909         (InspectorBackendDispatchers_h):
3910         * inspector/InspectorAgent.cpp:
3911         (WebCore::InspectorAgent::didCreateFrontendAndBackend):
3912         (WebCore::InspectorAgent::willDestroyFrontendAndBackend):
3913         * inspector/InspectorAgent.h:
3914         * inspector/InspectorAllInOne.cpp:
3915         * inspector/InspectorApplicationCacheAgent.cpp:
3916         (WebCore::InspectorApplicationCacheAgent::didCreateFrontendAndBackend):
3917         (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
3918         * inspector/InspectorApplicationCacheAgent.h:
3919         * inspector/InspectorBackendDispatcher.cpp: Added.
3920         (WebCore::InspectorBackendDispatcher::CallbackBase::CallbackBase):
3921         (WebCore::InspectorBackendDispatcher::CallbackBase::isActive):
3922         (WebCore::InspectorBackendDispatcher::CallbackBase::sendFailure):
3923         (WebCore::InspectorBackendDispatcher::CallbackBase::sendIfActive):
3924         (WebCore::InspectorBackendDispatcher::create):
3925         (WebCore::InspectorBackendDispatcher::registerDispatcherForDomain):
3926         (WebCore::InspectorBackendDispatcher::dispatch):
3927         (WebCore::InspectorBackendDispatcher::sendResponse):
3928         (WebCore::InspectorBackendDispatcher::reportProtocolError):
3929         (WebCore::InspectorBackendDispatcher::getPropertyValue):
3930         (WebCore::AsMethodBridges::asInt):
3931         (WebCore::AsMethodBridges::asDouble):
3932         (WebCore::AsMethodBridges::asString):
3933         (WebCore::AsMethodBridges::asBoolean):
3934         (WebCore::AsMethodBridges::asObject):
3935         (WebCore::AsMethodBridges::asArray):
3936         (WebCore::InspectorBackendDispatcher::getInt):
3937         (WebCore::InspectorBackendDispatcher::getDouble):
3938         (WebCore::InspectorBackendDispatcher::getString):
3939         (WebCore::InspectorBackendDispatcher::getBoolean):
3940         (WebCore::InspectorBackendDispatcher::getObject):
3941         (WebCore::InspectorBackendDispatcher::getArray):
3942         * inspector/InspectorBackendDispatcher.h: Added.
3943         (WebCore::InspectorSupplementalBackendDispatcher::InspectorSupplementalBackendDispatcher):
3944         (WebCore::InspectorSupplementalBackendDispatcher::~InspectorSupplementalBackendDispatcher):
3945         (WebCore::InspectorBackendDispatcher::~InspectorBackendDispatcher):
3946         (WebCore::InspectorBackendDispatcher::clearFrontend):
3947         (WebCore::InspectorBackendDispatcher::isActive):
3948         (WebCore::InspectorBackendDispatcher::InspectorBackendDispatcher):
3949         * inspector/InspectorCSSAgent.cpp:
3950         (WebCore::InspectorCSSAgent::didCreateFrontendAndBackend):
3951         (WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
3952         * inspector/InspectorCSSAgent.h:
3953         * inspector/InspectorCanvasAgent.cpp:
3954         (WebCore::InspectorCanvasAgent::didCreateFrontendAndBackend):
3955         (WebCore::InspectorCanvasAgent::willDestroyFrontendAndBackend):
3956         * inspector/InspectorCanvasAgent.h:
3957         * inspector/InspectorConsoleAgent.cpp:
3958         (WebCore::InspectorConsoleAgent::didCreateFrontendAndBackend):
3959         (WebCore::InspectorConsoleAgent::willDestroyFrontendAndBackend):
3960         * inspector/InspectorConsoleAgent.h:
3961         * inspector/InspectorDOMAgent.cpp:
3962         (WebCore::InspectorDOMAgent::didCreateFrontendAndBackend):
3963         (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
3964         * inspector/InspectorDOMAgent.h:
3965         * inspector/InspectorDOMDebuggerAgent.cpp:
3966         (WebCore::InspectorDOMDebuggerAgent::didCreateFrontendAndBackend):
3967         (WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend):
3968         * inspector/InspectorDOMDebuggerAgent.h:
3969         * inspector/InspectorDOMStorageAgent.cpp:
3970         (WebCore::InspectorDOMStorageAgent::didCreateFrontendAndBackend):
3971         (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
3972         * inspector/InspectorDOMStorageAgent.h:
3973         * inspector/InspectorDatabaseAgent.cpp:
3974         (WebCore::InspectorDatabaseAgent::didCreateFrontendAndBackend):
3975         (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
3976         * inspector/InspectorDatabaseAgent.h:
3977         * inspector/InspectorDebuggerAgent.cpp:
3978         (WebCore::InspectorDebuggerAgent::didCreateFrontendAndBackend):
3979         (WebCore::InspectorDebuggerAgent::willDestroyFrontendAndBackend):
3980         * inspector/InspectorDebuggerAgent.h:
3981         * inspector/InspectorHeapProfilerAgent.cpp:
3982         (WebCore::InspectorHeapProfilerAgent::didCreateFrontendAndBackend):
3983         (WebCore::InspectorHeapProfilerAgent::willDestroyFrontendAndBackend):
3984         * inspector/InspectorHeapProfilerAgent.h:
3985         * inspector/InspectorIndexedDBAgent.cpp:
3986         (WebCore::InspectorIndexedDBAgent::didCreateFrontendAndBackend):
3987         (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
3988         * inspector/InspectorIndexedDBAgent.h:
3989         * inspector/InspectorInputAgent.cpp:
3990         (WebCore::InspectorInputAgent::didCreateFrontendAndBackend):
3991         (WebCore::InspectorInputAgent::willDestroyFrontendAndBackend):
3992         * inspector/InspectorInputAgent.h:
3993         * inspector/InspectorLayerTreeAgent.cpp:
3994         (WebCore::InspectorLayerTreeAgent::didCreateFrontendAndBackend):
3995         (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
3996         * inspector/InspectorLayerTreeAgent.h:
3997         * inspector/InspectorMemoryAgent.cpp:
3998         (WebCore::InspectorMemoryAgent::didCreateFrontendAndBackend):
3999         (WebCore::InspectorMemoryAgent::willDestroyFrontendAndBackend):
4000         * inspector/InspectorMemoryAgent.h:
4001         * inspector/InspectorPageAgent.cpp:
4002         (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
4003         (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
4004         (WebCore::InspectorPageAgent::getScriptExecutionStatus):
4005         * inspector/InspectorPageAgent.h:
4006         * inspector/InspectorProfilerAgent.cpp:
4007         (WebCore::InspectorProfilerAgent::didCreateFrontendAndBackend):
4008         (WebCore::InspectorProfilerAgent::willDestroyFrontendAndBackend):
4009         * inspector/InspectorProfilerAgent.h:
4010         * inspector/InspectorResourceAgent.cpp:
4011         (WebCore::InspectorResourceAgent::didCreateFrontendAndBackend):
4012         (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
4013         * inspector/InspectorResourceAgent.h:
4014         * inspector/InspectorRuntimeAgent.h:
4015         * inspector/InspectorTimelineAgent.cpp:
4016         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
4017         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
4018         * inspector/InspectorTimelineAgent.h:
4019         * inspector/InspectorWorkerAgent.cpp:
4020         (WebCore::InspectorWorkerAgent::didCreateFrontendAndBackend):
4021         (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
4022         * inspector/InspectorWorkerAgent.h:
4023         * inspector/PageRuntimeAgent.cpp:
4024         (WebCore::PageRuntimeAgent::didCreateFrontendAndBackend):
4025         (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
4026         * inspector/PageRuntimeAgent.h:
4027         * inspector/WorkerRuntimeAgent.cpp:
4028         (WebCore::WorkerRuntimeAgent::didCreateFrontendAndBackend):
4029         (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
4030         * inspector/WorkerRuntimeAgent.h:
4031
4032 2013-11-13  Andy Estes  <aestes@apple.com>
4033
4034         Use NSCalendarIdentifierGregorian instead of NSGregorianCalendar on OS X 10.9 and iOS
4035         https://bugs.webkit.org/show_bug.cgi?id=124323
4036
4037         Reviewed by Mark Rowe.
4038
4039         NSGregorianCalendar was deprecated in OS X 10.9 and iOS 7.
4040
4041         * platform/text/mac/LocaleMac.mm:
4042         (WebCore::LocaleMac::LocaleMac):
4043
4044 2013-11-13  Joseph Pecoraro  <pecoraro@apple.com>
4045
4046         Web Inspector: Rename InspectorBackendDispatcher.h to InspectorBackendDispatchers.h
4047         https://bugs.webkit.org/show_bug.cgi?id=124257
4048
4049         Reviewed by Timothy Hatcher.
4050
4051         Soon each domain will generate its own dispatcher, and the generic
4052         InspectorBackendDispatcher will no longer be generated, it will just
4053         live in WebCore/inspector.
4054
4055         * CMakeLists.txt:
4056         * GNUmakefile.am:
4057         * GNUmakefile.list.am:
4058         * WebCore.vcxproj/WebCore.vcxproj:
4059         * WebCore.vcxproj/WebCore.vcxproj.filters: