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