[Web Inspector] Fix Sort by Initiator functionality of Network Panel.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-02-20  Pan Deng  <pan.deng@intel.com>
2
3         [Web Inspector] Fix Sort by Initiator functionality of Network Panel.
4         https://bugs.webkit.org/show_bug.cgi?id=109135.
5
6         Reviewed by Pavel Feldman.
7
8         A refactor for request initiator types, and the sort by Initiator functionality 
9         was changed to sort by url and line number that displayed in initiator cell.
10
11         No new tests.
12
13         * inspector/front-end/NetworkPanel.js:
14         (WebInspector.NetworkDataGridNode.prototype._refreshInitiatorCell): save initiator displayedURL and displayedLineNumber
15         (WebInspector.NetworkDataGridNode.InitiatorComparator):
16         * inspector/front-end/NetworkRequest.js:
17
18 2013-02-20  Eric Seidel  <eric@webkit.org>
19
20         WebVTTParser copies character buffer more often than necessary
21         https://bugs.webkit.org/show_bug.cgi?id=103319
22
23         Reviewed by Eric Carlson.
24
25         Previously this codepath was creating a String just to parse the timestamp
26         and then if the timestamp was valid, was creating a second string.
27         I've fixed it to only create one string and use it in both places.
28         I also fixed this codepath to use 8bit strings when possible, per the FIXME.
29
30         * html/track/WebVTTParser.cpp:
31         (WebCore::WebVTTParser::constructTreeFromToken):
32
33 2013-02-20  Mike West  <mkwst@chromium.org>
34
35         Mouseup event does not fire on Scroll Bar
36         https://bugs.webkit.org/show_bug.cgi?id=25811
37
38         Reviewed by Tony Chang.
39
40         Currently, clicking on a scrollbar fires a mousedown event, but not a
41         mouseup event. This causes problems for code like jQuery UI's
42         draggable[1], as the drag starts, but is never cancelled. Other use
43         cases are noted in the slightly old Chromium bug[2].
44
45         If a mouseup event is received after a mousedown event on a scrollbar,
46         this patch dispatches a mouseup event on the same node the mousedown
47         event dispatched on. This matches Gecko's behavior.
48
49         [1]: http://bugs.jqueryui.com/ticket/6925
50         [2]: http://crbug.com/14204
51
52         Tests: fast/scrolling/scrollbar-mousedown-mouseup.html
53                fast/scrolling/scrollbar-mousedown-move-mouseup.html
54
55         * page/EventHandler.cpp:
56         (WebCore::EventHandler::handleMouseReleaseEvent):
57             If a mouseup event follow a mousedown event on a scrollbar,
58             dispatch an event on the same node from which the mousedown event
59             was triggered.
60
61 2013-02-20  Takashi Sakamoto  <tasak@google.com>
62
63         [Refactoring] Make m_state an on-stack object
64         https://bugs.webkit.org/show_bug.cgi?id=109909
65
66         Reviewed by Antti Koivisto.
67
68         Mode m_state, an instance of StyleResolver::State, an on-stack object.
69         The state is only required in styleForElement, styleForKeyframe and
70         so on. No need to keep the state outside of those methods.
71
72         No new tests, because just refactoring.
73
74         * css/BasicShapeFunctions.cpp:
75         (WebCore::convertToLength):
76         (WebCore::basicShapeForValue):
77         * css/BasicShapeFunctions.h:
78         (WebCore):
79         Replaced StyleResolver* with StyleResolver::State&.
80         * css/CSSGradientValue.cpp:
81         (WebCore::CSSGradientValue::gradientWithStylesResolved):
82         * css/CSSGradientValue.h:
83         (CSSGradientValue):
84         Replaced StyleResolver* with StyleResolver::State&.
85         * css/CSSToStyleMap.cpp:
86         (WebCore::CSSToStyleMap::style):
87         (WebCore::CSSToStyleMap::rootElementStyle):
88         (WebCore::CSSToStyleMap::useSVGZoomRules):
89         (WebCore::CSSToStyleMap::styleImage):
90         * css/CSSToStyleMap.h:
91         (WebCore):
92         (WebCore::CSSToStyleMap::CSSToStyleMap):
93         (CSSToStyleMap):
94         Replaced StyleResolver* with StyleResolver::State&.
95         * css/SVGCSSStyleSelector.cpp:
96         (WebCore::StyleResolver::applySVGProperty):
97         Replaced m_state with state which is given as an argument of
98         applySVGProperty.
99         * css/StyleBuilder.cpp:
100         (WebCore::ApplyPropertyExpanding::applyInheritValue):
101         (WebCore::ApplyPropertyExpanding::applyInitialValue):
102         (WebCore::ApplyPropertyExpanding::applyValue):
103         (WebCore::ApplyPropertyDefaultBase::applyInheritValue):
104         (WebCore::ApplyPropertyDefaultBase::applyInitialValue):
105         (WebCore::ApplyPropertyDefaultBase::applyValue):
106         (WebCore::ApplyPropertyDefault::applyValue):
107         (WebCore::ApplyPropertyNumber::applyValue):
108         (WebCore::ApplyPropertyStyleImage::applyValue):
109         (WebCore::ApplyPropertyAuto::applyInheritValue):
110         (WebCore::ApplyPropertyAuto::applyInitialValue):
111         (WebCore::ApplyPropertyAuto::applyValue):
112         (WebCore::ApplyPropertyClip::convertToLength):
113         (WebCore::ApplyPropertyClip::applyInheritValue):
114         (WebCore::ApplyPropertyClip::applyInitialValue):
115         (WebCore::ApplyPropertyClip::applyValue):
116         (WebCore::ApplyPropertyColor::applyInheritValue):
117         (WebCore::ApplyPropertyColor::applyInitialValue):
118         (WebCore::ApplyPropertyColor::applyValue):
119         (WebCore::ApplyPropertyColor::applyColorValue):
120         (WebCore::ApplyPropertyDirection::applyValue):
121         (WebCore::ApplyPropertyLength::applyValue):
122         (WebCore::ApplyPropertyString::applyValue):
123         (WebCore::ApplyPropertyBorderRadius::applyValue):
124         (WebCore::ApplyPropertyFillLayer::applyInheritValue):
125         (WebCore::ApplyPropertyFillLayer::applyInitialValue):
126         (WebCore::ApplyPropertyFillLayer::applyValue):
127         (WebCore::ApplyPropertyComputeLength::applyValue):
128         (WebCore::ApplyPropertyFont::applyInheritValue):
129         (WebCore::ApplyPropertyFont::applyInitialValue):
130         (WebCore::ApplyPropertyFont::applyValue):
131         (WebCore::ApplyPropertyFontSize::applyInheritValue):
132         (WebCore::ApplyPropertyFontSize::applyInitialValue):
133         (WebCore::ApplyPropertyFontSize::applyValue):
134         (WebCore::ApplyPropertyFontWeight::applyValue):
135         (WebCore::ApplyPropertyFontVariantLigatures::applyInheritValue):
136         (WebCore::ApplyPropertyFontVariantLigatures::applyInitialValue):
137         (WebCore::ApplyPropertyFontVariantLigatures::applyValue):
138         (WebCore::ApplyPropertyBorderImage::applyValue):
139         (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue):
140         (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue):
141         (WebCore::ApplyPropertyBorderImageModifier::applyValue):
142         (WebCore::ApplyPropertyBorderImageSource::applyValue):
143         (WebCore::ApplyPropertyCounter::emptyFunction):
144         (WebCore::ApplyPropertyCounter::applyInheritValue):
145         (WebCore::ApplyPropertyCounter::applyValue):
146         (WebCore::ApplyPropertyCursor::applyInheritValue):
147         (WebCore::ApplyPropertyCursor::applyInitialValue):
148         (WebCore::ApplyPropertyCursor::applyValue):
149         (WebCore::ApplyPropertyTextAlign::applyValue):
150         (WebCore::ApplyPropertyTextDecoration::applyValue):
151         (WebCore::ApplyPropertyLineHeight::applyValue):
152         (WebCore::ApplyPropertyPageSize::applyInheritValue):
153         (WebCore::ApplyPropertyPageSize::applyInitialValue):
154         (WebCore::ApplyPropertyPageSize::applyValue):
155         (WebCore::ApplyPropertyTextEmphasisStyle::applyInheritValue):
156         (WebCore::ApplyPropertyTextEmphasisStyle::applyInitialValue):
157         (WebCore::ApplyPropertyTextEmphasisStyle::applyValue):
158         (WebCore::ApplyPropertyAnimation::map):
159         (WebCore::ApplyPropertyAnimation::applyInheritValue):
160         (WebCore::ApplyPropertyAnimation::applyInitialValue):
161         (WebCore::ApplyPropertyAnimation::applyValue):
162         (WebCore::ApplyPropertyOutlineStyle::applyInheritValue):
163         (WebCore::ApplyPropertyOutlineStyle::applyInitialValue):
164         (WebCore::ApplyPropertyOutlineStyle::applyValue):
165         (WebCore::ApplyPropertyResize::applyValue):
166         (WebCore::ApplyPropertyVerticalAlign::applyValue):
167         (WebCore::ApplyPropertyAspectRatio::applyInheritValue):
168         (WebCore::ApplyPropertyAspectRatio::applyInitialValue):
169         (WebCore::ApplyPropertyAspectRatio::applyValue):
170         (WebCore::ApplyPropertyZoom::resetEffectiveZoom):
171         (WebCore::ApplyPropertyZoom::applyInheritValue):
172         (WebCore::ApplyPropertyZoom::applyInitialValue):
173         (WebCore::ApplyPropertyZoom::applyValue):
174         (WebCore::ApplyPropertyDisplay::isValidDisplayValue):
175         (WebCore::ApplyPropertyDisplay::applyInheritValue):
176         (WebCore::ApplyPropertyDisplay::applyInitialValue):
177         (WebCore::ApplyPropertyDisplay::applyValue):
178         (WebCore::ApplyPropertyClipPath::applyValue):
179         (WebCore::ApplyPropertyExclusionShape::applyValue):
180         (WebCore::ApplyPropertyImageResolution::applyInheritValue):
181         (WebCore::ApplyPropertyImageResolution::applyInitialValue):
182         (WebCore::ApplyPropertyImageResolution::applyValue):
183         * css/StyleBuilder.h:
184         (WebCore):
185         (PropertyHandler):
186         (WebCore::PropertyHandler::applyInheritValue):
187         (WebCore::PropertyHandler::applyInitialValue):
188         (WebCore::PropertyHandler::applyValue):
189         Replaced StyleResolver* with StyleResolver::State&.
190         * css/StyleResolver.cpp:
191         (WebCore):
192         (WebCore::StyleResolver::StyleResolver):
193         Removed m_styleMap. Now m_styleMap is an on-stack object.
194         (WebCore::StyleResolver::collectMatchingRules):
195         (WebCore::StyleResolver::collectMatchingRulesForRegion):
196         (WebCore::StyleResolver::sortAndTransferMatchedRules):
197         (WebCore::StyleResolver::matchScopedAuthorRules):
198         (WebCore::StyleResolver::styleSharingCandidateMatchesHostRules):
199         (WebCore::StyleResolver::matchHostRules):
200         (WebCore::StyleResolver::matchAuthorRules):
201         (WebCore::StyleResolver::matchUserRules):
202         (WebCore::StyleResolver::matchUARules):
203         (WebCore::StyleResolver::collectMatchingRulesForList):
204         (WebCore::StyleResolver::sortMatchedRules):
205         (WebCore::StyleResolver::matchAllRules):
206         (WebCore::StyleResolver::initElement):
207         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
208         (WebCore::StyleResolver::canShareStyleWithControl):
209         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
210         (WebCore::StyleResolver::canShareStyleWithElement):
211         (WebCore::StyleResolver::findSiblingForStyleSharing):
212         (WebCore::StyleResolver::locateSharedStyle):
213         (WebCore::StyleResolver::styleForElement):
214         (WebCore::StyleResolver::styleForKeyframe):
215         (WebCore::StyleResolver::keyframeStylesForAnimation):
216         (WebCore::StyleResolver::pseudoStyleForElement):
217         (WebCore::StyleResolver::styleForPage):
218         (WebCore::StyleResolver::defaultStyleForElement):
219         (WebCore::StyleResolver::adjustRenderStyle):
220         (WebCore::StyleResolver::updateFont):
221         (WebCore::StyleResolver::pseudoStyleRulesForElement):
222         (WebCore::StyleResolver::ruleMatches):
223         (WebCore::StyleResolver::checkRegionSelector):
224         (WebCore::StyleResolver::applyProperties):
225         (WebCore::StyleResolver::applyMatchedProperties):
226         (WebCore::StyleResolver::isLeftPage):
227         (WebCore::StyleResolver::applyPropertyWithNullCheck):
228         (WebCore::StyleResolver::applyFontPropertyToStyle):
229         (WebCore::StyleResolver::resolveVariables):
230         (WebCore::StyleResolver::applyProperty):
231         (WebCore::StyleResolver::styleImage):
232         (WebCore::StyleResolver::cachedOrPendingFromValue):
233         (WebCore::StyleResolver::generatedOrPendingFromValue):
234         (WebCore::StyleResolver::setOrPendingFromValue):
235         (WebCore::StyleResolver::cursorOrPendingFromValue):
236         (WebCore::StyleResolver::checkForTextSizeAdjust):
237         (WebCore::StyleResolver::checkForZoomChange):
238         (WebCore::StyleResolver::checkForGenericFamilyChange):
239         (WebCore::StyleResolver::initializeFontStyle):
240         (WebCore::StyleResolver::setFontSize):
241         (WebCore::StyleResolver::colorFromPrimitiveValue):
242         (WebCore::StyleResolver::loadPendingSVGDocuments):
243         (WebCore::StyleResolver::styleShader):
244         (WebCore::StyleResolver::cachedOrPendingStyleShaderFromValue):
245         (WebCore::StyleResolver::loadPendingShaders):
246         (WebCore::StyleResolver::parseCustomFilterTransformParameter):
247         (WebCore::StyleResolver::parseCustomFilterParameter):
248         (WebCore::StyleResolver::parseCustomFilterParameterList):
249         (WebCore::StyleResolver::createCustomFilterOperationWithInlineSyntax):
250         (WebCore::StyleResolver::createCustomFilterOperation):
251         (WebCore::StyleResolver::createFilterOperations):
252         (WebCore::StyleResolver::loadPendingImage):
253         (WebCore::StyleResolver::loadPendingImages):
254         (WebCore::StyleResolver::loadPendingResources):
255         Just replaced m_state with state and added one more parameter to
256         provide the state.
257         (WebCore::StyleResolver::reportMemoryUsage):
258         Since m_state was removed, removed a code for reporting m_state's
259         memory usage.
260         * css/StyleResolver.h:
261         (StyleResolver):
262         (WebCore::StyleResolver::isRightPage):
263         (WebCore::StyleResolver::State::State):
264         (WebCore::StyleResolver::State::document):
265         Since State::m_element is not always available (sometimes, 0),
266         added m_document to State and modified to return the m_document.
267         (WebCore::StyleResolver::State::useSVGZoomRules):
268         Moved StyleResolver to State.
269         (State):
270         * html/canvas/CanvasRenderingContext2D.cpp:
271         (WebCore::CanvasRenderingContext2D::setFont):
272         Moved the code, updating a style by using a given StylePropertySet,
273         to StyleResolver.
274
275 2013-02-20  Ojan Vafai  <ojan@chromium.org>
276
277         AutoTableLayout applies min-width redundantly with RenderTable
278         https://bugs.webkit.org/show_bug.cgi?id=110426
279
280         Reviewed by Emil A Eklund.
281
282         * rendering/AutoTableLayout.cpp:
283         (WebCore::AutoTableLayout::computePreferredLogicalWidths):
284         This code used to do something, but has since been superceded by
285         code in RenderTable::computePreferredLogicalWidths.
286
287 2013-02-20  Dirk Schulze  <krit@webkit.org>
288
289         Enable CANVAS_PATH flag
290         https://bugs.webkit.org/show_bug.cgi?id=108508
291
292         Uneviewed attempt to fix Qt minimal build.
293
294         * html/canvas/DOMPath.h:
295         (WebCore::DOMPath::DOMPath):
296
297 \2013-02-20  Mark Lam  <mark.lam@apple.com>
298
299         Rename DatabaseBackendAsync to DatabaseBackend.
300         https://bugs.webkit.org/show_bug.cgi?id=110422.
301
302         Reviewed by Geoffrey Garen.
303
304         This is a purely cosmetic change to make the naming consistent with
305         the front-end Database.
306
307         No new tests.
308
309         * CMakeLists.txt:
310         * GNUmakefile.list.am:
311         * Modules/webdatabase/ChangeVersionWrapper.cpp:
312         (WebCore::ChangeVersionWrapper::performPreflight):
313         (WebCore::ChangeVersionWrapper::performPostflight):
314         * Modules/webdatabase/Database.cpp:
315         (WebCore::Database::Database):
316         (WebCore::Database::from):
317         (WebCore::Database::backend):
318         * Modules/webdatabase/Database.h:
319         * Modules/webdatabase/DatabaseBackend.cpp: Copied from Source/WebCore/Modules/webdatabase/DatabaseBackendAsync.cpp.
320         (WebCore::DatabaseBackend::DatabaseBackend):
321         (WebCore::DatabaseBackend::openAndVerifyVersion):
322         (WebCore::DatabaseBackend::performOpenAndVerify):
323         (WebCore::DatabaseBackend::close):
324         (WebCore::DatabaseBackend::runTransaction):
325         (WebCore::DatabaseBackend::inProgressTransactionCompleted):
326         (WebCore::DatabaseBackend::scheduleTransaction):
327         (WebCore::DatabaseBackend::scheduleTransactionStep):
328         (WebCore::DatabaseBackend::transactionClient):
329         (WebCore::DatabaseBackend::transactionCoordinator):
330         * Modules/webdatabase/DatabaseBackend.h: Copied from Source/WebCore/Modules/webdatabase/DatabaseBackendAsync.h.
331         * Modules/webdatabase/DatabaseBackendAsync.cpp: Removed.
332         * Modules/webdatabase/DatabaseBackendAsync.h: Removed.
333         * Modules/webdatabase/DatabaseBackendBase.cpp:
334         (WebCore::DatabaseBackendBase::~DatabaseBackendBase):
335         * Modules/webdatabase/DatabaseManager.cpp:
336         * Modules/webdatabase/DatabaseServer.cpp:
337         * Modules/webdatabase/DatabaseTask.cpp:
338         (WebCore::DatabaseTask::DatabaseTask):
339         (WebCore::DatabaseBackend::DatabaseOpenTask::DatabaseOpenTask):
340         (WebCore::DatabaseBackend::DatabaseOpenTask::doPerformTask):
341         (WebCore::DatabaseBackend::DatabaseOpenTask::debugTaskName):
342         (WebCore::DatabaseBackend::DatabaseCloseTask::DatabaseCloseTask):
343         (WebCore::DatabaseBackend::DatabaseCloseTask::doPerformTask):
344         (WebCore::DatabaseBackend::DatabaseCloseTask::debugTaskName):
345         (WebCore::DatabaseBackend::DatabaseTransactionTask::DatabaseTransactionTask):
346         (WebCore::DatabaseBackend::DatabaseTransactionTask::~DatabaseTransactionTask):
347         (WebCore::DatabaseBackend::DatabaseTransactionTask::doPerformTask):
348         (WebCore::DatabaseBackend::DatabaseTransactionTask::debugTaskName):
349         (WebCore::DatabaseBackend::DatabaseTableNamesTask::DatabaseTableNamesTask):
350         (WebCore::DatabaseBackend::DatabaseTableNamesTask::doPerformTask):
351         (WebCore::DatabaseBackend::DatabaseTableNamesTask::debugTaskName):
352         * Modules/webdatabase/DatabaseTask.h:
353         (WebCore::DatabaseTask::database):
354         (DatabaseTask):
355         (WebCore::DatabaseBackend::DatabaseOpenTask::create):
356         (DatabaseBackend::DatabaseOpenTask):
357         (WebCore::DatabaseBackend::DatabaseCloseTask::create):
358         (DatabaseBackend::DatabaseCloseTask):
359         (WebCore::DatabaseBackend::DatabaseTableNamesTask::create):
360         (DatabaseBackend::DatabaseTableNamesTask):
361         * Modules/webdatabase/DatabaseThread.cpp:
362         (WebCore::DatabaseThread::recordDatabaseOpen):
363         (WebCore::DatabaseThread::recordDatabaseClosed):
364         (WebCore::SameDatabasePredicate::SameDatabasePredicate):
365         (SameDatabasePredicate):
366         (WebCore::DatabaseThread::unscheduleDatabaseTasks):
367         * Modules/webdatabase/DatabaseThread.h:
368         * Modules/webdatabase/SQLStatementBackend.cpp:
369         (WebCore::SQLStatementBackend::execute):
370         (WebCore::SQLStatementBackend::setDatabaseDeletedError):
371         (WebCore::SQLStatementBackend::setVersionMismatchedError):
372         (WebCore::SQLStatementBackend::setFailureDueToQuota):
373         * Modules/webdatabase/SQLStatementBackend.h:
374         * Modules/webdatabase/SQLTransactionBackend.cpp:
375         (WebCore::SQLTransactionBackend::create):
376         (WebCore::SQLTransactionBackend::SQLTransactionBackend):
377         * Modules/webdatabase/SQLTransactionBackend.h:
378         (WebCore::SQLTransactionBackend::database):
379         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
380         (WebCore::getDatabaseIdentifier):
381         * Target.pri:
382         * WebCore.gypi:
383         * WebCore.vcproj/WebCore.vcproj:
384         * WebCore.vcxproj/WebCore.vcxproj:
385         * WebCore.vcxproj/WebCore.vcxproj.filters:
386         * WebCore.xcodeproj/project.pbxproj:
387
388 2013-02-20  David Kilzer  <ddkilzer@apple.com>
389
390         Upstream SharedTimerIOS.mm
391         <http://webkit.org/b/110161>
392
393         Reviewed by Benjamin Poulain.
394
395         * Configurations/WebCore.xcconfig:
396         (EXCLUDED_SOURCE_FILE_NAMES_iphoneos): Add SharedTimerMac.mm.
397         * WebCore.xcodeproj/project.pbxproj: Add SharedTimerIOS.mm.
398         * platform/ios/SharedTimerIOS.mm: Add.
399         (WebCore):
400         (-[WebCoreResumeNotifierIOS init]):
401         (-[WebCoreResumeNotifierIOS dealloc]):
402         (-[WebCoreResumeNotifierIOS didWake]):
403         (WebCore::setSharedTimerFiredFunction):
404         (WebCore::timerFired):
405         (WebCore::setSharedTimerFireInterval):
406         (WebCore::stopSharedTimer):
407
408 2013-02-20  Ojan Vafai  <ojan@chromium.org>
409
410         Speculative fix for EFL and Windows compilers not realizing
411         that all possible cases have a return value from this switch.
412
413         * rendering/RenderBox.cpp:
414         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
415
416 2013-02-20  David Hyatt  <hyatt@apple.com>
417
418         [New Multicolumn] Fix overflow computation for column blocks.
419         https://bugs.webkit.org/show_bug.cgi?id=110392.
420
421         Reviewed by Simon Fraser.
422
423         * rendering/RenderBox.cpp:
424         (WebCore::RenderBox::addOverflowFromChild):
425         Exclude in-flow RenderFlowThreads from overflow propagation.
426
427         * rendering/RenderMultiColumnSet.h:
428         * rendering/RenderRegion.h:
429         (WebCore::RenderRegion::shouldHaveAutoLogicalHeight):
430          * rendering/RenderRegionSet.h:
431         (RenderRegionSet):
432         Override shouldHaveAutoLogicalHeight to always be false
433         for region sets and for columns. Eventually we're going to try
434         to leverage this code to do column balancing, and that's why
435         RenderMultiColumnSet has a unique override.
436
437 2013-02-20  Brandon Jones  <bajones@google.com>
438  
439         Printing WebGL canvases in Chrome uses stale data after first print
440         https://bugs.webkit.org/show_bug.cgi?id=110003
441  
442         Reviewed by Kenneth Russell.
443  
444         Unable to validate printed content automatically. No regression in existing WebGL tests.
445  
446          * html/canvas/WebGLRenderingContext.cpp:
447          (WebCore):
448          (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
449
450 2013-02-20  Christian Biesinger  <cbiesinger@chromium.org>
451
452         Incorrect rendering for flex boxes with percentage height in a table cell
453         https://bugs.webkit.org/show_bug.cgi?id=110389
454
455         Reviewed by Tony Chang.
456
457         Tests: css3/flexbox/flex-percentage-height-in-table-standards-mode.html
458                css3/flexbox/flex-percentage-height-in-table.html
459
460         * rendering/RenderFlexibleBox.cpp:
461         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
462         Always update the logical height of the flex box, not just when it is
463         auto. If necessary, the later updateLogicalHeight() call will adjust
464         it.
465
466 2013-02-20  Philip Rogers  <pdr@google.com>
467
468         Account for transform in SVG background images
469         https://bugs.webkit.org/show_bug.cgi?id=110295
470
471         Reviewed by Dirk Schulze.
472
473         Tiled SVG background images are rendererd by drawing the SVG content into a temporary
474         image buffer, then stamping out a tiled pattern using this buffer. Previously the
475         image buffer did not account for CSS transforms which could result in pixelated backgrounds.
476
477         This patch takes advantage of the context's transform when sizing the temporary tiling
478         image buffer. Because the context's transform also includes scale, this patch simplifies
479         the SVG image code to no longer track scale.
480
481         Test: svg/as-background-image/svg-transformed-background.html
482
483         * loader/cache/CachedImage.cpp:
484         (WebCore):
485         (WebCore::CachedImage::imageForRenderer):
486
487             CachedImage::lookupOrCreateImageForRenderer no longer creates images so it has been
488             refactored into just "imageForRenderer". Previously there were two versions of
489             lookupOrCreateImageForRenderer; these have been folded into imageForRenderer.
490
491         * loader/cache/CachedImage.h:
492         * svg/graphics/SVGImage.cpp:
493         (WebCore::SVGImage::drawPatternForContainer):
494
495             To create the temporary tiling image buffer, the final size in screen coordinates is
496             needed. This is now computed using the current context's CTM. Because the CTM
497             already includes the page scale, all page scale tracking can be removed.
498
499             The adjustments to srcRect and the pattern transform are the same as before, just
500             refactored to use imageBufferScale which has x and y components.
501
502         * svg/graphics/SVGImage.h:
503         * svg/graphics/SVGImageCache.cpp:
504         (WebCore::SVGImageCache::setContainerSizeForRenderer):
505
506             Because the page scale needed to be cached between calls to
507             setContainerSizeForRenderer, this function was written to modify an existing cache
508             entry. Because the page scale no longer needs to be tracked, this code has been
509             simplified to re-write any existing cache entry.
510
511         (WebCore::SVGImageCache::imageSizeForRenderer):
512
513             This function has been simplified by calling SVGImageForContainer::size() instead
514             of computing this value manually. The value returned remains the same, containing
515             the container size multiplied by zoom.
516
517         (WebCore::SVGImageCache::imageForRenderer):
518
519             Previously we set the page scale on every call to imageForRenderer. Because page scale
520             no longer needs to be tracked, this function has been simplified to simply return
521             the cached SVGImageForContainer.
522
523         * svg/graphics/SVGImageForContainer.cpp:
524         (WebCore::SVGImageForContainer::drawPattern):
525         * svg/graphics/SVGImageForContainer.h:
526         (WebCore::SVGImageForContainer::create):
527         (WebCore::SVGImageForContainer::SVGImageForContainer):
528         (SVGImageForContainer):
529
530 2013-02-20  Jer Noble  <jer.noble@apple.com>
531
532         Crash in com.apple.WebKit2.WebProcessService at com.apple.avfoundation: __73-[AVAssetResourceLoader _attemptDelegateHandlingOfRequestWithDictionary:]_block_invoke + 51
533         https://bugs.webkit.org/show_bug.cgi?id=110385
534
535         Reviewed by Eric Carlson.
536
537         Ensure AVFoundation does not attempt to message a dead object by explicitly disassociating
538         the AVAssetResourceLoaderDelegate on MediaPlayerPrivateAVFoundationObjC destruction.
539
540         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
541         (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):
542
543 2013-02-20  Ojan Vafai  <ojan@chromium.org>
544
545         Positioned, replaced elements with intrinsic width keywords compute the wrong width
546         https://bugs.webkit.org/show_bug.cgi?id=110393
547
548         Reviewed by Emil A Eklund.
549
550         Test: fast/css-intrinsic-dimensions/intrinsic-sized-replaced-absolutes.html
551
552         * rendering/RenderBox.cpp:
553         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
554         Add the intrinsic size keywords to the switch. Confusingly, we have to
555         subtract the border and padding since the callers expect the content width.
556
557         * rendering/RenderReplaced.cpp:
558         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
559         Don't do the intrinsic ratio calculation if the width is an
560         intrinsic width keyword, as per, http://dev.w3.org/csswg/css3-sizing/#replaced-intrinsic.
561
562         (WebCore::RenderReplaced::computeIntrinsicLogicalWidths):
563         (WebCore::RenderReplaced::computePreferredLogicalWidths):
564         The old code was trying to apply the intrinsic ratio calculation to
565         the intrinsic width, which is wrong per spec.
566
567 2013-02-20  Alec Flett  <alecflett@chromium.org>
568
569         LevelDB: Remove excess vector copy
570         https://bugs.webkit.org/show_bug.cgi?id=110399
571
572         Reviewed by Tony Chang.
573
574         Remove an extra copy introduced by the makeVector function.
575
576         No new tests, this is covered by existing tests.
577
578         * platform/leveldb/LevelDBDatabase.cpp:
579         (WebCore::LevelDBDatabase::safeGet):
580
581 2013-02-20  Simon Fraser  <simon.fraser@apple.com>
582
583         Zoomed, slow-scrolling pages keep recreating tiles when scrolled
584         https://bugs.webkit.org/show_bug.cgi?id=110379
585
586         Reviewed by Tim Horton.
587
588         On slow-scrolling pages the TileCache makes the tiles the size of
589         the visible rect to minimize per-tile painting overhead. If the size
590         of that rect changes, the TileCache re-creates all the tiles.
591         
592         This was a problem whem zoomed, because mapping the visible rect
593         through the scale transform and then rounding it would cause the
594         size to keep changing, causing lots of tile re-creation.
595         
596         Fix by carrying the visibleRect around as a FloatRect, and doing
597         the same for the exposedRect. We then only expand to integers
598         when computing the tile size. This also fixes an issue where we could
599         sometimes make extra tiles because of fractional bits of tiles at the edges,
600         as shown by the test result change.
601
602         * platform/graphics/TiledBacking.h:
603         * platform/graphics/ca/GraphicsLayerCA.cpp:
604         (WebCore::GraphicsLayerCA::updateVisibleRect):
605         * platform/graphics/ca/mac/TileCache.h:
606         * platform/graphics/ca/mac/TileCache.mm:
607         (WebCore::TileCache::setVisibleRect):
608         (WebCore::TileCache::setExposedRect):
609         (WebCore::TileCache::prepopulateRect):
610         (WebCore::TileCache::computeTileCoverageRect):
611         (WebCore::TileCache::tileSizeForCoverageRect):
612         (WebCore::TileCache::blankPixelCountForTiles):
613         (WebCore::TileCache::revalidateTiles):
614         (WebCore::TileCache::ensureTilesForRect):
615         * platform/graphics/ca/mac/WebTileLayer.mm:
616         (-[WebTileLayer logFilledFreshTile]):
617
618 2013-02-20  Julien Chaffraix  <jchaffraix@webkit.org>
619
620         [CSS Grid Layout] Implement the auto-placement algorithm without grid growth
621         https://bugs.webkit.org/show_bug.cgi?id=110277
622
623         Reviewed by Tony Chang.
624
625         Tests: fast/css-grid-layout/grid-item-addition-auto-placement-update.html
626                fast/css-grid-layout/grid-item-removal-auto-placement-update.html
627                fast/css-grid-layout/grid-auto-flow-resolution.html (extended to cover more cases)
628
629         This change implements most of the auto-placement algorithm per
630         http://dev.w3.org/csswg/css3-grid-layout/#auto-placement-algo
631
632         To limit the size of the code change, it doesn't implement growing the grid if there
633         are no empty grid areas. If we don't find any empty grid areas, we just insert in the first
634         one, like what grid-auto-flow: none would do (which explains the test failures).
635
636         * rendering/RenderGrid.cpp:
637         (WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
638         Added this function to return the GridCoordinate of the next empty grid area along
639         the iterator's direction.
640
641         (WebCore::RenderGrid::placeItemsOnGrid):
642         Split this function into the different steps below. For efficiency, collect the auto vs specified
643         major axis grid items in different Vectors.
644
645         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
646         Added this function that implements part of step 1 of the algorithm (the grid items without
647         auto row / column are already handled in placeItemsOnGrid).
648
649         (WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid):
650         Added this function that iterates over the auto grid items and call placeAutoMajorAxisItemOnGrid.
651
652         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
653         Added this method to handle the step 4 of the algorithm. Based on the minor axis's position,
654         it either walks along the major axis once or several times until it finds an empty grid area
655         for the grid item.
656
657         (WebCore::RenderGrid::autoPlacementMajorAxisPositionForChild):
658         (WebCore::RenderGrid::autoPlacementMinorAxisPositionForChild):
659         (WebCore::RenderGrid::autoPlacementMajorAxisDirection):
660         (WebCore::RenderGrid::autoPlacementMinorAxisDirection):
661         Added these helper functions that return minor / major axis positions & direction.
662
663         * rendering/RenderGrid.h:
664         Added the previous new RenderGrid functions.
665
666 2013-02-20  Vincent Scheib  <scheib@chromium.org>
667
668         Accept 'allowfullscreen' in addition to 'webkitallowfullscreen'.
669         https://bugs.webkit.org/show_bug.cgi?id=110374
670
671         Reviewed by Adam Barth.
672
673         The fullscreen API also includes a new HTML attribute for iframes
674         which permits its use. That attribute, 'allowfullcreen' is now
675         included in the HTML specification [1] and is stable enough
676         to remove the webkit prefix.
677
678         [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/the-iframe-element.html#attr-iframe-allowfullscreen
679
680         Tests: fullscreen/full-screen-enabled-prefixed.html
681                fullscreen/full-screen-iframe-allowed-prefixed.html
682                fullscreen/full-screen-iframe-with-mixed-allow-webkitallow-attribute.html
683
684         * dom/Document.cpp:
685         (WebCore::isAttributeOnAllOwners):
686         (WebCore::Document::fullScreenIsAllowedForElement):
687         (WebCore::Document::webkitFullscreenEnabled):
688         * html/HTMLAttributeNames.in:
689
690 2013-02-20  Roger Fong  <roger_fong@apple.com>
691
692         Unreviewed. Remove references to SAFARI_THEME from Windows Solution.
693         <rdar://problem/13258710>
694
695         * config.h:
696         * page/Settings.cpp:
697         * page/Settings.h:
698         * platform/win/ScrollbarThemeWin.cpp:
699         * rendering/RenderThemeWin.cpp:
700
701 2013-02-20  Roger Fong  <roger_fong@apple.com>
702
703         Get VS2010 Solution B&I ready.
704         <rdar://problem/1322988>
705
706         Rubberstamped by Timothy Horton.
707
708         Add Production configuration. 
709         Add a WebCore submit solution with a DebugSuffix configuration. 
710         Modify WebCore.make as necessary.
711         
712         * DerivedSources.make:
713         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj:
714         * WebCore.vcxproj/QTMovieWin/QTMovieWinCommon.props:
715         * WebCore.vcxproj/QTMovieWin/QTMovieWinProduction.props: Added.
716         * WebCore.vcxproj/QTMovieWin/QTMovieWinRelease.props:
717         * WebCore.vcxproj/WebCore.make: Added.
718         * WebCore.vcxproj/WebCore.sln: Removed.
719         * WebCore.vcxproj/WebCore.submit.sln: Copied from Source/WebCore/WebCore.vcxproj/WebCore.sln.
720         * WebCore.vcxproj/WebCore.vcxproj:
721         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
722         * WebCore.vcxproj/WebCoreGeneratedProduction.props: Added.
723         * WebCore.vcxproj/WebCoreGeneratedRelease.props:
724         * WebCore.vcxproj/WebCoreProduction.props: Added.
725         * WebCore.vcxproj/WebCoreRelease.props:
726         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
727
728 2013-02-20  Adam Klein  <adamk@chromium.org>
729
730         [v8] Fix an erroneous WrapperGrouper call in preparation for refactoring
731         https://bugs.webkit.org/show_bug.cgi?id=110396
732
733         Reviewed by Kentaro Hara.
734
735         This is in preparation for a refactor to expose a simplified
736         WrapperGrouper interface to V8 wrapper classes enabling them to
737         specify multiple roots per wrapper object. 
738
739         * bindings/v8/V8GCController.cpp: Since MutationObservers are not Nodes, the correct call here is addObjectToGroup, as it is for all other non-Node wrappers.
740
741 2013-02-20  Levi Weintraub  <leviw@chromium.org>
742
743         Line layout (but not pref widths) double-counts word spacing when between inlines
744         https://bugs.webkit.org/show_bug.cgi?id=110381
745
746         Reviewed by Emil A Eklund.
747
748         When a word break with a space occurs between inlines and word-spacing is non-zero,
749         line layout incorrectly committed the word-spacing value to the line twice, causing
750         wrapping in inline-blocks. To fix this, clear the word-spacing value when between
751         words and ignoring spaces, as we will already have added the word-spacing to the
752         line.
753
754         Test: fast/text/word-space-between-inlines.html
755
756         * rendering/RenderBlockLineLayout.cpp:
757         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
758
759 2013-02-20  Nate Chapin  <japhet@chromium.org>
760
761         Crash in WebCore::FrameLoader::checkCompleted()
762         https://bugs.webkit.org/show_bug.cgi?id=110237
763
764         Reviewed by Abhishek Arya.
765
766         Test: http/tests/misc/delete-frame-during-readystatechange.html
767
768         * loader/FrameLoader.cpp:
769         (WebCore::FrameLoader::checkCompleted): Protect before setReadyState() is called.
770
771 2013-02-20  David Grogan  <dgrogan@chromium.org>
772
773         IndexedDB: Limit LevelDB's max open files
774         https://bugs.webkit.org/show_bug.cgi?id=109993
775
776         Reviewed by Tony Chang.
777
778         LevelDB keeps up to 1000 (by default) data files open at a time to
779         avoid having to open() them. This has caused chromium to hit the
780         process-wide open file limit. This patch changes max_open_files to 20,
781         as that's the minimum permitted by LevelDB and we have no reason to
782         think that performance will suffer because of the extra open calls.
783
784         No new tests - a chromium browser test that tracks the open LevelDB
785         files is plausible but is blocked on http://crbug.com/177249/.
786
787         * platform/leveldb/LevelDBDatabase.cpp:
788         (WebCore::openDB):
789
790 2013-02-20  David Hyatt  <hyatt@apple.com>
791
792         [New Multicolumn] Resize RenderMultiColumnSets around their columns.
793         https://bugs.webkit.org/show_bug.cgi?id=110378.
794
795         Reviewed by Dirk Schulze.
796
797         Test: fast/multicol/newmulticol/positioned-with-constrained-height.html.
798
799         * rendering/RenderBlock.h:
800         (RenderBlock):
801         Make computeOverflow public so that RenderMultiColumnFlowThread can
802         access it.
803
804         * rendering/RenderMultiColumnFlowThread.cpp:
805         (WebCore::RenderMultiColumnFlowThread::layout):
806         Subclass layout to recompute the overflow for RenderMultiColumnBlock
807         after the flow thread has finished layout. This way it can account
808         for changes in RenderMultiColumnSets without having to do a second
809         layout pass.
810
811         * rendering/RenderMultiColumnFlowThread.h:
812         (RenderMultiColumnFlowThread):
813         Override layout().
814
815         * rendering/RenderMultiColumnSet.cpp:
816         (WebCore::RenderMultiColumnSet::columnCount):
817         Clean up a comment that referred to portions as region rects still.
818
819         (WebCore::RenderMultiColumnSet::setFlowThreadPortionRect):
820         * rendering/RenderMultiColumnSet.h:
821         * rendering/RenderRegion.h:
822         (WebCore::RenderRegion::setFlowThreadPortionRect):
823         Make setFlowThreadPortionRect virtual and actually mutate the size
824         and position of RenderMultiColumnSets so that they enclose their
825         column rects.
826
827 2013-02-20  Dirk Schulze  <krit@webkit.org>
828
829         Enable CANVAS_PATH flag
830         https://bugs.webkit.org/show_bug.cgi?id=108508
831
832         Reviewed by Simon Fraser.
833
834         Enable CANVAS_PATH flag on trunk.
835
836         Existing tests cover the feature.
837
838         * Configurations/FeatureDefines.xcconfig:
839
840 2013-02-20  Sheriff Bot  <webkit.review.bot@gmail.com>
841
842         Unreviewed, rolling out r143441.
843         http://trac.webkit.org/changeset/143441
844         https://bugs.webkit.org/show_bug.cgi?id=110376
845
846         May be causing chromium content_browsertests failures.
847         (Requested by vollick on #webkit).
848
849         * bindings/v8/ScriptValue.cpp:
850         (WebCore::ScriptValue::serialize):
851         (WebCore::ScriptValue::getString):
852         (WebCore::ScriptValue::toString):
853         (WebCore::ScriptValue::toInspectorValue):
854         * bindings/v8/ScriptValue.h:
855         (WebCore::ScriptValue::ScriptValue):
856         (WebCore::ScriptValue::operator=):
857         (WebCore::ScriptValue::operator==):
858         (WebCore::ScriptValue::isEqual):
859         (WebCore::ScriptValue::isFunction):
860         (WebCore::ScriptValue::isNull):
861         (WebCore::ScriptValue::isUndefined):
862         (WebCore::ScriptValue::isObject):
863         (WebCore::ScriptValue::hasNoValue):
864         (WebCore::ScriptValue::clear):
865         (WebCore::ScriptValue::v8Value):
866         (ScriptValue):
867         * bindings/v8/SharedPersistent.h:
868         (WebCore):
869         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
870         (WebCore::InjectedScriptHost::scriptValueAsNode):
871         * bindings/v8/custom/V8MessageEventCustom.cpp:
872         (WebCore::V8MessageEvent::dataAttrGetterCustom):
873
874 2013-02-15  Dirk Schulze  <krit@webkit.org>
875
876         [Chromium] Add runtime flag for CanvasPath
877         https://bugs.webkit.org/show_bug.cgi?id=109997
878
879         Reviewed by Adam Barth.
880
881         Add runtime flag for Chromium.
882
883         * bindings/generic/RuntimeEnabledFeatures.cpp:
884         (WebCore):
885         * bindings/generic/RuntimeEnabledFeatures.h:
886         (RuntimeEnabledFeatures):
887         (WebCore::RuntimeEnabledFeatures::setCanvasPathEnabled):
888         (WebCore::RuntimeEnabledFeatures::canvasPathEnabled):
889         * html/canvas/DOMPath.idl:
890         * page/DOMWindow.idl:
891
892 2013-02-20  Laszlo Gombos  <l.gombos@samsung.com>
893
894         Remove unnecessary includes for Platform.h from headers
895         https://bugs.webkit.org/show_bug.cgi?id=110300
896
897         Reviewed by Alexey Proskuryakov.
898
899         wtf/Platform.h only need to be included in a few places directly
900         as it is included in config.h. Remove the unnecessay duplicate as
901         it can be confusing.
902
903         No new tests, no change in functionality.
904
905         * platform/SecureTextInput.h:
906         * platform/audio/Biquad.h:
907         * platform/audio/FFTFrame.h:
908         * platform/graphics/cpu/arm/filters/FEBlendNEON.h:
909         * platform/graphics/cpu/arm/filters/NEONHelpers.h:
910         * platform/graphics/filters/FELighting.h:
911
912 2013-02-20  Florin Malita  <fmalita@chromium.org>
913
914         [SVG] Update of element referenced by multiple 'use' nodes is absurdly slow
915         https://bugs.webkit.org/show_bug.cgi?id=97905
916
917         Reviewed by Dirk Schulze.
918
919         Rebuilding the shadow and instance trees of dependent use nodes recursively can be
920         extremely inefficient with non-trivial dependency graphs (the trees are not constructed
921         in topological order).
922
923         To avoid redundant buildShadowAndInstanceTree() invokations, separate the invalidation
924         phase from the actual tree (re)building phase, and only descend into the dependency DAG
925         during the invalidation phase (recursion also stops at nodes that have been previously
926         invalidated).
927
928         No new tests: functional coverage provided by existing tests, perfomance tracked by
929         PerformanceTests/SVG/SvgNestedUse.html.
930
931         * svg/SVGUseElement.cpp:
932         (WebCore::SVGUseElement::buildPendingResource):
933         (WebCore::SVGUseElement::buildShadowAndInstanceTree):
934         (WebCore::SVGUseElement::invalidateShadowTree):
935         (WebCore):
936         (WebCore::SVGUseElement::invalidateDependentShadowTrees):
937         * svg/SVGUseElement.h:
938         (SVGUseElement):
939
940 2013-02-20  Tim Horton  <timothy_horton@apple.com>
941
942         RenderLayerBacking should initialize TiledBacking's isInWindow state with Page's isInWindow, not isOnscreen
943         https://bugs.webkit.org/show_bug.cgi?id=110370
944         <rdar://problem/13254006>
945
946         Reviewed by Simon Fraser.
947
948         * rendering/RenderLayerBacking.cpp:
949         (WebCore::RenderLayerBacking::RenderLayerBacking):
950
951 2013-02-20  Mark Lam  <mark.lam@apple.com>
952
953         Cleanup the SQLTransaction and SQLTransactionBackend state dispatch
954         to only honor a state transition request if the associated database
955         hasn't been interrupted.
956         https://bugs.webkit.org/show_bug.cgi?id=110247.
957
958         Reviewed by Antti Koivisto.
959
960         No new tests.
961
962         * Modules/webdatabase/SQLTransaction.cpp:
963         (WebCore::SQLTransaction::performPendingCallback):
964         (WebCore::SQLTransaction::computeNextStateAndCleanupIfNeeded):
965         * Modules/webdatabase/SQLTransaction.h:
966         * Modules/webdatabase/SQLTransactionBackend.cpp:
967         (WebCore::SQLTransactionBackend::computeNextStateAndCleanupIfNeeded):
968         (WebCore::SQLTransactionBackend::performNextStep):
969         * Modules/webdatabase/SQLTransactionBackend.h:
970
971 2013-02-20  Alexey Proskuryakov  <ap@apple.com>
972
973         ResourceHandle::loadResourceSynchronously should have blob support in cross-platform code
974         https://bugs.webkit.org/show_bug.cgi?id=110364
975
976         Reviewed by Anders Carlsson.
977
978         * platform/network/ResourceHandle.h:
979         * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::loadResourceSynchronously):
980         Added a cross-platform version to keep blob-related logic in one place.
981
982         * platform/network/blackberry/ResourceHandleBlackBerry.cpp:
983         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
984         * platform/network/cf/ResourceHandleCFNet.cpp:
985         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
986         * platform/network/curl/ResourceHandleCurl.cpp:
987         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
988         * platform/network/mac/ResourceHandleMac.mm:
989         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
990         * platform/network/qt/ResourceHandleQt.cpp:
991         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
992         * platform/network/soup/ResourceHandleSoup.cpp:
993         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
994         * platform/network/win/ResourceHandleWin.cpp:
995         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
996         Renamed loadResourceSynchronously to platformLoadResourceSynchronously,
997         removed blob handling from platforms that had it.
998
999 2013-02-20  David Hyatt  <hyatt@apple.com>
1000
1001         [New Multicolumn] RenderMultiColumnFlowThreads should establish a BFC.
1002         https://bugs.webkit.org/show_bug.cgi?id=110366.
1003
1004         Reviewed by Antti Koivisto.
1005
1006         RenderFlowThreads should establish a block formatting context always.
1007         CSS Regions have named flow thread that they absolutely position, and so
1008         they got this for free by being absolutely positioned.
1009         
1010         RenderMultiColumnFlowThreads, however, are relative positioned, so we need
1011         to just add an isRenderFlowThread case specifically so we're not dependent
1012         on the positioning scheme used for the flow thread to establish the BFC.
1013         
1014         Test: fast/multicol/newmulticol/float-*.html.
1015
1016         * rendering/RenderBlock.cpp:
1017         (WebCore::RenderBlock::MarginInfo::MarginInfo):
1018
1019 2013-02-20  David Hyatt  <hyatt@apple.com>
1020
1021         [New Multicolumn] Column gap is computed incorrectly.
1022         https://bugs.webkit.org/show_bug.cgi?id=110360.
1023
1024         Reviewed by Simon Fraser.
1025
1026         Test: fast/multicol/newmulticol/layers-split-across-columns.html.
1027
1028         * rendering/RenderMultiColumnSet.cpp:
1029         (WebCore::RenderMultiColumnSet::columnGap):
1030         Make sure we ask the RenderMultiColumnBlock for the gap rather than our
1031         own style, since we don't actually have the gap value in our style.
1032         
1033         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
1034         * rendering/RenderMultiColumnSet.h:
1035         Fix another spot where the columnGap was an int. It should be a LayoutUnit.
1036
1037 2013-02-20  Robert Hogan  <robert@webkit.org>
1038
1039         No caret on empty contenteditable element with negative text-indent
1040         https://bugs.webkit.org/show_bug.cgi?id=108633
1041
1042         Reviewed by Ryosuke Niwa.
1043
1044         Test: fast/repaint/paint-caret-in-div-with-negative-indent.html
1045
1046         When an editable element has a negative text indent we won't paint the caret when the
1047         element is empty because it falls outside the element's border box. To ensure the caret is painted,
1048         account for any negative indent with our overflow.
1049
1050         * rendering/RenderBlock.cpp:
1051         (WebCore::RenderBlock::computeOverflow):
1052
1053 2013-02-20  Ojan Vafai  <ojan@chromium.org>
1054
1055         Remove stretchesToMinIntrinsicLogicalWidth
1056         https://bugs.webkit.org/show_bug.cgi?id=110266
1057
1058         Reviewed by Emil Eklund.
1059
1060         This was only used by fieldsets and now we have a way to express this
1061         concept in CSS.
1062
1063         * WebCore.order:
1064         * css/html.css:
1065         Make fieldsets min-width: -webkit-min-content.
1066
1067         * rendering/RenderBox.cpp:
1068         (WebCore::RenderBox::computeLogicalWidthInRegion):
1069         (WebCore::RenderBox::computePositionedLogicalWidth):
1070         * rendering/RenderBox.h:
1071         Remove all calls to stretchesToMinIntrinsicLogicalWidth.
1072
1073 2013-02-20  Ojan Vafai  <ojan@chromium.org>
1074
1075         Make intrinsic width values work for positioned elements
1076         https://bugs.webkit.org/show_bug.cgi?id=110264
1077
1078         Reviewed by Tony Chang.
1079
1080         Tests: fast/css-intrinsic-dimensions/intrinsic-sized-absolutes.html
1081                fast/css-intrinsic-dimensions/width-shrinks-avoid-floats.html
1082
1083         * rendering/RenderBox.cpp:
1084         (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
1085         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1086         Move the computation of intrinsic widths out into a helper function so that
1087         computePositionedLogicalWidthUsing can use it. As per the current spec,
1088         fill-available measures shrink to avoid floats. http://dev.w3.org/csswg/css3-sizing/
1089
1090         (WebCore::RenderBox::computePositionedLogicalWidth):
1091         Compute intrinsic min-widths in addition to non-zero ones. Intrinsic widths
1092         return true for isZero. width and max-width don't need modifying since they already
1093         call computePositionedLogicalWidthUsing for intrinsic widths.
1094
1095         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1096         Compute intrinsic widths and use a Fixed length for the rest of the positioned width
1097         computation. Doesn't include bordersPlusPadding because the caller, expected the content
1098         width and adds in the bordersPlusPadding later.
1099
1100         * rendering/RenderBox.h:
1101
1102 2013-02-20  Robert Hogan  <robert@webkit.org>
1103
1104         input element with placeholder text and width set to 100% on focus causes overflow even after losing focus
1105         https://bugs.webkit.org/show_bug.cgi?id=109020
1106
1107         Reviewed by David Hyatt.
1108
1109         Tests: fast/forms/input-placeholder-layout-view.html
1110                fast/forms/textarea-placeholder-layout-view.html
1111
1112         Placeholder elements don't affect layout so shouldn't contribute overflow either.
1113
1114         * rendering/RenderTextControlSingleLine.cpp:
1115         (WebCore::RenderTextControlSingleLine::layout):
1116
1117 2013-02-20  Mark Lam  <mark.lam@apple.com>
1118
1119         Rename DatabaseBackend to DatabaseBackendBase.
1120         https://bugs.webkit.org/show_bug.cgi?id=110303.
1121
1122         Rubber stamped by Alexey Proskuryakov.
1123
1124         This is a purely cosmetic change to make the naming consistent with
1125         the front-end DatabaseBase.
1126
1127         No new tests.
1128
1129         * CMakeLists.txt:
1130         * GNUmakefile.list.am:
1131         * Modules/webdatabase/AbstractDatabaseServer.h:
1132         * Modules/webdatabase/Database.cpp:
1133         (WebCore::Database::create):
1134         (WebCore::Database::version):
1135         * Modules/webdatabase/Database.h:
1136         (Database):
1137         * Modules/webdatabase/DatabaseBackend.cpp: Removed.
1138         * Modules/webdatabase/DatabaseBackend.h: Removed.
1139         * Modules/webdatabase/DatabaseBackendAsync.cpp:
1140         (WebCore::DatabaseBackendAsync::DatabaseBackendAsync):
1141         (WebCore::DatabaseBackendAsync::performOpenAndVerify):
1142         * Modules/webdatabase/DatabaseBackendAsync.h:
1143         * Modules/webdatabase/DatabaseBackendBase.cpp: Copied from Source/WebCore/Modules/webdatabase/DatabaseBackend.cpp.
1144         (WebCore::DatabaseBackendBase::databaseInfoTableName):
1145         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
1146         (WebCore::DatabaseBackendBase::~DatabaseBackendBase):
1147         (WebCore::DatabaseBackendBase::closeDatabase):
1148         (WebCore::DatabaseBackendBase::version):
1149         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller):
1150         (DoneCreatingDatabaseOnExitCaller):
1151         (WebCore::DatabaseBackendBase::performOpenAndVerify):
1152         (WebCore::DatabaseBackendBase::securityOrigin):
1153         (WebCore::DatabaseBackendBase::stringIdentifier):
1154         (WebCore::DatabaseBackendBase::displayName):
1155         (WebCore::DatabaseBackendBase::estimatedSize):
1156         (WebCore::DatabaseBackendBase::fileName):
1157         (WebCore::DatabaseBackendBase::details):
1158         (WebCore::DatabaseBackendBase::getVersionFromDatabase):
1159         (WebCore::DatabaseBackendBase::setVersionInDatabase):
1160         (WebCore::DatabaseBackendBase::setExpectedVersion):
1161         (WebCore::DatabaseBackendBase::getCachedVersion):
1162         (WebCore::DatabaseBackendBase::setCachedVersion):
1163         (WebCore::DatabaseBackendBase::getActualVersionForTransaction):
1164         (WebCore::DatabaseBackendBase::disableAuthorizer):
1165         (WebCore::DatabaseBackendBase::enableAuthorizer):
1166         (WebCore::DatabaseBackendBase::setAuthorizerReadOnly):
1167         (WebCore::DatabaseBackendBase::setAuthorizerPermissions):
1168         (WebCore::DatabaseBackendBase::lastActionChangedDatabase):
1169         (WebCore::DatabaseBackendBase::lastActionWasInsert):
1170         (WebCore::DatabaseBackendBase::resetDeletes):
1171         (WebCore::DatabaseBackendBase::hadDeletes):
1172         (WebCore::DatabaseBackendBase::resetAuthorizer):
1173         (WebCore::DatabaseBackendBase::maximumSize):
1174         (WebCore::DatabaseBackendBase::incrementalVacuumIfNeeded):
1175         (WebCore::DatabaseBackendBase::interrupt):
1176         (WebCore::DatabaseBackendBase::isInterrupted):
1177         (WebCore::DatabaseBackendBase::reportOpenDatabaseResult):
1178         (WebCore::DatabaseBackendBase::reportChangeVersionResult):
1179         (WebCore::DatabaseBackendBase::reportStartTransactionResult):
1180         (WebCore::DatabaseBackendBase::reportCommitTransactionResult):
1181         (WebCore::DatabaseBackendBase::reportExecuteStatementResult):
1182         (WebCore::DatabaseBackendBase::reportVacuumDatabaseResult):
1183         * Modules/webdatabase/DatabaseBackendBase.h: Copied from Source/WebCore/Modules/webdatabase/DatabaseBackend.h.
1184         (DatabaseBackendBase):
1185         * Modules/webdatabase/DatabaseBackendSync.cpp:
1186         (WebCore::DatabaseBackendSync::DatabaseBackendSync):
1187         * Modules/webdatabase/DatabaseBackendSync.h:
1188         * Modules/webdatabase/DatabaseBase.h:
1189         * Modules/webdatabase/DatabaseManager.cpp:
1190         (WebCore::DatabaseManager::openDatabaseBackend):
1191         (WebCore::DatabaseManager::openDatabase):
1192         (WebCore::DatabaseManager::openDatabaseSync):
1193         (WebCore::DatabaseManager::getMaxSizeForDatabase):
1194         * Modules/webdatabase/DatabaseManager.h:
1195         (DatabaseManager):
1196         * Modules/webdatabase/DatabaseServer.cpp:
1197         (WebCore::DatabaseServer::openDatabase):
1198         (WebCore::DatabaseServer::createDatabase):
1199         (WebCore::DatabaseServer::getMaxSizeForDatabase):
1200         * Modules/webdatabase/DatabaseServer.h:
1201         * Modules/webdatabase/DatabaseSync.cpp:
1202         (WebCore::DatabaseSync::create):
1203         * Modules/webdatabase/DatabaseSync.h:
1204         (DatabaseSync):
1205         * Modules/webdatabase/DatabaseTracker.cpp:
1206         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
1207         (WebCore::DatabaseTracker::databaseChanged):
1208         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
1209         (WebCore::DatabaseTracker::doneCreatingDatabase):
1210         (WebCore::DatabaseTracker::addOpenDatabase):
1211         (WebCore::DatabaseTracker::removeOpenDatabase):
1212         (WebCore::DatabaseTracker::getOpenDatabases):
1213         (WebCore::DatabaseTracker::deleteDatabaseFile):
1214         * Modules/webdatabase/DatabaseTracker.h:
1215         (DatabaseTracker):
1216         * Modules/webdatabase/OriginQuotaManager.cpp:
1217         (WebCore::OriginQuotaManager::markDatabase):
1218         * Modules/webdatabase/OriginQuotaManager.h:
1219         (OriginQuotaManager):
1220         * Modules/webdatabase/SQLTransactionClient.cpp:
1221         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
1222         (WebCore::SQLTransactionClient::didExecuteStatement):
1223         (WebCore::SQLTransactionClient::didExceedQuota):
1224         * Modules/webdatabase/SQLTransactionClient.h:
1225         (SQLTransactionClient):
1226         * Modules/webdatabase/chromium/DatabaseObserver.h:
1227         (DatabaseObserver):
1228         * Modules/webdatabase/chromium/DatabaseTrackerChromium.cpp:
1229         (WebCore::DatabaseTracker::addOpenDatabase):
1230         (WebCore::NotifyDatabaseObserverOnCloseTask::create):
1231         (WebCore::NotifyDatabaseObserverOnCloseTask::NotifyDatabaseObserverOnCloseTask):
1232         (NotifyDatabaseObserverOnCloseTask):
1233         (WebCore::DatabaseTracker::removeOpenDatabase):
1234         (WebCore::DatabaseTracker::prepareToOpenDatabase):
1235         (WebCore::DatabaseTracker::failedToOpenDatabase):
1236         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
1237         (WebCore::DatabaseTracker::CloseOneDatabaseImmediatelyTask::create):
1238         (WebCore::DatabaseTracker::CloseOneDatabaseImmediatelyTask::CloseOneDatabaseImmediatelyTask):
1239         (DatabaseTracker::CloseOneDatabaseImmediatelyTask):
1240         (WebCore::DatabaseTracker::closeOneDatabaseImmediately):
1241         * Modules/webdatabase/chromium/SQLTransactionClientChromium.cpp:
1242         (WebCore::NotifyDatabaseChangedTask::create):
1243         (WebCore::NotifyDatabaseChangedTask::NotifyDatabaseChangedTask):
1244         (NotifyDatabaseChangedTask):
1245         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
1246         (WebCore::SQLTransactionClient::didExecuteStatement):
1247         (WebCore::SQLTransactionClient::didExceedQuota):
1248         * Target.pri:
1249         * WebCore.gypi:
1250         * WebCore.vcproj/WebCore.vcproj:
1251         * WebCore.vcxproj/WebCore.vcxproj:
1252         * WebCore.vcxproj/WebCore.vcxproj.filters:
1253         * WebCore.xcodeproj/project.pbxproj:
1254
1255 2013-02-20  Eric Carlson  <eric.carlson@apple.com>
1256
1257         iOS does not use CaptionUserPreferencesMac
1258         https://bugs.webkit.org/show_bug.cgi?id=110259
1259
1260         Reviewed by Dean Jackson.
1261
1262         * page/CaptionUserPreferencesMac.h: Add PLATFORM(IOS) guard
1263         * page/CaptionUserPreferencesMac.mm: Ditto.
1264
1265         * page/PageGroup.cpp:
1266         (WebCore::PageGroup::captionPreferences): Ditto.
1267
1268 2013-02-19  David Hyatt  <hyatt@apple.com>
1269
1270         [New Multicolumn] Make layers paint properly in columns.
1271         https://bugs.webkit.org/show_bug.cgi?id=110296.
1272
1273         Reviewed by Sam Weinig.
1274
1275         Construct the style for the RenderMultiColumnFlowThread such that it
1276         establishes a stacking context (by being position:relative
1277         with a z-index of 0). This causes the layer collection code
1278         to correctly ignore the RenderFlowThread layers during normal
1279         painting.
1280         
1281         Fix more clipping bugs to eliminate subpixel layout differences
1282         between old and new multicolumn.
1283
1284         Test: fast/multicol/newmulticol/layers-in-multicol.html
1285
1286         * rendering/RenderMultiColumnBlock.cpp:
1287         (WebCore::createMultiColumnFlowThreadStyle):
1288         (WebCore):
1289         (WebCore::RenderMultiColumnBlock::addChild):
1290         Use a custom style (similar to what normal RenderFlowThreads do)
1291         for the RenderMultiColumnFlowThread that makes it a stacking
1292         context.
1293         
1294         * rendering/RenderMultiColumnSet.cpp:
1295         (WebCore::RenderMultiColumnSet::flowThreadPortionOverflowRect):
1296         Fix the overflow calculations out the leftmost and rightmost
1297         columns to actually look at the physical placement of the columns.
1298         The old code was backwards for RTL.
1299         
1300         * rendering/RenderRegion.cpp:
1301         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
1302         Fix the clipping done by overflowRectForFlowThreadPortion to min
1303         and max with the passed-in portion rect so that subclasses that
1304         inflate the rect prior to passing it into the method don't have that
1305         inflation discarded.
1306
1307 2013-02-20  Alexander Pavlov  <apavlov@chromium.org>
1308
1309         Web Inspector: CSSProperty.status defaults to "style" not "active"
1310         https://bugs.webkit.org/show_bug.cgi?id=110348
1311
1312         Reviewed by Timothy Hatcher.
1313
1314         * inspector/Inspector.json: Fix the default property status to be "style" in the description.
1315
1316 2013-02-20  Dan Carney  <dcarney@google.com>
1317
1318         [v8] potentially disposed handle returned for npapi object
1319         https://bugs.webkit.org/show_bug.cgi?id=110331
1320
1321         Reviewed by Kentaro Hara.
1322
1323         No new tests. No change in functionality.
1324
1325         * bindings/v8/V8NPUtils.cpp:
1326         (WebCore::convertNPVariantToV8Object):
1327
1328 2013-02-20  Xabier Rodriguez Calvar  <calvaris@igalia.com>  and  Martin Robinson  <mrobinson@igalia.com>
1329
1330         [Gtk] HTML5 Media controls require a design refresh
1331         https://bugs.webkit.org/show_bug.cgi?id=83869
1332
1333         Created new controls that depend less on Gtk and more in CSS.
1334
1335         Reviewed by Philippe Normand.
1336
1337         * GNUmakefile.list.am: Added compilation for MediaControlsGtk.cpp
1338         and MediaControlsGtk.h
1339         * css/mediaControlsGtk.css: Taken from Chromium and adapted for
1340         WebKitGtk+.
1341         * html/shadow/MediaControlsGtk.cpp: Added.
1342         (WebCore): Added MediaControlsGtk class.
1343         (WebCore::MediaControlsGtk::MediaControlsGtk): Class constructor
1344         (WebCore::MediaControls::create): Creates the Gtk+ controls
1345         components.
1346         (WebCore::MediaControlsGtk::createControls): Creates the Gtk+
1347         controls components.
1348         (WebCore::MediaControlsGtk::initializeControls): Initializes all
1349         media controls.
1350         (WebCore::MediaControlsGtk::setMediaController): Sets the media
1351         controller.
1352         (WebCore::MediaControlsGtk::reset): Resets the controllers.
1353         (WebCore::MediaControlsGtk::playbackStarted): Invoked when the
1354         playback starts
1355         (WebCore::MediaControlsGtk::updateCurrentTimeDisplay): Updates the
1356         controls when the current time shall be updated.
1357         (WebCore::MediaControlsGtk::changedMute): Updates the controls
1358         then the mute changes.
1359         (WebCore::MediaControlsGtk::showVolumeSlider): Invoked when the
1360         volume slider is meant to be shown.
1361         (WebCore::MediaControlsGtk::createTextTrackDisplay): Creates the
1362         track display. Though it is not used by us, it needs to be created
1363         to prevent immediate crashes when loading a video.
1364         * html/shadow/MediaControlsGtk.h: Added.
1365         (WebCore): Added the MediaControlsGtk class.
1366         (MediaControlsGtk): Added the MediaControlsGtk class.
1367         * platform/gtk/RenderThemeGtk.cpp:
1368         (WebCore): Added getStockSymbolicIconForWidgetType function
1369         signature to load symbolic icons.
1370         (WebCore::supportsFocus): Added media control widgets to support
1371         focus so that the focus ring is not painted by WebCore.
1372         (WebCore::RenderThemeGtk::paintMediaButton): Added the symbolic
1373         icon support. It supports now normal and symbolic icons at the
1374         same time.
1375         (WebCore::RenderThemeGtk::paintMediaFullscreenButton): Added the
1376         symbolic icon support.
1377         (WebCore::RenderThemeGtk::paintMediaMuteButton): Added the
1378         symbolic icon support.
1379         (WebCore::RenderThemeGtk::paintMediaPlayButton): Added the
1380         symbolic icon support.
1381         (WebCore::RenderThemeGtk::paintMediaSeekBackButton): Added the
1382         symbolic icon support.
1383         (WebCore::RenderThemeGtk::paintMediaSeekForwardButton): Added the
1384         symbolic icon support.
1385         (WebCore::borderRadiiFromStyle): Created the radii info from the
1386         style.
1387         (WebCore::RenderThemeGtk::paintMediaSliderTrack): Removed the
1388         background and the Gtk widget support as it is painted with
1389         CSS. Also paint the time ranges with the CSS style.
1390         (WebCore::RenderThemeGtk::paintMediaSliderThumb): Paint slider
1391         thumb according to the CSS parameters.
1392         (WebCore::RenderThemeGtk::paintMediaVolumeSliderContainer):
1393         Delegates in the CSS.
1394         (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack): Fills the
1395         track up to the volume level and delegates the border in the CSS.
1396         (WebCore::RenderThemeGtk::paintMediaVolumeSliderThumb): Delegates
1397         in the paintMediaSliderThumb method so the thumb is painted the
1398         same with the CSS parameters.
1399         (WebCore::RenderThemeGtk::paintMediaCurrentTime): Removed the Gtk
1400         background to use only CSS.
1401         * platform/gtk/RenderThemeGtk.h:
1402         (RenderThemeGtk): Changed paintMediaButton to support the symbolic
1403         and normal icons at the same time.
1404         * platform/gtk/RenderThemeGtk2.cpp:
1405         (WebCore::RenderThemeGtk::adjustSliderThumbSize): Not adjusting
1406         the thumb size and letting the CSS decide that for media slider.
1407         (WebCore::getStockSymbolicIconForWidgetType): Implemented as a
1408         fallback to the normal stock icons.
1409         * platform/gtk/RenderThemeGtk3.cpp:
1410         (WebCore):
1411         (WebCore::RenderThemeGtk::adjustSliderThumbSize): Not adjusting
1412         the thumb size and letting the CSS decide that for the media
1413         sliders.
1414         (WebCore::getStockSymbolicIconForWidgetType): Added this function
1415         to load symbolic icons. It falls back to normal icons if the
1416         symbolic is not found.
1417
1418 2013-02-20  Andras Becsi  <andras.becsi@digia.com>
1419
1420         [Qt] Rename AncestorChainWalker.h to EventPathWalker.h in the project file.
1421
1422         Unreviewed gardening.
1423
1424         AncestorChainWalker has been renamed to EventPathWalker in r143422.
1425         Rename the header in the project file as well so that it shows up in QtCreator.
1426
1427         No new tests needed.
1428
1429         * Target.pri:
1430
1431 2013-02-20  Ilya Tikhonovsky  <loislo@chromium.org>
1432
1433         Web Inspector: fix for frontend closure compile errors.
1434         https://bugs.webkit.org/show_bug.cgi?id=110329
1435
1436         Reviewed by Vsevolod Vlasov.
1437
1438         It has no tests because it has no code changes.
1439
1440         * inspector/front-end/HeapSnapshot.js:
1441         (HeapSnapshotMetainfo):
1442         * inspector/front-end/NativeMemorySnapshotView.js:
1443         (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked.didReceiveMemorySnapshot):
1444         (WebInspector.NativeSnapshotProfileType.prototype.buttonClicked):
1445
1446 2013-02-20  Florin Malita  <fmalita@chromium.org>
1447
1448         Clear SVGPathSeg role on removal.
1449         https://bugs.webkit.org/show_bug.cgi?id=110058
1450
1451         Reviewed by Dirk Schulze.
1452
1453         SVGPathSegListPropertyTearOff::initialize() and SVGPathSegListPropertyTearOff::replaceItem()
1454         need to clear the context and role for segments being expunged from the list, similarly to
1455         removeItem(). Otherwise, processIncomingListItemValue() can get confused and attempt to
1456         remove stale segments.
1457
1458         Test: svg/dom/SVGPathSegList-crash.html
1459
1460         * svg/properties/SVGPathSegListPropertyTearOff.cpp:
1461         (WebCore::SVGPathSegListPropertyTearOff::clearContextAndRoles):
1462         (WebCore::SVGPathSegListPropertyTearOff::clear):
1463         (WebCore::SVGPathSegListPropertyTearOff::replaceItem):
1464         (WebCore):
1465         * svg/properties/SVGPathSegListPropertyTearOff.h:
1466         (WebCore::SVGPathSegListPropertyTearOff::initialize):
1467         (SVGPathSegListPropertyTearOff):
1468
1469 2013-02-20  Sheriff Bot  <webkit.review.bot@gmail.com>
1470
1471         Unreviewed, rolling out r143434.
1472         http://trac.webkit.org/changeset/143434
1473         https://bugs.webkit.org/show_bug.cgi?id=110326
1474
1475         added reftest fails on chromium mac 10.6 (Requested by
1476         toyoshim on #webkit).
1477
1478         * rendering/RenderFileUploadControl.cpp:
1479         (WebCore::RenderFileUploadControl::paintObject):
1480
1481 2013-02-19  Vsevolod Vlasov  <vsevik@chromium.org>
1482
1483         Web Inspector: Make UISourceCode.path() an array of path segments.
1484         https://bugs.webkit.org/show_bug.cgi?id=110229
1485
1486         Reviewed by Pavel Feldman.
1487
1488         * inspector/front-end/FileSystemProjectDelegate.js:
1489         (WebInspector.FileSystemProjectDelegate.prototype._filePathForPath):
1490         (WebInspector.FileSystemProjectDelegate.prototype.innerCallback):
1491         (WebInspector.FileSystemProjectDelegate.prototype.requestFileContent):
1492         (WebInspector.FileSystemProjectDelegate.prototype._contentTypeForPath):
1493         (WebInspector.FileSystemProjectDelegate.prototype.populate.filesLoaded):
1494         (WebInspector.FileSystemProjectDelegate.prototype.populate):
1495         * inspector/front-end/SimpleWorkspaceProvider.js:
1496         (WebInspector.SimpleProjectDelegate.prototype.requestFileContent):
1497         (WebInspector.SimpleProjectDelegate.prototype.searchInFileContent):
1498         (WebInspector.SimpleProjectDelegate.prototype.addFile):
1499         (WebInspector.SimpleProjectDelegate.prototype._ensureUniquePath):
1500         (WebInspector.SimpleProjectDelegate.prototype.removeFile):
1501         (WebInspector.SimpleWorkspaceProvider.pathForSplittedURL):
1502         (WebInspector.SimpleWorkspaceProvider.prototype.addFileByName):
1503         (WebInspector.SimpleWorkspaceProvider.prototype.removeFileByName):
1504         * inspector/front-end/UISourceCode.js:
1505         (WebInspector.UISourceCode.prototype.uri):
1506         * inspector/front-end/Workspace.js:
1507         (WebInspector.Project.prototype._fileAdded):
1508         (WebInspector.Project.prototype._fileRemoved):
1509         (WebInspector.Project.prototype.uiSourceCode):
1510         (WebInspector.Workspace.prototype.uiSourceCodeForURL):
1511         (WebInspector.Workspace.prototype.urlForPath):
1512
1513 2013-02-20  Yury Semikhatsky  <yurys@chromium.org>
1514
1515         Web Inspector: fix message for non-existent domain warning
1516         https://bugs.webkit.org/show_bug.cgi?id=110315
1517
1518         Reviewed by Alexander Pavlov.
1519
1520         Only send (Heap)Profiler.resetProfiles event if the client has
1521         requested profile headers before.
1522
1523         * inspector/InspectorHeapProfilerAgent.cpp:
1524         (HeapProfilerAgentState):
1525         (WebCore):
1526         (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
1527         (WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles):
1528         (WebCore::InspectorHeapProfilerAgent::clearFrontend):
1529         (WebCore::InspectorHeapProfilerAgent::restore):
1530         (WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
1531         * inspector/InspectorHeapProfilerAgent.h:
1532         (InspectorHeapProfilerAgent):
1533         * inspector/InspectorProfilerAgent.cpp:
1534         (ProfilerAgentState):
1535         (WebCore::InspectorProfilerAgent::InspectorProfilerAgent):
1536         (WebCore::InspectorProfilerAgent::addProfile):
1537         (WebCore::InspectorProfilerAgent::disable):
1538         (WebCore::InspectorProfilerAgent::getProfileHeaders):
1539         (WebCore):
1540         (WebCore::InspectorProfilerAgent::resetFrontendProfiles):
1541         (WebCore::InspectorProfilerAgent::restore):
1542         * inspector/InspectorProfilerAgent.h:
1543         (InspectorProfilerAgent):
1544
1545 2013-02-19  Vsevolod Vlasov  <vsevik@chromium.org>
1546
1547         Web Inspector: Move workspace specific code from FileMapping to workspace.
1548         https://bugs.webkit.org/show_bug.cgi?id=110219
1549
1550         Reviewed by Pavel Feldman.
1551
1552         Extracted workspace specific code from FileMapping to Workspace.
1553         This allows to reduce usage of uri and eventually make UISourceCode.path an array of path segments.
1554
1555         Test: inspector/workspace-mapping.html
1556
1557         * inspector/front-end/CSSStyleModel.js:
1558         (WebInspector.CSSStyleModel.prototype.rawLocationToUILocation):
1559         * inspector/front-end/CompilerScriptMapping.js:
1560         (WebInspector.CompilerScriptMapping.prototype.rawLocationToUILocation):
1561         (WebInspector.CompilerScriptMapping.prototype.get addScript.get this):
1562         (WebInspector.CompilerScriptMapping.prototype.get addScript):
1563         * inspector/front-end/FileMapping.js:
1564         (WebInspector.FileMapping):
1565         (WebInspector.FileMapping.prototype.mappingEntryForURL):
1566         (WebInspector.FileMapping.prototype.mappingEntryForPath):
1567         * inspector/front-end/FileSystemMapping.js:
1568         (WebInspector.FileSystemMapping.prototype.fileSystemPathForPrefix):
1569         (WebInspector.FileSystemMappingImpl.prototype.addFileSystemMapping):
1570         (WebInspector.FileSystemMappingImpl.prototype.removeFileSystemMapping):
1571         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPathForPrefix):
1572         * inspector/front-end/FileSystemProjectDelegate.js:
1573         (WebInspector.FileSystemProjectDelegate):
1574         (WebInspector.FileSystemProjectDelegate.prototype.populate.filesLoaded):
1575         (WebInspector.FileSystemProjectDelegate.prototype.populate):
1576         (WebInspector.FileSystemWorkspaceProvider):
1577         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
1578         * inspector/front-end/IsolatedFileSystemManager.js:
1579         (WebInspector.IsolatedFileSystemManager):
1580         * inspector/front-end/NetworkUISourceCodeProvider.js:
1581         (WebInspector.NetworkUISourceCodeProvider):
1582         (WebInspector.NetworkUISourceCodeProvider.prototype._addFile):
1583         * inspector/front-end/ResourceScriptMapping.js:
1584         (WebInspector.ResourceScriptMapping.prototype._workspaceUISourceCodeForScript):
1585         * inspector/front-end/ResourceUtils.js:
1586         (WebInspector.displayNameForURL):
1587         * inspector/front-end/SASSSourceMapping.js:
1588         (WebInspector.SASSSourceMapping.prototype._reloadCSS):
1589         (WebInspector.SASSSourceMapping.prototype._bindUISourceCode):
1590         (WebInspector.SASSSourceMapping.prototype.rawLocationToUILocation):
1591         * inspector/front-end/ScriptsPanel.js:
1592         (WebInspector.ScriptsPanel.prototype.canShowAnchorLocation):
1593         * inspector/front-end/SimpleWorkspaceProvider.js:
1594         (WebInspector.SimpleWorkspaceProvider.pathForSplittedURL):
1595         (WebInspector.SimpleWorkspaceProvider.prototype._innerAddFileForURL):
1596         * inspector/front-end/StylesSourceMapping.js:
1597         (WebInspector.StylesSourceMapping.prototype.rawLocationToUILocation):
1598         (WebInspector.StylesSourceMapping.prototype._resourceAdded):
1599         (WebInspector.StylesSourceMapping.prototype._mainFrameCreatedOrNavigated):
1600         (WebInspector.StyleContentBinding):
1601         (WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged):
1602         * inspector/front-end/Workspace.js:
1603         (WebInspector.Workspace):
1604         (WebInspector.Workspace.prototype.hasMappingForURL):
1605         (WebInspector.Workspace.prototype._fileSystemPathForEntry):
1606         (WebInspector.Workspace.prototype.uiSourceCodeForURL):
1607         (WebInspector.Workspace.prototype.urlForPath):
1608         * inspector/front-end/inspector.js:
1609
1610 2013-02-20  Alexander Pavlov  <apavlov@chromium.org>
1611
1612         Web Inspector: Introduce SecurityOriginAdded and SecurityOriginRemoved events into ResourceTreeModel
1613         https://bugs.webkit.org/show_bug.cgi?id=110232
1614
1615         Reviewed by Vsevolod Vlasov.
1616
1617         * inspector/front-end/ResourceTreeModel.js:
1618         (WebInspector.ResourceTreeModel):
1619         (WebInspector.ResourceTreeModel.prototype._addFrame):
1620         (WebInspector.ResourceTreeModel.prototype._addSecurityOrigin): Added.
1621         (WebInspector.ResourceTreeModel.prototype._removeSecurityOrigin): Added.
1622         (WebInspector.ResourceTreeModel.prototype._handleMainFrameDetached): Added.
1623         (WebInspector.ResourceTreeModel.prototype._frameNavigated):
1624         (WebInspector.ResourceTreeModel.prototype._frameDetached):
1625
1626 2013-02-20  Dan Carney  <dcarney@google.com>
1627
1628         [v8] ScriptValue has dangerous copy semantics
1629         https://bugs.webkit.org/show_bug.cgi?id=110206
1630
1631         Reviewed by Kentaro Hara.
1632
1633         Update ScriptValue to used a SharedPersistent,
1634         making it impossible to return dead references.
1635
1636         No new tests. No change in functionality.
1637
1638         * bindings/v8/ScriptValue.cpp:
1639         (WebCore::ScriptValue::serialize):
1640         (WebCore::ScriptValue::getString):
1641         (WebCore::ScriptValue::toString):
1642         (WebCore::ScriptValue::toInspectorValue):
1643         * bindings/v8/ScriptValue.h:
1644         (WebCore::ScriptValue::ScriptValue):
1645         (WebCore::ScriptValue::operator=):
1646         (WebCore::ScriptValue::operator==):
1647         (WebCore::ScriptValue::isEqual):
1648         (WebCore::ScriptValue::isFunction):
1649         (WebCore::ScriptValue::isNull):
1650         (WebCore::ScriptValue::isUndefined):
1651         (WebCore::ScriptValue::isObject):
1652         (WebCore::ScriptValue::hasNoValue):
1653         (WebCore::ScriptValue::clear):
1654         (ScriptValue):
1655         (WebCore::ScriptValue::v8Value):
1656         (WebCore::ScriptValue::v8ValueRaw):
1657         * bindings/v8/SharedPersistent.h:
1658         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
1659         (WebCore::InjectedScriptHost::scriptValueAsNode):
1660         * bindings/v8/custom/V8MessageEventCustom.cpp:
1661         (WebCore::V8MessageEvent::dataAttrGetterCustom):
1662
1663 2013-02-20  Andrey Lushnikov  <lushnikov@chromium.org>
1664
1665         Web Inspector: highlight undefined word in JavaScript
1666         https://bugs.webkit.org/show_bug.cgi?id=109585
1667
1668         Reviewed by Vsevolod Vlasov.
1669
1670         Test enhancement: inspector/syntax-highlight-javascript.html
1671
1672         Add global object value properties to tokenizer and add a css style
1673         class to highlight "undefined" with gray color.
1674
1675         * inspector/front-end/SourceJavaScriptTokenizer.js:
1676         (WebInspector.SourceJavaScriptTokenizer.prototype.nextToken):
1677         * inspector/front-end/SourceJavaScriptTokenizer.re2js:
1678         * inspector/front-end/inspectorSyntaxHighlight.css:
1679         (.webkit-javascript-undef):
1680
1681 2013-02-20  Mike West  <mkwst@chromium.org>
1682
1683         Use EventPathWalker rather than parentNode() to normalize event targets in EventHandler.
1684         https://bugs.webkit.org/show_bug.cgi?id=110037
1685
1686         Reviewed by Ryosuke Niwa.
1687
1688         We need to teach EventHandler about Shadow DOM in a few places in order
1689         to ensure that we properly target events dispatched upon text nodes.
1690         Rather than naively grabbing the text node's direct parent via
1691         parentNode(), we need to account for the case in which the text node is
1692         distributed[1] to an insertion point inside a shadow host.
1693         EventPathWalker::parent understands these relationships, and should
1694         be used when dealing with mouse, drag, and touch events.
1695
1696         [1]: http://www.w3.org/TR/shadow-dom/#dfn-distribution
1697
1698         * page/EventHandler.cpp:
1699         (WebCore::EventHandler::handleMouseDraggedEvent):
1700         (WebCore::EventHandler::handleTouchEvent):
1701         (WebCore::EventHandler::passGestureEventToWidgetIfPossible):
1702         (WebCore::EventHandler::updateDragAndDrop):
1703             Refactor parentNode callsites to use EventPathWalker::parent().
1704
1705 2013-02-20  Vsevolod Vlasov  <vsevik@chromium.org>
1706
1707         Web Inspector: [Regression] Search in ProfilesPanel is broken
1708         https://bugs.webkit.org/show_bug.cgi?id=110312
1709
1710         Reviewed by Pavel Feldman.
1711
1712         * inspector/front-end/CPUProfileView.js:
1713         (WebInspector.CPUProfileView.prototype.matchesQuery):
1714         (WebInspector.CPUProfileView.prototype.performSearch):
1715
1716 2013-02-20  Eugene Klyuchnikov  <eustas@chromium.org>
1717
1718         Web Inspector: View.markAsRoot should never be invoked on attached view.
1719         https://bugs.webkit.org/show_bug.cgi?id=110224
1720
1721         Reviewed by Pavel Feldman.
1722
1723         This will cause CSS loading problems after "show".
1724
1725         * inspector/front-end/Drawer.js:
1726         Ensure child view is detached before marked as root.
1727         * inspector/front-end/View.js:
1728         (WebInspector.View.prototype.markAsRoot): Added assertion.
1729
1730 2013-02-20  Nils Barth  <nbarth@google.com>
1731
1732         File upload control doesn't apply CSS vertical padding or border to file name
1733         https://bugs.webkit.org/show_bug.cgi?id=109011
1734
1735         Reviewed by Hajime Morrita.
1736
1737         Test: fast/forms/file/file-vertical-padding-border.html
1738
1739         * rendering/RenderFileUploadControl.cpp:
1740             Add borderTop() and paddingTop() when computing position.
1741         (WebCore::RenderFileUploadControl::paintObject):
1742
1743 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
1744
1745         Few methods in WebGLRenderingContext.idl have incorrect signatures
1746         https://bugs.webkit.org/show_bug.cgi?id=110305
1747
1748         Reviewed by Kentaro Hara.
1749
1750         * html/canvas/WebGLRenderingContext.idl:
1751
1752 2013-02-19  Tim Horton  <timothy_horton@apple.com>
1753
1754         Clarify isInWindow vs. isVisible path through to RenderLayerCompositor
1755         https://bugs.webkit.org/show_bug.cgi?id=110261
1756         <rdar://problem/13196122>
1757
1758         Reviewed by Simon Fraser.
1759
1760         Remove RenderLayerCompositor::willMoveOffscreen/didMoveOnscreen.
1761         Add RenderLayerCompositor::setIsInWindow, and pipe in-window changes through from Page::setIsInWindow.
1762         Adjust a few Document functions that previously called RenderView::didMoveOnscreen/willMoveOffscreen to use setIsInWindow instead, since in-window state changes are occurring when attaching and detaching documents.
1763
1764         * WebCore.exp.in: Export Page::setIsInWindow.
1765         * dom/Document.cpp:
1766         (WebCore::Document::attach): Use setIsInWindow instead of didMoveOnscreen.
1767         (WebCore::Document::documentWillBecomeInactive): Use setIsInWindow instead of willMoveOffscreen.
1768         (WebCore::Document::documentDidResumeFromPageCache): Use setIsInWindow instead of didMoveOnscreen.
1769         * page/FrameView.cpp:
1770         (WebCore::FrameView::didMoveOnscreen):
1771         (WebCore::FrameView::willMoveOffscreen):
1772         RenderView doesn't care about moving on/offscreen, just in-window state.
1773         (WebCore::FrameView::setIsInWindow): Added. Forward isInWindow changes to our RenderView.
1774         * page/FrameView.h:
1775         (FrameView): Add setIsInWindow.
1776         * page/Page.cpp:
1777         (WebCore::Page::setIsInWindow): Added. Forward isInWindow changes to the Page's FrameViews.
1778         * page/Page.h:
1779         (Page): Add setIsInWindow.
1780         (WebCore::Page::isInWindow):
1781         * rendering/RenderLayerCompositor.cpp:
1782         (WebCore::RenderLayerCompositor::setIsInWindow): Added. Replace willMoveOffscreen/didMoveOnscreen with setIsInWindow,
1783         since that's the only change we actually care about.
1784         * rendering/RenderLayerCompositor.h:
1785         (RenderLayerCompositor): Add setIsInWindow.
1786         * rendering/RenderView.cpp:
1787         (WebCore::RenderView::setIsInWindow): Added. Replace willMoveOffscreen/didMoveOnscreen with setIsInWindow,
1788         since that's the only change RenderLayerCompositor actually cares about.
1789         * rendering/RenderView.h:
1790         (RenderView): Add setIsInWindow.
1791
1792 2013-02-19  Eugene Klyuchnikov  <eustas@chromium.org>
1793
1794         Web Inspector: Cleanup and add JSDocs to SuggestBox
1795         https://bugs.webkit.org/show_bug.cgi?id=110202
1796
1797         Reviewed by Pavel Feldman.
1798
1799         SuggestBox contains some obsolete/unused code and not fully
1800         covered with JSDocs.
1801
1802         * inspector/front-end/SuggestBox.js:
1803         (WebInspector.SuggestBox.prototype.visible):
1804         Replaced getter with function.
1805         (WebInspector.SuggestBox.prototype._onScrollOrResize):
1806         Use camel-case for function names.
1807         (WebInspector.SuggestBox.prototype._onBoxMouseDown): Ditto.
1808         (WebInspector.SuggestBox.prototype.updateSuggestions):
1809         Removed unused code.
1810         (WebInspector.SuggestBox.prototype.hide): Adopt changes.
1811         (WebInspector.SuggestBox.prototype._applySuggestion): Ditto.
1812         * inspector/front-end/TextPrompt.js:
1813         (WebInspector.TextPrompt.prototype.isSuggestBoxVisible): Ditto.
1814
1815 2013-02-19  Hayato Ito <hayato@chromium.org>
1816
1817         Calculate EventPath in EventDispatcher's constructor.
1818         https://bugs.webkit.org/show_bug.cgi?id=109905
1819
1820         Reviewed by Dimitri Glazkov.
1821
1822         This patch calculates an EventPath in EventDispatcher's
1823         constructor and removes EventDispatcher::ensureEventPath().
1824         We don't have any reason to initialize an EventPath lazily.
1825
1826         No tests. No change in behavior.
1827
1828         * dom/EventDispatcher.cpp:
1829         (WebCore::EventDispatcher::EventDispatcher):
1830         (WebCore::EventDispatcher::dispatch):
1831         * dom/EventDispatcher.h:
1832         (WebCore::EventDispatcher::eventPath):
1833         (EventDispatcher):
1834         * dom/FocusEvent.cpp:
1835         (WebCore::FocusEventDispatchMediator::dispatchEvent):
1836         (WebCore::BlurEventDispatchMediator::dispatchEvent):
1837         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
1838         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
1839         * dom/MouseEvent.cpp:
1840         (WebCore::MouseEventDispatchMediator::dispatchEvent):
1841
1842 2013-02-19  Simon Fraser  <simon.fraser@apple.com>
1843
1844         Fix TileCache tile size when zoomed on slow-scrolling site
1845         https://bugs.webkit.org/show_bug.cgi?id=110289
1846
1847         Reviewed by Tim Horton.
1848         
1849         In slow scrolling mode, we use the tile coverage rect as the tile size
1850         (so a single tile covers the viewport). When zoomed, the tile coverage rect
1851         shrinks relative to the TileCache, so scale the tile size back up.
1852
1853         Test: platform/mac-wk2/tiled-drawing/tile-size-slow-zoomed.html
1854
1855         * platform/graphics/ca/mac/TileCache.mm:
1856         (WebCore::TileCache::tileSizeForCoverageRect):
1857
1858 2013-02-19  Hayato Ito  <hayato@chromium.org>
1859
1860         Rename AncestorChainWalker.
1861         https://bugs.webkit.org/show_bug.cgi?id=110146
1862
1863         Reviewed by Dimitri Glazkov.
1864
1865         Rename AncestorChainWalker to EventPathWalker.
1866         The term of EventPath is used in DOM Core spec.  EventPath was
1867         already introduced into a EventContext.h in r112055. We should
1868         spread this term into the Walker class since they share the same
1869         purpose.
1870
1871         No new tests, no behavior change.
1872
1873         * CMakeLists.txt:
1874         * GNUmakefile.list.am:
1875         * Target.pri:
1876         * WebCore.gypi:
1877         * WebCore.xcodeproj/project.pbxproj:
1878         * dom/DOMAllInOne.cpp:
1879         * dom/EventDispatcher.cpp:
1880         * dom/EventPathWalker.cpp: Renamed from Source/WebCore/dom/AncestorChainWalker.cpp.
1881         (WebCore):
1882         (WebCore::EventPathWalker::EventPathWalker):
1883         (WebCore::EventPathWalker::parent): parent() is now a static function to cover simple use cases.
1884         (WebCore::EventPathWalker::moveToParent): Renamed from parent().
1885         * dom/EventPathWalker.h: Renamed from Source/WebCore/dom/AncestorChainWalker.h.
1886         (WebCore):
1887         (EventPathWalker):
1888         (WebCore::EventPathWalker::node):
1889         (WebCore::EventPathWalker::isVisitingInsertionPointInReprojection): Renamed from isCrossingInsertionPoint().
1890         * dom/EventRetargeter.cpp:
1891         (WebCore::EventRetargeter::calculateEventPath):
1892         (WebCore::EventRetargeter::buildRelatedNodeMap):
1893         * dom/TreeScope.cpp:
1894         (WebCore::TreeScope::focusedNode):
1895         * html/HTMLLIElement.cpp:
1896         (WebCore::HTMLLIElement::attach):
1897         * page/EventHandler.cpp:
1898         (WebCore::EventHandler::updateMouseEventTargetNode):
1899         (WebCore::EventHandler::handleWheelEvent):
1900
1901 2013-02-19  Dean Jackson  <dino@apple.com>
1902
1903         Snapshotted plugin label should not be selectable
1904         https://bugs.webkit.org/show_bug.cgi?id=110286
1905
1906         Reviewed by Simon Fraser.
1907
1908         Update the CSS to make it clear that you should click
1909         on a snapshot (use the finger pointer) and disable
1910         text selection.
1911
1912         * css/plugIns.css:
1913         (embed::-webkit-snapshotted-plugin-content .snapshot-container .snapshot-label):
1914
1915 2013-02-19  Hans Muller  <hmuller@adobe.com>
1916
1917         [CSS Exclusions] Enable shape-inside support for ellipses
1918         https://bugs.webkit.org/show_bug.cgi?id=109868
1919
1920         Reviewed by Dirk Schulze.
1921
1922         This change is very similar to the one recently made for circles:
1923         removed the test that disabled ellipse values for shape-inside.
1924         The remaining support for ellipses, which is based on rounded rectangles
1925         whose width/height is equal to their radiusX/radiusY, has not changed.
1926
1927         Test: fast/exclusions/shape-inside/shape-inside-ellipse.html
1928
1929         * rendering/ExclusionShapeInsideInfo.h:
1930         (WebCore::ExclusionShapeInsideInfo::isEnabledFor): No longer disallows any BasicShape type.
1931
1932 2013-02-19  Uday Kiran  <udaykiran@motorola.com>
1933
1934         'round' not implemented in border-image
1935         https://bugs.webkit.org/show_bug.cgi?id=14185
1936
1937         Reviewed by David Hyatt.
1938
1939         Add rendering support for 'round' keyword of border-image-repeat CSS property
1940         http://dev.w3.org/csswg/css3-background/#border-image-repeat
1941         Rebased original patch by Benjamin Otte <otte@gnome.org> and made few fixes.
1942
1943         Test: fast/borders/border-image-02.html
1944
1945         * platform/graphics/GraphicsContext.cpp:
1946         (WebCore::GraphicsContext::drawTiledImage):
1947         * platform/graphics/GraphicsContext.h:
1948         (GraphicsContext):
1949         * platform/graphics/Image.cpp:
1950         (WebCore::Image::drawTiled):
1951         * platform/graphics/Image.h:
1952         (Image):
1953         * rendering/RenderBoxModelObject.cpp:
1954         (WebCore::RenderBoxModelObject::paintNinePieceImage): For 'round' keyword,
1955         the image is tiled (repeated) to fill the area. If it does not fill the area
1956         with a whole number of tiles, the image is rescaled so that it does.
1957
1958 2013-02-19  Conrad Shultz  <conrad_shultz@apple.com>
1959
1960         Allow UI clients to handle vertical wheel events.
1961         https://bugs.webkit.org/show_bug.cgi?id=110006
1962
1963         Reviewed by Tim Horton.
1964
1965         Add API to allow matching changes in WebKit2 to control rubber-banding behavior at vertical page extrema.
1966         If rubber-banding is disabled during a scroll event that would otherwise trigger rubber-banding, dispatch
1967         didNotHandleWheelEvent() to the page UI client.
1968
1969         * WebCore.exp.in:
1970         Export new rubber-banding API.
1971
1972         * page/Page.cpp:
1973         (WebCore):
1974         (WebCore::Page::rubberBandsAtBottom):
1975         Proxy for the corresponding function in ScrollingCoordinator.
1976         (WebCore::Page::setRubberBandsAtBottom):
1977         Ditto.
1978         (WebCore::Page::rubberBandsAtTop):
1979         Ditto.
1980         (WebCore::Page::setRubberBandsAtTop):
1981         Ditto.
1982
1983         * page/Page.h:
1984         (Page):
1985         Declare new rubber-banding API (above).
1986
1987         * page/scrolling/ScrollingCoordinator.h:
1988         (WebCore::ScrollingCoordinator::rubberBandsAtBottom):
1989         Stub API implementation.
1990         (WebCore::ScrollingCoordinator::setRubberBandsAtBottom):
1991         Ditto.
1992         (WebCore::ScrollingCoordinator::rubberBandsAtTop):
1993         Ditto.
1994         (WebCore::ScrollingCoordinator::setRubberBandsAtTop):
1995         Ditto.
1996
1997         * page/scrolling/ScrollingTree.cpp:
1998         (WebCore::ScrollingTree::ScrollingTree):
1999         Initialize new member variables.
2000         (WebCore::ScrollingTree::setMainFramePinState):
2001         Set top/bottom pinned states.
2002         (WebCore::ScrollingTree::rubberBandsAtBottom):
2003         New accessor function.
2004         (WebCore::ScrollingTree::setRubberBandsAtBottom):
2005         New mutator function.
2006         (WebCore::ScrollingTree::rubberBandsAtTop):
2007         New accessor function.
2008         (WebCore::ScrollingTree::setRubberBandsAtTop):
2009         New mutator function.
2010         (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
2011         Start a vertical swipe event if the frame is pinned at the top or bottom and associated rubber-banding is disabled.
2012
2013         * page/scrolling/ScrollingTree.h:
2014         (ScrollingTree):
2015         Declare new rubber-banding API and associated member variables.
2016
2017         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2018         (ScrollingCoordinatorMac):
2019         Declare API overrides.
2020
2021         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2022         (WebCore::ScrollingCoordinatorMac::rubberBandsAtBottom):
2023         Method override; proxy to corresponding function in ScrollingTree.
2024         (WebCore::ScrollingCoordinatorMac::setRubberBandsAtBottom):
2025         Ditto.
2026         (WebCore::ScrollingCoordinatorMac::rubberBandsAtTop):
2027         Ditto.
2028         (WebCore::ScrollingCoordinatorMac::setRubberBandsAtTop):
2029         Ditto.
2030
2031         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2032         (WebCore::ScrollingTreeScrollingNodeMac::pinnedInDirection):
2033         Remove trailing whitespace.
2034         (WebCore::ScrollingTreeScrollingNodeMac::updateMainFramePinState):
2035         Calculate and pass vertical pinning state to ScrollingTree::setMainFramePinState().
2036
2037 2013-02-19  Simon Fraser  <simon.fraser@apple.com>
2038
2039         Rubber-banding should not affect the visibleRect of the TileCache
2040         https://bugs.webkit.org/show_bug.cgi?id=110278
2041
2042         Reviewed by Beth Dakin.
2043         
2044         When rubber-banding a slow-scrolling page, or image document, we would constantly re-create
2045         the bottom tile because of the logic that adapts the tile size to the visible rect when slow
2046         scrolling.
2047         
2048         Avoid that by ensuring that the visibleRect is not affected by rubber-banding. This is done
2049         via a GraphicsLayerClient function that allows RenderLayerCompositor to provide a custom
2050         position for the scroll layer. We constrain that scroll position to remove the overhang that
2051         results from rubber-banding.
2052
2053         I wasn't able to make a test for this, even with internals.setScrollViewPosition().
2054
2055         * platform/graphics/GraphicsLayerClient.h:
2056         (GraphicsLayerClient):
2057         (WebCore::GraphicsLayerClient::customPositionForVisibleRectComputation):
2058         * platform/graphics/ca/GraphicsLayerCA.cpp:
2059         (WebCore::GraphicsLayerCA::computeVisibleRect):
2060         * rendering/RenderLayerCompositor.cpp:
2061         (WebCore::RenderLayerCompositor::customPositionForVisibleRectComputation):
2062         * rendering/RenderLayerCompositor.h:
2063
2064 2013-02-19  Tony Gentilcore  <tonyg@chromium.org>
2065
2066         Fix crash in preloading scanning base tags with no href attribute for background parser
2067         https://bugs.webkit.org/show_bug.cgi?id=110276
2068
2069         Reviewed by Eric Seidel.
2070
2071         Previously a <base> tag without an href attribute (like the one in fast/dom/HTMLAnchorElement/set-href-attribute-rebase.html)
2072         would crash the background parser's preload scanner.
2073
2074         To fix that, we only call stripLeadingAndTrailingHTMLSpaces() if the href attribute is non-null. This matches the main thread parser.
2075
2076         Along with this, I decided to templatize updatePredictedBaseURL() so that the main and background parser can share the same impl.
2077
2078         This required making CompactHTMLToken and HTMLToken a little more similar:
2079         1. Give HTMLToken a getAttributeItem() method.
2080         2. Move CompactAttribute to CompactHTMLToken::Attribute and make it a struct.
2081
2082         No new tests because covered by existing tests.
2083
2084         * html/parser/AtomicHTMLToken.h:
2085         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
2086         * html/parser/CompactHTMLToken.cpp:
2087         (SameSizeAsCompactHTMLToken):
2088         (WebCore::CompactHTMLToken::CompactHTMLToken):
2089         (WebCore::CompactHTMLToken::getAttributeItem):
2090         (WebCore::CompactHTMLToken::isSafeToSendToAnotherThread):
2091         * html/parser/CompactHTMLToken.h:
2092         (WebCore::CompactHTMLToken::Attribute::Attribute):
2093         (Attribute):
2094         (WebCore::CompactHTMLToken::attributes):
2095         (CompactHTMLToken):
2096         (WebCore::CompactHTMLToken::publicIdentifier):
2097         (WebCore::CompactHTMLToken::systemIdentifier):
2098         * html/parser/HTMLParserIdioms.h:
2099         (WebCore):
2100         (WebCore::stripLeadingAndTrailingHTMLSpaces):
2101         * html/parser/HTMLPreloadScanner.cpp:
2102         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
2103         (WebCore):
2104         (WebCore::TokenPreloadScanner::updatePredictedBaseURL):
2105         * html/parser/HTMLPreloadScanner.h:
2106         * html/parser/HTMLToken.h:
2107         (WebCore::HTMLToken::getAttributeItem):
2108         (HTMLToken):
2109
2110 2013-02-19  Mark Lam  <mark.lam@apple.com>
2111
2112         Introducing AbstractSQLTransaction and AbstractSQLTransactionBackend.
2113         https://bugs.webkit.org/show_bug.cgi?id=110273.
2114
2115         Reviewed by Anders Carlsson.
2116
2117         This is part of the webdatabase refactoring for webkit2.
2118         - Also changed the frontend and backend to only refer to the
2119           abstract interface of each other.
2120
2121         No new tests.
2122
2123         * Modules/webdatabase/AbstractSQLTransaction.h: Added.
2124         (AbstractSQLTransaction):
2125         (WebCore::AbstractSQLTransaction::~AbstractSQLTransaction):
2126         * Modules/webdatabase/AbstractSQLTransactionBackend.h: Added.
2127         (AbstractSQLTransactionBackend):
2128         (WebCore::AbstractSQLTransactionBackend::~AbstractSQLTransactionBackend):
2129         * Modules/webdatabase/SQLTransaction.cpp:
2130         (WebCore::SQLTransaction::hasCallback):
2131         (WebCore::SQLTransaction::hasSuccessCallback):
2132         (WebCore::SQLTransaction::hasErrorCallback):
2133         (WebCore::SQLTransaction::setBackend):
2134         * Modules/webdatabase/SQLTransaction.h:
2135         (SQLTransaction):
2136         * Modules/webdatabase/SQLTransactionBackend.cpp:
2137         (WebCore::SQLTransactionBackend::create):
2138         (WebCore::SQLTransactionBackend::SQLTransactionBackend):
2139         * Modules/webdatabase/SQLTransactionBackend.h:
2140         (SQLTransactionBackend):
2141         * Modules/webdatabase/SQLTransactionStateMachine.h:
2142
2143 2013-02-19  Emil A Eklund  <eae@chromium.org>
2144
2145         Change computeStickyPositionConstraints to use LayoutBoxExtent for margins
2146         https://bugs.webkit.org/show_bug.cgi?id=108872
2147
2148         Reviewed by Levi Weintraub.
2149         
2150         Change RenderBoxModelObject::computeStickyPositionConstraints to
2151         use a LayoutBoxExtent to represent margins.
2152
2153         No new tests, no change in functionality.
2154
2155         * platform/graphics/LayoutRect.h:
2156         (WebCore::LayoutRect::contract):
2157         Add version contract methods that takes a LayoutBoxExtent object.
2158         
2159         * platform/graphics/LayoutSize.h:
2160         (WebCore::LayoutSize::shrink):
2161         Add shrink method.
2162         
2163         * rendering/RenderBoxModelObject.cpp:
2164         (WebCore::RenderBoxModelObject::computeStickyPositionConstraints):
2165         Change to use a LayoutBoxExtent object to represent margins.
2166
2167 2013-02-19  Tony Gentilcore  <tonyg@chromium.org>
2168
2169         Disable ASSERT(!hasInsertionPoint()) for background parser
2170         https://bugs.webkit.org/show_bug.cgi?id=110251
2171
2172         Reviewed by Adam Barth.
2173
2174         The background parser crashes about 10 layout tests by hitting ASSERT(!hasInsertionPoint()).
2175         Now, finish() is the thing that closes the HTMLInputStream which removes the insertion point.
2176         In these tests, a document.open() calls insert() which clears the HTMLInputStream which causes
2177         there to be an insertion point again.
2178
2179         With the main thread parser, insert() is called before finish() so the ASSERT passes.
2180         However, with the threaded parser, finish() is called before insert(), so we fail the ASSERT.
2181
2182         This patch disables the ASSERT for the background parser because m_input isn't really relevant.
2183         This causes us to pass the tests. However, there is a risk that now hasInsertionPoint() may be incorrect
2184         and Document has a non-debug branch that tests hasInsertionPoint().
2185
2186         No new tests because covered by existing tests.
2187
2188         * html/parser/HTMLDocumentParser.cpp:
2189         (WebCore::HTMLDocumentParser::prepareToStopParsing):
2190         (WebCore::HTMLDocumentParser::attemptToRunDeferredScriptsAndEnd):
2191
2192 2013-02-19  Hans Muller  <hmuller@adobe.com>
2193
2194         [CSS Exclusions] Enable shape-inside support for ellipses
2195         https://bugs.webkit.org/show_bug.cgi?id=109868
2196
2197         Reviewed by Dirk Schulze.
2198
2199         This change is very similar to the one recently made for circles:
2200         removed the test that disabled ellipse values for shape-inside.
2201         The remaining support for ellipses, which is based on rounded rectangles
2202         whose width/height is equal to their radiusX/radiusY, has not changed.
2203
2204         Test: fast/exclusions/shape-inside/shape-inside-ellipse.html
2205
2206         * rendering/ExclusionShapeInsideInfo.h:
2207         (WebCore::ExclusionShapeInsideInfo::isEnabledFor): No longer disallows any BasicShape type.
2208
2209 2013-02-19  Simon Fraser  <simon.fraser@apple.com>
2210
2211         Separate constraining for overhang from fixed-position zooming behavior in scrollOffsetForFixedPosition()
2212         https://bugs.webkit.org/show_bug.cgi?id=110267
2213
2214         Reviewed by Beth Dakin.
2215
2216         The static scrollOffsetForFixedPosition() function in ScrollingCoordinator did two things;
2217         it constrained the scroll position when rubber-banding, and applied the special scaling for
2218         fixed position when zoomed.
2219         
2220         Separate these out so that we can use the rubber-banding constrained elsewhere.
2221
2222         * page/FrameView.cpp:
2223         (WebCore::FrameView::scrollOffsetForFixedPosition): The static function is here now.
2224         * page/FrameView.h:
2225         * page/scrolling/ScrollingCoordinator.cpp: Code moved to FrameView.
2226         * page/scrolling/ScrollingCoordinator.h:
2227         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2228         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition): scrollOffsetForFixedPosition()
2229         is now on FrameView.
2230         * platform/ScrollableArea.cpp:
2231         (WebCore::constrainedScrollPosition): Helper to constrain one axis for overhang.
2232         (WebCore::ScrollableArea::constrainScrollPositionForOverhang): Static function that
2233         can be called by FrameView::scrollOffsetForFixedPosition().
2234         * platform/ScrollableArea.h: Static function constrainScrollPositionForOverhang()
2235         so we can call it from another thread. Also a member fuction of the same name, which takes
2236         the scrollPosition as input (so we can feed it a layer position in a later patch).
2237
2238 2013-02-19  Tony Gentilcore  <tonyg@chromium.org>
2239
2240         Fix checkThatTokensAreSafeToSendToAnotherThread() now that the preload scanner is enabled
2241         https://bugs.webkit.org/show_bug.cgi?id=110258
2242
2243         Reviewed by Adam Barth.
2244
2245         We were hitting this ASSERT on numerous tests with the background parser enabled. This copy fixes the assertion.
2246
2247         No new tests becuase covered by existing tests.
2248
2249         * html/parser/HTMLResourcePreloader.h:
2250         (WebCore::PreloadRequest::setCharset):
2251
2252 2013-02-19  Tony Gentilcore  <tonyg@chromium.org>
2253
2254         Fix typo: inititatorFor->initiatorFor
2255         https://bugs.webkit.org/show_bug.cgi?id=110260
2256
2257         Reviewed by Adam Barth.
2258
2259         No new tests because no changed functionality.
2260
2261         * html/parser/HTMLPreloadScanner.cpp:
2262         (WebCore::TokenPreloadScanner::initiatorFor):
2263         (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
2264         * html/parser/HTMLPreloadScanner.h:
2265
2266 2013-02-19  Tony Chang  <tony@chromium.org>
2267
2268         Convert 3 settings to use Settings.in
2269         https://bugs.webkit.org/show_bug.cgi?id=109875
2270
2271         Reviewed by Ryosuke Niwa.
2272
2273         Convert mediaEnabled, applicationChromeMode and DOMPasteAllowed to
2274         use Settings.in. They previously had inconsistently named setters.
2275
2276         No new tests, this is a refactoring.
2277
2278         * Source/WebCore/WebCore.exp.in: Remove symbols that are now inlined from exports.
2279         * Source/WebCore/WebCore.order: Remove symbols that no longer exist.
2280         * dom/make_names.pl:
2281         (printConstructorInterior): Rename isMediaEnabled to mediaEnabled.
2282         (printWrapperFunctions): Rename isMediaEnabled to mediaEnabled.
2283         * editing/EditorCommand.cpp:
2284         (WebCore::supportedPaste): Rename isDOMPasteAllowed to DOMPasteAllowed.
2285         * page/Settings.cpp:
2286         (WebCore::Settings::Settings): Remove custom code.
2287         * page/Settings.h:
2288         (Settings): Remove custom code.
2289         * page/Settings.in: Add entries for mediaEnabled, applicationChromeMode and DOMPasteAllowed.
2290         * page/make_settings.pl:
2291         (setterFunctionName): Expand uppercase rules to include DOM.
2292         * rendering/RenderTheme.cpp:
2293         (WebCore::RenderTheme::isDefault): Rename inApplicationChromeMode to applicationChromeMode.
2294         * rendering/RenderThemeWin.cpp:
2295         (WebCore::documentIsInApplicationChromeMode): Rename inApplicationChromeMode to applicationChromeMode.
2296
2297 2013-02-19  Julien Chaffraix  <jchaffraix@webkit.org>
2298
2299         [CSS Grid Layout] Refactor the code in preparation of auto placement support
2300         https://bugs.webkit.org/show_bug.cgi?id=110244
2301
2302         Reviewed by Ojan Vafai.
2303
2304         Test: fast/css-grid-layout/grid-auto-flow-resolution.html
2305
2306         In order to support auto placement, we need to iterate over the grid items with
2307         auto row / column several times. This changes makes us do that in a very simple,
2308         not-yet-conformant way. While touching this code, the distinction between grid-auto-flow
2309         none and row / column was better drawn (and enforced).
2310
2311         * rendering/RenderGrid.cpp:
2312         (WebCore::RenderGrid::resolveGridPositionFromStyle):
2313         Made it illegal to call resolveGridPositionFromStyle if the grid track is auto and
2314         grid-auto-flow is not none. This would catch bad use of the function.
2315
2316         (WebCore::RenderGrid::maximumIndexInDirection):
2317         Updated to bail out if the grid track is auto. Also improved the comment.
2318
2319         (WebCore::RenderGrid::placeItemsOnGrid):
2320         Updated the function to do several iterations. Also handled the grid-auto-flow: none
2321         case differently as it shouldn't need the extra iteration(s).
2322
2323 2013-02-19  David Hyatt  <hyatt@apple.com>
2324
2325         [New Multicolumn] REGRESSION: RenderMultiColumnSets broken by the RenderRegion -> RenderBlock subclassing.
2326         https://bugs.webkit.org/show_bug.cgi?id=110239.
2327
2328         Reviewed by Simon Fraser.
2329
2330         Test: fast/multicol/newmulticol/column-rules-fixed-height.html
2331
2332         * rendering/RenderBlock.cpp:
2333         (WebCore::RenderBlock::columnRectAt):
2334         Make sure the columnGap() in the old multicolumn code is always expressed as a LayoutUnit. This was the
2335         one place where it was still an int.
2336
2337         * rendering/RenderFlowThread.cpp:
2338         (WebCore::RenderFlowThread::paintFlowThreadPortionInRegion):
2339         Rework the painting of flow thread portions to account for the fact that regions paint at an integral
2340         translation. This means you have to construct clipping around that integral destination. Subpixel layout
2341         regions did not clip correctly as a result of this issue.
2342
2343         * rendering/RenderMultiColumnSet.cpp:
2344         (WebCore::RenderMultiColumnSet::columnRectAt):
2345         Fix the same bug with columnGap() that the old column code has, i.e., one spot where it was an int.
2346
2347         (WebCore::RenderMultiColumnSet::paintObject):
2348         RenderMultiColumnSet should be using paintObject and not paint and it needs to check for visibility
2349         and phases now that it is a RenderBlock subclass.
2350
2351         (WebCore::RenderMultiColumnSet::paintColumnRules):
2352         Fix the bug that Opera guys fixed in the old multi-column code. They didn't patch the new code, so this
2353         takes care of that.
2354
2355         * rendering/RenderMultiColumnSet.h:
2356         (RenderMultiColumnSet):
2357         Change to use paintObject instead of paint.
2358
2359 2013-02-19  Branimir Lambov  <blambov@google.com>
2360
2361         Fix 'slice' aspect ratio calculation
2362         https://bugs.webkit.org/show_bug.cgi?id=99984
2363
2364         Reviewed by Dirk Schulze.
2365
2366         Previously the calculation for the 'slice' aspect ratio would incorrectly calculate the
2367         source rect location based on the destination rect offset. This caused our source rect to be
2368         incorrect, and sometimes render outside the visible area completely. After this patch
2369         our implementation matches the implementation of both Gecko and Presto.
2370
2371         The relevant spec section:
2372         http://www.w3.org/TR/SVG/single-page.html#coords-PreserveAspectRatioAttribute
2373
2374         Tests: svg/as-image/image-preserveAspectRatio-all.svg
2375                svg/filters/feImage-preserveAspectRatio-all.svg
2376
2377         * svg/SVGPreserveAspectRatio.cpp:
2378         (WebCore::SVGPreserveAspectRatio::transformRect):
2379
2380 2013-02-19  Kentaro Hara  <haraken@google.com>
2381
2382         [V8] ScriptRunner::runCompiledScript() should return Handle<Value>() when OOM occurs
2383         https://bugs.webkit.org/show_bug.cgi?id=110254
2384
2385         Reviewed by Adam Barth.
2386
2387         Chromium bug: https://code.google.com/p/chromium/issues/detail?id=176951
2388
2389         Currently ScriptRunner::runCompiledScript() calls
2390         ASSERT(script.IsEmpty()) when OOM occurs. The Chromium bug is
2391         hitting the ASSERT(). The ASSERT() does not make sense at all.
2392         Instead, we should return an empty handle when OOM occurs.
2393
2394         No tests. The bug happens only when OOM occurs.
2395
2396         * bindings/v8/ScriptRunner.cpp:
2397         (WebCore::ScriptRunner::runCompiledScript):
2398
2399 2013-02-19  Elliott Sprehn  <esprehn@chromium.org>
2400
2401         Support both MutationObserver and WebKitMutationObserver
2402         https://bugs.webkit.org/show_bug.cgi?id=109776
2403
2404         Reviewed by Ojan Vafai.
2405
2406         We should allow new MutationObserver now that we support parser generated
2407         mutations. This leaves the old prefixed constructor in until we decide
2408         people don't depend on it.
2409
2410         Test: fast/dom/MutationObserver/mutation-observer-prefix.html
2411
2412         * page/DOMWindow.idl:
2413
2414 2013-02-19  Elliott Sprehn  <esprehn@chromium.org>
2415
2416         Remove RenderText::updateText
2417         https://bugs.webkit.org/show_bug.cgi?id=109991
2418
2419         Reviewed by Eric Seidel.
2420
2421         There's no reason for the generic RenderText::updateText virtual hook
2422         anymore now that r143060 made RenderQuote stop setting dirty bits during
2423         layout since the hook is only used by RenderCounter.
2424
2425         Instead add updateCounterIfNeeded and make it clear this is a hack for
2426         counters.
2427
2428         * rendering/RenderBlockLineLayout.cpp:
2429         (WebCore::updateCounterIfNeeded): Added, not handles the counter specific hack.
2430         (WebCore::dirtyLineBoxesForRenderer):
2431         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
2432         * rendering/RenderCounter.cpp:
2433         (WebCore::RenderCounter::updateCounter):
2434         * rendering/RenderCounter.h:
2435         (RenderCounter):
2436         * rendering/RenderQuote.cpp:
2437         (WebCore::RenderQuote::styleDidChange):
2438         (WebCore::RenderQuote::updateDepth):
2439         * rendering/RenderQuote.h:
2440         (RenderQuote):
2441         * rendering/RenderText.h:
2442         (RenderText):
2443
2444 2013-02-19  Tony Chang  <tony@chromium.org>
2445
2446         Border changes on tables with collapsed borders doesn't relayout table cells
2447         https://bugs.webkit.org/show_bug.cgi?id=109774
2448
2449         Reviewed by David Hyatt.
2450
2451         Test: fast/table/border-collapsing/dynamic-border-width-change.html
2452
2453         Changes to border top and border bottom on table rows also changes the size
2454         of the table cell causing a relayout to be needed.
2455
2456         * rendering/RenderTableRow.cpp:
2457         (WebCore::borderWidthChanged): Also include border top and bottom.
2458         (WebCore::RenderTableRow::styleDidChange): Remove logical from the helper function name.
2459
2460 2013-02-19  Kentaro Hara  <haraken@chromium.org>
2461
2462         Unreviewed. Rebaselined run-bindings-tests.
2463
2464         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2465         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
2466         * bindings/scripts/test/JS/JSTestObj.cpp:
2467         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
2468
2469 2013-02-19  ChangSeok Oh  <changseok.oh@collabora.com>
2470
2471         [GTK][AC] Implement matrix transform animation with clutter ac backend
2472         https://bugs.webkit.org/show_bug.cgi?id=109848
2473
2474         Reviewed by Gustavo Noronha Silva.
2475
2476         Clutter 1.12 doesn't support additive transform animations yet, so the combination
2477         of two or more transformations(such as rotation after translation) runs unexpectedly.
2478         So we use a matrix transformation instead for the case.
2479
2480         Covered by existing animation tests.
2481
2482         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2483         (WebCore::getValueFunctionNameForTransformOperation):
2484         (WebCore::GraphicsLayerClutter::createTransformAnimationsFromKeyframes):
2485         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
2486         (WebCore::toClutterActorPropertyString): Add actor property "transform"
2487         (WebCore::clutterMatrixProgress): Handle interpolation between two matrices instead of default clutter_matrix_progress.
2488         (WebCore):
2489         (WebCore::PlatformClutterAnimation::supportsAdditiveValueFunction):
2490         (WebCore::PlatformClutterAnimation::setFromValue): for TransformationMatrix.
2491         (WebCore::PlatformClutterAnimation::setToValue): ditto.
2492         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
2493         (WebCore::PlatformClutterAnimation::addTransformTransition):
2494         * platform/graphics/clutter/PlatformClutterAnimation.h:
2495         (PlatformClutterAnimation):
2496         * platform/graphics/clutter/TransformationMatrixClutter.cpp: Add copy constructor for CoglMatrix.
2497         (WebCore::TransformationMatrix::TransformationMatrix):
2498         (WebCore):
2499         * platform/graphics/transforms/TransformationMatrix.h:
2500         (TransformationMatrix):
2501
2502 2013-02-19  Kassy Coan  <kassycoan@chromium.org>
2503
2504         Update FeatureObserver on top level navigation in addition to page destruction.
2505         https://bugs.webkit.org/show_bug.cgi?id=109874
2506
2507         Reviewed by Adam Barth.
2508
2509         No new tests. Only effect is to histogram more frequently.
2510
2511         * loader/FrameLoader.cpp:
2512         (WebCore::FrameLoader::dispatchDidCommitLoad):
2513         * page/FeatureObserver.cpp:
2514         (WebCore::FeatureObserver::~FeatureObserver):
2515         (WebCore):
2516         (WebCore::FeatureObserver::updateMeasurements):
2517         (WebCore::FeatureObserver::didCommitLoad):
2518         * page/FeatureObserver.h:
2519         (FeatureObserver):
2520
2521 2013-02-19  Morten Stenshorne  <mstensho@opera.com>
2522
2523         Remove unnecessary (and problematic) copy-constructor from LayoutUnit
2524         https://bugs.webkit.org/show_bug.cgi?id=110121
2525
2526         This copy constructor does what a default copy constructor would do, so
2527         it's not necessary. Furthermore, this copy constructor is the only
2528         reason why LayoutUnit becomes non-POD, and that triggers a gdb bug,
2529         making it impossible to do things like "print location()" when inside
2530         some RenderBlock, for instance.
2531
2532         Gdb bug http://sourceware.org/bugzilla/show_bug.cgi?id=15154 reported.
2533
2534         Reviewed by Benjamin Poulain.
2535
2536         No tests. Apart from dealing with buggy debuggers, this is just code cleanup.
2537
2538         * platform/LayoutUnit.h:
2539
2540 2013-02-19  Emil A Eklund  <eae@chromium.org>
2541
2542         LayoutUnit::epsilon shouldn't be necessary to place floats
2543         https://bugs.webkit.org/show_bug.cgi?id=94000
2544
2545         Reviewed by Levi Weintraub.
2546         
2547         Currently, to get float placement correct, we need to have an
2548         epsilon tolerance in RenderBlock::computeLogicalLocationForFloat
2549         for the width of the line to fit them on. This really shouldn't
2550         be necessary, and probably indicates we're losing precision
2551         elsewhere.
2552         
2553         Remove epsilon as it no longer appears to be needed. All layout
2554         tests pass without it.
2555
2556         No new tests, covered by existing tests.
2557
2558         * rendering/RenderBlock.cpp:
2559         (WebCore::RenderBlock::computeLogicalLocationForFloat):
2560
2561 2013-02-19  Tim Volodine  <timvolodine@chromium.org>
2562
2563         Text Autosizing: prevent oscillation of font sizes during autosizing
2564         https://bugs.webkit.org/show_bug.cgi?id=108205
2565
2566         Reviewed by Kenneth Rohde Christiansen.
2567
2568         On some websites autosized font-sizes oscillate due to layouts caused by
2569         hovering or incremental page loading (and on other sites font sizes do
2570         eventually stabilize, but it takes many layouts before they reach a steady
2571         size). To prevent all these cases, we no longer allow the autosizing
2572         multiplier to change after it has been set (to a value other than 1).
2573
2574         This won't always give exactly the same results, but testing on 2000 top
2575         sites shows that this makes little difference in practice, and it prevents
2576         these very jarring cases. As a happy side-effect, this speeds up layouts
2577         as font sizes change less.
2578
2579         Test: fast/text-autosizing/oscillation-javascript-fontsize-change.html
2580
2581         * page/FrameView.cpp:
2582         (WebCore::FrameView::setFrameRect):
2583         * page/Settings.cpp:
2584         (WebCore::Settings::setTextAutosizingFontScaleFactor):
2585         * rendering/TextAutosizer.cpp:
2586         (WebCore::TextAutosizer::recalculateMultipliers):
2587         (WebCore):
2588         (WebCore::TextAutosizer::processContainer):
2589         * rendering/TextAutosizer.h:
2590         (TextAutosizer):
2591
2592 2013-02-19  Youenn Fablet  <youennf@gmail.com>
2593
2594         [EFL][DRT] http/tests/loading/307-after-303-after-post.html times out
2595         https://bugs.webkit.org/show_bug.cgi?id=93214
2596
2597         Ensured that GET verb is consistently used for any request
2598         coming after a redirection that triggers switching to GET.
2599
2600         Reviewed by Martin Robinson.
2601
2602         * platform/network/soup/ResourceHandleSoup.cpp:
2603         (WebCore::doRedirect):
2604
2605 2013-02-19  Andras Becsi  <andras.becsi@digia.com>
2606
2607         [Qt] Fix compilation if Qt was configured with -no-rtti
2608         https://bugs.webkit.org/show_bug.cgi?id=110234
2609
2610         Reviewed by Noam Rosenthal.
2611
2612         Availability of dynamic_cast should be checked.
2613
2614         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2615         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
2616
2617 2013-02-18  Alexey Proskuryakov  <ap@apple.com>
2618
2619         Unregistered blob URLs have incorrect MIME type
2620         https://bugs.webkit.org/show_bug.cgi?id=110166
2621
2622         Reviewed by Sam Weinig.
2623
2624         * page/SecurityOrigin.cpp: (WebCore::SecurityOrigin::shouldUseInnerURL): Added a FIXME.
2625
2626         * platform/network/BlobResourceHandle.cpp: (WebCore::BlobResourceHandle::notifyResponseOnError):
2627         Pass an accurate MIME type (for a delegate to see).
2628
2629 2013-02-19  Joshua Bell  <jsbell@chromium.org>
2630
2631         IndexedDB: additional checks on LevelDB decoding
2632         https://bugs.webkit.org/show_bug.cgi?id=109711
2633
2634         Reviewed by Tony Chang.
2635
2636         Watch out for decoding errors caused by corrupted data, and exit various
2637         decode/compare operations earlier.
2638
2639         Covered by existing LayoutTests and Chromium's webkit_unit_tests
2640
2641         * Modules/indexeddb/IDBLevelDBCoding.cpp:
2642         (WebCore::IDBLevelDBCoding::decodeStringWithLength): Bail if length is negative.
2643         (WebCore::IDBLevelDBCoding::compareEncodedStringsWithLength): Distinguish error case.
2644         (WebCore::IDBLevelDBCoding::extractEncodedIDBKey): Bail if length is negative.
2645         (WebCore::IDBLevelDBCoding::compareEncodedIDBKeys): Distinguish error case.
2646         (WebCore::IDBLevelDBCoding::compare): Plumb through "ok".
2647         (WebCore::IDBLevelDBCoding::ObjectStoreDataKey::compare): Ditto.
2648         (WebCore::IDBLevelDBCoding::ExistsEntryKey::compare): Ditto.
2649         (WebCore::IDBLevelDBCoding::IndexDataKey::compare): Ditto.
2650         * Modules/indexeddb/IDBLevelDBCoding.h: Updated method signatures.
2651
2652 2013-02-19  ChangSeok Oh  <changseok.oh@collabora.com>
2653
2654         [GTK][AC] Implement keyframe animations with clutter ac backend
2655         https://bugs.webkit.org/show_bug.cgi?id=110057
2656
2657         Reviewed by Gustavo Noronha Silva.
2658
2659         This patch brings accelerated keyframe animation with clutter to WebKitGtk+.
2660         Changes of GraphicsLayerClutter are based on GraphicsLayerCA. But major changes
2661         of PlatformClutterAnimation are implemented with clutter keyframe transition apis.
2662         See http://developer.gnome.org/clutter/stable/ClutterKeyframeTransition.html
2663
2664         Covered by existing animation tests.
2665
2666         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2667         (WebCore::GraphicsLayerClutter::createKeyframeAnimation):
2668         (WebCore::GraphicsLayerClutter::setTransformAnimationKeyframes):
2669         (WebCore::GraphicsLayerClutter::setAnimationKeyframes):
2670         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
2671         (WebCore::toClutterActorPropertyString):
2672         (WebCore::PlatformClutterAnimation::PlatformClutterAnimation):
2673         (WebCore::PlatformClutterAnimation::setTimingFunction):
2674         (WebCore::PlatformClutterAnimation::setValues):
2675         (WebCore::PlatformClutterAnimation::setKeyTimes):
2676         (WebCore::PlatformClutterAnimation::setTimingFunctions):
2677         (WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
2678         (WebCore):
2679         (WebCore::PlatformClutterAnimation::addClutterKeyframeTransitionForProperty):
2680         (WebCore::PlatformClutterAnimation::addOpacityTransition):
2681         (WebCore::PlatformClutterAnimation::addTransformTransition):
2682         (WebCore::PlatformClutterAnimation::addAnimationForKey):
2683         (WebCore::PlatformClutterAnimation::removeAnimationForKey):
2684         * platform/graphics/clutter/PlatformClutterAnimation.h:
2685         (PlatformClutterAnimation):
2686
2687 2013-02-19  Claudio Saavedra  <csaavedra@igalia.com>
2688
2689         [harfbuzz] Crash in harfbuzz related code
2690         https://bugs.webkit.org/show_bug.cgi?id=110145
2691
2692         Reviewed by Martin Robinson.
2693
2694         Patch by Behdad Esfahbod <behdad@google.com>
2695
2696         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
2697         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Ask harfbuzz
2698         to guess the segment properties.
2699
2700 2013-02-19  Pavel Podivilov  <podivilov@chromium.org>
2701
2702         Web Inspector: release backtrace object group on each step.
2703         https://bugs.webkit.org/show_bug.cgi?id=110223
2704
2705         Reviewed by Pavel Feldman.
2706
2707         * inspector/InspectorDebuggerAgent.cpp:
2708         (WebCore):
2709         (WebCore::InspectorDebuggerAgent::stepOver):
2710         (WebCore::InspectorDebuggerAgent::stepInto):
2711         (WebCore::InspectorDebuggerAgent::stepOut):
2712
2713 2013-02-19  Sheriff Bot  <webkit.review.bot@gmail.com>
2714
2715         Unreviewed, rolling out r142975.
2716         http://trac.webkit.org/changeset/142975
2717         https://bugs.webkit.org/show_bug.cgi?id=110225
2718
2719         Introduces hard-to-reproduce crashes upon inspected page
2720         navigation on Mac (Requested by apavlov on #webkit).
2721
2722         * dom/DocumentStyleSheetCollection.cpp:
2723         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
2724         * inspector/Inspector.json:
2725         * inspector/InspectorCSSAgent.cpp:
2726         (WebCore::InspectorCSSAgent::InspectorCSSAgent):
2727         (WebCore::InspectorCSSAgent::clearFrontend):
2728         (WebCore::InspectorCSSAgent::enable):
2729         (WebCore::InspectorCSSAgent::getAllStyleSheets):
2730         (WebCore::InspectorCSSAgent::collectStyleSheets):
2731         (WebCore::InspectorCSSAgent::bindStyleSheet):
2732         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
2733         (WebCore::InspectorCSSAgent::detectOrigin):
2734         (WebCore::InspectorCSSAgent::buildObjectForRule):
2735         * inspector/InspectorCSSAgent.h:
2736         (InspectorCSSAgent):
2737         * inspector/InspectorInstrumentation.cpp:
2738         (WebCore):
2739         * inspector/InspectorInstrumentation.h:
2740         (WebCore):
2741         (InspectorInstrumentation):
2742         * inspector/front-end/CSSStyleModel.js:
2743         (WebInspector.CSSStyleModel.prototype.getViaInspectorResourceForRule):
2744         (WebInspector.CSSStyleModelResourceBinding.prototype.):
2745         (WebInspector.CSSStyleModelResourceBinding.prototype.requestStyleSheetIdForResource):
2746         (WebInspector.CSSStyleModelResourceBinding.prototype.requestResourceURLForStyleSheetId):
2747         (WebInspector.CSSStyleModelResourceBinding.prototype._styleSheetIdForResource):
2748         (WebInspector.CSSStyleModelResourceBinding.prototype._loadStyleSheetHeaders):
2749         (WebInspector.CSSStyleModelResourceBinding.prototype.headersLoaded):
2750         (WebInspector.CSSStyleModelResourceBinding.prototype._requestViaInspectorResource):
2751         (WebInspector.CSSStyleModelResourceBinding.prototype._getOrCreateInspectorResource):
2752         (WebInspector.CSSStyleModelResourceBinding.prototype._reset):
2753         * inspector/front-end/SASSSourceMapping.js:
2754         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged.callback):
2755         (WebInspector.SASSSourceMapping.prototype._styleSheetChanged):
2756         * inspector/front-end/StylesSidebarPane.js:
2757         (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode.callback):
2758         (WebInspector.StylePropertiesSection.prototype._createRuleOriginNode):
2759         * inspector/front-end/StylesSourceMapping.js:
2760         (WebInspector.StyleContentBinding.prototype.callback):
2761         (WebInspector.StyleContentBinding.prototype.setStyleContent):
2762         (WebInspector.StyleContentBinding.prototype.):
2763         (WebInspector.StyleContentBinding.prototype._innerStyleSheetChanged):
2764
2765 2013-02-19  Julien Chaffraix  <jchaffraix@webkit.org>
2766
2767         RenderGrid::computedUsedBreadthOfGridTracks can read past m_grid's size
2768         https://bugs.webkit.org/show_bug.cgi?id=110126
2769
2770         Reviewed by Ojan Vafai.
2771
2772         The issue comes from how we store the column information inside m_grid.
2773         Because m_grid is a Vector of rows, we could lose the column information
2774         if we had no row, no grid item but some columns defined in CSS. As the
2775         logic would assume that our row / column size would be greater than what
2776         the style defines explicitely, we would access past our Vector's boundary.
2777
2778         The fix is to ensure that we have at least a row so that we can store the
2779         column information in every case. This fix is overly broad as it also forces
2780         the grid to have one column, which shouldn't be an issue.
2781
2782         Test: fast/css-grid-layout/grid-element-empty-row-column.html
2783
2784         * rendering/RenderGrid.cpp:
2785         (WebCore::RenderGrid::maximumIndexInDirection):
2786         Forced this function to return at least one as the maximum index so that
2787         m_grid has at least one row / column.
2788
2789         (WebCore::RenderGrid::placeItemsOnGrid):
2790         Added a ASSERT that m_grid is bigger than the explicit grid-rows / grid-columns.
2791         Also changed an existing ASSERT to use gridWasPopulated for consistency and changed
2792         the code not to call gridRowCount as it would ASSERT (we are in the middle of populating
2793         the grid).
2794
2795         * rendering/RenderGrid.h:
2796         (WebCore::RenderGrid::gridWasPopulated):
2797         Added this helper function.
2798
2799         (WebCore::RenderGrid::gridColumnCount):
2800         Replaced a now unneeded branch with an ASSERT. As placeItemsOnGrid should be called
2801         prior to read m_grid, this change should be fine.
2802
2803         (WebCore::RenderGrid::gridRowCount):
2804         Added an ASSERT.
2805
2806 2013-02-19  Sergio Villar Senin  <svillar@igalia.com>
2807
2808         [Soup] Use synchronous calls to close completely processed streams
2809         https://bugs.webkit.org/show_bug.cgi?id=107432
2810
2811         Reviewed by Martin Robinson.
2812
2813         There is no need to close already processed streams in asynchronous
2814         calls since they won't block. Using the synchronous call will save
2815         us some code and unnecessary asynchronous burden. This is kind of
2816         a code refactor so no new tests needed.
2817
2818         * platform/network/soup/ResourceHandleSoup.cpp:
2819         (WebCore):
2820         (WebCore::redirectSkipCallback):
2821         (WebCore::readCallback):
2822
2823 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
2824
2825         Web Inspector: [Canvas] use timeline's didBeginFrame for marking frame end calls
2826         https://bugs.webkit.org/show_bug.cgi?id=110130
2827
2828         Reviewed by Pavel Feldman.
2829
2830         In Web Inspector canvas profiler use timeline's didBeginFrame for marking frame end calls instead of an ad-hoc timeout-based solution.
2831
2832         * inspector/InjectedScriptCanvasModule.cpp:
2833         (WebCore::InjectedScriptCanvasModule::markFrameEnd):
2834         (WebCore):
2835         * inspector/InjectedScriptCanvasModule.h:
2836         (InjectedScriptCanvasModule):
2837         * inspector/InjectedScriptCanvasModuleSource.js:
2838         (.):
2839         * inspector/InspectorCanvasAgent.cpp:
2840         (WebCore::InspectorCanvasAgent::hasUninstrumentedCanvases):
2841         (WebCore::InspectorCanvasAgent::notifyRenderingContextWasWrapped):
2842         (WebCore::InspectorCanvasAgent::findFramesWithUninstrumentedCanvases):
2843         (WebCore::InspectorCanvasAgent::frameNavigated):
2844         (WebCore::InspectorCanvasAgent::didBeginFrame):
2845         (WebCore):
2846         * inspector/InspectorCanvasAgent.h:
2847         (InspectorCanvasAgent):
2848         * inspector/InspectorController.cpp:
2849         (WebCore::InspectorController::didBeginFrame):
2850
2851 2013-02-19  Vsevolod Vlasov  <vsevik@chromium.org>
2852
2853         Web Inspector: Decouple various file system project implementation parts for better testability and cover with tests.
2854         https://bugs.webkit.org/show_bug.cgi?id=110204
2855
2856         Reviewed by Pavel Feldman.
2857
2858         Extracted FileSystemWorkspaceProvider from IsolatedFileSystemManager to take care of managing workspace projects and projectDelegates.
2859         Replaced FileMapping.urlForURI with urlForPath method that does not need any information about workspace structure anymore.
2860
2861         Test: inspector/file-system-project.html
2862
2863         * inspector/front-end/FileMapping.js:
2864         (WebInspector.FileMapping.prototype.urlForPath):
2865         * inspector/front-end/FileSystemProjectDelegate.js:
2866         (WebInspector.FileSystemProjectDelegate):
2867         (WebInspector.FileSystemProjectDelegate.prototype.populate.filesLoaded):
2868         (WebInspector.FileSystemProjectDelegate.prototype.populate):
2869         (WebInspector.FileSystemWorkspaceProvider):
2870         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
2871         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
2872         * inspector/front-end/IsolatedFileSystem.js:
2873         (WebInspector.IsolatedFileSystem):
2874         (WebInspector.IsolatedFileSystem.prototype.name):
2875         (WebInspector.IsolatedFileSystem.prototype.rootURL):
2876         * inspector/front-end/IsolatedFileSystemManager.js:
2877         (WebInspector.IsolatedFileSystemManager):
2878         (WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem):
2879         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved):
2880         (WebInspector.IsolatedFileSystemManager.prototype._isolatedFileSystem):
2881         (WebInspector.IsolatedFileSystemManager.prototype.requestDOMFileSystem):
2882         * inspector/front-end/inspector.js:
2883
2884 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
2885
2886         Web Inspector: [Canvas] do not replace replay image with spinner icon
2887         https://bugs.webkit.org/show_bug.cgi?id=110213
2888
2889         Reviewed by Pavel Feldman.
2890
2891         Otherwise it's visually hard to see changes in the replay image. Instead show a small spinner icon in the bottom right corner.
2892
2893         * inspector/front-end/CanvasProfileView.js:
2894         (WebInspector.CanvasProfileView):
2895         (WebInspector.CanvasProfileView.prototype._enableWaitIcon):
2896         * inspector/front-end/canvasProfiler.css:
2897         (#canvas-replay-image-container):
2898         (.canvas-debug-info):
2899         (.canvas-spinner-icon):
2900
2901 2013-02-19  Andrey Adaikin  <aandrey@chromium.org>
2902
2903         Web Inspector: [Canvas] UI: tweak replay control buttons behavior
2904         https://bugs.webkit.org/show_bug.cgi?id=110207
2905
2906         Reviewed by Pavel Feldman.
2907
2908         New behavior for control buttons in the Canvas profiler.
2909         - The NextCall button (~StepInto) on a node group should expand it and move into its first child (instead of expanding and moving into the next node group)
2910         - The NextDrawCall button (~StepOver) should move to a next node that has children (instead of just iterating call group nodes, ignoring frame nodes).
2911         - The ReplayLast button should select the last expanded node (instead of always selecting last frame group node).
2912
2913         * inspector/front-end/CanvasProfileView.js:
2914         (WebInspector.CanvasProfileView.prototype._onReplayStepClick):
2915         (WebInspector.CanvasProfileView.prototype._onReplayDrawingCallClick):
2916         (WebInspector.CanvasProfileView.prototype._onReplayLastStepClick):
2917
2918 2013-02-19  Andrei Bucur  <abucur@adobe.com>
2919
2920         [CSS Regions] Assertion in RenderFlowThread::removeRenderBoxRegionInfo
2921         https://bugs.webkit.org/show_bug.cgi?id=109914
2922
2923         Reviewed by David Hyatt.
2924
2925         This patch moves a part of the invalidation operations inside the RenderFlowThread::invalidateRegions call. The maps
2926         are cleared anyway at layout time but doing this earlier makes sure the flow thread is in a more consistent state
2927         (the RenderFlowThread object has both the region chain invalidated and the regions information cleared).
2928
2929         RenderFlowThread::removeRenderBoxRegionInfo will check if the region chain is invalidated. If true, it means the
2930         flow thread has a layout scheduled and the regions information is not yet reliable. In this case we just return from the
2931         function and wait for the layout to cleanup the box information.
2932
2933         Test: fast/regions/remove-box-info-assert.html
2934
2935         * rendering/RenderFlowThread.cpp:
2936         (WebCore::RenderFlowThread::removeRegionFromThread):
2937         (WebCore::RenderFlowThread::invalidateRegions):
2938         (WebCore):
2939         (WebCore::RenderFlowThread::layout):
2940         (WebCore::RenderFlowThread::removeRenderBoxRegionInfo):
2941         * rendering/RenderFlowThread.h:
2942         * rendering/RenderNamedFlowThread.cpp:
2943         (WebCore::RenderNamedFlowThread::removeRegionFromThread):
2944
2945 2013-02-19  Alberto Garcia  <agarcia@igalia.com>
2946
2947         Fix build broekn by r142988.
2948         https://bugs.webkit.org/show_bug.cgi?id=109530
2949
2950         Unreviewed. Build fix.
2951
2952         Properly add shortMonthFormat() to the LocaleNone class.
2953
2954         * platform/text/LocaleNone.cpp:
2955         (LocaleNone):
2956         (WebCore::LocaleNone::shortMonthFormat):
2957
2958 2013-02-19  Anton Vayvod  <avayvod@chromium.org>
2959
2960         [Text Autosizing] Combine narrow descendants of a cluster into groups that should be autosized with the same multiplier.
2961         https://bugs.webkit.org/show_bug.cgi?id=109825
2962
2963         Enhancement of the approach introduced in https://bugs.webkit.org/show_bug.cgi?id=109573.
2964         Instead of using the same text size multiplier for all narrow descendants of any autosizing
2965         cluster, group the descendants by how much narrower they are than the cluster's
2966         |blockContainingAllText| and process each group separately with a different multiplier for
2967         each one.
2968         For example, we want nested comments on the page to be autosized as a group but separately
2969         from a sidebar on the same page.
2970
2971         Reviewed by Kenneth Rohde Christiansen.
2972
2973         Updated the existing test to verify the patch.
2974
2975         * rendering/TextAutosizer.cpp:
2976         (WebCore::TextAutosizer::processClusterInternal):
2977
2978             Splits the narrow descendants of the autosizing cluster into groups before processing
2979             each group individually.
2980
2981         (WebCore::TextAutosizer::getNarrowDescendantsGroupedByWidth):
2982
2983             Sorts the narrow descendants of the given cluster into groups, combining them by the
2984             difference between their content widths. If sorted by width, two consecutive nodes
2985             belong to the same group if their width difference is no greater than 100 CSS units.
2986
2987         * rendering/TextAutosizer.h:
2988
2989             New method definitions.
2990
2991 2013-02-18  Ilya Tikhonovsky  <loislo@chromium.org>
2992
2993         Web Inspector: Native Memory Instrumentation: show user provided name property of the heap snapshot node.
2994         https://bugs.webkit.org/show_bug.cgi?id=110124
2995
2996         Reviewed by Yury Semikhatsky.
2997
2998         Publish userProvidedName into grid node.
2999
3000         * inspector/front-end/HeapSnapshotGridNodes.js:
3001         (WebInspector.HeapSnapshotGenericObjectNode):
3002         (WebInspector.HeapSnapshotGenericObjectNode.prototype._createObjectCell):
3003         (WebInspector.HeapSnapshotGenericObjectNode.prototype.get data):
3004         * inspector/front-end/HeapSnapshotProxy.js:
3005         (WebInspector.HeapSnapshotWorker):
3006         * inspector/front-end/NativeHeapSnapshot.js:
3007         (WebInspector.NativeHeapSnapshotNode.prototype.serialize):
3008
3009 2013-02-19  Arpita Bahuguna  <a.bah@samsung.com>
3010
3011         Caret is not displayed when trying to focus inside a contenteditable element containing an empty block.
3012         https://bugs.webkit.org/show_bug.cgi?id=108053
3013
3014         Reviewed by Ryosuke Niwa.
3015
3016         Test: editing/selection/caret-in-div-containing-empty-block.html
3017
3018         * rendering/RenderBox.cpp:
3019         (WebCore::RenderBox::localCaretRect):
3020         When trying to compute the caret rect for the contenteditable div, the
3021         border and the padding were not considered. Because of this, for the
3022         given test case, which had a border defined on the containing div, the
3023         caret was being painted just atop the border, thereby masking it.
3024
3025         Have modified the code to ensure that the computed caret rect takes
3026         into account the border and padding (if any) specified on the box, but only
3027         if the node doesn't have content that shall be skipped for editing.
3028
3029         We do not add border and padding while computing the caret rect for any
3030         element that either has no content or has content that shall be skipped
3031         for editing purposes. This holds true for table elements as well.
3032
3033         This helps avoid the caret displacement previsouly observed before/after
3034         any controls placed within the contenteditable box, when considering
3035         border and padding in computation of the caret rect.
3036
3037 2013-02-19  Mihnea Ovidenie  <mihnea@adobe.com>
3038
3039         CSSRegions: crash positioned object with inline containing block in flow thread
3040         https://bugs.webkit.org/show_bug.cgi?id=108307
3041
3042         Reviewed by David Hyatt.
3043
3044         The fix for https://bugs.webkit.org/show_bug.cgi?id=69896 allowed positioned blocks work
3045         with variable width regions. However, the information needed for that is available only
3046         when the container used for positioning is a block.
3047
3048         This patch ensures we are using this solution only when the container used for positioning
3049         is a block. This needs to be revisited when we will extend support for other types of boxes
3050         as mentioned in RenderBox::renderBoxRegionInfo.
3051
3052         Test: fast/regions/positioned-object-inline-cb-crash.html
3053
3054         * rendering/RenderBox.cpp:
3055         (WebCore::RenderBox::renderBoxRegionInfo):
3056         (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
3057         (WebCore::RenderBox::computePositionedLogicalWidth): Make sure we are using containerBlocks
3058         that are blocks. Add an assert that the type of containerBlock we are using can have
3059         computed RenderBoxRegionInfo.
3060         (WebCore::RenderBox::computePositionedLogicalHeight):
3061         * rendering/RenderBoxModelObject.h:
3062         (WebCore::RenderBoxModelObject::canHaveBoxInfoInRegion): This helper method
3063         will return the boxes that may have computed RenderBoxRegionInfo. Currently,
3064         returns true for blocks only.
3065
3066 2013-02-19  Ryosuke Niwa  <rniwa@webkit.org>
3067
3068         Yet anther JSC build fix after r143304.
3069
3070         * bindings/js/JSDOMBinding.h:
3071         (WebCore::argumentOrNull):
3072
3073 2013-02-19  Kentaro Hara  <haraken@chromium.org>
3074
3075         Unreviewed build fix. Fixed warning caused by r143305.
3076
3077         * bindings/scripts/CodeGeneratorJS.pm:
3078         (GenerateParametersCheck):
3079         * bindings/scripts/CodeGeneratorV8.pm:
3080         (GenerateParametersCheck):
3081
3082 2013-02-19  Kentaro Hara  <haraken@chromium.org>
3083
3084         Unreviewed build fix after r143304.
3085
3086         * bindings/js/JSDOMBinding.h:
3087         (WebCore::argumentOrNull):
3088
3089 2013-02-19  Kentaro Hara  <haraken@chromium.org>
3090
3091         [V8] Remove redundant usage of MAYBE_MISSING_PARAMETER() macro
3092         https://bugs.webkit.org/show_bug.cgi?id=109899
3093
3094         Reviewed by Adam Barth.
3095
3096         Currently:
3097
3098         - MAYBE_MISSING_PARAMETER(args, index, DefaultIsUndefined) returns args[index].
3099         - MAYBE_MISSING_PARAMETER(args, index, DefaultIsNullString) returns Local<Value>()
3100         if args[index] is missing (i.e. the length of |args| is less than |index|).
3101         It returns args[index] otherwise.
3102
3103         No one other than CodeGeneratorV8.pm uses
3104         MAYBE_MISSING_PARAMETER(args, index, DefaultIsUndefined). Instead, we simply use
3105         args[index]. We should remove the redundant usage from CodeGeneratorV8.pm too.
3106         The long-name macro has been making generated code less readable.
3107
3108         In addition, we can rename MAYBE_MISSING_PARAMETER() to argumentOrNull().
3109
3110         No tests. No change in behavior.
3111
3112         * bindings/scripts/CodeGeneratorV8.pm:
3113         (GenerateParametersCheck):
3114         * bindings/scripts/test/V8/V8Float64Array.cpp:
3115         (WebCore::Float64ArrayV8Internal::fooCallback):
3116         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
3117         (WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):
3118         (WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):
3119         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
3120         (WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):
3121         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3122         (WebCore::TestEventTargetV8Internal::itemCallback):
3123         (WebCore::TestEventTargetV8Internal::dispatchEventCallback):
3124         * bindings/scripts/test/V8/V8TestInterface.cpp:
3125         (WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
3126         (WebCore::V8TestInterface::constructorCallback):
3127         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3128         (WebCore::TestMediaQueryListListenerV8Internal::methodCallback):
3129         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
3130         (WebCore::V8TestNamedConstructorConstructorCallback):
3131         * bindings/scripts/test/V8/V8TestObj.cpp:
3132         (WebCore::TestObjV8Internal::voidMethodWithArgsCallback):
3133         (WebCore::TestObjV8Internal::longMethodWithArgsCallback):
3134         (WebCore::TestObjV8Internal::objMethodWithArgsCallback):
3135         (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
3136         (WebCore::TestObjV8Internal::methodReturningSequenceCallback):
3137         (WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):
3138         (WebCore::TestObjV8Internal::optionsObjectCallback):
3139         (WebCore::TestObjV8Internal::methodWithOptionalArgCallback):
3140         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgCallback):
3141         (WebCore::TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):
3142         (WebCore::TestObjV8Internal::methodWithOptionalStringCallback):
3143         (WebCore::TestObjV8Internal::methodWithOptionalStringIsUndefinedCallback):
3144         (WebCore::TestObjV8Internal::methodWithOptionalStringIsNullStringCallback):
3145         (WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback):
3146         (WebCore::TestObjV8Internal::overloadedMethod1Callback):
3147         (WebCore::TestObjV8Internal::overloadedMethod2Callback):
3148         (WebCore::TestObjV8Internal::overloadedMethod3Callback):
3149         (WebCore::TestObjV8Internal::overloadedMethod4Callback):
3150         (WebCore::TestObjV8Internal::overloadedMethod6Callback):
3151         (WebCore::TestObjV8Internal::overloadedMethod7Callback):
3152         (WebCore::TestObjV8Internal::overloadedMethod8Callback):
3153         (WebCore::TestObjV8Internal::overloadedMethod9Callback):
3154         (WebCore::TestObjV8Internal::overloadedMethod10Callback):
3155         (WebCore::TestObjV8Internal::overloadedMethod11Callback):
3156         (WebCore::TestObjV8Internal::classMethodWithOptionalCallback):
3157         (WebCore::TestObjV8Internal::overloadedMethod12Callback):
3158         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):
3159         (WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):
3160         (WebCore::TestObjV8Internal::enabledPerContextMethod1Callback):
3161         (WebCore::TestObjV8Internal::enabledPerContextMethod2Callback):
3162         (WebCore::TestObjV8Internal::stringArrayFunctionCallback):
3163         (WebCore::TestObjV8Internal::domStringListFunctionCallback):
3164         (WebCore::TestObjV8Internal::convert1Callback):
3165         (WebCore::TestObjV8Internal::convert2Callback):
3166         (WebCore::TestObjV8Internal::convert4Callback):
3167         (WebCore::TestObjV8Internal::convert5Callback):
3168         (WebCore::TestObjV8Internal::strictFunctionCallback):
3169         (WebCore::TestObjV8Internal::variadicStringMethodCallback):
3170         (WebCore::TestObjV8Internal::variadicDoubleMethodCallback):
3171         (WebCore::TestObjV8Internal::variadicNodeMethodCallback):
3172         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
3173         (WebCore::V8TestOverloadedConstructors::constructor1Callback):
3174         (WebCore::V8TestOverloadedConstructors::constructor2Callback):
3175         (WebCore::V8TestOverloadedConstructors::constructor3Callback):
3176         (WebCore::V8TestOverloadedConstructors::constructor4Callback):
3177         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3178         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
3179         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
3180         (WebCore::TestTypedefsV8Internal::funcCallback):
3181         (WebCore::TestTypedefsV8Internal::setShadowCallback):
3182         (WebCore::TestTypedefsV8Internal::methodWithSequenceArgCallback):
3183         (WebCore::TestTypedefsV8Internal::nullableArrayArgCallback):
3184         (WebCore::TestTypedefsV8Internal::stringArrayFunctionCallback):
3185         (WebCore::TestTypedefsV8Internal::stringArrayFunction2Callback):
3186         (WebCore::V8TestTypedefs::constructorCallback):
3187         * bindings/v8/V8BindingMacros.h:
3188         (WebCore):
3189         * bindings/v8/custom/V8HistoryCustom.cpp:
3190         (WebCore::V8History::pushStateCallbackCustom):
3191         (WebCore::V8History::replaceStateCallbackCustom):
3192
3193 2013-02-19  Kentaro Hara  <haraken@chromium.org>
3194
3195         [JSC] MAYBE_MISSING_PARAMETER(..., DefaultIsNullString) macro is redundant
3196         https://bugs.webkit.org/show_bug.cgi?id=109902
3197
3198         Reviewed by Adam Barth.
3199
3200         Currently:
3201
3202         - MAYBE_MISSING_PARAMETER(exec, index, DefaultIsUndefined)
3203           returns exec->argument(index).
3204         - MAYBE_MISSING_PARAMETER(exec, index, DefaultIsNullString)
3205           returns JSValue() if exec->argument(index) is missing
3206           (i.e. the length of the argument is less than index).
3207           It returns exec->argument(index) otherwise.
3208
3209         No one other than CodeGeneratorJS.pm uses
3210         MAYBE_MISSING_PARAMETER(exec, index, DefaultIsUndefined).
3211         Instead, we simply use exec->argument(index). We should remove
3212         the redundant usage in CodeGeneratorJS.pm too. The long-name macro
3213         has been making generated code less readable.
3214
3215         In addition, we can rename MAYBE_MISSING_PARAMETER() to argumentOrNull().
3216
3217         c.f. corresponding V8 bug: https://bugs.webkit.org/show_bug.cgi?id=109899
3218
3219         No tests. No change in behavior.
3220
3221         * bindings/js/JSDOMBinding.h:
3222         (WebCore):
3223         * bindings/scripts/CodeGeneratorJS.pm:
3224         (GenerateParametersCheck):
3225         * bindings/scripts/test/JS/JSFloat64Array.cpp:
3226         (WebCore::jsFloat64ArrayPrototypeFunctionFoo):
3227         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3228         (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunction):
3229         (WebCore::jsTestActiveDOMObjectPrototypeFunctionPostMessage):
3230         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3231         (WebCore::jsTestCustomNamedGetterPrototypeFunctionAnotherFunction):
3232         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3233         (WebCore::jsTestEventTargetPrototypeFunctionItem):
3234         (WebCore::jsTestEventTargetPrototypeFunctionDispatchEvent):
3235         * bindings/scripts/test/JS/JSTestInterface.cpp:
3236         (WebCore::JSTestInterfaceConstructor::constructJSTestInterface):
3237         (WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
3238         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3239         (WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
3240         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3241         (WebCore::JSTestNamedConstructorNamedConstructor::constructJSTestNamedConstructor):
3242         * bindings/scripts/test/JS/JSTestObj.cpp:
3243         (WebCore::jsTestObjPrototypeFunctionVoidMethodWithArgs):
3244         (WebCore::jsTestObjPrototypeFunctionLongMethodWithArgs):
3245         (WebCore::jsTestObjPrototypeFunctionObjMethodWithArgs):
3246         (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg):
3247         (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence):
3248         (WebCore::jsTestObjPrototypeFunctionMethodThatRequiresAllArgsAndThrows):
3249         (WebCore::jsTestObjPrototypeFunctionSerializedValue):
3250         (WebCore::jsTestObjPrototypeFunctionOptionsObject):
3251         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalArg):
3252         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndOptionalArg):
3253         (WebCore::jsTestObjPrototypeFunctionMethodWithNonOptionalArgAndTwoOptionalArgs):
3254         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalString):
3255         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
3256         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsNullString):
3257         (WebCore::jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg):
3258         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod1):
3259         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod2):
3260         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod3):
3261         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod4):
3262         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod6):
3263         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod7):
3264         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod8):
3265         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9):
3266         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod10):
3267         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod11):
3268         (WebCore::jsTestObjConstructorFunctionClassMethodWithOptional):
3269         (WebCore::jsTestObjConstructorFunctionOverloadedMethod11):
3270         (WebCore::jsTestObjConstructorFunctionOverloadedMethod12):
3271         (WebCore::jsTestObjPrototypeFunctionMethodWithUnsignedLongSequence):
3272         (WebCore::jsTestObjPrototypeFunctionStringArrayFunction):
3273         (WebCore::jsTestObjPrototypeFunctionDomStringListFunction):
3274         (WebCore::jsTestObjPrototypeFunctionConvert1):
3275         (WebCore::jsTestObjPrototypeFunctionConvert2):
3276         (WebCore::jsTestObjPrototypeFunctionConvert4):
3277         (WebCore::jsTestObjPrototypeFunctionConvert5):
3278         (WebCore::jsTestObjPrototypeFunctionStrictFunction):
3279         (WebCore::jsTestObjPrototypeFunctionVariadicStringMethod):
3280         (WebCore::jsTestObjPrototypeFunctionVariadicDoubleMethod):
3281         (WebCore::jsTestObjPrototypeFunctionVariadicNodeMethod):
3282         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3283         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors1):
3284         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors2):
3285         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors3):
3286         (WebCore::JSTestOverloadedConstructorsConstructor::constructJSTestOverloadedConstructors4):
3287         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3288         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::constructJSTestSerializedScriptValueInterface):
3289         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionAcceptTransferList):
3290         (WebCore::jsTestSerializedScriptValueInterfacePrototypeFunctionMultiTransferList):
3291         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3292         (WebCore::JSTestTypedefsConstructor::constructJSTestTypedefs):
3293         (WebCore::jsTestTypedefsPrototypeFunctionFunc):
3294         (WebCore::jsTestTypedefsPrototypeFunctionMultiTransferList):
3295         (WebCore::jsTestTypedefsPrototypeFunctionSetShadow):
3296         (WebCore::jsTestTypedefsPrototypeFunctionMethodWithSequenceArg):
3297         (WebCore::jsTestTypedefsPrototypeFunctionNullableArrayArg):
3298         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction):
3299         (WebCore::jsTestTypedefsPrototypeFunctionStringArrayFunction2):
3300
3301 2013-02-18  Hayato Ito  <hayato@chromium.org>
3302
3303         Make EventDispatcher take an Event object in its constructor.
3304         https://bugs.webkit.org/show_bug.cgi?id=109898
3305
3306         Reviewed by Dimitri Glazkov.
3307
3308         Re-landing r143145, which caused a crash when deltaX and deltaY of a PlatformWheelEvent are both zero.
3309
3310         Fixed a crash by early exiting in EventDispatcher::dispatchEvent(Node*, PassRefPtr<EventDispatcher*>)
3311         if mediator's event() returns null.
3312
3313         Also Added a layout test to catch this kind of crash in the future.
3314
3315         Test: fast/events/platform-wheelevent-with-delta-zero-crash.html
3316
3317         * dom/EventDispatchMediator.cpp:
3318         (WebCore::EventDispatchMediator::dispatchEvent):
3319         * dom/EventDispatcher.cpp:
3320         (WebCore::EventDispatcher::dispatchEvent):
3321         (WebCore::EventDispatcher::EventDispatcher):
3322         (WebCore::EventDispatcher::ensureEventPath):
3323         (WebCore::EventDispatcher::dispatchSimulatedClick):
3324         (WebCore::EventDispatcher::dispatch):
3325         (WebCore::EventDispatcher::dispatchEventPreProcess):
3326         (WebCore::EventDispatcher::dispatchEventAtCapturing):
3327         (WebCore::EventDispatcher::dispatchEventAtTarget):
3328         (WebCore::EventDispatcher::dispatchEventAtBubbling):
3329         (WebCore::EventDispatcher::dispatchEventPostProcess):
3330         * dom/EventDispatcher.h:
3331         (EventDispatcher):
3332         (WebCore::EventDispatcher::node):
3333         (WebCore::EventDispatcher::event):
3334         * dom/FocusEvent.cpp:
3335         (WebCore::FocusEventDispatchMediator::dispatchEvent):
3336         (WebCore::BlurEventDispatchMediator::dispatchEvent):
3337         (WebCore::FocusInEventDispatchMediator::dispatchEvent):
3338         (WebCore::FocusOutEventDispatchMediator::dispatchEvent):
3339         * dom/GestureEvent.cpp:
3340         (WebCore::GestureEventDispatchMediator::dispatchEvent):
3341         * dom/MouseEvent.cpp:
3342         (WebCore::MouseEventDispatchMediator::dispatchEvent):
3343         * dom/WheelEvent.cpp:
3344         (WebCore::WheelEventDispatchMediator::dispatchEvent):
3345         Assert event() rather than an early exit since this code path should be hit only when event() is non-null.
3346
3347 2013-02-18  Takashi Sakamoto  <tasak@google.com>
3348
3349         :before/:after pseudo elements do not always apply to the proper element
3350         https://bugs.webkit.org/show_bug.cgi?id=93925
3351
3352         Reviewed by Dimitri Glazkov.
3353
3354         Disable sharing a style with siblings if :after or :before pseudo style
3355         is unique.
3356
3357         Test: fast/css/before-after-pseudo-class.html
3358
3359         * css/StyleResolver.cpp:
3360         (WebCore::StyleResolver::canShareStyleWithElement):
3361         Added a new condition, hasUniquePseudoStyle.
3362         * rendering/style/RenderStyle.cpp:
3363         (WebCore::RenderStyle::hasUniquePseudoStyle):
3364         Added to check whether any pseudo style has unique bit or not.
3365         (WebCore):
3366         * rendering/style/RenderStyle.h:
3367
3368 2013-02-18  Andy Estes  <aestes@apple.com>
3369
3370         Focusing a new frame (via window.focus()) should blur the active element in the current frame
3371         https://bugs.webkit.org/show_bug.cgi?id=110172
3372
3373         Reviewed by Ryosuke Niwa.
3374
3375         When a change in the focused node crosses a frame boundary, WebKit
3376         doesn't always succeed in blurring the old focused node before focusing
3377         the new one.
3378
3379         Each document remembers its focused node, and a Page-scoped
3380         FocusController remembers the focused frame. If a new focused node is
3381         in a different frame than the focused frame, FocusController tells the
3382         old frame's document to clear its focused node before focusing the new
3383         one (and remembering the new frame).
3384
3385         Unfortunately, web content can confuse FocusController by calling
3386         window.focus() at the wrong time. Since window.focus() changes
3387         FocusController's focused frame without focusing a new node,
3388         FocusController won't think that a frame boundary is being crossed if a
3389         node in this frame is later focused. Therefore it won't clear the old
3390         frame's focused node (it won't even know which frame contained the old
3391         focused node), causing at least two bugs:
3392
3393         1) The node in the old frame will not receive a blur event.
3394         2) Calling document.activeElement on the main frame will return the
3395            previously focused node, but the HTML5 spec says it should return
3396            the frame owner element if a subframe has focus.
3397
3398         Fix both of these bugs by explicitly clearing the current frame's
3399         focused node if window.focus() changes the focused frame. This fix
3400         carries some compatibility risk by changing a long-standing behavior
3401         of the engine (we've had this bug since the beginning of the project,
3402         AFAICT). On the upside, it matches the behavior of both Firefox and IE,
3403         matches what HTML5 says about subframe focus, and fixes at least one
3404         well-known enterprise web app.
3405
3406         Tests: fast/dom/HTMLDocument/active-element-frames.html
3407                fast/frames/frame-focus-blurs-active-element.html
3408
3409         * page/DOMWindow.cpp:
3410         (WebCore::DOMWindow::focus): If the frame being focused is not the same
3411         as the currently focused frame, clear the currently focused frame's
3412         focused node.
3413
3414 2013-02-18  Simon Fraser  <simon.fraser@apple.com>
3415
3416         Clean up the boolean argument to visibleContentRect
3417         https://bugs.webkit.org/show_bug.cgi?id=110167
3418
3419         Reviewed by Simon Fraser.
3420
3421         Replace the boolean argument to visibleContentRect() with
3422         an enum.
3423
3424         No behavior change.
3425
3426         * WebCore.exp.in:
3427         * dom/Document.cpp:
3428         (WebCore::Document::viewportSize):
3429         * inspector/InspectorOverlay.cpp:
3430         (WebCore::InspectorOverlay::update):
3431         * page/DOMWindow.cpp:
3432         (WebCore::DOMWindow::innerHeight):
3433         (WebCore::DOMWindow::innerWidth):
3434         * page/FrameView.cpp:
3435         (WebCore::FrameView::calculateScrollbarModesForLayout):
3436         (WebCore::FrameView::layout):
3437         (WebCore::FrameView::performPostLayoutTasks):
3438         (WebCore::FrameView::windowClipRect):