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