1 2011-04-11 Dimitri Glazkov <dglazkov@chromium.org>
3 Reviewed by Martin Robinson.
5 REGRESSION(r83397): Most GTK media controls are hidden when no valid source is specified
6 https://bugs.webkit.org/show_bug.cgi?id=58204
8 Covered by existing tests.
10 * platform/gtk/RenderThemeGtk.h:
11 (WebCore::RenderThemeGtk::hasOwnDisabledStateHandlingFor): Let GTK handle
12 the the state of media controls.
14 2011-04-11 Dimitri Glazkov <dglazkov@chromium.org>
16 Remove obsolete comment, which was mistakenly landed in r83397.
18 Though potentially a work of art, the comment lost its functional meaning a long time ago.
20 * html/shadow/MediaControls.cpp:
21 (WebCore::MediaControls::create): Removed comment.
23 2011-04-05 Hans Wennborg <hans@chromium.org>
25 Reviewed by Steve Block.
27 IndexedDB: Introduce skeleton for LevelDB backend
28 https://bugs.webkit.org/show_bug.cgi?id=57827
30 No new tests: no new functionality (yet).
32 * WebCore.gyp/WebCore.gyp:
33 Add dependency on leveldb when ENABLE_LEVELDB=1 in feature_defines.
36 * storage/IDBBackingStore.h:
37 (WebCore::IDBBackingStore::ObjectStoreRecordIdentifier::~ObjectStoreRecordIdentifier):
38 Introduce abstract type ObjectStoreRecordIdentifier. The SQLite
39 backend uses integers to refer to a specific row in a table, but
40 the LevelDB backend will use something else.
41 * storage/IDBDatabaseBackendImpl.cpp:
42 (WebCore::IDBDatabaseBackendImpl::createObjectStore):
43 (WebCore::IDBDatabaseBackendImpl::createObjectStoreInternal):
44 (WebCore::IDBDatabaseBackendImpl::deleteObjectStoreInternal):
45 (WebCore::IDBDatabaseBackendImpl::loadObjectStores):
46 Change functions to pass along the database id for operations that
47 concern object stores. We want to be able to group object stores
49 * storage/IDBFactoryBackendImpl.cpp:
50 (WebCore::IDBFactoryBackendImpl::open):
51 Decide which backend to use based on the backingStoreType
53 * storage/IDBIndexBackendImpl.cpp:
54 (WebCore::IDBIndexBackendImpl::IDBIndexBackendImpl):
55 (WebCore::IDBIndexBackendImpl::openCursorInternal):
56 (WebCore::IDBIndexBackendImpl::getInternal):
57 (WebCore::IDBIndexBackendImpl::addingKeyAllowed):
58 * storage/IDBIndexBackendImpl.h:
59 (WebCore::IDBIndexBackendImpl::create):
60 Pass database and object store id to backend functions concerning
62 * storage/IDBLevelDBBackingStore.cpp: Added.
63 (WebCore::IDBLevelDBBackingStore::IDBLevelDBBackingStore):
64 (WebCore::IDBLevelDBBackingStore::~IDBLevelDBBackingStore):
65 (WebCore::IDBLevelDBBackingStore::open):
66 (WebCore::IDBLevelDBBackingStore::extractIDBDatabaseMetaData):
67 (WebCore::IDBLevelDBBackingStore::setIDBDatabaseMetaData):
68 (WebCore::IDBLevelDBBackingStore::getObjectStores):
69 (WebCore::IDBLevelDBBackingStore::createObjectStore):
70 (WebCore::IDBLevelDBBackingStore::deleteObjectStore):
71 (WebCore::IDBLevelDBBackingStore::getObjectStoreRecord):
72 (WebCore::IDBLevelDBBackingStore::putObjectStoreRecord):
73 (WebCore::IDBLevelDBBackingStore::clearObjectStore):
74 (WebCore::IDBLevelDBBackingStore::deleteObjectStoreRecord):
75 (WebCore::IDBLevelDBBackingStore::nextAutoIncrementNumber):
76 (WebCore::IDBLevelDBBackingStore::keyExistsInObjectStore):
77 (WebCore::IDBLevelDBBackingStore::forEachObjectStoreRecord):
78 (WebCore::IDBLevelDBBackingStore::getIndexes):
79 (WebCore::IDBLevelDBBackingStore::createIndex):
80 (WebCore::IDBLevelDBBackingStore::deleteIndex):
81 (WebCore::IDBLevelDBBackingStore::putIndexDataForRecord):
82 (WebCore::IDBLevelDBBackingStore::deleteIndexDataForRecord):
83 (WebCore::IDBLevelDBBackingStore::getObjectViaIndex):
84 (WebCore::IDBLevelDBBackingStore::getPrimaryKeyViaIndex):
85 (WebCore::IDBLevelDBBackingStore::keyExistsInIndex):
86 (WebCore::IDBLevelDBBackingStore::openObjectStoreCursor):
87 (WebCore::IDBLevelDBBackingStore::openIndexKeyCursor):
88 (WebCore::IDBLevelDBBackingStore::openIndexCursor):
89 (WebCore::IDBLevelDBBackingStore::createTransaction):
90 * storage/IDBLevelDBBackingStore.h: Added.
91 Add an empty implementation of the LevelDB backend.
92 * storage/IDBObjectStoreBackendImpl.cpp:
93 Keep track of database id, use the new RecordIdentifier.
94 (WebCore::IDBObjectStoreBackendImpl::IDBObjectStoreBackendImpl):
95 (WebCore::IDBObjectStoreBackendImpl::getInternal):
96 (WebCore::IDBObjectStoreBackendImpl::putInternal):
97 (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
98 (WebCore::IDBObjectStoreBackendImpl::clearInternal):
99 (WebCore::populateIndex):
100 (WebCore::IDBObjectStoreBackendImpl::createIndex):
101 (WebCore::IDBObjectStoreBackendImpl::createIndexInternal):
102 (WebCore::IDBObjectStoreBackendImpl::deleteIndexInternal):
103 (WebCore::IDBObjectStoreBackendImpl::openCursorInternal):
104 (WebCore::IDBObjectStoreBackendImpl::loadIndexes):
105 (WebCore::IDBObjectStoreBackendImpl::genAutoIncrementKey):
106 * storage/IDBObjectStoreBackendImpl.h:
107 (WebCore::IDBObjectStoreBackendImpl::create):
108 (WebCore::IDBObjectStoreBackendImpl::databaseId):
109 * storage/IDBSQLiteBackingStore.cpp:
110 (WebCore::IDBSQLiteBackingStore::open):
111 (WebCore::IDBSQLiteBackingStore::createObjectStore):
112 (WebCore::IDBSQLiteBackingStore::deleteObjectStore):
113 (WebCore::IDBSQLiteBackingStore::getObjectStoreRecord):
114 (WebCore::IDBSQLiteBackingStore::putObjectStoreRecord):
115 (WebCore::IDBSQLiteBackingStore::clearObjectStore):
116 (WebCore::IDBSQLiteBackingStore::deleteObjectStoreRecord):
117 (WebCore::IDBSQLiteBackingStore::nextAutoIncrementNumber):
118 (WebCore::IDBSQLiteBackingStore::keyExistsInObjectStore):
119 (WebCore::IDBSQLiteBackingStore::forEachObjectStoreRecord):
120 (WebCore::IDBSQLiteBackingStore::getIndexes):
121 (WebCore::IDBSQLiteBackingStore::createIndex):
122 (WebCore::IDBSQLiteBackingStore::deleteIndex):
123 (WebCore::IDBSQLiteBackingStore::putIndexDataForRecord):
124 (WebCore::IDBSQLiteBackingStore::deleteIndexDataForRecord):
125 (WebCore::IDBSQLiteBackingStore::getObjectViaIndex):
126 (WebCore::IDBSQLiteBackingStore::getPrimaryKeyViaIndex):
127 (WebCore::IDBSQLiteBackingStore::keyExistsInIndex):
128 (WebCore::IDBSQLiteBackingStore::openObjectStoreCursor):
129 (WebCore::IDBSQLiteBackingStore::openIndexKeyCursor):
130 (WebCore::IDBSQLiteBackingStore::openIndexCursor):
131 * storage/IDBSQLiteBackingStore.h:
133 2011-04-11 Alexander Pavlov <apavlov@chromium.org>
135 Reviewed by Yury Semikhatsky.
137 Web Inspector: Duplicate CSS properties are reported for non-lowercase property names in the Styles sidebar
138 https://bugs.webkit.org/show_bug.cgi?id=58226
140 * inspector/InspectorStyleSheet.cpp:
141 (WebCore::InspectorStyle::populateAllProperties):
143 2011-04-07 Pavel Podivilov <podivilov@chromium.org>
145 Reviewed by Pavel Feldman.
147 Web Inspector: get rid of source frame delegates for resources panel.
148 https://bugs.webkit.org/show_bug.cgi?id=58041
150 Use TextViewer configured with a domain-specific delegate to show/edit resource contents in resources panel.
152 * inspector/front-end/ResourceView.js:
153 (WebInspector.ResourceView.createResourceView):
154 (WebInspector.ResourceView.resourceViewTypeMatchesResource):
155 (WebInspector.ResourceSourceFrame):
156 (WebInspector.ResourceSourceFrame.prototype.get resource):
157 (WebInspector.ResourceSourceFrame.prototype.contentEditable):
158 (WebInspector.ResourceSourceFrame.prototype._requestContent):
159 (WebInspector.CSSSourceFrame):
160 (WebInspector.CSSSourceFrame.prototype.contentEditable):
161 (WebInspector.CSSSourceFrame.prototype._editContent):
162 (WebInspector.CSSSourceFrame.prototype._editContent.handleInfos):
163 (WebInspector.CSSSourceFrame.prototype._saveStyleSheet):
164 * inspector/front-end/SourceFrame.js:
165 (WebInspector.SourceFrame.prototype._ensureContentLoaded):
166 (WebInspector.SourceFrame.prototype._requestContent):
167 (WebInspector.SourceFrame.prototype._handleSave):
168 (WebInspector.SourceFrame.prototype._editContent):
170 2011-04-11 Alexis Menard <alexis.menard@openbossa.org>
172 Reviewed by Andreas Kling.
174 [Qt] Regression : r83051 Oxygen's lineedits are not rendered properly
175 https://bugs.webkit.org/show_bug.cgi?id=58076
177 State_Sunken is more generic than pressed. It is used by items such as frames or
178 line edits because they are "sunken" frames (e.g. QLineEdit). It can be required
179 by some style like Oxygen. Therefore only in the mobile theme we check if the object
182 * platform/qt/RenderThemeQt.cpp:
183 (WebCore::RenderThemeQt::paintTextField):
185 2011-04-11 Pavel Feldman <pfeldman@chromium.org>
187 Reviewed by Yury Semikhatsky.
189 Web Inspector: add support for optional output parameters.
190 https://bugs.webkit.org/show_bug.cgi?id=58207
192 Output parameters such as "redirectResponse" are optional, but
193 do not allow specifying them as such.
195 * inspector/CodeGeneratorInspector.pm:
196 * inspector/Inspector.json:
197 * inspector/InspectorResourceAgent.cpp:
198 (WebCore::buildObjectForResourceResponse):
199 (WebCore::buildObjectForCachedResource):
200 * inspector/front-end/NetworkManager.js:
201 (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
202 * inspector/generate-inspector-idl:
204 2011-04-11 Pavel Feldman <pfeldman@chromium.org>
206 Reviewed by Yury Semikhatsky.
208 Web Inspector: refactor / document call frames in debugger domain.
209 https://bugs.webkit.org/show_bug.cgi?id=58187
211 Note that we are not special casing with(element) and with(document) anymore
212 and do not tell user that it is "Event target" and "Event document". Strictly speaking,
213 we should not have done it for with(element) not necessarily being related to an event.
215 * English.lproj/localizedStrings.js:
216 * inspector/InjectedScriptSource.js:
217 * inspector/Inspector.json:
218 * inspector/front-end/ScopeChainSidebarPane.js:
219 (WebInspector.ScopeChainSidebarPane.prototype.update):
221 2011-04-10 ChangSeok Oh <shivamidow@gmail.com>
223 Reviewed by Eric Seidel.
225 Make correspondence of file name related with event to other port.
226 https://bugs.webkit.org/show_bug.cgi?id=57416
228 Some file names are changed to make correspondence naming rule.
229 Keyboard, mouse and wheel event file names for GTK port have been different from other ports.
230 This has made user hard to find a specific file related with event for GTK port.
232 No test required. This patch just changes some file names.
234 * GNUmakefile.list.am:
235 * platform/gtk/KeyEventGtk.cpp: Removed.
236 * platform/gtk/MouseEventGtk.cpp: Removed.
237 * platform/gtk/PlatformKeyboardEventGtk.cpp: Added.
238 * platform/gtk/PlatformMouseEventGtk.cpp: Added.
239 * platform/gtk/PlatformWheelEventGtk.cpp: Added.
240 * platform/gtk/WheelEventGtk.cpp: Removed.
242 2011-04-10 Simon Fraser <simon.fraser@apple.com>
244 Revert the FloatRect.cpp part of r83422, since
245 clampToInteger() is broken for some inputs. I filed
246 https://bugs.webkit.org/show_bug.cgi?id=58216
248 * platform/graphics/FloatRect.cpp:
249 (WebCore::safeFloatToInt):
250 (WebCore::enclosingIntRect):
252 2011-04-10 Simon Fraser <simon.fraser@apple.com>
254 Reviewed by Maciej Stachowiak.
256 Car model dropdowns at audiusa.com lay out incorrectly with compositing enabled
257 https://bugs.webkit.org/show_bug.cgi?id=56660
259 When overflow on an element changes, we need to inform compositing
260 layers which create and position an "ancestor clipping" layer based
261 on that overflow. Do this by triggering a rebuild of compositing layers
262 when overflow changes on a layer whose stacking context has compositing
263 descendants. (We can't just check whether the layer itself has compositing
264 descendants, because overflow follows the render tree, but compositing
265 follows the z-order tree.)
267 Test: compositing/geometry/ancestor-overflow-change.html
269 * rendering/RenderLayer.cpp:
270 (WebCore::RenderLayer::styleChanged):
271 * rendering/RenderLayer.h:
272 * rendering/RenderLayerBacking.cpp:
273 (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
275 2011-04-10 Simon Fraser <simon.fraser@apple.com>
277 Reviewed by Ariya Hidayat.
279 Allow ShadowBlur to re-use the last buffer if it already contains the correct shadow
280 https://bugs.webkit.org/show_bug.cgi?id=58161
282 ShadowBlur already has a singleton scratch buffer that is re-used
283 between shadows. Enhance use of this scratch buffer to avoid drawing
284 and blurring the shadow if the results will match what is already
287 Cleaned up ShadowBlur code to remove beginShadowLayer() and endShadowLayer(),
288 which ended up with little reusable code after adding the re-use logic.
290 * platform/graphics/FloatRect.cpp:
291 (WebCore::enclosingIntRect): Replace safeFloatToInt() with the existing
292 clampToInteger() from MathExtras.h
294 * platform/graphics/FloatSize.h:
295 (WebCore::expandedIntSize): New method to safely ceil() the size.
297 * platform/graphics/RoundedIntRect.h:
298 Add operator== for Radii and RoundedIntRect.
300 * platform/graphics/ShadowBlur.cpp:
301 (WebCore::ScratchBuffer::ScratchBuffer):
302 (WebCore::ScratchBuffer::setLastShadowValues):
303 (WebCore::ScratchBuffer::setLastInsetShadowValues):
304 (WebCore::ScratchBuffer::matchesLastShadow):
305 (WebCore::ScratchBuffer::matchesLastInsetShadow):
306 (WebCore::ScratchBuffer::clearScratchBuffer):
307 Have the scratch buffer remember what shadow parameters were used
308 to render the buffer contents.
310 (WebCore::ShadowBlur::drawShadowBuffer):
311 Renamed from endShadowLayer(), and only contains the drawing
314 (WebCore::ShadowBlur::drawRectShadow):
315 Promote some code from beginShadowLayer().
317 (WebCore::ShadowBlur::drawInsetShadow):
318 Promote some code from beginShadowLayer().
320 (WebCore::ShadowBlur::drawRectShadowWithoutTiling):
321 (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
322 (WebCore::ShadowBlur::drawInsetShadowWithTiling):
323 (WebCore::ShadowBlur::drawRectShadowWithTiling):
324 These methods now check to see if the buffer already matches
325 their required parameters, and avoid work if it does.
327 (WebCore::ShadowBlur::blurShadowBuffer):
328 Factored some code into this new method.
330 (WebCore::ShadowBlur::blurAndColorShadowBuffer):
333 * platform/graphics/ShadowBlur.h:
335 2011-04-10 Geoffrey Garen <ggaren@apple.com>
337 Build fix: Updated for file move.
339 * bindings/js/GCController.cpp:
340 * bindings/js/ScriptGCEvent.cpp:
342 2011-04-10 Geoffrey Garen <ggaren@apple.com>
344 Rubber-stamped by Beth Dakin.
346 Moved Heap.h and Heap.cpp to the heap folder, because anything less
347 would be uncivilized.
349 * ForwardingHeaders/heap/Heap.h: Copied from WebCore/ForwardingHeaders/runtime/Heap.h.
350 * ForwardingHeaders/runtime/Heap.h: Removed.
352 2011-04-10 Luke Macpherson <macpherson@chromium.org>
354 Reviewed by Simon Fraser.
356 Rename CSSStyleApplyProperty::inherit,initial,value applyInheritValue,applyInitialValue,applyValue
357 https://bugs.webkit.org/show_bug.cgi?id=58212
359 No new tests - function renaming only / no functionality changes.
361 * css/CSSStyleApplyProperty.cpp:
362 Rename all instances of inherit, initial and value.
363 * css/CSSStyleApplyProperty.h:
364 Rename all instances of inherit, initial and value.
365 * css/CSSStyleSelector.cpp:
366 Rename all instances of inherit, initial and value.
368 2011-04-10 Mike Lawther <mikelawther@chromium.org>
370 Reviewed by Ojan Vafai.
372 flex/bison tokens and grammar for CSS calc
373 https://bugs.webkit.org/show_bug.cgi?id=54412
375 Tests: css3/calc/calc-errors.html
376 css3/calc/lexer-regression-57581-2.html
377 css3/calc/lexer-regression-57581-3.html
378 css3/calc/lexer-regression-57581.html
379 css3/calc/minmax-errors.html
380 css3/calc/nested-rounded-corners.html
381 css3/calc/simple-calcs.html
382 css3/calc/simple-minmax.html
385 * css/CSSParserValues.cpp:
386 (WebCore::CSSParserValueList::insertValueAt):
387 (WebCore::CSSParserValueList::extend):
388 * css/CSSParserValues.h:
389 * css/tokenizer.flex:
391 2011-04-10 Alice Boxhall <aboxhall@chromium.org>
393 Reviewed by Ryosuke Niwa.
395 Change EventHandler::updateSelectionForMouseDrag to take a HitTestResult only.
396 https://bugs.webkit.org/show_bug.cgi?id=57923
398 Change EventHandler::updateSelectionForMouseDrag to take a HitTestResult
399 rather than a Node* and an IntPoint&, as the selection may actually not
400 extend into the Node found by the HitTest.
402 No new tests. Refactoring only.
404 * page/EventHandler.cpp:
405 (WebCore::EventHandler::handleMouseDraggedEvent):
406 (WebCore::EventHandler::updateSelectionForMouseDrag):
407 * page/EventHandler.h:
409 2011-04-10 Kent Tamura <tkent@chromium.org>
411 Unreviewed, rolling out r83353.
412 http://trac.webkit.org/changeset/83353
413 https://bugs.webkit.org/show_bug.cgi?id=58106
415 The new test doesn't pass on all Chromium platforms.
417 * dom/DataTransferItem.h:
418 * dom/DataTransferItem.idl:
419 * platform/chromium/ClipboardMimeTypes.cpp:
420 * platform/chromium/ClipboardMimeTypes.h:
421 * platform/chromium/DataTransferItemChromium.cpp:
422 (WebCore::DataTransferItemChromium::getAsString):
423 * platform/chromium/DataTransferItemChromium.h:
424 * platform/chromium/PlatformBridge.h:
426 2011-04-10 Gyuyoung Kim <gyuyoung.kim@samsung.com>
428 Reviewed by Eric Carlson.
430 [EFL] Add seek forward / backward buttons to MediaControl UI.
431 https://bugs.webkit.org/show_bug.cgi?id=56810
433 Add seek forward / backward buttons to media control. And, change formType name
436 * platform/efl/RenderThemeEfl.cpp:
437 (WebCore::RenderThemeEfl::edjeGroupFromFormType):
438 (WebCore::RenderThemeEfl::emitMediaButtonSignal):
439 (WebCore::RenderThemeEfl::paintMediaMuteButton):
440 (WebCore::RenderThemeEfl::paintMediaPlayButton):
441 (WebCore::RenderThemeEfl::paintMediaSeekBackButton):
442 (WebCore::RenderThemeEfl::paintMediaSeekForwardButton):
443 * platform/efl/RenderThemeEfl.h:
445 2011-04-10 Chris Guillory <chris.guillory@google.com>
447 Reviewed by Eric Seidel.
449 Remove unused function declaration in PlatformContextSkia.h.
450 https://bugs.webkit.org/show_bug.cgi?id=55983
452 * platform/graphics/skia/PlatformContextSkia.h:
454 2011-04-10 Patrick Gansterer <paroga@webkit.org>
456 Unreviewed build fix for !ENABLE(XSLT) after r82562.
458 * dom/XMLDocumentParserLibxml2.cpp:
459 (WebCore::XMLDocumentParser::doEnd):
461 2011-04-10 Patrick Gansterer <paroga@webkit.org>
463 Unreviewed build fix for !ENABLE(XSLT) after r82562.
465 * xml/XMLTreeViewer.cpp: Readded #if ENABLE(XSLT).
467 2011-04-10 Dimitri Glazkov <dglazkov@chromium.org>
469 Reviewed by Anders Carlsson.
471 REGRESSION(r83256): Text-decoration bleeds into shadow DOM
472 https://bugs.webkit.org/show_bug.cgi?id=58205
474 Now that the shadow root is a never-styled element, we need to walk to
475 parent to find out if we're inside of a shadow DOM subtree.
477 Test: media/controls-styling.html
479 * css/CSSStyleSelector.cpp:
480 (WebCore::isAtShadowBoundary): Added helper function.
481 (WebCore::CSSStyleSelector::adjustRenderStyle): Changed to use the helper.
483 2011-04-07 Dimitri Glazkov <dglazkov@chromium.org>
485 Reviewed by Eric Carlson.
487 [Meta] Convert HTMLMediaElement to use the new shadow DOM
488 https://bugs.webkit.org/show_bug.cgi?id=53020
490 This conversion is non-trivial, for several reasons:
492 1) Since HTMLMediaElement now hosts the shadow DOM for controls, hiding
493 and showing controls does not result in destroying and re-creating the
494 shadow DOM tree. Instead, the tree is created as needed and shown/hidden
497 2) Instead of detaching/attaching on each style change, the control parts
498 are now using a set of higher fidelity callbacks that notify MediaControls
499 about changes to which it should react. Each reaction results in hiding,
500 showing, or changing the state of the control parts using inline styles
503 3) Hiding and showing controls is accomplished using inline styles, rather
504 than wiring rendererIsNeeded, because renderers are now re-created less
507 4) Instead of constantly querying RenderTheme about visibility of a particular
508 control part, we let the theme determine which parts are supported and
509 which parts are visible in certain conditions.
511 5) Custom hit-testing, event forwarding, and style updates are completely
512 removed, since they are now unnecessary.
514 6) Fading controls in/out is now done as CSS animation, since shadow DOM
517 Test: manual-tests/media-controls.html
519 2011-04-09 Dan Bernstein <mitz@apple.com>
521 Reviewed by Beth Dakin.
523 <rdar://problem/9215280> Detached canvas draws with incorrect font
525 Test: fast/canvas/font-update.html
527 The existing mechanism for updating the font in a canvas 2D context was lacking in at least
528 two ways: it neglected to update fonts in all but the topmost state in the stack, and since it
529 was based on HTMLCanvasElemen's attach() and recalcStyle(), it did not work when the element
532 This change takes the responsibility for font updates away from the canvas element and gives it
533 to the canvas context and its graphics state.
535 * css/CSSFontSelector.cpp:
536 (WebCore::CSSFontSelector::registerForInvalidationCallbacks): Added. Adds to the set of registered
537 font selector clients.
538 (WebCore::CSSFontSelector::unregisterForInvalidationCallbacks): Added. Removes from the set of
539 registered font selector clients.
540 (WebCore::CSSFontSelector::dispatchInvalidationCallbacks): Calls fontsNeedUpdate() on all registered
541 clients and forces a style recalc on the document.
542 (WebCore::CSSFontSelector::fontLoaded): Changed to call dispatchInvalidationCallbacks().
543 (WebCore::CSSFontSelector::fontCacheInvalidated): Ditto.
544 * css/CSSFontSelector.h:
545 * html/HTMLCanvasElement.cpp: Removed overrides of attach() and recalcStyle().
546 * html/HTMLCanvasElement.h:
547 * html/canvas/CanvasRenderingContext2D.cpp:
548 (WebCore::CanvasRenderingContext2D::State::~State): Added. Unregisters with the font selector.
549 (WebCore::CanvasRenderingContext2D::State::fontsNeedUpdate): Added. Called by the font selector
550 when its fonts need to be updated. Updates the font.
551 (WebCore::CanvasRenderingContext2D::setFont): Registers the state with the font selector.
552 * html/canvas/CanvasRenderingContext2D.h:
553 * platform/graphics/FontSelector.h:
554 (WebCore::FontSelectorClient::~FontSelectorClient):
556 2011-04-09 Geoffrey Garen <ggaren@apple.com>
560 Try recommitting some things svn left out of my last commit.
562 * bridge/qt/qt_runtime.h:
564 2011-04-09 Geoffrey Garen <ggaren@apple.com>
568 Try recommitting some things svn left out of my last commit.
570 * ForwardingHeaders/collector: Removed.
571 * ForwardingHeaders/collector/handles: Removed.
572 * ForwardingHeaders/collector/handles/Global.h: Removed.
574 2011-04-08 Dimitri Glazkov <dglazkov@chromium.org>
576 Reviewed by Ojan Vafai.
578 Implement proper handling of mouseover/mouseout events in regard to shadow DOM boundaries.
579 https://bugs.webkit.org/show_bug.cgi?id=55515
581 This implements XBL 2.0's specified handling of mouseover/mouseout events:
582 http://dev.w3.org/2006/xbl2/Overview.html#the-mouseover-and-mouseout-events
585 1) calculate lowest common ancestor between relatedTarget and target, and
586 the nearest boundaries around them: the outer (common) boundary, and the
587 inner (specific to relatedTarget) boundary. Then, we
588 2) ensure that events only propagate up to the common boundary (or
589 all the way if boundary is not found), while
590 3) updating relatedTarget be the inner boundary.
592 We also detect the most common case when no common boundary could exist
593 and provide a fast path to short-circuit most of the boundary detection
596 Test: fast/events/shadow-boundary-crossing.html
598 * dom/EventDispatcher.cpp:
599 (WebCore::EventDispatcher::adjustToShadowBoundaries): Added a helper to determine lowest
600 common ancestor, the boundaries around it, and compute adjustments
601 to relatedTarget and event target ancestor chain.
602 (WebCore::ancestorsCrossShadowBoundaries): Added.
603 (WebCore::EventDispatcher::adjustRelatedTarget): Changed to calculate
604 inner/outer shadow DOM boundaries and adjust ancestors chain accordingly.
605 (WebCore::EventDispatcher::EventDispatcher): Added flag initializer
606 (WebCore::EventDispatcher::ensureEventAncestors): Renamed from getEventAncestors,
607 converted to use initialization flag, rather than testing for empty.
608 * dom/EventDispatcher.h: Adjusted decls.
609 * dom/MouseEvent.cpp:
610 (WebCore::MouseEventDispatchMediator::dispatchEvent): Changed to send event
611 to adjustRelatedTarget.
613 2011-04-08 Geoffrey Garen <ggaren@apple.com>
615 Reviewed by Oliver Hunt.
617 A few heap-related renames and file moves.
619 WeakGCPtr<T> => Weak<T>
620 Global<T> => Strong<T>
622 collector/* => heap/*
623 runtime/WeakGCPtr.h => heap/Weak.h
625 (Eventually, even more files should move into the heap directory. Like
626 Heap.h and Heap.cpp, for example.)
629 * ForwardingHeaders/collector: Removed.
630 * ForwardingHeaders/heap: Copied from ForwardingHeaders/collector.
631 * ForwardingHeaders/heap/Strong.h: Copied from ForwardingHeaders/collector/handles/Global.h.
632 * ForwardingHeaders/heap/Weak.h: Copied from ForwardingHeaders/runtime/WeakGCPtr.h.
633 * ForwardingHeaders/runtime/WeakGCPtr.h: Removed.
634 * WebCore.vcproj/WebCore.vcproj:
635 * WebCore.vcproj/copyForwardingHeaders.cmd:
636 * bindings/js/JSCallbackData.h:
637 * bindings/js/JSCustomVoidCallback.h:
638 * bindings/js/JSDOMWindowBase.h:
639 * bindings/js/JSDOMWindowShell.cpp:
640 (WebCore::JSDOMWindowShell::setWindow):
641 * bindings/js/JSDataGridDataSource.h:
642 * bindings/js/JSEventListener.h:
643 * bindings/js/ScheduledAction.cpp:
644 (WebCore::ScheduledAction::ScheduledAction):
645 * bindings/js/ScheduledAction.h:
646 * bindings/js/ScriptCachedFrameData.cpp:
647 (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
648 * bindings/js/ScriptCachedFrameData.h:
649 * bindings/js/ScriptController.cpp:
650 (WebCore::ScriptController::createWindowShell):
651 * bindings/js/ScriptController.h:
652 * bindings/js/ScriptObject.h:
653 * bindings/js/ScriptState.h:
654 * bindings/js/ScriptValue.cpp:
655 * bindings/js/ScriptValue.h:
656 * bindings/js/ScriptWrappable.h:
657 * bindings/js/WorkerScriptController.cpp:
658 (WebCore::WorkerScriptController::initScript):
659 * bindings/js/WorkerScriptController.h:
660 * bridge/jsc/BridgeJSC.h:
661 * bridge/qt/qt_runtime.h:
662 * bridge/runtime_root.h:
663 * xml/XMLHttpRequest.cpp:
665 2011-04-09 Keith Kyzivat <keith.kyzivat@nokia.com>
667 Reviewed by Laszlo Gombos.
669 [Qt] Don't link against fontconfig or X11 if embedded
670 https://bugs.webkit.org/show_bug.cgi?id=58104
672 No functional change so no new tests.
674 * WebCore.pri: qpa=>embedded should be done very early so all cases of embedded are uniform.
676 2011-04-09 Csaba Osztrogonác <ossy@webkit.org>
678 [Qt] Unreviewed trivial fix after r83344.
680 * WebCore.pro: Update HEADERS list.
682 2011-04-09 Jon Lee <jonlee@apple.com>
684 Reviewed by Beth Dakin.
686 Overlay scrollbar flashes in scrollable <textarea> with each keystroke (58180)
687 https://bugs.webkit.org/show_bug.cgi?id=58180
688 <rdar://problem/9047984>
690 * platform/mac/ScrollAnimatorMac.mm:
691 (WebCore::ScrollAnimatorMac::immediateScrollToPoint): Check that there is a change before submitting
692 (WebCore::ScrollAnimatorMac::immediateScrollByDeltaX):
693 (WebCore::ScrollAnimatorMac::immediateScrollByDeltaY):
695 2011-04-09 Sreeram Ramachandran <sreeram@google.com>
697 Reviewed by Ryosuke Niwa.
699 Gather data on modal dialogs shown during unload events
700 https://bugs.webkit.org/show_bug.cgi?id=58115
702 Add a new method to the ChromeClient API to allow clients to receive
703 notifications of modal dialogs dispatched during page dismissal events.
704 The new method has a default empty definition; only chromium overrides
705 it to keep track of histograms.
707 No tests because this is a no-op for all ports except chromium (and it's
708 not clear how to test chromium histograms from webkit).
711 (WebCore::isDuringPageDismissal):
712 (WebCore::willRunModalDialog):
713 (WebCore::Chrome::runJavaScriptAlert):
714 (WebCore::Chrome::runJavaScriptConfirm):
715 (WebCore::Chrome::runJavaScriptPrompt):
716 (WebCore::Chrome::willRunModalHTMLDialog):
718 * page/ChromeClient.h:
719 (WebCore::ChromeClient::willRunModalDialogDuringPageDismissal):
720 * page/DOMWindow.cpp:
721 (WebCore::DOMWindow::showModalDialog):
723 2011-04-08 David Humphrey <david.humphrey@senecac.on.ca>
725 Reviewed by Eric Carlson.
727 Fix call order of media element muted and play(), such that setting muted before play() works.
728 https://bugs.webkit.org/show_bug.cgi?id=57673
729 https://code.google.com/p/chromium/issues/detail?id=70777
731 Manual test added: manual-tests/media-muted.html
733 * html/HTMLMediaElement.cpp:
734 (WebCore::HTMLMediaElement::updatePlayState):
735 * manual-tests/media-muted.html: Added.
737 2011-04-08 Nat Duca <nduca@chromium.org>
739 Reviewed by David Levin.
741 [chromium] Fix windows assertion on ~CCThread
742 https://bugs.webkit.org/show_bug.cgi?id=58153
744 Because ~CCThread uses waitForThreadCompletion,
745 calling detachThread is not necessary.
747 * platform/graphics/chromium/cc/CCThread.cpp:
748 (WebCore::CCThread::runLoop):
750 2011-04-08 Jian Li <jianli@chromium.org>
752 Unreviewed, rolling out r83348.
753 http://trac.webkit.org/changeset/83348
754 https://bugs.webkit.org/show_bug.cgi?id=49508
756 Breaks layout tests in QT, Win7 and Chromium.
758 * rendering/RenderText.cpp:
759 (WebCore::RenderText::localCaretRect):
761 2011-04-08 MORITA Hajime <morrita@google.com>
763 Reviewed by Simon Fraser.
765 Negative spread should not make a sharp corner rounded
766 https://bugs.webkit.org/show_bug.cgi?id=58162
768 Handled inset shadow path for rounded and non-rounded rect
769 differently as normal shadow path is doing.
771 * rendering/RenderBoxModelObject.cpp:
772 (WebCore::RenderBoxModelObject::paintBoxShadow):
774 2011-04-07 Simon Fraser <simon.fraser@apple.com>
776 Reviewed by Martin Robinson.
778 REGRESSION (r77034-r77220): CSS box-shadow no longer renders on PowerPC
779 https://bugs.webkit.org/show_bug.cgi?id=55180
781 The endianness #ifdef in ShadowBlur was unnecessary and harmful. The
782 data we get back from ImageBuffer::getImageData() do not vary in
785 * platform/graphics/ShadowBlur.cpp:
786 (WebCore::ShadowBlur::blurLayerImage):
788 2011-04-08 Erik Arvidsson <arv@chromium.org>
790 Reviewed by Dimitri Glazkov.
792 IFrame is getting the focus even though it is hidden
793 https://bugs.webkit.org/show_bug.cgi?id=55861
795 Test: fast/dom/hidden-iframe-no-focus.html
797 * html/HTMLFrameOwnerElement.cpp:
798 (WebCore::HTMLFrameOwnerElement::isKeyboardFocusable):
799 * html/HTMLFrameOwnerElement.h:
801 2011-04-08 Jeff Timanus <twiz@chromium.org>
803 Reviewed by Kenneth Russell.
805 Fall back to software rendering for Canvas2D when requesting a DrawingBuffer larger than supported by the GL environment.
806 https://bugs.webkit.org/show_bug.cgi?id=57768
808 * html/canvas/CanvasRenderingContext2D.cpp:
809 (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
810 (WebCore::CanvasRenderingContext2D::reset):
811 * platform/graphics/gpu/DrawingBuffer.cpp:
812 (WebCore::DrawingBuffer::reset):
813 * platform/graphics/gpu/DrawingBuffer.h:
815 2011-04-08 Daniel Cheng <dcheng@chromium.org>
817 Reviewed by Dmitry Titov.
819 [chromium] Implement image/png support in DataTransferItems
820 https://bugs.webkit.org/show_bug.cgi?id=58106
822 This patch implements DataTransferItem::getAsFile() using Blobs. In
823 addition, plumbing for image/png has been added so image paste will be
824 supported as long as the renderer makes that data available.
826 Tests: editing/pasteboard/data-transfer-items-image-png.html
828 * dom/DataTransferItem.h:
829 * dom/DataTransferItem.idl:
830 * platform/chromium/ClipboardMimeTypes.cpp:
831 * platform/chromium/ClipboardMimeTypes.h:
832 * platform/chromium/DataTransferItemChromium.cpp:
833 (WebCore::DataTransferItemChromium::getAsString):
834 (WebCore::DataTransferItemChromium::getAsFile):
835 * platform/chromium/DataTransferItemChromium.h:
836 * platform/chromium/PlatformBridge.h:
838 2011-04-08 MORITA Hajime <morrita@google.com>
840 Unreviewed windows build fix.
842 * editing/SpellingCorrectionController.h:
843 (WebCore::SpellingCorrectionController::UNLESS_ENABLED):
845 2011-04-08 Enrica Casucci <enrica@apple.com>
847 Reviewed by Maciej Stachowiak.
849 Improve lifetime management of nodes in ReplaceNodeWithSpanCommand.
850 https://bugs.webkit.org/show_bug.cgi?id=57595
851 <rdar://problem/9222122>
853 Test: editing/style/bold-with-dom-changes.html
855 * editing/ReplaceNodeWithSpanCommand.cpp:
856 (WebCore::swapInNodePreservingAttributesAndChildren):
858 2011-04-07 Roland Steiner <rolandsteiner@chromium.org>
860 Reviewed by Dimitri Glazkov.
862 Bug 58060 - Prepare access to TreeScope from Node, using NodeRareData
863 https://bugs.webkit.org/show_bug.cgi?id=58060
865 Add a TreeScope pointer to NodeRareData to allow direct access to the containing tree scope.
866 However, in case the containing scope is the document, this is not set, and the
867 document pointer within Node is used instead.
869 In an object derived from TreeScope (currently Document), the tree scope pointer
870 points to itself. Such objects also contain a parent tree scope pointer that
871 points to the containing scope. For Document, this is 0.
873 Add new functions setTreeScope[Recursively] that replace setDocument[Recursively]
874 in public usage. setDocument[Recursively] are now only used internally and are
875 thererfore protected.
877 No new tests. (no new functionality)
879 * dom/ContainerNode.cpp: change DOM manipulation methods to update scope of inserted nodes
880 (WebCore::ContainerNode::insertBefore):
881 (WebCore::ContainerNode::replaceChild):
882 (WebCore::ContainerNode::appendChild):
884 (WebCore::Document::~Document):
885 (WebCore::Document::setDocType): Ditto
886 (WebCore::Document::adoptNode): Ditto
889 (WebCore::Node::treeScope): use NodeRareData to check if a non-Document scope is set
890 (WebCore::Node::setTreeScope): update NodeRareData depending on whether scope is a document
891 (WebCore::Node::setTreeScopeRecursively):
892 (WebCore::Node::setDocumentRecursively):
894 * dom/NodeRareData.h: add scope pointer
895 (WebCore::NodeRareData::NodeRareData):
896 (WebCore::NodeRareData::treeScope):
897 (WebCore::NodeRareData::setTreeScope):
898 * dom/TreeScope.cpp: add parentTreeScope pointer
899 (WebCore::TreeScope::TreeScope):
900 (WebCore::TreeScope::setParentTreeScope):
902 (WebCore::TreeScope::parentTreeScope):
904 2011-04-08 Xiaomei Ji <xji@chromium.org>
906 Reviewed by David Hyatt.
908 Local caret rectangle calculation should be relative to its containing block.
909 https://bugs.webkit.org/show_bug.cgi?id=49508.
911 InlineBox and caret rectangle are positioned relative to its containing block.
912 So its left and right edge value should be relative to its containing block as well.
914 Test: fast/forms/cursor-at-editable-content-boundary.html
916 * rendering/RenderText.cpp:
917 (WebCore::RenderText::localCaretRect):
919 2011-04-08 MORITA Hajime <morrita@google.com>
921 Unreviewed build fix.
923 * editing/Editor.cpp:
924 (WebCore::Editor::markMisspellingsAfterTypingToWord):
926 2011-04-08 David Hyatt <hyatt@apple.com>
928 Reviewed by Simon Fraser.
930 https://bugs.webkit.org/show_bug.cgi?id=57971
932 Rework visited/unvisited links for before/after content. Propagate the bits earlier so that we don't lose
933 them when we throw away the visited style. Don't throw away the visited link style for pseudo elements
934 either, so that the styles are consistent.
936 Added fast/history/visited-generated-content-test.html
938 * css/CSSStyleSelector.cpp:
939 (WebCore::CSSStyleSelector::styleForElement):
940 (WebCore::CSSStyleSelector::pseudoStyleForElement):
942 2011-04-06 MORITA Hajime <morrita@google.com>
944 Reviewed by Darin Adler.
946 [Refactoring] Auto correction panel should be handled by its own class.
947 https://bugs.webkit.org/show_bug.cgi?id=55571
949 Extracted code inside SUPPORT_AUTOCORRECTION_PANEL into
950 SpellingCorrectionController class.
951 This change also remove some SUPPORT_AUTOCORRECTION_PANEL guard if
952 code paths inside the never reached without autocorrection support.
953 Removing guards reduces unintentional build breakage.
955 No new tests, no behavior chagne.
961 * WebCore.vcproj/WebCore.vcproj:
962 * WebCore.xcodeproj/project.pbxproj:
963 * editing/CorrectionPanelInfo.h: Removed.
964 * editing/EditingAllInOne.cpp:
965 * editing/Editor.cpp:
966 (WebCore::Editor::respondToChangedSelection):
967 (WebCore::Editor::respondToChangedContents):
968 (WebCore::Editor::appliedEditing):
969 (WebCore::Editor::Editor):
970 (WebCore::Editor::~Editor):
971 (WebCore::Editor::insertTextWithoutSendingTextEvent):
972 (WebCore::Editor::insertLineBreak):
973 (WebCore::Editor::insertParagraphSeparator):
974 (WebCore::Editor::cut):
975 (WebCore::Editor::paste):
976 (WebCore::Editor::pasteAsPlainText):
977 (WebCore::Editor::isAutomaticSpellingCorrectionEnabled):
978 (WebCore::Editor::markMisspellingsAfterTypingToWord):
979 (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
980 (WebCore::Editor::changeBackToReplacedString):
981 (WebCore::Editor::unappliedSpellCorrection):
982 (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
983 (WebCore::Editor::startCorrectionPanelTimer):
984 (WebCore::Editor::handleCorrectionPanelResult):
985 (WebCore::Editor::dismissCorrectionPanelAsIgnored):
987 * editing/SpellingCorrectionCommand.cpp:
988 * editing/SpellingCorrectionController.cpp: Added.
989 (WebCore::markerTypesForAutocorrection):
990 (WebCore::markerTypesForReplacement):
991 (WebCore::markersHaveIdenticalDescription):
992 (WebCore::SpellingCorrectionController::SpellingCorrectionController):
993 (WebCore::SpellingCorrectionController::~SpellingCorrectionController):
994 (WebCore::SpellingCorrectionController::startCorrectionPanelTimer):
995 (WebCore::SpellingCorrectionController::stopCorrectionPanelTimer):
996 (WebCore::SpellingCorrectionController::stopPendingCorrection):
997 (WebCore::SpellingCorrectionController::applyPendingCorrection):
998 (WebCore::SpellingCorrectionController::hasPendingCorrection):
999 (WebCore::SpellingCorrectionController::isSpellingMarkerAllowed):
1000 (WebCore::SpellingCorrectionController::show):
1001 (WebCore::SpellingCorrectionController::handleCancelOperation):
1002 (WebCore::SpellingCorrectionController::dismiss):
1003 (WebCore::SpellingCorrectionController::dismissSoon):
1004 (WebCore::SpellingCorrectionController::applyCorrectionPanelInfo):
1005 (WebCore::SpellingCorrectionController::applyAutocorrectionBeforeTypingIfAppropriate):
1006 (WebCore::SpellingCorrectionController::respondToUnappliedSpellCorrection):
1007 (WebCore::SpellingCorrectionController::correctionPanelTimerFired):
1008 (WebCore::SpellingCorrectionController::handleCorrectionPanelResult):
1009 (WebCore::SpellingCorrectionController::isAutomaticSpellingCorrectionEnabled):
1010 (WebCore::SpellingCorrectionController::windowRectForRange):
1011 (WebCore::SpellingCorrectionController::respondToChangedSelection):
1012 (WebCore::SpellingCorrectionController::respondToAppliedEditing):
1013 (WebCore::SpellingCorrectionController::client):
1014 (WebCore::SpellingCorrectionController::textChecker):
1015 (WebCore::SpellingCorrectionController::recordAutocorrectionResponseReversed):
1016 (WebCore::SpellingCorrectionController::markReversed):
1017 (WebCore::SpellingCorrectionController::markCorrection):
1018 (WebCore::SpellingCorrectionController::recordSpellcheckerResponseForModifiedCorrection):
1019 * editing/SpellingCorrectionController.h: Added.
1020 (WebCore::SpellingCorrectionController::UNLESS_ENABLED):
1021 (WebCore::SpellingCorrectionController::shouldStartTimeFor):
1022 (WebCore::SpellingCorrectionController::shouldRemoveMarkersUponEditing):
1023 * editing/TypingCommand.cpp:
1024 (WebCore::TypingCommand::insertText):
1025 (WebCore::TypingCommand::markMisspellingsAfterTyping):
1026 (WebCore::TypingCommand::deleteKeyPressed):
1027 (WebCore::TypingCommand::forwardDeleteKeyPressed):
1028 * editing/htmlediting.h:
1029 (WebCore::isAmbiguousBoundaryCharacter):
1030 * page/EditorClient.h:
1032 (WebCore::Frame::setPageAndTextZoomFactors):
1034 2011-04-08 Alpha Lam <hclam@chromium.org>
1036 Unreviewed, rolling out r83335.
1037 http://trac.webkit.org/changeset/83335
1038 https://bugs.webkit.org/show_bug.cgi?id=53556
1040 GTK and QT bots are broken
1043 * Configurations/FeatureDefines.xcconfig:
1044 * DerivedSources.make:
1047 * WebCore.xcodeproj/project.pbxproj:
1049 * html/HTMLAttributeNames.in:
1050 * html/HTMLTagNames.in:
1051 * html/HTMLTrackElement.cpp: Removed.
1052 * html/HTMLTrackElement.h: Removed.
1053 * html/HTMLTrackElement.idl: Removed.
1055 2011-04-08 Brady Eidson <beidson@apple.com>
1057 Reviewed by Adam Roben.
1059 https://bugs.webkit.org/show_bug.cgi?id=58155 and part of <rdar://problem/9251767>
1060 BitmapImage::getFirstCGImageRefOfSize fails if the frameCount hasn't been initialized from the image source.
1062 * platform/graphics/cg/ImageCG.cpp:
1063 (WebCore::BitmapImage::getFirstCGImageRefOfSize): Call frameCount() instead of accessing m_frames.size() to
1064 make sure the frames are properly tallied first.
1066 2011-04-08 Benjamin Poulain <benjamin.poulain@nokia.com>
1068 Reviewed by Andreas Kling.
1070 [Qt] Dragging and dropping an image in edit mode does not work
1071 https://bugs.webkit.org/show_bug.cgi?id=19385
1073 When adding an image to the clipboard, we should also include the HTML code of that image so
1074 it can be used for internal drag and drop.
1076 This HTML is expected by all clients of drop events so a fragment can be moved from one browser to
1077 another, or inside the same browser.
1079 * platform/qt/ClipboardQt.cpp:
1080 (WebCore::ClipboardQt::declareAndWriteDragImage):
1082 2011-04-07 Anna Cavender <annacc@chromium.org>
1084 Reviewed by Eric Carlson.
1086 Setup ENABLE(TRACK) feature define + initial HTMLTrackElement
1087 https://bugs.webkit.org/show_bug.cgi?id=53556
1089 No new tests. No real functionality added just yet.
1092 * Configurations/FeatureDefines.xcconfig:
1093 * DerivedSources.make:
1096 * WebCore.xcodeproj/project.pbxproj:
1098 * html/HTMLAttributeNames.in:
1099 * html/HTMLTagNames.in:
1100 * html/HTMLTrackElement.cpp: Added.
1101 (WebCore::HTMLTrackElement::HTMLTrackElement):
1102 (WebCore::HTMLTrackElement::create):
1103 (WebCore::HTMLTrackElement::insertedIntoTree):
1104 (WebCore::HTMLTrackElement::willRemove):
1105 (WebCore::HTMLTrackElement::src):
1106 (WebCore::HTMLTrackElement::setSrc):
1107 (WebCore::HTMLTrackElement::kind):
1108 (WebCore::HTMLTrackElement::setKind):
1109 (WebCore::HTMLTrackElement::srclang):
1110 (WebCore::HTMLTrackElement::setSrclang):
1111 (WebCore::HTMLTrackElement::label):
1112 (WebCore::HTMLTrackElement::setLabel):
1113 (WebCore::HTMLTrackElement::isDefault):
1114 (WebCore::HTMLTrackElement::setIsDefault):
1115 (WebCore::HTMLTrackElement::isURLAttribute):
1116 * html/HTMLTrackElement.h: Added.
1117 * html/HTMLTrackElement.idl: Added.
1119 2011-04-07 Jer Noble <jer.noble@apple.com>
1121 Reviewed by Eric Carlson.
1123 Logic error in HTMLMediaElement::exitFullscreen()
1124 https://bugs.webkit.org/show_bug.cgi?id=58085
1126 The new full screen API case could fall through to the legacy API case
1127 unintentionally if a script calls exitFullscreen on an element which is
1128 not the current full screen element.
1130 * html/HTMLMediaElement.cpp:
1131 (WebCore::HTMLMediaElement::enterFullscreen):
1132 (WebCore::HTMLMediaElement::exitFullscreen):
1134 2011-04-08 Mike Reed <reed@google.com>
1136 Reviewed by Eric Seidel.
1138 Replace SKIA_TEXT with isNativeFontRenderingAllowed() for print-preview to work
1139 https://bugs.webkit.org/show_bug.cgi?id=57782
1141 No new tests. This change only affects print-preview and build option SKIA_GPU
1143 * platform/graphics/skia/SkiaFontWin.cpp:
1144 (WebCore::paintSkiaText):
1146 2011-04-08 Ryosuke Niwa <rniwa@webkit.org>
1148 Reviewed by Tony Chang, Darin Adler, and Enrica Casucci.
1150 REGRESSION(r81887): Crash in SplitElement
1151 https://bugs.webkit.org/show_bug.cgi?id=57743
1153 The crash was caused by ReplaceSelectionCommand::doApply's calling splitElement with computeNodeAfterPosition
1154 even when the position was after the last node in it container. Since all we are doing here is to splitting tree
1155 up until the highest ancestor with isInlineNodeWithStyle, replaced the while loop by calls to splitTreeToNode
1156 and highestEnclosingNodeOfType.
1158 Also fixed a bug in splitTreeToNode not to check the difference in visible position when splitting the ancestor,
1159 which would have introduced unnecessary nodes when splitting tree and a bug in highestEnclosingNodeOfType that
1160 it incorrectly called deprecatedNode instead of containerNode.
1162 Test: editing/inserting/insert-images-in-pre-x-crash.html
1164 * editing/CompositeEditCommand.cpp:
1165 (WebCore::CompositeEditCommand::splitTreeToNode):
1166 * editing/ReplaceSelectionCommand.cpp:
1167 (WebCore::ReplaceSelectionCommand::doApply):
1168 * editing/htmlediting.cpp:
1169 (WebCore::highestEnclosingNodeOfType):
1171 2011-04-08 Antti Koivisto <antti@apple.com>
1173 Reviewed by Tony Gentilcore.
1175 Incoming source should be preload scanned when the parser is blocked
1176 https://bugs.webkit.org/show_bug.cgi?id=58117
1178 Scan the appended source if parser is blocked.
1180 Test: http/tests/loading/preload-append-scan.php
1182 * html/parser/HTMLDocumentParser.cpp:
1183 (WebCore::HTMLDocumentParser::append):
1185 2011-04-08 Martin Robinson <mrobinson@igalia.com>
1187 Reviewed by Xan Lopez.
1189 [GTK] Fix the WebKit2 build for older versions of GTK+
1190 https://bugs.webkit.org/show_bug.cgi?id=58095
1192 No new tests. This is just a build fix.
1194 * platform/gtk/GtkVersioning.c:
1195 (gdk_window_create_similar_surface): Reimplement this method for older versions of GDK.
1196 * platform/gtk/GtkVersioning.h: Add the new method to the header.
1198 2011-04-08 Misha Tyutyunik <michael.tyutyunik@nokia.com>
1200 Reviewed by Laszlo Gombos.
1202 [Qt] Plugin is not scrolled together with page content or jumping
1203 when content is rendered using cache (backing store).
1204 https://bugs.webkit.org/show_bug.cgi?id=56130
1206 This is a Symbian portion of the fix. For Linux it looks like
1207 it's enough to call set geometry which should be addressed in
1208 https://bugs.webkit.org/show_bug.cgi?id=57179
1210 No new tests required. This can be tested with manual tests from
1211 WebCore/manual-tests/qt and WebCore/manual-tests/plugins
1213 * plugins/symbian/PluginViewSymbian.cpp:
1214 (WebCore::PluginView::updatePluginWidget):
1216 2011-04-08 Abhishek Arya <inferno@chromium.org>
1218 Unreviewed. Remove accidental printf added in r83306.
1220 * page/EventHandler.cpp:
1221 (WebCore::EventHandler::sendContextMenuEvent):
1223 2011-04-08 Enrica Casucci <enrica@apple.com>
1225 Reviewed by Darin Adler.
1227 Dragging text in a WebKit2 window results in a copy instead of a move.
1228 https://bugs.webkit.org/show_bug.cgi?id=56772
1229 <rdar://problem/9165140>
1231 cleanupAfterSystemDrag cannot call dragEnd in WebKit2, since
1232 the call to startDrag is asynchronous.
1234 * page/mac/DragControllerMac.mm:
1235 (WebCore::DragController::cleanupAfterSystemDrag):
1237 2011-04-05 Dimitri Glazkov <dglazkov@chromium.org>
1239 Reviewed by Darin Adler.
1241 Move WheelEvent-dispatching logic into WheelEventDispatchMediator.
1242 https://bugs.webkit.org/show_bug.cgi?id=57642
1244 Covered by existing tests, no functional change.
1248 (WebCore::EventDispatchMediator::EventDispatchMediator): Added default
1250 (WebCore::EventDispatchMediator::event): Inlined.
1251 (WebCore::EventDispatchMediator::setEvent): Added.
1252 * dom/EventDispatcher.cpp: Removed dispatchWheelEvent.
1253 * dom/EventDispatcher.h: Updated decls.
1255 (WebCore::Node::dispatchWheelEvent): Changed to use the mediator and
1256 return a bool, like other dispatch event functions.
1257 * dom/Node.h: Changed decl.
1258 * dom/WheelEvent.cpp:
1259 (WebCore::granularity): Moved from EventDispatcher.
1260 (WebCore::WheelEventDispatchMediator::WheelEventDisatchMediator): Added.
1261 (WebCore::WheelEventDispatchMediator::event): Added.
1262 (WebCore::WheelEventDispatchMediator::dispatchEvent): Added.
1263 * dom/WheelEvent.h: Updated decls.
1264 * page/EventHandler.cpp:
1265 (WebCore::EventHandler::handleWheelEvent): Changed to receive and react
1266 to the return value.
1268 2011-04-08 Jessie Berlin <jberlin@apple.com>
1270 Windows build warning fix.
1272 * WebCore.vcproj/WebCore.vcproj:
1273 Since ShadowRoot.cpp is included in the DOMAllInOne.cpp file, it should be excluded from
1276 2011-04-07 Pavel Podivilov <podivilov@chromium.org>
1278 Reviewed by Pavel Feldman.
1280 Web Inspector: update breakpoints according to source frame decorations after live edit.
1281 https://bugs.webkit.org/show_bug.cgi?id=58029
1283 * inspector/front-end/DebuggerPresentationModel.js:
1284 (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didEditScriptSource):
1285 (WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
1286 (WebInspector.DebuggerPresentationModel.prototype._updateResourceContent.didEditScriptSource):
1287 (WebInspector.DebuggerPresentationModel.prototype._updateResourceContent):
1288 * inspector/front-end/SourceFile.js:
1289 (WebInspector.SourceFile.prototype.set content):
1290 * inspector/front-end/SourceFrame.js:
1291 (WebInspector.SourceFrame.prototype._handleSave.didEditScriptSource):
1292 (WebInspector.SourceFrame.prototype._handleSave):
1294 2011-04-08 Pavel Podivilov <podivilov@chromium.org>
1296 Reviewed by Pavel Feldman.
1298 Web Inspector: fix scripts concatenation in scripts panel.
1299 https://bugs.webkit.org/show_bug.cgi?id=58138
1301 When there is just one script starting at 0:0 it should not be surrounded by <script> framing.
1303 * inspector/front-end/SourceFile.js:
1304 (WebInspector.SourceFile.prototype._loadResourceContent):
1305 (WebInspector.SourceFile.prototype._loadAndConcatenateScriptsContent):
1307 2011-04-08 Pavel Feldman <pfeldman@chromium.org>
1309 Reviewed by Yury Semikhatsky.
1311 Web Inspector: use "locations" for debugger scripts, "lineNumbers" for the UI elements.
1312 https://bugs.webkit.org/show_bug.cgi?id=58118
1314 This change reuses location for call frames in the protocol + structures script
1315 location <-> source lines interaction better. When we need UI columns, we will add
1316 them, but we should distinguish between script and UI terms on the type level, not naming.
1318 * English.lproj/localizedStrings.js:
1319 * bindings/v8/DebuggerScript.js:
1320 * inspector/InjectedScriptSource.js:
1321 * inspector/Inspector.json:
1322 * inspector/front-end/CallStackSidebarPane.js:
1323 (WebInspector.CallStackSidebarPane.prototype.update.didGetSourceLine):
1324 (WebInspector.CallStackSidebarPane.prototype.update):
1325 * inspector/front-end/DebuggerPresentationModel.js:
1326 (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage.didRequestSourceMapping):
1327 (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage):
1328 (WebInspector.DebuggerPresentationModel.prototype.continueToLine):
1329 (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
1330 (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
1331 (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
1332 (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
1333 (WebInspector.PresenationCallFrame):
1334 (WebInspector.PresenationCallFrame.prototype.sourceLine.didRequestSourceMapping):
1335 (WebInspector.PresenationCallFrame.prototype.sourceLine):
1336 * inspector/front-end/ScriptFormatter.js:
1337 (WebInspector.ScriptFormatter.locationToPosition):
1338 (WebInspector.ScriptFormatter.lineToPosition):
1339 * inspector/front-end/ScriptsPanel.js:
1340 (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation):
1341 (WebInspector.ScriptsPanel.prototype._debuggerPaused):
1342 (WebInspector.ScriptsPanel.prototype.showAnchorLocation):
1343 (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation):
1344 (WebInspector.ScriptsPanel.prototype._callFrameSelected):
1345 * inspector/front-end/SourceFile.js:
1346 (WebInspector.SourceMapping.prototype.scriptLocationToSourceLine):
1347 (WebInspector.SourceMapping.prototype.sourceLineToScriptLocation):
1348 (WebInspector.FormattedSourceMapping.prototype.scriptLocationToSourceLine):
1349 (WebInspector.FormattedSourceMapping.prototype.sourceLineToScriptLocation):
1351 2011-04-08 Pavel Podivilov <podivilov@chromium.org>
1353 Reviewed by Pavel Feldman.
1355 Web Inspector: distinguish breakpoints set on de-obfuscated sources from breakponts set on original sources.
1356 https://bugs.webkit.org/show_bug.cgi?id=58133
1358 * inspector/front-end/DebuggerPresentationModel.js:
1359 (WebInspector.DebuggerPresentationModel.prototype.canEditScriptSource):
1360 (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
1361 (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
1362 (WebInspector.DebuggerPresentationModel.prototype._sourceFileForScript):
1363 (WebInspector.DebuggerPresentationModel.prototype._scriptForSourceFileId):
1364 (WebInspector.DebuggerPresentationModel.prototype._createSourceFileId):
1365 (WebInspector.DebuggerPresentationModel.prototype._reset):
1367 2011-04-07 Pavel Podivilov <podivilov@chromium.org>
1369 Reviewed by Pavel Feldman.
1371 Web Inspector: make SourceFrame TextViewer's delegate for editing operations.
1372 https://bugs.webkit.org/show_bug.cgi?id=58026
1374 This is the first step of decoupling TextViewer from SourceFrame.
1376 * inspector/front-end/SourceFrame.js:
1377 (WebInspector.SourceFrame):
1378 (WebInspector.SourceFrame.prototype.show):
1379 (WebInspector.SourceFrame.prototype.hide):
1380 (WebInspector.SourceFrame.prototype._ensureContentLoaded):
1381 (WebInspector.SourceFrame.prototype.contentEditable):
1382 (WebInspector.SourceFrame.prototype.startEditing):
1383 (WebInspector.SourceFrame.prototype.endEditing):
1384 (WebInspector.SourceFrame.prototype._createTextViewer):
1385 (WebInspector.SourceFrame.prototype._handleSave):
1386 (WebInspector.SourceFrame.prototype._handleRevertEditing):
1387 * inspector/front-end/TextViewer.js:
1388 (WebInspector.TextViewer.prototype._enterInternalTextChangeMode):
1389 (WebInspector.TextViewer.prototype._exitInternalTextChangeMode):
1390 (WebInspector.TextViewer.prototype._syncDecorationsForLine):
1391 (WebInspector.TextViewer.prototype._doubleClick):
1392 (WebInspector.TextViewerDelegate):
1393 (WebInspector.TextViewerDelegate.prototype.contentEditable):
1394 (WebInspector.TextViewerDelegate.prototype.startEditing):
1395 (WebInspector.TextViewerDelegate.prototype.endEditing):
1396 (WebInspector.TextEditorMainPanel.prototype._paintScheduledLines):
1397 (WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
1398 * inspector/front-end/inspector.html:
1400 2011-04-08 Leandro Gracia Gil <leandrogracia@chromium.org>
1402 Reviewed by Steve Block.
1404 Media Stream API: add the getUserMedia method and the Javascript bindings.
1405 https://bugs.webkit.org/show_bug.cgi?id=56586
1407 Add the getUserMedia method to the navigator and its new Javascript types.
1408 Current specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#video-conferencing-and-peer-to-peer-communication
1410 Tests: fast/dom/MediaStream/argument-types.html
1411 fast/dom/MediaStream/enabled.html
1412 fast/dom/MediaStream/no-interface-object.html
1414 * Android.derived.jscbindings.mk:
1415 * Android.derived.v8bindings.mk:
1416 * Android.v8bindings.mk:
1418 * CodeGenerators.pri:
1419 * DerivedSources.cpp:
1420 * DerivedSources.make:
1421 * GNUmakefile.list.am:
1424 * WebCore.vcproj/WebCore.vcproj:
1425 * WebCore.xcodeproj/project.pbxproj:
1426 * bindings/js/JSNavigatorCustom.cpp:
1427 (WebCore::JSNavigator::webkitGetUserMedia):
1428 * bindings/v8/custom/V8NavigatorCustom.cpp: Added.
1429 (WebCore::V8Navigator::webkitGetUserMediaCallback):
1430 * page/Navigator.cpp:
1431 (WebCore::Navigator::webkitGetUserMedia):
1433 * page/Navigator.idl:
1434 * page/NavigatorUserMediaError.h: Added.
1435 (WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
1436 (WebCore::NavigatorUserMediaError::~NavigatorUserMediaError):
1437 (WebCore::NavigatorUserMediaError::code):
1438 * page/NavigatorUserMediaError.idl: Added.
1439 * page/NavigatorUserMediaErrorCallback.h: Added.
1440 (WebCore::NavigatorUserMediaErrorCallback::~NavigatorUserMediaErrorCallback):
1441 * page/NavigatorUserMediaErrorCallback.idl: Added.
1442 * page/NavigatorUserMediaSuccessCallback.h: Added.
1443 (WebCore::NavigatorUserMediaSuccessCallback::~NavigatorUserMediaSuccessCallback):
1444 * page/NavigatorUserMediaSuccessCallback.idl: Added.
1446 2011-04-08 Mikhail Naganov <mnaganov@chromium.org>
1448 Reviewed by Pavel Feldman.
1450 Web Inspector: [Chromium] Add more tests for detailed heap snapshots UI.
1451 https://bugs.webkit.org/show_bug.cgi?id=58010
1452 https://bugs.webkit.org/show_bug.cgi?id=58011
1454 Added tests for "Containment" view. Minor refactorings, bugs fixed.
1455 Split one large tests into smaller ones to avoid timing out in debug mode.
1457 Tests: inspector/profiler/detailed-heapshots-containment-expansion-preserved-when-sorting.html
1458 inspector/profiler/detailed-heapshots-containment-show-all.html
1459 inspector/profiler/detailed-heapshots-containment-show-next.html
1460 inspector/profiler/detailed-heapshots-containment-sorting.html
1461 inspector/profiler/detailed-heapshots-summary-expansion-preserved-when-sorting.html
1462 inspector/profiler/detailed-heapshots-summary-show-all.html
1463 inspector/profiler/detailed-heapshots-summary-show-next.html
1464 inspector/profiler/detailed-heapshots-summary-sorting.html
1466 * inspector/front-end/DetailedHeapshotGridNodes.js:
1467 (WebInspector.HeapSnapshotGridNode):
1468 (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
1469 (WebInspector.HeapSnapshotGridNode.prototype.sort.doSort):
1470 (WebInspector.HeapSnapshotGridNode.prototype.sort):
1471 (WebInspector.HeapSnapshotGenericObjectNode):
1472 (WebInspector.HeapSnapshotObjectNode):
1473 (WebInspector.HeapSnapshotInstanceNode):
1474 (WebInspector.HeapSnapshotConstructorNode):
1475 (WebInspector.HeapSnapshotDiffNode):
1476 (WebInspector.HeapSnapshotDominatorObjectNode):
1477 * inspector/front-end/DetailedHeapshotView.js:
1478 (WebInspector.HeapSnapshotContainmentDataGrid):
1479 (WebInspector.HeapSnapshotDominatorsDataGrid):
1481 2011-04-08 Andrey Adaikin <aandrey@google.com>
1483 Reviewed by Pavel Feldman.
1485 Web Inspector: Bugs in some corner cases in the text editor
1486 https://bugs.webkit.org/show_bug.cgi?id=58025
1488 This solves the following bugs:
1489 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.
1490 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.
1492 * inspector/front-end/TextViewer.js:
1493 (WebInspector.TextEditorMainPanel.prototype._selectionToPosition):
1494 (WebInspector.TextEditorMainPanel.prototype._enclosingLineRowOrSelf):
1495 (WebInspector.TextEditorMainPanel.prototype._handleDOMUpdates):
1496 (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
1497 (WebInspector.TextEditorMainPanel.prototype._collectLinesFromDiv):
1499 2011-04-07 Pavel Podivilov <podivilov@chromium.org>
1501 Reviewed by Pavel Feldman.
1503 Web Inspector: add test for script formatter worker.
1504 https://bugs.webkit.org/show_bug.cgi?id=57447
1506 Test: inspector/debugger/script-formatter.html
1509 * WebCore.xcodeproj/project.pbxproj:
1510 * gyp/streamline-inspector-source.sh:
1511 * inspector/front-end/DebuggerPresentationModel.js:
1512 (WebInspector.DebuggerPresentationModel.prototype._addScript):
1513 (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
1514 (WebInspector.DebuggerPresentationModel.prototype._formatter):
1515 * inspector/front-end/ScriptFormatterWorker.js:
1517 2011-04-08 Andrey Adaikin <aandrey@google.com>
1519 Reviewed by Pavel Feldman.
1521 Web Inspector: Tweak dynamically constants for the async highlighting in text editor
1522 https://bugs.webkit.org/show_bug.cgi?id=58035
1524 * inspector/front-end/TextViewer.js:
1525 (WebInspector.TextEditorMainPanel.prototype._expandChunks):
1526 (WebInspector.TextEditorMainPanel.prototype._schedulePaintLines):
1527 (WebInspector.TextEditorMainPanel.prototype._paintScheduledLines):
1528 (WebInspector.TextEditorMainPanel.prototype._restorePaintLinesOperationsCredit):
1529 (WebInspector.TextEditorMainPanel.prototype._adjustPaintLinesOperationsRefreshValue):
1531 2011-04-08 Andrey Kosyakov <caseq@chromium.org>
1533 Reviewed by Yury Semikhatsky.
1535 Web Inspector: HAR compliance fixes
1536 https://bugs.webkit.org/show_bug.cgi?id=58124
1538 - Always provide some values for queryString and cookies, even though arrays may be empty
1539 - Always provide an empty cache object
1540 - Added entire HARLog to test
1541 - Workaround in test to avoid custom expectations (favicon.ico appears in log on certain platforms)
1543 * inspector/front-end/HAREntry.js:
1544 (WebInspector.HAREntry.prototype.build):
1545 (WebInspector.HAREntry.prototype._buildRequest):
1546 (WebInspector.HAREntry.prototype._buildResponse):
1548 2011-04-08 Adam Barth <abarth@webkit.org>
1550 Attempt to fix the Qt build.
1552 * css/CSSStyleApplyProperty.cpp:
1554 2011-04-07 Adam Barth <abarth@webkit.org>
1556 Reviewed by Eric Seidel.
1558 Refactor WebCore/GNUMakefile.am to separate list of files
1559 https://bugs.webkit.org/show_bug.cgi?id=58116
1561 This change is similar to the cooresponding to change to
1562 JavaScriptCore. We hope to generate GNUmakefile.list.am automatically
1566 * GNUmakefile.list.am: Added.
1568 2011-04-07 Geoffrey Garen <ggaren@apple.com>
1572 Rolled out some accidentally-committed changes in my last commit.
1574 * dom/EventTarget.cpp:
1575 (WebCore::EventTarget::addEventListener):
1576 (WebCore::EventTarget::removeEventListener):
1577 * dom/EventTarget.h:
1579 2011-04-07 Julien Chaffraix <jchaffraix@codeaurora.org>
1581 Reviewed by Alexey Proskuryakov.
1583 EventSource should only accept UTF-8 charset
1584 https://bugs.webkit.org/show_bug.cgi?id=56942
1586 Following the discussion on bug 45372, this change implements the recommended
1587 way of handling "charset". We only accept UTF-8 but no other encoding. This matches
1588 the encoding of the EventSource and also may fix TomCat that automatically send this
1591 * page/EventSource.cpp:
1592 (WebCore::EventSource::didReceiveResponse): We now check the charset attribute and if it is
1593 not UTF-8, abort the connection and log the error to the console. Also we log if the MIME type
1594 is wrong to the console to help debugging (only in the case of an HTTP 200 response though).
1596 2011-04-07 Geoffrey Garen <ggaren@apple.com>
1598 Reviewed by Maciej Stachowiak.
1600 Some Handle<T> cleanup
1601 https://bugs.webkit.org/show_bug.cgi?id=58109
1603 * bindings/js/ScriptValue.h:
1604 (WebCore::ScriptValue::ScriptValue): Updated for new null constructor.
1605 (WebCore::ScriptValue::hasNoValue): Updated for removal of isEmpty().
1607 2011-04-07 Dominic Cooney <dominicc@google.com>
1609 Reviewed by Dimitri Glazkov.
1611 Let shadow DOM have a list of nodes at the top level of a shadow.
1612 https://bugs.webkit.org/show_bug.cgi?id=57813
1614 Adds ShadowRoot, a list of nodes, to be a parent for top-level
1615 shadow children. Forwards rendering through the root and into the
1618 Covered by existing tests of elements that use this style of shadow.
1620 * Android.mk: add ShadowRoot.h/cpp
1626 * WebCore.vcproj/WebCore.vcproj:
1627 * WebCore.xcodeproj/project.pbxproj:
1628 * css/CSSStyleSelector.cpp:
1629 (WebCore::CSSStyleSelector::initForStyleResolve): proxy style to host
1630 * dom/ContainerNode.cpp: parent nodes that are shadow roots are alive
1631 (WebCore::ContainerNode::insertBefore):
1632 (WebCore::ContainerNode::replaceChild):
1633 (WebCore::ContainerNode::removeChild):
1634 (WebCore::ContainerNode::appendChild):
1635 * dom/DocumentFragment.cpp:
1636 (WebCore::DocumentFragment::DocumentFragment):
1637 * dom/DocumentFragment.h:
1639 (WebCore::Element::recalcStyle): look through ShadowRoots for host's style
1640 (WebCore::Element::shadowRoot): should be const
1641 (WebCore::Element::ensureShadowRoot): simpler than setShadowRoot
1643 * dom/ElementRareData.h:
1645 (WebCore::Node::parentNodeForRenderingAndStyle): indirection so
1646 ShadowRoot can forward to the host's renderer
1647 (WebCore::Node::createRendererAndStyle):
1648 (WebCore::Node::createRendererIfNeeded):
1650 (WebCore::Node::isShadowBoundary): temporary, to differentiate
1651 old- and new-style, until all roots are ShadowRoot instances
1652 * dom/ShadowRoot.cpp: Added.
1653 (WebCore::ShadowRoot::ShadowRoot):
1654 (WebCore::ShadowRoot::recalcStyle): forward recalc to children
1655 * dom/ShadowRoot.h: Added.
1656 (WebCore::ShadowRoot::isShadowBoundary):
1657 (WebCore::ShadowRoot::create):
1658 * html/HTMLKeygenElement.cpp: use ensureShadowRoot
1659 (WebCore::HTMLKeygenElement::HTMLKeygenElement):
1660 (WebCore::HTMLKeygenElement::parseMappedAttribute):
1661 (WebCore::HTMLKeygenElement::appendFormData):
1662 (WebCore::HTMLKeygenElement::reset):
1663 (WebCore::HTMLKeygenElement::shadowSelect):
1664 * html/HTMLKeygenElement.h:
1665 * html/HTMLMeterElement.cpp: use ensureShadowRoot
1666 (WebCore::HTMLMeterElement::createShadowSubtree):
1667 * html/HTMLProgressElement.cpp: use ensureShadowRoot
1668 (WebCore::HTMLProgressElement::createShadowSubtree):
1669 * html/InputType.cpp: use ensureShadowRoot
1670 (WebCore::InputType::destroyShadowSubtree):
1671 * html/RangeInputType.cpp: use ensureShadowRoot
1672 (WebCore::RangeInputType::handleMouseDownEvent):
1673 (WebCore::RangeInputType::createShadowSubtree):
1674 (WebCore::RangeInputType::valueChanged):
1675 (WebCore::RangeInputType::shadowSliderThumb):
1676 * html/RangeInputType.h:
1677 * html/ValidationMessage.cpp: use ensureShadowRoot
1678 (WebCore::ValidationMessage::buildBubbleTree):
1679 (WebCore::ValidationMessage::deleteBubbleTree):
1680 * html/shadow/SliderThumbElement.cpp:
1681 (WebCore::SliderThumbElement::setPositionFromPoint):
1682 (WebCore::SliderThumbElement::hostInput):
1683 * html/shadow/SliderThumbElement.h:
1684 * rendering/MediaControlElements.cpp: use ensureShadowRoot
1685 (WebCore::MediaControlInputElement::attach):
1686 (WebCore::MediaControlInputElement::updateStyle):
1687 * rendering/RenderSlider.cpp: use ensureShadowRoot
1688 (WebCore::RenderSlider::thumbRect):
1689 (WebCore::RenderSlider::layout):
1690 (WebCore::RenderSlider::shadowSliderThumb):
1691 (WebCore::RenderSlider::inDragMode):
1692 * rendering/RenderSlider.h:
1694 2011-04-07 Maciej Stachowiak <mjs@apple.com>
1696 Reviewed by Simon Fraser.
1698 REGRESSION (r80871): Crash when visiting http://broadband.biglobe.ne.jp/
1699 https://bugs.webkit.org/show_bug.cgi?id=56297
1700 <rdar://problem/9131597>
1702 Test: fast/css-generated-content/table-row-after-no-crash.html
1704 * rendering/RenderTableRow.cpp:
1705 (WebCore::RenderTableRow::styleDidChange): Factor out generation of before/after
1706 content, and only do it if the row already has a parent. For construction of
1707 anonymous cells to work correctly, the row needs to already have a parent, so
1708 in that case wait a bit.
1709 (WebCore::RenderTableRow::updateBeforeAndAfterContent): Factored out to here.
1710 * rendering/RenderTableRow.h:
1711 * rendering/RenderTableSection.cpp:
1712 (WebCore::RenderTableSection::addChild): When adding a row, update its
1713 before/after content, in case it had any.
1715 2011-04-07 Beth Dakin <bdakin@apple.com>
1717 Reviewed by Simon Fraser.
1719 Probable fix for <rdar://problem/9251443> Crashing on exception: -
1720 [ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]: unrecognized
1721 selector sent to instance ADDRESS.
1723 Need to implement new delegate method.
1724 * platform/mac/ScrollAnimatorMac.mm:
1725 (-[ScrollAnimationHelperDelegate _pixelAlignProposedScrollPosition:]):
1727 2011-04-07 Ian Henderson <ianh@apple.com>
1729 Reviewed by Simon Fraser.
1731 Optimize filling rounded rects that are actually ellipses
1732 https://bugs.webkit.org/show_bug.cgi?id=58098
1734 In CG, drawing an ellipse directly is faster than constructing and
1735 filling a rounded rect path. Detect when the given rounded rect is
1736 actually an ellipse and draw it directly in this case.
1738 * platform/graphics/cg/GraphicsContextCG.cpp:
1739 (WebCore::GraphicsContext::fillRoundedRect):
1741 2011-04-07 Ned Holbrook <nholbrook@apple.com>
1743 Reviewed by Dan Bernstein.
1745 CTLine objects should outlive their CTRuns
1746 https://bugs.webkit.org/show_bug.cgi?id=58063
1748 * platform/graphics/mac/ComplexTextController.h: Add m_coreTextLines, to be destroyed after m_complexTextRuns.
1749 * platform/graphics/mac/ComplexTextControllerCoreText.cpp:
1750 (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Moot m_coreTextRun.
1751 (WebCore::ComplexTextController::collectComplexTextRunsForCharactersCoreText): Append line to m_coreTextLines.
1753 2011-04-07 Nat Duca <nduca@chromium.org>
1755 Reviewed by David Levin.
1757 [chromium] Compositor thread infrastructure
1758 https://bugs.webkit.org/show_bug.cgi?id=56131
1760 Introduce chrome compositor thread and related
1764 * platform/graphics/chromium/cc/CCMainThread.cpp: Added.
1765 (WebCore::CCMainThread::performTask):
1766 (WebCore::CCMainThread::postTask):
1767 * platform/graphics/chromium/cc/CCMainThread.h: Added.
1768 (WebCore::CCMainThread::Task::~Task):
1769 (WebCore::CCMainThread::Task::instance):
1770 (WebCore::CCMainThread::Task::Task):
1771 * platform/graphics/chromium/cc/CCMainThreadTask.h: Added.
1772 (WebCore::MainThreadTask0::create):
1773 (WebCore::MainThreadTask0::MainThreadTask0):
1774 (WebCore::MainThreadTask0::performTask):
1775 (WebCore::MainThreadTask1::create):
1776 (WebCore::MainThreadTask1::MainThreadTask1):
1777 (WebCore::MainThreadTask1::performTask):
1778 (WebCore::MainThreadTask2::create):
1779 (WebCore::MainThreadTask2::MainThreadTask2):
1780 (WebCore::MainThreadTask2::performTask):
1781 (WebCore::MainThreadTask3::create):
1782 (WebCore::MainThreadTask3::MainThreadTask3):
1783 (WebCore::MainThreadTask3::performTask):
1784 (WebCore::createMainThreadTask):
1785 * platform/graphics/chromium/cc/CCThread.cpp: Added.
1786 (WebCore::CCThread::create):
1787 (WebCore::CCThread::CCThread):
1788 (WebCore::CCThread::~CCThread):
1789 (WebCore::CCThread::postTask):
1790 (WebCore::CCThread::compositorThreadStart):
1791 (WebCore::CCThread::runLoop):
1792 * platform/graphics/chromium/cc/CCThread.h: Added.
1793 (WebCore::CCThread::Task::~Task):
1794 (WebCore::CCThread::Task::instance):
1795 (WebCore::CCThread::Task::Task):
1796 (WebCore::CCThread::threadID):
1797 (WebCore::CCCompletionEvent::CCCompletionEvent):
1798 (WebCore::CCCompletionEvent::~CCCompletionEvent):
1799 (WebCore::CCCompletionEvent::wait):
1800 (WebCore::CCCompletionEvent::signal):
1801 * platform/graphics/chromium/cc/CCThreadTask.h: Added.
1802 (WebCore::CCThreadTask0::create):
1803 (WebCore::CCThreadTask0::CCThreadTask0):
1804 (WebCore::CCThreadTask0::performTask):
1805 (WebCore::CCThreadTask1::create):
1806 (WebCore::CCThreadTask1::CCThreadTask1):
1807 (WebCore::CCThreadTask1::performTask):
1808 (WebCore::CCThreadTask2::create):
1809 (WebCore::CCThreadTask2::CCThreadTask2):
1810 (WebCore::CCThreadTask2::performTask):
1811 (WebCore::CCThreadTask3::create):
1812 (WebCore::CCThreadTask3::CCThreadTask3):
1813 (WebCore::CCThreadTask3::performTask):
1814 (WebCore::createCCThreadTask):
1816 2011-04-07 Ryosuke Niwa <rniwa@webkit.org>
1818 Reviewed by Eric Seidel.
1820 REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
1821 https://bugs.webkit.org/show_bug.cgi?id=57872
1823 r46914 initially introduced a regression by replacing calls to styleAtPosition by editingStyleAtPosition
1824 because editingStyleAtPosition did not avoid tab span to obtain the computed style unlike styleAtPosition.
1826 r46914 also introduced a regression by cloning hierarchy under new block at the insertion position without
1827 avoiding the tab span.
1829 Fixed the both regressions by avoiding tab spans when computing the editing style and when cloning hierarchy.
1830 Also reverted r46914 for the general code path because re-creating node hierarchy duplicates nodes when
1831 we're moving nodes after the paragraph separator. Instead, we now split the tree up until the start block
1832 before moving the nodes.
1834 Tests: editing/inserting/insert-paragraph-after-tab-span-and-text.html
1835 editing/inserting/insert-paragraph-separator-tab-span.html
1837 * editing/DeleteSelectionCommand.cpp:
1838 (WebCore::DeleteSelectionCommand::saveTypingStyleState): Since EditingStyle's constructor avoids a tab span,
1839 no longer calls positionBeforeTabSpan on the position passed to EditingStyle's constructor.
1840 * editing/EditingStyle.cpp:
1841 (WebCore::EditingStyle::init): Always avoid a tab span when computing the editing style.
1842 * editing/InsertParagraphSeparatorCommand.cpp:
1843 (WebCore::InsertParagraphSeparatorCommand::doApply): Avoid cloning tab spans and inserting a paragraph
1844 separator into a paragraph separator.
1845 * editing/htmlediting.cpp:
1846 (WebCore::positionOutsideTabSpan): Renamed from positionBeforeTabSpan. Also returns the position in the parent
1847 node after the tab span if the position was at the end of the tab span.
1848 * editing/htmlediting.h:
1850 2011-04-07 Jia Pu <jpu@apple.com>
1852 Reviewed by Darin Adler.
1854 [Mac] Editor::setComposition() should not trigger correction panel timer.
1855 https://bugs.webkit.org/show_bug.cgi?id=58049
1856 <rdar://problem/9226305>
1858 On Mac OS X that supports autocorrection panel, typing unconfirmed composition (i.e. unconfirmed Japanese or Chinese input)
1859 should not start autocorrection timer. We added a member variable, m_shouldPreventSpellChecking, to TypingCommand.
1860 When this value is true, markMisspellingsAfterTyping() will not be called in TypingCommand::typingAddedToOpenCommand().
1861 m_shouldPreventSpellChecking is set to true in the TypingCommand objects created by Editor::setComposition().
1863 No new tests. No deterministically reproducible test case. Patch is based on static code analysis. Testing this also requires firing
1864 autocorrection panel timer, which can not be easily done in automated fashion.
1866 * editing/Editor.cpp:
1867 (WebCore::Editor::deleteWithDirection):
1868 (WebCore::Editor::insertTextWithoutSendingTextEvent):
1869 (WebCore::Editor::confirmComposition):
1870 (WebCore::Editor::setComposition):
1871 * editing/EditorCommand.cpp:
1872 (WebCore::executeDelete):
1873 * editing/TypingCommand.cpp:
1874 (WebCore::TypingCommand::TypingCommand):
1875 (WebCore::TypingCommand::deleteSelection):
1876 (WebCore::TypingCommand::deleteKeyPressed):
1877 (WebCore::TypingCommand::forwardDeleteKeyPressed):
1878 (WebCore::TypingCommand::insertText):
1879 (WebCore::TypingCommand::insertLineBreak):
1880 (WebCore::TypingCommand::insertParagraphSeparator):
1881 (WebCore::TypingCommand::typingAddedToOpenCommand):
1882 * editing/TypingCommand.h:
1883 (WebCore::TypingCommand::create):
1884 (WebCore::TypingCommand::setShouldPreventSpellChecking):
1886 2011-04-07 John Bauman <jbauman@chromium.org>
1888 Reviewed by Kenneth Russell.
1890 clearIfComposited call is really slow
1891 https://bugs.webkit.org/show_bug.cgi?id=57999
1893 Move getContextAttributes call after the if, so it isn't called nearly as often.
1897 * html/canvas/WebGLRenderingContext.cpp:
1898 (WebCore::WebGLRenderingContext::clearIfComposited):
1900 2011-04-07 Luke Macpherson <macpherson@chromium.org>
1902 Reviewed by Dimitri Glazkov.
1904 Implement Backgroun and Mask properties in CSSStyleApplyProperty
1905 https://bugs.webkit.org/show_bug.cgi?id=57922
1907 No tests added as no behavioral changes.
1909 * css/CSSStyleApplyProperty.cpp:
1910 Added ApplyPropertyFillLayer test to handle Background and Mask CSS Properties.
1911 (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
1912 Added constructor calls to set up:
1913 CSSPropertyBackgroundAttachment
1914 CSSPropertyBackgroundClip
1915 CSSPropertyWebkitBackgroundClip
1916 CSSPropertyWebkitBackgroundComposite
1917 CSSPropertyBackgroundOrigin
1918 CSSPropertyWebkitBackgroundOrigin
1919 CSSPropertyBackgroundSize
1920 CSSPropertyWebkitBackgroundSize
1921 CSSPropertyWebkitMaskAttachment
1922 CSSPropertyWebkitMaskClip
1923 CSSPropertyWebkitMaskComposite
1924 CSSPropertyWebkitMaskOrigin
1925 CSSPropertyWebkitMaskSize
1926 * css/CSSStyleApplyProperty.h:
1927 (WebCore::CSSStyleApplyProperty::setPropertyValue):
1928 Add function to specify an equivalent property value in the lookup table.
1929 * css/CSSStyleSelector.cpp:
1930 (WebCore::CSSStyleSelector::applyProperty):
1931 Remove sections now implemented by CSSStyleApplyProperty.
1932 * css/CSSStyleSelector.h:
1933 Make CSSStyleApplyProperty a friend class so that the mapFill* functions are accessible.
1935 2011-04-04 Eric Seidel <eric@webkit.org>
1937 Reviewed by Ryosuke Niwa.
1939 Split run storage out from BidiResolver into a new BidiRunList class
1940 https://bugs.webkit.org/show_bug.cgi?id=57764
1942 Part of what makes BidiResolver and InlineIterator so difficult to understand
1943 (and bug 50912 so difficult to fix) is that BidiResolver is both a state machine
1944 for the Unicode Bidi Algorithm (UBA) as well as storage for the resulting
1945 BidiRuns from the algorithm. This patch breaks the storage aspect off
1946 into its own class BidiRunList.
1948 This patch is only a start. It does not actually fix the problematic ownership
1949 relationship, but it does make it possible to fix such in a second patch.
1951 The run pointers and addRun/prependRun, etc. were already a tightly coupled
1952 logical subset of the BidiResolver class, so moving them into their own class
1953 was both obvious and easy. The only piece of logic I had to move was that
1954 deleteRuns() had a side-effect of setting the m_emptyRun bit on the resolver.
1956 I believe this deleteRuns side-effect was only ever used for one place
1957 (right after findNextLineBreak) and that it's only needed because
1958 findNextLineBreak can sometimes create bidi runs. Run creation appears to be
1959 an unintentional side-effect of how InlineIterator calls through to BidiResolver
1960 as part of bidiNext and not a desired effect of the code. I have added the call
1961 to markCurrentRunEmpty to both places deleteRuns was called (where the resolver
1962 could get re-used) as a safety precaution. We could replace both with ASSERTs
1965 I suspect there may be a small performance win from further refactoring so that
1966 findNextLineBreak does not need to create BidiRuns.
1968 As I commented in the code, callers should own their own BidiRunList which they
1969 pass to BidiResolver::createBidiRunsForLine. I attempted to implement that in
1970 an earlier version of this patch, but it was too complicated with the current
1971 twisted dependencies between InlineIterator/bidiNext and InlineBidiResolver.
1972 raise/lowerExplicitEmbeddingLevel are called unconditionally
1973 from commitExplicitEmbedding (which is called by bidiNext) and expect to have
1974 access to a runs list even in cases where we don't want any runs (findNextLineBreak).
1976 I also cleaned up some of the callers to pass around BidiRunList objects instead
1977 of InlineBidiResolvers now that they're separate objects.
1982 * WebCore.vcproj/WebCore.vcproj:
1983 * WebCore.xcodeproj/project.pbxproj:
1984 * platform/graphics/GraphicsContext.cpp:
1985 (WebCore::GraphicsContext::drawBidiText):
1986 * platform/text/BidiResolver.h:
1987 (WebCore::BidiResolver::BidiResolver):
1988 (WebCore::BidiResolver::runs):
1989 (WebCore::BidiResolver::markCurrentRunEmpty):
1990 (WebCore::::appendRun):
1991 (WebCore::::lowerExplicitEmbeddingLevel):
1992 (WebCore::::raiseExplicitEmbeddingLevel):
1993 (WebCore::::reorderRunsFromLevels):
1994 (WebCore::::createBidiRunsForLine):
1995 * rendering/InlineIterator.h:
1996 (WebCore::InlineBidiResolver::appendRun):
1997 * rendering/RenderBlock.h:
1998 * rendering/RenderBlockLineLayout.cpp:
1999 (WebCore::createRun):
2000 (WebCore::RenderBlock::appendRunsForObject):
2001 (WebCore::reachedEndOfTextRenderer):
2002 (WebCore::RenderBlock::handleTrailingSpaces):
2003 (WebCore::RenderBlock::layoutInlineChildren):
2005 2011-04-07 Naoki Takano <takano.naoki@gmail.com>
2007 Reviewed by Adam Barth.
2009 [Chromium] Fix relocation problem of popup window which introduces autofill popup sometimes moves to screen's top left corner.
2010 https://bugs.webkit.org/show_bug.cgi?id=57911
2011 http://code.google.com/p/chromium/issues/detail?id=78073
2013 Manual test added: manual-tests/autofill-popup-location.html
2015 Originally only height is checked so that it introduces the bug.
2016 So I changed it to check both width and height as size.
2018 * manual-tests/autofill-popup-location.html: Added.
2019 * platform/chromium/PopupMenuChromium.cpp:
2020 (WebCore::PopupContainer::refresh): Check window size between original and new before calling setFrameRect().
2022 2011-04-07 Adam Barth <abarth@webkit.org>
2024 Reviewed by Eric Seidel.
2026 Implement img-src style-src and font-src
2027 https://bugs.webkit.org/show_bug.cgi?id=58018
2029 These are pretty straight forward given the rest of the infrastructure
2032 Tests: http/tests/security/contentSecurityPolicy/image-allowed.html
2033 http/tests/security/contentSecurityPolicy/image-blocked.html
2034 http/tests/security/contentSecurityPolicy/style-allowed.html
2035 http/tests/security/contentSecurityPolicy/style-blocked.html
2036 http/tests/security/contentSecurityPolicy/xsl-allowed.php
2037 http/tests/security/contentSecurityPolicy/xsl-blocked.php
2039 * loader/cache/CachedResourceLoader.cpp:
2040 (WebCore::CachedResourceLoader::canRequest):
2041 * page/ContentSecurityPolicy.cpp:
2042 (WebCore::ContentSecurityPolicy::allowImageFromSource):
2043 (WebCore::ContentSecurityPolicy::allowStyleFromSource):
2044 (WebCore::ContentSecurityPolicy::allowFontFromSource):
2045 (WebCore::ContentSecurityPolicy::addDirective):
2046 * page/ContentSecurityPolicy.h:
2048 2011-04-07 David Levin <levin@chromium.org>
2050 Reviewed by Darin Adler.
2052 Make IconSnapshot and PageURLRecord member variables private.
2053 https://bugs.webkit.org/show_bug.cgi?id=58080
2055 No change in functionality so no new tests.
2057 * loader/icon/IconDatabase.cpp:
2058 (WebCore::IconDatabase::writeToDatabase): Changed to used the accessor functions.
2059 (WebCore::IconDatabase::writeIconSnapshotToSQLDatabase): Ditto.
2060 * loader/icon/IconRecord.h:
2061 (WebCore::IconSnapshot::IconSnapshot): Changed to use the new member variable names.
2062 (WebCore::IconSnapshot::iconURL): Expose the property.
2063 (WebCore::IconSnapshot::timestamp): Ditto.
2064 (WebCore::IconSnapshot::data): Ditto.
2065 * loader/icon/PageURLRecord.h:
2066 (WebCore::PageURLSnapshot::PageURLSnapshot): Changed to use the new member variable names.
2067 (WebCore::PageURLSnapshot::pageURL): Expose the property.
2068 (WebCore::PageURLSnapshot::iconURL): Ditto.
2070 2011-04-07 Dan Bernstein <mitz@apple.com>
2074 * platform/graphics/cairo/GraphicsContextCairo.cpp:
2075 (WebCore::GraphicsContext::roundToDevicePixels):
2077 2011-04-07 Eric Seidel <eric@webkit.org>
2079 Reviewed by Adam Barth.
2081 Add stub support for generating Gtk build system from gyp
2082 https://bugs.webkit.org/show_bug.cgi?id=58086
2084 This does not produce a buildable WebCore, but it
2085 does allow running gyp/configure --port=gtk and having
2086 it generate a gtk.Makefile which we can use for testing
2087 the rest of the plumbing.
2089 * gyp/gtk.gyp: Added.
2091 2011-04-07 David Hyatt <hyatt@apple.com>
2093 Reviewed by Dan Bernstein.
2095 https://bugs.webkit.org/show_bug.cgi?id=57736
2097 Crash on openstreetmap.org while using the map. Fix a bad interaction between the positioned movement layout
2098 optimization and the simplified layout optimization that could lead to blocks remaining marked as dirty when
2099 layout finished. This would eventually lead to an inability to properly determine the correct layout root and
2100 would cause a deleted root to be used later on.
2102 Added fast/block/positioning/complex-positioned-movement.html.
2104 * page/FrameView.cpp:
2105 (WebCore::FrameView::scheduleRelayoutOfSubtree):
2106 Add asserts to catch cases in the future where a layout root is set that has a dirty containing block.
2108 * rendering/RenderBlock.cpp:
2109 (WebCore::RenderBlock::simplifiedLayout):
2110 Change simplified layout so that the positioned movement optimization no longer clears the other layout
2111 flags. This will ensure that we still lay out our descendants if they need it.
2113 (WebCore::RenderBlock::layoutPositionedObjects):
2114 Changed to clear our layout flags now if the positioned movement is successful, since tryLayoutDoingPositionedMovementOnly
2115 no longer does the clear.
2117 * rendering/RenderBox.h:
2118 (WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly):
2119 tryLayoutDoingPositionedMovementOnly now returns a boolean indicating success or failure. On success it no longer
2120 does setNeedsLayout(false), but instead will let the caller take care of it. This way the caller can still look at
2121 the other flags in case other kinds of layout are still needed.
2123 * rendering/RenderObject.h:
2124 (WebCore::RenderObject::setNeedsPositionedMovementLayout):
2125 (WebCore::RenderObject::setNeedsSimplifiedNormalFlowLayout):
2126 Changed these methods to only set their respective flags and not to try to be clever about avoiding propagation.
2128 2011-04-07 Andrew Scherkus <scherkus@chromium.org>
2130 Revert ENABLE_TRACK patch due to compile failures.
2133 * Configurations/FeatureDefines.xcconfig:
2134 * DerivedSources.make:
2137 * WebCore.xcodeproj/project.pbxproj:
2139 * html/HTMLAttributeNames.in:
2140 * html/HTMLTagNames.in:
2141 * html/HTMLTrackElement.cpp: Removed.
2142 * html/HTMLTrackElement.h: Removed.
2143 * html/HTMLTrackElement.idl: Removed.
2145 2011-04-07 Dan Bernstein <mitz@apple.com>
2147 Reviewed by Simon Fraser.
2149 <rdar://problem/9018212> Underline thickness is not uniform under non-integral scale factor
2150 https://bugs.webkit.org/show_bug.cgi?id=58083
2152 Test: fast/text/decorations-transformed.html
2154 * platform/graphics/GraphicsContext.h: Added a RoundingMode enum with two values. RoundAllSides
2155 is the existing rounding mode, where each side of the rectangle snaps to the nearest pixel
2156 gridline. RoundOriginAndDimensions snaps the origin to the nearest pixel gridpoint and rounds
2157 the width and the height. In this new mode, translating a rectangle in user space never changes
2158 its dimensions in device pixels.
2159 * platform/graphics/cg/GraphicsContextCG.cpp:
2160 (WebCore::GraphicsContext::roundToDevicePixels): Implemented RoundOriginAndDimensions.
2161 (WebCore::GraphicsContext::drawLineForText): Use RoundOriginAndDimensions, thus ensuring that
2162 all underlines have the same thickness in device pixels.
2163 * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
2164 (WebCore::GraphicsContext::roundToDevicePixels): Added RoundingMode parameter, but did not implement it.
2165 * platform/graphics/qt/GraphicsContextQt.cpp:
2166 (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
2167 * platform/graphics/skia/GraphicsContextSkia.cpp:
2168 (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
2169 * platform/graphics/wince/GraphicsContextWinCE.cpp:
2170 (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
2171 * platform/graphics/wx/GraphicsContextWx.cpp:
2172 (WebCore::GraphicsContext::roundToDevicePixels): Ditto.
2173 * rendering/InlineTextBox.cpp:
2174 (WebCore::InlineTextBox::paintDecoration):
2176 2011-04-06 Vitaly Repeshko <vitalyr@chromium.org>
2178 Reviewed by Nate Chapin.
2180 [V8] Remove custom DOMImplementation getter on Document.
2181 https://bugs.webkit.org/show_bug.cgi?id=57991
2183 The custom getter is no longer required because DOMImplementation
2184 objects are now created per document.
2186 Test: fast/dom/DOMImplementation/implementation-identity.html
2188 * bindings/scripts/CodeGeneratorV8.pm:
2189 * bindings/v8/custom/V8DocumentCustom.cpp:
2192 2011-04-07 Sergey Glazunov <serg.glazunov@gmail.com>
2194 Reviewed by Dimitri Glazkov.
2196 setHasID() is only called for styled elements
2197 https://bugs.webkit.org/show_bug.cgi?id=57267
2199 Test: fast/dom/non-styled-element-id-crash.html
2202 (WebCore::Element::attributeChanged):
2203 (WebCore::Element::idAttributeChanged):
2205 * dom/StyledElement.cpp:
2206 (WebCore::StyledElement::parseMappedAttribute):
2208 2011-04-07 Jer Noble <jer.noble@apple.com>
2210 Reviewed by Eric Carlson.
2212 HTMLVideoElement::webkitEnterFullscreen does not use new Full Screen API when available.
2213 https://bugs.webkit.org/show_bug.cgi?id=58070
2215 Make the HTMLMediaElement full screen functions call into the new Full Screen API when
2216 FULLSCREEN_API is enabled.
2218 * html/HTMLMediaElement.cpp:
2219 (WebCore::HTMLMediaElement::enterFullscreen):
2220 (WebCore::HTMLMediaElement::exitFullscreen):
2222 2011-04-07 Adam Barth <abarth@webkit.org>
2224 Reviewed by Eric Seidel.
2226 Implement CSP's options directive
2227 https://bugs.webkit.org/show_bug.cgi?id=58014
2229 This patch contains the full options parser, but we only have enough of
2230 CSP implemented to see the effects of disable-xss-protection. Will
2231 need to do some more work before we can see eval-script in action.
2233 Tests: http/tests/security/contentSecurityPolicy/inline-script-allowed.html
2234 http/tests/security/contentSecurityPolicy/inline-script-blocked-goofy.html
2236 * page/ContentSecurityPolicy.cpp:
2237 (WebCore::CSPOptions::CSPOptions):
2238 (WebCore::CSPOptions::disableXSSProtection):
2239 (WebCore::CSPOptions::evalScript):
2240 (WebCore::CSPOptions::parse):
2241 (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
2242 (WebCore::ContentSecurityPolicy::allowInlineEventHandlers):
2243 (WebCore::ContentSecurityPolicy::allowInlineScript):
2244 (WebCore::ContentSecurityPolicy::addDirective):
2245 * page/ContentSecurityPolicy.h:
2247 2011-04-07 Alexey Proskuryakov <ap@apple.com>
2249 Reviewed by Anders Carlsson.
2251 REGRESSION (WebKit2): Reverse conversion doesn't work in Kotoeri
2252 https://bugs.webkit.org/show_bug.cgi?id=58066
2253 <rdar://problem/8965302>
2255 * platform/mac/HTMLConverter.h:
2256 * platform/mac/HTMLConverter.mm: (+[WebHTMLConverter editingAttributedStringFromRange:]):
2257 Changed editingAttributedStringFromRange: to use WebCore::Range instead of DOMRange, since
2258 it's now used in WebKit2.
2260 2011-04-07 Andy Estes <aestes@apple.com>
2262 Reviewed by Darin Adler.
2264 REGRESSION (r64712): Microsoft Outlook 2011: original message contents
2265 not included when replying to an email.
2266 https://bugs.webkit.org/show_bug.cgi?id=57794
2269 * loader/FrameLoader.cpp:
2270 (WebCore::FrameLoader::finishedParsing): Call Frame::injectUserScripts()
2271 before checking if the FrameLoader is parsing the initial empty document.
2272 This allows user scripts to be injected at the end of document parsing
2273 (if the setting is enabled).
2275 (WebCore::Frame::injectUserScripts): Do not inject scripts if this
2276 feature is disabled on the initial empty document.
2277 * page/Settings.cpp:
2278 (WebCore::Settings::Settings):
2279 * page/Settings.h: Add a setting for injecting user scripts into the
2280 initial empty document (defaults to false).
2281 (WebCore::Settings::setInjectUserScriptsInInitialEmptyDocument):
2282 (WebCore::Settings::injectUserScriptsInInitialEmptyDocument):
2283 * platform/mac/RuntimeApplicationChecks.h:
2284 * platform/mac/RuntimeApplicationChecks.mm:
2285 (WebCore::applicationIsMicrosoftOutlook): Check if the embedding
2286 application is Microsoft Outlook.
2288 2011-04-06 Jer Noble <jer.noble@apple.com>
2290 Reviewed by Maciej Stachowiak.
2292 AVF: MediaPlayerPrivateAVFoundation never reaches playable state.
2293 https://bugs.webkit.org/show_bug.cgi?id=57962
2295 Add support for a new AVPlayerItem API which will notify clients when their
2296 seek completes. This requires a new Notification type to be passed to the main
2297 thread in MediaPlayerPrivateAVFoundation.
2299 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2300 (WebCore::MediaPlayerPrivateAVFoundation::seekCompleted): Added.
2301 (WebCore::MediaPlayerPrivateAVFoundation::scheduleMainThreadNotification): Added two new
2302 overloaded functions which take a Notification; and a Notification::Type and boolean.
2303 (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification): Support new SeekCompleted
2305 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2306 (WebCore::MediaPlayerPrivateAVFoundation::Notification::Notification): Added one new constructor.
2307 (WebCore::MediaPlayerPrivateAVFoundation::Notification::finished): Added ivar and accessor.
2308 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
2309 (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Call new AVPlayerItem API.
2310 (-[WebCoreAVFMovieObserver seekCompleted:]): Added.
2312 2011-04-07 Nancy Piedra <nancy.piedra@nokia.com>
2314 Reviewed by Eric Carlson.
2316 Parse quotes from content type parameters
2317 https://bugs.webkit.org/show_bug.cgi?id=53275
2319 This functionality is tested in video-can-play-type.html layout test
2320 where I've added codecs parameter with good and bad formatting.
2322 * platform/ContentType.cpp:
2323 (WebCore::ContentType::parameter):
2325 2011-04-07 Pavel Feldman <pfeldman@google.com>
2327 Reviewed by Yury Semikhatsky.
2329 Web Inspector: remove "enabled" from the setBreakpoint protocol.
2330 https://bugs.webkit.org/show_bug.cgi?id=58047
2332 * bindings/js/ScriptDebugServer.cpp:
2333 (WebCore::ScriptDebugServer::hasBreakpoint):
2334 * bindings/v8/DebuggerScript.js:
2336 * bindings/v8/ScriptDebugServer.cpp:
2337 (WebCore::ScriptDebugServer::setBreakpoint):
2338 * inspector/Inspector.json:
2339 * inspector/InspectorDebuggerAgent.cpp:
2340 (WebCore::buildObjectForBreakpointCookie):
2341 (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2342 (WebCore::InspectorDebuggerAgent::setBreakpoint):
2343 (WebCore::InspectorDebuggerAgent::continueToLocation):
2344 (WebCore::InspectorDebuggerAgent::didParseSource):
2345 * inspector/InspectorDebuggerAgent.h:
2346 * inspector/ScriptBreakpoint.h:
2347 (WebCore::ScriptBreakpoint::ScriptBreakpoint):
2348 * inspector/front-end/DebuggerModel.js:
2349 (WebInspector.DebuggerModel.prototype.setBreakpoint):
2350 (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
2351 * inspector/front-end/DebuggerPresentationModel.js:
2352 (WebInspector.DebuggerPresentationModel):
2353 (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
2354 (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
2355 (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.callback):
2356 (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
2357 (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
2358 (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
2359 (WebInspector.DebuggerPresentationModel.prototype._removeBreakpointFromDebugger):
2360 (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled.afterUpdate):
2361 (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
2362 (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
2363 (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
2364 (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
2365 (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
2366 (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
2367 (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
2368 (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpointsFromSettings):
2369 (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
2370 (WebInspector.DebuggerPresentationModel.prototype._reset):
2371 (WebInspector.PresentationBreakpoint):
2373 2011-04-07 Dan Bernstein <mitz@apple.com>
2375 Reviewed by Adam Roben.
2377 Removed a redundant line of code.
2379 * rendering/RenderInline.cpp:
2380 (WebCore::RenderInline::updateAlwaysCreateLineBoxes): No need to compare line gap values, as
2381 this is covered by the earlier hasIdenticalAscentDescentAndLineGap() check.
2383 2011-04-07 Liang Qi <liang.qi@nokia.com>
2385 Reviewed by Laszlo Gombos.
2387 [Qt][Symbian] Enable webkit build with GCCE on Symbian.
2388 https://bugs.webkit.org/show_bug.cgi?id=57841
2390 * WebCore.pri: Thanks for Norbert Leser <norbert.leser@nokia.com> who checked RVCT part.
2391 --rw-base value in QMAKE_LFLAGS.ARMCC and -Tdata value in QMAKE_LFLAGS.GCCE are updated
2392 to 0x1000000 together. They need to be updated in the future when WebKit grows.
2394 2011-04-06 Pavel Feldman <pfeldman@google.com>
2396 Reviewed by Yury Semikhatsky.
2398 Web Inspector: get rid of Breakpoint.js.
2399 https://bugs.webkit.org/show_bug.cgi?id=57949
2402 * WebCore.vcproj/WebCore.vcproj:
2403 * inspector/front-end/Breakpoint.js: Removed.
2404 * inspector/front-end/BreakpointsSidebarPane.js:
2405 (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.addBreakpoint):
2406 (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.updateBreakpoint.didLoadSnippet):
2407 (WebInspector.JavaScriptBreakpointsSidebarPane.prototype.updateBreakpoint):
2408 (WebInspector.JavaScriptBreakpointsSidebarPane.prototype._compareBreakpoints):
2409 * inspector/front-end/DebuggerModel.js:
2410 (WebInspector.DebuggerModel):
2411 (WebInspector.DebuggerModel.prototype._debuggerWasDisabled):
2412 (WebInspector.DebuggerModel.prototype.setBreakpoint.didSetBreakpoint):
2413 (WebInspector.DebuggerModel.prototype.setBreakpoint):
2414 (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
2415 (WebInspector.DebuggerModel.prototype.removeBreakpoint):
2416 (WebInspector.DebuggerModel.prototype._breakpointResolved):
2417 (WebInspector.DebuggerModel.prototype.reset):
2418 * inspector/front-end/DebuggerPresentationModel.js:
2419 (WebInspector.DebuggerPresentationModel):
2420 (WebInspector.DebuggerPresentationModel.prototype._refreshBreakpoints):
2421 (WebInspector.DebuggerPresentationModel.prototype._updateBreakpointsAfterLiveEdit):
2422 (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
2423 (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint.didSetBreakpoint):
2424 (WebInspector.DebuggerPresentationModel.prototype.setBreakpoint):
2425 (WebInspector.DebuggerPresentationModel.prototype.setBreakpointEnabled):
2426 (WebInspector.DebuggerPresentationModel.prototype.updateBreakpoint):
2427 (WebInspector.DebuggerPresentationModel.prototype.removeBreakpoint):
2428 (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping):
2429 (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded):
2430 (WebInspector.DebuggerPresentationModel.prototype._breakpointRemoved):
2431 (WebInspector.DebuggerPresentationModel.prototype._breakpointResolved):
2432 (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoints):
2433 (WebInspector.DebuggerPresentationModel.prototype._restoreBreakpoint):
2434 (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
2435 (WebInspector.DebuggerPresentationModel.prototype._reset):
2436 (WebInspector.PresentationBreakpoint):
2437 (WebInspector.PresentationBreakpoint.prototype.get sourceFile):
2438 (WebInspector.PresentationBreakpoint.prototype.get url):
2439 (WebInspector.PresentationBreakpoint.prototype.get resolved):
2440 (WebInspector.PresentationBreakpoint.prototype.loadSnippet):
2441 * inspector/front-end/ResourceTreeModel.js:
2442 (WebInspector.ResourceTreeModel):
2443 (WebInspector.ResourceTreeModel.prototype._onResourceStarted):
2444 (WebInspector.ResourceTreeModel.prototype._addResourceToFrame):
2445 * inspector/front-end/ScriptsPanel.js:
2446 (WebInspector.ScriptsPanel):
2447 (WebInspector.ScriptsPanel.prototype._breakpointUpdated):
2448 (WebInspector.ScriptsPanel.prototype.reset):
2449 * inspector/front-end/WebKit.qrc:
2450 * inspector/front-end/inspector.html:
2452 2011-04-07 Yury Semikhatsky <yurys@chromium.org>
2454 Reviewed by Pavel Feldman.
2456 Web Inspector: console messages names should adhere to the common naming style
2457 https://bugs.webkit.org/show_bug.cgi?id=58042
2459 * inspector/ConsoleMessage.cpp:
2460 (WebCore::ConsoleMessage::addToFrontend):
2461 (WebCore::ConsoleMessage::updateRepeatCountInConsole):
2462 * inspector/Inspector.json:
2463 * inspector/InspectorConsoleAgent.cpp:
2464 (WebCore::InspectorConsoleAgent::clearConsoleMessages):
2465 * inspector/front-end/ConsoleView.js:
2466 (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageAdded):
2467 (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messageRepeatCountUpdated):
2468 (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher.dispatcher.messagesCleared):
2469 (WebInspector.ConsoleView.prototype._registerConsoleDomainDispatcher):
2471 2011-04-06 Ilya Tikhonovsky <loislo@chromium.org>
2473 Reviewed by Yury Semikhatsky.
2475 Web Inspector: migrate Inspector protocol messages format to JSON-RPC.
2476 https://bugs.webkit.org/show_bug.cgi?id=57957
2478 There is not a significant difference between inspector messages spec and and JSON-RPC 2.0 messages spec.
2479 Also JSON-RPC has a pretty clear specification for error descriptions which we haven't.
2480 It was decided that we will use it.
2482 the list of renames:
2484 2) domain + '.' + event => method // for events
2485 3) domain + '.' + command => method // for requests
2486 4) requestId => id // for responses
2487 5) arguments => params // for requests
2488 6) data => params // for events
2489 7) body => result // for responses
2491 protocolErrors and error properties will be converted to JSON-RPC error format.
2492 The order of properties in messages also will be adjusted.
2493 The only thing that looks unnecessary is jsonrpc property.
2495 * inspector/CodeGeneratorInspector.pm:
2497 2011-04-07 Ryosuke Niwa <rniwa@webkit.org>
2499 Reviewed by Eric Seidel.
2501 Add functions to update left and right offsets to LineOffsets
2502 https://bugs.webkit.org/show_bug.cgi?id=58028
2504 Added update() and shrinkWidthForNewFloatIfNeeded(FloatingObject*) to LineOffsets,
2505 which are used to update m_left and m_right. Also added m_block and m_isFirstLine
2506 member variables to LineOffsets so that users of LineOffsets don't have to pass them around.
2508 * rendering/RenderBlock.h:
2509 * rendering/RenderBlockLineLayout.cpp:
2510 (WebCore::RenderBlock::skipLeadingWhitespace): No longer passes firstLine to positionNewFloatOnLine.
2511 (WebCore::LineOffsets::LineOffsets): Takes RenderBlock* and isFirstLine instead of left and right offsets.
2512 (WebCore::LineOffsets::update): Extracted from findNextLineBreak and positionNewFloatOnLine.
2513 (WebCore::LineOffsets::shrinkWidthForNewFloatIfNeeded): Extracted from positionNewFloatOnLine.
2514 (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
2515 (WebCore::RenderBlock::positionNewFloatOnLine): Calls shrinkWidthForNewFloatIfNeeded and update and
2516 no longer passes firstLine around.
2518 2011-04-06 Pavel Feldman <pfeldman@google.com>
2520 Reviewed by Yury Semikhatsky.
2522 Web Inspector: migrate debugger domain to the unified breakpoint location notion.
2523 https://bugs.webkit.org/show_bug.cgi?id=57928
2525 * inspector/Inspector.json:
2526 * inspector/InspectorDebuggerAgent.cpp:
2527 (WebCore::buildObjectForBreakpointCookie):
2528 (WebCore::InspectorDebuggerAgent::setBreakpointByUrl):
2529 (WebCore::InspectorDebuggerAgent::setBreakpoint):
2530 (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
2531 (WebCore::InspectorDebuggerAgent::didParseSource):
2532 * inspector/InspectorDebuggerAgent.h:
2533 * inspector/front-end/Breakpoint.js:
2534 (WebInspector.Breakpoint):
2535 * inspector/front-end/DebuggerModel.js:
2536 (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
2537 (WebInspector.DebuggerModel.prototype._breakpointResolved):
2539 2011-04-07 Andreas Kling <andreas.kling@nokia.com>
2541 Reviewed by Benjamin Poulain.
2543 [Qt] Mask the QStyle::State_Horizontal hint for vertical scrollbars.
2545 When initializing a QStyleOptionSlider from a widget, the State_Horizontal
2546 hint may get set depending on how that widget is laid out in its parent.
2547 If this happens when drawing a vertical scrollbar, the hint is never
2548 cleared and we end up painting a vertical scrollbar with horizontal arrows.
2550 Covered by pixel tests which should no longer paint silly scrollbars.
2552 * platform/qt/ScrollbarThemeQt.cpp:
2553 (WebCore::styleOptionSlider):
2555 2011-04-07 Adam Barth <abarth@webkit.org>
2557 Reviewed by Eric Seidel.
2559 script-src should block inline script
2560 https://bugs.webkit.org/show_bug.cgi?id=58012
2562 Block inline scripts at the ScriptElement layer. This should catch
2563 exactly the scripts we want to catch.
2565 Test: http/tests/security/contentSecurityPolicy/inline-script-blocked.html
2568 (WebCore::Document::processHttpEquiv):
2569 - This patch also adds the ability to supply a CSP policy via a
2570 <meta> tag. We'll update the name of the header once we've
2571 finished implementing the spec.
2572 * dom/ScriptElement.cpp:
2573 (WebCore::ScriptElement::executeScript):
2574 * page/ContentSecurityPolicy.cpp:
2575 (WebCore::ContentSecurityPolicy::allowInlineScript):
2576 * page/ContentSecurityPolicy.h:
2578 2011-04-07 Alice Boxhall <aboxhall@chromium.org>
2580 Reviewed by Ryosuke Niwa.
2582 Move the MouseEventWithHitTestResults::targetNode() method on to EventHandler.
2583 https://bugs.webkit.org/show_bug.cgi?id=57921
2585 Moves the MouseEventWithHitTestResults::targetNode() method on to EventHandler, so
2586 that the same logic can be used for a HitTestResult.
2588 No visible changes, just cleanup, so no tests.
2590 * page/EventHandler.cpp:
2591 (WebCore::EventHandler::selectClosestWordFromMouseEvent):
2592 (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
2593 (WebCore::EventHandler::handleMousePressEventTripleClick):
2594 (WebCore::EventHandler::handleMousePressEventSingleClick):
2595 (WebCore::EventHandler::handleMousePressEvent):
2596 (WebCore::EventHandler::handleMouseDraggedEvent):
2597 (WebCore::EventHandler::handleMouseReleaseEvent):
2598 (WebCore::EventHandler::subframeForHitTestResult):
2599 Made public static member, so that it can access targetNode(), and be accessed by
2600 webkitwebview in gtk.
2601 (WebCore::EventHandler::selectCursor):
2602 (WebCore::EventHandler::targetNode):
2603 (WebCore::EventHandler::handleMouseDoubleClickEvent):
2604 (WebCore::EventHandler::handleMouseMoveEvent):
2605 (WebCore::EventHandler::updateDragAndDrop):
2606 (WebCore::EventHandler::sendContextMenuEvent):
2607 * page/EventHandler.h:
2608 * page/MouseEventWithHitTestResults.cpp:
2609 (WebCore::MouseEventWithHitTestResults::MouseEventWithHitTestResults):
2610 * page/MouseEventWithHitTestResults.h:
2611 * page/android/EventHandlerAndroid.cpp:
2612 (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2613 * page/brew/EventHandlerBrew.cpp:
2614 (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2615 * page/chromium/EventHandlerChromium.cpp:
2616 (WebCore::EventHandler::passMousePressEventToSubframe):
2617 (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2618 * page/efl/EventHandlerEfl.cpp:
2619 (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2620 * page/gtk/EventHandlerGtk.cpp:
2621 (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2622 * page/haiku/EventHandlerHaiku.cpp:
2623 (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2624 * page/mac/EventHandlerMac.mm:
2625 (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2626 (WebCore::EventHandler::passSubframeEventToSubframe):
2627 * page/wx/EventHandlerWx.cpp:
2628 (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
2630 2011-04-07 Pavel Podivilov <podivilov@chromium.org>
2632 Reviewed by Pavel Feldman.
2634 Web Inspector: build mapping for formatted scripts based on keywords positions.
2635 https://bugs.webkit.org/show_bug.cgi?id=57936
2637 Mapping based on [\$\.\w]+ was not accurate because string literals representation
2638 may be different in original and formatted scripts.
2640 * inspector/front-end/ScriptFormatterWorker.js:
2641 (buildMapping.regexp.b):
2644 2011-04-07 Kent Tamura <tkent@chromium.org>
2646 Reviewed by Dimitri Glazkov.
2648 Spinbuttons become unclickable if right padding is large.
2649 https://bugs.webkit.org/show_bug.cgi?id=56298
2651 An inner-spin-button is put on the right border and ignores right
2652 padding in RenderTextControlSingleLine::layout(), but forwardEvent()
2653 checks if a point is in an area just right of an internal text block.
2654 This inconsistency caused a bug that an inner-spin-button with large
2655 padding didn't receive mouse events.
2657 To fix this bug, we render spin buttons as layers, and remove manual
2658 event forwarding code.
2660 Test: fast/forms/input-number-large-padding.html
2662 * css/html.css: Add "position:relative" to make a spin-button a layer.
2663 (input::-webkit-inner-spin-button):
2664 (input::-webkit-outer-spin-button):
2665 * rendering/RenderTextControlSingleLine.cpp:
2666 (WebCore::RenderTextControlSingleLine::forwardEvent):
2667 Remove manual event forwarding code.
2669 2011-04-06 Adam Barth <abarth@webkit.org>
2671 Reviewed by Eric Seidel.
2673 CSP object-src should block plugin loads
2674 https://bugs.webkit.org/show_bug.cgi?id=57283
2676 This change is pretty straight-forward. It's slighly unclear to me
2677 whether this patch is correct w.r.t. the code in DocumentWriter. I've
2678 added a FIXME comment, and I'll investigate that case more in the future.
2680 Test: http/tests/security/contentSecurityPolicy/object-src-none.html
2682 * loader/DocumentWriter.cpp:
2683 (WebCore::DocumentWriter::begin):
2684 * loader/SubframeLoader.cpp:
2685 (WebCore::SubframeLoader::requestPlugin):
2686 * page/ContentSecurityPolicy.cpp:
2687 (WebCore::ContentSecurityPolicy::allowObjectFromSource):
2688 (WebCore::ContentSecurityPolicy::addDirective):
2689 * page/ContentSecurityPolicy.h:
2691 2011-04-06 Beth Dakin <bdakin@apple.com>
2693 Reviewed by Dan Bernstein.
2695 https://bugs.webkit.org/show_bug.cgi?id=58009
2696 Frame::scalePage() results in visual artifacts with scale factors less than 1
2698 <rdar://problem/8683230>
2700 Fall into the case where we fill with a background base color when there is a page
2701 scale factor that is less than 1.
2702 * rendering/RenderView.cpp:
2703 (WebCore::RenderView::paintBoxDecorations):
2705 2011-04-06 Jer Noble <jer.noble@apple.com>
2707 Reviewed by Darin Adler.
2709 AVF: MediaPlayerPrivateAVFoundationObjC should not use -[AVPlayerItem isPlaybackBufferEmpty]
2710 https://bugs.webkit.org/show_bug.cgi?id=57982
2712 Query our cached loaded time array instead of asking AVPlayerItem if its buffer is empty.
2714 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
2715 (WebCore::MediaPlayerPrivateAVFoundationObjC::playerItemStatus):
2717 2011-04-06 Jer Noble <jer.noble@apple.com>
2719 Reviewed by Eric Carlson.
2721 MediaPlayerPrivateAVFoundation does not change rate due to setRate().
2722 https://bugs.webkit.org/show_bug.cgi?id=57919
2724 Test: media/video-set-rate-from-pause.html
2726 The base class of MediaPlayerPrivateAVFoundation does not actually change the rate
2727 of the media; instead a subclass must do that work. So when setRate() is called,
2728 inform a subclass through a new pure virtual updateRate() function that there's
2731 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2732 (WebCore::MediaPlayerPrivateAVFoundation::setRate): Call updateRate()
2733 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2734 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.h:
2735 * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundationObjC.mm:
2736 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateRate): Added. Set the requested rate.
2738 2011-04-06 Dai Mikurube <dmikurube@chromium.org>
2740 Reviewed by David Levin.
2742 Add QUOTA build flag for unified quota API
2743 https://bugs.webkit.org/show_bug.cgi?id=57918
2745 * Configurations/FeatureDefines.xcconfig: Added QUOTA build flag
2746 * GNUmakefile.am: Added QUOTA build flag
2747 * WebCore.pri: Added QUOTA build flag
2749 2011-04-06 Stephanie Lewis <slewis@apple.com>
2751 Reviewed by Darin Adler.
2753 https://bugs.webkit.org/show_bug.cgi?id=57997
2754 <rdar://problem/9187856> REGRESSION(r75555): ~5-7 MB increase in memory between iBench runs
2755 Navigating away from a Scrolled page which queues a scroll event that is never dispatched.
2756 Cancel all enqueued events when detaching the Document the events cannot keep the Document
2759 No change in functionality so no new tests.
2762 (WebCore::Document::detach):
2763 * dom/EventQueue.cpp:
2764 (WebCore::EventQueue::cancelQueuedEvents):
2767 2011-04-06 Dan Bernstein <mitz@apple.com>
2769 Reviewed by Darin Adler.
2771 <rdar://problem/9084761> REGRESSION (r73993): Default Arabic line spacing has gotten very loose when the specified font is not Arabic
2772 https://bugs.webkit.org/show_bug.cgi?id=58002
2774 * platform/graphics/mac/SimpleFontDataMac.mm:
2775 (WebCore::SimpleFontData::platformInit): The version of Geeza Pro in Snow Leopard
2776 does not require the vertical metrics tweaks that were needed in Leopard. That the
2777 tweaks were being applied went mostly unnoticed until r73993, because until then it
2778 only affected cases where Geeza Pro was specified, not when it occurred as a fallback
2781 2011-04-06 Roland Steiner <rolandsteiner@chromium.org>
2783 Reviewed by Dimitri Glazkov.
2785 Bug 57994 - Move guardRef functionality back to Document
2786 https://bugs.webkit.org/show_bug.cgi?id=57994
2788 Move the relevant code parts from TreeScope back into Document.
2790 No new tests. (no new functionality)
2793 (WebCore::Document::removedLastRef):
2795 * dom/TreeScope.cpp:
2796 (WebCore::TreeScope::destroyTreeScopeData):
2799 2011-04-06 Ian Henderson <ianh@apple.com>
2801 Reviewed by Simon Fraser, Antti Koivisto.
2803 Fast path for parsing simple CSS values
2804 https://bugs.webkit.org/show_bug.cgi?id=57964
2806 Add functions to parse simple color or dimension values, skipping the
2807 overhead of full CSS parsing.
2809 Change parseValue to a static method to avoid unnecessary allocation
2810 of a CSSParser in the fast case.
2812 * css/CSSMutableStyleDeclaration.cpp:
2813 (WebCore::CSSMutableStyleDeclaration::setProperty):
2814 Changed to use the new, static parseValue method.
2815 * css/CSSParser.cpp:
2816 (WebCore::isColorPropertyID):
2817 (WebCore::parseColorValue):
2818 Parses any color accepted by the existing parseColor() static method.
2819 We must handle color identifiers separately, since parseColor() will
2820 change 'red' into 'rgb(255, 0, 0)'.
2821 (WebCore::isSimpleLengthPropertyID):
2822 (WebCore::parseSimpleLengthValue):
2823 Parses a value of the form 'NNpx', 'NN%', or 'NN' (when strict is
2824 false, or 'NN' is '0'). Returns false to fall back to the slow path.
2825 (WebCore::CSSParser::parseValue):
2827 * css/WebKitCSSMatrix.cpp:
2828 (WebCore::WebKitCSSMatrix::setMatrixValue):
2829 Changed to use the new, static parseValue method.
2831 2011-04-06 Kevin Ollivier <kevino@theolliviers.com>
2833 Reviewed by Darin Adler.
2835 Make sure JS_EXPORT_PRIVATE is an empty define when we aren't using the export macros.
2837 https://bugs.webkit.org/show_bug.cgi?id=27551
2841 2011-04-06 Simon Fraser <simon.fraser@apple.com>
2843 Reviewed by Antti Koivisto.
2845 Some minor style resolution optimizations
2846 https://bugs.webkit.org/show_bug.cgi?id=57996
2848 A couple of minor optimizations to style-related code.
2850 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2851 (WebCore::isCSSPropertyName):
2852 (WebCore::JSCSSStyleDeclaration::putDelegate):
2853 Avoid calling cssPropertyName() twice when setting style on an element.
2855 * css/CSSStyleSelector.cpp:
2856 (WebCore::useSVGZoomRules):
2857 (WebCore::CSSStyleSelector::applyProperty):
2858 Avoid calling isSVGElement() for every property, since only a two properties
2861 2011-04-06 Ian Henderson <ianh@apple.com>
2863 Reviewed by Antti Koivisto.
2865 Unnecessary string allocation in CSSStyleDeclaration::setProperty
2866 https://bugs.webkit.org/show_bug.cgi?id=57995
2868 Pass the bool representing the property's importance directly instead
2869 of constructing a string.
2871 * css/CSSStyleDeclaration.cpp:
2872 (WebCore::CSSStyleDeclaration::setProperty):
2874 2011-04-06 Leandro Gracia Gil <leandrogracia@chromium.org>
2876 Reviewed by Steve Block.
2878 Make the style of createFunctionOnlyCallback in V8 consistent with the JavaScriptCore version.
2879 https://bugs.webkit.org/show_bug.cgi?id=57963
2881 No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
2883 * bindings/v8/V8Utilities.h:
2884 (WebCore::createFunctionOnlyCallback):
2885 * bindings/v8/custom/V8GeolocationCustom.cpp:
2886 (WebCore::V8Geolocation::getCurrentPositionCallback):
2887 (WebCore::V8Geolocation::watchPositionCallback):
2889 2011-04-06 Brian Weinstein <bweinstein@apple.com>
2891 Reviewed by Adam Roben.
2893 WebKit2: Support Windows 7 Gestures
2894 https://bugs.webkit.org/show_bug.cgi?id=49824
2895 <rdar://problem/8689728>
2897 Move WindowTouch.h from WebKit/win, so it can be used in both WebKit and WebKit2.
2899 * WebCore.vcproj/WebCore.vcproj:
2900 * platform/win/WindowsTouch.h: Copied from WebKit/win/WindowsTouch.h.
2902 2011-04-06 Alexis Menard <alexis.menard@openbossa.org>
2904 Reviewed by Andreas Kling.
2906 [Qt] We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
2907 https://bugs.webkit.org/show_bug.cgi?id=57974
2909 We should use USE(QT_MULTIMEDIA) rather than ENABLE(QT_MULTIMEDIA).
2911 No new tests needed, just a config flag rename.
2915 2011-04-06 Tyler Close <tjclose@chromium.org>
2917 Reviewed by Nate Chapin.
2919 run-bindings-tests reference files out of sync with CodeGenerator*.pm
2920 https://bugs.webkit.org/show_bug.cgi?id=57967
2922 * bindings/scripts/test/V8/V8TestCallback.cpp:
2924 2011-04-06 Asanka Herath <asanka@chromium.org>
2926 Reviewed by Darin Fisher.
2928 Add new TargetType: TargetIsFavicon
2930 https://bugs.webkit.org/show_bug.cgi?id=57659
2932 No new functionality added, so no additional tests.
2934 * platform/network/ResourceRequestBase.h:
2936 2011-04-06 David Hyatt <hyatt@apple.com>
2938 Reviewed by Simon Fraser.
2940 https://bugs.webkit.org/show_bug.cgi?id=57981
2942 Update the column count and width computation algorithm for CSS3 multi-column layout
2943 to match the revised pseudo-algorithm in the latest draft of the spec.
2945 * rendering/RenderBlock.cpp:
2946 (WebCore::RenderBlock::calcColumnWidth):
2948 2011-04-06 Ryosuke Niwa <rniwa@webkit.org>
2950 Reviewed by Eric Seidel.
2952 borderPaddingMarginStart and borderPaddingMarginEnd should take RenderInline
2953 https://bugs.webkit.org/show_bug.cgi?id=57965
2955 Changed the argument types of borderPaddingMarginStart and borderPaddingMarginEnd
2956 from RenderBoxModelObject to RenderInline since they call marginStart and marginEnd
2957 instead of marginStartForChild and marginEndForChild respectively.
2959 Calling these two functions on RenderInline is okay because writing-mode cannot differ
2960 from that of the containing block.
2962 * rendering/RenderBlockLineLayout.cpp:
2963 (WebCore::borderPaddingMarginStart):
2964 (WebCore::borderPaddingMarginEnd):
2965 (WebCore::inlineLogicalWidth):
2967 2011-04-06 Sheriff Bot <webkit.review.bot@gmail.com>
2969 Unreviewed, rolling out r83039.
2970 http://trac.webkit.org/changeset/83039
2971 https://bugs.webkit.org/show_bug.cgi?id=57978
2973 introduced a new regression in conjunction to
2974 ReplaceSelectionCommand (Requested by rniwa on #webkit).
2976 * editing/EditingStyle.cpp:
2977 (WebCore::EditingStyle::init):
2978 * editing/InsertParagraphSeparatorCommand.cpp:
2979 (WebCore::InsertParagraphSeparatorCommand::doApply):
2981 2011-04-06 Naoki Takano <takano.naoki@gmail.com>
2983 Reviewed by David Levin.
2985 Webkit ignores PgUp/PgDown/Home/End in SELECT tag objects
2986 https://bugs.webkit.org/show_bug.cgi?id=27658
2988 Test: fast/events/select-element.html
2990 * dom/SelectElement.cpp:
2991 (WebCore::nextValidIndex): Moved from elsewhere in the file to be used by other routines.
2992 (WebCore::nextSelectableListIndexPageAway): Returns a selectable index one page away from the given index.
2993 (WebCore::nextSelectableListIndex): Implemented with nextValidIndex.
2994 And converted to a normal static function from a private function of SelectElement.
2995 (WebCore::previousSelectableListIndex): Implemented with nextValidIndex.
2996 And converted to a normal static function from a private function of SelectElement.
2997 (WebCore::firstSelectableListIndex): Returns the first selectable index.
2998 (WebCore::lastSelectableListIndex): Returns the last selectable index.
2999 (WebCore::SelectElement::menuListDefaultEventHandler): Converted from C cast to C++ cast.
3000 (WebCore::SelectElement::listBoxDefaultEventHandler): Adds support for PageUp/PageDown/Home/End with both single and multiple selection.
3002 * dom/SelectElement.h:
3003 (WebCore::SelectElement::): Remove nextSelectableListIndex() and previousSelectableListIndex().
3005 * rendering/RenderListBox.h: Makes RenderListBox::size public so that PageUp/PageDown behavior can use the actual list size rather than that specified in HTML.
3006 They can differ due to the minimum size imposed by RenderListBox.
3008 2011-04-06 David Hyatt <hyatt@apple.com>
3010 Reviewed by Dan Bernstein.
3012 https://bugs.webkit.org/show_bug.cgi?id=57975
3014 The "More..." link for line clamping no longer shows up in Safari RSS. Fix the isLink() check
3015 to just look at the style, so that it can find the InlineTextBox and not care that it's a child
3016 of the link element and not the line box for the link element itself (since that line box got
3019 * rendering/RenderFlexibleBox.cpp:
3020 (WebCore::RenderFlexibleBox::applyLineClamp):
3022 2011-04-06 Brady Eidson <beidson@apple.com>
3024 Reviewed by Anders Carlsson.
3026 https://bugs.webkit.org/show_bug.cgi?id=57973 and https://bugs.webkit.org/show_bug.cgi?id=57973
3027 WK2 icon database should be able to get a CGImage of a specific size
3029 * platform/graphics/BitmapImage.h:
3030 * platform/graphics/Image.h:
3031 (WebCore::Image::getFirstCGImageRefOfSize):
3033 * platform/graphics/cg/ImageCG.cpp:
3034 (WebCore::BitmapImage::getFirstCGImageRefOfSize): Walk the frames of the image until reaching the
3035 first frame of the requested size.
3037 2011-04-06 Malcolm MacLeod <malcolm.macleod@tshwanedje.com>
3039 Reviewed by Kevin Ollivier.
3041 [wx] Fix cursor handling so that we always call the chrome to set it.
3043 https://bugs.webkit.org/show_bug.cgi?id=57972
3045 * platform/wx/WidgetWx.cpp:
3046 (WebCore::Widget::setCursor):
3048 2011-04-06 David Hyatt <hyatt@apple.com>
3050 Reviewed by Dan Bernstein.
3052 https://bugs.webkit.org/show_bug.cgi?id=41445
3054 Visited links painting with black background. Make sure that if the visited style has
3055 the initial background color (transparent) set that we just use the unvisited color.
3057 Added fast/history/visited-link-background-color.html
3059 * rendering/style/RenderStyle.cpp:
3060 (WebCore::RenderStyle::visitedDependentColor):
3062 2011-04-06 Csaba Osztrogonác <ossy@webkit.org>
3064 Unreviewed Qt buildfix after r83079.
3068 2011-04-06 Dean Jackson <dino@apple.com>
3070 Reviewed by Chris Marrin.
3072 https://bugs.webkit.org/show_bug.cgi?id=56936
3073 Crash in ImplicitAnimation::~ImplicitAnimation
3075 Make sure the style and start time waiting lists
3076 are cleared in the CompositeAnimation destructor. This
3077 way, no running transitions can be left in a state
3078 where they are destroyed as the AnimationControllerPrivate
3081 * page/animation/CompositeAnimation.cpp:
3082 (WebCore::CompositeAnimation::~CompositeAnimation):
3084 2011-04-06 Robert Sesek <rsesek@chromium.org>
3086 Reviewed by Alexey Proskuryakov.
3088 Move code duplicated between the WebKit/mac and WebKit2 down to WebCore because Chromium will need it too
3089 https://bugs.webkit.org/show_bug.cgi?id=54969
3091 No change in behavior; no new tests.
3093 * editing/TextIterator.cpp:
3094 (WebCore::TextIterator::locationAndLengthFromRange): New method from duplicated code in WebKits
3095 * editing/TextIterator.h:
3097 (WebCore::Frame::rangeForPoint): New method from duplicated code in WebKits
3099 2011-04-06 Leandro Gracia Gil <leandrogracia@chromium.org>
3101 Reviewed by Steve Block.
3103 Factoring the creation of 'FunctionOnly' callbacks in JavaScriptCore.
3104 https://bugs.webkit.org/show_bug.cgi?id=57770
3106 Create a template from an existing functionality in JSGeolocationCustom.cpp
3107 to be used by the custom bindings of both Geolocation and the Media Stream API.
3108 V8 version of this bug: https://bugs.webkit.org/show_bug.cgi?id=57760
3110 No new tests. LayoutTests/fast/dom/Geolocation/argument-types.html
3112 * Android.jscbindings.mk:
3117 * WebCore.vcproj/WebCore.vcproj:
3118 * WebCore.xcodeproj/project.pbxproj:
3119 * bindings/js/CallbackFunction.cpp: Added.
3120 (WebCore::checkFunctionOnlyCallback):
3121 * bindings/js/CallbackFunction.h: Added.
3122 (WebCore::createFunctionOnlyCallback):
3123 * bindings/js/JSBindingsAllInOne.cpp:
3124 * bindings/js/JSGeolocationCustom.cpp:
3125 (WebCore::JSGeolocation::getCurrentPosition):
3126 (WebCore::JSGeolocation::watchPosition):
3128 2011-04-06 Alexis Menard <alexis.menard@openbossa.org>
3130 Reviewed by Andreas Kling.
3132 [Qt] Implement fullscreen playback for the GStreamer backend.
3133 https://bugs.webkit.org/show_bug.cgi?id=56826
3135 Implement support for fullscreen playback when building the
3136 Qt port with the GStreamer backend (DEFINES+=USE_GSTREAMER=1).
3137 The implementation is done in FullScreenVideoQt alongside with
3138 the Qt Multimedia support.
3140 No new tests because layout tests cover it. They are not yet activated
3141 but will be any time soon.
3143 * platform/graphics/gstreamer/PlatformVideoWindowPrivate.h:
3144 * platform/graphics/gstreamer/PlatformVideoWindowQt.cpp:
3145 (FullScreenVideoWindow::FullScreenVideoWindow):
3146 (FullScreenVideoWindow::setVideoElement):
3147 (FullScreenVideoWindow::closeEvent):
3148 (FullScreenVideoWindow::keyPressEvent):
3149 (FullScreenVideoWindow::event):
3150 (FullScreenVideoWindow::showFullScreen):
3151 (FullScreenVideoWindow::hideCursor):
3152 (FullScreenVideoWindow::showCursor):
3154 2011-04-06 Ryosuke Niwa <rniwa@webkit.org>
3156 Reviewed by Dimitri Glazkov.
3158 Bundle lineLeftOffset and lineRightOffset as a class
3159 https://bugs.webkit.org/show_bug.cgi?id=57851
3161 Added a new class LineOffsets that encapsulates lineLeftOffset and lineRightOffset.
3162 The patch makes clear that lineLeftOffset and lineRightOffset are never read individually
3163 and only the difference is used to compute the width.
3165 * rendering/RenderBlock.h:
3166 * rendering/RenderBlockLineLayout.cpp:
3167 (WebCore::RenderBlock::skipLeadingWhitespace): Takes LineOffsets instead of two integers.
3168 (WebCore::LineOffsets::LineOffsets): Added.
3169 (WebCore::LineOffsets::width): Added.
3170 (WebCore::LineOffsets::setLeft): Added.
3171 (WebCore::LineOffsets::setRight): Added.
3172 (WebCore::RenderBlock::findNextLineBreak): Calls skipLeadingWhitespace and positionNewFloatOnLine.
3173 (WebCore::RenderBlock::positionNewFloatOnLine): Takes LineOffsets instead of two integers.
3175 2011-04-06 David Hyatt <hyatt@apple.com>
3177 Reviewed by Dan Bernstein.
3179 https://bugs.webkit.org/show_bug.cgi?id=57916
3181 Implement an optimization to the line box tree to cull out most of the intermediate
3182 line boxes that can occur between the root line box and the leaves of the tree (images
3185 RenderInlines now have a boolean member, m_alwaysCreateLineBoxes,
3186 that starts off as false. Only if it gets flipped to true will there be any line boxes
3187 created for that RenderInline.
3189 * page/FocusController.cpp:
3190 (WebCore::FocusController::advanceFocusDirectionally):
3191 Adjust the ordering of updateLayout calls to make sure rects aren't queried unless layout
3194 * page/SpatialNavigation.cpp:
3195 (WebCore::hasOffscreenRect):
3196 (WebCore::nodeRectInAbsoluteCoordinates):
3197 Add asserts in spatial navigation code to catch any future bad queries that might be made
3198 for rectangles without layout being up to date.
3200 * platform/graphics/FloatRect.cpp:
3201 (WebCore::FloatRect::uniteIfNonZero):
3202 * platform/graphics/FloatRect.h:
3203 * platform/graphics/IntRect.cpp:
3204 (WebCore::IntRect::uniteIfNonZero):
3205 * platform/graphics/IntRect.h:
3206 Add a new unite function that is useful for the render tree to FloatRect and IntRect. This
3207 version allows rect unites to happen if either width or height is nonzero.
3209 * rendering/HitTestResult.cpp:
3210 (WebCore::HitTestResult::addNodeToRectBasedTestResult):
3211 Make sure rect-based hit testing properly adds in culled inline ancestors to the set of nodes
3212 if content inside those inlines is hit.
3214 * rendering/InlineBox.h:
3215 (WebCore::InlineBox::logicalFrameRect):
3216 Fix a bug in this function for obtaining the logical frame rect of an inline box.
3218 * rendering/InlineFlowBox.cpp:
3219 (WebCore::InlineFlowBox::addToLine):
3220 addToLine now also checks line gap in the line box tree optimization checks.
3222 (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
3223 (WebCore::InlineFlowBox::computeOverflow):
3224 * rendering/InlineFlowBox.h:
3225 Rewritten to add the text box overflow to the text box itself.
3227 * rendering/InlineTextBox.cpp:
3228 (WebCore::InlineTextBox::destroy):
3229 Destroy has been changed to call a helper function to remove and destroy the line boxes that
3230 is now called from one additional spot.
3232 (WebCore::InlineTextBox::logicalOverflowRect):
3233 (WebCore::InlineTextBox::setLogicalOverflowRect):
3234 Text boxes now cache their own overflow in a global hash table.
3236 (WebCore::InlineTextBox::baselinePosition):
3237 (WebCore::InlineTextBox::lineHeight):
3238 Changed to not assume that the parent line box's renderer is the RenderText's immediate
3239 parent, since intermediate line boxes may have been culled.
3241 (WebCore::InlineTextBox::paint):
3242 Paint now properly checks only the text box overflow instead of the parent line box's overflow.
3244 * rendering/InlineTextBox.h:
3245 (WebCore::InlineTextBox::logicalTopVisualOverflow):
3246 (WebCore::InlineTextBox::logicalBottomVisualOverflow):
3247 (WebCore::InlineTextBox::logicalLeftVisualOverflow):
3248 (WebCore::InlineTextBox::logicalRightVisualOverflow):
3249 New accessors to obtain overflow for inline text boxes.
3251 * rendering/RenderBlock.cpp:
3252 (WebCore::RenderBlock::updateFirstLetter):
3253 updateFirstLetter now removes text boxes from the line box tree before it destroys them, since those
3254 text boxes may not have anything in between them and the block that contains the inline first letter
3257 * rendering/RenderBlockLineLayout.cpp:
3258 (WebCore::RenderBlock::createLineBoxes):
3259 The culling optimization is done here. Only if the RenderInline says that boxes are allowed will they
3262 (WebCore::RenderBlock::layoutInlineChildren):
3263 The state of the RenderInline is updated here, in case it is discovered that line boxes are now needed.
3264 This is done before any lines are built.
3266 * rendering/RenderInline.cpp:
3267 (WebCore::RenderInline::RenderInline):
3268 The new m_alwaysCreateLineBoxes flag has been added to the constructor.
3270 (WebCore::RenderInline::styleDidChange):
3271 An initial update of the m_alwaysCreateLineBoxes happens here for things that can be checked immediately
3272 (like having a layer, borders, padding, margins or backgrounds). Some checks that depend on examining
3273 the RenderInline's parent (including first line styles) happen later in layoutInlineChildren.
3275 (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
3276 The function called by layoutInlineChildren to check parent and child style differences (e.g., font,
3277 vertical alignment, line height, etc.).
3279 (WebCore::RenderInline::absoluteRects):
3280 (WebCore::RenderInline::culledInlineAbsoluteRects):
3281 absoluteRects calls culledInlineAbsoluteRects when m_alwaysCreateLineBoxes is false.
3283 (WebCore::RenderInline::absoluteQuads):
3284 (WebCore::RenderInline::culledInlineAbsoluteQuads):
3285 absoluteQuads calls culledInlineAbsoluteQuads when m_alwaysCreateLineBoxes is false.
3287 (WebCore::RenderInline::offsetLeft):
3288 (WebCore::RenderInline::offsetTop):
3289 offsetLeft and offsetTop now check descendant renderers when m_alwaysCreateLineBoxes is false.
3291 (WebCore::RenderInline::linesBoundingBox):
3292 (WebCore::RenderInline::culledInlineBoundingBox):
3293 lineBoundingBox calls culledInlineBoundingBox when m_alwaysCreateLineBoxes is false.
3295 (WebCore::RenderInline::culledInlineFirstLineBox):
3296 (WebCore::RenderInline::culledInlineLastLineBox):
3297 Helpers that return the first and last line box descendants. Used by firstLineBoxIncludingCulling and
3298 lastLineBoxIncludingCulling (which are in turn called by offsetLeft and offsetTop).
3300 (WebCore::RenderInline::culledInlineVisualOverflowBoundingBox):
3301 (WebCore::RenderInline::linesVisualOverflowBoundingBox):
3302 linesVisualOverflowBoundingBox calls culledInlineVisualOverflowBoundingBox when m_alwaysCreateLineBoxes is false.
3304 (WebCore::RenderInline::clippedOverflowRectForRepaint):
3305 The initial bailout check is now done using firstLineBoxIncludingCulling instead of just firstLineBox.
3307 (WebCore::RenderInline::dirtyLineBoxes):
3308 dirtyLineBoxes now crawls into descendants to figure out which root lines to dirty when
3309 m_alwaysCreateLineBoxes is false.
3311 (WebCore::RenderInline::createAndAppendInlineFlowBox):
3312 Clear the m_alwaysCreateLineBoxes if a box gets added anyway. This happens for leaf inline flows and also
3313 when line-box-contain is set to an unusual value.
3315 (WebCore::RenderInline::addFocusRingRects):
3316 Used culledInlineAbsoluteRects in place of the line box walk when m_alwaysCreateLineBoxes is false.
3318 * rendering/RenderInline.h:
3319 (WebCore::RenderInline::firstLineBoxIncludingCulling):
3320 (WebCore::RenderInline::lastLineBoxIncludingCulling):
3321 Helpers used in a few places (like offsetLeft and offsetTop), mostly in places where the existence of a box
3322 is all that needs checking.
3324 (WebCore::RenderInline::alwaysCreateLineBoxes):
3325 (WebCore::RenderInline::setAlwaysCreateLineBoxes):
3326 Functions for getting and setting the m_alwaysCreateLineBoxes flag.
3328 * rendering/RenderLineBoxList.cpp:
3329 (WebCore::RenderLineBoxList::dirtyLinesFromChangedChild):
3330 Modified to use firstLineBoxIncludingCulling and lastLineBoxIncludingCulling to ensure the right set of
3333 * rendering/RenderText.cpp:
3334 (WebCore::RenderText::removeAndDestroyTextBoxes):
3335 New helper invoked by destroy and also from updateFirstLetter.
3337 (WebCore::RenderText::destroy):
3338 Changed to call removeAndDestroyTextBoxes.
3340 (WebCore::RenderText::absoluteRects):
3341 Fixed to be properly physical instead of logical.
3343 (WebCore::RenderText::linesVisualOverflowBoundingBox):
3344 New implementation for RenderText that gives the bounding box of the text boxes including overflow from
3345 shadows, glyphs, text-stroke, etc. Used by RenderInline::culledInlineVisualOverflowBoundingBox.
3347 * rendering/RenderText.h:
3348 * rendering/svg/RenderSVGInline.cpp:
3349 (WebCore::RenderSVGInline::RenderSVGInline):
3350 RenderSVGInline always sets m_alwaysCreateLineBoxes to true so that SVG is unaffected by this optimization.
3352 * rendering/svg/SVGRootInlineBox.cpp:
3353 (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes):
3354 (WebCore::SVGRootInlineBox::layoutChildBoxes):
3355 Move the isInlineFlowBox asserts to after the generated content skips, since the generated content boxes are
3356 now InlineTextBoxes (the enclosing InlineFlowBoxes got culled).
3358 2011-04-05 Enrica Casucci <enrica@apple.com>
3360 Reviewed by Darin Adler.
3362 REGRESSION: Drag & Drop Gmail Attachments doesn't work.
3363 https://bugs.webkit.org/show_bug.cgi?id=57909
3364 <rdar://problem/9103220>
3366 In WebKit2 we cannot rely on the value returned by platformData() that
3367 on Mac returns an NSDraggingInfo object. This is available only in the UI
3368 process. Therefore we should use m_pasteboard instead.
3369 We cannot change what platformData() returns on Mac, since there are
3370 delegate methods that receive a NSDraggingInfo object (only in WebKit).
3372 * platform/DragData.h:
3373 (WebCore::DragData::pasteboard): Added.
3374 * platform/mac/ClipboardMac.mm:
3375 (WebCore::Clipboard::create): Changed to use pasteboard() instead of platformData().
3376 * platform/mac/DragDataMac.mm:
3377 (WebCore::DragData::asColor): Replaced references to m_platformData with m_pasteboard.
3378 (WebCore::DragData::asURL): Same as above.
3380 2011-04-06 Benjamin Poulain <benjamin.poulain@nokia.com>
3382 Reviewed by Darin Adler.
3384 ClipboardWin has unused variables "ExceptionCode ec"
3385 https://bugs.webkit.org/show_bug.cgi?id=57952
3387 Remove the unused variable.
3389 * platform/win/ClipboardWin.cpp:
3390 (WebCore::ClipboardWin::declareAndWriteDragImage):
3391 (WebCore::ClipboardWin::writePlainText):
3393 2011-04-06 Ryosuke Niwa <rniwa@webkit.org>
3395 Reviewed by Dimitri Glazkov.
3397 Split getBorderPaddingMargin into two functions
3398 https://bugs.webkit.org/show_bug.cgi?id=57947
3400 * rendering/RenderBlockLineLayout.cpp:
3401 (WebCore::borderPaddingMarginStart): Extracted from getBorderPaddingMargin.
3402 (WebCore::borderPaddingMarginEnd): Ditto.
3403 (WebCore::inlineLogicalWidth): Calls borderPaddingMarginStart and borderPaddingMarginEnd.
3404 (WebCore::RenderBlock::findNextLineBreak): Ditto.
3406 2011-04-06 MORITA Hajime <morrita@google.com>
3408 Reviewed by Dimitri Glazkov.
3410 [Refactoring] <progress> should not have manual layout code.
3411 https://bugs.webkit.org/show_bug.cgi?id=57801
3413 - Simplified RenderProgress, removing its custom layout code
3414 - Introducing ProgressValueElement and ProgressBarElement, replacing
3415 ProgressBarValueElement.
3417 Now the structure is almost identical to <meter>,
3419 - RenderProgress has animated painting, thus manages its own timer.
3420 - Both ProgressValueElement and ProgressBarElement has pseudo classes
3421 which don't changes during its lifetime.
3428 * WebCore.vcproj/WebCore.vcproj:
3429 * WebCore.xcodeproj/project.pbxproj:
3432 (progress::-webkit-progress-bar):
3433 (progress::-webkit-progress-value):
3434 * html/HTMLProgressElement.cpp:
3435 (WebCore::HTMLProgressElement::~HTMLProgressElement):
3436 (WebCore::HTMLProgressElement::create):
3437 (WebCore::HTMLProgressElement::attach):
3438 (WebCore::HTMLProgressElement::didElementStateChange):
3439 (WebCore::HTMLProgressElement::createShadowSubtree):
3440 * html/HTMLProgressElement.h:
3441 * html/shadow/ProgressShadowElement.cpp: Copied from Source/WebCore/html/shadow/ProgressBarValueElement.h.
3442 (WebCore::ProgressShadowElement::ProgressShadowElement):
3443 (WebCore::ProgressShadowElement::progressElement):
3444 (WebCore::ProgressShadowElement::rendererIsNeeded):
3445 (WebCore::ProgressBarElement::shadowPseudoId):
3446 (WebCore::ProgressValueElement::shadowPseudoId):
3447 (WebCore::ProgressValueElement::setWidthPercentage):
3448 * html/shadow/ProgressShadowElement.h: Renamed from Source/WebCore/html/shadow/ProgressBarValueElement.h.
3449 (WebCore::ProgressBarElement::ProgressBarElement):
3450 (WebCore::ProgressBarElement::create):
3451 (WebCore::ProgressValueElement::ProgressValueElement):
3452 (WebCore::ProgressValueElement::create):
3453 * rendering/RenderProgress.cpp:
3454 (WebCore::RenderProgress::RenderProgress):
3455 (WebCore::RenderProgress::updateFromElement):
3456 (WebCore::RenderProgress::animationTimerFired):
3457 * rendering/RenderProgress.h:
3458 (WebCore::RenderProgress::requiresForcedStyleRecalcPropagation):
3459 (WebCore::RenderProgress::canHaveChildren):
3461 2011-04-06 Mario Sanchez Prada <msanchez@igalia.com>
3463 Reviewed by Chris Fleizach.
3465 [GTK] Do not reference AccessibilityRenderObject from platform dependent code
3466 https://bugs.webkit.org/show_bug.cgi?id=57955
3468 Do not reference AccessibilityRenderObject from platform specific code
3470 Added new virtual functions to AccessibilityObject.h and removed
3471 explicit references to AccessibilityRenderObject from GTK code.
3473 * accessibility/AccessibilityObject.h:
3474 (WebCore::AccessibilityObject::renderer): New virtual method,
3475 returning 0 by default. Overriden by AccessibilityRenderObject.
3476 (WebCore::AccessibilityObject::correspondingLabelForControlElement):
3477 New virtual method, returning 0 by default. It complements the
3478 already present method correspondingControlForLabelElement().
3480 * accessibility/AccessibilityRenderObject.h:
3481 (WebCore::AccessibilityRenderObject::renderer): Made virtual.
3483 * accessibility/gtk/AXObjectCacheAtk.cpp:
3484 (WebCore::emitTextChanged): Reference AccessibilityObject,
3485 instead of AccessibilityRenderObject.
3486 (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
3489 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
3490 (webkit_accessible_get_name): Do not reference
3491 AccessibilityRenderObject.
3492 (webkit_accessible_get_description): Ditto.
3493 (setAtkRelationSetFromCoreObject): Ditto.
3494 (optionFromList): Ditto.
3495 (optionFromSelection): Ditto.
3496 (webkit_accessible_selection_clear_selection): Ditto.
3497 (webkit_accessible_selection_get_selection_count): Ditto.
3498 (webkit_accessible_selection_select_all_selection): Ditto.
3499 (textForObject): Ditto.
3500 (webkit_accessible_text_get_text): Ditto.
3501 (getPangoLayoutForAtk): Ditto.
3502 (webkit_accessible_text_get_caret_offset): Ditto.
3503 (baselinePositionForRenderObject): Ditto.
3504 (getAttributeSetForAccessibilityObject): Ditto.
3505 (accessibilityObjectLength): Ditto.
3506 (getSelectionOffsetsForObject): Ditto.
3507 (webkit_accessible_text_set_selection): Ditto.
3508 (webkit_accessible_text_set_caret_offset): Ditto.
3509 (webkit_accessible_table_get_caption): Ditto.
3510 (getInterfaceMaskFromObject): Ditto.
3512 * accessibility/gtk/WebKitAccessibleHyperlink.cpp:
3513 (getRangeLengthForObject): Ditto.
3515 Removed unused renderer() method from AccessibilityMenuList.
3517 * accessibility/AccessibilityMenuList.h: Removed unused method.
3518 * accessibility/AccessibilityMenuList.cpp: Removed unused method.
3520 2011-04-06 Alexander Pavlov <apavlov@chromium.org>
3522 Reviewed by Pavel Feldman.
3524 Web Inspector: Javascipt warning link expand and overlap with icons in js console
3525 https://bugs.webkit.org/show_bug.cgi?id=57939
3527 * inspector/front-end/inspector.js:
3528 (WebInspector.linkifyURLAsNode):
3530 2011-04-06 Alexander Pavlov <apavlov@chromium.org>
3532 Reviewed by Pavel Feldman.
3534 Web Inspector: Beautify parameter names in Inspector.json (CSS domain)
3535 https://bugs.webkit.org/show_bug.cgi?id=57931
3537 * inspector/Inspector.json:
3539 2011-04-06 Jia Pu <jpu@apple.com>
3541 Reviewed by Darin Adler.
3543 [Mac] WebCore need to notify AppKit spell checker after user has modified autocorrected text.
3544 https://bugs.webkit.org/show_bug.cgi?id=57665
3545 <rdar://problem/7350477>
3547 We need to track how user modified an autocorrected word. If he changed it back to original
3548 text, we want to record AutocorrectionReverted response. And if he changed it to something
3549 else, we want to record AutocorrectionEdited response.
3551 To achieve this, we need to distringuish between text replacement caused by autocorrection
3552 from that due to other causes, such as reversion, text substitution, etc. So we added a new
3553 marker type "Autocorrected". We also need to be able to check for correction, even when we
3554 don't intend to actually carry out replacement. For this, we introduced a new TextCheckingOption
3555 value, "CheckForCorrection".
3557 We also added DocumentMarkerController::markersInRange() to retrieve a vector of markers in
3558 specified range, and of specified type.
3560 * dom/DocumentMarker.h:
3561 * dom/DocumentMarkerController.cpp:
3562 (WebCore::DocumentMarkerController::markersInRange):
3563 (WebCore::DocumentMarkerController::hasMarkers):
3564 * dom/DocumentMarkerController.h:
3565 * editing/Editor.cpp:
3566 (WebCore::markerTypesForAutocorrection):
3567 (WebCore::markersHaveIdenticalDescription):
3568 (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
3569 (WebCore::Editor::recordSpellcheckerResponseForModifiedCorrection):
3570 (WebCore::Editor::changeBackToReplacedString):
3571 (WebCore::Editor::markMisspellingsAndBadGrammar):
3572 (WebCore::Editor::applyCorrectionPanelInfo):
3573 (WebCore::Editor::unappliedSpellCorrection):
3574 (WebCore::Editor::textCheckingTypeMaskFor):
3576 * editing/SpellingCorrectionCommand.cpp:
3577 (WebCore::SpellingCorrectionCommand::doApply):
3579 2011-04-06 Sheriff Bot <webkit.review.bot@gmail.com>
3581 Unreviewed, rolling out r83045.
3582 http://trac.webkit.org/changeset/83045
3583 https://bugs.webkit.org/show_bug.cgi?id=57953
3585 Broke win layout tests (Requested by podivilov on #webkit).
3588 * inspector/front-end/DebuggerPresentationModel.js:
3589 (WebInspector.DebuggerPresentationModel.prototype._addScript):
3590 (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
3592 2011-04-06 Ryosuke Niwa <rniwa@webkit.org>
3594 Moved the declaration of positionNewFloatOnLine in RenderBlock.h after r83042.
3596 * rendering/RenderBlock.h:
3598 2011-03-27 Diego Gonzalez <diegohcg@webkit.org>
3600 Reviewed by Kenneth Rohde Christiansen.
3602 [Qt] Re-draw the <input> fields for Qt Mobile Theme to do not override elements already styled.
3603 https://bugs.webkit.org/show_bug.cgi?id=57007
3605 * CodeGenerators.pri:
3606 * css/themeQtMobile.css: Removed.
3607 * platform/qt/QtMobileWebStyle.cpp:
3608 (drawRectangularControlBackground):
3609 (QtMobileWebStyle::drawPrimitive):
3610 (QtMobileWebStyle::drawComplexControl):
3611 * platform/qt/QtMobileWebStyle.h:
3612 * platform/qt/RenderThemeQt.cpp:
3613 (WebCore::RenderThemeQt::isControlStyled):
3614 (WebCore::RenderThemeQt::paintTextField):
3616 2011-04-06 Jia Pu <jpu@apple.com>
3618 Reviewed by Darin Adler.
3620 [Mac] When autocorrection occurs without showing correction panel, WebCore need to post accessibility notification.
3621 https://bugs.webkit.org/show_bug.cgi?id=57800
3622 <rdar://problem/9218223>
3624 Defined a new accessibility notification type, AXAutocorrectionOccured. Editor::markAllMisspellingsAndBadGrammarInRanges()
3625 now posts said notification when any autocorrection or text replacement (e.g. replacing "(c)" with copyright mark) takes place.
3627 * accessibility/AXObjectCache.h:
3628 * accessibility/chromium/AXObjectCacheChromium.cpp:
3629 (WebCore::AXObjectCache::postPlatformNotification):
3630 * accessibility/mac/AXObjectCacheMac.mm:
3631 (WebCore::AXObjectCache::postPlatformNotification):
3632 * editing/Editor.cpp:
3633 (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
3635 2011-04-06 Martin Robinson <mrobinson@igalia.com>
3637 Build fix for debug Cairo builds.
3639 * platform/graphics/cairo/PlatformContextCairo.cpp:
3640 (WebCore::PlatformContextCairo::pushImageMask): Update the reference to m_maskInformation.
3642 2011-04-06 Diego Gonzalez <diegohcg@webkit.org>
3644 Reviewed by Antonio Gomes.
3646 [Qt] Style fix for QtMobileWebStyle.h
3647 https://bugs.webkit.org/show_bug.cgi?id=57708
3649 * platform/qt/QtMobileWebStyle.h:
3651 2011-04-06 Andras Becsi <abecsi@webkit.org>
3653 Reviewed by Darin Adler.
3655 Invalid color #{predefined colorName} is accepted by the CSS parser.
3656 https://bugs.webkit.org/show_bug.cgi?id=15360
3658 Test: fast/css/invalid-predefined-color.html
3660 * css/CSSGrammar.y: Remove superfluous hexcolor production.
3661 * css/tokenizer.flex: A hexadecimal number should consist of [a-fA-F0-9] values ({h}).
3663 2011-03-30 Pavel Podivilov <podivilov@chromium.org>
3665 Reviewed by Pavel Feldman.
3667 Web Inspector: add test for script formatter worker.
3668 https://bugs.webkit.org/show_bug.cgi?id=57447
3670 Test: inspector/debugger/script-formatter.html
3673 * inspector/front-end/DebuggerPresentationModel.js:
3674 (WebInspector.DebuggerPresentationModel):
3675 (WebInspector.DebuggerPresentationModel.prototype.toggleFormatSourceFiles):
3677 2011-04-06 Martin Robinson <mrobinson@igalia.com>
3679 Reviewed by Xan Lopez.
3681 [Cairo] Hide the details of image masking in PlatformContextCairo
3682 https://bugs.webkit.org/show_bug.cgi?id=57878
3684 No new tests. This is just a refactor.
3686 * platform/graphics/GraphicsContext.h:
3687 * platform/graphics/cairo/GraphicsContextCairo.cpp:
3688 (WebCore::GraphicsContext::savePlatformState): Call into PlatformContextCairo now to
3689 do the actual cairo_save. Remove information about image masking.
3690 (WebCore::GraphicsContext::restorePlatformState): Call into PlatformContextCairo now to
3691 do the actual cairo_restore. Remove information about image masking.
3692 * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
3693 * platform/graphics/cairo/ImageBufferCairo.cpp:
3694 (WebCore::ImageBuffer::clip): Use PlatformContextCairo here now.
3695 * platform/graphics/cairo/PlatformContextCairo.cpp:
3696 (WebCore::PlatformContextCairo::restore): Added.
3697 (WebCore::PlatformContextCairo::save): Added.
3698 (WebCore::PlatformContextCairo::pushImageMask): Added.
3699 * platform/graphics/cairo/PlatformContextCairo.h:
3700 (WebCore::ImageMaskInformation::update): Moved from GraphicsContextPlatformPrivateCairo.h.
3701 (WebCore::ImageMaskInformation::isValid): Ditto.
3702 (WebCore::ImageMaskInformation::maskSurface): Ditto.
3703 (WebCore::ImageMaskInformation::maskRect): Ditto.
3705 2011-04-02 Diego Gonzalez <diegohcg@webkit.org>
3707 Reviewed by Csaba Osztrogonác.
3709 [Qt] Radio buttons are showing wrong with mobile theme
3710 https://bugs.webkit.org/show_bug.cgi?id=57706
3712 * platform/qt/QtMobileWebStyle.cpp:
3713 (QtMobileWebStyle::drawRadio):
3715 2011-04-06 Ryosuke Niwa <rniwa@webkit.org>
3717 Reviewed by Eric Seidel.
3719 Move RenderBlock::positionNewFloatOnLine to RenderBlockLineLayout.cpp
3720 https://bugs.webkit.org/show_bug.cgi?id=57943
3722 * rendering/RenderBlock.cpp: Removed positionNewFloatOnLine.
3723 * rendering/RenderBlockLineLayout.cpp:
3724 (WebCore::RenderBlock::positionNewFloatOnLine): Moved from RenderBlock.cpp
3726 2011-04-05 Diego Gonzalez <diegohcg@webkit.org>
3728 Buildfix after r82125.
3730 [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
3731 https://bugs.webkit.org/show_bug.cgi?id=57087
3733 * platform/qt/QtMobileWebStyle.cpp:
3734 (QtMobileWebStyle::findChecker):
3735 (QtMobileWebStyle::findRadio):
3736 (QtMobileWebStyle::findComboButton):
3738 2011-04-06 Pavel Podivilov <podivilov@chromium.org>
3740 Reviewed by Yury Semikhatsky.
3742 Web Inspector: inline script imports in ScriptFormatterWorker.js so it works in Safari release.
3743 https://bugs.webkit.org/show_bug.cgi?id=57641
3745 * WebCore.xcodeproj/project.pbxproj:
3746 * gyp/streamline-inspector-source.sh:
3747 * inspector/combine-javascript-resources.pl: Renamed from Source/WebCore/combine-javascript-resources.
3748 * inspector/inline-javascript-imports.py: Added.
3750 2011-04-06 Ryosuke Niwa <rniwa@webkit.org>
3752 Reviewed by Eric Seidel.
3754 REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
3755 https://bugs.webkit.org/show_bug.cgi?id=57872
3757 r46914 initially introduced a regression by replacing calls to styleAtPosition by editingStyleAtPosition
3758 because editingStyleAtPosition did not avoid tab span to obtain the computed style unlike styleAtPosition.
3760 r46914 also introduced a regression by cloning hierarchy under new block at the insertion position without
3761 avoiding the tab span.
3763 Fixed the both regressions by avoiding tab spans when computing the editing style and when cloning hierarchy.
3765 Test: editing/inserting/insert-paragraph-separator-tab-span.html
3767 * editing/EditingStyle.cpp:
3768 (WebCore::EditingStyle::init): Always avoid a tab span when computing the editing style.
3769 * editing/InsertParagraphSeparatorCommand.cpp:
3770 (WebCore::InsertParagraphSeparatorCommand::doApply): Avoid cloning tab spans and inserting a paragraph
3771 separator into a paragraph separator.
3773 2011-04-06 Levi Weintraub <leviw@chromium.org>
3775 Reviewed by Ryosuke Niwa.
3777 Add member functions for determining line/paragraph separation to InlineIterator
3778 https://bugs.webkit.org/show_bug.cgi?id=57938
3780 Adding atTextParagraphSeparator and atParagraphSeparator inline convenience functions to
3781 InlineIterator, where it makes far more sense for them to be. Also moving
3782 shouldPreserveNewline to RenderObject and renaming it preservesNewline.
3784 No new tests as this provides no new functionality.
3786 * rendering/InlineIterator.h:
3787 (WebCore::InlineIterator::atTextParagraphSeparator):
3788 (WebCore::InlineIterator::atParagraphSeparator):
3789 * rendering/RenderBlockLineLayout.cpp:
3790 (WebCore::RenderBlock::requiresLineBox):
3791 (WebCore::RenderBlock::findNextLineBreak):
3792 * rendering/RenderObject.h:
3793 (WebCore::RenderObject::preservesNewline):
3795 2011-04-05 Alexander Pavlov <apavlov@chromium.org>
3797 Reviewed by Pavel Feldman.
3799 Web Inspector: Range insertNode function does not update content in the inspector
3800 https://bugs.webkit.org/show_bug.cgi?id=57829
3802 * inspector/InspectorDOMAgent.cpp:
3803 (WebCore::InspectorDOMAgent::pushChildNodesToFrontend):
3804 (WebCore::InspectorDOMAgent::buildArrayForContainerChildren):
3806 2011-04-06 Alejandro G. Castro <alex@igalia.com>
3808 Fix GTK3 compilation after r82962.
3810 * platform/gtk/RenderThemeGtk3.cpp:
3811 (WebCore::paintToggle):
3812 (WebCore::renderButton):
3813 (WebCore::RenderThemeGtk::paintMenuList):
3814 (WebCore::RenderThemeGtk::paintTextField):
3815 (WebCore::RenderThemeGtk::paintSliderTrack):
3816 (WebCore::RenderThemeGtk::paintSliderThumb):
3817 (WebCore::RenderThemeGtk::paintProgressBar):
3818 (WebCore::paintSpinArrowButton):
3819 * platform/gtk/ScrollbarThemeGtk3.cpp:
3820 (WebCore::ScrollbarThemeGtk::paintTrackBackground):
3821 (WebCore::ScrollbarThemeGtk::paintScrollbarBackground):
3822 (WebCore::ScrollbarThemeGtk::paintThumb):
3823 (WebCore::ScrollbarThemeGtk::paintButton):
3825 2011-04-06 Andrey Kosyakov <caseq@chromium.org>
3827 Reviewed by Yury Semikhatsky.
3829 Web Inspector: [Extensions API] remove inspectedPage.* events
3830 https://bugs.webkit.org/show_bug.cgi?id=57763
3832 - Removed webInspector.inspectedPage.* events
3833 - moved onNavigated to webInspector.resources
3835 * inspector/front-end/ExtensionAPI.js:
3836 (WebInspector.injectedExtensionAPI):
3837 (WebInspector.injectedExtensionAPI.InspectedWindow):
3838 * inspector/front-end/ExtensionAPISchema.json:
3839 * inspector/front-end/ExtensionServer.js:
3840 (WebInspector.ExtensionServer.prototype.notifyInspectedURLChanged):
3841 * inspector/front-end/inspector.js:
3842 (WebInspector.domContentEventFired):
3843 (WebInspector.loadEventFired):
3844 (WebInspector.inspectedURLChanged):
3846 2011-04-06 Joseph Pecoraro <joepeck@webkit.org>
3848 Reviewed by Antti Koivisto.
3850 Add <head> to the simpleUserAgentStyleSheet
3851 https://bugs.webkit.org/show_bug.cgi?id=57915
3853 * css/CSSStyleSelector.cpp:
3854 (WebCore::elementCanUseSimpleDefaultStyle): add head to the
3855 simple stylesheet, display:none.
3857 2011-04-05 Mikhail Naganov <mnaganov@chromium.org>
3859 Reviewed by Pavel Feldman.
3861 Web Inspector: [Chromium] Add layout test for Summary view of detailed heap snapshots.
3862 https://bugs.webkit.org/show_bug.cgi?id=57856
3864 Test: inspector/profiler/detailed-heapshots-summary.html
3866 * inspector/front-end/DataGrid.js:
3867 (WebInspector.DataGrid):
3868 * inspector/front-end/DetailedHeapshotGridNodes.js:
3869 (WebInspector.HeapSnapshotGridNode.prototype._populate.doPopulate):
3870 (WebInspector.HeapSnapshotGridNode.prototype._populate):
3871 (WebInspector.HeapSnapshotGridNode.prototype.populateChildren):
3872 (WebInspector.HeapSnapshotGridNode.prototype.sort.doSort):
3873 (WebInspector.HeapSnapshotGridNode.prototype.sort):
3874 (WebInspector.HeapSnapshotDiffNode.prototype.populateChildren):
3875 * inspector/front-end/DetailedHeapshotView.js:
3876 (WebInspector.HeapSnapshotSortableDataGrid.prototype.sortingChanged):
3877 * inspector/front-end/ProfilesPanel.js:
3878 (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot.doParse):
3879 (WebInspector.ProfilesPanel.prototype._finishHeapSnapshot):
3881 2011-04-06 Anders Bakken <agbakken@gmail.com>
3883 Reviewed by David Levin.
3885 [Qt] SmartReplaceQt.cpp has coding-style errors
3886 https://bugs.webkit.org/show_bug.cgi?id=40261
3888 This patch does not require new test cases.
3890 * editing/qt/SmartReplaceQt.cpp:
3891 (WebCore::isCharacterSmartReplaceExempt):
3893 2011-04-06 Naoki Takano <takano.naoki@gmail.com>
3895 Reviewed by Ryosuke Niwa.
3897 REGRESSION(r81328): Null pointer crash in canAppendNewLineFeed when selection isn't inside an editable element
3898 https://bugs.webkit.org/show_bug.cgi?id=57755
3900 Test: editing/execCommand/insert-line-break-onload.html
3902 * editing/TypingCommand.cpp:
3903 (WebCore::canAppendNewLineFeed): Added null pointer check for rootEditableElement().
3905 2011-04-05 Antti Koivisto <antti@apple.com>
3907 Reviewed by Cameron Zwarich.
3909 Avoid calling currentTime() from FrameView::adjustedDeferredRepaintDelay() when repaints are deferred
3910 https://bugs.webkit.org/show_bug.cgi?id=57914
3912 Don't call adjustedDeferredRepaintDelay unnecessarily.
3914 * page/FrameView.cpp:
3915 (WebCore::FrameView::repaintContentRectangle):
3916 (WebCore::FrameView::adjustedDeferredRepaintDelay):
3918 2011-04-05 Steve VanDeBogart <vandebo@chromium.org>
3920 Reviewed by David Levin.
3922 Update call to SkAdvancedTypefaceMetrics to new API.
3923 https://bugs.webkit.org/show_bug.cgi?id=57887
3925 * platform/graphics/chromium/FontPlatformDataLinux.cpp:
3926 (WebCore::FontPlatformData::emSizeInFontUnits):
3928 2011-04-05 Alexey Proskuryakov <ap@apple.com>
3930 Reviewed by Darin Adler.
3932 Rename event dispatching functions after form event removal
3933 https://bugs.webkit.org/show_bug.cgi?id=57908
3935 * dom/InputElement.cpp:
3936 (WebCore::InputElement::setValueFromRenderer):
3938 (WebCore::Node::dispatchChangeEvent):
3939 (WebCore::Node::dispatchInputEvent):
3940 (WebCore::Node::defaultEventHandler):
3942 * html/HTMLFormControlElement.cpp:
3943 (WebCore::HTMLFormControlElement::dispatchFormControlChangeEvent):
3944 (WebCore::HTMLFormControlElement::dispatchFormControlInputEvent):
3945 (WebCore::HTMLTextFormControlElement::dispatchFormControlChangeEvent):
3946 Renamed "events" to "event", since there is only one event to dispatch now.
3948 2011-04-05 Anders Bakken <agbakken@gmail.com>
3950 Reviewed by David Levin.
3952 [Qt] DragControllerQt.cpp has coding-style errors
3953 https://bugs.webkit.org/show_bug.cgi?id=40258
3955 This patch does not require new test cases.
3957 * page/qt/DragControllerQt.cpp:
3958 (WebCore::DragController::dragOperation):
3960 2011-04-05 Steve VanDeBogart <vandebo@chromium.org>
3962 Reviewed by David Levin.
3964 Update deprecated include: platform_canvas_win.h to platform_canvas.h.
3965 https://bugs.webkit.org/show_bug.cgi?id=57896
3967 * platform/graphics/chromium/FontChromiumWin.cpp:
3969 2011-04-05 Darin Adler <darin@apple.com>
3971 Try to fix Leopard bots.
3973 * platform/mac/HTMLConverter.mm: Fix #if back the way Alexey seems
3974 to have intended it.
3976 2011-04-05 Darin Adler <darin@apple.com>
3978 Try to fix Leopard bots.
3980 * platform/mac/HTMLConverter.mm: Move declarations of new functions
3981 inside the appropriate #if.
3983 2011-04-05 Adrienne Walker <enne@google.com>
3985 Reviewed by Tony Chang.
3987 Correctly set color when using skia's fillRoundedRect.
3988 https://bugs.webkit.org/show_bug.cgi?id=57907
3990 * platform/graphics/skia/GraphicsContextSkia.cpp:
3991 (WebCore::GraphicsContext::fillRoundedRect):
3993 2011-04-05 Alexey Proskuryakov <ap@apple.com>
3995 Reviewed by Darin Adler.
3997 Move attributedStringFromRange down to WebCore
3998 https://bugs.webkit.org/show_bug.cgi?id=57905
4000 No change in behavior, so no new tests.
4002 Also tweaked HTMLConverter to not use methods defined in WebKit.
4005 * WebCore.xcodeproj/project.pbxproj:
4006 * platform/mac/HTMLConverter.h:
4007 * platform/mac/HTMLConverter.mm:
4008 (-[WebHTMLConverter _newTabForElement:]):
4009 (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
4010 (+[WebHTMLConverter editingAttributedStringFromRange:]):
4011 (fileWrapperForURL):
4012 (fileWrapperForElement):
4013 * platform/mac/PasteboardMac.mm:
4014 (WebCore::Pasteboard::writeSelection):
4015 * platform/mac/WebNSAttributedStringExtras.h: Copied from Source/WebKit/mac/Misc/WebNSAttributedStringExtras.h.
4016 * platform/mac/WebNSAttributedStringExtras.mm: Copied from Source/WebKit/mac/Misc/WebNSAttributedStringExtras.mm.
4017 (WebCore::attributedStringByStrippingAttachmentCharacters):
4019 2011-04-05 Simon Fraser <simon.fraser@apple.com>
4021 Reviewed by Darin Adler.
4023 Rename variables in border drawing code for readability
4024 https://bugs.webkit.org/show_bug.cgi?id=57894
4026 * rendering/RenderObject.cpp:
4027 (WebCore::RenderObject::drawLineForBoxSide):
4028 (WebCore::RenderObject::drawBoxSideFromPath):
4029 (WebCore::RenderObject::drawArcForBoxSide):
4031 2011-04-05 Antti Koivisto <antti@apple.com>
4033 Reviewed by Darin Adler.
4035 Defer repaints during style recalc
4036 https://bugs.webkit.org/show_bug.cgi?id=57886
4038 This reduces the need to do (often expensive) platform surface invalidation.
4039 We already do this during layout but style recalculation may trigger
4040 invalidation as well.
4043 (WebCore::Document::recalcStyle):
4045 2011-04-05 Jer Noble <jer.noble@apple.com>
4047 Reviewed by Darin Adler.
4049 HTML5 Player Has no Fullscreen Mode
4050 https://bugs.webkit.org/show_bug.cgi?id=57795
4052 * html/HTMLVideoElement.cpp:
4053 (WebCore::HTMLVideoElement::supportsFullscreen): Call the new ChromeClient API
4054 supportsFullScreenForElement() before the old supportsFullScreenForNode() API.
4056 2011-04-05 Vsevolod Vlasov <vsevik@chromium.org>
4058 Reviewed by Pavel Feldman.
4060 Web Inspector: fix data url's status and timing the network panel.
4061 https://bugs.webkit.org/show_bug.cgi?id=53066
4063 Added data url support for status of network resources.
4065 * English.lproj/localizedStrings.js:
4066 * inspector/front-end/NetworkPanel.js:
4067 (WebInspector.NetworkDataGridNode.prototype._refreshStatusCell):
4068 * inspector/front-end/Resource.js:
4069 (WebInspector.Resource.prototype.isDataURL):
4071 2011-04-04 Vitaly Repeshko <vitalyr@chromium.org>
4073 Reviewed by Adam Barth.
4075 [V8] Keep dirty primitive CSS values alive.
4076 https://bugs.webkit.org/show_bug.cgi?id=57810