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