2011-04-11 Mario Sanchez Prada <msanchez@igalia.com>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-04-11  Mario Sanchez Prada  <msanchez@igalia.com>
2
3         Reviewed by Chris Fleizach.
4
5         [GTK] ARIA tables not exposing cells as HTML tables do
6         https://bugs.webkit.org/show_bug.cgi?id=57463
7
8         Expose cells for ARIA grids consistently with HTML tables in GTK,
9         keeping the same behaviour for the other platforms.
10
11         * accessibility/AccessibilityARIAGrid.cpp:
12         (WebCore::AccessibilityARIAGrid::addChild): Add the row's children
13         to the accessibility hierarchy when accessibility objects for rows
14         are ignoring accessibility, otherwise add the row.
15         (WebCore::AccessibilityARIAGrid::addChildren): Do not check at
16         this point whether every child of the table ignores or not
17         accessibility, letting addChild() make the proper decision later.
18
19         * accessibility/AccessibilityARIAGridCell.cpp:
20         (WebCore::AccessibilityARIAGridCell::parentTable): Consider that
21         rows could be ignoring accessibility, hence the parent could be
22         retrieved in the first call to parentObjectUnignored().
23         (WebCore::AccessibilityARIAGridCell::rowIndexRange): Ditto.
24         (WebCore::AccessibilityARIAGridCell::columnIndexRange): Ditto..
25
26         * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
27         (atkRole): Map ColumnHeader and RowHeader to ATK_ROLE_TABLE_CELL.
28
29 2011-04-11  Sergio Villar Senin  <svillar@igalia.com>
30
31         Reviewed by Martin Robinson.
32
33         [GTK] Fix make distcheck
34         https://bugs.webkit.org/show_bug.cgi?id=58224
35
36         Removed a file that is no longer in the source tree.
37
38         * GNUmakefile.list.am:
39
40 2011-04-11  Dimitri Glazkov  <dglazkov@chromium.org>
41
42         Reviewed by Martin Robinson.
43
44         REGRESSION(r83397): Most GTK media controls are hidden when no valid source is specified
45         https://bugs.webkit.org/show_bug.cgi?id=58204
46
47         Covered by existing tests.
48
49         * platform/gtk/RenderThemeGtk.h:
50         (WebCore::RenderThemeGtk::hasOwnDisabledStateHandlingFor): Let GTK handle
51             the the state of media controls.
52
53 2011-04-11  Dimitri Glazkov  <dglazkov@chromium.org>
54
55         Remove obsolete comment, which was mistakenly landed in r83397.
56
57         Though potentially a work of art, the comment lost its functional meaning a long time ago.
58
59         * html/shadow/MediaControls.cpp:
60         (WebCore::MediaControls::create): Removed comment.
61
62 2011-04-05  Hans Wennborg  <hans@chromium.org>
63
64         Reviewed by Steve Block.
65
66         IndexedDB: Introduce skeleton for LevelDB backend
67         https://bugs.webkit.org/show_bug.cgi?id=57827
68
69         No new tests: no new functionality (yet).
70
71         * WebCore.gyp/WebCore.gyp:
72             Add dependency on leveldb when ENABLE_LEVELDB=1 in feature_defines.
73         * WebCore.gypi:
74             Add new files.
75         * storage/IDBBackingStore.h:
76         (WebCore::IDBBackingStore::ObjectStoreRecordIdentifier::~ObjectStoreRecordIdentifier):
77             Introduce abstract type ObjectStoreRecordIdentifier. The SQLite
78             backend uses integers to refer to a specific row in a table, but
79             the LevelDB backend will use something else.
80         * storage/IDBDatabaseBackendImpl.cpp:
81         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
82         (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal):
83         (WebCore::IDBDatabaseBackendImpl::deleteObjectStoreInternal):
84         (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
85             Change functions to pass along the database id for operations that
86             concern object stores. We want to be able to group object stores
87             ids per database.
88         * storage/IDBFactoryBackendImpl.cpp:
89         (WebCore::IDBFactoryBackendImpl::open):
90             Decide which backend to use based on the backingStoreType
91             parameter.
92         * storage/IDBIndexBackendImpl.cpp:
93         (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
94         (WebCore::IDBIndexBackendImpl::openCursorInternal):
95         (WebCore::IDBIndexBackendImpl::getInternal):
96         (WebCore::IDBIndexBackendImpl::addingKeyAllowed):
97         * storage/IDBIndexBackendImpl.h:
98         (WebCore::IDBIndexBackendImpl::create):
99             Pass database and object store id to backend functions concerning
100             indexes.
101         * storage/IDBLevelDBBackingStore.cpp: Added.
102         (WebCore::IDBLevelDBBackingStore::IDBLevelDBBackingStore):
103         (WebCore::IDBLevelDBBackingStore::~IDBLevelDBBackingStore):
104         (WebCore::IDBLevelDBBackingStore::open):
105         (WebCore::IDBLevelDBBackingStore::extractIDBDatabaseMetaData):
106         (WebCore::IDBLevelDBBackingStore::setIDBDatabaseMetaData):
107         (WebCore::IDBLevelDBBackingStore::getObjectStores):
108         (WebCore::IDBLevelDBBackingStore::createObjectStore):
109         (WebCore::IDBLevelDBBackingStore::deleteObjectStore):
110         (WebCore::IDBLevelDBBackingStore::getObjectStoreRecord):
111         (WebCore::IDBLevelDBBackingStore::putObjectStoreRecord):
112         (WebCore::IDBLevelDBBackingStore::clearObjectStore):
113         (WebCore::IDBLevelDBBackingStore::deleteObjectStoreRecord):
114         (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber):
115         (WebCore::IDBLevelDBBackingStore::keyExistsInObjectStore):
116         (WebCore::IDBLevelDBBackingStore::forEachObjectStoreRecord):
117         (WebCore::IDBLevelDBBackingStore::getIndexes):
118         (WebCore::IDBLevelDBBackingStore::createIndex):
119         (WebCore::IDBLevelDBBackingStore::deleteIndex):
120         (WebCore::IDBLevelDBBackingStore::putIndexDataForRecord):
121         (WebCore::IDBLevelDBBackingStore::deleteIndexDataForRecord):
122         (WebCore::IDBLevelDBBackingStore::getObjectViaIndex):
123         (WebCore::IDBLevelDBBackingStore::getPrimaryKeyViaIndex):
124         (WebCore::IDBLevelDBBackingStore::keyExistsInIndex):
125         (WebCore::IDBLevelDBBackingStore::openObjectStoreCursor):
126         (WebCore::IDBLevelDBBackingStore::openIndexKeyCursor):
127         (WebCore::IDBLevelDBBackingStore::openIndexCursor):
128         (WebCore::IDBLevelDBBackingStore::createTransaction):
129         * storage/IDBLevelDBBackingStore.h: Added.
130             Add an empty implementation of the LevelDB backend.
131         * storage/IDBObjectStoreBackendImpl.cpp:
132             Keep track of database id, use the new RecordIdentifier.
133         (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
134         (WebCore::IDBObjectStoreBackendImpl::getInternal):
135         (WebCore::IDBObjectStoreBackendImpl::putInternal):
136         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
137         (WebCore::IDBObjectStoreBackendImpl::clearInternal):
138         (WebCore::populateIndex):
139         (WebCore::IDBObjectStoreBackendImpl::createIndex):
140         (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
141         (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal):
142         (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
143         (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
144         (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey):
145         * storage/IDBObjectStoreBackendImpl.h:
146         (WebCore::IDBObjectStoreBackendImpl::create):
147         (WebCore::IDBObjectStoreBackendImpl::databaseId):
148         * storage/IDBSQLiteBackingStore.cpp:
149         (WebCore::IDBSQLiteBackingStore::open):
150         (WebCore::IDBSQLiteBackingStore::createObjectStore):
151         (WebCore::IDBSQLiteBackingStore::deleteObjectStore):
152         (WebCore::IDBSQLiteBackingStore::getObjectStoreRecord):
153         (WebCore::IDBSQLiteBackingStore::putObjectStoreRecord):
154         (WebCore::IDBSQLiteBackingStore::clearObjectStore):
155         (WebCore::IDBSQLiteBackingStore::deleteObjectStoreRecord):
156         (WebCore::IDBSQLiteBackingStore::nextAutoIncrementNumber):
157         (WebCore::IDBSQLiteBackingStore::keyExistsInObjectStore):
158         (WebCore::IDBSQLiteBackingStore::forEachObjectStoreRecord):
159         (WebCore::IDBSQLiteBackingStore::getIndexes):
160         (WebCore::IDBSQLiteBackingStore::createIndex):
161         (WebCore::IDBSQLiteBackingStore::deleteIndex):
162         (WebCore::IDBSQLiteBackingStore::putIndexDataForRecord):
163         (WebCore::IDBSQLiteBackingStore::deleteIndexDataForRecord):
164         (WebCore::IDBSQLiteBackingStore::getObjectViaIndex):
165         (WebCore::IDBSQLiteBackingStore::getPrimaryKeyViaIndex):
166         (WebCore::IDBSQLiteBackingStore::keyExistsInIndex):
167         (WebCore::IDBSQLiteBackingStore::openObjectStoreCursor):
168         (WebCore::IDBSQLiteBackingStore::openIndexKeyCursor):
169         (WebCore::IDBSQLiteBackingStore::openIndexCursor):
170         * storage/IDBSQLiteBackingStore.h:
171
172 2011-04-11  Alexander Pavlov  <apavlov@chromium.org>
173
174         Reviewed by Yury Semikhatsky.
175
176         Web Inspector: Duplicate CSS properties are reported for non-lowercase property names in the Styles sidebar
177         https://bugs.webkit.org/show_bug.cgi?id=58226
178
179         * inspector/InspectorStyleSheet.cpp:
180         (WebCore::InspectorStyle::populateAllProperties):
181
182 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
183
184         Reviewed by Pavel Feldman.
185
186         Web Inspector: get rid of source frame delegates for resources panel.
187         https://bugs.webkit.org/show_bug.cgi?id=58041
188
189         Use TextViewer configured with a domain-specific delegate to show/edit resource contents in resources panel.
190
191         * inspector/front-end/ResourceView.js:
192         (WebInspector.ResourceView.createResourceView):
193         (WebInspector.ResourceView.resourceViewTypeMatchesResource):
194         (WebInspector.ResourceSourceFrame):
195         (WebInspector.ResourceSourceFrame.prototype.get resource):
196         (WebInspector.ResourceSourceFrame.prototype.contentEditable):
197         (WebInspector.ResourceSourceFrame.prototype._requestContent):
198         (WebInspector.CSSSourceFrame):
199         (WebInspector.CSSSourceFrame.prototype.contentEditable):
200         (WebInspector.CSSSourceFrame.prototype._editContent):
201         (WebInspector.CSSSourceFrame.prototype._editContent.handleInfos):
202         (WebInspector.CSSSourceFrame.prototype._saveStyleSheet):
203         * inspector/front-end/SourceFrame.js:
204         (WebInspector.SourceFrame.prototype._ensureContentLoaded):
205         (WebInspector.SourceFrame.prototype._requestContent):
206         (WebInspector.SourceFrame.prototype._handleSave):
207         (WebInspector.SourceFrame.prototype._editContent):
208
209 2011-04-11  Alexis Menard  <alexis.menard@openbossa.org>
210
211         Reviewed by Andreas Kling.
212
213         [Qt] Regression : r83051 Oxygen's lineedits are not rendered properly
214         https://bugs.webkit.org/show_bug.cgi?id=58076
215
216         State_Sunken is more generic than pressed. It is used by items such as frames or
217         line edits because they are "sunken" frames (e.g. QLineEdit). It can be required
218         by some style like Oxygen. Therefore only in the mobile theme we check if the object
219         is pressed.
220
221         * platform/qt/RenderThemeQt.cpp:
222         (WebCore::RenderThemeQt::paintTextField):
223
224 2011-04-11  Pavel Feldman  <pfeldman@chromium.org>
225
226         Reviewed by Yury Semikhatsky.
227
228         Web Inspector: add support for optional output parameters.
229         https://bugs.webkit.org/show_bug.cgi?id=58207
230
231         Output parameters such as "redirectResponse" are optional, but
232         do not allow specifying them as such.
233
234         * inspector/CodeGeneratorInspector.pm:
235         * inspector/Inspector.json:
236         * inspector/InspectorResourceAgent.cpp:
237         (WebCore::buildObjectForResourceResponse):
238         (WebCore::buildObjectForCachedResource):
239         * inspector/front-end/NetworkManager.js:
240         (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
241         * inspector/generate-inspector-idl:
242
243 2011-04-11  Pavel Feldman  <pfeldman@chromium.org>
244
245         Reviewed by Yury Semikhatsky.
246
247         Web Inspector: refactor / document call frames in debugger domain.
248         https://bugs.webkit.org/show_bug.cgi?id=58187
249
250         Note that we are not special casing with(element) and with(document) anymore
251         and do not tell user that it is "Event target" and "Event document". Strictly speaking,
252         we should not have done it for with(element) not necessarily being related to an event.
253
254         * English.lproj/localizedStrings.js:
255         * inspector/InjectedScriptSource.js:
256         * inspector/Inspector.json:
257         * inspector/front-end/ScopeChainSidebarPane.js:
258         (WebInspector.ScopeChainSidebarPane.prototype.update):
259
260 2011-04-10  ChangSeok Oh  <shivamidow@gmail.com>
261
262         Reviewed by Eric Seidel.
263
264         Make correspondence of file name related with event to other port.
265         https://bugs.webkit.org/show_bug.cgi?id=57416
266
267         Some file names are changed to make correspondence naming rule.
268         Keyboard, mouse and wheel event file names for GTK port have been different from other ports.
269         This has made user hard to find a specific file related with event for GTK port. 
270
271         No test required. This patch just changes some file names.
272
273         * GNUmakefile.list.am:
274         * platform/gtk/KeyEventGtk.cpp: Removed.
275         * platform/gtk/MouseEventGtk.cpp: Removed.
276         * platform/gtk/PlatformKeyboardEventGtk.cpp: Added.
277         * platform/gtk/PlatformMouseEventGtk.cpp: Added.
278         * platform/gtk/PlatformWheelEventGtk.cpp: Added.
279         * platform/gtk/WheelEventGtk.cpp: Removed.
280
281 2011-04-10  Simon Fraser  <simon.fraser@apple.com>
282
283         Revert the FloatRect.cpp part of r83422, since
284         clampToInteger() is broken for some inputs. I filed
285         https://bugs.webkit.org/show_bug.cgi?id=58216
286
287         * platform/graphics/FloatRect.cpp:
288         (WebCore::safeFloatToInt):
289         (WebCore::enclosingIntRect):
290
291 2011-04-10  Simon Fraser  <simon.fraser@apple.com>
292
293         Reviewed by Maciej Stachowiak.
294
295         Car model dropdowns at audiusa.com lay out incorrectly with compositing enabled
296         https://bugs.webkit.org/show_bug.cgi?id=56660
297         
298         When overflow on an element changes, we need to inform compositing
299         layers which create and position an "ancestor clipping" layer based
300         on that overflow. Do this by triggering a rebuild of compositing layers
301         when overflow changes on a layer whose stacking context has compositing
302         descendants. (We can't just check whether the layer itself has compositing
303         descendants, because overflow follows the render tree, but compositing
304         follows the z-order tree.)
305
306         Test: compositing/geometry/ancestor-overflow-change.html
307
308         * rendering/RenderLayer.cpp:
309         (WebCore::RenderLayer::styleChanged):
310         * rendering/RenderLayer.h:
311         * rendering/RenderLayerBacking.cpp:
312         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
313
314 2011-04-10  Simon Fraser  <simon.fraser@apple.com>
315
316         Reviewed by Ariya Hidayat.
317
318         Allow ShadowBlur to re-use the last buffer if it already contains the correct shadow
319         https://bugs.webkit.org/show_bug.cgi?id=58161
320         
321         ShadowBlur already has a singleton scratch buffer that is re-used
322         between shadows. Enhance use of this scratch buffer to avoid drawing
323         and blurring the shadow if the results will match what is already
324         in the buffer.
325         
326         Cleaned up ShadowBlur code to remove beginShadowLayer() and endShadowLayer(),
327         which ended up with little reusable code after adding the re-use logic.
328
329         * platform/graphics/FloatRect.cpp:
330         (WebCore::enclosingIntRect): Replace safeFloatToInt() with the existing
331         clampToInteger() from MathExtras.h
332         
333         * platform/graphics/FloatSize.h:
334         (WebCore::expandedIntSize): New method to safely ceil() the size.
335         
336         * platform/graphics/RoundedIntRect.h:
337         Add operator== for Radii and RoundedIntRect.
338
339         * platform/graphics/ShadowBlur.cpp:
340         (WebCore::ScratchBuffer::ScratchBuffer):
341         (WebCore::ScratchBuffer::setLastShadowValues):
342         (WebCore::ScratchBuffer::setLastInsetShadowValues):
343         (WebCore::ScratchBuffer::matchesLastShadow):
344         (WebCore::ScratchBuffer::matchesLastInsetShadow):
345         (WebCore::ScratchBuffer::clearScratchBuffer):
346         Have the scratch buffer remember what shadow parameters were used
347         to render the buffer contents.
348         
349         (WebCore::ShadowBlur::drawShadowBuffer):
350         Renamed from endShadowLayer(), and only contains the drawing
351         logic now.
352         
353         (WebCore::ShadowBlur::drawRectShadow):
354         Promote some code from beginShadowLayer().
355         
356         (WebCore::ShadowBlur::drawInsetShadow):
357         Promote some code from beginShadowLayer().
358
359         (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
360         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
361         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
362         (WebCore::ShadowBlur::drawRectShadowWithTiling):
363         These methods now check to see if the buffer already matches
364         their required parameters, and avoid work if it does.
365         
366         (WebCore::ShadowBlur::blurShadowBuffer):
367         Factored some code into this new method.
368         
369         (WebCore::ShadowBlur::blurAndColorShadowBuffer):
370         Minor refactoring.
371
372         * platform/graphics/ShadowBlur.h:
373
374 2011-04-10  Geoffrey Garen  <ggaren@apple.com>
375
376         Build fix: Updated for file move.
377
378         * bindings/js/GCController.cpp:
379         * bindings/js/ScriptGCEvent.cpp:
380
381 2011-04-10  Geoffrey Garen  <ggaren@apple.com>
382
383         Rubber-stamped by Beth Dakin.
384
385         Moved Heap.h and Heap.cpp to the heap folder, because anything less 
386         would be uncivilized.
387
388         * ForwardingHeaders/heap/Heap.h: Copied from WebCore/ForwardingHeaders/runtime/Heap.h.
389         * ForwardingHeaders/runtime/Heap.h: Removed.
390
391 2011-04-10  Luke Macpherson   <macpherson@chromium.org>
392
393         Reviewed by Simon Fraser.
394
395         Rename CSSStyleApplyProperty::inherit,initial,value applyInheritValue,applyInitialValue,applyValue
396         https://bugs.webkit.org/show_bug.cgi?id=58212
397
398         No new tests - function renaming only / no functionality changes.
399
400         * css/CSSStyleApplyProperty.cpp:
401         Rename all instances of inherit, initial and value.
402         * css/CSSStyleApplyProperty.h:
403         Rename all instances of inherit, initial and value.
404         * css/CSSStyleSelector.cpp:
405         Rename all instances of inherit, initial and value.
406
407 2011-04-10  Mike Lawther  <mikelawther@chromium.org>
408
409         Reviewed by Ojan Vafai.
410
411         flex/bison tokens and grammar for CSS calc
412         https://bugs.webkit.org/show_bug.cgi?id=54412
413
414         Tests: css3/calc/calc-errors.html
415                css3/calc/lexer-regression-57581-2.html
416                css3/calc/lexer-regression-57581-3.html
417                css3/calc/lexer-regression-57581.html
418                css3/calc/minmax-errors.html
419                css3/calc/nested-rounded-corners.html
420                css3/calc/simple-calcs.html
421                css3/calc/simple-minmax.html
422
423         * css/CSSGrammar.y:
424         * css/CSSParserValues.cpp:
425         (WebCore::CSSParserValueList::insertValueAt):
426         (WebCore::CSSParserValueList::extend):
427         * css/CSSParserValues.h:
428         * css/tokenizer.flex:
429
430 2011-04-10  Alice Boxhall  <aboxhall@chromium.org>
431
432         Reviewed by Ryosuke Niwa.
433
434         Change EventHandler::updateSelectionForMouseDrag to take a HitTestResult only.
435         https://bugs.webkit.org/show_bug.cgi?id=57923
436
437         Change EventHandler::updateSelectionForMouseDrag to take a HitTestResult
438         rather than a Node* and an IntPoint&, as the selection may actually not
439         extend into the Node found by the HitTest.
440
441         No new tests. Refactoring only.
442
443         * page/EventHandler.cpp:
444         (WebCore::EventHandler::handleMouseDraggedEvent):
445         (WebCore::EventHandler::updateSelectionForMouseDrag):
446         * page/EventHandler.h:
447
448 2011-04-10  Kent Tamura  <tkent@chromium.org>
449
450         Unreviewed, rolling out r83353.
451         http://trac.webkit.org/changeset/83353
452         https://bugs.webkit.org/show_bug.cgi?id=58106
453
454         The new test doesn't pass on all Chromium platforms.
455
456         * dom/DataTransferItem.h:
457         * dom/DataTransferItem.idl:
458         * platform/chromium/ClipboardMimeTypes.cpp:
459         * platform/chromium/ClipboardMimeTypes.h:
460         * platform/chromium/DataTransferItemChromium.cpp:
461         (WebCore::DataTransferItemChromium::getAsString):
462         * platform/chromium/DataTransferItemChromium.h:
463         * platform/chromium/PlatformBridge.h:
464
465 2011-04-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
466
467         Reviewed by Eric Carlson.
468
469         [EFL] Add seek forward / backward buttons to MediaControl UI.
470         https://bugs.webkit.org/show_bug.cgi?id=56810
471
472         Add seek forward / backward buttons to media control. And, change formType name
473         for media control.
474
475         * platform/efl/RenderThemeEfl.cpp:
476         (WebCore::RenderThemeEfl::edjeGroupFromFormType):
477         (WebCore::RenderThemeEfl::emitMediaButtonSignal):
478         (WebCore::RenderThemeEfl::paintMediaMuteButton):
479         (WebCore::RenderThemeEfl::paintMediaPlayButton):
480         (WebCore::RenderThemeEfl::paintMediaSeekBackButton):
481         (WebCore::RenderThemeEfl::paintMediaSeekForwardButton):
482         * platform/efl/RenderThemeEfl.h:
483
484 2011-04-10  Chris Guillory  <chris.guillory@google.com>
485
486         Reviewed by Eric Seidel.
487
488         Remove unused function declaration in PlatformContextSkia.h.
489         https://bugs.webkit.org/show_bug.cgi?id=55983
490
491         * platform/graphics/skia/PlatformContextSkia.h:
492
493 2011-04-10  Patrick Gansterer  <paroga@webkit.org>
494
495         Unreviewed build fix for !ENABLE(XSLT) after r82562.
496
497         * dom/XMLDocumentParserLibxml2.cpp:
498         (WebCore::XMLDocumentParser::doEnd):
499
500 2011-04-10  Patrick Gansterer  <paroga@webkit.org>
501
502         Unreviewed build fix for !ENABLE(XSLT) after r82562.
503
504         * xml/XMLTreeViewer.cpp: Readded #if ENABLE(XSLT).
505
506 2011-04-10  Dimitri Glazkov  <dglazkov@chromium.org>
507
508         Reviewed by Anders Carlsson.
509
510         REGRESSION(r83256): Text-decoration bleeds into shadow DOM
511         https://bugs.webkit.org/show_bug.cgi?id=58205
512
513         Now that the shadow root is a never-styled element, we need to walk to
514         parent to find out if we're inside of a shadow DOM subtree.
515
516         Test: media/controls-styling.html
517
518         * css/CSSStyleSelector.cpp:
519         (WebCore::isAtShadowBoundary): Added helper function.
520         (WebCore::CSSStyleSelector::adjustRenderStyle): Changed to use the helper.
521
522 2011-04-07  Dimitri Glazkov  <dglazkov@chromium.org>
523
524         Reviewed by Eric Carlson.
525
526         [Meta] Convert HTMLMediaElement to use the new shadow DOM
527         https://bugs.webkit.org/show_bug.cgi?id=53020
528
529         This conversion is non-trivial, for several reasons:
530
531         1) Since HTMLMediaElement now hosts the shadow DOM for controls, hiding
532         and showing controls does not result in destroying and re-creating the
533         shadow DOM tree. Instead, the tree is created as needed and shown/hidden
534         using inline styles.
535         
536         2) Instead of detaching/attaching on each style change, the control parts
537         are now using a set of higher fidelity callbacks that notify MediaControls
538         about changes to which it should react. Each reaction results in hiding,
539         showing, or changing the state of the control parts using inline styles
540         and DOM APIs.
541
542         3) Hiding and showing controls is accomplished using inline styles, rather
543         than wiring rendererIsNeeded, because renderers are now re-created less
544         frequently.
545
546         4) Instead of constantly querying RenderTheme about visibility of a particular
547         control part, we let the theme determine which parts are supported and
548         which parts are visible in certain conditions.
549
550         5) Custom hit-testing, event forwarding, and style updates are completely
551         removed, since they are now unnecessary.
552
553         6) Fading controls in/out is now done as CSS animation, since shadow DOM
554         supports it.
555
556         Test: manual-tests/media-controls.html
557
558 2011-04-09  Dan Bernstein  <mitz@apple.com>
559
560         Reviewed by Beth Dakin.
561
562         <rdar://problem/9215280> Detached canvas draws with incorrect font
563
564         Test: fast/canvas/font-update.html
565
566         The existing mechanism for updating the font in a canvas 2D context was lacking in at least
567         two ways: it neglected to update fonts in all but the topmost state in the stack, and since it
568         was based on HTMLCanvasElemen's attach() and recalcStyle(), it did not work when the element
569         was not attached.
570
571         This change takes the responsibility for font updates away from the canvas element and gives it
572         to the canvas context and its graphics state.
573
574         * css/CSSFontSelector.cpp:
575         (WebCore::CSSFontSelector::registerForInvalidationCallbacks): Added. Adds to the set of registered
576         font selector clients.
577         (WebCore::CSSFontSelector::unregisterForInvalidationCallbacks): Added. Removes from the set of
578         registered font selector clients.
579         (WebCore::CSSFontSelector::dispatchInvalidationCallbacks): Calls fontsNeedUpdate() on all registered
580         clients and forces a style recalc on the document.
581         (WebCore::CSSFontSelector::fontLoaded): Changed to call dispatchInvalidationCallbacks().
582         (WebCore::CSSFontSelector::fontCacheInvalidated): Ditto.
583         * css/CSSFontSelector.h:
584         * html/HTMLCanvasElement.cpp: Removed overrides of attach() and recalcStyle().
585         * html/HTMLCanvasElement.h:
586         * html/canvas/CanvasRenderingContext2D.cpp:
587         (WebCore::CanvasRenderingContext2D::State::~State): Added. Unregisters with the font selector.
588         (WebCore::CanvasRenderingContext2D::State::fontsNeedUpdate): Added. Called by the font selector
589         when its fonts need to be updated. Updates the font.
590         (WebCore::CanvasRenderingContext2D::setFont): Registers the state with the font selector.
591         * html/canvas/CanvasRenderingContext2D.h:
592         * platform/graphics/FontSelector.h:
593         (WebCore::FontSelectorClient::~FontSelectorClient):
594
595 2011-04-09  Geoffrey Garen  <ggaren@apple.com>
596
597         Not reviewed.
598
599         Try recommitting some things svn left out of my last commit.
600
601         * bridge/qt/qt_runtime.h:
602
603 2011-04-09  Geoffrey Garen  <ggaren@apple.com>
604
605         Not reviewed.
606
607         Try recommitting some things svn left out of my last commit.
608
609         * ForwardingHeaders/collector: Removed.
610         * ForwardingHeaders/collector/handles: Removed.
611         * ForwardingHeaders/collector/handles/Global.h: Removed.
612
613 2011-04-08  Dimitri Glazkov  <dglazkov@chromium.org>
614
615         Reviewed by Ojan Vafai.
616
617         Implement proper handling of mouseover/mouseout events in regard to shadow DOM boundaries.
618         https://bugs.webkit.org/show_bug.cgi?id=55515
619
620         This implements XBL 2.0's specified handling of mouseover/mouseout events:
621         http://dev.w3.org/2006/xbl2/Overview.html#the-mouseover-and-mouseout-events
622
623         To do this, we:
624         1) calculate lowest common ancestor between relatedTarget and target, and
625            the nearest boundaries around them: the outer (common) boundary, and the
626            inner (specific to relatedTarget) boundary. Then, we
627         2) ensure that events only propagate up to the common boundary (or
628            all the way if boundary is not found), while
629         3) updating relatedTarget be the inner boundary.
630
631         We also detect the most common case when no common boundary could exist
632         and provide a fast path to short-circuit most of the boundary detection
633         logic.
634
635         Test: fast/events/shadow-boundary-crossing.html
636
637         * dom/EventDispatcher.cpp:
638         (WebCore::EventDispatcher::adjustToShadowBoundaries): Added a helper to determine lowest
639             common ancestor, the boundaries around it, and compute adjustments
640             to relatedTarget and event target ancestor chain.
641         (WebCore::ancestorsCrossShadowBoundaries): Added.
642         (WebCore::EventDispatcher::adjustRelatedTarget): Changed to calculate
643             inner/outer shadow DOM boundaries and adjust ancestors chain accordingly.
644         (WebCore::EventDispatcher::EventDispatcher): Added flag initializer
645         (WebCore::EventDispatcher::ensureEventAncestors): Renamed from getEventAncestors,
646             converted to use initialization flag, rather than testing for empty.
647         * dom/EventDispatcher.h: Adjusted decls.
648         * dom/MouseEvent.cpp:
649         (WebCore::MouseEventDispatchMediator::dispatchEvent): Changed to send event
650             to adjustRelatedTarget.
651
652 2011-04-08  Geoffrey Garen  <ggaren@apple.com>
653
654         Reviewed by Oliver Hunt.
655
656         A few heap-related renames and file moves.
657         
658         WeakGCPtr<T> => Weak<T>
659         Global<T> => Strong<T>
660         collector/ => heap/
661         collector/* => heap/*
662         runtime/WeakGCPtr.h => heap/Weak.h
663         
664         (Eventually, even more files should move into the heap directory. Like
665         Heap.h and Heap.cpp, for example.)
666
667         * CMakeLists.txt:
668         * ForwardingHeaders/collector: Removed.
669         * ForwardingHeaders/heap: Copied from ForwardingHeaders/collector.
670         * ForwardingHeaders/heap/Strong.h: Copied from ForwardingHeaders/collector/handles/Global.h.
671         * ForwardingHeaders/heap/Weak.h: Copied from ForwardingHeaders/runtime/WeakGCPtr.h.
672         * ForwardingHeaders/runtime/WeakGCPtr.h: Removed.
673         * WebCore.vcproj/WebCore.vcproj:
674         * WebCore.vcproj/copyForwardingHeaders.cmd:
675         * bindings/js/JSCallbackData.h:
676         * bindings/js/JSCustomVoidCallback.h:
677         * bindings/js/JSDOMWindowBase.h:
678         * bindings/js/JSDOMWindowShell.cpp:
679         (WebCore::JSDOMWindowShell::setWindow):
680         * bindings/js/JSDataGridDataSource.h:
681         * bindings/js/JSEventListener.h:
682         * bindings/js/ScheduledAction.cpp:
683         (WebCore::ScheduledAction::ScheduledAction):
684         * bindings/js/ScheduledAction.h:
685         * bindings/js/ScriptCachedFrameData.cpp:
686         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
687         * bindings/js/ScriptCachedFrameData.h:
688         * bindings/js/ScriptController.cpp:
689         (WebCore::ScriptController::createWindowShell):
690         * bindings/js/ScriptController.h:
691         * bindings/js/ScriptObject.h:
692         * bindings/js/ScriptState.h:
693         * bindings/js/ScriptValue.cpp:
694         * bindings/js/ScriptValue.h:
695         * bindings/js/ScriptWrappable.h:
696         * bindings/js/WorkerScriptController.cpp:
697         (WebCore::WorkerScriptController::initScript):
698         * bindings/js/WorkerScriptController.h:
699         * bridge/jsc/BridgeJSC.h:
700         * bridge/qt/qt_runtime.h:
701         * bridge/runtime_root.h:
702         * xml/XMLHttpRequest.cpp:
703
704 2011-04-09  Keith Kyzivat  <keith.kyzivat@nokia.com>
705
706         Reviewed by Laszlo Gombos.
707
708         [Qt] Don't link against fontconfig or X11 if embedded
709         https://bugs.webkit.org/show_bug.cgi?id=58104
710
711         No functional change so no new tests.
712
713         * WebCore.pri: qpa=>embedded should be done very early so all cases of embedded are uniform.
714
715 2011-04-09  Csaba Osztrogon√°c  <ossy@webkit.org>
716
717         [Qt] Unreviewed trivial fix after r83344.
718
719         * WebCore.pro: Update HEADERS list.
720
721 2011-04-09  Jon Lee  <jonlee@apple.com>
722
723         Reviewed by Beth Dakin.
724
725         Overlay scrollbar flashes in scrollable <textarea> with each keystroke (58180)
726         https://bugs.webkit.org/show_bug.cgi?id=58180
727         <rdar://problem/9047984>
728
729         * platform/mac/ScrollAnimatorMac.mm:
730         (WebCore::ScrollAnimatorMac::immediateScrollToPoint): Check that there is a change before submitting
731         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
732         (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
733
734 2011-04-09  Sreeram Ramachandran  <sreeram@google.com>
735
736         Reviewed by Ryosuke Niwa.
737
738         Gather data on modal dialogs shown during unload events
739         https://bugs.webkit.org/show_bug.cgi?id=58115
740
741         Add a new method to the ChromeClient API to allow clients to receive
742         notifications of modal dialogs dispatched during page dismissal events.
743         The new method has a default empty definition; only chromium overrides
744         it to keep track of histograms.
745
746         No tests because this is a no-op for all ports except chromium (and it's
747         not clear how to test chromium histograms from webkit).
748
749         * page/Chrome.cpp:
750         (WebCore::isDuringPageDismissal):
751         (WebCore::willRunModalDialog):
752         (WebCore::Chrome::runJavaScriptAlert):
753         (WebCore::Chrome::runJavaScriptConfirm):
754         (WebCore::Chrome::runJavaScriptPrompt):
755         (WebCore::Chrome::willRunModalHTMLDialog):
756         * page/Chrome.h:
757         * page/ChromeClient.h:
758         (WebCore::ChromeClient::willRunModalDialogDuringPageDismissal):
759         * page/DOMWindow.cpp:
760         (WebCore::DOMWindow::showModalDialog):
761
762 2011-04-08  David Humphrey  <david.humphrey@senecac.on.ca>
763
764         Reviewed by Eric Carlson.
765
766         Fix call order of media element muted and play(), such that setting muted before play() works.
767         https://bugs.webkit.org/show_bug.cgi?id=57673
768         https://code.google.com/p/chromium/issues/detail?id=70777
769
770         Manual test added: manual-tests/media-muted.html
771
772         * html/HTMLMediaElement.cpp:
773         (WebCore::HTMLMediaElement::updatePlayState):
774         * manual-tests/media-muted.html: Added.
775
776 2011-04-08  Nat Duca  <nduca@chromium.org>
777
778         Reviewed by David Levin.
779
780         [chromium] Fix windows assertion on ~CCThread
781         https://bugs.webkit.org/show_bug.cgi?id=58153
782
783         Because ~CCThread uses waitForThreadCompletion,
784         calling detachThread is not necessary.
785
786         * platform/graphics/chromium/cc/CCThread.cpp:
787         (WebCore::CCThread::runLoop):
788
789 2011-04-08  Jian Li  <jianli@chromium.org>
790
791         Unreviewed, rolling out r83348.
792         http://trac.webkit.org/changeset/83348
793         https://bugs.webkit.org/show_bug.cgi?id=49508
794
795         Breaks layout tests in QT, Win7 and Chromium.
796
797         * rendering/RenderText.cpp:
798         (WebCore::RenderText::localCaretRect):
799
800 2011-04-08  MORITA Hajime  <morrita@google.com>
801
802         Reviewed by Simon Fraser.
803
804         Negative spread should not make a sharp corner rounded
805         https://bugs.webkit.org/show_bug.cgi?id=58162
806
807         Handled inset shadow path for rounded and non-rounded rect
808         differently as normal shadow path is doing.
809         
810         * rendering/RenderBoxModelObject.cpp:
811         (WebCore::RenderBoxModelObject::paintBoxShadow):
812
813 2011-04-07  Simon Fraser  <simon.fraser@apple.com>
814
815         Reviewed by Martin Robinson.
816
817         REGRESSION (r77034-r77220): CSS box-shadow no longer renders on PowerPC
818         https://bugs.webkit.org/show_bug.cgi?id=55180
819
820         The endianness #ifdef in ShadowBlur was unnecessary and harmful. The
821         data we get back from ImageBuffer::getImageData() do not vary in
822         endianness.
823
824         * platform/graphics/ShadowBlur.cpp:
825         (WebCore::ShadowBlur::blurLayerImage):
826
827 2011-04-08  Erik Arvidsson  <arv@chromium.org>
828
829         Reviewed by Dimitri Glazkov.
830
831         IFrame is getting the focus even though it is hidden
832         https://bugs.webkit.org/show_bug.cgi?id=55861
833
834         Test: fast/dom/hidden-iframe-no-focus.html
835
836         * html/HTMLFrameOwnerElement.cpp:
837         (WebCore::HTMLFrameOwnerElement::isKeyboardFocusable):
838         * html/HTMLFrameOwnerElement.h:
839
840 2011-04-08  Jeff Timanus  <twiz@chromium.org>
841
842         Reviewed by Kenneth Russell.
843
844         Fall back to software rendering for Canvas2D when requesting a DrawingBuffer larger than supported by the GL environment.
845         https://bugs.webkit.org/show_bug.cgi?id=57768
846
847         * html/canvas/CanvasRenderingContext2D.cpp:
848         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
849         (WebCore::CanvasRenderingContext2D::reset):
850         * platform/graphics/gpu/DrawingBuffer.cpp:
851         (WebCore::DrawingBuffer::reset):
852         * platform/graphics/gpu/DrawingBuffer.h:
853
854 2011-04-08  Daniel Cheng  <dcheng@chromium.org>
855
856         Reviewed by Dmitry Titov.
857
858         [chromium] Implement image/png support in DataTransferItems
859         https://bugs.webkit.org/show_bug.cgi?id=58106
860
861         This patch implements DataTransferItem::getAsFile() using Blobs. In
862         addition, plumbing for image/png has been added so image paste will be
863         supported as long as the renderer makes that data available.
864
865         Tests: editing/pasteboard/data-transfer-items-image-png.html
866
867         * dom/DataTransferItem.h:
868         * dom/DataTransferItem.idl:
869         * platform/chromium/ClipboardMimeTypes.cpp:
870         * platform/chromium/ClipboardMimeTypes.h:
871         * platform/chromium/DataTransferItemChromium.cpp:
872         (WebCore::DataTransferItemChromium::getAsString):
873         (WebCore::DataTransferItemChromium::getAsFile):
874         * platform/chromium/DataTransferItemChromium.h:
875         * platform/chromium/PlatformBridge.h:
876
877 2011-04-08 MORITA Hajime  <morrita@google.com>
878
879         Unreviewed windows build fix.
880         
881         * editing/SpellingCorrectionController.h:
882         (WebCore::SpellingCorrectionController::UNLESS_ENABLED):
883
884 2011-04-08  Enrica Casucci  <enrica@apple.com>
885
886         Reviewed by Maciej Stachowiak.
887
888         Improve lifetime management of nodes in ReplaceNodeWithSpanCommand.
889         https://bugs.webkit.org/show_bug.cgi?id=57595
890         <rdar://problem/9222122>
891
892         Test: editing/style/bold-with-dom-changes.html
893
894         * editing/ReplaceNodeWithSpanCommand.cpp:
895         (WebCore::swapInNodePreservingAttributesAndChildren):
896
897 2011-04-07  Roland Steiner  <rolandsteiner@chromium.org>
898
899         Reviewed by Dimitri Glazkov.
900
901         Bug 58060 - Prepare access to TreeScope from Node, using NodeRareData
902         https://bugs.webkit.org/show_bug.cgi?id=58060
903
904         Add a TreeScope pointer to NodeRareData to allow direct access to the containing tree scope.
905         However, in case the containing scope is the document, this is not set, and the
906         document pointer within Node is used instead.
907
908         In an object derived from TreeScope (currently Document), the tree scope pointer
909         points to itself. Such objects also contain a parent tree scope pointer that
910         points to the containing scope. For Document, this is 0.
911
912         Add new functions setTreeScope[Recursively] that replace setDocument[Recursively]
913         in public usage. setDocument[Recursively] are now only used internally and are
914         thererfore protected.
915
916         No new tests. (no new functionality)
917
918         * dom/ContainerNode.cpp: change DOM manipulation methods to update scope of inserted nodes
919         (WebCore::ContainerNode::insertBefore):
920         (WebCore::ContainerNode::replaceChild):
921         (WebCore::ContainerNode::appendChild):
922         * dom/Document.cpp:
923         (WebCore::Document::~Document):
924         (WebCore::Document::setDocType): Ditto
925         (WebCore::Document::adoptNode): Ditto
926         * dom/Document.h:
927         * dom/Node.cpp:
928         (WebCore::Node::treeScope): use NodeRareData to check if a non-Document scope is set
929         (WebCore::Node::setTreeScope): update NodeRareData depending on whether scope is a document
930         (WebCore::Node::setTreeScopeRecursively):
931         (WebCore::Node::setDocumentRecursively):
932         * dom/Node.h:
933         * dom/NodeRareData.h: add scope pointer
934         (WebCore::NodeRareData::NodeRareData):
935         (WebCore::NodeRareData::treeScope):
936         (WebCore::NodeRareData::setTreeScope):
937         * dom/TreeScope.cpp: add parentTreeScope pointer
938         (WebCore::TreeScope::TreeScope):
939         (WebCore::TreeScope::setParentTreeScope):
940         * dom/TreeScope.h:
941         (WebCore::TreeScope::parentTreeScope):
942
943 2011-04-08  Xiaomei Ji  <xji@chromium.org>
944
945         Reviewed by David Hyatt.
946
947         Local caret rectangle calculation should be relative to its containing block.
948         https://bugs.webkit.org/show_bug.cgi?id=49508.
949
950         InlineBox and caret rectangle are positioned relative to its containing block.
951         So its left and right edge value should be relative to its containing block as well. 
952
953         Test: fast/forms/cursor-at-editable-content-boundary.html
954
955         * rendering/RenderText.cpp:
956         (WebCore::RenderText::localCaretRect):
957
958 2011-04-08  MORITA Hajime  <morrita@google.com>
959
960         Unreviewed build fix.
961
962         * editing/Editor.cpp:
963         (WebCore::Editor::markMisspellingsAfterTypingToWord):
964
965 2011-04-08  David Hyatt  <hyatt@apple.com>
966
967         Reviewed by Simon Fraser.
968
969         https://bugs.webkit.org/show_bug.cgi?id=57971
970         
971         Rework visited/unvisited links for before/after content. Propagate the bits earlier so that we don't lose
972         them when we throw away the visited style. Don't throw away the visited link style for pseudo elements
973         either, so that the styles are consistent.
974
975         Added fast/history/visited-generated-content-test.html
976
977         * css/CSSStyleSelector.cpp:
978         (WebCore::CSSStyleSelector::styleForElement):
979         (WebCore::CSSStyleSelector::pseudoStyleForElement):
980
981 2011-04-06  MORITA Hajime  <morrita@google.com>
982
983         Reviewed by Darin Adler.
984
985         [Refactoring] Auto correction panel should be handled by its own class.
986         https://bugs.webkit.org/show_bug.cgi?id=55571
987
988         Extracted code inside SUPPORT_AUTOCORRECTION_PANEL into
989         SpellingCorrectionController class.
990         This change also remove some SUPPORT_AUTOCORRECTION_PANEL guard if
991         code paths inside the never reached without autocorrection support.
992         Removing guards reduces unintentional build breakage.
993
994         No new tests, no behavior chagne.
995
996         * CMakeLists.txt:
997         * GNUmakefile.am:
998         * WebCore.gypi:
999         * WebCore.pro:
1000         * WebCore.vcproj/WebCore.vcproj:
1001         * WebCore.xcodeproj/project.pbxproj:
1002         * editing/CorrectionPanelInfo.h: Removed.
1003         * editing/EditingAllInOne.cpp:
1004         * editing/Editor.cpp:
1005         (WebCore::Editor::respondToChangedSelection):
1006         (WebCore::Editor::respondToChangedContents):
1007         (WebCore::Editor::appliedEditing):
1008         (WebCore::Editor::Editor):
1009         (WebCore::Editor::~Editor):
1010         (WebCore::Editor::insertTextWithoutSendingTextEvent):
1011         (WebCore::Editor::insertLineBreak):
1012         (WebCore::Editor::insertParagraphSeparator):
1013         (WebCore::Editor::cut):
1014         (WebCore::Editor::paste):
1015         (WebCore::Editor::pasteAsPlainText):
1016         (WebCore::Editor::isAutomaticSpellingCorrectionEnabled):
1017         (WebCore::Editor::markMisspellingsAfterTypingToWord):
1018         (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
1019         (WebCore::Editor::changeBackToReplacedString):
1020         (WebCore::Editor::unappliedSpellCorrection):
1021         (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
1022         (WebCore::Editor::startCorrectionPanelTimer):
1023         (WebCore::Editor::handleCorrectionPanelResult):
1024         (WebCore::Editor::dismissCorrectionPanelAsIgnored):
1025         * editing/Editor.h:
1026         * editing/SpellingCorrectionCommand.cpp:
1027         * editing/SpellingCorrectionController.cpp: Added.
1028         (WebCore::markerTypesForAutocorrection):
1029         (WebCore::markerTypesForReplacement):
1030         (WebCore::markersHaveIdenticalDescription):
1031         (WebCore::SpellingCorrectionController::SpellingCorrectionController):
1032         (WebCore::SpellingCorrectionController::~SpellingCorrectionController):
1033         (WebCore::SpellingCorrectionController::startCorrectionPanelTimer):
1034         (WebCore::SpellingCorrectionController::stopCorrectionPanelTimer):
1035         (WebCore::SpellingCorrectionController::stopPendingCorrection):
1036         (WebCore::SpellingCorrectionController::applyPendingCorrection):
1037         (WebCore::SpellingCorrectionController::hasPendingCorrection):
1038         (WebCore::SpellingCorrectionController::isSpellingMarkerAllowed):
1039         (WebCore::SpellingCorrectionController::show):
1040         (WebCore::SpellingCorrectionController::handleCancelOperation):
1041         (WebCore::SpellingCorrectionController::dismiss):
1042         (WebCore::SpellingCorrectionController::dismissSoon):
1043         (WebCore::SpellingCorrectionController::applyCorrectionPanelInfo):
1044         (WebCore::SpellingCorrectionController::applyAutocorrectionBeforeTypingIfAppropriate):
1045         (WebCore::SpellingCorrectionController::respondToUnappliedSpellCorrection):
1046         (WebCore::SpellingCorrectionController::correctionPanelTimerFired):
1047         (WebCore::SpellingCorrectionController::handleCorrectionPanelResult):
1048         (WebCore::SpellingCorrectionController::isAutomaticSpellingCorrectionEnabled):
1049         (WebCore::SpellingCorrectionController::windowRectForRange):
1050         (WebCore::SpellingCorrectionController::respondToChangedSelection):
1051         (WebCore::SpellingCorrectionController::respondToAppliedEditing):
1052         (WebCore::SpellingCorrectionController::client):
1053         (WebCore::SpellingCorrectionController::textChecker):
1054         (WebCore::SpellingCorrectionController::recordAutocorrectionResponseReversed):
1055         (WebCore::SpellingCorrectionController::markReversed):
1056         (WebCore::SpellingCorrectionController::markCorrection):
1057         (WebCore::SpellingCorrectionController::recordSpellcheckerResponseForModifiedCorrection):
1058         * editing/SpellingCorrectionController.h: Added.
1059         (WebCore::SpellingCorrectionController::UNLESS_ENABLED):
1060         (WebCore::SpellingCorrectionController::shouldStartTimeFor):
1061         (WebCore::SpellingCorrectionController::shouldRemoveMarkersUponEditing):        
1062         * editing/TypingCommand.cpp:
1063         (WebCore::TypingCommand::insertText):
1064         (WebCore::TypingCommand::markMisspellingsAfterTyping):
1065         (WebCore::TypingCommand::deleteKeyPressed):
1066         (WebCore::TypingCommand::forwardDeleteKeyPressed):
1067         * editing/htmlediting.h:
1068         (WebCore::isAmbiguousBoundaryCharacter):
1069         * page/EditorClient.h:
1070         * page/Frame.cpp:
1071         (WebCore::Frame::setPageAndTextZoomFactors):
1072
1073 2011-04-08  Alpha Lam  <hclam@chromium.org>
1074
1075         Unreviewed, rolling out r83335.
1076         http://trac.webkit.org/changeset/83335
1077         https://bugs.webkit.org/show_bug.cgi?id=53556
1078
1079         GTK and QT bots are broken
1080
1081         * CMakeLists.txt:
1082         * Configurations/FeatureDefines.xcconfig:
1083         * DerivedSources.make:
1084         * GNUmakefile.am:
1085         * WebCore.gypi:
1086         * WebCore.xcodeproj/project.pbxproj:
1087         * features.pri:
1088         * html/HTMLAttributeNames.in:
1089         * html/HTMLTagNames.in:
1090         * html/HTMLTrackElement.cpp: Removed.
1091         * html/HTMLTrackElement.h: Removed.
1092         * html/HTMLTrackElement.idl: Removed.
1093
1094 2011-04-08  Brady Eidson  <beidson@apple.com>
1095
1096         Reviewed by Adam Roben.
1097
1098         https://bugs.webkit.org/show_bug.cgi?id=58155 and part of <rdar://problem/9251767>
1099         BitmapImage::getFirstCGImageRefOfSize fails if the frameCount hasn't been initialized from the image source.
1100
1101         * platform/graphics/cg/ImageCG.cpp:
1102         (WebCore::BitmapImage::getFirstCGImageRefOfSize): Call frameCount() instead of accessing m_frames.size() to
1103           make sure the frames are properly tallied first.
1104
1105 2011-04-08  Benjamin Poulain  <benjamin.poulain@nokia.com>
1106
1107         Reviewed by Andreas Kling.
1108
1109         [Qt] Dragging and dropping an image in edit mode does not work
1110         https://bugs.webkit.org/show_bug.cgi?id=19385
1111
1112         When adding an image to the clipboard, we should also include the HTML code of that image so
1113         it can be used for internal drag and drop.
1114
1115         This HTML is expected by all clients of drop events so a fragment can be moved from one browser to
1116         another, or inside the same browser.
1117
1118         * platform/qt/ClipboardQt.cpp:
1119         (WebCore::ClipboardQt::declareAndWriteDragImage):
1120
1121 2011-04-07  Anna Cavender  <annacc@chromium.org>
1122
1123         Reviewed by Eric Carlson.
1124
1125         Setup ENABLE(TRACK) feature define + initial HTMLTrackElement
1126         https://bugs.webkit.org/show_bug.cgi?id=53556
1127
1128         No new tests. No real functionality added just yet.
1129
1130         * CMakeLists.txt:
1131         * Configurations/FeatureDefines.xcconfig:
1132         * DerivedSources.make:
1133         * GNUmakefile.am:
1134         * WebCore.gypi:
1135         * WebCore.xcodeproj/project.pbxproj:
1136         * features.pri:
1137         * html/HTMLAttributeNames.in:
1138         * html/HTMLTagNames.in:
1139         * html/HTMLTrackElement.cpp: Added.
1140         (WebCore::HTMLTrackElement::HTMLTrackElement):
1141         (WebCore::HTMLTrackElement::create):
1142         (WebCore::HTMLTrackElement::insertedIntoTree):
1143         (WebCore::HTMLTrackElement::willRemove):
1144         (WebCore::HTMLTrackElement::src):
1145         (WebCore::HTMLTrackElement::setSrc):
1146         (WebCore::HTMLTrackElement::kind):
1147         (WebCore::HTMLTrackElement::setKind):
1148         (WebCore::HTMLTrackElement::srclang):
1149         (WebCore::HTMLTrackElement::setSrclang):
1150         (WebCore::HTMLTrackElement::label):
1151         (WebCore::HTMLTrackElement::setLabel):
1152         (WebCore::HTMLTrackElement::isDefault):
1153         (WebCore::HTMLTrackElement::setIsDefault):
1154         (WebCore::HTMLTrackElement::isURLAttribute):
1155         * html/HTMLTrackElement.h: Added.
1156         * html/HTMLTrackElement.idl: Added.
1157
1158 2011-04-07  Jer Noble  <jer.noble@apple.com>
1159
1160         Reviewed by Eric Carlson.
1161
1162         Logic error in HTMLMediaElement::exitFullscreen()
1163         https://bugs.webkit.org/show_bug.cgi?id=58085
1164
1165         The new full screen API case could fall through to the legacy API case
1166         unintentionally if a script calls exitFullscreen on an element which is
1167         not the current full screen element.
1168
1169         * html/HTMLMediaElement.cpp:
1170         (WebCore::HTMLMediaElement::enterFullscreen):
1171         (WebCore::HTMLMediaElement::exitFullscreen):
1172
1173 2011-04-08  Mike Reed  <reed@google.com>
1174
1175         Reviewed by Eric Seidel.
1176
1177         Replace SKIA_TEXT with isNativeFontRenderingAllowed() for print-preview to work
1178         https://bugs.webkit.org/show_bug.cgi?id=57782
1179
1180         No new tests. This change only affects print-preview and build option SKIA_GPU 
1181
1182         * platform/graphics/skia/SkiaFontWin.cpp:
1183         (WebCore::paintSkiaText):
1184
1185 2011-04-08  Ryosuke Niwa  <rniwa@webkit.org>
1186
1187         Reviewed by Tony Chang, Darin Adler, and Enrica Casucci.
1188
1189         REGRESSION(r81887): Crash in SplitElement
1190         https://bugs.webkit.org/show_bug.cgi?id=57743
1191
1192         The crash was caused by ReplaceSelectionCommand::doApply's calling splitElement with computeNodeAfterPosition
1193         even when the position was after the last node in it container. Since all we are doing here is to splitting tree
1194         up until the highest ancestor with isInlineNodeWithStyle, replaced the while loop by calls to splitTreeToNode
1195         and highestEnclosingNodeOfType.
1196
1197         Also fixed a bug in splitTreeToNode not to check the difference in visible position when splitting the ancestor,
1198         which would have introduced unnecessary nodes when splitting tree and a bug in highestEnclosingNodeOfType that
1199         it incorrectly called deprecatedNode instead of containerNode.
1200
1201         Test: editing/inserting/insert-images-in-pre-x-crash.html
1202
1203         * editing/CompositeEditCommand.cpp:
1204         (WebCore::CompositeEditCommand::splitTreeToNode):
1205         * editing/ReplaceSelectionCommand.cpp:
1206         (WebCore::ReplaceSelectionCommand::doApply):
1207         * editing/htmlediting.cpp:
1208         (WebCore::highestEnclosingNodeOfType):
1209
1210 2011-04-08  Antti Koivisto  <antti@apple.com>
1211
1212         Reviewed by Tony Gentilcore.
1213
1214         Incoming source should be preload scanned when the parser is blocked 
1215         https://bugs.webkit.org/show_bug.cgi?id=58117
1216
1217         Scan the appended source if parser is blocked.
1218
1219         Test: http/tests/loading/preload-append-scan.php
1220
1221         * html/parser/HTMLDocumentParser.cpp:
1222         (WebCore::HTMLDocumentParser::append):
1223
1224 2011-04-08  Martin Robinson  <mrobinson@igalia.com>
1225
1226         Reviewed by Xan Lopez.
1227
1228         [GTK] Fix the WebKit2 build for older versions of GTK+
1229         https://bugs.webkit.org/show_bug.cgi?id=58095
1230
1231         No new tests. This is just a build fix.
1232
1233         * platform/gtk/GtkVersioning.c:
1234         (gdk_window_create_similar_surface): Reimplement this method for older versions of GDK.
1235         * platform/gtk/GtkVersioning.h: Add the new method to the header.
1236
1237 2011-04-08  Misha Tyutyunik  <michael.tyutyunik@nokia.com>
1238
1239         Reviewed by Laszlo Gombos.
1240
1241         [Qt] Plugin is not scrolled together with page content or jumping 
1242         when content is rendered using cache (backing store).
1243         https://bugs.webkit.org/show_bug.cgi?id=56130
1244         
1245         This is a Symbian portion of the fix. For Linux it looks like
1246         it's enough to call set geometry which should be addressed in
1247         https://bugs.webkit.org/show_bug.cgi?id=57179
1248
1249         No new tests required. This can be tested with manual tests from 
1250         WebCore/manual-tests/qt and WebCore/manual-tests/plugins
1251
1252         * plugins/symbian/PluginViewSymbian.cpp:
1253         (WebCore::PluginView::updatePluginWidget):
1254
1255 2011-04-08  Abhishek Arya  <inferno@chromium.org>
1256
1257         Unreviewed. Remove accidental printf added in r83306.
1258
1259         * page/EventHandler.cpp:
1260         (WebCore::EventHandler::sendContextMenuEvent):
1261
1262 2011-04-08  Enrica Casucci  <enrica@apple.com>
1263
1264         Reviewed by Darin Adler.
1265
1266         Dragging text in a WebKit2 window results in a copy instead of a move.
1267         https://bugs.webkit.org/show_bug.cgi?id=56772
1268         <rdar://problem/9165140>
1269
1270         cleanupAfterSystemDrag cannot call dragEnd in WebKit2, since
1271         the call to startDrag is asynchronous.
1272         
1273         * page/mac/DragControllerMac.mm:
1274         (WebCore::DragController::cleanupAfterSystemDrag):
1275
1276 2011-04-05  Dimitri Glazkov  <dglazkov@chromium.org>
1277
1278         Reviewed by Darin Adler.
1279
1280         Move WheelEvent-dispatching logic into WheelEventDispatchMediator.
1281         https://bugs.webkit.org/show_bug.cgi?id=57642
1282
1283         Covered by existing tests, no functional change.
1284
1285         * dom/Event.cpp:
1286         * dom/Event.h:
1287         (WebCore::EventDispatchMediator::EventDispatchMediator): Added default
1288             constructor.
1289         (WebCore::EventDispatchMediator::event): Inlined.
1290         (WebCore::EventDispatchMediator::setEvent): Added.
1291         * dom/EventDispatcher.cpp: Removed dispatchWheelEvent.
1292         * dom/EventDispatcher.h: Updated decls.
1293         * dom/Node.cpp:
1294         (WebCore::Node::dispatchWheelEvent): Changed to use the mediator and
1295             return a bool, like other dispatch event functions.
1296         * dom/Node.h: Changed decl.
1297         * dom/WheelEvent.cpp:
1298         (WebCore::granularity): Moved from EventDispatcher.
1299         (WebCore::WheelEventDispatchMediator::WheelEventDisatchMediator): Added.
1300         (WebCore::WheelEventDispatchMediator::event): Added.
1301         (WebCore::WheelEventDispatchMediator::dispatchEvent): Added.
1302         * dom/WheelEvent.h: Updated decls.
1303         * page/EventHandler.cpp:
1304         (WebCore::EventHandler::handleWheelEvent): Changed to receive and react
1305             to the return value.
1306
1307 2011-04-08  Jessie Berlin  <jberlin@apple.com>
1308
1309         Windows build warning fix.
1310
1311         * WebCore.vcproj/WebCore.vcproj:
1312         Since ShadowRoot.cpp is included in the DOMAllInOne.cpp file, it should be excluded from
1313         the build.
1314
1315 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
1316
1317         Reviewed by Pavel Feldman.
1318
1319         Web Inspector: update breakpoints according to source frame decorations after live edit.
1320         https://bugs.webkit.org/show_bug.cgi?id=58029
1321
1322         * inspector/front-end/DebuggerPresentationModel.js:
1323         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didEditScriptSource):
1324         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
1325         (WebInspector.DebuggerPresentationModel.prototype._updateResourceContent.didEditScriptSource):
1326         (WebInspector.DebuggerPresentationModel.prototype._updateResourceContent):
1327         * inspector/front-end/SourceFile.js:
1328         (WebInspector.SourceFile.prototype.set content):
1329         * inspector/front-end/SourceFrame.js:
1330         (WebInspector.SourceFrame.prototype._handleSave.didEditScriptSource):
1331         (WebInspector.SourceFrame.prototype._handleSave):
1332
1333 2011-04-08  Pavel Podivilov  <podivilov@chromium.org>
1334
1335         Reviewed by Pavel Feldman.
1336
1337         Web Inspector: fix scripts concatenation in scripts panel.
1338         https://bugs.webkit.org/show_bug.cgi?id=58138
1339
1340         When there is just one script starting at 0:0 it should not be surrounded by <script> framing.
1341
1342         * inspector/front-end/SourceFile.js:
1343         (WebInspector.SourceFile.prototype._loadResourceContent):
1344         (WebInspector.SourceFile.prototype._loadAndConcatenateScriptsContent):
1345
1346 2011-04-08  Pavel Feldman  <pfeldman@chromium.org>
1347
1348         Reviewed by Yury Semikhatsky.
1349
1350         Web Inspector: use "locations" for debugger scripts, "lineNumbers" for the UI elements.
1351         https://bugs.webkit.org/show_bug.cgi?id=58118
1352
1353         This change reuses location for call frames in the protocol + structures script
1354         location <-> source lines interaction better. When we need UI columns, we will add
1355         them, but we should distinguish between script and UI terms on the type level, not naming.
1356
1357         * English.lproj/localizedStrings.js:
1358         * bindings/v8/DebuggerScript.js:
1359         * inspector/InjectedScriptSource.js:
1360         * inspector/Inspector.json:
1361         * inspector/front-end/CallStackSidebarPane.js:
1362         (WebInspector.CallStackSidebarPane.prototype.update.didGetSourceLine):
1363         (WebInspector.CallStackSidebarPane.prototype.update):
1364         * inspector/front-end/DebuggerPresentationModel.js:
1365         (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage.didRequestSourceMapping):
1366         (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage):
1367         (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
1368         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
1369         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
1370         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
1371         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
1372         (WebInspector.PresenationCallFrame):
1373         (WebInspector.PresenationCallFrame.prototype.sourceLine.didRequestSourceMapping):
1374         (WebInspector.PresenationCallFrame.prototype.sourceLine):
1375         * inspector/front-end/ScriptFormatter.js:
1376         (WebInspector.ScriptFormatter.locationToPosition):
1377         (WebInspector.ScriptFormatter.lineToPosition):
1378         * inspector/front-end/ScriptsPanel.js:
1379         (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation):
1380         (WebInspector.ScriptsPanel.prototype._debuggerPaused):
1381         (WebInspector.ScriptsPanel.prototype.showAnchorLocation):
1382         (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation):
1383         (WebInspector.ScriptsPanel.prototype._callFrameSelected):
1384         * inspector/front-end/SourceFile.js:
1385         (WebInspector.SourceMapping.prototype.scriptLocationToSourceLine):
1386         (WebInspector.SourceMapping.prototype.sourceLineToScriptLocation):
1387         (WebInspector.FormattedSourceMapping.prototype.scriptLocationToSourceLine):
1388         (WebInspector.FormattedSourceMapping.prototype.sourceLineToScriptLocation):
1389
1390 2011-04-08  Pavel Podivilov  <podivilov@chromium.org>
1391
1392         Reviewed by Pavel Feldman.
1393
1394         Web Inspector: distinguish breakpoints set on de-obfuscated sources from breakponts set on original sources.
1395         https://bugs.webkit.org/show_bug.cgi?id=58133
1396
1397         * inspector/front-end/DebuggerPresentationModel.js:
1398         (WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource):
1399         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
1400         (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
1401         (WebInspector.DebuggerPresentationModel.prototype._sourceFileForScript):
1402         (WebInspector.DebuggerPresentationModel.prototype._scriptForSourceFileId):
1403         (WebInspector.DebuggerPresentationModel.prototype._createSourceFileId):
1404         (WebInspector.DebuggerPresentationModel.prototype._reset):
1405
1406 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
1407
1408         Reviewed by Pavel Feldman.
1409
1410         Web Inspector: make SourceFrame TextViewer's delegate for editing operations.
1411         https://bugs.webkit.org/show_bug.cgi?id=58026
1412
1413         This is the first step of decoupling TextViewer from SourceFrame.
1414
1415         * inspector/front-end/SourceFrame.js:
1416         (WebInspector.SourceFrame):
1417         (WebInspector.SourceFrame.prototype.show):
1418         (WebInspector.SourceFrame.prototype.hide):
1419         (WebInspector.SourceFrame.prototype._ensureContentLoaded):
1420         (WebInspector.SourceFrame.prototype.contentEditable):
1421         (WebInspector.SourceFrame.prototype.startEditing):
1422         (WebInspector.SourceFrame.prototype.endEditing):
1423         (WebInspector.SourceFrame.prototype._createTextViewer):
1424         (WebInspector.SourceFrame.prototype._handleSave):
1425         (WebInspector.SourceFrame.prototype._handleRevertEditing):
1426         * inspector/front-end/TextViewer.js:
1427         (WebInspector.TextViewer.prototype._enterInternalTextChangeMode):
1428         (WebInspector.TextViewer.prototype._exitInternalTextChangeMode):
1429         (WebInspector.TextViewer.prototype._syncDecorationsForLine):
1430         (WebInspector.TextViewer.prototype._doubleClick):
1431         (WebInspector.TextViewerDelegate):
1432         (WebInspector.TextViewerDelegate.prototype.contentEditable):
1433         (WebInspector.TextViewerDelegate.prototype.startEditing):
1434         (WebInspector.TextViewerDelegate.prototype.endEditing):
1435         (WebInspector.TextEditorMainPanel.prototype._paintScheduledLines):
1436         (WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
1437         * inspector/front-end/inspector.html:
1438
1439 2011-04-08  Leandro Gracia Gil  <leandrogracia@chromium.org>
1440
1441         Reviewed by Steve Block.
1442
1443         Media Stream API: add the getUserMedia method and the Javascript bindings.
1444         https://bugs.webkit.org/show_bug.cgi?id=56586
1445
1446         Add the getUserMedia method to the navigator and its new Javascript types.
1447         Current specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#video-conferencing-and-peer-to-peer-communication
1448
1449         Tests: fast/dom/MediaStream/argument-types.html
1450                fast/dom/MediaStream/enabled.html
1451                fast/dom/MediaStream/no-interface-object.html
1452
1453         * Android.derived.jscbindings.mk:
1454         * Android.derived.v8bindings.mk:
1455         * Android.v8bindings.mk:
1456         * CMakeLists.txt:
1457         * CodeGenerators.pri:
1458         * DerivedSources.cpp:
1459         * DerivedSources.make:
1460         * GNUmakefile.list.am:
1461         * WebCore.gypi:
1462         * WebCore.pro:
1463         * WebCore.vcproj/WebCore.vcproj:
1464         * WebCore.xcodeproj/project.pbxproj:
1465         * bindings/js/JSNavigatorCustom.cpp:
1466         (WebCore::JSNavigator::webkitGetUserMedia):
1467         * bindings/v8/custom/V8NavigatorCustom.cpp: Added.
1468         (WebCore::V8Navigator::webkitGetUserMediaCallback):
1469         * page/Navigator.cpp:
1470         (WebCore::Navigator::webkitGetUserMedia):
1471         * page/Navigator.h:
1472         * page/Navigator.idl:
1473         * page/NavigatorUserMediaError.h: Added.
1474         (WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
1475         (WebCore::NavigatorUserMediaError::~NavigatorUserMediaError):
1476         (WebCore::NavigatorUserMediaError::code):
1477         * page/NavigatorUserMediaError.idl: Added.
1478         * page/NavigatorUserMediaErrorCallback.h: Added.
1479         (WebCore::NavigatorUserMediaErrorCallback::~NavigatorUserMediaErrorCallback):
1480         * page/NavigatorUserMediaErrorCallback.idl: Added.
1481         * page/NavigatorUserMediaSuccessCallback.h: Added.
1482         (WebCore::NavigatorUserMediaSuccessCallback::~NavigatorUserMediaSuccessCallback):
1483         * page/NavigatorUserMediaSuccessCallback.idl: Added.
1484
1485 2011-04-08  Mikhail Naganov  <mnaganov@chromium.org>
1486
1487         Reviewed by Pavel Feldman.
1488
1489         Web Inspector: [Chromium] Add more tests for detailed heap snapshots UI.
1490         https://bugs.webkit.org/show_bug.cgi?id=58010
1491         https://bugs.webkit.org/show_bug.cgi?id=58011
1492
1493         Added tests for "Containment" view. Minor refactorings, bugs fixed.
1494         Split one large tests into smaller ones to avoid timing out in debug mode.
1495
1496         Tests: inspector/profiler/detailed-heapshots-containment-expansion-preserved-when-sorting.html
1497                inspector/profiler/detailed-heapshots-containment-show-all.html
1498                inspector/profiler/detailed-heapshots-containment-show-next.html
1499                inspector/profiler/detailed-heapshots-containment-sorting.html
1500                inspector/profiler/detailed-heapshots-summary-expansion-preserved-when-sorting.html
1501                inspector/profiler/detailed-heapshots-summary-show-all.html
1502                inspector/profiler/detailed-heapshots-summary-show-next.html
1503                inspector/profiler/detailed-heapshots-summary-sorting.html
1504
1505         * inspector/front-end/DetailedHeapshotGridNodes.js:
1506         (WebInspector.HeapSnapshotGridNode):
1507         (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
1508         (WebInspector.HeapSnapshotGridNode.prototype.sort.doSort):
1509         (WebInspector.HeapSnapshotGridNode.prototype.sort):
1510         (WebInspector.HeapSnapshotGenericObjectNode):
1511         (WebInspector.HeapSnapshotObjectNode):
1512         (WebInspector.HeapSnapshotInstanceNode):
1513         (WebInspector.HeapSnapshotConstructorNode):
1514         (WebInspector.HeapSnapshotDiffNode):
1515         (WebInspector.HeapSnapshotDominatorObjectNode):
1516         * inspector/front-end/DetailedHeapshotView.js:
1517         (WebInspector.HeapSnapshotContainmentDataGrid):
1518         (WebInspector.HeapSnapshotDominatorsDataGrid):
1519
1520 2011-04-08  Andrey Adaikin  <aandrey@google.com>
1521
1522         Reviewed by Pavel Feldman.
1523
1524         Web Inspector: Bugs in some corner cases in the text editor
1525         https://bugs.webkit.org/show_bug.cgi?id=58025
1526
1527         This solves the following bugs:
1528         1) The very last _empty_ line would not be deleted if you hit a Backspace on it, or the selection text to be deleted is extended to the very bottom of the editor.
1529         2) An odd corner case: delete all source code from the editor, hit backspace on the only empty line, then add a character. In this case the browser will insert a TEXT node instead of a DIV node for a lineRow.
1530
1531         * inspector/front-end/TextViewer.js:
1532         (WebInspector.TextEditorMainPanel.prototype._selectionToPosition):
1533         (WebInspector.TextEditorMainPanel.prototype._enclosingLineRowOrSelf):
1534         (WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
1535         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
1536         (WebInspector.TextEditorMainPanel.prototype._collectLinesFromDiv):
1537
1538 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
1539
1540         Reviewed by Pavel Feldman.
1541
1542         Web Inspector: add test for script formatter worker.
1543         https://bugs.webkit.org/show_bug.cgi?id=57447
1544
1545         Test: inspector/debugger/script-formatter.html
1546
1547         * GNUmakefile.am:
1548         * WebCore.xcodeproj/project.pbxproj:
1549         * gyp/streamline-inspector-source.sh:
1550         * inspector/front-end/DebuggerPresentationModel.js:
1551         (WebInspector.DebuggerPresentationModel.prototype._addScript):
1552         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
1553         (WebInspector.DebuggerPresentationModel.prototype._formatter):
1554         * inspector/front-end/ScriptFormatterWorker.js:
1555
1556 2011-04-08  Andrey Adaikin  <aandrey@google.com>
1557
1558         Reviewed by Pavel Feldman.
1559
1560         Web Inspector: Tweak dynamically constants for the async highlighting in text editor
1561         https://bugs.webkit.org/show_bug.cgi?id=58035
1562
1563         * inspector/front-end/TextViewer.js:
1564         (WebInspector.TextEditorMainPanel.prototype._expandChunks):
1565         (WebInspector.TextEditorMainPanel.prototype._schedulePaintLines):
1566         (WebInspector.TextEditorMainPanel.prototype._paintScheduledLines):
1567         (WebInspector.TextEditorMainPanel.prototype._restorePaintLinesOperationsCredit):
1568         (WebInspector.TextEditorMainPanel.prototype._adjustPaintLinesOperationsRefreshValue):
1569
1570 2011-04-08  Andrey Kosyakov  <caseq@chromium.org>
1571
1572         Reviewed by Yury Semikhatsky.
1573
1574         Web Inspector: HAR compliance fixes
1575         https://bugs.webkit.org/show_bug.cgi?id=58124
1576
1577         - Always provide some values for queryString and cookies, even though arrays may be empty
1578         - Always provide an empty cache object
1579         - Added entire HARLog to test
1580         - Workaround in test to avoid custom expectations (favicon.ico appears in log on certain platforms)
1581
1582         * inspector/front-end/HAREntry.js:
1583         (WebInspector.HAREntry.prototype.build):
1584         (WebInspector.HAREntry.prototype._buildRequest):
1585         (WebInspector.HAREntry.prototype._buildResponse):
1586
1587 2011-04-08  Adam Barth  <abarth@webkit.org>
1588
1589         Attempt to fix the Qt build.
1590
1591         * css/CSSStyleApplyProperty.cpp:
1592
1593 2011-04-07  Adam Barth  <abarth@webkit.org>
1594
1595         Reviewed by Eric Seidel.
1596
1597         Refactor WebCore/GNUMakefile.am to separate list of files
1598         https://bugs.webkit.org/show_bug.cgi?id=58116
1599
1600         This change is similar to the cooresponding to change to
1601         JavaScriptCore.  We hope to generate GNUmakefile.list.am automatically
1602         using GYP.
1603
1604         * GNUmakefile.am:
1605         * GNUmakefile.list.am: Added.
1606
1607 2011-04-07  Geoffrey Garen  <ggaren@apple.com>
1608
1609         Not reviewed.
1610
1611         Rolled out some accidentally-committed changes in my last commit.
1612
1613         * dom/EventTarget.cpp:
1614         (WebCore::EventTarget::addEventListener):
1615         (WebCore::EventTarget::removeEventListener):
1616         * dom/EventTarget.h:
1617
1618 2011-04-07  Julien Chaffraix  <jchaffraix@codeaurora.org>
1619
1620         Reviewed by Alexey Proskuryakov.
1621
1622         EventSource should only accept UTF-8 charset
1623         https://bugs.webkit.org/show_bug.cgi?id=56942
1624
1625         Following the discussion on bug 45372, this change implements the recommended
1626         way of handling "charset". We only accept UTF-8 but no other encoding. This matches
1627         the encoding of the EventSource and also may fix TomCat that automatically send this
1628         charset.
1629
1630         * page/EventSource.cpp:
1631         (WebCore::EventSource::didReceiveResponse): We now check the charset attribute and if it is
1632         not UTF-8, abort the connection and log the error to the console. Also we log if the MIME type
1633         is wrong to the console to help debugging (only in the case of an HTTP 200 response though).
1634
1635 2011-04-07  Geoffrey Garen  <ggaren@apple.com>
1636
1637         Reviewed by Maciej Stachowiak.
1638
1639         Some Handle<T> cleanup
1640         https://bugs.webkit.org/show_bug.cgi?id=58109
1641
1642         * bindings/js/ScriptValue.h:
1643         (WebCore::ScriptValue::ScriptValue): Updated for new null constructor.
1644         (WebCore::ScriptValue::hasNoValue): Updated for removal of isEmpty().
1645
1646 2011-04-07  Dominic Cooney  <dominicc@google.com>
1647
1648         Reviewed by Dimitri Glazkov.
1649
1650         Let shadow DOM have a list of nodes at the top level of a shadow.
1651         https://bugs.webkit.org/show_bug.cgi?id=57813
1652
1653         Adds ShadowRoot, a list of nodes, to be a parent for top-level
1654         shadow children. Forwards rendering through the root and into the
1655         host's renderer.
1656
1657         Covered by existing tests of elements that use this style of shadow.
1658
1659         * Android.mk: add ShadowRoot.h/cpp
1660         * CMakeLists.txt:
1661         * GNUmakefile.am:
1662         * WebCore.exp.in:
1663         * WebCore.gypi:
1664         * WebCore.pro:
1665         * WebCore.vcproj/WebCore.vcproj:
1666         * WebCore.xcodeproj/project.pbxproj:
1667         * css/CSSStyleSelector.cpp:
1668         (WebCore::CSSStyleSelector::initForStyleResolve): proxy style to host
1669         * dom/ContainerNode.cpp: parent nodes that are shadow roots are alive
1670         (WebCore::ContainerNode::insertBefore):
1671         (WebCore::ContainerNode::replaceChild):
1672         (WebCore::ContainerNode::removeChild):
1673         (WebCore::ContainerNode::appendChild):
1674         * dom/DocumentFragment.cpp:
1675         (WebCore::DocumentFragment::DocumentFragment):
1676         * dom/DocumentFragment.h:
1677         * dom/Element.cpp:
1678         (WebCore::Element::recalcStyle): look through ShadowRoots for host's style
1679         (WebCore::Element::shadowRoot): should be const
1680         (WebCore::Element::ensureShadowRoot): simpler than setShadowRoot
1681         * dom/Element.h:
1682         * dom/ElementRareData.h:
1683         * dom/Node.cpp:
1684         (WebCore::Node::parentNodeForRenderingAndStyle): indirection so
1685           ShadowRoot can forward to the host's renderer
1686         (WebCore::Node::createRendererAndStyle):
1687         (WebCore::Node::createRendererIfNeeded):
1688         * dom/Node.h:
1689         (WebCore::Node::isShadowBoundary): temporary, to differentiate
1690           old- and new-style, until all roots are ShadowRoot instances
1691         * dom/ShadowRoot.cpp: Added.
1692         (WebCore::ShadowRoot::ShadowRoot):
1693         (WebCore::ShadowRoot::recalcStyle): forward recalc to children
1694         * dom/ShadowRoot.h: Added.
1695         (WebCore::ShadowRoot::isShadowBoundary):
1696         (WebCore::ShadowRoot::create):
1697         * html/HTMLKeygenElement.cpp: use ensureShadowRoot
1698         (WebCore::HTMLKeygenElement::HTMLKeygenElement):
1699         (WebCore::HTMLKeygenElement::parseMappedAttribute):
1700         (WebCore::HTMLKeygenElement::appendFormData):
1701         (WebCore::HTMLKeygenElement::reset):
1702         (WebCore::HTMLKeygenElement::shadowSelect):
1703         * html/HTMLKeygenElement.h:
1704         * html/HTMLMeterElement.cpp: use ensureShadowRoot
1705         (WebCore::HTMLMeterElement::createShadowSubtree):
1706         * html/HTMLProgressElement.cpp: use ensureShadowRoot
1707         (WebCore::HTMLProgressElement::createShadowSubtree):
1708         * html/InputType.cpp: use ensureShadowRoot
1709         (WebCore::InputType::destroyShadowSubtree):
1710         * html/RangeInputType.cpp: use ensureShadowRoot
1711         (WebCore::RangeInputType::handleMouseDownEvent):
1712         (WebCore::RangeInputType::createShadowSubtree):
1713         (WebCore::RangeInputType::valueChanged):
1714         (WebCore::RangeInputType::shadowSliderThumb):
1715         * html/RangeInputType.h:
1716         * html/ValidationMessage.cpp: use ensureShadowRoot
1717         (WebCore::ValidationMessage::buildBubbleTree):
1718         (WebCore::ValidationMessage::deleteBubbleTree):
1719         * html/shadow/SliderThumbElement.cpp:
1720         (WebCore::SliderThumbElement::setPositionFromPoint):
1721         (WebCore::SliderThumbElement::hostInput):
1722         * html/shadow/SliderThumbElement.h:
1723         * rendering/MediaControlElements.cpp: use ensureShadowRoot
1724         (WebCore::MediaControlInputElement::attach):
1725         (WebCore::MediaControlInputElement::updateStyle):
1726         * rendering/RenderSlider.cpp: use ensureShadowRoot
1727         (WebCore::RenderSlider::thumbRect):
1728         (WebCore::RenderSlider::layout):
1729         (WebCore::RenderSlider::shadowSliderThumb):
1730         (WebCore::RenderSlider::inDragMode):
1731         * rendering/RenderSlider.h:
1732
1733 2011-04-07  Maciej Stachowiak  <mjs@apple.com>
1734
1735         Reviewed by Simon Fraser.
1736
1737         REGRESSION (r80871): Crash when visiting http://broadband.biglobe.ne.jp/
1738         https://bugs.webkit.org/show_bug.cgi?id=56297
1739         <rdar://problem/9131597>
1740
1741         Test: fast/css-generated-content/table-row-after-no-crash.html
1742
1743         * rendering/RenderTableRow.cpp:
1744         (WebCore::RenderTableRow::styleDidChange): Factor out generation of before/after
1745         content, and only do it if the row already has a parent. For construction of
1746         anonymous cells to work correctly, the row needs to already have a parent, so
1747         in that case wait a bit.
1748         (WebCore::RenderTableRow::updateBeforeAndAfterContent): Factored out to here.
1749         * rendering/RenderTableRow.h:
1750         * rendering/RenderTableSection.cpp:
1751         (WebCore::RenderTableSection::addChild): When adding a row, update its
1752         before/after content, in case it had any.
1753
1754 2011-04-07  Beth Dakin  <bdakin@apple.com>
1755
1756         Reviewed by Simon Fraser.
1757
1758         Probable fix for <rdar://problem/9251443>  Crashing on exception: -
1759         [ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]: unrecognized 
1760         selector sent to instance ADDRESS.
1761
1762        Need to implement new delegate method.
1763         * platform/mac/ScrollAnimatorMac.mm:
1764         (-[ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]):
1765
1766 2011-04-07  Ian Henderson  <ianh@apple.com>
1767
1768         Reviewed by Simon Fraser.
1769
1770         Optimize filling rounded rects that are actually ellipses
1771         https://bugs.webkit.org/show_bug.cgi?id=58098
1772
1773         In CG, drawing an ellipse directly is faster than constructing and
1774         filling a rounded rect path.  Detect when the given rounded rect is
1775         actually an ellipse and draw it directly in this case.
1776
1777         * platform/graphics/cg/GraphicsContextCG.cpp:
1778         (WebCore::GraphicsContext::fillRoundedRect):
1779
1780 2011-04-07  Ned Holbrook  <nholbrook@apple.com>
1781
1782         Reviewed by Dan Bernstein.
1783
1784         CTLine objects should outlive their CTRuns
1785         https://bugs.webkit.org/show_bug.cgi?id=58063
1786
1787         * platform/graphics/mac/ComplexTextController.h: Add m_coreTextLines, to be destroyed after m_complexTextRuns.
1788         * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
1789         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Moot m_coreTextRun.
1790         (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): Append line to m_coreTextLines.
1791
1792 2011-04-07  Nat Duca  <nduca@chromium.org>
1793
1794         Reviewed by David Levin.
1795
1796         [chromium] Compositor thread infrastructure
1797         https://bugs.webkit.org/show_bug.cgi?id=56131
1798
1799         Introduce chrome compositor thread and related
1800         infrastructure.
1801
1802         * WebCore.gypi:
1803         * platform/graphics/chromium/cc/CCMainThread.cpp: Added.
1804         (WebCore::CCMainThread::performTask):
1805         (WebCore::CCMainThread::postTask):
1806         * platform/graphics/chromium/cc/CCMainThread.h: Added.
1807         (WebCore::CCMainThread::Task::~Task):
1808         (WebCore::CCMainThread::Task::instance):
1809         (WebCore::CCMainThread::Task::Task):
1810         * platform/graphics/chromium/cc/CCMainThreadTask.h: Added.
1811         (WebCore::MainThreadTask0::create):
1812         (WebCore::MainThreadTask0::MainThreadTask0):
1813         (WebCore::MainThreadTask0::performTask):
1814         (WebCore::MainThreadTask1::create):
1815         (WebCore::MainThreadTask1::MainThreadTask1):
1816         (WebCore::MainThreadTask1::performTask):
1817         (WebCore::MainThreadTask2::create):
1818         (WebCore::MainThreadTask2::MainThreadTask2):
1819         (WebCore::MainThreadTask2::performTask):
1820         (WebCore::MainThreadTask3::create):
1821         (WebCore::MainThreadTask3::MainThreadTask3):
1822         (WebCore::MainThreadTask3::performTask):
1823         (WebCore::createMainThreadTask):
1824         * platform/graphics/chromium/cc/CCThread.cpp: Added.
1825         (WebCore::CCThread::create):
1826         (WebCore::CCThread::CCThread):
1827         (WebCore::CCThread::~CCThread):
1828         (WebCore::CCThread::postTask):
1829         (WebCore::CCThread::compositorThreadStart):
1830         (WebCore::CCThread::runLoop):
1831         * platform/graphics/chromium/cc/CCThread.h: Added.
1832         (WebCore::CCThread::Task::~Task):
1833         (WebCore::CCThread::Task::instance):
1834         (WebCore::CCThread::Task::Task):
1835         (WebCore::CCThread::threadID):
1836         (WebCore::CCCompletionEvent::CCCompletionEvent):
1837         (WebCore::CCCompletionEvent::~CCCompletionEvent):
1838         (WebCore::CCCompletionEvent::wait):
1839         (WebCore::CCCompletionEvent::signal):
1840         * platform/graphics/chromium/cc/CCThreadTask.h: Added.
1841         (WebCore::CCThreadTask0::create):
1842         (WebCore::CCThreadTask0::CCThreadTask0):
1843         (WebCore::CCThreadTask0::performTask):
1844         (WebCore::CCThreadTask1::create):
1845         (WebCore::CCThreadTask1::CCThreadTask1):
1846         (WebCore::CCThreadTask1::performTask):
1847         (WebCore::CCThreadTask2::create):
1848         (WebCore::CCThreadTask2::CCThreadTask2):
1849         (WebCore::CCThreadTask2::performTask):
1850         (WebCore::CCThreadTask3::create):
1851         (WebCore::CCThreadTask3::CCThreadTask3):
1852         (WebCore::CCThreadTask3::performTask):
1853         (WebCore::createCCThreadTask):
1854
1855 2011-04-07  Ryosuke Niwa  <rniwa@webkit.org>
1856
1857         Reviewed by Eric Seidel.
1858
1859         REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
1860         https://bugs.webkit.org/show_bug.cgi?id=57872
1861
1862         r46914 initially introduced a regression by replacing calls to styleAtPosition by editingStyleAtPosition
1863         because editingStyleAtPosition did not avoid tab span to obtain the computed style unlike styleAtPosition.
1864
1865         r46914 also introduced a regression by cloning hierarchy under new block at the insertion position without
1866         avoiding the tab span.
1867
1868         Fixed the both regressions by avoiding tab spans when computing the editing style and when cloning hierarchy.
1869         Also reverted r46914 for the general code path because re-creating node hierarchy duplicates nodes when
1870         we're moving nodes after the paragraph separator. Instead, we now split the tree up until the start block
1871         before moving the nodes.
1872
1873         Tests: editing/inserting/insert-paragraph-after-tab-span-and-text.html
1874                editing/inserting/insert-paragraph-separator-tab-span.html
1875
1876         * editing/DeleteSelectionCommand.cpp:
1877         (WebCore::DeleteSelectionCommand::saveTypingStyleState): Since EditingStyle's constructor avoids a tab span,
1878         no longer calls positionBeforeTabSpan on the position passed to EditingStyle's constructor.
1879         * editing/EditingStyle.cpp:
1880         (WebCore::EditingStyle::init): Always avoid a tab span when computing the editing style.
1881         * editing/InsertParagraphSeparatorCommand.cpp:
1882         (WebCore::InsertParagraphSeparatorCommand::doApply): Avoid cloning tab spans and inserting a paragraph
1883         separator into a paragraph separator.
1884         * editing/htmlediting.cpp:
1885         (WebCore::positionOutsideTabSpan): Renamed from positionBeforeTabSpan. Also returns the position in the parent
1886         node after the tab span if the position was at the end of the tab span.
1887         * editing/htmlediting.h:
1888
1889 2011-04-07  Jia Pu  <jpu@apple.com>
1890
1891         Reviewed by Darin Adler.
1892
1893         [Mac] Editor::setComposition() should not trigger correction panel timer.
1894         https://bugs.webkit.org/show_bug.cgi?id=58049
1895          <rdar://problem/9226305>
1896
1897         On Mac OS X that supports autocorrection panel, typing unconfirmed composition (i.e. unconfirmed Japanese or Chinese input)
1898         should not start autocorrection timer. We added a member variable, m_shouldPreventSpellChecking, to TypingCommand. 
1899         When this value is true, markMisspellingsAfterTyping() will not be called in TypingCommand::typingAddedToOpenCommand().
1900         m_shouldPreventSpellChecking is set to true in the TypingCommand objects created by Editor::setComposition().
1901
1902         No new tests. No deterministically reproducible test case. Patch is based on static code analysis. Testing this also requires firing
1903         autocorrection panel timer, which can not be easily done in automated fashion.
1904
1905         * editing/Editor.cpp:
1906         (WebCore::Editor::deleteWithDirection):
1907         (WebCore::Editor::insertTextWithoutSendingTextEvent):
1908         (WebCore::Editor::confirmComposition):
1909         (WebCore::Editor::setComposition):
1910         * editing/EditorCommand.cpp:
1911         (WebCore::executeDelete):
1912         * editing/TypingCommand.cpp:
1913         (WebCore::TypingCommand::TypingCommand):
1914         (WebCore::TypingCommand::deleteSelection):
1915         (WebCore::TypingCommand::deleteKeyPressed):
1916         (WebCore::TypingCommand::forwardDeleteKeyPressed):
1917         (WebCore::TypingCommand::insertText):
1918         (WebCore::TypingCommand::insertLineBreak):
1919         (WebCore::TypingCommand::insertParagraphSeparator):
1920         (WebCore::TypingCommand::typingAddedToOpenCommand):
1921         * editing/TypingCommand.h:
1922         (WebCore::TypingCommand::create):
1923         (WebCore::TypingCommand::setShouldPreventSpellChecking):
1924
1925 2011-04-07  John Bauman  <jbauman@chromium.org>
1926
1927         Reviewed by Kenneth Russell.
1928
1929         clearIfComposited call is really slow
1930         https://bugs.webkit.org/show_bug.cgi?id=57999
1931
1932         Move getContextAttributes call after the if, so it isn't called nearly as often.
1933
1934         No new tests.
1935
1936         * html/canvas/WebGLRenderingContext.cpp:
1937         (WebCore::WebGLRenderingContext::clearIfComposited):
1938
1939 2011-04-07  Luke Macpherson   <macpherson@chromium.org>
1940
1941         Reviewed by Dimitri Glazkov.
1942
1943         Implement Backgroun and Mask properties in CSSStyleApplyProperty
1944         https://bugs.webkit.org/show_bug.cgi?id=57922
1945
1946         No tests added as no behavioral changes.
1947
1948         * css/CSSStyleApplyProperty.cpp:
1949         Added ApplyPropertyFillLayer test to handle Background and Mask CSS Properties.
1950         (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
1951         Added constructor calls to set up:
1952           CSSPropertyBackgroundAttachment
1953           CSSPropertyBackgroundClip
1954           CSSPropertyWebkitBackgroundClip
1955           CSSPropertyWebkitBackgroundComposite
1956           CSSPropertyBackgroundOrigin
1957           CSSPropertyWebkitBackgroundOrigin
1958           CSSPropertyBackgroundSize
1959           CSSPropertyWebkitBackgroundSize
1960           CSSPropertyWebkitMaskAttachment
1961           CSSPropertyWebkitMaskClip
1962           CSSPropertyWebkitMaskComposite
1963           CSSPropertyWebkitMaskOrigin
1964           CSSPropertyWebkitMaskSize
1965         * css/CSSStyleApplyProperty.h:
1966         (WebCore::CSSStyleApplyProperty::setPropertyValue):
1967         Add function to specify an equivalent property value in the lookup table.
1968         * css/CSSStyleSelector.cpp:
1969         (WebCore::CSSStyleSelector::applyProperty):
1970         Remove sections now implemented by CSSStyleApplyProperty.
1971         * css/CSSStyleSelector.h:
1972         Make CSSStyleApplyProperty a friend class so that the mapFill* functions are accessible.
1973
1974 2011-04-04  Eric Seidel  <eric@webkit.org>
1975
1976         Reviewed by Ryosuke Niwa.
1977
1978         Split run storage out from BidiResolver into a new BidiRunList class
1979         https://bugs.webkit.org/show_bug.cgi?id=57764
1980
1981         Part of what makes BidiResolver and InlineIterator so difficult to understand
1982         (and bug 50912 so difficult to fix) is that BidiResolver is both a state machine
1983         for the Unicode Bidi Algorithm (UBA) as well as storage for the resulting
1984         BidiRuns from the algorithm.  This patch breaks the storage aspect off
1985         into its own class BidiRunList.
1986
1987         This patch is only a start.  It does not actually fix the problematic ownership
1988         relationship, but it does make it possible to fix such in a second patch.
1989
1990         The run pointers and addRun/prependRun, etc. were already a tightly coupled
1991         logical subset of the BidiResolver class, so moving them into their own class
1992         was both obvious and easy.  The only piece of logic I had to move was that
1993         deleteRuns() had a side-effect of setting the m_emptyRun bit on the resolver.
1994
1995         I believe this deleteRuns side-effect was only ever used for one place
1996         (right after findNextLineBreak) and that it's only needed because
1997         findNextLineBreak can sometimes create bidi runs.  Run creation appears to be
1998         an unintentional side-effect of how InlineIterator calls through to BidiResolver
1999         as part of bidiNext and not a desired effect of the code.  I have added the call
2000         to markCurrentRunEmpty to both places deleteRuns was called (where the resolver
2001         could get re-used) as a safety precaution.  We could replace both with ASSERTs
2002         in a later patch.
2003
2004         I suspect there may be a small performance win from further refactoring so that
2005         findNextLineBreak does not need to create BidiRuns.
2006
2007         As I commented in the code, callers should own their own BidiRunList which they
2008         pass to BidiResolver::createBidiRunsForLine.  I attempted to implement that in
2009         an earlier version of this patch, but it was too complicated with the current
2010         twisted dependencies between InlineIterator/bidiNext and InlineBidiResolver.
2011         raise/lowerExplicitEmbeddingLevel are called unconditionally
2012         from commitExplicitEmbedding (which is called by bidiNext) and expect to have
2013         access to a runs list even in cases where we don't want any runs (findNextLineBreak).
2014
2015         I also cleaned up some of the callers to pass around BidiRunList objects instead
2016         of InlineBidiResolvers now that they're separate objects.
2017
2018         * GNUmakefile.am:
2019         * WebCore.gypi:
2020         * WebCore.pro:
2021         * WebCore.vcproj/WebCore.vcproj:
2022         * WebCore.xcodeproj/project.pbxproj:
2023         * platform/graphics/GraphicsContext.cpp:
2024         (WebCore::GraphicsContext::drawBidiText):
2025         * platform/text/BidiResolver.h:
2026         (WebCore::BidiResolver::BidiResolver):
2027         (WebCore::BidiResolver::runs):
2028         (WebCore::BidiResolver::markCurrentRunEmpty):
2029         (WebCore::::appendRun):
2030         (WebCore::::lowerExplicitEmbeddingLevel):
2031         (WebCore::::raiseExplicitEmbeddingLevel):
2032         (WebCore::::reorderRunsFromLevels):
2033         (WebCore::::createBidiRunsForLine):
2034         * rendering/InlineIterator.h:
2035         (WebCore::InlineBidiResolver::appendRun):
2036         * rendering/RenderBlock.h:
2037         * rendering/RenderBlockLineLayout.cpp:
2038         (WebCore::createRun):
2039         (WebCore::RenderBlock::appendRunsForObject):
2040         (WebCore::reachedEndOfTextRenderer):
2041         (WebCore::RenderBlock::handleTrailingSpaces):
2042         (WebCore::RenderBlock::layoutInlineChildren):
2043
2044 2011-04-07  Naoki Takano  <takano.naoki@gmail.com>
2045
2046         Reviewed by Adam Barth.
2047
2048         [Chromium] Fix relocation problem of popup window which introduces autofill popup sometimes moves to screen's top left corner.
2049         https://bugs.webkit.org/show_bug.cgi?id=57911
2050         http://code.google.com/p/chromium/issues/detail?id=78073
2051
2052         Manual test added: manual-tests/autofill-popup-location.html
2053
2054         Originally only height is checked so that it introduces the bug.
2055         So I changed it to check both width and height as size.
2056
2057         * manual-tests/autofill-popup-location.html: Added.
2058         * platform/chromium/PopupMenuChromium.cpp:
2059         (WebCore::PopupContainer::refresh): Check window size between original and new before calling setFrameRect().
2060
2061 2011-04-07  Adam Barth  <abarth@webkit.org>
2062
2063         Reviewed by Eric Seidel.
2064
2065         Implement img-src style-src and font-src
2066         https://bugs.webkit.org/show_bug.cgi?id=58018
2067
2068         These are pretty straight forward given the rest of the infrastructure
2069         we've built so far.
2070
2071         Tests: http/tests/security/contentSecurityPolicy/image-allowed.html
2072                http/tests/security/contentSecurityPolicy/image-blocked.html
2073                http/tests/security/contentSecurityPolicy/style-allowed.html
2074                http/tests/security/contentSecurityPolicy/style-blocked.html
2075                http/tests/security/contentSecurityPolicy/xsl-allowed.php
2076                http/tests/security/contentSecurityPolicy/xsl-blocked.php
2077
2078         * loader/cache/CachedResourceLoader.cpp:
2079         (WebCore::CachedResourceLoader::canRequest):
2080         * page/ContentSecurityPolicy.cpp:
2081         (WebCore::ContentSecurityPolicy::allowImageFromSource):
2082         (WebCore::ContentSecurityPolicy::allowStyleFromSource):
2083         (WebCore::ContentSecurityPolicy::allowFontFromSource):
2084         (WebCore::ContentSecurityPolicy::addDirective):
2085         * page/ContentSecurityPolicy.h:
2086
2087 2011-04-07  David Levin  <levin@chromium.org>
2088
2089         Reviewed by Darin Adler.
2090
2091         Make IconSnapshot and PageURLRecord member variables private.
2092         https://bugs.webkit.org/show_bug.cgi?id=58080
2093
2094         No change in functionality so no new tests.
2095
2096         * loader/icon/IconDatabase.cpp:
2097         (WebCore::IconDatabase::writeToDatabase): Changed to used the accessor functions.
2098         (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase): Ditto.
2099         * loader/icon/IconRecord.h:
2100         (WebCore::IconSnapshot::IconSnapshot): Changed to use the new member variable names.
2101         (WebCore::IconSnapshot::iconURL): Expose the property.
2102         (WebCore::IconSnapshot::timestamp): Ditto.
2103         (WebCore::IconSnapshot::data): Ditto.
2104         * loader/icon/PageURLRecord.h:
2105         (WebCore::PageURLSnapshot::PageURLSnapshot): Changed to use the new member variable names.
2106         (WebCore::PageURLSnapshot::pageURL): Expose the property.
2107         (WebCore::PageURLSnapshot::iconURL): Ditto.
2108
2109 2011-04-07  Dan Bernstein  <mitz@apple.com>
2110
2111         Build fix.
2112
2113         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2114         (WebCore::GraphicsContext::roundToDevicePixels):
2115
2116 2011-04-07  Eric Seidel  <eric@webkit.org>
2117
2118         Reviewed by Adam Barth.
2119
2120         Add stub support for generating Gtk build system from gyp
2121         https://bugs.webkit.org/show_bug.cgi?id=58086
2122
2123         This does not produce a buildable WebCore, but it
2124         does allow running gyp/configure --port=gtk and having
2125         it generate a gtk.Makefile which we can use for testing
2126         the rest of the plumbing.
2127
2128         * gyp/gtk.gyp: Added.
2129
2130 2011-04-07  David Hyatt  <hyatt@apple.com>
2131
2132         Reviewed by Dan Bernstein.
2133
2134         https://bugs.webkit.org/show_bug.cgi?id=57736
2135         
2136         Crash on openstreetmap.org while using the map. Fix a bad interaction between the positioned movement layout
2137         optimization and the simplified layout optimization that could lead to blocks remaining marked as dirty when
2138         layout finished. This would eventually lead to an inability to properly determine the correct layout root and
2139         would cause a deleted root to be used later on.
2140
2141         Added fast/block/positioning/complex-positioned-movement.html.
2142
2143         * page/FrameView.cpp:
2144         (WebCore::FrameView::scheduleRelayoutOfSubtree):
2145         Add asserts to catch cases in the future where a layout root is set that has a dirty containing block.
2146     
2147         * rendering/RenderBlock.cpp:
2148         (WebCore::RenderBlock::simplifiedLayout):
2149         Change simplified layout so that the positioned movement optimization no longer clears the other layout
2150         flags. This will ensure that we still lay out our descendants if they need it.
2151         
2152         (WebCore::RenderBlock::layoutPositionedObjects):
2153         Changed to clear our layout flags now if the positioned movement is successful, since tryLayoutDoingPositionedMovementOnly
2154         no longer does the clear.
2155     
2156         * rendering/RenderBox.h:
2157         (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly):
2158         tryLayoutDoingPositionedMovementOnly now returns a boolean indicating success or failure.  On success it no longer
2159         does setNeedsLayout(false), but instead will let the caller take care of it. This way the caller can still look at
2160         the other flags in case other kinds of layout are still needed.
2161     
2162         * rendering/RenderObject.h:
2163         (WebCore::RenderObject::setNeedsPositionedMovementLayout):
2164         (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
2165         Changed these methods to only set their respective flags and not to try to be clever about avoiding propagation.
2166
2167 2011-04-07  Andrew Scherkus  <scherkus@chromium.org>
2168
2169         Revert ENABLE_TRACK patch due to compile failures.
2170
2171         * CMakeLists.txt:
2172         * Configurations/FeatureDefines.xcconfig:
2173         * DerivedSources.make:
2174         * GNUmakefile.am:
2175         * WebCore.gypi:
2176         * WebCore.xcodeproj/project.pbxproj:
2177         * features.pri:
2178         * html/HTMLAttributeNames.in:
2179         * html/HTMLTagNames.in:
2180         * html/HTMLTrackElement.cpp: Removed.
2181         * html/HTMLTrackElement.h: Removed.
2182         * html/HTMLTrackElement.idl: Removed.
2183
2184 2011-04-07  Dan Bernstein  <mitz@apple.com>
2185
2186         Reviewed by Simon Fraser.
2187
2188         <rdar://problem/9018212> Underline thickness is not uniform under non-integral scale factor
2189         https://bugs.webkit.org/show_bug.cgi?id=58083
2190
2191         Test: fast/text/decorations-transformed.html
2192
2193         * platform/graphics/GraphicsContext.h: Added a RoundingMode enum with two values. RoundAllSides
2194         is the existing rounding mode, where each side of the rectangle snaps to the nearest pixel
2195         gridline. RoundOriginAndDimensions snaps the origin to the nearest pixel gridpoint and rounds
2196         the width and the height. In this new mode, translating a rectangle in user space never changes
2197         its dimensions in device pixels.
2198         * platform/graphics/cg/GraphicsContextCG.cpp:
2199         (WebCore::GraphicsContext::roundToDevicePixels): Implemented RoundOriginAndDimensions.
2200         (WebCore::GraphicsContext::drawLineForText): Use RoundOriginAndDimensions, thus ensuring that
2201         all underlines have the same thickness in device pixels.
2202         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
2203         (WebCore::GraphicsContext::roundToDevicePixels): Added RoundingMode parameter, but did not implement it.
2204         * platform/graphics/qt/GraphicsContextQt.cpp:
2205         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
2206         * platform/graphics/skia/GraphicsContextSkia.cpp:
2207         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
2208         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2209         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
2210         * platform/graphics/wx/GraphicsContextWx.cpp:
2211         (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
2212         * rendering/InlineTextBox.cpp:
2213         (WebCore::InlineTextBox::paintDecoration):
2214
2215 2011-04-06  Vitaly Repeshko  <vitalyr@chromium.org>
2216
2217         Reviewed by Nate Chapin.
2218
2219         [V8] Remove custom DOMImplementation getter on Document.
2220         https://bugs.webkit.org/show_bug.cgi?id=57991
2221
2222         The custom getter is no longer required because DOMImplementation
2223         objects are now created per document.
2224
2225         Test: fast/dom/DOMImplementation/implementation-identity.html
2226
2227         * bindings/scripts/CodeGeneratorV8.pm:
2228         * bindings/v8/custom/V8DocumentCustom.cpp:
2229         * dom/Document.idl:
2230
2231 2011-04-07  Sergey Glazunov  <serg.glazunov@gmail.com>
2232
2233         Reviewed by Dimitri Glazkov.
2234
2235         setHasID() is only called for styled elements
2236         https://bugs.webkit.org/show_bug.cgi?id=57267
2237
2238         Test: fast/dom/non-styled-element-id-crash.html
2239
2240         * dom/Element.cpp:
2241         (WebCore::Element::attributeChanged):
2242         (WebCore::Element::idAttributeChanged):
2243         * dom/Element.h:
2244         * dom/StyledElement.cpp:
2245         (WebCore::StyledElement::parseMappedAttribute):
2246
2247 2011-04-07  Jer Noble  <jer.noble@apple.com>
2248
2249         Reviewed by Eric Carlson.
2250
2251         HTMLVideoElement::webkitEnterFullscreen does not use new Full Screen API when available.
2252         https://bugs.webkit.org/show_bug.cgi?id=58070
2253
2254         Make the HTMLMediaElement full screen functions call into the new Full Screen API when
2255         FULLSCREEN_API is enabled.
2256
2257         * html/HTMLMediaElement.cpp:
2258         (WebCore::HTMLMediaElement::enterFullscreen):
2259         (WebCore::HTMLMediaElement::exitFullscreen):
2260
2261 2011-04-07  Adam Barth  <abarth@webkit.org>
2262
2263         Reviewed by Eric Seidel.
2264
2265         Implement CSP's options directive
2266         https://bugs.webkit.org/show_bug.cgi?id=58014
2267
2268         This patch contains the full options parser, but we only have enough of
2269         CSP implemented to see the effects of disable-xss-protection.  Will
2270         need to do some more work before we can see eval-script in action.
2271
2272         Tests: http/tests/security/contentSecurityPolicy/inline-script-allowed.html
2273                http/tests/security/contentSecurityPolicy/inline-script-blocked-goofy.html
2274
2275         * page/ContentSecurityPolicy.cpp:
2276         (WebCore::CSPOptions::CSPOptions):
2277         (WebCore::CSPOptions::disableXSSProtection):
2278         (WebCore::CSPOptions::evalScript):
2279         (WebCore::CSPOptions::parse):
2280         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
2281         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
2282         (WebCore::ContentSecurityPolicy::allowInlineScript):
2283         (WebCore::ContentSecurityPolicy::addDirective):
2284         * page/ContentSecurityPolicy.h:
2285
2286 2011-04-07  Alexey Proskuryakov  <ap@apple.com>
2287
2288         Reviewed by Anders Carlsson.
2289
2290         REGRESSION (WebKit2): Reverse conversion doesn't work in Kotoeri
2291         https://bugs.webkit.org/show_bug.cgi?id=58066
2292         <rdar://problem/8965302>
2293
2294         * platform/mac/HTMLConverter.h:
2295         * platform/mac/HTMLConverter.mm: (+[WebHTMLConverter editingAttributedStringFromRange:]):
2296         Changed editingAttributedStringFromRange: to use WebCore::Range instead of DOMRange, since
2297         it's now used in WebKit2.
2298
2299 2011-04-07  Andy Estes  <aestes@apple.com>
2300
2301         Reviewed by Darin Adler.
2302
2303         REGRESSION (r64712): Microsoft Outlook 2011: original message contents
2304         not included when replying to an email.
2305         https://bugs.webkit.org/show_bug.cgi?id=57794
2306         
2307         * WebCore.exp.in:
2308         * loader/FrameLoader.cpp:
2309         (WebCore::FrameLoader::finishedParsing): Call Frame::injectUserScripts()
2310         before checking if the FrameLoader is parsing the initial empty document.
2311         This allows user scripts to be injected at the end of document parsing
2312         (if the setting is enabled).
2313         * page/Frame.cpp:
2314         (WebCore::Frame::injectUserScripts): Do not inject scripts if this
2315         feature is disabled on the initial empty document.
2316         * page/Settings.cpp:
2317         (WebCore::Settings::Settings):
2318         * page/Settings.h: Add a setting for injecting user scripts into the
2319         initial empty document (defaults to false).
2320         (WebCore::Settings::setInjectUserScriptsInInitialEmptyDocument):
2321         (WebCore::Settings::injectUserScriptsInInitialEmptyDocument):
2322         * platform/mac/RuntimeApplicationChecks.h:
2323         * platform/mac/RuntimeApplicationChecks.mm:
2324         (WebCore::applicationIsMicrosoftOutlook): Check if the embedding
2325         application is Microsoft Outlook.
2326
2327 2011-04-06  Jer Noble  <jer.noble@apple.com>
2328
2329         Reviewed by Maciej Stachowiak.
2330
2331         AVF: MediaPlayerPrivateAVFoundation never reaches playable state.
2332         https://bugs.webkit.org/show_bug.cgi?id=57962
2333
2334         Add support for a new AVPlayerItem API which will notify clients when their
2335         seek completes.  This requires a new Notification type to be passed to the main
2336         thread in MediaPlayerPrivateAVFoundation.
2337
2338         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2339         (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Added.
2340         (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification): Added two new
2341             overloaded functions which take a Notification; and a Notification::Type and boolean.
2342         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Support new SeekCompleted 
2343             Notification type.
2344         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2345         (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification): Added one new constructor.
2346         (WebCore::MediaPlayerPrivateAVFoundation::Notification::finished): Added ivar and accessor.
2347         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
2348         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Call new AVPlayerItem API.
2349         (-[WebCoreAVFMovieObserver seekCompleted:]): Added.
2350
2351 2011-04-07  Nancy Piedra  <nancy.piedra@nokia.com>
2352
2353         Reviewed by Eric Carlson.
2354
2355         Parse quotes from content type parameters
2356         https://bugs.webkit.org/show_bug.cgi?id=53275
2357
2358         This functionality is tested in video-can-play-type.html layout test
2359         where I've added codecs parameter with good and bad formatting.
2360
2361         * platform/ContentType.cpp:
2362         (WebCore::ContentType::parameter):
2363
2364 2011-04-07  Pavel Feldman  <pfeldman@google.com>
2365
2366         Reviewed by Yury Semikhatsky.
2367
2368         Web Inspector: remove "enabled" from the setBreakpoint protocol.
2369         https://bugs.webkit.org/show_bug.cgi?id=58047
2370
2371         * bindings/js/ScriptDebugServer.cpp:
2372         (WebCore::ScriptDebugServer::hasBreakpoint):
2373         * bindings/v8/DebuggerScript.js:
2374         ():
2375         * bindings/v8/ScriptDebugServer.cpp:
2376         (WebCore::ScriptDebugServer::setBreakpoint):
2377         * inspector/Inspector.json:
2378         * inspector/InspectorDebuggerAgent.cpp:
2379         (WebCore::buildObjectForBreakpointCookie):
2380         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2381         (WebCore::InspectorDebuggerAgent::setBreakpoint):
2382         (WebCore::InspectorDebuggerAgent::continueToLocation):
2383         (WebCore::InspectorDebuggerAgent::didParseSource):
2384         * inspector/InspectorDebuggerAgent.h:
2385         * inspector/ScriptBreakpoint.h:
2386         (WebCore::ScriptBreakpoint::ScriptBreakpoint):
2387         * inspector/front-end/DebuggerModel.js:
2388         (WebInspector.DebuggerModel.prototype.setBreakpoint):
2389         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
2390         * inspector/front-end/DebuggerPresentationModel.js:
2391         (WebInspector.DebuggerPresentationModel):
2392         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
2393         (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
2394         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.callback):
2395         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
2396         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
2397         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
2398         (WebInspector.DebuggerPresentationModel.prototype._removeBreakpointFromDebugger):
2399         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled.afterUpdate):
2400         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
2401         (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
2402         (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
2403         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
2404         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
2405         (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
2406         (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
2407         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpointsFromSettings):
2408         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
2409         (WebInspector.DebuggerPresentationModel.prototype._reset):
2410         (WebInspector.PresentationBreakpoint):
2411
2412 2011-04-07  Dan Bernstein  <mitz@apple.com>
2413
2414         Reviewed by Adam Roben.
2415
2416         Removed a redundant line of code.
2417
2418         * rendering/RenderInline.cpp:
2419         (WebCore::RenderInline::updateAlwaysCreateLineBoxes): No need to compare line gap values, as
2420         this is covered by the earlier hasIdenticalAscentDescentAndLineGap() check.
2421
2422 2011-04-07  Liang Qi  <liang.qi@nokia.com>
2423
2424         Reviewed by Laszlo Gombos.
2425
2426         [Qt][Symbian] Enable webkit build with GCCE on Symbian.
2427         https://bugs.webkit.org/show_bug.cgi?id=57841
2428
2429         * WebCore.pri: Thanks for Norbert Leser  <norbert.leser@nokia.com> who checked RVCT part.
2430         --rw-base value in QMAKE_LFLAGS.ARMCC and -Tdata value in QMAKE_LFLAGS.GCCE are updated
2431         to 0x1000000 together. They need to be updated in the future when WebKit grows.
2432
2433 2011-04-06  Pavel Feldman  <pfeldman@google.com>
2434
2435         Reviewed by Yury Semikhatsky.
2436
2437         Web Inspector: get rid of Breakpoint.js.
2438         https://bugs.webkit.org/show_bug.cgi?id=57949
2439
2440         * WebCore.gypi:
2441         * WebCore.vcproj/WebCore.vcproj:
2442         * inspector/front-end/Breakpoint.js: Removed.
2443         * inspector/front-end/BreakpointsSidebarPane.js:
2444         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint):
2445         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.updateBreakpoint.didLoadSnippet):
2446         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.updateBreakpoint):
2447         (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._compareBreakpoints):
2448         * inspector/front-end/DebuggerModel.js:
2449         (WebInspector.DebuggerModel):
2450         (WebInspector.DebuggerModel.prototype._debuggerWasDisabled):
2451         (WebInspector.DebuggerModel.prototype.setBreakpoint.didSetBreakpoint):
2452         (WebInspector.DebuggerModel.prototype.setBreakpoint):
2453         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
2454         (WebInspector.DebuggerModel.prototype.removeBreakpoint):
2455         (WebInspector.DebuggerModel.prototype._breakpointResolved):
2456         (WebInspector.DebuggerModel.prototype.reset):
2457         * inspector/front-end/DebuggerPresentationModel.js:
2458         (WebInspector.DebuggerPresentationModel):
2459         (WebInspector.DebuggerPresentationModel.prototype._refreshBreakpoints):
2460         (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
2461         (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
2462         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.didSetBreakpoint):
2463         (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
2464         (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
2465         (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
2466         (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
2467         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
2468         (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
2469         (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
2470         (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
2471         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
2472         (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoint):
2473         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
2474         (WebInspector.DebuggerPresentationModel.prototype._reset):
2475         (WebInspector.PresentationBreakpoint):
2476         (WebInspector.PresentationBreakpoint.prototype.get sourceFile):
2477         (WebInspector.PresentationBreakpoint.prototype.get url):
2478         (WebInspector.PresentationBreakpoint.prototype.get resolved):
2479         (WebInspector.PresentationBreakpoint.prototype.loadSnippet):
2480         * inspector/front-end/ResourceTreeModel.js:
2481         (WebInspector.ResourceTreeModel):
2482         (WebInspector.ResourceTreeModel.prototype._onResourceStarted):
2483         (WebInspector.ResourceTreeModel.prototype._addResourceToFrame):
2484         * inspector/front-end/ScriptsPanel.js:
2485         (WebInspector.ScriptsPanel):
2486         (WebInspector.ScriptsPanel.prototype._breakpointUpdated):
2487         (WebInspector.ScriptsPanel.prototype.reset):
2488         * inspector/front-end/WebKit.qrc:
2489         * inspector/front-end/inspector.html:
2490
2491 2011-04-07  Yury Semikhatsky  <yurys@chromium.org>
2492
2493         Reviewed by Pavel Feldman.
2494
2495         Web Inspector: console messages names should adhere to the common naming style
2496         https://bugs.webkit.org/show_bug.cgi?id=58042
2497
2498         * inspector/ConsoleMessage.cpp:
2499         (WebCore::ConsoleMessage::addToFrontend):
2500         (WebCore::ConsoleMessage::updateRepeatCountInConsole):
2501         * inspector/Inspector.json:
2502         * inspector/InspectorConsoleAgent.cpp:
2503         (WebCore::InspectorConsoleAgent::clearConsoleMessages):
2504         * inspector/front-end/ConsoleView.js:
2505         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageAdded):
2506         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageRepeatCountUpdated):
2507         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messagesCleared):
2508         (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
2509
2510 2011-04-06  Ilya Tikhonovsky  <loislo@chromium.org>
2511
2512         Reviewed by Yury Semikhatsky.
2513
2514         Web Inspector: migrate Inspector protocol messages format to JSON-RPC.
2515         https://bugs.webkit.org/show_bug.cgi?id=57957
2516
2517         There is not a significant difference between  inspector messages spec and and JSON-RPC 2.0 messages spec.
2518         Also JSON-RPC has a pretty clear specification for error descriptions which we haven't.
2519         It was decided that we will use it.
2520
2521         the list of renames:
2522         1) type-> /dev/null
2523         2) domain + '.' + event => method // for events
2524         3) domain + '.' + command => method // for requests
2525         4) requestId => id // for responses
2526         5) arguments => params // for requests
2527         6) data => params // for events
2528         7) body => result // for responses
2529
2530         protocolErrors and error properties will be converted to JSON-RPC error format.
2531         The order of properties in messages also will be adjusted.
2532         The only thing that looks unnecessary is jsonrpc property.
2533
2534         * inspector/CodeGeneratorInspector.pm:
2535
2536 2011-04-07  Ryosuke Niwa  <rniwa@webkit.org>
2537
2538         Reviewed by Eric Seidel.
2539
2540         Add functions to update left and right offsets to LineOffsets
2541         https://bugs.webkit.org/show_bug.cgi?id=58028
2542
2543         Added update() and shrinkWidthForNewFloatIfNeeded(FloatingObject*) to LineOffsets,
2544         which are used to update m_left and m_right. Also added m_block and m_isFirstLine
2545         member variables to LineOffsets so that users of LineOffsets don't have to pass them around.
2546
2547         * rendering/RenderBlock.h:
2548         * rendering/RenderBlockLineLayout.cpp:
2549         (WebCore::RenderBlock::skipLeadingWhitespace): No longer passes firstLine to positionNewFloatOnLine.
2550         (WebCore::LineOffsets::LineOffsets): Takes RenderBlock* and isFirstLine instead of left and right offsets.
2551         (WebCore::LineOffsets::update): Extracted from findNextLineBreak and positionNewFloatOnLine.
2552         (WebCore::LineOffsets::shrinkWidthForNewFloatIfNeeded): Extracted from positionNewFloatOnLine.
2553         (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
2554         (WebCore::RenderBlock::positionNewFloatOnLine): Calls shrinkWidthForNewFloatIfNeeded and update and
2555         no longer passes firstLine around.
2556
2557 2011-04-06  Pavel Feldman  <pfeldman@google.com>
2558
2559         Reviewed by Yury Semikhatsky.
2560
2561         Web Inspector: migrate debugger domain to the unified breakpoint location notion.
2562         https://bugs.webkit.org/show_bug.cgi?id=57928
2563
2564         * inspector/Inspector.json:
2565         * inspector/InspectorDebuggerAgent.cpp:
2566         (WebCore::buildObjectForBreakpointCookie):
2567         (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2568         (WebCore::InspectorDebuggerAgent::setBreakpoint):
2569         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
2570         (WebCore::InspectorDebuggerAgent::didParseSource):
2571         * inspector/InspectorDebuggerAgent.h:
2572         * inspector/front-end/Breakpoint.js:
2573         (WebInspector.Breakpoint):
2574         * inspector/front-end/DebuggerModel.js:
2575         (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
2576         (WebInspector.DebuggerModel.prototype._breakpointResolved):
2577
2578 2011-04-07  Andreas Kling  <andreas.kling@nokia.com>
2579
2580         Reviewed by Benjamin Poulain.
2581
2582         [Qt] Mask the QStyle::State_Horizontal hint for vertical scrollbars.
2583
2584         When initializing a QStyleOptionSlider from a widget, the State_Horizontal
2585         hint may get set depending on how that widget is laid out in its parent.
2586         If this happens when drawing a vertical scrollbar, the hint is never
2587         cleared and we end up painting a vertical scrollbar with horizontal arrows.
2588
2589         Covered by pixel tests which should no longer paint silly scrollbars.
2590
2591         * platform/qt/ScrollbarThemeQt.cpp:
2592         (WebCore::styleOptionSlider):
2593
2594 2011-04-07  Adam Barth  <abarth@webkit.org>
2595
2596         Reviewed by Eric Seidel.
2597
2598         script-src should block inline script
2599         https://bugs.webkit.org/show_bug.cgi?id=58012
2600
2601         Block inline scripts at the ScriptElement layer.  This should catch
2602         exactly the scripts we want to catch.
2603
2604         Test: http/tests/security/contentSecurityPolicy/inline-script-blocked.html
2605
2606         * dom/Document.cpp:
2607         (WebCore::Document::processHttpEquiv):
2608             - This patch also adds the ability to supply a CSP policy via a
2609               <meta> tag.  We'll update the name of the header once we've
2610               finished implementing the spec.
2611         * dom/ScriptElement.cpp:
2612         (WebCore::ScriptElement::executeScript):
2613         * page/ContentSecurityPolicy.cpp:
2614         (WebCore::ContentSecurityPolicy::allowInlineScript):
2615         * page/ContentSecurityPolicy.h:
2616
2617 2011-04-07  Alice Boxhall  <aboxhall@chromium.org>
2618
2619         Reviewed by Ryosuke Niwa.
2620
2621         Move the MouseEventWithHitTestResults::targetNode() method on to EventHandler.
2622         https://bugs.webkit.org/show_bug.cgi?id=57921
2623
2624         Moves the MouseEventWithHitTestResults::targetNode() method on to EventHandler, so
2625         that the same logic can be used for a HitTestResult.
2626
2627         No visible changes, just cleanup, so no tests.
2628
2629         * page/EventHandler.cpp:
2630         (WebCore::EventHandler::selectClosestWordFromMouseEvent):
2631         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
2632         (WebCore::EventHandler::handleMousePressEventTripleClick):
2633         (WebCore::EventHandler::handleMousePressEventSingleClick):
2634         (WebCore::EventHandler::handleMousePressEvent):
2635         (WebCore::EventHandler::handleMouseDraggedEvent):
2636         (WebCore::EventHandler::handleMouseReleaseEvent):
2637         (WebCore::EventHandler::subframeForHitTestResult):
2638         Made public static member, so that it can access targetNode(), and be accessed by
2639         webkitwebview in gtk.
2640         (WebCore::EventHandler::selectCursor):
2641         (WebCore::EventHandler::targetNode):
2642         (WebCore::EventHandler::handleMouseDoubleClickEvent):
2643         (WebCore::EventHandler::handleMouseMoveEvent):
2644         (WebCore::EventHandler::updateDragAndDrop):
2645         (WebCore::EventHandler::sendContextMenuEvent):
2646         * page/EventHandler.h:
2647         * page/MouseEventWithHitTestResults.cpp:
2648         (WebCore::MouseEventWithHitTestResults::MouseEventWithHitTestResults):
2649         * page/MouseEventWithHitTestResults.h:
2650         * page/android/EventHandlerAndroid.cpp:
2651         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2652         * page/brew/EventHandlerBrew.cpp:
2653         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2654         * page/chromium/EventHandlerChromium.cpp:
2655         (WebCore::EventHandler::passMousePressEventToSubframe):
2656         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2657         * page/efl/EventHandlerEfl.cpp:
2658         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2659         * page/gtk/EventHandlerGtk.cpp:
2660         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2661         * page/haiku/EventHandlerHaiku.cpp:
2662         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2663         * page/mac/EventHandlerMac.mm:
2664         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2665         (WebCore::EventHandler::passSubframeEventToSubframe):
2666         * page/wx/EventHandlerWx.cpp:
2667         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2668
2669 2011-04-07  Pavel Podivilov  <podivilov@chromium.org>
2670
2671         Reviewed by Pavel Feldman.
2672
2673         Web Inspector: build mapping for formatted scripts based on keywords positions.
2674         https://bugs.webkit.org/show_bug.cgi?id=57936
2675
2676         Mapping based on [\$\.\w]+ was not accurate because string literals representation
2677         may be different in original and formatted scripts.
2678
2679         * inspector/front-end/ScriptFormatterWorker.js:
2680         (buildMapping.regexp.b):
2681         (buildMapping):
2682
2683 2011-04-07  Kent Tamura  <tkent@chromium.org>
2684
2685         Reviewed by Dimitri Glazkov.
2686
2687         Spinbuttons become unclickable if right padding is large.
2688         https://bugs.webkit.org/show_bug.cgi?id=56298
2689
2690         An inner-spin-button is put on the right border and ignores right
2691         padding in RenderTextControlSingleLine::layout(), but forwardEvent()
2692         checks if a point is in an area just right of an internal text block.
2693         This inconsistency caused a bug that an inner-spin-button with large
2694         padding didn't receive mouse events.
2695
2696         To fix this bug, we render spin buttons as layers, and remove manual
2697         event forwarding code.
2698
2699         Test: fast/forms/input-number-large-padding.html
2700
2701         * css/html.css: Add "position:relative" to make a spin-button a layer.
2702         (input::-webkit-inner-spin-button):
2703         (input::-webkit-outer-spin-button):
2704         * rendering/RenderTextControlSingleLine.cpp:
2705         (WebCore::RenderTextControlSingleLine::forwardEvent):
2706           Remove manual event forwarding code.
2707
2708 2011-04-06  Adam Barth  <abarth@webkit.org>
2709
2710         Reviewed by Eric Seidel.
2711
2712         CSP object-src should block plugin loads
2713         https://bugs.webkit.org/show_bug.cgi?id=57283
2714
2715         This change is pretty straight-forward.  It's slighly unclear to me
2716         whether this patch is correct w.r.t. the code in DocumentWriter.  I've
2717         added a FIXME comment, and I'll investigate that case more in the future.
2718
2719         Test: http/tests/security/contentSecurityPolicy/object-src-none.html
2720
2721         * loader/DocumentWriter.cpp:
2722         (WebCore::DocumentWriter::begin):
2723         * loader/SubframeLoader.cpp:
2724         (WebCore::SubframeLoader::requestPlugin):
2725         * page/ContentSecurityPolicy.cpp:
2726         (WebCore::ContentSecurityPolicy::allowObjectFromSource):
2727         (WebCore::ContentSecurityPolicy::addDirective):
2728         * page/ContentSecurityPolicy.h:
2729
2730 2011-04-06  Beth Dakin  <bdakin@apple.com>
2731
2732         Reviewed by Dan Bernstein.
2733
2734         https://bugs.webkit.org/show_bug.cgi?id=58009
2735         Frame::scalePage() results in visual artifacts with scale factors less than 1
2736         -and corresponding-
2737         <rdar://problem/8683230>
2738
2739         Fall into the case where we fill with a background base color when there is a page 
2740         scale factor that is less than 1.
2741         * rendering/RenderView.cpp:
2742         (WebCore::RenderView::paintBoxDecorations):
2743
2744 2011-04-06  Jer Noble  <jer.noble@apple.com>
2745
2746         Reviewed by Darin Adler.
2747
2748         AVF: MediaPlayerPrivateAVFoundationObjC should not use -[AVPlayerItem isPlaybackBufferEmpty]
2749         https://bugs.webkit.org/show_bug.cgi?id=57982
2750
2751         Query our cached loaded time array instead of asking AVPlayerItem if its buffer is empty.
2752
2753         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
2754         (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
2755
2756 2011-04-06  Jer Noble  <jer.noble@apple.com>
2757
2758         Reviewed by Eric Carlson.
2759
2760         MediaPlayerPrivateAVFoundation does not change rate due to setRate().
2761         https://bugs.webkit.org/show_bug.cgi?id=57919
2762
2763         Test: media/video-set-rate-from-pause.html
2764
2765         The base class of MediaPlayerPrivateAVFoundation does not actually change the rate
2766         of the media; instead a subclass must do that work.  So when setRate() is called, 
2767         inform a subclass through a new pure virtual updateRate() function that there's 
2768         work to be done.
2769
2770         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2771         (WebCore::MediaPlayerPrivateAVFoundation::setRate): Call updateRate()
2772         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2773         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
2774         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
2775         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate): Added.  Set the requested rate.
2776
2777 2011-04-06  Dai Mikurube  <dmikurube@chromium.org>
2778
2779         Reviewed by David Levin.
2780
2781         Add QUOTA build flag for unified quota API
2782         https://bugs.webkit.org/show_bug.cgi?id=57918
2783
2784         * Configurations/FeatureDefines.xcconfig: Added QUOTA build flag
2785         * GNUmakefile.am: Added QUOTA build flag
2786         * WebCore.pri: Added QUOTA build flag
2787
2788 2011-04-06  Stephanie Lewis  <slewis@apple.com>
2789
2790         Reviewed by Darin Adler.
2791
2792         https://bugs.webkit.org/show_bug.cgi?id=57997
2793         <rdar://problem/9187856> REGRESSION(r75555): ~5-7 MB increase in memory between iBench runs
2794         Navigating away from a Scrolled page which queues a scroll event that is never dispatched.
2795         Cancel all enqueued events when detaching the Document the events cannot keep the Document
2796         alive.
2797
2798         No change in functionality so no new tests.  
2799
2800         * dom/Document.cpp:
2801         (WebCore::Document::detach):
2802         * dom/EventQueue.cpp:
2803         (WebCore::EventQueue::cancelQueuedEvents):
2804         * dom/EventQueue.h:
2805
2806 2011-04-06  Dan Bernstein  <mitz@apple.com>
2807
2808         Reviewed by Darin Adler.
2809
2810         <rdar://problem/9084761> REGRESSION (r73993): Default Arabic line spacing has gotten very loose when the specified font is not Arabic
2811         https://bugs.webkit.org/show_bug.cgi?id=58002
2812
2813         * platform/graphics/mac/SimpleFontDataMac.mm:
2814         (WebCore::SimpleFontData::platformInit): The version of Geeza Pro in Snow Leopard
2815         does not require the vertical metrics tweaks that were needed in Leopard. That the
2816         tweaks were being applied went mostly unnoticed until r73993, because until then it
2817         only affected cases where Geeza Pro was specified, not when it occurred as a fallback
2818         font.
2819
2820 2011-04-06  Roland Steiner  <rolandsteiner@chromium.org>
2821
2822         Reviewed by Dimitri Glazkov.
2823
2824         Bug 57994 - Move guardRef functionality back to Document
2825         https://bugs.webkit.org/show_bug.cgi?id=57994
2826
2827         Move the relevant code parts from TreeScope back into Document.
2828
2829         No new tests. (no new functionality)
2830
2831         * dom/Document.cpp:
2832         (WebCore::Document::removedLastRef):
2833         * dom/Document.h:
2834         * dom/TreeScope.cpp:
2835         (WebCore::TreeScope::destroyTreeScopeData):
2836         * dom/TreeScope.h:
2837
2838 2011-04-06  Ian Henderson  <ianh@apple.com>
2839
2840         Reviewed by Simon Fraser, Antti Koivisto.
2841
2842         Fast path for parsing simple CSS values
2843         https://bugs.webkit.org/show_bug.cgi?id=57964
2844
2845         Add functions to parse simple color or dimension values, skipping the
2846         overhead of full CSS parsing.
2847
2848         Change parseValue to a static method to avoid unnecessary allocation
2849         of a CSSParser in the fast case.
2850
2851         * css/CSSMutableStyleDeclaration.cpp:
2852         (WebCore::CSSMutableStyleDeclaration::setProperty):
2853         Changed to use the new, static parseValue method.
2854         * css/CSSParser.cpp:
2855         (WebCore::isColorPropertyID):
2856         (WebCore::parseColorValue):
2857         Parses any color accepted by the existing parseColor() static method.
2858         We must handle color identifiers separately, since parseColor() will
2859         change 'red' into 'rgb(255, 0, 0)'.
2860         (WebCore::isSimpleLengthPropertyID):
2861         (WebCore::parseSimpleLengthValue):
2862         Parses a value of the form 'NNpx', 'NN%', or 'NN' (when strict is
2863         false, or 'NN' is '0').  Returns false to fall back to the slow path.
2864         (WebCore::CSSParser::parseValue):
2865         * css/CSSParser.h:
2866         * css/WebKitCSSMatrix.cpp:
2867         (WebCore::WebKitCSSMatrix::setMatrixValue):
2868         Changed to use the new, static parseValue method.
2869
2870 2011-04-06  Kevin Ollivier  <kevino@theolliviers.com>
2871
2872         Reviewed by Darin Adler.
2873
2874         Make sure JS_EXPORT_PRIVATE is an empty define when we aren't using the export macros.
2875
2876         https://bugs.webkit.org/show_bug.cgi?id=27551
2877
2878         * config.h:
2879
2880 2011-04-06  Simon Fraser  <simon.fraser@apple.com>
2881
2882         Reviewed by Antti Koivisto.
2883
2884         Some minor style resolution optimizations
2885         https://bugs.webkit.org/show_bug.cgi?id=57996
2886
2887         A couple of minor optimizations to style-related code.
2888
2889         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2890         (WebCore::isCSSPropertyName):
2891         (WebCore::JSCSSStyleDeclaration::putDelegate):
2892         Avoid calling cssPropertyName() twice when setting style on an element.
2893         
2894         * css/CSSStyleSelector.cpp:
2895         (WebCore::useSVGZoomRules):
2896         (WebCore::CSSStyleSelector::applyProperty):
2897         Avoid calling isSVGElement() for every property, since only a two properties
2898         care about it.
2899
2900 2011-04-06  Ian Henderson  <ianh@apple.com>
2901
2902         Reviewed by Antti Koivisto.
2903
2904         Unnecessary string allocation in CSSStyleDeclaration::setProperty
2905         https://bugs.webkit.org/show_bug.cgi?id=57995
2906
2907         Pass the bool representing the property's importance directly instead
2908         of constructing a string.
2909
2910         * css/CSSStyleDeclaration.cpp:
2911         (WebCore::CSSStyleDeclaration::setProperty):
2912
2913 2011-04-06  Leandro Gracia Gil  <leandrogracia@chromium.org>
2914
2915         Reviewed by Steve Block.
2916
2917         Make the style of createFunctionOnlyCallback in V8 consistent with the JavaScriptCore version.
2918         https://bugs.webkit.org/show_bug.cgi?id=57963
2919
2920         No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
2921
2922         * bindings/v8/V8Utilities.h:
2923         (WebCore::createFunctionOnlyCallback):
2924         * bindings/v8/custom/V8GeolocationCustom.cpp:
2925         (WebCore::V8Geolocation::getCurrentPositionCallback):
2926         (WebCore::V8Geolocation::watchPositionCallback):
2927
2928 2011-04-06  Brian Weinstein  <bweinstein@apple.com>
2929
2930         Reviewed by Adam Roben.
2931
2932         WebKit2: Support Windows 7 Gestures
2933         https://bugs.webkit.org/show_bug.cgi?id=49824
2934         <rdar://problem/8689728>
2935         
2936         Move WindowTouch.h from WebKit/win, so it can be used in both WebKit and WebKit2.
2937
2938         * WebCore.vcproj/WebCore.vcproj:
2939         * platform/win/WindowsTouch.h: Copied from WebKit/win/WindowsTouch.h.
2940
2941 2011-04-06  Alexis Menard  <alexis.menard@openbossa.org>
2942
2943         Reviewed by Andreas Kling.
2944
2945         [Qt] We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
2946         https://bugs.webkit.org/show_bug.cgi?id=57974
2947
2948         We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
2949
2950         No new tests needed, just a config flag rename.
2951
2952         * features.pri:
2953
2954 2011-04-06  Tyler Close  <tjclose@chromium.org>
2955
2956         Reviewed by Nate Chapin.
2957
2958         run-bindings-tests reference files out of sync with CodeGenerator*.pm
2959         https://bugs.webkit.org/show_bug.cgi?id=57967
2960
2961         * bindings/scripts/test/V8/V8TestCallback.cpp:
2962
2963 2011-04-06  Asanka Herath  <asanka@chromium.org>
2964
2965         Reviewed by Darin Fisher.
2966
2967         Add new TargetType: TargetIsFavicon
2968
2969         https://bugs.webkit.org/show_bug.cgi?id=57659
2970
2971         No new functionality added, so no additional tests.
2972
2973         * platform/network/ResourceRequestBase.h:
2974
2975 2011-04-06  David Hyatt  <hyatt@apple.com>
2976
2977         Reviewed by Simon Fraser.
2978
2979         https://bugs.webkit.org/show_bug.cgi?id=57981
2980         
2981         Update the column count and width computation algorithm for CSS3 multi-column layout 
2982         to match the revised pseudo-algorithm in the latest draft of the spec.
2983
2984         * rendering/RenderBlock.cpp:
2985         (WebCore::RenderBlock::calcColumnWidth):
2986
2987 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
2988
2989         Reviewed by Eric Seidel.
2990
2991         borderPaddingMarginStart and borderPaddingMarginEnd should take RenderInline
2992         https://bugs.webkit.org/show_bug.cgi?id=57965
2993
2994         Changed the argument types of borderPaddingMarginStart and borderPaddingMarginEnd
2995         from RenderBoxModelObject to RenderInline since they call marginStart and marginEnd
2996         instead of marginStartForChild and marginEndForChild respectively.
2997
2998         Calling these two functions on RenderInline is okay because writing-mode cannot differ
2999         from that of the containing block.
3000
3001         * rendering/RenderBlockLineLayout.cpp:
3002         (WebCore::borderPaddingMarginStart):
3003         (WebCore::borderPaddingMarginEnd):
3004         (WebCore::inlineLogicalWidth):
3005
3006 2011-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
3007
3008         Unreviewed, rolling out r83039.
3009         http://trac.webkit.org/changeset/83039
3010         https://bugs.webkit.org/show_bug.cgi?id=57978
3011
3012         introduced a new regression in conjunction to
3013         ReplaceSelectionCommand (Requested by rniwa on #webkit).
3014
3015         * editing/EditingStyle.cpp:
3016         (WebCore::EditingStyle::init):
3017         * editing/InsertParagraphSeparatorCommand.cpp:
3018         (WebCore::InsertParagraphSeparatorCommand::doApply):
3019
3020 2011-04-06  Naoki Takano  <takano.naoki@gmail.com>
3021
3022         Reviewed by David Levin.
3023
3024         Webkit ignores PgUp/PgDown/Home/End in SELECT tag objects
3025         https://bugs.webkit.org/show_bug.cgi?id=27658
3026
3027         Test: fast/events/select-element.html
3028
3029         * dom/SelectElement.cpp:
3030         (WebCore::nextValidIndex): Moved from elsewhere in the file to be used by other routines.
3031         (WebCore::nextSelectableListIndexPageAway): Returns a selectable index one page away from the given index.
3032         (WebCore::nextSelectableListIndex): Implemented with nextValidIndex.
3033         And converted to a normal static function from a private function of SelectElement.
3034         (WebCore::previousSelectableListIndex): Implemented with nextValidIndex.
3035         And converted to a normal static function from a private function of SelectElement.
3036         (WebCore::firstSelectableListIndex): Returns the first selectable index.
3037         (WebCore::lastSelectableListIndex): Returns the last selectable index.
3038         (WebCore::SelectElement::menuListDefaultEventHandler): Converted from C cast to C++ cast.
3039         (WebCore::SelectElement::listBoxDefaultEventHandler): Adds support for PageUp/PageDown/Home/End with both single and multiple selection.
3040
3041         * dom/SelectElement.h:
3042         (WebCore::SelectElement::): Remove nextSelectableListIndex() and previousSelectableListIndex().
3043
3044         * rendering/RenderListBox.h: Makes RenderListBox::size public so that PageUp/PageDown behavior can use the actual list size rather than that specified in HTML.
3045         They can differ due to the minimum size imposed by RenderListBox.
3046
3047 2011-04-06  David Hyatt  <hyatt@apple.com>
3048
3049         Reviewed by Dan Bernstein.
3050
3051         https://bugs.webkit.org/show_bug.cgi?id=57975
3052
3053         The "More..." link for line clamping no longer shows up in Safari RSS. Fix the isLink() check
3054         to just look at the style, so that it can find the InlineTextBox and not care that it's a child
3055         of the link element and not the line box for the link element itself (since that line box got
3056         culled).
3057
3058         * rendering/RenderFlexibleBox.cpp:
3059         (WebCore::RenderFlexibleBox::applyLineClamp):
3060
3061 2011-04-06  Brady Eidson  <beidson@apple.com>
3062
3063         Reviewed by Anders Carlsson.
3064
3065         https://bugs.webkit.org/show_bug.cgi?id=57973 and https://bugs.webkit.org/show_bug.cgi?id=57973
3066         WK2 icon database should be able to get a CGImage of a specific size
3067
3068         * platform/graphics/BitmapImage.h:
3069         * platform/graphics/Image.h:
3070         (WebCore::Image::getFirstCGImageRefOfSize):
3071         
3072         * platform/graphics/cg/ImageCG.cpp:
3073         (WebCore::BitmapImage::getFirstCGImageRefOfSize): Walk the frames of the image until reaching the
3074           first frame of the requested size.
3075
3076 2011-04-06  Malcolm MacLeod  <malcolm.macleod@tshwanedje.com>
3077
3078         Reviewed by Kevin Ollivier.
3079
3080         [wx] Fix cursor handling so that we always call the chrome to set it.
3081         
3082         https://bugs.webkit.org/show_bug.cgi?id=57972
3083
3084         * platform/wx/WidgetWx.cpp:
3085         (WebCore::Widget::setCursor):
3086
3087 2011-04-06  David Hyatt  <hyatt@apple.com>
3088
3089         Reviewed by Dan Bernstein.
3090
3091         https://bugs.webkit.org/show_bug.cgi?id=41445
3092         
3093         Visited links painting with black background. Make sure that if the visited style has
3094         the initial background color (transparent) set that we just use the unvisited color.
3095
3096         Added fast/history/visited-link-background-color.html
3097
3098         * rendering/style/RenderStyle.cpp:
3099         (WebCore::RenderStyle::visitedDependentColor):
3100
3101 2011-04-06  Csaba Osztrogon√°c  <ossy@webkit.org>
3102
3103         Unreviewed Qt buildfix after r83079.
3104
3105         * WebCore.pro:
3106
3107 2011-04-06  Dean Jackson  <dino@apple.com>
3108
3109         Reviewed by Chris Marrin.
3110
3111         https://bugs.webkit.org/show_bug.cgi?id=56936
3112         Crash in ImplicitAnimation::~ImplicitAnimation
3113
3114         Make sure the style and start time waiting lists
3115         are cleared in the CompositeAnimation destructor. This
3116         way, no running transitions can be left in a state
3117         where they are destroyed as the AnimationControllerPrivate
3118         cleans up.
3119
3120         * page/animation/CompositeAnimation.cpp:
3121         (WebCore::CompositeAnimation::~CompositeAnimation):
3122
3123 2011-04-06  Robert Sesek  <rsesek@chromium.org>
3124
3125         Reviewed by Alexey Proskuryakov.
3126
3127         Move code duplicated between the WebKit/mac and WebKit2 down to WebCore because Chromium will need it too
3128         https://bugs.webkit.org/show_bug.cgi?id=54969
3129
3130         No change in behavior; no new tests.
3131
3132         * editing/TextIterator.cpp:
3133         (WebCore::TextIterator::locationAndLengthFromRange): New method from duplicated code in WebKits
3134         * editing/TextIterator.h:
3135         * page/Frame.cpp:
3136         (WebCore::Frame::rangeForPoint): New method from duplicated code in WebKits
3137
3138 2011-04-06  Leandro Gracia Gil  <leandrogracia@chromium.org>
3139
3140         Reviewed by Steve Block.
3141
3142         Factoring the creation of 'FunctionOnly' callbacks in JavaScriptCore.
3143         https://bugs.webkit.org/show_bug.cgi?id=57770
3144
3145         Create a template from an existing functionality in JSGeolocationCustom.cpp
3146         to be used by the custom bindings of both Geolocation and the Media Stream API.
3147         V8 version of this bug: https://bugs.webkit.org/show_bug.cgi?id=57760
3148
3149         No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
3150
3151         * Android.jscbindings.mk:
3152         * CMakeLists.txt:
3153         * GNUmakefile.am:
3154         * WebCore.gypi:
3155         * WebCore.pro:
3156         * WebCore.vcproj/WebCore.vcproj:
3157         * WebCore.xcodeproj/project.pbxproj:
3158         * bindings/js/CallbackFunction.cpp: Added.
3159         (WebCore::checkFunctionOnlyCallback):
3160         * bindings/js/CallbackFunction.h: Added.
3161         (WebCore::createFunctionOnlyCallback):
3162         * bindings/js/JSBindingsAllInOne.cpp:
3163         * bindings/js/JSGeolocationCustom.cpp:
3164         (WebCore::JSGeolocation::getCurrentPosition):
3165         (WebCore::JSGeolocation::watchPosition):
3166
3167 2011-04-06  Alexis Menard  <alexis.menard@openbossa.org>
3168
3169         Reviewed by Andreas Kling.
3170
3171         [Qt] Implement fullscreen playback for the GStreamer backend.
3172         https://bugs.webkit.org/show_bug.cgi?id=56826
3173
3174         Implement support for fullscreen playback when building the
3175         Qt port with the GStreamer backend (DEFINES+=USE_GSTREAMER=1).
3176         The implementation is done in FullScreenVideoQt alongside with
3177         the Qt Multimedia support.
3178
3179         No new tests because layout tests cover it. They are not yet activated
3180         but will be any time soon.
3181
3182         * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h:
3183         * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
3184         (FullScreenVideoWindow::FullScreenVideoWindow):
3185         (FullScreenVideoWindow::setVideoElement):
3186         (FullScreenVideoWindow::closeEvent):
3187         (FullScreenVideoWindow::keyPressEvent):
3188         (FullScreenVideoWindow::event):
3189         (FullScreenVideoWindow::showFullScreen):
3190         (FullScreenVideoWindow::hideCursor):
3191         (FullScreenVideoWindow::showCursor):
3192
3193 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
3194
3195         Reviewed by Dimitri Glazkov.
3196
3197         Bundle lineLeftOffset and lineRightOffset as a class
3198         https://bugs.webkit.org/show_bug.cgi?id=57851
3199
3200         Added a new class LineOffsets that encapsulates lineLeftOffset and lineRightOffset.
3201         The patch makes clear that lineLeftOffset and lineRightOffset are never read individually
3202         and only the difference is used to compute the width.
3203
3204         * rendering/RenderBlock.h:
3205         * rendering/RenderBlockLineLayout.cpp:
3206         (WebCore::RenderBlock::skipLeadingWhitespace): Takes LineOffsets instead of two integers.
3207         (WebCore::LineOffsets::LineOffsets): Added.
3208         (WebCore::LineOffsets::width): Added.
3209         (WebCore::LineOffsets::setLeft): Added.
3210         (WebCore::LineOffsets::setRight): Added.
3211         (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
3212         (WebCore::RenderBlock::positionNewFloatOnLine): Takes LineOffsets instead of two integers.
3213
3214 2011-04-06  David Hyatt  <hyatt@apple.com>
3215
3216         Reviewed by Dan Bernstein.
3217
3218         https://bugs.webkit.org/show_bug.cgi?id=57916
3219         
3220         Implement an optimization to the line box tree to cull out most of the intermediate
3221         line boxes that can occur between the root line box and the leaves of the tree (images
3222         and text).
3223
3224         RenderInlines now have a boolean member, m_alwaysCreateLineBoxes,
3225         that starts off as false. Only if it gets flipped to true will there be any line boxes
3226         created for that RenderInline.
3227         
3228         * page/FocusController.cpp:
3229         (WebCore::FocusController::advanceFocusDirectionally):
3230         Adjust the ordering of updateLayout calls to make sure rects aren't queried unless layout
3231         is up to date.
3232
3233         * page/SpatialNavigation.cpp:
3234         (WebCore::hasOffscreenRect):
3235         (WebCore::nodeRectInAbsoluteCoordinates):
3236         Add asserts in spatial navigation code to catch any future bad queries that might be made
3237         for rectangles without layout being up to date.
3238
3239         * platform/graphics/FloatRect.cpp:
3240         (WebCore::FloatRect::uniteIfNonZero):
3241         * platform/graphics/FloatRect.h:
3242         * platform/graphics/IntRect.cpp:
3243         (WebCore::IntRect::uniteIfNonZero):
3244         * platform/graphics/IntRect.h:
3245         Add a new unite function that is useful for the render tree to FloatRect and IntRect.  This
3246         version allows rect unites to happen if either width or height is nonzero.
3247
3248         * rendering/HitTestResult.cpp:
3249         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
3250         Make sure rect-based hit testing properly adds in culled inline ancestors to the set of nodes
3251         if content inside those inlines is hit.
3252
3253         * rendering/InlineBox.h:
3254         (WebCore::InlineBox::logicalFrameRect):
3255         Fix a bug in this function for obtaining the logical frame rect of an inline box.
3256
3257         * rendering/InlineFlowBox.cpp:
3258         (WebCore::InlineFlowBox::addToLine):
3259         addToLine now also checks line gap in the line box tree optimization checks.
3260     
3261         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
3262         (WebCore::InlineFlowBox::computeOverflow):
3263         * rendering/InlineFlowBox.h:
3264         Rewritten to add the text box overflow to the text box itself.
3265
3266          * rendering/InlineTextBox.cpp:
3267         (WebCore::InlineTextBox::destroy):
3268         Destroy has been changed to call a helper function to remove and destroy the line boxes that
3269         is now called from one additional spot.
3270
3271         (WebCore::InlineTextBox::logicalOverflowRect):
3272         (WebCore::InlineTextBox::setLogicalOverflowRect):
3273         Text boxes now cache their own overflow in a global hash table.
3274
3275         (WebCore::InlineTextBox::baselinePosition):
3276         (WebCore::InlineTextBox::lineHeight):
3277         Changed to not assume that the parent line box's renderer is the RenderText's immediate
3278         parent, since intermediate line boxes may have been culled.
3279
3280         (WebCore::InlineTextBox::paint):
3281         Paint now properly checks only the text box overflow instead of the parent line box's overflow.
3282
3283         * rendering/InlineTextBox.h:
3284         (WebCore::InlineTextBox::logicalTopVisualOverflow):
3285         (WebCore::InlineTextBox::logicalBottomVisualOverflow):
3286         (WebCore::InlineTextBox::logicalLeftVisualOverflow):
3287         (WebCore::InlineTextBox::logicalRightVisualOverflow):
3288         New accessors to obtain overflow for inline text boxes.
3289
3290         * rendering/RenderBlock.cpp:
3291         (WebCore::RenderBlock::updateFirstLetter):
3292         updateFirstLetter now removes text boxes from the line box tree before it destroys them, since those
3293         text boxes may not have anything in between them and the block that contains the inline first letter
3294         container.
3295
3296         * rendering/RenderBlockLineLayout.cpp:
3297         (WebCore::RenderBlock::createLineBoxes):
3298         The culling optimization is done here.  Only if the RenderInline says that boxes are allowed will they
3299         be created.
3300
3301         (WebCore::RenderBlock::layoutInlineChildren):
3302         The state of the RenderInline is updated here, in case it is discovered that line boxes are now needed.
3303         This is done before any lines are built.
3304
3305         * rendering/RenderInline.cpp:
3306         (WebCore::RenderInline::RenderInline):
3307         The new m_alwaysCreateLineBoxes flag has been added to the constructor.
3308
3309         (WebCore::RenderInline::styleDidChange):
3310         An initial update of the m_alwaysCreateLineBoxes happens here for things that can be checked immediately
3311         (like having a layer, borders, padding, margins or backgrounds).  Some checks that depend on examining
3312         the RenderInline's parent (including first line styles) happen later in layoutInlineChildren.
3313
3314         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
3315         The function called by layoutInlineChildren to check parent and child style differences (e.g., font,
3316         vertical alignment, line height, etc.).
3317
3318         (WebCore::RenderInline::absoluteRects):
3319         (WebCore::RenderInline::culledInlineAbsoluteRects):
3320         absoluteRects calls culledInlineAbsoluteRects when m_alwaysCreateLineBoxes is false.
3321
3322         (WebCore::RenderInline::absoluteQuads):
3323         (WebCore::RenderInline::culledInlineAbsoluteQuads):
3324         absoluteQuads calls culledInlineAbsoluteQuads when m_alwaysCreateLineBoxes is false.
3325
3326         (WebCore::RenderInline::offsetLeft):
3327         (WebCore::RenderInline::offsetTop):
3328         offsetLeft and offsetTop now check descendant renderers when m_alwaysCreateLineBoxes is false.
3329
3330         (WebCore::RenderInline::linesBoundingBox):
3331         (WebCore::RenderInline::culledInlineBoundingBox):
3332         lineBoundingBox calls culledInlineBoundingBox when m_alwaysCreateLineBoxes is false.
3333
3334         (WebCore::RenderInline::culledInlineFirstLineBox):
3335         (WebCore::RenderInline::culledInlineLastLineBox):
3336         Helpers that return the first and last line box descendants. Used by firstLineBoxIncludingCulling and
3337         lastLineBoxIncludingCulling (which are in turn called by offsetLeft and offsetTop).
3338
3339         (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
3340         (WebCore::RenderInline::linesVisualOverflowBoundingBox):
3341         linesVisualOverflowBoundingBox calls culledInlineVisualOverflowBoundingBox when m_alwaysCreateLineBoxes is false.
3342
3343         (WebCore::RenderInline::clippedOverflowRectForRepaint):
3344         The initial bailout check is now done using firstLineBoxIncludingCulling instead of just firstLineBox.
3345
3346         (WebCore::RenderInline::dirtyLineBoxes):
3347         dirtyLineBoxes now crawls into descendants to figure out which root lines to dirty when
3348         m_alwaysCreateLineBoxes is false.
3349
3350         (WebCore::RenderInline::createAndAppendInlineFlowBox):
3351         Clear the m_alwaysCreateLineBoxes if a box gets added anyway. This happens for leaf inline flows and also
3352         when line-box-contain is set to an unusual value.
3353
3354         (WebCore::RenderInline::addFocusRingRects):
3355         Used culledInlineAbsoluteRects in place of the line box walk when m_alwaysCreateLineBoxes is false.
3356
3357         * rendering/RenderInline.h:
3358         (WebCore::RenderInline::firstLineBoxIncludingCulling):
3359         (WebCore::RenderInline::lastLineBoxIncludingCulling):
3360         Helpers used in a few places (like offsetLeft and offsetTop), mostly in places where the existence of a box
3361         is all that needs checking.
3362
3363         (WebCore::RenderInline::alwaysCreateLineBoxes):
3364         (WebCore::RenderInline::setAlwaysCreateLineBoxes):
3365         Functions for getting and setting the m_alwaysCreateLineBoxes flag.
3366
3367         * rendering/RenderLineBoxList.cpp:
3368         (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
3369         Modified to use firstLineBoxIncludingCulling and lastLineBoxIncludingCulling to ensure the right set of
3370         lines get dirtied.
3371
3372         * rendering/RenderText.cpp:
3373         (WebCore::RenderText::removeAndDestroyTextBoxes):
3374         New helper invoked by destroy and also from updateFirstLetter.
3375
3376         (WebCore::RenderText::destroy):
3377         Changed to call removeAndDestroyTextBoxes.
3378
3379         (WebCore::RenderText::absoluteRects):
3380         Fixed to be properly physical instead of logical.
3381
3382         (WebCore::RenderText::linesVisualOverflowBoundingBox):
3383         New implementation for RenderText that gives the bounding box of the text boxes including overflow from
3384         shadows, glyphs, text-stroke, etc.  Used by RenderInline::culledInlineVisualOverflowBoundingBox.
3385
3386         * rendering/RenderText.h:
3387         * rendering/svg/RenderSVGInline.cpp:
3388         (WebCore::RenderSVGInline::RenderSVGInline):
3389         RenderSVGInline always sets m_alwaysCreateLineBoxes to true so that SVG is unaffected by this optimization.
3390
3391         * rendering/svg/SVGRootInlineBox.cpp:
3392         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
3393         (WebCore::SVGRootInlineBox::layoutChildBoxes):
3394         Move the isInlineFlowBox asserts to after the generated content skips, since the generated content boxes are
3395         now InlineTextBoxes (the enclosing InlineFlowBoxes got culled).
3396
3397 2011-04-05  Enrica Casucci  <enrica@apple.com>
3398
3399         Reviewed by Darin Adler.
3400
3401         REGRESSION: Drag & Drop Gmail Attachments doesn't work.
3402         https://bugs.webkit.org/show_bug.cgi?id=57909
3403         <rdar://problem/9103220>
3404
3405         In WebKit2 we cannot rely on the value returned by platformData() that
3406         on Mac returns an NSDraggingInfo object. This is available only in the UI
3407         process. Therefore we should use m_pasteboard instead.
3408         We cannot change what platformData() returns on Mac, since there are
3409         delegate methods that receive a NSDraggingInfo object (only in WebKit).
3410         
3411         * platform/DragData.h:
3412         (WebCore::DragData::pasteboard): Added.
3413         * platform/mac/ClipboardMac.mm:
3414         (WebCore::Clipboard::create): Changed to use pasteboard() instead of platformData().
3415         * platform/mac/DragDataMac.mm:
3416         (WebCore::DragData::asColor): Replaced references to m_platformData with m_pasteboard.
3417         (WebCore::DragData::asURL): Same as above.
3418
3419 2011-04-06  Benjamin Poulain  <benjamin.poulain@nokia.com>
3420
3421         Reviewed by Darin Adler.
3422
3423         ClipboardWin has unused variables "ExceptionCode ec"
3424         https://bugs.webkit.org/show_bug.cgi?id=57952
3425
3426         Remove the unused variable.
3427
3428         * platform/win/ClipboardWin.cpp:
3429         (WebCore::ClipboardWin::declareAndWriteDragImage):
3430         (WebCore::ClipboardWin::writePlainText):
3431
3432 2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
3433
3434         Reviewed by Dimitri Glazkov.
3435
3436         Split getBorderPaddingMargin into two functions
3437         https://bugs.webkit.org/show_bug.cgi?id=57947
3438
3439         * rendering/RenderBlockLineLayout.cpp:
3440         (WebCore::borderPaddingMarginStart): Extracted from getBorderPaddingMargin.
3441         (WebCore::borderPaddingMarginEnd): Ditto.
3442         (WebCore::inlineLogicalWidth): Calls borderPaddingMarginStart and borderPaddingMarginEnd.
3443         (WebCore::RenderBlock::findNextLineBreak): Ditto.
3444
3445 2011-04-06  MORITA Hajime  <morrita@google.com>
3446
3447         Reviewed by Dimitri Glazkov.
3448
3449         [Refactoring] <progress> should not have manual layout code.
3450         https://bugs.webkit.org/show_bug.cgi?id=57801
3451
3452         - Simplified RenderProgress, removing its custom layout code
3453         - Introducing ProgressValueElement and ProgressBarElement, replacing
3454           ProgressBarValueElement. 
3455         
3456         Now the structure is almost identical to <meter>, 
3457         other than:
3458         - RenderProgress has animated painting, thus manages its own timer.
3459         - Both ProgressValueElement and ProgressBarElement has pseudo classes