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