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