Opera Software upstreamed commits

Upstreamed commits in Chromium: 7493, V8: 62, Skia: 12, BoringSSL: 16.

Click message to expand

Chromium

Author Message When
fs
Simplify the CSSParserSelector destructor
Rather than moving the tag history into a Vector and let that perform
the destruction, just iteratively "collapse" the list until it is empty.

Change-Id: If1f6611caeea9b83da58f94e021647a2db0b7daa
Reviewed-on: https://chromium-review.googlesource.com/1107629
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#568900}
mpichlinski
Added missing eventlog_messages dependency in chrome_watcher.
Bug: 854179
Change-Id: Icee4af543850a30116e811f32a16c38b3498bcf2
Reviewed-on: https://chromium-review.googlesource.com/1106145
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Michal Pichlinski <mpichlinski@opera.com>
Cr-Commit-Position: refs/heads/master@{#568832}
mpichlinski
Do not create MediaRouterActionController when Media Router is disabled.
Following change: https://chromium-review.googlesource.com/1026975 disallows
having a control of Chromecast preference in settings, because calling Cast...
after enabling Chromecast preference in runtime without a restart causes a
crash due to missing MediaRouterUIService.

Instead of not creating MediaRouterUIService, do not create
MediaRouterActionController in this service when Media Router is disabled.

Bug: 834719
Change-Id: I218523d631d9050ff27e69915ba098fe21907e25
Reviewed-on: https://chromium-review.googlesource.com/1067817
Commit-Queue: Michal Pichlinski <mpichlinski@opera.com>
Reviewed-by: Derek Cheng <imcheng@chromium.org>
Reviewed-by: Takumi Fujimoto <takumif@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568726}
bratell
[jumbo] interface is a Windows API macro so avoid that name
interface is macro for struct in some Windows headers which
causes problems when Windows headers get exposed to code that
has named variables or functions interface. This happened
with the newly added jumbo support in chrome/browser/extensions.

Bug: 850484
Change-Id: I5d838bad5658bfe97542b32647e182348f63c4cc
Reviewed-on: https://chromium-review.googlesource.com/1106339
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#568492}
bratell
Qualify |storage| namespace in some extensions code
There is both ::extensions::api::storage and ::storage so inside
extensions::api, unless you explicitly write ::storage it's unclear
what namespace is intended.

In jumbo builds, some code ended up in a translation unit where
both storage namespaces were known, so this patch adds ::
to storage to make the code explicit.

There is a code style guideline to not use namespace names that are
also top level namespace for this reason, but it's not easy to
change all extension api namespaces.

Bug: 850484
Change-Id: I1c85fbc9dd3dc8be49d41be25f4886ec98c47926
Reviewed-on: https://chromium-review.googlesource.com/1104678
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568116}
fs
Move common AddOutlineRects implementations to LayoutSVGModelObject
All of the (direct) subclasses of LayoutSVGModelObject (LayoutSVGImage,
LayoutSVGShape and LayoutSVGContainer) have the same implementation of
this method, so we can push it up to the common base class.

Change-Id: Ief6d4502917c87505ddab436a3c005597615c49b
Reviewed-on: https://chromium-review.googlesource.com/1104344
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#568072}
bratell
[gn] Doc: Fix toochain typo and clarify the toolchain syntax.
Change-Id: Ica4288a6984f296958b7f9b812edb07663cec22e
Reviewed-on: https://chromium-review.googlesource.com/1104159
Reviewed-by: Brett Wilson <brettw@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#568046}
fs
Remove unused LayoutObject::AbsoluteElementBoundingBoxRect
Looks like the last caller was removed in
https://codereview.chromium.org/2287433003 .

Change-Id: I2664063bab31fe4983be65cb5c21039a90b73920
Reviewed-on: https://chromium-review.googlesource.com/1104342
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568019}
oscarj
Enable Jumbo for chrome/browser/extension
This commit will enable Jumbo for chrome/browser/extensions.
By enabling and running Jumbo the effort of building is
reduced by 7 times (around 40 CPU minutes on the test computer).

Bug: 850484
Change-Id: Icd42cbbf53dc58d64143c6979ba500d3ec9315c5
Reviewed-on: https://chromium-review.googlesource.com/1101017
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567971}
bratell
Remove aura only files from non-aura content/renderer
Some mostly harmless *_aura* files were included by mistake
in the non-aura build of content/renderer. They turned out to not be
quite so harmless in a jumbo build if combined with the non-aura
version of the same code.

Change-Id: Idfe65638ca16a2e700b485acd67f253073ae5867
Reviewed-on: https://chromium-review.googlesource.com/1102426
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#567961}
oscarj
Rename kDialogWidth constants to make them unique
When building with Jumbo, kDialog in
webui/signin/signin_email_confirmation_dialog.cc and
views/webshare/webshare_target_picker_view.cc conflict.
This commits solves the issue by renaming the constant
to something more file specific.

Bug: 773275
Change-Id: Iea327ab1948297fac97d3e7aaab9cb27a3631a30
Reviewed-on: https://chromium-review.googlesource.com/1102474
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567945}
oscarj
Remove function (chrome/browser/extensions)
The function ProfileForWebContents is defined in both
extension_install_prompt_show_params.cc and
extension_install_prompt.cc. In Jumbo build this causes
a conflict. The function is replaced by a inline statement.

Bug: 850484
Change-Id: I6e8da38fa7c90bc6b53d7c3f770daa3e158d16c2
Reviewed-on: https://chromium-review.googlesource.com/1100462
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567940}
oscarj
Resolve namespace scope issue (chrome/browser/ui)
When building using Jumbo files gets merged.
This results in a conflict with the namespace prefs in
webui/media_router/media_router_webui_message_handler.cc.
This commit solves this by specifying that the global
namespace should be used, by adding the "::" prefix.

Bug: 773275
Change-Id: I504984ef83db8cc23561f1f16ce99cdbee89721e
Reviewed-on: https://chromium-review.googlesource.com/1102419
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567665}
oscarj
Rename enums to avoid conflict (chrome/browser/ui)
The enums ColumnSetType are defined in both
views/passwords/password_pending_view.cc
and views/passwords/password_items_view.cc.
When building using Jumbo both declaration
ends up in the same namespace, causing a
conflict. This commits resolves the issue
by renaming the enums to something more
file specific.

Bug: 773275
Change-Id: I8f48b68df53166e910ab0beaf13ba80af63e40ae
Reviewed-on: https://chromium-review.googlesource.com/1102432
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567661}
fs
Change handling of negative exponents in GenericParseNumber
Rather than enforcing a limit on the smallest exponent, pass all
negative exponents straight to pow(...) and let it deal with it. Per
IEEE754 pow(10, -Inf) should yield 0, and the cast should round properly
for larger negative exponents (smaller than -37.)

Bug: 852785
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iccd80f7e80c8b87c49cd5eedf5e49ad1e9ccc8dc
Reviewed-on: https://chromium-review.googlesource.com/1102329
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567660}
oscarj
Resolve member conflict in enums
In Jumbo build, the member NONE in the enum
VerifyStatus in install_verifier.cc conflicts
with the same member in the enum
Transformation inactivity_log/activity_log.cc.
This commit solves the issues by defining
VerifyStatus as a strongly typed enum.

Bug: 850484
Change-Id: Idc3cab01b96073b20adf6fcd87e01cdf9b02a739
Reviewed-on: https://chromium-review.googlesource.com/1098664
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567168}
oscarj
Remove using-declaration to resolve conflict
When building using Jumbo, the using-declaration
of api::webrtc_logging_private::RequestInfo
results in a conflict, since a declaration of
RequestInfo exists in both api/webrtc_logging_private.h
and api/webrtc_audio_private.h. This commit solves the
conflict by removing the using-declaration.

Bug: 850484
Change-Id: I9bc25994cccdfd2e9ae19ecdacde06ed7780b1b2
Reviewed-on: https://chromium-review.googlesource.com/1098658
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567167}
oscarj
Rename g_shown in bubble delegates for Jumbo build
The function g_shown is defined in every bubble delegate.
When building using Jumbo those functions conflict with
each other. This commit fixes this by renaming the functions
to something more file specific.

Bug: 850484
Change-Id: I9df3a8e90ed77e95649cdb734cc4d7364b5fc310
Reviewed-on: https://chromium-review.googlesource.com/1096945
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567166}
oscarj
Resolve function and variable conflict
When using Jumbo build, there are conflicts between
dashboard_private_api.cc and webstore_private_api.cc.
The conflicts are the variable kUserCancelledError
and the function WebstoreInstallHelperResultToApiResult.
This commit solve the issues by renaming the variable and
function to something more file specific.

Bug: 850484
Change-Id: I600a036505ef731124ac6e4c3ea2f750a50ccad5
Reviewed-on: https://chromium-review.googlesource.com/1098958
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567165}
oscarj
Remove namespace alias (chrome/browser/extensions)
When using Jumbo build, the namespace alias Create in
/api/context_menus/context_menus_api.cc conflicts
with the function Create called from
api/desktop_capture/desktop_capture_base.cc.
This commits solves the issue by removing the namespace
alias. It also removes the namespace aliases
Update and Remove in the same file to avoid
this issue in the future.

Bug: 850484
Change-Id: Ibdb940e153a89b7120c670e806be34fc4e95ab90
Reviewed-on: https://chromium-review.googlesource.com/1099062
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#567164}
bratell
Rename some kBackgroundColor constants to make them unique
In jumbo experiments in chrome/browser/ui, one of the problems
is that there are many kBackgroundColor variables in anonymous
namespaces that become the same anonymous namespaces in jumbo.

This patch gives those constants unique names, matching their
individual use.

Bug: 773275
Change-Id: I8746a88a32f64a0645fd88e850e39d22bc635e19
Reviewed-on: https://chromium-review.googlesource.com/1078814
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567021}
bratell
Rename some kButtonPadding constants to make them unique
In jumbo all files are merged into a single (or many) larger
translation unit and then a couple of kButtonPadding variables
end up in same anonymous namespace so that they clash.

This patch gives those constants unique names, matching their
individual use.

Bug: 773275
Change-Id: I9d8be1076552b7ffaa095bb4d50d3fa3d5845274
Reviewed-on: https://chromium-review.googlesource.com/1078816
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#566957}
bratell
Rename some kBorderThickness constants to make them unique
In jumbo all files are merged into a single (or many) larger
translation units and then a couple of kBorderThickness variables
end up in same anonymous namespace so that they clash.

This patch gives those constants unique names, matching their
individual use.

Bug: 773275
Change-Id: I1d81153af042c27927902b648fd7271a13f47c92
Reviewed-on: https://chromium-review.googlesource.com/1079168
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#566956}
tmoniuszko
Force en_US locale in SyncCycleSnapshotToValue test
Bug: 852349
Change-Id: I8367c10390caf2f5eda219eadb958e10e049c4cc
Reviewed-on: https://chromium-review.googlesource.com/1098933
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Reviewed-by: Tim Schumann <tschumann@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566826}
bratell
Move two identical SecondsToTimeTicks to tighter scopes
Two blink tests used their own SecondsToTimeTicks helpers which
clashed in jumbo builds where those files were compiled in the
same translation unit. Since it's a small function and hard to
find a suitable shared place, this moves the functions to
tighter scopes to not interfere with each other.

Change-Id: I9e04eed676e9e07f4aa5a815b655625bba03593f
Reviewed-on: https://chromium-review.googlesource.com/1095336
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#566824}
oscarj
Rename constants with the same name
When building with Jumbo, unnamed namespaces gets merged.
Constants with the same name within those namespaces conflict.
This commit renames those constant to something more file
specific.

Bug: 850484
Change-Id: If04a32cbf9ce544d852b1297f229d24d96845c59
Reviewed-on: https://chromium-review.googlesource.com/1096757
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566596}
fs
Don't corrupt list-based hit-test results in LayoutSVGForeignObject
Assigning the HitTestResult used for the PaintLayer will corrupt (reset)
any result acquired previously. So results from the foreground phase
would be erased by any later phase(s). Use HitTestResult::Append
instead if we're performing a list-based hit-test.

Bug: 849617
Change-Id: I5f53cad7e8396377815af51bd52db924b3fe6d5a
Reviewed-on: https://chromium-review.googlesource.com/1095182
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566382}
bratell
Cut down the number of kIconSize variables
In jumbo build experiments, one obstacle for using jumbo for
chrome/ui is that there are too many kIconSize is the global
anonymous namespace. This patch renames them according to their
use, but other options are available (and are used) such as
moving the constants into the functions where they are used or
into a less global namespace.

Bug: 773275
Change-Id: I62db42da677cffc53087aede879deaf5245b3640
Reviewed-on: https://chromium-review.googlesource.com/1076237
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#566377}
oscarj
Remove using declarations in browser/extensions
In Jumbo builds the declaration "using base::Time" (also
"using base::TimeDelta") conflicts with a typedef in X11 system header.
This commit will remove the declarations and use the namespace
prefix instead.

The function CalculatePingDays in
extension_updater.cc has been renamed since a function with
the same name exists in chrome_update_client_config.cc.

Bug: 850484
Change-Id: I67a2e6f8710f5c730344b8d47be742c72f1667c6
Reviewed-on: https://chromium-review.googlesource.com/1092693
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#566348}
oscarj
Resolve namespace conflicts in Jumbo build
When using Jumbo build, local namespaces conflict with global
namespaces. The local redefinition of namespaces, for example
"namespace bookmarks = api::bookmarks" also causes conflicts
between files. This commit removes the local
redefinitions and adds the "::" prefix when necessary.

Bug: 850484
Change-Id: Idd8b281a0e4999c27baffe326b5de33ba2247692
Reviewed-on: https://chromium-review.googlesource.com/1094636
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#566338}
fs
Remove "dead" code in BackgroundImageGeometry
BackgroundImageGeometry::SetSpaceX/SetSpaceY computes
|computed_{x,y}_position| from Length() - which is 'auto' and thus
always resolve to 0. Remove the computation, replacing it with '0' and
simplify.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I3e0648da78d9a0ff6e644cb4440f188ee8f52e53
Reviewed-on: https://chromium-review.googlesource.com/1095258
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#566044}
oscarj
Resolve conflict for namespace "errors"
In Jumbo build, the local redefinition of the namespace
errors, for example "namespace errors = manifest_errors",
causes conflicts between files. This is resolved by removing the local
redefinition and using the full name instead.

Bug: 850484
Change-Id: I5b8aecd3dc5b7c922bef515b82f11c5bfdf19515
Reviewed-on: https://chromium-review.googlesource.com/1095075
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#565999}
oscarj
Remove conflicting namespace declarations
In Jumbo builds the namespace declarations such as "keys", "helpers" and
others conflict. The are named the same in multiple files since they
have the same purpose, but with Jumbo this is no longer appropriate.
The declarations that conflict are removed.

Bug: 850484
Change-Id: I62246ebe303f1cdcabb2c21312eef4c6d4a7d92a
Reviewed-on: https://chromium-review.googlesource.com/1090916
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Oscar Johansson <oscarj@opera.com>
Cr-Commit-Position: refs/heads/master@{#565937}
bratell
Rename the two CreateMemoryCoordinatorHandle functions in content
There were two small (identical) helper functions in
content/browser named CreateMemoryCoordinatorHandle(..). One in
gpu and one in render_host, and with no obvious place
to put a shared copy.

These two cause problems in some extreme jumbo configurations so
this patch renames them according to how they are user.

Change-Id: I508530b6290606a01046ec0378d8da7d9f8c164b
Reviewed-on: https://chromium-review.googlesource.com/1092696
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#565646}
bratell
Move duplicate CappedSizeInKB() to header file for sharing
Some jumbo builds broke because of too many CappedSizeInKB so moving
it to heap.h to unbreak the builds. It's a small inlined method.
The moved function is not using std::min to avoid including
<algorithm> in heap.h and potentially causing a measurable
build time regression.

TBR=mlippautz@chromium.org,haraken@chromium.org

Bug: 840789
Change-Id: I4e4bf3989235c6e7274a56f5c10823d8bb37a4df
Reviewed-on: https://chromium-review.googlesource.com/1090839
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#565289}
fs
Fold marker methods in LayoutSVGPath
Fold all of ProcessMarkerPositions, ShouldGenerateMarkerPositions,
MarkerRect and CalculateUpdatedStrokeBoundingBox into a larger, but
still manageable, single function (UpdateMarkers). Shorter term this
makes for less (and slightly more efficient) code. Longer term this
should make future changes to resource handling easier.

Also take this opportunity to make some minor cleanups (use a range-
based for loop; replace a ternary expression with an equivalent.)

Bug: 769774
Change-Id: I029fcdfa388c786fa30ebe861ba78d15d3a3d792
Reviewed-on: https://chromium-review.googlesource.com/1086943
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#564593}
auygun
Android: Move ContentViewRenderView to the embedder support component
Bug: 840360, 617324
Change-Id: I66a3a35d5fb8df66ee003ae1be48cbb89ba848d2
Reviewed-on: https://chromium-review.googlesource.com/1070159
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Commit-Queue: Attila Uygun <auygun@opera.com>
Cr-Commit-Position: refs/heads/master@{#564425}
oscarj
Avoid ambiguity between blink::Path and blink::XPath::Path
If XPath headers and graphics headers end up in the same translation
unit a collision will occur for the symbol Path. This commit will fix
the collision by adding blink:: prefix. According to a post in
chromium-dev this can happen in Jumbo builds.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I30ad0be4ea2000779313024d57531c1200bb2603
Reviewed-on: https://chromium-review.googlesource.com/1085055
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#564111}
bratell
Disable all of the include guard presubmit check for third_party
The style check for include guards in third_party had already been
disabled but there are also headers in third_party with no
normal include guards at all so we better disable all of the check.

(blink is not considered third_party).

Bug: 845584
Change-Id: I801022a18daec38e9e6788c313e6bac6ed8a150b
Reviewed-on: https://chromium-review.googlesource.com/1080511
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#564045}
fs
svg/animations/viewspec-checkaspectparams.html no longer failing
TBR=schenney@chromium.org

Bug: 843192
Change-Id: I71f2dec1606aec96200731eeb9d3785347507216
Reviewed-on: https://chromium-review.googlesource.com/1080512
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#563189}
bratell
[jumbo] Make sure all AtomicString maps use the same hash
text_break_iterator_icu.cc didn't use the AtomicString hash
function and when the compiler noticed that inconsistancy in
a jumbo build, that jumbo build broke with the error:

../../third_party/blink/renderer/platform/wtf/text/atomic_string_hash.h:51:8:
error: explicit specialization of 'WTF::HashTraits<WTF::AtomicString>' after instantiation

This was triggered by an unrelated change that happened to reorder
some code.

TBR=drott@chromium.org

Change-Id: I4773df7ce31e676b39dac9a8e2c4e2602d3746ce
Reviewed-on: https://chromium-review.googlesource.com/1079569
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#563183}
bratell
Typo fixes: Include h files instead of cc files in chromeos
So:
Include chromeos_switches.h instead of chromeos_switches.cc
Include base_event_utils.h instead of base_event_utils.cc

Typo made a test include a cc file instead of the more commonly
included header file. This patch changes to include the header file.

There are no known bad side effects of this, but it was found
when looking for similar instances of a piece of code that did
cause problems.


Change-Id: I33105752517ba4e423dcae7c1ea0186fc7613127
Reviewed-on: https://chromium-review.googlesource.com/1005065
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#563154}
bratell
Typo fix: Include a .h file instead of a .cc file in a test
A test includes the cc file
components/search_engines/search_engines_test_util.cc instead of
its header file. This patch changes that to include the header
file instead.

This inclusion has caused no to me known problems and was just found
as a result of looking through the source for this pattern after
a similar instance did cause problems.

Change-Id: Iffdb68a8055d69a8a3df450c7982ec1e674dcf6e
Reviewed-on: https://chromium-review.googlesource.com/1005175
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563075}
bratell
Add dependency gpu:test_support -> ui/gfx:test_support
In some jumbo build configurations the linker needs
gfx::PrintTo(gfx::Size const&, ...) referenced from
obj/gpu/libtest_support.a
testing::internal::UniversalPrinter<gfx::Size>::Print(
    gfx::Size const&, ...)

This reference might be in dead code that would otherwise (in
non-jumbo builds) have been stripped earlier, but since the
reference apparently is there it's best to have
the dependency as well.

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I6fe98a5427e5bc30625773bfa73d5b248b34f30a
Reviewed-on: https://chromium-review.googlesource.com/1005340
Reviewed-by: Victor Miura <vmiura@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#562997}
fs
Rework SVGViewSpec to be an immutable object
This reworks SVGViewSpec to be an immutable object created from either a
fragment string or a <view> element (indirectly via the fragment
identifier.) "Inheritance" of the value is then handled by checking if
there's a SVGViewSpec set (like before) and whether it has a value set
(for 'viewBox', 'preserveAspectRatio' et.c), and if it doesn't just use
the value from the SVGSVGElement.
This allows any animations of the SVGSVGElement to properly take effect
while still allowing overrides from an SVGViewSpec.
While this should arguably also be the case for SVGViewElements
referenced by a fragment identifier, these are left as before (not
responding to animations.)

Bug: 843192
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ic36e754ef211182391e041cb3c6f9443535c3acc
Reviewed-on: https://chromium-review.googlesource.com/1078647
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562853}
fs
<view> elements should apply to the root element
Like the comment here indicates, it wasn't clear which <svg> a <view>
element should apply to. This was clarified in SVG2 [1] to be the "root
'svg' element", which is the same as for a "svgView(...)" fragment.
The comment is updated to reflect the new spec text.
The new behavior matches Gecko.

[1] https://svgwg.org/svg2-draft/linking.html#SVGFragmentIdentifiersDefinitions

Bug: 843192
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: If76e2ca1c954af75203905ca6e50eef60ccf9ec4
Reviewed-on: https://chromium-review.googlesource.com/1075207
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#562471}
fs
Remove inheritance of SVGZoomAndPan into SVGViewSpec
Since we no longer expose SVGViewSpec as a DOM interface, we don't need
to have it inherit SVGZoomAndPan. This allows simplifying the code a bit
and will eventually allow making SVGViewSpec immutable (in a cleaner
way.)

To allow this, the parsing of the SVGZoomAndPan value is rework such
that one can go from String to SVGZoomAndPanType without the inheritance
i.e by not operating on the internal value, but rather return one.

Also make some minor cleanups such as uninlining
SVGZoomAndPan::ParseAttribute.

Bug: 843192
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I4dedcb6a76f3dabf3f7c441d03bee2dfae8efb2d
Reviewed-on: https://chromium-review.googlesource.com/1075128
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#562440}
fs
Clamp argument to SVGGeometryElement.getPointAtLength to [0, length]
Per:

  https://svgwg.org/svg2-draft/types.html#__svg__SVGGeometryElement__getPointAtLength

Bug: 847198
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I9067ce9f196453bd54560d5119ebc38d35c8ac86
Reviewed-on: https://chromium-review.googlesource.com/1075332
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#562422}
fs
Remove stray argument to GetRoundedBorderFor in ShapeOutsideInfo
Once upon a time, GetRoundedBorderFor(...) did accept a LayoutView*
argument, but it no longer does. Luckily this would've yielded true
anyway - matching the default argument - so no functional change is to
be expected.

Change-Id: Ief012e7a37efc9e9293f10bc2c67172ab088200d
Reviewed-on: https://chromium-review.googlesource.com/1076231
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562398}
bratell
Use the same libjpeg in all of blink/platform
The normal libjpeg renames some symbols with macros so if its
headers are included together with libjpeg-turbo's headers
in the same translation unit, there will be an inconsistent
renaming of libjpeg symbols. This happened in some extreme
jumbo configuration and resulted in confising linker errors.

This patch changes an include so that jpeglib.h becomes included
the same way everywhere.

Change-Id: I7f122d0919d58371bb40dc0097a766b857b9815e
Reviewed-on: https://chromium-review.googlesource.com/1073423
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#562243}
fs
Move intrinsic_sizing_info.h to core/layout
It's a layout-related gizmo. Take this opportunity to forward-declare
IntrinsicSizingInfo and only include where used.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I39750738147dbfce05ac1e77042fecfc02b2a92d
Reviewed-on: https://chromium-review.googlesource.com/1070374
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#561895}
fs
Fix errors in wpt/css/css-masking/* tests
clip-path-svg-content/clip-path-clip-rule-008.svg:
  Add missing reference (reference/clip-path-clip-rule-004-ref.svg).

clip-path-svg-content/clip-path-css-transform-002.svg:
  Adjust translation to match reference.

clip-path-svg-content/clip-path-dom-href.svg:
  Do setAttribute(...) on the correct <g>.

clip-path/clip-path-element-userSpaceOnUse-002.html:
  Shrink the clip-path so that it clips out the border, to match the
  reference.

clip-path/clip-path-ellipse-002.html:
clip-path/clip-path-ellipse-003.html:
clip-path/clip-path-ellipse-004.html:
clip-path/clip-path-ellipse-005.html:
  Adjust the description text so that it matches the reference.

clip-path/clip-path-ellipse-006.html:
  Use a different reference (reference/clip-path-ellipse-ref.html), and
  adjust the target <div> such that it matches the reference (replacing
  the red border with a margin.)

clip-path/clip-path-ellipse-007.html:
clip-path/clip-path-ellipse-008.html:
  Replace red border with a margin.

clip-path/clip-path-polygon-001.html:
clip-path/clip-path-polygon-002.html:
clip-path/clip-path-polygon-003.html:
  Adjust the description text so that it matches the reference.

clip-path/clip-path-polygon-004.html:
  Fix typo in assertion.

clip-path/clip-path-polygon-005.html:
  Adjust the description text so that it matches the reference.

Bug: 626703, 843084
Change-Id: I09c37cbe80ca3b82478bdd994ae027e9a72f280c
Reviewed-on: https://chromium-review.googlesource.com/1071529
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#561880}
bratell
Change some payments code to not have so many kFirstTagValue
In jumbo build experiments all the kFirstTag variables ended up
in the same translation unit and prevented compilation. This patch
retires those variables, and also renames an enum that had got
a copy-paste name.

Bug: 803406
Change-Id: I887d85a3632766845a7caede089d99ed73efba35
Reviewed-on: https://chromium-review.googlesource.com/1073308
Commit-Queue: anthonyvd <anthonyvd@chromium.org>
Reviewed-by: anthonyvd <anthonyvd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561861}
fs
Fix wpt/css/css-masking/parsing/clip-valid.html subtest
Percentages are not allowed in rect() (arguments are '<length> | auto'.)
Move the old test to clip-invalid.html and replace it with one that
doesn't use percentages.

Bug: 843084
Change-Id: I3cadd99da0d302ac5a0cd012450dd7ade233681c
Reviewed-on: https://chromium-review.googlesource.com/1071469
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561598}
fs
Remove stray, unneeded (and incorrect) forward declaration
WebContentsObserver is in the 'content' namespace, not in the global.
This causes a collision with a 'using' directive for the same class,
which breaks Jumbo builds.

TBR=avi@chromium.org,siggi@chromium.org

Bug: 755840, 846328
Change-Id: I977106611b374c955bf3c5c161c8a52eea927698
Reviewed-on: https://chromium-review.googlesource.com/1071663
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Sigurður Ásgeirsson <siggi@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#561512}
bratell
[jumbo] Fixing collision between wtf ntohs and Windows ntohs
A recent change in blink added a dependency on services/network which
indirectly use winsock2.h for htons a ntohs. Since blink uses its custom
ntohs and htons for Windows, those clash. This changes so that blink also
uses winsock2.h for htons, ntohs.

Bug: 839982
Change-Id: I5bebce4e62227512da2c922dc41a564ce442f388
Reviewed-on: https://chromium-review.googlesource.com/1070973
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#561469}
fs
Allow Text node in elementsFromPoint if descendant of SVG text content
When hit-testing, SVG text content nodes will use their Text node
descendants as the inner-most/hit node, and hit-testing will not be
performed in any of the background phases. Thus we need to selectively
allow Text node which has an SVG text content element as their parent.

Bug: 842504
Change-Id: Ie282d5e9a66880f3f0d5e319b249f5f41db9e9db
Reviewed-on: https://chromium-review.googlesource.com/1059753
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561238}
fs
Reverse traversal order in SVGRootInlineBox
Text painted later should make the top-most node, so line boxes should
be visited front-to-back. This will generally only make a difference for
text nodes that overlap.

This will also make a difference when elementsFromPoint is fixed, since
then we'll add the hit elements in the required "innermost to outermost"
order.

Bug: 842504
Change-Id: I541a394cbb0677980308615793f5e1fa9ea3b401
Reviewed-on: https://chromium-review.googlesource.com/1070196
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561222}
bratell
[jumbo] Rename one of the EnumerateOutputDevices functions
Since we just got two EnumerateOutputDevices functions in
content/browser/renderer_host/media, in a jumbo build the compiler
doesn't know which to use in a Bind call. This renames one of them
OldEnumerateOutputDevices since the code was renamed that way.

TBR=guidou@chromium.org,ossu@chromium.org

Bug: 837661
Change-Id: I1cb5201e05400f726e5081baa10a87fe2dce5cc5
Reviewed-on: https://chromium-review.googlesource.com/1069357
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#561208}
fs
Document SVGImage::{Get,Has}IntrinsicSizingInfo
TBR=schenney@chromium.org

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Icd23f26d15c522033d84c832d6655277533c0e37
Reviewed-on: https://chromium-review.googlesource.com/1070278
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#561130}
fs
Use consistently computed lengths when finding relevant contour
In CalculatePointAndNormalOnPath, compute the accumulated length of the
contours and compare against the passed in (now unmodified) |length|, to
increase the chances of comparing similarly computed length with each
other. |length| is often, directly or indirectly, derived from the
computed length of the Path (i.e using Path::length().)

Bug: 845375
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ibda61dd29921f41e0b294edde31ddb21ebbefd08
Reviewed-on: https://chromium-review.googlesource.com/1069071
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561032}
mpichlinski
Wait for completion of changing enabled tracks in PipelineIntegrationTests.
Calling Seek/Resume on Pipeline when OnEnabledAudioTracksChanged or
OnSelectedVideoTrackChanged have not finished their job will end with a crash:
- PlaybackWithVideoTrackDisabledThenEnabled crashes on
  DCHECK(!(pending_audio_track_change_ || pending_video_track_change_));
  in RendererImpl::Flush when calling Seek after unfinished
  OnSelectedVideoTrackChanged,
- TrackStatusChangesWhileSuspended crashes on
  return time_source_->CurrentMediaTime();
  in RendererImpl::GetMediaTime() due to nullptr time_source_
  when OnEnabledAudioTracksChanged finishes its job after calling Resume.

In production code PipelineController is responsible for gating operations
via callbacks in order to prevent race conditions.

Sometimes RunUntilIdle may be insufficient for changing track state, instead
of it wait in the RunLoop until completion callback has been called.

Bug: 836785
Change-Id: I8a784d668b6d92bebd90fafd6e6dbddb18c9ceb4
Reviewed-on: https://chromium-review.googlesource.com/1066015
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Matthew Wolenetz <wolenetz@chromium.org>
Reviewed-by: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560640}
fs
Fix SVGImage filtering in JankTracker
The condition claiming to filter out documents (frames) originating from
SVGImages was in fact filtering out all SVG documents. Adjust.

Move the unit test to SVGImageTest because it already has usable
infrastructure to test this properly.

Also add DISALLOW_NEW to the JankTracker definition to indicate its
relation to the GC.

Bug: 581518
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I53ae6100c1538430c97c8b0fd6cda2f5c1ee9a6c
Reviewed-on: https://chromium-review.googlesource.com/1068914
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Steve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560630}
fs
Allow more selective invalidations for 'filter'
Add a new InvalidationMode flag (kSkipAncestorInvalidation) to allow skipping
the invalidation of ancestors, and then use that for the "fine-grained"
invalidation in LayoutSVGResourceFilter to restore the more efficient method
for clients which have a usable FilterData.

For filters referenced by SVG content, this restores the behavior (by not
invalidating more than needed, avoiding caches being dropped.) For non-SVG
content the behavior remains the same (flags are not used/ignored.)

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I41ccbbb6552558297329050dbe7630a2d624273a
Reviewed-on: https://chromium-review.googlesource.com/1065910
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#560529}
bratell
[jumbo] Declare BubbleDialogDelegateView template specialization
BubbleDialogDelegateView has a specialization of view properties
so declare it to be sure the compiler doesn't get upset about
using properties before it knows about the specialization.

Bug: 764918
Change-Id: I55b70dc3dacfdcd5eb466cfcde234090573d2bfa
Reviewed-on: https://chromium-review.googlesource.com/1067346
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#560502}
fs
Apply zoom in LayoutSVGRoot::ComputeIntrinsicSizingInfo
Previously we didn't know in what context said method was called, so we
didn't know if zoom ought to be applied or not.
Add LayoutSVGRoot::UnscaledIntrinsicSizingInfo and change current
callers of ComputeIntrinsicSizingInfo to use it. Then make
ComputeIntrinsicSizingInfo scale the intrinsic size.

Bug: 722055
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: If668e85bcea1028e48a3bc98c74d07435d425338
Reviewed-on: https://chromium-review.googlesource.com/1067397
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560331}
fs
Get rid of SVGImage::EmbeddedReplacedContent
Rather than exposing the document root's LayoutObject, add an bunch of
methods to achieve the same thing as the returned object is used for.
Reuse the same names as used on FrameView. Also rename the method on
LayoutImage to something more appropriate.

Bug: 722055
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I6d006206365988c2ad8068db7251414529ed3bca
Reviewed-on: https://chromium-review.googlesource.com/1065997
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560322}
fs
Rebuild the SVGResources for <pattern> after changing SVGResource
Since we reassociate the SVGResource synchronously, we need to also make
sure that the associated SVGResources object is updated, else it could
end up pointing to the old <pattern> LayoutObject.

Bug: 845040
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I026b46abcd510485ddfe33622cb5f5aa1bab9610
Reviewed-on: https://chromium-review.googlesource.com/1065779
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#560300}
fs
Reland: "[CI] Convert SVG resources to use SVGResource"
From using AtomicString (for 'mask', 'marker-*', 'fill' and 'stroke') or
the string representation of SVGResources ('filter' and 'clip-path'),
convert to using SVGResources.
Add an implementation of SVGResourceClient (SVGElementResourceClient)
and register it with the existing resources. Invalidation code is moved
here. This makes the invalidation code slightly more homogeneous between
the various code-paths.

The new SVGResourceClient implementation is stored in SVGElementRareData
as needed.
The various computed style representations are converted to use the new
StyleSVGResource, which is a ref-counted wrapper around an SVGResource
and its underlying string representation (which is needed for
serialization.) Style building is changed to produce this new wrapper
(rather than an AtomicString.) A helper for serialization is added to
ComputedStyleUtils.
The kHasPendingResources flag is removed since it no longer used, and
the hook in Element is removed.
All LayoutSVGResource* subclasses are changed to take SVGResourceClients
instead of LayoutObjects, and the |clients_| set is removed in favor of
the set in SVGResource.
A bunch of helpers are added for updating (adding/removing) the client
registrations. The various LayoutSVG subclasses are updated to call
these helpers.

Changes on reland: LocalSVGResources are now tracked using WeakMember, and
the associated IdTargetObservers are cleaned up when weak references are
cleared.

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ie0b42471aea5ea5afb5d239662b4ba195281f764
Reviewed-on: https://chromium-review.googlesource.com/1057330
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Justin Novosad <junov@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559479}
bratell
Don't check header guard style in third_party
The presubmit check warning for correct include guards would
trigger for generated files in third_party/win_build_output. Since
files in third_party is often not written with the Chromium style
guide in mind that is over zealous so this patch stops
checking their names (except for in blink).

The presubmit code will still check the existence of a guard since
lack of one can cause problems outside the module and there has been
no reports of false warnings.

This patch also removes the exceptions that used to be there for
blink since blink has moved and been reformatted.

Bug: 814776
Change-Id: Ic7f2bbba5b9bcafbb5bec15b79b04d5e81994b77
Reviewed-on: https://chromium-review.googlesource.com/1061698
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#559185}
fs
Refactor computation of intrinsic size for "nested" objects
Sink the update of intrinsic_size_ out of the if-else in
ComputeIntrinsicSizingInfoForReplacedContent, and then push
GetNestedIntrinsicSizingInfo down into subclasses, folding it away to use the
"local" constructs of the relevant subclasses.

This leaves subclasses to deal with issues such as if whether to apply zoom
or not et.c, and will with some additional tweaks allow for more succinct
interfaces in the "nested" cases. It also makes LayoutReplaced much simpler.

Bug: 722055
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Ie8493ffa89ffb34d2591d6a7ecdc8ebc20c6264f
Reviewed-on: https://chromium-review.googlesource.com/1059776
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#559069}
bratell
Avoid ambiguity between ::i18n and ::autofill::i18n.
Unfortunately there are two i18n namespaces, including one
global one, so if you are in ::autofill, referring to i18n is
ambigious if the compiler knows about both of them. This happens
in jumbo builds which means that my previous jumbo fix here didn't
actually work.

Change-Id: I7467ff958e93433581da0134d9a6e8ddd21bde49
Reviewed-on: https://chromium-review.googlesource.com/1057728
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#558364}
bratell
[jumbo] Make PhoneNumber unambigious
There is a ::i18n::phonenumbers::PhoneNumber and a
::autofill::PhoneNumber. To avoid ambiguity (especially in jumbo
builds where more types are known to more code), refer to
::i18n::phonenumbers::PhoneNumber with the full name inside
autofill code.

Also refer to PhoneNumberUtils from the same namespace the same
way for consistency.

Change-Id: Ic36cae9a8df0ceb07f3494fa34d8b08531cd46e4
Reviewed-on: https://chromium-review.googlesource.com/1050288
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557164}
fs
Revert "[CI] Convert SVG resources to use SVGResource"
This reverts commit 3431b89c8be2d7b1a60f5eb135b1d27ce432ce9b.

Reason for revert: Tickled fuzzers

Original change's description:
> [CI] Convert SVG resources to use SVGResource
> 
> From using AtomicString (for 'mask', 'marker-*', 'fill' and 'stroke') or
> the string representation of SVGResources ('filter' and 'clip-path'),
> convert to using SVGResources.
> Add an implementation of SVGResourceClient (SVGElementResourceClient)
> and register it with the existing resources. Invalidation code is moved
> here. This makes the invalidation code slightly more homogeneous between
> the various code-paths.
> 
> The new SVGResourceClient implementation is stored in SVGElementRareData
> as needed.
> The various computed style representations are converted to use the new
> StyleSVGResource, which is a ref-counted wrapper around an SVGResource
> and its underlying string representation (which is needed for
> serialization.) Style building is changed to produce this new wrapper
> (rather than an AtomicString.) A helper for serialization is added to
> ComputedStyleUtils.
> The kHasPendingResources flag is removed since it no longer used, and
> the hook in Element is removed.
> All LayoutSVGResource* subclasses are changed to take SVGResourceClients
> instead of LayoutObjects, and the |clients_| set is removed in favor of
> the set in SVGResource.
> A bunch of helpers are added for updating (adding/removing) the client
> registrations. The various LayoutSVG subclasses are updated to call
> these helpers.
> 
> TBR=junov@chromium.org
> 
> Bug: 769774
> Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> Change-Id: I62418465251532240c4e895e5c4d253ed9e53b9a
> Reviewed-on: https://chromium-review.googlesource.com/977965
> Commit-Queue: Fredrik Söderquist <fs@opera.com>
> Reviewed-by: Fredrik Söderquist <fs@opera.com>
> Reviewed-by: Philip Rogers <pdr@chromium.org>
> Reviewed-by: Stephen Chenney <schenney@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#556743}

TBR=pdr@chromium.org,fs@opera.com,junov@chromium.org,schenney@chromium.org

Change-Id: I695b3eed793bb000b057bca52364265d201f0bae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Reviewed-on: https://chromium-review.googlesource.com/1051345
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#557120}
fs
Fix [a-z] range comparison in IsValidElementNamePerHTMLParser
Bug: 648179
Change-Id: I623023d6e195447381bf8b08124d7475bb0fe93d
Reviewed-on: https://chromium-review.googlesource.com/1049629
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#557117}
fs
[CI] Convert SVG resources to use SVGResource
From using AtomicString (for 'mask', 'marker-*', 'fill' and 'stroke') or
the string representation of SVGResources ('filter' and 'clip-path'),
convert to using SVGResources.
Add an implementation of SVGResourceClient (SVGElementResourceClient)
and register it with the existing resources. Invalidation code is moved
here. This makes the invalidation code slightly more homogeneous between
the various code-paths.

The new SVGResourceClient implementation is stored in SVGElementRareData
as needed.
The various computed style representations are converted to use the new
StyleSVGResource, which is a ref-counted wrapper around an SVGResource
and its underlying string representation (which is needed for
serialization.) Style building is changed to produce this new wrapper
(rather than an AtomicString.) A helper for serialization is added to
ComputedStyleUtils.
The kHasPendingResources flag is removed since it no longer used, and
the hook in Element is removed.
All LayoutSVGResource* subclasses are changed to take SVGResourceClients
instead of LayoutObjects, and the |clients_| set is removed in favor of
the set in SVGResource.
A bunch of helpers are added for updating (adding/removing) the client
registrations. The various LayoutSVG subclasses are updated to call
these helpers.

TBR=junov@chromium.org

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I62418465251532240c4e895e5c4d253ed9e53b9a
Reviewed-on: https://chromium-review.googlesource.com/977965
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556743}
fs
Fix drop-shadow(...) offset int conversion in FilterEffectBuilder
Avoid the implicit conversion to int in the constructor for WebPoint.
Also don't pass through WebPoint at all since AppendDropShadowFilter
take an IntPoint.

Bug: 836480
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I2c05681c686cf9f7169c79cf5f67849f483f36f8
Reviewed-on: https://chromium-review.googlesource.com/1039829
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#555499}
fs
Remove (trivially) unneeded ImageResourceContent::IntrinsicSize calls
Since SVGImage is handled explicitly already, and we pass
kDoNotRespectImageOrientation to IntrinsicSize() in these functions,
just call Image::Size() directly rather than passing through the
ImageResourceContent method.

Bug: 773272
Change-Id: I6b7c24f5be425f04cd2f68cbc4612054b635bc2b
Reviewed-on: https://chromium-review.googlesource.com/1032745
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#554763}
fs
Factor out <clipPath> user space transform computation
This computation (clipPath[transform] and optional oBB transform) is
used by LayoutSVGResourceClipper::HitTestClipContent,
LayoutSVGResourceClipper::ResourceBoundingBox and ClipPathClipper.

Factor it into a new method CalculateClipTransform() on
LayoutSVGResourceClipper and use it at the three locations.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Icaa9707f24c11f1a45d80ff71d8e156c868898c1
Reviewed-on: https://chromium-review.googlesource.com/1030212
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#554022}
mpichlinski
Fixed compositor_unittests that crashed on Mac
After recent changes TestCompositorHostMac started requiring
a real AcceleratedWidgetMac, otherwise it would crash while
trying to Show. After fixing that, there was another issue
that ImageTransportSurface started crashing, because of
skipped SetAllowOSMesaForTesting in compositor test_suite.

Tests affected:
LayerWithRealCompositorTest.*

Change-Id: I60b84611406744989e2f00f13e20c1177912814f
Reviewed-on: https://chromium-review.googlesource.com/1014101
Reviewed-by: ccameron <ccameron@chromium.org>
Reviewed-by: Ian Vollick <vollick@chromium.org>
Commit-Queue: Michal Pichlinski <mpichlinski@opera.com>
Cr-Commit-Position: refs/heads/master@{#553960}
fs
Fix style on some parameter names in the CSS parser
  unitlessZeroFeature -> unitless_zero_feature
  negativeSize -> negative_size
  threeValuePosition -> three_value_position

Change-Id: Id42906e518e6780bfa601031d8ad00430b2f48b4
Reviewed-on: https://chromium-review.googlesource.com/1027878
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553777}
fs
Use round() [not roundf()] in RoundedIntPoint(const DoublePoint&)
This avoids the implicit conversion to float, which can lead to loss of
precision.

Bug: 836722
Change-Id: I66ea0f42823347b17e41e5d823aaf766429eacbf
Reviewed-on: https://chromium-review.googlesource.com/1027710
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#553543}
mharanczyk
Prevent ManifestHandlerRegistry override from leaking to different tests.
ContentVerifierTest was setting up override but never reseting it
causing other tests that loaded extension to access invalid memory
of stack allocated registry override.

This is regression after crrev.com/c/957645 that causes crash
or timeout in extensions_unittests.

Bug: 809088, 832801
Change-Id: I45d8ee2e4e450e8d5f619e502e7a6e96c8879ef0
Reviewed-on: https://chromium-review.googlesource.com/1013982
Commit-Queue: Marek Haranczyk <mharanczyk@opera.com>
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Reviewed-by: proberge <proberge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551738}
ppluciennik
Fixed problem with absolute paths in ninja files.
R=brettw@chromium.org, rsesek@chromium.org, sdefresne@chromium.org, sergeyu@chromium.org

Bug: 821738
Change-Id: Ib1dcca4070ad7019c082653217df48adda69ab32
Reviewed-on: https://chromium-review.googlesource.com/962282
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551519}
wdzierzanowski
Avoid calling GetAllStreams() on uninitialized Demuxer
The first time we know the Demuxer initialization is complete is when
Pipeline::Start() completes (asynchronously).

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I7451187be2d141780d5aa514fb3a1ec4abe8fbbe
Reviewed-on: https://chromium-review.googlesource.com/1000858
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551156}
bratell
Avoid redefining IsMsgHandled by making all Win message handlers safe
There were two sets of message map macros, one with IsMsgHandled as a
function, one with it as a macro. If combined in some translation unit
that could cause compilation problems, and it did in some Opera builds.

This patch changes the code so that there is only one implementation
of the macros and it's the "safe" one, where "safe" means that it
can handle that the underlying object is deleted inside a message
handler without crashing.

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I2f039d8d93a539c8322caa664e642956c5d6d372
Reviewed-on: https://chromium-review.googlesource.com/995896
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550711}
mpichlinski
Added missing depenencies in chrome/services/media_gallery_util/public/cpp
Bug: 832591
Change-Id: I8d104a7e0ede58f20d71bb5ce00f8b398cf8e28b
Reviewed-on: https://chromium-review.googlesource.com/1012023
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Michal Pichlinski <mpichlinski@opera.com>
Cr-Commit-Position: refs/heads/master@{#550643}
fs
Remove LocalFrameView::forcing_layout_parent_view_
This flag is never set to true anymore.

Bug: 442939
Change-Id: I03bc6129d923ff90d39e32b7508bb56cf1139b31
Reviewed-on: https://chromium-review.googlesource.com/1010164
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550313}
bratell
Too many crash_keys::SetCrashKeysFromCommandLine()
When building chrome_app_unittests chrome/common/crash_keys.cc are
compiled both as a dependency and locally. Enough to compile it
as a dependency. (Noticed in jumbo build experiments where the
duplicate symbols met in the linker)

Change-Id: I517436d21ae17c2ff664afeed43ad8e1b7e529e9
Reviewed-on: https://chromium-review.googlesource.com/1005341
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#550207}
mpichlinski
GN: Allow XCode projects to use ICECC environment variables.
Without them XCode cannot compile generated projects with ICECC.

Bug: 831500
Change-Id: I3b50c730660c4e8a6a06b9fda340e20edb87e40a
Reviewed-on: https://chromium-review.googlesource.com/1006577
Reviewed-by: Brett Wilson <brettw@chromium.org>
Commit-Queue: Michal Pichlinski <mpichlinski@opera.com>
Cr-Commit-Position: refs/heads/master@{#550159}
bratell
More common to include headers than cc files so lets do that
An accidental inclusion of a cc file caused interesting
linking errors (duplicate chrome::kChromeUIPrintURL) in certain
build configurations.

Fix is to include the header instead of the cc file so that
references to chrome::kChromeUIPrintURL will be external as intended.

Change-Id: Iba69dbd17267955534609d308cef16ab0467671d
Reviewed-on: https://chromium-review.googlesource.com/1005342
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#549560}
fs
[CI] Drop redundant |candidate_| prefixes from SearchCandidate helper
Change-Id: I07129786b29acb7eea5fd1946e9301a370472125
Reviewed-on: https://chromium-review.googlesource.com/1002556
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#549167}
fs
[PE] Don't early-out in LayoutSVGText::NodeAtFloatPoint
Since <text> can have descendants that may both differ in visibility as
well as fill/stroke, we can't evaluate pointer-events in LayoutSVGText,
but should rather let LayoutBlock (and SVGInlineTextBox et al) handle
the hit query. This makes LayoutSVGText somewhat similar to the same
method on LayoutSVGContainer.

Bug: 828930
Change-Id: I2767ed149705289e770d5ae165efd910c2c7ff15
Reviewed-on: https://chromium-review.googlesource.com/998352
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549154}
bratell
Made two GetExtensionView() functions into member functions
There were two GetExtensionView functions which clashed in
jumbo build experiments where they ended up in the same
translation unit. This patch makes them member functions which
removes the need to supply an argument, which in turn makes the
code a bit simpler and easier to read.

Bug: 803406
Change-Id: I09fad295de900d6d78092397654314e757761226
Reviewed-on: https://chromium-review.googlesource.com/997774
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#549133}
bratell
Reuse existing AcceleratorMapping struct
The two identical AcceleratorMapping structs clashed in jumbo
build experiments (no offical support of jumbo in this code
yet).

Bug: 803406
Change-Id: I065bfb447de67c05d2f6172ffbdeff4bc68e6538
Reviewed-on: https://chromium-review.googlesource.com/997832
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#548810}
bratell
Gave some Mac/Views helper functions unique names
In jumbo experiments (jumbo is not yet supported in
chrome/browser/ui) several GetBubbleAnchorView and
GetBubbleAnchorRect functions clashed. They were more or less
identical but there is no obvious place to share them, and even
though they are small, the code gets messier if you inline them.

This patch gives the functions unique names as a preparation
for jumbo support in chrome/browser/ui

Bug: 803406
Change-Id: I104ae7cc961dd867e89e06fe8f18b401b39af549
Reviewed-on: https://chromium-review.googlesource.com/998158
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#548778}
fs
Update 'lighter' and 'bolder' computations to match spec
Update FontDescription::BolderWeight and LighterWeight to match the table
in https://drafts.csswg.org/css-fonts-4/#font-weight-prop .

Bug: 809956
Change-Id: I18cb9a10ef3d86f68113bb0663e5364d0120a739
Reviewed-on: https://chromium-review.googlesource.com/997592
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548741}
bratell
[jumbo] Too many kSha256Hash
Earlier this year, all kSha2Hash got longer names but two
kSha256Hash must have remained, and now they ended up in
the same translation unit and jumbo on Windows stopped
compiling. This renaming follows the pattern of earlier renames.

TBR=thestig@chromium.org

Change-Id: I95b7d6b7e5f43f25bee8e98aa3eeeb4de9d7e55f
Reviewed-on: https://chromium-review.googlesource.com/999415
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#548730}
fs
[PE] Improve SVG text selection for vertical text
We were previously always using the "left edge" of the fragment bounding
box when computing the position within the fragment. This works poorly
for vertical text. Use "top edge" for the vertical case instead.

Bug: 829214
Change-Id: I52e0aeffa95d05b1c86cd6aeca5dde7a886db486
Reviewed-on: https://chromium-review.googlesource.com/997792
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548722}
bratell
Rename a function whose name conflicted in jumbo builds
In jumbo build experiments the presence of two different
OnCheckIsDefaultBrowserFinished functions meant that
Bind didn't know which one to bind and it didn't compile.

This patch renames one OnCheckIsDefaultBrowserFinished to
OpenURLAfterCheckIsDefaultBrowser which seems like a good
name for that function.

Bug: 803406
Change-Id: I056e613b7e3d55c0b2dbde68db8d75d3e2c55876
Reviewed-on: https://chromium-review.googlesource.com/998152
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#548712}
bratell
Inlined two GetProfileFromWebContents helpers
In jumbo build experiments (no jumbo for chromium/browser/ui yet)
two GetProfileFromWebContents ended up in the same translation unit.
Each of them was only used once. This inlines them both.

I dropped the null check from the GetProfileFromWebContents() in
account_chooser_dialog_view.cc because if that helper returned
null, then the code would already crash inside
GetDefaultStoragePartition() (GetStoragePartitionFromConfig()
will call browser_context->IsOffTheRecord() without any null check).

Bug: 803406
Change-Id: I0200eb42c0a54b674eaec6122e1193c931dd2344
Reviewed-on: https://chromium-review.googlesource.com/997793
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#548711}
fs
Adjust weight ranges in FontDescription::Lighter/BolderWeight
Since the (CSS) parser allows numeric weight values in the range
[1, 1000], adjust the ranges in FontDescription::Lighter/BolderWeight
to match that.
Also factor in that the values can have fractions (by implicitly
truncating them) and simplify the range check since there's now a
set of adjacent intervals in practice.

Bug: 828747
Change-Id: I5fe3405ca45ed8016530d995976e36a6ebbcf366
Reviewed-on: https://chromium-review.googlesource.com/995452
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#548448}
fs
Nudge click point in svg/custom/use-events-crash.svg
Issue the click in the test further down the rect in the hope that the
selection code won't end up picking one or the other of the <text>s, but
only the one further down.

Bug: 829316
Change-Id: Iae3419bf902a864ea8ec46e69764480c0f240b8a
Reviewed-on: https://chromium-review.googlesource.com/997843
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#548430}
bratell
Removing some "using namespace std"
The code guide doesn't allow "using namespace", and they have
a tendency to cause problems with jumbo builds so this is just
a cleanup to avoid possible future problems.

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ibf519c5e4ddb0497961f1befa8de416039e4fc61
Reviewed-on: https://chromium-review.googlesource.com/992318
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#548386}
bratell
Rename some symbols that were duplicated in cert code
Duplicates of kTrafficAnnotation and g_is_fake_official_build_for_testing
just appeared and caused problems for certain (extreme) jumbo build
configurations.

In jumbo builds much code is compiled in the same translation
unit which means that they share the same anonymous namespace.

This patch renames the variables following the pattern of similar clashes.

(nopresubmit because any changes to net::URLFetcher are currently
 blocked and this just changes a name)

NOPRESUBMIT=true

Change-Id: Ib55f61c2c8a76c235de45f509df493c875a3a12b
Reviewed-on: https://chromium-review.googlesource.com/992313
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Ryan Sleevi <rsleevi@chromium.org>
Reviewed-by: Matt Mueller <mattm@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548379}
fs
[CI] Cleanup some SVG hit-testing code
...mostly by de-indenting it by reversing the visibility-check. Also
reuse ComputedStyle locals and switch to using a ComputedStyle&.
In LayoutSVGShape::NodeAtFloatPointInternal, the large-ish condition is
split into three slightly smaller.

Change-Id: I275081391a3b399f9887215f4fe3075884de103c
Reviewed-on: https://chromium-review.googlesource.com/995674
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#548154}
fs
Reland "Serialize 'oblique' computed values for 'font-style'"
Handling of 'oblique' values were missing in
ComputedStyleUtils::ValueForFontStyle - serialize as 'oblique <angle>'.
Because of this the return value needs to be widened to CSSValue.

Expectations for css/css-fonts/variations/font-shorthand.html updated.

TBR=drott@chromium.org

Bug: 809935, 809938
Change-Id: I753324776ba080820bc5c4a14e8aff6237ee5d12
Reviewed-on: https://chromium-review.googlesource.com/995793
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#548143}
fs
Revert "Serialize 'oblique' computed values for 'font-style'"
This reverts commit 755a9214dc9116a826f8881851c07e352004a6c5.

Reason for revert: Mid-flight collision with 162e9dda47d694596620b69c5fb23cc7f0f87126 - will update and reland.

Original change's description:
> Serialize 'oblique' computed values for 'font-style'
> 
> Handling of 'oblique' values were missing in
> ComputedStyleUtils::ValueForFontStyle - serialize as 'oblique <angle>'.
> Because of this the return value needs to be widened to CSSValue.
> 
> Bug: 809935, 809938
> Change-Id: I1de846595ed955455d57ab9f6ea45326e502a65b
> Reviewed-on: https://chromium-review.googlesource.com/995273
> Reviewed-by: Dominik Röttsches <drott@chromium.org>
> Commit-Queue: Fredrik Söderquist <fs@opera.com>
> Cr-Commit-Position: refs/heads/master@{#548044}

TBR=fs@opera.com,drott@chromium.org,futhark@chromium.org

Change-Id: I379a152245f16fc792c8bfc55a2d8b127ba30820
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 809935, 809938
Reviewed-on: https://chromium-review.googlesource.com/995695
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#548052}
fs
Serialize 'oblique' computed values for 'font-style'
Handling of 'oblique' values were missing in
ComputedStyleUtils::ValueForFontStyle - serialize as 'oblique <angle>'.
Because of this the return value needs to be widened to CSSValue.

Bug: 809935, 809938
Change-Id: I1de846595ed955455d57ab9f6ea45326e502a65b
Reviewed-on: https://chromium-review.googlesource.com/995273
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#548044}
bratell
Give two cert testing classes unique names
A second WrappedTestingCertVerifier and
g_cert_verifier_for_testing just arrived and in some
extreme (non standard) jumbo build configurations those
ended up in the same translation unit. Since translation units
only have one common anonymous namespace, there was a symbol clash.

This patch renames the global variables to
g_cert_verifier_for_io_thread_testing and
g_cert_verifier_for_profile_io_data_testing and renames the classes
to WrappedCertVerifierForIoThreadTesting and
WrappedCertVerifierForProfileIoDataTesting.

Change-Id: I41549bc81943864f64ce304220e20ab00d91c889
Reviewed-on: https://chromium-review.googlesource.com/992494
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: Matt Menke <mmenke@chromium.org>
Reviewed-by: Matt Mueller <mattm@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#548029}
bratell
Avoid having two SendReport functions to not confuse Bind(..).
In certain (extreme) jumbo build configurations, SendReport in
chrome/browser/net/chrome_report_sender.h and
chrome/browser/net/trial_comparison_cert_verifier.cc ended up as
symbols in the same translation unit and then the address
operator didn't know which function to refer to in a Bind(...) call.

This renames the local SendReport in
net/trial_comparison_cert_verifier.cc to SendCertVerifyReport.

Change-Id: I9cc17beb509452f66f5620cf7ea4ca4f1f04ed33
Reviewed-on: https://chromium-review.googlesource.com/992495
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Matt Mueller <mattm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548012}
bratell
Removing some "using namespace WTF" and "using namespace WTF::Unicode"
The code guide doesn't allow "using namespace", and they have
a tendency to cause problems with jumbo builds so this is just
a cleanup to avoid possible future problems.

Change-Id: I058ed20ba072036b1995cf039ddb3c2ffc884483
Reviewed-on: https://chromium-review.googlesource.com/992952
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#547996}
bratell
[jumbo] X11/gfx: Need to say ::Display or it's ambiguous.
There are several classes/types named Display so to get
the X11 one, you have to specify it with ::Display (gfx::Display
is a common alternative when you're inside the gfx namespace).

TBR=hubbe@google.com

Bug: 822068
Change-Id: I402b7ad2d37a82d3091577733f3f06e673c29c7e
Reviewed-on: https://chromium-review.googlesource.com/994212
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Fredrik Hubinette <hubbe@chromium.org>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#547916}
fs
[SPv175] Don't crash on <feImage> which reference an element with a mask
This works around a crash where a layout box references a filter that
contains a feImage filter primitive, which in turn reference content
that has a mask applied.

Bug: 814815, 825538
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ib2433b3ba48b3ea56462a1eb64209d36aa37cfa4
Reviewed-on: https://chromium-review.googlesource.com/982114
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#547802}
fs
Remove unused declarations in SVGFEDropShadowElement
StdDeviationXIdentifier/StdDeviationYIdentifier don't have definitions.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I187cd3d4991e89dc91e6a021771616cd441e0c22
Reviewed-on: https://chromium-review.googlesource.com/992493
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#547716}
fs
Update baselines for new Win10 version
Update baselines for

 fast/text/color-emoji.html,
 fast/text/emoticons.html,
 fast/text/international/002.html,
 fast/text/international/wrap-CJK-001.html,
 svg/W3C-SVG-1.1/text-intro-01-t.svg and
 svg/W3C-SVG-1.1/text-intro-04-t.svg

after bots got upgraded (minor changes to font data.)

Bug: 828051, 828260, 828314
Change-Id: I37d8d68348452338a09ae584742e83323713c463
Reviewed-on: https://chromium-review.googlesource.com/991953
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#547697}
fs
svg/animations/getCurrentTime-pause-unpause.html no longer flaky
TBR=schenney@chromium.org

Bug: 824930
Change-Id: I123f2d2c7e95e5bbb0dd90abeab57246d312bc54
Reviewed-on: https://chromium-review.googlesource.com/992037
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#547674}
bratell
Narrowed scope of a UrlWithoutFragment method
In jumbo builds many files are compiled in the same
translation unit and then their anonymous namespaces will also
be one and the same. In blink/inspector two (identical)
UrlWithoutFragment functions end up colliding. This patch
changes it so that one of them has a more narrow scope.

The patch also removes the special casing of these files
from the build system.

Bug: 713137
Change-Id: If0b8bfb8a13c1191aa4e1c07d2aa1472ed168f29
Reviewed-on: https://chromium-review.googlesource.com/985978
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#547653}
bratell
Move editing helper LocalToAbsoluteQuadOf() to a shared file
A commit just added a second copy of LocalToAbsoluteQuadOf
which triggered compilation failures in jumbo builds. This
deduplicates the function by moving it to EditingUtilities.cpp.

Change-Id: Ifee2d67714c18300f84c49e6371c95aaf8b95e9f
Reviewed-on: https://chromium-review.googlesource.com/985834
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#546784}
bratell
Remove the "::" prefix from testing namespace declarations.
Since ::blink::testing was renamed ::blink::test_helpers, the
"::" prefix on testing is no longer necessary. There is no longer
anything that can confuse the compiler regarding what "testing"
means.

Bug: 825768
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ibf65dd643185623530ce2f06ddc46fb8be34947a
Reviewed-on: https://chromium-review.googlesource.com/980035
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546783}
bratell
Rename ::blink::testing to ::blink::test
Inside blink there is an ongoing conflict for the code whether
"testing" means ::testing (from gtest) or ::blink::testing. So
far it has been resolved mostly by adding a "::" prefix whenever
::testing was intended, but that is a bit annoying and coding should
not be annoying.

This patch renames ::blink::testing to ::blink::test (aka
"test" in all the code since the code is already
inside blink). That resolves the conflict once and for all and also
adheres to the coding standard that says no sub-namespace may have
the same name as a common top level namespace.

This does *not* move the files to a new directory test.
This does *not* remove all the :: prefixes that are now unnecessary.

Bug: 825768
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ie35502b0d5b4f401df104e38600ede878d24bdfa
Reviewed-on: https://chromium-review.googlesource.com/980054
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546491}
bratell
Gave some global variables a g_ prefix to avoid collisions
In jumbo builds many cc files are compiled in the same translation
unit to make the compilation (much) faster. This also joins those
files' anonymous namespace and caused clashes if several files
use symbols with the same name. That happened with two global
"instance_" variables.

This patch renames them g_descriptive_name which matches a common
pattern for naming global variables.

Bug: 803406
Change-Id: I13e84ba5dba717d978ff2a43470e1ca4ab0457b2
Reviewed-on: https://chromium-review.googlesource.com/980880
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#546444}
bratell
Gave two kBubbleReshowsHistogramName unique names
In jumbo builds many cc files are compiled together in the same
translation unit. When that happens, those files will share the
same anonymous namespace so if they use symbols of the same name
they will clash.

That happened with two kBubbleReshowsHistogramName constants in
chrome/browser/ui/exclusive_access and this patch gives
those two more unique names.

Bug: 803406
Change-Id: I2b8e3a060c7b7853a3a001317e80d32b7d6e56d4
Reviewed-on: https://chromium-review.googlesource.com/980879
Commit-Queue: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546239}
fs
Rewrite svg/animations/getCurrentTime-pause-unpause.html to avoid flakes
The test in it's current form imposed too strict requirements on the
time that had passed. We cannot guarantee a maximum elapsed time, only a
minimum (and barely that...) Rewrite the test to not impose any
restriction on the maximum elapsed time. Also convert it to use
testharness while at it. Also rewrite/convert the sibling test with
setCurrentTime.

Bug: 824930
Change-Id: I79882b0189e44790e3096c8346c2a0bf47276dd8
Reviewed-on: https://chromium-review.googlesource.com/981145
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#546190}
bratell
Rename helper function WriteFile to give it a unique name
In //extensions/browser a second helper function named
WriteFile just appeared and in jumbo builds where all of
extensions/browser is compiled in one translation unit (an extreme
jumbo configuration), the two clash. This patch renames the function
that is the least like base::WriteFile to "CreateDirAndWriteFile".

Change-Id: I0d3dc1bb3e13279a2bf333bc0c12985f2133a35d
Reviewed-on: https://chromium-review.googlesource.com/980056
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546050}
bratell
Use the predefined Android SDK constants instead of numbers
Half the code used the SDK_VERSION_* constants when checking
Android version, half the code used hard coded numbers 19, 21,
22, ....

This changes the code to use SDK_VERSION_ everywhere.

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;master.tryserver.chromium.android:android_arm64_dbg_recipe;master.tryserver.chromium.android:android_compile_x64_dbg;master.tryserver.chromium.android:android_compile_x86_dbg;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Icb4e3183f0490b00d16039681548ccf469e9d236
Reviewed-on: https://chromium-review.googlesource.com/975841
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545870}
fs
Remove outdated DCHECK in SVGUseElement::InsertedInto
This DCHECK was made obsolete by
9b88406d1a87dfeef593c6d1a91beb3a2b696391, since it stopped using the
"pending resource" flag for <use>.

Bug: 825460
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ie1202097eb2172ef9ed3866e3a6575fbe4aa09db
Reviewed-on: https://chromium-review.googlesource.com/980252
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#545854}
bratell
Remove references to the non-existing android_compile_mips_dbg bot
Per answers on chromium-dev@, the android_compile_mips_dbg trybot
is no more.

Bug: gerrit:8617
Change-Id: I2f23c663d2baf397f30532290300bf2946531ab9
Reviewed-on: https://chromium-review.googlesource.com/980492
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545813}
fs
Reland "[PE] Don't reparse "restart" and "fill" repeatedly"
Rather than doing an attribute lookup in GetRestart() and Fill(), just
map the attributes in ParseAttribute. Pack with active_state_.
Also get rid of the static AtomicStrings.

Noticed while looking at the referenced bug.

Use new accessor GetActiveState() for active_state_ accesses to avoid
stumbling over signedness mismatches.

Bug: 823473
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I9adf72cdfcc794885b79be1bfc374554f9382d11
Reviewed-on: https://chromium-review.googlesource.com/979807
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#545786}
bratell
Rename TestPrerendererClient since that name is already used
In some extreme jumbo configurations the newly added
TestPrerendererClient class in
Source/core/html/parser/HTMLDocumentParserTest.cpp
compiled in the same translation unit as TestPrerendererClient
in Source/core/exported/PrerenderingTest.cpp and then it
didn't compile.

This patch renames TestPre* to MockPre*/MockWebPre* which also matches
a common pattern when creating mock classes.

Change-Id: Ib800e5e65756bf3c3709d8f570982aaa46dc7cd4
Reviewed-on: https://chromium-review.googlesource.com/980332
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Matthew Cary <mattcary@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#545771}
bratell
Gave two kBufferSize constants unique names.
In some (extreme) jumbo configurations on Mac two kBufferSize
constants ended up in the same translation unit and caused
a compilation error. This patch gives them unique names to
not cause any future problems.

Change-Id: I96d5e51024ff99fcb838346726aa1635127841eb
Reviewed-on: https://chromium-review.googlesource.com/978209
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545720}
bratell
Avoid clashes between the kLeftToRight in OSX SDK and WTF::Unicode.
There is a kLeftToRight in OSX's SDK and in WTF::Unicode. If
WTF::Unicode is imported into global scope those might clash and
this happens in some non-standard (extreme) jumbo configurations.

Since "using namespace" isn't allowed per the coding standard,
this just adds the WTF::Unicode namespace to those symbols
that need it.

Change-Id: I97c59e5ffed7d2bd0f8340f5d14b69dc532175d6
Reviewed-on: https://chromium-review.googlesource.com/978205
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545718}
bratell
Use ::testing to not get mixed up with ::blink::testing
There is both a ::testing namespace and a blink::testing namespace
and if you inside namespace blink says "testing", which one you
get depends on what the compiler knows. In jumbo builds compilers
often know about both namespaces and will assume you mean
::blink::testing.

To be sure to get ::testing, you need to prefix it with ::.

In the long run ::blink::testing should probably be renamed. Its
name violates the rule that no sub namespace should have the same
name as a common top level namespace.

Change-Id: I60857ebd08d4b35ce56212d03b4ed63045803402
Reviewed-on: https://chromium-review.googlesource.com/978004
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545717}
fs
[PE] Don't reparse "restart" and "fill" repeatedly
Rather than doing an attribute lookup in GetRestart() and Fill(), just
map the attributes in ParseAttribute.
Also get rid of the static AtomicStrings.

Noticed while looking at the referenced bug.

Bug: 823473
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I19d1244c6034430c30e65c09e20c8f04552b1e5f
Reviewed-on: https://chromium-review.googlesource.com/978246
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#545686}
fs
[PE] Restore LayoutObject check in SVGElement::NotifyIncomingReferences
When an element has incoming references that are not in the layout tree
(like an element animated by [multiple] SMIL elements), the overhead of
the hash set insert/erase can be noticable (like for instance in
balls_svg_animation.html.)

Bug: 661598, 769774, 823473
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I8a5879186dabd5e071f708ac953b8f1e91b62847
Reviewed-on: https://chromium-review.googlesource.com/978213
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#545467}
bratell
Avoid having duplicate StopLoadingInBackgroundEnabled()
This is a jumbo compilation fix. A couple of hours ago a second
StopLoadingInBackgroundEnabled() was added which in jumbo builds
where *.cc files are compiled together caused a compilation failure.

The function is small enough to be inlined so that is what this patch
does here and at the original place it was copied from.

Bug: 820634
Change-Id: I09d8fe48f4573d67b353eda563abad54c2325769
Reviewed-on: https://chromium-review.googlesource.com/978001
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#545446}
pkalinowski
Do not use null Uri for camera intent
In case of failure to create a temporary image capture file,
GetCameraIntentTask#onPostExecute will receive null Uri. For capture
fields, this was already handled by aborting file selection.

However, in remaining cases, it would result in an attempt to add this
null Uri as EXTRA_OUTPUT and to convert it to ClipData. The latter
results in NullPointerException.

This change skips processing null Uri in remaining cases. Camera
intent without an Uri can only return small version of the image
directly as a bitmap, but that is unlikely what user can work with
and the rest of the code is not prepared to handle it anyway.

So, abort if mDirectToCamera == true, as there is no useful intent
to show. Otherwise, proceed with null as a camera intent which
will still enable other modes of file selection. This is also
in line with the behavior before the introduction of
GetCameraIntentTask.

Bug: 821440
Change-Id: Ib4024c406bbcaf560e5cdde584c317f1ab6477d2
Reviewed-on: https://chromium-review.googlesource.com/960722
Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545440}
wdzierzanowski
Add missing dependency on ppapi_plugin_sources
content_main_runner.cc uses the functions PpapiPluginMain() and
PpapiBrokerMain() from //content/ppapi_plugin/ when
(!is_multi_dll_chrome && enable_plugins) is true.

This fixes the linking of app_shell_helper_app_executable on macOS in a
static jumbo build after
https://chromium-review.googlesource.com/958282.  The error was
https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.fyi%2FJumbo_Mac%2F14982%2F%2B%2Frecipes%2Fsteps%2Fcompile%2F0%2Fstdout

BUG=367595

Change-Id: If2dab9414a780aa4f60a70153042608f225b37c0
Reviewed-on: https://chromium-review.googlesource.com/977682
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Wojciech Dzierżanowski <wdzierzanowski@opera.com>
Cr-Commit-Position: refs/heads/master@{#545396}
fs
[CI] Move InvalidationMode to SVGResourceClient; pass to clients
In preparation for always invalidating through SVGResourceClient.

TBR=fserb@chromium.org

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I733987de91d1051a72652aba3115e387dc909dbf
Reviewed-on: https://chromium-review.googlesource.com/976063
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545393}
bratell
Reuse existing constants for Android SDK versions
There are constants for Android SDK versions in build_info.h
so nobody has to declare their own. This changes some duplicated
custom constants that clashed in jumbo builds to use the
global constants.

Bug: 598880
Change-Id: I32bc147729e561130eaaf4feab545bd0cd9714c1
Reviewed-on: https://chromium-review.googlesource.com/975641
Reviewed-by: Bo <boliu@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#545069}
fs
[CI] Add LayoutSVGBlock::GetElement helper
Like the equivalent helper on LayoutSVGModelObject, this provides a more
specific type of Node (an SVGElement), since is guaranteed for
subclasses of LayoutSVGBlock.
Also update the documentation in LayoutSVGModelObject to reflect the
current name.

Bug: 769774
Change-Id: I720af53e5a24e960773059f7d2a113e74bd5bdc5
Reviewed-on: https://chromium-review.googlesource.com/973378
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545034}
fs
[CI] Use ToReferenceClipPathOperationOrNull instead of IsReferenceClipPath
Since DEFINE_TYPE_CASTS now provide a To<type>OrNull, we can use that
instead of essentially open-coding the same thing.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I22113ff36a406d0afc17e5ecf37158e1dec1fe8e
Reviewed-on: https://chromium-review.googlesource.com/973376
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#544833}
fs
Remove one hash lookup in SVGResourcesCycleSolver
Make use of the return value from HashSet::insert to eliminate the
preceding Contains().

Bug: 534817
Change-Id: I07ccfb26310801fd7534278550479df299f43d15
Reviewed-on: https://chromium-review.googlesource.com/970961
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#544550}
fs
[PE] Don't use callbacks for SVGElement::NotifyIncomingReferences
Dispatch overhead is high.

Bug: 661598, 769774, 823473
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I4b200d0076c209584a033be810f95c504e81c102
Reviewed-on: https://chromium-review.googlesource.com/970422
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#544431}
fs
Make TranslateTransformOperation::X/Y return const Length&
Also eliminate a few copies in TranslateTransformOperation::Blend.

Change-Id: Icb390e3da70e2c3b651c34758f8e0fefa7bb4484
Reviewed-on: https://chromium-review.googlesource.com/970821
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#544377}
bratell
Followup WorkerModuleFetchCoordinater, move test code to shared file
Both the new and old code use an identical ClientImpl test class.
In jumbo builds those end up in the same translation unit and
it won't compile. This patch moves the class to a shared file
WorkerFetchTestHelper.h

Bug: 680046
Change-Id: Iabe58f2f2c93e4d77fb36c8c454952af994d302c
Reviewed-on: https://chromium-review.googlesource.com/968363
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544077}
fs
[CI] Restructure SVGResourcesCycleSolver
Restructure the code so that traversing a LayoutObject's resources is
shared, and rename ResourceContainsCycles to TraverseResourceContainer.
Hoist the side-effects (clearing out resources with cycles) to the
caller.

Bug: 534817, 769774
Change-Id: Icd8200a2cd9073487479e32827a9fdeb1d8d04c4
Reviewed-on: https://chromium-review.googlesource.com/966661
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#544037}
bratell
Manually inline the IsTouchOptimized method to avoid jumbo clashes
There is a common helper method IsTouchOptimized() that is a shortening
of ui::MaterialDesignController::IsTouchOptimizedUiEnabled(). That
helper method is placed in anonymous namespaces which are merged in
jumbo builds, causing clashes.

Alternatives are to find a shared location for this method (maybe in
//ui?) or inline it. This patch inlines it.

Bug: 803406
Change-Id: Ia389432bfdb506d27b625c916a9baf73b7b70f30
Reviewed-on: https://chromium-review.googlesource.com/966204
Reviewed-by: Bret Sepulveda <bsep@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#543939}
bratell
Give two kTextContext unique names for jumbo builds
There are two different kTextContexts in chrome/browser/ui, living
in different namespaces that in jumbo builds become the same
namespace. This patch renames them so that they have
unique names.

This affects Opera builds but not Chrome builds yet since jumbo
is not yet supported in chrome/browser/ui in Chrome.

Bug: 803406
Change-Id: I3354881b9dedae9499356800cbaed4de3cc0da4c
Reviewed-on: https://chromium-review.googlesource.com/966202
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#543938}
fs
[CI] Cleanup SVG <pattern> attribute collection
Move the 'href' lookup to a helper function (as seen in the very similar
SVGGradientElement.) Use a similar setup in SVGGradientElement
equivalent method.
Move attribute synchronization from LayoutSVGResourcePattern into
SVGPatternElement::CollectPatternAttributes.
Change the SetPatternAttributes helper to take a SVGPatternElement
reference.
Remove the element null-check in the LayoutObject.

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I16901de05437bbeea1981f5340bec1a3e4329b50
Reviewed-on: https://chromium-review.googlesource.com/966221
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#543709}
bratell
Have git ignore the third_party/llvm-bootstrap-install dir
third_party/llvm-bootstrap-install is sometimes created by
tools/clang/update.py and should not disturb git.

Change-Id: Id30390bc0e15e69661828f0124c08475539e3490
Reviewed-on: https://chromium-review.googlesource.com/966421
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#543687}
fs
[CI] Stop tracking <*Gradient> 'href' references through SVGResources
Gradient resources are currently only using the 'linked' resource in the
SVGResources object for cycle breaking and change notifications. The
SVG*GradientElements also perform cycle breaking on their own,
disregarding what SVGResourcesCycleSolver has done. The 'href's
themselves are what risk introducing cycles for gradients at the moment,
so handling them explicitly (as is already done) doesn't add any
additional complexity. Mixing resources defined by the DOM with those
defined by style does add complexity though.

This CL stops tracking <*Gradient> href's using SVGResources, and starts
tracking them using an IdTargetObserver in SVGGradientElement, much like
how similar 'href's are tracked.

Bug: 661598, 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I5538ede4170c7181098fe2308dbfa640506334f4
Reviewed-on: https://chromium-review.googlesource.com/880965
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543685}
bratell
Solving jumbo build offline_pages clash with base::DoNothing()
Too many SavePageLaterCallback functions caused problems in
jumbo builds. Since two of the three were just empty functions
this patch replaces them with base::DoNothing()

Change-Id: Ie9c939ee10674cdab77aab0a9ade65d70293fb0c
Reviewed-on: https://chromium-review.googlesource.com/964441
Reviewed-by: Cathy Li <chili@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#543397}
tmoniuszko
Fix crash on ResetWindowControls with no non-client view
Crash happens when Widget with no non-client view (for example
TYPE_WINDOW_FRAMELESS) is being shown on Windows 7 with Aero Glass
disabled.

This is a regression introduced by
https://chromium-review.googlesource.com/924315.
ResetWindowControls is called from HWNDMessageHandler::OnSysCommand.
Previously it wasn't called if non-client view was null because
ShouldHandleSystemCommands returned false in such case.

Bug: 189112
Change-Id: Ia12013ab11fd67dd28bcaf5d490c846928569a78
Reviewed-on: https://chromium-review.googlesource.com/960029
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543350}
bratell
Disable blink pch for jumbo builds
pch makes jumbo builds slower instead of faster since each
pch file will only be used 1-3 times instead of many times, and
in Blink the pch files contain a lot of code so creating them
takes a long time.

This saves about 20% of the Blink build time on Windows.

Bug: 809010
Change-Id: Ia512646110572e4939e8e3cc1a9cd946b780cb97
Reviewed-on: https://chromium-review.googlesource.com/962785
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#543335}
fs
Refactor computed <paint> value handling
Combine all the fields that make up a <paint> into a class: SVGPaint.
Move the bulk of the style builder function for <paint> from the
template to StyleBuilderConverter. This should make future work on
<paint> resolution easier.
Also split the existing setters on {SVG,}ComputedStyle to avoid having
bools to indicate if the "visited" portion should be set or not. The
new way more closely resemble other color properties.
Add accessors to SVGPaint to both make code easier to read, and reduce
the dependence on SVGPaintType.

Bug: 769774
Change-Id: Ifad043c9e423f0fc7aa79fef78e635b2abb4636c
Reviewed-on: https://chromium-review.googlesource.com/961062
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#543333}
bratell
Drop a couple of unused files that broke certain jumbo builds.
A completely unused object file in a static library will be
ignored by the linker, but with jumbo builds unused cc files will
be grouped with used cc files and the object file will no longer
be ignored.

If the cc file contains code that is bad it can then trigger followup
linker errors which happened in this case where debug component
windows builds had too many constructors and destructors for
WebAssociatedURLLoader when building webkit_unit_tests.exe

Change-Id: I16a0332b9e16903481c2995f2176e59a1ba8e53e
Reviewed-on: https://chromium-review.googlesource.com/955850
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#542843}
fs
[CI] Transition ReferenceFilterOperation to SVGResource
This CL transitions the ReferenceFilterOperation (used for 'filter')
from SVGElementProxy to SVGResource. It introduces ExternalSVGResource
as a new subclass of SVGResource.
ExternalSVGResource handles loading of an external document, and
notifies clients as needed when said document finishes loading.

Since this leaves SVGElementProxy unused, it is removed together with
some related structures. This also allows some code to be simplified
because we no longer need a TreeScope (or Node) in some places.

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: If6cbbf32e0269878bdea897fcf0b8e41c062b0f6
Reviewed-on: https://chromium-review.googlesource.com/955684
Reviewed-by: Fernando Serboncini <fserb@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#542822}
bratell
Give some g_delegate variables unique names
In jumbo builds, many files share the same anonymous namespace
so having a file local symbol name might still clash with other
files having the same file local name.

This patch renames a couple of g_delegate variables that caused
clashes in some (non-default) jumbo configurations.

Bug: 746957
Change-Id: I732d7223be88d4871a4ae7294377bc558a2ac2ca
Reviewed-on: https://chromium-review.googlesource.com/957727
Reviewed-by: Joshua Pawlicki <waffles@chromium.org>
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#542767}
ppluciennik
Improved GN code related to resolving paths.
Moved most of the logic related to resolving paths
to ResolvePath and ResolveRelative in filesystem_utils.cc.
Improved SourceDir class to return std::string with resolved path
for cases when returning SourceDir or SourceFile wasn't really needed.

R=brettw@chromium.org, dpranke@chromium.org

Bug: 819720
Change-Id: Ia59da00e83de45431762ebb19a9153471f7e91e3
Reviewed-on: https://chromium-review.googlesource.com/953422
Reviewed-by: Brett Wilson <brettw@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542692}
fs
Use the same initial type for both 'fill' and 'visited fill'
The initial value used here shouldn't make a difference, so use the
initial value of 'fill' since that looks less confusing. It will also
simplify conversion to a different computed <paint> representation.

Bug: 769774
Change-Id: I5a08f73d4affc28f5804f3c3164051197721b2a4
Reviewed-on: https://chromium-review.googlesource.com/959009
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#542552}
bratell
Add an llvm work directory to .gitignore
Change-Id: I2a22b99caa64cc0d1c3b8d74425375b76b1dca67
Reviewed-on: https://chromium-review.googlesource.com/957737
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#542511}
fs
Don't invalidate client in SVGResourcesCache::ClientDestroyed
We're just about to destroy said object, and since this is only issuing
"local" (client-only, no ancestors) invalidations they will have no
effect.

Bug: 769774
Change-Id: Ib8d0afecb65a80bd89990906940e792cadcc2dcb
Reviewed-on: https://chromium-review.googlesource.com/958903
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#542505}
bratell
Update clang docs since the old text was pre-Win-clang

Change-Id: I9ce1985082125ab6099f3576d6742aaed73d21d7
Reviewed-on: https://chromium-review.googlesource.com/958165
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Hans Wennborg <hans@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#542487}
bratell
Fix mixup in expected/got in include guard presubmit check
Bug: 814776
Change-Id: If68e4015c54a0b60f9a68b7941fb3e5d14b58502
Reviewed-on: https://chromium-review.googlesource.com/958466
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#542469}
fs
[PE] Add "image/apng" to supported image MIME types
Supported for animated PNG (APNG) was added via crbug.com/437662 (commit
7d2b8c45afc9c0230410011293cc2e1dbb8943a7.) The "image/apng" MIME type is
included in the "Accept" header for image requests.

Add "image/apng" to kSupportedImageTypes to allow things like the
<picture> element to work (select an appropriate image based on 'type'.)

Add "image/apng" to kPrimaryMappings to allow the MIME type to resolve
to a reasonable file extension.

Bug: 730588
Change-Id: I070e8b16dc8312552b11dc32e776493b3a5be669
Reviewed-on: https://chromium-review.googlesource.com/957092
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Asanka Herath <asanka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542113}
bratell
[jumbo] Windows build fix related to INITGUID
Generating GUID objects in a binary requires careful juggling
of includes and the define INITGUID (or the header <Initguid.h>).

Jumbo builds are not that careful so the simplest/best solution
is to remove the file doing INITGUID from jumbo compilation.
This manifested itself in jumbo fyi builders building
catalog_viewer_service.exe.

TBR=dtapuska@chromium.org

Bug: 657623
Change-Id: I1457727a0b3a68f82726a2e73c1ae3dedb06f12d
Reviewed-on: https://chromium-review.googlesource.com/955690
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#542108}
bratell
Fix jumbo+Win compilation error related to the PostMessage macro
PostMessage is a macro in Windows and depending on whether Windows
headers have been included or not, PostMessage will either be
treated as PostMessage or PostMessageW. We use a special header
windows_types.h to ensure that the macro is always defined
so that there will be no compilation or linking issues missing
either PostMessage or PostMessageW objects.

Bug: 772713,813749

TBR=leon.han@intel.com

Change-Id: I0012774f347ef2e257bc87b4492f58c7be464f78
Reviewed-on: https://chromium-review.googlesource.com/957028
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#542092}
fs
[CI] Split out LocalSVGResource from SVGResource
In preparation for adding an SVGResource subclass for external resources
this splits out a LocalSVGResource subclass from SVGResource and renames
usages appropriately. This is mostly to eliminate "noise" from a follow-
up CL.

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I479ca0445e4eba5f0ba2b727460dfcda776347b8
Reviewed-on: https://chromium-review.googlesource.com/955463
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#542075}
fs
Transition ReferenceClipPathOperation to SVGResource
This CL replaces the use of SVGElementProxy in
ReferenceClipPathOperation with SVGResource. The main change between the
two is when the element reference is resolved ("when used" versus
"when computed".)

This also, by extension, adds infrastructure for invalidation and other
things required to make SVGResource work.

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ia43f76256a251a15c4dc100461cff9bf728eb188
Reviewed-on: https://chromium-review.googlesource.com/951613
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541771}
fs
[SPv175][PE] Antialias clips for PaintChunks (and FloatClips)
ClipDisplayItems would use/generate antialiased clips, so it makes sense
to carry that bit (literally) forward.
Also update the FloatClip display item code-path for consistency.

Bug: 814876, 819617
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I1433804bd5734857116e613c2342c49d42499ecb
Reviewed-on: https://chromium-review.googlesource.com/934450
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541482}
bratell
Rename devtools GetCommandLine (A Win32 macro)
GetCommandLine is a win32 API macro defined to GetCommandLineW.
Depending on whether <windows.h> is included of not, code using that
name will either get the intended name or GetCommandLineW.

In some build configuration this caused problems when a base class had
GetCommandLine() but the sub class by accident defined
GetCommandLineW.

This patch renames it to GetBrowserCommandLine() which also matches
its more exact documentation.

Change-Id: I882b3f650c97802ec7618a797f93f22e9788078f
Reviewed-on: https://chromium-review.googlesource.com/951584
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#541406}
mharanczyk
Fix linking problems caused by //content/test:test_support target on win.
//content/browser/accessibility/accessibility_event_recorder_win.cc in
this target is missing required lib on win in component builds.
In non-component oleacc.lib is added indirectly through
//content/browser:for_content_tests -> //content/browser dependency chain.

The change fixes missing AccessibleObjectFromWindow symbol linking error
for content_unittests and webkit_unit_tests in component build.

BUG: 818856
Change-Id: I1253bbbff5ca346f2fe4f81d0fc71834bb158222
Reviewed-on: https://chromium-review.googlesource.com/951383
Commit-Queue: Marek Haranczyk <mharanczyk@opera.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541396}
bpiekny
Remove time dependency from NavigationSimulator
This commit solves issues related to low resolution timers in
content_unittests.

Bug: 791910
Change-Id: If572f967034354ab3d1261c4a576736bc7ba9ac5
Reviewed-on: https://chromium-review.googlesource.com/808586
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Bartosz Piękny <bpiekny@opera.com>
Cr-Commit-Position: refs/heads/master@{#541386}
fs
[CI] Make SVGResource have an IdTargetObserver rather than be one
This switches SVGResource away from inheriting IdTargetObserver, and
makes it have one as a member instead. This should make future
subclassing of SVGResource easier (avoiding GC mixins.) It also has the
side-effect of allowing the SVGURIReference framework to be reused.

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I77fed36a06b846f3cd4cbb7722faa3de1b081f59
Reviewed-on: https://chromium-review.googlesource.com/947956
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#541205}
bratell
Resolve conflict between base::StrCat and Win32 StrCat
StrCat is a Win32 API function and it uses a macro to redirect
StrCat calls to StrCatW. That macro will be available when
shlwapi.h has been included but not otherwise so mentions of
StrCat will sometimes refer to StrCat, and sometimes to StrCatW.

This patch makes it always be StrCatW as in many other functions.

Alternatives are to rename base::StrCat or undef StrCat whenever
shlwapi.h is included.

Bug: 817738
Change-Id: I6fca88d7514867ef15e63c8498ddac6a5e9f43dc
Reviewed-on: https://chromium-review.googlesource.com/950923
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#541122}
bratell
Hide AddToList from X11 headers since dom_distiller uses that name
components/dom_distiller uses the name AddToList which makes it hard
to combine with X11 headers. It doesn't happen in Chromium but it
happens in jumbo builds in Opera (any maybe in Chromium in the
future).

Bug: 782184
Change-Id: I546c254ed85fbfa86cd0ba06ddd294884c8ba6de
Reviewed-on: https://chromium-review.googlesource.com/950780
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#541120}
fs
[CI] Move invalidation out of SVGResources::RemoveClientFromCache
This pushes the actual call to MarkClientForInvalidation out of said
function, leaving it to callers to perform the invalidation.

Bug: 769774
Change-Id: Ib9063899da132a8f31290205ace6a52d5fc8457b
Reviewed-on: https://chromium-review.googlesource.com/946092
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540903}
fs
[CI] Split kLayoutAndBoundariesInvalidation into two flags
Since we already have a kBoundariesInvalidation flag, this means we just
need to rename kLayoutAndBoundariesInvalidation and convert all uses to
bitwise-or the two flags.
The mask/bit checks in MarkAllClientsForInvalidation are adjusted to
reflect this change as well.
A typedef is added to try to better convey that something is a mask and
what of.

Bug: 769774
Change-Id: I30b69458aea8eaea1a3b6b3d023f18d21f2f51f4
Reviewed-on: https://chromium-review.googlesource.com/945928
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#540854}
bratell
Compile fix: Remove chrome_proximity_auth_client.cc
chrome_proximity_auth_client.cc uses easy_unlock_service which
was just moved to be ChromeOS only so chrome_proximity_auth_client.cc
needs to be as well.

If it's compiled and not completely ignored by the linker (most of
the time but not in jumbo builds), it will break the build.

TBR=jhawkins@chromium.org

Bug: 817115
Change-Id: I606cf0958beb6a736bf0717471a6542adde4dc73
Reviewed-on: https://chromium-review.googlesource.com/947962
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#540751}
bratell
Made some ui/gl ValidFormat functions into static methods
gl_image_memory.cc and gl_image_native_pixmap.cc would compile
together in a ui/gl jumbo build (not yet supported) and then the
ValidFormat methods would clash and prevent compilation.

This patch moves the functions into the classes that use them.

Bug: 773275
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I6f031d0897fd0ef96c536e3e4c97245aa108a024
Reviewed-on: https://chromium-review.googlesource.com/939475
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#540553}
bratell
Use a more unique variable name than g_display
In ui/gl there are three different global variables named
g_display. As a preparatory change for jumbo support this patch
renames them g_glx_display, g_egl_display, g_wgl_display.

Bug: 773275
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ic469a886632be8bc711bec8359aa5e4fae5ea6a4
Reviewed-on: https://chromium-review.googlesource.com/939479
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#540552}
bratell
Add presubmit check for include guards
Missing include guards tend to break jumbo builds and makes
everyone involved sad so better to have a presubmit check for it.

There is a risk that this triggers on correct code so it includes
a way to disable it per source file. Include the string
"no-include-guard-because-multiply-included" and there won't
be any warning for that file.

By popular demand there will also be a warning if the name of
the include guard doesn't follow the coding standards, but since
mistakes are common, that check is only enabled for new files.

Bug: 814776
Change-Id: Id18b3d43288b9a064e537460d667957b355bbd33
Reviewed-on: https://chromium-review.googlesource.com/931761
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#540526}
bratell
Updating jumbo documentation.
The default chunk size is not 200 anymore, for a number of
months.

Change-Id: I8370e472628ddcf1c49bdc09d989bdadf3ea78b3
Reviewed-on: https://chromium-review.googlesource.com/946097
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#540517}
bpiekny
Make IsPatternValid available in site_settings_handler
Currently we have IsOriginValid available (AllowJavaScript) but
IsPatternValid doesn't have such call. Looks like we don't need
to have any specific state to call this method

Change-Id: I19c8747f09b5bdd332fb2ce7a209b584023c6a03
Reviewed-on: https://chromium-review.googlesource.com/941950
Reviewed-by: Dave Schuyler <dschuyler@chromium.org>
Commit-Queue: Bartosz Piękny <bpiekny@opera.com>
Cr-Commit-Position: refs/heads/master@{#540475}
fs
[CI] Sink invalidation out of LayoutSVGResource*::RemoveClientFromCache
This splits the various RemoveClientFromCache implementations into two
parts:

 1) removal of cached data from the resource, and
 2) invalidation of the client.

This avoids triggering invalidations as a side-effect of cache-
invalidation, and separates concerns to help future refactorings. This
also means that resources that perform no caching, or no per-client
caching, need not override RemoveClientFromCache, but can use a default
implementation.

Since a kParentOnlyInvalidation argument to MarkClientForInvalidation is
a no-op, it is removed in the relevant code-paths.

LayoutSVGResourceContainer::MarkClientForInvalidation is made static to
enable its use outside resource containers themselves.

RemoveClientFromCache gets a new semantic in that it returns a bool
indicating if anything was cached for the client (this is currently
needed for invalidation of clients of filters.)

Bug: 769774
Change-Id: I8deeaef8fdd46e6dcc171100e8d6394df483e232
Reviewed-on: https://chromium-review.googlesource.com/941332
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#540193}
fs
[PE] Pixel snap fragment clips
Noticed while enabling AA for clips (in general.) This should prevent
regressing a few multicol tests when enabling AA clips.

Bug: 814876
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I06ad3aa535e7ba0781f0f78fb80e43d8b68d70e4
Reviewed-on: https://chromium-review.googlesource.com/937518
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539838}
bratell
Corrected reused include guards
If the same include guard is used twice, it becomes impossible
to include both those headers in the same translation unit and
that can be hard to debug and understand. This patch renames
some include guards that have the same names (copy/paste) as
existing include guards.

Found while working on a PRESUBMIT test for include guards. It will
not warn for these things, but it was easy to add that test locally.

There are another few thousand files that have wrongly named
include guards. Left as an exercise to the reader.

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ic7ba08558d3fbae0d3bee843f3092d472f8c643b
Reviewed-on: https://chromium-review.googlesource.com/937712
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#539800}
fs
[PE] Make SVGGeometryElement handle 'pathLength' mutations
Since the 'pathLength' attribute moved to SVGGeometryElement, so should
the attribute mutation handling.

Bug: 815170
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I04bc19988f80f3c3fe4810897e3003403c6997c6
Reviewed-on: https://chromium-review.googlesource.com/939625
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539794}
bratell
Jumbo build fix: wincrypt.h and openssl clash
wincrypt.h and OpenSSL headers define the same macros (until
a later version of OpenSSL at least) so therefore we need to
include crypto/wincrypt_shim.h instead which hides the clashing
macros.

TBR=pmonette@chromium.org

Bug: 746957
Change-Id: I629859f8e381ccadfdf9b6d811330bd8fc35be95
Reviewed-on: https://chromium-review.googlesource.com/940225
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#539791}
fs
[CI] Referencify MarkForLayoutAndParentResourceInvalidation
Cleanup some (now) unnecessary explicit 'this' dereferences as well.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I49238bf7b32760e5a05f6b6ce41557d34423ea45
Reviewed-on: https://chromium-review.googlesource.com/931508
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#539775}
fs
[CI] Share invalidation code for geometry presentation attributes
Much like for geometry attributes - of which these are a subset. Also
push the InvalidationGuard into the invalidation function.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ib9254d8ad930ef132c8074a7636eb57f18ae22d5
Reviewed-on: https://chromium-review.googlesource.com/932122
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539460}
bratell
Fix broken forward declaration that introduced a clashing namespace
A forward declaration claimed there was a ::viz::cc:CompositorFrame
class, and that introduction of a namespace ::viz::cc caused
confusion with the ::cc namespace and compilation errors in
some jumbo build configurations.

The real CompositorFrame is in viz::CompositorFrame so fixing
the forward declaration also removed the namespace clash.

Change-Id: I1cd4fe729591855172f5a07aca2e2c7f3e8db9fa
Reviewed-on: https://chromium-review.googlesource.com/939390
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#539441}
fs
Remove ImageElementBase::SourceDefaultObjectSize
After https://chromium-review.googlesource.com/716679, this method has
no callers. Remove it.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I3e2f427c8349bfa410718cd24782f64c7ad2e0e0
Reviewed-on: https://chromium-review.googlesource.com/735861
Reviewed-by: Fernando Serboncini <fserb@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#539306}
fs
[CI] Factor out common "geometry attributes invalidation" code
All the SVGGeometryElements share the same code-sequence for
invalidation of attributes that define the geometric shape.
Move this code to SVGGeometryElement::GeometryAttributesChanged.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I78eabe6245eff618dff810d7bcfc120b9a99f545
Reviewed-on: https://chromium-review.googlesource.com/931802
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#539218}
bratell
Correct some include guards found by PRESUBMIT test
There is a PRESUBMIT test coming for include guards and these
are some of the files that trigger that test. Both because of
code outside the include guard (bug) and slightly wrong syntax
for the #define (irrelevant).

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_vr;master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I486fd56d6ef506064cda38504728771549ebc6fb
Reviewed-on: https://chromium-review.googlesource.com/937709
Reviewed-by: Christopher Grant <cjgrant@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#539210}
fs
[CI] Reduce LayoutSVGResourcePaintServer dependencies on LayoutObject
In preparation for passing/using an SVGResourceClient as the 'client',
make sure the LayoutObject& is only used as a cache key by extracting
and passing the object bounding box as a separate argument.

Bug: 769774
Change-Id: I673ef74f2e65d645037a65d85e75846f37d3859b
Reviewed-on: https://chromium-review.googlesource.com/931465
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#539206}
bratell
Fix "shadow" warning/error in jumbo builds
There are local variables named next_id so having a global
variable with that name triggers -Wshadow warning. This
patch renames the global next_id -> g_next_indexed_db_connection_id.

Change-Id: I31925418e69999ea789fef856058ab66125f60fa
Reviewed-on: https://chromium-review.googlesource.com/937206
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539184}
bratell
Correct some broken include guards.
Found while working on a PRESUBMIT test for include guards.

Change-Id: Ib622cbaae28c48a469337076b57f5139971baff5
Reviewed-on: https://chromium-review.googlesource.com/932662
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#539155}
yorenault
[Linux] Only mark event as handled when it is actually handled
views::View that don't have a context menu controller
still mark the click event as handled,
forbidding further processing of this event.

Bug: 814666
Change-Id: Ie9ab6e0f0e573a4d653a52995421ac1075c686fb
Reviewed-on: https://chromium-review.googlesource.com/925269
Reviewed-by: Elliot Glaysher <erg@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538835}
bratell
Rename a couple of g_instance to allow extreme jumbo
We just got two g_instance in //base and to allow the whole of
base to compile in a single translation unit (not a default
configuration even among jumbo users) it's better if they
have unique names.

Bug: 775547
Change-Id: Ie1a1a856932ae46bde754878108097a94e6e00c6
Reviewed-on: https://chromium-review.googlesource.com/931121
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#538512}
bratell
Add include guard to WebFontTypefaceFactory.h
Newly added header missing include guard. There is a presubmit
check coming to catch these since they break some builds.

TBR=drott@chromium.org

Change-Id: Ie705b6b3404bcb67d829bcc1a7ba449daf1cb277
Reviewed-on: https://chromium-review.googlesource.com/931881
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#538503}
bratell
Removed unused line of code in merge_for_jumbo.py
Change-Id: I27525f1c02214fdb6fc04564abc417cdb472ee53
Reviewed-on: https://chromium-review.googlesource.com/931464
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538479}
bratell
Be explicit when mixing ::switches and ::headless::switches
There is both a ::headless::switches and a ::switches
namespace and if they are both known then "switches" inside
::headless will refer to ::headless::switches. This happens
in some jumbo build configurations.

with the same name as a top level namespace for this reason but
there are some such cases in the code that would be non-trivial
to change.

Note: The style guide strongly discourages using sub namespaces
Change-Id: I0c35abbb43caa53e725cc44a80b93083123374fa
Reviewed-on: https://chromium-review.googlesource.com/931125
Commit-Queue: Eric Seckler <eseckler@chromium.org>
Reviewed-by: Eric Seckler <eseckler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538424}
jl
Reland "Enable jumbo/unity build for //content test support targets"
This is a reland of a20415fc04f992b5e7e0d600572589c0317fdd95.

Original change's description:
> Enable jumbo/unity build for //content test support targets
> 
> Change-Id: Ibc5e0d946c57a4a3be7fc24a9c0773ec830514f0
> Reviewed-on: https://chromium-review.googlesource.com/922822
> Reviewed-by: Scott Violet <sky@chromium.org>
> Commit-Queue: Jens Widell <jl@opera.com>
> Cr-Commit-Position: refs/heads/master@{#537257}

Change-Id: I09ad8c813e0b2f7dfec9a867f4b4b1a5e9092b12
Reviewed-on: https://chromium-review.googlesource.com/925604
Reviewed-by: Dave Schuyler <dschuyler@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#538118}
jl
Rename one BlobStorageContextGetter function
In jumbo/unity builds, it conflicts with the function with the same
name that is declared in content/browser/download/download_utils.h.

Change-Id: I6e19c76dca926fbd13ae2c804b92ab454fe2d0dc
Reviewed-on: https://chromium-review.googlesource.com/926343
Reviewed-by: Nick Carter <nick@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#538093}
fs
[CI] Use color enumeration in SVGPaintContext::PaintForLayoutObject
The code in its current form gives the impression that there's a
dependency on the initial value of the 'fill' property, while all we
really want to say here is 'black'. Use a more direct approach.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ib75ba965c585771e9a009f91f0055a592a37c1b0
Reviewed-on: https://chromium-review.googlesource.com/926845
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#537861}
jl
Enable jumbo/unity build for various //extensions targets
Change-Id: I4685aaade618b0ea68750688eeca2fc0d24364c9
Reviewed-on: https://chromium-review.googlesource.com/922821
Commit-Queue: Jens Widell <jl@opera.com>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#537786}
bratell
Remove unused includes that collide with OpenSSL includes.
wincrypt.h and OpenSSL can't be in the same translation unit
since both define X509_NAME. There is a crypto/wincrypt_shim.h
to use instead of wincrypt.h but in this case the includes were
left by mistake when code moved elsewhere and can be removed.

This fixes jumbo build in Windows.

TBR=pmonette@chromium.org

Bug: 746957
Change-Id: I3fa0dadaf8e423302c353bfb7bc7e5484b58ff68
Reviewed-on: https://chromium-review.googlesource.com/924223
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#537625}
jl
Generate jumbo source files into `invoker.target_gen_dir`
This typically means a path based on the directory containing the
BUILD.gn file that defined the jumbo target, which generally makes
sense.

The old solution of finding a suitable directory by looking at the
directories containing the target's source files can generate the
same name for multiple targets, meaning such targets can't all be
jumbo enabled. This is rare, but is the case for the targets

  //extensions:test_support

and

  //extensions/browser:test_support

since the former has source files from //extensions/browser/ that
end up being used as the target directory.

Change-Id: Ie0c9ee2fcef25c6b0705e0fed3f1dce060459537
Reviewed-on: https://chromium-review.googlesource.com/924023
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#537623}
bratell
Prevent OpenSSL and msi.h clashes by setting _MSI_NO_CRYPTO
third_party/OpenSSL and msi.h both indirectly define X509_NAME so
to have avoid them clashing, tell msi.h to not include wincypt.h where
X509_NAME is set.

This became a problem in jumbo builds where msi_util_win.cc was grouped
with code using browser_process.h which includes openssl headers.

Bug: 746957
Change-Id: Ibaaf60ab6b5b46f9a86e90e0f5a7de9d4ecd57d7
Reviewed-on: https://chromium-review.googlesource.com/924072
Reviewed-by: Patrick Monette <pmonette@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#537304}
bratell
Support jumbo in chrome/browser, saving another 10% compile time
Of the code pieces left to add jumbo support to, the one which benefit
the most from jumbo is //chrome/browser:browser which goes from 90 to
10 CPU minutes, a reduction of more than a CPU hour. This is about 10%
of the total effort compiling chrome+content_shell+blink_tests.

In jumbo builds many cc files compile in the same translation unit
which reduces the time spent generating debug data and machine code
for headers, as well as the time to actually process the headers.

Bug: 746957
Change-Id: I856f3fca1f16fa2b0738678444c455c303985962
Reviewed-on: https://chromium-review.googlesource.com/899368
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#537284}
jl
Enable jumbo/unity build for //content test support targets
Change-Id: Ibc5e0d946c57a4a3be7fc24a9c0773ec830514f0
Reviewed-on: https://chromium-review.googlesource.com/922822
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#537257}
fs
Simplify/improve ElementStyleResources "is sprite" heuristic
The HasBackgroundImage check is redundant because the helper function is
called within an equivalent check.
Also change so that current layer is checked, rather than always
checking the first (top-most) layer. Update the test to include a case
where doing this will help.
Rename the helper method to BackgroundLayerMayBeSprite since it's no
longer operating on a ComputedStyle.

Change-Id: Ibfabfc4a3c68d042ab356f43cb6031697d4daf98
Reviewed-on: https://chromium-review.googlesource.com/852255
Reviewed-by: rajendrant <rajendrant@chromium.org>
Reviewed-by: Scott Little <sclittle@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#536998}
bratell
Jumbo compile fix: renamed two content/browser symbols
Recent additions created duplicate symbols in content/browser
of the variable g_url_loader_factory_callback_for_test and of
the method BlobStorageContextGetter. BlobStorageContextGetter is
a duplicate method but small enough that it's probably ok.

This renames one BlobStorageContextGetter to
BlobStorageContextGetterForStorage (lacking a suitable place for
sharing the method) and one of the
g_url_loader_factory_callback_for_test variables to
g_create_network_factory_callback_for_test to better describe what it
contains.

These errors don't appear in the jumbo configurations covered by
the bots because the files are far enough apart in file lists
to normally not be grouped with each other.

Change-Id: I17ecc36d2271c71f6b7affcc41ef4935b107743f
Reviewed-on: https://chromium-review.googlesource.com/915367
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536987}
bratell
[jumbo] Stop complaining about strange files in sources
People put lots of files in gn's sources lists. Rather than
being upset, jumbo should just live with it. They do no harm
and can be safely ignored.

Change-Id: I15c3930cfeb50e5bd7ce121ca7b7c17db088b63f
Reviewed-on: https://chromium-review.googlesource.com/916246
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#536978}
fs
Setting "" as <track> 'src' should fail the first time
When setting a track .src to "", we would resolve the URL to a null URL,
which matched the default initialized HTMLTrackElement::url_, meaning
that readyState was not advanced and no 'error' event fired in this
case.

Extend the "url == url_" check with a check for readyState differing from
'none'. Also rewrite HTMLTrackElement::getReadyState to avoid using
EnsureTrack().

Bug: 811713
Change-Id: Icd190492639c53e09a7e018202b69ac6e919a94c
Reviewed-on: https://chromium-review.googlesource.com/916004
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: srirama chandra sekhar <srirama.m@samsung.com>
Cr-Commit-Position: refs/heads/master@{#536685}
bratell
Renamed an enum value DEBUG->DEVTOOLS to avoid a Windows macro
Windows's ATL headers (atldef.h) does
#ifdef _DEBUG
#define DEBUG
#endif

which makes it hard to also use the word DEBUG in code that might
intentionally or accidentally be compiled with that header. This
happened in jumbo build experiments where many cc files are compiled
in the same translation unit for dramatically faster compilation.

This preparatory patch for jumbo in chrome/browser renames an
enum value from WebappInstallSource::DEBUG to
WebappInstallSource::DEVTOOLS.

Bug: 746957
Change-Id: I128018246b94310c0cee67eaa404ab7749bd3ae0
Reviewed-on: https://chromium-review.googlesource.com/902042
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#536325}
fs
[CI] Add SVGGradientElement::InvalidateGradient
Add a new helper method on SVGGradientElement that encapsulates the code
that invalidates the gradient data/cache. Use this method where
appropriate.

Add an InvalidateCacheAndMarkForLayout overload taking a
LayoutInvalidationReason to LayoutSVGResourceContainer, and use it in
SVGElement::InvalidateRelativeLengthClients and the new method, which
also takes a LayoutInvalidationReason to improve fidelity of reporting.

The change to use SVGGradientElement::InvalidateGradient in
ChildrenChanged constitutes a minor change in behavior since it
previously didn't have the SelfNeedsLayout() check. Said check should be
reasonable to have in this code-path as well though.

Bug: 661598, 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ia5c318a4df958960aabb56f71ad3c384791a46b0
Reviewed-on: https://chromium-review.googlesource.com/913688
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#536107}
fs
[CI] Move SVGTreeScopeResources::Resource to its own file
Make it no longer be an inner class and rename to it SVGResource.

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ifb60050cf6d3ebea360f00209031dbc7b0995d23
Reviewed-on: https://chromium-review.googlesource.com/911112
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#535780}
bratell
Added base::TimeToISO8601 and deleted all other instances
It is not uncommon to want to convert from base::Time to an
ISO-8601 string so instead of having half a dozen implementations,
it's better to have one implementation.

This was noticed in the jumbo project because two of
the implementations ended up in the same translation unit.

Bug: 746957
Change-Id: Ib88832c53930aff7a6c24a0df81afc28cbbecc35
Reviewed-on: https://chromium-review.googlesource.com/895456
Reviewed-by: Yuri Wiitala <miu@chromium.org>
Reviewed-by: Yoshiki Iguchi <yoshiki@chromium.org>
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#535691}
mpichlinski
Fixed missing mojo interfaces dependencies for bindings_modules_impl.
Bug: 803441
Change-Id: Ie076c368a0dbfb8178362bb8a79e29f0feff9197
Reviewed-on: https://chromium-review.googlesource.com/873642
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534968}
bratell
Jumbo build fix: Use unique names of constants in message_center
A recent CL got rid of the shared constants and instead copied
them to relevant files. To work in jumbo builds they must then
have unique names.

(The alternative to find a shared location for the constants
seems not applicable in this case)

Bug: 783018,723882
Change-Id: I8e64dcf56bfe74d30279549291e89bdec80bc3d2
Reviewed-on: https://chromium-review.googlesource.com/905304
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Mostyn Bramley-Moore <mostynb@vewd.com>
Reviewed-by: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534793}
fs
[CI] Reference-ify SVGResources/SVGResourcesCache
Make the SVGResources and SVGResourcesCache interfaces take a
LayoutObject& instead of a LayoutObject* where appropriate, and then
update users (transitively) as reasonable.

Bug: 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Idfa28bb01551332064ca1ab6d6260d29d3264145
Reviewed-on: https://chromium-review.googlesource.com/904529
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#534789}
bratell
Avoid using the Windows type SpeechRecognizerState
SpeechRecognizerState is an enum in the Windows platform
API for speech so using that name for a Chrome internal
type means that you get compilation errors if the platform
headers and the internal headers end up in the same
translation unit.

In jumbo builds that could happen (and in general it can also
happen) so this renames
SpeechRecognizerState -> SpeechRecognizerStatus
to avoid that.

An alternative would be to move the enum to a different, more
limited, scope.

Bug: 746957
Change-Id: I479470340ea2c582480b2692424a15bc6fb4581a
Reviewed-on: https://chromium-review.googlesource.com/901247
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: David Tseng <dtseng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534709}
bratell
Moved some duplicate password_manager constants into shared code
chrome/browser/password_manager had a couple of trivial constants
and helper functiosn defined multiple times.

In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. With multiple
definitions of a constant, with the same name, you get compilation
errors.

In preparation for jumbo in chrome/browser, this patch moves the
constants into the shared file and it removes a random
constant for "". The code doesn't normally use constants
for "".

Bug: 746957
Change-Id: I069e6c9e18b23ce4597c9f23aee829f85e2d17a1
Reviewed-on: https://chromium-review.googlesource.com/897814
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534438}
bratell
Only compile notification test code into tests
The file mock_itoastnotification.cc was compiled for the
chrome.dll binary instead of being in the test_support section
with the test-only code.

Noticed in jumbo build experiments since it ended up in a larger
obj file where the code was no longer ignored as before, ending
with a linker error because of inconsistent settings.

Bug: 746957
Change-Id: Ibf259cb729889f26226ff87b068fa1051898b11d
Reviewed-on: https://chromium-review.googlesource.com/901627
Commit-Queue: Peter Beverloo <peter@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534425}
bratell
Deduplicate some lookup keys in the profile keys
Some lookup keys were defined multiple times which caused problems
for jumbo build experiments.

In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
many variables with the same name will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch moves the
common constants into ProfileAttributesEntry so they can be used
by all the callers.

Bug: 746957
Change-Id: I58a4d4fb10834c50ec3dd0a6b03e10f284120bce
Reviewed-on: https://chromium-review.googlesource.com/895367
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534419}
bratell
Inlined a small media_galleries helper function
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. With multiple
definitions of an albeit small helper function, you get collisions
and compilation errors.

In preparation for jumbo in chrome/browser, this patch inlines the
helper function GetMTPDeviceDelegate since it's small, and could be
made smaller

Bug: 746957
Change-Id: I492606b21595c3ae5d961e260befdee2e0df0b5c
Reviewed-on: https://chromium-review.googlesource.com/901183
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534408}
bratell
Remove dead enum BrowserProcess
Nobody is using the BrowserProcess enum in
chrome/browser/memory_details_win.cc and in jumbo builds
it clash with the BrowserProcess class in
chrome/browser/browser_process.h.

Bug: 746957
Change-Id: Ib946dd4a05b36e99df070726e20672ca687393f2
Reviewed-on: https://chromium-review.googlesource.com/901602
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534393}
bratell
Renames two GetScoreDictForSettings methods
When building with jumbo many files are compiled in the
same compilation unit and then they will share the same
namespaces, including the anonymous namespace. If code
use the same names those will clash and cause compilation
errors.

There are two more or less identical GetScoreDictForSettings
methods, one in site_engagement_score.cc, one in
media_engagement_score.cc but since there is no
good place to merge them, this just renames them. These
files are now on a list to be refactored to solve the
code duplication.

Bug: 746957
Change-Id: I8e853e761df1c8c0a31c7f2064c0d70f0610d5f8
Reviewed-on: https://chromium-review.googlesource.com/868438
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Reviewed-by: Mounir Lamouri (slow) <mlamouri@chromium.org>
Commit-Queue: Mounir Lamouri (slow) <mlamouri@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534386}
bratell
Avoid using the Windows macro PLATFORM_UNKNOWN
windows.h defines a macro PLATFORM_UNKNOWN (value 0) which
means that if that word is used in a header, that header can't
be mixed with windows.h and still compile successfully.

This collision happened in jumbo experiment so to avoid that
this patch renames PLATFORM_UNKNOWN -> PLATFORM_UNSPECIFIED

Bug: 746957
Change-Id: Id2045a7682d499181d5ea53c4ceb3ed98236005b
Reviewed-on: https://chromium-review.googlesource.com/901266
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534382}
fs
[PE] Update/fix UA stylesheet for SVG roots in shadow trees
The the UA stylesheet would not set 'transform-origin' correctly for
<svg> outermost roots being direct descendants of the shadow root.

Update the UA stylesheet to fix this, and also match what's currently
specced by CSS transforms [1]. Removing prefixes as appropriate.

[1] https://drafts.csswg.org/css-transforms/#transform-origin-property

Bug: 808228
Change-Id: Ic36ce331797eb7ba80a046af88d22c08fe76d6fc
Reviewed-on: https://chromium-review.googlesource.com/901263
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534371}
bratell
Prevent FocusIn and FocusOut from leaking from x11.h
FocusIn and FocusOut are function names in parts of the code. To
make sure that X11 headers don't cause problems, even in jumbo
builds, this patch moves those constants to the x11 namespace.

Bug: 782184
Change-Id: I6c694557653c7c1119a134960a59a38a2670b103
Reviewed-on: https://chromium-review.googlesource.com/891322
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534270}
bratell
Deduplicate a helper function in android/ntp
The function GetRemoteSuggestionsScheduler was defined
twice which caused some problems for jumbo build experiments.

In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
a function twice (with the same name) will then result
in compilation failures.

In preparation for jumbo in chrome/browser, this patch moves the
helper function to its own file because no existing place seemed
to work fine.

Bug: 746957
Change-Id: I581c5f3815949081989156701c3591bcbf866782
Reviewed-on: https://chromium-review.googlesource.com/897613
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534269}
bratell
Inlined some kZeroTime constants in metrics/desktop_session_duration
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
the same constant twice with the same name will then result
in compilation failures.

In preparation for jumbo in chrome/browser, this patch inlines
the constants in chrome_visibility_observer.cc and
desktop_session_duration_tracker.cc.

Bug: 746957
Change-Id: I1b7d4b2f4a83a8a75c248f07199af6f4e72e87f5
Reviewed-on: https://chromium-review.googlesource.com/897533
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Gayane Petrosyan <gayane@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534198}
bratell
Gave three OnAcquireFileAccessPermissionDone their own names
In jumbo builds many cc files compile in the same translation
unit and if that causes there to be overloaded functions,
the address operator won't know what function's address the
code refers to. This happens in base::Bind, and results
in compilation failures.

In preparation for jumbo in chrome/browser, this patch renames
the three OnAcquireFileAccessPermissionDone to
OnDownloadAcquireFileAccessPermissionDone
OnThrottleAcquireFileAccessPermissionDone
OnOfflinePageAcquireFileAccessPermissionDone

Bug: 746957
Change-Id: I6bd1fa44e9cc1ab44d9bdb653dd8117280ff9325
Reviewed-on: https://chromium-review.googlesource.com/897943
Reviewed-by: Cathy Li <chili@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534197}
bratell
Deduplicate some chrome/browser/android constants and helpers
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
the same constants and helper functions in several files will
then result in compilation failures.

In preparation for jumbo in chrome/browser, this patch
deduplicates the GetWebContents() helper function and the constants
kOMADrmMessageMimeType, kOMADrmContentMimeType,
kOMADrmRightsMimeType1, kOMADrmRightsMimeType2.

Bug: 746957
Change-Id: Ie268f77c7a099a8de01ae08c70870306f38fc05a
Reviewed-on: https://chromium-review.googlesource.com/897612
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534182}
bratell
Deduplicated or renamed supervised_user variables
This is a preparatory patch for jumbo compilations where several
cc files are compiled in the same translation unit. Then you get
compilation errors if they all define their own kNumRetries and
kBackoffPolicy, kApiPath and so on.

This patch gives the 5 different kNumRetries variables and 3
different kBackoffPolicy variables in chrome/browser
their own name. It also renames kApiPath, kApiUrl and kApiScope.

It also deduplicates a kAuthorizationHeaderFormat string that had
4 different instances.

Bug: 746957
Change-Id: Ib14ccaa372d3b28cd505b2e7cec519a5635e3173
Reviewed-on: https://chromium-review.googlesource.com/868335
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Reviewed-by: Cathy Li <chili@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#534084}
jl
Drop conflicting `kIgnoreRoutingId` constant
In jumbo/unity builds, it conflicts with another constant in bindings/
api_event_listeners.cc (that has a different value.)

This particular constant didn't seem to add too much. It was only used in
one place; in a function with a comment that talks about the constant's
value. It could be argued that the code is easier to follow if the (very
simple) function implementation then uses the value directly. (In
particular since the "value" is in fact the name of another constant.)

Change-Id: I728a34b0a8b43382e742c6b640ace3baadc4d2db
Reviewed-on: https://chromium-review.googlesource.com/897489
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#534008}
jl
Rename conflicting `ReadAndDeleteFile()` functions
They conflict in jumbo/unity builds.

Since one read a file as binary data (into a `std::vector<uint8_t>`) and
one as text (into a `std::string`), it seems reasonable to change the
names to `ReadAndDeleteBinaryFile()` and `ReadAndDeleteTextFile()`.

Change-Id: I8d8402c64cfe45132df9640bd5664df28742d6d7
Reviewed-on: https://chromium-review.googlesource.com/897603
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#534007}
jl
Rename conflicting `g_client` variables in anonymous namespace
They conflict in jumbo/unity builds.

Change-Id: Ie5eae8aa303f5a163eabb74ff931f696127ff032
Reviewed-on: https://chromium-review.googlesource.com/897602
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#534005}
jl
Declare string constants in named namespace instead of anonymous
In jumbo/unity builds, some of the constants conflicted with (identical)
declarations in the anonymous namespace in verified_content.cc.

Change-Id: I66e9ecb180e99cfd468c914ddce44613a5013242
Reviewed-on: https://chromium-review.googlesource.com/897604
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#533999}
jl
Rename conflicting `Static` classes/structs
They conflict in jumbo/unity builds.

Also rename the overly generic `g_static`/`g_lazy_instance` variables.
They did not conflict with anything currently, but generic names in the
anonymous namespace are likely to become a problem eventually, sadly.

Change-Id: Ie90ca3c7eee3d357c3aca205a5551034b768eb77
Reviewed-on: https://chromium-review.googlesource.com/897488
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#533993}
bratell
Rename some history_report functions to have unique names
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
the functions with the same names will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch renames
a number of helper functions in chrome/browser/android/history_report
to have unique names.

An alternative would have been to make the functions static private
functions inside the classes.

Bug: 746957
Change-Id: I2df32461d170c5411418cab78abc3020dc0a8109
Reviewed-on: https://chromium-review.googlesource.com/897536
Reviewed-by: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533841}
bratell
Use the right ref count macros for base::Bind call
chrome/browser/android/cdm/media_drm_credential_manager.cc sent
a g_browser_process->system_request_context() into a Bind call
without using any ref counting macros. That is prohibited by the
bind system but the code got away with it when the pointer
was just forward declared so that Bind didn't know that it was
a ref counted type.

In jumbo builds the compiler knew more about the return type of
g_browser_process->system_request_context() and failed to compile
because of static_asserts in bind_internal.h.

This patch adds base::Unretained() since that seems to be the
right macro for this type of value.

Bug: 746957
Change-Id: Idfc3ad9bd6708dbc5ef4f295397d05d961595b4a
Reviewed-on: https://chromium-review.googlesource.com/897535
Reviewed-by: Chrome Cunningham <chcunningham@chromium.org>
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533839}
bratell
Use different names for two offline_pages delegate classes
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
two classes with the same name will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch renames
two classes named DefaultDelegate so that they have different names.

Bug: 746957
Change-Id: I15cdab5fd9e51223a76d295991513e6e815e3c51
Reviewed-on: https://chromium-review.googlesource.com/897942
Reviewed-by: Cathy Li <chili@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533765}
bratell
Have one kMHTMLExtension constant instead of two
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
the same constant several times will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch
deduplicates the kMHTMLExtension constant and puts it in the
utility class.

An alternative would be to use the literal string "mhtml" without
going through a constant at all.

Bug: 746957
Change-Id: I869f15c17bcf14a633a3e0711c7e469159e3083f
Reviewed-on: https://chromium-review.googlesource.com/897944
Reviewed-by: Cathy Li <chili@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533764}
bratell
Gave three constants in feature_engagement unique names
In jumbo builds many cc files compile in the same translation
unit and then they all share the same anonymous namespace. If
two or more variables have the same name, they will cause
compilation errors and that happened with the three
kDefaultPromoShowTimeInHour constants.

As a preparatory patch to jumbo in chrome/browser this renames
those by adding a relevant prefix to each of them.

Bug: 746957
Change-Id: If17d8103a6916c14b493e203e445208bb1b1b2d6
Reviewed-on: https://chromium-review.googlesource.com/893273
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533728}
fs
[PE] Support 'pathLength' for <path>s referenced from <textPath>
A 'pathLength' attribute on a <path> referenced from <textPath> will
affect the starting offset on the path as computed from 'startOffset'
attribute.
Refactor the PathPositionMapper setup a bit so that the start offset is
computed together with all the other path related state.

Bug: 803127
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Id12c88580dd74db403598d2aa05ac9764ad68cdb
Reviewed-on: https://chromium-review.googlesource.com/897626
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#533712}
bratell
Give all the different kTrafficAnnotations unique names
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
many variables with the same name will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch renames
all the chrome/browser kTrafficAnnotation variables so that they
don't share the same name. This is an equivalent change
to what was already done in //content a couple of months back.

Bug: 746957
Change-Id: I4972cbb767720ac8114b9a01878df1f3ea32a735
Reviewed-on: https://chromium-review.googlesource.com/895369
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Ramin Halavati <rhalavati@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533610}
bratell
Use different names for two settings lookup functions
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
many variables with the same name will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch renames
two functions that fetch a DictionaryValue settings object so that
they have different names.

Bug: 746957
Change-Id: I109751abd13397b61e2eceaccbd95decf493d0c4
Reviewed-on: https://chromium-review.googlesource.com/895368
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Reviewed-by: Ben Wells <benwells@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533609}
bratell
Giving some ssl metrics functions unique names
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
two methods with the same name will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch renames
some functions and metrics related to ssl interstitial pages.

Bug: 746957
Change-Id: If8218168d38a7ddae9f2fcdb09b2956018aacd8f
Reviewed-on: https://chromium-review.googlesource.com/895370
Reviewed-by: Emily Stark <estark@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533608}
bratell
Use different names for different histogram constants
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
many variables with the same name will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch renames
some page_load_metrics constants so that they have unique names.

Bug: 746957
Change-Id: Ibfad7c1dbb7b193a2afca5998e5265ec7f8df896
Reviewed-on: https://chromium-review.googlesource.com/895455
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Josh Karlin <jkarlin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533427}
bratell
Gave two tracing OnUploadComplete methods unique names
In jumbo builds many cc files compile in the same translation
unit and then they share the same anonymous namespace. Having
two methods with the same name will then result in compilation
failures.

In preparation for jumbo in chrome/browser, this patch renames
two OnUploadComplete methods. They are identical so an alternative
is to find a common definition for them but they are also tiny,
really just 1-2 lines of code, so it is not a big thing to have
two of them.

Bug: 746957
Change-Id: I39835ee002fb48216211c37c4c3d047c1dff2eaa
Reviewed-on: https://chromium-review.googlesource.com/895457
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#533398}
fs
[PE] Fix edge-cases in SVGGeometryElement::PathLengthScaleFactor
Update the computation of the scale factor to match what the spec [1]
has to say about a value of zero: i.e yield (near) infinity rather than
zero. Also update the case where the computed path length is zero.

[1] https://svgwg.org/svg2-draft/paths.html#PathLengthAttribute

Bug: 803127
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I6816b6bdd47cbaee90e8ad22e16d1dcf44498c7d
Reviewed-on: https://chromium-review.googlesource.com/893184
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#533003}
fs
[CI] Remove broken IsSVG*Element overload
The:

 template<typename T> bool IsSVG*Element(const T*)

overload is a remnant after RawPtr<T>, but in its current form it would
only produce infinite recursion.

Also update some nearby documentation and rewrite the const Node&
overload to use the same form of condition as the other ones.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Iecbc75423010bf26383dfd7504831bf1768a722d
Reviewed-on: https://chromium-review.googlesource.com/893270
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#533001}
bratell
There is both ::prefs and ::metrics::prefs so be explicit
When code inside metrics say "prefs" the default assumption is
that it means "::metrics::prefs", *if* the compiler knows that
::metrics::prefs exists. This code wants to use ::prefs which
failed in jumbo build experiments where the compiler knew
that ::metrics::prefs exists.

This patch makes the namespace lookup explicit by writing
::prefs instead of just prefs.

Higher level: The coding standard discourages sub namespaces with
the same name as a top level namespace so it is possible
::metrics::prefs should change name at some time.

Bug: 746957
Change-Id: Ia68378e6a3e7937f5d1b2ebcc960b9111e426fe6
Reviewed-on: https://chromium-review.googlesource.com/890455
Reviewed-by: Gayane Petrosyan <gayane@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#532934}
bratell
Gave two BindConnectorRequest methods unique names
In jumbo builds, many cc files share the same anonymous namespace
since they are compiled in the same translation unit. Then
methods that would otherwise not clash cause symbol collisions.

This patch renames two identical BindConnectorRequest methods.
A better fix may be to find a shared location but there is no
obvious shared location between media/casting and pepper/flash.

Bug: 746957
Change-Id: I80b4806140720824fefd1d0019537b6fd89683da
Reviewed-on: https://chromium-review.googlesource.com/878363
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532181}
bratell
Correct include guard in aom_context_ax_tree.h
A trailing "}" was not included in the include guard so if
included multiple time, you would get "extraneous }" errors.

Change-Id: I32582e928220ee9428acbefa9a4833d9d36d2eec
Reviewed-on: https://chromium-review.googlesource.com/888581
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#532172}
fs
Fix operator precedence in SizesCalcParser
Pop all operators with greater/equal precedence rather than just the
top-most.

Bug: 803824
Change-Id: I5f106a0e82ed98ba2510c86ed157bf4b133cb5b8
Reviewed-on: https://chromium-review.googlesource.com/888919
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Yoav Weiss <yoav@yoav.ws>
Cr-Commit-Position: refs/heads/master@{#532100}
bratell
Allow error free multiple inclusion of print_messages.h
In jumbo builds, there is no careful inclusion of headers
so files that require very careful handling of when they are
included cause problems. One such file was print_messages.h
because of an undef it did of another include guard.

This patch moves the undef one layer out of print_messages.h
so that print_messages.h itself can be included many time.

Bug: 746957
Change-Id: Ie44fe5dbd4665cc487788fe7b6e42ebcd20cc50f
Reviewed-on: https://chromium-review.googlesource.com/878325
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532092}
Avoid loading v8_context_snapshot.bin if it's disabled at build-time
Don't list the context snapshot in the mojo manifest's required_files
in builds with use_v8_context_snapshot=false. Tweak existing manifest
overlay functionality to allow merging of required_files lists from
multiple manifests.

This avoids an "Ignoring invalid file v8_context_snapshot.bin" warning
on each browser stratup in use_v8_context_snapshot=false builds.

Bug: 804293
Change-Id: I0f4731811044980b7466887bedcaf115ee1fb288
Reviewed-on: https://chromium-review.googlesource.com/878371
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Tomasz Śniatowski <tsniatowski@vewd.com>
Cr-Commit-Position: refs/heads/master@{#532088}
fs
[CI] Avoid using FillLayer::Size() in BackgroundImageGeometry
FillLayer::Size() returns a FillSize, which is made up of a copy of the
FillLayer's |size_length_| and |size_type_| fields.
This is unnecessarily costly (both in cycles and bytes/footprint), so
use the appropriate (const) accessors instead.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I678095d4d9cb8a1b44a7fad7c7e7cf25c4557225
Reviewed-on: https://chromium-review.googlesource.com/883345
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#531529}
msimonides
Add support for include_dirs to gn check.
With this change "gn check" no longer assumes all #include paths are
relative to the source root. Instead it searches for the includes by
checking each of the directories listed in include_dirs for the target.

A number of new issues have been discovered. The trivial ones have been
fixed, the larger and more complex ones have been reported and the related
parts of the project have been excluded from the default gn check run.

BUG=794926

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I39c17a7ac47dc024dd374c8891ce4911809195cb
Reviewed-on: https://chromium-review.googlesource.com/827014
Commit-Queue: Brett Wilson <brettw@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: Yuzhu Shen <yzshen@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Brett Wilson <brettw@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531334}
bratell
Give some kFilteredMessageClasses variables unique names
In jumbo builds multiple cc files are compiled in the same
translation unit and then they will all share the
anonymous namespace which can cause collisions if
variables have the same name. That was the case for two
kFilteredMessageClasses variables.

This renames them to:
kExtensionFilteredMessageClasses
kRenderFilteredMessageClasses

This is a followup to an equivalent change done in //content
https://chromium-review.googlesource.com/721279

Bug: 746957
Change-Id: I959600adcc81dbd6e405c25aa0272acefc0387d9
Reviewed-on: https://chromium-review.googlesource.com/878362
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#531325}
bratell
Gave two kNotificationPrefix strings unique name
In jumbo build experiments, two kNotificationPrefix variables
ended up in the same translation unit and clashed. This patch
gives those two variables unique names.

Bug: 746957
Change-Id: I200e9cb47129a1f20b8edec91ff0ff432a3c22d9
Reviewed-on: https://chromium-review.googlesource.com/874072
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Drew Wilson <atwilson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531324}
fs
[CI] Move SVG dependency graph notification into SVGElement
This moves a chunk of code pertaining to notifications of dependent
elements from a helper LayoutSVGResourceContainer.cpp, thus collection
all such operations within the realms of the SVGElement DOM.

Bug: 454767, 661598, 769774
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I18b9a982b43767f2d8f0b8f458ea93e5bdd5e786
Reviewed-on: https://chromium-review.googlesource.com/881502
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#531285}
fs
[CI] Use TransformationMatrix::Zoom in SVGElement::CalculateTransform
Replaces Scale(1 / zoom) and Scale(zoom) with Zoom(1 / zoom), and merges
the two ApplyTransform calls into one.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: If36fe60292adf4ac0a02030415e6756fc7305ea8
Reviewed-on: https://chromium-review.googlesource.com/880959
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531268}
fs
[CI] Use FloatSizeForLengthSize and FloatPointForLengthPoint some more
Some callsites that are currently using FloatValueForLength would be
better suited using the "pair" helpers (either LengthSize or
LengthPoint.) Also remove an almost-duplicate and use the one from
LengthFunctions.h instead.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ic628bfe32b07f000054a9da3bf58c3eb6894d241
Reviewed-on: https://chromium-review.googlesource.com/881341
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#531264}
bratell
Removing dead engine_ field i libjingle_xmpp
Jumbo build experiments noticed that no code ever read engine_
in XmppIqEntry in libjingle_xmpp. Normal build didn't because
"friend class XmppEngineImpl" required the compiler to know
what XmppEngineImpl does as well.

Bug: 777434
Change-Id: I661a5346617a92ee912060bebf35801dbe1a8797
Reviewed-on: https://chromium-review.googlesource.com/873371
Reviewed-by: Tommi <tommi@chromium.org>
Commit-Queue: Harald Alvestrand <hta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531039}
bratell
Have only one function named DidStartWorker
Both content/browser/background_sync and
content/browser/service_worker had local functions named
DidStartWorker. If those ended up in the same translation unit,
which can happen in extreme jumbo configurations
(jumbo_file_merge_limit = 999999999) there would be a collision.

This renames them to unique names, just to make things easy.

Change-Id: I33dbc5ad2f5eee6a8e89e0e7624ba033774e3fdb
Reviewed-on: https://chromium-review.googlesource.com/873926
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530938}
fs
[CI] DOM-based SVG resource tracking (1/n)
This starts the transition away from tracking SVG resources based on LayoutObjects.
In the new (probably transitional) model, the resources are track via a Resource
object (inner class) on SVGTreeScopeResources. These Resource objects are
IdTargetObservers, meaning that id mutations no longer are tracked via hooks in
SVGElement. The "pending resource handling" mechanism is also moved to the Resource
objects in the form of a "pending clients" set. The old mechanism (i.e
NeedsPendingResourceHandling() and BuildPendingResourcesIfNeeded()) are no longer
needed and hence removed.

Next step will be to eliminate all remaining tracking logic from
LayoutSVGResourceContainer.

Somewhat independently, a new entry point ResourceReferenceChanged is added to
SVGResourcesCache, codifying the sequence that previously involved calls to
ClientStyleChanged and MarkForLayoutAndParentResourceInvalidation.

Bug: 454767, 661598, 769774, 784435
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I268f2e2a2a5e2e01f077a6b0a5b6270f668a2a6f
Reviewed-on: https://chromium-review.googlesource.com/689998
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#530930}
bratell
Gave two kUrlKey variables unique names
In jumbo builds, two kUrlKey constants (with the same string value)
ended up in the same translation unit and this renames them to
avoid colliding. A better fix would be to find a good common
location.

Bug: 746958
Change-Id: I7c0f0e19455c5ab070a8e0e16714f84ee205133d
Reviewed-on: https://chromium-review.googlesource.com/874071
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Marc Treib <treib@chromium.org>
Reviewed-by: Drew Wilson <atwilson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530897}
tmoniuszko
Make sure LayoutScrollbarPart margins are integers
Bug: 801123
Change-Id: I875cd6431b9ac5e9cded7ab947242d451e889d04
Reviewed-on: https://chromium-review.googlesource.com/860929
Reviewed-by: Steve Kobes <skobes@chromium.org>
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Cr-Commit-Position: refs/heads/master@{#530885}
bratell
Move and deduplicate ProfileLoadedCallback
There were 4 identical ProfileLoadedCallback methods and a TODO
to move them somewhere. This makes it one shared method in
NotificationDisplayServiceImpl.

This change was triggered by a jumbo symbo collision between these
ProfileLoadedCallbacks and one in profiles/profile_window.cc

Bug: 746957
Change-Id: Ic30c5883d9741b6cf5829ec4fe1481e7d32655dc
Reviewed-on: https://chromium-review.googlesource.com/878222
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#530875}
bratell
Inline a duplicated kCrlfLineEnding constant
A kCrlfLineEndine constant was recently copied from
QuotedPrintable.cpp to MHTMLArchive.cpp which caused problems
in certain non default jumbo build configurations because of
the symbol clash.

MHTMLArchive.cpp already uses the literal string "\r\n" all over
the place and no other code in Blink uses a constant for CRLF
so inlining the constant both makes the code consistent and
solves the symbol clash.

An alternative would be to create a shared kCrlfĹineEnding constant,
for instance in platform/test/LineEnding.h, and use it all over
Blink.

Change-Id: I280e9f6217e68d79f764397c469f2022d0f9dc04
Reviewed-on: https://chromium-review.googlesource.com/878219
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#530842}
tmoniuszko
Add missing includes to hwnd_message_handler_delegate.h
Bug: 796644
Change-Id: I9c0b2ecc77eb72e97dec373297d2b2031ad68c82
Reviewed-on: https://chromium-review.googlesource.com/873648
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Cr-Commit-Position: refs/heads/master@{#530826}
fs
[CI] Remove LayoutObject dependency from CSS*GradientValue
Rather than passing a LayoutObject around we can pass around the
<Document, ComputedStyle> tuple that is the bits of data that is needed.

While a it, change CSSGradientValue::GetStopColors to return the vector
of Colors instead of using an out-variable.

Bug: 803224
Change-Id: Ib89bf3c0e47495886b5b715504a90b262348c6f2
Reviewed-on: https://chromium-review.googlesource.com/875925
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#530626}
fs
[CI] Share more text-clip masking code between NG and non-NG painters
Split out a PaintTextClipMask method and make that virtual instead of
PaintFillLayerTextFillBox. Move PaintFillLayerTextFillBox to
BoxPainterBase and call PaintTextClipMask for the bits that differ.

Bug: 803382
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ie44a64a6e70eac8a5a1029650fd206fc9b2852f7
Reviewed-on: https://chromium-review.googlesource.com/874074
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530573}
fs
[CI] Remove unused argument from CSSImageGeneratorValue::AddClient
An "empty" size is always passed to AddClient, so the argument can be
removed. This also allows simplifying the caching logic (since the
size is always empty, which won't create a cache entry.)

Also change the find()+insert() sequence for |clients_| to use
only insert() instead, saving a hash lookup. Simplify the SizeAndCount
constructor since it never needs any non-zero initialization.

Bug: 803224
Change-Id: I7efc7a130e8e93c1e2680116c429cb93e57d2d3f
Reviewed-on: https://chromium-review.googlesource.com/876086
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#530547}
bratell
Inlined a GetLocalState() method
The GetLocalState() method in cryptauth clashes with another
GetLocalState() in jumbo builds, and since there is only one
caller off this one, it might as well be inlined.

Bug: 746957
Change-Id: I63e33c5c94930cd0dfeaa27c1421ce81c9865feb
Reviewed-on: https://chromium-review.googlesource.com/873922
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#530357}
bratell
Deduplicated a usb helper function, GetBrowser()
Two files both used identical helper functions, GetBrowser(). This
patch moves that function to a common utility file so that
there is only one.

This was noticed while doing jumbo compilation experiments, where
the double GetBrowser() ended up in the same translation unit.

Bug: 746957
Change-Id: I8ceaab0d4bd08395821b296dbd1bbda13c1aef78
Reviewed-on: https://chromium-review.googlesource.com/873921
Reviewed-by: Jun Cai <juncai@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#530344}
fs
[CI] Rework size-based caching logic in CSSImageGeneratorValue
Rather than (ab)using AddClient/RemoveClient when updating the
cache for a client, move the actual cache to a helper class
(GeneratedImageCache) and then call the appropriate methods on
that object instead.

Bug: 803224
Change-Id: Ifbb3edf8f25dbeef2f9f1fdd9840a0b32991e274
Reviewed-on: https://chromium-review.googlesource.com/873875
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#530261}
fs
[PE] Fix background-blend-mode interaction background-clip: text
When applying background-blend-mode to a background layer that uses
"background-clip: text", perform the blending after the background has
been clipped by the text.

Bug: 803382
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ie834b1503ec90341aec846f4d2dfc8c94732fe12
Reviewed-on: https://chromium-review.googlesource.com/873636
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#530232}
bratell
Avoid "using base::Time;" because of X11 Time typedef
if any X11 header has been included, there is an unavoidable
Time typedef in global scope. When there is also a
"using base::Time;" both end up in the global scope which
cause compilation issues. Specifically this happened in
jumbo build experiments.

Bug: 803406
Change-Id: Ib7cd99b98552a209d1432ecb4ee060d16c9da39f
Reviewed-on: https://chromium-review.googlesource.com/873976
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Michael Wasserman <msw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530215}
bratell
Avoid "using base::Time;" since Time is an X11 typedef
X11 headers have an unavoidable typedef that creates the
type ::Time. "using base::Time" in the global scope will
clash with that one if X11 headers are included in the
translation unit.

A few files in the chrome/browser target has "using base::Time"
and those cause issues if you try to use jumbo (unity) compilation
for chrome/browser. This patch changes the code to be more
explicit.

Bug: 746957
Change-Id: I619c589071a01302086d81fdce35e0c779b121a0
Reviewed-on: https://chromium-review.googlesource.com/866838
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#530109}
bratell
Gave two OnFetchComplete methods more descriptive names
When experimenting with jumbo (unity) builds in Chromium
two overloaded OnFetchComplete ended up in the same
translation unit and then Bind() could not determine which
one to use.

This patch gives two OnFetchComplete methods more unique and
descriptive names: OnCookieFetchComplete and
OnAppCacheInfoFetchComplete.

Bug: 746957
Change-Id: Ie165f6dd8365257181ba7f48b9b5809043ec25f3
Reviewed-on: https://chromium-review.googlesource.com/860462
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529797}
bratell
Removed "using namespace" from a password_manager file
"using namespace" is not allowed by the coding style, and also
it is not compatible with jumbo builds. This patch removes
using namespace and gives the three symbols namespace prefixes
instead.

Bug: 746957
Change-Id: Ibf3810287deb370ad1ac90968ba0e24020f681fb
Reviewed-on: https://chromium-review.googlesource.com/868334
Reviewed-by: Maxim Kolosovskiy <kolos@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529757}
bratell
Fix erroneous DictionaryValue forward declaration
Claiming that there is a ::DictionaryValue is not true and
it clashes with other code doing using base::DictionaryValue.

Fix is to do the forward decalaration in the right namespace.

Bug: 746957
Change-Id: I777dd92baaec876cd2085911e00a96c74efe58f2
Reviewed-on: https://chromium-review.googlesource.com/866843
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Matt Giuca <mgiuca@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529716}
bratell
Gave kUploadContentType and kCrashMultipartBoundary unique names
crash_service_uploader.cc and webrtc_log_uploader.cc are similar
and use variables named the same. If those files end up in the
same translation unit in a jumbo build, they will clash and break
the compilation.

Since there is no good place to share the two strings, this patch
gives them unique names.

Bug: 746957
Change-Id: Ic349606814cff229529b135f3c1da11ac2279158
Reviewed-on: https://chromium-review.googlesource.com/867918
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529710}
bratell
Gave three kDefaultUpdatePeriod variables unique name
This is a preparatory patch for adding jumbo support to
chrome/browser. If more than one kDefaultUpdatePeriod variable
ended up in the same translation unit, they would clash and
cause compilation errors.

Bug: 746957
Change-Id: Iff2579b15fa00648823a4a3bf890b40252856028
Reviewed-on: https://chromium-review.googlesource.com/868155
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529706}
bratell
Replacing custom http status constants with net::HTTP_*
A couple of places defined their own kHttpResponseOk which
is a bit unnecessary when there already is a net::HTTP_OK which
the rest of the code uses.

This was noticed in jumbo build experiments because two
kHttpResponseOk ended up in the same translation unit and caused
compilation errors.

Bug: 746957
Change-Id: Ia5cf32636bbcf8e0e1d7b8e1c161c5b4a5cdcbdf
Reviewed-on: https://chromium-review.googlesource.com/868156
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529705}
bratell
Give each ShutdownNotifierFactory class its own class name
In jumbo builds many cc files are compiled in the same translation
unit and then classes with the same name, that are normally
shielded from each other, can start clashing and causing
compilation errors.

One observation is that there are many ShutdownNotifier classes and
this patch gives each a long and unique name following the typical
naming standard.

Bug: 746957
Change-Id: I2bcca0ac41685fdf78c491ed969b91669e520772
Reviewed-on: https://chromium-review.googlesource.com/867919
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529504}
bratell
Remove erroneous UsbDevice forward declaration
There is no ::UsbDevice so forward declaring such a class confused
other code trying to import ::device::UsbDevice into the global
scope with using device::UsbDevice. This happened in jumbo build
experiments.

Bug: 746957
Change-Id: If1073d24b9e4c302b0873e91df386039c526c49f
Reviewed-on: https://chromium-review.googlesource.com/868331
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529429}
bratell
Give two GetAllOriginsInfoCallback methods unique names
In jumbo build experiments the two very similar files
browsing_data_cache_storage_helper.cc and
browsing_data_service_worker_helper.cc were compiled in the same
translation unit and then the methods with the same name
collided.

This gives the methods unique names to avoid that.

Bug: 746957
Change-Id: I261c61fb178178c91d3a6aac8800e21510038ed8
Reviewed-on: https://chromium-review.googlesource.com/868333
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529426}
fs
[PE] Fix offset computation for multi-line flow box 'background-clip: text'
Since the background of a flow box is painted in a 'sliced' fashion, the
paint rect/offset will be offset based on the "virtual" position of the
line box relative to the first line box in the flow.
When painting text for 'background-clip: text', adjust with this offset.

Bug: 658326
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ia12c3d65025199fbcdeb1df647df08174ae88c24
Reviewed-on: https://chromium-review.googlesource.com/868151
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529425}
fs
Fix offset-anchor alignment for offset-path
The anchor point should align with the point on the path/shape/...

Also avoid recomputing transform-origin in ApplyMotionPathTransform
since the function takes origin_x/y as arguments, so those can be used
rather than recomputing the value(s).

Change-Id: I3c173cdc3d307057a37564a37b0e87044dbeaf9d
Reviewed-on: https://chromium-review.googlesource.com/808885
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529282}
bratell
Deduplicate IsScaleAndIntegerTranslate
There are two identical implementations iof IsScaleAndIntegerTranslate() in
components/viz/service/display. One in skia_renderer.cc and one in
software_renderer.cc.

When building components/viz with jumbo (not yet on master) those end
up in the same translation unit and cause compilation errors.

This CL deduplicates the functions and puts it in a shared utility file,
renderer_utils.cc.

Bug: 801580
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ifcc39032bffcfcb752cee60719689d94dfbd2df6
Reviewed-on: https://chromium-review.googlesource.com/864643
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#529245}
bratell
Restore the UNICODE macro after third_party/ced has undefined it
third_party/ced (more specifically
third_party/ced/src/util/encodings/encodings.h) undefs UNICODE
which is a central define in Windows. It controls whether
Windows SDK headers should have 2 byte or 1 byte strings and must
always be set in a modern application.

In Jumbo builds this include of the dangerous ced header happen
in the same translation unit as the include of Windows headers
which will then fail to do the right thing.

Restoring the UNICODE define is a workaround.

This change is to make every include of the header do the same
thing. There is not currently any known problem from this instance of
the include.

Change-Id: Ic4a5386e61390533061e0021dddfb0fc4dad8e7e
Reviewed-on: https://chromium-review.googlesource.com/862402
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#528919}
bratell
Restore the UNICODE macro after third_party/ced has undefined it
third_party/ced (more specifically
third_party/ced/src/util/encodings/encodings.h) undefs UNICODE
which is a central define in Windows. It controls whether
Windows SDK headers should have 2 byte or 1 byte strings and must
always be set in a modern application.

In Jumbo builds this include of the dangerous ced header happen
in the same translation unit as the include of Windows headers
which will then fail to do the right thing.

Restoring the UNICODE define is a workaround.

Bug: 775547
Change-Id: I7323cf6f9fff3efe2780c3125b9b099a8f9faa09
Reviewed-on: https://chromium-review.googlesource.com/861883
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#528803}
fs
[PE] Fix hit-test of zoomed <clipPath> 'clip-path'
<clipPath> geometry is not subjected to zoom, so the hit-test location
and reference box has to be adjusted to make the coordinate spaces
match.

Bug: 800605
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ic03e24f0289a5019ea722e3931f6217d918a1b56
Reviewed-on: https://chromium-review.googlesource.com/859784
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#528743}
jl
Share implementations of `GetPerContextData()`
There were some largely duplicated functions that fetched per-context
data objects, optionally creating them if missing. Replace them with a
template function.

This also fixes the issue in jumbo/unity builds that the different
GetPerContextData() functions collided.

Change-Id: I04197a01aa647a07c026eca1ba9c158742fedf3e
Reviewed-on: https://chromium-review.googlesource.com/850115
Commit-Queue: Jens Widell <jl@opera.com>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528739}
jl
Rename conflicting `CallbackHelper` functions
They conflict in jumbo/unity builds.

Change-Id: I29da5bde4bb2d99b6fa93aaf163c79d160b30c69
Reviewed-on: https://chromium-review.googlesource.com/860650
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#528736}
bratell
Don't compile unused multiprocess_test.cc for ios and nacl
The file multiprocess_test.cc was being compiled for ios and nacl
and then, normally, discarded by the linker since nothing in the
object file was referenced. In jumbo builds the unused code
piggy-backed on used code and then the linker noticed that
multiprocess_test.cc referenced non-existing symbols and linking
failed.

Change-Id: Id14e125d1f62fc0cefeb919ad63e8457bb680407
Reviewed-on: https://chromium-review.googlesource.com/860064
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#528713}
bratell
Include tcmalloc's config before tcmalloc.h
Certain things in tcmalloc.h depend on tcmalloc's config.h file,
for instance whether struct mallinfo exist or not. Depending
on how the functions are used, it may or may not work correctly
without including config.h, but to be safe, always include it.

This was an issue in jumbo builds if base/process/memory_linux.cc
and base/allocator/allocator_shim_default_dispatch_to_tcmalloc.cc
were compiled in the same translation unit. The wrong includes from
memory_linux.cc caused the other file to fail to compile.

Bug: 775547
Change-Id: Iab9b8172281c55b8cbfbc8c21a79f95d2bae5847
Reviewed-on: https://chromium-review.googlesource.com/860646
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#528704}
fs
[CI] Add intrinsic-dimensions-changed notifier to FrameOwner
This CL adds a notifier callback that is called whenever a property or
attribute that may affect the intrinsic dimensions of an <svg> is
changed - this includes 'width', 'height' and 'viewBox' as well as
'writing-mode' and font properties.
At present this callback doesn't do anything, but is expected to
eventually schedule a layout on the embedding object.

Bug: 442939, 798974
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I761ccaaec6b5dec20c2bfa4b5f06cf16d6c7eb24
Reviewed-on: https://chromium-review.googlesource.com/860932
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528689}
bratell
Give two PrefixTitle functions more unique names
When experimenting with jumbo builds (Chromium unity builds) in
chrome, the compiler ended up with two PrefixTitle in the same
translation unit. By using more unique names, that is not a
problem anymore.

The methods are similar and there are other methods building
titles that share similar patterns but there does not seem
to be any useful refactoring that reduces the number of methods.

Bug: 746957
Change-Id: I82f3ce3dd88ef024bb935d09895befda3e5bf76b
Reviewed-on: https://chromium-review.googlesource.com/860461
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#528688}
amlynarczyk
Cleanup extensions unittests to use constant for extensions settings preference
Bug: 
Change-Id: I00d7ff48486400e111150cad2b654dd2700a90b6
Reviewed-on: https://chromium-review.googlesource.com/861625
Reviewed-by: Finnur Thorarinsson <finnur@chromium.org>
Commit-Queue: Finnur Thorarinsson <finnur@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528620}
fs
[CI] Refactor replaced element nested intrinsic sizing info extraction
This moves the access to a nested layout contexts (either a frame
embedded via LayoutEmbeddedObject or an SVG image via LayoutImage)
LayoutReplaced (LayoutSVGRoot) from LayoutReplaced to the relevant
subclasses (LayoutEmbeddedObject or LayoutImage.) The goal with this is
to eliminate the use of EmbeddedReplacedContent in LayoutReplaced.

Rather than accessing EmbeddedReplacedContent() and calling
ComputeIntrinsicSizingInfo() on the returned LayoutReplaced, a new
method GetNestedIntrinsicSizingInfo is added instead, and implemented in
the relevant subclasses. In LayoutImage the EmbeddedReplacedContent()
method is kept around (for now), but in LayoutEmbeddedObject it's
removed, and instead rerouted via LocalFrameView.

NeedsPreferredWidthsRecalculation is moved from LayoutEmbeddedContent to
its subclass LayoutEmbeddedObject since this is the only subclass that
can modify its behavior - i.e can represent content that may can affect
the size of its embedder.

The IntrinsicSizingInfo struct is moved out from being an inner class of
LayoutReplaced.

Bug: 798974
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ia617a40d631e6b2e6bb2c9f39a1799766d7f58d6
Reviewed-on: https://chromium-review.googlesource.com/860140
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528524}
bratell
Avoid exporting read_buf renaming from zlib
zlib.h includes a macro that renames read_buf->Cr_z_read_buf. Since
read_buf is a common name in other parts of the code, it causes
some random confusion depending on whether zlib.h has been
included or not.

The renaming macro is a side effect of the 0001-simd.patch that
exposes an internal read_buf method to other files in zlib. This
patch renames read_buf as it is exposed so that it has the less
common name deflate_read_buf.

Bug: 799448
Change-Id: Icdc4eba973891dfd28d82017415048eded62d577
Reviewed-on: https://chromium-review.googlesource.com/852257
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Chris Blume <cblume@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528512}
bratell
Changed g_instance and g_factory to more unique names
Jumbo, the Chromium unity build system, combines many cc files
in the same translation unity. Those cc files will share the
same anonymous namespace so there can be clashes if names
are not unique enough.

In //chrome there is a lot of variables named g_instance or
similar and in jumbo builds some of them collide. This patch
gives all of the g_instance* variables more specific names, in
a very similar fashion to what was done in //content.

Bug: 746957
Change-Id: Idb2c64b2289aa0487fd62fd140498af909986079
Reviewed-on: https://chromium-review.googlesource.com/846769
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528489}
bratell
Fixing include guards for MetricsHelper include files
Newly added file had no include guards which made it be included
many times in jumbo builds, breaking those builds and two other
header files had the same include guard so you could only include
one of them.

TBR=altimin@chromium.org

Change-Id: I6dc277b6c3a1129a640fd15d2743f875a021925a
Reviewed-on: https://chromium-review.googlesource.com/860038
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#528410}
fs
[CI] Remove unused arguments to CSSImageGeneratorValue::GetImage
The Document and ComputedStyle are not used. (This also makes it look
less like the other GetImage method on this object.)

Change-Id: I920497b6c835223bcc558669f1014d832787da9c
Reviewed-on: https://chromium-review.googlesource.com/860100
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528400}
bratell
Changed an html code constant kDefaultWidth to have a unique name
In certain jumbo configurations HTMLCanvasElement.cpp and
track/vtt/VTTRegion.cpp end up in the same translation unit
and then the two different kDefaultWidth clash.

This patch gives kDefaultWidth more specific names and
changes the constants to be constexpr and be in an
anonymous namespace to better match the current coding style.

Change-Id: I116171382d172ff00c20eec13210494393190fc9
Reviewed-on: https://chromium-review.googlesource.com/859781
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#528323}
bratell
Deduplicate two dom helper methods.
There were two ShadowFor and two CanBeDistributedToV0InsertionPoint
methods which clashed in certain jumbo build configurations
(when FlatTreeTraversal.cpp and flag_tree_traversal_ng.cc ended
up in the same translation unit).

If this knowledge is widely needed, maybe the methods should move
to Node, but this just makes the old code use the method in the
new code.

Change-Id: Ia26f6fa2631e72ddf5bfdcb5150486025bb1d4a8
Reviewed-on: https://chromium-review.googlesource.com/859759
Reviewed-by: Hayato Ito <hayato@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#528309}
bratell
Deduplicate printing HoldRefCallback helper
Both print_job.cc and print_job_worker.cc wanted a helper
function for certain callbacks. Rather than having two of them,
let us have one.

Bug: 746957
Change-Id: If770b8f18479847489d9c2a28ba1b1d75bdc11e1
Reviewed-on: https://chromium-review.googlesource.com/857501
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528083}
jl
Use ':' directly instead of declaring a `kColon` constant
In jumbo/unity builds the constant declarations conflicts with an identical
declaration in socket_permission_entry.cc.

Change-Id: Ib5d2770caa327119407f618073ac2316bc1a5a9c
Reviewed-on: https://chromium-review.googlesource.com/849213
Commit-Queue: Jens Widell <jl@opera.com>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527981}
bratell
Correcting include guard for safe_browsing/features.h
Change-Id: Ie3bbe6779eeb321c72b76a255549afd10d9eb460
Reviewed-on: https://chromium-review.googlesource.com/853869
Reviewed-by: Varun Khaneja <vakh@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#527955}
bratell
Deduplicate a CreateExtensionPrefStore helper function
Noticed while experimenting with jumbo in chrome/browser. Symbols
that are duplicated cause compilation problems if they end up
in the same translation unit.

Bug: 746957
Change-Id: I07a5bcb690026359e7d74be81a0a26ce9f40958b
Reviewed-on: https://chromium-review.googlesource.com/846747
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527631}
bratell
Deduplicate some icon handling code and symbols in task_manager
Jumbo build experiments handled the multiple GetDefaultIcon
and g_default_icon pointers badly and since the code was more
or less identucal, this patch moves the code to a shared location
and leaves just the icon constant and the icon cache in
each task_manager Task class.

Bug: 746957
Change-Id: Ib7dc221113b29b5e6d17c22539ccb47da1b6a5ce
Reviewed-on: https://chromium-review.googlesource.com/852216
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527518}
fs
Clean up includes in Style*Image.cpp
Get rid of includes of LayoutObject.h and StyleResolver.h, replacing
them with something more appropriate (layering-wise for the former.)

Change-Id: I759c371d557d008bdb385fc3bdcfa440bff33c9d
Reviewed-on: https://chromium-review.googlesource.com/852493
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#527374}
jl
Rename conflicting `g_instance` variables
They conflict in jumbo/unity builds.

Change-Id: Ia1a1bb20873e4695e742ab485027a5185415d175
Reviewed-on: https://chromium-review.googlesource.com/849932
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#527966}
bratell
Give each kPublicSHA256 variable a unique name
This patch is preparing for jumbo build support in
//chrome/browser. Since each component has its own
kPublicSHA256 variable with its own public key, and those
variables clash in jumbo builds where all installers are combined
in a single translation unit, they are here given unique and
descriptive names.

Bug: 746957
Change-Id: I7fe1c927d58fd323e8a80897c45d639e24f8a38d
Reviewed-on: https://chromium-review.googlesource.com/850558
Reviewed-by: Joshua Pawlicki <waffles@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#527287}
jl
Improve jumbo chunk generation code
The main improvement is that source files with unhandled extensions
other than .h, for example .json and .idl, are not counted towards the
merge limit, and thus can't lead to too many chunks being generated.

By restructuring, the code also iterates the source file list once
instead of twice, and calls get_path_info() once per source file instead
of twice.

Change-Id: I130c815c84fff08b6ad2d6f36434140efbeb2d29
Reviewed-on: https://chromium-review.googlesource.com/850397
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#527099}
jl
Use a fully qualified name to access the `::switches` namespace
In jumbo/unity builds, `::extensions::switches` comes into scope, which
changes the meaning of the "relative" `switches::` qualifier used inside
the `extensions` namespace.

Change-Id: I49757b132e51bb4207a6fac4dac1e8d2237d5801
Reviewed-on: https://chromium-review.googlesource.com/849212
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#527967}
bratell
Renamed one of the HeaderFlattener classes
There are two HeaderFlattener classes that do similar things
but not identical things. If they end up in the same
translation unit (can happen in some extreme jumbo configurations)
there will be a clash so this patch renames one of them to
HeaderToString.

Bug: 746953
Change-Id: I1fa37f86bcf13487fd8b18da766f440b3ad85545
Reviewed-on: https://chromium-review.googlesource.com/848915
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527078}
jl
Drop some jumbo-incompatible namespace aliases
Many source files declare a namespace alias `errors` for a specific
namespace containing error constants. This practice is incompatible with
jumbo/unity builds, when different namespaces are aliased.

The by far most common namespace to alias is `manifest_errors`. These
aliases are kept, since they are not a problem as long as there are no
other conflicting aliases. Other aliases are simply dropped, and the full
namespace is used instead.

Change-Id: Ie90f7e7a8f8be52b811b0b1e9c9839970669d96c
Reviewed-on: https://chromium-review.googlesource.com/848918
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#526952}
bratell
Rename GetRestrictedCookieManager for more uniqueness
There are two overloaded GetRestrictedCookieManager functions in
different files which in certain non-standard jumbo configurations
end up in the same translation unit. When that happens,
base::Bind doesn't know which one to use and there is a compilation
error.

This patch renames one of them
GetRestrictedCookieManagerForWorker so that there will never be
any confusion.

Bug: 746953
Change-Id: I7b3e6ba32aed44e575ee108111871e45b5e2689c
Reviewed-on: https://chromium-review.googlesource.com/847010
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Sam McNally <sammc@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526754}
bratell
Avoid importing base::Time into the global scope because X11
base::Time in the global scope collides with X11 headers which
have a global typedef of Time to int. This patch moves the code so
that the symbols are imported into the local namespace (content)
instead.

X11 headers appear in some non-standard jumbo configurations
(extremely large jumbo chunks) but could happen at any time
otherwise as well.

Bug: 746953
Change-Id: Iadc929ca4eb7d556490d58c791bbe8b2ef119726
Reviewed-on: https://chromium-review.googlesource.com/848916
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526731}
bratell
Avoid collision between two ScriptExecutionCallbackHelper
ScriptExecutionCallbackHelper is the name of two different
helper functions which in some non-standard jumbo configurations
(huuuge jumbo chunks) end up in the same translation unit. This
patch changes the scope of one of the classes to not clash.

Bug: 745732
Change-Id: Ifed9bcd247c43afb110c9b008062383a2a7d74df
Reviewed-on: https://chromium-review.googlesource.com/848835
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526690}
bratell
Changed some test code to avoid jumbo problems
In certain non-standard jumbo configurations (very large
jumbo units) there were some symbol clashes that do not
appear in normal jumbo builds. This resolves them by
renaming one test class to better match the test, and by
wrapping the other test in a custom namespace as done in other
places in blink tests.

Bug: 745732
Change-Id: Ic0388e9abd19b24366133c577059f59ef63a6b6b
Reviewed-on: https://chromium-review.googlesource.com/847009
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526543}
bratell
Hide DeviceMode from X11 headers
X11 headers create a lot of macros using fairly normal names which
causes collisions in code that was written without X11 headers in
mind.

DeviceMode is also a type in components/policy and if that and
X11 includes end up in the same translation unit, there will be
compilation errors.

This was encountered in non-standard jumbo configurations and will
not affect currently supported code.

Bug: 782184
Change-Id: I84f9874d2858fc60c7e7c0e017d028dc8b710661
Reviewed-on: https://chromium-review.googlesource.com/847577
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526524}
bratell
Rename one set of kDataPrefix/kMetadataPrefix to make them unique
There are two sets of kDataPrefix and kMetadataPrefix in
components/sync and they have different values. In non-standard
jumbo configurations (much larger jumbo chunks than normal) those
will end up in the same translation unit and clash.

This renames one set of constants, leaving the other one as is
since its name already matches the use well.

Change-Id: I3640f1c1e7bc599c7d20317cd60d2f1ac7d90b15
Reviewed-on: https://chromium-review.googlesource.com/847593
Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526522}
bratell
Rename ChildAt and Parent to get unique names.
To help jumbo compilations, this code has already renamed
Children -> LayerChildren so this follows the same pattern
to help some other jumbo configurations where the plurality
of ChildAt and Parent methods caused problems.

Bug: 786926
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I086022931622b1bb670bc1313987ff69182c0990
Reviewed-on: https://chromium-review.googlesource.com/847473
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526521}
bratell
Add include guards to highcontrast_classifier.h
Several files include highcontrast_classifier.h so jumbo builds
got duplicate instances of everything in the header file.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ibfe824f52d4b1f6046b75e4621f662ce0bf1d0c3
Reviewed-on: https://chromium-review.googlesource.com/847572
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526470}
bratell
Removed dead GetImageInfo() function noticed in jumbo builds
There are two identical GetImageInfo functions in the blink/html
code and only one of them is used. This patch deletes the unused
one.

This was noticed in a non-standard jumbo configuration because both
instances ended up in the same translation unit.

Change-Id: I4b0959fcc1bf9a0902a6d8574023e9b59de60375
Reviewed-on: https://chromium-review.googlesource.com/847474
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526467}
bratell
Undefine Win32 macros IsMinimized, IsRestored, IsMaximized
Names used in the BaseWindow class are also windows.h macros.
That the names are the same as in the Windows API is
no coincidence but for now we don't want the Windows macros
to interfere so we undef them.

There are already undefs in widgets.h but depending on the order
of includes they might not be effective.

Bug: 773275
Change-Id: I2be80c8a3f64f4741163def9c27e386c95753a40
Reviewed-on: https://chromium-review.googlesource.com/845582
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526694}
bratell
Make timeit.bat handle some non-US locales better
timeit.bat assumed the decimal separator was a period. Sometimes
it's a comma.

Change-Id: Id8d04f980907dda0d80af96be8568b1704b61399
Reviewed-on: https://chromium-review.googlesource.com/844322
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526285}
bratell
Be explicit about base::Time to not mix it up with X11 Time.
There is an X11 typedef for a type called ::Time so if becomes
complicated if code imports another type named Time into the
global namespace with "using base::Time". Better is to just
write base::Time whenever you mean base::Time.

This was an issue that hit the jumbo project, implementing
unity builds for Chromium.

Bug: 773275
Change-Id: Ic06f701eba210ef43899d0dc47ba5c891cb71866
Reviewed-on: https://chromium-review.googlesource.com/844695
Commit-Queue: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526360}
bratell
Move kWebURLsWithTitlesPboardType from global scope in ui/base
There is a kWebURLsWithTitlesPboardType in
third_party/mozilla/NSPasteBoard+Utils.h which causes confusion
with the kWebURLsWithTitlesPboardType in ui/base. This code
moves the definition to a tighter scope which makes symbol lookup
obvious to the compiler.

This caused issues with jumbo builds. Most likely the Mozilla
header doesn't get included in the same translation unit as
clipboard_util_mac.mm in non-jumbo builds.

Bug: 773275
Change-Id: I77e9cc6c7a3beaa600cb620bddc000b1846ab985
Reviewed-on: https://chromium-review.googlesource.com/844697
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526287}
bratell
Don't compile input_method_auralinux.cc in chromeos.
ChromeOS has an input_method_chromeos.cc which contains
for instance GetEngine(). With input_method_auralinux.cc
there will be two GetEngine() which is one too many.

Seen in jumbo builds where code ends up in the same translation
unit so that the compiler notices things like this.

Bug: 773275
Change-Id: I64598e346e0dcbbac5348bd6ec9d903d2041d298
Reviewed-on: https://chromium-review.googlesource.com/844676
Reviewed-by: Shu Chen <shuchen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526284}
bratell
Remove non-ios code from ui/base's ios build
Touch code isn't used by ios so should not be compiled.

In jumbo builds some touch symbols but not others ended up
in an object file and then the ios linker got unhappy. This
used to work by "luck" (i.e. if not a single symbol is used in
an object file, then it doesn't matter if that object file
refers to non-existing symbols).

Bug: 773275
Change-Id: I08ea7005665a62728aeac1bf7cce16bca8be8402
Reviewed-on: https://chromium-review.googlesource.com/844714
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526228}
fs
Remove SVGElementRareData::owner_
This appears to have been dead/unused since the complicated weak
handling for SVGCursorElement was removed in
https://codereview.chromium.org/2522443002 (together with
SVGCursorElement itself.)

Simplify SVGElement::EnsureSVGRareData a little while at it.

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I0e29e2830bc20fd595d41d72eb9c3ec23c2df2ce
Reviewed-on: https://chromium-review.googlesource.com/843023
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#526071}
bratell
Add missing include guard to test_overscroll_delegate.h
Change-Id: I3a9785519bfe9d6b10972bbe7b70a3c9c3f5fdbc
Reviewed-on: https://chromium-review.googlesource.com/842803
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526029}
mpichlinski
Allow delegate to handle ContentMainRunner fatal initialization error.
Report ContentMainRunner fatal error during initialization to the delegate,
which may gracefuly exit with some message instead crashing.
Default behavior is CHECK(false).

Bug: 792839
Change-Id: I1e7c85c58f1a008e8818e2efb00dbba7f4774826
Reviewed-on: https://chromium-review.googlesource.com/815054
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527056}
bratell
Giving two different kDefaultTransationDurationMs unique names
The animation code has two different
kDefaultTransationDurationMs depending on what code is used.
This caused issues with jumbo builds where one of them
shadowed the other one (scary). This renames them so that they
have unique names, and also moves them into the same scope to
keep things consistent.

Bug: 773275
Change-Id: I77b5ab72e48a9c967105d8eb0b2610cfbd6f0b40
Reviewed-on: https://chromium-review.googlesource.com/841063
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#526028}
bratell
Deduplicate kInchInMm so that they don't clash in jumbo builds
There is one kInchInMm in the anonymous namespace in
fake_display_snapshot.cc and one in
chromeos/display_change_observer.cc. In jumbo builds they
end up in the same translation unit and have the same
anonymous namespace.

Since the constant is needed in more than one place, an easy change
is to move it to display_util.h.

Bug: 773275
Change-Id: I579a587786ea3fac5dd6dde85f51bd5ae1a62e69
Reviewed-on: https://chromium-review.googlesource.com/840024
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Dan Erat <derat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525814}
fs
[PE] Avoid integer overflows in EnclosingIntRect(const FloatRect&)
The size computation could potentially overflow, yielding an "empty"
result, which could have different consequences depending on the user.
In CullRect::UpdateCullRect for instance, the MapRect call could make
the cull rectangle appear empty causing visible elements to be culled.

Rather than using integers for the computing the enclosing rect, use
floats, and then cast that to an IntRect at the end. (The
IntRect(const FloatRect&) constructor clamps the input using clampTo.)

Adjust EnclosedIntRect similarly because it shares the same deficiency.

Bug: 793676
Change-Id: I63bcff3747dea7f29dac39a05d9cf179b0770030
Reviewed-on: https://chromium-review.googlesource.com/839521
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525812}
bratell
Renamed two g_lock in ui/gfx to have more unique names
Recently a second g_lock joined the first g_lock in ui/gfx and
then they clashed in jumbo builds. This patch renames them
to match their use.

Bug: 773275
Change-Id: I9b13a8f225d0ee22aca621fa32d4c6872429af0a
Reviewed-on: https://chromium-review.googlesource.com/839765
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#525771}
bratell
Give two different EnumMonitorCallback functions unique names
There are two classes in ui::display that enumerate monitors
to get information about them. They both used a local
callback named "EnumMonitorCallback" and those two functions
clashed in jumbo builds where they shared the same translation
unit.

Bug: 773275
Change-Id: Ibb0889705d28c0169a210bc3e83411adb66216c7
Reviewed-on: https://chromium-review.googlesource.com/836560
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Robert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525672}
bratell
Rename one of two DisplayInfoLists in ui/display
There is a display::DisplayInfoList in
display_manager.h so creating another one by the same name
inside display is confusing. At least that is what the
compiler thinks in the jumbo project where they end up
being known in the same translation unit.

Bug: 773275
Change-Id: I545cc9e8a64cbf3e61435da49c50cd72e360c61e
Reviewed-on: https://chromium-review.googlesource.com/837761
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#525512}
bratell
Use differently named functions for each jpeg codec.
In ChromeOS there are two JPEG decoders. They have the same API
structure so the helper functions look the same. Unfortunately
they also have the same names so they clash in jumbo builds.

The methods are also unfortunately not reusable since they work
on different types (one work on libjpeg_turbo types, the other
on the IJG jpeg decoder types).

This patch adds the Ijg prefix to the types and functions used by
the "robust" codec.

Bug: 773275
Change-Id: I73b44c019ca72adbc3db04011c61550a0034ec85
Reviewed-on: https://chromium-review.googlesource.com/836899
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#525447}
bratell
Rename one of the two NOTIFY_OBSERVERS macros
There was still two NOTIFY_OBSERVERS macros and in jumbo builds
they triggered an error about macros being redeclared. This
patch renames the macro that implements observer handling
methods for Windows from NOTIFY_OBSERVERS to NOTIFY_OBSERVERS_METHOD.

Bug: 773275
Change-Id: Ie58fd1793b144b694a0a34bfa552569db3f8a200
Reviewed-on: https://chromium-review.googlesource.com/836611
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#525333}
bratell
Use large (non-goma) jumbo chunks for Jumbo Linux x64
When you build with goma jumbo uses smaller units (up to
8 files per jumbo chunk). This is to be more parallel and
take advantage of the -j 1000 hardware.

Unfortunately many problems are only detected if you combine
many files in a unit so default goma builds would not find
those problems.

This patch changes one of the three Jumbo fyi builders to use
jumbo_file_merge_limit=50 which is the normal value for
non-goma jumbo builds. This way we should notice more problems
through the fyi builders.

Change-Id: Id7d49148e778a92648a1871d15dbf1c8a958af7e
Reviewed-on: https://chromium-review.googlesource.com/832435
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524990}
jl
Rename conflicting `g_test_observer` variables
Two source files declared `g_test_observer` variables in the anonymous
namespace. In jumbo/unity builds, these conflict and cause compilation
errors. Give them more unique names to avoid the collision.

Change-Id: I904c5409039a9599480ca3a8fd7bbed4f48db1f6
Reviewed-on: https://chromium-review.googlesource.com/829173
Commit-Queue: Jens Widell <jl@opera.com>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524796}
jl
Drop `using namespace X` directives
They are not allowed by the Google C++ coding style.

Also, in jumbo/unity builds where the source files are included into a
larger translation unit, clang treats the them as header files, and warns
about such directives in the global namespace (-Wheader-hygiene).

Change-Id: I3079677651430f1fbeff2a79101aa7314a484488
Reviewed-on: https://chromium-review.googlesource.com/829135
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#524791}
bratell
Renaming one of the NOTIFY_OBSERVERS macros
ui/events/devices have two NOTIFY_OBSERVERS macros, similar but
not identical. This renames one of them NOTIFY_ANDROID_OBSERVERS
to avoid clashes in jumbo builds where they ended up in the
same translation unit.

Bug: 773275
Change-Id: I626bf809be342993bc9f455aab977e4918538446
Reviewed-on: https://chromium-review.googlesource.com/824882
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524752}
bratell
Deduplicated a kAnimationStartOrAfterHideOpacity constant
Both the floating keyboard container and the full width
keyboard container need kAnimationStartOrAfterHideOpacity
so instead of having two of them, this patch moves it to
container_behavior.h.

Bug: 773275
Change-Id: I1196570016881bd58e9f3c73f33f3a674d8fc607
Reviewed-on: https://chromium-review.googlesource.com/824274
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524746}
fs
[CI] Add SVGLengthContext::ResolveLengthPair helper
With geometric presentation attributes it's quite common to need to
resolve an <x, y> pair of Lengths to produce a point or a size.
Add a helper ResolveLengthPair() that accepts a pair of Lengths and
return a FloatPoint. Except for a reduction in LoC, it also amortizes
the cost of determining a viewport when percentages are used.

Use the new helper for 'cx' / 'cy' and 'rx' / 'ry' on <ellipse>,
'cx' / 'cy' on <circle>, 'x' / 'y', 'width' / 'height' and 'rx' / 'ry'
on <rect>, 'x' / 'y' and 'width' / 'height' on <image> as well as
'x' / 'y' on <use>.

Since this means using FloatPoint/FloatSize to a larger degree than
before, use the abilities (operators et.c) of these a bit more where
possible.

Bug: 400725
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I15f5c17190b060a7e8312d5e3e124846301804b9
Reviewed-on: https://chromium-review.googlesource.com/832606
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#524740}
fs
[PE] Invalidate <use> instances even when mutating from the parser
When a layout is triggered when the parser is interrupted, an instance
tree can be built for a <use> that references a subtree that contains
the insertion point of the parser. This <use> instance (or instances)
would then not be invalidated when the parsing resumed.

Invalidate instances of an element when its children changes even when
the mutation originates from the parser. (This condition was added in
3c2310f2e9e0947e390c25911b61cfe69e162a78 without further explanation
"Only invalidate SVGElementInstances when !changedByParser is set.". Due
to the lazyness of the shadow tree/instance rebuilding this will
hopefully not regress performance.)

Bug: 794594
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I58f3a74ef9812503c0111d3564dad8ee3527d27b
Reviewed-on: https://chromium-review.googlesource.com/832386
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#524726}
bratell
Compile fix jumbo builds, be specific about which testing to use
There are two namespaces named testing, there is ::testing
and there is ::blink::testing. Inside blink code you have to
write ::testing to be sure to get the root ::testing namespace.

Depending on how ignorant the compiler is, it might work anyway,
but in jumbo builds the compiler often knows about the
blink::testing namespace.

TBR=leon.han@intel.com

Change-Id: I7617e074dba5cabb813c3a823757e0ba0ce15008
Reviewed-on: https://chromium-review.googlesource.com/832607
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524711}
tmoniuszko
Fix bookmark importing from Firefox
Bug: 638977
Change-Id: I3336f64fc9497417831afa24f8403a63b77797bb
Reviewed-on: https://chromium-review.googlesource.com/817435
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524685}
wdzierzanowski
Avoid race in MSE_Widevine tests
When run with the stub Widevine CDM, these tests suffer from a race
between the result of a failed StubCdm::Decrypt() and a failed
StubCdm::UpdateSession().  The tests expect the latter, but the former
often arrives first.

By allowing the stub to InitializeVideoDecoder() successfully and
returning cdm::kNoKey upon DecryptAndDecodeFrame() attempt we avoid the
DecryptingDemuxerStream errors altogether, so there is no race anymore.

Bug: 768745
Test: 'browser_tests --gtest_filter=*MSE_Widevine*' pass when run with the stub Widevine CDM

Change-Id: I35a35d006d118f8f7f9a8a64cf9334017644f4ea
Reviewed-on: https://chromium-review.googlesource.com/831026
Reviewed-by: Xiaohan Wang <xhwang@chromium.org>
Commit-Queue: Wojciech Dzierżanowski <wdzierzanowski@opera.com>
Cr-Commit-Position: refs/heads/master@{#524663}
fs
[PE] SVG <use> 'x' and 'y' are presentation attributes
'x' and 'y' were turned into presentation attributes in
https://codereview.chromium.org/896773002 (r190180), but the property
values were not actually applied.
Apply the property values from ComputedStyle, cleaning up the
surrounding code a bit in the process by moving the "is a <use> element"
check into a method. Also fix the FIXME in SVGUseElement::ToClipPath by
using the computed transform from the LayoutObject, rather than
"manually" recomputing it. This code-path should already require a
LayoutObject for the element in question.

Bug: 400725, 697052
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Iff261e468c4476cfb98efbadd6989ada027e47ab
Reviewed-on: https://chromium-review.googlesource.com/829314
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#524385}
bratell
Prepare service_worker tests for jumbo compilation
To avoid clashes between test data variables and similar changes,
this patch puts tests that would collide in custom namespaces
following a pattern used successfully in Blink.

content unittests needs about 60 CPU minutes to compile normally.
With jumbo that can be brought down to 4-6.

Bug: 746953
Change-Id: Ic573361fed81bbd46a97823e9761f94088d51814
Reviewed-on: https://chromium-review.googlesource.com/826637
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524357}
jl
Undefine another ENUM_CASE macro after use
This avoids collisions in jumbo/unity builds.

Change-Id: Ibd47b3c0be950c6f9fb5baf206612203c99e9b35
Reviewed-on: https://chromium-review.googlesource.com/827132
Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#524351}
bratell
Prepare various storage tests in content for jumbo compilation
To avoid clashes between test data variables and similar changes,
this patch puts tests that would collide in custom namespaces
following a pattern used successfully in Blink.

Bug: 746953
Change-Id: I093f221ca2017c095f0751d52d70efa44e3fed31
Reviewed-on: https://chromium-review.googlesource.com/826636
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524271}
bratell
Deduplicate and rename some constants in X11 clipboard code
In jumbo builds symbols with the same name that end up in
the same translation unit might clash even if they don't
normally clash. That was the case with a couple of constants
in the ui/base clipboard code for X11.

This patch shares some of the constants (the ones with the same
value) and renames the remaining one.

Bug: 773275
Change-Id: I718cecdf5e490de17217962767322f3c847a3e53
Reviewed-on: https://chromium-review.googlesource.com/824522
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524067}
bratell
Add support for jumbo in content/renderer
Jumbo is a unity build system for Chromium, aimed at dramatically
reducing the compilation times.

So far support has been added to blink, v8, content/browser and
a few smaller targets, reducing the effort by about half. How
that maps to real time depends on hardware. It scales proportionally
for 4 core/8 thread machines, but not in 48 core machines or in
goma.

The effort to compile content/renderer in a use_jumbo_build=true
build is right now about 6% of the total effort when compiling
chrome+content_shell+blink_tests. That is about 51 CPU minutes
on the test hardware. With jumbo that can be brought down to 6-7
CPU minutes, saving about 5 minutes real time on a 4 core/8 thread
machine for every full compilation.

Part of the support is to split away IPC code generation since
its macro based design isn't compatible with jumbo. See
comment in the code for more information.

Bug: 746953
Change-Id: If0cfe05986cdfbdd4974f03119c46c3493f6c63e
Reviewed-on: https://chromium-review.googlesource.com/822417
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524063}
bratell
Prepare appcache tests for jumbo compilation
To avoid clashes between test data variables and similar changes,
this patch puts tests that would collide in custom namespaces
following a pattern used successfully in Blink.

Bug: 746953
Change-Id: I49b9d127c513ead92c4743d6e5701b80a91db69e
Reviewed-on: https://chromium-review.googlesource.com/824268
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524042}
bratell
Removing dead TransportDIB member sequence_num_
Nobody set or read the ui::surface::TransportDIB member
sequence_num_ and that made the compiler upset in jumbo builds
where the compiler sees more of the whole picture.

Change-Id: Ia59e824e9e6175870065336c6403958878d2dba0
Reviewed-on: https://chromium-review.googlesource.com/826063
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524031}
bratell
Renaming one of two g_linux_input_method_context_factory
Both the real and the testing version of
ui::LinuxInputMethodContextFactory were named
g_linux_input_method_context_factory which caused collisions
in jumbo builds. This renames the testing one to
g_linux_input_method_context_factory_for_testing

Bug: 773275
Change-Id: Ia11a8a16ce5a40ef4a6469fe5bdcfeab2323e068
Reviewed-on: https://chromium-review.googlesource.com/826064
Reviewed-by: Yuichiro Hanada <yhanada@chromium.org>
Reviewed-by: Shu Chen <shuchen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524030}
bratell
Gave two kClassIdentifiers unique names
In jumbo builds several cc files are compiled in the same
translation unit and then the different kClassIdentifier
symbols clashed. This renames them to
kPeerConnectionRemoteTrackIdentifier
and
kProcessedLocalAudioSourceIdentifier

Bug: 746953
Change-Id: I7fe95ebbef69f4dd3b47258417cc917ba441dd91
Reviewed-on: https://chromium-review.googlesource.com/822191
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#524029}
jl
Enable jumbo for //components/sync
This reduces basic compile time by approximately 90 % (from 830 CPU
seconds to 83 CPU seconds on a pretty standard machine.)

Change-Id: I75a8c0d9e2d057380f89628891987f0acbaa86e5
Reviewed-on: https://chromium-review.googlesource.com/823033
Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#526224}
bratell
Declare //ui template instantiations so that all know about it
There were code in ui/views that didn't know about the class
property type specialization for ::wm::ShadowElevation. This was
solved by the linker later since there was other instances
of the right template.

In jumbo builds the compiler noticed that there was code
trying to access the template before the specialization was known
and that is a C++ error so the code did not compile.

The fix is to declare the specialization so that all code knows
about it.

Bug: 773275
Change-Id: Ifa4bc0088a8525a7a9907037d746ecb542dfbf71
Reviewed-on: https://chromium-review.googlesource.com/824665
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523903}
bratell
Removing "using namespace" from ui/events code
using namespace includes a full other namespace into the
global scope and that doesn't work well with jumbo builds for two
reasons: Too many symbols, and "using namespace" isn't allowed
in something that is included.

It is also not allowed by the style guide.

This patch removes the using namespace and uses explicit
namespaces instead. It also changes some repetitive code
to use macros to make it less repetitive and easier to read.

Bug: 773275
Change-Id: If45f81b435920bd9048567ec65f9b142046e86ea
Reviewed-on: https://chromium-review.googlesource.com/824843
Reviewed-by: Timothy Dresser <tdresser@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523808}
fs
[PE] Fix text selection of <svg:text> subject to 'textLength'
With 'textLength' and 'lengthAdjust' with the value 'spacingAndGlyphs',
each SVGTextFragment is subject to an additional scale factor that
stretches the glyphs along the x- or y-axis.
This scale factor was not (any longer) taken into account by
SVGInlineTextBox::OffsetForPositionInFragment, which resulted in the
incorrect offset being calculcated.
Apply the (inverse) length_adjust_scale from SVGTextFragment before
querying the font for an offset.

Remove the |include_partial_glyphs| argument from
SVGInlineTextBox::OffsetForPositionInFragment since it's always true,
and also use 'float' rather LayoutUnit for the position.
Remove the dead |horizontal_glyph_stretch_| member variable from TextRun
since it's no longer used (since the simple shaper path was removed.)

Bug: 793075
Change-Id: Ia7d369d914f5afd87d198b7b21077e180fc8bc59
Reviewed-on: https://chromium-review.googlesource.com/824162
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523787}
bratell
Moved two kSlopEpsilon constants that clashed in jumbo builds
Both gesture_detector.cc and scale_gesture_detector.cc have
a local constant kSlopEpison with the same value. Since
I could find no suitable shared place for it, I moved them
into a tighter scope. That way they will not clash in jumbo
builds where several cc files share the same translation
unit.

Bug: 773275
Change-Id: I22c6a452532fbe0b2be3fddb29388a2d65aa901a
Reviewed-on: https://chromium-review.googlesource.com/824241
Reviewed-by: Timothy Dresser <tdresser@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523784}
bratell
Rename one of two ItemView classes
There is one ItemView class in notification_view_md.h so if that
header is in the same translation unit as notification_view.cc
then the local ItemView class will fail to compile. That happens
in jumbo builds.

Bug: 773275
Change-Id: I2911c4cbcc73df186d9520d4182a186a76d2ce34
Reviewed-on: https://chromium-review.googlesource.com/824364
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Peter Beverloo <peter@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523774}
mharanczyk
Add missing blink_header dep to //third_party/WebKit/Source/platform/heap.
Bug: 794207
Change-Id: Icc7a0654a643c53ecc6cd68d2c3a73e6bd394a81
Reviewed-on: https://chromium-review.googlesource.com/823030
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523749}
bratell
Give some ServiceWorker and TLS related symbols more unique names
In jumbo builds more code compile in the same translation unit
so it's more important to keep the names unique to avoid
compilation clashes.

Bug: 746953
Change-Id: I649731d0725a9c5b5ab0ec72775cc81ea54434a9
Reviewed-on: https://chromium-review.googlesource.com/819556
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523737}
bratell
Gave 3 kMaxMessageChunkSize constants unique names.
There are three very similar pieces of code with identical
constants controlling and this patch renames them so
that they don't clash in jumbo builds.

Jumbo builds compile multiple cc files in the same translation
unit which means that those cc files will share the same
anonymous namespace.

Bug: 746953
Change-Id: I85462687798819212b78926c92d3351f44039583
Reviewed-on: https://chromium-review.googlesource.com/822474
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523723}
bratell
Avoid importing the symbol name "Result"
There are many types in Chromium named Result. When importing
that name into the global (or content) namespace with a
using statement, you run the risk of clashing with another
Result type. That happened in jumbo builds where more code
is compiled per translation unit.

This patch uses the fully qualified name instead of just
Result instead.

Bug: 746953
Change-Id: I5ccfb5e6b70712372a764c89b40a2a9340cc33fb
Reviewed-on: https://chromium-review.googlesource.com/822335
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523722}
bratell
Renamed local BindInterface since it clashed with template
There is a template named BindInterface in
content/public/common/bind_interface_helpers.h so to avoid
compilation failures when that header is included directly
or indirectly (as in jumbo builds), it's better to call
local functions something else than BindInterface.

This renames BindInterface -> BindNamedInterface.

Bug: 746953
Change-Id: Ib595232b8c6c9ae58b5321ff58ad1c2927787631
Reviewed-on: https://chromium-review.googlesource.com/822433
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523721}
jl
Stop importing syncable::WriteTransaction into syncer namespace
In jumbo/unity builds it conflicts with syncer::WriteTransaction defined
in components/sync/syncable/write_transaction.h.

Change-Id: I19a325af6299d955577aec10d36f21b948859035
Reviewed-on: https://chromium-review.googlesource.com/822091
Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#523502}
jl
Stop importing crypto::Encryptor into syncer namespace
In jumbo/unity builds, it conflicts with syncer::Encryptor defined in
components/sync/base/encryptor.h.

Change-Id: I0b9c4e6eafd88eae46892ff97f2ade41f8c0b99a
Reviewed-on: https://chromium-review.googlesource.com/822090
Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#523491}
jl
Undefine ENUM_CASE macro after use
Multiple source files in components/sync/ define and use a macro named
ENUM_CASE. Some already undefine it afterwards, but some don't and that
causes issues in jumbo/unity builds where all the source files are
compiled in a single translation unit.

Change-Id: I0ce5d1d0e2008f52c68c8dd174d537b7ef1a42f1
Reviewed-on: https://chromium-review.googlesource.com/817280
Reviewed-by: Pavel Yatsuk <pavely@chromium.org>
Commit-Queue: Jens Widell <jl@opera.com>
Cr-Commit-Position: refs/heads/master@{#523378}
bratell
Rename one of the FrameMaps to FrameProxyMap
There are two types named FrameMap, one in render_frame_impl.cc
and one in render_frame_proxy.cc. As long as the type isn't
exported that works, but in jumbo builds the cc files are
compiled in the same translation unit which causes collisions.

Bug: 746953
Change-Id: I582d7f032caba1a201ac72c8181eb4c2432cc5bf
Reviewed-on: https://chromium-review.googlesource.com/819636
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523369}
bratell
Renamed two identical methods that checked hwacc state
There is two identical methods named
PP_HardwareAccelerationCompatible and I'm not sure what is
a good place to deduplicate them so this patch only renames
them to unblock jumbo work in content/renderer. The methods
with the same name clashes in jumbo builds where many
cc files are compiled in the same translation unit.

Bug: 746953
Change-Id: I12361f3226bdc7a3c6113201183ec26b263917f4
Reviewed-on: https://chromium-review.googlesource.com/819950
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523221}
bratell
Rename two of the ReleaseOriginalFrame methods
In jumbo builds, the three different ReleaseOriginalFrame
methods in content/renderer/media ended up in the same
translation unit and then Bind() didn't know which one to use

Bug: 746953
Change-Id: I584df28230d29bbc80d9d6cd2884300b7a3d9409
Reviewed-on: https://chromium-review.googlesource.com/819611
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523213}
bratell
Remove the last X11 includes in //ui outside ui/gfx/x/*
X11 header files are infamous for creating macros with common
names such as None, True, False, Status, Bool, ...

To save oursaves the mess that creates, they are now wrapped
in a header, ui/gfx/x/x11.h, which puts those symbols in the
x11 namespace and removes the global macros.

This means we can remove various undefs in files that have had
problems in the past.

Bug: 782184
Change-Id: Ie48fe619e3101344d53ea837b0b21570516185ca
Reviewed-on: https://chromium-review.googlesource.com/814676
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523149}
bratell
[jumbo] Too many CurrentWorkerId()
cache_storage and notifications both had "CurrentWorkerId()" with
the same (trivial) implementation but used differently. For
jumbo builds to not have those clash, this patch renames the
one in notifications -> NotificationWorkerId()

Bug: 746953
Change-Id: Ic00a4e23448bd2d50315a5561f798ed40be56fdc
Reviewed-on: https://chromium-review.googlesource.com/819558
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523146}
bratell
[jumbo] Avoid using the same kMaxNumberOfBuffer name everywhere
In jumbo many files compile together in the same translation
unit and then they share anonymous namespace so if they
use the same constant name, such as kMaxNumberOfBuffers or
kDefaultNumberOfBuffers, they will clash.

Bug: 746953
Change-Id: I0ce707eac13d4f928e482ee62f0d112c69900dae
Reviewed-on: https://chromium-review.googlesource.com/819830
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523142}
fs
[PE] Fix transform-origin on SVG <text>
LayoutSVGText would not compute the correct transform if subjected to a
transform-origin (or transform) with percentages, since the transform
had to be computed early in UpdateLayout in order to allow a font to be
chosen based on the current transform.

Rearrange the code in LayoutSVGText::UpdateLayout a bit to allow the
transform computation to use the correct bounding box, but also compute
a tentative transform before updating the font and its metrics.

Remove the special-case in SVGElement::CalculateTransform and simplify
accordingly.

Bug: 225799
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I34728dfeaafba72c9f3195a29fbdd14673d186c2
Reviewed-on: https://chromium-review.googlesource.com/817734
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#523141}
bratell
Remove X11 includes and replace with the ui/gfx/x/x11.h wrapper
X11 headers pollute the global namespace with macros with
common words like None, Status, False. To avoid problems
because of that we now wrap X11 includes in ui/gfx/x/x11.h
and move all problematic words to the x11 namespace.

Bug: 782184
Change-Id: I81859c8aabae677c40614d3c26036c5d4d1e715a
Reviewed-on: https://chromium-review.googlesource.com/819731
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523121}
bratell
[jumbo] undef STATIC_ASSERT_ENUM after use
Many files define their own STATIC_ASSERT_ENUM macro. When
those files, in a jumbo build, end up in the same translation
unit, there will be clashes.

For macros that clash, the simplest fix is to undef them after
use to reduce the scope where the symbol is available.

Bug: 746953
Change-Id: Id0d22ed46663c79ce5a43e5f09420b1758bf1d88
Reviewed-on: https://chromium-review.googlesource.com/819633
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523116}
bratell
Avoid using GetMessage in Windows since its a Win macro.
Depending on whether certain headers had been included,
GetMessage was a macro that expanded to GetMessageW. This
caused later linker errors in jumbo builds.

This patch renames the function GetIpcMessage to avoid any
confusion.
Alternatives are:
* #undef the macro (can cause problems with later code)
* Make sure that everyone that includes dwrite_font_fake_sender_win.h
also has Windows.h included so that the macro is always there.

Bug: 746953
Change-Id: Ia172ee74dc430c5fb25d676f018695dc001f3470
Reviewed-on: https://chromium-review.googlesource.com/819552
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#523107}
bratell
Windows jumbo compile fix. NO_ERROR is a macro in Windows
Windows headers define a macro named NO_ERROR so it is
best to avoid that name. This renames the new NO_ERROR
enum value to CBOR_NO_ERROR, similar to GL_NO_ERROR.

Bug: 780504
Change-Id: I83aa3b83b9239659c296687a9109f255b272a1ce
Reviewed-on: https://chromium-review.googlesource.com/819251
Reviewed-by: Balazs Engedy <engedy@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#523097}
fs
Remove local BlendFloatPoint from SVGPathBlender.cpp
AnimationUtilities.h has a Blend(...) overload for FloatPoints - which
differs only by the type of the |progress| argument (double vs. float),
so use the one from AnimationUtilities.h.
Also reduce type-impedance by making |progress_| and |add_types_count_|
from SVGPathBlender::BlendState double and float respectively, since these
conversions are otherwise done over and over.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I34801971030ba082a2b2ebe66c1227314b6a5709
Reviewed-on: https://chromium-review.googlesource.com/816799
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#522777}
bratell
[jumbo] Ignore some more file types people put in sources lists
*.js and *.css files (used in //extensions) are not dangerous
to have in sources lists so silently let them be.

Bug: 787836
Change-Id: I8dc2c16505594ed5342cad008dc1ca8b5a499b73
Reviewed-on: https://chromium-review.googlesource.com/814554
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#522731}
bratell
Add support for jumbo builds to ui/views
Jumbo is unity build system for Chromium, where files are
merged before compilation. This gives a much lower resource
requirement for compiling since headers only have to be
compiled once and only one set of template instances has to
be generated (and because of some other reasons).

This is expected to lower the resource usage for compiling
chrome+content_shell+blink_tests by 1%.

Bug: 773275
Change-Id: I6db13afe6147a9186d48c6796b7331d502ea939c
Reviewed-on: https://chromium-review.googlesource.com/786471
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#522724}
bratell
Replace X11 includes in media with ui/gfx/x/x11.h
X11 header files are infamous for creating macros with common
names such as None, True, False, Status, Bool, ...

To save oursaves the mess that creates, they are now wrapped
in a header, ui/gfx/x/x11.h, which puts those symbols in the
x11 namespace and removes the global macros.

I believe the references to min and max came from an include of
<X11/Xlibint.h>. I can't find such an include anymore and
the one in user_input_monitor_linux.cc doesn't seem needed so
I removed all undefs of min and max and all includes of that
header.

Bug: 782184
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I3a09cccee04eb312ab6b2575be01753df8a1f137
Reviewed-on: https://chromium-review.googlesource.com/806217
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Fredrik Hubinette <hubbe@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#522723}
bratell
Remove a dead code block in content/common/BUILD.gn
A code block for linux without use_seccomp_bpf tried to
remove files that were never added. Since it doesn't
crash, the code is unused.

Change-Id: Ib0bd9d3c9dffa400f3be5c5027c9f959e62124d2
Reviewed-on: https://chromium-review.googlesource.com/814398
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#522561}
bratell
Inline ConvertSyncSocketHandle to avoid duplicate symbols
The symbol name ConvertSyncSocketHandle is longer than the
code so inlining it makes the code shorter and possibly smaller.

This is primarily triggered by jumbo build errors.

Bug: 746953
Change-Id: I661209ae56c7c4605ed0ba7426d19eecc095f6e9
Reviewed-on: https://chromium-review.googlesource.com/814674
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#522558}
bratell
Be explicit about the testing namespace because there are two
There is both a ::testing and ::blink::testing namespace and if
you refer to just "testing" inside the ::blink namespace you can
get either one depending on what the compiler knows.

This broke jumbo builds where the compiler knew about
::blink::testing and thought "testing" meant ::blink::testing
instead of ::testing.

The fix is to use the :: prefix.

Change-Id: I15b2502a5b15ef585816faae843a97b3d2d73c93
Reviewed-on: https://chromium-review.googlesource.com/813775
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#522401}
fs
Remove dead Blend() code
(last use probably removed by https://codereview.chromium.org/2750293003
and similar earlier CLs.)

ShadowList: :Blend and BasicShape::Blend/CanBlend are no longer used
Change-Id: I3d9690768f64fa8c602b55cb1a0bf8654100e04c
Reviewed-on: https://chromium-review.googlesource.com/809012
Reviewed-by: Stephen McGruer <smcgruer@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#522104}
bratell
Declare //ui template instantiations so that all know about it
There were code in ui/views that didn't know about the class
property type specialization for gfx::Insets* and Views* so they
got the default template implementation.

In jumbo builds the compiler noticed that there was code
using the default implementation before the specialization
appeared and it triggered a compilation error.

The fix is to declare the specialization so that all code uses it.

Bug: 773275
Change-Id: Ifa925a2002ba930af16dc6940a04b2a480721438
Reviewed-on: https://chromium-review.googlesource.com/786190
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#521803}
fs
Make the Length(LengthType) constructor explicit
Per coding style:

https: //google.github.io/styleguide/cppguide.html#Implicit_Conversions
Change-Id: Ic7a05422e72b3e445236b054d887b5467f79ab6c
Reviewed-on: https://chromium-review.googlesource.com/809010
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#521786}
bratell
Replace X11 includes in viz with ui/gfx/x/x11.h
X11 header files are infamous for creating macros with common
names such as None, True, False, Status, Bool, ...

To save oursaves the mess that creates, they are now wrapped
in a header, ui/gfx/x/x11.h, which puts those symbols in the
x11 namespace and removes the global macros.

Bug: 782184
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ida4d26422f44edda1a0120f52ffbaa4e437ab012
Reviewed-on: https://chromium-review.googlesource.com/805814
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#521740}
bratell
Replace X11 includes in //gpu with ui/gfx/x/x11.h
X11 header files are infamous for creating macros with common
names such as None, True, False, Status, Bool, ...

To save oursaves the mess that creates, they are now wrapped
in a header, ui/gfx/x/x11.h, which puts those symbols in the
x11 namespace and removes the global macros.

Bug: 782184
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I10a9acecb8e7adacd170d1080a411bc9d1e49f79
Reviewed-on: https://chromium-review.googlesource.com/806275
Reviewed-by: Victor Miura <vmiura@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#521659}
fs
Eliminate some unnecessary copies of Lengths
Using the Length store directly should work fine most of the time, and
avoids the fairly bloaty Length copy constructor and destructor pair.

Some minor massaging of ValueForPositionOffset required, but otherwise
straightforward.

Change-Id: I1b1d0b14f3897fc4173eab123cc3b241b28c70d3
Reviewed-on: https://chromium-review.googlesource.com/806834
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#521473}
fs
Simplify some Length comparisons with 'auto'
Using Length::IsAuto() is more efficient (and generates significantly
less code) than constructing a new Length and comparing with that.

Also replace some open-coded "is auto" checks with said method, and
simplify the surrounding code a bit.

Change-Id: I974a28a0eef969b56557428eb019f7cf1dac18c1
Reviewed-on: https://chromium-review.googlesource.com/806170
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#521456}
bratell
Support jumbo in content/{utility,public,gpu,network}
Jumbo is a unity build system aimed at dramatically reducing
compilation times by merging cc files into larger translation
units.

This change will remove about 6 CPU minutes from the effort to compile
chrome+content_shell+blink_tests on the reference hardware. This is
slightly less than 1% of the total effort in a jumbo build.

Bug: 746953
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I19856815c50724004d11a7e5342e84bff802e6f4
Reviewed-on: https://chromium-review.googlesource.com/801013
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521317}
bratell
Clear //remoting from direct X11 includes
X11 headers pollute the global namespace. Instead we use a
wrapper header (ui/gfx/x/x11.h) that puts important symbols
in the x11 namespace and removes them from the global namespace.

Bug: 782184
Change-Id: I3173f2dde17e6991cc31bd89ceaee8e651ccaf3f
Reviewed-on: https://chromium-review.googlesource.com/801390
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#521303}
bratell
Adding jumbo to blink/common.
All of blink already supports blink, except for code that has been
overlooked. This directory, third_party/WebKit/Source/common,
was such an overlooked piece of code.

Change-Id: Ifc9cd0ab64f99d686d3139c367d576a7390408d3
Reviewed-on: https://chromium-review.googlesource.com/796793
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520918}
mpichlinski
CHR-6375: [Windows] Fixed crash on fallback from ANGLE to SwiftShader.
During fallback from ANGLE to SwiftShader it is required to unload
ANGLE libraries, otherwise SwiftShader will fail to load its own
libGLESv2.dll.

Fixed ANGLE platform reset.

Fixed order in ShutdownGL.

Bug: 760063
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: If8797b49f2b5d04cb610302f96c82011dee9b3a9
Reviewed-on: https://chromium-review.googlesource.com/774296
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520730}
bratell
Change X11/* includes to ui/gfx/x/x11.h includes
Includes from the X11 system libraries declare macros with common
names such as None, True, False, Status and those complicate
the life for other code. To avoid that complication we have
moved the common symbol names to the namespace x11 and changed
so that you include "ui/gfx/x/x11.h" instead.

Bug: 782184
Change-Id: I3d2893425bb79cb29d6c5a602512a0e8d3cc30cd
Reviewed-on: https://chromium-review.googlesource.com/800550
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#520671}
bratell
Support jumbo in third_party/WebKit/Source/platform/instrumentation
Jumbo is a unity build system for Chromium, aimed at reducing
compilation times by merging cc files into larger
translation units.

This is 0.1% of the total build time so not very much but also
the final remaining part of blink/platform. And all the CPU
minutes add up.

Bug: 761475
Change-Id: Id0643d869960a660a91a4f3a9a23b4585f9e0073
Reviewed-on: https://chromium-review.googlesource.com/785678
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#520656}
bratell
Forward declare WebUIMessageHandler in the right namespace
A header forward declared a WebUIMessageHandler in the global
namespace which seriously confused jumbo builds since the
actual WebUIMessageHandler is in the content namespace.

Change-Id: I623b2f729d03dbea199c27f62790f8119d0e3926
Reviewed-on: https://chromium-review.googlesource.com/800933
Commit-Queue: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Achuith Bhandarkar <achuith@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520646}
wdzierzanowski
Prevent flakiness of histogram tests in //media
Initialize base::StatisticsRecorder early in the test suite to ensure
histogram pointers created at any moment during test execution are
available globally.

See https://codereview.chromium.org/2901703002 for a more complete
explanation.

Change-Id: Ib2c81dd8ef960168355c53dbc80f2a7833153483
Reviewed-on: https://chromium-review.googlesource.com/800431
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520632}
bratell
Fix include guard for test_fileapi_operation_waiter.h
Change-Id: Iaa408e8195368c736370a8aee78fe3ceec741a59
Reviewed-on: https://chromium-review.googlesource.com/788050
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#520346}
bratell
Clearing content from include <X11/*>
X11 headers leak a lot of macros named things like None, Status, True,
False and they cause problems with normal code. To avoid that we now
wrap all commonly named symbols in an x11 namespace and include
"ui/gfx/x/x11.h" instead of <X11/*>.

Bug: 782184
Change-Id: I37bf100f2d2acc5d51ec62051e90939b56d9f690
Reviewed-on: https://chromium-review.googlesource.com/797034
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#520344}
bratell
Add support for jumbo builds to ui/aura
Jumbo is unity build system for Chromium, where files are
merged before compilation. This gives a much lower resource
requirement for compiling since headers only have to be
compiled once and only one set of template instances has to
be generated (and because of some other reasons).

This is expected to lower the resource usage for compiling
chrome+content_shell+blink_tests by 0.5%.

Bug: 773275
Change-Id: I1be67ab58e42ea8fbe8537f719b05ca3082aa3c5
Reviewed-on: https://chromium-review.googlesource.com/786470
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#520297}
fs
Update the computed transform when the reference box changes
When the object bounding box (for 'fill-box') or the viewport (for
'view-box') changes, we need to update the transform as well.
Add a bool to LayoutSVGShape to track if the transform depends on the
reference box, to make checking this quicker.

Bug: 595829
Change-Id: Ie7429553e78b08f7a574b1e7beae30c738250078
Reviewed-on: https://chromium-review.googlesource.com/796271
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520259}
fs
A 'transform-box' change can yield a different transform
We wouldn't invalidate as needed if the 'transform-box' property changed
its value.

Bug: 595829
Change-Id: Ibcaa9e94b54b99724f2d3e1ca5dedd868d85b776
Reviewed-on: https://chromium-review.googlesource.com/796213
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#520211}
bratell
Adding include guard to mock_leveldb_wrapper.h
Change-Id: Idf7504a625141e1177b4fe2457608847e7120fc4
Reviewed-on: https://chromium-review.googlesource.com/797031
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520139}
fs
WPT tests for the 'transform-box' property
Basic tests for 'fill-box' and 'view-box' with various viewport
configurations.

Bug: 595829
Change-Id: I81ec92e958c5ec240c7932219371b6c5369f5ac5
Reviewed-on: https://chromium-review.googlesource.com/796211
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#520111}
fs
Make stroke bounding boxes for <line> tighter
Since <line> elements are just a two point line segment, it does not
have any line joins and thus needn't apply any correction for the miter.

Bug: 435097, 788340
Change-Id: Ie7e9d89e0f7c741cf7cf40b3af82521869bb5b54
Reviewed-on: https://chromium-review.googlesource.com/790294
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#519779}
bratell
Renaming the Mac specific MenuController -> MenuControllerCocoa
There were two public classes, both in //ui, named MenuController
and they clashed in jumbo builds and probably contributed to
some confusion.

This patch renames the one for Mac MenuControllerCocoa

Bug: 773275
Change-Id: I3d0d3e98a120c0df3da47cc691b48cdf89e51d6f
Reviewed-on: https://chromium-review.googlesource.com/791610
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519414}
fs
Override CanRender in StyleInvalidImage
A StyleInvalidImage can never be rendered (GetImage always return
nullptr), so returning true - like the base class does - seems to be
sending the wrong signals.

Bug: 773272
Change-Id: I5ca20db512ce8b0e92546d626a4a6a2d85ed7908
Reviewed-on: https://chromium-review.googlesource.com/785651
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#519390}
fs
Add documentation to the StyleImage hierarchy
Bug: 773272
Change-Id: I643ef81395c1f5aa051265bb6fe90073289948c4
Reviewed-on: https://chromium-review.googlesource.com/785650
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519355}
bratell
Jumbo compile fix: Rename one of the TaskQueueManagerForTest
There are two (identical but small) TaskQueueManagerForTest
classes in renderer_scheduler_test_support.cc and
create_task_queue_manager_for_test.cc.

In jumbo builds where these files are compiled in the same
translation unit, they will clash and cause compilation errors.

This patch renames on of them
TaskQueueManagerForRendererSchedulerTest

(Followup to

https: //chromium-review.googlesource.com/c/chromium/src/+/763511 )
Change-Id: Ia282d00e2982744d8842df17455eaf599f2bd280
Reviewed-on: https://chromium-review.googlesource.com/790514
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#519318}
bratell
Jumbo build fix: Too many Mixin classes in oilpan tests.
Both HeapTest.cpp and IncrementalMarkingTest.cpp use local
test classes named Mixin. When compiled together in the
same translation unit, it will not compile.

TBR=haraken@chromium.org

Change-Id: Idfdfae3a9d81c5a1ad7d039818e06e11157806ef
Reviewed-on: https://chromium-review.googlesource.com/789863
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#519292}
bratell
Gave two global instance variables unique names
in jumbo builds two files with global variables named
instance clashed. This renames them to
g_transient_window_client_instance and
g_window_stacking_client_instance

Bug: 773275
Change-Id: I29dd9ef7e792959b128e99242b6ec6e13be183a8
Reviewed-on: https://chromium-review.googlesource.com/786236
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#519277}
fs
A stroke-width of zero should not generate geometry
A stroke-width of 0 is a valid value, but "is not painted" according to
spec. This can be interpreted as not generating any geometry, and so not
even "pointer-events: stroke" would cause anything to be hit.

Check for a zero stroke-width in LayoutSVGShape::StrokeContains and fail
the hittest in that case. This matches what the painting code-path does,
except we don't check for the existence of a stroke here, because we
need to handle the !has-stroke case too.

Bug: 459640
Change-Id: I508fae7c43873027331ffaa4b9e20783d949fc15
Reviewed-on: https://chromium-review.googlesource.com/788853
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519143}
bratell
Add include guard for video_capture_jpeg_decoder.h
Change-Id: Ibd90d0f605121acfe707d27090497c97f905a312
Reviewed-on: https://chromium-review.googlesource.com/787972
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519102}
bratell
Let jumbo ignore known strange files in sources lists
Many targets end up with stray files in their sources list,
files which trigger no toolchain. Jumbo used to assert that this
was bad but since other tools handle it silently, jumbo
should also be a bit more forgiving.

Bug: 787836
Change-Id: Ib70c3c5a053621de656af15fb4fcc413673db93c
Reviewed-on: https://chromium-review.googlesource.com/785811
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#518979}
fs
Simplify SetNeedsResizeObserverUpdate invocations in LayoutSVG*
We can avoid calling this method for cases where we know the bounds have
not changed. Sink calls in the LayoutSVGShape hierarchy out of
UpdateShapeFromElement to a single callsite in
LayoutSVGShape::UpdateLayout. Also, no need to null-check the Element.

Bug: 435097
Change-Id: I2aca3056c9d016a30f6a54da29a719c9c9f3710c
Reviewed-on: https://chromium-review.googlesource.com/787650
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#518952}
fs
Use the same bounding box computation even with fallback path
LayoutSVGShape::UpdateShapeFromElement() creates a Path for the shape as
well as update the bounding box (fill/object and stroke.)
When we fallback to using a Path rather than the fast path
representation for the shape, we can still use the same code for
computing the bounding boxes. So instead of calling LayoutSVGShape's
UpdateShapeFromElement from LayoutSVGRect and LayoutSVGEllipse, just
call CreatePath() in the codepaths that transitions to the fallback/Path
codepath. Non-scaling stroke still require a "precise" stroke bbox.

This should make stroke bounding boxes for <rect>, <circle> and
<ellipse> tighter again.

Bug: 435097
Change-Id: I5361689371cb78eb405e0403f3be165bd254aab2
Reviewed-on: https://chromium-review.googlesource.com/779460
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#518880}
bratell
Typo fix in sources list. File missing .h.
Adding the missing .h.

Change-Id: Ie2d4f9df6c48ba73180cb6bdec8d55b352865928
Reviewed-on: https://chromium-review.googlesource.com/786015
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#518877}
bratell
Rename one of two "UseMd()" in ui/views
Both bubble/bubble_border.cc and controls/combobox/combobox.cc
have help functions "UseMd()" (that only calls
ui::MaterialDesignController::IsSecondaryUiMaterial() )

Since I cannot find a common location and the methods are small,
I just renamed one of them to UseMaterialDesign()
to avoid clashes in jumbo builds.

Bug: 773275
Change-Id: Ic5a99af09044fe46ac9aab3f858914a53399ca24
Reviewed-on: https://chromium-review.googlesource.com/786234
Reviewed-by: Michael Wasserman <msw@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#518757}
bratell
Rename one of two kThumbStroke in ui widget controls
Both the scrollbar and slider code have a kThumbStroke and
they are not the same. In jumbo builds those clash so this
patch renames the slider version to kSliderThumbStroke.

Bug: 773275
Change-Id: I53f7720bc34a3d71c9a0bb7061e0d185e1c8e68c
Reviewed-on: https://chromium-review.googlesource.com/786235
Reviewed-by: Michael Wasserman <msw@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#518743}
bratell
Support jumbo in //cc
Jumbo is the Chromium implementation of a unity build system where cc files are combined
before they are compiled. This adds support for that in //cc which can make it compile 8-9x
times "faster" by saving 10-15 CPU minutes (1-2% of the effort to
compile chrome+content_shell+blink_tests).

The mapping to wall time depends on the exact hardware. More parallel computers benefit less.

Bug: 786926

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I687873c09abbd27f7525426c943e5bb4e64748b4
Reviewed-on: https://chromium-review.googlesource.com/776801
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#518730}
bratell
Remove jumbo_excludes triggered by too many Init()
The Android JNI generator generated code that cause there to be a
lot of Init() methods in Android code. The JNI generator has now
been changed to add a class name prefix to the function names
so these excludes are no longer needed.

This will speed up Android jumbo builds by a couple of seconds or so
(not measured).

Bug: 779013,746953
Change-Id: I24e550d6e493f87022e9887f7a957dc557233b20
Reviewed-on: https://chromium-review.googlesource.com/783212
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#518728}
bratell
Add jumbo support for heap and heap unit_tests (-0.75 CPU minutes)
This adds support for jumbo compilation in oilpan which saves about
0.75 CPU minutes of effort (about 10% of blink/platform or 0.1% of the
total remaining compilation time).

Bug: 761475
Change-Id: Id7606583d5a97e9f6692b756acc062c73b27dbe3
Reviewed-on: https://chromium-review.googlesource.com/693098
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518718}
bratell
Replace system header includes with gfx/x/x11.h in ui/views
X11 system headers define macros that easily clash with other code.
For instance None, True, False. To avoid that, which becomes
critical for jumbo builds, we instead have a x11.h wrapper
that protects the code from the dangerous macros.

Also removes use of the "Time" type in global scope since Time
is an X11 typedef and can't be protected by x11.h.

Bug: 782184
Change-Id: I1a605bddd8c5e4fe2f83c8432509915dc00b3700
Reviewed-on: https://chromium-review.googlesource.com/785170
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#518648}
fs
Use approximate stroke bounding boxes for SVG shapes
This moves the stroke approximation code from
LayoutSVGPath::HitTestStrokeBoundingBox to a helper in LayoutSVGShape,
and then makes use of it in LayoutSVGShape::CalculateStrokeBoundingBox()
(which is the generic "stroke bounds" computation for shapes) as well.

This makes stroke bounding box computation O(1) (assuming a fill bbox
exists), avoiding the generation of a stroke path, which can be
expensive for the more "complex" parametrizations (primarily dashes.)

The downside is of course lower fidelity, and the approximation will
always be both larger than the fill bbox and larger than the "exact"
stroke bbox.

Also fix an issue where a miter-limit < 1 would incorrectly shrink the
resulting bounding box in some cases.

Bug: 435097
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Id0228bc78bb7d8db223be082106f3c3d2bcb038a
Reviewed-on: https://chromium-review.googlesource.com/774746
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518392}
bratell
Use "gfx/x/x11.h" instead of system headers in ui/events
By using x11.h instead of X11 system headers we prevent spreading
some common macros named None, Status, True, False, ... in the
global namespace. These macros forced various workarounds in
innocent code and made jumbo builds harder.

This moves a lot of X11 configuration and defines from ui/event
headers into ui/gfx/x/x11.h to make sure no code has to manually
include X11 headers.

Bug: 782184
Change-Id: Iab069db82d71cd27df395afefa34a54c252b874d
Reviewed-on: https://chromium-review.googlesource.com/779144
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518334}
bratell
Rename two ImageDecodeTaskImpl classes
There were two ImageDecodeTaskImpl classes in cc, one for the
GPU image handling and one for the Software image handling they
were small and slightly different so no reason trying to merge them
Instead this renames them so that their names don't clash in
jumbo builds where cc files are merged into large translation units.

Bug: 786956
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I9e481a969d9a897665855f05a5dedbc86e194eb1
Reviewed-on: https://chromium-review.googlesource.com/779194
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#518313}
bratell
Add the classname to JNI method names to make them unique
Our JNI code generator generated a lot of Init(...) methods which
collided in jumbo builds. This patch adds a class name prefix to
them, and all other JNI methods, so that they have locally unique names.

TBR=erikchen@chromium.org,fgorski@chromium.org,sergeyu@chromium.org,dtrainor@chromium.org,rouslan@chromium.org,vakh@chromium.org,rogerta@chromium.org,holte@chromium.org,bajones@chromium.org

Bug: 779013
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.linux:linux_site_isolation;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I86b6ac83c8e0a3507bd1d0efc48d625c12b4bb2b
Reviewed-on: https://chromium-review.googlesource.com/765973
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Sky Malice <skym@chromium.org>
Reviewed-by: Lambros Lambrou <lambroslambrou@chromium.org>
Reviewed-by: Yaron Friedman <yfriedman@chromium.org>
Reviewed-by: Luke Halliwell <halliwell@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Bernhard Bauer <bauerb@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518300}
bratell
Wrap test in namespace to avoid jumbo collisions
Tests often use the same symbols because of copy/paste or
the repetitive nature of testing and

flat_tree_traversal_ng_test.cc has a TestCommonAncestor, same as
FlatTreeTraversalTest.cpp. Since tests don't export any symbols
wrapping them in a namespace is a simple way to avoid jumbo
clashes.

Bug: 745732
Change-Id: I91f7e732a28d67ebe5495791cb632a06c87534cc
Reviewed-on: https://chromium-review.googlesource.com/781779
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#518236}
bratell
Renamed some cache size constants that shared names.
Both the GPU image cache and the software image cache
used the same name for its cache size constants. This caused
collisions in jumbo builds where the cc files were
compiled together in the same translation unit.

Bug: 786956
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: Ic6a66f45daacc94040e1cc11410b85d674651548
Reviewed-on: https://chromium-review.googlesource.com/779401
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#518228}
bratell
Rename one set of Children() -> LayerChildren()
There are two template based iterators in
trees/property_tree_builder.cc and layers/layer_list_iterator.cc
that both use static |Children()| functions to define what the
template instances will do. If these end up in the same
translation unit in a jumbo build (where cc files are merged into
the same translation unit), then they will clash.

Since the functions are small and I don't know where a good place
would be, this CL does not merge them. Instead one of the instances
is renamed LayerChildren().

Bug: 786956
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I076ad4725ce571a667344145fd4a995be1edafff
Reviewed-on: https://chromium-review.googlesource.com/779140
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#518222}
bratell
Add presubmit test that Blink doesn't expose -blink.h headers
mojo's -blink.h headers are for internal use in Blink. There
are -shared.h headers for use outside blink.

Change-Id: I2539a6ddab9cf878ddd8e31d27497dbedede6a76
Reviewed-on: https://chromium-review.googlesource.com/753451
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518215}
bratell
Rename two RasterBufferImpl to make the names more unique
In jumbo builds (use_jumbo_build=true), cc files are merged so local
symbols, such as these RasterBufferImpl, will end up in the same
translation unit and prevent the code from compiling.

Having unique names have other benefits as well in debugging and
documentation so this CL renames them ZeroCopyRasterBufferImpl
and BitmapRasterBufferImpl.

Bug: 786926
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I0b0af89cc1c0b3581a18a685742ad3e8c6e6b429
Reviewed-on: https://chromium-review.googlesource.com/779119
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#518210}
bratell
Rename two different kInitialResourceId
In jumbo builds two different kInitialResourceId constants
(one with value 1 and one with value 2) ended up in the same
translation unit which then would not compile.

This renames them to kDisplayInitialResourceId and
kLayerTreeInitialResourceId.

Bug: 786956
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I00cba4916459598d2240510f2c4c12fd18787538
Reviewed-on: https://chromium-review.googlesource.com/779260
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: enne <enne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518209}
bratell
Inlined two RoundOutRect to avoid jumbo clash
Two identical helper functions named RoundOutRect clashed
in jumbo builds where they ended up in the same
translation unit. If they had been larger it would have been
better to find a common place to define the, then shared, function
but since they are small, inlining works.

Bug: 786926
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I11fdeb9ab1a9d063cb4f8b91f17c12ab250627a3
Reviewed-on: https://chromium-review.googlesource.com/779198
Reviewed-by: enne <enne@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#518207}
bratell
Use the X11 header wrapper in ui/gl
The X11 header wrapper prevents us from polluting the global
namespace with risky macros such as None, True, False, Status.
This is in particular necessary for jumbo builds since they
are more vulnerable to headers doing unexpected things.

Bug: 782184
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Icd39a959c24a6b8f5a74e044e3fd1e6b959c6280
Reviewed-on: https://chromium-review.googlesource.com/771195
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#517799}
karlo
[LayoutNG] Implement support for text-align: -webkit-*
Add NG support for the -webkit-center/right/left properties, and
implicitly the ALIGN html attribute.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I9c90e4ded306f2560dd82e4ed17b876a592e599e
Reviewed-on: https://chromium-review.googlesource.com/763249
Commit-Queue: Karl Anders Øygard <karlo@opera.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517568}
fs
Remove expectations for a few media/track tests
After https://chromium-review.googlesource.com/756848 and
https://chromium-review.googlesource.com/757102 these tests appear to
have stabilized.

TBR=srirama.m@samsung.com

Bug: 664844
Change-Id: Ie97611e52a579e6d2f18833f5faaedef662038fc
Reviewed-on: https://chromium-review.googlesource.com/771794
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#516732}
fs
Specify fill-box transform-box for circle.animation-{end,keyframe-}point
The transform-origin is supposed to be relative to the fill-box (the
object's/circle's bounding box) and not the viewport (which is the
initial value.)

Bug: 783985, 595829
Change-Id: I80b5b64a3bbeaca1d305972733820d361a7c064e
Reviewed-on: https://chromium-review.googlesource.com/765887
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#516671}
fs
Tidy ImageResourceContent Image accesses and related code
Make better use of local variables to make the code a bit more compact
and improve readability. Also rename variables to attempt to better
differentiate between ImageResourceContent and Image. In general call
the former |image_content| and the latter |image|.

Bug: 773272
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I0c1a1a1020cfc3a515459104e1bdb37827553455
Reviewed-on: https://chromium-review.googlesource.com/768819
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#516511}
bratell
Add jumbo support to //content/browser (-66 CPU minutes)
Enables support for jumbo in //content/browser so that if you build
with use_umbo_build=true, content/browser will jumbo compile. Jumbo is
Chromium's unity build implementation and is already supported in Blink
and v8.

Building content/browser with jumbo is 66 CPU minutes faster than
without jumbo. How that maps to wall time depends on the hardware. On
a 4 core/8 thread machine that is about 8-9 minutes.

It took 50 cleanup patches to get here, and there is 1 remaining issue
(see patch) that we will try to solve after this has landed.

Bug: 746953
Change-Id: I14f9d340abdba387e6520f8c255ebe7395565439
Reviewed-on: https://chromium-review.googlesource.com/768745
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#516450}
fs
Reimplement ImageElementBase::IsOpaque
Don't use Element::ImageContents(), which is a method primarily meant
for the WebElement interface (and not actually implemented by
SVGImageElement.) Use the local ImageLoader and related helpers instead.

Bug: 773272
Change-Id: Idbbf8a85b6905e072db2bf4ac12e38ff9756025d
Reviewed-on: https://chromium-review.googlesource.com/768872
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#516437}
tmoniuszko
Allow consulting ThemeProvider when asking TypographyProvider for color
Any custom View may provide ThemeProvider. TypographyProvider
implementation should have possibility to consult the ThemeProvider in
similar way NativeTheme can be consulted.

Bug: 691891
Change-Id: I4d67dfa870d9c439292f74c96e408bb7a9471059
Reviewed-on: https://chromium-review.googlesource.com/730583
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516308}
bratell
Avoid using the name SendMessage because of Windows
In Windows SendMessage is a macro that maps to either
SendMessageA (Ascii) or SendMessageW (Unicode) so if you have
a local function SendMessage it can be magically renamed.

The code tried to avoid SendMessage problems by removing the
macro, but in jumbo builds that made other headers in Windows
fail because that code tried to use SendMessage.

Instead the method is renamed SendIpcMessage for lack of
better imagination.

Bug: 784443
Change-Id: I75651542f0dae2a4df0f0dec1ca253de8c1def9b
Reviewed-on: https://chromium-review.googlesource.com/766374
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#516269}
bratell
Rename the different LevelDBStatusToStatus functions to help jumbo
In jumbo builds (use_jumbo_build=true) the two different
LevelDBStatusToStatus could end up in the same translation unit which
would then cause compilation errors since they only differed by return
value.

This CL gives them unique names, ToServiceWorkerStatus() and
ToNotificationDatabaseStatus().

Bug: 746953
Change-Id: Iceaf6facc3142990d62769f693eb57bfc5c5f143
Reviewed-on: https://chromium-review.googlesource.com/760358
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#515974}
fs
Avoid track 'load' race in a few media/track/ tests
In media/track/, the following tests seemed to exhibit the same timeout
behavior as track-kind.html:

  track-default-attribute.html
  track-load-error-readyState.html
  track-load-from-element-readyState.html

The default track could finish loading before the event handler was
added. Move the external <script>s earlier (to within <head>) and attach
event handlers before </video>.

Bug: 782095
Change-Id: I103e6d24a20f8b164a38a9014eae98528a6caf92
Reviewed-on: https://chromium-review.googlesource.com/757012
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: srirama chandra sekhar <srirama.m@samsung.com>
Cr-Commit-Position: refs/heads/master@{#515925}
fs
Explicitly reset preferred lang and text track state in media/track
Add cleanup handlers that resets "user preferred languages" and "text
track kind user preference", or just reset them outright, to see if this
has any bearing on the problem (works locally.)

Bug: 664844
Change-Id: I6237ace717fbaf6f5203d8a051950763547e191f
Reviewed-on: https://chromium-review.googlesource.com/757102
Reviewed-by: srirama chandra sekhar <srirama.m@samsung.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#515919}
fs
Make TextTrackCue::CueDidChange ordering updates fine-grained
Only do an remove-add cycle for the cue when the start or end time is
updated. This will avoid changing the cue order for cues which need to
make use of the "tie-breaker" (have same 'startTime' and 'endTime'.)
It should also make non-time updates to a cue faster.

Remove media/track/opera/interfaces/VTTCue/snapToLines.html since it's
a duplicate of the WPT test.

Bug: 783779
Change-Id: I919b0acdb6ec2e6f0b6e11fb75996e7292168f95
Reviewed-on: https://chromium-review.googlesource.com/763527
Reviewed-by: srirama chandra sekhar <srirama.m@samsung.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#515845}
fs
Fix target reference update for "absolute local" 'href's
When the <use> 'href' was specified as an absolute URL, we would not
consider it local and attempt to request and use the URL as an "external"
resource instead. Because of state inconsistencies and the resource
requested being of the wrong type, this would make shadow tree expansion
fail for nested <use>.

Bug: 783761
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ic4ee946c17e16d5dac96263874792ec3f1d882ea
Reviewed-on: https://chromium-review.googlesource.com/763459
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#515664}
bratell
Made some constant names more unique for jumbo
In jumbo builds cc files are compiled together as one translation
unit to local constants need to not have the same names as other
local constants or there will be a compilation error.

This patch renames
kCurrentSchemaVersion ->
  kCurrentLocalStorageSchemaVersion
  kCurrentServiceWorkerSchemaVersion

kKeySeparator ->
  kNotificationKeySeparator
  kServiceWorkerKeySeparator

Bug: 746953
Change-Id: I1cc52eebe8979ea83746f4aad00c7dd063791b94
Reviewed-on: https://chromium-review.googlesource.com/758869
Reviewed-by: Camille Lamy <clamy@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#515604}
bratell
Don't expose blink internal types from public headers
Mojo's -blink.h headers expose all the cool internal
Blink types which means they can't be used in public headers.
Instead use the -shared.h versions.

(There is a presubmit coming to prevent accidents like this)

Change-Id: I6e27c66aba3b625a96885c6261fd481bdaa50cf0
Reviewed-on: https://chromium-review.googlesource.com/763227
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#515568}
bratell
Avoid clash between two NSAccessibilitySelectedTextMarkerRangeAttribute
There are two
NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
    @"AXSelectedTextMarkerRange";
and in jumbo builds they will end up in the same translation unit
and trigger compilation errors.

This patch moves one of them to where its used which will prevent
the clash and let the compilation proceed.

Bug: 746953
Change-Id: Iaf440412f7780141f8d22f648dfef59358ef610c
Reviewed-on: https://chromium-review.googlesource.com/758845
Reviewed-by: Elly Fong-Jones <ellyjones@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#515515}
bratell
Wrap X11 headers in ui/gfx/x/x11.h
X11 headers define a lot of common symbols and that will interfere
with other code, in particular in jumbo builds where the X11 headers
get wider visibility. This wraps common X11 headers in
ui/gfx/x/x11.h and adds the necessary symbols to the namespace x11
instead.

So instead of writing

XAtom prop_type = None;

you now write

XAtom prop_type = x11::None;

and the same for True, False, Status and a few others.

Bug: 782184
Change-Id: I0d1b83720da615c808a2f7a291ddbf7664b26cd8
Reviewed-on: https://chromium-review.googlesource.com/756711
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Elliot Glaysher <erg@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515373}
bratell
Make kMaxRedirects into a C++ constant
Followup from https://chromium-review.googlesource.com/c/chromium/src/+/751744
Make the value a C++ constant instead of an enum.

Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I996f05877f7d68f468cdb41b4c7c1a5dcc1c62fc
Reviewed-on: https://chromium-review.googlesource.com/757398
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Ryan Hamilton <rch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515328}
bratell
Rename two kTrafficAnnotation variables that clash in jumbo builds
In jumbo builds several cc files are merged into one
translation unit and then a variable that is intended to be local
can collide. That happened with kTrafficAnnotation.

This patch renames them
kTrafficAnnotation ->
  kAppCacheTrafficAnnotation
  kNavigationUrlLoaderTrafficAnnotation

Bug: 746953
Change-Id: Ia46c25b80956ed04aa081348167883264c57b894
Reviewed-on: https://chromium-review.googlesource.com/758782
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#515327}
karlo
[LayoutNG] Change table cells to use NG layout.
Switch table cells over to use NG layout, so they can establish
NG block formatting contexts.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I08bbe28bb14d7b4041cc207ef499cf2d426ce219
Reviewed-on: https://chromium-review.googlesource.com/649698
Commit-Queue: Karl Anders Øygard <karlo@opera.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#515308}
fs
Ship the CSS 'transform-box' property
Intent-to-ship thread:

 https://groups.google.com/a/chromium.org/d/topic/blink-dev/4ZWHz8tCONI/discussion

Bug: 595829
Change-Id: I8b25037046efeeffcc52bf3835aff06c8d110549
Reviewed-on: https://chromium-review.googlesource.com/759040
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#515282}
bratell
Fix jumbo compilation for Android in //base
The define of "Long" to "long" ended up changing some "Long"
strings in jni code to "long" which broke compilation.

Bug: 775547
Change-Id: If9dab9f193b0cad5067903f46ade98155254c7de
Reviewed-on: https://chromium-review.googlesource.com/758366
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#514883}
fs
Remove media/track/track-kind.html
Remove this test in favor of the existing and overlapping coverage in
Web Platform Tests:

  html/semantics/embedded-content/media-elements/interfaces/
    HTMLElement/HTMLTrackElement/kind.html
    TextTrack/kind.html

Bug: 782095
Change-Id: Iff866ddabaa69a30e24f6126f202c6cbd431425a
Reviewed-on: https://chromium-review.googlesource.com/756752
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: srirama chandra sekhar <srirama.m@samsung.com>
Cr-Commit-Position: refs/heads/master@{#514817}
bratell
Merge all KMaxRedirects=20
Too much code took upon itself to define 20 as the constant
for number of redirects. If it's going to be a constant, let it
be a single constant, in this case in the network URLRequest class.

This was noticed because the multiple kMaxRedirects in
content/browser collided in jumbo experiments.

Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Ib11c1ea77ea0f1da0adb5966eb992a8f82e31177
Reviewed-on: https://chromium-review.googlesource.com/751744
Reviewed-by: Ryan Hamilton <rch@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#514791}
fs
Fix media/track/track-cue-rendering-tree-is-removed-properly.html
The way media/track/track-cue-rendering-tree-is-removed-properly.html is
using assert_throws is no longer valid, so replace it with a different
construct.
Also, <track> does not have a 'mode' content attribute. Using 'default
here seems like it should DTRT.

Bug: 664844
Change-Id: I7cf035dc262160f4748a22f7f92fbc45c2bfe13b
Reviewed-on: https://chromium-review.googlesource.com/756848
Reviewed-by: srirama chandra sekhar <srirama.m@samsung.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#514789}
bratell
Deduplicate InputEventDispositionToAck
There were two identical InputEventDispositionToAck in
input_handler_manager.cc and widget_input_handler_manager.cc and
in jumbo builds those clashed. This exports the function from
input_handler_manager.cc/.h so that it can be used in
widget_input_handler_manager.cc

Bug: 746953
Change-Id: I8c032a4f283b0eeb601b75e3d15efddbff360578
Reviewed-on: https://chromium-review.googlesource.com/753325
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#514239}
bratell
Rename one of two different ClampToValidDimension
There are two ClampToValidDimension in content/render and in
jumbo builds where files are merged those functions clashed.

This patch renames one of them ClampToValidScreenCastDimension
which is a more unique, and descriptive, name.

Bug: 746953
Change-Id: Ib331422044e87b683dde1fb20cffd0395e79a6ea
Reviewed-on: https://chromium-review.googlesource.com/753369
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#514225}
bratell
Avoid leaking mojo -blink.h headers outside blink
mojo's -blink.h headers are for use inside blink. For the rest there
is -shared.h headers.

Change-Id: Iffb6bd56656545c35056ba49badfe06e8519ec29
Reviewed-on: https://chromium-review.googlesource.com/753884
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#514111}
fs
Special-case the 'is2D' case in DOMMatrix::invertSelf
When the DOMMatrix is supposedly well-formed according to the 'is2D'
restrictions, we can perform the inversion on the relevant submatrix
rather than the full matrix. This should avoid some numerical errors
sneaking in, breaking the 'is2D' invariant. It is probably a bit faster
as well.

Bug: 781172
Change-Id: I0e7678ccaf2baae9c40cff0acebb9d0fc498be11
Reviewed-on: https://chromium-review.googlesource.com/753685
Reviewed-by: Jinho Bang <jinho.bang@samsung.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#514044}
fs
Handle failed dictionary conversion in DOMPointReadOnly::matrixTransform
DOMMatrixReadOnly::fromMatrix can fail, returning null and generating an
exception.

Bug: 781172
Change-Id: If77e4cd57d02e8a09d79875aa96f0bc243f08b40
Reviewed-on: https://chromium-review.googlesource.com/753485
Reviewed-by: Jinho Bang <jinho.bang@samsung.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#514041}
bratell
Don't leak blink headers outside Blink.
WebCORS.h leaked internal Blink headers that could collide with
other code in for instance content (noticed in jumbo).

Change-Id: Ic874d3b0bfaed843cf1209944685b8368bb56a1c
Reviewed-on: https://chromium-review.googlesource.com/753881
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#513828}
bratell
Avoid importing base::Time into global scope
X11 headers add a Time typedef to global scope and in jumbo builds
(where files are merges so more code and headers become visible), that
Time typedef and the "using base::Time" clashed.

This patch imports the constant the code wanted directly, which is less
code (fewer characters) as well.

Bug: 746953
Change-Id: I130cd78080eda80ffaf75ef22afab5b9a68d4e59
Reviewed-on: https://chromium-review.googlesource.com/753447
Reviewed-by: Max Morin <maxmorin@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#513804}
bratell
Use PostMessageW instead of PostMessage to avoid undefs
There are code that does #undef PostMessage to avoid
the win32 defines and if such code/headers get included in
render_widget_host_view_event_handler.cc, then there won't be
a PostMessage to call.

The easiest solution is to call PostMessageW instead (the Unicode
version of the API) since that is the function we want to call
anyway.

Bug: 746953
Change-Id: I6bb61404e2685846b4298223fe588d51fa0704d5
Reviewed-on: https://chromium-review.googlesource.com/753582
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513785}
bratell
Avoid clashing two IsUsingMus() functions in jumbo builds
In some jumbo configurations the two IsUsingMus would end up
in the same compilation unit and cause compilation errors.
The function is small enough (barely) to have in two copies so
this patch moves them to a tighter namespace.

Bug: 746953
Change-Id: I08b67606fd6dc68ee5ae9a8c91c79386051f8976
Reviewed-on: https://chromium-review.googlesource.com/749386
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#513732}
fs
Cleanup extraction of intervals for raster shapes
This restructures Shape::CreateRasterShape so that the raster data is
extracted, followed by the actual extraction of intervals from the
raster data. Move the size restriction from ShapeOutsideInfo to Shape.
The code is generally left as-was with some minor exceptions, like
using IntSize::Area() and using size types for |max_image_size_bytes|.
The console messages previously emitted for "too large" images are
dropped.
This makes error handling slightly easier and hopefully also improves
readability.

Change-Id: I3e0a1bfb08f1c50d73f5ce7c909d98a6e31df5a0
Reviewed-on: https://chromium-review.googlesource.com/750962
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#513591}
bratell
Add missing include guard for VideoFrameSubmitter.h
Noticed in jumbo experiments.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ida9ad9a3dec791cca3992e5b68c1f3bc722ead5e
Reviewed-on: https://chromium-review.googlesource.com/749401
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#513491}
bratell
Replace the NOTIMPLEMENTED_POLICY macro with an explicit macro
NOTIMPLEMENTED_POLICY could be used to control what the
NOTIMPLEMENTED macro did, but *only* if set before the first
include of base/logging.h. That made it hard to use and
not at all compatible with jumbo builds.

There were only a few users of NOTIMPLEMENTED_POLICY and they all
set NOTIMPLEMENTED_POLICY to 5 so a better solution seems to be
to have NOTIMPLEMENTED and NOTIMPLEMENTED_LOG_ONCE for places
where spam is feared.

Bug: 777852
Change-Id: Id1b454200a64d43e27df39b2c9a02f07ba4710cf
Reviewed-on: https://chromium-review.googlesource.com/749143
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513481}
bratell
Add some missing include guards in third_party/WebKit/Source
Some of these are technically not needed, but to avoid future
accidents it's best to be consistent.

Note that there is another Forward.h but that one has WTF_Forward_h as
include guard so there won't be a clash.

R=pdr@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I6f42004c4810e960038c51f47d8e2714f00a7c2d
Reviewed-on: https://chromium-review.googlesource.com/749462
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#513460}
bratell
Unduplicate a kMaxListSize constant that broke jumbo builds
The two kMaxListSize constants collided in jumbo builds where
files are merged before compilation, for higher build performance.

This patch makes the constants be shared.

Bug: 777470
Change-Id: Idf90fcf389ba3895b4f0e28b4649f11ff5f8257e
Reviewed-on: https://chromium-review.googlesource.com/749142
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Ganggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513119}
fs
Fold ImageResourceContent::{Uses,}Image{Container,HasRelative}Size
These methods - UsesImageContainerSize and ImageHasRelativeSize - are
only simple wrappers for similarly named methods on Image. Callers have
access to Image without any hoop-jumping, so just fold these methods.

Bug: 773272
Change-Id: Ie6a02b7e1c4643c5ebfafa0b6281503194904852
Reviewed-on: https://chromium-review.googlesource.com/747102
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#512912}
fs
Percent-decode fragments before using them for SVG references
We were using the "raw" form of the fragment, meaning that any percent-
encoded fragments would not resolve correctly.

Bug: 779420
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ic091e775589fd59d25ad1878115f2ad2593bc733
Reviewed-on: https://chromium-review.googlesource.com/746885
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#512895}
fs
The empty string is a not a valid <length> for SVGLength
SVGLength::SetValueAsString was allowing "" to "reset" the value without
signaling an error. Because of how the handling of removeAttribute works
we can't shut down this entirely, but still need to handle the null
string resulting from that.

Convert svg/custom/invalid-length-units.html to testharness.js. (This
test had one item for "" and " ".)

Bug: 779454
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I055b77b07d833a252b325df8fc1a908271c86005
Reviewed-on: https://chromium-review.googlesource.com/746707
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#512871}
bratell
Adding include guards for print_messages.h
We have had IPC headers where it was up to the user
to carefully only include them once. Jumbo builds where
cc files are compiled together are not that careful so they
need include guards.

This is a followup to equivalent work done in chrome and content.

Bug: 746953
Change-Id: I3dc4067e2c4e23ee41be0def78a34bf4f7cd4b96
Reviewed-on: https://chromium-review.googlesource.com/741597
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#512844}
bratell
Rename an empty function to be more unique.
There were two empty functions named "IgnoreError" and this
caused clashes in jumbo build experiments. This patch renames
one of them "EmptyErrorHandler" which is also a good name.

There is no natural place to share the functions, and being empty
there is not that much value in sharing them either.

Bug: 746953
Change-Id: I7c7507cf485710159e64b3945eeea558e2e4f901
Reviewed-on: https://chromium-review.googlesource.com/743786
Reviewed-by: Dan Elphick <delphick@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#512555}
msimonides
Express the last scroll offset in DIPs.
The RWHVAura::GetLastScrollOffset() method should return values in view
coordinates (device independent pixels) as do other implementations of
RWHV.

When zoom-for-DSF is enabled the coordinates from compositor are
expressed in pixel coordinates which are different from view coordinates
on HiDPI screens.  Therefore the last_scroll_offset_ value needs to be
scaled to view coordinates

BUG: 778228
Change-Id: Ic8da1fdbf821d0073fb2a22a75ecbc40441ce00e
Reviewed-on: https://chromium-review.googlesource.com/610148
Commit-Queue: David Bokan <bokan@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#512549}
bratell
Disable //base jumbo for iOS
Something with allocators goes wrong in iOS (similar to nacl) and
not having a good way to debug it, and not very mich interest for
jumbo on iOS, it's easiest to just disable it.

Bug: 776313
Change-Id: Ifc8c77fd19aa6fc5bcd790cc8c7056fd8a57640a
Reviewed-on: https://chromium-review.googlesource.com/741804
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#512263}
bratell
Adding include guard to debugging_client.h header
A header missing include guards caused problem in jumbo
build experiments.

Change-Id: Ibef82467108600c566ed71cec00970ec6301f012
Reviewed-on: https://chromium-review.googlesource.com/741504
Reviewed-by: David Trainor <dtrainor@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#512257}
fs
Deduplicate PaintScrollbar
CompositedLayerMapping.cpp and PaintLayerCompositor.cpp has almost
identical (differs by a null-check) PaintScrollbar helpers.
Move a cleaned up version to ScrollableAreaPainter (being the least bad
common location.)
This fixes Jumbo compilation.

Bug: 713137
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Icc36e57ed364b18716fd56b0363431f352ef0d72
Reviewed-on: https://chromium-review.googlesource.com/741595
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#512224}
bratell
Removed IsOriginSecure clone and removed "using namespace"
Importing namespaces with "using namespace" can have surprising
results (which is why the coding standard disallows them).

This patch's main motivation is to remove a "using namespace content"
which made indexed_db code unable to distinguish between ::indexed_db 
and ::content::indexed_db in jumbo builds, but in the process it
was realized that the local IsOriginSecure was only partly used
and also seemed to be close enough to content::IsOriginSecure that
one of them should suffice.

There were two IsOriginSecure(). One in {anon ns}::IsOriginSecure() and
one in content::IsOriginSecure(). In mixed_content_navigation_throttle.cc
there are two calls to unqualified "IsOriginSecure()". One was 
supposed to resolve to {anon ns}::IsOriginSecure() and
the other one to content::IsOriginSecure().

After this patch both calls will go to content::IsOriginSecure().

Bug: 629059, 746953
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Id572c05707545e6303f63f2c4a18acf7fda2a4c4
Reviewed-on: https://chromium-review.googlesource.com/738175
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#512174}
fs
Update baselines after Skia SkOffsetImageFilter change
TBR=mtklein@chromium.org,senorblanco@chromium.org

Bug: 778204
Change-Id: I7e531d55d2e8c3daf19ed93226c21d9698037d05
Reviewed-on: https://chromium-review.googlesource.com/741233
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#512162}
bratell
Fix for reference counted variable being passed the wrong way
Passing pointers to reference counted variables as raw pointers in
bind is disallowed so this wraps it in base::Unretained like the
other types.

This was discovered while making the code able to be jumbo
compiled because in jumbo builds the type URLRequestContextGetter
was no longer a undefined forward declared type. As long as it
was a pointer to something "unknown" bind.h was fine with it.

Bug: 746953
Change-Id: I72a0d2c2957b885f967c246b1575f6609ae8c9c3
Reviewed-on: https://chromium-review.googlesource.com/739861
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#512155}
bratell
Deduplicate UMALogDeviceAuthorizationTime
There were two implementations of UMALogDeviceAuthorizationTime and
in jumbo builds those clashed. This makes it one implementation and
moves it to AudioOutputAuthorizationHandler since it also
has Authorization in the name.

Bug: 746953
Change-Id: I63159187bd81b355ad6c94398a44e2ce188464bb
Reviewed-on: https://chromium-review.googlesource.com/739901
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#512126}
bratell
Let jumbo use root_build_dir relative paths
Up until now include paths have been relative to the location
of the generated jumbo files. That can make paths rather long 
with many "../../.." in them.

In some circumstances, the paths are now too long for some
Win32 APIs (260 chars) so let us try with 
root_build_dir relative paths instead.

Bug: 778627
Change-Id: Ic7202789f75caf5134b38b174cb5b24a217d0035
Reviewed-on: https://chromium-review.googlesource.com/737836
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511920}
fs
Rework computed style handling for 'width' and 'height'
getComputedStyle(...) for 'width' and 'height' would always return
'auto' for layout objects to which said property did not "apply" (by
some fuzzy heuristic.) This specifically broke for some SVG elements
where 'width' and 'height' apply (<rect>, <image> and <foreignObject>),
but is also wrong more generally - per CSSOM [1].

Rework the relevant parts of ComputedStyleCSSValueMapping::Get to
consider if the used value or the computed value should be used for the
respective property. The new helper
(WidthOrHeightShouldReturnUsedValue) replaces the old
WidthOrHeightPropertyAppliesToObject, while removing the explicit return
of an 'auto' identifier. 'auto' (or any other computed value) will now
be returned via ZoomAdjustedPixelValueForLength if the resolved value is
not the used value.

This is a behavioral change, and matches the behavior of Gecko.

Fold the old svg/css/getComputedStyle-svg-text-width-height.html test
into a new one that cover more (SVG) cases.

[1] https://drafts.csswg.org/cssom/#resolved-value

Bug: 708888, 772707
Change-Id: I573362a03c9e0d98251bdbcf4e9854a5a5d8dd67
Reviewed-on: https://chromium-review.googlesource.com/707103
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#511848}
fs
Temporarily suppress some feOffset tests
The following tests

 * svg/W3C-SVG-1.1/filters-offset-01-b.svg
 * svg/filters/feOffset.svg

show small differences (obvious progression for the former.)

TBR=mtklein@chromium.org
NOTRY=true

Bug: 778204
Change-Id: I3b7e8da7856181f920d7889d5f7ac21c764f1071
Reviewed-on: https://chromium-review.googlesource.com/739484
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#511829}
bratell
Rename two constants with the same name kVerboseLevel
In jumbo builds where cc files are merged before being
compiled, the two different kVerboseLevel clashed.

This patch renames when kJobVerboseLevel and
kWorkerVerboseLevel.

Bug: 746953
Change-Id: Id9cf152e3b5d9aeaa41990fb3fa6908c60baf43a
Reviewed-on: https://chromium-review.googlesource.com/738135
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511783}
bratell
Fix some typos in jumbo.gni documentation.
Copy+pasted documentation shows a bit too much of its origin.

Change-Id: Idb17d72c74bdff0c3544d7b5ecc23ab00c88e7c8
Reviewed-on: https://chromium-review.googlesource.com/738037
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#511772}
bratell
Deduplicate two constants kBlobStorageContextKeyName
We declared the key to lookup the chrome blob storage at
two places. This caused problems in jumbo builds where
cc files are merged and the symbols clashed.

Bug: 746953
Change-Id: Icc11b256026536983841b084f6d2a74358594a47
Reviewed-on: https://chromium-review.googlesource.com/738133
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511608}
bratell
Give two GetUniqueIdInConstructor() unique names
For jumbo builds where cc files are merged, function names need
to be a bit more unique for the code to compile. This patch chooses
two names: CreateUniqueEntryID() and CreateUniqueHandleID().

Bug: 746953
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I7058575bece926071d2b086c959ee08cd8023b68
Reviewed-on: https://chromium-review.googlesource.com/738369
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511574}
fs
Move ImageResourceContent::BrokenImage to LayoutImageResource
A "broken image" (fallback image) only make sense for "content images",
so LayoutImageResource seems like a better home for it. This also makes
it trivial to provide a decent device scale factor.
Fold the creation of a fallback image into LayoutImageResource too.

Bug: 773272
Change-Id: I3732f87ff8b433188920bfee9ab44acee255f6ae
Reviewed-on: https://chromium-review.googlesource.com/727904
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#511533}
fs
Simplify HTMLImageElement.currentSrc 'current request' heuristics
Rather than depending on whatever ImageResourceContent::GetImage()
returns (which is also always something non-null), just explicitly check
for there being an error or an actual image.

Bug: 773272
Change-Id: I1e71837ccdc4f9d2bf2a066cece6451154fecbf3
Reviewed-on: https://chromium-review.googlesource.com/730755
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#511517}
bratell
Give some storage size constants more unique name.
To avoid clashes in jumbo builds, let local_storage and
dom_storage use differently named constants for max area count
and max cache size.

Bug: 746953
Change-Id: I0acf3d02a938d670f67546830e3f17681b55bb0e
Reviewed-on: https://chromium-review.googlesource.com/735545
Reviewed-by: Michael Nordman <michaeln@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#511478}
fs
Remove reference for test that was removed
TBR=pdr@chromium.org

Bug: 595829
Change-Id: Ie93a136fbfb6e9425e9c48c89c8132f35ebfbc45
Reviewed-on: https://chromium-review.googlesource.com/738190
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#511439}
fs
The initial value for 'transform-box' should be 'view-box'
 https://github.com/w3c/csswg-drafts/issues/857#issuecomment-296024182

Drop support for 'border-box' for the time being, since it no longer is
just an alias for 'view-box'. Remove the test for it (which happened to
be using the wrong keyword even... Oops)

Bug: 595829
Change-Id: Ia2889848eb3355c18164ce6978a13bab9e40e698
Reviewed-on: https://chromium-review.googlesource.com/735560
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#511287}
fs
Tidy content box usage in HTMLCanvasElement::DoDeferredPaintInvalidation
Call LayoutBox::ContentBoxRect once and reuse the returned rect instead
of calling the method repeatedly (and mostly just tossing the result.)
Also cast the result to a FloatRect directly to avoid LayoutUnit<->float
impedance mismatches.
Rename some variables and update comments to reflect post-rename names.

Change-Id: Ie1a0bd1b955db7bf9e86e4e38d927c24d8e5ef4c
Reviewed-on: https://chromium-review.googlesource.com/733162
Reviewed-by: Justin Novosad <junov@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#511266}
bratell
Rename some socket buffer size constants with the same name
In jumbo builds, where cc files are merged before being compiled,
symbols that should be isolated can still clash and cause
compilation errors.

This patch renames
kReadBufferSize -> {kTcpReadBufferSize, kUdpReadBufferSize)
kRecvSocketBufferSize -> { kUdpRecvSocketBufferSize,
                           kTcpRecvSocketBufferSize}
kSendSocketBufferSize -> kTcpSendSocketBufferSize

Bug: 746953
Change-Id: I9fb6d06fa25e8a8ab02f922b247f1b76808daa94
Reviewed-on: https://chromium-review.googlesource.com/723305
Reviewed-by: Sergey Ulanov <sergeyu@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#511230}
bratell
Deduplicate GetEventAckName.
We had two GetEventAckName that both converted an
InputEventAckState to a string. This patch merges them and
moves them to input_event_ack_state.cc.

The two GetEventAckNames clashed in jumbo build experiments.

Bug: 746953
Change-Id: Ie07e8d500a0e3cfcc8a705300adc597760ea5751
Reviewed-on: https://chromium-review.googlesource.com/735155
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#511178}
bratell
Add include guards to message headers in chrome and extensions
The solution without include guards isn't compatible with jumbo
builds and this is in general easier for code to manage. Now
nobody needs to be careful about where they include a message header

This is a followup to a similar patch in content (
https://chromium-review.googlesource.com/580868 )

Bug: 746953
Change-Id: I3ce252d02b9fc916cc8a2ad039214b1da08676bb
Reviewed-on: https://chromium-review.googlesource.com/735480
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#511154}
fs
Share content box rect in ImagePainter::PaintReplaced
Both of the drawing code-paths in said function use the full content box
rect, so we can compute it once and share it. This also avoids computing
the content size  twice.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I889f6440394fde75bafc8cc8ac0f6b3a1629c0c4
Reviewed-on: https://chromium-review.googlesource.com/733340
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510866}
fs
Use ContentSize() for content size stored for paint invalidation
LayoutBox::ContentSize() is more to the point than calling
LayoutBox::ContentBoxRect() and then do Size() on the result (ignoring
the position.) Hopefully it is also faster (4 vs 8 virtual calls.)

Change-Id: If8c370446fad49d976d1d7576ac7041cd8d78180
Reviewed-on: https://chromium-review.googlesource.com/733164
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510846}
fs
Move InterpolationQualityContext to platform/graphics
InterpolationQualityContext codifies a pattern that is used by all code
that alters the (default) image interpolation quality.
Move the tiny helper class to its own file, renaming it to
ScopedInterpolationQuality, and then use it where appropriate (which,
per above is "everywhere".)

In HTMLCanvasPainter.cpp, the FIXME referencing crbug.com/353716 is
removed, because the bug in question has been resolved as WontFix.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I8380cd4d20adcbc18dfa175e0d48e4947c51ca5b
Reviewed-on: https://chromium-review.googlesource.com/730205
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#510825}
fs
Tidy up SVGSVGElement::CurrentViewportSize
 * Put the LayoutObject pointer in a local variable.
 * Use ContentSize rather than the fullblown ContentBoxRect() since only
   the size is used.
 * Put the zoom in a local variable.
 * Use FloatRect::Size.

Change-Id: I7b150f53212f0b0cb2524b3867bfb90398ccf6e7
Reviewed-on: https://chromium-review.googlesource.com/733087
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#510788}
bratell
Hide Blink internal types from users of WebTappedInfo.h
A few internal types were accidentally exposed to the world.

Bug: 777366
Change-Id: I293070e479e88d76926c8c463a3bec4f04475a6f
Reviewed-on: https://chromium-review.googlesource.com/733082
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#510777}
karlo
[LayoutNG] Introduce LayoutNGMixin in preparation for LayoutNGTableCell.
This class holds code shared between LayoutNG subclasses of
LayoutBlockFlow.  Inheritance is parameterized, but only valid
for LayoutBlockFlow and subclasses.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I973193718d046ec6e8aa1a9bf548c5fef45aa149
Reviewed-on: https://chromium-review.googlesource.com/725346
Commit-Queue: Karl Anders Øygard <karlo@opera.com>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510749}
bratell
Reducing default jumbo chunk size from 100 to 50.
Bruce Dawson and I have mesaured what compile times you can expect
from different chunk sizes and it seems that the advantages of 100
over 50 is at best small so this patch reduces the default to 50.

It will mean that 100 becomes less likely to work without code fixing
since fewer people will compile with 100, but it should be an overall
better experience because smaller jumbo units means single-file changes
need to recompile less unchanged source.

Bug: 766294
Change-Id: I5347c39ad91fbdcd83ea975884ccdb60aa8bbe45
Reviewed-on: https://chromium-review.googlesource.com/671783
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510679}
bratell
Deduplicate the ShouldDuckFlash function
Two files had identical ShouldDuckFlash functions which clashed
in jumbo builds (chromium unity build implementation where
source files are merged).

This patch moves the function to media_switches so it can be used by
all code.

Bug: 746953
Change-Id: I0665384f82e8bb3f0dfd6a536d1535b57c9bfe78
Reviewed-on: https://chromium-review.googlesource.com/723468
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#510624}
karlo
[LayoutNG] Fix for painting legacy floats with margins.
The legacy painting code uses the margin box as the origin
for floats.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I00f4d3c4362af62555509d2512258bb243877aa2
Reviewed-on: https://chromium-review.googlesource.com/723339
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510613}
fs
Handle invalidation of SVG filters that are not in the layout tree
If a <filter> was not in the layout tree, we could not invalidate it
because doing that required going through the LayoutObject of the
<filter>.
If the <filter> does not have a LayoutObject associated, then invalidate
through the proxy-set directly.

Bug: 773811
Change-Id: I35612e3915a09b714b3aaa27e4b50ae344b6ff3f
Reviewed-on: https://chromium-review.googlesource.com/728001
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510397}
bratell
Renames two RecordCancelled functions to have unique names
In jumbo builds where source files are merged before compiled for
dramatically faster builds, functions that are intended to be local
will have a wider visibility and can clash.

This patch renames two similar, but not quite identical
RecordCancelled functions so that there will be no compilation
problems.

Bug: 746953
Change-Id: Ib31e3db19070f6cbbe0b7c383fcc5372ec02b90b
Reviewed-on: https://chromium-review.googlesource.com/727987
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#510390}
bratell
Giving a couple of HandleRequestCallback functions unique names
The different HandleRequestCallback functions clashed in jumbo
builds so this patch renames them.

Jumbo builds are builds where cc files are merged for dramatically
higher build performance.

Bug: 746953
Change-Id: Ie854181f45d8b7d8684ed1da4c96b8ac1b644646
Reviewed-on: https://chromium-review.googlesource.com/725700
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Reviewed-by: Bence Béky <bnc@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#510203}
bratell
Fix Windows jumbo compilation by excluding the jpeg decoder
The jpeg decoder uses libjpeg_turbo which uses a "boolean" type
defined to be int. At the same time Windows has "boolean" type
which is unsigned char. If those headers meet in a
translation unit you get compilation errors.

An alternative fix would be to redefine libjpeg_turbo to use
unsigned char for its boolean type.

Bug: 775979
Change-Id: I268e0890dfc2fae79d0abe54bbd7bf5c0c23226f
Reviewed-on: https://chromium-review.googlesource.com/727980
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#510155}
fs
Fold away ImageResourceContent::ImageSize
This moves scale-handling out into the (now former) consumers of the
ImageResourceContent::ImageSize method.

Bug: 773272
Change-Id: I08760b181a48f8a5dcc5ceff68a19c67eba3601a
Reviewed-on: https://chromium-review.googlesource.com/726087
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510061}
bratell
Refactored some buffer classes to avoid name collisions
There were three different DependentIOBuffer classes, three similar
kBufferSize constants, two similar InitializeResourceBufferConstants
functions and two identical GetNumericArg functions.

Besides being potentially confusing, it causes clashes in jumbo
build experiments (chromium unity build system in development).

This patch moves around GetNumericArg (to merge the two copies) and
InitializeResourceBufferConstants (to make them not clash).
It renames the DependentIOBuffer classes which are deceptively
similar as well as the kBufferSize contstants and some other
variables that were not actually constants.

Bug: 746953
Change-Id: Id7cfa4baac0aa67a7b086896701aeab931e23a96
Reviewed-on: https://chromium-review.googlesource.com/723302
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Michael Nordman <michaeln@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#510042}
mstensho
Remove mstensho@opera.com as core and core/layout OWNER.
I'm leaving Opera Software today.

TBR=eae@chromium.org
NOTRY=true

Change-Id: Id9e11f73d3a3cbc0f2a772f93945cff21e742933
Reviewed-on: https://chromium-review.googlesource.com/727981
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#510032}
fs
Introduce ImageResourceContent::IntrinsicSize
Most non-layout/paint users that query the size of an image are
interested in the intrinsic size of the image (usually the physical
pixel dimensions.) This is currently achieved by calling the ImageSize()
method with a multiplier of 1.
Split the ImageSize() method into a part that extracts the size of the
image (if any) and one that applies the multiplier (and follow-on
adjustments.) This should allow a future cleanup where the scaling is
moved closer to the layer that uses it - i.e layout and paint.

This also reduces the type-impedance a bit since IntrinsicSize can just
return an IntSize (like Image::Size()) rather than passing through a
LayoutSize.

Bug: 773272
Change-Id: I18a1c11e9fc891dc6f19c4b2c5bd5dc23c1a5da7
Reviewed-on: https://chromium-review.googlesource.com/718747
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#509770}
bratell
Jumbo for //base - disable jumbo when cross compiling for nacl
Jumbo builds with nacl fails in the linker because of too many
instances of memory allocator functions like valloc, realloc, mallopt
when linking libnacl.a.

TBR=thakis@chromium.org,dpranke@chromium.org,oysteine@chromium.org

Bug: 775547
Change-Id: Ibeeb1caa355aa8014c4b9179f4f26e303f13fbf8
Reviewed-on: https://chromium-review.googlesource.com/725284
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#509751}
fs
Fix size keyword comparison in CSSRadialGradientValue::Equals
Said function would ignore any size keyword or explicit size
specification if there was a shape keyword.
Adjust the comparisons so that first any explicit size checked, followed
by checking the size keyword and the shape value.

Also rewrite the if-ladder for the center point (|first_x_| and
|first_y_|) to just use two DataEquivalent.

Bug: 775201
Change-Id: I44686b54d3e02e1fd4682c4288eec3aca0e3e441
Reviewed-on: https://chromium-review.googlesource.com/723460
Reviewed-by: meade_UTC10 <meade@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#509718}
fs
Refactor <filter> invalidation to use the DOM structure
This changes the path used for invalidation of filter effects (SVGFE*)
from the layout tree to the DOM tree. This is done to allow invalidation
to work when the filter is not part of the layout tree. That change
will be done in a follow-up.

Also add casting helpers for SVGFilterPrimitiveStandardAttributes and
use it where applicable.

Bug: 773811
Change-Id: I275534e59eb285c0cab805f6c09d00b1f725e4f4
Reviewed-on: https://chromium-review.googlesource.com/719837
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#509478}
bratell
Make different g_observers and g_instances have unique names
This is preporatory patch to make content/browser able to do
jumbo compiles, i.e. compilation with many cc files merged into
one translation unit. For that to compile, names need to be a bit
more unique than they are today.

Bug: 746953
Change-Id: Ie7cb7445d3662d47372bde78df705aec7b130ed5
Reviewed-on: https://chromium-review.googlesource.com/721021
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509429}
fs
Propagate float rects further in SVGRootInlineBox::LayoutInlineBoxes
Compute the union of the children of a flow box using FloatRect too,
then convert to a LayoutRect for setting the InlineBox's logical rect.

Also restructure the physical->logical conversion a bit.

Bug: 757436
Change-Id: I6c8f3a781c3c02dfb28d87eafa3df6cd5fb864f3
Reviewed-on: https://chromium-review.googlesource.com/721320
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#509386}
rune
Remove rune@opera.com from core/OWNERS
Leaving Opera.

TBR=jochen@chromium.org,mstensho@opera.com
NOTRY=true

Change-Id: Ia6acfa96bc8a899b970cb4edd213cfb43a2abe2b
Reviewed-on: https://chromium-review.googlesource.com/721181
Reviewed-by: Rune Lillesveen <rune@opera.com>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#509353}
bratell
Renamed some global cache size constants
There were several different k*Cache*Size variables controlling
different caches but with the same name. These collided in jumbo
builds but also made it harder to discuss them and their values
so renaming them seems like a good improvement.

Bug: 746953
Change-Id: I1e8dc4f687c7b1e3ca8a9f9a5e80409029f8c4b0
Reviewed-on: https://chromium-review.googlesource.com/721205
Reviewed-by: Michael Nordman <michaeln@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#509341}
bratell
Give all different kFilteredMessages unique prefixes
There are 5 different kFilteredMessages arrays in content/browser
and some of them collide in jumbo (chromium unity builds)
build experiments.

This patch renames them to:
kCacheFilteredMessageClasses
kFileApiFilteredMessageClasses
kPepperFilteredMessageClasses
kRenderFilteredMessageClasses
kServiceWorkerFilteredMessageClasses

Bug: 746953
Change-Id: I3fc1b6f6ea3d0e5ccbb2ff47d4d476e02f5c2344
Reviewed-on: https://chromium-review.googlesource.com/721279
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Reviewed-by: Michael Nordman <michaeln@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#509321}
bratell
Give the different KDataFile variables unique prefixes
In the jumbo build experiment (chromium unity builds) there is a
collision between the two different kDataFile strings. This patch
renames them kNetworkErrorDataFile and kTargetsDataFile which also
matches their intended values.

Bug: 746953
Change-Id: Ib9f47fa4d358303c7cdbb65b54b40080521a915d
Reviewed-on: https://chromium-review.googlesource.com/721299
Reviewed-by: Bence Béky <bnc@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#509320}
mstensho
[LayoutNG] Update some test expectations for multicol.
When multicol support was introduced in NG, a lot of tests started to crash and
time out. I wanted to get rid of those as soon as possible, so I created a
separate bug report. It seems that all the crashes and timeouts introduced by
multicol are now gone.

Some caret-range-outside-columns tests still occasionally time out (they're
actually just very slow), but that doesn't seem multicol related.

Bug: 757767
Change-Id: I4827a090b23b5220e182759a458f3c5a05f115e7
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Reviewed-on: https://chromium-review.googlesource.com/720930
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#509123}
bratell
Add jumbo also for core/inspector generated files (-1 CPU minute)
Just clearing up minor targets that does not use the standard
templates for third_party/WebKit/Source/core and therefore did not get
jumbo automatically.

This removes about 1 CPU minute from the build effort, which is about
3% of the total cost of building blink/core (post-jumbo), and about
0.1% of the total effort building chrome+content_shell+blink_tests.

R=fs@opera.com

Bug: 713137
Change-Id: Iba18116c3da677dd0c530b8db98327e587187368
Reviewed-on: https://chromium-review.googlesource.com/720961
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#509050}
bratell
Rename CreateFileForProcess to be more unique.
There are two CreateFileForProcess functions (similar, both for webrtc
but not identical). This causes issues in jumbo builds since you
cannot easily take the address of an overloaded function.  The fix
here is to rename one of them to CreateEventLogFileForChildProcess
which is also more descriptive.

Bug: 746953
Change-Id: I8457adc2194fc24e191ed43e3fb78536c0bb87a3
Reviewed-on: https://chromium-review.googlesource.com/721022
Reviewed-by: Tommi <tommi@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#509040}
fs
<iframe> 'sandbox' tokens are ASCII case-insensitive
Per https://html.spec.whatwg.org/multipage/#attr-iframe-sandbox, tokens
are ASCII case-sensitive.

Bug: 627682
Change-Id: I06784fc40e5561846cd5d6073614b67a5f4e7509
Reviewed-on: https://chromium-review.googlesource.com/718209
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#509023}
fs
Rename ImageLoader::GetImage() to GetContent()
This better reflects what it returns, avoiding some confusion.
Also take this opportunity to rename ImageLoader::image_ to
ImageLoader.
Also tidy up some code by putting the ImageResourceContent in a local
variable in some cases where it is used repeatedly.

ImageLoader: :image_content_ and similarly for local variables in
Change-Id: Idb8db822b1467b006a04ffd690df1f551ff3b7e9
Reviewed-on: https://chromium-review.googlesource.com/719098
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#509019}
mstensho
Fix jumbo build.
TBR=bratell@opera.com, cblume@google.com, wkorman@chromium.org

Bug: 745732
Change-Id: I04e2723d7da10a9021291e59d8edeeec87ee22e9
Reviewed-on: https://chromium-review.googlesource.com/720813
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#509011}
bratell
Jumbo for blink/platform unit_tests (-9 CPU minutes)
This adds support for jumbo compilation (merging cc files into larger
translation units for faster compilations) in blink's platform
unit tests.

It shaves 9 CPU minutes from the compilation time which is roughly half
of the remaining time needed to compile blink/platform.

Bug: 761475
Change-Id: Iaafdd9a4b00951a6274582a8e90707e7d3ee7028
Reviewed-on: https://chromium-review.googlesource.com/718203
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508947}
bratell
Organize all ClearSessionOnlyOrigins functions the same
There are 4 different ClearSessionsOnlyOrigins functions in
content/browser and 2 of them collided in jumbo build experiments.

This makes all 4 members of their logical class:
AppCacheStorageImpl::ClearSessionsOnlyOrigins
DOMStorageContextImpl::ClearSessionOnlyOrigins
IndexedDBContextImpl::ClearSessionOnlyOrigins
ServiceWorkerStorage::ClearSessionOnlyOrigins

Two of them (AppCache and IndexedDB) had to move for that to be
accomplished.

Bug: 746953
Change-Id: I9c8931b909fc78292e892dcff07d213abde2d8d1
Reviewed-on: https://chromium-review.googlesource.com/718753
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#508935}
bratell
Support jumbo builds in platform/wtf (-2 CPU minutes)
Support jumbo builds in platform/wtf for 2 CPU less effort when using
use_jumbo_build=true. This is about 0.3% of the remaining compilation
effort so don't expect any large change from this commit.

Bug: 761475
Change-Id: Ie3c4b6a4a23783b36a2e333abff457509a4534d3
Reviewed-on: https://chromium-review.googlesource.com/678954
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508874}
bratell
Jumbo for Blink core/editing unit_tests (-8.5 CPU minutes)
Final cleanup of parts of Blink core that had not been jumbified.
Some of the tests in core/editing are very similar so they have
been given custom namespaces.

Bug: 745732
Change-Id: I4db280458053cb31461247345cc2613b38eae884
Reviewed-on: https://chromium-review.googlesource.com/718207
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#508791}
fs
Replace CanvasImageSource::Source{Width,Height} with ElementSize
The ShapeDetector is the sole user of the SourceWidth() and SourceHeight()
methods on the CanvasImageSource.
For the current uses (and hopefully future uses) these should be identical
to the ElementSize() method on the same interface, so use that instead,
and remove the SourceWidth() and SourceHeight() implementations.

Change-Id: Ib4506d567b6f703688ab31873df0a8d23f9ac773
Reviewed-on: https://chromium-review.googlesource.com/716679
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#508779}
bratell
Removed "using namespace" in BidiResolver.h
If this code uses "using namespace WTF::Unicode" there can be a
conflict for kLeftToRight which also exists in the Mac SDK (in
AVLTree.h). "using namespace" is also not allowed by the coding
standard, and in this case blocks a patch to jumbo compile platform
unit tests.

Bug: 761475
Change-Id: I363dd452adb4ae7ddf7586c9f98a8869f4958c4f
Reviewed-on: https://chromium-review.googlesource.com/718701
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#508776}
bratell
Giving some g_factories objects more distinct names
In jumbo builds cc files are compiled together and then multiple
objects all named g_factory causes compilation errors. An easy
fix is to use more distinct names since that is good for other
reasons as well.

Bug: 746953
Change-Id: If91d9ec90f64c18083f60e0647ddebe86dbf42e9
Reviewed-on: https://chromium-review.googlesource.com/719006
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Avi Drissman <avi@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508752}
bratell
Remove unused member LevelDBDatabase::lru_max_size_
Jumbo builds (builds where many cc files have been merged and
are compiled together) notices some more unused code than normal
builds and protested (warned) that LevelDBDatabase::lru_max_size_
was unused.

Simple fix: remove it.

Bug: 746953
Change-Id: Iaf58d87c4b962f671350984deaff0825b35e3ad8
Reviewed-on: https://chromium-review.googlesource.com/718857
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508743}
bratell
Remove test that has been disabled since April 2013
StringOperatorsText.cpp tried to measure how many copies a string
concatenation does but has been disabled since April 2013 and was
ultimately broken September 2014. This patch removes it because it
uses a macro in a way that is incompatibile with jumbo.

Bug: 761475
Change-Id: If224b7a7dac8660b1f50c2814deffcd2d664c0fe
Reviewed-on: https://chromium-review.googlesource.com/718703
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#508704}
fs
Fix typo in <meta charset> - uft-8 -> utf-8
Change-Id: I69bca984bba263d003b7a23a95d62b3055c69fa5
Reviewed-on: https://chromium-review.googlesource.com/718676
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#508693}
rune
Use a singleton invalidation set for self invalidations.
We used to create separate invalidation set instances for every single
invalidation set which just contains InvalidatesSelf(). That is, every
simple selector which only appears in the rightmost compound selector:

.a {}
#b:hover {}
#parent > .c {}

The invalidation sets for ".a", "#b", ".c", and ":hover" above are all
the same with only InvalidatesSelf() set.

Instead we can use a singleton invalidation set which is shared for all
such invalidation sets. If we later add more features to the set, we
replace the singleton with a new DescendantInvalidationSet instance
with InvalidatesSelf() set and add new features to that set.

This reduces memory use for invalidation sets from ~1MB to ~256kB on
facebook.com (see measurements in 773880).

Bug: 773880
Change-Id: I1018cea1f51628f1f940c3722cc2b48a3164a777
Reviewed-on: https://chromium-review.googlesource.com/713859
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#508692}
mstensho
[LayoutNG] Able to paint line boxes established by direct multicol children.
The legacy layout write-back code for inline layout used to place the
RootInlineBox objects on the multicol container block. But everything has to be
under the flow thread (an anonymous child of the multicol container).

A few new tests pass, and some other tests regressed, mainly because lines are
now visible, but we still don't fragment them. It's been wrong all along, just
invisible.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Iec5bf74056d961935de45ae027076a79c703ed5b
Reviewed-on: https://chromium-review.googlesource.com/716877
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508686}
bratell
Giving some g_factory objects more distinct names
In jumbo builds cc files are compiled together and then multiple
objects all named g_factory causes compilation errors. An easy
fix is to use more distinct names since that is good for other
reasons as well.

Bug: 746953
Change-Id: Ie6c221225721e230e8b973ab30c4907bc3713836
Reviewed-on: https://chromium-review.googlesource.com/716496
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508663}
fs
Handle small/zero pixel densities correctly for img.naturalWidth/Height
ImageResourceContent::ImageSize has some special logic for clamping
image dimension that end up as "zero" (LayoutUnits) to one after having
been scaled by the multiplier it is passed.
This "correction" means that for images with a small/zero pixel density,
we'll end up returning 1 even when the density corrected dimension is
(integral) 0.

To handle this, pass 1 as the multiplier to avoid the dimension clamping
and perform the pixel scaling "manually".
While doing this also move the pixel density correction code to
HTMLImageElement, and get rid of the code from ImageResourceContent,
since it only used for <img> naturalWidth/naturalHeight.
This makes ImageResourceContent::SizeType only have a single value, so
remove the enumeration and the argument.

Bug: 773272, 773284
Change-Id: Ie4a907d6cb7f262c876a5010bb7dd6a92af1cb9a
Reviewed-on: https://chromium-review.googlesource.com/708815
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#508646}
bratell
Add include guards to content headers missing include guards
Headers without include guards can not be included more than once
and in jumbo builds there might easily be more than one include
of the same header.

Bug: 746953
Change-Id: I8c19cc0764b5c91dd1aa276ad1f17719b0a70bca
Reviewed-on: https://chromium-review.googlesource.com/716476
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#508637}
bratell
Change mojo module from "mojo" to "ui.mojom" because of conflicts
Having the mojo module be "mojo" means that code appear inside the
C++ namespace "mojo" which then can collide with other code.

This happened while preparing for jumbo compiling mojo code and
caused compilation errors in jumbo because of a mojo::blink
namespace colliding with the ::blink namespace.

Since there already was an ui.mojom.TextInputType from ime, this changes
the code to merge the two TextInputType types.

Bug: 771153
Change-Id: Ic88ed6932a2d64f35ffb7661eedde09dc4619691
Reviewed-on: https://chromium-review.googlesource.com/704581
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Reviewed-by: Yuzhu Shen <yzshen@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#508634}
mstensho
[LayoutNG] Prevent >=1px clamping of columns from stretching the container.
Move the clamping code to only affect the fragmentainer block size in the
constraint space. It's needed here to ensure content progression, but it
shouldn't affect anything else.

The bug was that if height was auto and there was no non-zero height content
inside, the multicol container would still become 1px tall, which was way too
much if there was nothing to contain.

Added four unit tests. Only the two using balancing used to fail. The two
without balancing are there for coverage.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I590c42dee67b83ec8db724f0ea298f0b4dacb5b0
Reviewed-on: https://chromium-review.googlesource.com/716499
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508510}
mstensho
Add LayoutTests/fragmentation/ to blink_css_fragmentation_tests watchlist.
Also remove myself. Need to keep the empty list of watchers, or presubmit
checks will fail.

Change-Id: If5be8690ee7242a2c5366cecae148c4f871b6e6f
Reviewed-on: https://chromium-review.googlesource.com/717156
Reviewed-by: Aleks Totic <atotic@chromium.org>
Commit-Queue: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508476}
bratell
Remove unused using statement in legacy_router_impl.cc
Noticed because Time is also a macro in X11.

Change-Id: I827617492e82b62eeaf668e24470b5c199718171
Reviewed-on: https://chromium-review.googlesource.com/716482
Reviewed-by: Timothy Dresser <tdresser@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#508466}
fs
Box-less VTTCues needn't be removed from their region
If the timeline was active and had a cue that was attached to a region,
but the cue was invisible, VTTCue::RemoveDisplayTree would still attempt
to remove the cue's box from the region when its end time was reached,
resulting in a crash.

Make the entire VTTCue::RemoveDisplayTree gated on the existance of a
cue box.

Bug: 772508
Change-Id: Ie27fe76ed37c3cb9e21a1c2943d70c9cbac6647a
Reviewed-on: https://chromium-review.googlesource.com/707136
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#508457}
bratell
Give g_controllers more distinct names in content tracing
The two different g_controllers clashed when I tried a
jumbo build in content/browser. This renames them with more
distinct names.

Bug: 746953
Change-Id: I06daeb3e2f129c093dadbe88a1bd972bfcf436b3
Reviewed-on: https://chromium-review.googlesource.com/716677
Reviewed-by: Primiano Tucci <primiano@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#508437}
mstensho
[LayoutNG] Calculate overflow on multicol containers.
This gives us correct scrollbars, more or less.

Call UpdateLegacyMultiColumnFlowThread() a tad earlier, before calculating
overflow on the multicol container. It's the column set child that provides
overflow, so make sure that's calculated before calculating it on the parent.

That fixes two tests, but breaks two other tests. They break because of the
refs, which use absolutely positioned objects to cause a scrollbar (but that
doesn't seem to work in NG). But the actual tests now show scrollbars (which is
correct).

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I06a848a63c545559b67003f923208a65fd4f054b
Reviewed-on: https://chromium-review.googlesource.com/715598
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508408}
mstensho
Limit the maximum paint fragment count further.
Hopefully fixes a flaky test that tends to time out.

Bug: 763809
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I57ad04a4bfd26cb5e8e59786bc83e72052e60099
Reviewed-on: https://chromium-review.googlesource.com/716137
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#508389}
fs
Improve SVGInlineTextBox::CalculateBoundaries accuracy
Make said method compute and return a FloatRect (which is then converted
to a LayoutRect in SVGRootInlineBox::LayoutInlineBoxes), as well as
using a float for the baseline.
This should make for more compact, hopefully faster, code (due to less
FloatRect -> LayoutRect and LayoutUnit -> float transitions.) Using a
float for baseline will also yield a small improvement in accuracy, and
is consistent with similar calculations.

Bug: 757436
Change-Id: I8295a2d44f20476f1e234261f8a05fb175484d86
Reviewed-on: https://chromium-review.googlesource.com/708994
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508372}
bratell
Undef MAYBE* macros for jumbo builds.
In jumbo builds source files are merged and macros leak between
cc files. The easiest way to avoid that is to undef them after use.

This fixes a compilation problem with the MAYBE() macro which was
defined in two different tests.

R=fs@opera.com, mstensho@opera.com

Bug: 713137
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Ie06359ad1fd1f432ccf666ca12cbd824216283fc
Reviewed-on: https://chromium-review.googlesource.com/716216
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#508352}
mstensho
Fix jumbo build.
TBR=kojii@chromium.org

Bug: 713137
Change-Id: I77d45dc11495dd15740b0189556fce07b6f39d6e
Reviewed-on: https://chromium-review.googlesource.com/715996
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#508309}
mstensho
[LayoutNG] Don't round down when calculating balanced column height.
We need to take some extra care to make sure that the LayoutUnit we return,
multiplied with the number of columns, isn't ever so slightly less than the
content we are to put into the columns. Make it ever so slightly larger instead.
Example: If used column-count is 3 and the content we are going to fit is 100px
tall, we used to calculate a column height of 33.328125px. Now we'll return
33.34375px, which is larger than 33.333333333px, so that the content will
actually fit inside 3 columns, instead of 4.

Otherwise we'd get an overflow column with practically no content, and possibly
an unwanted scrollbar (when we add support for that).

Similar code in ColumnBalancer::ContentRun::ColumnLogicalHeight() for legacy
layout.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I40c9b3004817223487a055ff533c2ad050454b51
Reviewed-on: https://chromium-review.googlesource.com/713416
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508174}
mstensho
[LayoutNG] UpdateAfterLayout() on flow threads, column sets, spanner placeholders.
This is just for good measure. I noticed that the PaintLayer established by a
flow thread had zero size, which can't be good. Not that this seemed to cause
any trouble, but still...

The UpdateAfterLayout() override in LayoutBlock now needs to be public, which
seems like a better idea than up-casting to LayoutBox when calling it.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I8512d36a7fa8f0f68f2e95eb3c42e254a47b0727
Reviewed-on: https://chromium-review.googlesource.com/712035
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508140}
mstensho
[LayoutNG] Enable inline children special code for flow threads.
PlaceChildrenInLayoutBox() has special code for inline child fragments, to
basically skip them, unless we find floats. This wasn't executed for multicol.
This caused DCHECK failures and incorrect layout.

A few new tests now pass. One regresses, but that's because the test expected a
float to be at block offset 0, which it happened to be, since we didn't even
attempt to place it. Now we place it. We place it incorrectly, but at least we
place it. :)

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Ifee30438885c267f9d6c271a0db2f5c0f191fad6
Reviewed-on: https://chromium-review.googlesource.com/713858
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#508126}
mstensho
[LayoutNG] Add NGPageLayoutAlgorithm.
This one is used when overflow-y is -webkit-paged-x or -webkit-paged-y.

Such declarations will trigger creation of LayoutPagedFlowThread in legacy
layout, very similar to LayoutMultiColumnFlowThread for multicol. The main goal
here is to produce a correct fragment structure (anonymous fragments for pages),
so that we don't get confused when writing them back to legacy layout. I got
some test regressions when trying to clean up some code, so I need to land this
first. Apart from that, I haven't made a huge effort to make it lay out
correctly.

It may be that this algorithm can also be used for printing, but we'll see.

One text autosizing test has started to fail, for some reason, but it seems that
it has started to fail similarly to constrained-and-overflow-scroll-ancestor.html,
so maybe it's a good sign. :)

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I5e9b15f353376c4508952dab80cf347e35bb7b27
Reviewed-on: https://chromium-review.googlesource.com/712635
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#508041}
bratell
Member IconLoader::icon_size_ is unused on Android
The member icon_size_ in IconLoader is unused on Android. Unused members
sometimes, and specifically in this case, cause warnings in jumbo builds
which breaks the build.

This patch removes the unused member if compiling for Android.

Change-Id: Ie9934cc5e0643a25bbc1c8055e08eab138cf33cb
Reviewed-on: https://chromium-review.googlesource.com/703655
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#507947}
fs
Simplify image size handling in ImageDocument
Move the static CachedImageSize(...) helper to the ImageDocument itself,
renaming it to ImageSize() and using |image_element_| as implicit input.
Simplify expression previously involving CachedImageSize to use the
ImageSize() method.

Change other users of ImageResourceContent::ImageSize to use the new
method instead. (Passing a zoom multiplier is redundant if all you want
to check is if the dimensions are empty.)

Simplify ImageDocument::Scale() by eliminating the "page zoom" factor,
which is part of both the numerator and denominator and hence cancel
out. This removes that last user of the PageZoomFactor(...) helper
function, so it can be removed.

Bug: 773272
Change-Id: Iaaa4a39879b9770a68ad95c045747581eeaa0a00
Reviewed-on: https://chromium-review.googlesource.com/709216
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#507796}
bratell
Renamed g_factory in src/chrome/browser/extensions
This is a preparatory patch for jumbo[1] in src/chrome.
The chrome code is now, with Blink jumbified, the single largest time
consumer during compilations. chrome/browser/extensions needs
about 30 CPU minutes to compile on a reference machine and that
should be about 5-10 times faster with jumbo.

[1] https://chromium.googlesource.com/chromium/src/+/master/docs/jumbo.md

Bug: 746957
Change-Id: I696dd1da7ca97e1773e4b0f2ab0714ab6a50021a
Reviewed-on: https://chromium-review.googlesource.com/708674
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507750}
bratell
Add include guards for client_surface_embedder.h
Found when experimenting with jumbo builds. Missing include guards
and multiple inclusion does not work well.

Bug: 773275
Change-Id: Ibc327c1c969f15a1dd417bba075eda8aa19953c2
Reviewed-on: https://chromium-review.googlesource.com/708759
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#507729}
bratell
Remove duplicate helper class DestructCounter
There is already a DestructCounter in WTFTestHelpers.h. Having two
complicates jumbo builds and since they are identical, this one
can just be removed.

Bug: 745732
Change-Id: Ieca99932ff66f90d06b3fa8e21fa5b51da0d2f5c
Reviewed-on: https://chromium-review.googlesource.com/708743
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#507675}
karlo
Make sure that the border width isn't larger than the border box.
The border box is subject to pixel snapping, but the border width is
rounded.  If the border box snaps down and the border width rounds up,
overpainting can occur.  The border widths are now clamped to the
corresponding border box dimension to prevent this.  This behavior
is in line with Edge.

BUG=739431

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I622d721579a0aad8109900268ca88d5cd85dd11e
Reviewed-on: https://chromium-review.googlesource.com/695109
Commit-Queue: Karl Anders Øygard <karlo@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#507644}
mstensho
Eliminate some unnecessary includes in WebKit/public/
Mostly about reducing the need for <algorithm>, which is heavy, but removed
some other includes as well.

Bug: 766315
Change-Id: Id92c08e96566dfe5c780f6a101dbfdeb43aa4ac3
Reviewed-on: https://chromium-review.googlesource.com/693236
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Evan Stade <estade@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#507523}
bratell
Add include guards to udp_socket_resource_constants.h
Missing include guards on
ppapi/proxy/udp_socket_resource_constants.h caused issues with
jumbo compilation experiments.

Change-Id: Idad3ef224327ce6b0db9f27366992b28ab8a7d65
Reviewed-on: https://chromium-review.googlesource.com/707248
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#507469}
bratell
Support jumbo for webkit_unit_tests (-2.5 CPU minutes)
This makes webkit_unit_tests support jumbo compilation. In CPU effort
that reduces the reference build time by 2.5 CPU minutes (about 0.3%
of the total build time)

This landed once already as
https://chromium-review.googlesource.com/677449 but broke Android
testing. This has a fix for that problem (splitting test correctly
into test + source_set)

Bug: 713137
Change-Id: I81a42f51e80f02c1874bc5171774d6d292c78a62
Reviewed-on: https://chromium-review.googlesource.com/707137
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#507468}
mstensho
[LayoutNG] Copy back the actual column height to legacy layout.
Don't use the content height of the multicol container. The columns may have
been shortened due to balancing.

I expected this to make some of the old layout tests pass. Only one did, and
that one wasn't really a relevant or illustrating one. Most of the existing
test probably depend on line box fragmentation working (which still doesn't
work at all in NG), and that could explain why no relevant tests started to
pass. Added a new and straight-to-the-point test that uses a simple block.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Iab5fbbaab9491b430ab9eba1b6ea9ce0d3b0f4ec
Reviewed-on: https://chromium-review.googlesource.com/704837
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#507425}
bratell
Support jumbo for mojo generated code (-42 CPU minutes)
Mojo generates a lot of code that is expensive to compile and
compiling them through jumbo saves roughly 80-90% of that effort,
which is 42 CPU minutes on the reference machine (surprising that 
mojo code needs that long to compile).

42 CPU minutes is -7% of the current "fastest" compilation, or
-4.5% of current master use_jumbo_build=true. The wall clock effect
will be similar for a 4c/8t machine but smaller the more cores
the computer have.

This patch includes a change to jumbo.gni to handle targets 
with no sources, and streamlines targets with only one file, 
because both happen through the mojo template.

Bug: 771153
Change-Id: Ia11a709711600f1b6eedd098bf47c1df2239a7a5
Reviewed-on: https://chromium-review.googlesource.com/697664
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#507393}
bratell
Remove core/exported jumbo_excluded_source that is no longer needed
Because of an abundance of ToElement WebSearchableFormData was excluded
from jumbo. ToElement<ListedElement> was renamed so this exclude is no
longer needed.

Bug: 713137
Change-Id: I255f6ac5df213f62e5d1f6c2c3ea6b0e96540448
Reviewed-on: https://chromium-review.googlesource.com/704696
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#507358}
fs
Simplify setting of 'nonce' in SVGElement::InsertedInto
No need to use one hasAttribute() and two getAttribute() for something
that only needs one getAttribute(). (No synchronization required in this
case, so the 'fast' version can be used.)

Change-Id: I8b85ea56900fba73cf31b5a8f60cfdac280bd069
Reviewed-on: https://chromium-review.googlesource.com/704857
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#507307}
mstensho
[LayoutNG] Framework and initial support for column balancing.
For now, just figure out how tall the content inside the multicol container is,
and divide by the number of columns, and make sure that the result doesn't
overflow the multicol container (by examining height and max-height (or width
and max-width if that's what's at the end of your favorite block axis)).

Previously we just used 42px if the column block size was unspecified, so this
is a slight improvement, as can be seen by the increased number of passing
layout tests. However, there are also some regressions because of this, because
it turned out that 42px was in some cases a better number than what we produce
now. We need to detect unbreakable content by traversing the fragment tree to
improve on this.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I980695a38c7bcaf09793869b1ca3f1e4d1451d37
Reviewed-on: https://chromium-review.googlesource.com/704640
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#507283}
bratell
Qualify the blink namespace in mojo so that mojo::blink is not used
There is a mojo::blink namespace generated from
ui/platform_window/mojo/text_input_state.mojom and if that one is
visible then the string "blink" will be resolved to the wrong
namespace inside namespace mojo.

This fixes android jumbo compilation (only android generates
blink bindings from the mojom file mentioned above).

Bug: 771153
Change-Id: I923e3bebe4fac3e02fe27c60b4472275f9613df8
Reviewed-on: https://chromium-review.googlesource.com/703654
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#507070}
bratell
Fix for jumbo base scripts, don't double filter sources
If someone has managed to get a normally filtered file into
sources we need to not accidentally remove it again. This
problem triggered in net where android targets wanted to use
Linux files.

Bug: 772146
Change-Id: Ibca410c78c5a59e9f49c1d0e302204b598df25ca
Reviewed-on: https://chromium-review.googlesource.com/703694
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#507004}
bratell
Support jumbo for webkit_unit_tests (-2.5 CPU minutes)
This makes webkit_unit_tests support jumbo compilation. In CPU effort
that reduces the reference build time by 2.5 CPU minutes (about 0.3%
of the total build time)

Bug: 713137
Change-Id: I358ff81769e5fb0ebf91cd1264713c547fd3e47e
Reviewed-on: https://chromium-review.googlesource.com/677449
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#506867}
rune
Don't update fragment anchor during DOM operations.
We tried to update the fragment anchor position immediately when all
script blocking sheets are removed. As part of that update we do a
style and layout update. The last script blocking sheet may be
removed as part of removing a style element from the DOM. Updating
style and layout in the middle of a DOM operation is not safe.

Instead, update the fragment anchor position during the next safe
lifecycle update. The crash was caused by Document still pointing to a
documentElement being removed while updating the style and layout tree,
but its parent pointer had already been set to null.

Bug: 771088
Change-Id: Iaaaeece23d795c2e41d31b9fb97fc795eb2b8305
Reviewed-on: https://chromium-review.googlesource.com/698305
Commit-Queue: Rune Lillesveen <rune@opera.com>
Reviewed-by: Steve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506854}
mstensho
[LayoutNG] Ignore scrollbars in anonymous constraint spaces.
We already did ignore borders and padding, but forgot about scrollbars.

This was quite catastrophic for multicol, if a horizontal scrollbar was
actually taller than the columns. We'd end up pushing the scrollbar in front of
us (in block direction), column after column. Infinite loop (until OOM).

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I5c3038406ccf30eeb0e107b31c6bb783c7089ffd
Reviewed-on: https://chromium-review.googlesource.com/702299
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#506844}
bratell
Removing "using namespace" in a global scope in password_manager
"using namespace" in a global scope breaks jumbo builds (and
are not allowed in the code style guide). This patch replaces them
with explicit namespaces.

Bug: 771153
Change-Id: If9c4de9e115c5531708cf06f64cb0088daca2d57
Reviewed-on: https://chromium-review.googlesource.com/697370
Reviewed-by: Vadym Doroshenko <dvadym@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#506837}
bratell
Removing strange sources from mojo typemap
This patch removes a random sources block that was ignored
in normal builds but triggered an assert in jumbo builds.

This also changes the OWNERS file according to presubmit instructions.

Bug: 771153
Change-Id: Ic32f92db25b1b4bd6e2087b95785b4934a94e120
Reviewed-on: https://chromium-review.googlesource.com/702258
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#506801}
bratell
Avoid using classes named Function in blink
There is a Function template in blink's wtf library and it is easy
to get mixed up in it if you try to use the symbol "Function"
elsewhere in blink.

In particular you can easily get an include of
platform/wtf/Functional.h (which exports WTF::Function to the global
scope) in jumbo builds:

Bug: 745732
Change-Id: Ic4f4a02e1aacc5819ce824b94e284bfc6caa964d
Reviewed-on: https://chromium-review.googlesource.com/702236
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#506686}
mstensho
[LayoutNG] Implement NGColumnLayoutAlgorithm::ComputeMinMaxSize().
Intrinsic sizing for multicol used to be defined in the intrinsic and
extrinsic sizing CSS spec, but it must have been removed at some point.

All we have for inspiration now is the implementation in the legacy engine,
which landed with https://chromiumcodereview.appspot.com/23763002 back in 2013.
That, and common sense. :) The principles of min/max width calculation are,
after all, quite simple:

1. Figure out how much width we need to prevent avoidable overflow (min)
2. Figure out how much width we need to prevent avoidable soft wrapping (max)

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Id465449369d0227883e08228ce33346eb5b5cdba
Reviewed-on: https://chromium-review.googlesource.com/700460
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506680}
bratell
Avoid "unused member" warnings by removing unused member.
The profile_ member in TriggeredProfileResetter is not read by 
any code so let us remove it for platforms where it is not used.
This warning appeared in jumbo build
experiments (jumbo builds give the compiler more information which
triggers warnings that were not there before).

Bug: 770625
Change-Id: I4fd04d3147b01d0cf853b34c01ac7aa03fbd7d14
Reviewed-on: https://chromium-review.googlesource.com/695102
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Dominic Battré <battre@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506679}
tmoniuszko
Generate projects for Visual Studio 2017 by default
GN should generate projects for Visual Studio 2017 by default since this
is the default compiler now.

Bug: 683729
Change-Id: I560983cf4c228a785e0ed2648567c7e0f07584d4
Reviewed-on: https://chromium-review.googlesource.com/700258
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Cr-Commit-Position: refs/heads/master@{#506665}
bratell
Removed unused member in device/bluetooth
Nobody used the member connection_monitor_started and that warning
broke jumbo build experiments (it notices such things more than
non-jumbo builds).

Change-Id: I77055474ecdbb1eaab8fbb925ea9b7a739a6f273
Reviewed-on: https://chromium-review.googlesource.com/700268
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Vincent Scheib <scheib@chromium.org>
Reviewed-by: Vincent Scheib <scheib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506429}
fs
Inhibit scroll-to-anchor for embedded SVGs
Fragment anchors are often used for "spriting purposes" when using SVG
documents, so scrolling the referenced element into view could seemingly
randomly scroll the top-level document (if it was same-origin with the
sprite sheet.) This is usually not an expected or wanted behavior.
Inhibit scrolling for all the embedding cases. (It's uncertain whether
this ought to affect <iframe>s or not, but let's include those too for
now. For simplicity.)

While here, also remove the dependency on SVGDocumentExtension for the
trivial operation of getting the root element.

Bug: 493802
Change-Id: I9942093331b2c53ba94ad83cfbe0a3b8b4ca6cbe
Reviewed-on: https://chromium-review.googlesource.com/700638
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#506411}
bratell
Removing "using namespace" in a global scope in autofill
"using namespace" in a global scope breaks jumbo builds (and
are not allowed in the code style guide). This patch replaces them
with explicit namespaces.

Bug: 771153
Change-Id: Ic45f740d8081b9f4e531b30ac05f6578a404de11
Reviewed-on: https://chromium-review.googlesource.com/697371
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506367}
bratell
Removing "using namespace" in a global scope in translate
"using namespace" in a global scope breaks jumbo builds (and
are not allowed in the code style guide). This patch replaces them
with explicit namespaces.

Bug: 771153
Change-Id: Iea234b0e02636b198af20b0f2b6ad53e735ebf7b
Reviewed-on: https://chromium-review.googlesource.com/697704
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Hajime Hoshi <hajimehoshi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506361}
bratell
Remove random string in mojo typemap file
There was a random sources block in image_filter.typemap which
broke jumbo since it has asserts that sources contains nothing
random. Normal builds ignored the sources entry since it didn't
match any toolchain.

Bug: 771153
Change-Id: I4b801ae350807701740946ca5ea5984c4086b61e
Reviewed-on: https://chromium-review.googlesource.com/697207
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#506350}
mstensho
Avoid inclusion of <algorithm> from popular header files when possible.
It's heavy to compile.

Bug: 766315
Change-Id: I0182fe1b9c8e8e6bd2024cb71bab7e3fcc501246
Reviewed-on: https://chromium-review.googlesource.com/695106
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506106}
fs
Revert behavior for non-scaling-stroke transform
https://codereview.chromium.org/2711503002 fixed getScreenCTM by
including the actual CTM from the element to the "screen" ("host"
coordinate space.) This of course also included the scale factor
contributed by any ancestor transforms. Including these transforms
however made evaluation of the non-scaling-stroke transform (the host
transform) unreliable, because of how that transform is "baked" into
the display list. (So if the host transform is sampled when it is
degenerate, all rasterization using that display list will produce
"weird" results - which will remain until an new display list is
recorded.)
Revert the computation of the non-scaling-stroke transform back
something akin to what it was previously until we can figure out a
better way to deal with this situation.

Bug: 747708
Change-Id: I8fdd19829c44f88d4d5e0bbbe4dec3ff2bee52a4
Reviewed-on: https://chromium-review.googlesource.com/697809
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#506099}
bratell
Adding missing include guard to test header file.
Found when experimenting with jumbo compilation for mojo
generated files.

Change-Id: I202a22fa9aa24df3f928992b67e3ad35321e7e1c
Reviewed-on: https://chromium-review.googlesource.com/693254
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#506085}
bratell
Jumbo for blink/platform/scheduler and its unit tests (-3.5 CPU minutes)
This adds support for jumbo to the scheduler code, including its
unittest. The total effect is about 3.5 CPU minutes which is about
30% of the remaining blink/platform time, or 0.5% of the total
content_shell+chrome+blink_tests compilation time.

Bug: 
Change-Id: I79f7b4d73e7a585a712744dbe7209f02bb043830
Reviewed-on: https://chromium-review.googlesource.com/693097
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#505982}
bratell
Move shared test classes in wtf tests to a shared file
HashSet, HashMap and ListHashSet, Vector and Deque tests have the
same test classes: MoveOnly, CountCopy, DestructCounter, WrappedInt,
LivenessCounter, ...

This both deduplicates the code and prevents symbol collisions in
jumbo builds.

Bug: 745732
Change-Id: I19874a89ba4933260f3c80727ac5ba1160831ad1
Reviewed-on: https://chromium-review.googlesource.com/678934
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505614}
bratell
Adding namespaces to prevent AppendToVectorTestTask clashes
Several test classes in scheduler have implemented
AppendToVectorTestTask and this patch gives those unique namespaces
to prevent them from clashing in jumbo builds.

Bug: 745732
Change-Id: I265c5507cbcc0f934f5904cc62033443442163f9
Reviewed-on: https://chromium-review.googlesource.com/692018
Reviewed-by: Alexander Timin <altimin@chromium.org>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#505364}
bratell
Adding namespaces to prevent NopTask collisions in jumbo builds
Several test classes in scheduler have implemented NopTask and
this patch uses unique namespaces to prevent them from clashing
in jumbo builds.

Bug: 745732
Change-Id: I8c3ecc80ab0696fbe4634d330dfe1e942dbcfa8b
Reviewed-on: https://chromium-review.googlesource.com/690345
Reviewed-by: Alexander Timin <altimin@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#505338}
bratell
Adding namespaces to prevent name collisions in jumbo builds
Several test classes in scheduler use the same name. As an alternative
to renaming them, or some of them, use unique namespaces. This
solves problems with MockTask and MockObserver.

Bug: 745732
Change-Id: I56da313dbbfb116d28d45ccd5f261cdfbf48d188
Reviewed-on: https://chromium-review.googlesource.com/687674
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505147}
fs
Fix pre-order traversal in LayoutBoxModelObject::HasNonEmptyLayoutSize
Passing 'this' (which |object| will be in this case) to
LayoutObject::NextInPreOrder, will turn it into a non-obvious way of
saying FirstChild.
Pass |root| instead of |object| to make the traversal actually pre-
order.

Bug: 769459
Change-Id: I6bc4c487faab053d02bc16826862234f15e2376e
Reviewed-on: https://chromium-review.googlesource.com/690254
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#505099}
fs
LayoutBoxModelObject::HasNonEmptyLayoutSize ignores SVG model objects
Extend the DCHECK to also cover SVG layout objects. The IsBox() check
should cover the SVG root, and if it is zero-sized any descendant should
not be considered to have a "non-empty" layout size. Overflow is
disregarded (as it seems to be in general in this method.)

Bug: 769459
Change-Id: Iea15b86032094a15608b614f5baa1057c5d6a686
Reviewed-on: https://chromium-review.googlesource.com/689997
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#505072}
mstensho
Less forcing of column flow flex children layout.
If the logical height of a child is intrinsic, we only need to lay it out if
there's a chance that the logical width of the flex container changed.
Otherwise nothing's going to change in there.

We do this by checking for kForceLayout, so that we don't risk descending into
deep subtrees just because some flex item sibling changed, for instance.

TEST=PerformanceTests/Layout/flexbox-deeply-nested-column-flow.html

Bug: 766633
Change-Id: I29337a176592779f07a37570fef8c85b1b4f6d99
Reviewed-on: https://chromium-review.googlesource.com/680214
Reviewed-by: Stefan Zager <szager@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#504924}
mstensho
Don't include UseCounter.h from CSSParserContext.h and others.
public/platform/web_feature.mojom-blink.h is heavy.
Avoid it when possible.

Break the WebFeature defintion out of UseCounter.h and also make that
enum forward-declarable. There are quite a few translation units that
don't need to deal with UseCounter, just because they need to name a
web feature. And then there are also some places where we just need to
have the type forward-declared, such as in CSSParserContext.h

This reduces the number translation units that depend on UseCounter.h
by about 1601 compilation units, which is ~56%.

It seems that most translation units that include UseCounter.h really
need the WebFeature definition as well, so at least for now, it will
be included there.

Bug: 766315
Change-Id: I1cc0ee843373eb407c424ecd3c03c0f9080770bd
Reviewed-on: https://chromium-review.googlesource.com/669020
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Rune Lillesveen <rune@opera.com>
Reviewed-by: David Bokan <bokan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504840}
rune
Properly await promises in inert-tests.
I did not find a way to await each forEach or map in inert-inlines, so
I fell back on a plain old for-loop.

Bug: 726218, 769347
Change-Id: I196ff128ce95319b7ca297254745aec842ef6cff
Reviewed-on: https://chromium-review.googlesource.com/686814
Commit-Queue: Rune Lillesveen <rune@opera.com>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504733}
bratell
Changing files for some bindings testing helpers
This is a followup to commit e303b7d8 after same followup
review comments.

Bug: 745732
Change-Id: I768e2fb98d6084e5ea7d24edbe74916cd4bc09c4
Reviewed-on: https://chromium-review.googlesource.com/686896
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#504673}
bratell
Adding namespaces to prevent name collisions in jumbo builds
Several test classes in scheduler use the same name. As an alternative
to renaming them, or some of them, use unique namespaces.

Bug: 745732
Change-Id: I00bbbc957c58c04013a77b89b2b0cdf7c0c6321d
Reviewed-on: https://chromium-review.googlesource.com/682055
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Reviewed-by: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504655}
rune
Missing return of Promise in automated pointerevents test.
Bug: 754222
Change-Id: Ic0c906535182da26f13246248e34023a4a896b8e
Reviewed-on: https://chromium-review.googlesource.com/686821
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#504649}
rune
Reland "Store new ComputedStyle object if style did not change."
This is a reland of https://chromium-review.googlesource.com/681755

The comparison of ComputedStyle does not take additional flags into
account. For instance, the AffectedBy* flags used for updating pseudo
classes like :hover. We used to call SetStyleInternal, but this was
removed because the previous comment said it was because of style
sharing which is now removed.

The display:contents case (768406) never worked because the code path
for StoreNonLayoutObjectComputedStyle() was always skipped when
computed style compared to be equal.

TBR=nainar@chromium.org,treib@chromium.org

Bug: 768406, 767832, 768790
Change-Id: Iee509e43e5fcc29d04944655d3d966ea61cc2adf
Reviewed-on: https://chromium-review.googlesource.com/684186
Commit-Queue: Rune Lillesveen <rune@opera.com>
Reviewed-by: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#504561}
mstensho
Performance test with deeply nested column flex containers.
In this teste there's a (rather) deeply nested subtree of column-flow flex
containers. The root of this subtree is itself a flex item in a row-flow
container. It has a sibling item whose child changes width, without affecting
the flexed size of the deeply nested subtree. This shouldn't require the
subtree to be re-laid out, but it currently does get re-laid out, thanks to the
fix for bug 752078.

Bug: 766633
Change-Id: I3d76736730f18082a299907f7b2a543d2b087ba8
Reviewed-on: https://chromium-review.googlesource.com/680216
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#504458}
bratell
Adding missing include guard to ui/views/animation/ink_drop_stub.h
Change-Id: Id3e0139beeca89444f4100de67c21da579c49047
Reviewed-on: https://chromium-review.googlesource.com/684739
Reviewed-by: Mohsen Izadi <mohsen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#504388}
bratell
Deduplicate some testing helper functions in v8 bindings test.
V8ScriptValueSerializerTest and V8ScriptValueSerializerTestForModules
had a few methods in common. This patch makes those methods be
shared, or in the case or non-identical methods, renamed to not collide
in jumbo builds.

Bug: 745732
Change-Id: Ia51d9f8dba1910902465dc4cffc193031b47ee3f
Reviewed-on: https://chromium-review.googlesource.com/677446
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#504379}
bratell
Remove a small header by including it in ToV8ForCore.h
A bit of cleanup after a recent commit that added an unnecessary header
file.

Bug: 745732
Change-Id: I1a90f22c9301ab60a09ea2fec9020c5da431460b
Reviewed-on: https://chromium-review.googlesource.com/684177
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504361}
rune
Update counters after style recalc, not layout.
We used to update counters on every layout as long as there was at
least on LayoutCounter in the rendered document. Also, the update was
triggered by marking the changed element for layout.

We need to update counters when we add/remove LayoutCounter, or when
computed counter directives change on rendered elements during style
recalc. We update counters immediately after style recalc and layout
tree rebuild in Document::UpdateStyle().

Bug: 768357
Change-Id: I32693fefaa7bdb74cf959ef5ead4256d2ec2d0da
Reviewed-on: https://chromium-review.googlesource.com/678676
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#504310}
bratell
Deduplicate a testing template in v8 bindings test.
The two implementations of ToV8 for testing collided in jumbo builds
so to avoid having to exclude some files in bindings tests from jumbo
this patch moves the template to a shared header.

Bug: 745732
Change-Id: Iaa7cf7e19d987e7a048fc606eafaedb49606959a
Reviewed-on: https://chromium-review.googlesource.com/677394
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Jens Widell <jl@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#504304}
rune
Store new ComputedStyle object if style did not change.
The comparison of ComputedStyle does not take additional flags into
account. For instance, the AffectedBy* flags used for updating pseudo
classes like :hover. We used to call SetStyleInternal, but this was
removed because the previous comment said it was because of style
sharing which is now removed.

The display:contents case (768406) never worked because the code path
for StoreNonLayoutObjectComputedStyle() was always skipped when
computed style compared to be equal.

Bug: 768406, 767832
Change-Id: Iac4708e3cd3a6451d99c1bb2bb69efb74289b8eb
Reviewed-on: https://chromium-review.googlesource.com/681755
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#504285}
mstensho
[LayoutNG] Prevent negative column widths.
If the width of the column gaps is larger than the available content width of
the multicol container, clamp negative column widths to zero. This fixes
DCHECK failures, since the engine doesn't fancy negative widths that much.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I934b28dfe494ccdffb53c0693d1056ff87fed82e
Reviewed-on: https://chromium-review.googlesource.com/666896
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#504134}
bratell
Revert "Add jumbo_test template"
This reverts commit 21f6df2a9bbb8c7bc60186c2ae1792b8361e1c5d.

Reason for revert: This added a dependency between //build and //testing that complicates life for //v8. Need time to evaluate what the best fix it.

Original change's description:
> Add jumbo_test template
> 
> We already support jumbo_source_set, jumbo_component and
> jumbo_static_library so this is just another common template with a
> non-default configuration.
> 
> This is needed in some form for jumbo in blink unittests.
> 
> Bug: 761475
> Change-Id: I443fedb4a41c43cf21102e2a2f8ced937961665c
> Reviewed-on: https://chromium-review.googlesource.com/671369
> Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
> Commit-Queue: Daniel Bratell <bratell@opera.com>
> Cr-Commit-Position: refs/heads/master@{#503193}

TBR=dpranke@chromium.org,bratell@opera.com,brucedawson@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 761475
Change-Id: Ie58618afa061107ccb28e29cda6e1c50e91629ba
Reviewed-on: https://chromium-review.googlesource.com/681716
Reviewed-by: Daniel Bratell <bratell@opera.com>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#504075}
fs
Add missing file extension (.h) in core/layout/BUILD.gn
TextDecorationOffsetBase.h was missing the .h qualification. This broke
Jumbo builds, but is incorrect in general.

Change-Id: Ife16025f01c1fc51ce6620b77140b1485a8fe994
Reviewed-on: https://chromium-review.googlesource.com/681334
Reviewed-by: Daniel Bratell <bratell@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#504033}
mstensho
[LayoutNG] Re-enable CollapsingMarginsCase6 unit test.
Don't know when it started to pass, but at least it passes now. :)

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: If9d7be1de73310d17996fa85c50a6a18f6169b10
Reviewed-on: https://chromium-review.googlesource.com/664806
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503977}
mstensho
Include less from Element.h
Bug: 766315
Change-Id: I16b36710368f24b76c7598f9956e3cd80c95f4fc
Reviewed-on: https://chromium-review.googlesource.com/668443
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503941}
hugoh
Ignore <input> and <textarea>'s user-select styling
Background:
The CSS spec says that user-select does "selective inheritance",
see https://drafts.csswg.org/css-ui-4/#propdef-user-select.

<input> and <textarea> are two elements that are affected
by this. These elements should not inherit user-select from
parent elements.

Fixed problem:
<input|textarea readonly|disabled> could inherit
"user-select: none".

This regressed because
https://chromium-review.googlesource.com/570246
removed input|textarea's default user-select styling.

Solution:
Make all text controls always selectable. This is done in
LayoutTextControl::AdjustInnerEditorStyle.

Interoperability note:
<input readonly style="user-select: none"
value="Chrome 61 cannot select this.">. This CL fixes
this by ensuring that all text fields (i.e also readonly fields)
are always selectable (no matter user-select styling).

In other words, <input> and <input readonly> now behave in
the same way (both always allow selections) which aligns
us with Firefox and Edge.

BUG=761433, 764316

Change-Id: I89fc94a2a04caf3a87b12a9071081dafd48a8727
Reviewed-on: https://chromium-review.googlesource.com/663217
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Hugo Holgersson <hugoh@opera.com>
Cr-Commit-Position: refs/heads/master@{#503793}
bratell
Rename GarbageCollectedHolder to avoid clash
There is already a GarbageCollectedHolder class in webkit_unit_tests
so this renames the second one GarbageCollectedHolderForToV8Test 
to avoid collisions in jumbo builds.

Bug: 745732
Change-Id: Idc625d35fd3590292d93e1a3a0b685db12bd7368
Reviewed-on: https://chromium-review.googlesource.com/677397
Reviewed-by: Jens Widell <jl@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#503753}
wdzierzanowski
Allow lookup of videodecoder service to fix HW video decoding on macOS 10.13
Tha macOS sandbox has apparently changed in 10.13.  If we don't allow
lookup of the global Mach service com.apple.coremedia.videodecoder,
VTDecompressionSessionCreate() fails with
kVTVideoDecoderNotAvailableNowErr for some videos.

Bug: 767037
Change-Id: I4fee235d3808a504d57660976ef96b3a0a0f54d7
Reviewed-on: https://chromium-review.googlesource.com/677290
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Reviewed-by: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503747}
karlo
offsetParent fails to consider continuations when searching for parent.
Block-level objects can have inline parents, but this triggers the
insertion of anonymous boxes and continuations, which offsetParent()
currently doesn't understand.

This change lets offsetParent() understand continuations better.
If an anonymous continuation is encountered when finding ancestors,
it will use the split inline as the ancestor, and continue searching
from there.

BUG=638177

Change-Id: I8850f9b5dacaffaa26b5f1c414f4f351709d7088
Reviewed-on: https://chromium-review.googlesource.com/674875
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Karl Anders Øygard <karlo@opera.com>
Cr-Commit-Position: refs/heads/master@{#503704}
karlo
[LayoutNG] Implement NG support for the line height quirk.
This cl implements NG support for the line height quirk.  There
are some deviations from the behavior of the old layout code:

- inline boxes with margins in the inline direction will now cancel
  the quirk, previously only borders and padding caused this.  This is
  in line with Gecko and Edge.

- in the existing layout engine, if there's a line break between two
  replaced elements separated by whitespace, the whitespace at the end
  of the line is preserved, in turn causing the line height quirk to
  be cancelled.  The whitespace preservation appears to be in
  violation of CSS 2.2, 16.6.1, and does not exist in NG.

A few test cases had to be altered to accommodate these differences.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I3d8d7eaf0f2c17ef1cbd4545996c29d371aaf7c6
Reviewed-on: https://chromium-review.googlesource.com/664720
Commit-Queue: Karl Anders Øygard <karlo@opera.com>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503566}
mstensho
Remove unnecessary includes from UseCounter.h
Especially v8.h is heavy.

Bug: 766315
Change-Id: I9bd71910607f829fd0f71d8de0e64d3dbc741461
Reviewed-on: https://chromium-review.googlesource.com/669019
Reviewed-by: David Bokan <bokan@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#503538}
bratell
Make sure to include traits before testing them in tests.
It's possible to check traits without including their specialization
or doing an implicit instantiation but then you get the default
values which can be wrong (or you would not have had a specialization).
In jumbo builds this is noted because first you get an implicit
instantiation and then an explicit instantiation which is a C++ error.

Fix is to make the explicit instantiation before any implicit
instantiations can happen. I do wish this error wasn't so invisible. It's
the third or fourth detected through jumbo builds.

Bug: 761475
Change-Id: Ifceb604e027ac8877764b584555007c854c74f03
Reviewed-on: https://chromium-review.googlesource.com/677383
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#503454}
bratell
Rename MockScrollableArea to be more unique
There is a MockScrollableArea defined in ScrollbarTestSuite.h so if
the compiler sees that function then you get compilation errors. That
happens in jumbo builds so to avoid this problem this patch renames
the function MockScrollableAreaForAnimatorTest which follows a pattern
used elsewhere.

Bug: 745732
Change-Id: Ia264efac21e4c358e50aa90ec666a95d32366642
Reviewed-on: https://chromium-review.googlesource.com/671424
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#503390}
rune
Expose CSSViewportRule only if runtime flag is enabled.
Bug: 766652
Change-Id: I7e76640a397eafeba28f178fb568b3af7cdccf49
Reviewed-on: https://chromium-review.googlesource.com/674924
Reviewed-by: Rick Byers <rbyers@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#503370}
bratell
Add jumbo_test template
We already support jumbo_source_set, jumbo_component and
jumbo_static_library so this is just another common template with a
non-default configuration.

This is needed in some form for jumbo in blink unittests.

Bug: 761475
Change-Id: I443fedb4a41c43cf21102e2a2f8ced937961665c
Reviewed-on: https://chromium-review.googlesource.com/671369
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#503193}
mstensho
Don't include Document.h from CSSParserContext.h
Around 330 fewer dependencies on Document.h.

Bug: 766315
Change-Id: I48cb525c176b27463f06090bad125bb2025b5759
Reviewed-on: https://chromium-review.googlesource.com/668444
Reviewed-by: Rune Lillesveen <rune@opera.com>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#503117}
mstensho
Include less from platform/geometry/ headers.
In particular, avoid <algorithm>.

Specifying the default template parameters to Vector in Forward.h
means that we can no longer specify them along with the template
definition.

Bug: 766315
Change-Id: I62eeaf5da82f59431d68011f904a1fcaf9f93f81
Reviewed-on: https://chromium-review.googlesource.com/668367
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502920}
bratell
Use differently named test classes in blink/platform tests
Both PODFreeListArenaTest and PODArenaTest had local test classes
naemd TestClass and those collided in jumbo build. This patch
changes the colliding names to be more unique inside blink/platform.

Bug: 745732
Change-Id: I8b31e62125c0e0eb84103d91f3e28dd9decd3f5f
Reviewed-on: https://chromium-review.googlesource.com/671265
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#502812}
bratell
Add prefix to test class names to make them more unique.
Jumbo didn't like that there were two TestExtraData classes in
platform/exported tests so this adds appropriate prefixes to them.

Bug: 745732
Change-Id: I9286225bf37dd39342e28aec8ddcca3da6504063
Reviewed-on: https://chromium-review.googlesource.com/671270
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#502811}
bratell
Support jumbo in blink/platform/loader (-2.5 CPU minutes)
Supporting jumbo in blink/platform/loader saves about 2.5 CPU minutes
of effort which is about 0.3% of the remaining build time. Not much
but it's only a few added characters.

Bug: 761475
Change-Id: I3ca17ff6fefb04c43dd9571aea5e749bfe86b81d
Reviewed-on: https://chromium-review.googlesource.com/671231
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#502809}
bratell
Rename InsertionAndDeletionTest to avoid collisions with other tests
There are InsertionAndDeletionTest functions in both PODIntervalTreeTest
and PODRedBlackTreeTest and in jumbo builds they collide. This patch
renames one of them TreeInsertionAndDeletionTest.

Bug: 745732
Change-Id: Ieba300f4532695060250cb70f88f53713158ccf1
Reviewed-on: https://chromium-review.googlesource.com/671228
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#502808}
bratell
Deduplicate some oilpan test utility functions.
Several utility functions existed in both HeapTest.cpp and
HeapCompactTest.cpp. This patch moves them to a shared file so that they
don't collide in jumbo builds. Also, less duplicate code is better.

Bug: 761475
Change-Id: Ia5a4bb0b205646564ccec7e87150283837028191
Reviewed-on: https://chromium-review.googlesource.com/671267
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#502806}
rune
Re-attach whitespace children when removing DOM nodes.
When the display type changes for an element in the DOM tree, the
WhitespaceAttacher would re-attach whitespace siblings appropriately
when traversing the re-attached element.

When a DOM node is removed from the tree, there will be no layout tree
rebuild. Or, at least, the removed node will not be encountered by the
traversal to trigger a re-attachment of any following whitespace nodes.

In order to fix that, introduce a hash set which contains elements
which had one of their layout tree children removed since the last
layout tree update. In the next UpdateStyle mark these elements for
layout tree rebuild and let the WhitespaceAttacher check if any of its
whitespace children needs to be re-attached.

Bug: 763291, 762833, 364817
Change-Id: I4d1b3df10d07f549abfea17df0184beca0623ef7
Reviewed-on: https://chromium-review.googlesource.com/661957
Commit-Queue: Rune Lillesveen <rune@opera.com>
Reviewed-by: nainar <nainar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502803}
mstensho
Include less from ContainerNode.h
Bug: 766315
Change-Id: I791ae5a12f0602c95194a60659e29e572dce5c8a
Reviewed-on: https://chromium-review.googlesource.com/668441
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502744}
bratell
Use differently named test classes in blink/platform tests
Both PaintChunkerTest and PaintControllerTest have test classes named
TestDisplayItem. These collide in jumbo builds so this patch renames
one of them TestDisplayItemGeneric to be unique inside blink/platform.

Bug: 745732
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I3cdd3b21f5523ef54fe3fbe29f4f7dc0607d7874
Reviewed-on: https://chromium-review.googlesource.com/671423
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#502675}
bratell
Fix header include guard for MockImageDecoder.h
The include guard was missing the actual define.

Bug: 745732
Change-Id: Id6435955c9011295b9583d29df6f45d008f0e192
Reviewed-on: https://chromium-review.googlesource.com/671233
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502602}
bratell
Rename EXPECT_RECT_EQ to be more unique and accurate
There is an EXPECT_RECT_EQ in //cc/test/geometry_test_utils.h which is
used by other tests. Since that causes problems in jumbo builds and
since it is not an equality comparison, this renames the macro
EXPECT_FLOAT_RECT_NEAR (following a pattern used elsewhere).

Bug: 745732
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I2720f72dbf0b8dac603c19d312109fb83fdfa313
Reviewed-on: https://chromium-review.googlesource.com/671230
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502601}
bratell
Reuse existing ValueToString<float> in test
There is a ValueToString<float> in FloatPolygon to be used by
POD tests so PODIntervalTreeTres doesn't need to define its own.

Noticed in a jumbo build where the two copies collided.

Bug: 745732
Change-Id: I7dd3cd6429ac9c1357dad8c7e3cf98140a58f9d3
Reviewed-on: https://chromium-review.googlesource.com/671266
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502598}
mstensho
Include less from Node.h
Node.h is a popular header, so this affects compilation times.

Change-Id: Iea71e63f518885aa7c1552470f75b78a1e29a4cf
Reviewed-on: https://chromium-review.googlesource.com/668370
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502493}
mpichlinski
CHR-6375: Fixed crash on fallback from ANGLE to SwiftShader.
During fallback from ANGLE to SwiftShader it is required to unload
ANGLE libraries, otherwise SwiftShader will fail to load its own
libGLESv2 library.

Fixed ANGLE platform reset.

Fixed memory leak on X11 by fixing order in ShutdownGL.

Leak was occuring during fallback from libGL to software GL implementation
because ShutdownGL was cleaning GL implementation info before unloading
GL and therefore libGL was unloaded with known issue crbug.com/250813

Previous attempt with memory leak:
https://chromium-review.googlesource.com/640992

Reverted in:
https://chromium-review.googlesource.com/650286

Bug: 760063, 761930
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ibea80f560aa50ba48cbff6f39a664095db38daaf
Reviewed-on: https://chromium-review.googlesource.com/668357
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502409}
mstensho
[LayoutNG] Border and padding on multicol containers.
Code was missing both on the column fragment positioning side, and on
the legacy write-back side.

Moved the call to UpdateLegacyMultiColumnFlowThread() further
down. Apart from making sense (nice to have written back the size of
the multicol container before updating the flow thread), this became
necessary now, because otherwise ValidateColumnSets() would nuke the
logical width of the flow thread, now that the flow thread gets its
logical width set earlier.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I1f6906f488b0251d4a00117e66ae6e06649568d6
Reviewed-on: https://chromium-review.googlesource.com/668372
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502406}
fs
Enable Skia's SkImageGenerator implementation
The SkImageGenerator_none.cpp implementation of
SkImageGenerator::MakeFromEncodedImpl always produce empty output.

Bug: 758459
Change-Id: I0745e28c7c9f4aa09efbe0f0de7c88faab87f868
Reviewed-on: https://chromium-review.googlesource.com/668408
Reviewed-by: Leon Scroggins <scroggo@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#502401}
fs
Propagate GlobalPaintFlags to EmbeddedContentView::Paint
The global paint flags - like the kGlobalPaintFlattenCompositingLayers
flag - were lost when descending into frames for painting. This would
cause composited layers to not be painted.
Add a GlobalPaintFlags argument to EmbeddedContentView::Paint, and pass
the flags carried by PaintInfo to it, and propagate as needed.

Bug: 765099
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I8c824dd12e7caa4c65cfd0bf0c3ab8de69ddfcfb
Reviewed-on: https://chromium-review.googlesource.com/667160
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#502328}
mstensho
[LayoutNG] Unbreakable content in block fragmentation.
This introduces limited support break-inside:avoid on in-flow block-level
elements. After layout, if we discover that we need to insert a break in front
a node, in order to honor break-inside:avoid, drop the fragment and retry at
the start of the next fragmentainer.

The constraint spaces now need to know the full fragmentainer block size, in
addition to what they have available. It's only when the available size is less
than the full fragmentainer size, that we can break before some node. Otherwise
there'd be no progress, and we'd end up with an infinite number of empty
fragmentainers.

Since I wanted to DCHECK that we only break before the first fragment of some
node, and therefore needed IsFirstFragment(), I moved that function along with
its friends from the anonymous namespace of ng_block_node.cc to a new
ng_fragmentation_utils.h file. There's some uncertainty as to how to treat
non-box fragments here, but we can figure that out later.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I0ad419177d174fdc787061206ee1abd86deb8943
Reviewed-on: https://chromium-review.googlesource.com/666816
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502217}
bratell
Support jumbo in blink/platform (-20.5 CPU minutes)
Supporting jumbo in blink/platform saves about 20.5 CPU minutes on
the reference hardware.

A few files are still excluded and that is tracked in referenced bugs.

R=haraken@chromium.org

Bug: 761475
Change-Id: Ibdd1916f24c50c0ef2c62ca0b1c3b3e80643fb5d
Reviewed-on: https://chromium-review.googlesource.com/652998
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#502211}
rune
Rebuild non-distributed children with separate WhitespaceAttacher.
We used to pass in the same WhitespaceAttacher to the pass over non-
distributed child nodes which caused DidVisitText() to mess up the
whitespace re-attachment of whitespace being the left-most node of the
distributed nodes. In particular if there was a ::before element
changing display type preceding that left-most space.

Instead, make a RebuildNonDistributedChildren() method which passes in
a separate WhitespaceAttacher.

Bug: 765090
Change-Id: I4fd3bd417d7a5d7accdcb8b6155991093ab05f50
Reviewed-on: https://chromium-review.googlesource.com/666681
Reviewed-by: nainar <nainar@chromium.org>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#502202}
rune
Always rebuild layout tree for shadow root when host is rebuilt.
We tried to do a light-weight search for the first in-flow or text
child of the shadow root when shadow root children didn't need a
rebuild. This was done to make the WhiteAttacher point to the correct
text node when re-attaching the ::before element.

This code did not properly handle slots and insertion points. Also,
supporting display:contents for ::after means we will have to traverse
shadow root children from its last node until we find the first in-flow
to properly attach a space inside an ::after element.

For simplicity, and correctness, walk the shadow root children using
RebuildChildrenLayoutTrees() instead.

Bug: 764686
Change-Id: Icb9f8db7172ea54bd876fd95ca722c2906b4c639
Reviewed-on: https://chromium-review.googlesource.com/667138
Reviewed-by: nainar <nainar@chromium.org>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#502194}
tsniatowski
Forward cflags/cflags_cc in fuzzer gn template
Forwarding more of the usual gn variables is likely less surprising
-- defines and include_dirs are already forwarded, so add cflags and
cflags_cc too so it takes less effort to suppress a stray warning when
writing a fuzzer test case.

Change-Id: I5a490e4f2520871bdf649fc3ea3b75bbea0653df
Reviewed-on: https://chromium-review.googlesource.com/663860
Reviewed-by: Oliver Chang <ochang@chromium.org>
Reviewed-by: Max Moroz <mmoroz@chromium.org>
Commit-Queue: Tomasz Sniatowski <tsniatowski@opera.com>
Cr-Commit-Position: refs/heads/master@{#501926}
mstensho
[LayoutNG] Update multicol FlagExpectations for LayoutNG
Two multicol tests time out flakily, but if they don't, they pass.

TBR=atotic@chromium.org,kojii@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I63f2434629f833c6d52f0a4672faa1a3be1fa8a3
Reviewed-on: https://chromium-review.googlesource.com/666619
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#501923}
mstensho
LayoutNG] Calculate available fragmentainer space correctly.
When processing children, we forgot to subtract the BFC offset. We just used
the value returned from the constraint space's FragmentainerSpaceAvailable()
directly. Renamed that method in both the constraint space and the builder to
FragmentainerSpaceAtBfcStart(), to make it clear that this value doesn't
necessarily return the space available to the block currently being laid out.

Added FragmentainerSpaceAvailable() to the block algorithm instead, and also
moved IsOutOfSpace() into the class.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: If1232a1a33dd4c7655339eed2a88104b98f06bc0
Reviewed-on: https://chromium-review.googlesource.com/664805
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501750}
fs
Rework normalization in LayoutSVGInlineText
When performing (whitespace) normalization in an OriginalText override,
we miss normalization when the layout object has its text content
updated.
Perform the normalization in the SetTextInternal override instead to
cover the text-content-update case as well.

Bug: 645597
Change-Id: Id65cbbe75dbcc636f4cde38b8bb8887d05caf1d7
Reviewed-on: https://chromium-review.googlesource.com/664812
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#501678}
mstensho
[LayoutNG] Detect breaks that occur at the exact start of blocks.
Such breaks used to go unnoticed and cause misery and assorted unpleasantries.
Upgraded test expectations. Added a unit test.

As long as we haven't both got an in-flow child that broke AND exceeded
available fragmentainer space, we need to continue and lay out its siblings. A
block of zero height at a fragmentainer boundary actually belongs in the former
fragmentainer, not the latter. A consequence of this change is that even
non-zero height blocks that start at a fragmentainer boundary gets a
zero-height fragment in the former fragmentainer, before it continues in the
next fragmentainer. We may want to avoid this, but I'm not sure what's more
correct yet (or if it matters at all).

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I50e862d8c0dc787a47b799e2e639e5ca7ba57158
Reviewed-on: https://chromium-review.googlesource.com/663141
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501588}
mstensho
[LayoutNG] Prevent breaks from escaping the containing fragmentation context.
The call sites that call NGFragmentBuilder::AddChild() also need to explicitly
propagate breaks to their container, if that's what they want. The column
layout algoirithm *doesn't* want this.

Bug: 757767
Change-Id: I203c045fc85a65303dfe4c0cdad20eb60e64fba2
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Reviewed-on: https://chromium-review.googlesource.com/663859
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501444}
fs
Fix indentation in SVGImage::DataChanged
Change-Id: If895e92065d23e3da4f5d659c114abf024038b38
Reviewed-on: https://chromium-review.googlesource.com/663537
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#501319}
bratell
Make the forward declaration of ShapeResultSpacing correct.
The lack of PLATFORM_EXPORT on the forward declaration made the compiler
generate non-exported template instantiations which later caused linker
errors when those methods were missing.

R=drott@chromium.org, mstensho@opera.com

Bug: 764255
Change-Id: I2e03b924185dd7787d8129aa4c3c93716341cdbd
Reviewed-on: https://chromium-review.googlesource.com/663377
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#501260}
bratell
Removed unused member variable in OpenTypeCapsSupport
Jumbo builds (where the compiler has more information) noticed that
run_ is unused and emitted a warning.

R=drott@chromium.org

Change-Id: I4a975375cfc772e77dd5e9692c5cdc982a8453c1
Reviewed-on: https://chromium-review.googlesource.com/663179
Commit-Queue: Daniel Bratell <bratell@opera.com>
Commit-Queue: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Cr-Commit-Position: refs/heads/master@{#501256}
mstensho
[LayoutNG] Update test expectations to get rid of *some* of the unexpected passes.
All probably related to a recent change to TextIterator [1], which made legacy
layout dump text identically to what NG does.

[1] https://chromium-review.googlesource.com/c/chromium/src/+/653665

TBR=xiaochengh@chromium.org,kojii@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Bug: 758816
Change-Id: Idda7617e54d254d76bf170cb59c8cd7c9ddd16d6
Reviewed-on: https://chromium-review.googlesource.com/663037
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#501234}
bratell
Avoid implicit conversion to CGRect and CGSize.
Implicit conversion to CGRect and CGSize can create extra conversion paths
(if known) between various rect/size types. Such extra conversion paths
can make the compiler fail to compile because of ambiguity.

Since conversions between CGRect and CGSize and internal types are lossy
both ways (float <-> int), it's best to avoid them anyway except when
they are really needed so this patch makes the cast operators explicit.

Short term, the implicit conversions break jumbo builds since the compiler
there knows "too much" and gets confused.

Bug: 761475
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I7b29fba20d4dd836015a594081f4e6256bd42732
Reviewed-on: https://chromium-review.googlesource.com/657645
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#500928}
mstensho
Adjustments for LayoutNG in LayoutBlockFlow line layout.
LayoutNG ignores LayoutMultiColumnFlowThread objects, so that the DOM
children of a multicol container become actual layout children of said
multicol container (on the NG side), without any intervening flow
thread block. However, the flow thread is still created even in NG (to
be able to paint and hit-test using the legacy layout structure), so
when NG invokes the legacy engine to lay out lines, we need to be able
to stop walking the ancestry when reaching the flow thread.

This fixes a bunch of crashing tests. They will now either pass or
fail (without crashing) instead.

Bug: 757767
Change-Id: I55693c34aefe53b47ceb7d7490059cc1182e5ff8
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Reviewed-on: https://chromium-review.googlesource.com/660297
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#500925}
bratell
Unduplicated test helper function compare_markers.
The 3 copies of compare_markers collided in jumbo builds.

Bug: 745732
Change-Id: I4363201af5e78dfa5ee59148c48d89feeeaa1a80
Reviewed-on: https://chromium-review.googlesource.com/653277
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#500918}
tsniatowski
PlzNavigate: Fix multiple extra_headers in LoadUrlWithParams
NavigationControllerImpl operates on LoadURLParams, which state
"Extra headers for this load, separated by \n.", and on
NavigationEntryImpl, which state "Extra headers (separated by \r\n)
to send during the request". However, there is no conversion
from one form to the other, instead the extra headers are passed
verbatim.

This is not an issue when PlzNavigate is not enabled, because there
are more conversions on the way to and from the renderer, and things
end up working anyway. However, the shorter path of PlzNavigate
makes code further down choke on improper data when more than one
header is passed.

Fix by converting LF to CRLF when moving from LoadURLParams to
NavigationEntryImpl, and by adding a second header to a bunch of tests
that only sent one extra_header, thus not showing the problem.

BUG=763804

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: I3e492520c8bd059b0d00107b38cfdf6daa8d96f2
Reviewed-on: https://chromium-review.googlesource.com/659577
Commit-Queue: Tomasz Sniatowski <tsniatowski@opera.com>
Reviewed-by: Camille Lamy <clamy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500905}
mstensho
Fix jumbo build.
A static IsPositionValidFor() got added to two .cpp files almost at the same
time. Made them non-static and declared them in Position.h

TBR=rlanday@chromium.org,yoichio@chromium.org

Change-Id: I50d7006b20ddba2b7f58906eb167107cb38933e6
Reviewed-on: https://chromium-review.googlesource.com/659658
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#500887}
bratell
Avoid global "using namespace std"
Importing all of namespaces into the global level causes problems with
jumbo builds (and also coding style). This patch removes a few
using namespace std;
from WTF.

Bug: 761475
Change-Id: Ibdb073db243c960058d06433666f24c6880f40a8
Reviewed-on: https://chromium-review.googlesource.com/657642
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#500877}
bratell
Renamed IsValid in blink/platform/network unit tests
Both ParsedContentDispositionTest and ParsedContentTypeTest used a local
helper function named IsValid. That is normally no big deal
but in jumbo builds they can be compiled in the same translation unit
and then the function will collide. This patch gives the functions
unique names so that no tests have to be excluded from jumbo.

Bug: 745732
Change-Id: Icc591553e54062eb189d8c7df243191c3f75f42a
Reviewed-on: https://chromium-review.googlesource.com/657840
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#500860}
fs
Reevaluate SVGImageElement 'href' when moving to a new document
This aligns the behavior of SVGImageElement to that of HTMLImageElement
for when the element is moved to a new document.

Bug: 720310
Change-Id: I2d78778a40de874fe45b710a0f284ded6cc8b84b
Reviewed-on: https://chromium-review.googlesource.com/657384
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#500655}
mstensho
[LayoutNG] Ignore block-start margin in subsequent fragments.
The block-start margin only matters in the first fragmentainer where the node
occurs. This used to trigger DCHECK failures.

The new unit test used to DCHECK-fail (but would pass with DCHECKs disabled).

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I8ee47f0d08a989f121c5bd8f18806398a4d6d837
Reviewed-on: https://chromium-review.googlesource.com/657182
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#500614}
mstensho
Include ComputedStyle.h from fewer header files.
Brings down the number of translation units that depend on ComputedStyle.h by
268 (from around 1250).

A recent CL, https://chromium-review.googlesource.com/648536 increased the
number of dependent translation units by 222, so this CL should cancel out the
build time slowdown introduced by that CL.

Change-Id: Ic3eef583dd9679c5e5f94d99b5366003f96b89d8
Reviewed-on: https://chromium-review.googlesource.com/656117
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: Jia Meng <jiameng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500553}
bratell
Skip CharCategory alias since it was only used once
The CharCategory alias caused issues with jumbo builds. Too many
different interpretations of the symbol CharCategory triggered
compilation error. Since this alias really doesn't add any value,
it's easy to just drop it.

Bug: 761475
Change-Id: I8473fda6104a520f1464a88d49ba73599ea5fc62
Reviewed-on: https://chromium-review.googlesource.com/654838
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#500548}
rune
Use Previous/NextSibling instead of Slow*Child().
The former methods should be faster.

Change-Id: I1fb5ae5eeaea78b561cffbe6a78594af0f7a75b6
Reviewed-on: https://chromium-review.googlesource.com/655078
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#500402}
fs
Remove unused state from TextTrackLoader
Merge kIdle and kLoading using the name of the latter.

Bug: 466083
Change-Id: I51041fac66a18df6ff0801bcc9606c1f1c04126d
Reviewed-on: https://chromium-review.googlesource.com/652473
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#500382}
bratell
Remove unused "using base::Time"
When experimenting with jumbo builds in content this Time conflicts
with other things, and since it's unused it's easy to just remove it.

Change-Id: I853e2da58963c875158b750839a706e49edad93e
Reviewed-on: https://chromium-review.googlesource.com/653161
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#500370}
mstensho
[LayoutNG] Customized fragment tree dumping, for use in unit tests.
Add a dump method to NGPhysicalFragment that returns a string, in addition to
the one we already have, that dumps to stderr. Add flags, so that callers can
pick exactly what to dump.

Change most of the column layout algorithm tests to compare a fragment dump
tree string to an expectation string. Maintaining and following what was going
on inside those tests was at the brink of what's humanly possible.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I3151509d0cfb189c2330557bf25ef16b1a78f478
Reviewed-on: https://chromium-review.googlesource.com/652467
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500353}
bratell
Avoid the name UnicodeRange in tests since it already exists
There is a platform/fonts type UnicodeRange so creating a function
with the same name causes confusion in jumbo builds where both
the type and the function will be known to the compiler at the same
time.

R=fs@opera.com

Bug: 745732
Change-Id: Id8c9ebfb7289cd546979638814b3e67b169f6671
Reviewed-on: https://chromium-review.googlesource.com/655457
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#500320}
bratell
Deduplicate a couple of hash function in platform/fonts.
In jumbo builds the two implementations of AddToHash and
AddFloatToHash collided. The AddToHash implementations were identical
while AddFloatToHash were slightly different, but it seems better for
everyone to merge them to a single set of functions.

Bug: 761475
Change-Id: I547b432970a4f4f03e2fea7af1e7bfdf400de149
Reviewed-on: https://chromium-review.googlesource.com/651418
Reviewed-by: Dominik Röttsches <drott@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#500297}
bratell
Removing global "using namespace" in platform Mac code
Importing namespaces into the global namespace causes issues in jumbo
builds. This patch removes some that were not even used and replace
some with explicit namespaces.

Bug: 761475
Change-Id: Iaec529e8a4ea8a8572575fb546263946282d1c59
Reviewed-on: https://chromium-review.googlesource.com/654641
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#500296}
bratell
Reuse an existing WebCoreFloatToSkScalar instead of copying it
There is one WebCoreFloatToSkScalar in platform/graphics/skia and one
in platform/geometry. This patch makes platform/geometry use the one in
platform/graphics/skia.

Bug: 761475
Change-Id: I32c938c5d3ea08d2cf3e7bfc2a0ff469006268b0
Reviewed-on: https://chromium-review.googlesource.com/653159
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#500285}
bratell
Merge two implementations of operator<<(FloatPoint3D)
There were two implementations of
TextStream& operator<<(TextStream& ts, const FloatPoint3D& p)
in filter serialization and while that is a minor issue, they caused
conflicts in jumbo builds so rather than excluding files from jumbo,
this moves the implementation to FloatPoint3D.h.

Bug: 761475
Change-Id: I11eee18d33f3eb34b50fb5849bb0e72d6a9a8089
Reviewed-on: https://chromium-review.googlesource.com/651417
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#500252}
fs
Forward-declare TextTrack in HTMLMediaElement.h
Change-Id: I535a633cdb7c31c632b61411bad00e5918d62e6c
Reviewed-on: https://chromium-review.googlesource.com/652548
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#500243}
fs
Empty files should not succeed in loading (as WebVTT)
Empty files will naturally not have a valid signature, so should fail
the signature check. When there's no data, the loader will not get any
DataReceived() callback, and hence not create a VTTParser. The
NotifyFinished() callback only checked for any error on the resource,
and would flag success if there were no resource error.
Check for the presence of a parser to detect the case where there's no
data and infer failure from it.

Also move the flush of the VTTParser first in NotifyFinished() since
it could, in rare cases, end up setting |state_| to kFailed.

Bug: 761969
Change-Id: If6c17d50ec968625a98490e625c5f248761efe1a
Reviewed-on: https://chromium-review.googlesource.com/650291
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499925}
mstensho
[LayoutNG] Skip more virtual test suites.
Test suites that aren't relevant to NG only slow down testing and increase
noise.

TBR=atotic@chromium.org

Change-Id: Ideb731da4441ba839a8d9c19d2fa532c8fd086d1
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Reviewed-on: https://chromium-review.googlesource.com/649655
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499723}
mstensho
NGLayoutAlgorithm::Node() doesn't need to be virtual
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Iddc121dbcf39b0b7381ceb5485606a9a4fea9bdc
Reviewed-on: https://chromium-review.googlesource.com/649654
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499684}
mstensho
[LayoutNG] Position multicol children in the legacy flow thread.
Previously we practically skipped positioning of direct multicol children. We
did actually attempt to position direct *floated* children, but that triggered
a DCHECK failure.

Re-enable and update the remaining disabled NGColumnLayoutAlgorithm unit tests.
They were all about floats, and therefore they used to trigger DCHECK failures.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: If3b1d464501a6132254ed4c016886303f224a4f2
Reviewed-on: https://chromium-review.googlesource.com/649532
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#499675}
mstensho
[LayoutNG] Comma instead of 'x' as separator between coordinates in ToString().
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I96dcb6728816c030fffda7fa67a0a90eb7d1fe5f
Reviewed-on: https://chromium-review.googlesource.com/650255
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499654}
bratell
Enable jumbo compiling for modules unit test (-13 CPU minutes)
When use_jumbo_build=true this patch should save roughly 12.5
CPU minutes on my reference machine.

Bug: 713137
Change-Id: Icaa9e691ca6212f336691755aea83ddbdbe23a18
Reviewed-on: https://chromium-review.googlesource.com/648408
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499651}
fs
Remove residual Skips of WPT tests with absolute path
Absolute paths should be working now.

Bug: 498120
Change-Id: I21c69e34a7f9f17122a631b3e2a154c64974042b
Reviewed-on: https://chromium-review.googlesource.com/650248
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#499599}
bratell
Put local types in the anonymous namespace to be consistent.
BytesConsumerTestUtil.cpp imports BytesConsumer::Result as blink::Result
and BlobBytesConsumerTest.cpp imports BytesConsumer::Result as
blink::{anonymous namespace}::Result and for the Windows compiler that
causes a naming conflict in jumbo builds.

This patch puts both BytesConsumer::Result in the anonymous namespace so
that the compiler won't get confused.

Bug: 745732
Change-Id: I073a36fb71109be2e7fefff34268186d03a5547b
Reviewed-on: https://chromium-review.googlesource.com/649226
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#499595}
rune
Use code path for V1 instead of V0 without shadow trees.
The result should not be different, but this change is using the Shadow
DOM v1 code path for matching CSS rules when we don't have any Shadow
DOM v0 roots. This means we'll use the same code path as we'll use when
Shadow DOM v0 is removed.

Bug: 760405
Change-Id: I90a140db91d1282e59c037a476fef8b95b4e36cc
Reviewed-on: https://chromium-review.googlesource.com/647755
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#499570}
rune
Don't compute pseudo element style on other pseudo elements.
Nested pseudo elements are not allowed. We tried to match selectors for
scrollbar pseudo elements on ::before/::after pseudo elements. This
caused DCHECK failure in v1 shadow dom code trying to find assigned
slot for the ::before/::after pseudo. Instead, return early trying to
compute pseudo element style on pseudo elements.

Bug: 761838
Change-Id: Iaa571c96701ad9f5eb87cb93f0cfb085f42c043e
Reviewed-on: https://chromium-review.googlesource.com/649611
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#499564}
rune
Don't request style on element when pseudo element style is null.
StyleForLayoutObject returns nullptr for ::before and ::after pseudo
elements when the pseudo element should not generate any boxes. This
caused us to incorrectly request OriginStyleForElement as a fall-back
which caused DCHECKs to trigger when trying to match rules against the
PseudoElement.

Instead, call OriginalStyleForElement as a fall-back in
CustomStyleForElement for elements which do have custom style callbacks
but don't need a specialized CustomStyleForElement.

Bug: 760405
Test: shadow-dom/crashes/css-focus-recalc.html
Change-Id: Ib7bcd50fd624f1ebcefc716533cf7098c203a2f4
Reviewed-on: https://chromium-review.googlesource.com/648984
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#499558}
mpichlinski
CHR-6375: [Windows] Fixed crash on fallback from ANGLE to SwiftShader.
During fallback from ANGLE to SwiftShader it is required to unload
ANGLE libraries, otherwise SwiftShader will fail to load its own
libGLESv2.dll.

Fixed ANGLE platform reset.

Bug: 760063
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I02280b2c1cd6c3d81087c7e2befb412bb2a89510
Reviewed-on: https://chromium-review.googlesource.com/640992
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499529}
bratell
Avoid having two g_unique_id in blink/platform
In jumbo builds the two g_unique_id clashed so to avoid having to
exclude one of the files from jumbo builds, it's better to rename them.

With this patch they will be g_unique_media_stream_component_id and
g_unique_media_stream_descriptor_id instead. As a bonus that should help
when analyzing binaries if anyone ever encounter these symbols.

Bug: 761475
Change-Id: Ib6c7120a4ff428bceaf1197441c1d8e271b63d18
Reviewed-on: https://chromium-review.googlesource.com/648409
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499518}
bratell
Avoid using "using namespace ..." in global scope
With jumbo (unity builds, merged translation units) a
"using namespace WTF" or "using namespace Unicode"
statement intended for just the local translation unit will affect
many other translation units which causes various issues.

There is also (with the current implementation of jumbo) a warning
about such usage that will prevent things from compiling.

Without this patch this file will have to be manually excluded from
jumbo builds and I am trying to avoid such exclusion lists for
performance and maintenance.

Bug: 761475
Change-Id: Ide7c7f90b2b2190362f279008e31dfcc31309ad7
Reviewed-on: https://chromium-review.googlesource.com/648407
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#499517}
mstensho
[LayoutNG] Proper overflow legacy write-back inside multicol.
Only calculate overflow when at the last fragment. It's only then that we can
be sure that all children have been laid out. This used to trigger DCHECK
failures in legacy layout.

Also don't let a line break fool us into believing that the block fragmented
(by creating unfinished break tokens).

Re-enable and update unit test OverflowedBlock, now that overflow no longer
causes DCHECK failures in legacy layout.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I9a104c3a7392db66c251e6f8da8ea8c7e16ba357
Bug: 757767
Reviewed-on: https://chromium-review.googlesource.com/645968
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499503}
mstensho
[LayoutNG] Skip assorted virtual test suites.
They don't seem relevant for NG.

TBR=atotic@chromium.org

Change-Id: Id701e9773cee3737cceb46440704125b9c9178e0
Reviewed-on: https://chromium-review.googlesource.com/647760
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#499495}
fs
Support all of HTML's character entities in WebVTT
This updates the VTTTokenizer to align with the updated WebVTT tokenizer
steps:

 https://w3c.github.io/webvtt/#html-character-reference-in-data-state

and

 https://w3c.github.io/webvtt/#html-character-reference-in-annotation-state

The old states for handling "escapes" are removed, adding new ones per
above, for invoking the HTML parser's entity matcher.
A new WEBVTT_SWITCH_TO operation is also added so that state transitions
can be performed without advancing the input position. (Matches
mechanics of the HTML parser.)

The WPT test webvtt/parsing/cue-text-parsing/tests/entities.html is
updated since it had an incorrect expected result for the "&notit;"
case.

Old, now incorrect and/or redundant, tests for entities are removed.

Bug: 761303
Change-Id: I8ffb4fb2da7169c2ba3c84eb8c3206daabefbb30
Reviewed-on: https://chromium-review.googlesource.com/647586
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#499473}
bratell
Removing unused "using namespace icu".
Having global "using namespace ..." complicates things, or prevents,
jumbo builds but this one seems completely unused anyway.

Bug: 761475
Change-Id: I592035ec4030b575acbdbcf9ca11b24217380ed5
Reviewed-on: https://chromium-review.googlesource.com/647567
Commit-Queue: Kent Tamura <tkent@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499433}
karlo
Add NG support for quirky bottom margins plus minor fix for top margins.
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Ib3b5e035955c0d1379f7c206ef283934a2c31eae
Reviewed-on: https://chromium-review.googlesource.com/645988
Commit-Queue: Karl Anders Øygard <karlo@opera.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499406}
rune
Removed svg/as-image/svg-nested.html
The test is creating a 50000 nodes deep tree which at some point causes
a stack overflow in one of the recursive methods traversing the DOM
tree. Removing test as it arbitrarily causes a stack overflow.

Bug: 760904
Change-Id: Ib1b841a51cbe383bc630ca57b3dd07c8c859cee0
Reviewed-on: https://chromium-review.googlesource.com/647536
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#499392}
bratell
Deduplicated the Determinant function in platform/geometry.
Both FloatQuad and FloatPolygon wants to calculate the
determinant/cross product between two FontSize objects and they each
had a copy of such a function. In Jumbo builds those two identical symbols
collided.

Bug: 761475
Change-Id: I216b0ec2bf6fdb450ef81315692396fc395c3d6e
Reviewed-on: https://chromium-review.googlesource.com/647847
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499322}
bratell
Undef local CONVOLVE_ONE_SAMPLE after use.
Since other code use equally named macros we get jumbo build collision
unless they are undefined (or renamed).

Bug: 761475
Change-Id: I650fe9651a55e9fd682340f6160e2212de024f58
Reviewed-on: https://chromium-review.googlesource.com/647715
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Raymond Toy <rtoy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499264}
bratell
Adding missing include guard on blink header
VideoFrameResourceProvider.h was missing an include guard which happened
to work in normal builds, but not in jumbo builds.

R=haraken@chromium.org, lethalantidote@chromium.org

Change-Id: I72b9c9343ce6862f26d2ae89beaf3af3b084e0ed
Reviewed-on: https://chromium-review.googlesource.com/647538
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#499206}
mstensho
[LayoutNG] Update FlagExpectations for LayoutNG
Just skip virtual/outofblink-cors/

TBR=atotic@chromium.org

Change-Id: Iaf28ead83625b01b1017f2a3cd2029299ed61b54
Reviewed-on: https://chromium-review.googlesource.com/645952
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Aleks Totic <atotic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499180}
ptworek
Rename ArrayBufferContents::AllocationKind to GetAllocationKind.
Current name clashes with the name of the enum class the function is
supposed to return. Clang does not care, but gcc fails to compile the
code.

Bug: 760070
Change-Id: I935d91493a3fc7b289d03f776c14b6ec4f3f622a
Reviewed-on: https://chromium-review.googlesource.com/645549
Reviewed-by: Yuta Kitamura <yutak@chromium.org>
Commit-Queue: Yuta Kitamura <yutak@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499171}
bratell
Add include guards to ipc message headers
The solution without include guards isn't compatible with jumbo.

Bug: 746953
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Iaaea9654fa2c38c40ab458678693518abe555d34
Reviewed-on: https://chromium-review.googlesource.com/580868
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#499162}
rune
Update :in-range/:out-of-range style when input type changes.
The :in-range/:out-of-range pseudo classes only matches for steppable
input typesi. We need to schedule style invalidations for these pseudo
classes when the input changes and at least one of them is steppable.
Changing between two steppable types may also need invalidation as
min/max/value need to be reparsed and their value may not be valid or
their interpretations may be different.

Bug: 751406
Change-Id: I0dc6517ded832fdaa63f1a3bdda161dcf2b3b448
Reviewed-on: https://chromium-review.googlesource.com/646327
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#499158}
rune
Update :indeterminate style when input type changes.
The :indeterminate pseudo class only matches for certain input types.
We need to schedule style invalidations for :indeterminate when the
input changes between certain types.

Bug: 751406
Change-Id: I4cae67ce883ec0969119f788718db8b978f9a67d
Reviewed-on: https://chromium-review.googlesource.com/646168
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#499157}
rune
Update :checked style when input type changes.
The :checked pseudo class only matches for certain input types. We need
to schedule style invalidations for :checked when the input changes
between certain types.

Bug: 751406
Change-Id: I818b498339a643766e0c619cb6b70bfd09c6efcb
Reviewed-on: https://chromium-review.googlesource.com/645987
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#499156}
mstensho
Min-width takes precedence over max-width.
This also applies to intrinsic sizing, obviously. Clamp to max-width, THEN
min-width - not the other way around.

Bug: 754263
Change-Id: Ide083d3ba591b252cd1bfa28500be3c3c2324d79
Reviewed-on: https://chromium-review.googlesource.com/645306
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#499024}
fs
Make SMIL interval position calculations more resilient
When 'dur' is mutated, all dependent state is not updated at once, but
rather lazily. This means that we can get into an inconsistent state
where some timing parameters have been applied while some have not, and
code that uses - and thus realizes - the state changes will be first to
observe them. This can for instance lead to an interval position of NaN
being computed, which would wreak havoc when computing values.

For the specific case, we'd first get an 'indefinite' simple duration
and compute an interval thereafter. When 'dur' is then modified to a
finite value the simple duration will not be updated until the next
frame is computed (triggered by mutation of 'end'), leaving us with
a valid/finite simple duration but an infinite interval. (This then
results in arithmetic with Inf, yielding a NaN value for |percent|.)

Properly updating all the interval computation state on mutations is a
somewhat involved task, so paper over it for now by computing the (last)
active duration differently depending on the case we're in. While this
change is a bit of a workaround, it should be a perfectly reasonable
change on its own.

Bug: 760057
Change-Id: I1878f06db500eb1251ef2ca1cd7f10e0c8f86a00
Reviewed-on: https://chromium-review.googlesource.com/645973
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#498911}
mstensho
[LayoutNG] Skip siblings preceding the first break token.
When we resume layout in a next fragmentainer, assume that all siblings
preceding the one associated with the first break token have been finished.
Assuming the opposite - that all preceding siblings needed layout - caused
infinite loops.

Example:
<div style="columns:5; column-fill:auto; height:60px;">
    <div id="child1" style="height:100px;"></div>
    <div id="child2" style="height:100px;"></div>
</div>

After the first column, we'll have an unfinished break token for #child1, which
is what we'll resume with in the second column.
After the second column, we'll have a finished break token for #child1 and an
unfinished break token for #child2.
After the third column, we'll only have an unfinished break token for #child2,
since we skipped #child1 (it was finished).
The fourth column obviously only contains #child2. We shouldn't start at
#child1 just because it has no break token, or we'll get an infinite loop.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I845a75bb646615223f9acfcc51e2fab04b05b058
Bug: 757767
Reviewed-on: https://chromium-review.googlesource.com/639410
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498817}
tmoniuszko
Add missing gurl.h include to sensor_permission_context.cc
Bug: 
Change-Id: I2988959a20acd595e046574773101b12135d0f1b
Reviewed-on: https://chromium-review.googlesource.com/640383
Reviewed-by: Raymes Khoury <raymes@chromium.org>
Commit-Queue: Tomasz Moniuszko <tmoniuszko@opera.com>
Cr-Commit-Position: refs/heads/master@{#498777}
rune
Setup AttachContext correctly when attaching pseudo elements.
AttachContext.previous_in_flow was not set up correctly when attaching
pseudo elements. That caused incorrect whitespace attachment in some
cases. In order to do this, the AttachContext for children is set up in
Element instead of ContainerNode as ::before and ::after are attached
in Element before/after ContainerNode::AttachLayoutTree.

I have separated the creation and attachment of pseudo elements.
CreatePseudoElementIfNeeded now only creates the pseudo element.
Previously pseudo elements were sometimes attached as part of style
recalc, at which point we don't have a previous_in_flow to pass in.
This is also good for our goal of separating style recalc and layout
tree construction completely.

We still create pseudo elements when attaching a layout tree if these
pseudo elements are inside a subtree being (re-)attached. When we start
constructing ComputedStyle for elements in sub-trees being re-attached
in RecalcStyle instead of LayoutTreeBuilder, we can fully rely on
pseudo elements being generated for RecalcStyle.

The modified test expectations are actually a revert of what was
changed when landing the WhitespaceAttacher.

Bug: 759532
Change-Id: Ic9f0f61d8c78bc8df7c5e589444a54583c78d763
Reviewed-on: https://chromium-review.googlesource.com/643269
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#498767}
mstensho
[LayoutNG] Update FlagExpectations for LayoutNG
TBR=eae@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I91ac1b71748f838b922d3e93ba59aa9d17b39bff
Reviewed-on: https://chromium-review.googlesource.com/643070
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#498488}
mstensho
Fix Jumbo build.
InspectorCacheStorageAgent.cpp has recently got a "using" declaration of
blink::protocol::CacheStorage::Header, and that collided with the
forward-declaration of blink::Header FetchHeaderList.h. Just remove the
forward-declaration. It looks like there's no class named Header in this
district anymore.

TBR=hiroshige@chromium.org

Change-Id: I54e5f7ff3b53a388930b1101417e0dc1fa46af2b
Reviewed-on: https://chromium-review.googlesource.com/643127
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#498439}
fs
Don't rely on the cached 'local' flag when resolving <use> target
Since the document URL can change between a <use> 'href' is set, and the
actual element reference is resolved (looked up by id), the notion of
being "local" to the document can change during this window as well.
To avoid this, we need to re-evaluate the "is local" state before
resolving the element reference. This appears to match what other UAs
are doing (but they could/do differ in other ways.) Keep the cached
"is local" state and use where applicable to avoid the full URL compare.

Bug: 749855
Change-Id: Ibbe9b1fb7e37f86b57f775d288203fbd9b3d5f4e
Reviewed-on: https://chromium-review.googlesource.com/641459
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498433}
rune
No need for forced SetStyleInternal for unchanged ComputedStyle.
This was done to avoid use of out-dated ComputedStyle from the style
sharing cache.

Also, removed unnecessary DCHECKs for style sharing sanity and fixed a
comment.

Bug: 721517
Change-Id: I3a4117328b7a62dac84ef3e81017702f6f40315b
Reviewed-on: https://chromium-review.googlesource.com/628519
Reviewed-by: nainar <nainar@chromium.org>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#498417}
rune
Invalidate matched properties cache when registering custom properties.
Not forcing SetStyleInternal in Element::RecalcOwnStyle triggered a
DCHECK fail for (!!value == !!parsed_value) in
SetResolvedInheritedVariable(). We were hitting the matched properties
cache to re-use the custom properties from the style recalc before and
after property registration. The property registration made the custom
property value invalid due to the given syntax.

It's possible this should be detected as a style propagation change in
RecalcOwnStyle (ComputedStyle::operator==), but clearing the matched
properties cache seemed like a good idea since all style is
recalculated on property registration anyway.

This CL is split out of:

https://chromium-review.googlesource.com/c/chromium/src/+/628519/

Test: custom-properties/registered-property-cssom.html
Change-Id: I593f2fa1be788ce00872d46356924f6f5415174e
Reviewed-on: https://chromium-review.googlesource.com/635565
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#498393}
mstensho
[LayoutNG] Move column layout algorithm tests to a separate file.
FragmentChildIterator and ConstructBlockLayoutTestConstraintSpace() are needed
by both block and column layout algorithm tests, so they needed a new home. Put
them in ng_base_layout_algorithm_test.h

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I664c1f0a7b04e6096b25bfff344f0ebae9fa1bd0
Reviewed-on: https://chromium-review.googlesource.com/641150
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#498162}
bratell
Be more specific about namespace for Message in unit tests
There is a gtest namespace ::testing and a helper namespace in blink
called ::blink::testing. If both are visible to the compiler,
::blink::testing will be used first and classes in ::testing will not
be found. This happens in jumbo builds so we better be more specific.

R=haraken@chromium.org

Bug: 
Change-Id: I611b7afde07fb217978e90cf041e89ce7634fb8e
Reviewed-on: https://chromium-review.googlesource.com/640699
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#498080}
rune
Missing comparison of timing functions for style recalc.
TransitionsMatchForStyleRecalc and AnimationsMatchForStyleRecalc did
not compare timing functions. Move common timing comparison into the
CSSTimingData class and add a test for timing functions.

This was discovered trying to remove a SetStyleInternal hack from

Element: :RecalcOwnStyle().
Change-Id: I11edf92a63653e44ca6384523d0dd4da7786dc25
Reviewed-on: https://chromium-review.googlesource.com/635723
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#498047}
mstensho
[LayoutNG] Make percent sizing work through anonymous constraint spaces.
Re-enable a unit test that now passes again. Also fixes a layout test.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Ic1d15dccaefc5773ae4305771808d328548007b4
Reviewed-on: https://chromium-review.googlesource.com/637910
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498034}
mstensho
Revert "Locate the correct flow thread for spanners and out-of-flow objects."
This reverts commit b71ac55bffca1c376d6ed4e540194436daccfbd1.

Reason for revert: Opened up a can of worms. Re-seal it.

Original change's description:
> Locate the correct flow thread for spanners and out-of-flow objects.
> 
> LayoutFlowThread::LocateFlowThreadContainingBlockOf() used to just
> give up if the nearest ancestor flow thread of some object wasn't the
> containing flow thread.
> 
> The machinery that maintains the special-objects
> (LayoutMultiColumnSet, LayoutMulticolumnSpannerPlaceholder) for
> multicol still needs to ignore out-of-flow objects and spanners,
> though, so I moved the check for this from
> LocateFlowThreadContainingBlockOf() to
> FlowThreadDescendantWasInserted() and
> FlowThreadDescendantWillBeRemoved().
> 
> Checking on the paint side whether page logical height is known is
> no longer necessary.
> 
> Bug: 757947
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> Change-Id: Ief0492e9de52b01b08c3bc0318cb3c8abe67ccd3
> Reviewed-on: https://chromium-review.googlesource.com/632057
> Reviewed-by: Emil A Eklund <eae@chromium.org>
> Commit-Queue: Morten Stenshorne <mstensho@opera.com>
> Cr-Commit-Position: refs/heads/master@{#497437}

TBR=mstensho@opera.com,robhogan@gmail.com,eae@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 757947
Change-Id: Idf54d6cea2c03871c3a3443880f6b5b331cd7d30
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Reviewed-on: https://chromium-review.googlesource.com/637870
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#497791}
rune
Support ::before and ::after pseudo elements after ::slotted.
Allow pseudo elements after ::slotted() pseudo elements to allow for
scopes to which an element has been slotted to generate ::before /
::after pseudo elements.

The scoping spec[1] allows tree-abiding[2] pseudo elements after
::slotted. This CL adds support for ::before and ::after.

[1] https://drafts.csswg.org/css-scoping/#slotted-pseudo
[2] https://drafts.csswg.org/css-pseudo-4/#treelike

Bug: 754081
Change-Id: I95d91ea06d8fa75537cf8c845da477b2fb034a7d
Reviewed-on: https://chromium-review.googlesource.com/616042
Commit-Queue: Rune Lillesveen <rune@opera.com>
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497742}
mstensho
Include less from LayoutUnit.h.
This header is included in about 4500 compilation units.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Icd9996f634899877c84e130f67fdf497a01734a0
Reviewed-on: https://chromium-review.googlesource.com/635726
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#497563}
mstensho
[LayoutNG] Copy multicol layout back to the LayoutObject tree.
Stitch fragments generated from the same layout input node
together, so that the flow thread based multicol implementation
in legacy layout can perform painting, hit-testing and other
layout tree read operations like before.

The position will only be updated when at the first fragment for
each node. The position of subsequent fragments are only relevant
to LayoutNG. For legacy layout they just contribute to the
block-size of the LayoutObject. Currently, the position will
still be mostly wrong, unless the object starts in the first
column.

One change to the break tokens was necessary: the final break
token also needs to set its used block size, just like the
preceding tokens, so that clients can tell that it's not the
first fragment of some node.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I4a1491262bb5a5284abfa27695ed90beb620a56d
Reviewed-on: https://chromium-review.googlesource.com/634223
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497478}
mstensho
Locate the correct flow thread for spanners and out-of-flow objects.
LayoutFlowThread::LocateFlowThreadContainingBlockOf() used to just
give up if the nearest ancestor flow thread of some object wasn't the
containing flow thread.

The machinery that maintains the special-objects
(LayoutMultiColumnSet, LayoutMulticolumnSpannerPlaceholder) for
multicol still needs to ignore out-of-flow objects and spanners,
though, so I moved the check for this from
LocateFlowThreadContainingBlockOf() to
FlowThreadDescendantWasInserted() and
FlowThreadDescendantWillBeRemoved().

Checking on the paint side whether page logical height is known is
no longer necessary.

Bug: 757947
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ief0492e9de52b01b08c3bc0318cb3c8abe67ccd3
Reviewed-on: https://chromium-review.googlesource.com/632057
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#497437}
landell
Emacs jade rebranded to indium
Bug: 
Change-Id: Iff92857fcf7ef95578687dacb9309fcfad331e6d
Reviewed-on: https://chromium-review.googlesource.com/631720
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#497072}
mstensho
Reland "Reland "[LayoutNG] Bring back native support for multicol.""
This is a reland of 3bb64d0c55ed57a6522cc09f5be97be220c81fc0
Original change's description:
> Reland "[LayoutNG] Bring back native support for multicol."
> 
> This is a reland of b7e830ddf678c7daaa41a982fad87156b1bbbe4b
> Original change's description:
> > [LayoutNG] Bring back native support for multicol.
> > 
> > Still missing: Copy data back into the LayoutObject tree.
> > 
> > Some layout tests now fail, since we're not using the legacy engine to lay out
> > multicol. Quite a few crash or freeze, too.
> > 
> > Also brought back some of the unit tests. They needed some changes, because of
> > the following:
> > 
> > 1. We now create a fragment for each column, from an anonymous constraint
> > space. I.e. we have one more level of fragments, and it's the column fragments
> > that have their inline offset shifted to the correct column, rather than
> > setting it on the first child block, which is what we did last time these tests
> > worked.
> > 
> > 2. Mistakes introduced when converting test to using setBodyInnerHTML() rather
> > than building the layout trees programmatically:
> > https://codereview.chromium.org/2725773002
> > 
> > 3. New bugs. :)
> > 
> > Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
> > Change-Id: I4df85d684f0ddb8f7f0f75d15230a1ab61e9f9a0
> > Reviewed-on: https://chromium-review.googlesource.com/591429
> > Commit-Queue: Morten Stenshorne <mstensho@opera.com>
> > Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
> > Reviewed-by: Emil A Eklund <eae@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#496446}
> 
> TBR=eae@chromium.org,ikilpatrick@chromium.org
> 
> Change-Id: I479ea313e9ca9a56bdbbcad009a4c1b18a8b9e63
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
> Reviewed-on: https://chromium-review.googlesource.com/627358
> Commit-Queue: Morten Stenshorne <mstensho@opera.com>
> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
> Reviewed-by: Koji Ishii <kojii@chromium.org>
> Reviewed-by: Morten Stenshorne <mstensho@opera.com>
> Cr-Commit-Position: refs/heads/master@{#496814}

TBR=eae@chromium.org,ikilpatrick@chromium.org

Change-Id: Ic81481d78f216e45d437968090f76479326ad708
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Reviewed-on: https://chromium-review.googlesource.com/631816
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#497061}
mstensho
[LayoutNG] Update FlagExpectations for LayoutNG
TBR=eae@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I187593e14a27bf76957055cceb0ec00cf3fae65d
Reviewed-on: https://chromium-review.googlesource.com/631776
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#497023}
rune
Remove Internals.isStyleSharing().
Not in use and style sharing is removed.

Bug: 721517
Change-Id: I9eb72320ba001102f4c29f22240cf9dbd3a4f460
Reviewed-on: https://chromium-review.googlesource.com/628520
Reviewed-by: nainar <nainar@chromium.org>
Reviewed-by: meade_UTC10 <meade@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#496957}
mstensho
Reland "[LayoutNG] Bring back native support for multicol."
This is a reland of b7e830ddf678c7daaa41a982fad87156b1bbbe4b
Original change's description:
> [LayoutNG] Bring back native support for multicol.
> 
> Still missing: Copy data back into the LayoutObject tree.
> 
> Some layout tests now fail, since we're not using the legacy engine to lay out
> multicol. Quite a few crash or freeze, too.
> 
> Also brought back some of the unit tests. They needed some changes, because of
> the following:
> 
> 1. We now create a fragment for each column, from an anonymous constraint
> space. I.e. we have one more level of fragments, and it's the column fragments
> that have their inline offset shifted to the correct column, rather than
> setting it on the first child block, which is what we did last time these tests
> worked.
> 
> 2. Mistakes introduced when converting test to using setBodyInnerHTML() rather
> than building the layout trees programmatically:
> https://codereview.chromium.org/2725773002
> 
> 3. New bugs. :)
> 
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
> Change-Id: I4df85d684f0ddb8f7f0f75d15230a1ab61e9f9a0
> Reviewed-on: https://chromium-review.googlesource.com/591429
> Commit-Queue: Morten Stenshorne <mstensho@opera.com>
> Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
> Reviewed-by: Emil A Eklund <eae@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#496446}

TBR=eae@chromium.org,ikilpatrick@chromium.org

Change-Id: I479ea313e9ca9a56bdbbcad009a4c1b18a8b9e63
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Reviewed-on: https://chromium-review.googlesource.com/627358
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#496814}
mstensho
[LayoutNG] Update FlagExpectations for LayoutNG
TBR=eae@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Ib177fd2754c2f05d7d7765e7599e6e6bb5d4ceab
Reviewed-on: https://chromium-review.googlesource.com/628878
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#496740}
mstensho
[LayoutNG] Update FlagExpectations for LayoutNG
TBR=eae@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I3c0967138e9f7dd81d052f2f5117ba815ad3249c
Reviewed-on: https://chromium-review.googlesource.com/626296
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#496640}
rune
Remove style sharing workaround from StyleInvalidator.
Style sharing is no longer present in the codebase, so the SetStyle /
LocalStyleChange should no longer be necessary here.

Bug: 721517

Change-Id: I0437f3c3c3188101299b053d81b36a7542baf610
Reviewed-on: https://chromium-review.googlesource.com/625880
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#496597}
mstensho
[LayoutNG] Bring back native support for multicol.
Still missing: Copy data back into the LayoutObject tree.

Some layout tests now fail, since we're not using the legacy engine to lay out
multicol. Quite a few crash or freeze, too.

Also brought back some of the unit tests. They needed some changes, because of
the following:

1. We now create a fragment for each column, from an anonymous constraint
space. I.e. we have one more level of fragments, and it's the column fragments
that have their inline offset shifted to the correct column, rather than
setting it on the first child block, which is what we did last time these tests
worked.

2. Mistakes introduced when converting test to using setBodyInnerHTML() rather
than building the layout trees programmatically:
https://codereview.chromium.org/2725773002

3. New bugs. :)

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I4df85d684f0ddb8f7f0f75d15230a1ab61e9f9a0
Reviewed-on: https://chromium-review.googlesource.com/591429
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496446}
rune
Removed leftover FIXME for whitespace attachment.
WhitespaceAttacher now handles this properly and it's done as part of
layout tree building, not style recalc.

Change-Id: I0fd970c86425c155429c008afdf280866b539a72
Reviewed-on: https://chromium-review.googlesource.com/626301
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#496438}
mstensho
Saturated arithmetic when calculating multicol preferred widths.
With sufficiently large column-gap and high enough column-count, we'd
integer-overflow and end up with a negative gap_extra result, which is a value
that contributes to the preferred min/max preferred logical widths (which
therefore also could become negative). Let all values involved be of type
LayoutUnit, so that we get saturated arithmetic enabled.

Bug: 743230
Change-Id: I06d7d8f9c1214af35faf0b52f1652fc626cd67ef
Reviewed-on: https://chromium-review.googlesource.com/625624
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496329}
mstensho
[LayoutNG] Update FlagExpectations for LayoutNG
TBR=eae@chromium.org

Change-Id: Ic03560b8ed7ceb89c9bf746c04320b6c655ca1b2
Reviewed-on: https://chromium-review.googlesource.com/625918
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#496293}
fs
Setting DOMMatrix.m33 or m44 to 1 should preserve is2D
Per [1], setting a value other than one (1) should clear the is2D flag.
We had the logic reversed.

[1] https://drafts.fxtf.org/geometry/#dommatrix-attributes

Bug: 756789
Change-Id: I37fcd4e20fedee6ba29bb164e81cdf324971f9a1
Reviewed-on: https://chromium-review.googlesource.com/623410
Commit-Queue: Dominic Cooney <dominicc@chromium.org>
Reviewed-by: Dominic Cooney <dominicc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496224}
mstensho
[LayoutNG] Clean up #includes.
NGLayoutResult needs to know about NGUnpositionedFloat, and
NGUnpositionedFloat needs to know about NGLayoutResult, so some
forward-declaring is necessary, to avoid circular dependencies.

Also got a dependency on the rather heavy ComputedStyle out of a header
file.

Change-Id: I8f35bbb48bf39118abf093d8ffb6c8a44545ca57
Reviewed-on: https://chromium-review.googlesource.com/623651
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496008}
rune
Let LayoutView::StyleWillChange handle viewport invalidation.
Make sure we only do a single SetStyle for viewport ComputedStyle
to which we propagate certain documentElement/body styles. That way we
can do style invalidation diffing on SetStyle. The invalidation will
now be done on LayoutView::StyleWillChange instead of invalidating
LayoutView from LayoutBox::StyleWillChange for documentElement and body
changes.

The LayoutView invalidation does still use a limited repaint based on
propagated background changes.

Bug: 755539

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I629098e0073827513801311b730c62fc98079db4
Reviewed-on: https://chromium-review.googlesource.com/609984
Commit-Queue: Rune Lillesveen <rune@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495573}
rune
Check for HasNormalColumnGap() for LayoutView style changes.
PropagateStyleToViewport() propagated the absolute length of column-gap
only, and did not consider the "normal" keyword value. A change between
0 and "normal" was not detected as a change, hence the pages were not
laid out with the new value.

Bug: 756423
Change-Id: Idfe6c34b2e88fb741f25950c6d5a79290e33b728
Reviewed-on: https://chromium-review.googlesource.com/618926
Commit-Queue: Rune Lillesveen <rune@opera.com>
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#495256}
ckulakowski
Add missing dependency to //base for target device_monitors
Because of lack of this dependency Build sometimes fails because of
missing file base/debug/debugging_flags.h:

[2017-08-17 10:18:12] [526/33287] CXX
obj/media/device_monitors/device_monitors/system_message_window_win.obj
[2017-08-17 10:18:12] >>BUILDBOT>>errors>>compile>>
[2017-08-17 10:18:12] FAILED:
obj/media/device_monitors/device_monitors/system_message_window_win.obj
[2017-08-17 10:18:12] ninja -t msvc -e environment.x64 --
c:\buildbot\clcache\bin/gomacc.exe "c:\program files (x86)\microsoft
visual studio 14.0\vc\bin\amd64/cl.exe" /nologo /showIncludes
@obj/media/device_monitors/device_monitors/system_message_window_win.obj.rsp
/c ../../media/device_monitors/system_message_window_win.cc
/Foobj/media/device_monitors/device_monitors/system_message_window_win.obj
/Fd"obj/media/device_monitors/device_monitors_cc.pdb"
[2017-08-17 10:18:12] CLCache Error: Failed to process compiler output
[2017-08-17 10:18:12] >>BUILDBOT>>errors>>compile>>
[2017-08-17 10:18:12] ../..\base/debug/stack_trace.h(14): fatal error
C1083: Cannot open include file: 'base/debug/debugging_flags.h':
No such file or directory

Bug: 756401
Change-Id: I5468361db2558e082828eaba81458039167e6ab1
Reviewed-on: https://chromium-review.googlesource.com/618571
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495240}
mstensho
[LayoutNG] Remove test failure expectation, now that they apparently pass.
One test doesn't fail anywhere. Three other tests only fail on Mac.

Change-Id: I799cfdac2f3ea32f5fde97957a7053bfd0146195
Reviewed-on: https://chromium-review.googlesource.com/616730
Reviewed-by: Aleks Totic <atotic@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#495191}
rune
Only need to repaint background for color changes with no image.
Implement a VisuallyEqual for backgrounds because computed style
comparison would trigger unnecessary repaints when background image
related properties changed when there were no images.

Bug: 754685
Change-Id: I4c687426905e9687b298549b3015ac1207dbbc17
Reviewed-on: https://chromium-review.googlesource.com/612089
Reviewed-by: meade_UTC10 <meade@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#494738}
mstensho
When main axis is logical y, lay out flex items before getting intrinsic size.
There's no other way to figure out an object's intrinsic logical height, than
to lay it out. We cannot use the logical height we found in the previous layout
pass as intrinsic size.

Bug: 752078
Change-Id: Ibfd9426752ea8489256ac40f0c16e1a31a74a377
Reviewed-on: https://chromium-review.googlesource.com/612179
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Rune Lillesveen <rune@opera.com>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#494488}
rune
Removed unused InheritColumnPropertiesFrom.
Change-Id: I39641a2c8fe9045ba3611050c03fd909d18b9ef4
Reviewed-on: https://chromium-review.googlesource.com/613161
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#494086}
ingemara
Remove ignore_manifest in android_aar_prebuilt
Manifest merging is now supported! \o/

Bug: 643967
Change-Id: I460e4635fc2dc34592f50aed03f4056a5f402364
Reviewed-on: https://chromium-review.googlesource.com/567078
Reviewed-by: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Ingemar Ådahl <ingemara@opera.com>
Cr-Commit-Position: refs/heads/master@{#494041}
rune
Propagate style to viewport after style recalc.
Since we are now propagating up to the viewport style and don't do any
inheritance after propagation, we can postpone the propagation until
after the style recalc has finished. That means we only have to call
StyleForElement on html and body elements once. It also means we can
remove the code to clear animation update from
InheritHtmlAndBodyElementStyles().

InheritHtmlAndBodyElementStyles() has been renamed to
PropagateStyleToViewport() which better explains what the method does.

The rem unit style recalc still needs to be triggered right after the
documentElement has been recalculated, but that code is moved to
the StyleEngine called from Element::RecalcOwnStyle().

Change-Id: I3850aee300aa31174f022581e615e5d66205d674
Reviewed-on: https://chromium-review.googlesource.com/608028
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#493348}
mstensho
[LayoutNG] Place the root fragment.
All fragments but the root one are already placed by the fragment builder, when
walking through the children of a node. However, the fragment established by
the root node was left unplaced.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I8233b49f271034d6af8b19ebf3fd59b226b59065
Reviewed-on: https://chromium-review.googlesource.com/602207
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#492946}
rune
Apply :placeholder-shown and :read-write changes on input type change.
Whether :placeholder-shown, :read-only, and :read-write matches an html
input element depends on its type. Apply changes on type attribute
changes accordingly.

The placeholder text and visibility had to be updated sychronously,
otherwise the pseudo invalidation happens before the placeholder
visibility update as part of layout tree attachment.

Bug: 751406
Change-Id: Ic5bf1c62073cdf2648dfbf7876828323fecfe4be
Reviewed-on: https://chromium-review.googlesource.com/605252
Commit-Queue: Rune Lillesveen <rune@opera.com>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492935}
rune
No need for recalc on viewport propagation.
Before the fix for issue 732349, we relied on propagation from body to
viewport to affect the computed style of the root element which was
handled through a subtree recalc after viewport propagation. This is no
longer necessary. In fact, when rtl was specified on body, but the
computed style of html was ltr, InheritHtmlAndBodyElementStyles would
always trigger a subtree recalc, which would happen every frame we had a
style recalc.

There's a hope this will fix performance issue 739133.

I think that InheritHtmlAndBodyElementStyles can be made into a
PropagateStyleToViewport method which can be called at the end of
style recalc to avoid calculating html and body style twice. I'll try
to do that in a separate CL.

Bug: 739133
Change-Id: I0beebcf850661434eedb8bd19405698c27b7ae89
Reviewed-on: https://chromium-review.googlesource.com/606007
Commit-Queue: Rune Lillesveen <rune@opera.com>
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#492889}
mstensho
[LayoutNG] Physical fragment tree dump support.
Call NGPhysicalFragment::ShowFragmentTree() to dump the fragment tree.
The solution is inspired by NGLayoutInputNode::ShowNodeTree().

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Ie256d74bb80f2be5f372ec57791b693e4f5bdeaf
Reviewed-on: https://chromium-review.googlesource.com/602227
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#492575}
ingemara
Remove redundant GMS version meta-data
The <meta-data> is merged into the final apk manifest from dependency
manifests.

//third_party/android_tools:google_play_services_basement_java provides
the manifest and accompanying resource value.

Bug: 643967
Change-Id: I09590a6c060e4e92c45e928ad57d64546d90f7e3
Reviewed-on: https://chromium-review.googlesource.com/567138
Reviewed-by: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Commit-Queue: Ingemar Ådahl <ingemara@opera.com>
Cr-Commit-Position: refs/heads/master@{#492568}
rune
Evaluation of :required and :optional changes on input type changes.
If an input element changes to or from hidden in the presence of a
"required" attribute, the evaluation of :required and :optional will
change. Schedule invalidation sets to update computed style
appropriately.

Bug: 751406
Change-Id: I64ccaaa58067594e4a150f80fe73aaf4c9f93c83
Reviewed-on: https://chromium-review.googlesource.com/602027
Commit-Queue: Rune Lillesveen <rune@opera.com>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492304}
mstensho
[LayoutNG] Remove NGPhysicalFragment::NGFragmentType from NGFragmentBuilder.
It was always kFragmentBox, even for inline layout, so it was meaningless.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: If03b39b4315b8165045488901dbd67225ff54e8a
Reviewed-on: https://chromium-review.googlesource.com/602245
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#492292}
rune
Add tests for scroll direction of propagated writing-mode from body.
Change-Id: Ief891686240dcf4c30012b6282b1616de0500878
Reviewed-on: https://chromium-review.googlesource.com/602240
Reviewed-by: Koji Ishii <kojii@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#492254}
rune
Support unclosed parentheses at end of sizes attribute.
Instead of returning false, match unclosed left-parentheses and
function tokens. Fixes eight cases in the WPT.

Bug: 749381
Change-Id: I7b3f061ee026be1da9ab377488f83007a2a0689d
Reviewed-on: https://chromium-review.googlesource.com/599851
Reviewed-by: Renée Wright <rjwright@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#492235}
mstensho
Don't #undef STATIC_ASSERT_ENUM.
Causes problems for Jumbo builds.

TBR=nverne@chromium.org

Change-Id: If4a37cff9ae787ec0c750b652663fd2d8d6b1a66
Reviewed-on: https://chromium-review.googlesource.com/598090
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Nicholas Verne <nverne@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Nicholas Verne <nverne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491391}
mstensho
Need to #define EXPECT_RECT_EQ in a header file.
Multiple definitions in various .cpp files causes problems for Jumbo builds.

TBR=chrishtr@chromium.org

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I907fc4bbba428de44579c9466a8884270102483b
Reviewed-on: https://chromium-review.googlesource.com/598070
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Chris Harrelson <chrishtr@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#491389}
rune
Remove rulesets used for style sharing.
After style sharing code is removed, we no longer need the sibling and
uncommon attribute rulesets to reject style sharing. This also means
RuleFeatureSet no longer needs to be traced, so some oilpan cruft could
be removed.

The StyleEngine API UsesSiblingRules() relied on the size of the sibling
ruleset, but it was only used as what looked like an optimization for
:empty selector updates where :empty is found in non-rightmost compound
selectors. However, the presence of :empty itself would add a sibling
selector in the previous code, and :empty in non-rightmost compound not
followed by an adjacent selector would only have de-generate cases like
":empty span" which could never match anything, or ":not(:empty) span"
which would always be true if the whole selector matches. Therefore, it
makes sense to just drop the API/check.

Bug: 721517
Change-Id: I85100850cb8cec56b17947916d7755ebcf3f15ec
Reviewed-on: https://chromium-review.googlesource.com/597689
Reviewed-by: nainar <nainar@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#491344}
rune
Remove stats for style sharing.
Style sharing code is removed and these stats will always be 0.

Bug: 721517
Change-Id: Iae76778bd564ad22645d3d14709c1d8d13d796c6
Reviewed-on: https://chromium-review.googlesource.com/595744
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#490984}
rune
Remove ununsed kSharingMode selector matching.
After style sharing code was removed, this mode is no longer in use.

Bug: 721517
Change-Id: Ia0997792f5641b722d86922f40d631613552c137
Reviewed-on: https://chromium-review.googlesource.com/595728
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Rune Lillesveen <rune@opera.com>
Cr-Commit-Position: refs/heads/master@{#490958}
sigbjornf
Retire sigbjornf@ ownerships.
TBR=haraken,jochen
NOTRY=true

Change-Id: I764c7f96d306867c8fd0e1dda4f498bfc1285f87
Reviewed-on: https://chromium-review.googlesource.com/593310
Reviewed-by: Sigbjørn Finne <sigbjornf@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Sigbjørn Finne <sigbjornf@opera.com>
Cr-Commit-Position: refs/heads/master@{#490722}
mstensho
[LayoutNG] MultiColumnFragmentainerGroup needs to know its height.
Otherwise DCHECKs will fail when attempting certain read operations on the
legacy layout tree.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I8f09461bf7404aab1ef9a369380542759bb05a53
Reviewed-on: https://chromium-review.googlesource.com/591567
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#490657}
tmoniuszko
Fix truncation from 'double' to 'float' warning in resource_prefetch_predictor.cc
Bug: 
Change-Id: I56e4ef0806162bb42bfc9edf47e8810499737ad6
Reviewed-on: https://chromium-review.googlesource.com/591367
Reviewed-by: Egor Pasko <pasko@chromium.org>
Commit-Queue: Egor Pasko <pasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490382}
mstensho
[LayoutNG] HandleInflow() return a bool rather than WTF::Optional<>.
This way we won't need previous_inflow_position in Layout() to be optional, and
it makes the code more readable, and possibly more efficient too.

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Id42f5b950cf2edec646d5bf8b594b8d4b9948449
Reviewed-on: https://chromium-review.googlesource.com/590427
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490364}
karlo
InlineBlockBaseline() and friends now return LayoutUnit instead of int.
Add support for floating point baselines.  This patch retains integer
calculations for font ascender/descender, to avoid impacting too many
web pages.  Line painting is rounded to CSS pixels at the paint stage.

BUG=617763

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I15850c55d54fbb0c885d4040be3c90ea2a51d7ca
Reviewed-on: https://chromium-review.googlesource.com/543141
Commit-Queue: Karl Anders Øygard <karlo@opera.com>
Reviewed-by: Javier Fernandez (OOO till Aug 4th) <jfernandez@igalia.com>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490327}
hugoh
Fix crash in spatnav when <area> looses its connected <img>
BUG=747734
TEST=See above clusterfuzz bug for repro steps.

Change-Id: I9d2ee28c7dab9e5f9af875e3011b1d0acb13ae29
Reviewed-on: https://chromium-review.googlesource.com/586589
Reviewed-by: Takayoshi Kochi <kochi@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: Hugo Holgersson <hugoh@opera.com>
Cr-Commit-Position: refs/heads/master@{#490049}
mstensho
[LayoutNG] Reduce variable span, for increased readability.
Also changed the child loop from "while" to "for".

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: Iabca756c82281525818f1d5f3f31613679bae211
Reviewed-on: https://chromium-review.googlesource.com/584755
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#489991}
mstensho
Rename duplicate MockWebFrameClient classes.
Caused trouble for Jumbo builds, all of a sudden.

TBR=bokan@chromium.org

Change-Id: I226e3b78c4abe008765123c21ed72868ea3f9f4b
Reviewed-on: https://chromium-review.googlesource.com/588908
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#489888}
sigbjornf
Remove sigbjornf@ from blink_dom watchlist.
TBR=tkent
NOTRY=true

Change-Id: Id8d1ff08ae2065243894803ece9e0b5da9b131d7
Reviewed-on: https://chromium-review.googlesource.com/588089
Reviewed-by: Sigbjørn Finne <sigbjornf@opera.com>
Commit-Queue: Sigbjørn Finne <sigbjornf@opera.com>
Cr-Commit-Position: refs/heads/master@{#489876}
mstensho
Let CalculatePaginationStrutToFitContent() figure out the strut all on its own.
Remove the strut_to_next_page parameter, and let it calculate it on its own.

This is a preparatory patch for supporting repeated table footers. That will
break the "space left" == "pagination strut" invariant. Actually, this wasn't
truly an invariant even prior to this CL, because the next fragmentainer isn't
necessarily tall enough to hold the content (which will result in a pagination
strut larger than the amount of remaining space).

No behavior changes intended.

Change-Id: I4f3499d969d6f128077e281f2dd45826cd6d83fc
Reviewed-on: https://chromium-review.googlesource.com/583619
Commit-Queue: Robert Hogan <robhogan@gmail.com>
Reviewed-by: Robert Hogan <robhogan@gmail.com>
Cr-Commit-Position: refs/heads/master@{#489780}
bratell
Change jumbo chunk separation to ignore headers
Since jumbo chunks were divided before headers were filtered out, the
actual chunk sizes were not deterministic and much smaller than expected.

This patch filters headers first, and halves the chunk size to get the same
actual chunks.

Bug: 747368
Change-Id: Ia537af07f7226a87d8de1309bf494914789609e4
Reviewed-on: https://chromium-review.googlesource.com/581289
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#489598}
hugoh
Do not show I-beam when hovering 'user-select: none'
All elements now have 'user-select: auto' as their default
value (not 'user-select: text').

Spec: https://drafts.csswg.org/css-ui-4/#propdef-user-select

This default value has no effect; elements are styled as usual.
This is important because Blink needs a "no change" default
to be able to find cases where 'user-select' should affect
mouse pointer styling.

BUG=742235
TEST=EventHandlerTest.ChildCanOverrideUserSelectText
     EventHandlerTest.HitOnUserSelectNoneDoesNotShowIBeam
     EventHandlerTest.ShadowChildCanOverrideUserSelectText

Above 3 tests failed before this patch.

Change-Id: I1ed0ad69daf6a1a1bd4b21623fcdb145ef596d88
Reviewed-on: https://chromium-review.googlesource.com/570246
Commit-Queue: Hugo Holgersson <hugoh@opera.com>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: nainar <nainar@chromium.org>
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489363}
mstensho
Explicit namespace ::testing, to not confuse it with blink::testing
This fixes a merge mistake at
https://chromium-review.googlesource.com/c/519168/25/third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp

That CL overwrote parts of https://codereview.chromium.org/2970833002 ,
which broke Jumbo compilation.

BUG=739121

Change-Id: I486a2c49032ffeef2bd81d5e230a9f9cf81b646f
Reviewed-on: https://chromium-review.googlesource.com/582611
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#489050}
gianlucac
Fix parsing of $GTK_MODULES
The AtkUtilAuraLinux::Initialize function checks whether accessibility
should be enabled. To do so, it calls PlatformShouldEnableAccessibility,
which parses the content of the environment variable GTK_MODULES. This
variable contains a list of colon-separated modules; the function parses
it as it were a whitespace-separated list, looking for a module called
`gail:atk-bridge`, while in fact, the module to look for is
`atk-bridge`. On systems having a more complex content for GTK_MODULES
(mine is `gail:atk-bridge:unity-gtk-module`), the parse fails, and the
initialization aborts.

Bug: 747393
Change-Id: I17d82331af1d117d0ed70520b4367c5915037316
Reviewed-on: https://chromium-review.googlesource.com/582807
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489022}
mstensho
Revert "Make border width rounding visible to js via getComputedStyle."
This reverts commit e87da780e04bf05f5ae863d7fda517ee6c03d534.

Reason for revert: This fix is a spec violation, and the previous behavior was more correct. A slightly inaccurate representation (off by less than 0.02px) is better than clamping it to 1px.

Original change's description:
> Make border width rounding visible to js via getComputedStyle.
> 
> CL (https://chromium-review.googlesource.com/c/525536/) moved rounding of border 
> widths to the painting stage, hence rounding is no longer visible in js via 
> getComputedStyle. This cl makes rounding visible again to users via getComputedStyle.
> 
> This cl contains the following changes
> * Implemented a ZoomAdjustedPixelValueWithRounding method.
> - This method is the same as ZoomAdjustedPixelValue except that it
> rounds pixel value to 1 if original value is between 0 and 1.0.
> * Changed ComputedStyle for border-[top|right|bottom|left] to use
> ZoomAdjustedPixelValueWithRounding so that getComputedStyle will
> display rounded pixels for these properties (and also border-width that
> is a shorthand of these 4 longhand properties).
> * Changed a layout test.
> 
> Bug: 737962
> Change-Id: I0656f7ea1212fe32f866d95218995fb3de109e05
> Reviewed-on: https://chromium-review.googlesource.com/560917
> Commit-Queue: Jia Meng <jiameng@chromium.org>
> Reviewed-by: Alan Cutter <alancutter@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#487384}

TBR=alancutter@chromium.org,jiameng@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 737962
Change-Id: I03120da255990456614ffc3e0e3180eaa20a566a
Reviewed-on: https://chromium-review.googlesource.com/582608
Reviewed-by: Morten Stenshorne <mstensho@opera.com>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#488947}
bratell
Make sure CSSPropertyIdMap knows the CSSPropertyID traits.
CSSPropertyID has some custom traits and without knowing them the
HashTable will not be compiled as intended. This was noticed through
a warning in jumbo builds about the traits being instantiated implicitly
before they were instantiated explicitly (in a specialization).

R=haraken@chromium.org

Bug: 747408
Change-Id: I2dea24bec17c8d071cbe60e443834d440eebfb2a
Reviewed-on: https://chromium-review.googlesource.com/581447
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#488861}
mstensho
Always relayout when an object gets or loses a PaintLayer.
This rids us of some crufty code, and also fixes bugs. The approach was also
broken for multicol, because we started UpdatePaginationRecursive() in the
middle of the tree without looking for a containing flow thread (pagination
layer). This would result in the new layer erroneously not becoming paginated.

Also had to update a unit test, to satisfy its requirement that the style change
won't trigger layout.

BUG=616596

Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I50ed61a7174e360259b7b786bab01cf74616fc32
Reviewed-on: https://chromium-review.googlesource.com/542915
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Steve Kobes <skobes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488768}
bratell
Deduplicated 3 JSON string constants, "null", "true" and "false"
Both JSONParser and JSONValues use constants for the strings
"null", "true" and "false". That is probably no problem since the
linker will merge identical strings, but since the constants had
the same names as well they caused collisions in jumbo builds.

This patch makes JSONParser use the JSONValues constants.

Change-Id: I27b01b354aa9cfeab0f8c636f22ecfbc2762a6bc
Reviewed-on: https://chromium-review.googlesource.com/577552
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#488654}
bratell
Fix compilation for ATK (accessibility)
A variable wasn't given the right name inside the ATK support when
a patch consolidated 3 AX properties into single restrictions
property for accessibility objects.

R=aleventhal@chromium.org, jochen@chromium.org

Change-Id: I0c82e055e39614110cfc4f7a7299d226bd4e6ad2
Reviewed-on: https://chromium-review.googlesource.com/580927
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#488630}
bratell
Renamed CreateDecoder helper functions in Image decoder tests
All image decoder test have a helper function "CreateDecoder" which
conflicts in jumbo builds where the tests are merged. This patch renames
them "CreateBMPDecoder", "CreateJPEGDecoder" and so on.

Bug: 745732
Change-Id: I2cfd108c39ade76a09059d77778557ab44b82752
Reviewed-on: https://chromium-review.googlesource.com/576098
Reviewed-by: Noel Gordon <noel@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#488407}
bratell
Support jumbo builds in core unit tests (except editing)
This patch makes the build system for core unit tests support jumbo
builds (unity builds) which saves roughly 60 CPU minutes (5% of the
build time) on my computer. Currently jumbo is by default disabled so
this will have no direct effect unless you have
  use_jumbo_build = true
in your gn settings.

Bug: 713137
Change-Id: I376e62fb66738cba9135d02f8079d983cfe67495
Reviewed-on: https://chromium-review.googlesource.com/575055
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#488238}
bratell
Make blink/modules support jumbo compilations (-60 CPU minutes)
Compiling browser code in blink/modules currently use
about 80 CPU minutes. That is about 7% of the total compilation time.
If you use jumbo compilation (merge many files into a single
translation unit) that time drops to about a fifth of that.

There are also unit_tests in modules that will be jumbofied in
a different patch.

Bug: 713137
Change-Id: I9155d2af0c9dce6b3178f77b9366062eb45d4560
Reviewed-on: https://chromium-review.googlesource.com/568302
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#488179}
mstensho
Include less from platform/graphics/Image.h
Change-Id: I00ae6625688bb740ecf0235c98e25f41296b359f
Reviewed-on: https://chromium-review.googlesource.com/553298
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Cr-Commit-Position: refs/heads/master@{#487925}
bratell
Avoid using the name Function since it collides with WTF::Function
If a class named Function is created and the header
platform/wtf/Functional.h included, any attempt at using WTF::Function
will fail with a lot of strange template instantiation errors.

This can happen unexpectedly in jumbo builds so to avoid that error
this patch renames a testing class that used to be 
named Function, ReaderFunction.

R=fs@opera.com

Bug: 746343
Change-Id: I498ecf4f8cb293de634c40060a2df34c78a23e09
Reviewed-on: https://chromium-review.googlesource.com/574864
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#487870}
bratell
Make multiple jumbo_* templates instead of just jumbo_target
Initially there was just one template, jumbo_target, but that
caused problems with default configurations and also made every
patch one line more verbose than necessary. Better to have multiple
templates and make the usage just a little bit simple.

Bug: 713137
Change-Id: I7e2b1f0c5216b4465bae331763d6aa5a08e1c996
Reviewed-on: https://chromium-review.googlesource.com/575058
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487823}
bratell
Deduplicate CreateIDBValue() used in indexeddb unit_tests
IDBRequestTest and IDBTransactionTest both had an identical helper
function CreateIDBValue. In jumbo builds those identical functions
collided so this patch moves the code to a shared helper file.

Bug: 745732

Change-Id: I36c658509c76deca4e03590858140e02a07f38d3
Reviewed-on: https://chromium-review.googlesource.com/575145
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487547}
bratell
Avoid "using namespace blink" in global scope
With jumbo (unity builds, merged translation units) a "using blink"
statement intended for just the local translation unit will affect
many other translation units which causes various issues.

There is also (with jumbo) a warning about such usage that will prevent
things from compiling.

Without this patch this file will have to be manually excluded from
jumbo builds and I am trying to avoid such exclusion lists for
performance and maintenance.

Review-Url: https://codereview.chromium.org/2965323002
Cr-Commit-Position: refs/heads/master@{#487501}
bratell
Made test class names unique in media_controls unit tests
MediaControlsImplTest and MediaControlsOrientationLockDelegate use the
same class names for Mock classes. Such as MockChromeClient and
StubLocalFrameClient. That is normally no big deal but in jumbo builds
they can be compiled in the same translation unit and then the classes
will collide. This patch gives the class names unique suffixes so that
media_controls tests don't have to be excluded from jumbo.

Bug: 745732

Change-Id: I6c3a4d5d92ae690ece53aa093ffb4039eb79137e
Reviewed-on: https://chromium-review.googlesource.com/575140
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487485}
bratell
Renamed MockEventListener in presentation and remoteplayback unit tests
Both PresentationReceiverTest and RemotePlaybackTest use a local test
class named MockEventListener. That is normally no big deal
but in jumbo builds they can be compiled in the same translation unit
and then the classes will collide. This patch gives the classes
unique prefixes so that no tests have to be excluded from jumbo.

Bug: 745732

Change-Id: Ic9a5e4e896b226d5ef7f99f2549cd3d4bb66fc42
Reviewed-on: https://chromium-review.googlesource.com/575141
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487479}
bratell
Renamed MockWebAudioDevice in webaudio unit tests
Both AudioContextTest and BaseAudioContextTest use a local test
class named MockWebAudioDevice. That is normally no big deal
but in jumbo builds they can be compiled in the same translation unit
and then the classes will collide. This patch gives the classes
unique prefixes so that no tests have to be excluded from jumbo.

Bug: 745732

Change-Id: Ie736a0541082c56af745d51061897a081d2d1da5
Reviewed-on: https://chromium-review.googlesource.com/575142
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487475}
bratell
Made constant names unique in notification unit tests
NotificationDataTest, NotificationImageLoaderTest and
NotificationResourceLoaderTest all use constants, such as kBaseDir,
with the same name. That is normally no big deal but in jumbo builds they
can be compiled in the same translation unit and then the constants
will collide. This patch gives the constants unique prefixes so that
the tests don't have to be excluded from jumbo.

Change-Id: Ib01d88e75cdc876a58c52a6ee3b49a942ccb19ab
Reviewed-on: https://chromium-review.googlesource.com/576088
Reviewed-by: Peter Beverloo <peter@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487458}
bratell
Renaming unit_test class MockHTMLResourcePreloader to not collide.
CSSPreloadScannerTest and HTMLPreloadScannerTest
both use a local MockHTMLResourcePreloader class for
testing. That is normally no big deal but in jumbo builds they
can be compiled in the same translation unit and then the classes
will collide. This patch gives the classes unique prefixes.

R=fs@opera.com

Change-Id: I29cd360e919c6b708a6021b6930b3347e5ae8194
Reviewed-on: https://chromium-review.googlesource.com/574707
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487242}
bratell
Renaming unit_test class MockLocalFrameClient to not collide.
Both FrameFetchContextTest and MixedContentCheckerTest deckare a class
named MockLocalFrameClient. That is normally no big deal
but in jumbo builds they can be compiled in the same translation unit
and then the functions will collide. This patch adds a prefix to
the class names to make them more unique.

R=fs@opera.com

Change-Id: I215f7edafa2fa0b229dc5847a1e158df825e8c27
Reviewed-on: https://chromium-review.googlesource.com/574708
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487140}
bratell
Renaming unit_test class StubLocalFrameClient to not collide.
ElementVisibilityObserverTest, HTMLMediaElementEventListenersTest and
VideoPainterTest all use a local StubLocalFrameClient class for
testing. That is normally no big deal but in jumbo builds they
can be compiled in the same translation unit and then the classes
will collide. This patch gives the classes unique prefixes.

R=fs@opera.com

Change-Id: I47c7088486456e22ca776419a836f4e5d18be39c
Reviewed-on: https://chromium-review.googlesource.com/574605
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487122}
mstensho
Include less from Color.h
Moved the rarely used Blend() overload to a new file ColorBlend.h,
since it requires heavy stuff to be included.

This change caused Image.h to lose its inclusion of FloatSize.h. Removed the
default value from a FloatSize parameter.

Change-Id: I9b32e425c86b237b4c3a69ec53e601faa713f56f
Reviewed-on: https://chromium-review.googlesource.com/553139
Commit-Queue: Morten Stenshorne <mstensho@opera.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487119}
bratell
Use more unique names for blink core TestCase classes
It is fairly common to have a help struct with test data and a fair
portion of the code call that struct TestCase and put it in a fairly
global namespace. In jumbo builds those structs will collide so this
patch renames them to more specific names such as
MediaQuerySetTestCase or SizesCalcTestCase.

R=fs@opera.com

Change-Id: Ic02ef5062782a0ec3862ad3bffdc462574ca8a61
Reviewed-on: https://chromium-review.googlesource.com/574600
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487114}
bratell
Renaming unit_test class MockValidationTestClient to not collide.
Both DocumentTest and HTMLFormControlTest uses a local
MockValidationTestClient class for testing. That is normally no big deal
but in jumbo builds they can be compiled in the same translation unit
and then they will collide. This patch gives the classes unique
prefixes.

R=fs@opera.com

Change-Id: If1f2d22fca4c5f7b3ad662f6ae746cef4baf48c3
Reviewed-on: https://chromium-review.googlesource.com/574174
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#487091}
bratell
Renaming unit_test class MockChromeClient to not collide.
LocalFrameViewTest, HTMLVideoElementPersistentTest and
PaintLayerScrollableTests all use a local MockChromeClient class for
testing. That is normally no big deal but in jumbo builds they
can be compiled in the same translation unit and then the classes
will collide. This patch gives the classes unique prefixes.

R=fs@opera.com

Change-Id: Ibd6c9d17e1e8dfbe42cbb254344e52a81ce48788
Reviewed-on: https://chromium-review.googlesource.com/574176
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#487090}
bratell
Avoid using "using" in global scope
"using namespace" in global scope introduces a lot of symbols into the
current scope and does not work well with jumbo. In case of WTF you
can also equally well just write a WTF:: prefix.

Bug: 
Change-Id: Id615f60151e0bc46cfe2a5e9a6a9313c412f1344
Reviewed-on: https://chromium-review.googlesource.com/570446
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487076}
bratell
Renaming unit_test function ConstructConstraintSpace to not collide
ng_block_layout_algorithm_test and ng_constraint_space both use a local
function ConstructConstraintSpace for testing. That is normally
no big deal but in jumbo builds they can be compiled in
the same translation unit and then the functions will collide.
This patch gives the functions unique names.

R=fs@opera.com

Change-Id: I3941094aad201b7ec6796d63664da8cfba8056c3
Reviewed-on: https://chromium-review.googlesource.com/574237
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487072}
bratell
Move unit_test *_EQ macros to a shared file instead of repeating them
There are several classes in frame which have use of for instance
EXPECT_POINT_EQ and EXPECT_SIZE_EQ. The problem (beyond duplicating
code) is that in jumbo builds those defines collide.

This patch moves the shared macros to core/frame/FrameTestHelpers.h.

There are also equally named macros in cc/test/geometry_test_utils.h
but those work on gfx::Rect/gfx::RectF which is not quite API 
compatible (different character case).

R=fs@opera.com

Change-Id: I60cb7eff533e4dccc796937a027ec090071cd5c2
Reviewed-on: https://chromium-review.googlesource.com/574179
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#487071}
bratell
Be more specific about namespace for _ in unit tests
There is a gtest namespace ::testing and a helper namespace in blink
called ::blink::testing. If both are visible to the compiler,
::blink::testing will be used first and classes in ::testing will not
be found. This happens in jumbo builds so we better be more specific.

R=fs@opera.com

Change-Id: I4da27383432226191b0fcb72f3c54784698f0262
Reviewed-on: https://chromium-review.googlesource.com/574488
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487070}
bratell
Add support for jumbo_component.
Normal jumbo_target has the wrong default configs for components so this
adds a new jumbo_component that has the right default configs.

Bug: 713137
Change-Id: I32fd2d015162d85b7ff07d5515489b9e33cfb987
Reviewed-on: https://chromium-review.googlesource.com/571790
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487068}
bratell
Deduplicate helper class SampleInterpolation in unit tests
Both InterpolableValueTest and InterpolationEffectTest use an
identical class for value testing. These classes collided in jumbo
builds where they were compiled in the same translation unit.

This patch moves the class to AnimationTestHelper.h and changes its
name to be more descriptive now when it isn't as close to where it
is used anymore.

Also changing the name of the kDuration constant that interfered
with blink::kDuration.

R=fs@opera.com

Change-Id: Ic90cec2972f5464d7932b2ba91994273968e87c4
Reviewed-on: https://chromium-review.googlesource.com/574489
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487067}
bratell
Renaming unit_test classes Mock* to not collide
IdleDeadlineTest and ScriptedIdleTaskControllerTest both use similarly
names mock classes, MockScheduler, MockThread and MockPlatform which
collide in jumbo builds where they are merged into the
same translation unit.

This patch gives the classes unique names.

R=fs@opera.com

Change-Id: I305cb3fbdfbd3b3b6fc7c18e8c3ceccf89da863e
Reviewed-on: https://chromium-review.googlesource.com/574487
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487066}
bratell
Renaming unit_test class MockCanvas to not collide.
PageOverlayTest and PrintContextTest both use a local mock
test class named MockCanvas for testing. That is normally
no big deal but in jumbo builds they can be compiled
in the same translation unit and then the classes
will collide. This patch gives the classes unique names.

R=fs@opera.com

Change-Id: Icfcb2b4b553e50e08cb6ac56712e4e9aa5f2b69e
Reviewed-on: https://chromium-review.googlesource.com/574349
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487065}
bratell
Avoiding redefining LineBreakType in unit_tests.
There is blink enum class LineBreakType used to correctly layout text.
That makes it unsuitable to use the same name in a unit_test since they
may collide, and actually will collide in jumbo builds.

This patch changes LineBreakType to NewlineType

R=fs@opera.com

Change-Id: I3c5ae6ea5b6e199990c8b51c3a55eb1d17a8f19e
Reviewed-on: https://chromium-review.googlesource.com/574238
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487064}
bratell
Renaming unit_test functions Ident and Dimension to not collide.
CSSTokenizerTest already uses functions named Ident and Dimension so to
avoid special casing in jumbo builds where the tests are compiled
together, rename them here.

R=fs@opera.com

Change-Id: I6b600c269463d897b6d56287e450e37d027b2911
Reviewed-on: https://chromium-review.googlesource.com/574173
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487058}
bratell
Renaming unit_test class TestParam to not collide.
HTMLMediaElementTest and MediaCustomControlsFullscreenDetectorTest
both use a local TestParam struct/enum for testing.
That is normally no big deal but in jumbo builds they
can be compiled in the same translation unit and then the classes
will collide. This patch gives the classes unique prefixes.

R=fs@opera.com

Change-Id: I17a4d3a25e38bc0789071fcec31b066a385d34a0
Reviewed-on: https://chromium-review.googlesource.com/574178
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487057}
bratell
Renaming unit_test function RegisterMockedURLLoad to not collide.
There is a shared RegisterMockedURLLoad in URLTestHelpers and a couple of
local ones imported with "using" or locally declared. That is
normally no big deal but in jumbo builds they
can be compiled in the same translation unit and then the functions
will collide. This patch removes a "using" and renames a function
to make the names more unique.

R=fs@opera.com

Change-Id: I6866f13bd1903e42269b7286645a9f07396b68a8
Reviewed-on: https://chromium-review.googlesource.com/574180
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487056}
bratell
Renaming unit_test class PreconnectTestCase to not collide.
HTMLResourcePreloaderTest and HTMLPreloadScannerTest
both use a local PreconnectTestCase struct for
testing. That is normally no big deal but in jumbo builds they
can be compiled in the same translation unit and then the classes
will collide. This patch gives the classes unique prefixes.

R=fs@opera.com

Change-Id: I99f315843fd6908ba94595e852e6c1fac6acdedb
Reviewed-on: https://chromium-review.googlesource.com/574177
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Reviewed-by: Yoav Weiss <yoav@yoav.ws>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487053}
bratell
Avoid using the function name Function in unit_tests.
There is a ::Function template in wtf/Functional.h and if someone else
defines a function with the same name that template will be harder to
use. This is more of a problem in jumbo builds where more code is
visible so that both the definitions becomes visible at the same time.

R=fs@opera.com

Change-Id: I0be2f2e2441f3e5db0049f65e1b4c0be8997d586
Reviewed-on: https://chromium-review.googlesource.com/574028
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487050}
bratell
Be more specific about namespace for Message in unit tests
There is a gtest namespace ::testing and a helper namespace in blink
called ::blink::testing. If both are visible to the compiler,
::blink::testing will be used first and classes in ::testing will not
be found. This happens in jumbo builds so we better be more specific.

R=fs@opera.com

Bug: 
Change-Id: I912ed721a0ccae7b8e8b622020f87f15204362cf
Reviewed-on: https://chromium-review.googlesource.com/574027
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#487049}
mostynb
don't forget to actually return the number of specified test jobs
BUG=741927,743615
TEST=Running browser_tests with the flags below, should print "Using 1 parallel jobs."
--run-manual --ui-test-action-max-timeout=350000 --test-launcher-jobs=1 --test-launcher-bot-mode --test-launcher-print-test-stdio=always
TBR=phajdan.jr@chromium.org

Change-Id: I33f2b4fc54b43ebec8a27c532da17146b42c07cd
Reviewed-on: https://chromium-review.googlesource.com/573380
Reviewed-by: Mostyn Bramley-Moore <mostynb@opera.com>
Commit-Queue: Mostyn Bramley-Moore <mostynb@opera.com>
Cr-Commit-Position: refs/heads/master@{#487014}
bratell
Use more unique names in fonts testcases
Many fonts tests use local helper classes TestRun, ExpectedRun and
helper macros DECLARE_RUNSVECTOR and CHECK_RUNS. With jumbo builds
those names start colliding so this patch gives the classes and
macros a prefix related to the actual test.

Change-Id: I494cfc182070ae37a87b68f08303fc8cc3ef9cfe
Reviewed-on: https://chromium-review.googlesource.com/570424
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486866}
bratell
Explicit template forward declaration for platform/fonts
Doing an implicit template instantiation before doing an explicit
template instantiation in the same translation unit is a C++
violation. That happens if you jumbo compile blink platform but is
easy to avoid with a forward declaration such as the one this patch
adds.

Change-Id: I7b22e28b2bf8f2583598e97db69d68fa1613550e
Reviewed-on: https://chromium-review.googlesource.com/570444
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486858}
bratell
Unduplicate SkiaScalarToHarfBuzzPosition
There were two implementation of SkiaScalarToHarfBuzzPosition and
in jumbo builds they collided. This patch merges them.

Bug: 
Change-Id: Ibea7aeffbfdf77eb3fd088949f912eb41e56c462
Reviewed-on: https://chromium-review.googlesource.com/570428
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486856}
bratell
blink/platform: Be explicit about namespace testing to not mix it with blink::testing
There are two namespaces named testing used in Blink unit tests, one
from gtest and one internal helper namespace. If both are visible then
the gtest testing namespace won't be used unless prepended with ::, as
is already done in large parts of the code.

BUG=739121
R=haraken@opera.com

Change-Id: I48f6a3145886253576a53d1ad9c08307ceca0d52
Reviewed-on: https://chromium-review.googlesource.com/567143
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Bratell <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#486839}
bratell
Remove some jumbo exclusions no longer needed
The files listed in core_generated jumbo exclusions have since been
fixed so the exclusions are no longer necessary.

R=fs@opera.com

Bug: 713137
Change-Id: Ib9a9216147e9df7d8b196de761556d3f23997448
Reviewed-on: https://chromium-review.googlesource.com/571222
Commit-Queue: Daniel Bratell <bratell@opera.com>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#486804}
bratell
Merge the two identical To16Bit functions in font tests
There are two very small, identical, To16Bit functions in
font shaping tests. Since they caused collisions in jumbo builds and
I didn't want to exclude the files from jumbo files I've merged them
into a utilities file.

Bug: 
Change-Id: I0c7e7d4ee708431a6401de7a01790f78c4e75e08
Reviewed-on: https://chromium-review.googlesource.com/570426
Commit-Queue: Emil A Eklund <eae@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486794}
mostynb
--gtest_filter should only change NumParallelJobs' default value
BUG=741927,735587

Change-Id: Ib95bd85e2f1ad14e27ba8fa76f8b52f8e137e830
Reviewed-on: https://chromium-review.googlesource.com/569159
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Commit-Queue: Mostyn Bramley-Moore <mostynb@opera.com>
Cr-Commit-Position: refs/heads/master@{#486773}
bratell
Clean out some "using namespace WTF".
Some global "using namspace WTF" caused problems with jumbo builds
and since WTF is also meant to be used without using namespace WTF
this patch just replaces them with explicit namespaces.

Bug: 
Change-Id: Ifc06e163c095de0e2ce5a8c69123578557ef0dee
Reviewed-on: https://chromium-review.googlesource.com/565413
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: bratell at Opera <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#486735}
bratell
Fix error in error message concatenation in jumbo script.
Best to not try to add a string to a set without converting the set to
a string first.

R=dpranke@chromium.org

Bug: 713137
Change-Id: Id4c632b1f944fcafdd046983b1ddd4678c44928f
Reviewed-on: https://chromium-review.googlesource.com/564939
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Commit-Queue: bratell at Opera <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#486706}
bratell
Rename 5*ExtraDataContainer to SomethingExtraDataContainer
There are five different classes in
third_party/WebKit/Source/platform/exported named ExtraDataContainer.
They are only used as local internal classes so they don't normally
collide in the compiler, but they do so in jumbo builds.

This patch renames them so that the names are more unique.

Bug: 742337
Change-Id: Iad42e0d29f600fabd6ea9081687a7107d3043282
Reviewed-on: https://chromium-review.googlesource.com/570052
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: bratell at Opera <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#486481}
bratell
Rename the two different TestClient classes in fetch unit tests
In jumbo the two different TestClient classes clashed so this patch
renames them to not collide so that these files can be included in
jumbo compilations.

R=tyoshino@chromium.org

Bug: 
Change-Id: Ieea187ba6928df04df0059ad357730d7a82022bc
Reviewed-on: https://chromium-review.googlesource.com/570040
Commit-Queue: bratell at Opera <bratell@opera.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Takeshi Yoshino <tyoshino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486367}
bratell
Let there be only one global class Result in fetch unit tests
Both BytesConsumer::Result and WebDataConsumerHandle::Result are
imported into global/blink namespace in fetch unit tests. That causes
collisions in jumbo builds so this removes the
WebDataConsumerHandle::Result in that namespace.

R=tyoshino@chromium.org

Bug: 
Change-Id: I52f860aa4ccd59b4be944f950c25797022582b68
Reviewed-on: https://chromium-review.googlesource.com/570042
Reviewed-by: Takeshi Yoshino <tyoshino@chromium.org>
Commit-Queue: bratell at Opera <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#486346}
bratell
Reduce the number of MockClient classes in fetch unit tests
Jumbo builds had the three different MockClient classes colliding. This
patch renames two of them so that they will not collide.

R=tyoshino@chromium.org

Change-Id: Ib646bdb3ed4e08cbf28b736a67d4fcb3646ede00
Reviewed-on: https://chromium-review.googlesource.com/570043
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Takeshi Yoshino <tyoshino@chromium.org>
Commit-Queue: bratell at Opera <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#486344}
bratell
Merge three identical ToString implementations in fetch unit tests
In jumbo builds the ToString implementations collided and since they
are identical anyway, this patch just merges them to one implementation.

R=tyoshino@chromium.org

Bug: 
Change-Id: I379a6e7bf759e12ae6f37347e8e2e80154a1079b
Reviewed-on: https://chromium-review.googlesource.com/570039
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Takeshi Yoshino <tyoshino@chromium.org>
Commit-Queue: bratell at Opera <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#486343}
bratell
Make the fetch unit test Command class not collide.
In jumbo builds the two Command classes in fetch unit_tests would collide
since they are both imported into the same global/blink scope with
"using" statements. This patch changed the "using" statements to give
the classes different names.

R=tyoshino@chromium.org

Bug: 742239
Change-Id: I37a783755049ff36ebd63f6b432a0e07bce4a4db
Reviewed-on: https://chromium-review.googlesource.com/570018
Commit-Queue: bratell at Opera <bratell@opera.com>
Reviewed-by: Takeshi Yoshino <tyoshino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486342}
fs
Deflake two tests in svg/animations/mozilla/
Pause the timeline after adjusting the current time, similarly to how
it's done in other tests in this directory and in other places. This
avoids flakiness due to the timing of the first frame differing from
that of the 'load' event.

TBR=schenney@chromium.org
BUG=726362,742068

Change-Id: Id9753fc1d5b53a389a59f9b8f36a8965fb9597d0
Reviewed-on: https://chromium-review.googlesource.com/569619
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#486323}
hugoh
Show pointer (not I-beam) when mouse drags in the air
A bug surfaced when Blink started to allow hidden selections.
The condition "show I-beam if we have a non-empty selection"
became too generous.

We should show an I-beam when:
- Node is editable
- Node is selectable
- A link's text is being selected

Besides fixing the condition I moved its block into
ShouldShowIBeamForNode() to try to gather stray I-beam
logic into one place.

TEST=LinkSelectionTest.DragOnNothingShowsPointer

BUG=735852

Change-Id: I5366462c713155754de39b0c5d11fa33656eb6e3
Reviewed-on: https://chromium-review.googlesource.com/566798
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Commit-Queue: Hugo Holgersson <hugoh@opera.com>
Cr-Commit-Position: refs/heads/master@{#486308}
fs
Remove kInitialFrameDelay from SMILTimeContainer::Start
This is an old hack to preserve behavior of certain tests. These tests
have since been fixed to not rely on this. Get rid of it and just call
UpdateAnimationsAndScheduleFrameIfNeeded(...) instead to schedule the
first frame just like any other.

BUG=726362

Change-Id: I1ff2673a8d4b71ea237a2902f10599e08bcfb7d6
Reviewed-on: https://chromium-review.googlesource.com/564608
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#486115}
bratell
Drop inspector jumbo excludes as they are not needed
Some files excluded from jumbo compilation seems to compile just
fine in jumbo so this patch removes their special treatment.

Review-Url: https://codereview.chromium.org/2971153002
Cr-Commit-Position: refs/heads/master@{#486000}
bratell
Avoid duplicate functions: one AddStringToDigestor is enough
There are two implementation of AddStringToDigestor. Beyond being
one more than needed, they also conflict in jumbo builds.

This patch merges the two AddStringToDigestor and removes the
conflicting files from the jumbo exclusion list.

Review-Url: https://codereview.chromium.org/2800133003
Cr-Commit-Position: refs/heads/master@{#485992}
bratell
Rename a constant in editing unit tests to make it more unique.
kDescription is the name of two constants in editing unit_tests and
in jumbo builds those collides. This renames one of them
kTestDescription to make both constants have unique names.

R=fs@opera.com

Bug: 
Change-Id: I7fcb2fde1a6841ef92fe7d55a7b363da7c2c7fa0
Reviewed-on: https://chromium-review.googlesource.com/568146
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: bratell at Opera <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#485970}
bratell
Avoid naming conflict for Cache and Response in cachestorage
There are multiple Cache types and Response types so when importing
one of them into the global namespace you can easily get naming conflicts, especially with jumbo. This renames Cache and Protocol
locally to avoid such naming conflicts.

Review-Url: https://codereview.chromium.org/2968183002
Cr-Commit-Position: refs/heads/master@{#485939}
bratell
Also check jumbo_excluded_sources when jumbo is disabled
Since jumbo is still disabled by default and there is no active
bot that checks things, it is best to check that jumbo_excluded_sources
are correct also when jumbo is disabled.

Bug: 713137
Change-Id: I85bb92f283be240a704ce3ec0d5765933ba52016
Reviewed-on: https://chromium-review.googlesource.com/563683
Commit-Queue: bratell at Opera <bratell@opera.com>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485913}
bratell
Rename ToElement<>(ListedElement) to ToHTMLObjectElementFromListedElement
Having two sets of templates named ToElement caused compilation failures
when both templates were visible to the compiler at the same time.
Since one of the templates doesn't benefit from being a template
this patch renames it and makes it an ordinary function.

R=fs@opera.com, tkent@chromium.org

Bug: 738389
Change-Id: Ia6247ad0f794cc4094f3f73cd7492ad5d94407c2
Reviewed-on: https://chromium-review.googlesource.com/567141
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Fredrik Söderquist <fs@opera.com>
Commit-Queue: bratell at Opera <bratell@opera.com>
Cr-Commit-Position: refs/heads/master@{#485904}
hugoh