Remove overflow: scroll handling in block flow layout methods
[WebKit.git] / Source / WebCore / ChangeLog
1 2012-07-30  Julien Chaffraix  <jchaffraix@webkit.org>
2
3         Remove overflow: scroll handling in block flow layout methods
4         https://bugs.webkit.org/show_bug.cgi?id=92689
5
6         Reviewed by Simon Fraser.
7
8         The overflow: scroll scrollbars creation was done at layout time for all RenderBlocks and
9         descendants. This was not only wrong ('overflow' only changes at style change time) but it
10         was also introducing some code duplication.
11
12         The gist of this change is to share the code by moving it to RenderLayer::updateScrollbarsAfterStyleChange,
13         this includes the code from bug 69993 to special case list box part.
14
15         Covered by existing tests:
16         - All fast/overflow ones.
17         - For the list box change:
18             fast/forms/select-overflow-scroll-inherited.html
19             fast/forms/select-overflow-scroll.html
20         - For the flexbox:
21             css3/flexbox/preferred-widths-orthogonal.html
22             css3/flexbox/preferred-widths.html
23
24         * rendering/RenderBlock.cpp:
25         (WebCore::RenderBlock::layoutBlock):
26         * rendering/RenderDeprecatedFlexibleBox.cpp:
27         (WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
28         * rendering/RenderGrid.cpp:
29         (WebCore::RenderGrid::layoutBlock):
30         * rendering/RenderFlexibleBox.cpp:
31         (WebCore::RenderFlexibleBox::layoutBlock):
32         Removed the common code here.
33
34         * rendering/RenderFlexibleBox.cpp:
35         (WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
36         Changed to an ASSERT now that the right scrollbars are created. This is
37         fine as overflow-x/y are physical coordinates and our access was following that.
38
39         * rendering/RenderLayer.cpp:
40         (WebCore::RenderLayer::invalidateScrollbarRect):
41         Added an early return here if we are not attached yet as RenderLayer::styleChanged
42         is called at attachment time before we are inserted in the tree. This is fine as the
43         scrollbars are part of the object which will be painted after the first layout.
44
45         (WebCore::overflowRequiresAScrollbar):
46         (WebCore::overflowDefinesAutomaticScrollbar):
47         Split the logic in those 2 functions.
48
49         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
50         Updated to use the require / can-have functions. Also added
51         an early return for list box parts as required by bug 69993.
52
53         (WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
54         Added an early return for list box parts as required by bug 69993,
55         also removed some unneeded NULL-checks that were added for list box parts.
56
57 2012-07-30  Vivek Galatage  <vivekgalatage@gmail.com>
58
59         fillWithEmptyClients method should also initialize chromeClient with EmptyChromeClient
60         https://bugs.webkit.org/show_bug.cgi?id=92703
61
62         Reviewed by Kent Tamura.
63
64         fillWithEmptyClients should also intialize PageClients.chromeClient with EmptyChromeClient 
65         as its required for creating a Empty page and to minimize the exported symbols.
66
67         No new tests as no change in functionality.
68
69         * loader/EmptyClients.cpp:
70         (WebCore::fillWithEmptyClients):
71
72 2012-07-30  Adrienne Walker  <enne@google.com>
73
74         [chromium] Wrap ScrollbarLayerChromium in WebScrollbarLayer
75         https://bugs.webkit.org/show_bug.cgi?id=91032
76
77         Reviewed by James Robinson.
78
79         Modify ScrollingCoordinatorChromium to operate on WebScrollbarLayer
80         instead of ScrollbarLayerChromium. This removes the dependency on
81         ScrollbarLayerChromium.
82
83         No change in functionality, so no new tests.
84
85         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
86         (WebCore::ScrollingCoordinatorPrivate::setScrollLayer):
87         (WebCore::ScrollingCoordinatorPrivate::setHorizontalScrollbarLayer):
88         (WebCore::ScrollingCoordinatorPrivate::setVerticalScrollbarLayer):
89         (ScrollingCoordinatorPrivate):
90         (WebCore::createScrollbarLayer):
91
92 2012-07-30  Ryosuke Niwa  <rniwa@webkit.org>
93
94         Another Qt build fix attempt after r124098.
95         "interface" is a keyword. Don't use it. 
96
97         * dom/GestureEvent.cpp:
98         (WebCore::GestureEvent::interfaceName):
99
100 2012-07-30  Elliott Sprehn  <esprehn@gmail.com>
101
102         Make QuotesData use a Vector of pairs
103         https://bugs.webkit.org/show_bug.cgi?id=92448
104
105         Reviewed by Julien Chaffraix.
106
107         QuotesData::create returned an array of memory that contained in place instantiations
108         of a QuotesData and then String instances. This changes the code to use a Vector of
109         pairs making it safer and ensuring that quotes are always balanced. This also uses a
110         HashMap directly in the QuoteRenderer instead of building it on first access reducing
111         the amount of code needed for picking quotes by language.
112
113         Test: fast/css-generated-content/close-quote-negative-depth.html
114
115         * css/StyleResolver.cpp:
116         (WebCore::StyleResolver::collectMatchingRulesForList): Create pairs and use the new QuotesData API.
117         * rendering/RenderQuote.cpp:
118         (WebCore):
119         (WebCore::quotesDataLanguageMap): New function that returns the HashMap of languages.
120         (WebCore::basicQuotesData): Returns the simple form of quotes, " and '.
121         (WebCore::defaultQuotes): Changed to use the new map.
122         (WebCore::RenderQuote::styleDidChange):
123         (WebCore::RenderQuote::originalText): Changed to use the new getOpenQuote and getCloseQuote which ensure bounds checks.
124         * rendering/style/QuotesData.cpp:
125         (WebCore::QuotesData::create): Now returns a plain instance of QuotesData without the in place allocation.
126         (WebCore):
127         (WebCore::QuotesData::addPair): Adds an std::pair of strings ensuring quotes are always balanced.
128         (WebCore::QuotesData::getOpenQuote):
129         (WebCore::QuotesData::getCloseQuote):
130         (WebCore::QuotesData::equals): Renamed equals (added the s).
131         * rendering/style/QuotesData.h:
132         (WebCore::QuotesData::create):
133         (QuotesData):
134         (WebCore::QuotesData::QuotesData):
135         * rendering/style/RenderStyle.cpp:
136         (WebCore::RenderStyle::setQuotes):
137         * rendering/style/StyleRareInheritedData.cpp:
138         (WebCore::StyleRareInheritedData::operator==):
139
140 2012-07-30  MORITA Hajime  <morrita@google.com>
141
142         Node::replaceChild() can create bad DOM topology with MutationEvent
143         https://bugs.webkit.org/show_bug.cgi?id=92619
144
145         Reviewed by Ryosuke Niwa.
146
147         Node::replaceChild() calls insertBeforeCommon() after dispatching
148         a MutationEvent event for removeChild(). But insertBeforeCommon()
149         expects call sites to check the invariant and doesn't have
150         suffient check. So a MutationEvent handler can let some bad tree
151         topology to slip into insertBeforeCommon().
152
153         This change adds a guard for checking the invariant using
154         checkReplaceChild() between removeChild() and insertBeforeCommon().
155
156         Test: fast/events/mutation-during-replace-child.html
157
158         * dom/ContainerNode.cpp:
159         (WebCore::ContainerNode::replaceChild): Added a guard.
160
161 2012-07-30  Ryosuke Niwa  <rniwa@webkit.org>
162
163         Qt Windows build fix attempt after r124098.
164
165         * dom/GestureEvent.cpp:
166
167 2012-07-30  Wei James  <james.wei@intel.com>
168
169         [Chromium] Enable web audio IPP for x86 chromium android
170         https://bugs.webkit.org/show_bug.cgi?id=91973
171
172         Reviewed by Tony Chang.
173
174         Include the IPP libraries at link-time for Android builds when
175         compiling the Web Audio API with IPP support.
176
177         * WebCore.gyp/WebCore.gyp:
178
179 2012-07-30  Yoshifumi Inoue  <yosin@chromium.org>
180
181         [Forms] Get rid of Element::isReadOnlyFormControl other than CSS related
182         https://bugs.webkit.org/show_bug.cgi?id=92612
183
184         Reviewed by Kent Tamura.
185
186         This patch replaces Element::isReadOnlyFormControl() not related to
187         CSS selector matching to HTMLFormControlElement::readOnly() for
188         preparation of introducing Element::shouldMatchReadWriteSelector(), bug 92602.
189
190         No new tests. This patch doesn't change behavior.
191
192         * html/shadow/SliderThumbElement.cpp:
193         (WebCore::SliderThumbElement::defaultEventHandler): Changed isReadOnlyFormControl() to readOnly().
194         * html/shadow/TextControlInnerElements.cpp:
195         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): Changed isReadOnlyFormControl() to readOnly().
196         (WebCore::SpinButtonElement::defaultEventHandler): ditto.
197         (WebCore::SpinButtonElement::step): ditto.
198         (WebCore::InputFieldSpeechButtonElement::defaultEventHandler): ditto.
199         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult): ditto.
200         * rendering/RenderTextControl.cpp:
201         (updateUserModifyProperty): Changed isReadOnlyFormControl() to readOnly().
202         * rendering/RenderThemeMac.mm:
203         (WebCore::RenderThemeMac::paintSearchFieldCancelButton): Changed isReadOnlyFormControl() to readOnly().
204
205 2012-07-30  Eric Seidel  <eric@webkit.org>
206
207         Grid Demo spends 1.5% of total time allocating Path objects in RenderBoxModelObject::paintBorderSides
208         https://bugs.webkit.org/show_bug.cgi?id=92252
209
210         Reviewed by Simon Fraser.
211
212         This change introduces the concept of a "null Path" very similar to a null WTF::String.
213         Just like String functions as a RefPtr around a StringImpl, Path (for most ports)
214         functions as an OwnPtr around a PlatformPathPtr.
215
216         In various places in the code, we declare a local Path variable, but don't necessarily
217         use that Path variable in all code paths, or might pass that Path variable along to GraphicsContext
218         functions, without ever actually adding points to that Path.
219         On most platforms, this Path default constructor was causing a malloc!
220         In some of these case, the code-path in question (like paintBorderSides) can be quite hot.
221         Introducing this null-Path and delaying instantiation of the PlatformPath object
222         until it's actually needed, saves a malloc for these hot paths.
223
224         To test this, I loaded a few popular pages, and added printfs to both the Path constructor
225         and destructor, logging during construction and destruction when the path was still null at destruction time.
226
227         This simple testing showed this to be a small win (avoiding mallocs) on many sites and a huge win for Google Spreadsheets:
228         apple.com: 147 Paths created, 9 (6%) destroyed null.
229         google.com: 58 Paths created, 26 (44%) destroyed null (google seems creating 5 paths every second after load?  1 of which is destroyed empty.)
230         amazon.com: 130 Paths created, 130 (100%) destroyed null.
231         Loading an empty spreadsheet from drive.google.com: 5237 created, 4861 destroyed null (92%!) :)
232
233         * platform/graphics/Path.h:
234         (Path):
235         (WebCore::Path::isNull):
236         (WebCore::Path::ensurePlatformPath):
237         * platform/graphics/cairo/CairoUtilities.cpp:
238         (WebCore::appendWebCorePathToCairoContext):
239         * platform/graphics/cairo/GraphicsContextCairo.cpp:
240         (WebCore::GraphicsContext::fillPath):
241         (WebCore::GraphicsContext::strokePath):
242         (WebCore::GraphicsContext::clipPath):
243         (WebCore::GraphicsContext::clip):
244         * platform/graphics/cairo/PathCairo.cpp:
245         (WebCore::Path::Path):
246         (WebCore::Path::~Path):
247         (WebCore::Path::ensurePlatformPath):
248         (WebCore):
249         (WebCore::Path::operator=):
250         (WebCore::Path::clear):
251         (WebCore::Path::isEmpty):
252         (WebCore::Path::currentPoint):
253         (WebCore::Path::translate):
254         (WebCore::Path::moveTo):
255         (WebCore::Path::addLineTo):
256         (WebCore::Path::addRect):
257         (WebCore::Path::addQuadCurveTo):
258         (WebCore::Path::addBezierCurveTo):
259         (WebCore::Path::addArc):
260         (WebCore::Path::addArcTo):
261         (WebCore::Path::addEllipse):
262         (WebCore::Path::closeSubpath):
263         (WebCore::Path::boundingRect):
264         (WebCore::Path::strokeBoundingRect):
265         (WebCore::Path::contains):
266         (WebCore::Path::strokeContains):
267         (WebCore::Path::apply):
268         (WebCore::Path::transform):
269         * platform/graphics/cg/GraphicsContextCG.cpp:
270         (WebCore::GraphicsContext::drawPath):
271         (WebCore::GraphicsContext::fillPath):
272         (WebCore::GraphicsContext::strokePath):
273         (WebCore::GraphicsContext::clipPath):
274         (WebCore::GraphicsContext::clipOut):
275         * platform/graphics/cg/PathCG.cpp:
276         (WebCore::Path::Path):
277         (WebCore::Path::~Path):
278         (WebCore):
279         (WebCore::Path::ensurePlatformPath):
280         (WebCore::Path::operator=):
281         (WebCore::Path::contains):
282         (WebCore::Path::strokeContains):
283         (WebCore::Path::translate):
284         (WebCore::Path::boundingRect):
285         (WebCore::Path::fastBoundingRect):
286         (WebCore::Path::strokeBoundingRect):
287         (WebCore::Path::moveTo):
288         (WebCore::Path::addLineTo):
289         (WebCore::Path::addQuadCurveTo):
290         (WebCore::Path::addBezierCurveTo):
291         (WebCore::Path::addArcTo):
292         (WebCore::Path::platformAddPathForRoundedRect):
293         (WebCore::Path::closeSubpath):
294         (WebCore::Path::addArc):
295         (WebCore::Path::addRect):
296         (WebCore::Path::addEllipse):
297         (WebCore::Path::clear):
298         (WebCore::Path::isEmpty):
299         (WebCore::Path::currentPoint):
300         (WebCore::Path::apply):
301         * platform/graphics/gpu/LoopBlinnPathProcessor.cpp:
302         (WebCore):
303         (WebCore::LoopBlinnPathProcessor::buildContours):
304         * platform/graphics/mac/GraphicsContextMac.mm:
305         (WebCore::GraphicsContext::drawFocusRing):
306         * platform/graphics/openvg/PainterOpenVG.cpp:
307         (WebCore::PainterOpenVG::drawPath):
308         * platform/graphics/skia/GraphicsContextSkia.cpp:
309         (WebCore::GraphicsContext::clip):
310         (WebCore::GraphicsContext::canvasClip):
311         (WebCore::GraphicsContext::clipOut):
312         (WebCore::GraphicsContext::clipPath):
313         (WebCore::GraphicsContext::fillPath):
314         (WebCore::GraphicsContext::strokePath):
315         * platform/graphics/skia/PathSkia.cpp:
316         (WebCore::Path::Path):
317         (WebCore::Path::~Path):
318         (WebCore):
319         (WebCore::Path::ensurePlatformPath):
320         (WebCore::Path::operator=):
321         (WebCore::Path::isEmpty):
322         (WebCore::Path::hasCurrentPoint):
323         (WebCore::Path::currentPoint):
324         (WebCore::Path::contains):
325         (WebCore::Path::translate):
326         (WebCore::Path::boundingRect):
327         (WebCore::Path::moveTo):
328         (WebCore::Path::addLineTo):
329         (WebCore::Path::addQuadCurveTo):
330         (WebCore::Path::addBezierCurveTo):
331         (WebCore::Path::addArcTo):
332         (WebCore::Path::closeSubpath):
333         (WebCore::Path::addArc):
334         (WebCore::Path::addRect):
335         (WebCore::Path::addEllipse):
336         (WebCore::Path::clear):
337         (WebCore::Path::apply):
338         (WebCore::Path::transform):
339         (WebCore::Path::strokeBoundingRect):
340         (WebCore::Path::strokeContains):
341         * platform/graphics/wince/GraphicsContextWinCE.cpp:
342         (WebCore::GraphicsContext::fillPath):
343         (WebCore::GraphicsContext::strokePath):
344         * platform/graphics/wx/GraphicsContextWx.cpp:
345         (WebCore::GraphicsContext::clipPath):
346         (WebCore::GraphicsContext::fillPath):
347         (WebCore::GraphicsContext::strokePath):
348         * platform/graphics/wx/PathWx.cpp:
349         (WebCore::Path::Path):
350         (WebCore::Path::~Path):
351         (WebCore::Path::boundingRect):
352         (WebCore::Path::operator=):
353         (WebCore::Path::ensurePlatformPath):
354         (WebCore):
355         (WebCore::Path::clear):
356         (WebCore::Path::moveTo):
357         (WebCore::Path::addLineTo):
358         (WebCore::Path::addQuadCurveTo):
359         (WebCore::Path::addBezierCurveTo):
360         (WebCore::Path::addArcTo):
361         (WebCore::Path::closeSubpath):
362         (WebCore::Path::addArc):
363         (WebCore::Path::addRect):
364         (WebCore::Path::addEllipse):
365         (WebCore::Path::transform):
366         (WebCore::Path::currentPoint):
367
368 2012-07-30  Dominik Röttsches  <dominik.rottsches@intel.com>
369
370         Avoid Assertion Failure in HarfBuzzRun::characterIndexForXPosition
371         https://bugs.webkit.org/show_bug.cgi?id=92376
372
373         Reviewed by Tony Chang.
374
375         Previously, the if condition in offsetForPosition gating the call to
376         characterIndexForXPosition was comparing a different value than what was actually used
377         as the argument to calling it. In some cases, this can lead to a minuscule difference
378         when comparing the two floats - enough to trigger the assertion. To resolve this,
379         the accuracy of the index calculation is improved by changing the types from int
380         to floats and rephrasing the if condition to be exactly the same as what is checked
381         for in the assertion.
382
383         Manual test ManualTests/harfbuzz-mouse-selection-crash.html added
384         which reliably reproduces the assertion failure before this change.
385
386         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
387         (WebCore::HarfBuzzShaper::HarfBuzzRun::characterIndexForXPosition): Types changed to float.
388         (WebCore::HarfBuzzShaper::offsetForPosition): Types changed to float, if condition rephrased.
389         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
390         (HarfBuzzRun):
391
392 2012-06-29  James Robinson  <jamesr@chromium.org>
393
394         [chromium] Remove WebTransformationMatrix::mapPoint overrides
395         https://bugs.webkit.org/show_bug.cgi?id=90329
396
397         Reviewed by Adrienne Walker.
398
399         Add more functionality for mapping points to CCMathUtil and use it in CCLayerSorter / drawTileQuad. These
400         mappings should never clip.
401
402         * platform/chromium/support/WebTransformationMatrix.cpp:
403         * platform/graphics/chromium/LayerRendererChromium.cpp:
404         (WebCore::LayerRendererChromium::drawTileQuad):
405         * platform/graphics/chromium/cc/CCLayerSorter.cpp:
406         (WebCore::CCLayerSorter::LayerShape::LayerShape):
407         * platform/graphics/chromium/cc/CCMathUtil.cpp:
408         (WebCore::mapHomogeneousPoint):
409         (WebCore::CCMathUtil::mapPoint):
410         (WebCore):
411         * platform/graphics/chromium/cc/CCMathUtil.h:
412         (WebCore::HomogeneousCoordinate::cartesianPoint3d):
413         (HomogeneousCoordinate):
414         (CCMathUtil):
415
416 2012-07-30  Anders Carlsson  <andersca@apple.com>
417
418         Crash in logging code if MIME type is null
419         https://bugs.webkit.org/show_bug.cgi?id=92683
420         <rdar://problem/11985295>
421
422         Reviewed by Dan Bernstein.
423
424         If the MIME type is null, try to figure it out from the URL extension. If this fails, return early instead of crashing
425         trying to insert the null string into a hash set.
426
427         * loader/SubframeLoader.cpp:
428         (WebCore::logPluginRequest):
429
430 2012-07-30  Alexis Menard  <alexis.menard@openbossa.org>
431
432         Build fix with newer bison 2.6.
433         https://bugs.webkit.org/show_bug.cgi?id=92264
434
435         Reviewed by Adam Barth.
436
437         As stated in http://www.gnu.org/software/bison/manual/html_node/Table-of-Symbols.html
438         YYLEX_PARAM and YYPARSE_PARAM are depecreated since version 1.875. So far all Mac OS
439         version I had access to as well as recent Linux runs at least version 2.3 so it's safe
440         to use the replacement of these deprecated macros in favor of %lex-param and %parse-param.
441         As announced http://lists.gnu.org/archive/html/info-gnu/2012-07/msg00011.html with the release
442         of version 2.6 YYLEX_PARAM and YYPARSE_PARAM are not supported anymore.
443
444         No new tests : build fix and the patch should not trigger any regressions
445
446         * css/CSSGrammar.y:
447         * css/CSSParser.cpp:
448         * xml/XPathGrammar.y: Refactored a bit to not use an intermediate PARSER define.
449         * xml/XPathParser.cpp: bison 2.6 declare xpathyyparse in the .h file now, i.e. XPathGrammar.h
450         therefore including this file within the namespace {} declarations leads to xpathyyparse being
451         defined part of WebCore::XPath namespaces but the actual implementation of xpathyyparse is in XPathGrammar.cpp
452         (generated) and not implemented within the WebCore::XPath so it lead to linking issues. Last, XPathGrammar.h needs 
453         to be included after the other includes as it uses some XPath types. It breaks the style but CSSParser.cpp is doing the same.
454
455 2012-07-30  Sadrul Habib Chowdhury  <sadrul@chromium.org>
456
457         Propagate gesture events to plugins.
458         https://bugs.webkit.org/show_bug.cgi?id=92281
459
460         Reviewed by Adam Barth.
461
462         Propagate gesture events to plugins. This change does not expose the gesture events
463         to JavaScript, since there is no spec for that at the moment. Exposing gesture events
464         to JavaScript will be done separately, once there is a spec for it.
465
466         Test: platform/chromium/plugins/gesture-events.html
467
468         * CMakeLists.txt:
469         * GNUmakefile.list.am:
470         * Target.pri:
471         * WebCore.gypi:
472         * WebCore.xcodeproj/project.pbxproj:
473         * dom/EventNames.h:
474         (WebCore):
475         (WebCore::EventNames::isGestureEventType):
476         (EventNames):
477         * dom/GestureEvent.cpp: Added.
478         (WebCore):
479         (WebCore::GestureEvent::create):
480         (WebCore::GestureEvent::initGestureEvent):
481         (WebCore::GestureEvent::interfaceName):
482         (WebCore::GestureEvent::GestureEvent):
483         (WebCore::GestureEventDispatchMediator::GestureEventDispatchMediator):
484         (WebCore::GestureEventDispatchMediator::event):
485         (WebCore::GestureEventDispatchMediator::dispatchEvent):
486         * dom/GestureEvent.h: Added.
487         (WebCore):
488         (GestureEvent):
489         (WebCore::GestureEvent::~GestureEvent):
490         (WebCore::GestureEvent::deltaX):
491         (WebCore::GestureEvent::deltaY):
492         (WebCore::GestureEvent::GestureEvent):
493         (GestureEventDispatchMediator):
494         (WebCore::GestureEventDispatchMediator::create):
495         * dom/Node.cpp:
496         (WebCore):
497         (WebCore::Node::dispatchGestureEvent):
498         * dom/Node.h:
499         (WebCore):
500         (Node):
501         * page/EventHandler.cpp:
502         (WebCore::EventHandler::clear):
503         (WebCore::EventHandler::handleGestureEvent):
504         * page/EventHandler.h:
505
506 2012-07-30  John Bates  <jbates@google.com>
507
508         Plumb vsync-enabled flag up to compositor thread and support disable-vsync
509         https://bugs.webkit.org/show_bug.cgi?id=92323
510
511         Reviewed by James Robinson.
512
513         * platform/graphics/chromium/cc/CCFrameRateController.cpp:
514         (WebCore::CCFrameRateController::CCFrameRateController):
515         (WebCore::CCFrameRateController::disableTimeSourceThrottling):
516         (WebCore):
517         (WebCore::CCFrameRateController::setActive):
518         (WebCore::CCFrameRateController::postManualTick):
519         (WebCore::CCFrameRateController::onTimerFired):
520         (WebCore::CCFrameRateController::didBeginFrame):
521         (WebCore::CCFrameRateController::didFinishFrame):
522         * platform/graphics/chromium/cc/CCFrameRateController.h:
523         (WebCore):
524         (CCFrameRateController):
525         * platform/graphics/chromium/cc/CCLayerTreeHost.h:
526         (WebCore::CCLayerTreeSettings::CCLayerTreeSettings):
527         (CCLayerTreeSettings):
528         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
529         (WebCore::CCThreadProxy::CCThreadProxy):
530         (WebCore::CCThreadProxy::initializeImplOnImplThread):
531         * platform/graphics/chromium/cc/CCThreadProxy.h:
532         (CCThreadProxy):
533
534 2012-07-30  James Robinson  <jamesr@chromium.org>
535
536         [chromium] Add miscellaneous missing includes and OVERRIDE declarations in compositor code
537         https://bugs.webkit.org/show_bug.cgi?id=92680
538
539         Reviewed by Adrienne Walker.
540
541         * platform/graphics/chromium/TextureCopier.h:
542         (AcceleratedTextureCopier):
543         * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
544         (CCLayerTreeHostImpl):
545         * platform/graphics/chromium/cc/CCPrioritizedTextureManager.h:
546         * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h:
547         * platform/graphics/chromium/cc/CCResourceProvider.h:
548         (WebCore):
549
550 2012-07-30  Adrienne Walker  <enne@google.com>
551
552         [chromium] Remove dependency on ScrollbarTheme from the compositor
553         https://bugs.webkit.org/show_bug.cgi?id=90528
554
555         Reviewed by James Robinson.
556
557         Tested by existing layout tests.
558
559         ScrollbarLayerChromium is modified to use the Platform API for
560         WebScrollbar, WebScrollbarThemePainter, and WebScrollbarThemeGeometry.
561         This prevents API dependencies from the compositor code into WebCore
562         scrollbar and theme code.
563
564         CCScrollbarLayerImpl::CCScrollbar now implements the WebScrollbar API
565         instead of the ScrollbarThemeClient API.
566
567         Also, CCScrollbarLayerImpl now no longer gets the theme from a static
568         accessor. It now gets a "copy" of the theme from the main thread via
569         WebScrollbarThemeGeometry, which is more correct for render theme
570         scrollbars which were previously using the native theme to get part
571         geometry. Using the correct theme unfortunately causes crashes due to
572         bad casts in RenderScrollbarTheme, so this patch turns back off the
573         use of ScrollbarLayerChromium for themed scrollbars until that can be
574         resolved.
575
576         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
577         (WebCore::createScrollbarLayer):
578         * platform/ScrollbarThemeClient.h:
579         (ScrollbarThemeClient):
580         * platform/graphics/chromium/ScrollbarLayerChromium.cpp:
581         (WebCore::ScrollbarLayerChromium::create):
582         (WebCore::ScrollbarLayerChromium::ScrollbarLayerChromium):
583         (WebCore::ScrollbarLayerChromium::pushPropertiesTo):
584         (WebCore::ScrollbarBackgroundPainter::create):
585         (WebCore::ScrollbarBackgroundPainter::ScrollbarBackgroundPainter):
586         (ScrollbarBackgroundPainter):
587         (WebCore::ScrollbarThumbPainter::create):
588         (WebCore::ScrollbarThumbPainter::ScrollbarThumbPainter):
589         (ScrollbarThumbPainter):
590         (WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded):
591         (WebCore::ScrollbarLayerChromium::setTexturePriorities):
592         (WebCore::ScrollbarLayerChromium::update):
593         * platform/graphics/chromium/ScrollbarLayerChromium.h:
594         (ScrollbarLayerChromium):
595         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
596         (WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl):
597         (WebCore::CCScrollbarLayerImpl::setScrollbarData):
598         (WebCore::toUVRect):
599         (WebCore::CCScrollbarLayerImpl::appendQuads):
600         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isOverlay):
601         (WebCore::CCScrollbarLayerImpl::CCScrollbar::value):
602         (WebCore::CCScrollbarLayerImpl::CCScrollbar::location):
603         (WebCore::CCScrollbarLayerImpl::CCScrollbar::size):
604         (WebCore::CCScrollbarLayerImpl::CCScrollbar::enabled):
605         (WebCore::CCScrollbarLayerImpl::CCScrollbar::maximum):
606         (WebCore::CCScrollbarLayerImpl::CCScrollbar::totalSize):
607         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isScrollViewScrollbar):
608         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isScrollableAreaActive):
609         (WebCore::CCScrollbarLayerImpl::CCScrollbar::getTickmarks):
610         (WebCore::CCScrollbarLayerImpl::CCScrollbar::controlSize):
611         (WebCore::CCScrollbarLayerImpl::CCScrollbar::pressedPart):
612         (WebCore::CCScrollbarLayerImpl::CCScrollbar::hoveredPart):
613         (WebCore::CCScrollbarLayerImpl::CCScrollbar::scrollbarOverlayStyle):
614         (WebCore::CCScrollbarLayerImpl::CCScrollbar::orientation):
615         (WebCore::CCScrollbarLayerImpl::CCScrollbar::isCustomScrollbar):
616         * platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
617         (CCScrollbarLayerImpl):
618         (CCScrollbar):
619
620 2012-07-30  Andreas Kling  <kling@webkit.org>
621
622         REGRESSION(r123636): Heap-use-after-free in StyleResolver::collectMatchingRules.
623         <http://webkit.org/b/92430>
624
625         Reviewed by Antti Koivisto.
626
627         Don't hold on to a reference to StyledElement::classNames() as that may become
628         invalid after mutating the element's attribute data.
629
630         In this case it was happening below Element::hasAttributes() which is unfortunately
631         naive enough to always serialize lazy attributes. That is a minor inefficiency that
632         can be addressed in a separate patch.
633
634         Covered by valgrind on existing tests.
635
636         * css/StyleResolver.cpp:
637         (WebCore::StyleResolver::collectMatchingRules):
638
639 2012-07-30  James Robinson  <jamesr@chromium.org>
640
641         [chromium] CCThreadTask should not depend on CrossThreadTask and does not need to depend on CrossThreadCopier
642         https://bugs.webkit.org/show_bug.cgi?id=90132
643
644         Reviewed by David Levin.
645
646         CrossThreadTask is defined in WebCore/dom/ and depends on concepts like ScriptExecutionConcept. CCThreadTask,
647         being in WebCore/platform/, should not depend on /dom/ or anything from that layer.
648
649         CrossThreadCopier is not a layering violation per se, but it's also not at all helpful for CCThreadTask - we
650         never use any types for which it would be useful.
651
652         * platform/graphics/chromium/cc/CCThreadProxy.cpp:
653         (WebCore::CCThreadProxy::compositeAndReadback):
654         (WebCore::CCThreadProxy::finishAllRendering):
655         (WebCore::CCThreadProxy::initializeContext):
656         (WebCore::CCThreadProxy::setVisible):
657         (WebCore::CCThreadProxy::initializeLayerRenderer):
658         (WebCore::CCThreadProxy::recreateContext):
659         (WebCore::CCThreadProxy::implSideRenderingStats):
660         (WebCore::CCThreadProxy::start):
661         (WebCore::CCThreadProxy::stop):
662         (WebCore::CCThreadProxy::forceSerializeOnSwapBuffers):
663         (WebCore::CCThreadProxy::beginFrame):
664         (WebCore::CCThreadProxy::acquireLayerTextures):
665         * platform/graphics/chromium/cc/CCThreadTask.h:
666         (CCThreadTask1):
667         (WebCore::CCThreadTask1::create):
668         (WebCore::CCThreadTask1::CCThreadTask1):
669         (CCThreadTask2):
670         (WebCore::CCThreadTask2::create):
671         (WebCore::CCThreadTask2::CCThreadTask2):
672         (CCThreadTask3):
673         (WebCore::CCThreadTask3::create):
674         (WebCore::CCThreadTask3::CCThreadTask3):
675         (CCThreadTask4):
676         (WebCore::CCThreadTask4::create):
677         (WebCore::CCThreadTask4::CCThreadTask4):
678         (CCThreadTask5):
679         (WebCore::CCThreadTask5::create):
680         (WebCore::CCThreadTask5::CCThreadTask5):
681         (WebCore::createCCThreadTask):
682
683 2012-07-30  Paul Irish  <paul.irish@gmail.com>
684
685         Web Inspector: Rename Databases to Web SQL
686         https://bugs.webkit.org/show_bug.cgi?id=92646
687
688         Reviewed by Pavel Feldman.
689
690         Renamed Databases to Web SQL. Drive-by fix for EmptyView
691         selection.
692
693         * English.lproj/localizedStrings.js:
694         * inspector/front-end/EmptyView.js:
695         * inspector/front-end/ResourcesPanel.js:
696
697 2012-07-30  Tony Chang  <tony@chromium.org>
698
699         new flexbox should ignore float set on flexitems
700         https://bugs.webkit.org/show_bug.cgi?id=70792
701
702         Reviewed by Ojan Vafai.
703
704         Force flex items to not float.
705
706         Test: css3/flexbox/floated-flexitem.html
707
708         * css/StyleResolver.cpp:
709         (WebCore::StyleResolver::adjustRenderStyle): Force NoFloat on flex items.
710
711 2012-07-30  Adrienne Walker  <enne@google.com>
712
713         [chromium] Turn back on ScrollbarLayerChromium for Windows
714         https://bugs.webkit.org/show_bug.cgi?id=92409
715
716         Reviewed by James Robinson.
717
718         This reverts r122791. As GDI issues were addressed in Chromium via
719         http://src.chromium.org/viewvc/chrome?view=rev&revision=148215,
720         scrollbar parts can now be composited on the thread.
721
722         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
723         (WebCore::createScrollbarLayer):
724
725 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
726
727         Unreviewed, rolling out r124025.
728         http://trac.webkit.org/changeset/124025
729         https://bugs.webkit.org/show_bug.cgi?id=92658
730
731         Causes color-suggestion-picker-appearance layout test to time
732         out on all Chromium platforms (Requested by tomhudson_ on
733         #webkit).
734
735         * rendering/RenderThemeChromiumCommon.cpp:
736         (WebCore::RenderThemeChromiumCommon::supportsDataListUI):
737
738 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
739
740         Unreviewed, rolling out r123966 and r123967.
741         http://trac.webkit.org/changeset/123966
742         http://trac.webkit.org/changeset/123967
743         https://bugs.webkit.org/show_bug.cgi?id=92656
744
745         This patch is causing assertion failures on the debug bot
746         (also rolling out a dependent patch) (Requested by mrobinson
747         on #webkit).
748
749         * GNUmakefile.am:
750         * GNUmakefile.list.am:
751         * platform/text/gtk/TextCheckerEnchant.cpp: Removed.
752         * platform/text/gtk/TextCheckerEnchant.h: Removed.
753
754 2012-07-30  Julien Chaffraix  <jchaffraix@webkit.org>
755
756         ASSERTION FAILED: !rect.isEmpty()  : void WebCore::GraphicsContext::drawRect(const WebCore::IntRect &)
757         https://bugs.webkit.org/show_bug.cgi?id=92187
758
759         Reviewed by Simon Fraser.
760
761         The border painting logic (RenderBoxModelObject::paintOneBorderSide) would pass a rect with a 0px length
762         to RenderObject::drawLineForBoxSide. We do check the width (thickness) but not the length so we would pass
763         the rect to GraphicsContext and hit the ASSERT. This change adds a check for the length too as it is the safest
764         way, it means that we may still do unneeded operations before bailing out but that's an existing problem in the code.
765
766         Tests: fast/borders/0px-borders-no-line-height.html
767                fast/borders/double-1px-border-assert.html
768
769         * rendering/RenderObject.cpp:
770         (WebCore::RenderObject::drawLineForBoxSide):
771         Added a 0px length check. While renaming confusing variables and re-using others,
772         I also found a potential empty border that I fixed (tested by the 2nd case above).
773
774 2012-07-26  Stephen White  <senorblanco@chromium.org>
775
776         [chromium] Refactor the computation of resampled bitmap size in
777         drawImage and drawPattern.
778         https://bugs.webkit.org/show_bug.cgi?id=92408
779
780         Reviewed by Adrienne Walker.
781
782         We used to have a special-purpose function called TransformDimensions()
783         which did pretty much the same thing as SkRect::mapRect() does.  This
784         change unifies the drawPattern code to use mapRect() in the same way
785         that drawImage() does.
786
787         Covered by existing tests, e.g., fast/backgrounds/size/*.
788
789         * platform/graphics/skia/ImageSkia.cpp:
790         (WebCore):
791         (WebCore::Image::drawPattern):
792         Note:  we're now doing using the original (float) source rect, and
793         converting to int only after applying the matrix transform.  This
794         might result in different decisions about resampling mode, but it's
795         more correct anyway.
796
797 2012-07-30  Vineet Chaudhary  <rgf748@motorola.com>
798
799         https://bugs.webkit.org/show_bug.cgi?id=92642
800         [Bindings]Remove custom JS/V8 bindings for WebSocket::close() using [Clamp]
801
802         Reviewed by Kentaro Hara.
803
804         With support of [Clamp] as extended attribute we can replace custom bindings from WebSocket::close().
805         Spec for WebSocket::close() : http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#websocket
806
807         No new tests. There should be no behavioural changes 
808         Existing tests under http/websocket/tests/hybi/ should cover this.
809
810         * Modules/websockets/WebSocket.h:
811         (WebCore::WebSocket::close):
812         * Modules/websockets/WebSocket.idl: Used [Clamp].
813         * bindings/js/JSWebSocketCustom.cpp: Removed custom call close().
814         (WebCore):
815         * bindings/scripts/CodeGeneratorJS.pm:
816         (GenerateParametersCheck):
817         * bindings/scripts/CodeGeneratorV8.pm:
818         (GenerateParametersCheck):
819         * bindings/scripts/test/JS/JSTestObj.cpp:
820         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
821         * bindings/scripts/test/V8/V8TestObj.cpp:
822         (WebCore::TestObjV8Internal::classMethodWithClampCallback):
823         * bindings/v8/custom/V8WebSocketCustom.cpp: Removed custom call close().
824         (WebCore):
825
826 2012-07-29  Vsevolod Vlasov  <vsevik@chromium.org>
827
828         Web Inspector: Resource agent's reference to cached resources should be weak.
829         https://bugs.webkit.org/show_bug.cgi?id=92108
830
831         Reviewed by Pavel Feldman.
832
833         NetworkResourcesData now stores a raw pointer to CachedResource.
834         CachedResource now notifies InspectorInstrumentation that it will be destroyed.
835         InspectorInstrumentation stores a set of InstrumentingAgents and broadcasts willDestroyCachedResource event to all available resourceAgents.
836         Destroyed resources content is saved to NetworkResourcesData.
837
838         Tests: http/tests/inspector/network/cached-resource-destroyed-moved-to-storage.html
839                http/tests/inspector/network/cached-resource-destroyed-too-big-discarded.html
840
841         * WebCore.exp.in:
842         * inspector/InspectorController.cpp:
843         (WebCore::InspectorController::InspectorController):
844         (WebCore::InspectorController::inspectedPageDestroyed):
845         * inspector/InspectorInstrumentation.cpp:
846         (WebCore):
847         (WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl):
848         (WebCore::InspectorInstrumentation::registerInstrumentingAgents):
849         (WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
850         * inspector/InspectorInstrumentation.h:
851         (InspectorInstrumentation):
852         (WebCore::InspectorInstrumentation::willDestroyCachedResource):
853         (WebCore):
854         * inspector/InspectorResourceAgent.cpp:
855         (WebCore::InspectorResourceAgent::didReceiveData):
856         (WebCore::InspectorResourceAgent::willDestroyCachedResource):
857         (WebCore):
858         (WebCore::InspectorResourceAgent::getResponseBody):
859         * inspector/InspectorResourceAgent.h:
860         (InspectorResourceAgent):
861         * inspector/NetworkResourcesData.cpp:
862         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
863         (WebCore::NetworkResourcesData::ResourceData::setContent):
864         (WebCore::NetworkResourcesData::setResourceContent):
865         (WebCore::NetworkResourcesData::removeCachedResource):
866         (WebCore):
867         * inspector/NetworkResourcesData.h:
868         (ResourceData):
869         (WebCore::NetworkResourcesData::ResourceData::base64Encoded):
870         (WebCore::NetworkResourcesData::ResourceData::cachedResource):
871         (NetworkResourcesData):
872         * loader/cache/CachedResource.cpp:
873         (WebCore::CachedResource::~CachedResource):
874         (WebCore::CachedResource::removeClient):
875         (WebCore::CachedResource::deleteIfPossible):
876         (WebCore):
877         * loader/cache/CachedResource.h:
878         (CachedResource):
879         * loader/cache/CachedResourceLoader.cpp:
880         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
881         (WebCore::CachedResourceLoader::garbageCollectDocumentResources):
882         (WebCore::CachedResourceLoader::clearPreloads):
883         * loader/cache/CachedResourceLoader.h:
884         (CachedResourceLoader):
885         * loader/cache/MemoryCache.cpp:
886         (WebCore::MemoryCache::evict):
887         * testing/InternalSettings.cpp:
888         * testing/Internals.cpp:
889         (WebCore::Internals::garbageCollectDocumentResources):
890         (WebCore):
891         * testing/Internals.h:
892         (Internals):
893         * testing/Internals.idl:
894
895 2012-07-30  Shinya Kawanaka  <shinyak@chromium.org>
896
897         Prohibit having AuthorShadowDOM of input or textarea element for a while and having a flag to enable it in Internals.
898         https://bugs.webkit.org/show_bug.cgi?id=92611
899
900         Reviewed by Hajime Morita.
901
902         Prohibit having AuthorShadowDOM of input elemnet unless a flag in RuntimeEnabledFeatures is not enabled.
903         The flag can be enabled in Internals.
904
905         The elements in UserAgentShadowDOM of input element assume that they have a renderer when the input
906         element has a renderer. However, this does not hold when AuthorShadowDOM is added to input element.
907         So until we fix the issue, we should disable to have AuthorShadowDOM for input element, because it may
908         cause crashes and security problems.
909
910         Tests: fast/dom/shadow/input-with-validation-without-shadow.html
911                fast/dom/shadow/input-with-validation.html
912                fast/dom/shadow/shadow-disable.html
913
914         * bindings/generic/RuntimeEnabledFeatures.cpp:
915         (WebCore):
916         * bindings/generic/RuntimeEnabledFeatures.h:
917         (RuntimeEnabledFeatures):
918         (WebCore::RuntimeEnabledFeatures::authorShadowDOMForAnyElementEnabled):
919         (WebCore::RuntimeEnabledFeatures::setAuthorShadowDOMForAnyElementEnabled):
920         * dom/ShadowRoot.cpp:
921         (WebCore::allowsAuthorShadowRoot): The input element or textarea element does not allow to have a ShadowDOM unless
922         is a flag in RuntimeEnabledFeatures is not enabled.
923         * html/HTMLInputElement.h:
924         (WebCore::isHTMLInputElement):
925         (WebCore):
926         * html/HTMLTextAreaElement.h:
927         (WebCore::isHTMLTextAreaElement):
928         (WebCore):
929         * testing/Internals.cpp:
930         (WebCore::Internals::setAuthorShadowDOMForAnyElementEnabled):
931         (WebCore):
932         * testing/Internals.h:
933         (Internals):
934         * testing/Internals.idl:
935
936 2012-07-30  Pavel Feldman  <pfeldman@chromium.org>
937
938         Web Inspector: support --line-numbers mapping for SASS
939         https://bugs.webkit.org/show_bug.cgi?id=92400
940
941         Reviewed by Vsevolod Vlasov.
942
943         There is --debug-info and --line-numbers ways of referencing the source scss file, adding support for --line-numbers here.
944
945         * inspector/front-end/SASSSourceMapping.js:
946         (WebInspector.SASSSourceMapping.prototype._resourceAdded.didRequestContent):
947         (WebInspector.SASSSourceMapping.prototype._resourceAdded):
948         (_bindUISourceCode):
949
950 2012-07-30  Keishi Hattori  <keishi@webkit.org>
951
952         Implement datalist UI for input type color for Chromium
953         https://bugs.webkit.org/show_bug.cgi?id=92075
954
955         Reviewed by Kent Tamura.
956
957         Test: platform/chromium/fast/forms/color/color-suggestion-picker-appearance.html
958
959         * rendering/RenderThemeChromiumCommon.cpp:
960         (WebCore::RenderThemeChromiumCommon::supportsDataListUI): Added color to types supporting datalist.
961
962 2012-07-30  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
963
964         Wheel events on a page with frames are not handled in fixed layout
965         https://bugs.webkit.org/show_bug.cgi?id=90550
966
967         Reviewed by Antonio Gomes.
968
969         Based on patch by Andras Becsi.
970
971         Frame-rect size is not the right value to check against to see if the document
972         can be contained within the full visible content rect, since it does not handle
973         fixedVisibleContentRect. Instead visibleContentRect(true) should be used which
974         returns the full visible content rect disregarding scrollbars, and which is
975         the same a frame-rect size when fixedVisibleContentRect is not set.
976
977         * platform/ScrollView.cpp:
978         (WebCore::ScrollView::updateScrollbars):
979
980 2012-07-30  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
981
982         There is no way to tell whether an element can be activated or not
983         https://bugs.webkit.org/show_bug.cgi?id=92093
984
985         Reviewed by Antonio Gomes.
986
987         This patch adds the willRespondToMouseClickEvents and willRespondToMouseMoveEvents
988         functions, named after similar functions in the iOS fork of WebKit.
989
990         Touch-adjustment will now use these two functions, which improves accuracy when
991         targeting shadow-dom elements, and also means touch adjustment will prefer enabled
992         form-elements over disabled ones.
993
994         Test: touchadjustment/disabled-formelements.html
995
996         * dom/Node.cpp:
997         (WebCore::Node::willRespondToMouseMoveEvents):
998         (WebCore::Node::willRespondToMouseClickEvents):
999         * dom/Node.h:
1000         (Node):
1001         * editing/DeleteButton.h:
1002         * html/HTMLAnchorElement.cpp:
1003         (WebCore::HTMLAnchorElement::willRespondToMouseClickEvents):
1004         * html/HTMLAnchorElement.h:
1005         (HTMLAnchorElement):
1006         * html/HTMLButtonElement.cpp:
1007         (WebCore::HTMLButtonElement::willRespondToMouseClickEvents):
1008         * html/HTMLButtonElement.h:
1009         (HTMLButtonElement):
1010         * html/HTMLInputElement.cpp:
1011         (WebCore::HTMLInputElement::willRespondToMouseClickEvents):
1012         * html/HTMLInputElement.h:
1013         (HTMLInputElement):
1014         * html/HTMLLabelElement.cpp:
1015         (WebCore::HTMLLabelElement::willRespondToMouseClickEvents):
1016         * html/HTMLLabelElement.h:
1017         (HTMLLabelElement):
1018         * html/HTMLMediaElement.cpp:
1019         (WebCore::HTMLMediaElement::willRespondToMouseClickEvents):
1020         * html/HTMLMediaElement.h:
1021         * html/HTMLSummaryElement.cpp:
1022         (WebCore::HTMLSummaryElement::willRespondToMouseClickEvents):
1023         * html/HTMLSummaryElement.h:
1024         (HTMLSummaryElement):
1025         * html/shadow/CalendarPickerElement.cpp:
1026         (WebCore::CalendarPickerElement::willRespondToMouseClickEvents):
1027         * html/shadow/CalendarPickerElement.h:
1028         (CalendarPickerElement):
1029         * html/shadow/MediaControlElements.cpp:
1030         (WebCore::MediaControlTimelineElement::willRespondToMouseClickEvents):
1031         (WebCore::MediaControlTimelineElement::setPosition):
1032         (WebCore::MediaControlVolumeSliderElement::willRespondToMouseMoveEvents):
1033         (WebCore::MediaControlVolumeSliderElement::willRespondToMouseClickEvents):
1034         * html/shadow/MediaControlElements.h:
1035         (MediaControlTimelineElement):
1036         (MediaControlVolumeSliderElement):
1037         * html/shadow/MediaControlRootElement.h:
1038         * html/shadow/SliderThumbElement.cpp:
1039         (WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
1040         (WebCore::SliderThumbElement::willRespondToMouseClickEvents):
1041         * html/shadow/SliderThumbElement.h:
1042         (SliderThumbElement):
1043         * html/shadow/TextControlInnerElements.cpp:
1044         (WebCore::SearchFieldResultsButtonElement::willRespondToMouseClickEvents):
1045         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
1046         (WebCore::SpinButtonElement::willRespondToMouseMoveEvents):
1047         (WebCore::SpinButtonElement::willRespondToMouseClickEvents):
1048         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
1049         * html/shadow/TextControlInnerElements.h:
1050         (SearchFieldResultsButtonElement):
1051         (SearchFieldCancelButtonElement):
1052         (SpinButtonElement):
1053         * html/shadow/TextFieldDecorationElement.cpp:
1054         (WebCore::TextFieldDecorationElement::willRespondToMouseClickEvents):
1055         * html/shadow/TextFieldDecorationElement.h:
1056         (TextFieldDecorationElement):
1057         * page/TouchAdjustment.cpp:
1058         (WebCore::TouchAdjustment::nodeRespondsToTapGesture):
1059
1060 2012-07-30  Vsevolod Vlasov  <vsevik@chromium.org>
1061
1062         Web Inspector: Content size variables in NetworkResourcesData should have size_t type instead of int.
1063         https://bugs.webkit.org/show_bug.cgi?id=92618
1064
1065         Reviewed by Yury Semikhatsky.
1066
1067         Changed content size variables type in NetworkResourcesData from int to size_t.
1068         Drive-by: Switched String length calculation to recently added StringImpl's sizeInBytes.
1069
1070         * inspector/NetworkResourcesData.cpp:
1071         (WebCore::NetworkResourcesData::ResourceData::removeContent):
1072         (WebCore::NetworkResourcesData::ResourceData::dataLength):
1073         (WebCore::NetworkResourcesData::ResourceData::appendData):
1074         (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent):
1075         (WebCore::NetworkResourcesData::setResourceContent):
1076         (WebCore::NetworkResourcesData::maybeAddResourceData):
1077         (WebCore::NetworkResourcesData::maybeDecodeDataToContent):
1078         (WebCore::NetworkResourcesData::setResourcesDataSizeLimits):
1079         (WebCore::NetworkResourcesData::ensureFreeSpace):
1080         * inspector/NetworkResourcesData.h:
1081         (ResourceData):
1082         (NetworkResourcesData):
1083
1084 2012-07-30  Hayato Ito  <hayato@chromium.org>
1085
1086         Remove an useless member variable, m_shouldPreventDispatch, from EventDispatcher.
1087         https://bugs.webkit.org/show_bug.cgi?id=92625
1088
1089         Reviewed by Hajime Morita.
1090
1091         EventDispatcher::m_shouldPreventDispatch does not have any effects. We can remove that.
1092
1093         No new tests, no behavior change.
1094
1095         * dom/EventDispatcher.cpp:
1096         (WebCore::EventDispatcher::EventDispatcher):
1097         (WebCore::EventDispatcher::dispatchEvent):
1098         * dom/EventDispatcher.h:
1099         (EventDispatcher):
1100
1101 2012-07-30  Hayato Ito  <hayato@chromium.org>
1102
1103         Remove an useless member variable, m_shouldPreventDispatch, from EventDispatcher.
1104         https://bugs.webkit.org/show_bug.cgi?id=92625
1105
1106         Reviewed by Hajime Morita.
1107
1108         EventDispatcher::m_shouldPreventDispatch does not have any effects. We can remove that.
1109
1110         No new tests, no behavior change.
1111
1112         * dom/EventDispatcher.cpp:
1113         (WebCore::EventDispatcher::EventDispatcher):
1114         (WebCore::EventDispatcher::dispatchEvent):
1115         * dom/EventDispatcher.h:
1116         (EventDispatcher):
1117
1118 2012-07-26  Yury Semikhatsky  <yurys@chromium.org>
1119
1120         Web Inspector: make MemoryInstrumentation methods private
1121         https://bugs.webkit.org/show_bug.cgi?id=92379
1122
1123         Reviewed by Vsevolod Vlasov.
1124
1125         MemoryInstrumentation was refactored.
1126         - All reporting methods on MemoryInstrumentation except add*Object are
1127           private to enforce MemoryClassInfo usage.
1128         - MemoryInstrumentation::Add*Member methods renamed to Add*Object
1129         - String reporting is implemented directly in the MemoryInstrumentation,
1130           not in its descendants.
1131
1132         * CMakeLists.txt:
1133         * GNUmakefile.list.am:
1134         * WebCore.gypi:
1135         * WebCore.vcproj/WebCore.vcproj:
1136         * WebCore.xcodeproj/project.pbxproj:
1137         * bindings/v8/ScriptProfiler.cpp:
1138         (WebCore::ScriptProfiler::collectBindingMemoryInfo):
1139         * dom/MemoryInstrumentation.cpp: Added.
1140         (WebCore):
1141         (WebCore::MemoryInstrumentation::addString):
1142         * dom/MemoryInstrumentation.h:
1143         (WebCore::MemoryInstrumentation::addInstrumentedObject):
1144         (WebCore::MemoryInstrumentation::addObject):
1145         (MemoryInstrumentation):
1146         (InstrumentedPointerBase):
1147         (WebCore::MemoryInstrumentation::InstrumentedPointerBase::~InstrumentedPointerBase):
1148         (InstrumentedPointer):
1149         (WebCore::MemoryInstrumentation::InstrumentedPointer::InstrumentedPointer):
1150         (WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedObject):
1151         (WebCore::MemoryInstrumentation::OwningTraits::addObject):
1152         (WebCore::MemoryInstrumentation::addInstrumentedObjectImpl):
1153         (WebCore::MemoryClassInfo::addInstrumentedMember):
1154         (WebCore::MemoryClassInfo::addMember):
1155         (WebCore):
1156         (WebCore::MemoryInstrumentation::addObjectImpl):
1157         (WebCore::MemoryInstrumentation::addInstrumentedCollection):
1158         (WebCore::MemoryInstrumentation::calculateContainerSize):
1159         * inspector/InspectorMemoryAgent.cpp:
1160         (WebCore):
1161
1162 2012-07-30  Alexander Pavlov  <apavlov@chromium.org>
1163
1164         Web Inspector: [Styles] No color swatch for the SVG "fill" and "stroke" property values
1165         https://bugs.webkit.org/show_bug.cgi?id=92638
1166
1167         Reviewed by Vsevolod Vlasov.
1168
1169         Added the "fill" and "stroke" properties to the list of color-aware properties.
1170
1171         * inspector/front-end/CSSKeywordCompletions.js:
1172
1173 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
1174
1175         Unreviewed, rolling out r124000.
1176         http://trac.webkit.org/changeset/124000
1177         https://bugs.webkit.org/show_bug.cgi?id=92632
1178
1179         seems to have broken chromium Range_InstanceSizeUnknown unit
1180         test across many platforms (Requested by tomhudson on
1181         #webkit).
1182
1183         * WebCore.exp.in:
1184         * inspector/InspectorController.cpp:
1185         (WebCore::InspectorController::InspectorController):
1186         (WebCore::InspectorController::inspectedPageDestroyed):
1187         * inspector/InspectorInstrumentation.cpp:
1188         (WebCore):
1189         * inspector/InspectorInstrumentation.h:
1190         (InspectorInstrumentation):
1191         * inspector/InspectorResourceAgent.cpp:
1192         (WebCore::InspectorResourceAgent::didReceiveData):
1193         (WebCore::InspectorResourceAgent::getResponseBody):
1194         * inspector/InspectorResourceAgent.h:
1195         (InspectorResourceAgent):
1196         * inspector/NetworkResourcesData.cpp:
1197         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
1198         (WebCore::NetworkResourcesData::ResourceData::setContent):
1199         (WebCore::NetworkResourcesData::setResourceContent):
1200         * inspector/NetworkResourcesData.h:
1201         (ResourceData):
1202         (WebCore::NetworkResourcesData::ResourceData::cachedResource):
1203         (NetworkResourcesData):
1204         * loader/cache/CachedResource.cpp:
1205         (WebCore::CachedResource::~CachedResource):
1206         (WebCore::CachedResource::removeClient):
1207         (WebCore::CachedResource::deleteIfPossible):
1208         (WebCore):
1209         * loader/cache/CachedResource.h:
1210         (CachedResource):
1211         * loader/cache/CachedResourceLoader.cpp:
1212         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
1213         (WebCore::CachedResourceLoader::clearPreloads):
1214         * loader/cache/CachedResourceLoader.h:
1215         (CachedResourceLoader):
1216         * loader/cache/MemoryCache.cpp:
1217         (WebCore::MemoryCache::evict):
1218         * testing/InternalSettings.cpp:
1219         * testing/Internals.cpp:
1220         * testing/Internals.h:
1221         (Internals):
1222         * testing/Internals.idl:
1223
1224 2012-07-30  Hayato Ito  <hayato@chromium.org>
1225
1226         Remove an unused member variable, m_originalTarget, from EventDispatcher.
1227         https://bugs.webkit.org/show_bug.cgi?id=92614
1228
1229         Reviewed by Andreas Kling.
1230
1231         No one uses EventDispatcher::m_originalTarget.
1232
1233         No new tests, no behavior change.
1234
1235         * dom/EventDispatcher.h:
1236         (EventDispatcher):
1237
1238 2012-07-27  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
1239
1240         [Qt] Fix issues remaining with fixed positioned layers
1241         https://bugs.webkit.org/show_bug.cgi?id=92528
1242
1243         Reviewed by Noam Rosenthal.
1244
1245         * platform/graphics/texmap/TextureMapperLayer.cpp:
1246         (WebCore::TextureMapperLayer::syncCompositingStateSelf):
1247         Make sure that the delta is used when syncCompositingStateSelf is called afterward.
1248         (WebCore::TextureMapperLayer::setScrollPositionDeltaIfNeeded):
1249         * platform/graphics/texmap/TextureMapperLayer.h:
1250         Use a FloatSize instead of an IntPoint for the delta.
1251         (TextureMapperLayer):
1252         (WebCore::TextureMapperLayer::adjustedPosition):
1253
1254 2012-07-30  Patrick Gansterer  <paroga@webkit.org>
1255
1256         Replace UnicodeWinCE with UnicodeWchar
1257         https://bugs.webkit.org/show_bug.cgi?id=92539
1258
1259         Reviewed by Ryosuke Niwa.
1260
1261         UnicodeWinCE never contained WinCE specific code. UnicodeWchar
1262         is a replacement for it, which is mainly based on the functions
1263         from <wchar.h>. It is ment as a minimal Unicode backend, which
1264         can be used very easy and has no external dependencies.
1265
1266         * platform/text/TextEncoding.cpp:
1267         (WebCore::TextEncoding::encode):
1268         * platform/text/TextEncodingRegistry.cpp:
1269         (WebCore::extendTextCodecMaps):
1270
1271 2012-07-30  Hayato Ito  <hayato@chromium.org>
1272
1273         Remove unnecessary code which set event's target from EventDispatcher::dispatchEvent.
1274         https://bugs.webkit.org/show_bug.cgi?id=92613
1275
1276         Reviewed by Hajime Morita.
1277
1278         EventContext::handleLocalEvents does all required jobs so we don't
1279         need to set target in EventDispacher::dispatchEvent() for TARGET phase.
1280
1281         No new tests, no behavior change.
1282
1283         * dom/EventDispatcher.cpp:
1284         (WebCore::EventDispatcher::dispatchEvent):
1285
1286 2012-07-30  Sheriff Bot  <webkit.review.bot@gmail.com>
1287
1288         Unreviewed, rolling out r124004.
1289         http://trac.webkit.org/changeset/124004
1290         https://bugs.webkit.org/show_bug.cgi?id=92622
1291
1292         Broke Android build (Requested by keishi on #webkit).
1293
1294         * rendering/RenderThemeChromiumCommon.cpp:
1295         (WebCore::RenderThemeChromiumCommon::supportsDataListUI):
1296
1297 2012-07-30  Pavel Feldman  <pfeldman@chromium.org>
1298
1299         Web Inspector: element tag disappears after editing
1300         https://bugs.webkit.org/show_bug.cgi?id=92385
1301
1302         Reviewed by Vsevolod Vlasov.
1303
1304         This has regressed when we started hiding elements panel upon
1305         batch updates. Narrowing hiding cases, updating selection
1306         in on-screen mode only.
1307
1308         * inspector/front-end/ElementsTreeOutline.js:
1309         (WebInspector.ElementsTreeElement.prototype.updateSelection):
1310
1311 2012-07-26  Yury Semikhatsky  <yurys@chromium.org>
1312
1313         Web Inspector: move StringImpl size calculation to StringImpl
1314         https://bugs.webkit.org/show_bug.cgi?id=92359
1315
1316         Reviewed by Pavel Feldman.
1317
1318         Moved stringSize(StringImpl*) implementation from InspectorMemoryAgent to
1319         StringImpl::sizeInBytes();
1320
1321         * inspector/InspectorMemoryAgent.cpp:
1322         (WebCore):
1323
1324 2012-07-30  Pavel Feldman  <pfeldman@chromium.org>
1325
1326         Web Inspector: workers inspector is broken in the remote debugging mode
1327         https://bugs.webkit.org/show_bug.cgi?id=92540
1328
1329         Reviewed by Yury Semikhatsky.
1330
1331         The problem was that worker manager re-used complete url with query parameters
1332         for spin-off worker front-ends. As a result, in case of remote debugging, newly
1333         created front-ends were connecting to the same web socket (because of the ws parameter).
1334
1335         * inspector/front-end/WorkerManager.js:
1336         (WebInspector.WorkerManager.isDedicatedWorkerFrontend):
1337         * inspector/front-end/inspector.js:
1338
1339 2012-07-30  Keishi Hattori  <keishi@webkit.org>
1340
1341         Implement datalist UI for input type color for Chromium
1342         https://bugs.webkit.org/show_bug.cgi?id=92075
1343
1344         Reviewed by Kent Tamura.
1345
1346         Test: platform/chromium/fast/forms/color/color-suggestion-picker-appearance.html
1347
1348         * rendering/RenderThemeChromiumCommon.cpp:
1349         (WebCore::RenderThemeChromiumCommon::supportsDataListUI): Added color to types supporting datalist.
1350
1351 2012-07-30  Mario Sanchez Prada  <msanchez@igalia.com>
1352
1353         REGRESSION (r123767): platform/gtk/accessibility/object-with-title.html failing on GTK
1354         https://bugs.webkit.org/show_bug.cgi?id=92477
1355
1356         Reviewed by Chris Fleizach.
1357
1358         Consider title and accessibilityDescription together with helpText to
1359         decide whether an object should be exposed in the accessibility tree.
1360
1361         * accessibility/AccessibilityRenderObject.cpp:
1362         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
1363
1364 2012-07-29  Vsevolod Vlasov  <vsevik@chromium.org>
1365
1366         Web Inspector: Resource agent's reference to cached resources should be weak.
1367         https://bugs.webkit.org/show_bug.cgi?id=92108
1368
1369         Reviewed by Pavel Feldman.
1370
1371         NetworkResourcesData now stores a raw pointer to CachedResource.
1372         CachedResource now notifies InspectorInstrumentation that it will be destroyed.
1373         InspectorInstrumentation stores a set of InstrumentingAgents and broadcasts willDestroyCachedResource event to all available resourceAgents.
1374         Destroyed resources content is saved to NetworkResourcesData.
1375
1376         Tests: http/tests/inspector/network/cached-resource-destroyed-moved-to-storage.html
1377                http/tests/inspector/network/cached-resource-destroyed-too-big-discarded.html
1378
1379         * WebCore.exp.in:
1380         * inspector/InspectorController.cpp:
1381         (WebCore::InspectorController::InspectorController):
1382         (WebCore::InspectorController::inspectedPageDestroyed):
1383         * inspector/InspectorInstrumentation.cpp:
1384         (WebCore):
1385         (WebCore::InspectorInstrumentation::willDestroyCachedResourceImpl):
1386         (WebCore::InspectorInstrumentation::registerInstrumentingAgents):
1387         (WebCore::InspectorInstrumentation::unregisterInstrumentingAgents):
1388         * inspector/InspectorInstrumentation.h:
1389         (InspectorInstrumentation):
1390         (WebCore::InspectorInstrumentation::willDestroyCachedResource):
1391         (WebCore):
1392         * inspector/InspectorResourceAgent.cpp:
1393         (WebCore::InspectorResourceAgent::didReceiveData):
1394         (WebCore::InspectorResourceAgent::willDestroyCachedResource):
1395         (WebCore):
1396         (WebCore::InspectorResourceAgent::getResponseBody):
1397         * inspector/InspectorResourceAgent.h:
1398         (InspectorResourceAgent):
1399         * inspector/NetworkResourcesData.cpp:
1400         (WebCore::NetworkResourcesData::ResourceData::ResourceData):
1401         (WebCore::NetworkResourcesData::ResourceData::setContent):
1402         (WebCore::NetworkResourcesData::setResourceContent):
1403         (WebCore::NetworkResourcesData::removeCachedResource):
1404         (WebCore):
1405         * inspector/NetworkResourcesData.h:
1406         (ResourceData):
1407         (WebCore::NetworkResourcesData::ResourceData::base64Encoded):
1408         (WebCore::NetworkResourcesData::ResourceData::cachedResource):
1409         (NetworkResourcesData):
1410         * loader/cache/CachedResource.cpp:
1411         (WebCore::CachedResource::~CachedResource):
1412         (WebCore::CachedResource::removeClient):
1413         (WebCore::CachedResource::deleteIfPossible):
1414         (WebCore):
1415         * loader/cache/CachedResource.h:
1416         (CachedResource):
1417         * loader/cache/CachedResourceLoader.cpp:
1418         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired):
1419         (WebCore::CachedResourceLoader::garbageCollectDocumentResources):
1420         (WebCore::CachedResourceLoader::clearPreloads):
1421         * loader/cache/CachedResourceLoader.h:
1422         (CachedResourceLoader):
1423         * loader/cache/MemoryCache.cpp:
1424         (WebCore::MemoryCache::evict):
1425         * testing/InternalSettings.cpp:
1426         * testing/Internals.cpp:
1427         (WebCore::Internals::garbageCollectDocumentResources):
1428         (WebCore):
1429         * testing/Internals.h:
1430         (Internals):
1431         * testing/Internals.idl:
1432
1433 2012-07-29  YoungTaeck Song  <youngtaeck.song@samsung.com>
1434
1435         [WK2][EFL] Accelerated compositing support using TextureMapper on Efl WebKit2
1436         https://bugs.webkit.org/show_bug.cgi?id=91583
1437
1438         Reviewed by Noam Rosenthal.
1439
1440         This patch is a subset of Efl's UI_SIDE_COMPOSITING implementation.
1441         This patch adds Texture Mapper related files to PlatformEfl.cmake.
1442         And wrapped TextureMapperLayer and TextureMapperBackingStore with USE(ACCELERATED_COMPOSITING) for fixing building error when disable ACCELERATED_COMPOSITING.
1443
1444         * CMakeLists.txt:
1445         * PlatformEfl.cmake:
1446         * platform/graphics/GraphicsLayer.cpp:
1447         (WebCore):
1448         * platform/graphics/GraphicsLayer.h:
1449         (GraphicsLayer):
1450         * platform/graphics/GraphicsLayerAnimation.cpp:
1451         * platform/graphics/GraphicsLayerAnimation.h:
1452         * platform/graphics/PlatformLayer.h:
1453         (WebCore):
1454         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
1455         * platform/graphics/texmap/TextureMapperBackingStore.h:
1456         * platform/graphics/texmap/TextureMapperLayer.h:
1457
1458 2012-07-29  YoungTaeck Song  <youngtaeck.song@samsung.com>
1459
1460         [WK2][EFL] TILED_BACKING_STORE support on Efl WebKit2
1461         https://bugs.webkit.org/show_bug.cgi?id=91582
1462
1463         Reviewed by Noam Rosenthal.
1464
1465         This patch is a subset of Efl's UI_SIDE_COMPOSITING implementation.
1466         This patch adds TILED_BACKING_STORE related files to CMakeLists.txt and PlatformEfl.cmake
1467
1468         * CMakeLists.txt:
1469         * PlatformEfl.cmake:
1470
1471 2012-07-29  Keishi Hattori  <keishi@webkit.org>
1472
1473         Fix removing invalid values from color input suggestions
1474         https://bugs.webkit.org/show_bug.cgi?id=92502
1475
1476         Reviewed by Kent Tamura.
1477
1478         Make ColorInputType::typeMismatchFor() return false for invalid color
1479         values so that they don't appear in the list of suggestions that
1480         ColorInputType::suggestions() returns.
1481
1482         No new tests. Tests to be added in Bug 92075.
1483
1484         * html/ColorInputType.cpp:
1485         (WebCore::ColorInputType::typeMismatchFor):
1486         (WebCore):
1487         * html/ColorInputType.h:
1488         (ColorInputType):
1489
1490 2012-07-29  Li Yin  <li.yin@intel.com>
1491
1492         getChannelData should raise exception when index is more than numberOfChannels.
1493         https://bugs.webkit.org/show_bug.cgi?id=92223
1494
1495         Reviewed by Kentaro Hara.
1496
1497         Spec: https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioBuffer-section
1498         In getChannelData function, the index value MUST be less than numberOfChannels
1499         or an exception will be thrown.
1500
1501         Test: webaudio/audiobuffer.html
1502
1503         * Modules/webaudio/AudioBuffer.cpp:
1504         (WebCore::AudioBuffer::getChannelData):
1505         (WebCore):
1506         * Modules/webaudio/AudioBuffer.h:
1507         (WebCore):
1508         (AudioBuffer):
1509         * Modules/webaudio/AudioBuffer.idl: raise exception when index is not less than numberOfChannels.
1510
1511 2012-07-29  Sukolsak Sakshuwong  <sukolsak@google.com>
1512
1513         forward-delete in the last cell of a table moves the caret after the table
1514         https://bugs.webkit.org/show_bug.cgi?id=24250
1515
1516         Reviewed by Ryosuke Niwa.
1517
1518         The ForwardDelete command moved the cursor after the table when it's invoked
1519         in an empty cell that is the last cell of a table. It also removed the break
1520         element when invoked in an empty cell that is not the last cell of a table.
1521         Make it do nothing inside an empty table cell.
1522
1523         Test: editing/deleting/forward-delete-empty-table-cell.html
1524
1525         * editing/TypingCommand.cpp:
1526         (WebCore::TypingCommand::forwardDeleteKeyPressed):
1527
1528 2012-07-29  Kwang Yul Seo  <skyul@company100.net>
1529
1530         Remove unused method HTMLConstructionSiteTask::take(HTMLConstructionSiteTask&)
1531         https://bugs.webkit.org/show_bug.cgi?id=92601
1532
1533         Reviewed by Adam Barth.
1534
1535         This method was introduced in r104000, but has never been used from the beginning.
1536
1537         No functional change.
1538
1539         * html/parser/HTMLConstructionSite.h:
1540
1541 2012-07-29  Kenichi Ishibashi  <bashi@chromium.org>
1542
1543         [Chromium] HarfBuzzShaper can't handle segmented text run
1544         https://bugs.webkit.org/show_bug.cgi?id=92445
1545
1546         Reviewed by Tony Chang.
1547
1548         Pass the range to be displayed to HarfBuzzShaper. The shaper calculates positions and advances of each glyph
1549         regardless of the range, but only add glyphs which are in the range.
1550
1551         No new tests. platform/chromium-linux/fast/text/international/draw-complex-text-from-to.html should
1552         work as expected once we move to use harfbuzz-ng on linux. Note that the current expectation will need to be rebaselined
1553         because the old hb shaper (ComplexTextController) mishandles the range. |to| should be exclusive. I'll rebaseline
1554         the expectation later.
1555
1556         * platform/graphics/harfbuzz/FontHarfBuzz.cpp:
1557         (WebCore::Font::drawComplexText): Call shaper.setDrawRange().
1558         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.cpp:
1559         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
1560         (WebCore::HarfBuzzShaper::setDrawRange): Added.
1561         (WebCore):
1562         (WebCore::HarfBuzzShaper::shouldDrawCharacterAt): Added.
1563         (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Added variables that hold pending advances.
1564         (WebCore::HarfBuzzShaper::setGlyphPositionsForHarfBuzzRun): Add only glyphs which are in the given range to glyphBuffer.
1565         * platform/graphics/harfbuzz/ng/HarfBuzzShaper.h:
1566         (HarfBuzzShaper):
1567         * platform/graphics/mac/FontComplexTextMac.cpp:
1568         (WebCore::Font::drawComplexText): Call shaper.setDrawRange().
1569
1570 2012-07-29  Dan Bernstein  <mitz@apple.com>
1571
1572         Hit testing in the gap between pages returns incorrect results in flipped blocks writing modes
1573         https://bugs.webkit.org/show_bug.cgi?id=92600
1574
1575         Reviewed by Simon Fraser.
1576
1577         Test: fast/multicol/hit-test-gap-between-pages-flipped.html
1578
1579         * rendering/RenderBlock.h:
1580         (WebCore::RenderBlock): Promoted offsetForContents() from private to protected, and demoted
1581         adjustPointToColumnContents() back to private.
1582         * rendering/RenderLayer.cpp:
1583         (WebCore::RenderLayer::hitTest): Changed to flip the point passed to updateHitTestResults().
1584         * rendering/RenderView.cpp:
1585         (WebCore::RenderView::updateHitTestResult): Changed to call offsetForContents(), which, as
1586         of r123977, correctly accounts for flippedness.
1587
1588 2012-07-29  Dan Bernstein  <mitz@apple.com>
1589
1590         In flipped blocks, a point on the top edge of a text box is considered outside the box (and vice versa)
1591         https://bugs.webkit.org/show_bug.cgi?id=92597
1592
1593         Reviewed by Ryosuke Niwa.
1594
1595         This is similar to <http://webkit.org/b/92593> except for RenderText. Fixing this required
1596         fixing some code that creates a point inside a box by setting its y coordinate to the
1597         logical top of the box. In a flipped block, this would be just outside the box.
1598
1599         Enhanced fast/writing-mode/flipped-blocks-hit-test-line-edges.html to cover this.
1600
1601         * editing/visible_units.cpp:
1602         (WebCore::absoluteLineDirectionPointToLocalPointInBlock): Changed to use
1603         RootInlineBox::blockDirectionPointInLine in the vertical case as well.
1604         * rendering/RenderBlock.cpp:
1605         (WebCore::RenderBlock::positionForPointWithInlineChildren): Changed to use
1606         RootInlineBox::blockDirectionPointInLine.
1607         * rendering/RenderText.cpp:
1608         (WebCore::RenderText::positionForPoint): Changed the strictness of y inequalities based on
1609         the flippedness of the block. This fixes the bug.
1610         * rendering/RootInlineBox.cpp:
1611         (WebCore::RootInlineBox::blockDirectionPointInLine): Moved the implementation here from the
1612         header, and made it return the bottom in the flipped block case, so that the returned point
1613         is inside the line in that case as well.
1614         * rendering/RootInlineBox.h:
1615
1616 2012-07-29  Rik Cabanier  <cabanier@adobe.com>
1617
1618         ENABLE_CSS_COMPOSITING flag
1619         https://bugs.webkit.org/show_bug.cgi?id=92553
1620
1621         Reviewed by Dirk Schulze.
1622
1623         Adds compiler flag CSS_COMPOSITING to build systems to enable CSS blending and compositing. See spec https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html
1624
1625         * GNUmakefile.am:
1626         * Configurations/FeatureDefines.xcconfig:
1627
1628 2012-07-29  Dan Bernstein  <mitz@apple.com>
1629
1630         In flipped blocks, a point on the top edge of a box is considered outside the box (and vice versa)
1631         https://bugs.webkit.org/show_bug.cgi?id=92593
1632
1633         Reviewed by Simon Fraser.
1634
1635         With respect to hit testing, boxes should always behave as half-open intervals which include
1636         the physical top and left edges and not the bottom and right edges.
1637         RenderBlock::positionForPoint was not adhering to this, since it was comparing flipped
1638         coordinates.
1639
1640         Tests: fast/writing-mode/flipped-blocks-hit-test-box-edges.html
1641                fast/writing-mode/flipped-blocks-hit-test-line-edges.html
1642
1643         * rendering/RenderBlock.cpp:
1644         (WebCore::RenderBlock::positionForPointWithInlineChildren): When blocks are flipped, changed
1645         strict inequalities of y coordinates into non-strict ones and non-strict inequalities into
1646         strict ones.
1647         (WebCore::RenderBlock::positionForPoint): Ditto, except for the test for being under the top
1648         of the last candidate box, which was made non-strict in the unflipped case and remained
1649         strict.
1650
1651 2012-07-28  Dan Bernstein  <mitz@apple.com>
1652
1653         RenderBlock::offsetForContents() is wrong in flipped blocks writing modes
1654         https://bugs.webkit.org/show_bug.cgi?id=92588
1655
1656         Reviewed by Sam Weinig.
1657
1658         Tests: fast/multicol/hit-test-block-axis-flipped.html
1659                fast/writing-mode/flipped-blocks-hit-test-overflow-scroll.html
1660
1661         * rendering/RenderBlock.cpp:
1662         (WebCore::RenderBlock::offsetForContents): Flip the point, which puts it back in unflipped
1663         coordinates, before adding the scroll offset and adjusting for columns, then flip it back.
1664         (WebCore::RenderBlock::adjustPointToColumnContents): Changed the inline-axis cases to
1665         work with an unflipped point.
1666
1667 2012-07-28  Dan Bernstein  <mitz@apple.com>
1668
1669         In flipped lines writing modes, hit testing at the beginning of a column may return a result from the previous column
1670         https://bugs.webkit.org/show_bug.cgi?id=92566
1671
1672         Reviewed by Simon Fraser.
1673
1674         Enhanced the fix for <http://webkit.org/b/92524> to work with flipped lines.
1675
1676         Extended fast/multicol/hit-test-end-of-column-with-line-height.html.
1677
1678         * rendering/RenderBlock.cpp:
1679         (WebCore::RenderBlock::positionForPointWithInlineChildren): For flipped lines, check if the
1680         hit line is the last one before a page break, and in that case, check if the hit point was
1681         after the break.
1682
1683 2012-07-28  Simon Fraser  <simon.fraser@apple.com>
1684
1685         Size changes on a layer with negative z-index children don't repaint correctly
1686         https://bugs.webkit.org/show_bug.cgi?id=92583
1687
1688         Reviewed by Dean Jackson.
1689
1690         Negative z-index descendants cause a composited layer to have a separate
1691         layer for foreground content. If something caused that foreground layer
1692         to change size (like toggling visibility on a descendant), we failed to
1693         repaint the foreground layer, resulting in stretched content.
1694
1695         Test: compositing/geometry/bounds-ignores-hidden-dynamic-negzindex.html
1696
1697         * rendering/RenderLayerBacking.cpp:
1698         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): Repaint the foreground
1699         layer if its size changes, like we do for the main layer.
1700
1701 2012-07-28  Simon Fraser  <simon.fraser@apple.com>
1702
1703         Ignore visibility:hidden elements when computing compositing layer bounds
1704         https://bugs.webkit.org/show_bug.cgi?id=92569
1705
1706         Reviewed by Dan Bernstein.
1707
1708         When computing the bounds of compositing layers, we would take into account
1709         layers with no visible content (visibility:hidden, and no non-hidden descendants).
1710         This caused some huge layers in mobile Google maps.
1711
1712         Tests: compositing/geometry/bounds-ignores-hidden-composited-descendant.html
1713                compositing/geometry/bounds-ignores-hidden-dynamic.html
1714                compositing/geometry/bounds-ignores-hidden.html
1715
1716         * rendering/RenderLayer.cpp:
1717         (WebCore::RenderLayer::calculateLayerBounds): If the ExcludeHiddenDescendants flag is set, return
1718         the empty rect for layers with no visible content or descendants, as long as the layer is not
1719         the root of the subtree whose bounds are being computed.
1720         calculateLayerBounds() currently (I think incorrectly) passes the default flags to the recursive calls.
1721         It should probably just pass 'flags', but to make this change safe, OR in the ExcludeHiddenDescendants
1722         flag.
1723         * rendering/RenderLayer.h: Add an ExcludeHiddenDescendants flag to the CalculateLayerBoundsFlags.
1724         * rendering/RenderLayerCompositor.cpp:
1725         (WebCore::RenderLayerCompositor::calculateCompositedBounds): Pass the ExcludeHiddenDescendants
1726         flag.
1727
1728 2012-07-28  Min Qin  <qinmin@chromium.org>
1729
1730         Add an overlay play button to media controls on android
1731         https://bugs.webkit.org/show_bug.cgi?id=92132
1732
1733         Reviewed by Adam Barth.
1734
1735         This change adds an overlay play button to the media controls for android.
1736         No tests for now as this setting is not being used by other port.
1737         Will add a test and adjust all the test expectations when we upstream the layout tests for android.
1738
1739         * WebCore.gypi:
1740         * css/CSSPrimitiveValueMappings.h:
1741         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1742         * css/CSSValueKeywords.in:
1743         * css/mediaControls.css:
1744         (audio::-webkit-media-controls-overlay-play-button, video::-webkit-media-controls-overlay-play-button):
1745         * css/mediaControlsChromiumAndroid.css:
1746         (audio::-webkit-media-controls-overlay-enclosure):
1747         (video::-webkit-media-controls-overlay-enclosure):
1748         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
1749         (video::-webkit-media-controls-overlay-play-button):
1750         * html/shadow/MediaControlElements.cpp:
1751         (WebCore::MediaControlOverlayPlayButtonElement::MediaControlOverlayPlayButtonElement):
1752         (WebCore):
1753         (WebCore::MediaControlOverlayPlayButtonElement::create):
1754         (WebCore::MediaControlOverlayPlayButtonElement::defaultEventHandler):
1755         (WebCore::MediaControlOverlayPlayButtonElement::updateDisplayType):
1756         (WebCore::MediaControlOverlayPlayButtonElement::shadowPseudoId):
1757         * html/shadow/MediaControlElements.h:
1758         (MediaControlOverlayPlayButtonElement):
1759         (WebCore):
1760         * html/shadow/MediaControlRootElementChromium.cpp:
1761         (WebCore::MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement):
1762         (WebCore::MediaControlPanelEnclosureElement::create):
1763         (WebCore):
1764         (WebCore::MediaControlPanelEnclosureElement::shadowPseudoId):
1765         (WebCore::MediaControlRootElementChromium::create):
1766         (WebCore::MediaControlRootElementChromium::initializeControls):
1767         * html/shadow/MediaControlRootElementChromium.h:
1768         (MediaControlChromiumEnclosureElement):
1769         (WebCore):
1770         (MediaControlPanelEnclosureElement):
1771         (MediaControlRootElementChromium):
1772         * html/shadow/MediaControlRootElementChromiumAndroid.cpp: Added.
1773         (WebCore):
1774         (WebCore::MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement):
1775         (WebCore::MediaControlOverlayEnclosureElement::create):
1776         (WebCore::MediaControlOverlayEnclosureElement::shadowPseudoId):
1777         (WebCore::MediaControlRootElementChromiumAndroid::MediaControlRootElementChromiumAndroid):
1778         (WebCore::MediaControls::create):
1779         (WebCore::MediaControlRootElementChromiumAndroid::create):
1780         (WebCore::MediaControlRootElementChromiumAndroid::setMediaController):
1781         (WebCore::MediaControlRootElementChromiumAndroid::playbackStarted):
1782         (WebCore::MediaControlRootElementChromiumAndroid::playbackStopped):
1783         * html/shadow/MediaControlRootElementChromiumAndroid.h: Added.
1784         (WebCore):
1785         (MediaControlOverlayEnclosureElement):
1786         (MediaControlRootElementChromiumAndroid):
1787         * platform/ThemeTypes.h:
1788         * rendering/RenderMediaControlsChromium.cpp:
1789         (WebCore::paintMediaOverlayPlayButton):
1790         (WebCore):
1791         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
1792         * rendering/RenderTheme.cpp:
1793         (WebCore::RenderTheme::paint):
1794         * rendering/RenderTheme.h:
1795         (WebCore::RenderTheme::paintMediaOverlayPlayButton):
1796         * rendering/RenderThemeChromiumAndroid.cpp:
1797         (WebCore::RenderThemeChromiumAndroid::paintMediaOverlayPlayButton):
1798         (WebCore):
1799         * rendering/RenderThemeChromiumAndroid.h:
1800
1801 2012-07-28  Mario Sanchez Prada  <msanchez@igalia.com>
1802
1803         [GTK] Add a new and reusable enchant-based spellchecker in WebCore
1804         https://bugs.webkit.org/show_bug.cgi?id=90269
1805
1806         Reviewed by Martin Robinson.
1807
1808         Move enchant specific code down to WebCore, into a new class
1809         TextCheckerEnchant, that we can use from WK1 and WK2.
1810
1811         * GNUmakefile.am: Add flags to handle the SPELLCHECK feature.
1812         * GNUmakefile.list.am: Added new files.
1813         * platform/text/gtk/TextCheckerEnchant.cpp: Added.
1814         (getAvailableDictionariesCallback):
1815         (TextCheckerEnchant::TextCheckerEnchant):
1816         (TextCheckerEnchant::~TextCheckerEnchant):
1817         (TextCheckerEnchant::ignoreWord):
1818         (TextCheckerEnchant::learnWord):
1819         (TextCheckerEnchant::checkSpellingOfString):
1820         (TextCheckerEnchant::getGuessesForWord):
1821         (TextCheckerEnchant::updateSpellCheckingLanguages):
1822         (TextCheckerEnchant::freeEnchantBrokerDictionaries):
1823         * platform/text/gtk/TextCheckerEnchant.h: Added.
1824         (WebCore):
1825         (TextCheckerEnchant):
1826         (WebCore::TextCheckerEnchant::create):
1827
1828 2012-07-28  Vineet Chaudhary  <rgf748@motorola.com>
1829
1830         [Clamp] support in binding generator.
1831         https://bugs.webkit.org/show_bug.cgi?id=77605
1832
1833         Reviewed by Kentaro Hara.
1834
1835         Currently [Clamp] extended attribute in IDL files.
1836         Spec: http://www.w3.org/TR/2012/CR-WebIDL-20120419/#Clamp
1837
1838         Tests: TestObj.idl
1839
1840         * bindings/scripts/CodeGeneratorCPP.pm:
1841         (SkipFunction): Skips methods with [Clamp] parameters.
1842         * bindings/scripts/CodeGeneratorGObject.pm:
1843         (SkipFunction): Skips methods with [Clamp] parameters.
1844         * bindings/scripts/CodeGeneratorJS.pm:
1845         (GenerateParametersCheck): Support [Clamp] for JSBindings.
1846         * bindings/scripts/CodeGeneratorObjC.pm:
1847         (SkipFunction): Skips methods with [Clamp] parameters.
1848         * bindings/scripts/CodeGeneratorV8.pm:
1849         (GenerateParametersCheck): Support [Clamp] for V8Bindings.
1850         * bindings/scripts/IDLAttributes.txt: Added [Clamp] to attributes list.
1851         * bindings/scripts/test/JS/JSTestObj.cpp: Test.
1852         (WebCore::jsTestObjPrototypeFunctionClassMethodWithClamp):
1853         * bindings/scripts/test/JS/JSTestObj.h:
1854         * bindings/scripts/test/TestObj.idl:
1855         * bindings/scripts/test/V8/V8TestObj.cpp:
1856         (WebCore::TestObjV8Internal::classMethodWithClampCallback):
1857         (TestObjV8Internal):
1858
1859 2012-07-27  Sheriff Bot  <webkit.review.bot@gmail.com>
1860
1861         Unreviewed, rolling out r123908.
1862         http://trac.webkit.org/changeset/123908
1863         https://bugs.webkit.org/show_bug.cgi?id=92572
1864
1865         Broke Chromium Linux compile (Requested by pkasting on
1866         #webkit).
1867
1868         * WebCore.gypi:
1869         * css/CSSPrimitiveValueMappings.h:
1870         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1871         * css/CSSValueKeywords.in:
1872         * css/mediaControls.css:
1873         * css/mediaControlsChromiumAndroid.css:
1874         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
1875         * html/shadow/MediaControlElements.cpp:
1876         (WebCore):
1877         * html/shadow/MediaControlElements.h:
1878         (WebCore):
1879         * html/shadow/MediaControlRootElementChromium.cpp:
1880         (WebCore::MediaControlChromiumEnclosureElement::create):
1881         (WebCore):
1882         (WebCore::MediaControlChromiumEnclosureElement::shadowPseudoId):
1883         (WebCore::MediaControls::create):
1884         (WebCore::MediaControlRootElementChromium::create):
1885         * html/shadow/MediaControlRootElementChromium.h:
1886         (MediaControlChromiumEnclosureElement):
1887         (MediaControlRootElementChromium):
1888         * html/shadow/MediaControlRootElementChromiumAndroid.cpp: Removed.
1889         * html/shadow/MediaControlRootElementChromiumAndroid.h: Removed.
1890         * platform/ThemeTypes.h:
1891         * rendering/RenderMediaControlsChromium.cpp:
1892         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
1893         * rendering/RenderTheme.cpp:
1894         (WebCore::RenderTheme::paint):
1895         * rendering/RenderTheme.h:
1896         * rendering/RenderThemeChromiumAndroid.cpp:
1897         * rendering/RenderThemeChromiumAndroid.h:
1898
1899 2012-07-27  Eli Fidler  <efidler@rim.com>
1900
1901         [BlackBerry] Use new LocaleHandler.
1902         https://bugs.webkit.org/show_bug.cgi?id=92548
1903
1904         Reviewed by Yong Li.
1905
1906         RIM PR 128381
1907
1908         * platform/blackberry/LocalizedStringsBlackBerry.cpp:
1909         (WebCore::platformLanguage):
1910         * platform/network/blackberry/ResourceRequestBlackBerry.cpp:
1911         (WebCore::ResourceRequest::initializePlatformRequest):
1912         * platform/text/blackberry/TextBreakIteratorInternalICUBlackBerry.cpp:
1913         (WebCore::currentSearchLocaleID):
1914         (WebCore::currentTextBreakLocaleID):
1915
1916 2012-07-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1917
1918         Change constructor with explicit constructor in WebCore/Modules
1919         https://bugs.webkit.org/show_bug.cgi?id=92529
1920
1921         Reviewed by Kentaro Hara.
1922
1923         As a step to let *explicit* keyword add to constructors which have a parameter,
1924         *explicit* keyword is added to Source/WebCore/Modules in order to avoid implicit
1925         type conversion.
1926
1927         No new tests. Covered by existing tests.
1928
1929         * Modules/filesystem/LocalFileSystem.h:
1930         (WebCore::LocalFileSystem::LocalFileSystem):
1931         * Modules/filesystem/Metadata.h:
1932         (WebCore::Metadata::Metadata):
1933         * Modules/filesystem/SyncCallbackHelper.h:
1934         (WebCore::SyncCallbackHelper::SuccessCallbackImpl::SuccessCallbackImpl):
1935         (WebCore::SyncCallbackHelper::ErrorCallbackImpl::ErrorCallbackImpl):
1936         * Modules/mediastream/IceCandidate.h:
1937         (IceCandidate):
1938         * Modules/mediastream/NavigatorUserMediaError.h:
1939         (WebCore::NavigatorUserMediaError::NavigatorUserMediaError):
1940         * Modules/mediastream/SessionDescription.h:
1941         (SessionDescription):
1942         * Modules/mediastream/UserMediaController.h:
1943         (UserMediaController):
1944         * Modules/notifications/NotificationController.h:
1945         (NotificationController):
1946         * Modules/speech/SpeechRecognition.h:
1947         (SpeechRecognition):
1948         * Modules/speech/SpeechRecognitionController.h:
1949         (SpeechRecognitionController):
1950         * Modules/speech/SpeechRecognitionEvent.h:
1951         (SpeechRecognitionEvent):
1952         * Modules/speech/SpeechRecognitionResultList.h:
1953         (SpeechRecognitionResultList):
1954         * Modules/vibration/Vibration.h:
1955         (Vibration):
1956         * Modules/webaudio/AudioBuffer.h:
1957         (AudioBuffer):
1958         * Modules/webaudio/AudioContext.h:
1959         (AudioContext):
1960         * Modules/webaudio/AudioNodeInput.h:
1961         (AudioNodeInput):
1962         * Modules/webaudio/AudioSummingJunction.h:
1963         (AudioSummingJunction):
1964         * Modules/webaudio/BiquadDSPKernel.h:
1965         (WebCore::BiquadDSPKernel::BiquadDSPKernel):
1966         * Modules/webaudio/DefaultAudioDestinationNode.h:
1967         (DefaultAudioDestinationNode):
1968         * Modules/webaudio/DelayDSPKernel.h:
1969         (DelayDSPKernel):
1970         * Modules/webaudio/OfflineAudioCompletionEvent.h:
1971         (OfflineAudioCompletionEvent):
1972         * Modules/webaudio/WaveShaperDSPKernel.h:
1973         (WebCore::WaveShaperDSPKernel::WaveShaperDSPKernel):
1974         * Modules/webaudio/WaveShaperNode.h:
1975         (WaveShaperNode):
1976         * Modules/webaudio/WaveTable.h:
1977         (WaveTable):
1978         * Modules/webdatabase/DatabaseAuthorizer.h:
1979         (DatabaseAuthorizer):
1980         * Modules/webdatabase/DatabaseTask.h:
1981         (Database::DatabaseTransactionTask):
1982         * Modules/webdatabase/DatabaseTracker.h:
1983         (DatabaseTracker):
1984         * Modules/webdatabase/SQLCallbackWrapper.h:
1985         (WebCore::SQLCallbackWrapper::SafeReleaseTask::SafeReleaseTask):
1986         * Modules/webdatabase/SQLException.h:
1987         (WebCore::SQLException::SQLException):
1988         * Modules/websockets/WebSocket.h:
1989         * Modules/websockets/WebSocketExtensionProcessor.h:
1990         (WebCore::WebSocketExtensionProcessor::WebSocketExtensionProcessor):
1991
1992 2012-07-27  Kentaro Hara  <haraken@chromium.org>
1993
1994         [V8] Optimize Element::getAttributeNS() by replacing String with AtomicString
1995         https://bugs.webkit.org/show_bug.cgi?id=90276
1996
1997         Reviewed by Adam Barth.
1998
1999         In r121439, we changed the argument type of Element::getAttribute()
2000         from String to AtomicString for optimization. This patch changes the
2001         argument type of Element::getAttributeNS() from String to AtomicString.
2002
2003         Actually this change affects V8 performance only.
2004
2005         [JSC without the patch]
2006         The binding code converts a given JavaScript string to a String
2007         -> the String is passed to getAttributeNS()
2008         -> the String is converted to an AtomicString when it is passed to
2009         QualifiedName() constructor.
2010
2011         [JSC with the patch]
2012         The binding code converts a given JavaScript string to a String
2013         -> the String is converted to an AtomicString when it is passed to
2014         getAttributeNS()
2015         -> the AtomicString is passed to QualifiedName() constructor.
2016
2017         [V8 without the patch]
2018         The binding code retrieves a cached external String for a given
2019         JavaScript string
2020         -> the String is passed to getAttributeNS()
2021         -> the String is converted to AtomicString when it is passed to
2022         QualifiedName() constructor.
2023
2024         [V8 with the patch]
2025         The binding code retrieves a cached external AtomicString for a given
2026         JavaScript string
2027         -> the AtomicString is passed to getAttributeNS()
2028         -> the AtomicString is passed to QualifiedName() constructor.
2029
2030         In this way, in JSC, the change affects where a String is converted to
2031         an AtomicString. On the other hand, in V8, (since the AtomicString is already
2032         cached,) we can skip the conversion step.
2033
2034         Performance test: https://bugs.webkit.org/attachment.cgi?id=150158
2035
2036         getAttributeNS (Chromium/Linux):
2037         577.80ms => 454.60ms
2038
2039         * dom/Element.cpp:
2040         (WebCore::Element::getAttributeNS):
2041         * dom/Element.h:
2042         (Element):
2043
2044 2012-07-27  Sheriff Bot  <webkit.review.bot@gmail.com>
2045
2046         Unreviewed, rolling out r123679.
2047         http://trac.webkit.org/changeset/123679
2048         https://bugs.webkit.org/show_bug.cgi?id=92565
2049
2050         Slowed down HTML parsing by 3.6% (Requested by abarth on
2051         #webkit).
2052
2053         * html/FTPDirectoryDocument.cpp:
2054         (WebCore::FTPDirectoryDocumentParser::append):
2055         * html/parser/HTMLEntityParser.cpp:
2056         (WebCore::HTMLEntityParser::consumeNamedEntity):
2057         * html/parser/HTMLParserIdioms.cpp:
2058         (WebCore::stripLeadingAndTrailingHTMLSpaces):
2059         * html/parser/HTMLSourceTracker.cpp:
2060         (WebCore::HTMLSourceTracker::sourceForToken):
2061         * loader/cache/CachedScript.cpp:
2062         (WebCore::CachedScript::script):
2063         * platform/text/SegmentedString.cpp:
2064         (WebCore::SegmentedString::SegmentedString):
2065         (WebCore::SegmentedString::operator=):
2066         (WebCore::SegmentedString::clear):
2067         (WebCore::SegmentedString::append):
2068         (WebCore::SegmentedString::prepend):
2069         (WebCore::SegmentedString::advanceSubstring):
2070         (WebCore::SegmentedString::advance):
2071         (WebCore::SegmentedString::advanceSlowCase):
2072         (WebCore::SegmentedString::advanceAndUpdateLineNumberSlowCase):
2073         * platform/text/SegmentedString.h:
2074         (WebCore::SegmentedSubstring::SegmentedSubstring):
2075         (WebCore::SegmentedSubstring::clear):
2076         (WebCore::SegmentedSubstring::appendTo):
2077         (SegmentedSubstring):
2078         (WebCore::SegmentedString::SegmentedString):
2079         (WebCore::SegmentedString::push):
2080         (WebCore::SegmentedString::isEmpty):
2081         (WebCore::SegmentedString::lookAhead):
2082         (WebCore::SegmentedString::lookAheadIgnoringCase):
2083         (WebCore::SegmentedString::advance):
2084         (WebCore::SegmentedString::advanceAndASSERT):
2085         (WebCore::SegmentedString::advanceAndASSERTIgnoringCase):
2086         (WebCore::SegmentedString::advancePastNewlineAndUpdateLineNumber):
2087         (SegmentedString):
2088         (WebCore::SegmentedString::advancePastNonNewline):
2089         (WebCore::SegmentedString::advanceAndUpdateLineNumber):
2090         (WebCore::SegmentedString::operator*):
2091         (WebCore::SegmentedString::operator->):
2092         (WebCore::SegmentedString::current):
2093         (WebCore::SegmentedString::equalsLiterally):
2094         (WebCore::SegmentedString::equalsIgnoringCase):
2095         (WebCore::SegmentedString::lookAheadInline):
2096         (WebCore::SegmentedString::lookAheadSlowCase):
2097         * xml/parser/CharacterReferenceParserInlineMethods.h:
2098         (WebCore::consumeCharacterReference):
2099         * xml/parser/MarkupTokenizerBase.h:
2100         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::nextInputCharacter):
2101         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::peek):
2102         (WebCore::MarkupTokenizerBase::InputStreamPreprocessor::advance):
2103
2104 2012-07-27  Jer Noble  <jer.noble@apple.com>
2105
2106         Reset the set of "seen" plugins when the main frame load is committed.
2107         https://bugs.webkit.org/show_bug.cgi?id=92564
2108
2109         Reviewed by Anders Carlsson.
2110
2111         Because the Page object is re-used across navigation and reload, reset the list
2112         of seen plugins when the main frame load commits. This gives a good baseline to
2113         compare against the number of pages loaded.
2114
2115         No new tests; the "seen" plugin list is for diagnostic purposes only.
2116
2117         * loader/FrameLoader.cpp:
2118         (WebCore::FrameLoader::dispatchDidCommitLoad):
2119         * page/Page.cpp:
2120         (WebCore::Page::resetSeenPlugins):
2121         * page/Page.h:
2122
2123 2012-07-27  Sukolsak Sakshuwong  <sukolsak@google.com>
2124
2125         execCommand copies the backgroung-color of the enclosing element to the element being edited.
2126         https://bugs.webkit.org/show_bug.cgi?id=91783
2127
2128         Reviewed by Ryosuke Niwa.
2129
2130         InsertListCommand and some other edit commands remove redundant
2131         style properties after their DOM modification by using
2132         StylePropertySet::removeEquivalentProperties.  However, this method
2133         does not remove redundant background-color properties such as
2134         "background-color: white" and "background-color: #fff" because
2135         it compares them using cssText and thus treats them as different.
2136         Add code to convert background colors to RGBA and then compare them.
2137
2138         Test: editing/style/redundant-background-color.html
2139
2140         * editing/EditingStyle.cpp:
2141         (WebCore::getRGBABackgroundColor):
2142         (WebCore):
2143         (WebCore::getPropertiesNotIn):
2144
2145 2012-07-27  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2146
2147         [EFL] Return 0 when network is offline
2148         https://bugs.webkit.org/show_bug.cgi?id=92454
2149
2150         Reviewed by Kenneth Rohde Christiansen.
2151
2152         Network Info latest spec says 0 is returned when network is offline.
2153         r123769 modified to return infinity value when network is offiline.
2154
2155         * platform/efl/NetworkInfoProviderEfl.cpp:
2156         (WebCore::NetworkInfoProviderEfl::bandwidth):
2157
2158 2012-07-27  Scott Graham  <scottmg@chromium.org>
2159
2160         Change navigator.webkitGamepads[] to navigator.webkitGetGamepads()
2161         https://bugs.webkit.org/show_bug.cgi?id=92533
2162
2163         Reviewed by Adam Barth.
2164
2165         Per discussion on public-webapps. Pages that enumerate navigator were
2166         causing background resources to be created to poll hardware
2167         unintentionally. By changing to an explicit function call, this is
2168         avoided (and the API becomes more clear too). This change updates the
2169         implementation to match the current ED spec.
2170
2171         * Modules/gamepad/NavigatorGamepad.cpp:
2172         (WebCore::NavigatorGamepad::webkitGetGamepads):
2173         * Modules/gamepad/NavigatorGamepad.h:
2174         (NavigatorGamepad):
2175         * Modules/gamepad/NavigatorGamepad.idl:
2176         * bindings/generic/RuntimeEnabledFeatures.h:
2177         (WebCore::RuntimeEnabledFeatures::setWebkitGetGamepadsEnabled):
2178         (WebCore::RuntimeEnabledFeatures::webkitGetGamepadsEnabled):
2179
2180 2012-07-27  Brady Eidson  <beidson@apple.com>
2181
2182         Plugins should not be allowed to override standard properties/attributes in non-standard worlds
2183         <rdar://problem/11975252> and https://bugs.webkit.org/show_bug.cgi?id=92519
2184
2185         Reviewed by Anders Carlsson.
2186
2187         Change the 3 plugin-owning element's custom bindings to prefer built-in properties if they exist.
2188         When they do they don't give the plugin a chance to override.
2189
2190         Test: plugins/npruntime/overrides-all-properties.html
2191
2192         Add plugin custom functions to prefer built-in properties over plugin scriptable object properties:
2193         * bindings/js/JSPluginElementFunctions.h:
2194         (WebCore::pluginElementCustomGetOwnPropertySlot):
2195         (WebCore::pluginElementCustomGetOwnPropertyDescriptor):
2196
2197         Use those new custom functions for getting properties:
2198         * bindings/js/JSHTMLAppletElementCustom.cpp:
2199         (WebCore::JSHTMLAppletElement::getOwnPropertySlotDelegate):
2200         (WebCore::JSHTMLAppletElement::getOwnPropertyDescriptorDelegate):
2201         * bindings/js/JSHTMLEmbedElementCustom.cpp:
2202         (WebCore::JSHTMLEmbedElement::getOwnPropertySlotDelegate):
2203         (WebCore::JSHTMLEmbedElement::getOwnPropertyDescriptorDelegate):
2204         * bindings/js/JSHTMLObjectElementCustom.cpp:
2205         (WebCore::JSHTMLObjectElement::getOwnPropertySlotDelegate):
2206         (WebCore::JSHTMLObjectElement::getOwnPropertyDescriptorDelegate):
2207
2208 2012-07-27  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2209
2210         use createUninitialized when creating TypedArray from another array
2211         https://bugs.webkit.org/show_bug.cgi?id=92518
2212
2213         Reviewed by Kenneth Russell.
2214
2215         When creating a Typed Array from another array, we fill it with values
2216         from the source array. So, we can create it uninitialized. This is
2217         make constructor about 35% faster when constructed with another typed
2218         array.
2219
2220         Test: fast/canvas/webgl/array-constructor.html
2221
2222         * bindings/js/JSArrayBufferViewHelper.h:
2223         (WebCore::constructArrayBufferViewWithTypedArrayArgument):
2224         (WebCore::constructArrayBufferView):
2225
2226 2012-07-27  Eli Fidler  <efidler@rim.com>
2227
2228         [BlackBerry] Adapt to change in the FontInfo platform API.
2229         https://bugs.webkit.org/show_bug.cgi?id=92547
2230
2231         Reviewed by Yong Li
2232
2233         RIM PR 161263
2234
2235         * page/blackberry/SettingsBlackBerry.cpp:
2236         (WebCore::Settings::initializeDefaultFontFamilies):
2237
2238 2012-07-27  Antoine Labour  <piman@chromium.org>
2239
2240         [chromium] Fix color matrix filter computation so that filters that don't need clamping are correctly detected as such
2241         https://bugs.webkit.org/show_bug.cgi?id=92452
2242
2243         Reviewed by Stephen White.
2244
2245         Because of precision issues, some filters were returning true to
2246         matrixNeedsClamping when they can return false. This fixes it.
2247
2248         No new tests in this CL, a follow-up change refactors the code to add
2249         several tests.
2250
2251         * platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp:
2252
2253 2012-07-27  Jer Noble  <jer.noble@apple.com>
2254
2255         Add diagnostic logging for plugins-per-page.
2256         https://bugs.webkit.org/show_bug.cgi?id=92538
2257
2258         Reviewed by Anders Carlsson.
2259
2260         Add some diagnostic logging for whether a page has seen a plugin, and 
2261         whether a page has seen a plugin of a specific type.
2262
2263         Move the diagnostic logging out of the elemements themselves:
2264         * html/HTMLEmbedElement.cpp:
2265         (WebCore::HTMLEmbedElement::updateWidget):
2266         * html/HTMLObjectElement.cpp:
2267         (WebCore::HTMLObjectElement::updateWidget):
2268
2269         Instead, log when the plugin is requested, thereby catching plugins which are
2270         rejected because, e.g., Java is disabled or not installed:
2271         * loader/SubframeLoader.cpp:
2272         (WebCore::logPluginRequest):
2273         (WebCore::SubframeLoader::requestObject):
2274         (WebCore::SubframeLoader::createJavaAppletWidget):
2275
2276         Add new diagnostic key values:
2277         * page/DiagnosticLoggingKeys.cpp:
2278         (WebCore::DiagnosticLoggingKeys::pageContainsPluginKey):
2279         (WebCore::DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey):
2280         * page/DiagnosticLoggingKeys.h:
2281
2282         Add a map of plugin types seen per-page for diagnostic purposes:
2283         * page/Page.cpp:
2284         (WebCore::Page::hasSeenAnyPlugin):
2285         (WebCore::Page::hasSeenPlugin):
2286         (WebCore::Page::sawPlugin):
2287         * page/Page.h:
2288
2289 2012-07-27  Patrick Gansterer  <paroga@webkit.org>
2290
2291         [WINCE] Use macros from ICU instead of defining the same functionality again
2292         https://bugs.webkit.org/show_bug.cgi?id=92530
2293
2294         Reviewed by Ryosuke Niwa.
2295
2296         Replace isHighSurrogate() with U16_IS_LEAD(), isLowSurrogate() with
2297         U16_IS_TRAIL() and surrogateToUcs4() with U16_GET_SUPPLEMENTARY().
2298
2299         * html/FTPDirectoryDocument.cpp:
2300         (WebCore::processFileDateString):
2301         * loader/archive/mhtml/MHTMLArchive.cpp:
2302         (WebCore::MHTMLArchive::generateMHTMLData):
2303         * platform/graphics/wince/FontWinCE.cpp:
2304         (WebCore::generateComponents):
2305
2306 2012-07-27  Christophe Dumez  <christophe.dumez@intel.com>
2307
2308         Build warning in CSSPrimitiveValueMappings.h when CSS_STICKY_POSITION is disabled
2309         https://bugs.webkit.org/show_bug.cgi?id=92523
2310
2311         Reviewed by Simon Fraser.
2312
2313         Move #ifdef in CSSPrimitiveValueMappings.h to silent compilation warning
2314         when CSS_STICKY_POSITION is disabled.
2315
2316         No new tests, no behavior change.
2317
2318         * css/CSSPrimitiveValueMappings.h:
2319         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2320
2321 2012-07-27  Vivek Galatage  <vivekgalatage@gmail.com>
2322
2323         DragController should ascertain dragClient to be non-null
2324         https://bugs.webkit.org/show_bug.cgi?id=92474
2325
2326         Reviewed by Tony Chang.
2327
2328         The DragController must always ensure a valid dragClient object. Hence
2329         adding the ASSERT to assure that.
2330
2331         No new tests. Added assertion for PageClient.dragClient.
2332
2333         * page/DragController.cpp:
2334         (WebCore::DragController::DragController):
2335
2336 2012-07-27  Adrienne Walker  <enne@google.com>
2337
2338         [chromium] Clean up LayerRendererChromium::drawTexturedQuad
2339         https://bugs.webkit.org/show_bug.cgi?id=91823
2340
2341         Reviewed by James Robinson.
2342
2343         LayerRendererChromium::drawTexturedQuad has been around forever and
2344         over time has developed several problems:
2345          - Confusingly named relative to drawTextureQuad
2346          - All but one callers identically manipulate the transform matrix
2347          - Lots of optional parameters that only few functions use
2348
2349         This patch breaks up drawTexturedQuad into setShaderOpacity (for
2350         optional opacity values sent to the shader), setShaderFloatQuad (the
2351         full FloatQuad used by AA shaders), and drawQuadGeometry (actually
2352         draw the geometry, and wrap the transform logic that was duplicated
2353         everywhere).
2354
2355         No new tests; no change in functionality.
2356
2357         * platform/graphics/chromium/LayerRendererChromium.cpp:
2358         (WebCore::LayerRendererChromium::drawCheckerboardQuad):
2359         (WebCore::LayerRendererChromium::drawBackgroundFilters):
2360         (WebCore::LayerRendererChromium::drawRenderPassQuad):
2361         (WebCore::LayerRendererChromium::drawSolidColorQuad):
2362         (WebCore::LayerRendererChromium::drawTileQuad):
2363         (WebCore::LayerRendererChromium::drawYUVVideoQuad):
2364         (WebCore::LayerRendererChromium::drawStreamVideoQuad):
2365         (WebCore::LayerRendererChromium::drawTextureQuad):
2366         (WebCore::LayerRendererChromium::drawIOSurfaceQuad):
2367         (WebCore::LayerRendererChromium::drawHeadsUpDisplay):
2368         (WebCore::LayerRendererChromium::setShaderFloatQuad):
2369         (WebCore::LayerRendererChromium::setShaderOpacity):
2370         (WebCore::LayerRendererChromium::drawQuadGeometry):
2371         (WebCore::LayerRendererChromium::copyTextureToFramebuffer):
2372         * platform/graphics/chromium/LayerRendererChromium.h:
2373         (LayerRendererChromium):
2374
2375 2012-07-27  Shawn Singh  <shawnsingh@chromium.org>
2376
2377         [chromium] CCLayerTreeHost placeholder scissor should be deviceViewportSize instead of viewportSize
2378         https://bugs.webkit.org/show_bug.cgi?id=92469
2379
2380         Reviewed by Adrienne Walker.
2381
2382         We were accidentally using viewportSize instead of
2383         deviceViewportSize in a particular place in code. Recent
2384         refactoring to use tighter scissor rects exposed this problem.
2385
2386         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2387         (WebCore::CCLayerTreeHost::updateLayers):
2388
2389 2012-07-27  Kevin Ellis  <kevers@chromium.org>
2390
2391         Search cancel button is hard to activate with a tap gesture even if touch adjustment is enabled.
2392         https://bugs.webkit.org/show_bug.cgi?id=91894
2393
2394         Reviewed by Antonio Gomes.
2395
2396         Update check for determining if a node responds to tap gestures.
2397         Previously, the cancel button was being discarded as a candidate for
2398         touch adjustment if the touch area clipped the text input region
2399         because the candidate pruning process failed to account for the cancel
2400         button having a default mouse handler.  Possibly an interim fix,
2401         depending on resolution to 92093.
2402
2403         Test: touchadjustment/search-cancel.html
2404
2405         * page/TouchAdjustment.cpp:
2406         (TouchAdjustment):
2407         (WebCore::TouchAdjustment::nodeRespondsToTapGesture):
2408
2409 2012-07-27  Varun Jain  <varunjain@chromium.org>
2410
2411         Animated SVGs do not clear previous frame completely in hidpi mode.
2412         https://bugs.webkit.org/show_bug.cgi?id=92395
2413
2414         Reviewed by Darin Adler.
2415
2416         The rect thats is cleared in subsequent frames needed to be scaled with device scale.
2417
2418         Test: svg/as-image/animated-svg-repaints-completely-in-hidpi.html
2419
2420         * svg/graphics/SVGImage.cpp:
2421         (WebCore::SVGImage::drawSVGToImageBuffer):
2422
2423 2012-07-27  Scott Graham  <scottmg@chromium.org>
2424
2425         Fix COMPILE_ASSERT for InlineFlowBox growing
2426         https://bugs.webkit.org/show_bug.cgi?id=92541
2427
2428         Reviewed by Dan Bernstein.
2429
2430         Use unsigned instead of bool to keep size small on Windows.
2431
2432         No new tests.
2433
2434         * rendering/InlineFlowBox.h:
2435         (InlineFlowBox):
2436
2437 2012-07-27  Beth Dakin  <bdakin@apple.com>
2438
2439         https://bugs.webkit.org/show_bug.cgi?id=92327
2440         -webkit-background-clip:text is blurry in WebKit 1 apps when
2441         deviceScaleFactor > 1
2442         -and corresponding-
2443         <rdar://problem/11683788>
2444
2445         Reviewed by Simon Fraser.
2446
2447         The bug here is that the code to make createCompatibleBuffer() HiDPI-savvy 
2448         assumed that the deviceScaleFactor would always be baked into the CTM of the
2449         GraphicsContext. But that is NOT the case in WebKit 1.
2450
2451         createCompatibleBuffer() is used for clip text and gradients.
2452
2453         Now getCTM() takes a parameter indicating whether the result should definitely
2454         include the device scale, or if it should possibly included the device scale, 
2455         which is the option that matches old behavior.
2456         * platform/graphics/GraphicsContext.h:
2457         (GraphicsContext):
2458         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2459         (WebCore::GraphicsContext::getCTM):
2460         * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
2461         (WebCore::GraphicsContext::getCTM):
2462         * platform/graphics/qt/GraphicsContextQt.cpp:
2463         (WebCore::GraphicsContext::getCTM):
2464         * platform/graphics/skia/GraphicsContextSkia.cpp:
2465         (WebCore::GraphicsContext::getCTM):
2466         * platform/graphics/wince/GraphicsContextWinCE.cpp:
2467         (WebCore::GraphicsContext::getCTM):
2468         * platform/graphics/wx/GraphicsContextWx.cpp:
2469         (WebCore::GraphicsContext::getCTM):
2470
2471         Actually use the new parameter in the CG implementation. Use CG API to get a
2472         matrix that definitely includes the device scale when that is required. 
2473         * platform/graphics/cg/GraphicsContextCG.cpp:
2474         (WebCore::GraphicsContext::getCTM):
2475
2476         Remove some symbol cruft that doesn't seem to require a replacement.
2477         * WebCore.exp.in:
2478
2479         Use DefinitelyIncludeDeviceScale when getting the CTM in the buggy spot.
2480         * platform/graphics/GraphicsContext.cpp:
2481         (WebCore::GraphicsContext::createCompatibleBuffer):
2482
2483         The ImageBuffer for gradients is created using createCompatibleBuffer(), and since 
2484         createCompatibleBuffer() now uses getCTM(DefinitelyIncludeDeviceScale) to 
2485         determine appropriate sizing, drawPattern() should use that same matrix to 
2486         determine pattern sizing.
2487         * platform/graphics/GeneratorGeneratedImage.cpp:
2488         (WebCore::GeneratorGeneratedImage::drawPattern):
2489
2490 2012-07-27  Tony Chang  <tony@chromium.org>
2491
2492         flex-wrap: wrap not wrapping for % sized items in column flow
2493         https://bugs.webkit.org/show_bug.cgi?id=92324
2494
2495         Reviewed by Ojan Vafai.
2496
2497         We were using trying to use the value of contentLogicalHeight() before having called computeLogicalHeight()
2498         in a few places. Fix this in mainAxisContentExtent() rather than at the callers.
2499
2500         Test: css3/flexbox/percentage-heights.html
2501
2502         * rendering/RenderFlexibleBox.cpp:
2503         (WebCore::RenderFlexibleBox::mainAxisContentExtent):
2504         (WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): If we haven't called computeLogicalHeight, we try to compute
2505         the height based on the fixed flexbox value. min/max don't matter here since percent values are only based on height/width.
2506         * rendering/RenderFlexibleBox.h: Drop const because computeContentLogicalHeightUsing is not const. I can
2507         try making computeContentLogicalHeightUsing const in a follow up change (might be non-trivial).
2508
2509 2012-07-27  Min Qin  <qinmin@chromium.org>
2510
2511         Add an overlay play button to media controls on android
2512         https://bugs.webkit.org/show_bug.cgi?id=92132
2513
2514         Reviewed by Adam Barth.
2515
2516         This change adds an overlay play button to the media controls for android.
2517         No tests for now as this setting is not being used by other port.
2518         Will add a test and adjust all the test expectations when we upstream the layout tests for android.
2519
2520         * WebCore.gypi:
2521         * css/CSSPrimitiveValueMappings.h:
2522         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2523         * css/CSSValueKeywords.in:
2524         * css/mediaControls.css:
2525         (audio::-webkit-media-controls-overlay-play-button, video::-webkit-media-controls-overlay-play-button):
2526         * css/mediaControlsChromiumAndroid.css:
2527         (audio::-webkit-media-controls-overlay-enclosure):
2528         (video::-webkit-media-controls-overlay-enclosure):
2529         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
2530         (video::-webkit-media-controls-overlay-play-button):
2531         * html/shadow/MediaControlElements.cpp:
2532         (WebCore::MediaControlOverlayPlayButtonElement::MediaControlOverlayPlayButtonElement):
2533         (WebCore):
2534         (WebCore::MediaControlOverlayPlayButtonElement::create):
2535         (WebCore::MediaControlOverlayPlayButtonElement::defaultEventHandler):
2536         (WebCore::MediaControlOverlayPlayButtonElement::updateDisplayType):
2537         (WebCore::MediaControlOverlayPlayButtonElement::shadowPseudoId):
2538         * html/shadow/MediaControlElements.h:
2539         (MediaControlOverlayPlayButtonElement):
2540         (WebCore):
2541         * html/shadow/MediaControlRootElementChromium.cpp:
2542         (WebCore::MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement):
2543         (WebCore::MediaControlPanelEnclosureElement::create):
2544         (WebCore):
2545         (WebCore::MediaControlPanelEnclosureElement::shadowPseudoId):
2546         (WebCore::MediaControlRootElementChromium::create):
2547         (WebCore::MediaControlRootElementChromium::initializeControls):
2548         * html/shadow/MediaControlRootElementChromium.h:
2549         (MediaControlChromiumEnclosureElement):
2550         (WebCore):
2551         (MediaControlPanelEnclosureElement):
2552         (MediaControlRootElementChromium):
2553         * html/shadow/MediaControlRootElementChromiumAndroid.cpp: Added.
2554         (WebCore):
2555         (WebCore::MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement):
2556         (WebCore::MediaControlOverlayEnclosureElement::create):
2557         (WebCore::MediaControlOverlayEnclosureElement::shadowPseudoId):
2558         (WebCore::MediaControlRootElementChromiumAndroid::MediaControlRootElementChromiumAndroid):
2559         (WebCore::MediaControls::create):
2560         (WebCore::MediaControlRootElementChromiumAndroid::create):
2561         (WebCore::MediaControlRootElementChromiumAndroid::setMediaController):
2562         (WebCore::MediaControlRootElementChromiumAndroid::playbackStarted):
2563         (WebCore::MediaControlRootElementChromiumAndroid::playbackStopped):
2564         * html/shadow/MediaControlRootElementChromiumAndroid.h: Added.
2565         (WebCore):
2566         (MediaControlOverlayEnclosureElement):
2567         (MediaControlRootElementChromiumAndroid):
2568         * platform/ThemeTypes.h:
2569         * rendering/RenderMediaControlsChromium.cpp:
2570         (WebCore::paintMediaOverlayPlayButton):
2571         (WebCore):
2572         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
2573         * rendering/RenderTheme.cpp:
2574         (WebCore::RenderTheme::paint):
2575         * rendering/RenderTheme.h:
2576         (WebCore::RenderTheme::paintMediaOverlayPlayButton):
2577         * rendering/RenderThemeChromiumAndroid.cpp:
2578         (WebCore::RenderThemeChromiumAndroid::paintMediaOverlayPlayButton):
2579         (WebCore):
2580         * rendering/RenderThemeChromiumAndroid.h:
2581
2582 2012-07-27  Anders Carlsson  <andersca@apple.com>
2583
2584         Show the unavailable plug-in indicator for Java applets as well
2585         https://bugs.webkit.org/show_bug.cgi?id=92521
2586
2587         Reviewed by Sam Weinig.
2588
2589         Now that <applet> behaves more like <embed> and <object>, make sure that we show the unavailable plug-in indicator
2590         and call the correct error callbacks if we fail to instantiate the plug-in.
2591
2592         * WebCore.exp.in:
2593         Export a symbol needed by WebKit2.
2594
2595         * html/HTMLAppletElement.cpp:
2596         (WebCore::HTMLAppletElement::HTMLAppletElement):
2597         Set the correct service type.
2598
2599         * loader/SubframeLoader.cpp:
2600         (WebCore::SubframeLoader::createJavaAppletWidget):
2601         Enable the unavailable plug-in indicator if we fail to create the java applet widget.
2602
2603 2012-07-27  Dan Bernstein  <mitz@apple.com>
2604
2605         Hit testing near a column break can return a result from an adjacent column when there is leading
2606         https://bugs.webkit.org/show_bug.cgi?id=92524
2607
2608         Reviewed by Anders Carlsson.
2609
2610         The fix for <http://webkit.org/b/92311> relied on the existence of a pagination strut for
2611         detecting that a line was at the beginning of a new column. However, when a line naturally
2612         falls at the beginning of a column, there is no pagination strut, and the check failed.
2613
2614         Test: fast/multicol/hit-test-end-of-column-with-line-height.html
2615
2616         * rendering/InlineFlowBox.h:
2617         (WebCore::InlineFlowBox::InlineFlowBox): Added initializer for new member variable.
2618         (InlineFlowBox): Added m_isFirstAfterPageBreak member variable.
2619         * rendering/RenderBlock.cpp:
2620         (WebCore::RenderBlock::positionForPointWithInlineChildren): Changed the test for whether a
2621         line was at the beginning of a column from relying on a pagination strut to checking
2622         isFirstAfterPageBreak(). Also refined the hit test itself to include the leading above such
2623         a line.
2624         (WebCore::RenderBlock::adjustLinePositionForPagination): Added calls to
2625         setIsFirstAfterPageBreak() to first reset this flag, then set it to true if necessary.
2626         * rendering/RootInlineBox.h:
2627         (WebCore::RootInlineBox::isFirstAfterPageBreak): Added this accessor.
2628         (WebCore::RootInlineBox::setIsFirstAfterPageBreak): Ditto.
2629
2630 2012-07-27  John J. Barton  <johnjbarton@johnjbarton.com>
2631
2632         Web Inspector: Allow front_end to be loaded into an iframe
2633         https://bugs.webkit.org/show_bug.cgi?id=92437
2634
2635         Reviewed by Pavel Feldman.
2636
2637         This change only affects 'embedders' of the inspector/front_end. No change of function for WebKit ports.
2638
2639         * inspector/front-end/ExtensionAPI.js: 
2640         Replace window.top with window.parent two places. When WebInspector is loaded as the main window content, 
2641         then extension iframes have window.top === window.parent; when WebInspector is loaded as an iframe, then
2642         extensions are iframes in iframes and we need to use a relative address window.parent.
2643         (injectedExtensionAPI.ExtensionViewImpl.dispatchShowEvent):
2644         (injectedExtensionAPI.ExtensionViewImpl):
2645         (injectedExtensionAPI.ExtensionServerClient):
2646         WebKit/chromium/scripts/generate_devtools_extension_api.py:
2647         The current number of frames is used in a dynamically created identifier. Again we replace 'top' by 
2648         window.parent.
2649
2650 2012-07-27  John J. Barton  <johnjbarton@johnjbarton.com>
2651
2652         Web Inspector: Allow front_end to be loaded into an iframe
2653         https://bugs.webkit.org/show_bug.cgi?id=92437
2654
2655         Reviewed by Pavel Feldman.
2656
2657         This change only affects 'embedders' of the inspector/front_end. No change of function for WebKit ports.
2658
2659         * inspector/front-end/ExtensionAPI.js: 
2660         Replace window.top with window.parent two places. When WebInspector is loaded as the main window content, 
2661         then extension iframes have window.top === window.parent; when WebInspector is loaded as an iframe, then
2662         extensions are iframes in iframes and we need to use a relative address window.parent.
2663         (injectedExtensionAPI.ExtensionViewImpl.dispatchShowEvent):
2664         (injectedExtensionAPI.ExtensionViewImpl):
2665         (injectedExtensionAPI.ExtensionServerClient):
2666         WebKit/chromium/scripts/generate_devtools_extension_api.py:
2667         The current number of frames is used in a dynamically created identifier. Again we replace 'top' by 
2668         window.parent.
2669
2670 2012-07-27  Vivek Galatage  <vivekgalatage@gmail.com>
2671
2672         Web Inspector: InspectorPageAgent should ascertain document to be non-null in updateViewMetrics()
2673         https://bugs.webkit.org/show_bug.cgi?id=92476
2674
2675         Reviewed by Pavel Feldman.
2676
2677         InspectorPageAgent should check for document object being null. As pages created with blank URL might
2678         not have the document object, this causes a crash.
2679
2680         No new tests as added null check.
2681
2682         * inspector/InspectorPageAgent.cpp:
2683         (WebCore::InspectorPageAgent::updateViewMetrics):
2684
2685 2012-07-27  Mike West  <mkwst@chromium.org>
2686
2687         CSP directives containing invalid characters should log an error.
2688         https://bugs.webkit.org/show_bug.cgi?id=92487
2689
2690         Reviewed by Adam Barth.
2691
2692         Unknown directive names are currently logged, but we exit the directive
2693         parser early without logging if we hit an invalid character inside a
2694         directive. `script-src: ...`, for example, was ignored without letting
2695         the developer know what happened. This patch changes that behavior,
2696         logging the whole name (in this case `script-src:`) as an unknown
2697         directive.
2698
2699         Test: http/tests/security/contentSecurityPolicy/directive-parsing-04.html
2700
2701         * page/ContentSecurityPolicy.cpp:
2702         (WebCore::CSPDirectiveList::parseDirective):
2703
2704 2012-07-27  No'am Rosenthal  <noam.rosenthal@nokia.com>
2705
2706         [Texmap] Performance regression in texture uploads after r121223
2707         https://bugs.webkit.org/show_bug.cgi?id=91897
2708
2709         Reviewed by Jocelyn Turcotte.
2710
2711         Rolling out r121223, with some conflict fixes.
2712
2713         * platform/graphics/texmap/TextureMapperGL.cpp:
2714         (WebCore::swizzleBGRAToRGBA):
2715         (WebCore):
2716         (WebCore::driverSupportsBGRASwizzling):
2717         (WebCore::BitmapTextureGL::didReset):
2718         (WebCore::BitmapTextureGL::updateContents):
2719
2720 2012-07-27  Joe Mason  <jmason@rim.com>
2721
2722         [BlackBerry] Update NetworkJob::sendRequestWithCredentials to use new getProxyAddress API
2723         https://bugs.webkit.org/show_bug.cgi?id=92457
2724
2725         Reviewed by Yong Li.
2726
2727         getProxyAddress now returns "host:port", and getProxyPort is gone. Update NetworkJob to use
2728         the new interface.
2729
2730         RIM PR: 176166
2731         Internally reviewed by Jonathan Dong <jonathan.dong@torchmobile.com.cn>
2732
2733         * platform/network/blackberry/NetworkJob.cpp:
2734         (WebCore::NetworkJob::sendRequestWithCredentials):
2735
2736 2012-07-27  Kevin Ellis  <kevers@chromium.org>
2737
2738         Improve touch adjustment for targetting small controls.
2739         https://bugs.webkit.org/show_bug.cgi?id=92293
2740
2741         Reviewed by Antonio Gomes.
2742
2743         Modifies the touch adjustment algorithm to better discriminate small targets without introducing
2744         a bias towards shorter links.  The revised scoring algorihtm uses a normalized distance to
2745         center-line score and a normalized overlap score.  The better of the two scores is used for
2746         determining the best candidate for target adjustment.  The center-line score works well
2747         for discriminating elements with partial overlaps, where relying solely on percent overlap
2748         could bias towards the smaller element.  Conversely, a high percentage in overlap provides a 
2749         strong measure of confidence in a candidate target.  An additonal tie-break algorithm is
2750         introduced to minimize the adjustment distance if two equally suitable candidates are found.
2751
2752         Test: touchadjustment/small-target-test.html
2753
2754         * page/TouchAdjustment.cpp:
2755         (TouchAdjustment):
2756         (WebCore::TouchAdjustment::nodeRespondsToTapGesture):
2757         (WebCore::TouchAdjustment::hybridDistanceFunction):
2758         (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
2759         (WebCore::findBestClickableCandidate):
2760
2761 2012-07-27  Kevin Ellis  <kevers@chromium.org>
2762
2763         [chromium] Calendar for input type=date should be larger on devices that support touch input.
2764         https://bugs.webkit.org/show_bug.cgi?id=92424
2765
2766         Reviewed by Kent Tamura.
2767
2768         Adds touch specific CSS rules to enlarge entries in the calendar on
2769         screens that support touch input.
2770
2771         Manually tested with touch support enabled/disabled.
2772
2773         * Resources/calendarPicker.css:
2774         (@media (pointer:coarse)):
2775         * html/shadow/CalendarPickerElement.cpp:
2776         (WebCore::CalendarPickerElement::contentSize):
2777
2778 2012-07-28  Chris Fleizach  <cfleizach@apple.com>
2779
2780         WebKit should expose @title as label (AXTitle or AXDescription) sometimes instead of AXHelp, according to the ARIA text alt computation
2781         https://bugs.webkit.org/show_bug.cgi?id=91911
2782
2783         Reviewed by Darin Adler.
2784
2785         Update comments around code to explain rationale.
2786
2787         * accessibility/AccessibilityRenderObject.cpp:
2788         (WebCore::AccessibilityRenderObject::helpText):
2789         (WebCore::AccessibilityRenderObject::accessibilityDescription):
2790
2791 2012-07-27  Zoltan Horvath  <zoltan@webkit.org>
2792
2793         Add runtime flag to enable/disable JS memory information
2794         https://bugs.webkit.org/show_bug.cgi?id=92479
2795
2796         Reviewed by Simon Hausmann.
2797
2798         We need console.memory JS object to be accessible because of the memory consumption
2799         measurements of the performance tests, so I added a toggle to InternalSettings.
2800
2801         * testing/InternalSettings.cpp:
2802         (WebCore::InternalSettings::setMemoryInfoEnabled):
2803         (WebCore):
2804         * testing/InternalSettings.h:
2805         (InternalSettings):
2806         * testing/InternalSettings.idl:
2807
2808 2012-07-27  Arko Saha  <arko@motorola.com>
2809
2810         Microdata: Remove toJs() and toV8Object() custom methods from JSHTMLElementCustom.cpp and V8HTMLElementCustom.cpp respectively.
2811         https://bugs.webkit.org/show_bug.cgi?id=92482
2812
2813         Reviewed by Kentaro Hara.
2814
2815         Removed custom methods toJS() and toV8Object(). We should use toJS() method defined in
2816         JSMicroDataItemValueCustom.cpp and toV8() method defined in V8MicroDataItemValueCustom.cpp
2817         in place of custom toJs() and toV8Object().
2818
2819         Existing tests :
2820                 fast/dom/MicroData/itemvalue-reflects-data-attr-on-object-element.html
2821                 fast/dom/MicroData/itemvalue-reflects-href-attr.html
2822                 fast/dom/MicroData/itemvalue-reflects-src-attribute-on-img-element.html
2823                 fast/dom/MicroData/itemvalue-reflects-the-content-attr-on-meta-element.html
2824                 fast/dom/MicroData/itemvalue-reflects-the-src-attr.html
2825                 fast/dom/MicroData/itemvalue-returns-element-itself.html
2826                 fast/dom/MicroData/itemvalue-returns-null.html
2827                 fast/dom/MicroData/itemvalue-throws-excpetion-onsetting-001.html
2828                 fast/dom/MicroData/itemvalue-throws-excpetion-onsetting-002.html
2829
2830         * bindings/js/JSHTMLElementCustom.cpp:
2831         (WebCore):
2832         * bindings/v8/custom/V8HTMLElementCustom.cpp:
2833         (WebCore):
2834         (WebCore::V8HTMLElement::itemValueAccessorGetter):
2835
2836 2012-07-27  Thiago Marcos P. Santos  <thiago.santos@intel.com>
2837
2838         REGRESSION(r123856): Breaks the build when disabling inspector
2839         https://bugs.webkit.org/show_bug.cgi?id=92493
2840
2841         Reviewed by Kentaro Hara.
2842
2843         * bindings/js/ScriptGCEvent.h:
2844         (WebCore):
2845         * bindings/v8/ScriptGCEvent.h:
2846         (WebCore):
2847
2848 2012-07-27  Christophe Dumez  <christophe.dumez@intel.com>
2849
2850         [EFL][WK2] Add API to Ewk_Cookie_Manager to watch for cookie changes
2851         https://bugs.webkit.org/show_bug.cgi?id=92484
2852
2853         Reviewed by Kenneth Rohde Christiansen.
2854
2855         Make use of soup/CookieStorageSoup.cpp for EFL port instead
2856         of defining empty implementations for cookie storage
2857         functions.
2858
2859         No new tests, no behavior change.
2860
2861         * PlatformEfl.cmake:
2862         * platform/efl/TemporaryLinkStubs.cpp:
2863
2864 2012-07-27  Keishi Hattori  <keishi@webkit.org>
2865
2866         Replace ColorChooserClient::elementRectRelativeToWindow with elementRectRelativeToRootView
2867         https://bugs.webkit.org/show_bug.cgi?id=92488
2868
2869         Reviewed by Kent Tamura.
2870
2871         Changing ColorChooserClient interface to return element rectangle that is relative to root view instead of window.
2872
2873         No new tests. Method is not used yet.
2874
2875         * html/ColorInputType.cpp:
2876         (WebCore::ColorInputType::elementRectRelativeToRootView): Replaced elementRectRelativeToWindow. Returns element rectangle relative to root view.
2877         * html/ColorInputType.h:
2878         (ColorInputType):
2879         * platform/ColorChooserClient.h:
2880         (ColorChooserClient):
2881
2882 2012-07-27  Dominik Röttsches  <dominik.rottsches@intel.com>
2883
2884         [Cairo] Add complex font drawing using HarfbuzzNG
2885         https://bugs.webkit.org/show_bug.cgi?id=91864
2886
2887         Reviewed by Simon Hausmann and Martin Robinson.
2888
2889         Adding Harfbuzz support to EFL by implementing it with the help of cairo and cairo-ft.
2890         Reusing Chromium's Harfbuzz-NG support.
2891
2892         No new tests, complex font support is covered by existing tests.
2893
2894         * CMakeLists.txt: Adding new cairo based implementations, removing emtpy FontEfl.cpp
2895         * WebCore.gypi: Removing FontEfl.cpp
2896         * platform/graphics/cairo/FontCairoHarfbuzzNG.cpp: Added. New implementation that implements cairo & harfbuzz-ng based complex font drawing.
2897         (WebCore):
2898         (WebCore::Font::drawComplexText):
2899         (WebCore::Font::drawEmphasisMarksForComplexText):
2900         (WebCore::Font::canReturnFallbackFontsForComplexText):
2901         (WebCore::Font::canExpandAroundIdeographsInComplexText):
2902         (WebCore::Font::floatWidthForComplexText):
2903         (WebCore::Font::offsetForPositionForComplexText):
2904         (WebCore::Font::selectionRectForComplexText):
2905         * platform/graphics/efl/FontEfl.cpp: Removed.
2906         * platform/graphics/freetype/FontPlatformData.h: Adding a getter that retrieves a harfbuzz face.
2907         (FontPlatformData):
2908         * platform/graphics/freetype/FontPlatformDataFreeType.cpp: Adding a getter that retrieves a harfbuzz face.
2909         (WebCore::FontPlatformData::operator=):
2910         (WebCore::FontPlatformData::FontPlatformData):
2911         (WebCore):
2912         (WebCore::FontPlatformData::harfbuzzFace):
2913         * platform/graphics/harfbuzz/ng/HarfBuzzNGFaceCairo.cpp: Added. Cairo-freetype based approach to get complex font metrics.
2914         (WebCore):
2915         (CairoFtFaceLocker):
2916         (WebCore::CairoFtFaceLocker::CairoFtFaceLocker):
2917         (WebCore::CairoFtFaceLocker::lock):
2918         (WebCore::CairoFtFaceLocker::~CairoFtFaceLocker):
2919         (WebCore::floatToHarfBuzzPosition):
2920         (WebCore::doubleToHarfBuzzPosition):
2921         (WebCore::CairoGetGlyphWidthAndExtents):
2922         (WebCore::harfbuzzGetGlyph):
2923         (WebCore::harfbuzzGetGlyphHorizontalAdvance):
2924         (WebCore::harfbuzzGetGlyphHorizontalOrigin):
2925         (WebCore::harfbuzzGetGlyphExtents):
2926         (WebCore::harfbuzzCairoTextGetFontFuncs):
2927         (WebCore::harfbuzzCairoGetTable):
2928         (WebCore::HarfBuzzNGFace::createFace):
2929         (WebCore::HarfBuzzNGFace::createFont):
2930         (WebCore::HarfBuzzShaper::createGlyphBufferAdvance):
2931
2932 2012-07-27  Adam Barth  <abarth@webkit.org>
2933
2934         Add a Setting to expose quantized, rate-limited MemoryInfo values
2935         https://bugs.webkit.org/show_bug.cgi?id=80444
2936
2937         Reviewed by Eric Seidel.
2938
2939         We do not currently expose real MemoryInfo objects to the web unless
2940         the user opts in because we're worried that this memory information
2941         could be used in side-channel attacks.
2942
2943         We've gotten feedback from a number of web app developers that this
2944         information is very useful in tracking the performance of their
2945         applications.  These developers use the setting in their testing labs
2946         and regression harnesses to catch memory leaks and regressiosn early in
2947         their development cycle.
2948
2949         Some of these developers have experimented with enabling this feature
2950         within their enterprise and have found the memory data from the field
2951         extremely useful in tracking down memory issues that slip through their
2952         testing.
2953
2954         Based on this experience, they've asked whether we can enable this
2955         functionality on a wider scale so they catch even more problems
2956         including problems that don't manifest within their enterprise.
2957         Because we're still worried about side-channel attacks, we don't want
2958         to expose the raw data, so we've talked with these folks in more detail
2959         to understand what information they find most valuable.
2960
2961         This patch is the result of those discussions.  In particular, this
2962         patch adds an option to expose quantized and rate-limited memory
2963         information to web pages.  Web pages can only learn new data every 20
2964         minutes, which helps mitigate attacks where the attacker compares two
2965         or readings to extract side-channel information.  The patch also only
2966         reports 100 distinct memory values, which (combined with the rate
2967         limts) makes it difficult for attackers to learn about small changes in
2968         memory use.
2969
2970         * page/MemoryInfo.cpp:
2971         (WebCore):
2972         (HeapSizeCache):
2973         (WebCore::HeapSizeCache::HeapSizeCache):
2974         (WebCore::HeapSizeCache::getCachedHeapSize):
2975         (WebCore::HeapSizeCache::maybeUpdate):
2976         (WebCore::HeapSizeCache::update):
2977         (WebCore::HeapSizeCache::quantize):
2978         (WebCore::MemoryInfo::MemoryInfo):
2979         * page/Settings.cpp:
2980         (WebCore::Settings::Settings):
2981         * page/Settings.h:
2982         (WebCore::Settings::setQuantizedMemoryInfoEnabled):
2983         (WebCore::Settings::quantizedMemoryInfoEnabled):
2984         (Settings):
2985
2986 2012-07-27  Vsevolod Vlasov  <vsevik@chromium.org>
2987
2988         Web Inspector: Move formatting support from JavaScriptSource to UISourceCode.
2989         https://bugs.webkit.org/show_bug.cgi?id=92373
2990
2991         Reviewed by Pavel Feldman.
2992
2993         Moved formatting support from JavaScriptSource to UISourceCode.
2994         Extracted Formatter interface from ScriptFormatter and created IdentityFormatter
2995         implememntation and Formatter.createFormatter(contentType) formatter factory.
2996         Introduced virtual formattedChanged() method on UISourceCode.
2997
2998         * inspector/front-end/JavaScriptSource.js:
2999         (WebInspector.JavaScriptSource):
3000         (WebInspector.JavaScriptSource.prototype.uiLocationToRawLocation):
3001         (WebInspector.JavaScriptSource.prototype.breakpointStorageId):
3002         (WebInspector.JavaScriptSource.prototype.searchInContent):
3003         (WebInspector.JavaScriptSource.prototype.formattedChanged):
3004         * inspector/front-end/ScriptFormatter.js:
3005         (WebInspector.Formatter):
3006         (WebInspector.Formatter.createFormatter):
3007         (WebInspector.Formatter.locationToPosition):
3008         (WebInspector.Formatter.positionToLocation):
3009         (WebInspector.Formatter.prototype.formatContent):
3010         (WebInspector.ScriptFormatter):
3011         (WebInspector.IdentityFormatter):
3012         (WebInspector.IdentityFormatter.prototype.formatContent):
3013         (WebInspector.FormatterSourceMappingImpl.prototype.originalToFormatted):
3014         (WebInspector.FormatterSourceMappingImpl.prototype.formattedToOriginal):
3015         * inspector/front-end/UISourceCode.js:
3016         (WebInspector.UISourceCode):
3017         (WebInspector.UISourceCode.prototype.requestContent):
3018         (WebInspector.UISourceCode.prototype._fireContentAvailable):
3019         (WebInspector.UISourceCode.prototype.uiLocationToRawLocation):
3020         (WebInspector.UISourceCode.prototype.overrideLocation):
3021         (WebInspector.UISourceCode.prototype.togglingFormatter):
3022         (WebInspector.UISourceCode.prototype.formatted):
3023         (WebInspector.UISourceCode.prototype.setFormatted.if):
3024         (WebInspector.UISourceCode.prototype.setFormatted.didGetContent.formattedChanged):
3025         (WebInspector.UISourceCode.prototype.setFormatted.didGetContent):
3026         (WebInspector.UISourceCode.prototype.setFormatted):
3027         (WebInspector.UISourceCode.prototype.createFormatter):
3028         (WebInspector.UISourceCode.prototype.formattedChanged):
3029
3030 2012-07-27  Vivek Galatage  <vivekgalatage@gmail.com>
3031
3032         Page object should ascertain EditorClient to be non-null
3033         https://bugs.webkit.org/show_bug.cgi?id=92458
3034
3035         Reviewed by Ryosuke Niwa.
3036
3037         The EditorClient should always be available in Page object. Added the assertion to ascertain this.
3038
3039         No new tests. Added assertion to make sure EditorClient always exist.
3040
3041         * page/Page.cpp:
3042         (WebCore::Page::Page):
3043
3044 2012-07-27  Huang Dongsung  <luxtella@company100.net>
3045
3046         Gather the duplicated timer code into CachedResource.
3047         https://bugs.webkit.org/show_bug.cgi?id=92332
3048
3049         Reviewed by Nate Chapin.
3050
3051         Internal review by Jae Hyun Park.
3052
3053         When all clients are removed, CachedImage, CachedScript and CachedCSSStyleSheet
3054         start the timer to destroy decoded data. Those three classes have their own
3055         timer.
3056         Changed CachedCSSStyleSheet::didAddClient to call super class method in order to
3057         stop the timer. This change does not have any side effect because
3058         CachedResource::didAddClient only stops the timer in this case.
3059
3060         No new tests - no new testable functionality.
3061
3062         * loader/cache/CachedCSSStyleSheet.cpp:
3063         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
3064         (WebCore::CachedCSSStyleSheet::didAddClient):
3065         * loader/cache/CachedCSSStyleSheet.h:
3066         (CachedCSSStyleSheet):
3067         * loader/cache/CachedImage.cpp:
3068         (WebCore::CachedImage::CachedImage):
3069         (WebCore::CachedImage::didAddClient):
3070         (WebCore::CachedImage::allClientsRemoved):
3071         * loader/cache/CachedImage.h:
3072         (CachedImage):
3073         * loader/cache/CachedResource.cpp:
3074         (WebCore::CachedResource::CachedResource):
3075         (WebCore::CachedResource::didAddClient):
3076         (WebCore::CachedResource::removeClient):
3077         (WebCore::CachedResource::destroyDecodedDataIfNeeded):
3078         (WebCore):
3079         (WebCore::CachedResource::decodedDataDeletionTimerFired):
3080         * loader/cache/CachedResource.h:
3081         (CachedResource):
3082         * loader/cache/CachedScript.cpp:
3083         (WebCore::CachedScript::CachedScript):
3084         * loader/cache/CachedScript.h:
3085         (CachedScript):
3086
3087 2012-07-27  Huang Dongsung  <luxtella@company100.net>
3088
3089         Gather the duplicated timer code into CachedResource.
3090         https://bugs.webkit.org/show_bug.cgi?id=92332
3091
3092         Reviewed by Nate Chapin.
3093
3094         Internal review by Jae Hyun Park.
3095
3096         When all clients are removed, CachedImage, CachedScript and CachedCSSStyleSheet
3097         start the timer to destroy decoded data. Those three classes have their own
3098         timer.
3099         Changed CachedCSSStyleSheet::didAddClient to call super class method in order to
3100         stop the timer. This change does not have any side effect because
3101         CachedResource::didAddClient only stops the timer in this case.
3102
3103         No new tests - no new testable functionality.
3104
3105         * loader/cache/CachedCSSStyleSheet.cpp:
3106         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
3107         (WebCore::CachedCSSStyleSheet::didAddClient):
3108         * loader/cache/CachedCSSStyleSheet.h:
3109         (CachedCSSStyleSheet):
3110         * loader/cache/CachedImage.cpp:
3111         (WebCore::CachedImage::CachedImage):
3112         (WebCore::CachedImage::didAddClient):
3113         (WebCore::CachedImage::allClientsRemoved):
3114         * loader/cache/CachedImage.h:
3115         (CachedImage):
3116         * loader/cache/CachedResource.cpp:
3117         (WebCore::CachedResource::CachedResource):
3118         (WebCore::CachedResource::didAddClient):
3119         (WebCore::CachedResource::removeClient):
3120         (WebCore::CachedResource::destroyDecodedDataIfNeeded):
3121         (WebCore):
3122         (WebCore::CachedResource::decodedDataDeletionTimerFired):
3123         * loader/cache/CachedResource.h:
3124         (CachedResource):
3125         * loader/cache/CachedScript.cpp:
3126         (WebCore::CachedScript::CachedScript):
3127         * loader/cache/CachedScript.h:
3128         (CachedScript):
3129
3130 2012-07-27  Dana Jansens  <danakj@chromium.org>
3131
3132         [chromium] Don't add a HUD layer when there is no rootLayer
3133         https://bugs.webkit.org/show_bug.cgi?id=92442
3134
3135         Reviewed by Adrienne Walker.
3136
3137         When the compositor is shutting down in threaded mode, it does a commit
3138         without a root layer. We should not try stick the hud layer onto the
3139         null root layer.
3140
3141         * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
3142         (WebCore::CCLayerTreeHost::willCommit):
3143
3144 2012-07-27  Alec Flett  <alecflett@chromium.org>
3145
3146         IndexedDB: inject index keys on cursor/objectstore/index get success handlers
3147         https://bugs.webkit.org/show_bug.cgi?id=91123
3148
3149         Reviewed by Tony Chang.
3150
3151         Move key-injection into the frontend, by injecting the key into
3152         the value on get rather than set for autoincremented keys. This
3153         gives a potential performance win by avoiding an IPC call to the
3154         V8 utility process on chromium, and generally cleans up the key
3155         management.
3156
3157         Note that this duplicates the logic of generateIndexKeys into the
3158         frontend until that method can be expunged from the backend. This
3159         will be cleaned up in a later patch.
3160
3161         In order to account for both old data (which has the duplicate
3162         primary key already injected and serialized) and any new data, an
3163         assertion was removed from IDBBindingUtilities.
3164
3165         This also includes some minor refactoring such as the deprecation
3166         of IDBCursorBackendInterface::update in favor of a direct call to
3167         IDBObjectStoreBackendImpl::put, and removal of the now-defunct
3168         IDBBackingStore::getObjectViaIndex.
3169
3170         Tests: storage/indexdb/index-duplicate-keypaths.html
3171
3172         * Modules/indexeddb/IDBBackingStore.h:
3173         (IDBBackingStore):
3174         * Modules/indexeddb/IDBCursor.cpp:
3175         (WebCore::IDBCursor::update):
3176         (WebCore::IDBCursor::setValueReady):
3177         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
3178         (WebCore::IDBCursorBackendImpl::update):
3179         * Modules/indexeddb/IDBIndexBackendImpl.cpp:
3180         (WebCore::IDBIndexBackendImpl::getInternal):
3181         * Modules/indexeddb/IDBLevelDBBackingStore.cpp:
3182         * Modules/indexeddb/IDBLevelDBBackingStore.h:
3183         (IDBLevelDBBackingStore):
3184         * Modules/indexeddb/IDBObjectStore.cpp:
3185         (WebCore::generateIndexKeysForValue):
3186         (WebCore):
3187         (WebCore::IDBObjectStore::add):
3188         (WebCore::IDBObjectStore::put):
3189         * Modules/indexeddb/IDBObjectStore.h:
3190         (IDBObjectStore):
3191         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
3192         (WebCore::IDBObjectStoreBackendImpl::put):
3193         (WebCore::IDBObjectStoreBackendImpl::putWithIndexKeys):
3194         (WebCore):
3195         (WebCore::IDBObjectStoreBackendImpl::putInternal):
3196         * Modules/indexeddb/IDBRequest.cpp:
3197         (WebCore::IDBRequest::onSuccess):
3198         * bindings/v8/IDBBindingUtilities.cpp:
3199         (WebCore):
3200
3201 2012-07-27  Tony Chang  <tony@chromium.org>
3202
3203         changing -webkit-order should change the paint order of flex items
3204         https://bugs.webkit.org/show_bug.cgi?id=92041
3205
3206         Reviewed by Ojan Vafai.
3207
3208         Override paintChildren and use the flex order iterator to determine the order to paint the children.
3209
3210         Test: css3/flexbox/order-painting.html
3211
3212         * rendering/RenderFlexibleBox.cpp:
3213         (WebCore::RenderFlexibleBox::layoutBlock): Save a reference to the order iterator.
3214         (WebCore::RenderFlexibleBox::paintChildren):
3215         * rendering/RenderFlexibleBox.h:
3216         (RenderFlexibleBox): Hold a reference to the order iterator so we don't have to recreate it at paint time.
3217             Also mark all the virtual methods with OVERRIDE.
3218
3219 2012-07-26  Sheriff Bot  <webkit.review.bot@gmail.com>
3220
3221         Unreviewed, rolling out r123820.
3222         http://trac.webkit.org/changeset/123820
3223         https://bugs.webkit.org/show_bug.cgi?id=92465
3224
3225         It made all tests crash on all port (Requested by Ossy_home on
3226         #webkit).
3227
3228         * dom/EventNames.cpp:
3229         (WebCore):
3230
3231 2012-07-26  Ryosuke Niwa  <rniwa@webkit.org>
3232
3233         Qt build fix after r123788. Fixed the typo.
3234
3235         * xml/parser/XMLDocumentParserQt.cpp:
3236         (WebCore::handleElementAttributes):
3237
3238 2012-07-26  Hironori Bono  <hbono@chromium.org>
3239
3240         [Qt] Build fix for Qt after r123811
3241         https://bugs.webkit.org/show_bug.cgi?id=92460
3242
3243         Reviewed by Ryosuke Niwa.
3244
3245         This change explicitly converts from AtomicString to String to avoid ambiguities
3246         when compiling HTMLAppletWidget.cpp on Qt.
3247
3248         No new tests because it is a build fix.
3249
3250         * html/HTMLAppletElement.cpp:
3251         (WebCore::HTMLAppletElement::updateWidget):
3252
3253 2012-07-26  Mike Lawther  <mikelawther@chromium.org>
3254
3255         Make transitions work between different Length types
3256         https://bugs.webkit.org/show_bug.cgi?id=92220
3257
3258         Reviewed by Simon Fraser.
3259
3260         Use the existing CSS calc machinery for blending between two calculations
3261         to blend between two Lengths of differing types.
3262
3263         Test: transitions/mixed-type.html
3264
3265         * platform/Length.cpp:
3266         (WebCore::Length::blendMixedTypes):
3267         * platform/Length.h:
3268         (WebCore::Length::blend):
3269         (Length):
3270
3271 2012-07-26  Dan Bernstein  <mitz@apple.com>
3272
3273         Blocks with reverse column progression don’t have layout overflow for overflowing columns
3274         https://bugs.webkit.org/show_bug.cgi?id=92440
3275
3276         Reviewed by Sam Weinig.
3277
3278         Test: fast/multicol/progression-reverse-overflow.html
3279
3280         * rendering/RenderBox.cpp:
3281         (WebCore::RenderBox::addLayoutOverflow): If column progression is reversed, then allow
3282         layout overflow to go in the opposite direction than it would normally be allowed to go.
3283         For example, in a block with writing-mode: horizontal-tb, direction: ltr and
3284         column-progression: reverse, columns overflow to the left, so layout overflow would go on
3285         the left.
3286
3287 2012-07-26  Keishi Hattori  <keishi@webkit.org>
3288
3289         Implement ColorSuggestionPicker page popup
3290         https://bugs.webkit.org/show_bug.cgi?id=92109
3291
3292         Reviewed by Kent Tamura.
3293
3294         Implements ColorSuggestionPicker page popup. This will be used in
3295         certain ports as the datalist UI for <input type=color>.
3296
3297         No new tests because there is no way to open the popup yet.
3298
3299         * Resources/colorSuggestionPicker.css: Added.
3300         (body):
3301         (#main):
3302         (.color-swatch):
3303         (.color-swatch:hover):
3304         (.color-swatch-container):
3305         (.other-color):
3306         * Resources/colorSuggestionPicker.js: Added.
3307         (getScrollbarWidth):When there are more than 20 colors we need to
3308         increase the window width to accommodate the scroll bar.
3309         (createElement):
3310         (handleMessage):
3311         (initialize):
3312         (handleArgumentsTimeout):
3313         (validateArguments):
3314         (submitValue): Calls setValueAndClosePopup with a numValue of 0.
3315         (handleCancel): Calls setValueAndClosePopup with a numValue of -1.
3316         (chooseOtherColor): Calls setValueAndClosePopup with a numValue of -2.
3317         (ColorPicker):
3318         (ColorPicker.prototype._layout): Lays out the color swatches in a 5x4
3319         grid.
3320         (ColorPicker.prototype._handleSwatchClick):
3321         * WebCore.gyp/WebCore.gyp: Added ColorSuggestionPicker action.
3322         * make-file-arrays.py:
3323         (main): Windows gets confused when "&&" is in the command, so we will replace " AND " with " && " internally.
3324
3325 2012-07-26  Anish Bhayani  <anish.bhayani@gmail.com>
3326
3327         De-virtualize WrapShape classes
3328         https://bugs.webkit.org/show_bug.cgi?id=90998
3329
3330         Reviewed by Andreas Kling.
3331
3332         The destructor for WrapShapes classes did not need to use a virtual
3333         pointer. WrapShapes.cpp is created to cast the WrapShape destructor 
3334         to the subclass type saving memory and avoiding virtual calls. 
3335
3336         There are existing tests that cover the validity of shapes. The
3337         added changes merely change the destructor of the shape objects
3338         which is also tested by LayoutTests/fast/exclusions.
3339
3340         * CMakeLists.txt:
3341         * GNUmakefile.list.am:
3342         * Target.pri:
3343         * WebCore.gypi:
3344         * WebCore.vcproj/WebCore.vcproj:
3345         * WebCore.xcodeproj/project.pbxproj:
3346         * rendering/style/WrapShapes.cpp: Added.
3347         (WebCore):
3348         (WebCore::WrapShape::destroy):
3349         * rendering/style/WrapShapes.h:
3350         (WebCore::WrapShape::deref):
3351         (WrapShape):
3352         (WebCore::WrapShape::type):
3353         (WebCore::WrapShape::setType):
3354         (WrapShapeRectangle):
3355         (WebCore::WrapShapeRectangle::WrapShapeRectangle):
3356         (WebCore::WrapShapeCircle::WrapShapeCircle):
3357         (WebCore::WrapShapeEllipse::WrapShapeEllipse):
3358         (WebCore::WrapShapePolygon::WrapShapePolygon):
3359         (WrapShapePolygon):
3360
3361 2012-07-26  Sheriff Bot  <webkit.review.bot@gmail.com>
3362
3363         Unreviewed, rolling out r123808.
3364         http://trac.webkit.org/changeset/123808
3365         https://bugs.webkit.org/show_bug.cgi?id=92443
3366
3367         Broke Apple Mac debug tests ASSERTION FAILED: !hasClients()
3368         (Requested by msaboff_ on #webkit).
3369
3370         * loader/cache/CachedCSSStyleSheet.cpp:
3371         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
3372         (WebCore::CachedCSSStyleSheet::didAddClient):
3373         (WebCore::CachedCSSStyleSheet::allClientsRemoved):
3374         (WebCore::CachedCSSStyleSheet::decodedDataDeletionTimerFired):
3375         (WebCore):
3376         * loader/cache/CachedCSSStyleSheet.h:
3377         (CachedCSSStyleSheet):
3378         * loader/cache/CachedImage.cpp:
3379         (WebCore::CachedImage::CachedImage):
3380         (WebCore::CachedImage::decodedDataDeletionTimerFired):
3381         (WebCore):
3382         (WebCore::CachedImage::didAddClient):
3383         (WebCore::CachedImage::allClientsRemoved):
3384         * loader/cache/CachedImage.h:
3385         (CachedImage):
3386         * loader/cache/CachedResource.cpp:
3387         (WebCore::CachedResource::CachedResource):
3388         (WebCore::CachedResource::didAddClient):
3389         (WebCore::CachedResource::removeClient):
3390         * loader/cache/CachedResource.h:
3391         (CachedResource):
3392         * loader/cache/CachedScript.cpp:
3393         (WebCore::CachedScript::CachedScript):
3394         (WebCore::CachedScript::didAddClient):
3395         (WebCore):
3396         (WebCore::CachedScript::allClientsRemoved):
3397         (WebCore::CachedScript::decodedDataDeletionTimerFired):
3398         * loader/cache/CachedScript.h:
3399         (CachedScript):
3400
3401 2012-07-26  Tony Chang  <tony@chromium.org>
3402
3403         [chromium] Remove some unreachable code in ClipboardChromium.cpp
3404         https://bugs.webkit.org/show_bug.cgi?id=92427
3405
3406         Reviewed by Adam Barth.
3407
3408         convertURIListToURL does the same thing (implementation in ClipboardUtilitiesChromium.*).
3409
3410         No new tests, just deleting unused code.
3411
3412         * platform/chromium/ClipboardChromium.cpp:
3413         (WebCore::ClipboardChromium::getData):
3414
3415 2012-07-26  Sukolsak Sakshuwong  <sukolsak@google.com>
3416
3417         Implement undoscope attribute.
3418         https://bugs.webkit.org/show_bug.cgi?id=88793
3419
3420         Reviewed by Ryosuke Niwa.
3421
3422         undoscope attribute support as specified at
3423         http://dvcs.w3.org/hg/undomanager/raw-file/tip/undomanager.html
3424
3425         Test: editing/undomanager/undoscope-attribute.html
3426
3427         * Target.pri:
3428         * WebCore.gypi:
3429         * WebCore.vcproj/WebCore.vcproj:
3430         * dom/Document.cpp:
3431         (WebCore::Document::~Document):
3432         * dom/Element.cpp:
3433         (WebCore):
3434         (WebCore::Element::undoScope):
3435         (WebCore::Element::setUndoScope):
3436         (WebCore::Element::undoManager):
3437         (WebCore::Element::disconnectUndoManager):
3438         (WebCore::Element::disconnectUndoManagersInSubtree):
3439         * dom/Element.h:
3440         (Element):
3441         * dom/Element.idl:
3442         * dom/ElementRareData.h:
3443         (ElementRareData):
3444         * editing/UndoManager.cpp:
3445         (WebCore::UndoManager::disconnect):
3446         (WebCore::UndoManager::transact):
3447         (WebCore::UndoManager::undo):
3448         (WebCore::UndoManager::redo):
3449         (WebCore::UndoManager::clearUndo):
3450         (WebCore):
3451         (WebCore::UndoManager::clearRedo):
3452         (WebCore::UndoManager::clearUndoRedo):
3453         (WebCore::UndoManager::isConnected):
3454         * editing/UndoManager.h:
3455         (WebCore):
3456         (UndoManager):
3457         (WebCore::UndoManager::length):
3458         * editing/UndoManager.idl:
3459         * html/HTMLAttributeNames.in:
3460         * html/HTMLElement.cpp:
3461         (WebCore::HTMLElement::parseAttribute):
3462         (WebCore::HTMLElement::setContentEditable):
3463
3464 2012-07-26  Yoshifumi Inoue  <yosin@chromium.org>
3465
3466         [Forms] Introduce runtime feature flags for input type datetime, datetimelocal, month, time, week
3467         https://bugs.webkit.org/show_bug.cgi?id=92339
3468
3469         Reviewed by Kent Tamura.
3470
3471         To detect compilation errors and test failure earlier, I would like
3472         build and run tests for input type datetime, datetime-local, month,
3473         time and week with runtime feature flags to avoid behavior changes
3474         other than test shell.
3475
3476         This patch adds runtime features for input types, datetime, datetime-local,
3477         month, time and week and integrates them into InputType::createInputTypeFactoryMap
3478         to follow runtime feature flags.
3479
3480         At this time, these runtime features are enabled by default for all
3481         ports define ENABLE_INPUT_TYPE_XXX except for Chromium port other than
3482         Android. I'll remove these #if after I update Chromium browser for
3483         disabling them for non-Android.
3484
3485         No new tests. Enabling disabled tests (fast/forms/datetime, fast/forms/dattimelocal,
3486         fast/forms/month, fast/forms/time, fast/forms/week)
3487
3488         * bindings/generic/RuntimeEnabledFeatures.cpp: Added initializations of
3489         variables for runtime features of input types.
3490         * bindings/generic/RuntimeEnabledFeatures.h:
3491         (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeEnabled): Added.
3492         (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeEnabled): Added.
3493         (WebCore::RuntimeEnabledFeatures::inputTypeDateTimeLocalEnabled): Added.
3494         (WebCore::RuntimeEnabledFeatures::setInputTypeDateTimeLocalEnabled): Added.
3495         (WebCore::RuntimeEnabledFeatures::inputTypeMonthEnabled): Added.
3496         (WebCore::RuntimeEnabledFeatures::setInputTypeMonthEnabled): Added.
3497         (WebCore::RuntimeEnabledFeatures::inputTypeTimeEnabled): Added.
3498         (WebCore::RuntimeEnabledFeatures::setInputTypeTimeEnabled): Added.
3499         (WebCore::RuntimeEnabledFeatures::inputTypeWeekEnabled): Added.
3500         (WebCore::RuntimeEnabledFeatures::setInputTypeWeekEnabled): Added.
3501         * html/InputType.cpp:
3502         (WebCore::createInputTypeFactoryMap): Register input types datetime,
3503         datetime-local, month, time and week if corresponding runtime feature
3504         flag is enabled.
3505         * html/InputType.h: Changed indentation to force building *InputType.cpp for
3506         making Chromium-win bots to be happy.
3507
3508 2012-07-26  Xianzhu Wang  <wangxianzhu@chromium.org>
3509
3510         [Chromium-Android] Don't overlay scrollbars in layout test mode
3511         https://bugs.webkit.org/show_bug.cgi?id=92419
3512
3513         Reviewed by Adam Barth.
3514
3515         No new tests. This fixes failures of existing tests, e.g. css1/box_properties/border.html and many others.
3516
3517         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
3518         (WebCore::ScrollbarThemeChromiumAndroid::usesOverlayScrollbars): Returns false in layout test mode.
3519         (WebCore):
3520         (WebCore::ScrollbarThemeChromiumAndroid::hasThumb): Returns false in layout test mode (to match pixel test expectations).
3521         * platform/chromium/ScrollbarThemeChromiumAndroid.h:
3522         (ScrollbarThemeChromiumAndroid):
3523
3524 2012-07-26  Jeffrey Pfau  <jpfau@apple.com>
3525
3526         Reloading substitute-data/alternate html string for unreachableURL will add an item to the back-forward-history for each reload
3527         https://bugs.webkit.org/show_bug.cgi?id=84041
3528
3529         Reviewed by Brady Eidson.
3530
3531         Previously, loadAlternateHTMLString:baseURL:forUnreachableURL: would insert a new history item, regardless of
3532         the load type of the original frame load. This could cause navigation to a broken website to make back and
3533         forward navigation difficult to use. This change ensures that a reload type makes it through all the way.
3534
3535