Check WebCrypto parameter types when casting
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-11-13  Alexey Proskuryakov  <ap@apple.com>
2
3         Check WebCrypto parameter types when casting
4         https://bugs.webkit.org/show_bug.cgi?id=124297
5
6         Reviewed by Sam Weinig.
7
8         Also changed existing toCryptoXXX functions to use TYPE_CASTS_BASE mechanism.
9
10         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
11         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
12         And sure enough, there was a bug caught by the added checks.
13
14         * bindings/js/JSCryptoKeySerializationJWK.cpp:
15         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
16         * crypto/CryptoAlgorithmParameters.h:
17         (WebCore::CryptoAlgorithmParameters::ENUM_CLASS):
18         (WebCore::CryptoAlgorithmParameters::parametersClass):
19         * crypto/CryptoKey.h:
20         * crypto/CryptoKeyData.h:
21         * crypto/CryptoKeySerialization.h:
22         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
23         (WebCore::CryptoAlgorithmAES_CBC::generateKey):
24         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
25         (WebCore::CryptoAlgorithmHMAC::generateKey):
26         (WebCore::CryptoAlgorithmHMAC::importKey):
27         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
28         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
29         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
30         * crypto/keys/CryptoKeyAES.h:
31         * crypto/keys/CryptoKeyDataOctetSequence.h:
32         (WebCore::isCryptoKeyDataOctetSequence):
33         * crypto/keys/CryptoKeyDataRSAComponents.h:
34         (WebCore::isCryptoKeyDataRSAComponents):
35         * crypto/keys/CryptoKeyHMAC.h:
36         * crypto/keys/CryptoKeyRSA.h:
37         * crypto/keys/CryptoKeySerializationRaw.h:
38         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
39         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
40         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
41         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
42         (WebCore::CryptoAlgorithmHMAC::sign):
43         (WebCore::CryptoAlgorithmHMAC::verify):
44         * crypto/parameters/CryptoAlgorithmAesCbcParams.h:
45         * crypto/parameters/CryptoAlgorithmAesKeyGenParams.h:
46         * crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
47         * crypto/parameters/CryptoAlgorithmHmacParams.h:
48         * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h:
49         * crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h:
50         * crypto/parameters/CryptoAlgorithmRsaSsaParams.h:
51
52 2013-11-13  Alexey Proskuryakov  <ap@apple.com>
53
54         crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html is failing on Maverics release bot
55         https://bugs.webkit.org/show_bug.cgi?id=124280
56
57         Reviewed by Anders Carlsson.
58
59         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::buildAlgorithmDescription):
60         Don't be a muppet, initialize your variables.
61
62 2013-11-12  Jer Noble  <jer.noble@apple.com>
63
64         Add support for HTMLMediaElement.fastSeek()
65         https://bugs.webkit.org/show_bug.cgi?id=124262
66
67         Reviewed by Eric Carlson.
68
69         Test: media/video-fast-seek.html
70
71         Add the fastSeek() method to HTMLMediaElement, and use fastSeek() in
72         the JavaScript media controls.
73
74         Add the new fastSeek() method:
75         * html/HTMLMediaElement.cpp:
76         (HTMLMediaElement::fastSeek): Call seekWithTolerance.
77         (HTMLMediaElement::seek): Call seekWithTolerance with 0 tolerance.
78         (HTMLMediaElement::seekWithTolerance): Renamed from seek().
79         * html/HTMLMediaElement.h:
80         * html/HTMLMediaElement.idl:
81
82         Add seekWithTolerance() to MediaPlayer:
83         * platform/graphics/MediaPlayer.cpp:
84         (WebCore::MediaPlayer::seekWithTolerance): Pass to MediaPlayerPrivate.
85         * platform/graphics/MediaPlayer.h:
86         * platform/graphics/MediaPlayerPrivate.h:
87         (WebCore::MediaPlayerPrivateInterface::seekWithTolerance): Default implementation which
88             calls seek().
89         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
90         (WebCore::MediaPlayerPrivateAVFoundation::seek): Call seekWithTolerance with 0 tolerance.
91         (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Renamed from seek().
92         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
93         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
94         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
95         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Take tolerance parameters.
96
97         Use the new fastSeek() method while actively scrubbing.
98         * Modules/mediacontrols/mediaControlsApple.js:
99         (Controller.prototype.createControls): Add mouse up and down handlers.
100         (Controller.prototype.handleTimeUpdate): Only update the timeline when not scrubbing.
101         (Controller.prototype.handleTimelineChange): Use fastSeek().
102         (Controller.prototype.handleTimelineMouseDown): Start scrubbing.
103         (Controller.prototype.handleTimelineMouseUp): Stop scrubbing.
104
105 2013-11-13  Andreas Kling  <akling@apple.com>
106
107         Generate casting helpers for scrolling tree classes.
108         <https://webkit.org/b/124286>
109
110         Added SCROLLING_STATE_NODE_TYPE_CASTS and used it to replace the
111         hand-written toFoo() casts for ScrollingStateNode subclasses.
112
113         Reviewed by Anders Carlsson.
114
115 2013-11-13  Hans Muller  <hmuller@adobe.com>
116
117         [CSS Shapes] Determining if a line is inside of a shape should only happen in one place
118         https://bugs.webkit.org/show_bug.cgi?id=121708
119
120         Reviewed by Andreas Kling.
121
122         The ShapeInfo::lineOverlapsShapeBounds() methods now delegate to the Shape object. The
123         logic for the Shape overlap test is now the same for ShapeInsideInfo and ShapeOutsideInfo.
124
125         No new tests, this is just a refactoring of existing code.
126
127         * rendering/shapes/Shape.h:
128         (WebCore::Shape::lineOverlapsShapeMarginBounds): Apply lineOverlapsLayoutRect() to the shape-margin bounds LayoutRect.
129         (WebCore::Shape::lineOverlapsShapePaddingBounds): Apply lineOverlapsLayoutRect() to the shape-padding bounds LayoutRect.
130         (WebCore::Shape::lineOverlapsLayoutRect): The common code for checking if a line and a LayoutRect overlap.
131         * rendering/shapes/ShapeInsideInfo.h: Use lineOverlapsShapePaddingBounds() for lineOverlapShapeBounds().
132         * rendering/shapes/ShapeOutsideInfo.h: Use lineOverlapsShapeMarginBounds() for lineOverlapShapeBounds().
133
134 2013-11-13  Jochen Eisinger  <jochen@chromium.org>
135
136         Restrict UserGestureIndicator to main thread
137         https://bugs.webkit.org/show_bug.cgi?id=124277
138
139         Reviewed by Andreas Kling.
140
141         Certain classes that interact with UserGestureIndicators, e.g.
142         the DOMTimer, can also live on worker threads. Since a
143         background thread cannot possible get a user gesture in the
144         first place, and to avoid races, we turn a UserGestureIndicator
145         on a background thread into a no-op.
146
147         * dom/UserGestureIndicator.cpp:
148         (WebCore::UserGestureIndicator::UserGestureIndicator):
149         (WebCore::UserGestureIndicator::~UserGestureIndicator):
150         (WebCore::UserGestureIndicator::processingUserGesture):
151         * dom/UserGestureIndicator.h:
152
153 2013-11-13  Antti Koivisto  <antti@apple.com>
154
155         Factor simple line creation loop to function
156         https://bugs.webkit.org/show_bug.cgi?id=124279
157
158         Reviewed by Andreas Kling.
159
160         * rendering/SimpleLineLayout.cpp:
161         (WebCore::SimpleLineLayout::Style::Style):
162         
163             Capture style that affects line layout to a struct.
164
165         (WebCore::SimpleLineLayout::textWidth):
166         (WebCore::SimpleLineLayout::measureWord):
167         (WebCore::SimpleLineLayout::createLineRuns):
168         
169             Factor the line loop here.
170
171         (WebCore::SimpleLineLayout::createTextRuns):
172
173 2013-11-12  Antti Koivisto  <antti@apple.com>
174
175         Support overflow-wrap:break-word on simple line path
176         https://bugs.webkit.org/show_bug.cgi?id=124206
177
178         Reviewed by Andreas Kling.
179
180         Pure text documents are rendered with break-word. It is also common in discussion board type sites.
181         
182         This also makes many <textarea>'s rendered using the simple line path.
183
184         Tests: fast/forms/basic-textareas-quirks-simple-lines.html
185                fast/forms/linebox-overflow-in-textarea-padding-simple-lines.html
186                fast/forms/negativeLineHeight-simple-lines.html
187                fast/forms/textAreaLineHeight-simple-lines.html
188
189         * rendering/RenderBlock.cpp:
190         (WebCore::RenderBlock::updateShapeInsideInfoAfterStyleChange):
191         (WebCore::RenderBlock::markShapeInsideDescendantsForLayout):
192         
193             Invalidate the cached line layout mode on shape-inside style change.
194
195         * rendering/SimpleLineLayout.cpp:
196         (WebCore::SimpleLineLayout::canUseForText):
197         (WebCore::SimpleLineLayout::canUseFor):
198         (WebCore::SimpleLineLayout::createTextRuns):
199
200 2013-11-13  Andreas Kling  <akling@apple.com>
201
202         Turn some not-so-rare ElementRareData bits into Node flags.
203         <https://webkit.org/b/124275>
204
205         The following 4 bits seem to be the most commonly set:
206
207         - childrenAffectedByHover()
208         - childrenAffectedByFirstChildRules()
209         - childrenAffectedByLastChildRules()
210         - childrenAffectedByDirectAdjacentRules()
211
212         Turning them into Node flags means we don't have to allocate full
213         ElementRareData object in many cases. I also took this opportunity
214         to make Node's flag twiddling functions available to subclasses.
215
216         1.38 MB progression on HTML5-8266 locally.
217
218         Reviewed by Antti Koivisto.
219
220 2013-11-13  Tibor Meszaros  <mtibor@inf.u-szeged.hu>
221
222         Cleanup the build from unused parameters in WebCore
223         https://bugs.webkit.org/show_bug.cgi?id=124199.
224
225         Reviewed by Csaba Osztrogonác.
226
227         * css/CSSCursorImageValue.cpp:
228         (WebCore::CSSCursorImageValue::cachedOrPendingImage):
229         * dom/Document.cpp:
230         (WebCore::Document::scriptedAnimationControllerSetThrottled):
231         * fileapi/ThreadableBlobRegistry.cpp:
232         (WebCore::ThreadableBlobRegistry::registerBlobURL):
233         * html/HTMLAnchorElement.cpp:
234         (WebCore::shouldProhibitLinks):
235         * html/parser/XSSAuditor.cpp:
236         (WebCore::isSemicolonSeparatedAttribute):
237         * inspector/InspectorConsoleInstrumentation.h:
238         (WebCore::InspectorInstrumentation::addMessageToConsole):
239         * loader/DocumentThreadableLoader.cpp:
240         (WebCore::DocumentThreadableLoader::didReceiveData):
241         (WebCore::DocumentThreadableLoader::didFail):
242         (WebCore::DocumentThreadableLoader::preflightFailure):
243         * loader/cache/CachedImage.cpp:
244         (WebCore::CachedImage::imageSizeForRenderer):
245         * page/animation/ImplicitAnimation.cpp:
246         (WebCore::ImplicitAnimation::animate):
247         * page/animation/KeyframeAnimation.cpp:
248         (WebCore::KeyframeAnimation::animate):
249         * platform/graphics/WidthIterator.cpp:
250         (WebCore::applyFontTransforms):
251         * rendering/RenderView.cpp:
252         (WebCore::RenderView::setIsInWindow):
253         * rendering/style/RenderStyle.cpp:
254         (WebCore::RenderStyle::changeRequiresLayout):
255         (WebCore::RenderStyle::changeRequiresLayerRepaint):
256         (WebCore::RenderStyle::changeRequiresRecompositeLayer):
257         * testing/Internals.cpp:
258         (WebCore::Internals::setHeaderHeight):
259         (WebCore::Internals::setCaptionsStyleSheetOverride):
260
261 2013-11-13  Andreas Kling  <akling@apple.com>
262
263         Refalize CSSCursorImageValue.
264         <https://webkit.org/b/124272>
265
266         Make CSSCursorImageValue constructor return a PassRef, and have it
267         take the image CSSValue as a PassRef (and store it internally in a
268         Ref<CSSValue>.)
269
270         Had to add a Ref version of compareCSSValuePtr() to make this work.
271
272         Reviewed by Antti Koivisto.
273
274 2013-11-13  Andreas Kling  <akling@apple.com>
275
276         RenderTableSection: Cell structures don't need allocation padding.
277         <https://webkit.org/b/124263>
278
279         The row structure data gets shrunk-to-fit once we get to layout,
280         but per-row cell structures get no such luxury. Fortuntely we know
281         ahead of time how many cells a row needs to accomodate, so we can
282         just use Vector::resizeToFit() instead of Vector::grow().
283
284         1.25 MB progression on HTML5-8266 locally.
285
286         Reviewed by Antti Koivisto.
287
288 2013-11-13  Andreas Kling  <akling@apple.com>
289
290         Avoid unnecessarily padding the FontDescription families vector.
291         <https://webkit.org/b/124267>
292
293         Use a bit of reserveInitialCapacity+uncheckedAppend grease to avoid
294         jumping all the way to capacity=16 when a style has more than just
295         a single font-family in it.
296
297         130 kB progression on HTML5-8266 locally.
298
299         Reviewed by Antti Koivisto.
300
301         * css/DeprecatedStyleBuilder.cpp:
302         (WebCore::ApplyPropertyFontFamily::applyValue):
303
304 2013-11-13  Andreas Kling  <akling@apple.com>
305
306         Make remaining CSSPrimitiveValue constructors return PassRef.
307         <https://webkit.org/b/124270>
308
309         ..and same with the corresponding CSSValuePool functions.
310
311         Reviewed by Antti Koivisto.
312
313 2013-11-13  Alexey Proskuryakov  <ap@apple.com>
314
315         Implement key generation and JWK import for RSASSA-PKCS1-v1_5
316         https://bugs.webkit.org/show_bug.cgi?id=124236
317
318         Reviewed by Sam Weinig.
319
320         Tests: crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html
321                crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html
322
323         * WebCore.xcodeproj/project.pbxproj: Added new files.
324
325         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
326         (WebCore::JSCryptoAlgorithmBuilder::add):
327         * bindings/js/JSCryptoAlgorithmBuilder.h:
328         * crypto/CryptoAlgorithmDescriptionBuilder.h:
329         Added a way to add an Uint8Array, as needed for RSA key.algorithm.publicExponent.
330
331         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
332         (WebCore::createAesCbcParams): Removed unneeded JSC prefixes.
333         (WebCore::createAesKeyGenParams): Ditto.
334         (WebCore::createHmacParams): Ditto.
335         (WebCore::createHmacKeyParams): Ditto.
336         (WebCore::createRsaKeyGenParams): Added. 
337         (WebCore::createRsaSsaKeyParams): Added. WebCrypto currently doesn't specify any
338         parameters for importKey, so the structure remains blank (unlike with JWK).
339         (WebCore::createRsaSsaParams): Added (currently unused, will be sued for sign/verify soon).
340         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): Removed unneeded JSC prefixes.
341         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): Ditto.
342         (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign): Added support for RSAES_PKCS1_v1_5.
343         (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify): Ditto.
344         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest): Removed unneeded JSC prefixes.
345         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Ditto.
346         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey): Ditto.
347         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits): Ditto.
348         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Added support for RSAES_PKCS1_v1_5.
349         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): Removed unneeded JSC prefixes.
350         (WebCore::JSCryptoAlgorithmDictionary::createParametersForWrapKey): Ditto.
351         (WebCore::JSCryptoAlgorithmDictionary::createParametersForUnwrapKey): Ditto.
352
353         * bindings/js/JSCryptoKeySerializationJWK.h:
354         * bindings/js/JSCryptoKeySerializationJWK.cpp:
355         (WebCore::getJSArrayFromJSON): Added.
356         (WebCore::getBigIntegerVectorFromJSON): Added.
357         (WebCore::createRSASSAKeyParameters): Create parameters for key import. The key
358         will remember which algorithm it's allowed to be used with.
359         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): Added support for
360         RS256...RS512 (tha is, RSAES_PKCS1_v1_5 with SHA-256...SHA-512).
361         (WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence): Split out of keyData().
362         (WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents): Added code to read
363         RSA key components from JWK.
364         (WebCore::JSCryptoKeySerializationJWK::keyData): Call one of the above functions.
365
366         * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Added.
367         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
368         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
369         Placeholders.
370
371         * crypto/CryptoKey.h: (WebCore::CryptoKeyClass): Added RSA key class for poor man's RTTI.
372
373         * crypto/CryptoKeyData.h: (WebCore::CryptoKeyData::FormatRSAComponents): Added RSAComponents
374         for poor man's RTTI.
375
376         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: (WebCore::CryptoAlgorithmAES_CBC::importKey): 
377         * crypto/algorithms/CryptoAlgorithmHMAC.cpp: (WebCore::CryptoAlgorithmHMAC::importKey):
378         * crypto/keys/CryptoKeyAES.h:
379         (WebCore::isCryptoKeyAES):
380         (WebCore::toCryptoKeyAES):
381         * crypto/keys/CryptoKeyDataOctetSequence.h:
382         (WebCore::toCryptoKeyDataOctetSequence):
383         * crypto/keys/CryptoKeyHMAC.h:
384         (WebCore::isCryptoKeyHMAC):
385         (WebCore::toCryptoKeyHMAC):
386         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
387         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
388         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
389         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
390         (WebCore::CryptoAlgorithmHMAC::sign):
391         (WebCore::CryptoAlgorithmHMAC::verify):
392         Switched from "as" functions to "is" and "to" ones, as that's more idiomatic.
393
394         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: Added.
395         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: Added.
396         Glue code for importKey/generateKey for now.
397
398         * crypto/keys/CryptoKeyDataRSAComponents.cpp: Added.
399         (WebCore::CryptoKeyDataRSAComponents::CryptoKeyDataRSAComponents):
400         (WebCore::CryptoKeyDataRSAComponents::~CryptoKeyDataRSAComponents):
401         * crypto/keys/CryptoKeyDataRSAComponents.h: Added.
402         (WebCore::toCryptoKeyDataRSAComponents):
403         Added a structure to hold RSA key components, extracted from JWK or another format.
404
405         * crypto/keys/CryptoKeyRSA.h: Added.
406         * crypto/mac/CryptoKeyRSAMac.cpp: Added.
407
408         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
409         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
410         Register RSASSA_PKCS1_v1_5.
411
412         * crypto/parameters/CryptoAlgorithmHmacKeyParams.h: Added a constructor to make
413         sure that hasLength is never left uninitialized, even when reading formats that
414         don't contain a length.
415
416         * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h: Added.
417         * crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Added.
418         * crypto/parameters/CryptoAlgorithmRsaSsaParams.h: Added.
419         Added parameter structures that are needed for RSASSA_PKCS1_v1_5.
420
421 2013-11-12  Alexey Proskuryakov  <ap@apple.com>
422
423         Disable WebCrypto on Mountain Lion
424         https://bugs.webkit.org/show_bug.cgi?id=124261
425
426         Rubber-stamped by Sam Weinig.
427
428         * Configurations/FeatureDefines.xcconfig:
429
430 2013-11-12  Zan Dobersek  <zdobersek@igalia.com>
431
432         Manage XMLHttpRequestUpload, XSLImportRule, XMLErrors, XML pending callback classes through std::unique_ptr
433         https://bugs.webkit.org/show_bug.cgi?id=124224
434
435         Reviewed by Anders Carlsson.
436
437         Use std::unique_ptr to handle objects of various XML classes that were previously managed by OwnPtr.
438         This removes usage of OwnPtr and PassOwnPtr under Source/WebCore/xml/.
439
440         * xml/XMLHttpRequest.cpp:
441         (WebCore::XMLHttpRequest::upload):
442         * xml/XMLHttpRequest.h:
443         * xml/XMLHttpRequestUpload.h:
444         * xml/XSLImportRule.h:
445         * xml/XSLStyleSheet.h:
446         * xml/XSLStyleSheetLibxslt.cpp:
447         (WebCore::XSLStyleSheet::loadChildSheet):
448         * xml/parser/XMLDocumentParser.cpp:
449         (WebCore::XMLDocumentParser::handleError):
450         * xml/parser/XMLDocumentParser.h:
451         * xml/parser/XMLDocumentParserLibxml2.cpp:
452         (WebCore::PendingCallbacks::PendingCallbacks):
453         (WebCore::PendingCallbacks::appendStartElementNSCallback):
454         (WebCore::PendingCallbacks::appendEndElementNSCallback):
455         (WebCore::PendingCallbacks::appendCharactersCallback):
456         (WebCore::PendingCallbacks::appendProcessingInstructionCallback):
457         (WebCore::PendingCallbacks::appendCDATABlockCallback):
458         (WebCore::PendingCallbacks::appendCommentCallback):
459         (WebCore::PendingCallbacks::appendInternalSubsetCallback):
460         (WebCore::PendingCallbacks::appendErrorCallback):
461         (WebCore::PendingCallbacks::callAndRemoveFirstCallback):
462         (WebCore::XMLDocumentParser::XMLDocumentParser):
463
464 2013-11-12  Brady Eidson  <beidson@apple.com>
465
466         Move basic IDBBackingStoreTransaction operations to IDBServerConnection
467         https://bugs.webkit.org/show_bug.cgi?id=124244
468
469         Reviewed by Tim Horton (and unofficially Anders Carlsson).
470
471         This patch:
472         - Makes IDBBackingStore the owner of an IDBBackingStoreTransaction.
473         - Adds the integer transaction ID to IDBBackingStoreTransaction for reference.
474         - Removes IDBTransactionBackend’s reliance on IDBBackingStoreTransaction by moving
475           necessary methods to IDBServerConnection.
476         - Renames the IDBTransactionBackend::backingStoreTransaction() accessor to
477           deprecatedBackingStoreTransaction to make it clear it’s on the way out.
478
479         * Modules/indexeddb/IDBBackingStoreInterface.h:
480
481         * Modules/indexeddb/IDBDatabaseBackend.cpp:
482         (WebCore::IDBDatabaseBackend::setIndexKeys):
483
484         * Modules/indexeddb/IDBServerConnection.h:
485
486         * Modules/indexeddb/IDBTransactionBackend.cpp:
487         (WebCore::IDBTransactionBackend::IDBTransactionBackend):
488         (WebCore::IDBTransactionBackend::~IDBTransactionBackend):
489         (WebCore::IDBTransactionBackend::deprecatedBackingStoreTransaction):
490         (WebCore::IDBTransactionBackend::scheduleTask):
491         (WebCore::IDBTransactionBackend::abort):
492         (WebCore::IDBTransactionBackend::commit):
493         (WebCore::IDBTransactionBackend::taskTimerFired):
494         * Modules/indexeddb/IDBTransactionBackend.h:
495
496         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
497         (WebCore::CreateObjectStoreOperation::perform):
498         (WebCore::CreateIndexOperation::perform):
499         (WebCore::DeleteIndexOperation::perform):
500         (WebCore::GetOperation::perform):
501         (WebCore::PutOperation::perform):
502         (WebCore::OpenCursorOperation::perform):
503         (WebCore::CountOperation::perform):
504         (WebCore::DeleteRangeOperation::perform):
505         (WebCore::ClearOperation::perform):
506         (WebCore::DeleteObjectStoreOperation::perform):
507         (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
508
509         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
510         (WebCore::IDBBackingStoreLevelDB::makeIndexWriters):
511         (WebCore::IDBBackingStoreLevelDB::generateKey):
512         (WebCore::IDBBackingStoreLevelDB::updateKeyGenerator):
513         (WebCore::IDBBackingStoreLevelDB::establishBackingStoreTransaction):
514         (WebCore::IDBBackingStoreLevelDB::deprecatedBackingStoreTransaction):
515         (WebCore::IDBBackingStoreLevelDB::removeBackingStoreTransaction):
516         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
517
518         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp:
519         (WebCore::IDBBackingStoreTransactionLevelDB::IDBBackingStoreTransactionLevelDB):
520         (WebCore::IDBBackingStoreTransactionLevelDB::~IDBBackingStoreTransactionLevelDB):
521         (WebCore::IDBBackingStoreTransactionLevelDB::resetTransaction):
522         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
523
524         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
525         (WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
526         (WebCore::IDBServerConnectionLevelDB::deprecatedBackingStoreTransaction):
527         (WebCore::IDBServerConnectionLevelDB::openTransaction):
528         (WebCore::IDBServerConnectionLevelDB::beginTransaction):
529         (WebCore::IDBServerConnectionLevelDB::commitTransaction):
530         (WebCore::IDBServerConnectionLevelDB::resetTransaction):
531         (WebCore::IDBServerConnectionLevelDB::rollbackTransaction):
532         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:
533
534 2013-11-12  Andy Estes  <aestes@apple.com>
535
536         Fix the Mountain Lion build after r159171.
537
538         * platform/mac/HTMLConverter.mm:
539         (_dateForString): +[NSCalendar calendarWithIdentifier:] only exists on
540         10.9. Use -[NSCalendar initWithIdentifier:] instead.
541
542 2013-11-12  Andy Estes  <aestes@apple.com>
543
544         [Mac] Fix some deprecation warnings
545         https://bugs.webkit.org/show_bug.cgi?id=124252
546
547         Reviewed by Mark Rowe.
548
549         * loader/archive/cf/LegacyWebArchive.cpp:
550         (WebCore::LegacyWebArchive::create): Use CFPropertyListCreateWithData()
551         instead of CFPropertyListCreateFromXMLData().
552         (WebCore::LegacyWebArchive::rawDataRepresentation): Use
553         CFPropertyListWrite() instead of CFPropertyListWriteToStream().
554         * platform/mac/HTMLConverter.mm:
555         (_dateForString): Rewrite this method in terms of NSDateComponents and
556         NSCalendar instead of using CFGregorianDate.
557
558 2013-11-12  Commit Queue  <commit-queue@webkit.org>
559
560         Unreviewed, rolling out r159160, r159161, and r159164.
561         http://trac.webkit.org/changeset/159160
562         http://trac.webkit.org/changeset/159161
563         http://trac.webkit.org/changeset/159164
564         https://bugs.webkit.org/show_bug.cgi?id=124253
565
566         Too many errors (make fewer) (Requested by ap on #webkit).
567
568         * WebCore.xcodeproj/project.pbxproj:
569         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
570         * bindings/js/JSCryptoAlgorithmBuilder.h:
571         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
572         (WebCore::createAesCbcParams):
573         (WebCore::createAesKeyGenParams):
574         (WebCore::createHmacParams):
575         (WebCore::createHmacKeyParams):
576         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
577         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
578         (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
579         (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
580         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
581         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
582         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
583         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
584         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
585         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):
586         (WebCore::JSCryptoAlgorithmDictionary::createParametersForWrapKey):
587         (WebCore::JSCryptoAlgorithmDictionary::createParametersForUnwrapKey):
588         * bindings/js/JSCryptoKeySerializationJWK.cpp:
589         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm):
590         (WebCore::JSCryptoKeySerializationJWK::keyData):
591         * bindings/js/JSCryptoKeySerializationJWK.h:
592         * crypto/CryptoAlgorithmDescriptionBuilder.h:
593         * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Removed.
594         * crypto/CryptoKey.h:
595         (WebCore::ENUM_CLASS):
596         * crypto/CryptoKeyData.h:
597         (WebCore::CryptoKeyData::ENUM_CLASS):
598         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
599         (WebCore::CryptoAlgorithmAES_CBC::importKey):
600         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
601         (WebCore::CryptoAlgorithmHMAC::importKey):
602         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: Removed.
603         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: Removed.
604         * crypto/keys/CryptoKeyAES.h:
605         (WebCore::asCryptoKeyAES):
606         * crypto/keys/CryptoKeyDataOctetSequence.h:
607         (WebCore::asCryptoKeyDataOctetSequence):
608         * crypto/keys/CryptoKeyDataRSAComponents.cpp: Removed.
609         * crypto/keys/CryptoKeyDataRSAComponents.h: Removed.
610         * crypto/keys/CryptoKeyHMAC.h:
611         (WebCore::asCryptoKeyHMAC):
612         * crypto/keys/CryptoKeyRSA.h: Removed.
613         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
614         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
615         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
616         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
617         (WebCore::CryptoAlgorithmHMAC::sign):
618         (WebCore::CryptoAlgorithmHMAC::verify):
619         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
620         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
621         * crypto/mac/CryptoKeyRSAMac.cpp: Removed.
622         * crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
623         * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h: Removed.
624         * crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Removed.
625         * crypto/parameters/CryptoAlgorithmRsaSsaParams.h: Removed.
626
627 2013-11-12  Bem Jones-Bey  <bjonesbe@adobe.com>
628
629         Make the placed floats tree use LayoutUnit instead of int
630         https://bugs.webkit.org/show_bug.cgi?id=124207
631
632         Reviewed by Alexandru Chiculita.
633
634         The dimensions of floats are in LayoutUnits, so it doesn't make sense
635         to be converting to ints for use in the placed floats tree.
636
637         Also add missed "explicit" to single argument FloatingObjects
638         constructor.
639
640         No new tests, no behavior change.
641
642         * rendering/FloatingObjects.cpp:
643         (WebCore::rangesIntersect):
644         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
645         (WebCore::ComputeFloatOffsetAdapter::lowValue):
646         (WebCore::ComputeFloatOffsetAdapter::highValue):
647         (WebCore::FindNextFloatLogicalBottomAdapter::FindNextFloatLogicalBottomAdapter):
648         (WebCore::FindNextFloatLogicalBottomAdapter::lowValue):
649         (WebCore::FindNextFloatLogicalBottomAdapter::highValue):
650         * rendering/FloatingObjects.h:
651         * rendering/RenderFlowThread.h:
652
653 2013-11-12  Alexey Proskuryakov  <ap@apple.com>
654
655         Implement key generation and JWK import for RSASSA-PKCS1-v1_5
656         https://bugs.webkit.org/show_bug.cgi?id=124236
657
658         Build fix.
659
660         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::buildAlgorithmDescription):
661         ifdef out some code on Mountain Lion. Bug 124249 track fixing this.
662
663 2013-11-12  Joseph Pecoraro  <pecoraro@apple.com>
664
665         Web Inspector: Extract InspectorAgentRegistry from InspectorBaseAgent
666         https://bugs.webkit.org/show_bug.cgi?id=124190
667
668         Reviewed by Timothy Hatcher.
669
670         * CMakeLists.txt:
671         * GNUmakefile.list.am:
672         * WebCore.vcxproj/WebCore.vcxproj:
673         * WebCore.vcxproj/WebCore.vcxproj.filters:
674         * WebCore.xcodeproj/project.pbxproj:
675         * inspector/InspectorAgentRegistry.cpp: Added.
676         (WebCore::InspectorAgentRegistry::append):
677         (WebCore::InspectorAgentRegistry::setFrontend):
678         (WebCore::InspectorAgentRegistry::clearFrontend):
679         (WebCore::InspectorAgentRegistry::registerInDispatcher):
680         (WebCore::InspectorAgentRegistry::discardAgents):
681         * inspector/InspectorAgentRegistry.h: Added.
682         * inspector/InspectorAllInOne.cpp:
683         * inspector/InspectorBaseAgent.cpp: Removed.
684         * inspector/InspectorBaseAgent.h:
685         (WebCore::InspectorBaseAgentInterface::InspectorBaseAgentInterface):
686         (WebCore::InspectorBaseAgentInterface::~InspectorBaseAgentInterface):
687         * inspector/InspectorController.h:
688         * inspector/InspectorMemoryAgent.h:
689         * inspector/WorkerInspectorController.h:
690
691 2013-11-12  Alexey Proskuryakov  <ap@apple.com>
692
693         Implement key generation and JWK import for RSASSA-PKCS1-v1_5
694         https://bugs.webkit.org/show_bug.cgi?id=124236
695
696         Release build fix.
697
698         * bindings/js/JSCryptoAlgorithmBuilder.cpp: Include TypedArrayInlines.h
699
700 2013-11-12  Alexey Proskuryakov  <ap@apple.com>
701
702         Implement key generation and JWK import for RSASSA-PKCS1-v1_5
703         https://bugs.webkit.org/show_bug.cgi?id=124236
704
705         Reviewed by Sam Weinig.
706
707         Tests: crypto/subtle/rsassa-pkcs1-v1_5-generate-key.html
708                crypto/subtle/rsassa-pkcs1-v1_5-import-jwk.html
709
710         * WebCore.xcodeproj/project.pbxproj: Added new files.
711
712         * bindings/js/JSCryptoAlgorithmBuilder.cpp:
713         (WebCore::JSCryptoAlgorithmBuilder::add):
714         * bindings/js/JSCryptoAlgorithmBuilder.h:
715         * crypto/CryptoAlgorithmDescriptionBuilder.h:
716         Added a way to add an Uint8Array, as needed for RSA key.algorithm.publicExponent.
717
718         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
719         (WebCore::createAesCbcParams): Removed unneeded JSC prefixes.
720         (WebCore::createAesKeyGenParams): Ditto.
721         (WebCore::createHmacParams): Ditto.
722         (WebCore::createHmacKeyParams): Ditto.
723         (WebCore::createRsaKeyGenParams): Added. 
724         (WebCore::createRsaSsaKeyParams): Added. WebCrypto currently doesn't specify any
725         parameters for importKey, so the structure remains blank (unlike with JWK).
726         (WebCore::createRsaSsaParams): Added (currently unused, will be sued for sign/verify soon).
727         (WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt): Removed unneeded JSC prefixes.
728         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt): Ditto.
729         (WebCore::JSCryptoAlgorithmDictionary::createParametersForSign): Added support for RSAES_PKCS1_v1_5.
730         (WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify): Ditto.
731         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest): Removed unneeded JSC prefixes.
732         (WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey): Ditto.
733         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey): Ditto.
734         (WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits): Ditto.
735         (WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey): Added support for RSAES_PKCS1_v1_5.
736         (WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey): Removed unneeded JSC prefixes.
737         (WebCore::JSCryptoAlgorithmDictionary::createParametersForWrapKey): Ditto.
738         (WebCore::JSCryptoAlgorithmDictionary::createParametersForUnwrapKey): Ditto.
739
740         * bindings/js/JSCryptoKeySerializationJWK.h:
741         * bindings/js/JSCryptoKeySerializationJWK.cpp:
742         (WebCore::getJSArrayFromJSON): Added.
743         (WebCore::getBigIntegerVectorFromJSON): Added.
744         (WebCore::createRSASSAKeyParameters): Create parameters for key import. The key
745         will remember which algorithm it's allowed to be used with.
746         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): Added support for
747         RS256...RS512 (tha is, RSAES_PKCS1_v1_5 with SHA-256...SHA-512).
748         (WebCore::JSCryptoKeySerializationJWK::keyDataOctetSequence): Split out of keyData().
749         (WebCore::JSCryptoKeySerializationJWK::keyDataRSAComponents): Added code to read
750         RSA key components from JWK.
751         (WebCore::JSCryptoKeySerializationJWK::keyData): Call one of the above functions.
752
753         * crypto/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp: Added.
754         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
755         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
756         Placeholders.
757
758         * crypto/CryptoKey.h: (WebCore::CryptoKeyClass): Added RSA key class for poor man's RTTI.
759
760         * crypto/CryptoKeyData.h: (WebCore::CryptoKeyData::FormatRSAComponents): Added RSAComponents
761         for poor man's RTTI.
762
763         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp: (WebCore::CryptoAlgorithmAES_CBC::importKey): 
764         * crypto/algorithms/CryptoAlgorithmHMAC.cpp: (WebCore::CryptoAlgorithmHMAC::importKey):
765         * crypto/keys/CryptoKeyAES.h:
766         (WebCore::isCryptoKeyAES):
767         (WebCore::toCryptoKeyAES):
768         * crypto/keys/CryptoKeyDataOctetSequence.h:
769         (WebCore::toCryptoKeyDataOctetSequence):
770         * crypto/keys/CryptoKeyHMAC.h:
771         (WebCore::isCryptoKeyHMAC):
772         (WebCore::toCryptoKeyHMAC):
773         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
774         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
775         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
776         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
777         (WebCore::CryptoAlgorithmHMAC::sign):
778         (WebCore::CryptoAlgorithmHMAC::verify):
779         Switched from "as" functions to "is" and "to" ones, as that's more idiomatic.
780
781         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp: Added.
782         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h: Added.
783         Glue code for importKey/generateKey for now.
784
785         * crypto/keys/CryptoKeyDataRSAComponents.cpp: Added.
786         (WebCore::CryptoKeyDataRSAComponents::CryptoKeyDataRSAComponents):
787         (WebCore::CryptoKeyDataRSAComponents::~CryptoKeyDataRSAComponents):
788         * crypto/keys/CryptoKeyDataRSAComponents.h: Added.
789         (WebCore::toCryptoKeyDataRSAComponents):
790         Added a structure to hold RSA key components, extracted from JWK or another format.
791
792         * crypto/keys/CryptoKeyRSA.h: Added.
793         * crypto/mac/CryptoKeyRSAMac.cpp: Added.
794
795         * crypto/mac/CryptoAlgorithmRegistryMac.cpp:
796         (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms):
797         Register RSASSA_PKCS1_v1_5.
798
799         * crypto/parameters/CryptoAlgorithmHmacKeyParams.h: Added a constructor to make
800         sure that hasLength is never left uninitialized, even when reading formats that
801         don't contain a length.
802
803         * crypto/parameters/CryptoAlgorithmRsaKeyGenParams.h: Added.
804         * crypto/parameters/CryptoAlgorithmRsaSsaKeyParams.h: Added.
805         * crypto/parameters/CryptoAlgorithmRsaSsaParams.h: Added.
806         Added parameter structures that are needed for RSASSA_PKCS1_v1_5.
807
808 2013-11-12  Bem Jones-Bey  <bjonesbe@adobe.com>
809
810         Move ValueToString out to its own header file to remove duplication
811         https://bugs.webkit.org/show_bug.cgi?id=124237
812
813         Reviewed by Alexandru Chiculita.
814
815         The ValueToString struct is used in many places for debugging. Move it
816         out to its own header file to remove all the duplicated definitions
817         and make it possible for the specializations to be placed in the
818         header files with the implementation of the classes they print.
819
820         No new tests, no behavior change.
821
822         * GNUmakefile.list.am:
823         * WebCore.xcodeproj/project.pbxproj:
824         * html/HTMLMediaElement.h:
825         * platform/LayoutUnit.h:
826         * platform/PODInterval.h:
827         * platform/PODIntervalTree.h:
828         * platform/PODRedBlackTree.h:
829         * platform/ValueToString.h: Added.
830         * platform/graphics/FloatPolygon.h:
831         * rendering/FloatingObjects.cpp:
832         * rendering/FloatingObjects.h:
833         * rendering/RenderBlock.h:
834         * rendering/RenderBlockFlow.h:
835         * rendering/RenderFlowThread.h:
836
837 2013-11-11  David Hyatt  <hyatt@apple.com>
838
839         Make RenderBlockRareData be in a hashtable instead of being a member variable.
840         https://bugs.webkit.org/show_bug.cgi?id=124056
841
842         Reviewed by Anders Carlsson.
843
844         Right now RenderBlock has 4 bytes taken up by a m_rareData member that is almost
845         never allocated. This is better off in a separate hash, so that RenderBlock can
846         get 4 bytes back.
847         
848         Since RenderBlockFlow's rare data member was recently removed and folded into
849         RenderBlock, we need to undo that change and put the rare data member back in
850         RenderBlockFlow. RenderBlockFlowRareData inheriting from RenderBlockRareData
851         was not a good idea anyway, since RenderBlockFlows also very rarely need the
852         RenderBlockRareData members, and were thus paying a heavier cost when the rare
853         data was created than was necessary.
854  
855         * rendering/RenderBlock.cpp:
856         (WebCore::RenderBlockRareData::RenderBlockRareData):
857         (WebCore::RenderBlock::~RenderBlock):
858         (WebCore::RenderBlock::hasRareData):
859         (WebCore::getRareData):
860         (WebCore::ensureRareData):
861         (WebCore::RenderBlock::ensureShapeInsideInfo):
862         (WebCore::RenderBlock::shapeInsideInfo):
863         (WebCore::RenderBlock::setShapeInsideInfo):
864         (WebCore::RenderBlock::paginationStrut):
865         (WebCore::RenderBlock::pageLogicalOffset):
866         (WebCore::RenderBlock::setPaginationStrut):
867         (WebCore::RenderBlock::setPageLogicalOffset):
868         * rendering/RenderBlock.h:
869         * rendering/RenderBlockFlow.cpp:
870         (WebCore::RenderBlockFlow::setMaxMarginBeforeValues):
871         (WebCore::RenderBlockFlow::setMaxMarginAfterValues):
872         (WebCore::RenderBlockFlow::setMustDiscardMarginBefore):
873         (WebCore::RenderBlockFlow::setMustDiscardMarginAfter):
874         (WebCore::RenderBlockFlow::mustDiscardMarginBefore):
875         (WebCore::RenderBlockFlow::mustDiscardMarginAfter):
876         (WebCore::RenderBlockFlow::setBreakAtLineToAvoidWidow):
877         (WebCore::RenderBlockFlow::setDidBreakAtLineToAvoidWidow):
878         (WebCore::RenderBlockFlow::clearDidBreakAtLineToAvoidWidow):
879         (WebCore::RenderBlockFlow::clearShouldBreakAtLineToAvoidWidow):
880         (WebCore::RenderBlockFlow::setRenderNamedFlowFragment):
881         (WebCore::RenderBlockFlow::ensureRareBlockFlowData):
882         (WebCore::RenderBlockFlow::materializeRareBlockFlowData):
883         * rendering/RenderBlockFlow.h:
884         (WebCore::RenderBlockFlow::shouldBreakAtLineToAvoidWidow):
885         (WebCore::RenderBlockFlow::lineBreakToAvoidWidow):
886         (WebCore::RenderBlockFlow::didBreakAtLineToAvoidWidow):
887         (WebCore::RenderBlockFlow::lineGridBox):
888         (WebCore::RenderBlockFlow::setLineGridBox):
889         (WebCore::RenderBlockFlow::renderNamedFlowFragment):
890         (WebCore::RenderBlockFlow::maxPositiveMarginBefore):
891         (WebCore::RenderBlockFlow::maxNegativeMarginBefore):
892         (WebCore::RenderBlockFlow::maxPositiveMarginAfter):
893         (WebCore::RenderBlockFlow::maxNegativeMarginAfter):
894         (WebCore::RenderBlockFlow::initMaxMarginValues):
895         (WebCore::RenderBlockFlow::hasRareBlockFlowData):
896         (WebCore::RenderBlockFlow::rareBlockFlowData):
897
898 2013-11-12  Alex Christensen  <achristensen@webkit.org>
899
900         Build GStreamer files on Windows.
901         https://bugs.webkit.org/show_bug.cgi?id=124180
902
903         Reviewed by Brent Fulgham.
904
905         * WebCore.vcxproj/WebCore.vcxproj:
906         * WebCore.vcxproj/WebCore.vcxproj.filters:
907         * WebCore.vcxproj/copyForwardingHeaders.cmd:
908         Include gstreamer files in WinCairo build.
909
910 2013-11-12  Brady Eidson  <beidson@apple.com>
911
912         Introduce IDBServerConnection (and start moving things to it).
913         https://bugs.webkit.org/show_bug.cgi?id=124193
914
915         Reviewed by Alexey Proskuryakov.
916
917         IDBServerConnection will be a purely asynchronous interface for database connections, transactions, and cursors.
918         Its interface will be 100% asynchronous and callback based - Perfect for an IPC divide.
919         Eventually none of the IDB<Foo>Backend classes will need IDBBackingStore<Foo> classes at all, 
920         and they’ll all use IDBServerConnection directly.
921
922         * CMakeLists.txt:
923         * GNUmakefile.list.am:
924         * WebCore.xcodeproj/project.pbxproj:
925
926         * Modules/indexeddb/IDBServerConnection.h: Added.
927         (WebCore::IDBServerConnection::~IDBServerConnection):
928
929         Concrete implementation that - for now - wraps an IDBBackingStoreLevelDB:
930         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp: Added.
931         (WebCore::IDBServerConnectionLevelDB::IDBServerConnectionLevelDB):
932         (WebCore::IDBServerConnectionLevelDB::deprecatedBackingStore):
933         (WebCore::IDBServerConnectionLevelDB::isClosed):
934         (WebCore::IDBServerConnectionLevelDB::getOrEstablishIDBDatabaseMetadata):
935         (WebCore::IDBServerConnectionLevelDB::deleteDatabase):
936         (WebCore::IDBServerConnectionLevelDB::close):
937         * Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h: Added.
938
939         LevelDB created databases get LevelDB server connections:
940         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
941         (WebCore::IDBFactoryBackendLevelDB::deleteDatabase):
942         (WebCore::IDBFactoryBackendLevelDB::open):
943
944         Replace most uses of IDBBackingStore with server connection:
945         * Modules/indexeddb/IDBDatabaseBackend.cpp:
946         (WebCore::IDBDatabaseBackend::create):
947         (WebCore::IDBDatabaseBackend::IDBDatabaseBackend):
948         (WebCore::IDBDatabaseBackend::openInternalAsync):
949         (WebCore::IDBDatabaseBackend::setIndexKeys):
950         (WebCore::IDBDatabaseBackend::openConnectionInternal):
951         (WebCore::IDBDatabaseBackend::deleteDatabaseAsync):
952         (WebCore::IDBDatabaseBackend::close):
953         * Modules/indexeddb/IDBDatabaseBackend.h:
954         (WebCore::IDBDatabaseBackend::serverConnection):
955
956         Change all the operations to access their DatabaseBackend’s server connection instead
957         if hanging on to a backing store directly:
958         * Modules/indexeddb/IDBTransactionBackend.cpp:
959         (WebCore::IDBTransactionBackend::IDBTransactionBackend):
960         (WebCore::IDBTransactionBackend::scheduleCreateObjectStoreOperation):
961         (WebCore::IDBTransactionBackend::scheduleDeleteObjectStoreOperation):
962         (WebCore::IDBTransactionBackend::scheduleCreateIndexOperation):
963         (WebCore::IDBTransactionBackend::scheduleDeleteIndexOperation):
964         (WebCore::IDBTransactionBackend::scheduleGetOperation):
965         (WebCore::IDBTransactionBackend::schedulePutOperation):
966         (WebCore::IDBTransactionBackend::scheduleOpenCursorOperation):
967         (WebCore::IDBTransactionBackend::scheduleCountOperation):
968         (WebCore::IDBTransactionBackend::scheduleDeleteRangeOperation):
969         (WebCore::IDBTransactionBackend::scheduleClearOperation):
970         * Modules/indexeddb/IDBTransactionBackend.h:
971
972         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
973         (WebCore::CreateObjectStoreOperation::perform):
974         (WebCore::CreateIndexOperation::perform):
975         (WebCore::DeleteIndexOperation::perform):
976         (WebCore::GetOperation::perform):
977         (WebCore::PutOperation::perform):
978         (WebCore::OpenCursorOperation::perform):
979         (WebCore::CountOperation::perform):
980         (WebCore::DeleteRangeOperation::perform):
981         (WebCore::ClearOperation::perform):
982         (WebCore::DeleteObjectStoreOperation::perform):
983         (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
984         * Modules/indexeddb/IDBTransactionBackendOperations.h:
985         (WebCore::CreateObjectStoreOperation::create):
986         (WebCore::CreateObjectStoreOperation::CreateObjectStoreOperation):
987         (WebCore::DeleteObjectStoreOperation::create):
988         (WebCore::DeleteObjectStoreOperation::DeleteObjectStoreOperation):
989         (WebCore::CreateIndexOperation::create):
990         (WebCore::CreateIndexOperation::CreateIndexOperation):
991         (WebCore::DeleteIndexOperation::create):
992         (WebCore::DeleteIndexOperation::DeleteIndexOperation):
993         (WebCore::GetOperation::create):
994         (WebCore::GetOperation::GetOperation):
995         (WebCore::PutOperation::create):
996         (WebCore::PutOperation::PutOperation):
997         (WebCore::OpenCursorOperation::create):
998         (WebCore::OpenCursorOperation::OpenCursorOperation):
999         (WebCore::CountOperation::create):
1000         (WebCore::CountOperation::CountOperation):
1001         (WebCore::DeleteRangeOperation::create):
1002         (WebCore::DeleteRangeOperation::DeleteRangeOperation):
1003         (WebCore::ClearOperation::create):
1004         (WebCore::ClearOperation::ClearOperation):
1005         * Modules/indexeddb/IDBTransactionCoordinator.h:
1006
1007 2013-11-12  Brent Fulgham  <bfulgham@apple.com>
1008
1009         [Win] Unreviewed gardening.
1010
1011         * WebCore.vcxproj/WebCore.vcxproj.filters: Correct filter file so that source
1012         files show up in their proper directories in Visual Studio.
1013
1014 2013-11-12  Alex Christensen  <achristensen@webkit.org>
1015
1016         [WinCairo] Preparation for ENABLE(VIDEO).
1017         https://bugs.webkit.org/show_bug.cgi?id=57420
1018
1019         Reviewed by Martin Robinson.
1020
1021         * platform/FileSystem.h:
1022         * platform/graphics/MediaPlayer.cpp:
1023         * rendering/RenderMediaControls.cpp:
1024         * rendering/RenderThemeWin.cpp:
1025         (WebCore::RenderThemeWin::adjustSliderThumbSize):
1026         Separated CG code from GStreamer code.
1027
1028 2013-11-12  Tibor Meszaros  <mtibor@inf.u-szeged.hu>
1029
1030         Fix reported build warnings for GTK
1031         https://bugs.webkit.org/show_bug.cgi?id=123439
1032
1033         Reviewed by Carlos Garcia Campos.
1034
1035         There was a void method, that has return value in it's documentation, so I removed it.
1036
1037         * bindings/gobject/WebKitDOMCustom.h:
1038
1039 2013-11-12  Zan Dobersek  <zdobersek@igalia.com>
1040
1041         Manage StorageThread through std::unique_ptr
1042         https://bugs.webkit.org/show_bug.cgi?id=124197
1043
1044         Reviewed by Anders Carlsson.
1045
1046         New StorageThread objects are crafted through std::make_unique. This removes the need for the static
1047         StorageThread::create() method but requires that the StorageThread constructor is made public.
1048
1049         * storage/StorageSyncManager.cpp:
1050         (WebCore::StorageSyncManager::StorageSyncManager):
1051         * storage/StorageSyncManager.h:
1052         * storage/StorageThread.cpp:
1053         * storage/StorageThread.h:
1054         * storage/StorageTracker.cpp:
1055         (WebCore::StorageTracker::StorageTracker):
1056         * storage/StorageTracker.h:
1057
1058 2013-11-12  Zan Dobersek  <zdobersek@igalia.com>
1059
1060         Remove unnecessary PassOwnPtr.h header includes under Source/WebCore/fileapi
1061         https://bugs.webkit.org/show_bug.cgi?id=124196
1062
1063         Reviewed by Anders Carlsson.
1064
1065         PassOwnPtr is not used anywhere under Source/WebCore/fileapi/, so PassOwnPtr.h inclusions can be removed.
1066
1067         * fileapi/Blob.h:
1068         * fileapi/FileThread.h:
1069         * fileapi/FileThreadTask.h:
1070
1071 2013-11-12  Antti Koivisto  <antti@apple.com>
1072
1073         Text on simple lines sometimes paints one pixel off
1074         https://bugs.webkit.org/show_bug.cgi?id=124200
1075
1076         Reviewed by Andreas Kling.
1077
1078         Test: fast/text/line-runs-simple-lines.html
1079
1080         * rendering/SimpleLineLayout.cpp:
1081         (WebCore::SimpleLineLayout::adjustRunOffsets):
1082         
1083             Don't round on run construction time.
1084
1085         (WebCore::SimpleLineLayout::createTextRuns):
1086         * rendering/SimpleLineLayoutResolver.h:
1087         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
1088         
1089             Instead round when generating rects.
1090
1091         (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
1092         
1093             Provide the baseline (used by painting) as unrounded FloatPoint.
1094
1095 2013-11-11  Andreas Kling  <akling@apple.com>
1096
1097         Elements with class names automatically get unique ElementData.
1098         <https://webkit.org/b/124184>
1099
1100         We were calling Element::ensureUniqueElementData() for all Elements
1101         with a non-empty list of class names. Doing that on parser-fresh
1102         Elements caused us to upgrade them to UniqueElementData despite not
1103         needing it (ElementData::setClass() is a const function for caching
1104         the "cooked" class and can be called on ShareableElementData.)
1105
1106         1.09 MB progression on HTML5 spec at <http://whatwg.org/c>
1107
1108         Reviewed by Antti Koivisto.
1109
1110 2013-11-12  Zan Dobersek  <zdobersek@igalia.com>
1111
1112         JSC bindings generator should generate deletable JSC functions
1113         https://bugs.webkit.org/show_bug.cgi?id=122422
1114
1115         Reviewed by Geoffrey Garen.
1116
1117         The JSC functions that the JSC bindings generator generates should be deletable to conform to
1118         the WebIDL specification, which instructs that the WebIDL operations must be configurable (which
1119         translates to the JSC functions being deletable).
1120
1121         The generator will still produce a non-deletable JSC function for operations under almost all
1122         Web-facing interfaces since they're annotated with the OperationsNotDeletable attribute. The
1123         exception here is the Node interface that is having the attribute removed, with the provided
1124         test case testing that all the functions on the Node prototype object are writable, enumerable
1125         and configurable. This behavior conforms to the WebIDL specification and the behaviors of IE
1126         and Firefox. Chrome at the moment still provides non-configurable functions.
1127
1128         Test: fast/dom/webidl-operations-on-node-prototype.html
1129
1130         * bindings/scripts/CodeGeneratorJS.pm:
1131         (GenerateImplementation): Enforce the non-deletable behavior of the JSC function if either the
1132         operation's interface is annotated with the OperationsNotDeletable attribute or the operation itself
1133         is annotated with the NotDeletable attribute.
1134         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Update the JSC generator test baselines.
1135         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
1136         * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
1137         * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
1138         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: Ditto.
1139         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
1140         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
1141         * dom/Node.idl: Remove the OperationsNotDeletable attribute.
1142
1143 2013-11-11  Brady Eidson  <beidson@apple.com>
1144
1145         Make IDBTransaction tasks asynchronous
1146         https://bugs.webkit.org/show_bug.cgi?id=124183
1147
1148         Reviewed by Tim Horton.
1149
1150         This is an almost zero-change in behavior.
1151
1152         The one thing that is different is that previously, IDBTransactionBackends would synchronously
1153         run through their entire set of IDBOperation’s without ever returning control to the runloop.
1154
1155         Now, they start one task and then wait for its completion to schedule the start of the next task.
1156
1157         Change IDBOperation’s perform() to take a completion handler so it can be asynchronous.
1158         Add an IDBSynchronousOperation class to handle "Abort" tasks, which never need to perform i/o
1159         and therefore can be entirely synchronous.
1160         * Modules/indexeddb/IDBOperation.h:
1161         (WebCore::IDBSynchronousOperation::~IDBSynchronousOperation):
1162
1163         * Modules/indexeddb/IDBTransactionBackend.cpp:
1164         (WebCore::IDBTransactionBackend::scheduleTask): "Abort tasks" are now IDBSynchronousOperations.
1165         (WebCore::IDBTransactionBackend::abort):
1166         (WebCore::IDBTransactionBackend::taskTimerFired): Instead of running through the entire set of tasks,
1167           perform a single task asynchronously. The completion handler for the task will reset the task timer
1168           to asynchronously start the next task.
1169         * Modules/indexeddb/IDBTransactionBackend.h:
1170         (WebCore::IDBTransactionBackend::scheduleTask): "Abort tasks" are now IDBSynchronousOperations.
1171
1172         Update all operations to take completion handlers.
1173         For now, perform things synchronously like before, calling the completion handler when complete.
1174         * Modules/indexeddb/IDBCursorBackend.cpp:
1175         (WebCore::CallOnDestruct::CallOnDestruct): Helper class to make sure completion callbacks are always called perform() exits.
1176         (WebCore::CallOnDestruct::~CallOnDestruct):
1177         (WebCore::IDBCursorBackend::CursorIterationOperation::create):
1178         (WebCore::IDBCursorBackend::CursorAdvanceOperation::create):
1179         (WebCore::IDBCursorBackend::CursorPrefetchIterationOperation::create):
1180         (WebCore::IDBCursorBackend::CursorAdvanceOperation::perform):
1181         (WebCore::IDBCursorBackend::CursorIterationOperation::perform):
1182         (WebCore::IDBCursorBackend::CursorPrefetchIterationOperation::perform):
1183
1184         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1185         (WebCore::CallOnDestruct::CallOnDestruct): Helper class to make sure completion callbacks are always called when perform() exits.
1186         (WebCore::CallOnDestruct::~CallOnDestruct):
1187         (WebCore::CreateObjectStoreOperation::perform):
1188         (WebCore::CreateIndexOperation::perform):
1189         (WebCore::DeleteIndexOperation::perform):
1190         (WebCore::GetOperation::perform):
1191         (WebCore::PutOperation::perform):
1192         (WebCore::SetIndexesReadyOperation::perform):
1193         (WebCore::OpenCursorOperation::perform):
1194         (WebCore::CountOperation::perform):
1195         (WebCore::DeleteRangeOperation::perform):
1196         (WebCore::ClearOperation::perform):
1197         (WebCore::DeleteObjectStoreOperation::perform):
1198         (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
1199
1200         * Modules/indexeddb/IDBTransactionBackendOperations.h:
1201         (WebCore::CreateObjectStoreOperation::create):
1202         (WebCore::DeleteObjectStoreOperation::create):
1203         (WebCore::IDBDatabaseBackend::VersionChangeOperation::create):
1204         (WebCore::CreateObjectStoreAbortOperation::create):
1205         (WebCore::DeleteObjectStoreAbortOperation::create):
1206         (WebCore::IDBDatabaseBackend::VersionChangeAbortOperation::create):
1207         (WebCore::CreateIndexOperation::create):
1208         (WebCore::CreateIndexAbortOperation::create):
1209         (WebCore::DeleteIndexOperation::create):
1210         (WebCore::DeleteIndexAbortOperation::create):
1211         (WebCore::GetOperation::create):
1212         (WebCore::PutOperation::create):
1213         (WebCore::SetIndexesReadyOperation::create):
1214         (WebCore::OpenCursorOperation::create):
1215         (WebCore::CountOperation::create):
1216         (WebCore::DeleteRangeOperation::create):
1217         (WebCore::ClearOperation::create):
1218
1219 2013-11-11  Joseph Pecoraro  <pecoraro@apple.com>
1220
1221         Web Inspector: Remove some unused generated code
1222         https://bugs.webkit.org/show_bug.cgi?id=124179
1223
1224         Reviewed by Timothy Hatcher.
1225
1226         * inspector/CodeGeneratorInspectorStrings.py:
1227
1228 2013-11-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1229
1230         Clean up static_cast<Element*> usage
1231         https://bugs.webkit.org/show_bug.cgi?id=124133
1232
1233         Reviewed by Andreas Kling.
1234
1235         We need to use toFoo cast function instead of static_cast<>. Though there is toElement(),
1236         static_cast<Element*> is still being used.
1237
1238         No new tests, no behavior changes.
1239
1240         * bindings/gobject/WebKitDOMPrivate.cpp:
1241         (WebKit::wrap):
1242         * dom/ElementTraversal.h:
1243         (WebCore::::lastWithinTemplate):
1244         (WebCore::::nextTemplate):
1245         (WebCore::::previousTemplate):
1246
1247 2013-11-11  Anders Carlsson  <andersca@apple.com>
1248
1249         FrameFilter can just be an std::function instead
1250         https://bugs.webkit.org/show_bug.cgi?id=124176
1251
1252         Reviewed by Tim Horton.
1253
1254         * WebCore.exp.in:
1255         * loader/archive/cf/LegacyWebArchive.cpp:
1256         (WebCore::LegacyWebArchive::create):
1257         * loader/archive/cf/LegacyWebArchive.h:
1258
1259 2013-11-11  Simon Fraser  <simon.fraser@apple.com>
1260
1261         REGRESSION (r155660): box-shadow causes overlay scrollbars to be in the wrong position when element is composited (85647)
1262         https://bugs.webkit.org/show_bug.cgi?id=124090
1263
1264         Reviewed by Beth Dakin.
1265         
1266         After r155660 we did fewer layouts, so were left with overlay scrollbars in the
1267         wrong locations because nothing would update them after RenderLayerBacking
1268         computed a new offsetFromRenderer.
1269         
1270         First part of the fix is to wean positionOverflowControlsLayers() off of
1271         an absolute offset from the root. Do this by not using Widget::frameRect()
1272         to position the layers, but instead RenderLayer::rectFor{Horizontal|Vertical}Scrollbar
1273         which is what we used to position the scrollbars in the first place.
1274         
1275         Second part of the fix is to call positionOverflowControlsLayers() from
1276         RenderLayerBacking::updateGraphicsLayerGeometry() if the offsetFromRenderer
1277         changed.
1278
1279         Test: compositing/overflow/overflow-scrollbar-layer-positions.html
1280
1281         * rendering/RenderLayer.cpp:
1282         (WebCore::RenderLayer::positionOverflowControls):
1283         * rendering/RenderLayerBacking.cpp:
1284         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1285         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
1286         * rendering/RenderLayerBacking.h:
1287
1288 2013-11-11  Brent Fulgham  <bfulgham@apple.com>
1289
1290         [Win] m_isCompositeFontReference is uninitialized.
1291         https://bugs.webkit.org/show_bug.cgi?id=124170
1292
1293         Reviewed by Tim Horton.
1294
1295         Initialize value to false, as is done in the other constructors for this data type.
1296
1297         * platform/graphics/win/FontPlatformDataCGWin.cpp:
1298         (WebCore::FontPlatformData::FontPlatformData): 
1299         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
1300         (WebCore::FontPlatformData::FontPlatformData):
1301         * platform/graphics/win/FontPlatformDataWin.cpp:
1302         (WebCore::FontPlatformData::FontPlatformData):
1303
1304 2013-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
1305
1306         [Mac] Characters too close together in complex Arabic text
1307         https://bugs.webkit.org/show_bug.cgi?id=124057
1308
1309         Reviewed by Darin Adler.
1310
1311         We weren't updating our total width variable with run's initial
1312         advance information, leading to widths that were too narrow.
1313
1314         In addition, while initial advances for runs that aren't the first
1315         run are accounted for by baking in the initial advances into the
1316         previous character's advance, the initial advance for the first run
1317         has to be accounted for in ComplexTextController::offsetForPosition.
1318
1319         Test: fast/text/complex-grapheme-cluster-with-initial-advance.html
1320         Test: fast/text/selection-in-initial-advance-region.html
1321
1322         * platform/graphics/mac/ComplexTextController.cpp:
1323         (WebCore::ComplexTextController::adjustGlyphsAndAdvances): Update
1324         total width variable
1325         (WebCore::ComplexTextController::offsetOfPosition): Account for
1326         the first run's initial advance.
1327
1328 2013-11-11  Brady Eidson  <beidson@apple.com>
1329
1330         Make IDBBackingStoreTransaction be RefCounted
1331         https://bugs.webkit.org/show_bug.cgi?id=124168
1332
1333         Reviewed by Tim Horton.
1334
1335         This is necessarily to safely add a fully asynchronous interface into the IDB mechanism.
1336
1337         * Modules/indexeddb/IDBBackingStoreInterface.h:
1338         * Modules/indexeddb/IDBBackingStoreTransactionInterface.h:
1339         * Modules/indexeddb/IDBTransactionBackend.h:
1340
1341         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
1342         (WebCore::IDBBackingStoreLevelDB::createBackingStoreTransaction):
1343         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
1344         * Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.h:
1345
1346 2013-11-11  Antti Koivisto  <antti@apple.com>
1347
1348         End of line whitespace should collapse with white-space:pre-wrap; overflow-wrap:break-word in all cases
1349         https://bugs.webkit.org/show_bug.cgi?id=124158
1350
1351         Reviewed by Dave Hyatt.
1352         
1353         If a word just fits the line but the following space overflows we fail to collapse whitespaces 
1354         at the end of the line. This happens because with break-word we end up taking word breaking
1355         code path that does not have pre-wrap whitespace handling.
1356         
1357         This patch makes the behavior consistent and also matches Firefox.
1358
1359         Test: fast/text/break-word-pre-wrap.html
1360
1361         * rendering/RenderBlockLineLayout.cpp:
1362         (WebCore::BreakingContext::handleText):
1363         
1364             Don't take the word break code path if we are pre-wrap and the current character is space.
1365             Instead proceed to break the line normally as this is a valid break position.
1366
1367 2013-11-11  Bear Travis  <betravis@adobe.com>
1368
1369         Web Inspector: [CSS Shapes] Highlight shape-outside when its element is selected in the Web Inspector
1370         https://bugs.webkit.org/show_bug.cgi?id=124071
1371
1372         Reviewed by Timothy Hatcher.
1373
1374         Adding code to pass computed shape information (path and bounds) to the Inspector overlay
1375         canvas, and the code to display it. The code creates a path based on ShapeInfo's computed
1376         shape. The shape highlight draws whenever an element is highlighted, via selection in
1377         the Inspector elements view.
1378
1379         Test: inspector-protocol/model/highlight-shape-outside.html
1380
1381         * inspector/InspectorOverlay.cpp:
1382         (WebCore::localPointToRoot): Convert a local point to be relative to the root view.
1383         (WebCore::appendPathCommandAndPoints): Helper for building a single segment's worth
1384         of the overall path.
1385         (WebCore::appendPathSegment): Build a single segment's worth of the overall path.
1386         (WebCore::buildObjectForShapeOutside): Build an object to pass to the Inspector overlay
1387         that represents the shape.
1388         (WebCore::buildObjectForElementInfo): Call buildObjectForShapeOutside and pass the
1389         resulting object along.
1390         * inspector/InspectorOverlayPage.js:
1391         (pathCommand): Draw a single path command.
1392         (drawPath): Draw the overall path.
1393         (_drawShapeHighlight): Draw the highlight for the given shapeInfo.
1394         (drawNodeHighlight): Call _drawShapeHighlight.
1395         * rendering/shapes/PolygonShape.h:
1396         (WebCore::PolygonShape::polygon): Expose the underlying vertex information for a
1397         PolygonShape.
1398         * rendering/shapes/RasterShape.h:
1399         * rendering/shapes/RectangleShape.h:
1400         (WebCore::RectangleShape::logicalRx): Expose the logical radii for a shape.
1401         (WebCore::RectangleShape::logicalRy): Ditto.
1402         * rendering/shapes/Shape.h:
1403         * rendering/shapes/ShapeInfo.h:
1404         (WebCore::ShapeInfo::computedShapePhysicalBoundingBox): The physical bounds of a
1405         shape in renderer coordinates.
1406         (WebCore::ShapeInfo::shapeToRendererPoint): Convert shape coordinates to renderer
1407         coordinates.
1408         (WebCore::ShapeInfo::shapeToRendererSize): Ditto.
1409         (WebCore::ShapeInfo::ShapeInfo):
1410
1411 2013-11-11  Alexey Proskuryakov  <ap@apple.com>
1412
1413         Support WebCrypto KeyPair interface
1414         https://bugs.webkit.org/show_bug.cgi?id=124161
1415
1416         Reviewed by Geoffrey Garen.
1417
1418         No new tests yet, will be tested once generateKey is implemented for any RSA algorithms.
1419
1420         * CMakeLists.txt:
1421         * DerivedSources.make:
1422         * GNUmakefile.list.am:
1423         * WebCore.xcodeproj/project.pbxproj:
1424         Added new files.
1425
1426         * bindings/js/JSDOMPromise.h: Support returning a key pair via a promise.
1427
1428         * bindings/js/JSCryptoKeyPairCustom.cpp: Added.
1429         (WebCore::JSCryptoKeyPair::visitChildren):
1430         * crypto/CryptoKey.idl:
1431         CryptoKey wrapper is reachable through KeyPair, but it doesn't have (or need)
1432         a back pointer.
1433
1434         * crypto/CryptoKeyPair.cpp: Added.
1435         (WebCore::CryptoKeyPair::CryptoKeyPair):
1436         (WebCore::CryptoKeyPair::~CryptoKeyPair):
1437         * crypto/CryptoKeyPair.h: Added.
1438         (WebCore::CryptoKeyPair::create):
1439         (WebCore::CryptoKeyPair::publicKey):
1440         (WebCore::CryptoKeyPair::privateKey):
1441         * crypto/CryptoKeyPair.idl: Added.
1442
1443 2013-11-11  Nick Diego Yamane  <nick.yamane@openbossa.org>
1444
1445         Fix build after r158967
1446         https://bugs.webkit.org/show_bug.cgi?id=124160
1447
1448         Reviewed by Anders Carlsson.
1449
1450         After r158967, gcc debug builds with "-Werror=type-limits" enabled
1451         fail. This patch fixes it.
1452
1453         * rendering/shapes/RasterShape.h:
1454         (WebCore::RasterShapeIntervals::intervalsAt):
1455
1456 2013-11-11  Zan Dobersek  <zdobersek@igalia.com>
1457
1458         Remove the OperationsNotDeletable attribute from most of the WebIDL interfaces
1459         https://bugs.webkit.org/show_bug.cgi?id=124151
1460
1461         Reviewed by Geoffrey Garen.
1462
1463         The OperationsNotDeletable attribute currently doesn't have any effect, but will soon enforce
1464         non-configurability of operations on the interface that uses the attribute. Non-configurability
1465         of operations is the default behavior at the moment, but will be changed to follow the WebIDL
1466         specification which requires that the operations are configurable (i.e. -- in JSC terms -- deletable).
1467         IE and Firefox already exhibit this behavior in the majority of cases, while Chrome and Opera don't.
1468
1469         The attribute remains in use on the Location interface to mimic the Unforgeable attribute which
1470         also makes operations of an interface non-configurable. Unforgeable attribute will be used instead
1471         when support for it will be added to the JSC bindings generator.
1472
1473         * Modules/battery/BatteryManager.idl:
1474         * Modules/encryptedmedia/MediaKeySession.idl:
1475         * Modules/encryptedmedia/MediaKeys.idl:
1476         * Modules/gamepad/GamepadList.idl:
1477         * Modules/geolocation/Geolocation.idl:
1478         * Modules/indexeddb/IDBCursor.idl:
1479         * Modules/indexeddb/IDBDatabase.idl:
1480         * Modules/indexeddb/IDBFactory.idl:
1481         * Modules/indexeddb/IDBIndex.idl:
1482         * Modules/indexeddb/IDBKeyRange.idl:
1483         * Modules/indexeddb/IDBObjectStore.idl:
1484         * Modules/indexeddb/IDBTransaction.idl:
1485         * Modules/indexeddb/IDBVersionChangeEvent.idl:
1486         * Modules/mediacontrols/MediaControlsHost.idl:
1487         * Modules/mediasource/MediaSource.idl:
1488         * Modules/mediasource/SourceBuffer.idl:
1489         * Modules/mediasource/SourceBufferList.idl:
1490         * Modules/mediastream/MediaStream.idl:
1491         * Modules/mediastream/MediaStreamTrack.idl:
1492         * Modules/mediastream/RTCDTMFSender.idl:
1493         * Modules/mediastream/RTCDataChannel.idl:
1494         * Modules/mediastream/RTCPeerConnection.idl:
1495         * Modules/mediastream/RTCStatsReport.idl:
1496         * Modules/mediastream/RTCStatsResponse.idl:
1497         * Modules/networkinfo/NetworkInfoConnection.idl:
1498         * Modules/notifications/Notification.idl:
1499         * Modules/notifications/NotificationCenter.idl:
1500         * Modules/proximity/DeviceProximityEvent.idl:
1501         * Modules/quota/StorageInfo.idl:
1502         * Modules/quota/StorageQuota.idl:
1503         * Modules/speech/SpeechGrammarList.idl:
1504         * Modules/speech/SpeechRecognition.idl:
1505         * Modules/speech/SpeechRecognitionResult.idl:
1506         * Modules/speech/SpeechRecognitionResultList.idl:
1507         * Modules/speech/SpeechSynthesis.idl:
1508         * Modules/webaudio/AnalyserNode.idl:
1509         * Modules/webaudio/AudioBuffer.idl:
1510         * Modules/webaudio/AudioBufferSourceNode.idl:
1511         * Modules/webaudio/AudioContext.idl:
1512         * Modules/webaudio/AudioListener.idl:
1513         * Modules/webaudio/AudioNode.idl:
1514         * Modules/webaudio/AudioParam.idl:
1515         * Modules/webaudio/BiquadFilterNode.idl:
1516         * Modules/webaudio/OscillatorNode.idl:
1517         * Modules/webaudio/PannerNode.idl:
1518         * Modules/webdatabase/Database.idl:
1519         * Modules/webdatabase/DatabaseSync.idl:
1520         * Modules/webdatabase/SQLResultSetRowList.idl:
1521         * Modules/webdatabase/SQLTransaction.idl:
1522         * Modules/webdatabase/SQLTransactionSync.idl:
1523         * Modules/websockets/WebSocket.idl:
1524         * crypto/CryptoKey.idl:
1525         * crypto/SubtleCrypto.idl:
1526         * css/CSSHostRule.idl:
1527         * css/CSSMediaRule.idl:
1528         * css/CSSPrimitiveValue.idl:
1529         * css/CSSRuleList.idl:
1530         * css/CSSStyleDeclaration.idl:
1531         * css/CSSStyleSheet.idl:
1532         * css/CSSSupportsRule.idl:
1533         * css/CSSValueList.idl:
1534         * css/DOMWindowCSS.idl:
1535         * css/FontLoader.idl:
1536         * css/MediaList.idl:
1537         * css/MediaQueryList.idl:
1538         * css/MediaQueryListListener.idl:
1539         * css/StyleMedia.idl:
1540         * css/StyleSheet.idl:
1541         * css/StyleSheetList.idl:
1542         * css/WebKitCSSFilterValue.idl:
1543         * css/WebKitCSSKeyframesRule.idl:
1544         * css/WebKitCSSMatrix.idl:
1545         * css/WebKitCSSTransformValue.idl:
1546         * dom/CharacterData.idl:
1547         * dom/ChildNode.idl:
1548         * dom/ClientRectList.idl:
1549         * dom/Clipboard.idl:
1550         * dom/CompositionEvent.idl:
1551         * dom/CustomEvent.idl:
1552         * dom/DOMCoreException.idl:
1553         * dom/DOMImplementation.idl:
1554         * dom/DOMNamedFlowCollection.idl:
1555         * dom/DOMStringList.idl:
1556         * dom/DOMStringMap.idl:
1557         * dom/DataTransferItem.idl:
1558         * dom/DataTransferItemList.idl:
1559         * dom/DeviceMotionEvent.idl:
1560         * dom/DeviceOrientationEvent.idl:
1561         * dom/Document.idl:
1562         * dom/DocumentFragment.idl:
1563         * dom/DocumentType.idl:
1564         * dom/Element.idl:
1565         * dom/Event.idl:
1566         * dom/EventException.idl:
1567         * dom/EventListener.idl:
1568         * dom/EventTarget.idl:
1569         * dom/HashChangeEvent.idl:
1570         * dom/KeyboardEvent.idl:
1571         * dom/MessageEvent.idl:
1572         * dom/MessagePort.idl:
1573         * dom/MouseEvent.idl:
1574         * dom/MutationEvent.idl:
1575         * dom/MutationObserver.idl:
1576         * dom/NamedNodeMap.idl:
1577         * dom/Node.idl:
1578         * dom/NodeFilter.idl:
1579         * dom/NodeIterator.idl:
1580         * dom/NodeList.idl:
1581         * dom/Range.idl:
1582         * dom/RangeException.idl:
1583         * dom/ShadowRoot.idl:
1584         * dom/Text.idl:
1585         * dom/TextEvent.idl:
1586         * dom/TouchEvent.idl:
1587         * dom/TouchList.idl:
1588         * dom/TreeWalker.idl:
1589         * dom/UIEvent.idl:
1590         * dom/WebKitNamedFlow.idl:
1591         * dom/WheelEvent.idl:
1592         * fileapi/Blob.idl:
1593         * fileapi/FileException.idl:
1594         * fileapi/FileList.idl:
1595         * fileapi/FileReader.idl:
1596         * fileapi/FileReaderSync.idl:
1597         * html/DOMFormData.idl:
1598         * html/DOMSettableTokenList.idl:
1599         * html/DOMTokenList.idl:
1600         * html/DOMURL.idl:
1601         * html/HTMLAllCollection.idl:
1602         * html/HTMLAnchorElement.idl:
1603         * html/HTMLButtonElement.idl:
1604         * html/HTMLCanvasElement.idl:
1605         * html/HTMLCollection.idl:
1606         * html/HTMLDocument.idl:
1607         * html/HTMLElement.idl:
1608         * html/HTMLEmbedElement.idl:
1609         * html/HTMLFieldSetElement.idl:
1610         * html/HTMLFormControlsCollection.idl:
1611         * html/HTMLFormElement.idl:
1612         * html/HTMLFrameElement.idl:
1613         * html/HTMLIFrameElement.idl:
1614         * html/HTMLInputElement.idl:
1615         * html/HTMLKeygenElement.idl:
1616         * html/HTMLMarqueeElement.idl:
1617         * html/HTMLMediaElement.idl:
1618         * html/HTMLObjectElement.idl:
1619         * html/HTMLOptionsCollection.idl:
1620         * html/HTMLOutputElement.idl:
1621         * html/HTMLSelectElement.idl:
1622         * html/HTMLTableElement.idl:
1623         * html/HTMLTableRowElement.idl:
1624         * html/HTMLTableSectionElement.idl:
1625         * html/HTMLTextAreaElement.idl:
1626         * html/HTMLVideoElement.idl:
1627         * html/MediaController.idl:
1628         * html/RadioNodeList.idl:
1629         * html/TimeRanges.idl:
1630         * html/canvas/CanvasGradient.idl:
1631         * html/canvas/CanvasRenderingContext2D.idl:
1632         * html/canvas/DOMPath.idl:
1633         * html/canvas/EXTDrawBuffers.idl:
1634         * html/canvas/OESVertexArrayObject.idl:
1635         * html/canvas/WebGLDebugShaders.idl:
1636         * html/canvas/WebGLLoseContext.idl:
1637         * html/canvas/WebGLRenderingContext.idl:
1638         * html/track/AudioTrackList.idl:
1639         * html/track/TextTrack.idl:
1640         * html/track/TextTrackCue.idl:
1641         * html/track/TextTrackCueList.idl:
1642         * html/track/TextTrackList.idl:
1643         * html/track/TextTrackRegionList.idl:
1644         * html/track/VideoTrackList.idl:
1645         * loader/appcache/DOMApplicationCache.idl:
1646         * page/Console.idl:
1647         * page/Crypto.idl:
1648         * page/DOMSecurityPolicy.idl:
1649         * page/DOMSelection.idl:
1650         * page/DOMWindow.idl:
1651         * page/EventSource.idl:
1652         * page/History.idl:
1653         * page/Navigator.idl:
1654         * page/Performance.idl:
1655         * page/PerformanceEntryList.idl:
1656         * page/SpeechInputResultList.idl:
1657         * page/WindowBase64.idl:
1658         * page/WindowTimers.idl:
1659         * plugins/DOMMimeTypeArray.idl:
1660         * plugins/DOMPlugin.idl:
1661         * plugins/DOMPluginArray.idl:
1662         * storage/Storage.idl:
1663         * storage/StorageEvent.idl:
1664         * svg/SVGAngle.idl:
1665         * svg/SVGAnimationElement.idl:
1666         * svg/SVGColor.idl:
1667         * svg/SVGCursorElement.idl:
1668         * svg/SVGDocument.idl:
1669         * svg/SVGElement.idl:
1670         * svg/SVGElementInstanceList.idl:
1671         * svg/SVGException.idl:
1672         * svg/SVGFEDropShadowElement.idl:
1673         * svg/SVGFEGaussianBlurElement.idl:
1674         * svg/SVGFEMorphologyElement.idl:
1675         * svg/SVGFilterElement.idl:
1676         * svg/SVGGraphicsElement.idl:
1677         * svg/SVGLength.idl:
1678         * svg/SVGLengthList.idl:
1679         * svg/SVGMarkerElement.idl:
1680         * svg/SVGMaskElement.idl:
1681         * svg/SVGMatrix.idl:
1682         * svg/SVGNumberList.idl:
1683         * svg/SVGPaint.idl:
1684         * svg/SVGPathElement.idl:
1685         * svg/SVGPathSegList.idl:
1686         * svg/SVGPatternElement.idl:
1687         * svg/SVGPoint.idl:
1688         * svg/SVGPointList.idl:
1689         * svg/SVGSVGElement.idl:
1690         * svg/SVGStringList.idl:
1691         * svg/SVGTests.idl:
1692         * svg/SVGTextContentElement.idl:
1693         * svg/SVGTransform.idl:
1694         * svg/SVGTransformList.idl:
1695         * workers/DedicatedWorkerGlobalScope.idl:
1696         * workers/Worker.idl:
1697         * workers/WorkerGlobalScope.idl:
1698         * workers/WorkerLocation.idl:
1699         * xml/DOMParser.idl:
1700         * xml/XMLHttpRequest.idl:
1701         * xml/XMLHttpRequestException.idl:
1702         * xml/XMLHttpRequestUpload.idl:
1703         * xml/XMLSerializer.idl:
1704         * xml/XPathEvaluator.idl:
1705         * xml/XPathException.idl:
1706         * xml/XPathExpression.idl:
1707         * xml/XPathNSResolver.idl:
1708         * xml/XPathResult.idl:
1709         * xml/XSLTProcessor.idl:
1710
1711 2013-11-11  Javier Fernandez  <jfernandez@igalia.com>
1712
1713         [CSS Regions] Selection focusNode set to the "region" block, instead of the "source" block
1714         https://bugs.webkit.org/show_bug.cgi?id=120769
1715
1716         Reviewed by David Hyatt.
1717
1718         When a point hits a Region block, current positionForPoint algorithm determines its
1719         position in the DOM and returns either the start or end offset for such block, since
1720         Region blocks have no children in the DOM.
1721
1722         It's necessary to map the point into Flow Thread coordinates in order to determine
1723         the DOM position of the specific element rendered by the Region.
1724
1725         Top margin, padding and border points should be mapped to the beginning of the Region
1726         block, while bottom points are mapped to the block end. The Left coordinate its just
1727         adjusted to fit in the Flow Thread boundaries, since its not affected by the Flow
1728         direction.
1729
1730         Besides, when inspecting the Flow Thread blocks looking for the last candidate box,
1731         the Region originally associated to the point might be taken into account. Only the
1732         blocks/boxes rendered by the Region are potential candidates.
1733
1734         Tests: fast/regions/selection/position-for-point-1-vert-lr.html
1735                fast/regions/selection/position-for-point-1-vert-rl.html
1736                fast/regions/selection/position-for-point-1.html
1737                fast/regions/selection/position-for-point-vert-lr.html
1738                fast/regions/selection/position-for-point-vert-rl.html
1739                fast/regions/selection/position-for-point.html
1740
1741         * rendering/RenderBlock.cpp:
1742         (WebCore::isChildHitTestCandidate):
1743         (WebCore::RenderBlock::positionForPoint):
1744         * rendering/RenderBlockFlow.cpp:
1745         (WebCore::RenderBlockFlow::positionForPoint): Added.
1746         It just redirects the call to the associated RenderNamedFlowFragment instance.
1747         * rendering/RenderBlockFlow.h:
1748         * rendering/RenderRegion.cpp:
1749         (WebCore::RenderRegion::mapRegionPointIntoFlowThreadCoordinates): Added.
1750         It performs the coordinates mapping.
1751         (WebCore::RenderRegion::positionForPoint): Added.
1752         It determines the corresponding LayoutPoint in the FlowThread the Region
1753         is associated to, forwarding the call to the RenderBlock class using the
1754         FlowThread's first child block and such new point.
1755         * rendering/RenderRegion.h:
1756
1757 2013-11-11  Gergo Balogh  <geryxyz@inf.u-szeged.hu>
1758
1759         [curl] Remove unused includes.
1760         https://bugs.webkit.org/show_bug.cgi?id=120415
1761
1762         Reviewed by Csaba Osztrogonác.
1763
1764         Original patch by 2013-08-28  Tamas Czene  <tczene@inf.u-szeged.hu>
1765
1766         * platform/network/curl/ProxyServerCurl.cpp:
1767         * platform/network/curl/ResourceHandleCurl.cpp:
1768         * platform/network/curl/ResourceHandleManager.cpp:
1769
1770 2013-11-11  Csaba Osztrogonác  <ossy@webkit.org>
1771
1772         URTBF after r159027 to make Apple Windows build happy.
1773
1774         * platform/graphics/cg/ImageSourceCG.cpp:
1775         (WebCore::sharedBufferGetBytesAtPosition):
1776
1777 2013-11-11  Andreas Kling  <akling@apple.com>
1778
1779         Kill InlineFlowBox::rendererLineBoxes().
1780         <https://webkit.org/b/124141>
1781
1782         We only ever used this to access the RenderLineBoxList for non-root
1783         boxes, and those always have a RenderInline renderer.
1784
1785         Tighten things up by losing the virtual rendererLineBoxes() and
1786         calling RenderInline::lineBoxes() directly.
1787
1788         Reviewed by Antti Koivisto.
1789
1790 2013-11-11  Andreas Kling  <akling@apple.com>
1791
1792         Bring the LineFragmentationData back to RootInlineBox.
1793         <https://webkit.org/b/124136>
1794
1795         Now that we have the simple line layout path, almost all the root
1796         line boxes end up with some kind of fragmentation data, so we might
1797         as well put the members back on RootInlineBox and avoid the extra
1798         allocation (and indirection.)
1799
1800         1.74 MB progression on HTML5 spec at <http://whatwg.org/c>
1801
1802         Reviewed by Antti Koivisto.
1803
1804 2013-11-10  Andreas Kling  <akling@apple.com>
1805
1806         Shrink RenderInline.
1807         <https://webkit.org/b/124134>
1808
1809         Move the "always create line boxes" bit from RenderInline up to
1810         RenderElement. I didn't do this earlier because there were no bits
1811         free on RenderObject but thanks to RenderElement we now have tons!
1812
1813         540 kB progression on HTML5 spec at <http://whatwg.org/c>
1814
1815         Reviewed by Anders Carlsson.
1816
1817 2013-11-10  Sam Weinig  <sam@webkit.org>
1818
1819         Make childShouldCreateRenderer() take a Node reference
1820         https://bugs.webkit.org/show_bug.cgi?id=124132
1821
1822         Reviewed by Andreas Kling.
1823
1824         The Node passed to childShouldCreateRenderer() is never null.
1825
1826 2013-11-10  Frédéric Wang  <fred.wang@free.fr>
1827
1828         CSS direction must be reset to ltr on <math> element.
1829         <https://webkit.org/b/124121>
1830
1831         Reviewed by Darin Adler.
1832
1833         Test: mathml/presentation/direction.html
1834
1835         * css/mathml.css:
1836         (math): set direction: ltr; on the <math> element.
1837
1838 2013-11-10  Sam Weinig  <sam@webkit.org>
1839
1840         Reduce the size of RenderBlockFlow by making its rare data inherit from RenderBlockRareData
1841         https://bugs.webkit.org/show_bug.cgi?id=124124
1842
1843         Reviewed by Anders Carlsson.
1844
1845         Reduce RenderBlockFlow by one word.
1846
1847         * rendering/RenderBlock.cpp:
1848         * rendering/RenderBlock.h:
1849         * rendering/RenderBlockFlow.cpp:
1850         * rendering/RenderBlockFlow.h:
1851
1852 2013-11-10  Antti Koivisto  <antti@apple.com>
1853
1854         Use start/end instead of textOffset/textLength for simple text runs
1855         https://bugs.webkit.org/show_bug.cgi?id=124130
1856
1857         Reviewed by Oliver Hunt.
1858         
1859         The code reads better this way.
1860
1861         * rendering/SimpleLineLayout.cpp:
1862         (WebCore::SimpleLineLayout::createTextRuns):
1863         * rendering/SimpleLineLayout.h:
1864         (WebCore::SimpleLineLayout::Run::Run):
1865         * rendering/SimpleLineLayoutFunctions.h:
1866         (WebCore::SimpleLineLayout::findTextCaretMinimumOffset):
1867         (WebCore::SimpleLineLayout::findTextCaretMaximumOffset):
1868         (WebCore::SimpleLineLayout::containsTextCaretOffset):
1869         (WebCore::SimpleLineLayout::isTextRendered):
1870         * rendering/SimpleLineLayoutResolver.h:
1871         (WebCore::SimpleLineLayout::RunResolver::Run::text):
1872
1873 2013-11-10  Antti Koivisto  <antti@apple.com>
1874
1875         Implement white-space property on simple line layout path
1876         https://bugs.webkit.org/show_bug.cgi?id=124122
1877
1878         Reviewed by Andreas Kling.
1879         
1880         Support all values of the white-space property and the tab-size property.
1881
1882         Tests: fast/forms/basic-textareas-simple-lines.html
1883                fast/text/embed-at-end-of-pre-wrap-line-simple-lines.html
1884                fast/text/whitespace/pre-wrap-line-test-simple-lines.html
1885                fast/text/whitespace/pre-wrap-long-word-simple-lines.html
1886                fast/text/whitespace/pre-wrap-spaces-after-newline-simple-lines.html
1887
1888         * rendering/SimpleLineLayout.cpp:
1889         (WebCore::SimpleLineLayout::canUseFor):
1890         (WebCore::SimpleLineLayout::isWhitespace):
1891         (WebCore::SimpleLineLayout::skipWhitespaces):
1892         (WebCore::SimpleLineLayout::textWidth):
1893         (WebCore::SimpleLineLayout::measureWord):
1894         (WebCore::SimpleLineLayout::createTextRuns):
1895         * rendering/SimpleLineLayoutFunctions.cpp:
1896         (WebCore::SimpleLineLayout::paintDebugBorders):
1897         (WebCore::SimpleLineLayout::paintFlow):
1898
1899 2013-11-10  Sergio Correia  <sergio.correia@openbossa.org>
1900
1901         Fix EFL build after r159027
1902         https://bugs.webkit.org/show_bug.cgi?id=124127
1903
1904         Reviewed by Anders Carlsson.
1905
1906         No new tests, build fix.
1907
1908         * page/Settings.in: Add std to numeric_limits, since we don't have
1909         'using std' directives anymore.
1910
1911 2013-11-10  Anders Carlsson  <andersca@apple.com>
1912
1913         Fix build.
1914
1915         * rendering/RenderMultiColumnBlock.cpp:
1916         (WebCore::RenderMultiColumnBlock::computeColumnCountAndWidth):
1917         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
1918
1919 2013-11-10  Anders Carlsson  <andersca@apple.com>
1920
1921         Remove all 'std' using directives from WebCore
1922         https://bugs.webkit.org/show_bug.cgi?id=124125
1923
1924         Reviewed by Sam Weinig.
1925
1926         As per the coding style guidelines.
1927
1928         * loader/CrossOriginPreflightResultCache.cpp:
1929         (WebCore::CrossOriginPreflightResultCache::appendEntry):
1930         (WebCore::CrossOriginPreflightResultCache::canSkipPreflight):
1931         * loader/WorkerThreadableLoader.cpp:
1932         * loader/appcache/ApplicationCacheStorage.cpp:
1933         (WebCore::ApplicationCacheStorage::loadCache):
1934         * loader/appcache/ManifestParser.cpp:
1935         (WebCore::parseManifest):
1936         * loader/cache/MemoryCache.cpp:
1937         (WebCore::MemoryCache::deadCapacity):
1938         (WebCore::MemoryCache::lruListFor):
1939         * page/CaptionUserPreferencesMediaAF.cpp:
1940         * page/Chrome.cpp:
1941         * page/DOMTimer.cpp:
1942         (WebCore::DOMTimer::intervalClampedToMinimum):
1943         * page/FocusController.cpp:
1944         * page/Frame.cpp:
1945         (WebCore::Frame::resizePageRectsKeepingRatio):
1946         * page/PageGroupLoadDeferrer.cpp:
1947         * page/Settings.cpp:
1948         * page/animation/AnimationBase.cpp:
1949         (WebCore::solveStepsFunction):
1950         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
1951         (WebCore::AnimationBase::timeToNextService):
1952         (WebCore::AnimationBase::fractionalTime):
1953         (WebCore::AnimationBase::getTimeToNextEvent):
1954         * page/animation/KeyframeAnimation.cpp:
1955         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
1956         * platform/DateComponents.cpp:
1957         * platform/ScrollAnimator.cpp:
1958         (WebCore::ScrollAnimator::handleWheelEvent):
1959         * platform/ScrollView.cpp:
1960         (WebCore::ScrollView::unscaledVisibleContentSize):
1961         (WebCore::ScrollView::setScrollOffset):
1962         (WebCore::ScrollView::updateScrollbars):
1963         (WebCore::ScrollView::scrollContents):
1964         * platform/Scrollbar.cpp:
1965         (WebCore::Scrollbar::moveThumb):
1966         * platform/ScrollbarThemeComposite.cpp:
1967         (WebCore::usedTotalSize):
1968         (WebCore::ScrollbarThemeComposite::thumbPosition):
1969         (WebCore::ScrollbarThemeComposite::thumbLength):
1970         * platform/SharedBuffer.cpp:
1971         (WebCore::SharedBuffer::append):
1972         (WebCore::SharedBuffer::copyBufferAndClear):
1973         (WebCore::SharedBuffer::getSomeData):
1974         * platform/ThreadTimers.cpp:
1975         (WebCore::ThreadTimers::updateSharedTimer):
1976         * platform/Timer.cpp:
1977         (WebCore::TimerHeapLessThanFunction::operator()):
1978         (WebCore::TimerBase::heapPop):
1979         (WebCore::TimerBase::nextUnalignedFireInterval):
1980         * platform/URL.cpp:
1981         (WebCore::findHostnamesInMailToURL):
1982         (WebCore::portAllowed):
1983         * platform/audio/AudioResampler.cpp:
1984         (WebCore::AudioResampler::setRate):
1985         * platform/audio/AudioResamplerKernel.cpp:
1986         (WebCore::AudioResamplerKernel::process):
1987         * platform/audio/Distance.cpp:
1988         (WebCore::DistanceEffect::gain):
1989         * platform/audio/DynamicsCompressorKernel.cpp:
1990         (WebCore::DynamicsCompressorKernel::process):
1991         * platform/audio/EqualPowerPanner.cpp:
1992         (WebCore::EqualPowerPanner::pan):
1993         * platform/audio/HRTFDatabase.cpp:
1994         (WebCore::HRTFDatabase::indexFromElevationAngle):
1995         * platform/audio/HRTFElevation.cpp:
1996         (WebCore::HRTFElevation::createForSubject):
1997         * platform/audio/HRTFKernel.cpp:
1998         (WebCore::HRTFKernel::HRTFKernel):
1999         (WebCore::HRTFKernel::createInterpolatedKernel):
2000         * platform/audio/HRTFPanner.cpp:
2001         (WebCore::HRTFPanner::calculateDesiredAzimuthIndexAndBlend):
2002         * platform/audio/Reverb.cpp:
2003         * platform/audio/SincResampler.cpp:
2004         (WebCore::SincResampler::process):
2005         * platform/cf/URLCF.cpp:
2006         * platform/graphics/Color.cpp:
2007         (WebCore::makeRGB):
2008         (WebCore::makeRGBA):
2009         (WebCore::colorFloatToRGBAByte):
2010         (WebCore::Color::light):
2011         (WebCore::Color::dark):
2012         * platform/graphics/CrossfadeGeneratedImage.cpp:
2013         * platform/graphics/FloatQuad.cpp:
2014         (WebCore::min4):
2015         (WebCore::max4):
2016         (WebCore::withinEpsilon):
2017         * platform/graphics/FloatSize.cpp:
2018         (WebCore::FloatSize::isZero):
2019         * platform/graphics/FontFastPath.cpp:
2020         (WebCore::Font::floatWidthForSimpleText):
2021         * platform/graphics/FontPlatformData.cpp:
2022         * platform/graphics/GraphicsContext.cpp:
2023         * platform/graphics/RoundedRect.cpp:
2024         (WebCore::RoundedRect::Radii::expand):
2025         * platform/graphics/ShadowBlur.cpp:
2026         (WebCore::calculateLobes):
2027         (WebCore::computeSliceSizesFromRadii):
2028         * platform/graphics/SimpleFontData.cpp:
2029         (WebCore::SimpleFontData::initCharWidths):
2030         * platform/graphics/WidthIterator.cpp:
2031         (WebCore::WidthIterator::WidthIterator):
2032         (WebCore::WidthIterator::advanceInternal):
2033         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2034         (WebCore::InbandTextTrackPrivateAVF::processCue):
2035         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2036         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
2037         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
2038         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2039         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformDuration):
2040         (WebCore::MediaPlayerPrivateAVFoundationObjC::currentTime):
2041         * platform/graphics/ca/GraphicsLayerCA.cpp:
2042         (WebCore::GraphicsLayerCA::setOpacity):
2043         (WebCore::GraphicsLayerCA::setNeedsDisplay):
2044         (WebCore::GraphicsLayerCA::setupAnimation):
2045         (WebCore::clampedContentsScaleForScale):
2046         * platform/graphics/ca/mac/TileController.mm:
2047         (WebCore::TileController::getTileIndexRangeForRect):
2048         (WebCore::TileController::computeTileCoverageRect):
2049         * platform/graphics/cg/GraphicsContextCG.cpp:
2050         (WebCore::GraphicsContext::setPlatformShadow):
2051         (WebCore::computeLineBoundsAndAntialiasingModeForText):
2052         * platform/graphics/cg/ImageBufferCG.cpp:
2053         * platform/graphics/cg/ImageBufferDataCG.cpp:
2054         (WebCore::ImageBufferData::getData):
2055         * platform/graphics/cg/ImageSourceCG.cpp:
2056         * platform/graphics/filters/FEDropShadow.cpp:
2057         * platform/graphics/filters/FEGaussianBlur.cpp:
2058         (WebCore::boxBlur):
2059         (WebCore::FEGaussianBlur::platformApplyGeneric):
2060         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize):
2061         (WebCore::FEGaussianBlur::calculateStdDeviation):
2062         * platform/graphics/gpu/Texture.cpp:
2063         (WebCore::Texture::updateSubRect):
2064         * platform/graphics/gpu/TilingData.cpp:
2065         (WebCore::computeNumTiles):
2066         (WebCore::TilingData::tileXIndexFromSrcCoord):
2067         (WebCore::TilingData::tileYIndexFromSrcCoord):
2068         * platform/graphics/mac/ComplexTextController.cpp:
2069         (WebCore::ComplexTextController::ComplexTextController):
2070         (WebCore::ComplexTextController::offsetForPosition):
2071         (WebCore::ComplexTextController::advance):
2072         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2073         * platform/graphics/mac/FontComplexTextMac.cpp:
2074         (WebCore::Font::floatWidthForComplexText):
2075         * platform/graphics/mac/FontMac.mm:
2076         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2077         (WebCore::MediaPlayerPrivateQTKit::duration):
2078         * platform/graphics/mac/SimpleFontDataMac.mm:
2079         * platform/graphics/transforms/Matrix3DTransformOperation.cpp:
2080         * platform/graphics/transforms/MatrixTransformOperation.cpp:
2081         * platform/graphics/transforms/PerspectiveTransformOperation.cpp:
2082         * platform/graphics/transforms/RotateTransformOperation.cpp:
2083         * platform/graphics/transforms/TransformOperations.cpp:
2084         (WebCore::TransformOperations::blendByMatchingOperations):
2085         * platform/graphics/transforms/TransformationMatrix.cpp:
2086         (WebCore::clampEdgeValue):
2087         * platform/mac/ScrollAnimatorMac.mm:
2088         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
2089         * platform/mac/ScrollViewMac.mm:
2090         (WebCore::ScrollView::platformSetContentsSize):
2091         (WebCore::ScrollView::platformSetScrollPosition):
2092         * platform/mac/ScrollbarThemeMac.mm:
2093         * platform/mac/ThemeMac.mm:
2094         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
2095         (-[WebVideoFullscreenHUDWindowController incrementVolume]):
2096         (timeToString):
2097         * platform/network/HTTPHeaderMap.cpp:
2098         (WebCore::HTTPHeaderMap::copyData):
2099         * platform/network/ResourceRequestBase.cpp:
2100         * platform/network/ResourceResponseBase.cpp:
2101         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
2102         * platform/network/cf/ResourceResponseCFNet.cpp:
2103         * platform/network/mac/ResourceResponseMac.mm:
2104         (WebCore::ResourceResponse::initNSURLResponse):
2105         * platform/text/TextBreakIteratorICU.cpp:
2106         (WebCore::textClone):
2107         (WebCore::textLatin1MoveInPrimaryContext):
2108         (WebCore::textLatin1MoveInPriorContext):
2109         (WebCore::textInChunkOrOutOfRange):
2110         (WebCore::textOpenLatin1):
2111         (WebCore::textUTF16MoveInPrimaryContext):
2112         (WebCore::textUTF16MoveInPriorContext):
2113         (WebCore::textOpenUTF16):
2114         * platform/text/TextCodecUTF16.cpp:
2115         (WebCore::TextCodecUTF16::encode):
2116         * platform/text/TextCodecUTF8.cpp:
2117         (WebCore::TextCodecUTF8::encode):
2118         * platform/text/TextStream.cpp:
2119         * platform/text/mac/LocaleMac.mm:
2120         * platform/text/mac/TextCodecMac.cpp:
2121         (WebCore::TextCodecMac::decode):
2122         * rendering/AutoTableLayout.cpp:
2123         (WebCore::AutoTableLayout::recalcColumn):
2124         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
2125         (WebCore::AutoTableLayout::applyPreferredLogicalWidthQuirks):
2126         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
2127         (WebCore::AutoTableLayout::layout):
2128         * rendering/FixedTableLayout.cpp:
2129         (WebCore::FixedTableLayout::applyPreferredLogicalWidthQuirks):
2130         * rendering/FloatingObjects.cpp:
2131         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
2132         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
2133         (WebCore::FloatingObjects::logicalRightOffset):
2134         * rendering/InlineBox.cpp:
2135         * rendering/InlineFlowBox.cpp:
2136         (WebCore::InlineFlowBox::placeBoxRangeInInlineDirection):
2137         (WebCore::InlineFlowBox::adjustMaxAscentAndDescent):
2138         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
2139         (WebCore::InlineFlowBox::computeMaxLogicalTop):
2140         (WebCore::InlineFlowBox::addBoxShadowVisualOverflow):
2141         (WebCore::InlineFlowBox::addBorderOutsetVisualOverflow):
2142         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
2143         (WebCore::InlineFlowBox::nodeAtPoint):
2144         (WebCore::InlineFlowBox::constrainToLineTopAndBottomIfNeeded):
2145         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
2146         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
2147         (WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder):
2148         * rendering/InlineTextBox.cpp:
2149         (WebCore::InlineTextBox::isSelected):
2150         (WebCore::InlineTextBox::localSelectionRect):
2151         (WebCore::InlineTextBox::placeEllipsisBox):
2152         (WebCore::InlineTextBox::applyShadowToGraphicsContext):
2153         (WebCore::InlineTextBox::paint):
2154         (WebCore::InlineTextBox::selectionStartEnd):
2155         (WebCore::InlineTextBox::paintSelection):
2156         (WebCore::InlineTextBox::paintCompositionBackground):
2157         (WebCore::computeUnderlineOffset):
2158         (WebCore::InlineTextBox::paintDecoration):
2159         (WebCore::InlineTextBox::paintDocumentMarker):
2160         (WebCore::InlineTextBox::paintTextMatchMarker):
2161         (WebCore::InlineTextBox::computeRectForReplacementMarker):
2162         (WebCore::InlineTextBox::paintCompositionUnderline):
2163         * rendering/RenderBlock.cpp:
2164         (WebCore::RenderBlock::computeOverflow):
2165         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
2166         (WebCore::RenderBlock::paintChild):
2167         (WebCore::RenderBlock::blockSelectionGap):
2168         (WebCore::RenderBlock::logicalLeftSelectionGap):
2169         (WebCore::RenderBlock::logicalRightSelectionGap):
2170         (WebCore::RenderBlock::calcColumnWidth):
2171         (WebCore::RenderBlock::adjustRectForColumns):
2172         (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
2173         (WebCore::RenderBlock::computePreferredLogicalWidths):
2174         (WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
2175         (WebCore::updatePreferredWidth):
2176         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
2177         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
2178         * rendering/RenderBlockFlow.cpp:
2179         (WebCore::RenderBlockFlow::clearFloats):
2180         (WebCore::RenderBlockFlow::layoutBlock):
2181         (WebCore::RenderBlockFlow::layoutBlockChild):
2182         (WebCore::RenderBlockFlow::collapseMargins):
2183         (WebCore::RenderBlockFlow::clearFloatsIfNeeded):
2184         (WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
2185         (WebCore::RenderBlockFlow::estimateLogicalTopPosition):
2186         (WebCore::RenderBlockFlow::setCollapsedBottomMargin):
2187         (WebCore::RenderBlockFlow::handleAfterSideOfBlock):
2188         (WebCore::calculateMinimumPageHeight):
2189         (WebCore::RenderBlockFlow::adjustLinePositionForPagination):
2190         (WebCore::RenderBlockFlow::removeFloatingObject):
2191         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
2192         (WebCore::RenderBlockFlow::positionNewFloats):
2193         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
2194         (WebCore::RenderBlockFlow::addOverhangingFloats):
2195         (WebCore::RenderBlockFlow::getClearDelta):
2196         (WebCore::RenderBlockFlow::adjustForBorderFit):
2197         (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
2198         (WebCore::RenderBlockFlow::updateLogicalHeight):
2199         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
2200         (WebCore::RenderBlockFlow::addFocusRingRectsForInlineChildren):
2201         (WebCore::RenderBlockFlow::relayoutForPagination):
2202         * rendering/RenderBlockLineLayout.cpp:
2203         (WebCore::updateLogicalWidthForLeftAlignedBlock):
2204         (WebCore::updateLogicalWidthForRightAlignedBlock):
2205         (WebCore::updateLogicalWidthForCenterAlignedBlock):
2206         (WebCore::setLogicalWidthForTextRun):
2207         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
2208         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
2209         (WebCore::RenderBlockFlow::layoutLineBoxes):
2210         (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
2211         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
2212         (WebCore::tryHyphenating):
2213         * rendering/RenderBox.cpp:
2214         (WebCore::RenderBox::scrollWidth):
2215         (WebCore::RenderBox::scrollHeight):
2216         (WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
2217         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
2218         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
2219         (WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing):
2220         (WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing):
2221         (WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing):
2222         (WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
2223         (WebCore::RenderBox::repaintLayerRectsForImage):
2224         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
2225         (WebCore::RenderBox::containingBlockLogicalWidthForContentInRegion):
2226         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
2227         (WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
2228         (WebCore::RenderBox::computeLogicalWidthInRegion):
2229         (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
2230         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
2231         (WebCore::RenderBox::computeInlineDirectionMargins):
2232         (WebCore::RenderBox::computeLogicalHeight):
2233         (WebCore::RenderBox::computePercentageLogicalHeight):
2234         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
2235         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
2236         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
2237         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
2238         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
2239         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
2240         (WebCore::RenderBox::applyVisualEffectOverflow):
2241         (WebCore::RenderBox::addLayoutOverflow):
2242         * rendering/RenderBoxModelObject.cpp:
2243         (WebCore::RenderBoxModelObject::calculateFillTileSize):
2244         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatX):
2245         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::setNoRepeatY):
2246         (WebCore::RenderBoxModelObject::BackgroundImageGeometry::useFixedAttachment):
2247         (WebCore::RenderBoxModelObject::paintNinePieceImage):
2248         (WebCore::RenderBoxModelObject::paintOneBorderSide):
2249         (WebCore::calculateAdjustedInnerBorder):
2250         (WebCore::RenderBoxModelObject::paintBoxShadow):
2251         (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
2252         * rendering/RenderDeprecatedFlexibleBox.cpp:
2253         (WebCore::FlexBoxIterator::next):
2254         (WebCore::RenderDeprecatedFlexibleBox::computeIntrinsicLogicalWidths):
2255         (WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
2256         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
2257         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
2258         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
2259         (WebCore::RenderDeprecatedFlexibleBox::allowedChildFlex):
2260         * rendering/RenderFileUploadControl.cpp:
2261         (WebCore::RenderFileUploadControl::maxFilenameWidth):
2262         (WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
2263         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
2264         * rendering/RenderImage.cpp:
2265         (WebCore::RenderImage::setImageSizeForAltText):
2266         * rendering/RenderInline.cpp:
2267         (WebCore::computeMargin):
2268         (WebCore::RenderInline::linesVisualOverflowBoundingBox):
2269         (WebCore::RenderInline::paintOutline):
2270         (WebCore::RenderInline::paintOutlineForLine):
2271         * rendering/RenderLayer.cpp:
2272         (WebCore::RenderLayer::clampScrollOffset):
2273         (WebCore::RenderLayer::scrollRectToVisible):
2274         (WebCore::RenderLayer::visibleContentRect):
2275         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
2276         (WebCore::RenderLayer::hitTestOverflowControls):
2277         (WebCore::RenderLayer::hitTestLayer):
2278         (WebCore::RenderLayer::calculateLayerBounds):
2279         * rendering/RenderLayerBacking.cpp:
2280         * rendering/RenderLayerModelObject.cpp:
2281         * rendering/RenderLineBoxList.cpp:
2282         (WebCore::RenderLineBoxList::rangeIntersectsRect):
2283         (WebCore::RenderLineBoxList::anyLineIntersectsRect):
2284         (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
2285         (WebCore::RenderLineBoxList::paint):
2286         * rendering/RenderListBox.cpp:
2287         (WebCore::RenderListBox::updateFromElement):
2288         (WebCore::RenderListBox::layout):
2289         (WebCore::RenderListBox::computePreferredLogicalWidths):
2290         (WebCore::RenderListBox::size):
2291         (WebCore::RenderListBox::numVisibleItems):
2292         (WebCore::RenderListBox::panScroll):
2293         (WebCore::RenderListBox::scrollHeight):
2294         * rendering/RenderListItem.cpp:
2295         * rendering/RenderListMarker.cpp:
2296         * rendering/RenderMarquee.cpp:
2297         (WebCore::RenderMarquee::marqueeSpeed):
2298         (WebCore::RenderMarquee::computePosition):
2299         (WebCore::RenderMarquee::timerFired):
2300         * rendering/RenderMediaControls.cpp:
2301         * rendering/RenderMenuList.cpp:
2302         (WebCore::RenderMenuList::updateOptionsWidth):
2303         (WebCore::RenderMenuList::computeIntrinsicLogicalWidths):
2304         (WebCore::RenderMenuList::computePreferredLogicalWidths):
2305         * rendering/RenderMeter.cpp:
2306         * rendering/RenderMultiColumnBlock.cpp:
2307         * rendering/RenderMultiColumnSet.cpp:
2308         (WebCore::RenderMultiColumnSet::heightAdjustedForSetOffset):
2309         (WebCore::RenderMultiColumnSet::calculateBalancedHeight):
2310         (WebCore::RenderMultiColumnSet::updateLogicalWidth):
2311         * rendering/RenderNamedFlowFragment.cpp:
2312         * rendering/RenderObject.cpp:
2313         (WebCore::RenderObject::drawLineForBoxSide):
2314         (WebCore::RenderObject::repaintAfterLayoutIfNeeded):
2315         (WebCore::RenderObject::caretMaxOffset):
2316         * rendering/RenderProgress.cpp:
2317         * rendering/RenderRegion.cpp:
2318         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
2319         * rendering/RenderReplaced.cpp:
2320         (WebCore::RenderReplaced::shouldPaint):
2321         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
2322         (WebCore::RenderReplaced::computePreferredLogicalWidths):
2323         * rendering/RenderRubyBase.cpp:
2324         * rendering/RenderRubyRun.cpp:
2325         (WebCore::RenderRubyRun::getOverhang):
2326         * rendering/RenderRubyText.cpp:
2327         (WebCore::RenderRubyText::adjustInlineDirectionLineBounds):
2328         * rendering/RenderScrollbarPart.cpp:
2329         (WebCore::RenderScrollbarPart::computeScrollbarWidth):
2330         (WebCore::RenderScrollbarPart::computeScrollbarHeight):
2331         * rendering/RenderSearchField.cpp:
2332         (WebCore::RenderSearchField::computeControlLogicalHeight):
2333         * rendering/RenderTable.cpp:
2334         (WebCore::RenderTable::updateLogicalWidth):
2335         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
2336         (WebCore::RenderTable::layout):
2337         (WebCore::RenderTable::computePreferredLogicalWidths):
2338         (WebCore::RenderTable::calcBorderStart):
2339         (WebCore::RenderTable::calcBorderEnd):
2340         (WebCore::RenderTable::outerBorderBefore):
2341         (WebCore::RenderTable::outerBorderAfter):
2342         (WebCore::RenderTable::outerBorderStart):
2343         (WebCore::RenderTable::outerBorderEnd):
2344         * rendering/RenderTableCell.cpp:
2345         (WebCore::RenderTableCell::parseColSpanFromDOM):
2346         (WebCore::RenderTableCell::parseRowSpanFromDOM):
2347         (WebCore::RenderTableCell::logicalWidthFromColumns):
2348         (WebCore::RenderTableCell::computePreferredLogicalWidths):
2349         (WebCore::RenderTableCell::layout):
2350         (WebCore::RenderTableCell::setOverrideLogicalContentHeightFromRowHeight):
2351         (WebCore::RenderTableCell::clippedOverflowRectForRepaint):
2352         (WebCore::RenderTableCell::alignLeftRightBorderPaintRect):
2353         (WebCore::RenderTableCell::alignTopBottomBorderPaintRect):
2354         * rendering/RenderTableSection.cpp:
2355         (WebCore::RenderTableSection::ensureRows):
2356         (WebCore::RenderTableSection::calcRowLogicalHeight):
2357         (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
2358         (WebCore::RenderTableSection::layoutRows):
2359         (WebCore::RenderTableSection::firstLineBaseline):
2360         (WebCore::RenderTableSection::removeCachedCollapsedBorders):
2361         (WebCore::RenderTableSection::setCachedCollapsedBorder):
2362         (WebCore::RenderTableSection::cachedCollapsedBorder):
2363         * rendering/RenderText.cpp:
2364         (WebCore::makeCapitalized):
2365         (WebCore::RenderText::absoluteRectsForRange):
2366         (WebCore::RenderText::absoluteQuadsForRange):
2367         (WebCore::maxWordFragmentWidth):
2368         (WebCore::RenderText::computePreferredLogicalWidths):
2369         * rendering/RenderTextControl.cpp:
2370         (WebCore::RenderTextControl::computePreferredLogicalWidths):
2371         * rendering/RenderTextControlSingleLine.cpp:
2372         * rendering/RenderThemeMac.mm:
2373         (WebCore::RenderThemeMac::paintProgressBar):
2374         (WebCore::RenderThemeMac::paintMenuListButton):
2375         * rendering/RenderWidget.cpp:
2376         * rendering/RootInlineBox.cpp:
2377         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
2378         (WebCore::RootInlineBox::beforeAnnotationsAdjustment):
2379         (WebCore::RootInlineBox::selectionTopAdjustedForPrecedingBlock):
2380         (WebCore::RootInlineBox::blockDirectionPointInLine):
2381         (WebCore::RootInlineBox::paddedLayoutOverflowRect):
2382         (WebCore::setAscentAndDescent):
2383         (WebCore::RootInlineBox::ascentAndDescentForBox):
2384         * rendering/mathml/RenderMathMLRoot.cpp:
2385         (WebCore::RenderMathMLRoot::layout):
2386         * rendering/style/RenderStyle.cpp:
2387         (WebCore::calcConstraintScaleFor):
2388         (WebCore::RenderStyle::setFontSize):
2389         (WebCore::RenderStyle::getShadowExtent):
2390         (WebCore::RenderStyle::getShadowInsetExtent):
2391         (WebCore::RenderStyle::getShadowHorizontalExtent):
2392         (WebCore::RenderStyle::getShadowVerticalExtent):
2393         * rendering/style/SVGRenderStyle.cpp:
2394         * rendering/style/ShadowData.cpp:
2395         (WebCore::calculateShadowExtent):
2396         * rendering/svg/RenderSVGResourceFilter.cpp:
2397         * rendering/svg/RenderSVGRoot.cpp:
2398         * rendering/svg/SVGInlineFlowBox.cpp:
2399         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
2400         * rendering/svg/SVGInlineTextBox.cpp:
2401         (WebCore::SVGInlineTextBox::localSelectionRect):
2402         * svg/SVGAnimatedNumber.cpp:
2403         * svg/SVGAnimatedNumberOptionalNumber.cpp:
2404         * svg/animation/SMILTimeContainer.cpp:
2405         (WebCore::SMILTimeContainer::startTimer):
2406         (WebCore::SMILTimeContainer::updateAnimations):
2407         * svg/animation/SVGSMILElement.cpp:
2408         (WebCore::SVGSMILElement::simpleDuration):
2409         (WebCore::SVGSMILElement::repeatingDuration):
2410         (WebCore::SVGSMILElement::resolveActiveEnd):
2411         (WebCore::SVGSMILElement::resolveInterval):
2412         (WebCore::SVGSMILElement::resolveFirstInterval):
2413         (WebCore::SVGSMILElement::resolveNextInterval):
2414         (WebCore::SVGSMILElement::calculateAnimationPercentAndRepeat):
2415         * xml/XMLTreeViewer.cpp:
2416         * xml/parser/XMLDocumentParser.cpp:
2417         * xml/parser/XMLDocumentParserLibxml2.cpp:
2418         (WebCore::OffsetBuffer::readOutBytes):
2419
2420 2013-11-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2421
2422         [AX] Clean up static_cast<> to cast from AccessibilityObject 
2423         https://bugs.webkit.org/show_bug.cgi?id=124032
2424
2425         Reviewed by Mario Sanchez Prada.
2426
2427         ACCESSIBILITY_OBJECT_TYPE_CASTS can support more helpful casting functions.
2428         So, we need to use them as much as possible. This patch cleans up all static_cast<> in accessibility.
2429
2430         This patch generates toAccessibilityFoo() in order to replace static_cast<> with it. Below toAccessibilityFoo()
2431         are generated.
2432
2433         - toAccessibilityARIAGridRow()
2434         - toAccessibilityImageMapLink()
2435         - toAccessibilityListBox()
2436         - toAccessibilityListBoxOption()
2437         - toAccessibilityMenuListOption()
2438         - toAccessibilityMenuListPopup()
2439         - toAccessibilityScrollbar()
2440         - toAccessibilitySlider()
2441
2442         No new tests, no behavior changes.
2443
2444         * accessibility/AXObjectCache.cpp:
2445         (WebCore::AXObjectCache::focusedImageMapUIElement):
2446         * accessibility/AccessibilityARIAGridRow.h:
2447         * accessibility/AccessibilityImageMapLink.h:
2448         * accessibility/AccessibilityListBox.cpp:
2449         (WebCore::AccessibilityListBox::setSelectedChildren):
2450         (WebCore::AccessibilityListBox::selectedChildren):
2451         (WebCore::AccessibilityListBox::listBoxOptionAccessibilityObject):
2452         * accessibility/AccessibilityListBox.h:
2453         * accessibility/AccessibilityListBoxOption.h:
2454         * accessibility/AccessibilityMenuList.cpp:
2455         (WebCore::AccessibilityMenuList::addChildren):
2456         (WebCore::AccessibilityMenuList::didUpdateActiveOption):
2457         * accessibility/AccessibilityMenuListOption.h:
2458         * accessibility/AccessibilityMenuListPopup.cpp:
2459         (WebCore::AccessibilityMenuListPopup::menuListOptionAccessibilityObject):
2460         * accessibility/AccessibilityMenuListPopup.h:
2461         * accessibility/AccessibilityObject.h:
2462         (WebCore::AccessibilityObject::isListBoxOption):
2463         (WebCore::AccessibilityObject::isSliderThumb):
2464         * accessibility/AccessibilityRenderObject.cpp:
2465         (WebCore::AccessibilityRenderObject::getDocumentLinks):
2466         (WebCore::AccessibilityRenderObject::addImageMapChildren):
2467         (WebCore::AccessibilityRenderObject::addTextFieldChildren):
2468         * accessibility/AccessibilityScrollView.cpp:
2469         (WebCore::AccessibilityScrollView::addChildScrollbar):
2470         * accessibility/AccessibilityScrollbar.h:
2471         * accessibility/AccessibilitySlider.cpp:
2472         (WebCore::AccessibilitySlider::addChildren):
2473         * accessibility/AccessibilitySlider.h:
2474         * accessibility/AccessibilitySpinButton.cpp:
2475         (WebCore::AccessibilitySpinButton::addChildren):
2476         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
2477         (webkitAccessibleSelectionClearSelection):
2478         (webkitAccessibleSelectionSelectAllSelection):
2479         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2480         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2481         (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
2482         * rendering/RenderMenuList.cpp:
2483         (WebCore::RenderMenuList::didUpdateActiveOption):
2484
2485 2013-11-10  Andreas Kling  <akling@apple.com>
2486
2487         Rebaseline bindings tests after r158997.
2488
2489         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2490
2491 2013-11-10  Brendan Long  <b.long@cablelabs.com>
2492
2493         [GStreamer] Consolidate more code into TrackPrivateBaseGStreamer
2494         https://bugs.webkit.org/show_bug.cgi?id=124020
2495
2496         Reviewed by Philippe Normand.
2497
2498         No new tests because this is just refactoring.
2499
2500         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
2501         (WebCore::AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer): Don't pass playbin to TrackPrivateBaseGStreamer, and do pass a pointer to "this".
2502         (WebCore::AudioTrackPrivateGStreamer::disconnect): Clear m_playbin().
2503         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: Move labelChanged() and languageChanged() to TrackPrivateBaseGStreamer. Move m_playbin to this class (along with disconnect() to clear it).
2504         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: Move tag handling, pad and index to TrackPrivateBaseGStreamer.
2505         (WebCore::textTrackPrivateEventCallback):
2506         (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
2507         (WebCore::InbandTextTrackPrivateGStreamer::disconnect):
2508         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
2509         * platform/graphics/gstreamer/TextCombinerGStreamer.cpp: Add WebKitTextCombinerPad with "tags" property, set in the same was as input-selector's pads.
2510         (webkit_text_combiner_pad_init): Initialize tags to 0.
2511         (webkitTextCombinerPadFinalize): Clear tags.
2512         (webkitTextCombinerPadGetProperty): Handling "tags" property.
2513         (webkitTextCombinerPadEvent): Changed to be a pad event function instead of a pad probe, and now intercepts tags and merges them (like input-selector pads do).
2514         (webkitTextCombinerRequestNewPad): Using WebKitTextCombinerPad instead of just GhostPad.
2515         (webkit_text_combiner_pad_class_init): Setup WebKitTextCombinerPad.
2516         * platform/graphics/gstreamer/TextCombinerGStreamer.h: Remove superfluous code.
2517         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2518         (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): Use "notify::active" so we don't need a playbin, and immediately check for tags after the constructor.
2519         (WebCore::TrackPrivateBaseGStreamer::disconnect): Remove m_playbin.
2520         (WebCore::TrackPrivateBaseGStreamer::getTag): Refactored out from notifyTrackOfTagsChanged.
2521         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Simplify using m_owner (so we can call labelChanged() and languageChanged() directly), and use getTag() above.
2522         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: Add m_owner to we can access the owning track, and change some functions to match our needs better.
2523         (WebCore::TrackPrivateBaseGStreamer::setActive): Add empty default since InbandTextTrackPrivateGStreamer doesn't need this.
2524         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: Same as AudioTrackPrivateGStreamer.
2525         (WebCore::VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer):
2526         (WebCore::VideoTrackPrivateGStreamer::disconnect):
2527         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: Same as AudioTrackPrivateGStreamer.
2528
2529 2013-11-10  Andreas Kling  <akling@apple.com>
2530
2531         Generate type casting helpers for Widget classes.
2532         <https://webkit.org/b/124120>
2533
2534         Add a WIDGET_TYPE_CASTS macro and replace all the hand-written
2535         toFoo() helpers we had for Widget subclasses. Fixed up a handful
2536         of places that were still using static_cast.
2537
2538         Reviewed by Antti Koivisto.
2539
2540 2013-11-10  Andreas Kling  <akling@apple.com>
2541
2542         Remove unused FragmentationDisabler class.
2543         <https://webkit.org/b/124118>
2544
2545         This RAII object was added in r144744 to avoid a crash when using
2546         MathML inside CSS regions. Its only user was removed in r157070.
2547
2548         Reviewed by Antti Koivisto.
2549
2550 2013-11-10  Andreas Kling  <akling@apple.com>
2551
2552         Simplify some is-this-a-MathML-element? checks.
2553         <https://webkit.org/b/124119>
2554
2555         As of r158198, the MathML-ness of an Element is determined by
2556         a Node flag, so there's no need to cast to Element before checking
2557         on this. Simplify accordingly.
2558
2559         Reviewed by Antti Koivisto.
2560
2561 2013-11-10  Andreas Kling  <akling@apple.com>
2562
2563         Remove RenderTheme::shouldOpenPickerWithF4Key().
2564
2565         Rubber-stamped by Anders Carlsson.
2566
2567 2013-11-09  Andreas Kling  <akling@apple.com>
2568
2569         CSSValuePool::createFontFamilyValue() should return PassRef.
2570         <https://webkit.org/b/124114>
2571
2572         Unlike createFontFaceValue(), createFontFamilyValue() can never
2573         fail to return an object and thus should return PassRef.
2574
2575         Reviewed by Anders Carlsson.
2576
2577 2013-11-09  Andreas Kling  <akling@apple.com>
2578
2579         RenderIFrame should display its name correctly in DRT output.
2580         <https://webkit.org/b/124117>
2581
2582         Nuke an age-old FIXME about making RenderIFrame show its true name
2583         in DRT output. No more "RenderPartObject {IFRAME}"!
2584
2585         Reviewed by Anders Carlsson.
2586
2587 2013-11-09  Andreas Kling  <akling@apple.com>
2588
2589         SVGTextMetricsBuilder::walkTree() should take a RenderElement.
2590         <https://webkit.org/b/124105>
2591
2592         Make walkTree() take a RenderElement so we can use the non-virtual
2593         firstChild() internally. All call sites had pointers to compatible
2594         objects already.
2595
2596         Reviewed by Anders Carlsson.
2597
2598 2013-11-09  Andreas Kling  <akling@apple.com>
2599
2600         RenderMathMLFenced should pass around operators in tighter types.
2601         <https://webkit.org/b/124115>
2602
2603         Store operator renderers in RenderMathMLOperator pointers instead
2604         of passing them around as RenderObject.
2605
2606         Reviewed by Martin Robinson.
2607
2608 2013-11-09  Andreas Kling  <akling@apple.com>
2609
2610         Use RENDER_OBJECT_TYPE_CASTS for more types.
2611         <https://webkit.org/b/124112>
2612
2613         Generate toRenderFoo() type casting helpers for these classes:
2614
2615             - RenderCombineText
2616             - RenderDetailsMarker
2617             - RenderListMarker
2618             - RenderVideo
2619             - RenderView
2620
2621         Reviewed by Anders Carlsson.
2622
2623 2013-11-09  Andreas Kling  <akling@apple.com>
2624
2625         Move MathML type checking virtuals to RenderObject.
2626         <https://webkit.org/b/124111>
2627
2628         Previously, checking the type of a MathML renderer would require
2629         that you first check if it's a RenderMathMLBlock, and then casting
2630         to that type to access the check you really wanted.
2631
2632         This change moves all the isRenderMathMLFoo() virtual functions
2633         to RenderObject. I also made sure all the overloads were private
2634         and marked them OVERRIDE/FINAL as appropriate.
2635
2636         Finally I replaced all the hand-written casting functions with
2637         autogenerated ones using RENDER_OBJECT_TYPE_CASTS.
2638
2639         Reviewed by Anders Carlsson.
2640
2641 2013-11-09  Martin Robinson  <mrobinson@igalia.com>
2642
2643         [MathML] Poor spacing around delimiters in MathML Torture Test 14
2644         https://bugs.webkit.org/show_bug.cgi?id=122837
2645
2646         Reviewed by Brent Fulgham.
2647
2648         Instead of stretching the vertical bar with the stretchable version, just repeat
2649         the normal vertical bar. This follows what Gecko does when rendering tall vertical
2650         bars and also works around an issue with STIX fonts leading to poor spacing in
2651         formulas.
2652
2653         * rendering/mathml/RenderMathMLOperator.cpp: Stretch the vertical bar with the
2654         normal variant.
2655
2656 2013-11-09  Anders Carlsson  <andersca@apple.com>
2657
2658         Encode form data using the KeyedEncoder
2659         https://bugs.webkit.org/show_bug.cgi?id=124107
2660
2661         Reviewed by Sam Weinig.
2662
2663         * platform/KeyedCoding.h:
2664         (WebCore::KeyedEncoder::encodeEnum):
2665         * platform/network/FormData.cpp:
2666         (WebCore::encodeElement):
2667         (WebCore::FormData::encode):
2668         * platform/network/FormData.h:
2669
2670 2013-11-09  Sam Weinig  <sam@webkit.org>
2671
2672         Modernize CanvasObserverProxy
2673         https://bugs.webkit.org/show_bug.cgi?id=124106
2674
2675         Reviewed by Anders Carlsson.
2676
2677         * css/CSSCanvasValue.h:
2678
2679 2013-11-09  Patrick Gansterer  <paroga@webkit.org>
2680
2681         Move RunLoop from WebCore to WTF
2682         https://bugs.webkit.org/show_bug.cgi?id=116606
2683
2684         Reviewed by Anders Carlsson.
2685
2686         * CMakeLists.txt:
2687         * GNUmakefile.list.am:
2688         * PlatformBlackBerry.cmake:
2689         * PlatformEfl.cmake:
2690         * PlatformGTK.cmake:
2691         * PlatformWin.cmake:
2692         * WebCore.exp.in:
2693         * WebCore.vcxproj/WebCore.vcxproj:
2694         * WebCore.xcodeproj/project.pbxproj:
2695         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2696         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
2697
2698 2013-11-09  Andreas Kling  <akling@apple.com>
2699
2700         Tighten typing in SVGResourcesCycleSolver a bit.
2701         <https://webkit.org/b/124104>
2702
2703         Make the SVGResourcesCycleSolver constructor take a RenderElement&
2704         and a SVGResources&.
2705
2706         While I was in the neighborhood, also converted one loop to use a
2707         renderer iterator instead of walking siblings manually.
2708
2709         Finally used "auto" to clean up some overly wordy loops.
2710
2711         Reviewed by Anders Carlsson.
2712
2713 2013-11-09  Andreas Kling  <akling@apple.com>
2714
2715         Beat SVGRenderSupport with the RenderElement stick.
2716         <https://webkit.org/b/124102>
2717
2718         Tighten up all the SVGRenderSupport helper functions by making them
2719         take const RenderElements references instead of raw RenderObject
2720         pointers as much as possible.
2721
2722         This tunes up a bunch of branchy style() calls.
2723
2724         The patch looks big but it's mostly mechanical. I just changed the
2725         signatures and then worked backwards until everything built again.
2726
2727         Reviewed by Antti Koivisto.
2728
2729 2013-11-09  Andreas Kling  <akling@apple.com>
2730
2731         SVGTextLayoutAttributes always has a RenderSVGInlineText.
2732         <https://webkit.org/b/124101>
2733
2734         No SVGTextLayoutAttributes object is without a RenderSVGInlineText
2735         "context" so make context() return a reference.
2736
2737         Reviewed by Antti Koivisto.
2738
2739 2013-11-09  Andreas Kling  <akling@apple.com>
2740
2741         Move BindingSecurity stuff under JSDOMBinding umbrella.
2742         <https://webkit.org/b/124099>
2743
2744         We are hitting shouldAllowAccessToDOMWindow() pretty hard on the
2745         demo here: <http://www.jasondavies.com/maps/rotate/>
2746
2747         Putting it together with the rest of the JSDOMBinding code takes
2748         CPU time spent in there from 8.7% to 6.5%. The abstraction was
2749         only used to support alternate JS engines in the past.
2750
2751         Reviewed by Antti Koivisto.
2752
2753 2013-11-08  Brady Eidson  <beidson@apple.com>
2754
2755         Merge IDBDatabaseBackendInterface and IDBDatabaseBackendImpl
2756         https://bugs.webkit.org/show_bug.cgi?id=124088
2757
2758         Reviewed by Tim Horton.
2759 +
2760         * CMakeLists.txt:
2761         * GNUmakefile.list.am:
2762         * WebCore.vcxproj/WebCore.vcxproj:
2763         * WebCore.xcodeproj/project.pbxproj:
2764
2765         * Modules/indexeddb/IDBDatabaseBackendInterface.h: Removed.
2766
2767         * Modules/indexeddb/IDBDatabaseBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.cpp.
2768         * Modules/indexeddb/IDBDatabaseBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBDatabaseBackendImpl.h.
2769
2770         * Modules/indexeddb/IDBBackingStoreInterface.h:
2771         * Modules/indexeddb/IDBCallbacks.h:
2772         * Modules/indexeddb/IDBCursor.cpp:
2773         * Modules/indexeddb/IDBCursorBackend.cpp:
2774         * Modules/indexeddb/IDBCursorBackend.h:
2775         * Modules/indexeddb/IDBDatabase.cpp:
2776         * Modules/indexeddb/IDBDatabase.h:
2777         * Modules/indexeddb/IDBFactoryBackendInterface.h:
2778         * Modules/indexeddb/IDBIndex.cpp:
2779         * Modules/indexeddb/IDBIndex.h:
2780         * Modules/indexeddb/IDBIndexWriter.h:
2781         * Modules/indexeddb/IDBObjectStore.cpp:
2782         * Modules/indexeddb/IDBObjectStore.h:
2783         * Modules/indexeddb/IDBOpenDBRequest.cpp:
2784         * Modules/indexeddb/IDBOpenDBRequest.h:
2785         * Modules/indexeddb/IDBPendingDeleteCall.h:
2786         * Modules/indexeddb/IDBRequest.cpp:
2787         * Modules/indexeddb/IDBRequest.h:
2788         * Modules/indexeddb/IDBTransaction.cpp:
2789         * Modules/indexeddb/IDBTransaction.h:
2790         * Modules/indexeddb/IDBTransactionBackend.cpp:
2791         * Modules/indexeddb/IDBTransactionBackend.h:
2792         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
2793         * Modules/indexeddb/IDBTransactionBackendOperations.h:
2794         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2795         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2796         * Modules/indexeddb/leveldb/IDBLevelDBCoding.cpp:
2797         * Modules/indexeddb/leveldb/IDBLevelDBCoding.h:
2798
2799 2013-11-08  Andreas Kling  <akling@apple.com>
2800
2801         Reindent JSDOMBinding.h (finally.)
2802
2803         Rubber-stamped by Sam Weinig.
2804
2805 2013-11-08  Sam Weinig  <sam@webkit.org>
2806
2807         Change collectStyleForPresentationAttribute and related functions to take a MutableStylePropertySet by reference
2808         https://bugs.webkit.org/show_bug.cgi?id=124096
2809
2810         Reviewed by Andreas Kling.
2811
2812         Pass MutableStylePropertySet by reference. It is never null.
2813
2814 2013-11-08  Anders Carlsson  <andersca@apple.com>
2815
2816         Implement encoding of arrays of objects
2817         https://bugs.webkit.org/show_bug.cgi?id=124091
2818
2819         Reviewed by Beth Dakin.
2820
2821         * history/HistoryItem.cpp:
2822         (WebCore::HistoryItem::encodeBackForwardTreeNode):
2823         Encode the rest of the members.
2824
2825         * platform/KeyedCoding.h:
2826         (WebCore::KeyedEncoder::encodeObjects):
2827         Call beginArray, then beginArrayElement/endArrayElement for every element and lastly endArray.
2828
2829 2013-11-08  Tim Horton  <timothy_horton@apple.com>
2830
2831         Remote Layer Tree: RemoteLayerBackingStore partial repaint is broken for the tile cache
2832         https://bugs.webkit.org/show_bug.cgi?id=123944
2833
2834         Reviewed by Simon Fraser.
2835
2836         Ensure that the tile cache retrieves repaint rects from the tile layer,
2837         not from the tiled backing layer.
2838
2839         * platform/graphics/ca/PlatformCALayer.h:
2840         * platform/graphics/ca/mac/PlatformCALayerMac.h:
2841         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2842         (PlatformCALayerMac::enumerateRectsBeingDrawn):
2843         Allow the PlatformCALayer to decide how to enumerate rects to paint.
2844
2845         * WebCore.exp.in:
2846         * platform/graphics/mac/WebLayer.h:
2847         Add RepaintRectList, remove some unnecessary WebCore::s.
2848
2849         * platform/graphics/mac/WebLayer.mm:
2850         (WebCore::collectRectsToPaint):
2851         Factor collectRectsToPaint out; it just grabs the rects from
2852         the layer and makes the decision whether to repaint the bounds
2853         of the dirty region or just the subregions.
2854
2855         Move calls to collectRectsToPaint() to callers of drawLayerContents(),
2856         so that TileController can collect rects from the appropriate source
2857         (the Tile layer) and other layers just continue grabbing them from
2858         their relevant layers.
2859
2860         Make sure that the list that comes from collectRectsToPaint() always
2861         has at least one rect in it (appending the clip bounds if we don't
2862         want to repaint subregions) so we can simplify logic in drawLayerContents.
2863
2864         (WebCore::drawLayerContents):
2865         Remove code to support CompositingCoordinatesBottomUp, as it's only
2866         used on Windows, so this Mac-specific code doesn't need to support it.
2867
2868         Simplify logic given that dirtyRects will always be non-empty.
2869
2870         (-[WebLayer drawInContext:]):
2871         (-[WebSimpleLayer setNeedsDisplayInRect:]):
2872         * platform/graphics/ca/mac/TileController.mm:
2873         (WebCore::TileController::platformCALayerPaintContents):
2874         Adopt collectRectsToPaint.
2875
2876 2013-11-08  Anders Carlsson  <andersca@apple.com>
2877
2878         Implement more KeyedEncoder functionality
2879         https://bugs.webkit.org/show_bug.cgi?id=124089
2880
2881         Reviewed by Beth Dakin.
2882
2883         * bindings/js/SerializedScriptValue.h:
2884         * history/HistoryItem.cpp:
2885         (WebCore::HistoryItem::encodeBackForwardTreeNode):
2886         * platform/KeyedCoding.h:
2887         (WebCore::KeyedEncoder::encodeConditionalObject):
2888
2889 2013-11-08  Eric Carlson  <eric.carlson@apple.com>
2890
2891         getCueAsHTML() on an empty cue should return a document fragment
2892         https://bugs.webkit.org/show_bug.cgi?id=124084
2893
2894         Reviewed by Darin Adler.
2895
2896         Test: media/track/track-cue-empty-cue-text.html
2897
2898         * html/track/WebVTTParser.cpp:
2899         (WebCore::WebVTTParser::createDocumentFragmentFromCueText): Don't return early when the
2900             passed an empty string.
2901
2902 2013-11-08  Anders Carlsson  <andersca@apple.com>
2903
2904         KeyedEncoder should be able to encoder objects
2905         https://bugs.webkit.org/show_bug.cgi?id=124085
2906
2907         Reviewed by Sam Weinig.
2908
2909         * history/HistoryItem.cpp:
2910         (WebCore::HistoryItem::encodeBackForwardTree):
2911         Encode the root object.
2912
2913         (WebCore::HistoryItem::encodeBackForwardTreeNode):
2914         Encode the target.
2915
2916         * history/HistoryItem.h:
2917         Add new members.
2918
2919         * platform/KeyedCoding.h:
2920         (WebCore::KeyedEncoder::encodeObject):
2921         Call beginObject, call the functor and then call endObject().
2922
2923 2013-11-08  Sam Weinig  <sam@webkit.org>
2924
2925         Teach CanvasObserver about references
2926         https://bugs.webkit.org/show_bug.cgi?id=124082
2927
2928         Reviewed by Anders Carlsson.
2929
2930         * css/CSSCanvasValue.cpp:
2931         * css/CSSCanvasValue.h:
2932         * html/HTMLCanvasElement.cpp:
2933         * html/HTMLCanvasElement.h:
2934
2935 2013-11-08  Anders Carlsson  <andersca@apple.com>
2936
2937         Begin stubbing out a KeyedEncoder class in WebCore
2938         https://bugs.webkit.org/show_bug.cgi?id=124079
2939
2940         Reviewed by Sam Weinig.
2941
2942         * WebCore.exp.in:
2943         Add symbol needed by WebCore.
2944
2945         * WebCore.xcodeproj/project.pbxproj:
2946         Add new header file.
2947
2948         * history/HistoryItem.cpp:
2949         (WebCore::HistoryItem::encodeBackForwardTree):
2950         * history/HistoryItem.h:
2951         Add an encodeBackForwardTree overload that takes a KeyedEncoder object. Encode the version.
2952
2953         * platform/KeyedCoding.h:
2954         Add a KeyedEncoder class that just has a single encodeUInt32 member function for now.
2955
2956 2013-11-08  Brady Eidson  <beidson@apple.com>
2957
2958         Merge IDBTransactionBackendInterface and IDBTransactionBackendImpl
2959         https://bugs.webkit.org/show_bug.cgi?id=124077
2960
2961         Reviewed by Alexey Proskuryakov.
2962
2963         The abstraction is no longer needed.
2964
2965         * CMakeLists.txt:
2966         * GNUmakefile.list.am:
2967         * WebCore.xcodeproj/project.pbxproj:
2968
2969         * Modules/indexeddb/IDBTransactionBackendInterface.h: Removed.
2970
2971         * Modules/indexeddb/IDBTransactionBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.cpp.
2972         * Modules/indexeddb/IDBTransactionBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBTransactionBackendImpl.h.
2973
2974         * Modules/indexeddb/IDBBackingStoreInterface.h:
2975         * Modules/indexeddb/IDBCursorBackend.cpp:
2976         * Modules/indexeddb/IDBCursorBackend.h:
2977         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
2978         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
2979         * Modules/indexeddb/IDBFactoryBackendInterface.h:
2980         * Modules/indexeddb/IDBTransactionBackendOperations.h:
2981         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
2982         * Modules/indexeddb/IDBTransactionCoordinator.h:
2983         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
2984         * Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.h:
2985         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
2986         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
2987
2988 2013-11-08  Simon Fraser  <simon.fraser@apple.com>
2989
2990         REGRESSION (r155660): Some Etherpad pages not scrollable with overlay scrollbars
2991         https://bugs.webkit.org/show_bug.cgi?id=124075
2992
2993         Reviewed by Beth Dakin.
2994         
2995         In r155660 I removed some scrollbar-related layouts when scrollbars
2996         are in overlay mode.
2997         
2998         However, ScrollView::updateScrollbars() has a case where we still need
2999         to do multiple pases, related to its "Never ever try to both gain/lose a
3000         scrollbar in the same pass" comment. When we avoid making a new scrollbar
3001         because the other was removed, we need to do another pass to bring the
3002         correct scrollbar back.
3003
3004         Can't test overlay scrollbars in tests.
3005
3006         * platform/ScrollView.cpp:
3007         (WebCore::ScrollView::updateScrollbars):
3008
3009 2013-11-08  Hans Muller  <hmuller@adobe.com>
3010
3011         [CSS Shapes] Image valued shape-outside that extends vertically into the margin-box is top-clipped
3012         https://bugs.webkit.org/show_bug.cgi?id=123769
3013
3014         Reviewed by Dirk Schulze.
3015
3016         Remove the assumption that Y coordinates are >= 0 from the RasterShapeIntervals class
3017         and correct its computeShapeMarginIntervals() method. The computeShapeMarginIntervals()
3018         method now generates intervals with Y coordinates that begin at the image shape's
3019         bounds.y - shape-margin, which may be less than 0.
3020
3021         The RasterShapeIntervals::intervalsAt() method now offsets its Y coordinate parameter
3022         by the shape-margin. A non-const overload of the method was added to centralize all
3023         access to m_intervalLists.
3024
3025         Test: fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-004.html
3026               fast/shapes/shape-outside-floats/shape-outside-floats-image-margin-005.html
3027
3028         * rendering/shapes/RasterShape.cpp:
3029         (WebCore::MarginIntervalGenerator::intervalAt): Don't clip X coordinates to 0 since they can extend into the margin-box.
3030         (WebCore::RasterShapeIntervals::appendInterval): Use the non-const intervalsAt() method.
3031         (WebCore::RasterShapeIntervals::uniteMarginInterval): Ditto.
3032         (WebCore::RasterShapeIntervals::computeShapeMarginIntervals): See above.
3033         * rendering/shapes/RasterShape.h:
3034         (WebCore::RasterShapeIntervals::RasterShapeIntervals): Added a field for the margin.
3035         (WebCore::RasterShapeIntervals::intervalsAt): Offset y coordinates by the margin; added a non-const overload.
3036
3037 2013-11-08  Piotr Grad  <p.grad@samsung.com>
3038
3039         Ended event should work also when playback rate is negative
3040         https://bugs.webkit.org/show_bug.cgi?id=123879
3041
3042         Reviewed by Eric Carlson.
3043
3044         According to W3C specification playback is ended also when playback rate is
3045         negative and position is the earliest possible position.
3046
3047         Test: media/video-ended-event-negative-playback.html
3048
3049         * html/HTMLMediaElement.cpp:
3050         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged):
3051
3052 2013-11-08  Thiago de Barros Lacerda  <thiago.lacerda@openbossa.org>
3053
3054         Checking for TypeError in RTCPeerConnection object creation
3055         https://bugs.webkit.org/show_bug.cgi?id=124049
3056
3057         Reviewed by Eric Carlson.
3058
3059         If invalid parameters are passed on RTCPeerConnection creation we must throw a TypeError exception.
3060         According to the spec it requires a Dictionary argument, the RTCConfiguration, which is mandatory.
3061
3062         Please notice that this patch does not make every tests run as expected,
3063         RTCPeerConnectionHandlerMock needs to be update to deal with contraints.
3064
3065         Existing tests were updated.
3066
3067         * GNUmakefile.list.am:
3068         * Modules/mediastream/RTCPeerConnection.idl:
3069         * UseJSC.cmake:
3070         * WebCore.vcxproj/WebCore.vcxproj:
3071         * WebCore.vcxproj/WebCore.vcxproj.filters:
3072         * WebCore.xcodeproj/project.pbxproj:
3073         * bindings/js/JSRTCPeerConnectionCustom.cpp: Added.
3074         (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
3075
3076 2013-11-08  Bem Jones-Bey  <bjonesbe@adobe.com>
3077
3078         Use references instead of pointers to RenderBlockFlow in FloatingObjects and ComputeFloatOffsetAdapter
3079         https://bugs.webkit.org/show_bug.cgi?id=124074
3080
3081         Reviewed by Sam Weinig.
3082
3083         Just a straightforward conversion from const pointers to const references.
3084
3085         Also, remove unneeded argument from FloatingObjects constructor.
3086
3087         No new tests, no behavior change.
3088
3089         * rendering/FloatingObjects.cpp:
3090         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
3091         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
3092         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
3093         (WebCore::FloatingObjects::FloatingObjects):
3094         (WebCore::FloatingObjects::clearLineBoxTreePointers):
3095         (WebCore::FloatingObjects::computePlacedFloatsTree):
3096         (WebCore::shapeInfoForFloat):
3097         (WebCore::::updateOffsetIfNeeded):
3098         (WebCore::::collectIfNeeded):
3099         (WebCore::::heightRemaining):
3100         * rendering/FloatingObjects.h:
3101         * rendering/RenderBlockFlow.cpp:
3102         (WebCore::RenderBlockFlow::createFloatingObjects):
3103
3104 2013-11-08  Sam Weinig  <sam@webkit.org>
3105
3106         Teach SubframeLoader a bit about references
3107         https://bugs.webkit.org/show_bug.cgi?id=124076
3108
3109         Reviewed by Anders Carlsson.
3110
3111         * html/HTMLAppletElement.cpp:
3112         * html/HTMLFrameElementBase.cpp:
3113         * html/HTMLMediaElement.cpp:
3114         * loader/SubframeLoader.cpp:
3115         * loader/SubframeLoader.h:
3116
3117 2013-11-08  Brady Eidson  <beidson@apple.com>
3118
3119         Blind Windows build-fix attempt after r158959
3120
3121         * WebCore.vcxproj/WebCore.vcxproj:
3122
3123 2013-11-08  Brady Eidson  <beidson@apple.com>
3124
3125         Merge IDBCursorBackendInterface and IDBCursorBackendImpl
3126         https://bugs.webkit.org/show_bug.cgi?id=124068
3127
3128         Reviewed by Anders Carlsson.
3129
3130         * CMakeLists.txt:
3131         * GNUmakefile.list.am:
3132         * WebCore.xcodeproj/project.pbxproj:
3133
3134         * Modules/indexeddb/IDBCursorBackendInterface.h: Removed.
3135
3136         * Modules/indexeddb/IDBCursorBackend.cpp: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.cpp.
3137         * Modules/indexeddb/IDBCursorBackend.h: Renamed from Source/WebCore/Modules/indexeddb/IDBCursorBackendImpl.h.
3138
3139         * Modules/indexeddb/IDBCallbacks.h:
3140         * Modules/indexeddb/IDBCursor.cpp:
3141         * Modules/indexeddb/IDBCursor.h:
3142         * Modules/indexeddb/IDBCursorWithValue.cpp:
3143         * Modules/indexeddb/IDBCursorWithValue.h:
3144         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
3145         * Modules/indexeddb/IDBFactoryBackendInterface.h:
3146         * Modules/indexeddb/IDBRequest.cpp:
3147         * Modules/indexeddb/IDBRequest.h:
3148         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
3149         * Modules/indexeddb/IDBTransactionBackendImpl.h:
3150         * Modules/indexeddb/IDBTransactionBackendInterface.h:
3151         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
3152         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:
3153         * Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.h:
3154
3155 2013-11-08  Sam Weinig  <sam@webkit.org>
3156
3157         Modernize FrameLoader a bit
3158         https://bugs.webkit.org/show_bug.cgi?id=124073
3159
3160         Reviewed by Anders Carlsson.
3161
3162         * loader/FrameLoader.cpp:
3163         * loader/FrameLoader.h:
3164         Use std::unique_ptrs rather than OwnPtrs.
3165
3166         * loader/MixedContentChecker.cpp:
3167         * loader/MixedContentChecker.h:
3168         Switch to hold a Frame& rather than Frame*.
3169
3170 2013-11-08  Zan Dobersek  <zdobersek@igalia.com>
3171
3172         Remove code guarded with ENABLE(STREAM)
3173         https://bugs.webkit.org/show_bug.cgi?id=123667
3174
3175         Reviewed by Anders Carlsson.
3176
3177         Remove ENABLE(STREAM)-guarded code. This was added in the effort to provide Stream API support, but
3178         no port enables the feature and the work on this feature has wound down after the Chromium port forked,
3179         leaving this code unmaintained.
3180
3181         * fileapi/FileReaderLoader.cpp:
3182         * fileapi/FileReaderLoader.h:
3183
3184 2013-11-08  Bem Jones-Bey  <bjonesbe@adobe.com>
3185
3186         RenderBlockFlow::nextFloatLogicalBottomBelow should not use ShapeOutsideFloatOffsetMode
3187         https://bugs.webkit.org/show_bug.cgi?id=123931
3188
3189         Reviewed by Sam Weinig.
3190
3191         Rewrite nextFloatLogicalBottomBelow to use the placed floats tree for
3192         the search and to not need ShapeOutsideFloatOffsetMode anymore. This
3193         moves almost all of the logic into FloatingObjects, making a small
3194         reduction in the amount that RenderBlockFlow needs to know about the
3195         implementation of FloatingObjects.
3196
3197         In addition, change ComputeFloatOffsetAdapter to take in LayoutUnits
3198         and roundToInt itself so that all of it's callers can be simplified.
3199
3200         No new tests, no new behavior.
3201
3202         * rendering/FloatingObjects.cpp:
3203         (WebCore::rangesIntersect):
3204         (WebCore::ComputeFloatOffsetAdapter::ComputeFloatOffsetAdapter):
3205         (WebCore::FindNextFloatLogicalBottomAdapter::FindNextFloatLogicalBottomAdapter):
3206         (WebCore::FindNextFloatLogicalBottomAdapter::lowValue):
3207         (WebCore::FindNextFloatLogicalBottomAdapter::highValue):
3208         (WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom):
3209         (WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom):
3210         (WebCore::FindNextFloatLogicalBottomAdapter::collectIfNeeded):
3211         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelow):
3212         (WebCore::FloatingObjects::findNextFloatLogicalBottomBelowForBlock):
3213         (WebCore::FloatingObjects::logicalLeftOffsetForPositioningFloat):
3214         (WebCore::FloatingObjects::logicalRightOffsetForPositioningFloat):
3215         (WebCore::FloatingObjects::logicalLeftOffset):
3216         (WebCore::FloatingObjects::logicalRightOffset):
3217         * rendering/FloatingObjects.h:
3218         * rendering/LineWidth.cpp:
3219         (WebCore::LineWidth::fitBelowFloats):
3220         * rendering/RenderBlockFlow.cpp:
3221         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelow):
3222         (WebCore::RenderBlockFlow::nextFloatLogicalBottomBelowForBlock):
3223         (WebCore::RenderBlockFlow::getClearDelta):
3224         * rendering/RenderBlockFlow.h:
3225
3226 2013-11-08  Alexey Proskuryakov  <ap@apple.com>
3227
3228         https://bugs.webkit.org/show_bug.cgi?id=124064
3229         Some WebCrypto files are not in correct directories
3230
3231         Rubber-stamped by Anders Carlsson.
3232
3233         * WebCore.xcodeproj/project.pbxproj:
3234         * crypto/CryptoAlgorithmAesCbcParams.h: Removed.
3235         * crypto/CryptoAlgorithmAesKeyGenParams.h: Removed.
3236         * crypto/CryptoKeyAES.cpp: Removed.
3237         * crypto/CryptoKeyAES.h: Removed.
3238         * crypto/CryptoKeyMac.cpp: Removed.
3239         * crypto/keys/CryptoKeyAES.cpp: Copied from Source/WebCore/crypto/CryptoKeyAES.cpp.
3240         * crypto/keys/CryptoKeyAES.h: Copied from Source/WebCore/crypto/CryptoKeyAES.h.
3241         * crypto/mac/CryptoKeyMac.cpp: Copied from Source/WebCore/crypto/CryptoKeyMac.cpp.
3242         * crypto/parameters/CryptoAlgorithmAesCbcParams.h: Copied from Source/WebCore/crypto/CryptoAlgorithmAesCbcParams.h.
3243         * crypto/parameters/CryptoAlgorithmAesKeyGenParams.h: Copied from Source/WebCore/crypto/CryptoAlgorithmAesKeyGenParams.h.
3244
3245 2013-11-08  Alexey Proskuryakov  <ap@apple.com>
3246
3247         Implement JWK key import for HMAC and AES-CBC
3248         https://bugs.webkit.org/show_bug.cgi?id=124059
3249
3250         Reviewed by Anders Carlsson.
3251
3252         Tests: crypto/subtle/aes-cbc-import-jwk.html
3253                crypto/subtle/hmac-import-jwk.html
3254                crypto/subtle/import-jwk.html
3255
3256         WebCrypto supports multiple key formats - raw, pkcs8, spki, jwk. The design is that
3257         we'll transform these into parsed KeyData subclasses before passing to algorithms.
3258
3259         CryptoKeySerialization is a base class for handling all these formats.
3260
3261         * WebCore.xcodeproj/project.pbxproj: Added new files. Removed CryptoKeyFormat.h.
3262         
3263         * bindings/js/JSCryptoKeySerializationJWK.h: Added.
3264         * bindings/js/JSCryptoKeySerializationJWK.cpp: Added.
3265         (WebCore::getStringFromJSON): A helper. Note that we can rely on the object being
3266         a nice freshly parsed JSON, no getters or anything.
3267         (WebCore::getBooleanFromJSON): Ditto.
3268         (WebCore::JSCryptoKeySerializationJWK::JSCryptoKeySerializationJWK):
3269         (WebCore::JSCryptoKeySerializationJWK::~JSCryptoKeySerializationJWK):
3270         (WebCore::createHMACParameters): A simple helper.
3271         (WebCore::JSCryptoKeySerializationJWK::reconcileAlgorithm): WebCrypto API is weird,
3272         you can have algorithm parameters both inside a JWK key and passed as importKey()
3273         arguments. They need to agree, whatever that means for specific serialization's
3274         algorithm options (not all necessarily have a 1-1 matching to WebCrypto).
3275         (WebCore::JSCryptoKeySerializationJWK::reconcileUsages): Take an intersection of usages.
3276         (WebCore::JSCryptoKeySerializationJWK::reconcileExtractable): Only extractable if
3277         both JWK and the caller agree.
3278         (WebCore::JSCryptoKeySerializationJWK::keySizeIsValid): Verify validity of JWK key.
3279         (WebCore::JSCryptoKeySerializationJWK::keyData): Return an appropriate KeyData
3280         subclass.
3281
3282         * bindings/js/JSSubtleCryptoCustom.cpp:
3283         (WebCore::ENUM_CLASS): Moved CryptoKeyFormat here.
3284         (WebCore::cryptoKeyFormatFromJSValue): Added a human readable string to an exception.
3285         (WebCore::JSSubtleCrypto::importKey): Support multiple key formats, not just raw.
3286
3287         * crypto/CryptoAlgorithm.cpp: (WebCore::CryptoAlgorithm::importKey):
3288         * crypto/CryptoAlgorithm.h:
3289         Updated signature for importKey to one that makes more sense. Decoding formats all
3290         the way from a binary blob is not something that CryptoAlgorithm subclasses should
3291         do, we now pass a KeyData subclass instead.
3292         Removed exportKey/wrapKey/unwrapKey altogether, because I don't yet know what the
3293         signatures will be.
3294
3295         * crypto/CryptoKeyData.h: Added.
3296         (WebCore::CryptoKeyData::ENUM_CLASS):
3297         (WebCore::CryptoKeyData::CryptoKeyData):
3298         (WebCore::CryptoKeyData::~CryptoKeyData):
3299         (WebCore::CryptoKeyData::format):
3300         A base class for passing key material to algorithms. Currently, only one type is
3301         supported, that being OctetSequence for secret keys. Keys for RSA and EC are more
3302         complicated, and secret/public ones are different too.
3303
3304         * crypto/CryptoKeyFormat.h: Removed. There are too many key format classes
3305         confusingly floating around, and this was only needed in one file for parsing.
3306
3307         * crypto/CryptoKeySerialization.h: Added.
3308         Base class for handling raw/pkcs8/spki/jwk keys.
3309
3310         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
3311         (WebCore::CryptoAlgorithmAES_CBC::importKey):
3312         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
3313         Updated to use CryptoKeyData.
3314
3315         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
3316         (WebCore::CryptoAlgorithmHMAC::importKey):
3317         * crypto/algorithms/CryptoAlgorithmHMAC.h:
3318         Updated to use CryptoKeyData.
3319
3320         * crypto/keys/CryptoKeyDataOctetSequence.cpp: Added.
3321         (WebCore::CryptoKeyDataOctetSequence::CryptoKeyDataOctetSequence):
3322         (WebCore::CryptoKeyDataOctetSequence::~CryptoKeyDataOctetSequence):
3323         * crypto/keys/CryptoKeyDataOctetSequence.h: Added.
3324         (WebCore::asCryptoKeyDataOctetSequence):
3325         * crypto/keys/CryptoKeySerializationRaw.cpp: Added.
3326         (WebCore::CryptoKeySerializationRaw::CryptoKeySerializationRaw):
3327         (WebCore::CryptoKeySerializationRaw::~CryptoKeySerializationRaw):
3328         (WebCore::CryptoKeySerializationRaw::reconcileAlgorithm):
3329         (WebCore::CryptoKeySerializationRaw::reconcileUsages):
3330         (WebCore::CryptoKeySerializationRaw::reconcileExtractable):
3331         (WebCore::CryptoKeySerializationRaw::keyData):
3332         * crypto/keys/CryptoKeySerializationRaw.h: Added.
3333         Much code to pass around a Vector<char>.
3334
3335 2013-11-08  Mark Lam  <mark.lam@apple.com>
3336
3337         Move breakpoint (and exception break) functionality into JSC::Debugger.
3338         https://bugs.webkit.org/show_bug.cgi?id=121796.
3339
3340         Reviewed by Geoffrey Garen.
3341
3342         No new tests.
3343
3344         - In ScriptDebugServer and JSC::Debugger, SourceID and BreakpointID are
3345           now numeric tokens.
3346
3347         - JSC::Debugger now tracks user defined breakpoints in a JSC::Breakpoint
3348           record. Previously, this info is tracked in the ScriptBreakpoint record
3349           in ScriptDebugServer. The only element of ScriptBreakpoint that is not
3350           being tracked by JSC::Breakpoint is the ScriptBreakpointAction.
3351              The ScriptBreakpointAction is still tracked by the ScriptDebugServer
3352           in a list keyed on the corresponding BreakpointID.
3353              The ScriptBreakpoint record is now only used as a means of passing
3354           breakpoint paramaters to the ScriptDebugServer.
3355
3356         - ScriptDebugServer now no longer accesses the JSC::CallFrame* directly.
3357           It always goes through the DebuggerCallFrame.
3358
3359         * GNUmakefile.list.am:
3360         * WebCore.vcxproj/WebCore.vcxproj:
3361         * WebCore.vcxproj/WebCore.vcxproj.filters:
3362         * WebCore.xcodeproj/project.pbxproj:
3363         * bindings/js/BreakpointID.h: Added.
3364         * bindings/js/ScriptDebugServer.cpp:
3365         (WebCore::ScriptDebugServer::ScriptDebugServer):
3366         (WebCore::ScriptDebugServer::setBreakpoint):
3367         (WebCore::ScriptDebugServer::removeBreakpoint):
3368         (WebCore::ScriptDebugServer::clearBreakpoints):
3369         (WebCore::ScriptDebugServer::dispatchDidPause):
3370         (WebCore::ScriptDebugServer::dispatchDidContinue):
3371         (WebCore::ScriptDebugServer::dispatchDidParseSource):
3372         (WebCore::ScriptDebugServer::notifyDoneProcessingDebuggerEvents):
3373         (WebCore::ScriptDebugServer::needPauseHandling):
3374         (WebCore::ScriptDebugServer::handleBreakpointHit):
3375         (WebCore::ScriptDebugServer::handleExceptionInBreakpointCondition):
3376         (WebCore::ScriptDebugServer::handlePause):
3377         * bindings/js/ScriptDebugServer.h:
3378         * bindings/js/SourceID.h: Added.
3379         * bindings/js/WorkerScriptDebugServer.cpp:
3380         (WebCore::WorkerScriptDebugServer::WorkerScriptDebugServer):
3381         * bindings/js/WorkerScriptDebugServer.h:
3382         * inspector/InspectorDebuggerAgent.cpp:
3383         (WebCore::InspectorDebuggerAgent::InspectorDebuggerAgent):
3384         (WebCore::parseLocation):
3385         (WebCore::InspectorDebuggerAgent::setBreakpoint):
3386         (WebCore::InspectorDebuggerAgent::continueToLocation):
3387         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
3388         (WebCore::InspectorDebuggerAgent::searchInContent):
3389         (WebCore::InspectorDebuggerAgent::getScriptSource):
3390         (WebCore::InspectorDebuggerAgent::didParseSource):
3391         (WebCore::InspectorDebuggerAgent::didPause):
3392         (WebCore::InspectorDebuggerAgent::clear):
3393         * inspector/InspectorDebuggerAgent.h:
3394         * inspector/ScriptDebugListener.h:
3395
3396 2013-11-08  László Langó  <lango@inf.u-szeged.hu>
3397
3398         InspectorConsoleAgent::didFinishXHRLoading ConsoleMessage should include a column number
3399         https://bugs.webkit.org/show_bug.cgi?id=114316
3400
3401         Reviewed by Timothy Hatcher.
3402
3403         InspectorConsoleAgent::didFinishXHRLoading creates a ConsoleMessage with a line number, 
3404         but it should also include a column number. It looks like ultimately the line number comes from
3405         JSXMLHttpRequest::send, it should also be possible to get the column number at the time.
3406         The column number would be needed by the Web Inspector to jump to the proper place in source code 
3407         to show where the XHR originated from.
3408
3409         * bindings/js/JSXMLHttpRequestCustom.cpp:
3410         (WebCore::SendFunctor::SendFunctor):
3411         (WebCore::SendFunctor::column):
3412         (WebCore::SendFunctor::operator()):
3413         (WebCore::JSXMLHttpRequest::send):
3414         * inspector/InspectorConsoleAgent.cpp:
3415         (WebCore::InspectorConsoleAgent::didFinishXHRLoading):
3416         * inspector/InspectorConsoleAgent.h:
3417         * inspector/InspectorInstrumentation.cpp:
3418         (WebCore::InspectorInstrumentation::didFinishXHRLoadingImpl):
3419         * inspector/InspectorInstrumentation.h:
3420         (WebCore::InspectorInstrumentation::didFinishXHRLoading):
3421         * xml/XMLHttpRequest.cpp:
3422         (WebCore::XMLHttpRequest::XMLHttpRequest):
3423         (WebCore::XMLHttpRequest::setLastSendLineAndColumnNumber):
3424         (WebCore::XMLHttpRequest::didFinishLoading):
3425         * xml/XMLHttpRequest.h:
3426
3427 2013-11-08  Simon Fraser  <simon.fraser@apple.com>
3428
3429         Left sidebar on cubic-bezier.com flickers
3430         https://bugs.webkit.org/show_bug.cgi?id=123128
3431
3432         Reviewed by Dean Jackson.
3433         
3434         The logic that determined whether position:fixed elements outside the viewport
3435         should be composited was incorrect if the fixed element also had a transform.
3436         
3437         layer.calculateLayerBounds() only takes into account painted transforms (since they
3438         affect layer bounds). So we need to compute the bounds relative to the layer
3439         itself, then use localToContainerQuad() to map them to document coordinates,
3440         but only to the RenderView so that we don't hit the page scale transform.
3441
3442         Tests: compositing/layer-creation/fixed-position-transformed-into-view.html
3443                compositing/layer-creation/fixed-position-transformed-outside-view.html
3444
3445         * rendering/RenderLayerCompositor.cpp:
3446         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
3447
3448 2013-11-08  Martin Robinson  <mrobinson@igalia.com>
3449